@zuplo/cli 1.121.0 → 1.123.0

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/cmds/dev.js CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="cd26cd84-311b-5031-9a99-53eb489538ba")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c8f33de8-91fb-59f6-aab3-9b275b691ae6")}catch(e){}}();
3
3
  import { captureEvent } from "../common/analytics/lib.js";
4
4
  import { identify } from "../common/middleware/user-identification.js";
5
5
  import setBlocking from "../common/output.js";
@@ -43,9 +43,15 @@ export default {
43
43
  });
44
44
  },
45
45
  handler: async (argv) => {
46
- await captureEvent({ argv, event: "zup dev" });
46
+ await captureEvent({
47
+ argv,
48
+ properties: {
49
+ "debug-port": argv["debugPort"],
50
+ },
51
+ event: "zup dev",
52
+ });
47
53
  await dev(argv);
48
54
  },
49
55
  };
50
56
  //# sourceMappingURL=dev.js.map
51
- //# debugId=cd26cd84-311b-5031-9a99-53eb489538ba
57
+ //# debugId=c8f33de8-91fb-59f6-aab3-9b275b691ae6
@@ -1,11 +1,13 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6b8807e2-ae71-5c69-b1b0-2b87dae3cfdb")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a94104ad-6a44-5d00-851d-f9a06e68c72c")}catch(e){}}();
3
3
  import { applyEdits, modify } from "jsonc-parser";
4
4
  import { existsSync } from "node:fs";
5
5
  import { readFile, writeFile } from "node:fs/promises";
6
6
  import { join, relative } from "node:path";
7
7
  import prettier from "prettier";
8
8
  import { ZUPLO_FALLBACK_JSON_FILE, ZUPLO_PREFERRED_JSON_FILE, ZUPLO_SYSTEM_ENV_VAR, } from "../common/constants.js";
9
+ import { logger } from "../common/logger.js";
10
+ import { printCriticalFailureToConsoleAndExit } from "../common/output.js";
9
11
  import settings from "../common/settings.js";
10
12
  export async function safeMergeConfig(dir, project) {
11
13
  const normalizedDir = join(relative(process.cwd(), dir));
@@ -55,6 +57,19 @@ export async function pullSystemConfig(argv) {
55
57
  authorization: `Bearer ${argv["api-key"]}`,
56
58
  },
57
59
  });
60
+ if (!environmentResponseFromDeveloperAPI.ok) {
61
+ if (environmentResponseFromDeveloperAPI.status === 404 ||
62
+ environmentResponseFromDeveloperAPI.status === 401) {
63
+ await printCriticalFailureToConsoleAndExit("Error: Failed to link data from the environment. The environment you specified doesn't exist or you don't have access to it.");
64
+ }
65
+ else {
66
+ logger.error({
67
+ status: environmentResponseFromDeveloperAPI.status,
68
+ statusText: environmentResponseFromDeveloperAPI.statusText,
69
+ }, `Failed to link data from ${argv.environment}`);
70
+ await printCriticalFailureToConsoleAndExit("Error: Failed to link data from the environment. Please try again later.");
71
+ }
72
+ }
58
73
  const payload = await environmentResponseFromDeveloperAPI.json();
59
74
  const content = `
60
75
  # This file is auto-generated from zup link. Please do not edit it manually.
@@ -69,4 +84,4 @@ ZUPLO_SYSTEM_CONFIGURATIONS=${payload["systemConfigurations"]}
69
84
  await writeFile(zuploPreferredConfigFile, content);
70
85
  }
71
86
  //# sourceMappingURL=populate.js.map
72
- //# debugId=6b8807e2-ae71-5c69-b1b0-2b87dae3cfdb
87
+ //# debugId=a94104ad-6a44-5d00-851d-f9a06e68c72c
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/cli",
3
- "version": "1.121.0",
3
+ "version": "1.123.0",
4
4
  "type": "module",
5
5
  "repository": "https://github.com/zuplo/cli",
6
6
  "description": "The command-line interface for Zuplo",