@zuplo/cli 1.71.0 → 1.73.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.
Files changed (39) hide show
  1. package/dist/cli.js +14 -3
  2. package/dist/cmds/convert.js +6 -3
  3. package/dist/cmds/delete.js +6 -3
  4. package/dist/cmds/deploy.js +6 -3
  5. package/dist/cmds/dev.js +6 -3
  6. package/dist/cmds/editor.js +6 -3
  7. package/dist/cmds/link.js +6 -3
  8. package/dist/cmds/list.js +6 -3
  9. package/dist/cmds/login.js +6 -3
  10. package/dist/cmds/project/update.js +6 -3
  11. package/dist/cmds/test.js +6 -3
  12. package/dist/cmds/tunnel/create.js +6 -3
  13. package/dist/cmds/tunnel/delete.js +6 -3
  14. package/dist/cmds/tunnel/describe.js +6 -3
  15. package/dist/cmds/tunnel/list.js +6 -3
  16. package/dist/cmds/tunnel/rotate-token.js +6 -3
  17. package/dist/cmds/tunnel/services/describe.js +6 -3
  18. package/dist/cmds/tunnel/services/update.js +6 -3
  19. package/dist/cmds/variable/create.js +6 -3
  20. package/dist/cmds/variable/update.js +6 -3
  21. package/dist/common/analytics/lib.js +57 -0
  22. package/dist/common/constants.js +4 -2
  23. package/dist/common/machine-id/lib.js +68 -0
  24. package/dist/common/middleware/user-identification.js +38 -0
  25. package/dist/common/output.js +10 -2
  26. package/dist/deploy/poll-deployment.js +4 -4
  27. package/dist/link/handler.js +7 -7
  28. package/dist/list/handler.js +4 -3
  29. package/dist/tunnel/create/handler.js +4 -4
  30. package/dist/tunnel/delete/handler.js +4 -4
  31. package/dist/tunnel/describe/handler.js +4 -4
  32. package/dist/tunnel/list/handler.js +3 -3
  33. package/dist/tunnel/rotate-token/handler.js +4 -4
  34. package/dist/tunnel/services/describe/handler.js +4 -4
  35. package/dist/tunnel/services/update/handler.js +4 -4
  36. package/dist/tunnel/services/update/poll-provisioning-operations.js +8 -4
  37. package/dist/variable/create/handler.js +4 -3
  38. package/dist/variable/update/handler.js +4 -3
  39. package/package.json +3 -2
package/dist/cli.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]="f10a0bf2-e5b7-5794-9dfe-b8b686b85b95")}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]="19cb753a-00b0-5219-b465-ac77d486084b")}catch(e){}}();
3
3
  import * as dotenv from "dotenv";
4
4
  dotenv.config();
5
5
  import * as Sentry from "@sentry/node";
@@ -20,9 +20,10 @@ import project from "./cmds/project/index.js";
20
20
  import test from "./cmds/test.js";
21
21
  import tunnel from "./cmds/tunnel/index.js";
22
22
  import variable from "./cmds/variable/index.js";
23
+ import { shutdownAnalytics } from "./common/analytics/lib.js";
23
24
  import { MAX_WAIT_PENDING_TIME_MS, SENTRY_DSN } from "./common/constants.js";
24
25
  import { logger } from "./common/logger.js";
25
- import { printCriticalFailureToConsoleAndExit } from "./common/output.js";
26
+ import { printCriticalFailureToConsoleAndExit, printDiagnosticsToConsole, } from "./common/output.js";
26
27
  const MIN_NODE_VERSION = "18.0.0";
27
28
  if (gte(process.versions.node, MIN_NODE_VERSION)) {
28
29
  let packageJson;
@@ -54,7 +55,17 @@ if (gte(process.versions.node, MIN_NODE_VERSION)) {
54
55
  .demandCommand()
55
56
  .strictCommands()
56
57
  .version(packageJson?.version)
58
+ .fail(async (msg, err, yargs) => {
59
+ if (err) {
60
+ Sentry.captureException(err);
61
+ }
62
+ if (msg) {
63
+ printDiagnosticsToConsole(msg);
64
+ }
65
+ printCriticalFailureToConsoleAndExit(await yargs.help());
66
+ })
57
67
  .help().argv;
68
+ await shutdownAnalytics();
58
69
  void Sentry.close(MAX_WAIT_PENDING_TIME_MS).then(() => {
59
70
  process.exit(0);
60
71
  });
@@ -65,4 +76,4 @@ else {
65
76
  Consider using a Node.js version manager such as https://github.com/nvm-sh/nvm.`);
66
77
  }
67
78
  //# sourceMappingURL=cli.js.map
68
- //# debugId=f10a0bf2-e5b7-5794-9dfe-b8b686b85b95
79
+ //# debugId=19cb753a-00b0-5219-b465-ac77d486084b
@@ -1,5 +1,7 @@
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]="1ee05eb2-eaf1-539f-99b2-cad44de903dd")}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]="c359d71b-6ce9-5ec9-b31a-8de3cedcb7df")}catch(e){}}();
3
+ import { captureEvent } from "../common/analytics/lib.js";
4
+ import { identify } from "../common/middleware/user-identification.js";
3
5
  import setBlocking from "../common/output.js";
4
6
  import { convert } from "../convert/handler.js";
5
7
  export default {
@@ -14,11 +16,12 @@ export default {
14
16
  normalize: true,
15
17
  hidden: true,
16
18
  })
17
- .middleware([setBlocking]);
19
+ .middleware([setBlocking, identify]);
18
20
  },
19
21
  handler: async (argv) => {
22
+ await captureEvent({ argv, event: "zup convert" });
20
23
  await convert(argv);
21
24
  },
22
25
  };
23
26
  //# sourceMappingURL=convert.js.map
24
- //# debugId=1ee05eb2-eaf1-539f-99b2-cad44de903dd
27
+ //# debugId=c359d71b-6ce9-5ec9-b31a-8de3cedcb7df
@@ -1,6 +1,8 @@
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]="8065ff8d-d135-5d82-9b8c-74abe459c85d")}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]="5b63d768-97c3-599a-ad9b-c0309b574315")}catch(e){}}();
3
+ import { captureEvent } from "../common/analytics/lib.js";
3
4
  import { configure } from "../common/middleware/user-configuration.js";
5
+ import { identify } from "../common/middleware/user-identification.js";
4
6
  import setBlocking from "../common/output.js";
5
7
  import { YargsChecker } from "../common/validators/lib.js";
6
8
  import { ProjectIsSetValidator } from "../common/validators/project-name-validator.js";
@@ -29,14 +31,15 @@ export default {
29
31
  })
30
32
  .boolean("wait")
31
33
  .demandOption(["api-key", "url"])
32
- .middleware([setBlocking, configure])
34
+ .middleware([setBlocking, configure, identify])
33
35
  .check(async (argv) => {
34
36
  return await new YargsChecker(new ProjectIsSetValidator()).check(argv);
35
37
  });
36
38
  },
37
39
  handler: async (argv) => {
40
+ await captureEvent({ argv, event: "zup delete" });
38
41
  await deleteZup(argv);
39
42
  },
40
43
  };
41
44
  //# sourceMappingURL=delete.js.map
42
- //# debugId=8065ff8d-d135-5d82-9b8c-74abe459c85d
45
+ //# debugId=5b63d768-97c3-599a-ad9b-c0309b574315
@@ -1,6 +1,8 @@
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]="cbf9a0b8-c0bc-5bb0-8096-54d8d05d7004")}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]="27a359ea-7c69-5fa8-af82-099d4fba393a")}catch(e){}}();
3
+ import { captureEvent } from "../common/analytics/lib.js";
3
4
  import { configure } from "../common/middleware/user-configuration.js";
