@zuplo/cli 6.43.11 → 6.43.12

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 (145) hide show
  1. package/README.md +31 -31
  2. package/dist/__tests__/archive-utils.test.js +2 -2
  3. package/dist/__tests__/archive-utils.test.js.map +1 -1
  4. package/dist/cli.js +1 -1
  5. package/dist/cli.js.map +1 -1
  6. package/dist/cmds/build.js +2 -2
  7. package/dist/cmds/build.js.map +1 -1
  8. package/dist/cmds/compile.js +4 -4
  9. package/dist/cmds/compile.js.map +1 -1
  10. package/dist/cmds/convert.js +1 -1
  11. package/dist/cmds/convert.js.map +1 -1
  12. package/dist/cmds/delete.d.ts.map +1 -1
  13. package/dist/cmds/delete.js +7 -6
  14. package/dist/cmds/delete.js.map +1 -1
  15. package/dist/cmds/deploy.d.ts.map +1 -1
  16. package/dist/cmds/deploy.js +4 -4
  17. package/dist/cmds/deploy.js.map +1 -1
  18. package/dist/cmds/dev.js +3 -3
  19. package/dist/cmds/dev.js.map +1 -1
  20. package/dist/cmds/editor.js +2 -2
  21. package/dist/cmds/editor.js.map +1 -1
  22. package/dist/cmds/link.d.ts.map +1 -1
  23. package/dist/cmds/link.js +4 -4
  24. package/dist/cmds/link.js.map +1 -1
  25. package/dist/cmds/list.d.ts.map +1 -1
  26. package/dist/cmds/list.js +3 -3
  27. package/dist/cmds/list.js.map +1 -1
  28. package/dist/cmds/login.d.ts.map +1 -1
  29. package/dist/cmds/login.js +3 -8
  30. package/dist/cmds/login.js.map +1 -1
  31. package/dist/cmds/project/import-openapi.js +1 -1
  32. package/dist/cmds/project/import-openapi.js.map +1 -1
  33. package/dist/cmds/project/update.js +2 -2
  34. package/dist/cmds/project/update.js.map +1 -1
  35. package/dist/cmds/test.js +3 -3
  36. package/dist/cmds/test.js.map +1 -1
  37. package/dist/cmds/tunnel/create.d.ts.map +1 -1
  38. package/dist/cmds/tunnel/create.js +4 -3
  39. package/dist/cmds/tunnel/create.js.map +1 -1
  40. package/dist/cmds/tunnel/delete.d.ts.map +1 -1
  41. package/dist/cmds/tunnel/delete.js +3 -3
  42. package/dist/cmds/tunnel/delete.js.map +1 -1
  43. package/dist/cmds/tunnel/describe.d.ts.map +1 -1
  44. package/dist/cmds/tunnel/describe.js +4 -3
  45. package/dist/cmds/tunnel/describe.js.map +1 -1
  46. package/dist/cmds/tunnel/list.js +1 -1
  47. package/dist/cmds/tunnel/list.js.map +1 -1
  48. package/dist/cmds/tunnel/rotate-token.d.ts.map +1 -1
  49. package/dist/cmds/tunnel/rotate-token.js +4 -3
  50. package/dist/cmds/tunnel/rotate-token.js.map +1 -1
  51. package/dist/cmds/tunnel/services/describe.d.ts.map +1 -1
  52. package/dist/cmds/tunnel/services/describe.js +4 -3
  53. package/dist/cmds/tunnel/services/describe.js.map +1 -1
  54. package/dist/cmds/tunnel/services/update.d.ts.map +1 -1
  55. package/dist/cmds/tunnel/services/update.js +4 -3
  56. package/dist/cmds/tunnel/services/update.js.map +1 -1
  57. package/dist/cmds/variable/create.d.ts.map +1 -1
  58. package/dist/cmds/variable/create.js +4 -3
  59. package/dist/cmds/variable/create.js.map +1 -1
  60. package/dist/cmds/variable/update.d.ts.map +1 -1
  61. package/dist/cmds/variable/update.js +9 -3
  62. package/dist/cmds/variable/update.js.map +1 -1
  63. package/dist/common/middleware/authentication.d.ts +4 -0
  64. package/dist/common/middleware/authentication.d.ts.map +1 -0
  65. package/dist/common/middleware/authentication.js +46 -0
  66. package/dist/common/middleware/authentication.js.map +1 -0
  67. package/dist/common/middleware/user-configuration.js +1 -1
  68. package/dist/common/middleware/user-configuration.js.map +1 -1
  69. package/dist/common/middleware/user-identification.js.map +1 -1
  70. package/dist/common/settings.d.ts +0 -1
  71. package/dist/common/settings.d.ts.map +1 -1
  72. package/dist/common/settings.js +0 -3
  73. package/dist/common/settings.js.map +1 -1
  74. package/dist/common/upgraders/package-json-upgrader.js +4 -4
  75. package/dist/common/upgraders/package-json-upgrader.js.map +1 -1
  76. package/dist/delete/handler.d.ts +1 -1
  77. package/dist/delete/handler.js +2 -2
  78. package/dist/delete/handler.js.map +1 -1
  79. package/dist/delete/poll-deployment.js +1 -1
  80. package/dist/delete/poll-deployment.js.map +1 -1
  81. package/dist/deploy/environments.js +2 -2
  82. package/dist/deploy/environments.js.map +1 -1
  83. package/dist/deploy/handler.d.ts +1 -1
  84. package/dist/deploy/handler.js +4 -4
  85. package/dist/deploy/handler.js.map +1 -1
  86. package/dist/deploy/poll-deployment.js +2 -2
  87. package/dist/deploy/poll-deployment.js.map +1 -1
  88. package/dist/link/handler.d.ts +1 -1
  89. package/dist/link/handler.js +4 -4
  90. package/dist/link/handler.js.map +1 -1
  91. package/dist/link/populate.d.ts +1 -1
  92. package/dist/link/populate.d.ts.map +1 -1
  93. package/dist/link/populate.js +3 -3
  94. package/dist/link/populate.js.map +1 -1
  95. package/dist/list/handler.d.ts +1 -1
  96. package/dist/list/handler.js +2 -2
  97. package/dist/list/handler.js.map +1 -1
  98. package/dist/login/handler.d.ts +1 -4
  99. package/dist/login/handler.d.ts.map +1 -1
  100. package/dist/login/handler.js +3 -6
  101. package/dist/login/handler.js.map +1 -1
  102. package/dist/login/html.d.ts +2 -0
  103. package/dist/login/html.d.ts.map +1 -0
  104. package/dist/login/html.js +84 -0
  105. package/dist/login/html.js.map +1 -0
  106. package/dist/login/server.d.ts.map +1 -1
  107. package/dist/login/server.js +4 -2
  108. package/dist/login/server.js.map +1 -1
  109. package/dist/tsconfig.tsbuildinfo +1 -1
  110. package/dist/tunnel/create/handler.d.ts +1 -1
  111. package/dist/tunnel/create/handler.js +1 -1
  112. package/dist/tunnel/create/handler.js.map +1 -1
  113. package/dist/tunnel/delete/handler.d.ts +1 -1
  114. package/dist/tunnel/delete/handler.js +1 -1
  115. package/dist/tunnel/delete/handler.js.map +1 -1
  116. package/dist/tunnel/delete/poll-teardown-operation.js +2 -2
  117. package/dist/tunnel/delete/poll-teardown-operation.js.map +1 -1
  118. package/dist/tunnel/describe/handler.d.ts +1 -1
  119. package/dist/tunnel/describe/handler.js +1 -1
  120. package/dist/tunnel/describe/handler.js.map +1 -1
  121. package/dist/tunnel/list/handler.d.ts +1 -1
  122. package/dist/tunnel/list/handler.js +1 -1
  123. package/dist/tunnel/list/handler.js.map +1 -1
  124. package/dist/tunnel/rotate-token/handler.d.ts +1 -1
  125. package/dist/tunnel/rotate-token/handler.js +1 -1
  126. package/dist/tunnel/rotate-token/handler.js.map +1 -1
  127. package/dist/tunnel/services/describe/handler.d.ts +1 -1
  128. package/dist/tunnel/services/describe/handler.js +1 -1
  129. package/dist/tunnel/services/describe/handler.js.map +1 -1
  130. package/dist/tunnel/services/update/handler.d.ts +1 -1
  131. package/dist/tunnel/services/update/handler.js +1 -1
  132. package/dist/tunnel/services/update/handler.js.map +1 -1
  133. package/dist/tunnel/services/update/poll-provisioning-operations.js +2 -2
  134. package/dist/tunnel/services/update/poll-provisioning-operations.js.map +1 -1
  135. package/dist/variable/create/handler.js +1 -1
  136. package/dist/variable/create/handler.js.map +1 -1
  137. package/dist/variable/models.d.ts +1 -1
  138. package/dist/variable/models.js.map +1 -1
  139. package/dist/variable/update/handler.js +1 -1
  140. package/dist/variable/update/handler.js.map +1 -1
  141. package/package.json +4 -4
  142. package/dist/common/validators/login-state-validator.d.ts +0 -14
  143. package/dist/common/validators/login-state-validator.d.ts.map +0 -1
  144. package/dist/common/validators/login-state-validator.js +0 -39
  145. package/dist/common/validators/login-state-validator.js.map +0 -1
