@zuplo/cli 6.54.29 → 6.55.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cmds/tunnel/create.d.ts.map +1 -1
- package/dist/cmds/tunnel/create.js +2 -1
- package/dist/cmds/tunnel/create.js.map +1 -1
- package/dist/cmds/tunnel/delete.d.ts.map +1 -1
- package/dist/cmds/tunnel/delete.js +2 -1
- package/dist/cmds/tunnel/delete.js.map +1 -1
- package/dist/cmds/tunnel/describe.d.ts.map +1 -1
- package/dist/cmds/tunnel/describe.js +2 -1
- package/dist/cmds/tunnel/describe.js.map +1 -1
- package/dist/cmds/tunnel/list.d.ts.map +1 -1
- package/dist/cmds/tunnel/list.js +2 -1
- package/dist/cmds/tunnel/list.js.map +1 -1
- package/dist/cmds/tunnel/rotate-token.d.ts.map +1 -1
- package/dist/cmds/tunnel/rotate-token.js +2 -1
- package/dist/cmds/tunnel/rotate-token.js.map +1 -1
- package/dist/common/middleware/user-configuration.d.ts.map +1 -1
- package/dist/common/middleware/user-configuration.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/cmds/tunnel/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/cmds/tunnel/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAWV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBAef,OAAO;;AAlB/B,wBAsBE"}
|
|
@@ -3,6 +3,7 @@ import { authenticate } from "../../common/middleware/authentication.js";
|
|
|
3
3
|
import { identify } from "../../common/middleware/user-identification.js";
|
|
4
4
|
import setBlocking from "../../common/output.js";
|
|
5
5
|
import { create } from "../../tunnel/create/handler.js";
|
|
6
|
+
import { configure } from "../../common/middleware/user-configuration.js";
|
|
6
7
|
export default {
|
|
7
8
|
desc: "Creates a new tunnel in your account",
|
|
8
9
|
command: "create",
|
|
@@ -19,7 +20,7 @@ export default {
|
|
|
19
20
|
})
|
|
20
21
|
.demandOption(["tunnel-name"])
|
|
21
22
|
.demandOption("api-key", "You must provide an API key with --api-key")
|
|
22
|
-
.middleware([setBlocking, authenticate, identify]);
|
|
23
|
+
.middleware([setBlocking, authenticate, configure, identify]);
|
|
23
24
|
},
|
|
24
25
|
handler: async (argv) => {
|
|
25
26
|
await captureEvent({ argv, event: "zuplo tunnel create" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/cmds/tunnel/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAa,MAAM,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/cmds/tunnel/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAa,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAE1E,eAAe;IACb,IAAI,EAAE,sCAAsC;IAC5C,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,MAAM,CAAC,aAAa,EAAE;YACrB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kCAAkC;SAC7C,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,wBAAwB;YAClC,MAAM,EAAE,SAAS;SAClB,CAAC;aACD,YAAY,CAAC,CAAC,aAAa,CAAC,CAAC;aAC7B,YAAY,CAAC,SAAS,EAAE,4CAA4C,CAAC;aACrE,UAAU,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,qBAAqB,EAAE,CAAC,CAAC;QAC3D,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 { identify } from \"../../common/middleware/user-identification.js\";\nimport setBlocking from \"../../common/output.js\";\nimport { Arguments, create } from \"../../tunnel/create/handler.js\";\nimport { configure } from \"../../common/middleware/user-configuration.js\";\n\nexport default {\n desc: \"Creates a new tunnel in your account\",\n command: \"create\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .option(\"tunnel-name\", {\n type: \"string\",\n describe: \"The name of the tunnel to create\",\n })\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .demandOption([\"tunnel-name\"])\n .demandOption(\"api-key\", \"You must provide an API key with --api-key\")\n .middleware([setBlocking, authenticate, configure, identify]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo tunnel create\" });\n await create(argv as Arguments);\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/cmds/tunnel/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/cmds/tunnel/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAWV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBAUf,OAAO;;AAb/B,wBAiBE"}
|
|
@@ -3,6 +3,7 @@ import { authenticate } from "../../common/middleware/authentication.js";
|
|
|
3
3
|
import { identify } from "../../common/middleware/user-identification.js";
|
|
4
4
|
import setBlocking from "../../common/output.js";
|
|
5
5
|
import { deleteTunnel } from "../../tunnel/delete/handler.js";
|
|
6
|
+
import { configure } from "../../common/middleware/user-configuration.js";
|
|
6
7
|
export default {
|
|
7
8
|
desc: "Deletes a tunnel in your account",
|
|
8
9
|
command: "delete",
|
|
@@ -14,7 +15,7 @@ export default {
|
|
|
14
15
|
envVar: "API_KEY",
|
|
15
16
|
})
|
|
16
17
|
.demandOption("api-key", "You must provide an API key with --api-key")
|
|
17
|
-
.middleware([setBlocking, authenticate, identify]);
|
|
18
|
+
.middleware([setBlocking, authenticate, configure, identify]);
|
|
18
19
|
},
|
|
19
20
|
handler: async (argv) => {
|
|
20
21
|
await captureEvent({ argv, event: "zuplo tunnel delete" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../src/cmds/tunnel/delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAa,YAAY,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../src/cmds/tunnel/delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAa,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAE1E,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,YAAY,CAAC,SAAS,EAAE,4CAA4C,CAAC;aACrE,UAAU,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,qBAAqB,EAAE,CAAC,CAAC;QAC3D,MAAM,YAAY,CAAC,IAAiB,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 { identify } from \"../../common/middleware/user-identification.js\";\nimport setBlocking from \"../../common/output.js\";\nimport { Arguments, deleteTunnel } from \"../../tunnel/delete/handler.js\";\nimport { configure } from \"../../common/middleware/user-configuration.js\";\n\nexport default {\n desc: \"Deletes a tunnel in your account\",\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 .demandOption(\"api-key\", \"You must provide an API key with --api-key\")\n .middleware([setBlocking, authenticate, configure, identify]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo tunnel delete\" });\n await deleteTunnel(argv as Arguments);\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe.d.ts","sourceRoot":"","sources":["../../../src/cmds/tunnel/describe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"describe.d.ts","sourceRoot":"","sources":["../../../src/cmds/tunnel/describe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAWV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBAef,OAAO;;AAlB/B,wBAsBE"}
|
|
@@ -3,6 +3,7 @@ import { authenticate } from "../../common/middleware/authentication.js";
|
|
|
3
3
|
import { identify } from "../../common/middleware/user-identification.js";
|
|
4
4
|
import setBlocking from "../../common/output.js";
|
|
5
5
|
import { describe } from "../../tunnel/describe/handler.js";
|
|
6
|
+
import { configure } from "../../common/middleware/user-configuration.js";
|
|
6
7
|
export default {
|
|
7
8
|
desc: "Describes a tunnel in your account",
|
|
8
9
|
command: "describe",
|
|
@@ -19,7 +20,7 @@ export default {
|
|
|
19
20
|
})
|
|
20
21
|
.demandOption(["tunnel-id"])
|
|
21
22
|
.demandOption("api-key", "You must provide an API key with --api-key")
|
|
22
|
-
.middleware([setBlocking, authenticate, identify]);
|
|
23
|
+
.middleware([setBlocking, authenticate, configure, identify]);
|
|
23
24
|
},
|
|
24
25
|
handler: async (argv) => {
|
|
25
26
|
await captureEvent({ argv, event: "zuplo tunnel describe" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe.js","sourceRoot":"","sources":["../../../src/cmds/tunnel/describe.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAa,QAAQ,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"describe.js","sourceRoot":"","sources":["../../../src/cmds/tunnel/describe.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAa,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAE1E,eAAe;IACb,IAAI,EAAE,oCAAoC;IAC1C,OAAO,EAAE,UAAU;IACnB,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,MAAM,CAAC,WAAW,EAAE;YACnB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,kCAAkC;SAC7C,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,wBAAwB;YAClC,MAAM,EAAE,SAAS;SAClB,CAAC;aACD,YAAY,CAAC,CAAC,WAAW,CAAC,CAAC;aAC3B,YAAY,CAAC,SAAS,EAAE,4CAA4C,CAAC;aACrE,UAAU,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,uBAAuB,EAAE,CAAC,CAAC;QAC7D,MAAM,QAAQ,CAAC,IAAiB,CAAC,CAAC;IACpC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../../common/analytics/lib.js\";\nimport { authenticate } from \"../../common/middleware/authentication.js\";\nimport { identify } from \"../../common/middleware/user-identification.js\";\nimport setBlocking from \"../../common/output.js\";\nimport { Arguments, describe } from \"../../tunnel/describe/handler.js\";\nimport { configure } from \"../../common/middleware/user-configuration.js\";\n\nexport default {\n desc: \"Describes a tunnel in your account\",\n command: \"describe\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .option(\"tunnel-id\", {\n type: \"string\",\n describe: \"The ID of the tunnel to describe\",\n })\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .demandOption([\"tunnel-id\"])\n .demandOption(\"api-key\", \"You must provide an API key with --api-key\")\n .middleware([setBlocking, authenticate, configure, identify]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo tunnel describe\" });\n await describe(argv as Arguments);\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/cmds/tunnel/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/cmds/tunnel/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAWV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBAUf,OAAO;;AAb/B,wBAiBE"}
|
package/dist/cmds/tunnel/list.js
CHANGED
|
@@ -3,6 +3,7 @@ import { authenticate } from "../../common/middleware/authentication.js";
|
|
|
3
3
|
import { identify } from "../../common/middleware/user-identification.js";
|
|
4
4
|
import setBlocking from "../../common/output.js";
|
|
5
5
|
import { list } from "../../tunnel/list/handler.js";
|
|
6
|
+
import { configure } from "../../common/middleware/user-configuration.js";
|
|
6
7
|
export default {
|
|
7
8
|
desc: "Lists the tunnels in your account",
|
|
8
9
|
command: "list",
|
|
@@ -14,7 +15,7 @@ export default {
|
|
|
14
15
|
envVar: "API_KEY",
|
|
15
16
|
})
|
|
16
17
|
.demandOption("api-key", "You must provide an API key with --api-key")
|
|
17
|
-
.middleware([setBlocking, authenticate, identify]);
|
|
18
|
+
.middleware([setBlocking, authenticate, configure, identify]);
|
|
18
19
|
},
|
|
19
20
|
handler: async (argv) => {
|
|
20
21
|
await captureEvent({ argv, event: "zuplo tunnel list" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/cmds/tunnel/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAa,IAAI,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/cmds/tunnel/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAa,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAE1E,eAAe;IACb,IAAI,EAAE,mCAAmC;IACzC,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,YAAY,CAAC,SAAS,EAAE,4CAA4C,CAAC;aACrE,UAAU,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC,CAAC;QACzD,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 { identify } from \"../../common/middleware/user-identification.js\";\nimport setBlocking from \"../../common/output.js\";\nimport { Arguments, list } from \"../../tunnel/list/handler.js\";\nimport { configure } from \"../../common/middleware/user-configuration.js\";\n\nexport default {\n desc: \"Lists the tunnels in your account\",\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 .demandOption(\"api-key\", \"You must provide an API key with --api-key\")\n .middleware([setBlocking, authenticate, configure, identify]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo tunnel list\" });\n await list(argv as Arguments);\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rotate-token.d.ts","sourceRoot":"","sources":["../../../src/cmds/tunnel/rotate-token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"rotate-token.d.ts","sourceRoot":"","sources":["../../../src/cmds/tunnel/rotate-token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;;;;qBAWV,IAAI,KAAG,IAAI,CAAC,OAAO,CAAC;oBAef,OAAO;;AAlB/B,wBAsBE"}
|
|
@@ -3,6 +3,7 @@ import { authenticate } from "../../common/middleware/authentication.js";
|
|
|
3
3
|
import { identify } from "../../common/middleware/user-identification.js";
|
|
4
4
|
import setBlocking from "../../common/output.js";
|
|
5
5
|
import { rotateToken } from "../../tunnel/rotate-token/handler.js";
|
|
6
|
+
import { configure } from "../../common/middleware/user-configuration.js";
|
|
6
7
|
export default {
|
|
7
8
|
desc: "Rotates the token for a tunnel in your account",
|
|
8
9
|
command: "rotate-token",
|
|
@@ -19,7 +20,7 @@ export default {
|
|
|
19
20
|
})
|
|
20
21
|
.demandOption(["tunnel-id"])
|
|
21
22
|
.demandOption("api-key", "You must provide an API key with --api-key")
|
|
22
|
-
.middleware([setBlocking, authenticate, identify]);
|
|
23
|
+
.middleware([setBlocking, authenticate, configure, identify]);
|
|
23
24
|
},
|
|
24
25
|
handler: async (argv) => {
|
|
25
26
|
await captureEvent({ argv, event: "zuplo tunnel rotate-token" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rotate-token.js","sourceRoot":"","sources":["../../../src/cmds/tunnel/rotate-token.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAa,WAAW,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"rotate-token.js","sourceRoot":"","sources":["../../../src/cmds/tunnel/rotate-token.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAa,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAE1E,eAAe;IACb,IAAI,EAAE,gDAAgD;IACtD,OAAO,EAAE,cAAc;IACvB,OAAO,EAAE,CAAC,KAAW,EAAiB,EAAE;QACtC,OAAO,KAAK;aACT,MAAM,CAAC,WAAW,EAAE;YACnB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,8CAA8C;SACzD,CAAC;aACD,MAAM,CAAC,SAAS,EAAE;YACjB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,wBAAwB;YAClC,MAAM,EAAE,SAAS;SAClB,CAAC;aACD,YAAY,CAAC,CAAC,WAAW,CAAC,CAAC;aAC3B,YAAY,CAAC,SAAS,EAAE,4CAA4C,CAAC;aACrE,UAAU,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAa,EAAE,EAAE;QAC/B,MAAM,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,2BAA2B,EAAE,CAAC,CAAC;QACjE,MAAM,WAAW,CAAC,IAAiB,CAAC,CAAC;IACvC,CAAC;CACF,CAAC","sourcesContent":["import { Argv } from \"yargs\";\nimport { captureEvent } from \"../../common/analytics/lib.js\";\nimport { authenticate } from \"../../common/middleware/authentication.js\";\nimport { identify } from \"../../common/middleware/user-identification.js\";\nimport setBlocking from \"../../common/output.js\";\nimport { Arguments, rotateToken } from \"../../tunnel/rotate-token/handler.js\";\nimport { configure } from \"../../common/middleware/user-configuration.js\";\n\nexport default {\n desc: \"Rotates the token for a tunnel in your account\",\n command: \"rotate-token\",\n builder: (yargs: Argv): Argv<unknown> => {\n return yargs\n .option(\"tunnel-id\", {\n type: \"string\",\n describe: \"The ID of the tunnel to rotate the token for\",\n })\n .option(\"api-key\", {\n type: \"string\",\n describe: \"The API Key from Zuplo\",\n envVar: \"API_KEY\",\n })\n .demandOption([\"tunnel-id\"])\n .demandOption(\"api-key\", \"You must provide an API key with --api-key\")\n .middleware([setBlocking, authenticate, configure, identify]);\n },\n handler: async (argv: unknown) => {\n await captureEvent({ argv, event: \"zuplo tunnel rotate-token\" });\n await rotateToken(argv as Arguments);\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-configuration.d.ts","sourceRoot":"","sources":["../../../src/common/middleware/user-configuration.ts"],"names":[],"mappings":"AA6BA,wBAAsB,SAAS,CAAC,IAAI,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"user-configuration.d.ts","sourceRoot":"","sources":["../../../src/common/middleware/user-configuration.ts"],"names":[],"mappings":"AA6BA,wBAAsB,SAAS,CAAC,IAAI,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,iBAmD/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-configuration.js","sourceRoot":"","sources":["../../../src/common/middleware/user-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAc,KAAK,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EACL,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EACL,oCAAoC,EACpC,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AAgBtC,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,IAAgC;IAI9D,MAAM,0BAA0B,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;IAG/C,MAAM,cAAc,GAAG,MAAM,KAAK,CAChC,GAAG,QAAQ,CAAC,4BAA4B,cAAc,EACtD;QACE,MAAM,EAAE,KAAK;QACb,OAAO,EAAE;YACP,aAAa,EAAE,UAAU,IAAI,CAAC,SAAS,EAAE;SAC1C;KACF,CACF,CAAC;IAEF,IAAI,cAAc,CAAC,EAAE,EAAE,CAAC;QAMtB,MAAM,cAAc,GAAG,MAAM,cAAc,CAAC,IAAI,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"user-configuration.js","sourceRoot":"","sources":["../../../src/common/middleware/user-configuration.ts"],"names":[],"mappings":"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","sourcesContent":["import { existsSync } from \"node:fs\";\nimport { readFile } from \"node:fs/promises\";\nimport { join, relative } from \"node:path\";\nimport { ParseError, parse } from \"jsonc-parser\";\nimport {\n ZUPLO_FALLBACK_JSON_FILE,\n ZUPLO_PREFERRED_JSON_FILE,\n} from \"../constants.js\";\nimport { logger } from \"../logger.js\";\nimport {\n printCriticalFailureToConsoleAndExit,\n printWarningToConsole,\n} from \"../output.js\";\nimport settings from \"../settings.js\";\n\n/**\n * This is the middleware to set the context for the CLI calls.\n *\n * It can be used to set sensible configurations such as account and project that are gotten from the API, zuplo.jsonc, --parameters\n *\n * The order of setting a configuration is\n * 1. API key\n * 2. zuplo.jsonc\n * 3. --parameters from the CLI invocation\n *\n * Note that --parameters objects can also come from .env file because of https://yargs.js.org/docs/#api-reference-envprefix\n *\n * @param argv - The yargs object\n */\nexport async function configure(argv: { [key: string]: unknown }) {\n // Clone the original value (for merging at the end)\n // The original is the most specific since it can only contain things from --parameters\n // It will always be applied last to override anything from zuplo.jsonc or the API key\n const cliParametersConfiguration = { ...argv };\n\n // Make a call to the API key\n const whoAmIResponse = await fetch(\n `${settings.ZUPLO_DEVELOPER_API_ENDPOINT}/v1/who-am-i`,\n {\n method: \"GET\",\n headers: {\n Authorization: `Bearer ${argv.authToken}`,\n },\n }\n );\n\n if (whoAmIResponse.ok) {\n // Note that the algorithms below are based on \"addition\"\n // You cannot unset/remove a value from the configuration by setting it to null/undefined\n // Do be mindful of parameters that might be the same value since things might be overridden\n\n // Merge any non-null values from the API key\n const apiKeyMetadata = await whoAmIResponse.json();\n\n // The API key metadata response contains the account.\n Object.assign(argv, omitNull(apiKeyMetadata));\n\n // Merge any non-null values from zuplo.jsonc\n // For now, only merge project since zuplo.jsonc could have many keys that might conflict\n const { project: zuploJsoncProject } = await processZuploConfigurationFile(\n argv.dir as string | undefined\n );\n if (zuploJsoncProject) {\n printWarningToConsole(\n \"The project name in zuplo.jsonc is deprecated. Please remove the project key from zuplo.jsonc and use the --project flag or ZUPLO_PROJECT environment variable instead.\"\n );\n argv.project = zuploJsoncProject;\n }\n\n // Merge any non-null values from --parameters\n Object.assign(argv, cliParametersConfiguration);\n } else {\n logger.trace(\n { status: whoAmIResponse.status, statusText: whoAmIResponse.statusText },\n \"Failed to determine who-am-i\"\n );\n await printCriticalFailureToConsoleAndExit(\n \"Error: Failed to validate the API key. Check your API key.\"\n );\n }\n}\n\nasync function processZuploConfigurationFile(\n sourceDirectory: string | undefined\n) {\n const normalizedDir = join(relative(process.cwd(), sourceDirectory ?? \".\"));\n const preferredPath = join(normalizedDir, ZUPLO_PREFERRED_JSON_FILE);\n const fallbackPath = join(normalizedDir, ZUPLO_FALLBACK_JSON_FILE);\n let fileContents = \"{}\";\n if (existsSync(preferredPath)) {\n fileContents = await readFile(preferredPath, \"utf-8\");\n } else if (existsSync(fallbackPath)) {\n fileContents = await readFile(fallbackPath, \"utf-8\");\n } else {\n logger.trace(\"No zuplo.jsonc file found\");\n return {};\n }\n\n // If we get here, we have a zuplo.jsonc (or, zuplo.json) file\n // That means we should report any issues with it.\n const errors: ParseError[] = [];\n const data = parse(fileContents, errors, { allowTrailingComma: true });\n if (errors.length > 0) {\n logger.trace(errors[0], \"Failed to parse zuplo.jsonc\");\n await printCriticalFailureToConsoleAndExit(\n \"Error: Failed to parse the values from zuplo.jsonc. Check your zuplo.jsonc file.\"\n );\n }\n return data;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst omitNull = (obj: any) => {\n Object.keys(obj)\n .filter((k) => obj[k] === null)\n .forEach((k) => delete obj[k]);\n return obj;\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/cli",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.55.1",
|
|
4
4
|
"repository": "https://github.com/zuplo/zuplo",
|
|
5
5
|
"author": "Zuplo, Inc.",
|
|
6
6
|
"type": "module",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"@opentelemetry/api": "1.9.0",
|
|
30
30
|
"@sentry/node": "9.22.0",
|
|
31
31
|
"@swc/core": "1.10.18",
|
|
32
|
-
"@zuplo/core": "6.
|
|
33
|
-
"@zuplo/openapi-tools": "6.
|
|
34
|
-
"@zuplo/runtime": "6.
|
|
32
|
+
"@zuplo/core": "6.55.1",
|
|
33
|
+
"@zuplo/openapi-tools": "6.55.1",
|
|
34
|
+
"@zuplo/runtime": "6.55.1",
|
|
35
35
|
"as-table": "1.0.55",
|
|
36
36
|
"chalk": "5.4.1",
|
|
37
37
|
"chokidar": "3.5.3",
|