From 3c5a95402faef2a447c5cea975245c63613f042c Mon Sep 17 00:00:00 2001 From: Reese is on Codeberg Date: Fri, 3 Jul 2026 14:59:10 -0500 Subject: [PATCH 1/4] Add -y flag to allow for skipping warning message & prompt --- cli/src/cli.ts | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/cli/src/cli.ts b/cli/src/cli.ts index fda9049f50..dfe63d754b 100644 --- a/cli/src/cli.ts +++ b/cli/src/cli.ts @@ -43,6 +43,11 @@ const main = defineCommand({ description: 'Port to listen on', default: String(DEFAULT_PORT), }, + y: { + type: 'boolean', + description: 'Skip warning message and accept prompt', + default: false + } }, async run({ args }) { const port = Number.parseInt(args.port as string, 10) || DEFAULT_PORT @@ -51,18 +56,20 @@ const main = defineCommand({ initLogger() - // Warning message and accept prompt - logWarning( - `This allows ${styleText('underline', 'npmx.dev')} to access your npm cli and any authenticated contexts.`, - ) - const accept = await p.confirm({ - message: 'Do you accept?', - initialValue: true, - }) - - if (!accept || p.isCancel(accept)) { - logError('Connector setup cancelled.') - process.exit(0) + if(!args.y) { + // Warning message and accept prompt + logWarning( + `This allows ${styleText('underline', 'npmx.dev')} to access your npm cli and any authenticated contexts.`, + ) + const accept = await p.confirm({ + message: 'Do you accept?', + initialValue: true, + }) + + if (!accept || p.isCancel(accept)) { + logError('Connector setup cancelled.') + process.exit(0) + } } // Check npm authentication before starting From e8a99ae589f22e1232d0b6f5f78868041ae645af Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Fri, 3 Jul 2026 20:13:47 +0000 Subject: [PATCH 2/4] [autofix.ci] apply automated fixes --- cli/src/cli.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/src/cli.ts b/cli/src/cli.ts index dfe63d754b..59ce3ee068 100644 --- a/cli/src/cli.ts +++ b/cli/src/cli.ts @@ -46,8 +46,8 @@ const main = defineCommand({ y: { type: 'boolean', description: 'Skip warning message and accept prompt', - default: false - } + default: false, + }, }, async run({ args }) { const port = Number.parseInt(args.port as string, 10) || DEFAULT_PORT @@ -56,7 +56,7 @@ const main = defineCommand({ initLogger() - if(!args.y) { + if (!args.y) { // Warning message and accept prompt logWarning( `This allows ${styleText('underline', 'npmx.dev')} to access your npm cli and any authenticated contexts.`, @@ -65,7 +65,7 @@ const main = defineCommand({ message: 'Do you accept?', initialValue: true, }) - + if (!accept || p.isCancel(accept)) { logError('Connector setup cancelled.') process.exit(0) From 64d304dc720e9a4fb890761c5d6138aa96579d89 Mon Sep 17 00:00:00 2001 From: Reese is on Codeberg Date: Sat, 4 Jul 2026 00:27:42 -0500 Subject: [PATCH 3/4] Fix -y alias --- cli/src/cli.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/src/cli.ts b/cli/src/cli.ts index 59ce3ee068..963f5756bd 100644 --- a/cli/src/cli.ts +++ b/cli/src/cli.ts @@ -43,10 +43,11 @@ const main = defineCommand({ description: 'Port to listen on', default: String(DEFAULT_PORT), }, - y: { + yes: { type: 'boolean', description: 'Skip warning message and accept prompt', default: false, + alias: ["y"] }, }, async run({ args }) { @@ -56,7 +57,7 @@ const main = defineCommand({ initLogger() - if (!args.y) { + if (!args.yes) { // Warning message and accept prompt logWarning( `This allows ${styleText('underline', 'npmx.dev')} to access your npm cli and any authenticated contexts.`, From 214cf82db63ac413ff1898428c19da7a72f5a505 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Sat, 4 Jul 2026 05:29:05 +0000 Subject: [PATCH 4/4] [autofix.ci] apply automated fixes --- cli/src/cli.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/src/cli.ts b/cli/src/cli.ts index 963f5756bd..79f7a331ab 100644 --- a/cli/src/cli.ts +++ b/cli/src/cli.ts @@ -47,7 +47,7 @@ const main = defineCommand({ type: 'boolean', description: 'Skip warning message and accept prompt', default: false, - alias: ["y"] + alias: ['y'], }, }, async run({ args }) {