package/README.md CHANGED
@@ -12,56 +12,56 @@ fast, secure and with game-changing Developer Experience.</p>
12
12
  The command-line interface for Zuplo.
13
13
 
14
14
  ```
15
- zup <command>
15
+ zuplo <command>
16
16
 
17
17
  Commands:
18
- zup convert Converts routes.json to routes.oas.json
19
- zup delete Deletes the zup at the URL
20
- zup deploy Deploys current Git branch of the current directory
21
- zup dev Runs the zup locally
22
- zup list Lists all deployed zups
23
- zup link Links information from your Zuplo account to your local machine
24
- zup login Authenticates the user
25
- zup test Runs the tests under /tests against an endpoint
26
- zup project Project commands
27
- zup tunnel Tunnel commands
28
- zup variable Variable commands
29
-
30
- zup project
18
+ zuplo convert Converts routes.json to routes.oas.json
19
+ zuplo delete Deletes the Zuplo API at the URL
20
+ zuplo deploy Deploys current Git branch of the current directory
21
+ zuplo dev Runs the Zuplo API locally
22
+ zuplo list Lists all deployed Zuplo APIs
23
+ zuplo link Links information from your Zuplo account to your local machine
24
+ zuplo login Authenticates the user
25
+ zuplo test Runs the tests under /tests against an endpoint
26
+ zuplo project Project commands
27
+ zuplo tunnel Tunnel commands
28
+ zuplo variable Variable commands
29
+
30
+ zuplo project
31
31
 
32
32
  Project commands
33
33
 
34
34
  Commands:
35
- zup project update Updates your project structure to the latest conventions
36
- zup project import-openapi Import an OpenAPI file into your Zuplo project
35
+ zuplo project update Updates your project structure to the latest conventions
36
+ zuplo project import-openapi Import an OpenAPI file into your Zuplo project
37
37
 
38
- zup tunnel
38
+ zuplo tunnel
39
39
 
40
40
  Tunnel commands
41
41
 
42
42
  Commands:
43
- zup tunnel create Creates a new tunnel in your account
44
- zup tunnel delete Deletes a tunnel in your account
45
- zup tunnel describe Describes a tunnel in your account
46
- zup tunnel list Lists the tunnels in your account
47
- zup tunnel rotate-token Rotates the token for a tunnel in your account
48
- zup tunnel services Tunnel services commands
43
+ zuplo tunnel create Creates a new tunnel in your account
44
+ zuplo tunnel delete Deletes a tunnel in your account
45
+ zuplo tunnel describe Describes a tunnel in your account
46
+ zuplo tunnel list Lists the tunnels in your account
47
+ zuplo tunnel rotate-token Rotates the token for a tunnel in your account
48
+ zuplo tunnel services Tunnel services commands
49
49
 
50
- zup tunnel services
50
+ zuplo tunnel services
51
51
 
52
52
  Tunnel services commands
53
53
 
54
54
  Commands:
55
- zup tunnel services describe Describes the services for this tunnel
56
- zup tunnel services update Updates the services for this tunnel
55
+ zuplo tunnel services describe Describes the services for this tunnel
56
+ zuplo tunnel services update Updates the services for this tunnel
57
57
 
58
- zup variable
58
+ zuplo variable
59
59
 
60
60
  Variable commands
61
61
 
62
62
  Commands:
63
- zup variable create Creates a new variable for a branch
64
- zup variable update Updates an existing variable for a branch
63
+ zuplo variable create Creates a new variable for a branch
64
+ zuplo variable update Updates an existing variable for a branch
65
65
 
66
66
  ```
