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.
@@ -4,7 +4,7 @@ import {
4
4
  pickDefined,
5
5
  printCliError,
6
6
  resolveCliContext
7
- } from "./chunk-7JMBQ7YU.js";
7
+ } from "./chunk-U2H426FE.js";
8
8
  import {
9
9
  hasFlag,
10
10
  hasHelpArg
@@ -5,7 +5,7 @@ import {
5
5
  pickDefined,
6
6
  printCliError,
7
7
  resolveCliContext
8
- } from "./chunk-7JMBQ7YU.js";
8
+ } from "./chunk-U2H426FE.js";
9
9
  import {
10
10
  hasFlag,
11
11
  hasHelpArg
@@ -4,7 +4,7 @@ import {
4
4
  outputResult,
5
5
  printCliError,
6
6
  resolveCliContext
7
- } from "./chunk-7JMBQ7YU.js";
7
+ } from "./chunk-U2H426FE.js";
8
8
  import {
9
9
  hasFlag,
10
10
  hasHelpArg
@@ -5,7 +5,7 @@ import {
5
5
  pickDefined,
6
6
  printCliError,
7
7
  resolveCliContext
8
- } from "./chunk-7JMBQ7YU.js";
8
+ } from "./chunk-U2H426FE.js";
9
9
  import {
10
10
  hasFlag,
11
11
  hasHelpArg
@@ -5,7 +5,7 @@ import {
5
5
  pickDefined,
6
6
  printCliError,
7
7
  resolveCliContext
8
- } from "./chunk-7JMBQ7YU.js";
8
+ } from "./chunk-U2H426FE.js";
9
9
  import {
10
10
  hasFlag,
11
11
  hasHelpArg
@@ -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 fetch(url, init);
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
- if (!response.ok || data.success !== true) {
53
- const errorObj = data.error ?? {};
54
- const message = errorObj.message || data.message || t("api.requestFailedHttp", String(response.status));
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-QR7LT4AK.js");
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-XFX4E3KR.js");
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-S5ZNB7MA.js");
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-MQIGLK3T.js");
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-IIOP3CZU.js");
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-RNYUOKUE.js");
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 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nolo-cli",
3
- "version": "0.256.0-alpha.1",
3
+ "version": "0.257.0-alpha.1",
4
4
  "type": "module",
5
5
  "description": "Agent-first terminal workspace for Nolo",
6
6
  "bin": {