5
+ import { identify } from "../common/middleware/user-identification.js";
4
6
  import setBlocking from "../common/output.js";
5
7
  import { validDeployDirectoryValidator } from "../common/validators/file-system-validator.js";
6
8
  import { YargsChecker } from "../common/validators/lib.js";
@@ -34,14 +36,15 @@ export default {
34
36
  })
35
37
  .demandOption(["api-key"])
36
38
  .boolean("verify-remote")
37
- .middleware([setBlocking, configure])
39
+ .middleware([setBlocking, configure, identify])
38
40
  .check(async (argv) => {
39
41
  return await new YargsChecker(validDeployDirectoryValidator).check(argv);
40
42
  });
41
43
  },
42
44
  handler: async (argv) => {
45
+ await captureEvent({ argv, event: "zup deploy" });
43
46
  await deploy(argv);
44
47
  },
45
48
  };
46
49
  //# sourceMappingURL=deploy.js.map
47
- //# debugId=cbf9a0b8-c0bc-5bb0-8096-54d8d05d7004
50
+ //# debugId=27a359ea-7c69-5fa8-af82-099d4fba393a
package/dist/cmds/dev.js CHANGED
@@ -1,5 +1,7 @@
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]="b2529683-8609-5481-9f1f-b61849e749e9")}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]="a6a5ea00-8c94-5c86-98bd-6812b34268da")}catch(e){}}();
3
+ import { captureEvent } from "../common/analytics/lib.js";
4
+ import { identify } from "../common/middleware/user-identification.js";
3
5
  import setBlocking from "../common/output.js";
4
6
  import { ZuploProjectValidator } from "../common/validators/file-system-validator.js";
5
7
  import { YargsChecker } from "../common/validators/lib.js";
@@ -21,14 +23,15 @@ export default {
21
23
  describe: "The port to run the zup on",
22
24
  default: 9000,
23
25
  })
24
- .middleware([setBlocking])
26
+ .middleware([setBlocking, identify])
25
27
  .check(async (argv) => {
26
28
  return await new YargsChecker(new ZuploProjectValidator()).check(argv);
27
29
  });
28
30
  },
29
31
  handler: async (argv) => {
32
+ await captureEvent({ argv, event: "zup dev" });
30
33
  await dev(argv);
31
34
  },
32
35
  };
33
36
  //# sourceMappingURL=dev.js.map
34
- //# debugId=b2529683-8609-5481-9f1f-b61849e749e9
37
+ //# debugId=a6a5ea00-8c94-5c86-98bd-6812b34268da
@@ -1,5 +1,7 @@
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]="94eadd05-6b27-55d1-a68e-610273cab2e8")}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]="9bd67e21-217c-5e52-b853-54ac64d7c6c5")}catch(e){}}();
3
+ import { captureEvent } from "../common/analytics/lib.js";
4
+ import { identify } from "../common/middleware/user-identification.js";
3
5
  import setBlocking from "../common/output.js";
4
6
  import { ZuploProjectValidator } from "../common/validators/file-system-validator.js";
5
7
  import { YargsChecker } from "../common/validators/lib.js";
@@ -16,14 +18,15 @@ export default {
16
18
  normalize: false,
17
19
  hidden: false,
18
20
  })
19
- .middleware([setBlocking])
21
+ .middleware([setBlocking, identify])
20
22
  .check(async (argv) => {
21
23
  return await new YargsChecker(new ZuploProjectValidator()).check(argv);
22
24
  });
23
25
  },
24
26
  handler: async (argv) => {
27
+ await captureEvent({ argv, event: "zup editor" });
25
28
  await editor(argv);
26
29
  },
27
30
  };
28
31
  //# sourceMappingURL=editor.js.map
29
- //# debugId=94eadd05-6b27-55d1-a68e-610273cab2e8
32
+ //# debugId=9bd67e21-217c-5e52-b853-54ac64d7c6c5
package/dist/cmds/link.js CHANGED
@@ -1,5 +1,7 @@
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]="1d398742-c6e5-518f-97c1-b82358ee75de")}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]="2173e418-d02e-5c23-8e2a-5d0b7ca7da8d")}catch(e){}}();
3
+ import { captureEvent } from "../common/analytics/lib.js";
4
+ import { identify } from "../common/middleware/user-identification.js";
3
5
  import setBlocking from "../common/output.js";
4
6
  import { validLinkDirectoryValidator } from "../common/validators/file-system-validator.js";
5
7
  import { YargsChecker } from "../common/validators/lib.js";
@@ -16,14 +18,15 @@ export default {
16
18
  normalize: true,
17
19
  hidden: true,
18
20
  })
19
- .middleware([setBlocking])
21
+ .middleware([setBlocking, identify])
20
22
  .check(async (argv) => {
21
23
  return await new YargsChecker(validLinkDirectoryValidator).check(argv);
22
24
  });
23
25
  },
24
26
  handler: async (argv) => {
27
+ await captureEvent({ argv, event: "zup link" });
25
28
  await link(argv);
26
29
  },
27
30
  };
28
31
  //# sourceMappingURL=link.js.map
29
- //# debugId=1d398742-c6e5-518f-97c1-b82358ee75de
32
+ //# debugId=2173e418-d02e-5c23-8e2a-5d0b7ca7da8d
package/dist/cmds/list.js CHANGED
@@ -1,6 +1,8 @@
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]="1e3cc332-74df-57b8-a456-6b2eba10dee2")}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]="a83b0620-2b57-5557-81af-f8a94777304e")}catch(e){}}();
3
+ import { captureEvent } from "../common/analytics/lib.js";
3
4
  import { configure } from "../common/middleware/user-configuration.js";
5
+ import { identify } from "../common/middleware/user-identification.js";
4
6
  import setBlocking from "../common/output.js";
5
7
  import { YargsChecker } from "../common/validators/lib.js";
6
8
  import { ProjectIsSetValidator } from "../common/validators/project-name-validator.js";
@@ -20,14 +22,15 @@ export default {
20
22
  describe: "The project name",
21
23
  })
22
24
  .demandOption(["api-key"])
23
- .middleware([setBlocking, configure])
25
+ .middleware([setBlocking, configure, identify])
24
26
  .check(async (argv) => {
25
27
  return await new YargsChecker(new ProjectIsSetValidator()).check(argv);
26
28
  });
27
29
  },
28
30
  handler: async (argv) => {
31
+ await captureEvent({ argv, event: "zup list" });
29
32
  await list(argv);
30
33
  },
31
34
  };
32
35
  //# sourceMappingURL=list.js.map
33
- //# debugId=1e3cc332-74df-57b8-a456-6b2eba10dee2
36
+ //# debugId=a83b0620-2b57-5557-81af-f8a94777304e
@@ -1,5 +1,7 @@
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]="8aa027a1-1e73-54e1-8ebf-62989ec9fbe4")}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]="b18d5ccc-e76d-5875-8439-46cd0742f7cc")}catch(e){}}();
3
+ import { captureEvent } from "../common/analytics/lib.js";
4
+ import { identify } from "../common/middleware/user-identification.js";
3
5
  import setBlocking from "../common/output.js";
4
6
  import { login } from "../login/handler.js";
5
7
  export default {
@@ -11,11 +13,12 @@ export default {
11
13
  type: "boolean",
12
14
  describe: "Should the CLI print the token to the console?",
13
15
  })
