@zuplo/cli 6.62.15 → 6.62.17

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 (97) hide show
  1. package/dist/cli.js +2 -2
  2. package/dist/cli.js.map +1 -1
  3. package/dist/cmds/compile.d.ts +1 -0
  4. package/dist/cmds/compile.d.ts.map +1 -1
  5. package/dist/cmds/compile.js +1 -0
  6. package/dist/cmds/compile.js.map +1 -1
  7. package/dist/cmds/delete.d.ts.map +1 -1
  8. package/dist/cmds/delete.js +14 -0
  9. package/dist/cmds/delete.js.map +1 -1
  10. package/dist/cmds/deploy.d.ts.map +1 -1
  11. package/dist/cmds/deploy.js +22 -0
  12. package/dist/cmds/deploy.js.map +1 -1
  13. package/dist/cmds/dev.d.ts.map +1 -1
  14. package/dist/cmds/dev.js +15 -0
  15. package/dist/cmds/dev.js.map +1 -1
  16. package/dist/cmds/link.d.ts.map +1 -1
  17. package/dist/cmds/link.js +19 -1
  18. package/dist/cmds/link.js.map +1 -1
  19. package/dist/cmds/list.d.ts.map +1 -1
  20. package/dist/cmds/list.js +15 -1
  21. package/dist/cmds/list.js.map +1 -1
  22. package/dist/cmds/{convert.d.ts → mtls-certificates/create.d.ts} +1 -1
  23. package/dist/cmds/mtls-certificates/create.d.ts.map +1 -0
  24. package/dist/cmds/mtls-certificates/create.js +59 -0
  25. package/dist/cmds/mtls-certificates/create.js.map +1 -0
  26. package/dist/cmds/mtls-certificates/delete.d.ts +9 -0
  27. package/dist/cmds/mtls-certificates/delete.d.ts.map +1 -0
  28. package/dist/cmds/mtls-certificates/delete.js +46 -0
  29. package/dist/cmds/mtls-certificates/delete.js.map +1 -0
  30. package/dist/cmds/mtls-certificates/describe.d.ts +9 -0
  31. package/dist/cmds/mtls-certificates/describe.d.ts.map +1 -0
  32. package/dist/cmds/mtls-certificates/describe.js +46 -0
  33. package/dist/cmds/mtls-certificates/describe.js.map +1 -0
  34. package/dist/cmds/mtls-certificates/index.d.ts +4 -0
  35. package/dist/cmds/mtls-certificates/index.d.ts.map +1 -0
  36. package/dist/cmds/mtls-certificates/index.js +22 -0
  37. package/dist/cmds/mtls-certificates/index.js.map +1 -0
  38. package/dist/cmds/mtls-certificates/list.d.ts +9 -0
  39. package/dist/cmds/mtls-certificates/list.d.ts.map +1 -0
  40. package/dist/cmds/mtls-certificates/list.js +41 -0
  41. package/dist/cmds/mtls-certificates/list.js.map +1 -0
  42. package/dist/cmds/mtls-certificates/update.d.ts +9 -0
  43. package/dist/cmds/mtls-certificates/update.d.ts.map +1 -0
  44. package/dist/cmds/mtls-certificates/update.js +51 -0
  45. package/dist/cmds/mtls-certificates/update.js.map +1 -0
  46. package/dist/cmds/test.d.ts.map +1 -1
  47. package/dist/cmds/test.js +18 -0
  48. package/dist/cmds/test.js.map +1 -1
  49. package/dist/list/handler.js +2 -2
  50. package/dist/list/handler.js.map +1 -1
  51. package/dist/mtls-certificates/create/handler.d.ts +3 -0
  52. package/dist/mtls-certificates/create/handler.d.ts.map +1 -0
  53. package/dist/mtls-certificates/create/handler.js +52 -0
  54. package/dist/mtls-certificates/create/handler.js.map +1 -0
  55. package/dist/mtls-certificates/delete/handler.d.ts +3 -0
  56. package/dist/mtls-certificates/delete/handler.d.ts.map +1 -0
  57. package/dist/mtls-certificates/delete/handler.js +26 -0
  58. package/dist/mtls-certificates/delete/handler.js.map +1 -0
  59. package/dist/mtls-certificates/describe/handler.d.ts +3 -0
  60. package/dist/mtls-certificates/describe/handler.d.ts.map +1 -0
  61. package/dist/mtls-certificates/describe/handler.js +37 -0
  62. package/dist/mtls-certificates/describe/handler.js.map +1 -0
  63. package/dist/mtls-certificates/list/handler.d.ts +3 -0
  64. package/dist/mtls-certificates/list/handler.d.ts.map +1 -0
  65. package/dist/mtls-certificates/list/handler.js +43 -0
  66. package/dist/mtls-certificates/list/handler.js.map +1 -0
  67. package/dist/mtls-certificates/models.d.ts +59 -0
  68. package/dist/mtls-certificates/models.d.ts.map +1 -0
  69. package/dist/mtls-certificates/models.js +2 -0
  70. package/dist/mtls-certificates/models.js.map +1 -0
  71. package/dist/mtls-certificates/update/handler.d.ts +3 -0
  72. package/dist/mtls-certificates/update/handler.d.ts.map +1 -0
  73. package/dist/mtls-certificates/update/handler.js +36 -0
  74. package/dist/mtls-certificates/update/handler.js.map +1 -0
  75. package/dist/source/migrate/dev-portal/handler.js +1 -0
  76. package/dist/source/migrate/dev-portal/handler.js.map +1 -1
  77. package/dist/tsconfig.tsbuildinfo +1 -1
  78. package/package.json +4 -4
  79. package/dist/__tests__/engine.test.d.ts +0 -2
  80. package/dist/__tests__/engine.test.d.ts.map +0 -1
  81. package/dist/__tests__/engine.test.js +0 -299
  82. package/dist/__tests__/engine.test.js.map +0 -1
  83. package/dist/cmds/convert.d.ts.map +0 -1
  84. package/dist/cmds/convert.js +0 -24
  85. package/dist/cmds/convert.js.map +0 -1
  86. package/dist/convert/engine.d.ts +0 -14
  87. package/dist/convert/engine.d.ts.map +0 -1
  88. package/dist/convert/engine.js +0 -73
  89. package/dist/convert/engine.js.map +0 -1
  90. package/dist/convert/handler.d.ts +0 -5
  91. package/dist/convert/handler.d.ts.map +0 -1
  92. package/dist/convert/handler.js +0 -35
  93. package/dist/convert/handler.js.map +0 -1
  94. package/dist/convert/routes.legacy.d.ts +0 -88
  95. package/dist/convert/routes.legacy.d.ts.map +0 -1
  96. package/dist/convert/routes.legacy.js +0 -2
  97. package/dist/convert/routes.legacy.js.map +0 -1