67
67
 
@@ -76,6 +76,6 @@ Commands:
76
76
  ## v2
77
77
 
78
78
  - Removes the use of Deno's test runner. We now use the built-in test runner in
79
- Node.js. All features are preserved; however, the output of `zup test` follows
80
- the Node.js
79
+ Node.js. All features are preserved; however, the output of `zuplo test`
80
+ follows the Node.js
81
81
  [spec reporter](https://nodejs.org/docs/latest-v18.x/api/test.html#test-reporters).
@@ -25,7 +25,7 @@ describe("Archive utils", async function () {
25
25
  project: "basic",
26
26
  dir: basicTestsPath,
27
27
  environment: "basic-1234",
28
- "api-key": "",
28
+ authToken: "",
29
29
  });
30
30
  expect(results).to.not.be.empty;
31
31
  expect(results.branch).to.equal("basic-1234");
@@ -38,7 +38,7 @@ describe("Archive utils", async function () {
38
38
  project: "basic",
39
39
  dir: basicTestsPath,
40
40
  environment: "basic-1234",
41
- "api-key": "",
41
+ authToken: "",
42
42
  "override-repo-url": "https://github.com/zuplo/test-override",
43
43
  });
44
44
  expect(results).to.not.be.empty;
@@ -1 +1 @@
1
- {"version":3,"file":"archive-utils.test.js","sourceRoot":"","sources":["../../src/__tests__/archive-utils.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,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Y,CAAC,CAAC;QAC9C,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;QACvC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kDAAkD,EAAE,KAAK;QAC1D,MAAM,OAAO,GAAG,MAAM,gBAAgB,CAAC;YACrC,OAAO,EAAE,YAAY;YACrB,OAAO,EAAE,OAAO;YAChB,GAAG,EAAE,cAAc;YACnB,WAAW,EAAE,YAAY;YACzB,SAAS,EAAE,EAAE;YACb,mBAAmB,EAAE,wCAAwC;SAC9D,CAAC,CAAC;QAEH,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC;QAChC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC9C,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;QACvC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC3E,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect } from \"chai\";\nimport ignore from \"ignore\";\nimport path from \"node:path\";\nimport { describe, it } from \"node:test\";\nimport { fileURLToPath } from \"node:url\";\nimport { createIgnoreFunction, generateMetadata } from \"../deploy/archive.js\";\nconst __filename = fileURLToPath(import.meta.url); // get the resolved path to the file\nconst __dirname = path.dirname(__filename); // get the name of the directory\n\nconst basicTestsPath = path.join(\n __dirname,\n \"..\",\n \"..\",\n \"..\",\n \"..\",\n \"test-fixtures\",\n \"basic\"\n);\n\ndescribe(\"Archive utils\", async function () {\n it(\"should not ignore .zuplo using gitignore\", function () {\n const ignores = createIgnoreFunction(basicTestsPath);\n const expectedRules = (ignore as any)().add(\".git/\");\n expectedRules.add(\".cache/\");\n expectedRules.add(\"dist/\");\n expectedRules.add(\"node_modules/\");\n expectedRules.add(\".env\");\n expectedRules.add(\".husky/_\");\n expectedRules.add(\".DS_Store\");\n\n expect(ignores._rules).to.deep.equal(expectedRules._rules);\n });\n\n it(\"should return default metadata values\", async function () {\n const results = await generateMetadata({\n account: \"zuplo-test\",\n project: \"basic\",\n dir: basicTestsPath,\n environment: \"basic-1234\",\n \"api-key\": \"\",\n });\n\n expect(results).to.not.be.empty;\n expect(results.branch).to.equal(\"basic-1234\");\n expect(results.repoUrl).to.not.be.null;\n expect(results.sha).to.not.be.null;\n });\n\n it(\"should allow metadata value override on repo url\", async function () {\n const results = await generateMetadata({\n account: \"zuplo-test\",\n project: \"basic\",\n dir: basicTestsPath,\n environment: \"basic-1234\",\n \"api-key\": \"\",\n \"override-repo-url\": \"https://github.com/zuplo/test-override\",\n });\n\n expect(results).to.not.be.empty;\n expect(results.branch).to.equal(\"basic-1234\");\n expect(results.repoUrl).to.not.be.null;\n expect(results.repoUrl).to.equal(\"https://github.com/zuplo/test-override\");\n expect(results.sha).to.not.be.null;\n });\n});\n"]}
1
+ {"version":3,"file":"archive-utils.test.js","sourceRoot":"","sources":["../../src/__tests__/archive-utils.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAA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,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC;QAChC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC9C,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;QACvC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;IACrC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kDAAkD,EAAE,KAAK;QAC1D,MAAM,OAAO,GAAG,MAAM,gBAAgB,CAAC;YACrC,OAAO,EAAE,YAAY;YACrB,OAAO,EAAE,OAAO;YAChB,GAAG,EAAE,cAAc;YACnB,WAAW,EAAE,YAAY;YACzB,SAAS,EAAE,EAAE;YACb,mBAAmB,EAAE,wCAAwC;SAC9D,CAAC,CAAC;QAEH,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC;QAChC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC9C,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;QACvC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC3E,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect } from \"chai\";\nimport ignore from \"ignore\";\nimport path from \"node:path\";\nimport { describe, it } from \"node:test\";\nimport { fileURLToPath } from \"node:url\";\nimport { createIgnoreFunction, generateMetadata } from \"../deploy/archive.js\";\nconst __filename = fileURLToPath(import.meta.url); // get the resolved path to the file\nconst __dirname = path.dirname(__filename); // get the name of the directory\n\nconst basicTestsPath = path.join(\n __dirname,\n \"..\",\n \"..\",\n \"..\",\n \"..\",\n \"test-fixtures\",\n \"basic\"\n);\n\ndescribe(\"Archive utils\", async function () {\n it(\"should not ignore .zuplo using gitignore\", function () {\n const ignores = createIgnoreFunction(basicTestsPath);\n const expectedRules = (ignore as any)().add(\".git/\");\n expectedRules.add(\".cache/\");\n expectedRules.add(\"dist/\");\n expectedRules.add(\"node_modules/\");\n expectedRules.add(\".env\");\n expectedRules.add(\".husky/_\");\n expectedRules.add(\".DS_Store\");\n\n expect(ignores._rules).to.deep.equal(expectedRules._rules);\n });\n\n it(\"should return default metadata values\", async function () {\n const results = await generateMetadata({\n account: \"zuplo-test\",\n project: \"basic\",\n dir: basicTestsPath,\n environment: \"basic-1234\",\n authToken: \"\",\n });\n\n expect(results).to.not.be.empty;\n expect(results.branch).to.equal(\"basic-1234\");\n expect(results.repoUrl).to.not.be.null;\n expect(results.sha).to.not.be.null;\n });\n\n it(\"should allow metadata value override on repo url\", async function () {\n const results = await generateMetadata({\n account: \"zuplo-test\",\n project: \"basic\",\n dir: basicTestsPath,\n environment: \"basic-1234\",\n authToken: \"\",\n \"override-repo-url\": \"https://github.com/zuplo/test-override\",\n });\n\n expect(results).to.not.be.empty;\n expect(results.branch).to.equal(\"basic-1234\");\n expect(results.repoUrl).to.not.be.null;\n expect(results.repoUrl).to.equal(\"https://github.com/zuplo/test-override\");\n expect(results.sha).to.not.be.null;\n });\n});\n"]}
package/dist/cli.js CHANGED
@@ -114,7 +114,7 @@ if (gte(process.versions.node, MIN_NODE_VERSION)) {
114
114
  }
115
115
  }
