@zuplo/cli 6.63.34 → 6.63.36

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 (117) hide show
  1. package/dist/__tests__/archive-utils.test.js.map +1 -1
  2. package/dist/__tests__/import-openapi-utils.test.js +1 -1
  3. package/dist/__tests__/import-openapi-utils.test.js.map +1 -1
  4. package/dist/__tests__/import-openapi.test.js.map +1 -1
  5. package/dist/__tests__/integration/delete.integration.test.js +1 -1
  6. package/dist/__tests__/integration/delete.integration.test.js.map +1 -1
  7. package/dist/__tests__/integration/deploy.integration.test.js +1 -1
  8. package/dist/__tests__/integration/deploy.integration.test.js.map +1 -1
  9. package/dist/__tests__/integration/link.integration.test.js +1 -1
  10. package/dist/__tests__/integration/link.integration.test.js.map +1 -1
  11. package/dist/__tests__/integration/list.integration.test.js +1 -1
  12. package/dist/__tests__/integration/list.integration.test.js.map +1 -1
  13. package/dist/__tests__/integration/tunnel.integration.test.js +1 -1
  14. package/dist/__tests__/integration/tunnel.integration.test.js.map +1 -1
  15. package/dist/__tests__/integration/variable.integration.test.js +1 -1
  16. package/dist/__tests__/integration/variable.integration.test.js.map +1 -1
  17. package/dist/__tests__/populate.test.js +4 -4
  18. package/dist/__tests__/populate.test.js.map +1 -1
  19. package/dist/cli.js +2 -2
  20. package/dist/cli.js.map +1 -1
  21. package/dist/cmds/delete.js +2 -2
  22. package/dist/cmds/delete.js.map +1 -1
  23. package/dist/cmds/deploy.js +3 -3
  24. package/dist/cmds/deploy.js.map +1 -1
  25. package/dist/cmds/link.js +3 -3
  26. package/dist/cmds/link.js.map +1 -1
  27. package/dist/cmds/list.js +2 -2
  28. package/dist/cmds/list.js.map +1 -1
  29. package/dist/cmds/mtls-certificates/create.js +2 -2
  30. package/dist/cmds/mtls-certificates/create.js.map +1 -1
  31. package/dist/cmds/mtls-certificates/delete.js +2 -2
  32. package/dist/cmds/mtls-certificates/delete.js.map +1 -1
  33. package/dist/cmds/mtls-certificates/describe.js +2 -2
  34. package/dist/cmds/mtls-certificates/describe.js.map +1 -1
  35. package/dist/cmds/mtls-certificates/disable.js +2 -2
  36. package/dist/cmds/mtls-certificates/disable.js.map +1 -1
  37. package/dist/cmds/mtls-certificates/list.js +2 -2
  38. package/dist/cmds/mtls-certificates/list.js.map +1 -1
  39. package/dist/cmds/mtls-certificates/update.js +2 -2
  40. package/dist/cmds/mtls-certificates/update.js.map +1 -1
  41. package/dist/cmds/project/create.d.ts.map +1 -1
  42. package/dist/cmds/project/create.js +3 -3
  43. package/dist/cmds/project/create.js.map +1 -1
  44. package/dist/cmds/source/migrate.d.ts.map +1 -1
  45. package/dist/cmds/source/migrate.js +2 -2
  46. package/dist/cmds/source/migrate.js.map +1 -1
  47. package/dist/cmds/tunnel/create.js +2 -2
  48. package/dist/cmds/tunnel/create.js.map +1 -1
  49. package/dist/cmds/tunnel/delete.js +2 -2
  50. package/dist/cmds/tunnel/delete.js.map +1 -1
  51. package/dist/cmds/tunnel/describe.js +2 -2
  52. package/dist/cmds/tunnel/describe.js.map +1 -1
  53. package/dist/cmds/tunnel/list.js +2 -2
  54. package/dist/cmds/tunnel/list.js.map +1 -1
  55. package/dist/cmds/tunnel/rotate-token.js +2 -2
  56. package/dist/cmds/tunnel/rotate-token.js.map +1 -1
  57. package/dist/cmds/tunnel/services/describe.js +2 -2
  58. package/dist/cmds/tunnel/services/describe.js.map +1 -1
  59. package/dist/cmds/tunnel/services/update.js +2 -2
  60. package/dist/cmds/tunnel/services/update.js.map +1 -1
  61. package/dist/cmds/variable/create.js +2 -2
  62. package/dist/cmds/variable/create.js.map +1 -1
  63. package/dist/cmds/variable/update.js +2 -2
  64. package/dist/cmds/variable/update.js.map +1 -1
  65. package/dist/common/middleware/get-project-param.js +3 -3
  66. package/dist/common/middleware/get-project-param.js.map +1 -1
  67. package/dist/common/populate.d.ts.map +1 -1
  68. package/dist/common/populate.js.map +1 -1
  69. package/dist/common/utils/stringify-config.test.js +1 -1
  70. package/dist/common/utils/stringify-config.test.js.map +1 -1
  71. package/dist/common/worker-output.d.ts.map +1 -1
  72. package/dist/common/worker-output.js +1 -1
  73. package/dist/common/worker-output.js.map +1 -1
  74. package/dist/delete/handler.js +1 -1
  75. package/dist/delete/handler.js.map +1 -1
  76. package/dist/deploy/archive.js.map +1 -1
  77. package/dist/deploy/archive.test.js +2 -2
  78. package/dist/deploy/archive.test.js.map +1 -1
  79. package/dist/deploy/handler.d.ts.map +1 -1
  80. package/dist/deploy/handler.js +2 -2
  81. package/dist/deploy/handler.js.map +1 -1
  82. package/dist/dev/handler.js +1 -1
  83. package/dist/dev/handler.js.map +1 -1
  84. package/dist/editor/handler.js +2 -2
  85. package/dist/editor/handler.js.map +1 -1
  86. package/dist/login/login.js +1 -1
  87. package/dist/login/login.js.map +1 -1
  88. package/dist/open-api/convert/convert-engine.d.ts +1 -1
  89. package/dist/open-api/convert/convert-engine.d.ts.map +1 -1
  90. package/dist/open-api/convert/convert-engine.js.map +1 -1
  91. package/dist/open-api/convert/convert-engine.spec.js +2 -2
  92. package/dist/open-api/convert/convert-engine.spec.js.map +1 -1
  93. package/dist/open-api/convert/handler.js +2 -2
  94. package/dist/open-api/convert/handler.js.map +1 -1
  95. package/dist/open-api/convert/handler.spec.js +1 -1
  96. package/dist/open-api/convert/handler.spec.js.map +1 -1
  97. package/dist/open-api/merge/handler.d.ts.map +1 -1
  98. package/dist/open-api/merge/handler.js +1 -1
  99. package/dist/open-api/merge/handler.js.map +1 -1
  100. package/dist/open-api/merge/handler.spec.js +1 -1
  101. package/dist/open-api/merge/handler.spec.js.map +1 -1
  102. package/dist/open-api/merge/merge-engine.spec.js +2 -2
  103. package/dist/open-api/merge/merge-engine.spec.js.map +1 -1
  104. package/dist/open-api/merge/utils.js +1 -1
  105. package/dist/open-api/merge/utils.js.map +1 -1
  106. package/dist/open-api/overlay/handler.js +1 -1
  107. package/dist/open-api/overlay/handler.js.map +1 -1
  108. package/dist/open-api/overlay/handler.spec.js +1 -1
  109. package/dist/open-api/overlay/handler.spec.js.map +1 -1
  110. package/dist/open-api/overlay/overlay-engine.d.ts.map +1 -1
  111. package/dist/open-api/overlay/overlay-engine.js.map +1 -1
  112. package/dist/open-api/overlay/overlay-engine.spec.js +2 -2
  113. package/dist/open-api/overlay/overlay-engine.spec.js.map +1 -1
  114. package/dist/source/migrate/dev-portal/handler.d.ts.map +1 -1
  115. package/dist/source/migrate/dev-portal/handler.js +7 -4
  116. package/dist/source/migrate/dev-portal/handler.js.map +1 -1
  117. package/package.json +4 -4
package/dist/cli.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import * as dotenv from "dotenv";
2
2
  dotenv.config();
3
- import undici from "undici";
4
3
  import { readFileSync } from "node:fs";
5
4
  import { fileURLToPath } from "node:url";
6
5
  import { confirm } from "@inquirer/prompts";
7
6
  import * as Sentry from "@sentry/node";
8
7
  import { gte } from "semver";
8
+ import undici from "undici";
9
9
  import { hideBin } from "yargs/helpers";
10
10
  import yargs from "yargs/yargs";
11
11
  import build from "./cmds/build.js";
@@ -28,9 +28,9 @@ import variable from "./cmds/variable/index.js";
28
28
  import { shutdownAnalytics } from "./common/analytics/lib.js";
29
29
  import { MAX_WAIT_PENDING_TIME_MS, SENTRY_DSN } from "./common/constants.js";
30
30
  import { logger } from "./common/logger.js";
31
+ import { logLevel } from "./common/middleware/logging.js";
31
32
  import { warnIfOutdatedVersion, warnNodeVersion } from "./common/outdated.js";
32
33
  import { printCriticalFailureToConsoleAndExit } from "./common/output.js";