14
- .middleware([setBlocking]);
16
+ .middleware([setBlocking, identify]);
15
17
  },
16
18
  handler: async (argv) => {
19
+ await captureEvent({ argv, event: "zup login" });
17
20
  await login(argv);
18
21
  },
19
22
  };
20
23
  //# sourceMappingURL=login.js.map
21
- //# debugId=8aa027a1-1e73-54e1-8ebf-62989ec9fbe4
24
+ //# debugId=b18d5ccc-e76d-5875-8439-46cd0742f7cc
@@ -1,5 +1,7 @@
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]="d47c4ee2-0526-5442-98e4-4d04edf0bace")}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]="f782c109-2667-5dba-a558-c93d90c9c817")}catch(e){}}();
3
+ import { captureEvent } from "../../common/analytics/lib.js";
4
+ import { identify } from "../../common/middleware/user-identification.js";
3
5
  import setBlocking from "../../common/output.js";
4
6
  import { ZuploProjectValidator } from "../../common/validators/file-system-validator.js";
5
7
  import { YargsChecker } from "../../common/validators/lib.js";
@@ -16,14 +18,15 @@ export default {
16
18
  normalize: true,
17
19
  hidden: true,
18
20
  })
19
- .middleware([setBlocking])
21
+ .middleware([setBlocking, identify])
20
22
  .check(async (argv) => {
21
23
  return await new YargsChecker(new ZuploProjectValidator()).check(argv);
22
24
  });
23
25
  },
24
26
  handler: async (argv) => {
27
+ await captureEvent({ argv, event: "zup update" });
25
28
  await update(argv);
26
29
  },
27
30
  };
28
31
  //# sourceMappingURL=update.js.map
29
- //# debugId=d47c4ee2-0526-5442-98e4-4d04edf0bace
32
+ //# debugId=f782c109-2667-5dba-a558-c93d90c9c817
package/dist/cmds/test.js CHANGED
@@ -1,5 +1,7 @@
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]="87aaeef3-6851-54ac-874f-906116921209")}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]="e7fdd7c3-e308-517a-b778-ec6bbd3e480f")}catch(e){}}();
3
+ import { captureEvent } from "../common/analytics/lib.js";
4
+ import { identify } from "../common/middleware/user-identification.js";
3
5
  import setBlocking from "../common/output.js";
4
6
  import { validTestDirectoryValidator } from "../common/validators/file-system-validator.js";
5
7
  import { YargsChecker } from "../common/validators/lib.js";
@@ -27,11 +29,12 @@ export default {
27
29
  .check(async (argv) => {
28
30
  return await new YargsChecker(validTestDirectoryValidator).check(argv);
29
31
  })
30
- .middleware([setBlocking]);
32
+ .middleware([setBlocking, identify]);
31
33
  },
32
34
  handler: async (argv) => {
35
+ await captureEvent({ argv, event: "zup test" });
33
36
  await test(argv);
34
37
  },
35
38
  };
36
39
  //# sourceMappingURL=test.js.map
37
- //# debugId=87aaeef3-6851-54ac-874f-906116921209
40
+ //# debugId=e7fdd7c3-e308-517a-b778-ec6bbd3e480f
@@ -1,6 +1,8 @@
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]="373f077b-a94b-5f34-bf80-c25ef50a4575")}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]="ce76db13-1e39-5c4c-aeda-36b1e413154c")}catch(e){}}();
3
+ import { captureEvent } from "../../common/analytics/lib.js";
3
4
  import { configure } from "../../common/middleware/user-configuration.js";
5
+ import { identify } from "../../common/middleware/user-identification.js";
4
6
  import setBlocking from "../../common/output.js";
5
7
  import { create } from "../../tunnel/create/handler.js";
6
8
  export default {
@@ -18,11 +20,12 @@ export default {
18
20
  envVar: "API_KEY",
19
21
  })
20
22
  .demandOption(["api-key", "tunnel-name"])
21
- .middleware([setBlocking, configure]);
23
+ .middleware([setBlocking, configure, identify]);
22
24
  },
23
25
  handler: async (argv) => {
26
+ await captureEvent({ argv, event: "zup tunnel create" });
24
27
  await create(argv);
25
28
  },
26
29
  };
27
30
  //# sourceMappingURL=create.js.map
28
- //# debugId=373f077b-a94b-5f34-bf80-c25ef50a4575
31
+ //# debugId=ce76db13-1e39-5c4c-aeda-36b1e413154c
@@ -1,6 +1,8 @@
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]="5e5ea9b4-5620-51e3-90d7-2e4ea501c852")}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]="2a31b54f-92fa-50c5-91a6-7cec8d53b674")}catch(e){}}();
3
+ import { captureEvent } from "../../common/analytics/lib.js";
3
4
  import { configure } from "../../common/middleware/user-configuration.js";
5
+ import { identify } from "../../common/middleware/user-identification.js";
4
6
  import setBlocking from "../../common/output.js";
5
7
  import { deleteTunnel } from "../../tunnel/delete/handler.js";
6
8
  export default {
@@ -14,11 +16,12 @@ export default {
14
16
  envVar: "API_KEY",
15
17
  })
16
18
  .demandOption(["api-key"])
17
- .middleware([setBlocking, configure]);
19
+ .middleware([setBlocking, configure, identify]);
18
20
  },
19
21
  handler: async (argv) => {
22
+ await captureEvent({ argv, event: "zup tunnel delete" });
20
23
  await deleteTunnel(argv);
21
24
  },
22
25
  };
23
26
  //# sourceMappingURL=delete.js.map
24
- //# debugId=5e5ea9b4-5620-51e3-90d7-2e4ea501c852
27
+ //# debugId=2a31b54f-92fa-50c5-91a6-7cec8d53b674
@@ -1,6 +1,8 @@
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]="99693bc3-7118-5977-a330-898e660ea589")}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]="579a2c12-5aba-57ca-a8d1-0b259b813168")}catch(e){}}();
3
+ import { captureEvent } from "../../common/analytics/lib.js";
3
4
  import { configure } from "../../common/middleware/user-configuration.js";
5
+ import { identify } from "../../common/middleware/user-identification.js";
4
6
  import setBlocking from "../../common/output.js";
5
7
  import { describe } from "../../tunnel/describe/handler.js";
6
8
  export default {
@@ -18,11 +20,12 @@ export default {
18
20
  envVar: "API_KEY",
19
21
  })
20
22
  .demandOption(["api-key", "tunnel-id"])
21
- .middleware([setBlocking, configure]);
23
+ .middleware([setBlocking, configure, identify]);
22
24
  },
23
25
  handler: async (argv) => {
26
+ await captureEvent({ argv, event: "zup tunnel describe" });
24
27
  await describe(argv);
25
28
  },
26
29
  };
27
30
  //# sourceMappingURL=describe.js.map
28
- //# debugId=99693bc3-7118-5977-a330-898e660ea589
31
+ //# debugId=579a2c12-5aba-57ca-a8d1-0b259b813168
@@ -1,6 +1,8 @@
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]="ad5fb9f1-9b28-5680-8f3e-a66939187584")}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]="c44f64a5-21a8-584d-9028-7f537d5269c7")}catch(e){}}();
3
+ import { captureEvent } from "../../common/analytics/lib.js";
3
4
  import { configure } from "../../common/middleware/user-configuration.js";
5
+ import { identify } from "../../common/middleware/user-identification.js";
4
6
  import setBlocking from "../../common/output.js";