116
116
  else {
117
- await printCriticalFailureToConsoleAndExit(`The zup CLI requires at least node.js v${MIN_NODE_VERSION}. You are using v${process.versions.node}. Please update your version of node.js.
117
+ await printCriticalFailureToConsoleAndExit(`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.
118
118
 
119
119
  Consider using a Node.js version manager such as https://github.com/nvm-sh/nvm.`);
120
120
  }
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;AAKhB,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,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,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,OAAO,MAAM,yBAAyB,CAAC;AAC9C,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,QAAQ,MAAM,0B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AAC;SACjB,OAAO,CAAC,KAAK,CAAC;SACd,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,0CAA0C,gBAAgB,oBAAoB,OAAO,CAAC,QAAQ,CAAC,IAAI;;oFAEnB,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\n// eslint-disable-next-line import/no-duplicates\nimport undici from \"undici\";\n\nimport { confirm } from \"@inquirer/prompts\";\nimport * as Sentry from \"@sentry/node\";\nimport { readFileSync } from \"node:fs\";\nimport os from \"node:os\";\nimport { fileURLToPath } from \"node:url\";\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 project from \"./cmds/project/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\";\n\n// This allows us to stop the CLI from executing so we can connect the profiler\n// eslint-disable-next-line node/no-process-env\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 \"The Zuplo CLI is not supported on Windows. We recommend using Windows Subsystem for Linux (WSL).\"\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 // eslint-disable-next-line node/no-process-env\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 .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(project)\n .command(tunnel)\n .command(variable)\n .command(build)\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 zup 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,MAAM,CAAC,MAAM,EAAE,CAAC;AAKhB,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,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,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,OAAO,MAAM,yBAAyB,CAAC;AAC9C,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,E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,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\n// eslint-disable-next-line import/no-duplicates\nimport undici from \"undici\";\n\nimport { confirm } from \"@inquirer/prompts\";\nimport * as Sentry from \"@sentry/node\";\nimport { readFileSync } from \"node:fs\";\nimport os from \"node:os\";\nimport { fileURLToPath } from \"node:url\";\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 project from \"./cmds/project/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\";\n\n// This allows us to stop the CLI from executing so we can connect the profiler\n// eslint-disable-next-line node/no-process-env\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 \"The Zuplo CLI is not supported on Windows. We recommend using Windows Subsystem for Linux (WSL).\"\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 // eslint-disable-next-line node/no-process-env\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 .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(project)\n .command(tunnel)\n .command(variable)\n .command(build)\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"]}
@@ -11,7 +11,7 @@ export default {
11
11
  return yargs
12
12
  .option("dir", {
13
13
  type: "string",
14
- describe: "The directory containing your zup",
14
+ describe: "The directory containing your Zuplo API",
15
15
  default: ".",
16
16
  normalize: true,
17
17
  hidden: true,
@@ -27,7 +27,7 @@ export default {
27
27
  });
28
28
  },
29
29
  handler: async (argv) => {
30
- await captureEvent({ argv, event: "zup build" });
30
+ await captureEvent({ argv, event: "zuplo build" });
31
31
  await build(argv);
32
32
  },
33
33
  };
@@ -1 +1 @@
1
- {"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/cmds/build.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACvD,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;AAE3D,eAAe;IAEb,IAAI,EAAE,KAAK;IAEX,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,MAAM,CAAC,KAAK,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,mCAAmC;YAC7C,OAAO,EAAE,GAAG;YACZ,SAAS,EAAE,IAAI;YACf,MAAM,EAAE,IAAI;SACb,CAAC;aACD,MAAM,CAAC,cAAc,EAAE;YACtB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,mCAAmC;YAC7C,OAAO,EAAE,SAAS;SACnB,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,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;QACjD,MAAM,KAAK,CAAC,IAAiB,CAAC,CAAC;IACjC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { Arguments, build } from \"../build/handler.js\";\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\";\n\nexport default {\n // For now, hide this command\n desc: false,\n // desc: \"Compiles/builds a self-contained zup\",\n command: \"build\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .option(\"dir\", {\n type: \"string\",\n describe: \"The directory containing your zup\",\n default: \".\",\n normalize: true,\n hidden: true,\n })\n .option(\"customDomain\", {\n type: \"string\",\n describe: \"The custom domain for the project\",\n default: undefined,\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({ argv, event: \"zup build\" });\n await build(argv as Arguments);\n },\n};\n"]}
1
+ {"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/cmds/build.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACvD,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;AAE3D,eAAe;IAEb,IAAI,EAAE,KAAK;IAEX,OAAO,EAAE,OAAO;IAChB,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,cAAc,EAAE;YACtB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,mCAAmC;YAC7C,OAAO,EAAE,SAAS;SACnB,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,EAAE,IAAI,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,CAAC;QACnD,MAAM,KAAK,CAAC,IAAiB,CAAC,CAAC;IACjC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { Arguments, build } from \"../build/handler.js\";\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\";\n\nexport default {\n // For now, hide this command\n desc: false,\n // desc: \"Compiles/builds a self-contained Zuplo API\",\n command: \"build\",\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(\"customDomain\", {\n type: \"string\",\n describe: \"The custom domain for the project\",\n default: undefined,\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({ argv, event: \"zuplo build\" });\n await build(argv as Arguments);\n },\n};\n"]}
@@ -11,19 +11,19 @@ export default {
11
11
  return yargs
12
12
  .option("dir", {
13
13
  type: "string",
14
- describe: "The directory containing your zup",
14
+ describe: "The directory containing your Zuplo API",
15
15
  default: ".",
16
16
  normalize: true,
17
17
  hidden: true,
18
18
  })
19
19
  .option("bundled-dir", {
20
20
  type: "string",
21
- describe: "The directory representing a built zup's sources. Use to skip build and bundling.",
21
+ describe: "The directory representing a built Zuplo API's sources. Use to skip build and bundling.",
22
22
  hidden: true,
23
23
  })
24
24
  .option("port", {
25
25
  type: "number",
26
- describe: "The port to run the zup server on",
26
+ describe: "The port to run the Zuplo API server on",
27
27
  default: 9000,
28
28
  })
29
29
  .option("binary-name", {
@@ -48,7 +48,7 @@ export default {
48
48
  });
49
49
  },
50
50
  handler: async (argv) => {
51
- await captureEvent({ argv, event: "zup compile" });
51
+ await captureEvent({ argv, event: "zuplo compile" });
52
52
  await compile(argv);
53
53
  },
54
54
  };