33
- import { logLevel } from "./common/middleware/logging.js";
34
34
  if (process.env.ZUPLO_CLI_PROFILING) {
35
35
  await confirm({ message: "Continue executing CLI?", default: true });
36
36
  }
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAIhB,OAAO,MAAM,MA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C;SAChB,OAAO,CAAC;QACP,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,KAAK,CAAC,0DAA0D,CAAC,CAAC;QAC1E,CAAC;KACF,CAAC;SACD,aAAa,EAAE;SACf,cAAc,EAAE;SAChB,OAAO,CAAC,UAAU,CAAC;SACnB,IAAI,CAAC,KAAK,CAAC;SACX,IAAI,EAAE,CAAC;IAEV,IAAI,CAAC;QACH,MAAM,GAAG,CAAC,IAAI,CAAC;QAGf,KAAK,qBAAqB,CAAC,UAAU,CAAC,CAAC;QAEvC,KAAK,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;YACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,GAAG,YAAY,KAAK,EAAE,CAAC;YACzB,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;QAC/B,CAAC;QACD,MAAM,oCAAoC,CAAC,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,CAAC;QAC/D,GAAG,CAAC,QAAQ,EAAE,CAAC;IACjB,CAAC;YAAS,CAAC;QACT,MAAM,iBAAiB,EAAE,CAAC;IAC5B,CAAC;AACH,CAAC;KAAM,CAAC;IACN,MAAM,oCAAoC,CACxC,4CAA4C,gBAAgB,oBAAoB,OAAO,CAAC,QAAQ,CAAC,IAAI;;oFAErB,CACjF,CAAC;AACJ,CAAC","sourcesContent":["import * as dotenv from \"dotenv\";\ndotenv.config();\n\n// Undici must be imported first to set the global dispatcher\n// If fetch is used before undici, the process will crash\nimport undici from \"undici\";\n\nimport { readFileSync } from \"node:fs\";\nimport { fileURLToPath } from \"node:url\";\nimport { confirm } from \"@inquirer/prompts\";\nimport * as Sentry from \"@sentry/node\";\nimport { gte } from \"semver\";\nimport { hideBin } from \"yargs/helpers\";\nimport yargs from \"yargs/yargs\";\nimport build from \"./cmds/build.js\";\nimport compile from \"./cmds/compile.js\";\nimport deleteZup from \"./cmds/delete.js\";\nimport deploy from \"./cmds/deploy.js\";\nimport dev from \"./cmds/dev.js\";\nimport editor from \"./cmds/editor.js\";\nimport link from \"./cmds/link.js\";\nimport list from \"./cmds/list.js\";\nimport login from \"./cmds/login.js\";\nimport mtlsCertificates from \"./cmds/mtls-certificates/index.js\";\nimport oas from \"./cmds/open-api/index.js\";\nimport project from \"./cmds/project/index.js\";\nimport proxies from \"./cmds/proxies/index.js\";\nimport source from \"./cmds/source/index.js\";\nimport test from \"./cmds/test.js\";\nimport tunnel from \"./cmds/tunnel/index.js\";\nimport variable from \"./cmds/variable/index.js\";\nimport { shutdownAnalytics } from \"./common/analytics/lib.js\";\nimport { MAX_WAIT_PENDING_TIME_MS, SENTRY_DSN } from \"./common/constants.js\";\nimport { logger } from \"./common/logger.js\";\nimport { warnIfOutdatedVersion, warnNodeVersion } from \"./common/outdated.js\";\nimport { printCriticalFailureToConsoleAndExit } from \"./common/output.js\";\nimport { logLevel } from \"./common/middleware/logging.js\";\n\n// This allows us to stop the CLI from executing so we can connect the profiler\n\n// biome-ignore lint/style/noProcessEnv: Migrated from ESLint\nif (process.env.ZUPLO_CLI_PROFILING) {\n await confirm({ message: \"Continue executing CLI?\", default: true });\n}\n\n// Note: We cannot set this to be higher than 18.0.0 because of the way\n// our documentation works -- we tell them to use npx @zuplo/cli@latest (even in CI/CD jobs)\n// If we set this to be higher than 18.0.0, then we will break them.\n// Instead we set the value in package.json to be engine.node >= 20.0.0, so it will warn\nconst MIN_NODE_VERSION = \"18.0.0\";\nconst RECOMMENDED_NODE_VERSION = \"20.0.0\";\n\nif (gte(process.versions.node, MIN_NODE_VERSION)) {\n let cliVersion: string;\n try {\n const packageJson = JSON.parse(\n readFileSync(\n fileURLToPath(new URL(\"../package.json\", import.meta.url)),\n \"utf-8\"\n )\n );\n cliVersion = packageJson.version;\n } catch (e) {\n cliVersion = \"0.0.0\";\n logger.error(e);\n await printCriticalFailureToConsoleAndExit(\n `Unable to load @zuplo/cli. The package.json is missing or malformed.`\n );\n }\n\n await warnNodeVersion(cliVersion, RECOMMENDED_NODE_VERSION);\n\n undici.setGlobalDispatcher(\n undici.getGlobalDispatcher().compose((dispatch) => {\n return (opts, handler) => {\n opts.headers = {\n ...opts.headers,\n \"user-agent\": `ZuploCLI/${cliVersion}`,\n\n // biome-ignore lint/style/noProcessEnv: Migrated from ESLint\n ...(process.env.ZUPLO_CANARY ? { \"zp-canary\": \"true\" } : {}),\n };\n return dispatch(opts, handler);\n };\n })\n );\n\n Sentry.init({\n dsn: SENTRY_DSN,\n release: cliVersion,\n });\n\n const cli = yargs(hideBin(process.argv))\n // This means that all env vars will have to be prefixed with ZUPLO_\n .env(\"ZUPLO\")\n .option(\"prompt\", {\n type: \"boolean\",\n describe: \"Bypass confirmation prompts\",\n default: true,\n hidden: true,\n })\n .option(\"verbose\", {\n alias: \"v\",\n type: \"count\",\n describe: \"Increase verbosity level (-v, -vv, -vvv)\",\n default: 0,\n hidden: true,\n })\n .middleware(logLevel)\n .command(compile)\n .command(deleteZup) // delete is a reserved keyword in JavaScript, so we call this function deleteZup\n .command(deploy)\n .command(dev)\n .command(editor)\n .command(list)\n .command(link)\n .command(login)\n .command(test)\n .command(oas)\n .command(mtlsCertificates)\n .command(project)\n .command(source)\n .command(tunnel)\n .command(variable)\n .command(build)\n .command(proxies)\n .command({\n command: \"hello\",\n handler: async () => {\n await fetch(\"https://393b4699ced44cc2ae87e4ad86184a29.api.mockbin.io/\");\n },\n })\n .demandCommand()\n .strictCommands()\n .version(cliVersion)\n .fail(false)\n .help();\n\n try {\n await cli.argv;\n\n // Don't block\n void warnIfOutdatedVersion(cliVersion);\n\n void Sentry.close(MAX_WAIT_PENDING_TIME_MS).then(() => {\n process.exit(0);\n });\n } catch (err) {\n if (err instanceof Error) {\n Sentry.captureException(err);\n }\n await printCriticalFailureToConsoleAndExit(err.message ?? err);\n cli.showHelp();\n } finally {\n await shutdownAnalytics();\n }\n} else {\n await printCriticalFailureToConsoleAndExit(\n `The Zuplo CLI requires at least node.js v${MIN_NODE_VERSION}. You are using v${process.versions.node}. Please update your version of node.js.\n\n Consider using a Node.js version manager such as https://github.com/nvm-sh/nvm.`\n );\n}\n"]}
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAG7B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,SAAS,MAAM,kBAAkB,CAAC;AACzC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,gBAAgB,MAAM,mCAAmC,CAAC;AACjE,OAAO,GAAG,MAAM,0BAA0B,CAAC;AAC3C,OAAO,OAAO,MAAM,yBAAyB,CAAC;AAC9C,OAAO,OAAO,MAAM,yBAAyB,CAAC;AAC9C,OAAO,MAAM,MA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M,oCAAoC,CACxC,4CAA4C,gBAAgB,oBAAoB,OAAO,CAAC,QAAQ,CAAC,IAAI;;oFAErB,CACjF,CAAC;AACJ,CAAC","sourcesContent":["import * as dotenv from \"dotenv\";\n\ndotenv.config();\n\nimport { readFileSync } from \"node:fs\";\nimport { fileURLToPath } from \"node:url\";\nimport { confirm } from \"@inquirer/prompts\";\nimport * as Sentry from \"@sentry/node\";\nimport { gte } from \"semver\";\n// Undici must be imported first to set the global dispatcher\n// If fetch is used before undici, the process will crash\nimport undici from \"undici\";\nimport { hideBin } from \"yargs/helpers\";\nimport yargs from \"yargs/yargs\";\nimport build from \"./cmds/build.js\";\nimport compile from \"./cmds/compile.js\";\nimport deleteZup from \"./cmds/delete.js\";\nimport deploy from \"./cmds/deploy.js\";\nimport dev from \"./cmds/dev.js\";\nimport editor from \"./cmds/editor.js\";\nimport link from \"./cmds/link.js\";\nimport list from \"./cmds/list.js\";\nimport login from \"./cmds/login.js\";\nimport mtlsCertificates from \"./cmds/mtls-certificates/index.js\";\nimport oas from \"./cmds/open-api/index.js\";\nimport project from \"./cmds/project/index.js\";\nimport proxies from \"./cmds/proxies/index.js\";\nimport source from \"./cmds/source/index.js\";\nimport test from \"./cmds/test.js\";\nimport tunnel from \"./cmds/tunnel/index.js\";\nimport variable from \"./cmds/variable/index.js\";\nimport { shutdownAnalytics } from \"./common/analytics/lib.js\";\nimport { MAX_WAIT_PENDING_TIME_MS, SENTRY_DSN } from \"./common/constants.js\";\nimport { logger } from \"./common/logger.js\";\nimport { logLevel } from \"./common/middleware/logging.js\";\nimport { warnIfOutdatedVersion, warnNodeVersion } from \"./common/outdated.js\";\nimport { printCriticalFailureToConsoleAndExit } from \"./common/output.js\";\n\n// This allows us to stop the CLI from executing so we can connect the profiler\n\n// biome-ignore lint/style/noProcessEnv: Migrated from ESLint\nif (process.env.ZUPLO_CLI_PROFILING) {\n await confirm({ message: \"Continue executing CLI?\", default: true });\n}\n\n// Note: We cannot set this to be higher than 18.0.0 because of the way\n// our documentation works -- we tell them to use npx @zuplo/cli@latest (even in CI/CD jobs)\n// If we set this to be higher than 18.0.0, then we will break them.\n// Instead we set the value in package.json to be engine.node >= 20.0.0, so it will warn\nconst MIN_NODE_VERSION = \"18.0.0\";\nconst RECOMMENDED_NODE_VERSION = \"20.0.0\";\n\nif (gte(process.versions.node, MIN_NODE_VERSION)) {\n let cliVersion: string;\n try {\n const packageJson = JSON.parse(\n readFileSync(\n fileURLToPath(new URL(\"../package.json\", import.meta.url)),\n \"utf-8\"\n )\n );\n cliVersion = packageJson.version;\n } catch (e) {\n cliVersion = \"0.0.0\";\n logger.error(e);\n await printCriticalFailureToConsoleAndExit(\n `Unable to load @zuplo/cli. The package.json is missing or malformed.`\n );\n }\n\n await warnNodeVersion(cliVersion, RECOMMENDED_NODE_VERSION);\n\n undici.setGlobalDispatcher(\n undici.getGlobalDispatcher().compose((dispatch) => {\n return (opts, handler) => {\n opts.headers = {\n ...opts.headers,\n \"user-agent\": `ZuploCLI/${cliVersion}`,\n\n // biome-ignore lint/style/noProcessEnv: Migrated from ESLint\n ...(process.env.ZUPLO_CANARY ? { \"zp-canary\": \"true\" } : {}),\n };\n return dispatch(opts, handler);\n };\n })\n );\n\n Sentry.init({\n dsn: SENTRY_DSN,\n release: cliVersion,\n });\n\n const cli = yargs(hideBin(process.argv))\n // This means that all env vars will have to be prefixed with ZUPLO_\n .env(\"ZUPLO\")\n .option(\"prompt\", {\n type: \"boolean\",\n describe: \"Bypass confirmation prompts\",\n default: true,\n hidden: true,\n })\n .option(\"verbose\", {\n alias: \"v\",\n type: \"count\",\n describe: \"Increase verbosity level (-v, -vv, -vvv)\",\n default: 0,\n hidden: true,\n })\n .middleware(logLevel)\n .command(compile)\n .command(deleteZup) // delete is a reserved keyword in JavaScript, so we call this function deleteZup\n .command(deploy)\n .command(dev)\n .command(editor)\n .command(list)\n .command(link)\n .command(login)\n .command(test)\n .command(oas)\n .command(mtlsCertificates)\n .command(project)\n .command(source)\n .command(tunnel)\n .command(variable)\n .command(build)\n .command(proxies)\n .command({\n command: \"hello\",\n handler: async () => {\n await fetch(\"https://393b4699ced44cc2ae87e4ad86184a29.api.mockbin.io/\");\n },\n })\n .demandCommand()\n .strictCommands()\n .version(cliVersion)\n .fail(false)\n .help();\n\n try {\n await cli.argv;\n\n // Don't block\n void warnIfOutdatedVersion(cliVersion);\n\n void Sentry.close(MAX_WAIT_PENDING_TIME_MS).then(() => {\n process.exit(0);\n });\n } catch (err) {\n if (err instanceof Error) {\n Sentry.captureException(err);\n }\n await printCriticalFailureToConsoleAndExit(err.message ?? err);\n cli.showHelp();\n } finally {\n await shutdownAnalytics();\n }\n} else {\n await printCriticalFailureToConsoleAndExit(\n `The Zuplo CLI requires at least node.js v${MIN_NODE_VERSION}. You are using v${process.versions.node}. Please update your version of node.js.\n\n Consider using a Node.js version manager such as https://github.com/nvm-sh/nvm.`\n );\n}\n"]}
@@ -1,11 +1,11 @@
1
1
  import { captureEvent } from "../common/analytics/lib.js";
