@supacloud/admin 0.8.1 → 0.8.2
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 +11 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25302,6 +25302,11 @@ async function removePartialUpload(sftp, partialPath, uploadError) {
|
|
|
25302
25302
|
}
|
|
25303
25303
|
|
|
25304
25304
|
// src/shared/cli.ts
|
|
25305
|
+
function cliToolResultIsError(toolResult) {
|
|
25306
|
+
if (toolResult.isError === true)
|
|
25307
|
+
return true;
|
|
25308
|
+
return toolResult.content?.some((chunk) => chunk.type === "text" && chunk.text?.trimStart().startsWith("❌") === true) ?? false;
|
|
25309
|
+
}
|
|
25305
25310
|
function coerceCliValue(value) {
|
|
25306
25311
|
if (value === "true")
|
|
25307
25312
|
return true;
|
|
@@ -25430,7 +25435,7 @@ async function runCli(cliTools, args, options = {}) {
|
|
|
25430
25435
|
} else {
|
|
25431
25436
|
console.log(JSON.stringify(result, null, 2));
|
|
25432
25437
|
}
|
|
25433
|
-
process.exit(result
|
|
25438
|
+
process.exit(cliToolResultIsError(result) ? 1 : 0);
|
|
25434
25439
|
} catch (error) {
|
|
25435
25440
|
const message = formatCliError(error);
|
|
25436
25441
|
console.error(`❌ Error: ${message}`);
|
|
@@ -29167,7 +29172,7 @@ Actions: routes, upsert_route, update_route, delete_route, config, get_certifica
|
|
|
29167
29172
|
// package.json
|
|
29168
29173
|
var package_default = {
|
|
29169
29174
|
name: "@supacloud/admin",
|
|
29170
|
-
version: "0.8.
|
|
29175
|
+
version: "0.8.2",
|
|
29171
29176
|
description: "Platform administration CLI for SupaCloud operators",
|
|
29172
29177
|
type: "module",
|
|
29173
29178
|
main: "./dist/index.js",
|
|
@@ -29460,11 +29465,11 @@ async function main() {
|
|
|
29460
29465
|
console.log(chunk.text);
|
|
29461
29466
|
}
|
|
29462
29467
|
}
|
|
29463
|
-
|
|
29464
|
-
|
|
29465
|
-
return;
|
|
29468
|
+
} else {
|
|
29469
|
+
console.log(JSON.stringify(result, null, 2));
|
|
29466
29470
|
}
|
|
29467
|
-
|
|
29471
|
+
if (cliToolResultIsError(result))
|
|
29472
|
+
process.exitCode = 1;
|
|
29468
29473
|
return;
|
|
29469
29474
|
}
|
|
29470
29475
|
await runCli(cliTools, args, { commandName: "supacloud-admin" });
|