@@ -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,MA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AAE,aAAa,EAAE,CAAC,CAAC;QACnD,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 zup 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 zup\",\n default: \".\",\n normalize: true,\n hidden: true,\n })\n .option(\"bundled-dir\", {\n type: \"string\",\n describe:\n \"The directory representing a built zup'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 zup 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: \"zup 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;AAC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C;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"]}
@@ -17,7 +17,7 @@ export default {
17
17
  .middleware([setBlocking, identify]);
18
18
  },
19
19
  handler: async (argv) => {
20
- await captureEvent({ argv, event: "zup convert" });
20
+ await captureEvent({ argv, event: "zuplo convert" });
21
21
  await convert(argv);
22
22
  },
23
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"convert.js","sourceRoot":"","sources":["../../src/cmds/convert.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,EAAa,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAE3D,eAAe;IACb,IAAI,EAAE,yCAAyC;IAC/C,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,kDAAkD;YAC5D,OAAO,EAAE,GAAG;YACZ,SAAS,EAAE,IAAI;YACf,MAAM,EAAE,IAAI;SACb,CAAC;aACD,UAAU,CAAC,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,CAAC;QACnD,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 { Arguments, convert } from \"../convert/handler.js\";\n\nexport default {\n desc: \"Converts routes.json to routes.oas.json\",\n command: \"convert\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .option(\"dir\", {\n type: \"string\",\n describe: \"The directory containing your config/routes.json\",\n default: \".\",\n normalize: true,\n hidden: true,\n })\n .middleware([setBlocking, identify]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zup convert\" });\n await convert(argv as Arguments);\n },\n};\n"]}
1
+ {"version":3,"file":"convert.js","sourceRoot":"","sources":["../../src/cmds/convert.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,EAAa,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAE3D,eAAe;IACb,IAAI,EAAE,yCAAyC;IAC/C,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,kDAAkD;YAC5D,OAAO,EAAE,GAAG;YACZ,SAAS,EAAE,IAAI;YACf,MAAM,EAAE,IAAI;SACb,CAAC;aACD,UAAU,CAAC,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;IACzC,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 { Arguments, convert } from \"../convert/handler.js\";\n\nexport default {\n desc: \"Converts routes.json to routes.oas.json\",\n command: \"convert\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .option(\"dir\", {\n type: \"string\",\n describe: \"The directory containing your config/routes.json\",\n default: \".\",\n normalize: true,\n hidden: true,\n })\n .middleware([setBlocking, identify]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo convert\" });\n await convert(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;;;;qBAYV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBAgCf,OAAO;;AAnC/B,wBAuCE"}
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;oBAgCf,OAAO;;AAnC/B,wBAuCE"}
@@ -1,4 +1,5 @@
1
1
  import { captureEvent } from "../common/analytics/lib.js";
2
+ import { authenticate } from "../common/middleware/authentication.js";
2
3
  import { configure } from "../common/middleware/user-configuration.js";
3
4
  import { identify } from "../common/middleware/user-identification.js";
4
5
  import setBlocking from "../common/output.js";
@@ -6,7 +7,7 @@ import { YargsChecker } from "../common/validators/lib.js";
6
7
  import { ProjectIsSetValidator } from "../common/validators/project-name-validator.js";
7
8
  import { deleteZup } from "../delete/handler.js";
8
9
  export default {
9
- desc: "Deletes the zup at the URL",
10
+ desc: "Deletes the Zuplo API at the URL",
10
11
  command: "delete",
11
12
  builder: (yargs) => {
12
13
  return yargs
@@ -17,7 +18,7 @@ export default {
17
18
  })
18
19
  .option("url", {
19
20
  type: "string",
20
- describe: "The URL of the zup to delete",
21
+ describe: "The URL of the Zuplo API to delete",
21
22
  })
22
23
  .option("project", {
23
24
  type: "string",
@@ -25,21 +26,21 @@ export default {
25
26
  })
26
27
  .option("wait", {
27
28
  type: "boolean",
28
- describe: "Should the CLI wait until the zup is deleted",
29
+ describe: "Should the CLI wait until the Zuplo API is deleted",
29
30
  })
30
31
  .option("self-hosted-endpoint", {
31
32
  type: "string",
32
33
  describe: "The endpoint of your self-hosted service to deploy to",
33
34
  })
34
35
  .boolean("wait")
35
- .demandOption(["api-key", "url"])
36
- .middleware([setBlocking, configure, identify])
36
+ .demandOption(["url"])
37
+ .middleware([setBlocking, authenticate, configure, identify])
37
38
  .check(async (argv) => {
38
39
  return await new YargsChecker(new ProjectIsSetValidator()).check(argv);
39
40
  });
40
41
  },
41
42
  handler: async (argv) => {
42
- await captureEvent({ argv, event: "zup delete" });
43
+ await captureEvent({ argv, event: "zuplo delete" });
43
44
  await deleteZup(argv);
44
45
  },
45
46
  };
@@ -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,SAAS,EAAE,MAAM,4CAA4C,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAa,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE5D,eAAe;IACb,IAAI,EAAE,4BAA4B;IAClC,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,8BAA8B;SACzC,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,8CAA8C;SACzD,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,SAAS,EAAE,KAAK,CAAC,CAAC;aAChC,UAAU,CAAC,CAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;aAC9C,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,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;QAClD,MAAM,SAAS,CAAC,IAAiB,CAAC,CAAC;IACrC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../common/analytics/lib.js\";\nimport { configure } from \"../common/middleware/user-configuration.js\";\nimport { identify } from \"../common/middleware/user-identification.js\";\nimport setBlocking from \"../common/output.js\";\nimport { YargsChecker } from \"../common/validators/lib.js\";\nimport { ProjectIsSetValidator } from \"../common/validators/project-name-validator.js\";\nimport { Arguments, deleteZup } from \"../delete/handler.js\";\n\nexport default {\n desc: \"Deletes the zup 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 zup to delete\",\n })\n .option(\"project\", {\n type: \"string\",\n describe: \"The project name\",\n })\n .option(\"wait\", {\n type: \"boolean\",\n describe: \"Should the CLI wait until the zup 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([\"api-key\", \"url\"])\n .middleware([setBlocking, configure, identify])\n .check(async (argv) => {\n return await new YargsChecker<typeof argv>(\n new ProjectIsSetValidator()\n ).check(argv);\n });\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zup 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,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAa,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE5D,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,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,UAAU,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;aAC5D,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,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 { YargsChecker } from \"../common/validators/lib.js\";\nimport { ProjectIsSetValidator } from \"../common/validators/project-name-validator.js\";\nimport { Arguments, deleteZup } from \"../delete/handler.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(\"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([setBlocking, authenticate, configure, identify])\n .check(async (argv) => {\n return await new YargsChecker<typeof argv>(\n new ProjectIsSetValidator()\n ).check(argv);\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;;;;qBAYV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBAkDf,OAAO;;AArD/B,wBAyDE"}
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/cmds/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAaV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBAiDf,OAAO;;AApD/B,wBAwDE"}
@@ -1,4 +1,5 @@
1
1
  import { captureEvent } from "../common/analytics/lib.js";
