Skip to content

Commit cd60c9c

Browse files
authored
[wrangler] chore: Show --jurisdiction flag in KV Create Namespace help (#15803)
1 parent bdda4c3 commit cd60c9c

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

‎.changeset/quiet-ravens-help.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
Show `--jurisdiction` in help for `wrangler kv namespace create`
6+
7+
The option was supported but omitted from the command's help output. Users can now discover how to create KV namespaces in a specific jurisdiction.

‎packages/wrangler/src/__tests__/kv/namespace.test.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ describe("kv", () => {
5151
);
5252
}
5353

54+
it("should show the jurisdiction option in help", async ({ expect }) => {
55+
await runWrangler("kv namespace create --help");
56+
57+
expect(std.out).toMatch(
58+
/--jurisdiction\s+The jurisdiction where the new namespace will be created \(e.g. "us", "eu", "fedramp"\)\s{2}\[string\]/
59+
);
60+
});
61+
5462
it("should error if no namespace is given", async ({ expect }) => {
5563
await expect(
5664
runWrangler("kv namespace create")
@@ -78,6 +86,7 @@ describe("kv", () => {
7886
7987
OPTIONS
8088
--preview Interact with a preview namespace [boolean]
89+
--jurisdiction The jurisdiction where the new namespace will be created (e.g. "us", "eu", "fedramp") [string]
8190
--use-remote Use a remote binding when adding the newly created resource to your config [boolean]
8291
--update-config Automatically update your config file with the newly added resource [boolean]
8392
--binding The binding name of this resource in your Worker [string]"
@@ -118,6 +127,7 @@ describe("kv", () => {
118127
119128
OPTIONS
120129
--preview Interact with a preview namespace [boolean]
130+
--jurisdiction The jurisdiction where the new namespace will be created (e.g. "us", "eu", "fedramp") [string]
121131
--use-remote Use a remote binding when adding the newly created resource to your config [boolean]
122132
--update-config Automatically update your config file with the newly added resource [boolean]
123133
--binding The binding name of this resource in your Worker [string]"

‎packages/wrangler/src/kv/index.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ export const kvNamespaceCreateCommand = createCommand({
101101
describe:
102102
'The jurisdiction where the new namespace will be created (e.g. "us", "eu", "fedramp")',
103103
requiresArg: true,
104-
hidden: true,
105104
},
106105
...sharedResourceCreationArgs,
107106
},

0 commit comments

Comments
 (0)