5
7
  import { list } from "../../tunnel/list/handler.js";
6
8
  export default {
@@ -14,11 +16,12 @@ export default {
14
16
  envVar: "API_KEY",
15
17
  })
16
18
  .demandOption(["api-key"])
17
- .middleware([setBlocking, configure]);
19
+ .middleware([setBlocking, configure, identify]);
18
20
  },
19
21
  handler: async (argv) => {
22
+ await captureEvent({ argv, event: "zup tunnel list" });
20
23
  await list(argv);
21
24
  },
22
25
  };
23
26
  //# sourceMappingURL=list.js.map
24
- //# debugId=ad5fb9f1-9b28-5680-8f3e-a66939187584
27
+ //# debugId=c44f64a5-21a8-584d-9028-7f537d5269c7
@@ -1,6 +1,8 @@
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]="d7d622df-d317-5fe0-a63e-45833a7165a6")}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]="b165e372-4971-5548-8411-68fdffa6e477")}catch(e){}}();
3
+ import { captureEvent } from "../../common/analytics/lib.js";
3
4
  import { configure } from "../../common/middleware/user-configuration.js";
5
+ import { identify } from "../../common/middleware/user-identification.js";
4
6
  import setBlocking from "../../common/output.js";
5
7
  import { rotateToken } from "../../tunnel/rotate-token/handler.js";
6
8
  export default {
@@ -18,11 +20,12 @@ export default {
18
20
  envVar: "API_KEY",
19
21
  })
20
22
  .demandOption(["api-key", "tunnel-id"])
21
- .middleware([setBlocking, configure]);
23
+ .middleware([setBlocking, configure, identify]);
22
24
  },
23
25
  handler: async (argv) => {
26
+ await captureEvent({ argv, event: "zup tunnel rotate-token" });
24
27
  await rotateToken(argv);
25
28
  },
26
29
  };
27
30
  //# sourceMappingURL=rotate-token.js.map
28
- //# debugId=d7d622df-d317-5fe0-a63e-45833a7165a6
31
+ //# debugId=b165e372-4971-5548-8411-68fdffa6e477
@@ -1,6 +1,8 @@
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]="5d5b4dd7-966e-59c6-a0d3-51da1445b6e3")}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]="05fbb3b9-8612-5776-b8d2-8d1bfef979f0")}catch(e){}}();
3
+ import { captureEvent } from "../../../common/analytics/lib.js";
3
4
  import { configure } from "../../../common/middleware/user-configuration.js";
5
+ import { identify } from "../../../common/middleware/user-identification.js";
4
6
  import setBlocking from "../../../common/output.js";
5
7
  import { describe, } from "../../../tunnel/services/describe/handler.js";
6
8
  export default {
@@ -18,11 +20,12 @@ export default {
18
20
  envVar: "API_KEY",
19
21
  })
20
22
  .demandOption(["api-key", "tunnel-id"])
21
- .middleware([setBlocking, configure]);
23
+ .middleware([setBlocking, configure, identify]);
22
24
  },
23
25
  handler: async (argv) => {
26
+ await captureEvent({ argv, event: "zup tunnel services describe" });
24
27
  await describe(argv);
25
28
  },
26
29
  };
27
30
  //# sourceMappingURL=describe.js.map
28
- //# debugId=5d5b4dd7-966e-59c6-a0d3-51da1445b6e3
31
+ //# debugId=05fbb3b9-8612-5776-b8d2-8d1bfef979f0
@@ -1,6 +1,8 @@
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]="dfb251e8-4218-591e-a0ce-fc987b2251e3")}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]="8ad7bbf5-1581-51ae-b1b1-bc1b6ba575ef")}catch(e){}}();
3
+ import { captureEvent } from "../../../common/analytics/lib.js";
3
4
  import { configure } from "../../../common/middleware/user-configuration.js";
5
+ import { identify } from "../../../common/middleware/user-identification.js";
4
6
  import setBlocking from "../../../common/output.js";
5
7
  import { updateServices, } from "../../../tunnel/services/update/handler.js";
6
8
  export default {
@@ -22,11 +24,12 @@ export default {
22
24
  envVar: "API_KEY",
23
25
  })
24
26
  .demandOption(["api-key", "configuration-file", "tunnel-id"])
25
- .middleware([setBlocking, configure]);
27
+ .middleware([setBlocking, configure, identify]);
26
28
  },
27
29
  handler: async (argv) => {
30
+ await captureEvent({ argv, event: "zup tunnel services update" });
28
31
  await updateServices(argv);
29
32
  },
30
33
  };
31
34
  //# sourceMappingURL=update.js.map
32
- //# debugId=dfb251e8-4218-591e-a0ce-fc987b2251e3
35
+ //# debugId=8ad7bbf5-1581-51ae-b1b1-bc1b6ba575ef
@@ -1,6 +1,8 @@
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]="d70f0e5c-a934-50d8-be94-a68a917fc92f")}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]="7ae73b32-818d-511d-a118-4f75093b18c5")}catch(e){}}();
3
+ import { captureEvent } from "../../common/analytics/lib.js";
3
4
  import { configure } from "../../common/middleware/user-configuration.js";
5
+ import { identify } from "../../common/middleware/user-identification.js";
4
6
  import setBlocking from "../../common/output.js";
5
7
  import { YargsChecker } from "../../common/validators/lib.js";
6
8
  import { ProjectIsSetValidator } from "../../common/validators/project-name-validator.js";
@@ -36,14 +38,15 @@ export default {
36
38
  describe: "The project name",
37
39
  })
38
40
  .demandOption(["api-key", "name", "value", "is-secret", "branch"])
39
- .middleware([setBlocking, configure])
41
+ .middleware([setBlocking, configure, identify])
40
42
  .check(async (argv) => {
41
43
  return await new YargsChecker(new ProjectIsSetValidator()).check(argv);
42
44
  });
43
45
  },
44
46
  handler: async (argv) => {
47
+ await captureEvent({ argv, event: "zup variable create" });
45
48
  await create(argv);
46
49
  },
47
50
  };
48
51
  //# sourceMappingURL=create.js.map
49
- //# debugId=d70f0e5c-a934-50d8-be94-a68a917fc92f
52
+ //# debugId=7ae73b32-818d-511d-a118-4f75093b18c5
@@ -1,6 +1,8 @@
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]="c2225edb-acb6-569a-b12b-54aa0f3f442c")}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]="e78dcf46-0920-5254-ae6d-5e627c61bc40")}catch(e){}}();
3
+ import { captureEvent } from "../../common/analytics/lib.js";
3
4
  import { configure } from "../../common/middleware/user-configuration.js";
5
+ import { identify } from "../../common/middleware/user-identification.js";
4
6
  import setBlocking from "../../common/output.js";
5
7
  import { YargsChecker } from "../../common/validators/lib.js";
6
8
  import { ProjectIsSetValidator } from "../../common/validators/project-name-validator.js";
@@ -27,14 +29,15 @@ export default {
27
29
  describe: "The project name",
28
30
  })
29
31
  .demandOption(["api-key", "name", "value", "branch"])
30
- .middleware([setBlocking, configure])
32
+ .middleware([setBlocking, configure, identify])
31
33
  .check(async (argv) => {
32
34
  return await new YargsChecker(new ProjectIsSetValidator()).check(argv);
33
35
  });
34
36
  },
35
37
  handler: async (argv) => {
38
+ await captureEvent({ argv, event: "zup variable update" });
36
39
  await update(argv);
37
40
  },