2
+ import { authenticate } from "../common/middleware/authentication.js";
2
3
  import { configure } from "../common/middleware/user-configuration.js";
3
4
  import { identify } from "../common/middleware/user-identification.js";
4
5
  import setBlocking from "../common/output.js";
@@ -22,7 +23,7 @@ export default {
22
23
  })
23
24
  .option("dir", {
24
25
  type: "string",
25
- describe: "The directory containing your zup",
26
+ describe: "The directory containing your Zuplo API",
26
27
  default: ".",
27
28
  normalize: true,
28
29
  hidden: true,
@@ -47,15 +48,14 @@ export default {
47
48
  default: undefined,
48
49
  hidden: true,
49
50
  })
50
- .demandOption(["api-key"])
51
51
  .boolean("verify-remote")
52
- .middleware([setBlocking, configure, identify])
52
+ .middleware([setBlocking, authenticate, configure, identify])
53
53
  .check(async (argv) => {
54
54
  return await new YargsChecker(validDeployDirectoryValidator).check(argv);
55
55
  });
56
56
  },
57
57
  handler: async (argv) => {
58
- await captureEvent({ argv, event: "zup deploy" });
58
+ await captureEvent({ argv, event: "zuplo deploy" });
59
59
  await deploy(argv);
60
60
  },