2
2
  import { authenticate } from "../common/middleware/authentication.js";
3
+ import { fetchAccount } from "../common/middleware/get-account-param.js";
4
+ import { fetchProject } from "../common/middleware/get-project-param.js";
3
5
  import { configure } from "../common/middleware/user-configuration.js";
4
6
  import { identify } from "../common/middleware/user-identification.js";
5
7
  import setBlocking from "../common/output.js";
6
8
  import { deleteZup } from "../delete/handler.js";
7
- import { fetchAccount } from "../common/middleware/get-account-param.js";
8
- import { fetchProject } from "../common/middleware/get-project-param.js";
9
9
  export default {
10
10
  desc: "Deletes the Zuplo API by URL",
11
11
  command: "delete",
@@ -1 +1 @@
1
- {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../src/cmds/delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AACvE,OAAO,EAAE,QAAQ,E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,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;YACvC,CAAC;YACD,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;gBAC5B,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;YAC5D,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC,CAAC;aACD,OAAO,CAAC;YACP;gBACE,qDAAqD;gBACrD,0CAA0C;aAC3C;YACD;gBACE,4DAA4D;gBAC5D,+DAA+D;aAChE;SACF,CAAC;aACD,UAAU,CAAC;YACV,WAAW;YACX,YAAY;YACZ,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,QAAQ;SACT,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,CAAC;QACpD,MAAM,SAAS,CAAC,IAAiB,CAAC,CAAC;IACrC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../common/analytics/lib.js\";\nimport { authenticate } from \"../common/middleware/authentication.js\";\nimport { configure } from \"../common/middleware/user-configuration.js\";\nimport { identify } from \"../common/middleware/user-identification.js\";\nimport setBlocking from \"../common/output.js\";\nimport { Arguments, deleteZup } from \"../delete/handler.js\";\nimport { fetchAccount } from \"../common/middleware/get-account-param.js\";\nimport { fetchProject } from \"../common/middleware/get-project-param.js\";\n\nexport default {\n desc: \"Deletes the Zuplo API by URL\",\n command: \"delete\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 delete --url <url> [options]\")\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"url\", {\n type: \"string\",\n describe: \"The URL of the Zuplo API to delete\",\n })\n .option(\"branch\", {\n type: \"string\",\n describe: \"The branch name to delete deployments for\",\n hidden: true,\n })\n .option(\"project\", {\n type: \"string\",\n describe: \"The project name\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"wait\", {\n type: \"boolean\",\n describe: \"Should the CLI wait until the Zuplo API is deleted\",\n })\n .option(\"self-hosted-endpoint\", {\n type: \"string\",\n describe: \"The endpoint of your self-hosted service to deploy to\",\n })\n .boolean(\"wait\")\n .check((argv) => {\n // Branch option is hidden for testing, but still works internally\n if (!argv.url && !argv.branch) {\n throw new Error(\"--url is required\");\n }\n if (argv.url && argv.branch) {\n throw new Error(\"Cannot specify both --url and --branch\");\n }\n return true;\n })\n .example([\n [\n \"$0 delete --url https://my-api-dev-123abc.zuplo.app\",\n \"Delete a deployed environment by its URL\",\n ],\n [\n \"$0 delete --url https://my-api-dev-123abc.zuplo.app --wait\",\n \"Delete an environment and wait until the deletion is complete\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo delete\" });\n await deleteZup(argv as Arguments);\n },\n};\n"]}
1
+ {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../src/cmds/delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAa,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE5D,eAAe;IACb,IAAI,EAAE,8BAA8B;IACpC,OAAO,EAAE,QAAQ;IACjB,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YACD;gBACE,4DAA4D;gBAC5D,+DAA+D;aAChE;SACF,CAAC;aACD,UAAU,CAAC;YACV,WAAW;YACX,YAAY;YACZ,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,QAAQ;SACT,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,CAAC;QACpD,MAAM,SAAS,CAAC,IAAiB,CAAC,CAAC;IACrC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../common/analytics/lib.js\";\nimport { authenticate } from \"../common/middleware/authentication.js\";\nimport { fetchAccount } from \"../common/middleware/get-account-param.js\";\nimport { fetchProject } from \"../common/middleware/get-project-param.js\";\nimport { configure } from \"../common/middleware/user-configuration.js\";\nimport { identify } from \"../common/middleware/user-identification.js\";\nimport setBlocking from \"../common/output.js\";\nimport { Arguments, deleteZup } from \"../delete/handler.js\";\n\nexport default {\n desc: \"Deletes the Zuplo API by URL\",\n command: \"delete\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 delete --url <url> [options]\")\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"url\", {\n type: \"string\",\n describe: \"The URL of the Zuplo API to delete\",\n })\n .option(\"branch\", {\n type: \"string\",\n describe: \"The branch name to delete deployments for\",\n hidden: true,\n })\n .option(\"project\", {\n type: \"string\",\n describe: \"The project name\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"wait\", {\n type: \"boolean\",\n describe: \"Should the CLI wait until the Zuplo API is deleted\",\n })\n .option(\"self-hosted-endpoint\", {\n type: \"string\",\n describe: \"The endpoint of your self-hosted service to deploy to\",\n })\n .boolean(\"wait\")\n .check((argv) => {\n // Branch option is hidden for testing, but still works internally\n if (!argv.url && !argv.branch) {\n throw new Error(\"--url is required\");\n }\n if (argv.url && argv.branch) {\n throw new Error(\"Cannot specify both --url and --branch\");\n }\n return true;\n })\n .example([\n [\n \"$0 delete --url https://my-api-dev-123abc.zuplo.app\",\n \"Delete a deployed environment by its URL\",\n ],\n [\n \"$0 delete --url https://my-api-dev-123abc.zuplo.app --wait\",\n \"Delete an environment and wait until the deletion is complete\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo delete\" });\n await deleteZup(argv as Arguments);\n },\n};\n"]}
@@ -1,12 +1,12 @@
1
1
  import { captureEvent } from "../common/analytics/lib.js";
2
2
  import { authenticate } from "../common/middleware/authentication.js";
3
+ import { fetchAccount } from "../common/middleware/get-account-param.js";
4
+ import { fetchEnvironment } from "../common/middleware/get-environment-param.js";
5
+ import { fetchProject } from "../common/middleware/get-project-param.js";
3
6
  import { configure } from "../common/middleware/user-configuration.js";
4
7
  import { identify } from "../common/middleware/user-identification.js";
5
8
  import setBlocking from "../common/output.js";
6
9
  import { deploy } from "../deploy/handler.js";
