@devpad/cli 2.2.12 → 2.2.13

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.
Files changed (2) hide show
  1. package/dist/index.js +24 -9
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -16757,7 +16757,8 @@ async function handleResponseError(response) {
16757
16757
  const errorMessage = errorText || "Request failed";
16758
16758
  let parsedError = null;
16759
16759
  try {
16760
- parsedError = JSON.parse(errorText);
16760
+ const raw = JSON.parse(errorText);
16761
+ parsedError = raw;
16761
16762
  } catch {}
16762
16763
  if (response.status === HTTP_STATUS.BAD_REQUEST && parsedError?.error?.name === "ZodError") {
16763
16764
  const zodErrorDetails = parsedError.error.issues ? JSON.stringify(parsedError.error) : errorMessage;
@@ -16915,7 +16916,8 @@ var ApiClient = class {
16915
16916
  result = undefined;
16916
16917
  } else {
16917
16918
  try {
16918
- result = JSON.parse(text22);
16919
+ const raw = JSON.parse(text22);
16920
+ result = raw;
16919
16921
  } catch {
16920
16922
  result = text22;
16921
16923
  }
@@ -19007,7 +19009,8 @@ async function handleResponseError2(response) {
19007
19009
  const errorMessage = errorText || "Request failed";
19008
19010
  let parsedError = null;
19009
19011
  try {
19010
- parsedError = JSON.parse(errorText);
19012
+ const raw = JSON.parse(errorText);
19013
+ parsedError = raw;
19011
19014
  } catch {}
19012
19015
  if (response.status === HTTP_STATUS2.BAD_REQUEST && parsedError?.error?.name === "ZodError") {
19013
19016
  const zodErrorDetails = parsedError.error.issues ? JSON.stringify(parsedError.error) : errorMessage;
@@ -19165,7 +19168,8 @@ var ApiClient3 = class {
19165
19168
  result = undefined;
19166
19169
  } else {
19167
19170
  try {
19168
- result = JSON.parse(text22);
19171
+ const raw = JSON.parse(text22);
19172
+ result = raw;
19169
19173
  } catch {
19170
19174
  result = text22;
19171
19175
  }
@@ -21261,7 +21265,14 @@ var post_envelope = async (input) => {
21261
21265
  if (!response.ok) {
21262
21266
  return err({ kind: "http", status: response.status, status_text: response.statusText });
21263
21267
  }
21264
- const body = await response.json().catch(() => null);
21268
+ let raw_body = null;
21269
+ try {
21270
+ const parsed = await response.json();
21271
+ raw_body = parsed;
21272
+ } catch {
21273
+ raw_body = null;
21274
+ }
21275
+ const body = raw_body;
21265
21276
  if (body === null || body.ok !== true || body.value === undefined) {
21266
21277
  return err({ kind: "decode", message: "unexpected response envelope" });
21267
21278
  }
@@ -21515,7 +21526,8 @@ function build_manifest(inputs, artifacts) {
21515
21526
  let manifest_data = artifacts.manifest;
21516
21527
  if (typeof manifest_data === "string") {
21517
21528
  try {
21518
- manifest_data = JSON.parse(manifest_data);
21529
+ const parsed = JSON.parse(manifest_data);
21530
+ manifest_data = parsed;
21519
21531
  } catch {
21520
21532
  return err({
21521
21533
  kind: "schema_error",
@@ -22877,7 +22889,8 @@ var action_artifacts_upload = async (options) => {
22877
22889
  if (options.manifest !== undefined && options.manifest !== "") {
22878
22890
  manifest_text = readFileSync3(options.manifest, "utf8");
22879
22891
  }
22880
- const manifest_obj = JSON.parse(manifest_text);
22892
+ const raw_manifest = JSON.parse(manifest_text);
22893
+ const manifest_obj = raw_manifest;
22881
22894
  const infra_plan = readFileSync3(options.infraPlan);
22882
22895
  const pipeline = readFileSync3(options.pipeline);
22883
22896
  const grants = readFileSync3(options.grants);
@@ -23239,7 +23252,8 @@ var action_runs_events_ingest = (client_factory) => async (run_id, options) => {
23239
23252
  return fail_with(spinner, `--payload-file not found: ${options.payloadFile}`);
23240
23253
  const text3 = readFileSync3(options.payloadFile, "utf8");
23241
23254
  try {
23242
- payload = JSON.parse(text3);
23255
+ const parsed = JSON.parse(text3);
23256
+ payload = parsed;
23243
23257
  } catch (e) {
23244
23258
  return fail_with(spinner, `--payload-file is not valid JSON: ${e instanceof Error ? e.message : String(e)}`);
23245
23259
  }
@@ -23344,7 +23358,8 @@ var action_packages_update = (client_factory) => async (id2, options) => {
23344
23358
  }
23345
23359
  if (options.scriptNameOverrides !== undefined) {
23346
23360
  try {
23347
- patch.script_name_overrides = JSON.parse(options.scriptNameOverrides);
23361
+ const parsed = JSON.parse(options.scriptNameOverrides);
23362
+ patch.script_name_overrides = parsed;
23348
23363
  } catch (e) {
23349
23364
  return fail_with(spinner, `--script-name-overrides is not valid JSON: ${String(e)}`);
23350
23365
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devpad/cli",
3
- "version": "2.2.12",
3
+ "version": "2.2.13",
4
4
  "description": "Command line interface for devpad project management",
5
5
  "keywords": [
6
6
  "cli",
@@ -50,10 +50,10 @@
50
50
  "mime": "^3.0.0"
51
51
  },
52
52
  "devDependencies": {
53
- "@devpad/api": "^2.2.12",
54
- "@devpad/pipeline-fakes": "^2.2.12",
55
- "@devpad/pipeline-templates": "^2.2.12",
56
- "@devpad/schema": "^2.2.12",
53
+ "@devpad/api": "^2.2.13",
54
+ "@devpad/pipeline-fakes": "^2.2.13",
55
+ "@devpad/pipeline-templates": "^2.2.13",
56
+ "@devpad/schema": "^2.2.13",
57
57
  "@types/node": "^20.11.24",
58
58
  "bun-types": "latest",
59
59
  "chalk": "^5.3.0",