61
61
  };
@@ -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,SAAS,EAAE,MAAM,4CAA4C,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAa,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEzD,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,KAAK,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,mCAAmC;YAC7C,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,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC;aACzB,OAAO,CAAC,eAAe,CAAC;aACxB,UAAU,CAAC,CAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;aAC9C,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YACpB,OAAO,MAAM,IAAI,YAAY,CAC3B,6BAA6B,CAC9B,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,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;QAClD,MAAM,MAAM,CAAC,IAAiB,CAAC,CAAC;IAClC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../common/analytics/lib.js\";\nimport { configure } from \"../common/middleware/user-configuration.js\";\nimport { identify } from \"../common/middleware/user-identification.js\";\nimport setBlocking from \"../common/output.js\";\nimport { validDeployDirectoryValidator } from \"../common/validators/file-system-validator.js\";\nimport { YargsChecker } from \"../common/validators/lib.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 .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(\"dir\", {\n type: \"string\",\n describe: \"The directory containing your zup\",\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 .demandOption([\"api-key\"])\n .boolean(\"verify-remote\")\n .middleware([setBlocking, configure, identify])\n .check(async (argv) => {\n return await new YargsChecker<typeof argv>(\n validDeployDirectoryValidator\n ).check(argv);\n });\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zup 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,SAAS,EAAE,MAAM,4CAA4C,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AACvE,OAAO,WAAW,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,6BAA6B,EAAE,MAAM,+CAA+C,CAAC;AAC9F,OAAO,EAAE,YAAY,EAAE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AAO,MAAM,IAAI,YAAY,CAC3B,6BAA6B,CAC9B,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,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 { validDeployDirectoryValidator } from \"../common/validators/file-system-validator.js\";\nimport { YargsChecker } from \"../common/validators/lib.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 .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(\"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 .boolean(\"verify-remote\")\n .middleware([setBlocking, authenticate, configure, identify])\n .check(async (argv) => {\n return await new YargsChecker<typeof argv>(\n validDeployDirectoryValidator\n ).check(argv);\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/dev.js CHANGED
@@ -5,13 +5,13 @@ import { ZuploProjectValidator } from "../common/validators/file-system-validato
5
5
  import { YargsChecker } from "../common/validators/lib.js";
6
6
  import { dev } from "../dev/handler.js";
7
7
  export default {
8
- desc: "Runs the zup locally",
8
+ desc: "Runs the Zuplo API locally",
9
9
  command: "dev",
10
10
  builder: (yargs) => {
11
11
  return yargs
12
12
  .option("dir", {
13
13
  type: "string",
14
- describe: "The directory containing your zup",
14
+ describe: "The directory containing your Zuplo API",
15
15
  default: ".",
16
16
  normalize: true,
17
17
  hidden: true,
@@ -46,7 +46,7 @@ export default {
46
46
  properties: {
47
47
  "debug-port": argv["debugPort"],
48
48
  },
49
- event: "zup dev",
49
+ event: "zuplo dev",
50
50
  });
51
51
  await dev(argv);
52
52
  },
@@ -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,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAa,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEnD,eAAe;IACb,IAAI,EAAE,sBAAsB;IAC5B,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,MAAM,CAAC,KAAK,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,mCAAmC;YAC7C,OAAO,EAAE,GAAG;YACZ,SAAS,EAAE,IAAI;YACf,MAAM,EAAE,IAAI;SACb,CAAC;aACD,MAAM,CAAC,cAAc,EAAE;YACtB,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,wCAAwC;YAClD,OAAO,EAAE,IAAI;SACd,CAAC;aACD,MAAM,CAAC,MAAM,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,qCAAqC;YAC/C,OAAO,EAAE,IAAI;SACd,CAAC;aACD,MAAM,CAAC,aAAa,EAAE;YACrB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,uCAAuC;YACjD,OAAO,EAAE,IAAI;SACd,CAAC;aACD,MAAM,CAAC,YAAY,EAAE;YACpB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,yCAAyC;SACpD,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;aAC/C;YACD,KAAK,EAAE,SAAS;SACjB,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 zup 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 zup\",\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 .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 },\n event: \"zup dev\",\n });\n await dev(argv as Arguments);\n },\n};\n"]}
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,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAa,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEnD,eAAe;IACb,IAAI,EAAE,4BAA4B;IAClC,OAAO,EAAE,KAAK;IACd,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,cAAc,EAAE;YACtB,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,wCAAwC;YAClD,OAAO,EAAE,IAAI;SACd,CAAC;aACD,MAAM,CAAC,MAAM,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,qCAAqC;YAC/C,OAAO,EAAE,IAAI;SACd,CAAC;aACD,MAAM,CAAC,aAAa,EAAE;YACrB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,uCAAuC;YACjD,OAAO,EAAE,IAAI;SACd,CAAC;aACD,MAAM,CAAC,YAAY,EAAE;YACpB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,yCAAyC;SACpD,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;aAC/C;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 .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 },\n event: \"zuplo dev\",\n });\n await dev(argv as Arguments);\n },\n};\n"]}
@@ -11,7 +11,7 @@ export default {
11
11
  return yargs
12
12
  .option("dir", {
13
13
  type: "string",
14
- describe: "The directory containing your zup",
14
+ describe: "The directory containing your Zuplo API",
15
15
  default: ".",
16
16
  normalize: false,
17
17
  hidden: true,
@@ -27,7 +27,7 @@ export default {
27
27
  });
28
28
  },
29
29
  handler: async (argv) => {
30
- await captureEvent({ argv, event: "zup editor" });
30
+ await captureEvent({ argv, event: "zuplo editor" });
31
31
  await editor(argv);
32
32
  },
33
33
  };