7
- import { fetchAccount } from "../common/middleware/get-account-param.js";
8
- import { fetchProject } from "../common/middleware/get-project-param.js";
9
- import { fetchEnvironment } from "../common/middleware/get-environment-param.js";
10
10
  export default {
11
11
  desc: "Deploys current Git branch of the current directory",
12
12
  command: "deploy",
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/cmds/deploy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAC9C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;YACd,QAAQ,EAAE,iCAAiC;YAC3C,OAAO,EAAE,SAAS;YAClB,MAAM,EAAE,IAAI;SACb,CAAC;aACD,MAAM,CAAC,oBAAoB,EAAE;YAC5B,IAAI,EAAE,SAAS;YACf,QAAQ,EACN,gJAAgJ;YAClJ,OAAO,EAAE,KAAK;SACf,CAAC;aACD,OAAO,CAAC,eAAe,CAAC;aACxB,OAAO,CAAC;YACP;gBACE,WAAW;gBACX,6EAA6E;aAC9E;YACD;gBACE,gCAAgC;gBAChC,oEAAoE;aACrE;YACD;gBACE,0EAA0E;gBAC1E,0DAA0D;aAC3D;SACF,CAAC;aACD,UAAU,CAAC;YACV,WAAW;YACX,YAAY;YACZ,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,gBAAgB;YAChB,QAAQ;SACT,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,CAAC;QACpD,MAAM,MAAM,CAAC,IAAiB,CAAC,CAAC;IAClC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../common/analytics/lib.js\";\nimport { authenticate } from \"../common/middleware/authentication.js\";\nimport { configure } from \"../common/middleware/user-configuration.js\";\nimport { identify } from \"../common/middleware/user-identification.js\";\nimport setBlocking from \"../common/output.js\";\nimport { Arguments, deploy } from \"../deploy/handler.js\";\nimport { fetchAccount } from \"../common/middleware/get-account-param.js\";\nimport { fetchProject } from \"../common/middleware/get-project-param.js\";\nimport { fetchEnvironment } from \"../common/middleware/get-environment-param.js\";\n\nexport default {\n desc: \"Deploys current Git branch of the current directory\",\n command: \"deploy\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 deploy [options]\")\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"project\", {\n type: \"string\",\n hidden: true,\n describe: \"The project name\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"dir\", {\n type: \"string\",\n describe: \"The directory containing your Zuplo API\",\n default: \".\",\n normalize: true,\n hidden: true,\n })\n .option(\"verify-remote\", {\n deprecated: true,\n type: \"boolean\",\n describe:\n \"Verify that this Git repository matches the one configured on Zuplo. Use --no-verify-remote to disable.\",\n default: false,\n })\n .option(\"environment\", {\n type: \"string\",\n describe:\n \"The value to use for environment name, instead of the current branch name\",\n })\n .option(\"self-hosted-endpoint\", {\n type: \"string\",\n describe: \"The endpoint of your self-hosted service to deploy to\",\n })\n .option(\"override-repo-url\", {\n type: \"string\",\n describe: \"Override the repo url reference\",\n default: undefined,\n hidden: true,\n })\n .option(\"fetch-environments\", {\n type: \"boolean\",\n describe:\n \"Fetch the environments for your project from Zuplo. If this is false, then the environment will automatically be detected from the git branch.\",\n default: false,\n })\n .boolean(\"verify-remote\")\n .example([\n [\n \"$0 deploy\",\n \"Deploy the current Git branch using the branch name as the environment name\",\n ],\n [\n \"$0 deploy --environment my-env\",\n \"Override the environment name instead of using the Git branch name\",\n ],\n [\n \"$0 deploy --account my-account --project my-project --environment my-env\",\n \"Explicitly specify the account, project, and environment\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n fetchEnvironment,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo deploy\" });\n await deploy(argv as Arguments);\n },\n};\n"]}
1
+ {"version":3,"file":"deploy.js","sourceRoot":"","sources":["../../src/cmds/deploy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC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CAAC,mBAAmB,EAAE;YAC3B,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,iCAAiC;YAC3C,OAAO,EAAE,SAAS;YAClB,MAAM,EAAE,IAAI;SACb,CAAC;aACD,MAAM,CAAC,oBAAoB,EAAE;YAC5B,IAAI,EAAE,SAAS;YACf,QAAQ,EACN,gJAAgJ;YAClJ,OAAO,EAAE,KAAK;SACf,CAAC;aACD,OAAO,CAAC,eAAe,CAAC;aACxB,OAAO,CAAC;YACP;gBACE,WAAW;gBACX,6EAA6E;aAC9E;YACD;gBACE,gCAAgC;gBAChC,oEAAoE;aACrE;YACD;gBACE,0EAA0E;gBAC1E,0DAA0D;aAC3D;SACF,CAAC;aACD,UAAU,CAAC;YACV,WAAW;YACX,YAAY;YACZ,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,gBAAgB;YAChB,QAAQ;SACT,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,CAAC;QACpD,MAAM,MAAM,CAAC,IAAiB,CAAC,CAAC;IAClC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../common/analytics/lib.js\";\nimport { authenticate } from \"../common/middleware/authentication.js\";\nimport { fetchAccount } from \"../common/middleware/get-account-param.js\";\nimport { fetchEnvironment } from \"../common/middleware/get-environment-param.js\";\nimport { fetchProject } from \"../common/middleware/get-project-param.js\";\nimport { configure } from \"../common/middleware/user-configuration.js\";\nimport { identify } from \"../common/middleware/user-identification.js\";\nimport setBlocking from \"../common/output.js\";\nimport { Arguments, deploy } from \"../deploy/handler.js\";\n\nexport default {\n desc: \"Deploys current Git branch of the current directory\",\n command: \"deploy\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 deploy [options]\")\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"project\", {\n type: \"string\",\n hidden: true,\n describe: \"The project name\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"dir\", {\n type: \"string\",\n describe: \"The directory containing your Zuplo API\",\n default: \".\",\n normalize: true,\n hidden: true,\n })\n .option(\"verify-remote\", {\n deprecated: true,\n type: \"boolean\",\n describe:\n \"Verify that this Git repository matches the one configured on Zuplo. Use --no-verify-remote to disable.\",\n default: false,\n })\n .option(\"environment\", {\n type: \"string\",\n describe:\n \"The value to use for environment name, instead of the current branch name\",\n })\n .option(\"self-hosted-endpoint\", {\n type: \"string\",\n describe: \"The endpoint of your self-hosted service to deploy to\",\n })\n .option(\"override-repo-url\", {\n type: \"string\",\n describe: \"Override the repo url reference\",\n default: undefined,\n hidden: true,\n })\n .option(\"fetch-environments\", {\n type: \"boolean\",\n describe:\n \"Fetch the environments for your project from Zuplo. If this is false, then the environment will automatically be detected from the git branch.\",\n default: false,\n })\n .boolean(\"verify-remote\")\n .example([\n [\n \"$0 deploy\",\n \"Deploy the current Git branch using the branch name as the environment name\",\n ],\n [\n \"$0 deploy --environment my-env\",\n \"Override the environment name instead of using the Git branch name\",\n ],\n [\n \"$0 deploy --account my-account --project my-project --environment my-env\",\n \"Explicitly specify the account, project, and environment\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n fetchEnvironment,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo deploy\" });\n await deploy(argv as Arguments);\n },\n};\n"]}
package/dist/cmds/link.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { captureEvent } from "../common/analytics/lib.js";
2
2
  import { authenticate } from "../common/middleware/authentication.js";
3
+ import { fetchAccount } from "../common/middleware/get-account-param.js";
4
+ import { fetchEnvironment } from "../common/middleware/get-environment-param.js";
5
+ import { fetchProject } from "../common/middleware/get-project-param.js";
3
6
  import { configure } from "../common/middleware/user-configuration.js";
4
7
  import { identify } from "../common/middleware/user-identification.js";
5
8
  import setBlocking from "../common/output.js";
6
9
  import { link } from "../link/handler.js";
7
- import { fetchAccount } from "../common/middleware/get-account-param.js";
8
- import { fetchProject } from "../common/middleware/get-project-param.js";
9
- import { fetchEnvironment } from "../common/middleware/get-environment-param.js";
10
10
  export default {
11
11
  desc: "Links information from your Zuplo account to your local machine allowing",
12
12
  command: "link",
@@ -1 +1 @@
1
- {"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/cmds/link.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAa,IAAI,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAEjF,eAAe;IACb,IAAI,EAAE,0EAA0E;IAChF,OAAO,EAAE,MAAM;IACf,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,KAAK,CAAC,mBAAmB,CAAC;aAC1B,MAAM,CAAC,KAAK,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,yCAAyC;YACnD,OAAO,EAAE,GAAG;YACZ,SAAS,EAAE,IAAI;YACf,MAAM,EAAE,IAAI;SACb,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,wBAAwB;YAClC,MAAM,EAAE,SAAS;SAClB,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,MAAM,CAAC,aAAa,EAAE;YACrB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,sBAAsB;SACjC,CAAC;aACD,MAAM,CAAC,oBAAoB,EAAE;YAC5B,IAAI,EAAE,SAAS;YACf,QAAQ,EACN,gJAAgJ;YAClJ,OAAO,EAAE,IAAI;SACd,CAAC;aACD,OAAO,CAAC;YACP,CAAC,SAAS,EAAE,+CAA+C,CAAC;YAC5D;gBACE,wEAAwE;gBACxE,0DAA0D;aAC3D;SACF,CAAC;aACD,UAAU,CAAC;YACV,WAAW;YACX,YAAY;YACZ,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,gBAAgB;YAChB,QAAQ;SACT,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;QAClD,MAAM,IAAI,CAAC,IAAiB,CAAC,CAAC;IAChC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../common/analytics/lib.js\";\nimport { authenticate } from \"../common/middleware/authentication.js\";\nimport { configure } from \"../common/middleware/user-configuration.js\";\nimport { identify } from \"../common/middleware/user-identification.js\";\nimport setBlocking from \"../common/output.js\";\nimport { Arguments, link } from \"../link/handler.js\";\nimport { fetchAccount } from \"../common/middleware/get-account-param.js\";\nimport { fetchProject } from \"../common/middleware/get-project-param.js\";\nimport { fetchEnvironment } from \"../common/middleware/get-environment-param.js\";\n\nexport default {\n desc: \"Links information from your Zuplo account to your local machine allowing\",\n command: \"link\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 link [options]\")\n .option(\"dir\", {\n type: \"string\",\n describe: \"The directory containing your Zuplo API\",\n default: \".\",\n normalize: true,\n hidden: true,\n })\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"project\", {\n type: \"string\",\n describe: \"The project name\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"environment\", {\n type: \"string\",\n describe: \"The environment name\",\n })\n .option(\"fetch-environments\", {\n type: \"boolean\",\n describe:\n \"Fetch the environments for your project from Zuplo. If this is false, then the environment will automatically be detected from the git branch.\",\n default: true,\n })\n .example([\n [\"$0 link\", \"Link your local project to your Zuplo account\"],\n [\n \"$0 link --account my-account --project my-project --environment my-env\",\n \"Explicitly specify the account, project, and environment\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n fetchEnvironment,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo link\" });\n await link(argv as Arguments);\n },\n};\n"]}
1
+ {"version":3,"file":"link.js","sourceRoot":"","sources":["../../src/cmds/link.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAa,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAErD,eAAe;IACb,IA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;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../common/analytics/lib.js\";\nimport { authenticate } from \"../common/middleware/authentication.js\";\nimport { fetchAccount } from \"../common/middleware/get-account-param.js\";\nimport { fetchEnvironment } from \"../common/middleware/get-environment-param.js\";\nimport { fetchProject } from \"../common/middleware/get-project-param.js\";\nimport { configure } from \"../common/middleware/user-configuration.js\";\nimport { identify } from \"../common/middleware/user-identification.js\";\nimport setBlocking from \"../common/output.js\";\nimport { Arguments, link } from \"../link/handler.js\";\n\nexport default {\n desc: \"Links information from your Zuplo account to your local machine allowing\",\n command: \"link\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 link [options]\")\n .option(\"dir\", {\n type: \"string\",\n describe: \"The directory containing your Zuplo API\",\n default: \".\",\n normalize: true,\n hidden: true,\n })\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"project\", {\n type: \"string\",\n describe: \"The project name\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"environment\", {\n type: \"string\",\n describe: \"The environment name\",\n })\n .option(\"fetch-environments\", {\n type: \"boolean\",\n describe:\n \"Fetch the environments for your project from Zuplo. If this is false, then the environment will automatically be detected from the git branch.\",\n default: true,\n })\n .example([\n [\"$0 link\", \"Link your local project to your Zuplo account\"],\n [\n \"$0 link --account my-account --project my-project --environment my-env\",\n \"Explicitly specify the account, project, and environment\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n fetchEnvironment,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo link\" });\n await link(argv as Arguments);\n },\n};\n"]}
package/dist/cmds/list.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { captureEvent } from "../common/analytics/lib.js";
2
2
  import { authenticate } from "../common/middleware/authentication.js";
3
+ import { fetchAccount } from "../common/middleware/get-account-param.js";
4
+ import { fetchProject } from "../common/middleware/get-project-param.js";
3
5
  import { configure } from "../common/middleware/user-configuration.js";
4
6
  import { identify } from "../common/middleware/user-identification.js";
5
7
  import setBlocking from "../common/output.js";
6
8
  import { list } from "../list/handler.js";
