nolo-cli 0.256.0-alpha.1 → 0.257.0-alpha.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/{appDeleteCommands-IIOP3CZU.js → appDeleteCommands-FEPN62UR.js} +1 -1
- package/{appDeployCommands-S5ZNB7MA.js → appDeployCommands-DPFEWFYZ.js} +1 -1
- package/{appDeployStatusCommands-MQIGLK3T.js → appDeployStatusCommands-LQ5X5KVX.js} +1 -1
- package/{appGetCommands-XFX4E3KR.js → appGetCommands-W3JBBIF7.js} +1 -1
- package/{appListCommands-QR7LT4AK.js → appListCommands-LUHZS7JU.js} +1 -1
- package/{chunk-7JMBQ7YU.js → chunk-U2H426FE.js} +6 -4
- package/{commandRegistry-RNYUOKUE.js → commandRegistry-FZMQYVNT.js} +5 -5
- package/index.js +1 -1
- package/package.json +1 -1
|
@@ -33,9 +33,10 @@ async function cliApiRequest(args) {
|
|
|
33
33
|
if (args.body !== void 0 && args.body !== null && method !== "GET") {
|
|
34
34
|
init.body = JSON.stringify(args.body);
|
|
35
35
|
}
|
|
36
|
+
const fetchFn = args.fetchImpl ?? fetch;
|
|
36
37
|
let response;
|
|
37
38
|
try {
|
|
38
|
-
response = await
|
|
39
|
+
response = await fetchFn(url, init);
|
|
39
40
|
} catch (error) {
|
|
40
41
|
throw new CliApiError(t("api.requestFailed", error.message), "NETWORK_ERROR", 0);
|
|
41
42
|
}
|
|
@@ -49,9 +50,10 @@ async function cliApiRequest(args) {
|
|
|
49
50
|
response.status
|
|
50
51
|
);
|
|
51
52
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const
|
|
53
|
+
const isSuccessEnvelope = data.success === true || data.ok === true;
|
|
54
|
+
if (!response.ok || !isSuccessEnvelope) {
|
|
55
|
+
const errorObj = typeof data.error === "object" && data.error !== null ? data.error : {};
|
|
56
|
+
const message = errorObj.message || (typeof data.error === "string" ? data.error : "") || data.message || t("api.requestFailedHttp", String(response.status));
|
|
55
57
|
const code = errorObj.code || `HTTP_${response.status}`;
|
|
56
58
|
throw new CliApiError(message, code, response.status);
|
|
57
59
|
}
|
|
@@ -236,23 +236,23 @@ function getAgentInternalCommandEntries() {
|
|
|
236
236
|
function getAppInternalCommandEntries() {
|
|
237
237
|
return [
|
|
238
238
|
createEnvCommand(["app", "list"], "List your apps", async (args, deps) => {
|
|
239
|
-
const { runAppListCommand } = await import("./appListCommands-
|
|
239
|
+
const { runAppListCommand } = await import("./appListCommands-LUHZS7JU.js");
|
|
240
240
|
return runAppListCommand(args, deps);
|
|
241
241
|
}),
|
|
242
242
|
createEnvCommand(["app", "get"], "Get app details", async (args, deps) => {
|
|
243
|
-
const { runAppGetCommand } = await import("./appGetCommands-
|
|
243
|
+
const { runAppGetCommand } = await import("./appGetCommands-W3JBBIF7.js");
|
|
244
244
|
return runAppGetCommand(args, deps);
|
|
245
245
|
}),
|
|
246
246
|
createEnvCommand(["app", "deploy"], "Deploy an app", async (args, deps) => {
|
|
247
|
-
const { runAppDeployCommand } = await import("./appDeployCommands-
|
|
247
|
+
const { runAppDeployCommand } = await import("./appDeployCommands-DPFEWFYZ.js");
|
|
248
248
|
return runAppDeployCommand(args, deps);
|
|
249
249
|
}),
|
|
250
250
|
createEnvCommand(["app", "deploy", "status"], "Check app deploy status", async (args, deps) => {
|
|
251
|
-
const { runAppDeployStatusCommand } = await import("./appDeployStatusCommands-
|
|
251
|
+
const { runAppDeployStatusCommand } = await import("./appDeployStatusCommands-LQ5X5KVX.js");
|
|
252
252
|
return runAppDeployStatusCommand(args, deps);
|
|
253
253
|
}),
|
|
254
254
|
createEnvCommand(["app", "delete"], "Delete an app", async (args, deps) => {
|
|
255
|
-
const { runAppDeleteCommand } = await import("./appDeleteCommands-
|
|
255
|
+
const { runAppDeleteCommand } = await import("./appDeleteCommands-FEPN62UR.js");
|
|
256
256
|
return runAppDeleteCommand(args, deps);
|
|
257
257
|
})
|
|
258
258
|
];
|
package/index.js
CHANGED
|
@@ -169,7 +169,7 @@ async function main() {
|
|
|
169
169
|
await superviseCliAuthorityBrokerProcess(args.slice(1));
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
|
-
const { createCliRuntimeContext, looksLikeDaemonShortcut, renderHelpText, resolveCommand, runResolvedCommand } = await import("./commandRegistry-
|
|
172
|
+
const { createCliRuntimeContext, looksLikeDaemonShortcut, renderHelpText, resolveCommand, runResolvedCommand } = await import("./commandRegistry-FZMQYVNT.js");
|
|
173
173
|
const { buildCliRuntimeEnv, loadProfileConfig } = await import("./profileConfig-KOWK4HOG.js");
|
|
174
174
|
const { resolveTuiLaunchMode } = await import("./runtimeModeArgs-X7DL7PUN.js");
|
|
175
175
|
const runtimeEnv = {
|