38
41
  };
39
42
  //# sourceMappingURL=update.js.map
40
- //# debugId=c2225edb-acb6-569a-b12b-54aa0f3f442c
43
+ //# debugId=e78dcf46-0920-5254-ae6d-5e627c61bc40
@@ -0,0 +1,57 @@
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]="2a37c996-c6cc-57a5-aab4-dcacb9c95a34")}catch(e){}}();
3
+ import { defaultIntegrations } from "@sentry/node";
4
+ import { PostHog } from "posthog-node";
5
+ import { POST_HOG_CAPTURE_KEY, ZUPLO_USER_ID_ARGV_KEY } from "../constants.js";
6
+ import { machineId } from "../machine-id/lib.js";
7
+ let _postHog;
8
+ let _context;
9
+ function init() {
10
+ if (process.env.ZUPLO_DO_NOT_TRACK) {
11
+ return undefined;
12
+ }
13
+ _postHog = new PostHog(POST_HOG_CAPTURE_KEY, {
14
+ host: "https://app.posthog.com",
15
+ flushAt: 1,
16
+ flushInterval: 1,
17
+ });
18
+ _context = defaultIntegrations.filter((integration) => integration.name == "Context")[0];
19
+ return _postHog;
20
+ }
21
+ export async function captureEvent({ argv, event, properties, groups, sendFeatureFlags, timestamp, disableGeoip, }) {
22
+ if (_postHog === undefined) {
23
+ init();
24
+ }
25
+ if (_postHog) {
26
+ properties = properties ?? {};
27
+ properties.$set_once = properties.$set_once ?? {};
28
+ if (argv[ZUPLO_USER_ID_ARGV_KEY] &&
29
+ typeof argv[ZUPLO_USER_ID_ARGV_KEY] === "string") {
30
+ properties.$set_once["user-id"] = argv[ZUPLO_USER_ID_ARGV_KEY];
31
+ }
32
+ if (argv.account && typeof argv.account === "string") {
33
+ properties.$set_once["account"] = argv["account"];
34
+ }
35
+ if (argv.project && typeof argv.project === "string") {
36
+ properties.$set_once["project"] = argv["project"];
37
+ }
38
+ if (process.env.CI) {
39
+ properties["ci"] = process.env.CI;
40
+ }
41
+ await _context?.addContext(properties);
42
+ _postHog?.capture({
43
+ distinctId: argv[ZUPLO_USER_ID_ARGV_KEY] || machineId(),
44
+ event,
45
+ properties,
46
+ groups,
47
+ sendFeatureFlags,
48
+ timestamp,
49
+ disableGeoip,
50
+ });
51
+ }
52
+ }
53
+ export async function shutdownAnalytics() {
54
+ return _postHog?.shutdownAsync();
55
+ }
56
+ //# sourceMappingURL=lib.js.map
57
+ //# debugId=2a37c996-c6cc-57a5-aab4-dcacb9c95a34
@@ -1,14 +1,16 @@
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]="df5828ae-5daa-5d76-b21c-787c45925e74")}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]="b0d9163b-dfda-504b-b57d-1db0759acf53")}catch(e){}}();
3
3
  export const ZUPLO_PREFERRED_JSON_FILE = "zuplo.jsonc";
4
4
  export const ZUPLO_FALLBACK_JSON_FILE = "zuplo.json";
5
5
  export const ZUPLO_CLI_XDG_FOLDER_NAME = "zup";
6
6
  export const ZUPLO_AUTH_FILE_NAME = "auth.json";
7
7
  export const ZUPLO_SYSTEM_ENV_VAR = ".env.zuplo";
8
8
  export const DEPLOYER_METADATA_FILE = "deployer.json";
9
+ export const ZUPLO_USER_ID_ARGV_KEY = "zuplo-user-id";
9
10
  export const TEST_IN_FOLDER = "tests";
10
11
  export const TEST_OUT_FOLDER = ".zuplo/__tests__";
11
12
  export const SENTRY_DSN = "https://28220fd3185a1281daff09ade2114dca@o1036703.ingest.sentry.io/4505880249040896";
12
13
  export const MAX_WAIT_PENDING_TIME_MS = 1000;
14
+ export const POST_HOG_CAPTURE_KEY = "phc_LDSwSTOvIjiDDZql2g54Q7xEXoQ0EN9RMYb3STbdz1V";
13
15
  //# sourceMappingURL=constants.js.map
14
- //# debugId=df5828ae-5daa-5d76-b21c-787c45925e74
16
+ //# debugId=b0d9163b-dfda-504b-b57d-1db0759acf53
@@ -0,0 +1,68 @@
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]="38fb065f-2318-51e7-9e53-63d35f2d8bc2")}catch(e){}}();
3
+ import { execSync } from "node:child_process";
4
+ import { createHash } from "node:crypto";
5
+ const win32RegBinPath = {
6
+ skipped: "",
7
+ native: "%windir%\\System32",
8
+ mixed: "%windir%\\sysnative\\cmd.exe /c %windir%\\System32",
9
+ };
10
+ const guid = {
11
+ darwin: "ioreg -rd1 -c IOPlatformExpertDevice",
12
+ win32: `${win32RegBinPath[isWindowsProcessMixedOrNativeArchitecture()]}\\REG.exe ` +
13
+ "QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography " +
14
+ "/v MachineGuid",
15
+ linux: "( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",
16
+ };
17
+ function isWindowsProcessMixedOrNativeArchitecture() {
18
+ if (process.platform !== "win32") {
19
+ return "skipped";
20
+ }
21
+ if (process.arch === "ia32" && process.env["PROCESSOR_ARCHITEW6432"]) {
22
+ return "mixed";
23
+ }
24
+ return "native";
25
+ }
26
+ function hash(guid) {
27
+ return createHash("sha256").update(guid).digest("hex");
28
+ }
29
+ function expose(result) {
30
+ switch (process.platform) {
31
+ case "darwin":
32
+ return result
33
+ .split("IOPlatformUUID")[1]
34
+ .split("\n")[0]
35
+ .replace(/=|\s+]"/gi, "")
36
+ .toLowerCase();
37
+ case "win32":
38
+ return result
39
+ .toString()
40
+ .split("REG_SZ")[1]
41
+ .replace(/\r+|\n+|\s+/gi, "")
42
+ .toLowerCase();
43
+ case "linux":
44
+ return result
45
+ .toString()
46
+ .replace(/\r+|\n+|\s+/gi, "")
47
+ .toLowerCase();
48
+ case "freebsd":
49
+ return result
50
+ .toString()
51
+ .replace(/\r+|\n+|\s+/gi, "")
52
+ .toLowerCase();
53
+ default:
54
+ throw new Error(`Unsupported platform: ${process.platform}`);
55
+ }
56
+ }
57
+ export function machineId() {
58
+ switch (process.platform) {
59
+ case "darwin":
60
+ case "win32":
61
+ case "linux":
62
+ return hash(expose(execSync(guid[process.platform]).toString()));
63
+ default:
64
+ return "e16fc483-5593-4d71-b485-a6533693da9b";
65
+ }
66
+ }
67
+ //# sourceMappingURL=lib.js.map
68
+ //# debugId=38fb065f-2318-51e7-9e53-63d35f2d8bc2
@@ -0,0 +1,38 @@
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]="5f9398af-88ba-561c-8582-560e16316697")}catch(e){}}();
3
+ import * as Sentry from "@sentry/node";
4
+ import * as jose from "jose";
5
+ import { readFile } from "node:fs/promises";
6
+ import { join } from "node:path";
7
+ import { ZUPLO_AUTH_FILE_NAME } from "../constants.js";
8
+ import { logger } from "../logger.js";
9
+ import { machineId } from "../machine-id/lib.js";
10
+ import { ZUPLO_XDG_STATE_HOME } from "../xdg/lib.js";
11
+ export async function identify(argv) {
12
+ if (process.env.ZUPLO_DO_NOT_TRACK) {
13
+ logger.trace("Sentry traces will be sent without user identification.");
14
+ }
15
+ else {
16
+ let userId;
17
+ try {
18
+ const rawAuth = await readFile(join(ZUPLO_XDG_STATE_HOME, ZUPLO_AUTH_FILE_NAME), "utf-8");
19
+ const authJson = JSON.parse(rawAuth);
20
+ const decoded = jose.decodeJwt(authJson.access_token);
21
+ userId = decoded.sub;
22
+ }
23
+ catch (e) {
24
+ userId = machineId();
25
+ }
26
+ Sentry.setUser({ id: machineId() });
27
+ Sentry.setTag("user-id", userId);
28
+ if (argv.account && typeof argv.account === "string") {
29
+ Sentry.setTag("account", argv.account);
30
+ }
31
+ if (argv.project && typeof argv.project === "string") {
32
+ Sentry.setTag("project", argv.project);
33
+ }
34
+ argv["zuplo-user-id"] = userId;
35
+ }
36
+ }
37
+ //# sourceMappingURL=user-identification.js.map
38
+ //# debugId=5f9398af-88ba-561c-8582-560e16316697
@@ -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]="add3c8c1-77f3-5f77-86a6-91bb56fc8924")}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]="211d2e9e-e3be-5bd3-959a-5cd147654f20")}catch(e){}}();
3
3
  import * as Sentry from "@sentry/node";