package/dist/cli.js CHANGED
@@ -11,7 +11,6 @@ import { hideBin } from "yargs/helpers";
11
11
  import yargs from "yargs/yargs";
12
12
  import build from "./cmds/build.js";
13
13
  import compile from "./cmds/compile.js";
14
- import convert from "./cmds/convert.js";
15
14
  import deleteZup from "./cmds/delete.js";
16
15
  import deploy from "./cmds/deploy.js";
17
16
  import dev from "./cmds/dev.js";
@@ -19,6 +18,7 @@ import editor from "./cmds/editor.js";
19
18
  import link from "./cmds/link.js";
20
19
  import list from "./cmds/list.js";
21
20
  import login from "./cmds/login.js";
21
+ import mtlsCertificates from "./cmds/mtls-certificates/index.js";
22
22
  import oas from "./cmds/open-api/index.js";
23
23
  import project from "./cmds/project/index.js";
24
24
  import proxies from "./cmds/proxies/index.js";
@@ -83,7 +83,6 @@ if (gte(process.versions.node, MIN_NODE_VERSION)) {
83
83
  })
84
84
  .middleware(logLevel)
85
85
  .command(compile)
86
- .command(convert)
87
86
  .command(deleteZup)
88
87
  .command(deploy)
89
88
  .command(dev)
