insta 0.0.48 → 0.0.51
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/README.md +9 -3
- package/dist/api.js +1 -1
- package/dist/commands/auth.js +37 -14
- package/dist/commands/billing.js +42 -5
- package/dist/commands/build.js +34 -9
- package/dist/commands/compute.js +458 -45
- package/dist/commands/db-query.js +102 -0
- package/dist/commands/deploy.js +20 -1
- package/dist/commands/env.js +1 -1
- package/dist/commands/setup.js +9 -84
- package/dist/commands/upgrade.js +282 -54
- package/dist/index.js +31 -18
- package/dist/spawn.js +77 -0
- package/dist/util.js +17 -2
- package/package.json +1 -1
package/dist/util.js
CHANGED
|
@@ -48,9 +48,24 @@ export function openUrl(url) {
|
|
|
48
48
|
return false;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
export
|
|
51
|
+
export class CliExit extends Error {
|
|
52
|
+
constructor() {
|
|
53
|
+
// Preserve the observable error used by direct command-unit tests that previously mocked
|
|
54
|
+
// process.exit(1) by throwing `Error('exit 1')`.
|
|
55
|
+
super('exit 1');
|
|
56
|
+
this.name = 'CliExit';
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export function fail(msg) {
|
|
52
60
|
process.stderr.write(`error: ${msg}\n`);
|
|
53
|
-
process.
|
|
61
|
+
process.exitCode = 1;
|
|
62
|
+
}
|
|
63
|
+
// Stop the current command without forcing Node to tear down active libuv handles. On Windows,
|
|
64
|
+
// process.exit() can race the detached update-check child and abort in src\win\async.c with
|
|
65
|
+
// UV_HANDLE_CLOSING. The guard absorbs CliExit after fail() records the intended exit status.
|
|
66
|
+
export function die(msg) {
|
|
67
|
+
fail(msg);
|
|
68
|
+
throw new CliExit();
|
|
54
69
|
}
|
|
55
70
|
export function printJson(v) {
|
|
56
71
|
process.stdout.write(JSON.stringify(v, null, 2) + '\n');
|