4
4
  import chalk from "chalk";
5
5
  import { MAX_WAIT_PENDING_TIME_MS } from "./constants.js";
@@ -42,5 +42,13 @@ export default function setBlocking() {
42
42
  }
43
43
  });
44
44
  }
45
+ export function textOrJson(text) {
46
+ try {
47
+ return JSON.parse(text);
48
+ }
49
+ catch (e) {
50
+ return text;
51
+ }
52
+ }
45
53
  //# sourceMappingURL=output.js.map
46
- //# debugId=add3c8c1-77f3-5f77-86a6-91bb56fc8924
54
+ //# debugId=211d2e9e-e3be-5bd3-959a-5cd147654f20
@@ -1,7 +1,7 @@
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]="c9c54ddd-51be-5f59-85c4-8d438ee05f78")}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]="be10cb83-f95d-5db4-8bda-0d5797e852d5")}catch(e){}}();
3
3
  import { logger } from "../common/logger.js";
4
- import { printDiagnosticsToConsole } from "../common/output.js";
4
+ import { printDiagnosticsToConsole, textOrJson } from "../common/output.js";
5
5
  import settings from "../common/settings.js";
6
6
  function wait(duration = settings.POLL_INTERVAL) {
7
7
  return new Promise((resolve) => setTimeout(resolve, duration));
@@ -56,11 +56,11 @@ export async function pollDeployment(argv, fileId, account, project) {
56
56
  continue;
57
57
  }
58
58
  else {
59
- logger.error(`Unexpected error from server while polling for deployment: ${response.status} ${response.statusText} ${await response.text()}`);
59
+ logger.error(`Unexpected error from server while polling for deployment: ${response.status} ${response.statusText} ${textOrJson(await response.text())}`);
60
60
  throw new Error(`Unexpected response from server while polling for deployment: ${response.status} ${response.statusText}`);
61
61
  }
62
62
  }
63
63
  return {};
64
64
  }
65
65
  //# sourceMappingURL=poll-deployment.js.map
66
- //# debugId=c9c54ddd-51be-5f59-85c4-8d438ee05f78
66
+ //# debugId=be10cb83-f95d-5db4-8bda-0d5797e852d5
@@ -1,11 +1,11 @@
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]="63524d19-c032-5440-9afe-279fb317a27c")}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]="ebabd7dc-5b6b-51bd-bf6f-d8997a9bad4f")}catch(e){}}();
3
3
  import { select } from "@inquirer/prompts";
4
4
  import { readFile } from "node:fs/promises";
5
5
  import { join } from "node:path";
6
6
  import { ZUPLO_AUTH_FILE_NAME } from "../common/constants.js";
7
7
  import { logger } from "../common/logger.js";
8
- import { printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, } from "../common/output.js";
8
+ import { printCriticalFailureToConsoleAndExit, printResultToConsoleAndExitGracefully, textOrJson, } from "../common/output.js";
9
9
  import settings from "../common/settings.js";
10
10
  import { ZUPLO_XDG_STATE_HOME } from "../common/xdg/lib.js";
11
11
  import { pullSystemConfig, safeMergeConfig } from "./populate.js";
@@ -21,9 +21,9 @@ export async function link(argv) {
21
21
  logger.error({
22
22
  status: accountResponse.status,
23
23
  statusText: accountResponse.statusText,
24
- response: await accountResponse.text(),
24
+ response: textOrJson(await accountResponse.text()),
25
25
  }, "Failed to list accounts.");
26
- printDiagnosticsToConsole("Error: Failed to list your accounts. Try again later.");
26
+ printCriticalFailureToConsoleAndExit("Error: Failed to list your accounts. Try again later.");
27
27
  }
28
28
  const accountJson = (await accountResponse.json());
29
29
  let account;
@@ -50,9 +50,9 @@ export async function link(argv) {
50
50
  logger.error({
51
51
  status: projectResponse.status,
52
52
  statusText: projectResponse.statusText,
53
- response: await projectResponse.text(),
53
+ response: textOrJson(await projectResponse.text()),
54
54
  }, "Failed to list projects.");
55
- printDiagnosticsToConsole("Error: Failed to list your projects. Try again later.");
55
+ printCriticalFailureToConsoleAndExit("Error: Failed to list your projects. Try again later.");
56
56
  }
57
57
  const projectJson = (await projectResponse.json());
58
58
  let project;