7
- import { fetchAccount } from "../common/middleware/get-account-param.js";
8
- import { fetchProject } from "../common/middleware/get-project-param.js";
9
9
  export default {
10
10
  desc: "Lists all deployed Zuplo APIs",
11
11
  command: "list",
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/cmds/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAa,IAAI,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAEzE,eAAe;IACb,IAAI,EAAE,+BAA+B;IACrC,OAAO,EAAE,MAAM;IACf,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,KAAK,CAAC,mBAAmB,CAAC;aAC1B,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,wBAAwB;YAClC,MAAM,EAAE,SAAS;SAClB,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,MAAM,CAAC,sBAAsB,EAAE;YAC9B,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,uDAAuD;SAClE,CAAC;aACD,OAAO,CAAC;YACP,CAAC,SAAS,EAAE,iDAAiD,CAAC;YAC9D;gBACE,mDAAmD;gBACnD,4CAA4C;aAC7C;SACF,CAAC;aACD,UAAU,CAAC;YACV,WAAW;YACX,YAAY;YACZ,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,QAAQ;SACT,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;QAClD,MAAM,IAAI,CAAC,IAAiB,CAAC,CAAC;IAChC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../common/analytics/lib.js\";\nimport { authenticate } from \"../common/middleware/authentication.js\";\nimport { configure } from \"../common/middleware/user-configuration.js\";\nimport { identify } from \"../common/middleware/user-identification.js\";\nimport setBlocking from \"../common/output.js\";\nimport { Arguments, list } from \"../list/handler.js\";\nimport { fetchAccount } from \"../common/middleware/get-account-param.js\";\nimport { fetchProject } from \"../common/middleware/get-project-param.js\";\n\nexport default {\n desc: \"Lists all deployed Zuplo APIs\",\n command: \"list\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 list [options]\")\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"project\", {\n type: \"string\",\n describe: \"The project name\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"self-hosted-endpoint\", {\n type: \"string\",\n describe: \"The endpoint of your self-hosted service to deploy to\",\n })\n .example([\n [\"$0 list\", \"List all deployed environments for your project\"],\n [\n \"$0 list --account my-account --project my-project\",\n \"Explicitly specify the account and project\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo list\" });\n await list(argv as Arguments);\n },\n};\n"]}
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/cmds/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAa,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAErD,eAAe;IACb,IAAI,EAAE,+BAA+B;IACrC,OAAO,EAAE,MAAM;IACf,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,KAAK,CAAC,mBAAmB,CAAC;aAC1B,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,wBAAwB;YAClC,MAAM,EAAE,SAAS;SAClB,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,MAAM,CAAC,sBAAsB,EAAE;YAC9B,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,uDAAuD;SAClE,CAAC;aACD,OAAO,CAAC;YACP,CAAC,SAAS,EAAE,iDAAiD,CAAC;YAC9D;gBACE,mDAAmD;gBACnD,4CAA4C;aAC7C;SACF,CAAC;aACD,UAAU,CAAC;YACV,WAAW;YACX,YAAY;YACZ,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,QAAQ;SACT,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;QAClD,MAAM,IAAI,CAAC,IAAiB,CAAC,CAAC;IAChC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../common/analytics/lib.js\";\nimport { authenticate } from \"../common/middleware/authentication.js\";\nimport { fetchAccount } from \"../common/middleware/get-account-param.js\";\nimport { fetchProject } from \"../common/middleware/get-project-param.js\";\nimport { configure } from \"../common/middleware/user-configuration.js\";\nimport { identify } from \"../common/middleware/user-identification.js\";\nimport setBlocking from \"../common/output.js\";\nimport { Arguments, list } from \"../list/handler.js\";\n\nexport default {\n desc: \"Lists all deployed Zuplo APIs\",\n command: \"list\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 list [options]\")\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"project\", {\n type: \"string\",\n describe: \"The project name\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"self-hosted-endpoint\", {\n type: \"string\",\n describe: \"The endpoint of your self-hosted service to deploy to\",\n })\n .example([\n [\"$0 list\", \"List all deployed environments for your project\"],\n [\n \"$0 list --account my-account --project my-project\",\n \"Explicitly specify the account and project\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo list\" });\n await list(argv as Arguments);\n },\n};\n"]}
@@ -1,11 +1,11 @@
1
1
  import { captureEvent } from "../../common/analytics/lib.js";
2
2
  import { authenticate } from "../../common/middleware/authentication.js";
3
+ import { fetchAccount } from "../../common/middleware/get-account-param.js";
4
+ import { fetchProject } from "../../common/middleware/get-project-param.js";
3
5
  import { configure } from "../../common/middleware/user-configuration.js";
4
6
  import { identify } from "../../common/middleware/user-identification.js";
5
7
  import setBlocking from "../../common/output.js";
6
8
  import { create } from "../../mtls-certificates/create/handler.js";
7
- import { fetchAccount } from "../../common/middleware/get-account-param.js";
8
- import { fetchProject } from "../../common/middleware/get-project-param.js";
9
9
  export default {
10
10
  desc: "Creates a new mTLS certificate for a project",
11
11
  command: "create",
@@ -1 +1 @@
1
- {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/cmds/mtls-certificates/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAE5E,eAAe;IACb,IAAI,EAAE,8CAA8C;IACpD,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,KAAK,CACJ,oGAAoG,CACrG;aACA,MAAM,CAAC,MAAM,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,6DAA6D;SACxE,CAAC;aACD,MAAM,CAAC,MAAM,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,0CAA0C;SACrD,CAAC;aACD,MAAM,CAAC,KAAK,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,0CAA0C;SACrD,CAAC;aACD,MAAM,CAAC,kBAAkB,EAAE;YAC1B,IAAI,EAAE,OAAO;YACb,QAAQ,EACN,2IAA2I;YAC7I,OAAO,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE,YAAY,CAAC;SAClD,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,wBAAwB;YAClC,MAAM,EAAE,SAAS;SAClB,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,YAAY,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC;aACzD,OAAO,CAAC;YACP;gBACE,2GAA2G;gBAC3G,wEAAwE;aACzE;YACD;gBACE,wIAAwI;gBACxI,mEAAmE;aACpE;YACD;gBACE,qJAAqJ;gBACrJ,4CAA4C;aAC7C;SACF,CAAC;aACD,UAAU,CAAC;YACV,WAAW;YACX,YAAY;YACZ,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,QAAQ;SACT,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,+BAA+B,EAAE,CAAC,CAAC;QACrE,MAAM,MAAM,CAAC,IAAuB,CAAC,CAAC;IACxC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../../common/analytics/lib.js\";\nimport { authenticate } from \"../../common/middleware/authentication.js\";\nimport { configure } from \"../../common/middleware/user-configuration.js\";\nimport { identify } from \"../../common/middleware/user-identification.js\";\nimport setBlocking from \"../../common/output.js\";\nimport { create } from \"../../mtls-certificates/create/handler.js\";\nimport { CreateArguments } from \"../../mtls-certificates/models.js\";\nimport { fetchAccount } from \"../../common/middleware/get-account-param.js\";\nimport { fetchProject } from \"../../common/middleware/get-project-param.js\";\n\nexport default {\n desc: \"Creates a new mTLS certificate for a project\",\n command: \"create\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\n \"$0 mtls-certificates create --name <name> --cert <file> --key <file> --environment <env> [options]\"\n )\n .option(\"name\", {\n type: \"string\",\n describe: \"The name of the certificate (alphanumeric with underscores)\",\n })\n .option(\"cert\", {\n type: \"string\",\n describe: \"Path to the PEM-encoded certificate file\",\n })\n .option(\"key\", {\n type: \"string\",\n describe: \"Path to the PEM-encoded private key file\",\n })\n .option(\"environment-type\", {\n type: \"array\",\n describe:\n \"Environment types where the certificate should be enabled (can be repeated: --environment-type development --environment-type production)\",\n choices: [\"development\", \"preview\", \"production\"],\n })\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"project\", {\n type: \"string\",\n describe: \"The project name\",\n })\n .demandOption([\"name\", \"cert\", \"key\", \"environment-type\"])\n .example([\n [\n \"$0 mtls-certificate create --name my_cert --cert ./cert.pem --key ./key.pem --environment-type production\",\n \"Create an mTLS certificate enabled for the production environment type\",\n ],\n [\n \"$0 mtls-certificate create --name dev_cert --cert ./cert.pem --key ./key.pem --environment-type development --environment-type preview\",\n \"Create an mTLS certificate enabled for multiple environment types\",\n ],\n [\n \"$0 mtls-certificate create --name my_cert --cert ./cert.pem --key ./key.pem --environment-type production --account my-account --project my-project\",\n \"Explicitly specify the account and project\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo mtls-certificate create\" });\n await create(argv as CreateArguments);\n },\n};\n"]}
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/cmds/mtls-certificates/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAGnE,eAAe;IACb,IAAI,EAAE,8CAA8C;IACpD,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,KAAK,CACJ,oGAAoG,CACrG;aACA,MAAM,CAAC,MAAM,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,6DAA6D;SACxE,CAAC;aACD,MAAM,CAAC,MAAM,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,0CAA0C;SACrD,CAAC;aACD,MAAM,CAAC,KAAK,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,0CAA0C;SACrD,CAAC;aACD,MAAM,CAAC,kBAAkB,EAAE;YAC1B,IAAI,EAAE,OAAO;YACb,QAAQ,EACN,2IAA2I;YAC7I,OAAO,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE,YAAY,CAAC;SAClD,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,wBAAwB;YAClC,MAAM,EAAE,SAAS;SAClB,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,YAAY,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC;aACzD,OAAO,CAAC;YACP;gBACE,2GAA2G;gBAC3G,wEAAwE;aACzE;YACD;gBACE,wIAAwI;gBACxI,mEAAmE;aACpE;YACD;gBACE,qJAAqJ;gBACrJ,4CAA4C;aAC7C;SACF,CAAC;aACD,UAAU,CAAC;YACV,WAAW;YACX,YAAY;YACZ,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,QAAQ;SACT,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,+BAA+B,EAAE,CAAC,CAAC;QACrE,MAAM,MAAM,CAAC,IAAuB,CAAC,CAAC;IACxC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../../common/analytics/lib.js\";\nimport { authenticate } from \"../../common/middleware/authentication.js\";\nimport { fetchAccount } from \"../../common/middleware/get-account-param.js\";\nimport { fetchProject } from \"../../common/middleware/get-project-param.js\";\nimport { configure } from \"../../common/middleware/user-configuration.js\";\nimport { identify } from \"../../common/middleware/user-identification.js\";\nimport setBlocking from \"../../common/output.js\";\nimport { create } from \"../../mtls-certificates/create/handler.js\";\nimport { CreateArguments } from \"../../mtls-certificates/models.js\";\n\nexport default {\n desc: \"Creates a new mTLS certificate for a project\",\n command: \"create\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\n \"$0 mtls-certificates create --name <name> --cert <file> --key <file> --environment <env> [options]\"\n )\n .option(\"name\", {\n type: \"string\",\n describe: \"The name of the certificate (alphanumeric with underscores)\",\n })\n .option(\"cert\", {\n type: \"string\",\n describe: \"Path to the PEM-encoded certificate file\",\n })\n .option(\"key\", {\n type: \"string\",\n describe: \"Path to the PEM-encoded private key file\",\n })\n .option(\"environment-type\", {\n type: \"array\",\n describe:\n \"Environment types where the certificate should be enabled (can be repeated: --environment-type development --environment-type production)\",\n choices: [\"development\", \"preview\", \"production\"],\n })\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"project\", {\n type: \"string\",\n describe: \"The project name\",\n })\n .demandOption([\"name\", \"cert\", \"key\", \"environment-type\"])\n .example([\n [\n \"$0 mtls-certificate create --name my_cert --cert ./cert.pem --key ./key.pem --environment-type production\",\n \"Create an mTLS certificate enabled for the production environment type\",\n ],\n [\n \"$0 mtls-certificate create --name dev_cert --cert ./cert.pem --key ./key.pem --environment-type development --environment-type preview\",\n \"Create an mTLS certificate enabled for multiple environment types\",\n ],\n [\n \"$0 mtls-certificate create --name my_cert --cert ./cert.pem --key ./key.pem --environment-type production --account my-account --project my-project\",\n \"Explicitly specify the account and project\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo mtls-certificate create\" });\n await create(argv as CreateArguments);\n },\n};\n"]}
@@ -1,11 +1,11 @@
1
1
  import { captureEvent } from "../../common/analytics/lib.js";
