@groundfloorcloud/cli 0.1.7 → 0.1.8
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/index.js +26 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2520,7 +2520,7 @@ import path7 from "path";
|
|
|
2520
2520
|
import AdmZip4 from "adm-zip";
|
|
2521
2521
|
|
|
2522
2522
|
// src/version.ts
|
|
2523
|
-
var GF_VERSION = "0.1.
|
|
2523
|
+
var GF_VERSION = "0.1.8";
|
|
2524
2524
|
var GF_NPM_PACKAGE = "@groundfloorcloud/cli";
|
|
2525
2525
|
|
|
2526
2526
|
// src/commands/apps-init.ts
|
|
@@ -2818,6 +2818,24 @@ async function resolveLatest(opts) {
|
|
|
2818
2818
|
return cached?.latest ?? null;
|
|
2819
2819
|
}
|
|
2820
2820
|
|
|
2821
|
+
// src/commander-exit.ts
|
|
2822
|
+
var QUIET_EXIT_CODES = /* @__PURE__ */ new Set([
|
|
2823
|
+
"commander.version",
|
|
2824
|
+
"commander.helpDisplayed"
|
|
2825
|
+
]);
|
|
2826
|
+
function isQuietCommanderExit(err) {
|
|
2827
|
+
if (err == null || typeof err !== "object") return false;
|
|
2828
|
+
const code = err.code;
|
|
2829
|
+
return typeof code === "string" && QUIET_EXIT_CODES.has(code);
|
|
2830
|
+
}
|
|
2831
|
+
function commanderExitCode(err) {
|
|
2832
|
+
if (err != null && typeof err === "object") {
|
|
2833
|
+
const code = err.exitCode;
|
|
2834
|
+
if (typeof code === "number") return code;
|
|
2835
|
+
}
|
|
2836
|
+
return 0;
|
|
2837
|
+
}
|
|
2838
|
+
|
|
2821
2839
|
// src/index.ts
|
|
2822
2840
|
function collect(value, previous) {
|
|
2823
2841
|
return previous.concat([value]);
|
|
@@ -2993,6 +3011,9 @@ function wireUnknownCommands(root, current, latest) {
|
|
|
2993
3011
|
);
|
|
2994
3012
|
process.exit(1);
|
|
2995
3013
|
}
|
|
3014
|
+
if (isQuietCommanderExit(err)) {
|
|
3015
|
+
process.exit(commanderExitCode(err));
|
|
3016
|
+
}
|
|
2996
3017
|
throw err;
|
|
2997
3018
|
});
|
|
2998
3019
|
for (const child of cmd.commands) walk(child);
|
|
@@ -3016,6 +3037,10 @@ async function main() {
|
|
|
3016
3037
|
await program.parseAsync(process.argv);
|
|
3017
3038
|
}
|
|
3018
3039
|
main().catch((err) => {
|
|
3040
|
+
if (isQuietCommanderExit(err)) {
|
|
3041
|
+
process.exitCode = commanderExitCode(err);
|
|
3042
|
+
return;
|
|
3043
|
+
}
|
|
3019
3044
|
const message = err instanceof Error ? err.message : String(err);
|
|
3020
3045
|
process.stderr.write(`Error: ${message}
|
|
3021
3046
|
`);
|
package/package.json
CHANGED