Skip to content

Commit 48e3830

Browse files
committed
Rename positional json args. Fixes #7688
1 parent 88a5d7a commit 48e3830

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

packages/wrangler/src/pages/secret/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,11 @@ export const secret = (secretYargs: CommonYargsArgv, subHelp: SubHelp) => {
165165
}
166166
)
167167
.command(
168-
"bulk [json]",
168+
"bulk [file]",
169169
"Bulk upload secrets for a Pages project",
170170
(yargs) => {
171171
return yargs
172-
.positional("json", {
172+
.positional("file", {
173173
describe: `The file of key-value pairs to upload, as JSON in form {"key": value, ...} or .dev.vars file in the form KEY=VALUE`,
174174
type: "string",
175175
})
@@ -189,7 +189,7 @@ export const secret = (secretYargs: CommonYargsArgv, subHelp: SubHelp) => {
189189
logger.log(
190190
`🌀 Creating the secrets for the Pages project "${project.name}" (${env})`
191191
);
192-
const content = await parseBulkInputToObject(args.json);
192+
const content = await parseBulkInputToObject(args.file);
193193

194194
if (!content) {
195195
throw new FatalError(`🚨 No content found in file or piped input.`);

packages/wrangler/src/secret/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,9 @@ export const secretBulkCommand = createCommand({
384384
status: "stable",
385385
owner: "Workers: Deploy and Config",
386386
},
387-
positionalArgs: ["json"],
387+
positionalArgs: ["file"],
388388
args: {
389-
json: {
389+
file: {
390390
describe: `The file of key-value pairs to upload, as JSON in form {"key": value, ...} or .dev.vars file in the form KEY=VALUE`,
391391
type: "string",
392392
},
@@ -426,7 +426,7 @@ export const secretBulkCommand = createCommand({
426426
}`
427427
);
428428

429-
const content = await parseBulkInputToObject(args.json);
429+
const content = await parseBulkInputToObject(args.file);
430430

431431
if (!content) {
432432
return logger.error(`🚨 No content found in file, or piped input.`);

packages/wrangler/src/versions/secrets/bulk.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const versionsSecretBulkCommand = createCommand({
1919
printConfigWarnings: false,
2020
},
2121
args: {
22-
json: {
22+
file: {
2323
describe: `The file of key-value pairs to upload, as JSON in form {"key": value, ...} or .dev.vars file in the form KEY=VALUE`,
2424
type: "string",
2525
},
@@ -39,7 +39,7 @@ export const versionsSecretBulkCommand = createCommand({
3939
requiresArg: true,
4040
},
4141
},
42-
positionalArgs: ["json"],
42+
positionalArgs: ["file"],
4343
handler: async function versionsSecretPutBulkHandler(args, { config }) {
4444
const scriptName = getLegacyScriptName(args, config);
4545
if (!scriptName) {
@@ -54,7 +54,7 @@ export const versionsSecretBulkCommand = createCommand({
5454
`🌀 Creating the secrets for the Worker "${scriptName}" ${args.env ? `(${args.env})` : ""}`
5555
);
5656

57-
const content = await parseBulkInputToObject(args.json);
57+
const content = await parseBulkInputToObject(args.file);
5858

5959
if (!content) {
6060
return logger.error(`No content found in file or piped input.`);

0 commit comments

Comments
 (0)