2
2
  import { authenticate } from "../../common/middleware/authentication.js";
3
+ import { fetchAccount } from "../../common/middleware/get-account-param.js";
4
+ import { fetchProject } from "../../common/middleware/get-project-param.js";
3
5
  import { configure } from "../../common/middleware/user-configuration.js";
4
6
  import { identify } from "../../common/middleware/user-identification.js";
5
7
  import setBlocking from "../../common/output.js";
6
8
  import { deleteCommand } from "../../mtls-certificates/delete/handler.js";
7
- import { fetchAccount } from "../../common/middleware/get-account-param.js";
8
- import { fetchProject } from "../../common/middleware/get-project-param.js";
9
9
  export default {
10
10
  desc: "Deletes an mTLS certificate by ID",
11
11
  command: "delete",
@@ -1 +1 @@
1
- {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../src/cmds/mtls-certificates/delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAE5E,eAAe;IACb,IAAI,EAAE,mCAAmC;IACzC,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,KAAK,CAAC,sDAAsD,CAAC;aAC7D,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,qCAAqC;SAChD,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,wBAAwB;YAClC,MAAM,EAAE,SAAS;SAClB,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC;aACzB,OAAO,CAAC;YACP;gBACE,mDAAmD;gBACnD,4BAA4B;aAC7B;YACD;gBACE,6FAA6F;gBAC7F,4CAA4C;aAC7C;SACF,CAAC;aACD,UAAU,CAAC;YACV,WAAW;YACX,YAAY;YACZ,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,QAAQ;SACT,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,+BAA+B,EAAE,CAAC,CAAC;QACrE,MAAM,aAAa,CAAC,IAAuB,CAAC,CAAC;IAC/C,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../../common/analytics/lib.js\";\nimport { authenticate } from \"../../common/middleware/authentication.js\";\nimport { configure } from \"../../common/middleware/user-configuration.js\";\nimport { identify } from \"../../common/middleware/user-identification.js\";\nimport setBlocking from \"../../common/output.js\";\nimport { deleteCommand } from \"../../mtls-certificates/delete/handler.js\";\nimport { DeleteArguments } from \"../../mtls-certificates/models.js\";\nimport { fetchAccount } from \"../../common/middleware/get-account-param.js\";\nimport { fetchProject } from \"../../common/middleware/get-project-param.js\";\n\nexport default {\n desc: \"Deletes an mTLS certificate by ID\",\n command: \"delete\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 mtls-certificates delete --cert-id <id> [options]\")\n .option(\"cert-id\", {\n type: \"string\",\n describe: \"The ID of the certificate to delete\",\n })\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"project\", {\n type: \"string\",\n describe: \"The project name\",\n })\n .demandOption([\"cert-id\"])\n .example([\n [\n \"$0 mtls-certificates delete --cert-id cert_abc123\",\n \"Delete an mTLS certificate\",\n ],\n [\n \"$0 mtls-certificates delete --cert-id cert_abc123 --account my-account --project my-project\",\n \"Explicitly specify the account and project\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo mtls-certificate delete\" });\n await deleteCommand(argv as DeleteArguments);\n },\n};\n"]}
1
+ {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../src/cmds/mtls-certificates/delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAG1E,eAAe;IACb,IAAI,EAAE,mCAAmC;IACzC,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,KAAK,CAAC,sDAAsD,CAAC;aAC7D,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,qCAAqC;SAChD,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,wBAAwB;YAClC,MAAM,EAAE,SAAS;SAClB,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC;aACzB,OAAO,CAAC;YACP;gBACE,mDAAmD;gBACnD,4BAA4B;aAC7B;YACD;gBACE,6FAA6F;gBAC7F,4CAA4C;aAC7C;SACF,CAAC;aACD,UAAU,CAAC;YACV,WAAW;YACX,YAAY;YACZ,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,QAAQ;SACT,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,+BAA+B,EAAE,CAAC,CAAC;QACrE,MAAM,aAAa,CAAC,IAAuB,CAAC,CAAC;IAC/C,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../../common/analytics/lib.js\";\nimport { authenticate } from \"../../common/middleware/authentication.js\";\nimport { fetchAccount } from \"../../common/middleware/get-account-param.js\";\nimport { fetchProject } from \"../../common/middleware/get-project-param.js\";\nimport { configure } from \"../../common/middleware/user-configuration.js\";\nimport { identify } from \"../../common/middleware/user-identification.js\";\nimport setBlocking from \"../../common/output.js\";\nimport { deleteCommand } from \"../../mtls-certificates/delete/handler.js\";\nimport { DeleteArguments } from \"../../mtls-certificates/models.js\";\n\nexport default {\n desc: \"Deletes an mTLS certificate by ID\",\n command: \"delete\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 mtls-certificates delete --cert-id <id> [options]\")\n .option(\"cert-id\", {\n type: \"string\",\n describe: \"The ID of the certificate to delete\",\n })\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"project\", {\n type: \"string\",\n describe: \"The project name\",\n })\n .demandOption([\"cert-id\"])\n .example([\n [\n \"$0 mtls-certificates delete --cert-id cert_abc123\",\n \"Delete an mTLS certificate\",\n ],\n [\n \"$0 mtls-certificates delete --cert-id cert_abc123 --account my-account --project my-project\",\n \"Explicitly specify the account and project\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo mtls-certificate delete\" });\n await deleteCommand(argv as DeleteArguments);\n },\n};\n"]}
@@ -1,11 +1,11 @@
1
1
  import { captureEvent } from "../../common/analytics/lib.js";
2
2
  import { authenticate } from "../../common/middleware/authentication.js";
3
+ import { fetchAccount } from "../../common/middleware/get-account-param.js";
4
+ import { fetchProject } from "../../common/middleware/get-project-param.js";
3
5
  import { configure } from "../../common/middleware/user-configuration.js";
4
6
  import { identify } from "../../common/middleware/user-identification.js";
5
7
  import setBlocking from "../../common/output.js";
6
8
  import { describe } from "../../mtls-certificates/describe/handler.js";
7
- import { fetchAccount } from "../../common/middleware/get-account-param.js";
8
- import { fetchProject } from "../../common/middleware/get-project-param.js";
9
9
  export default {
10
10
  desc: "Describes an mTLS certificate",
11
11
  command: "describe",
@@ -1 +1 @@
1
- {"version":3,"file":"describe.js","sourceRoot":"","sources":["../../../src/cmds/mtls-certificates/describe.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAE5E,eAAe;IACb,IAAI,EAAE,+BAA+B;IACrC,OAAO,EAAE,UAAU;IACnB,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,KAAK,CAAC,wDAAwD,CAAC;aAC/D,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,uCAAuC;SAClD,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,wBAAwB;YAClC,MAAM,EAAE,SAAS;SAClB,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC;aACzB,OAAO,CAAC;YACP;gBACE,qDAAqD;gBACrD,uCAAuC;aACxC;YACD;gBACE,+FAA+F;gBAC/F,4CAA4C;aAC7C;SACF,CAAC;aACD,UAAU,CAAC;YACV,WAAW;YACX,YAAY;YACZ,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,QAAQ;SACT,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,iCAAiC,EAAE,CAAC,CAAC;QACvE,MAAM,QAAQ,CAAC,IAAyB,CAAC,CAAC;IAC5C,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../../common/analytics/lib.js\";\nimport { authenticate } from \"../../common/middleware/authentication.js\";\nimport { configure } from \"../../common/middleware/user-configuration.js\";\nimport { identify } from \"../../common/middleware/user-identification.js\";\nimport setBlocking from \"../../common/output.js\";\nimport { describe } from \"../../mtls-certificates/describe/handler.js\";\nimport { DescribeArguments } from \"../../mtls-certificates/models.js\";\nimport { fetchAccount } from \"../../common/middleware/get-account-param.js\";\nimport { fetchProject } from \"../../common/middleware/get-project-param.js\";\n\nexport default {\n desc: \"Describes an mTLS certificate\",\n command: \"describe\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 mtls-certificates describe --cert-id <id> [options]\")\n .option(\"cert-id\", {\n type: \"string\",\n describe: \"The ID of the certificate to describe\",\n })\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"project\", {\n type: \"string\",\n describe: \"The project name\",\n })\n .demandOption([\"cert-id\"])\n .example([\n [\n \"$0 mtls-certificates describe --cert-id cert_abc123\",\n \"Get details about an mTLS certificate\",\n ],\n [\n \"$0 mtls-certificates describe --cert-id cert_abc123 --account my-account --project my-project\",\n \"Explicitly specify the account and project\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo mtls-certificate describe\" });\n await describe(argv as DescribeArguments);\n },\n};\n"]}
1
+ {"version":3,"file":"describe.js","sourceRoot":"","sources":["../../../src/cmds/mtls-certificates/describe.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AAGvE,eAAe;IACb,IAAI,EAAE,+BAA+B;IACrC,OAAO,EAAE,UAAU;IACnB,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,KAAK,CAAC,wDAAwD,CAAC;aAC/D,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,uCAAuC;SAClD,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,wBAAwB;YAClC,MAAM,EAAE,SAAS;SAClB,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC;aACzB,OAAO,CAAC;YACP;gBACE,qDAAqD;gBACrD,uCAAuC;aACxC;YACD;gBACE,+FAA+F;gBAC/F,4CAA4C;aAC7C;SACF,CAAC;aACD,UAAU,CAAC;YACV,WAAW;YACX,YAAY;YACZ,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,QAAQ;SACT,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,iCAAiC,EAAE,CAAC,CAAC;QACvE,MAAM,QAAQ,CAAC,IAAyB,CAAC,CAAC;IAC5C,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../../common/analytics/lib.js\";\nimport { authenticate } from \"../../common/middleware/authentication.js\";\nimport { fetchAccount } from \"../../common/middleware/get-account-param.js\";\nimport { fetchProject } from \"../../common/middleware/get-project-param.js\";\nimport { configure } from \"../../common/middleware/user-configuration.js\";\nimport { identify } from \"../../common/middleware/user-identification.js\";\nimport setBlocking from \"../../common/output.js\";\nimport { describe } from \"../../mtls-certificates/describe/handler.js\";\nimport { DescribeArguments } from \"../../mtls-certificates/models.js\";\n\nexport default {\n desc: \"Describes an mTLS certificate\",\n command: \"describe\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 mtls-certificates describe --cert-id <id> [options]\")\n .option(\"cert-id\", {\n type: \"string\",\n describe: \"The ID of the certificate to describe\",\n })\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"project\", {\n type: \"string\",\n describe: \"The project name\",\n })\n .demandOption([\"cert-id\"])\n .example([\n [\n \"$0 mtls-certificates describe --cert-id cert_abc123\",\n \"Get details about an mTLS certificate\",\n ],\n [\n \"$0 mtls-certificates describe --cert-id cert_abc123 --account my-account --project my-project\",\n \"Explicitly specify the account and project\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo mtls-certificate describe\" });\n await describe(argv as DescribeArguments);\n },\n};\n"]}
@@ -1,11 +1,11 @@
1
1
  import { captureEvent } from "../../common/analytics/lib.js";
2
2
  import { authenticate } from "../../common/middleware/authentication.js";
3
+ import { fetchAccount } from "../../common/middleware/get-account-param.js";
4
+ import { fetchProject } from "../../common/middleware/get-project-param.js";
3
5
  import { configure } from "../../common/middleware/user-configuration.js";
4
6
  import { identify } from "../../common/middleware/user-identification.js";
5
7
  import setBlocking from "../../common/output.js";
6
8
  import { disable } from "../../mtls-certificates/disable/handler.js";
7
- import { fetchAccount } from "../../common/middleware/get-account-param.js";
8
- import { fetchProject } from "../../common/middleware/get-project-param.js";
9
9
  export default {
10
10
  desc: "Disables an mTLS certificate for all environment types",
11
11
  command: "disable",
@@ -1 +1 @@
1
- {"version":3,"file":"disable.js","sourceRoot":"","sources":["../../../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SACT,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,gCAAgC,EAAE,CAAC,CAAC;QACtE,MAAM,OAAO,CAAC,IAAwB,CAAC,CAAC;IAC1C,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../../common/analytics/lib.js\";\nimport { authenticate } from \"../../common/middleware/authentication.js\";\nimport { configure } from \"../../common/middleware/user-configuration.js\";\nimport { identify } from \"../../common/middleware/user-identification.js\";\nimport setBlocking from \"../../common/output.js\";\nimport { disable } from \"../../mtls-certificates/disable/handler.js\";\nimport { DisableArguments } from \"../../mtls-certificates/models.js\";\nimport { fetchAccount } from \"../../common/middleware/get-account-param.js\";\nimport { fetchProject } from \"../../common/middleware/get-project-param.js\";\n\nexport default {\n desc: \"Disables an mTLS certificate for all environment types\",\n command: \"disable\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 mtls-certificates disable --cert-id <id> [options]\")\n .option(\"cert-id\", {\n type: \"string\",\n describe: \"The ID of the certificate to disable\",\n })\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"project\", {\n type: \"string\",\n describe: \"The project name\",\n })\n .demandOption([\"cert-id\"])\n .example([\n [\n \"$0 mtls-certificate disable --cert-id cert_abc123\",\n \"Disable certificate for all environment types\",\n ],\n [\n \"$0 mtls-certificate disable --cert-id cert_abc123 --account my-account --project my-project\",\n \"Explicitly specify the account and project\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo mtls-certificate disable\" });\n await disable(argv as DisableArguments);\n },\n};\n"]}
1
+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AS;YACT,YAAY;YACZ,YAAY;YACZ,QAAQ;SACT,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,gCAAgC,EAAE,CAAC,CAAC;QACtE,MAAM,OAAO,CAAC,IAAwB,CAAC,CAAC;IAC1C,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../../common/analytics/lib.js\";\nimport { authenticate } from \"../../common/middleware/authentication.js\";\nimport { fetchAccount } from \"../../common/middleware/get-account-param.js\";\nimport { fetchProject } from \"../../common/middleware/get-project-param.js\";\nimport { configure } from \"../../common/middleware/user-configuration.js\";\nimport { identify } from \"../../common/middleware/user-identification.js\";\nimport setBlocking from \"../../common/output.js\";\nimport { disable } from \"../../mtls-certificates/disable/handler.js\";\nimport { DisableArguments } from \"../../mtls-certificates/models.js\";\n\nexport default {\n desc: \"Disables an mTLS certificate for all environment types\",\n command: \"disable\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 mtls-certificates disable --cert-id <id> [options]\")\n .option(\"cert-id\", {\n type: \"string\",\n describe: \"The ID of the certificate to disable\",\n })\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"project\", {\n type: \"string\",\n describe: \"The project name\",\n })\n .demandOption([\"cert-id\"])\n .example([\n [\n \"$0 mtls-certificate disable --cert-id cert_abc123\",\n \"Disable certificate for all environment types\",\n ],\n [\n \"$0 mtls-certificate disable --cert-id cert_abc123 --account my-account --project my-project\",\n \"Explicitly specify the account and project\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo mtls-certificate disable\" });\n await disable(argv as DisableArguments);\n },\n};\n"]}
@@ -1,11 +1,11 @@
1
1
  import { captureEvent } from "../../common/analytics/lib.js";