@@ -93,6 +92,7 @@ if (gte(process.versions.node, MIN_NODE_VERSION)) {
93
92
  .command(login)
94
93
  .command(test)
95
94
  .command(oas)
95
+ .command(mtlsCertificates)
96
96
  .command(project)
97
97
  .command(source)
98
98
  .command(tunnel)
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,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,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;AAC7B,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,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,SAAS,MAAM,kBAAkB,CAAC;AACzC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAA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AI,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 os from \"node:os\";\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 convert from \"./cmds/convert.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 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 {\n printCriticalFailureToConsoleAndExit,\n printWarningToConsole,\n} 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 if (os.platform() === \"win32\") {\n printWarningToConsole(\n \"Running the Zuplo CLI on Windows is currently in beta. Please report any issues to support@zuplo.com.\"\n );\n }\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(convert)\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(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;AACjC,MA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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 os from \"node:os\";\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 {\n printCriticalFailureToConsoleAndExit,\n printWarningToConsole,\n} 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 if (os.platform() === \"win32\") {\n printWarningToConsole(\n \"Running the Zuplo CLI on Windows is currently in beta. Please report any issues to support@zuplo.com.\"\n );\n }\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,6 +1,7 @@
1
1
  import { Argv } from "yargs";
2
2
  declare const _default: {
3
3
  desc: boolean;
4
+ hide: boolean;
4
5
  command: string;
5
6
  builder: (yargs: Argv) => Argv<unknown>;
6
7
  handler: (argv: unknown) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/cmds/compile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAaV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBA2Cf,OAAO;;AAhD/B,wBAoDE"}
1
+ {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/cmds/compile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;;qBAcV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBA2Cf,OAAO;;AAjD/B,wBAqDE"}
@@ -6,6 +6,7 @@ import { YargsChecker } from "../common/validators/lib.js";
6
6
  import { compile } from "../compile/handler.js";
7
7
  export default {
8
8
  desc: false,
9
+ hide: true,
9
10
  command: "compile",
10
11
  builder: (yargs) => {
11
12
  return yargs
@@ -1 +1 @@
1
- {"version":3,"file":"compile.js","sourceRoot":"","sources":["../../src/cmds/compile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAa,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAE3D,eAAe;IAEb,IAAI,EAAE,KAAK;IAEX,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,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,aAAa,EAAE;YACrB,IAAI,EAAE,QAAQ;YACd,QAAQ,EACN,yFAAyF;YAC3F,MAAM,EAAE,IAAI;SACb,CAAC;aACD,MAAM,CAAC,MAAM,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,yCAAyC;YACnD,OAAO,EAAE,IAAI;SACd,CAAC;aACD,MAAM,CAAC,aAAa,EAAE;YACrB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,wBAAwB;YAClC,OAAO,EAAE,cAAc;SACxB,CAAC;aACD,MAAM,CAAC,UAAU,EAAE;YAClB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,sCAAsC;YAChD,OAAO,EAAE,EAAE;YACX,MAAM,EAAE,IAAI;SACb,CAAC;aACD,UAAU,CAAC,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;aACnC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YACpB,IAAI,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;gBAExB,OAAO,IAAI,CAAC;YACd,CAAC;iBAAM,CAAC;gBACN,OAAO,MAAM,IAAI,YAAY,CAC3B,IAAI,qBAAqB,EAAE,CAC5B,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAChB,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC;QACrD,MAAM,OAAO,CAAC,IAAiB,CAAC,CAAC;IACnC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../common/analytics/lib.js\";\nimport { identify } from \"../common/middleware/user-identification.js\";\nimport setBlocking from \"../common/output.js\";\nimport { ZuploProjectValidator } from \"../common/validators/file-system-validator.js\";\nimport { YargsChecker } from \"../common/validators/lib.js\";\nimport { Arguments, compile } from \"../compile/handler.js\";\n\nexport default {\n // For now, hide this command\n desc: false,\n // desc: \"Compiles a self-contained Zuplo API binary\",\n command: \"compile\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\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(\"bundled-dir\", {\n type: \"string\",\n describe:\n \"The directory representing a built Zuplo API's sources. Use to skip build and bundling.\",\n hidden: true,\n })\n .option(\"port\", {\n type: \"number\",\n describe: \"The port to run the Zuplo API server on\",\n default: 9000,\n })\n .option(\"binary-name\", {\n type: \"string\",\n describe: \"The name of the binary\",\n default: \"compiled-zup\",\n })\n .option(\"build-id\", {\n type: \"string\",\n describe: \"The buildId to use for remote assets\",\n default: \"\",\n hidden: true,\n })\n .middleware([setBlocking, identify])\n .check(async (argv) => {\n if (argv[\"bundled-dir\"]) {\n // By pass the checks because the user already has a bundled-script\n return true;\n } else {\n return await new YargsChecker<typeof argv>(\n new ZuploProjectValidator()\n ).check(argv);\n }\n });\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo compile\" });\n await compile(argv as Arguments);\n },\n};\n"]}
1
+ {"version":3,"file":"compile.js","sourceRoot":"","sources":["../../src/cmds/compile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAa,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAE3D,eAAe;IAEb,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,IAAI;IAEV,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,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,aAAa,EAAE;YACrB,IAAI,EAAE,QAAQ;YACd,QAAQ,EACN,yFAAyF;YAC3F,MAAM,EAAE,IAAI;SACb,CAAC;aACD,MAAM,CAAC,MAAM,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,yCAAyC;YACnD,OAAO,EAAE,IAAI;SACd,CAAC;aACD,MAAM,CAAC,aAAa,EAAE;YACrB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,wBAAwB;YAClC,OAAO,EAAE,cAAc;SACxB,CAAC;aACD,MAAM,CAAC,UAAU,EAAE;YAClB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,sCAAsC;YAChD,OAAO,EAAE,EAAE;YACX,MAAM,EAAE,IAAI;SACb,CAAC;aACD,UAAU,CAAC,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;aACnC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YACpB,IAAI,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;gBAExB,OAAO,IAAI,CAAC;YACd,CAAC;iBAAM,CAAC;gBACN,OAAO,MAAM,IAAI,YAAY,CAC3B,IAAI,qBAAqB,EAAE,CAC5B,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAChB,CAAC;QACH,CAAC,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC;QACrD,MAAM,OAAO,CAAC,IAAiB,CAAC,CAAC;IACnC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../common/analytics/lib.js\";\nimport { identify } from \"../common/middleware/user-identification.js\";\nimport setBlocking from \"../common/output.js\";\nimport { ZuploProjectValidator } from \"../common/validators/file-system-validator.js\";\nimport { YargsChecker } from \"../common/validators/lib.js\";\nimport { Arguments, compile } from \"../compile/handler.js\";\n\nexport default {\n // For now, hide this command\n desc: false,\n hide: true,\n // desc: \"Compiles a self-contained Zuplo API binary\",\n command: \"compile\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\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(\"bundled-dir\", {\n type: \"string\",\n describe:\n \"The directory representing a built Zuplo API's sources. Use to skip build and bundling.\",\n hidden: true,\n })\n .option(\"port\", {\n type: \"number\",\n describe: \"The port to run the Zuplo API server on\",\n default: 9000,\n })\n .option(\"binary-name\", {\n type: \"string\",\n describe: \"The name of the binary\",\n default: \"compiled-zup\",\n })\n .option(\"build-id\", {\n type: \"string\",\n describe: \"The buildId to use for remote assets\",\n default: \"\",\n hidden: true,\n })\n .middleware([setBlocking, identify])\n .check(async (argv) => {\n if (argv[\"bundled-dir\"]) {\n // By pass the checks because the user already has a bundled-script\n return true;\n } else {\n return await new YargsChecker<typeof argv>(\n new ZuploProjectValidator()\n ).check(argv);\n }\n });\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo compile\" });\n await compile(argv as Arguments);\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../src/cmds/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAaV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBAsCf,OAAO;;AAzC/B,wBA6CE"}
1
+ {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../src/cmds/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAaV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBAoDf,OAAO;;AAvD/B,wBA2DE"}
@@ -38,6 +38,20 @@ export default {
38
38
  })
39
39
  .boolean("wait")
40
40
  .demandOption(["url"])
41
+ .example([
42
+ [
43
+ "$0 delete --url https://my-api-dev-123abc.zuplo.app --api-key YOUR_API_KEY",
44
+ "Delete a deployed environment by its URL",
45
+ ],
46
+ [
47
+ "$0 delete --url https://my-api-dev-123abc.zuplo.app --api-key YOUR_API_KEY --wait",
48
+ "Delete an environment and wait until the deletion is complete",
49
+ ],
50
+ [
51
+ "$0 delete --url https://my-api-dev-123abc.zuplo.app --api-key YOUR_API_KEY --project my-project --account my-account",
52
+ "Delete with explicit project and account specification",
53
+ ],
54
+ ])
41
55
  .middleware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AC,MAAM,CAAC;aACf,YAAY,CAAC,CAAC,KAAK,CAAC,CAAC;aACrB,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 at the URL\",\n command: \"delete\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\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(\"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 .demandOption([\"url\"])\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,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;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAEzE,eAAe;IACb,IAAI,EAAE,kCAAkC;IACxC,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,wBAAwB;YAClC,MAAM,EAAE,SAAS;SAClB,CAAC;aACD,MAAM,CAAC,KAAK,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,oCAAoC;SAC/C,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,MAAM,EAAE;YACd,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,oDAAoD;SAC/D,CAAC;aACD,MAAM,CAAC,sBAAsB,EAAE;YAC9B,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,uDAAuD;SAClE,CAAC;aACD,OAAO,CAAC,MAAM,CAAC;aACf,YAAY,CAAC,CAAC,KAAK,CAAC,CAAC;aACrB,OAAO,CAAC;YACP;gBACE,4EAA4E;gBAC5E,0CAA0C;aAC3C;YACD;gBACE,mFAAmF;gBACnF,+DAA+D;aAChE;YACD;gBACE,sHAAsH;gBACtH,wDAAwD;aACzD;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 at the URL\",\n command: \"delete\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\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(\"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 .demandOption([\"url\"])\n .example([\n [\n \"$0 delete --url https://my-api-dev-123abc.zuplo.app --api-key YOUR_API_KEY\",\n \"Delete a deployed environment by its URL\",\n ],\n [\n \"$0 delete --url https://my-api-dev-123abc.zuplo.app --api-key YOUR_API_KEY --wait\",\n \"Delete an environment and wait until the deletion is complete\",\n ],\n [\n \"$0 delete --url https://my-api-dev-123abc.zuplo.app --api-key YOUR_API_KEY --project my-project --account my-account\",\n \"Delete with explicit project and account specification\",\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 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/cmds/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAcV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBA8Df,OAAO;;AAjE/B,wBAqEE"}
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/cmds/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAcV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBAoFf,OAAO;;AAvF/B,wBA2FE"}
@@ -59,6 +59,28 @@ export default {
59
59
  default: false,
60
60
  })
61
61
  .boolean("verify-remote")
62
+ .example([
63
+ [
64
+ "$0 deploy --api-key YOUR_API_KEY",
65
+ "Deploy the current Git branch using the branch name as the environment name",
66
+ ],
67
+ [
68
+ "$0 deploy --api-key YOUR_API_KEY --environment production",
69
+ "Deploy to a specific environment name instead of using the Git branch name",
70
+ ],
71
+ [
72
+ "$0 deploy --api-key YOUR_API_KEY --account my-account",
73
+ "Deploy to a project in a specific account",
74
+ ],
75
+ [
76
+ "ZUPLO_API_KEY=YOUR_API_KEY $0 deploy",
77
+ "Use environment variable for API key",
78
+ ],
79
+ [
80
+ "git checkout -b my-feature && $0 deploy",
81
+ "Create a new branch and deploy it as a new environment",
82
+ ],
83
+ ])
62
84
  .middleware([
63
85
  setBlocking,
64
86
  authenticate,
@@ -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,OAAO,EAAa,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACzD,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,qDAAqD;IAC3D,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,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,MAAM,EAAE,IAAI;YACZ,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;aACD,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,eAAe,EAAE;YACvB,UAAU,EAAE,IAAI;YAChB,IAAI,EAAE,SAAS;YACf,QAAQ,EACN,yGAAyG;YAC3G,OAAO,EAAE,KAAK;SACf,CAAC;aACD,MAAM,CAAC,aAAa,EAAE;YACrB,IAAI,EAAE,QAAQ;YACd,QAAQ,EACN,2EAA2E;SAC9E,CAAC;aACD,MAAM,CAAC,sBAAsB,EAAE;YAC9B,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,uDAAuD;SAClE,CAAC;aACD,MAAM,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,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 .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 .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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CAAC,sBAAsB,EAAE;YAC9B,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,uDAAuD;SAClE,CAAC;aACD,MAAM,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,kCAAkC;gBAClC,6EAA6E;aAC9E;YACD;gBACE,2DAA2D;gBAC3D,4EAA4E;aAC7E;YACD;gBACE,uDAAuD;gBACvD,2CAA2C;aAC5C;YACD;gBACE,sCAAsC;gBACtC,sCAAsC;aACvC;YACD;gBACE,yCAAyC;gBACzC,wDAAwD;aACzD;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 .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 --api-key YOUR_API_KEY\",\n \"Deploy the current Git branch using the branch name as the environment name\",\n ],\n [\n \"$0 deploy --api-key YOUR_API_KEY --environment production\",\n \"Deploy to a specific environment name instead of using the Git branch name\",\n ],\n [\n \"$0 deploy --api-key YOUR_API_KEY --account my-account\",\n \"Deploy to a project in a specific account\",\n ],\n [\n \"ZUPLO_API_KEY=YOUR_API_KEY $0 deploy\",\n \"Use environment variable for API key\",\n ],\n [\n \"git checkout -b my-feature && $0 deploy\",\n \"Create a new branch and deploy it as a new 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 +1 @@
1
- {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/cmds/dev.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAWV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBAwCf,OAAO;;AA3C/B,wBAwDE"}
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/cmds/dev.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAWV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBAuDf,OAAO;;AA1D/B,wBAuEE"}
package/dist/cmds/dev.js CHANGED
@@ -40,6 +40,21 @@ export default {
40
40
  describe: "Unsafely ignore certificate errors",
41
41
  default: false,
42
42
  })
43
+ .example([
44
+ [
45
+ "$0 dev",
46
+ "Start the local development server with default settings (port 9000 for API, port 9100 for editor)",
47
+ ],
48
+ ["$0 dev --port 8080", "Start the local server on a custom port"],
49
+ [
50
+ "$0 dev --no-start-editor",
51
+ "Start only the API server without opening the editor",
52
+ ],
53
+ [
54
+ "$0 dev --debug-port 9229",
55
+ "Start with Chrome DevTools inspector enabled on port 9229",
56
+ ],
57
+ ])
43
58
  .middleware([setBlocking, identify])
44
59
  .check(async (argv) => {
45
60
  return await new YargsChecker(new ZuploProjectValidator()).check(argv);
@@ -1 +1 @@
1
- {"version":3,"file":"dev.js","sourceRoot":"","sources":["../../src/cmds/dev.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C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AE;QAC/B,MAAM,YAAY,CAAC;YACjB,IAAI;YACJ,UAAU,EAAE;gBACV,YAAY,EAAG,IAAkB,CAAC,WAAW,CAAC;gBAC9C,oCAAoC,EAAG,IAAkB,CACvD,iCAAiC,CAClC;aACF;YACD,KAAK,EAAE,WAAW;SACnB,CAAC,CAAC;QACH,MAAM,GAAG,CAAC,IAAiB,CAAC,CAAC;IAC/B,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../common/analytics/lib.js\";\nimport { identify } from \"../common/middleware/user-identification.js\";\nimport setBlocking from \"../common/output.js\";\nimport { ZuploProjectValidator } from \"../common/validators/file-system-validator.js\";\nimport { YargsChecker } from \"../common/validators/lib.js\";\nimport { Arguments, dev } from \"../dev/handler.js\";\n\nexport default {\n desc: \"Runs the Zuplo API locally\",\n command: \"dev\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\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(\"start-editor\", {\n type: \"boolean\",\n describe: \"Start the editor with the local server\",\n default: true,\n })\n .option(\"port\", {\n type: \"number\",\n describe: \"The port to run the local server on\",\n default: 9000,\n })\n .option(\"editor-port\", {\n type: \"number\",\n describe: \"The port to run the route designer on\",\n default: 9100,\n })\n .option(\"debug-port\", {\n type: \"number\",\n describe: \"The port to run the Chrome inspector on\",\n })\n .option(\"unsafely-ignore-certificate-errors\", {\n type: \"boolean\",\n describe: \"Unsafely ignore certificate errors\",\n default: false,\n })\n .middleware([setBlocking, identify])\n .check(async (argv) => {\n return await new YargsChecker<typeof argv>(\n new ZuploProjectValidator()\n ).check(argv);\n });\n },\n handler: async (argv: unknown) => {\n await captureEvent({\n argv,\n properties: {\n \"debug-port\": (argv as Arguments)[\"debugPort\"],\n \"unsafely-ignore-certificate-errors\": (argv as Arguments)[\n \"unsafelyIgnoreCertificateErrors\"\n ],\n },\n event: \"zuplo dev\",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SACf,CAAC;aACD,OAAO,CAAC;YACP;gBACE,QAAQ;gBACR,oGAAoG;aACrG;YACD,CAAC,oBAAoB,EAAE,yCAAyC,CAAC;YACjE;gBACE,0BAA0B;gBAC1B,sDAAsD;aACvD;YACD;gBACE,0BAA0B;gBAC1B,2DAA2D;aAC5D;SACF,CAAC;aACD,UAAU,CAAC,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;aACnC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YACpB,OAAO,MAAM,IAAI,YAAY,CAC3B,IAAI,qBAAqB,EAAE,CAC5B,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC;YACjB,IAAI;YACJ,UAAU,EAAE;gBACV,YAAY,EAAG,IAAkB,CAAC,WAAW,CAAC;gBAC9C,oCAAoC,EAAG,IAAkB,CACvD,iCAAiC,CAClC;aACF;YACD,KAAK,EAAE,WAAW;SACnB,CAAC,CAAC;QACH,MAAM,GAAG,CAAC,IAAiB,CAAC,CAAC;IAC/B,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../common/analytics/lib.js\";\nimport { identify } from \"../common/middleware/user-identification.js\";\nimport setBlocking from \"../common/output.js\";\nimport { ZuploProjectValidator } from \"../common/validators/file-system-validator.js\";\nimport { YargsChecker } from \"../common/validators/lib.js\";\nimport { Arguments, dev } from \"../dev/handler.js\";\n\nexport default {\n desc: \"Runs the Zuplo API locally\",\n command: \"dev\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\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(\"start-editor\", {\n type: \"boolean\",\n describe: \"Start the editor with the local server\",\n default: true,\n })\n .option(\"port\", {\n type: \"number\",\n describe: \"The port to run the local server on\",\n default: 9000,\n })\n .option(\"editor-port\", {\n type: \"number\",\n describe: \"The port to run the route designer on\",\n default: 9100,\n })\n .option(\"debug-port\", {\n type: \"number\",\n describe: \"The port to run the Chrome inspector on\",\n })\n .option(\"unsafely-ignore-certificate-errors\", {\n type: \"boolean\",\n describe: \"Unsafely ignore certificate errors\",\n default: false,\n })\n .example([\n [\n \"$0 dev\",\n \"Start the local development server with default settings (port 9000 for API, port 9100 for editor)\",\n ],\n [\"$0 dev --port 8080\", \"Start the local server on a custom port\"],\n [\n \"$0 dev --no-start-editor\",\n \"Start only the API server without opening the editor\",\n ],\n [\n \"$0 dev --debug-port 9229\",\n \"Start with Chrome DevTools inspector enabled on port 9229\",\n ],\n ])\n .middleware([setBlocking, identify])\n .check(async (argv) => {\n return await new YargsChecker<typeof argv>(\n new ZuploProjectValidator()\n ).check(argv);\n });\n },\n handler: async (argv: unknown) => {\n await captureEvent({\n argv,\n properties: {\n \"debug-port\": (argv as Arguments)[\"debugPort\"],\n \"unsafely-ignore-certificate-errors\": (argv as Arguments)[\n \"unsafelyIgnoreCertificateErrors\"\n ],\n },\n event: \"zuplo dev\",\n });\n await dev(argv as Arguments);\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/cmds/link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAcV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBA0Cf,OAAO;;AA7C/B,wBAiDE"}
1
+ {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/cmds/link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAcV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBA4Df,OAAO;;AA/D/B,wBAmEE"}
package/dist/cmds/link.js CHANGED
@@ -8,7 +8,7 @@ import { fetchAccount } from "../common/middleware/get-account-param.js";
8
8
  import { fetchProject } from "../common/middleware/get-project-param.js";
9
9
  import { fetchEnvironment } from "../common/middleware/get-environment-param.js";
10
10
  export default {
11
- desc: "Links information from your Zuplo account to your local machine",
11
+ desc: "Links information from your Zuplo account to your local machine allowing",
12
12
  command: "link",
13
13
  builder: (yargs) => {
14
14
  return yargs
@@ -41,6 +41,24 @@ export default {
41
41
  describe: "Fetch the environments for your project from Zuplo. If this is false, then the environment will automatically be detected from the git branch.",
42
42
  default: true,
43
43
  })
44
+ .example([
45
+ [
46
+ "$0 link --api-key YOUR_API_KEY",
47
+ "Link your local project to your Zuplo account",
48
+ ],
49
+ [
50
+ "$0 link --api-key YOUR_API_KEY --project my-project --account my-account",
51
+ "Link to a specific project and account",
52
+ ],
53
+ [
54
+ "$0 link --api-key YOUR_API_KEY --environment production",
55
+ "Link to a specific environment",
56
+ ],
57
+ [
58
+ "ZUPLO_API_KEY=YOUR_API_KEY $0 link",
59
+ "Use environment variable for API key",
60
+ ],
61
+ ])
44
62
  .middleware([
45
63
  setBlocking,
46
64
  authenticate,
@@ -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,iEAAiE;IACvE,OAAO,EAAE,MAAM;IACf,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,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,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\",\n command: \"link\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\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 .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,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,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AE,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 .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 [\n \"$0 link --api-key YOUR_API_KEY\",\n \"Link your local project to your Zuplo account\",\n ],\n [\n \"$0 link --api-key YOUR_API_KEY --project my-project --account my-account\",\n \"Link to a specific project and account\",\n ],\n [\n \"$0 link --api-key YOUR_API_KEY --environment production\",\n \"Link to a specific environment\",\n ],\n [\n \"ZUPLO_API_KEY=YOUR_API_KEY $0 link\",\n \"Use environment variable for API key\",\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 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/cmds/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAaV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBA4Bf,OAAO;;AA/B/B,wBAmCE"}
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/cmds/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAaV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBA0Cf,OAAO;;AA7C/B,wBAiDE"}
package/dist/cmds/list.js CHANGED
@@ -7,7 +7,7 @@ import { list } from "../list/handler.js";
7
7
  import { fetchAccount } from "../common/middleware/get-account-param.js";
8
8
  import { fetchProject } from "../common/middleware/get-project-param.js";
9
9
  export default {
10
- desc: "Lists all deployed zups",
10
+ desc: "Lists all deployed Zuplo APIs",
11
11
  command: "list",
12
12
  builder: (yargs) => {
13
13
  return yargs
@@ -28,6 +28,20 @@ export default {
28
28
  type: "string",
29
29
  describe: "The endpoint of your self-hosted service to deploy to",
30
30
  })
31
+ .example([
32
+ [
33
+ "$0 list --api-key YOUR_API_KEY",
34
+ "List all deployed environments for your project",
35
+ ],
36
+ [
37
+ "$0 list --api-key YOUR_API_KEY --project my-project --account my-account",
38
+ "List environments for a specific project and account",
39
+ ],
40
+ [
41
+ "ZUPLO_API_KEY=YOUR_API_KEY $0 list",
42
+ "Use environment variable for API key",
43
+ ],
44
+ ])
31
45
  .middleware([
32
46
  setBlocking,
33
47
  authenticate,
@@ -1 +1 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../src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ChC,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 zups\",\n command: \"list\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\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 .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,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,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;gBACE,gCAAgC;gBAChC,iDAAiD;aAClD;YACD;gBACE,0EAA0E;gBAC1E,sDAAsD;aACvD;YACD;gBACE,oCAAoC;gBACpC,sCAAsC;aACvC;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 .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 [\n \"$0 list --api-key YOUR_API_KEY\",\n \"List all deployed environments for your project\",\n ],\n [\n \"$0 list --api-key YOUR_API_KEY --project my-project --account my-account\",\n \"List environments for a specific project and account\",\n ],\n [\n \"ZUPLO_API_KEY=YOUR_API_KEY $0 list\",\n \"Use environment variable for API key\",\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"]}
@@ -6,4 +6,4 @@ declare const _default: {
6
6
  handler: (argv: unknown) => Promise<void>;
7
7
  };
8
8
  export default _default;
9
- //# sourceMappingURL=convert.d.ts.map
9
+ //# sourceMappingURL=create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/cmds/mtls-certificates/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAcV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBA2Cf,OAAO;;AA9C/B,wBAkDE"}
@@ -0,0 +1,59 @@
1
+ import { captureEvent } from "../../common/analytics/lib.js";
2
+ import { authenticate } from "../../common/middleware/authentication.js";
3
+ import { configure } from "../../common/middleware/user-configuration.js";
4
+ import { identify } from "../../common/middleware/user-identification.js";
5
+ import setBlocking from "../../common/output.js";
6
+ 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
+ export default {
10
+ desc: "Creates a new mTLS certificate for a project",
11
+ command: "create",
12
+ builder: (yargs) => {
13
+ return yargs
14
+ .option("name", {
15
+ type: "string",
16
+ describe: "The name of the certificate (alphanumeric with underscores)",
17
+ })
18
+ .option("cert", {
19
+ type: "string",
20
+ describe: "Path to the PEM-encoded certificate file",
21
+ })
22
+ .option("key", {
23
+ type: "string",
24
+ describe: "Path to the PEM-encoded private key file",
25
+ })
26
+ .option("environment", {
27
+ type: "array",
28
+ describe: "Environments where the certificate should be enabled (can be repeated: --environment development --environment production)",
29
+ choices: ["development", "preview", "production"],
30
+ })
31
+ .option("api-key", {
32
+ type: "string",
33
+ describe: "The API Key from Zuplo",
34
+ envVar: "API_KEY",
35
+ })
36
+ .option("account", {
37
+ type: "string",
38
+ describe: "The account name",
39
+ })
40
+ .option("project", {
41
+ type: "string",
42
+ describe: "The project name",
43
+ })
44
+ .demandOption(["name", "cert", "key", "environment"])
45
+ .middleware([
46
+ setBlocking,
47
+ authenticate,
48
+ configure,
49
+ fetchAccount,
50
+ fetchProject,
51
+ identify,
52
+ ]);
53
+ },
54
+ handler: async (argv) => {
55
+ await captureEvent({ argv, event: "zuplo mtls-certificates create" });
56
+ await create(argv);
57
+ },
58
+ };
59
+ //# sourceMappingURL=create.js.map
@@ -0,0 +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,CA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E,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,gCAAgC,EAAE,CAAC,CAAC;QACtE,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 .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\", {\n type: \"array\",\n describe:\n \"Environments where the certificate should be enabled (can be repeated: --environment development --environment 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\"])\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-certificates create\" });\n await create(argv as CreateArguments);\n },\n};\n"]}
@@ -0,0 +1,9 @@
1
+ import { Argv } from "yargs";
2
+ declare const _default: {
3
+ desc: string;
4
+ command: string;
5
+ builder: (yargs: Argv) => Argv<unknown>;
6
+ handler: (argv: unknown) => Promise<void>;
7
+ };
8
+ export default _default;
9
+ //# sourceMappingURL=delete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/cmds/mtls-certificates/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAcV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBA6Bf,OAAO;;AAhC/B,wBAoCE"}
@@ -0,0 +1,46 @@
1
+ import { captureEvent } from "../../common/analytics/lib.js";
2
+ import { authenticate } from "../../common/middleware/authentication.js";
3
+ import { configure } from "../../common/middleware/user-configuration.js";
4
+ import { identify } from "../../common/middleware/user-identification.js";
5
+ import setBlocking from "../../common/output.js";
6
+ 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
+ export default {
10
+ desc: "Deletes an mTLS certificate by ID",
11
+ command: "delete",
12
+ builder: (yargs) => {
13
+ return yargs
14
+ .option("cert-id", {
15
+ type: "string",
16
+ describe: "The ID of the certificate to delete",
17
+ })
18
+ .option("api-key", {
19
+ type: "string",
20
+ describe: "The API Key from Zuplo",
21
+ envVar: "API_KEY",
22
+ })
23
+ .option("account", {
24
+ type: "string",
25
+ describe: "The account name",
26
+ })
27
+ .option("project", {
28
+ type: "string",
29
+ describe: "The project name",
30
+ })
31
+ .demandOption(["cert-id"])
32
+ .middleware([
33
+ setBlocking,
34
+ authenticate,
35
+ configure,
36
+ fetchAccount,
37
+ fetchProject,
38
+ identify,
39
+ ]);
40
+ },
41
+ handler: async (argv) => {
42
+ await captureEvent({ argv, event: "zuplo mtls-certificates delete" });
43
+ await deleteCommand(argv);
44
+ },
45
+ };
46
+ //# sourceMappingURL=delete.js.map
@@ -0,0 +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,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,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,gCAAgC,EAAE,CAAC,CAAC;QACtE,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 .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 .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-certificates delete\" });\n await deleteCommand(argv as DeleteArguments);\n },\n};\n"]}
@@ -0,0 +1,9 @@
1
+ import { Argv } from "yargs";
2
+ declare const _default: {
3
+ desc: string;
4
+ command: string;
5
+ builder: (yargs: Argv) => Argv<unknown>;
6
+ handler: (argv: unknown) => Promise<void>;
7
+ };
8
+ export default _default;
9
+ //# sourceMappingURL=describe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"describe.d.ts","sourceRoot":"","sources":["../../../src/cmds/mtls-certificates/describe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAcV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBA6Bf,OAAO;;AAhC/B,wBAoCE"}