netlify-cli 24.7.0 → 24.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/base-command.d.ts +4 -3
- package/dist/commands/base-command.d.ts.map +1 -1
- package/dist/commands/base-command.js +29 -9
- package/dist/commands/base-command.js.map +1 -1
- package/dist/commands/main.d.ts.map +1 -1
- package/dist/commands/main.js +17 -0
- package/dist/commands/main.js.map +1 -1
- package/dist/lib/build.d.ts +1 -1
- package/dist/lib/build.d.ts.map +1 -1
- package/dist/lib/build.js +2 -1
- package/dist/lib/build.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/command-error-handler.d.ts +6 -0
- package/dist/utils/command-error-handler.d.ts.map +1 -0
- package/dist/utils/command-error-handler.js +16 -0
- package/dist/utils/command-error-handler.js.map +1 -0
- package/dist/utils/run-program.d.ts.map +1 -1
- package/dist/utils/run-program.js +11 -2
- package/dist/utils/run-program.js.map +1 -1
- package/npm-shrinkwrap.json +11 -4
- package/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CommanderError, type HelpContext } from 'commander';
|
|
2
|
+
export declare const isOptionError: (error: CommanderError) => boolean;
|
|
3
|
+
export declare const handleOptionError: (command: {
|
|
4
|
+
outputHelp: (context?: HelpContext) => void;
|
|
5
|
+
}) => void;
|
|
6
|
+
//# sourceMappingURL=command-error-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-error-handler.d.ts","sourceRoot":"","sources":["../../src/utils/command-error-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAA;AAW5D,eAAO,MAAM,aAAa,GAAI,OAAO,cAAc,KAAG,OAA6C,CAAA;AAEnG,eAAO,MAAM,iBAAiB,GAAI,SAAS;IAAE,UAAU,EAAE,CAAC,OAAO,CAAC,EAAE,WAAW,KAAK,IAAI,CAAA;CAAE,KAAG,IAM5F,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { log } from './command-helpers.js';
|
|
2
|
+
import { isInteractive } from './scripted-commands.js';
|
|
3
|
+
const OPTION_ERROR_CODES = new Set([
|
|
4
|
+
'commander.unknownOption',
|
|
5
|
+
'commander.missingArgument',
|
|
6
|
+
'commander.excessArguments',
|
|
7
|
+
]);
|
|
8
|
+
export const isOptionError = (error) => OPTION_ERROR_CODES.has(error.code);
|
|
9
|
+
export const handleOptionError = (command) => {
|
|
10
|
+
if (!isInteractive()) {
|
|
11
|
+
log();
|
|
12
|
+
command.outputHelp({ error: true });
|
|
13
|
+
log();
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=command-error-handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-error-handler.js","sourceRoot":"","sources":["../../src/utils/command-error-handler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAEtD,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC;IACjC,yBAAyB;IACzB,2BAA2B;IAC3B,2BAA2B;CAC5B,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAqB,EAAW,EAAE,CAAC,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AAEnG,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAAwD,EAAQ,EAAE;IAClG,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC;QACrB,GAAG,EAAE,CAAA;QACL,OAAO,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;QACnC,GAAG,EAAE,CAAA;IACP,CAAC;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-program.d.ts","sourceRoot":"","sources":["../../src/utils/run-program.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"run-program.d.ts","sourceRoot":"","sources":["../../src/utils/run-program.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAIlD,eAAO,MAAM,UAAU,GAAU,SAAS,WAAW,EAAE,MAAM,MAAM,EAAE,kBAiBpE,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { CommanderError } from 'commander';
|
|
1
2
|
import { injectForceFlagIfScripted } from './scripted-commands.js';
|
|
2
3
|
import { CI_FORCED_COMMANDS } from '../commands/main.js';
|
|
3
|
-
|
|
4
|
+
import { exit } from './command-helpers.js';
|
|
4
5
|
export const runProgram = async (program, argv) => {
|
|
5
6
|
const cmdName = argv[2];
|
|
6
7
|
// checks if the command has a force option
|
|
@@ -8,6 +9,14 @@ export const runProgram = async (program, argv) => {
|
|
|
8
9
|
if (isValidForceCommand) {
|
|
9
10
|
injectForceFlagIfScripted(argv);
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
+
try {
|
|
13
|
+
await program.parseAsync(argv);
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
if (error instanceof CommanderError) {
|
|
17
|
+
exit(error.exitCode);
|
|
18
|
+
}
|
|
19
|
+
throw error;
|
|
20
|
+
}
|
|
12
21
|
};
|
|
13
22
|
//# sourceMappingURL=run-program.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-program.js","sourceRoot":"","sources":["../../src/utils/run-program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AAElE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"run-program.js","sourceRoot":"","sources":["../../src/utils/run-program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE1C,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AAElE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAE3C,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,EAAE,OAAoB,EAAE,IAAc,EAAE,EAAE;IACvE,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;IACvB,2CAA2C;IAC3C,MAAM,mBAAmB,GAAG,OAAO,IAAI,kBAAkB,CAAA;IAEzD,IAAI,mBAAmB,EAAE,CAAC;QACxB,yBAAyB,CAAC,IAAI,CAAC,CAAA;IACjC,CAAC;IAED,IAAI,CAAC;QACH,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;IAChC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,cAAc,EAAE,CAAC;YACpC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;QACtB,CAAC;QACD,MAAM,KAAK,CAAA;IACb,CAAC;AACH,CAAC,CAAA"}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netlify-cli",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.8.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "netlify-cli",
|
|
9
|
-
"version": "24.
|
|
9
|
+
"version": "24.8.1",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"dependencies": {
|
|
@@ -10138,7 +10138,9 @@
|
|
|
10138
10138
|
"license": "MIT"
|
|
10139
10139
|
},
|
|
10140
10140
|
"node_modules/node-forge": {
|
|
10141
|
-
"version": "1.
|
|
10141
|
+
"version": "1.4.0",
|
|
10142
|
+
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.0.tgz",
|
|
10143
|
+
"integrity": "sha512-LarFH0+6VfriEhqMMcLX2F7SwSXeWwnEAJEsYm5QKWchiVYVvJyV9v7UDvUv+w5HO23ZpQTXDv/GxdDdMyOuoQ==",
|
|
10142
10144
|
"license": "(BSD-3-Clause OR GPL-2.0)",
|
|
10143
10145
|
"engines": {
|
|
10144
10146
|
"node": ">= 6.13.0"
|
|
@@ -13244,13 +13246,18 @@
|
|
|
13244
13246
|
}
|
|
13245
13247
|
},
|
|
13246
13248
|
"node_modules/yaml": {
|
|
13247
|
-
"version": "2.8.
|
|
13249
|
+
"version": "2.8.3",
|
|
13250
|
+
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz",
|
|
13251
|
+
"integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==",
|
|
13248
13252
|
"license": "ISC",
|
|
13249
13253
|
"bin": {
|
|
13250
13254
|
"yaml": "bin.mjs"
|
|
13251
13255
|
},
|
|
13252
13256
|
"engines": {
|
|
13253
13257
|
"node": ">= 14.6"
|
|
13258
|
+
},
|
|
13259
|
+
"funding": {
|
|
13260
|
+
"url": "https://github.com/sponsors/eemeli"
|
|
13254
13261
|
}
|
|
13255
13262
|
},
|
|
13256
13263
|
"node_modules/yargs": {
|