2
2
  import { authenticate } from "../../common/middleware/authentication.js";
3
+ import { fetchAccount } from "../../common/middleware/get-account-param.js";
4
+ import { fetchProject } from "../../common/middleware/get-project-param.js";
3
5
  import { configure } from "../../common/middleware/user-configuration.js";
4
6
  import { identify } from "../../common/middleware/user-identification.js";
5
7
  import setBlocking from "../../common/output.js";
6
8
  import { list } from "../../mtls-certificates/list/handler.js";
7
- import { fetchAccount } from "../../common/middleware/get-account-param.js";
8
- import { fetchProject } from "../../common/middleware/get-project-param.js";
9
9
  export default {
10
10
  desc: "Lists all mTLS certificates for a project",
11
11
  command: "list",
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/cmds/mtls-certificates/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,yCAAyC,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAE5E,eAAe;IACb,IAAI,EAAE,2CAA2C;IACjD,OAAO,EAAE,MAAM;IACf,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,KAAK,CAAC,qCAAqC,CAAC;aAC5C,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,wBAAwB;YAClC,MAAM,EAAE,SAAS;SAClB,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,OAAO,CAAC;YACP;gBACE,2BAA2B;gBAC3B,6CAA6C;aAC9C;YACD;gBACE,qEAAqE;gBACrE,4CAA4C;aAC7C;SACF,CAAC;aACD,UAAU,CAAC;YACV,WAAW;YACX,YAAY;YACZ,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,QAAQ;SACT,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,6BAA6B,EAAE,CAAC,CAAC;QACnE,MAAM,IAAI,CAAC,IAAqB,CAAC,CAAC;IACpC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../../common/analytics/lib.js\";\nimport { authenticate } from \"../../common/middleware/authentication.js\";\nimport { configure } from \"../../common/middleware/user-configuration.js\";\nimport { identify } from \"../../common/middleware/user-identification.js\";\nimport setBlocking from \"../../common/output.js\";\nimport { list } from \"../../mtls-certificates/list/handler.js\";\nimport { ListArguments } from \"../../mtls-certificates/models.js\";\nimport { fetchAccount } from \"../../common/middleware/get-account-param.js\";\nimport { fetchProject } from \"../../common/middleware/get-project-param.js\";\n\nexport default {\n desc: \"Lists all mTLS certificates for a project\",\n command: \"list\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 mtls-certificates list [options]\")\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"project\", {\n type: \"string\",\n describe: \"The project name\",\n })\n .example([\n [\n \"$0 mtls-certificates list\",\n \"List all mTLS certificates for your project\",\n ],\n [\n \"$0 mtls-certificates list --account my-account --project my-project\",\n \"Explicitly specify the account and project\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo mtls-certificate list\" });\n await list(argv as ListArguments);\n },\n};\n"]}
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/cmds/mtls-certificates/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,yCAAyC,CAAC;AAG/D,eAAe;IACb,IAAI,EAAE,2CAA2C;IACjD,OAAO,EAAE,MAAM;IACf,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,KAAK,CAAC,qCAAqC,CAAC;aAC5C,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,wBAAwB;YAClC,MAAM,EAAE,SAAS;SAClB,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,OAAO,CAAC;YACP;gBACE,2BAA2B;gBAC3B,6CAA6C;aAC9C;YACD;gBACE,qEAAqE;gBACrE,4CAA4C;aAC7C;SACF,CAAC;aACD,UAAU,CAAC;YACV,WAAW;YACX,YAAY;YACZ,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,QAAQ;SACT,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,6BAA6B,EAAE,CAAC,CAAC;QACnE,MAAM,IAAI,CAAC,IAAqB,CAAC,CAAC;IACpC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../../common/analytics/lib.js\";\nimport { authenticate } from \"../../common/middleware/authentication.js\";\nimport { fetchAccount } from \"../../common/middleware/get-account-param.js\";\nimport { fetchProject } from \"../../common/middleware/get-project-param.js\";\nimport { configure } from \"../../common/middleware/user-configuration.js\";\nimport { identify } from \"../../common/middleware/user-identification.js\";\nimport setBlocking from \"../../common/output.js\";\nimport { list } from \"../../mtls-certificates/list/handler.js\";\nimport { ListArguments } from \"../../mtls-certificates/models.js\";\n\nexport default {\n desc: \"Lists all mTLS certificates for a project\",\n command: \"list\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 mtls-certificates list [options]\")\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"project\", {\n type: \"string\",\n describe: \"The project name\",\n })\n .example([\n [\n \"$0 mtls-certificates list\",\n \"List all mTLS certificates for your project\",\n ],\n [\n \"$0 mtls-certificates list --account my-account --project my-project\",\n \"Explicitly specify the account and project\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo mtls-certificate list\" });\n await list(argv as ListArguments);\n },\n};\n"]}
@@ -1,11 +1,11 @@
1
1
  import { captureEvent } from "../../common/analytics/lib.js";
2
2
  import { authenticate } from "../../common/middleware/authentication.js";
3
+ import { fetchAccount } from "../../common/middleware/get-account-param.js";
4
+ import { fetchProject } from "../../common/middleware/get-project-param.js";
3
5
  import { configure } from "../../common/middleware/user-configuration.js";
4
6
  import { identify } from "../../common/middleware/user-identification.js";
5
7
  import setBlocking from "../../common/output.js";
6
8
  import { update } from "../../mtls-certificates/update/handler.js";
