@withone/cli 1.15.0 → 1.17.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.
@@ -45,10 +45,12 @@ var OneApi = class {
45
45
  }
46
46
  const response = await fetch(url, fetchOpts);
47
47
  if (!response.ok) {
48
- const text = await response.text();
49
- throw new ApiError(response.status, text || `HTTP ${response.status}`);
48
+ const text2 = await response.text();
49
+ throw new ApiError(response.status, text2 || `HTTP ${response.status}`);
50
50
  }
51
- return response.json();
51
+ const text = await response.text();
52
+ if (!text) return {};
53
+ return JSON.parse(text);
52
54
  }
53
55
  async validateApiKey() {
54
56
  try {
@@ -701,7 +703,7 @@ async function executeSubflowStep(step, context, api, permissions, allowedAction
701
703
  if (flowStack.includes(resolvedKey)) {
702
704
  throw new Error(`Circular flow detected: ${[...flowStack, resolvedKey].join(" \u2192 ")}`);
703
705
  }
704
- const { loadFlow: loadFlow2 } = await import("./flow-runner-7RUK2WMF.js");
706
+ const { loadFlow: loadFlow2 } = await import("./flow-runner-AJGIUT6E.js");
705
707
  const subFlow = loadFlow2(resolvedKey);
706
708
  const subContext = await executeFlow(
707
709
  subFlow,
@@ -4,7 +4,7 @@ import {
4
4
  loadFlow,
5
5
  resolveFlowPath,
6
6
  saveFlow
7
- } from "./chunk-SX2Y4HDW.js";
7
+ } from "./chunk-QW4MBV4F.js";
8
8
  export {
9
9
  FlowRunner,
10
10
  listFlows,