@@ -1 +1 @@
1
- {"version":3,"file":"editor.js","sourceRoot":"","sources":["../../src/cmds/editor.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,EAAc,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE1D,eAAe;IACb,IAAI,EAAE,kCAAkC;IACxC,OAAO,EAAE,QAAQ;IAEjB,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,MAAM,CAAC,KAAK,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,mCAAmC;YAC7C,OAAO,EAAE,GAAG;YACZ,SAAS,EAAE,KAAK;YAChB,MAAM,EAAE,IAAI;SACb,CAAC;aACD,MAAM,CAAC,MAAM,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,uCAAuC;YACjD,OAAO,EAAE,MAAM;SAChB,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,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;QAClD,MAAM,MAAM,CAAC,IAAkB,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 { EditorArgs, editor } from \"../editor/handler.js\";\n\nexport default {\n desc: \"Starts a local Open API Designer\",\n command: \"editor\",\n\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .option(\"dir\", {\n type: \"string\",\n describe: \"The directory containing your zup\",\n default: \".\",\n normalize: false,\n hidden: true,\n })\n .option(\"port\", {\n type: \"number\",\n describe: \"The port to run the route designer on\",\n default: \"9100\",\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({ argv, event: \"zup editor\" });\n await editor(argv as EditorArgs);\n },\n};\n"]}
1
+ {"version":3,"file":"editor.js","sourceRoot":"","sources":["../../src/cmds/editor.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,EAAc,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE1D,eAAe;IACb,IAAI,EAAE,kCAAkC;IACxC,OAAO,EAAE,QAAQ;IAEjB,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,KAAK;YAChB,MAAM,EAAE,IAAI;SACb,CAAC;aACD,MAAM,CAAC,MAAM,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,uCAAuC;YACjD,OAAO,EAAE,MAAM;SAChB,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,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,CAAC;QACpD,MAAM,MAAM,CAAC,IAAkB,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 { EditorArgs, editor } from \"../editor/handler.js\";\n\nexport default {\n desc: \"Starts a local Open API Designer\",\n command: \"editor\",\n\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: false,\n hidden: true,\n })\n .option(\"port\", {\n type: \"number\",\n describe: \"The port to run the route designer on\",\n default: \"9100\",\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({ argv, event: \"zuplo editor\" });\n await editor(argv as EditorArgs);\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;;;;qBAYV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBA8Bf,OAAO;;AAjC/B,wBAqCE"}
1
+ {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/cmds/link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAaV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBA8Bf,OAAO;;AAjC/B,wBAqCE"}
package/dist/cmds/link.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { captureEvent } from "../common/analytics/lib.js";
2
+ import { authenticate } from "../common/middleware/authentication.js";
2
3
  import { configure } from "../common/middleware/user-configuration.js";
3
4
  import { identify } from "../common/middleware/user-identification.js";
4
5
  import setBlocking from "../common/output.js";
@@ -12,7 +13,7 @@ export default {
12
13
  return yargs
13
14
  .option("dir", {
14
15
  type: "string",
15
- describe: "The directory containing your zup",
16
+ describe: "The directory containing your Zuplo API",
16
17
  default: ".",
17
18
  normalize: true,
18
19
  hidden: true,
@@ -30,14 +31,13 @@ export default {
30
31
  type: "string",
31
32
  describe: "The environment name",
32
33
  })
33
- .demandOption(["api-key"])
34
- .middleware([setBlocking, configure, identify])
34
+ .middleware([setBlocking, authenticate, configure, identify])
35
35
  .check(async (argv) => {
36
36
  return await new YargsChecker(new ZuploProjectValidator()).check(argv);
37
37
  });
38
38
  },
39
39
  handler: async (argv) => {
40
- await captureEvent({ argv, event: "zup link" });
40
+ await captureEvent({ argv, event: "zuplo link" });
41
41
  await link(argv);
42
42
  },
43
43
  };
@@ -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,SAAS,EAAE,MAAM,4CAA4C,CAAC;AACvE,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,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAErD,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,mCAAmC;YAC7C,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,aAAa,EAAE;YACrB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,sBAAsB;SACjC,CAAC;aACD,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC;aACzB,UAAU,CAAC,CAAC,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;aAC9C,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,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;QAChD,MAAM,IAAI,CAAC,IAAiB,CAAC,CAAC;IAChC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../common/analytics/lib.js\";\nimport { configure } from \"../common/middleware/user-configuration.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, link } from \"../link/handler.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 zup\",\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(\"environment\", {\n type: \"string\",\n describe: \"The environment name\",\n })\n .demandOption([\"api-key\"])\n .middleware([setBlocking, configure, 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({ argv, event: \"zup 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,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAa,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAErD,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,aAAa,EAAE;YACrB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,sBAAsB;SACjC,CAAC;aAED,UAAU,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;aAC5D,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,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 { ZuploProjectValidator } from \"../common/validators/file-system-validator.js\";\nimport { YargsChecker } from \"../common/validators/lib.js\";\nimport { Arguments, link } from \"../link/handler.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(\"environment\", {\n type: \"string\",\n describe: \"The environment name\",\n })\n\n .middleware([setBlocking, authenticate, configure, 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({ 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;;;;qBAYV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBAuBf,OAAO;;AA1B/B,wBA8BE"}
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;oBAsBf,OAAO;;AAzB/B,wBA6BE"}