7
- import { fetchAccount } from "../../common/middleware/get-account-param.js";
8
- import { fetchProject } from "../../common/middleware/get-project-param.js";
9
9
  export default {
10
10
  desc: "Updates the environment settings for an mTLS certificate",
11
11
  command: "update",
@@ -1 +1 @@
1
- {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/cmds/mtls-certificates/update.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAE5E,eAAe;IACb,IAAI,EAAE,0DAA0D;IAChE,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,KAAK,CACJ,0EAA0E,CAC3E;aACA,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,qCAAqC;SAChD,CAAC;aACD,MAAM,CAAC,kBAAkB,EAAE;YAC1B,IAAI,EAAE,OAAO;YACb,QAAQ,EACN,2IAA2I;YAC7I,OAAO,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE,YAAY,CAAC;SAClD,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,wBAAwB;YAClC,MAAM,EAAE,SAAS;SAClB,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,YAAY,CAAC,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;aAC7C,OAAO,CAAC;YACP;gBACE,gFAAgF;gBAChF,uEAAuE;aACxE;YACD;gBACE,0IAA0I;gBAC1I,4DAA4D;aAC7D;YACD;gBACE,2HAA2H;gBAC3H,4CAA4C;aAC7C;SACF,CAAC;aACD,UAAU,CAAC;YACV,WAAW;YACX,YAAY;YACZ,SAAS;YACT,YAAY;YACZ,YAAY;YACZ,QAAQ;SACT,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,+BAA+B,EAAE,CAAC,CAAC;QACrE,MAAM,MAAM,CAAC,IAAuB,CAAC,CAAC;IACxC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../../common/analytics/lib.js\";\nimport { authenticate } from \"../../common/middleware/authentication.js\";\nimport { configure } from \"../../common/middleware/user-configuration.js\";\nimport { identify } from \"../../common/middleware/user-identification.js\";\nimport setBlocking from \"../../common/output.js\";\nimport { update } from \"../../mtls-certificates/update/handler.js\";\nimport { UpdateArguments } from \"../../mtls-certificates/models.js\";\nimport { fetchAccount } from \"../../common/middleware/get-account-param.js\";\nimport { fetchProject } from \"../../common/middleware/get-project-param.js\";\n\nexport default {\n desc: \"Updates the environment settings for an mTLS certificate\",\n command: \"update\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\n \"$0 mtls-certificates update --cert-id <id> --environment <env> [options]\"\n )\n .option(\"cert-id\", {\n type: \"string\",\n describe: \"The ID of the certificate to update\",\n })\n .option(\"environment-type\", {\n type: \"array\",\n describe:\n \"Environment types where the certificate should be enabled (can be repeated: --environment-type development --environment-type production)\",\n choices: [\"development\", \"preview\", \"production\"],\n })\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"project\", {\n type: \"string\",\n describe: \"The project name\",\n })\n .demandOption([\"cert-id\", \"environment-type\"])\n .example([\n [\n \"$0 mtls-certificate update --cert-id cert_abc123 --environment-type production\",\n \"Update certificate to be enabled only for production environment type\",\n ],\n [\n \"$0 mtls-certificate update --cert-id cert_abc123 --environment-type development --environment-type preview --environment-type production\",\n \"Update certificate to be enabled for all environment types\",\n ],\n [\n \"$0 mtls-certificate update --cert-id cert_abc123 --environment-type development --account my-account --project my-project\",\n \"Explicitly specify the account and project\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo mtls-certificate update\" });\n await update(argv as UpdateArguments);\n },\n};\n"]}
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/cmds/mtls-certificates/update.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;A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IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,+BAA+B,EAAE,CAAC,CAAC;QACrE,MAAM,MAAM,CAAC,IAAuB,CAAC,CAAC;IACxC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../../common/analytics/lib.js\";\nimport { authenticate } from \"../../common/middleware/authentication.js\";\nimport { fetchAccount } from \"../../common/middleware/get-account-param.js\";\nimport { fetchProject } from \"../../common/middleware/get-project-param.js\";\nimport { configure } from \"../../common/middleware/user-configuration.js\";\nimport { identify } from \"../../common/middleware/user-identification.js\";\nimport setBlocking from \"../../common/output.js\";\nimport { UpdateArguments } from \"../../mtls-certificates/models.js\";\nimport { update } from \"../../mtls-certificates/update/handler.js\";\n\nexport default {\n desc: \"Updates the environment settings for an mTLS certificate\",\n command: \"update\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\n \"$0 mtls-certificates update --cert-id <id> --environment <env> [options]\"\n )\n .option(\"cert-id\", {\n type: \"string\",\n describe: \"The ID of the certificate to update\",\n })\n .option(\"environment-type\", {\n type: \"array\",\n describe:\n \"Environment types where the certificate should be enabled (can be repeated: --environment-type development --environment-type production)\",\n choices: [\"development\", \"preview\", \"production\"],\n })\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .option(\"account\", {\n type: \"string\",\n describe: \"The account name\",\n })\n .option(\"project\", {\n type: \"string\",\n describe: \"The project name\",\n })\n .demandOption([\"cert-id\", \"environment-type\"])\n .example([\n [\n \"$0 mtls-certificate update --cert-id cert_abc123 --environment-type production\",\n \"Update certificate to be enabled only for production environment type\",\n ],\n [\n \"$0 mtls-certificate update --cert-id cert_abc123 --environment-type development --environment-type preview --environment-type production\",\n \"Update certificate to be enabled for all environment types\",\n ],\n [\n \"$0 mtls-certificate update --cert-id cert_abc123 --environment-type development --account my-account --project my-project\",\n \"Explicitly specify the account and project\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n fetchProject,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo mtls-certificate update\" });\n await update(argv as UpdateArguments);\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/cmds/project/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAYV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBA+Bf,OAAO;;AAlC/B,wBAwDE"}
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/cmds/project/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAWV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBA+Bf,OAAO;;AAlC/B,wBAwDE"}
@@ -1,11 +1,11 @@
1
+ import { input } from "@inquirer/prompts";
1
2
  import { captureEvent } from "../../common/analytics/lib.js";
2
3
  import { authenticate } from "../../common/middleware/authentication.js";
4
+ import { fetchAccount } from "../../common/middleware/get-account-param.js";
5
+ import { configure } from "../../common/middleware/user-configuration.js";
3
6
  import { identify } from "../../common/middleware/user-identification.js";
4
7
  import setBlocking from "../../common/output.js";
5
8
  import { create } from "../../project/create/handler.js";
6
- import { configure } from "../../common/middleware/user-configuration.js";
7
- import { fetchAccount } from "../../common/middleware/get-account-param.js";
8
- import { input } from "@inquirer/prompts";
9
9
  export default {
10
10
  desc: "Creates a new project in your account",
11
11
  command: "create",
@@ -1 +1 @@
1
- {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/cmds/project/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAA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BACtB,OAAO,EAAE,0BAA0B;aACpC,CAAC,CAAC;YACH,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CACb,gEAAgE,CACjE,CAAC;YACJ,CAAC;QACH,CAAC;QAED,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAAC,CAAC;QAC5D,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../../common/analytics/lib.js\";\nimport { authenticate } from \"../../common/middleware/authentication.js\";\nimport { identify } from \"../../common/middleware/user-identification.js\";\nimport setBlocking from \"../../common/output.js\";\nimport { Arguments, create } from \"../../project/create/handler.js\";\nimport { configure } from \"../../common/middleware/user-configuration.js\";\nimport { fetchAccount } from \"../../common/middleware/get-account-param.js\";\nimport { input } from \"@inquirer/prompts\";\nexport default {\n desc: \"Creates a new project in your account\",\n command: \"create\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 project create [--name <name>] [options]\")\n .option(\"name\", {\n type: \"string\",\n describe: \"The name of the project to create\",\n })\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .example([\n [\n \"$0 project create --name my-api-project\",\n \"Create a new project with the specified name\",\n ],\n [\"$0 project create\", \"Create a new project (will prompt for name)\"],\n [\n \"$0 project create --name my-project --account my-account\",\n \"Explicitly specify the account\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n if (!argv || typeof argv !== \"object\") {\n throw new Error(\n \"Invalid state: name is not set. Please provide a project name.\"\n );\n }\n\n const args = argv as Arguments;\n if (!args.name) {\n args.name = await input({\n message: \"Enter the project name: \",\n });\n if (!args.name) {\n throw new Error(\n \"Invalid state: name is not set. Please provide a project name.\"\n );\n }\n }\n\n await captureEvent({ argv, event: \"zuplo project create\" });\n await create(args);\n },\n};\n"]}
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/cmds/project/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAa,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACpE,eAAe;IACb,IAAI,EAAE,uCAAuC;IAC7C,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,KAAK,CAAC,6CAA6C,CAAC;aACpD,MAAM,CAAC,MAAM,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,mCAAmC;SAC9C,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,wBAAwB;YAClC,MAAM,EAAE,SAAS;SAClB,CAAC;aACD,OAAO,CAAC;YACP;gBACE,yCAAyC;gBACzC,8CAA8C;aAC/C;YACD,CAAC,mBAAmB,EAAE,6CAA6C,CAAC;YACpE;gBACE,0DAA0D;gBAC1D,gCAAgC;aACjC;SACF,CAAC;aACD,UAAU,CAAC;YACV,WAAW;YACX,YAAY;YACZ,SAAS;YACT,YAAY;YACZ,QAAQ;SACT,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CACb,gEAAgE,CACjE,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,GAAG,IAAiB,CAAC;QAC/B,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACf,IAAI,CAAC,IAAI,GAAG,MAAM,KAAK,CAAC;gBACtB,OAAO,EAAE,0BAA0B;aACpC,CAAC,CAAC;YACH,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CACb,gEAAgE,CACjE,CAAC;YACJ,CAAC;QACH,CAAC;QAED,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAAC,CAAC;QAC5D,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;CACF,CAAC","sourcesContent":["import { input } from \"@inquirer/prompts\";\nimport { Argv } from \"yargs\";\nimport { captureEvent } from \"../../common/analytics/lib.js\";\nimport { authenticate } from \"../../common/middleware/authentication.js\";\nimport { fetchAccount } from \"../../common/middleware/get-account-param.js\";\nimport { configure } from \"../../common/middleware/user-configuration.js\";\nimport { identify } from \"../../common/middleware/user-identification.js\";\nimport setBlocking from \"../../common/output.js\";\nimport { Arguments, create } from \"../../project/create/handler.js\";\nexport default {\n desc: \"Creates a new project in your account\",\n command: \"create\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .usage(\"$0 project create [--name <name>] [options]\")\n .option(\"name\", {\n type: \"string\",\n describe: \"The name of the project to create\",\n })\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .example([\n [\n \"$0 project create --name my-api-project\",\n \"Create a new project with the specified name\",\n ],\n [\"$0 project create\", \"Create a new project (will prompt for name)\"],\n [\n \"$0 project create --name my-project --account my-account\",\n \"Explicitly specify the account\",\n ],\n ])\n .middleware([\n setBlocking,\n authenticate,\n configure,\n fetchAccount,\n identify,\n ]);\n },\n handler: async (argv: unknown) => {\n if (!argv || typeof argv !== \"object\") {\n throw new Error(\n \"Invalid state: name is not set. Please provide a project name.\"\n );\n }\n\n const args = argv as Arguments;\n if (!args.name) {\n args.name = await input({\n message: \"Enter the project name: \",\n });\n if (!args.name) {\n throw new Error(\n \"Invalid state: name is not set. Please provide a project name.\"\n );\n }\n }\n\n await captureEvent({ argv, event: \"zuplo project create\" });\n await create(args);\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../src/cmds/source/migrate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAiB,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAOvD,QAAA,MAAM,QAAQ;;;;;CAiDW,CAAC;AAE1B,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../src/cmds/source/migrate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAiB,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAMvD,QAAA,MAAM,QAAQ;;;;;CAiDW,CAAC;AAE1B,eAAe,QAAQ,CAAC"}
@@ -1,7 +1,7 @@
1
+ import { captureEvent } from "../../common/analytics/lib.js";
1
2
  import { groupHandler } from "../../common/handler.js";
2
- import setBlocking from "../../common/output.js";
3
3
  import { identify } from "../../common/middleware/user-identification.js";
4
- import { captureEvent } from "../../common/analytics/lib.js";
4
+ import setBlocking from "../../common/output.js";
5
5
  import { migrateDevPortal } from "../../source/migrate/dev-portal/handler.js";
6
6
  const commands = {
7
7
  describe: "Migration commands",