@@ -80,4 +80,4 @@ Successfully linked your local directory to the ${project} project in the ${acco
80
80
  .env.zuplo and zuplo.jsonc have been updated with the new values.`);
81
81
  }
82
82
  //# sourceMappingURL=handler.js.map
83
- //# debugId=63524d19-c032-5440-9afe-279fb317a27c
83
+ //# debugId=ebabd7dc-5b6b-51bd-bf6f-d8997a9bad4f
@@ -1,7 +1,7 @@
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]="fdfd24e0-3e32-58bd-b655-a720aeaf96f1")}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]="b92cf828-73b6-5f1c-9a8a-1545e96cc93e")}catch(e){}}();
3
3
  import { logger } from "../common/logger.js";
4
- import { printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, } from "../common/output.js";
4
+ import { printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, textOrJson, } from "../common/output.js";
5
5
  import settings from "../common/settings.js";
6
6
  export async function list(argv) {
7
7
  const { account, project } = argv;
@@ -20,9 +20,10 @@ export async function list(argv) {
20
20
  logger.error({
21
21
  status: listResponse.status,
22
22
  statusText: listResponse.statusText,
23
+ response: textOrJson(await listResponse.text()),
23
24
  }, "Failed to list deployed zups");
24
25
  printDiagnosticsToConsole("Error: Failed to list deployed zups. Try again later.");
25
26
  }
26
27
  }
27
28
  //# sourceMappingURL=handler.js.map
28
- //# debugId=fdfd24e0-3e32-58bd-b655-a720aeaf96f1
29
+ //# debugId=b92cf828-73b6-5f1c-9a8a-1545e96cc93e
@@ -1,7 +1,7 @@
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]="db490b85-f57d-50ba-8f3a-00fa84724d9f")}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]="2c727de1-d0e0-517c-9b8d-63612d480be0")}catch(e){}}();
3
3
  import { logger } from "../../common/logger.js";
4
- import { printDiagnosticsToConsole, printTableToConsoleAndExitGracefully, } from "../../common/output.js";
4
+ import { printDiagnosticsToConsole, printTableToConsoleAndExitGracefully, textOrJson, } from "../../common/output.js";
5
5
  import settings from "../../common/settings.js";
6
6
  export async function create(argv) {
7
7
  const { account } = argv;
@@ -21,10 +21,10 @@ export async function create(argv) {
21
21
  logger.error({
22
22
  status: createResponse.status,
23
23
  statusText: createResponse.statusText,
24
- response: await createResponse.text(),
24
+ response: textOrJson(await createResponse.text()),
25
25
  }, "Failed to create tunnel for account");
26
26
  printDiagnosticsToConsole("Error: Failed to create tunnel for your account. Check the arguments.");
27
27
  }
28
28
  }
29
29
  //# sourceMappingURL=handler.js.map
30
- //# debugId=db490b85-f57d-50ba-8f3a-00fa84724d9f
30
+ //# debugId=2c727de1-d0e0-517c-9b8d-63612d480be0
@@ -1,7 +1,7 @@
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]="3dbfae8e-75c2-56e5-9f02-34053a6aa35d")}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]="b4d4a60a-f5a8-5bb4-a1a8-1afcb9c6f3e8")}catch(e){}}();
3
3
  import { logger } from "../../common/logger.js";
4
- import { printCriticalFailureToConsoleAndExit, printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, } from "../../common/output.js";
4
+ import { printCriticalFailureToConsoleAndExit, printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, textOrJson, } from "../../common/output.js";
5
5
  import settings from "../../common/settings.js";
6
6
  import { pollTeardownOperation } from "./poll-teardown-operation.js";
7
7
  export async function deleteTunnel(argv) {
@@ -32,10 +32,10 @@ export async function deleteTunnel(argv) {
32
32
  logger.error({
33
33
  status: deleteResponse.status,
34
34
  statusText: deleteResponse.statusText,
35
- response: await deleteResponse.text(),
35
+ response: textOrJson(await deleteResponse.text()),
36
36
  }, "Failed to delete tunnel for account");
37
37
  printDiagnosticsToConsole("Error: Failed to delete the tunnel for your account. Check the arguments.");
38
38
  }
39
39
  }
40
40
  //# sourceMappingURL=handler.js.map
41
- //# debugId=3dbfae8e-75c2-56e5-9f02-34053a6aa35d
41
+ //# debugId=b4d4a60a-f5a8-5bb4-a1a8-1afcb9c6f3e8
@@ -1,7 +1,7 @@
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]="d64d8573-9cc3-5b7e-bac6-d6fa4f2c2b01")}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]="653458ca-187f-5bbc-8553-788deb7155bd")}catch(e){}}();
3
3
  import { logger } from "../../common/logger.js";
4
- import { printDiagnosticsToConsole, printTableToConsoleAndExitGracefully, } from "../../common/output.js";
4
+ import { printDiagnosticsToConsole, printTableToConsoleAndExitGracefully, textOrJson, } from "../../common/output.js";
5
5
  import settings from "../../common/settings.js";
6
6
  export async function describe(argv) {
7
7
  const { account } = argv;
@@ -19,10 +19,10 @@ export async function describe(argv) {
19
19
  logger.error({
20
20
  status: describeResponse.status,
21
21
  statusText: describeResponse.statusText,
22
- response: await describeResponse.text(),
22
+ response: textOrJson(await describeResponse.text()),
23
23
  }, "Failed to describe tunnel for account");
24
24
  printDiagnosticsToConsole("Error: Failed to describe tunnel for your account. Check the arguments.");
25
25
  }
26
26
  }
27
27
  //# sourceMappingURL=handler.js.map
28
- //# debugId=d64d8573-9cc3-5b7e-bac6-d6fa4f2c2b01
28
+ //# debugId=653458ca-187f-5bbc-8553-788deb7155bd
@@ -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]="d265e30b-ff1a-53f0-99eb-d375cad4154b")}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]="25e1eea1-68c6-522e-bb2c-bfbd57517091")}catch(e){}}();
3
3
  import { logger } from "../../common/logger.js";
4
4
  import { printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, printTableToConsoleAndExitGracefully, } from "../../common/output.js";
5
5
  import settings from "../../common/settings.js";
@@ -28,10 +28,10 @@ export async function list(argv) {
28
28
  logger.error({
29
29
  status: listResponse.status,
30
30
  statusText: listResponse.statusText,
31
- response: await listResponse.text(),
31
+ response: await listResponse.json(),
32
32
  }, "Failed to list tunnels for account");
33
33
  printDiagnosticsToConsole("Error: Failed to list tunnels for your account. Try again later.");
34
34
  }
35
35
  }
36
36
  //# sourceMappingURL=handler.js.map
37
- //# debugId=d265e30b-ff1a-53f0-99eb-d375cad4154b
37
+ //# debugId=25e1eea1-68c6-522e-bb2c-bfbd57517091
@@ -1,7 +1,7 @@
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]="9c6e4b9e-4128-5fe9-a57e-56c8f9ddd3e1")}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]="127b1934-09f2-505c-a8ad-28c355e9109c")}catch(e){}}();
3
3
  import { logger } from "../../common/logger.js";
4
- import { printDiagnosticsToConsole, printTableToConsoleAndExitGracefully, } from "../../common/output.js";
4
+ import { printDiagnosticsToConsole, printTableToConsoleAndExitGracefully, textOrJson, } from "../../common/output.js";
5
5
  import settings from "../../common/settings.js";
6
6
  export async function rotateToken(argv) {
7
7
  const { account } = argv;
@@ -19,10 +19,10 @@ export async function rotateToken(argv) {
19
19
  logger.error({
20
20
  status: rotateResponse.status,
21
21
  statusText: rotateResponse.statusText,
22
- response: await rotateResponse.text(),
22
+ response: textOrJson(await rotateResponse.text()),
23
23
  }, "Failed to rotate token for tunnel");
24
24
  printDiagnosticsToConsole("Error: Failed to rotate token for tunnel. Check the arguments.");
25
25
  }
26
26
  }
27
27
  //# sourceMappingURL=handler.js.map
28
- //# debugId=9c6e4b9e-4128-5fe9-a57e-56c8f9ddd3e1
28
+ //# debugId=127b1934-09f2-505c-a8ad-28c355e9109c
@@ -1,7 +1,7 @@
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]="d0b6aa19-5aae-5f66-acfb-c8014cfd09fc")}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]="51788ca8-ed69-5b21-8faf-ae8aaa026e95")}catch(e){}}();
3
3
  import { logger } from "../../../common/logger.js";
4
- import { printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, } from "../../../common/output.js";
4
+ import { printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, textOrJson, } from "../../../common/output.js";
5
5
  import settings from "../../../common/settings.js";
6
6
  export async function describe(argv) {
7
7
  const { account } = argv;
@@ -19,10 +19,10 @@ export async function describe(argv) {
19
19
  logger.error({
20
20
  status: describeResponse.status,
21
21
  statusText: describeResponse.statusText,
22
- response: await describeResponse.text(),
22
+ response: textOrJson(await describeResponse.text()),
23
23
  }, "Failed to describe services for tunnel");
24
24
  printDiagnosticsToConsole("Error: Failed to describe the services for your tunnel. Check the arguments.");
25
25
  }
26
26
  }
27
27
  //# sourceMappingURL=handler.js.map
28
- //# debugId=d0b6aa19-5aae-5f66-acfb-c8014cfd09fc
28
+ //# debugId=51788ca8-ed69-5b21-8faf-ae8aaa026e95
@@ -1,8 +1,8 @@
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]="0b6d1f82-ab90-5eb2-abcc-1379cf64a8bb")}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]="0e1f9e61-8829-5ae3-b4cd-c1a79dc2191b")}catch(e){}}();
3
3
  import { readFile } from "node:fs/promises";
4
4
  import { logger } from "../../../common/logger.js";
5
- import { printCriticalFailureToConsoleAndExit, printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, } from "../../../common/output.js";
5
+ import { printCriticalFailureToConsoleAndExit, printDiagnosticsToConsole, printResultToConsoleAndExitGracefully, textOrJson, } from "../../../common/output.js";
6
6
  import settings from "../../../common/settings.js";
7
7
  import { pollProvisioningOperation } from "./poll-provisioning-operations.js";
8
8
  export async function updateServices(argv) {
@@ -42,10 +42,10 @@ export async function updateServices(argv) {
42
42
  logger.error({
43
43
  status: deleteResponse.status,
44
44
  statusText: deleteResponse.statusText,
45
- response: await deleteResponse.text(),
45
+ response: textOrJson(await deleteResponse.text()),
46
46
  }, "Failed to update tunnel for account");
47
47
  printDiagnosticsToConsole("Error: Failed to update the tunnel for your account. Check the arguments.");
48
48
  }
49
49
  }
50
50
  //# sourceMappingURL=handler.js.map
51
- //# debugId=0b6d1f82-ab90-5eb2-abcc-1379cf64a8bb
51
+ //# debugId=0e1f9e61-8829-5ae3-b4cd-c1a79dc2191b
@@ -1,7 +1,7 @@
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]="14b2f25a-e446-54be-bf80-42ecd48bb1ba")}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]="79be439d-42a8-5591-9774-6d9603f9d845")}catch(e){}}();
3
3
  import { logger } from "../../../common/logger.js";
4
- import { printDiagnosticsToConsole } from "../../../common/output.js";
4
+ import { printDiagnosticsToConsole, textOrJson, } from "../../../common/output.js";
5
5
  import settings from "../../../common/settings.js";
6
6
  function wait(duration = settings.PROVISIONING_POLL_INTERVAL) {
7
7
  return new Promise((resolve) => setTimeout(resolve, duration));
@@ -30,11 +30,15 @@ export async function pollProvisioningOperation(args) {
30
30
  }
31
31
  }
32
32
  else {
33
- logger.error(`Unexpected error from server while polling for provisioning operation status: ${response.status} ${response.statusText} ${await response.json()}`);
33
+ logger.error({
34
+ status: response.status,
35
+ statusText: response.statusText,
36
+ response: textOrJson(await response.text()),
37
+ }, "Unexpected error from server while polling for provisioning operation status");
34
38
  throw new Error(`Unexpected response from server while polling for provisioning operation status: ${response.status} ${response.statusText}`);
35
39
  }
36
40
  }
37
41
  throw new Error("Unexpected error while polling for provisioning operation status");
38
42
  }
39
43
  //# sourceMappingURL=poll-provisioning-operations.js.map
40
- //# debugId=14b2f25a-e446-54be-bf80-42ecd48bb1ba
44
+ //# debugId=79be439d-42a8-5591-9774-6d9603f9d845
@@ -1,7 +1,7 @@
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]="b91c903f-cfdb-5b4c-9ce3-fe6824de0155")}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]="bf9a9d71-d13d-5770-b18d-a33e79514601")}catch(e){}}();
3
3
  import { logger } from "../../common/logger.js";
4
- import { printDiagnosticsToConsole, printResultToConsole, } from "../../common/output.js";
4
+ import { printDiagnosticsToConsole, printResultToConsole, textOrJson, } from "../../common/output.js";
5
5
  import settings from "../../common/settings.js";
6
6
  export async function create(argv) {
7
7
  const { account, project } = argv;
@@ -25,9 +25,10 @@ export async function create(argv) {
25
25
  logger.error({
26
26
  status: createResponse.status,
27
27
  statusText: createResponse.statusText,
28
+ response: textOrJson(await createResponse.text()),
28
29
  }, "Failed to create variable");
29
30
  printDiagnosticsToConsole("Error: Failed to create variable. Check the arguments.");
30
31
  }
31
32
  }
32
33
  //# sourceMappingURL=handler.js.map
33
- //# debugId=b91c903f-cfdb-5b4c-9ce3-fe6824de0155
34
+ //# debugId=bf9a9d71-d13d-5770-b18d-a33e79514601
@@ -1,7 +1,7 @@
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]="43d578e3-bb26-5129-a6f9-f07fc8cbc895")}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]="e2ce8efc-1641-5b90-9475-8e36ca9c534c")}catch(e){}}();
3
3
  import { logger } from "../../common/logger.js";
4
- import { printDiagnosticsToConsole, printResultToConsole, } from "../../common/output.js";
4
+ import { printDiagnosticsToConsole, printResultToConsole, textOrJson, } from "../../common/output.js";
5
5
  import settings from "../../common/settings.js";
6
6
  export async function update(argv) {
7
7
  const { account, project } = argv;
@@ -23,9 +23,10 @@ export async function update(argv) {
23
23
  logger.error({
24
24
  status: updateResponse.status,
25
25
  statusText: updateResponse.statusText,
26
+ response: textOrJson(await updateResponse.text()),
26
27
  }, "Failed to update variable");
27
28
  printDiagnosticsToConsole("Error: Failed to update variable. Check the arguments.");
28
29
  }
29
30
  }
30
31
  //# sourceMappingURL=handler.js.map
31
- //# debugId=43d578e3-bb26-5129-a6f9-f07fc8cbc895
32
+ //# debugId=e2ce8efc-1641-5b90-9475-8e36ca9c534c
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/cli",
3
- "version": "1.71.0",
3
+ "version": "1.73.0",
4
4
  "type": "module",
5
5
  "repository": "https://github.com/zuplo/cli",
6
6
  "description": "The command-line interface for Zuplo",
@@ -56,7 +56,7 @@
56
56
  "@fastify/cors": "^8.3.0",
57
57
  "@fastify/static": "^6.10.2",
58
58
  "@inquirer/prompts": "^3.0.4",
59
- "@sentry/node": "^7.69.0",
59
+ "@sentry/node": "7.69.0",
60
60
  "@swc/core": "1.3.78",
61
61
  "@zuplo/core": "5.1290.0",
62
62
  "@zuplo/pino-pretty-configurations": "^1.4.0",
@@ -75,6 +75,7 @@
75
75
  "open": "^9.1.0",
76
76
  "pino": "^8.11.0",
77
77
  "pino-pretty": "^9.4.0",
78
+ "posthog-node": "3.1.2",
78
79
  "prettier": "^2.8.7",
79
80
  "rimraf": "^3.0.2",
80
81
  "rollup-plugin-node-polyfills": "^0.2.1",