@epilot/cli 0.1.18 → 0.1.20

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 (72) hide show
  1. package/README.md +1 -1
  2. package/dist/{access-token-CIM4RLBP.js → access-token-WWE6BDJH.js} +5 -3
  3. package/dist/{add-component-AAVQVPKK.js → add-component-IVVCAUGY.js} +3 -3
  4. package/dist/{address-EDRTUWTP.js → address-EH3C4CVB.js} +5 -3
  5. package/dist/{address-suggestions-S5WEST2N.js → address-suggestions-RRSLOBFW.js} +5 -3
  6. package/dist/{ai-agents-RXDDJDAR.js → ai-agents-HEDTH2EP.js} +5 -3
  7. package/dist/{api-36XROHLK.js → api-5W2UMWCW.js} +3 -3
  8. package/dist/app-TIFX5AYN.js +24 -0
  9. package/dist/{audit-logs-PXGDGJGV.js → audit-logs-YFRK3EFU.js} +5 -3
  10. package/dist/{auth-AAF6Z5WZ.js → auth-CN5EFFDE.js} +4 -4
  11. package/dist/{auth-login-AJ6F5GPQ.js → auth-login-NHWG3STD.js} +27 -6
  12. package/dist/{auth-token-J4FI2RMT.js → auth-token-APXLIQAO.js} +2 -2
  13. package/dist/{automation-LS6MVLP2.js → automation-4DEE3TUI.js} +5 -3
  14. package/dist/{billing-KVYFUKZK.js → billing-XX4VVOPI.js} +5 -3
  15. package/dist/bin/epilot.js +67 -54
  16. package/dist/{blueprint-manifest-W4ZGJD2Z.js → blueprint-manifest-V5MJ3GCA.js} +5 -3
  17. package/dist/{chunk-CEP7S7X3.js → chunk-4TDAAJ6H.js} +1 -1
  18. package/dist/{chunk-BYAEI4Z2.js → chunk-5ZFPCFKV.js} +28 -6
  19. package/dist/{chunk-RSA7K5HB.js → chunk-M3M3C5WH.js} +1 -1
  20. package/dist/{chunk-PDMWUCWD.js → chunk-YHQA2AVG.js} +11 -0
  21. package/dist/config-DGZIMLZK.js +88 -0
  22. package/dist/{configuration-hub-Y7W22GBW.js → configuration-hub-ZSYHJZXF.js} +5 -3
  23. package/dist/{consent-M4QB2HPM.js → consent-QICGZLMO.js} +5 -3
  24. package/dist/{customer-portal-SVO2YCXA.js → customer-portal-UCDUZO6G.js} +5 -3
  25. package/dist/{dashboard-CYCXIX74.js → dashboard-YL5C562L.js} +5 -3
  26. package/dist/{data-governance-DJAAIE6F.js → data-governance-4VMCRLDZ.js} +5 -3
  27. package/dist/{deduplication-M3KEVJRG.js → deduplication-RKRS2COL.js} +5 -3
  28. package/dist/{deploy-4XDFWOEV.js → deploy-HN3M5VTA.js} +3 -3
  29. package/dist/{design-UVJJ2KO2.js → design-CQWCY2IS.js} +5 -3
  30. package/dist/{document-5HB632XE.js → document-JYWQBMSI.js} +5 -3
  31. package/dist/{email-settings-H7HQTDYE.js → email-settings-NG4J6IM6.js} +5 -3
  32. package/dist/{email-template-2DHZ3VKF.js → email-template-GVI34ZOC.js} +5 -3
  33. package/dist/{entity-HED6QHG7.js → entity-AZTQCTNG.js} +5 -3
  34. package/dist/{entity-mapping-QP22B65Z.js → entity-mapping-NN32XUJX.js} +5 -3
  35. package/dist/{environments-6LLEIGWV.js → environments-3ASNXU73.js} +5 -3
  36. package/dist/{event-catalog-2ZCZTATY.js → event-catalog-JU7XOJLT.js} +5 -3
  37. package/dist/{export-JA5N4JCJ.js → export-JDDMBBNS.js} +3 -3
  38. package/dist/{file-R6IIXOIZ.js → file-YDLNXKZR.js} +5 -3
  39. package/dist/{iban-EQD2VROZ.js → iban-7HDVKBUS.js} +5 -3
  40. package/dist/{init-5KGNJEWF.js → init-QZTZF2JC.js} +3 -3
  41. package/dist/{integration-toolkit-4CLQDSK7.js → integration-toolkit-WBDJB76S.js} +5 -3
  42. package/dist/{journey-V7X2KUKH.js → journey-RZ7UI5ZA.js} +5 -3
  43. package/dist/{kanban-EPI6C3FR.js → kanban-7CZGNU52.js} +5 -3
  44. package/dist/{message-477EJ5JO.js → message-BFAKIAPX.js} +5 -3
  45. package/dist/{metering-5EAEKRSL.js → metering-R4HXARRF.js} +5 -3
  46. package/dist/{notes-CVXNRULU.js → notes-MHH5OZ2E.js} +5 -3
  47. package/dist/{notification-6HXS76XP.js → notification-RPBIG3FC.js} +5 -3
  48. package/dist/{organization-O33CZQKD.js → organization-AUBBICVD.js} +5 -3
  49. package/dist/{partner-directory-NZWGCKSB.js → partner-directory-FYZJUNAW.js} +5 -3
  50. package/dist/{permissions-6QEOBJ6M.js → permissions-4TQQYZXO.js} +5 -3
  51. package/dist/{pricing-KNYSULCW.js → pricing-SPMVLPRL.js} +5 -3
  52. package/dist/{pricing-tier-OCHP6SHT.js → pricing-tier-7LVSXXMJ.js} +5 -3
  53. package/dist/{profile-EK4HSQ57.js → profile-OZJL5ZPT.js} +1 -1
  54. package/dist/{purpose-NGM42XWB.js → purpose-GVCQT7YJ.js} +5 -3
  55. package/dist/{query-IYW42QLU.js → query-5QIXDE32.js} +5 -3
  56. package/dist/{remove-component-LXSRR23E.js → remove-component-HJA5OA3H.js} +3 -3
  57. package/dist/{review-HFOO3NXE.js → review-7M27IRW6.js} +3 -3
  58. package/dist/{sandbox-YX3VVAQG.js → sandbox-Q3XHXMFY.js} +5 -3
  59. package/dist/{sharing-X5U53KSU.js → sharing-SQJ355YL.js} +5 -3
  60. package/dist/{submission-YOWVSZNA.js → submission-WJUI3BYW.js} +5 -3
  61. package/dist/{targeting-BMZCOG72.js → targeting-6QHPH3GP.js} +5 -3
  62. package/dist/{template-variables-YTABZL3E.js → template-variables-WVV7Y6HO.js} +5 -3
  63. package/dist/{upgrade-RWBRFID7.js → upgrade-EAQWUJZS.js} +1 -1
  64. package/dist/{user-3N5ZOUYS.js → user-TB64MVPS.js} +5 -3
  65. package/dist/{validate-TUMXW56Y.js → validate-QUSO4DR4.js} +3 -3
  66. package/dist/{validation-rules-QVS7LKEP.js → validation-rules-I3MUNH5H.js} +5 -3
  67. package/dist/{versions-ZTWQAGXY.js → versions-EUTT4SNW.js} +3 -3
  68. package/dist/{webhooks-6WMWACOW.js → webhooks-R2ZJHOWQ.js} +5 -3
  69. package/dist/{workflow-ZO2MKDBS.js → workflow-NBX7EDI7.js} +5 -3
  70. package/dist/{workflow-definition-RCWKIPYI.js → workflow-definition-R6VB7HO3.js} +5 -3
  71. package/package.json +1 -1
  72. package/dist/app-I3XXHZLD.js +0 -24
package/README.md CHANGED
@@ -29,7 +29,7 @@ npm install -g @epilot/cli
29
29
 
30
30
  <!-- usage-help -->
31
31
  ```
32
- epilot v0.1.18 — CLI for epilot APIs
32
+ epilot v0.1.20 — CLI for epilot APIs
33
33
 
34
34
  USAGE
35
35
  epilot <api> <operationId> [params...] [flags]
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-BYAEI4Z2.js";
5
- import "./chunk-RSA7K5HB.js";
6
- import "./chunk-PDMWUCWD.js";
4
+ } from "./chunk-5ZFPCFKV.js";
7
5
  import "./chunk-IOLKUHUB.js";
6
+ import "./chunk-M3M3C5WH.js";
7
+ import "./chunk-YHQA2AVG.js";
8
8
  import "./chunk-7ZQ666ZQ.js";
9
9
 
10
10
  // src/commands/apis/access-token.ts
@@ -19,6 +19,8 @@ var access_token_default = defineCommand({
19
19
  include: { type: "boolean", alias: "i", description: "Include response headers" },
20
20
  definition: { type: "string", description: "Override OpenAPI spec file/URL" },
21
21
  server: { type: "string", alias: "s", description: "Override server base URL" },
22
+ "use-dev": { type: "boolean", description: "Target dev environment" },
23
+ "use-staging": { type: "boolean", description: "Target staging environment" },
22
24
  profile: { type: "string", description: "Use a named profile" },
23
25
  token: { type: "string", alias: "t", description: "Bearer token" },
24
26
  json: { type: "boolean", description: "Output raw JSON" },
@@ -3,9 +3,9 @@ import {
3
3
  log,
4
4
  readManifest,
5
5
  writeManifest
6
- } from "./chunk-CEP7S7X3.js";
7
- import "./chunk-RSA7K5HB.js";
8
- import "./chunk-PDMWUCWD.js";
6
+ } from "./chunk-4TDAAJ6H.js";
7
+ import "./chunk-M3M3C5WH.js";
8
+ import "./chunk-YHQA2AVG.js";
9
9
  import "./chunk-7ZQ666ZQ.js";
10
10
 
11
11
  // src/commands/app/add-component.ts
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-BYAEI4Z2.js";
5
- import "./chunk-RSA7K5HB.js";
6
- import "./chunk-PDMWUCWD.js";
4
+ } from "./chunk-5ZFPCFKV.js";
7
5
  import "./chunk-IOLKUHUB.js";
6
+ import "./chunk-M3M3C5WH.js";
7
+ import "./chunk-YHQA2AVG.js";
8
8
  import "./chunk-7ZQ666ZQ.js";
9
9
 
10
10
  // src/commands/apis/address.ts
@@ -19,6 +19,8 @@ var address_default = defineCommand({
19
19
  include: { type: "boolean", alias: "i", description: "Include response headers" },
20
20
  definition: { type: "string", description: "Override OpenAPI spec file/URL" },
21
21
  server: { type: "string", alias: "s", description: "Override server base URL" },
22
+ "use-dev": { type: "boolean", description: "Target dev environment" },
23
+ "use-staging": { type: "boolean", description: "Target staging environment" },
22
24
  profile: { type: "string", description: "Use a named profile" },
23
25
  token: { type: "string", alias: "t", description: "Bearer token" },
24
26
  json: { type: "boolean", description: "Output raw JSON" },
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-BYAEI4Z2.js";
5
- import "./chunk-RSA7K5HB.js";
6
- import "./chunk-PDMWUCWD.js";
4
+ } from "./chunk-5ZFPCFKV.js";
7
5
  import "./chunk-IOLKUHUB.js";
6
+ import "./chunk-M3M3C5WH.js";
7
+ import "./chunk-YHQA2AVG.js";
8
8
  import "./chunk-7ZQ666ZQ.js";
9
9
 
10
10
  // src/commands/apis/address-suggestions.ts
@@ -19,6 +19,8 @@ var address_suggestions_default = defineCommand({
19
19
  include: { type: "boolean", alias: "i", description: "Include response headers" },
20
20
  definition: { type: "string", description: "Override OpenAPI spec file/URL" },
21
21
  server: { type: "string", alias: "s", description: "Override server base URL" },
22
+ "use-dev": { type: "boolean", description: "Target dev environment" },
23
+ "use-staging": { type: "boolean", description: "Target staging environment" },
22
24
  profile: { type: "string", description: "Use a named profile" },
23
25
  token: { type: "string", alias: "t", description: "Bearer token" },
24
26
  json: { type: "boolean", description: "Output raw JSON" },
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-BYAEI4Z2.js";
5
- import "./chunk-RSA7K5HB.js";
6
- import "./chunk-PDMWUCWD.js";
4
+ } from "./chunk-5ZFPCFKV.js";
7
5
  import "./chunk-IOLKUHUB.js";
6
+ import "./chunk-M3M3C5WH.js";
7
+ import "./chunk-YHQA2AVG.js";
8
8
  import "./chunk-7ZQ666ZQ.js";
9
9
 
10
10
  // src/commands/apis/ai-agents.ts
@@ -19,6 +19,8 @@ var ai_agents_default = defineCommand({
19
19
  include: { type: "boolean", alias: "i", description: "Include response headers" },
20
20
  definition: { type: "string", description: "Override OpenAPI spec file/URL" },
21
21
  server: { type: "string", alias: "s", description: "Override server base URL" },
22
+ "use-dev": { type: "boolean", description: "Target dev environment" },
23
+ "use-staging": { type: "boolean", description: "Target staging environment" },
22
24
  profile: { type: "string", description: "Use a named profile" },
23
25
  token: { type: "string", alias: "t", description: "Bearer token" },
24
26
  json: { type: "boolean", description: "Output raw JSON" },
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-BYAEI4Z2.js";
5
- import "./chunk-RSA7K5HB.js";
6
- import "./chunk-PDMWUCWD.js";
4
+ } from "./chunk-5ZFPCFKV.js";
7
5
  import "./chunk-IOLKUHUB.js";
6
+ import "./chunk-M3M3C5WH.js";
7
+ import "./chunk-YHQA2AVG.js";
8
8
  import "./chunk-7ZQ666ZQ.js";
9
9
 
10
10
  // src/commands/app/api.ts
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/commands/app/index.ts
4
+ import { defineCommand } from "citty";
5
+ var app_default = defineCommand({
6
+ meta: {
7
+ name: "app",
8
+ description: "Manage epilot Apps \u2014 create, deploy, and manage app manifests"
9
+ },
10
+ subCommands: {
11
+ init: () => import("./init-QZTZF2JC.js").then((m) => m.default),
12
+ "add-component": () => import("./add-component-IVVCAUGY.js").then((m) => m.default),
13
+ "remove-component": () => import("./remove-component-HJA5OA3H.js").then((m) => m.default),
14
+ validate: () => import("./validate-QUSO4DR4.js").then((m) => m.default),
15
+ deploy: () => import("./deploy-HN3M5VTA.js").then((m) => m.default),
16
+ export: () => import("./export-JDDMBBNS.js").then((m) => m.default),
17
+ versions: () => import("./versions-EUTT4SNW.js").then((m) => m.default),
18
+ review: () => import("./review-7M27IRW6.js").then((m) => m.default),
19
+ api: () => import("./api-5W2UMWCW.js").then((m) => m.default)
20
+ }
21
+ });
22
+ export {
23
+ app_default as default
24
+ };
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-BYAEI4Z2.js";
5
- import "./chunk-RSA7K5HB.js";
6
- import "./chunk-PDMWUCWD.js";
4
+ } from "./chunk-5ZFPCFKV.js";
7
5
  import "./chunk-IOLKUHUB.js";
6
+ import "./chunk-M3M3C5WH.js";
7
+ import "./chunk-YHQA2AVG.js";
8
8
  import "./chunk-7ZQ666ZQ.js";
9
9
 
10
10
  // src/commands/apis/audit-logs.ts
@@ -19,6 +19,8 @@ var audit_logs_default = defineCommand({
19
19
  include: { type: "boolean", alias: "i", description: "Include response headers" },
20
20
  definition: { type: "string", description: "Override OpenAPI spec file/URL" },
21
21
  server: { type: "string", alias: "s", description: "Override server base URL" },
22
+ "use-dev": { type: "boolean", description: "Target dev environment" },
23
+ "use-staging": { type: "boolean", description: "Target staging environment" },
22
24
  profile: { type: "string", description: "Use a named profile" },
23
25
  token: { type: "string", alias: "t", description: "Bearer token" },
24
26
  json: { type: "boolean", description: "Output raw JSON" },
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  loadCredentials,
4
4
  removeCredentials
5
- } from "./chunk-RSA7K5HB.js";
6
- import "./chunk-PDMWUCWD.js";
5
+ } from "./chunk-M3M3C5WH.js";
6
+ import "./chunk-YHQA2AVG.js";
7
7
  import {
8
8
  BOLD,
9
9
  DIM,
@@ -21,8 +21,8 @@ var auth_default = defineCommand({
21
21
  description: "Manage authentication"
22
22
  },
23
23
  subCommands: {
24
- login: () => import("./auth-login-AJ6F5GPQ.js").then((m) => m.default),
25
- token: () => import("./auth-token-J4FI2RMT.js").then((m) => m.default),
24
+ login: () => import("./auth-login-NHWG3STD.js").then((m) => m.default),
25
+ token: () => import("./auth-token-APXLIQAO.js").then((m) => m.default),
26
26
  logout: defineCommand({
27
27
  meta: { name: "logout", description: "Remove stored credentials" },
28
28
  run: () => {
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  saveCredentials
4
- } from "./chunk-RSA7K5HB.js";
5
- import "./chunk-PDMWUCWD.js";
4
+ } from "./chunk-M3M3C5WH.js";
5
+ import "./chunk-YHQA2AVG.js";
6
6
  import {
7
7
  BOLD,
8
8
  CYAN,
@@ -17,14 +17,34 @@ import {
17
17
  import { defineCommand } from "citty";
18
18
  import { randomBytes } from "crypto";
19
19
  import { createServer } from "http";
20
+
21
+ // src/lib/environment.ts
22
+ var PORTAL_URLS = {
23
+ production: "https://portal.epilot.cloud",
24
+ staging: "https://portal.staging.epilot.cloud",
25
+ dev: "https://portal.dev.epilot.cloud"
26
+ };
27
+ var getPortalUrl = (env = "production") => {
28
+ return PORTAL_URLS[env];
29
+ };
30
+ var resolveEnvironment = (useDev, useStaging) => {
31
+ if (useDev) return "dev";
32
+ if (useStaging) return "staging";
33
+ return "production";
34
+ };
35
+
36
+ // src/commands/auth-login.ts
20
37
  var auth_login_default = defineCommand({
21
38
  meta: { name: "login", description: "Authenticate with epilot" },
22
39
  args: {
23
40
  token: { type: "string", description: "Manually provide a token instead of browser login" },
24
- profile: { type: "string", description: "Save credentials to this profile" }
41
+ profile: { type: "string", description: "Save credentials to this profile" },
42
+ "use-dev": { type: "boolean", description: "Use dev environment (portal.dev.epilot.cloud)" },
43
+ "use-staging": { type: "boolean", description: "Use staging environment (portal.staging.epilot.cloud)" }
25
44
  },
26
45
  run: async ({ args }) => {
27
46
  const profileName = args.profile || process.env.EPILOT_PROFILE;
47
+ const env = resolveEnvironment(args["use-dev"], args["use-staging"]);
28
48
  if (args.token) {
29
49
  saveCredentials({ token: args.token }, profileName);
30
50
  const suffix = profileName ? ` to profile "${profileName}"` : "";
@@ -41,7 +61,7 @@ var auth_login_default = defineCommand({
41
61
  );
42
62
  process.exit(1);
43
63
  }
44
- const token = await browserLogin(profileName);
64
+ const token = await browserLogin(profileName, env);
45
65
  if (token) {
46
66
  process.stdout.write(`${GREEN}${BOLD}Login successful!${RESET}
47
67
  `);
@@ -52,7 +72,7 @@ var auth_login_default = defineCommand({
52
72
  }
53
73
  }
54
74
  });
55
- var browserLogin = async (profileName) => {
75
+ var browserLogin = async (profileName, env = "production") => {
56
76
  const state = randomBytes(32).toString("hex");
57
77
  const verificationCode = randomBytes(3).toString("hex").toUpperCase();
58
78
  const suffix = profileName ? ` ${DIM}(profile: ${profileName})${RESET}` : "";
@@ -96,7 +116,8 @@ ${BOLD}epilot CLI Login${RESET}${suffix}
96
116
  }
97
117
  const port = address.port;
98
118
  const callbackUrl = `http://localhost:${port}/callback`;
99
- const loginUrl = `https://portal.epilot.cloud/login?cli_callback=${encodeURIComponent(callbackUrl)}&state=${state}&code=${verificationCode}`;
119
+ const portalUrl = getPortalUrl(env);
120
+ const loginUrl = `${portalUrl}/login?cli_callback=${encodeURIComponent(callbackUrl)}&state=${state}&code=${verificationCode}`;
100
121
  process.stdout.write(`
101
122
  ${DIM}Login URL: ${loginUrl}${RESET}
102
123
 
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  saveCredentials
4
- } from "./chunk-RSA7K5HB.js";
5
- import "./chunk-PDMWUCWD.js";
4
+ } from "./chunk-M3M3C5WH.js";
5
+ import "./chunk-YHQA2AVG.js";
6
6
  import {
7
7
  BOLD,
8
8
  GREEN,
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-BYAEI4Z2.js";
5
- import "./chunk-RSA7K5HB.js";
6
- import "./chunk-PDMWUCWD.js";
4
+ } from "./chunk-5ZFPCFKV.js";
7
5
  import "./chunk-IOLKUHUB.js";
6
+ import "./chunk-M3M3C5WH.js";
7
+ import "./chunk-YHQA2AVG.js";
8
8
  import "./chunk-7ZQ666ZQ.js";
9
9
 
10
10
  // src/commands/apis/automation.ts
@@ -19,6 +19,8 @@ var automation_default = defineCommand({
19
19
  include: { type: "boolean", alias: "i", description: "Include response headers" },
20
20
  definition: { type: "string", description: "Override OpenAPI spec file/URL" },
21
21
  server: { type: "string", alias: "s", description: "Override server base URL" },
22
+ "use-dev": { type: "boolean", description: "Target dev environment" },
23
+ "use-staging": { type: "boolean", description: "Target staging environment" },
22
24
  profile: { type: "string", description: "Use a named profile" },
23
25
  token: { type: "string", alias: "t", description: "Bearer token" },
24
26
  json: { type: "boolean", description: "Output raw JSON" },
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-BYAEI4Z2.js";
5
- import "./chunk-RSA7K5HB.js";
6
- import "./chunk-PDMWUCWD.js";
4
+ } from "./chunk-5ZFPCFKV.js";
7
5
  import "./chunk-IOLKUHUB.js";
6
+ import "./chunk-M3M3C5WH.js";
7
+ import "./chunk-YHQA2AVG.js";
8
8
  import "./chunk-7ZQ666ZQ.js";
9
9
 
10
10
  // src/commands/apis/billing.ts
@@ -19,6 +19,8 @@ var billing_default = defineCommand({
19
19
  include: { type: "boolean", alias: "i", description: "Include response headers" },
20
20
  definition: { type: "string", description: "Override OpenAPI spec file/URL" },
21
21
  server: { type: "string", alias: "s", description: "Override server base URL" },
22
+ "use-dev": { type: "boolean", description: "Target dev environment" },
23
+ "use-staging": { type: "boolean", description: "Target staging environment" },
22
24
  profile: { type: "string", description: "Use a named profile" },
23
25
  token: { type: "string", alias: "t", description: "Bearer token" },
24
26
  json: { type: "boolean", description: "Output raw JSON" },
@@ -11,13 +11,15 @@ import { defineCommand } from "citty";
11
11
  var main = defineCommand({
12
12
  meta: {
13
13
  name: "epilot",
14
- version: "0.1.18",
14
+ version: "0.1.20",
15
15
  description: "CLI for epilot APIs"
16
16
  },
17
17
  args: {
18
18
  token: { type: "string", alias: "t", description: "Bearer token" },
19
19
  profile: { type: "string", description: "Use a named profile (or EPILOT_PROFILE env)" },
20
20
  server: { type: "string", alias: "s", description: "Override server base URL" },
21
+ "use-dev": { type: "boolean", description: "Target dev environment" },
22
+ "use-staging": { type: "boolean", description: "Target staging environment" },
21
23
  json: { type: "boolean", description: "Output raw JSON" },
22
24
  verbose: { type: "boolean", alias: "v", description: "Verbose output" },
23
25
  guided: { type: "boolean", description: "Prompt for all parameters interactively" },
@@ -25,59 +27,60 @@ var main = defineCommand({
25
27
  jsonata: { type: "string", description: "JSONata expression" }
26
28
  },
27
29
  subCommands: {
28
- auth: () => import("../auth-AAF6Z5WZ.js").then((m) => m.default),
29
- profile: () => import("../profile-EK4HSQ57.js").then((m) => m.default),
30
+ auth: () => import("../auth-CN5EFFDE.js").then((m) => m.default),
31
+ profile: () => import("../profile-OZJL5ZPT.js").then((m) => m.default),
32
+ config: () => import("../config-DGZIMLZK.js").then((m) => m.default),
30
33
  completion: () => import("../completion-INJETNZK.js").then((m) => m.default),
31
- upgrade: () => import("../upgrade-RWBRFID7.js").then((m) => m.default),
32
- "access-token": () => import("../access-token-CIM4RLBP.js").then((m) => m.default),
33
- address: () => import("../address-EDRTUWTP.js").then((m) => m.default),
34
- "address-suggestions": () => import("../address-suggestions-S5WEST2N.js").then((m) => m.default),
35
- "ai-agents": () => import("../ai-agents-RXDDJDAR.js").then((m) => m.default),
36
- app: () => import("../app-I3XXHZLD.js").then((m) => m.default),
37
- "audit-logs": () => import("../audit-logs-PXGDGJGV.js").then((m) => m.default),
38
- automation: () => import("../automation-LS6MVLP2.js").then((m) => m.default),
39
- billing: () => import("../billing-KVYFUKZK.js").then((m) => m.default),
40
- "blueprint-manifest": () => import("../blueprint-manifest-W4ZGJD2Z.js").then((m) => m.default),
41
- "configuration-hub": () => import("../configuration-hub-Y7W22GBW.js").then((m) => m.default),
42
- consent: () => import("../consent-M4QB2HPM.js").then((m) => m.default),
43
- "customer-portal": () => import("../customer-portal-SVO2YCXA.js").then((m) => m.default),
44
- dashboard: () => import("../dashboard-CYCXIX74.js").then((m) => m.default),
45
- "data-governance": () => import("../data-governance-DJAAIE6F.js").then((m) => m.default),
46
- deduplication: () => import("../deduplication-M3KEVJRG.js").then((m) => m.default),
47
- design: () => import("../design-UVJJ2KO2.js").then((m) => m.default),
48
- document: () => import("../document-5HB632XE.js").then((m) => m.default),
49
- "email-settings": () => import("../email-settings-H7HQTDYE.js").then((m) => m.default),
50
- "email-template": () => import("../email-template-2DHZ3VKF.js").then((m) => m.default),
51
- entity: () => import("../entity-HED6QHG7.js").then((m) => m.default),
52
- "entity-mapping": () => import("../entity-mapping-QP22B65Z.js").then((m) => m.default),
53
- environments: () => import("../environments-6LLEIGWV.js").then((m) => m.default),
54
- "event-catalog": () => import("../event-catalog-2ZCZTATY.js").then((m) => m.default),
55
- file: () => import("../file-R6IIXOIZ.js").then((m) => m.default),
56
- iban: () => import("../iban-EQD2VROZ.js").then((m) => m.default),
57
- "integration-toolkit": () => import("../integration-toolkit-4CLQDSK7.js").then((m) => m.default),
58
- journey: () => import("../journey-V7X2KUKH.js").then((m) => m.default),
59
- kanban: () => import("../kanban-EPI6C3FR.js").then((m) => m.default),
60
- message: () => import("../message-477EJ5JO.js").then((m) => m.default),
61
- metering: () => import("../metering-5EAEKRSL.js").then((m) => m.default),
62
- notes: () => import("../notes-CVXNRULU.js").then((m) => m.default),
63
- notification: () => import("../notification-6HXS76XP.js").then((m) => m.default),
64
- organization: () => import("../organization-O33CZQKD.js").then((m) => m.default),
65
- "partner-directory": () => import("../partner-directory-NZWGCKSB.js").then((m) => m.default),
66
- permissions: () => import("../permissions-6QEOBJ6M.js").then((m) => m.default),
67
- pricing: () => import("../pricing-KNYSULCW.js").then((m) => m.default),
68
- "pricing-tier": () => import("../pricing-tier-OCHP6SHT.js").then((m) => m.default),
69
- purpose: () => import("../purpose-NGM42XWB.js").then((m) => m.default),
70
- query: () => import("../query-IYW42QLU.js").then((m) => m.default),
71
- sandbox: () => import("../sandbox-YX3VVAQG.js").then((m) => m.default),
72
- sharing: () => import("../sharing-X5U53KSU.js").then((m) => m.default),
73
- submission: () => import("../submission-YOWVSZNA.js").then((m) => m.default),
74
- targeting: () => import("../targeting-BMZCOG72.js").then((m) => m.default),
75
- "template-variables": () => import("../template-variables-YTABZL3E.js").then((m) => m.default),
76
- user: () => import("../user-3N5ZOUYS.js").then((m) => m.default),
77
- "validation-rules": () => import("../validation-rules-QVS7LKEP.js").then((m) => m.default),
78
- webhooks: () => import("../webhooks-6WMWACOW.js").then((m) => m.default),
79
- workflow: () => import("../workflow-ZO2MKDBS.js").then((m) => m.default),
80
- "workflow-definition": () => import("../workflow-definition-RCWKIPYI.js").then((m) => m.default)
34
+ upgrade: () => import("../upgrade-EAQWUJZS.js").then((m) => m.default),
35
+ "access-token": () => import("../access-token-WWE6BDJH.js").then((m) => m.default),
36
+ address: () => import("../address-EH3C4CVB.js").then((m) => m.default),
37
+ "address-suggestions": () => import("../address-suggestions-RRSLOBFW.js").then((m) => m.default),
38
+ "ai-agents": () => import("../ai-agents-HEDTH2EP.js").then((m) => m.default),
39
+ app: () => import("../app-TIFX5AYN.js").then((m) => m.default),
40
+ "audit-logs": () => import("../audit-logs-YFRK3EFU.js").then((m) => m.default),
41
+ automation: () => import("../automation-4DEE3TUI.js").then((m) => m.default),
42
+ billing: () => import("../billing-XX4VVOPI.js").then((m) => m.default),
43
+ "blueprint-manifest": () => import("../blueprint-manifest-V5MJ3GCA.js").then((m) => m.default),
44
+ "configuration-hub": () => import("../configuration-hub-ZSYHJZXF.js").then((m) => m.default),
45
+ consent: () => import("../consent-QICGZLMO.js").then((m) => m.default),
46
+ "customer-portal": () => import("../customer-portal-UCDUZO6G.js").then((m) => m.default),
47
+ dashboard: () => import("../dashboard-YL5C562L.js").then((m) => m.default),
48
+ "data-governance": () => import("../data-governance-4VMCRLDZ.js").then((m) => m.default),
49
+ deduplication: () => import("../deduplication-RKRS2COL.js").then((m) => m.default),
50
+ design: () => import("../design-CQWCY2IS.js").then((m) => m.default),
51
+ document: () => import("../document-JYWQBMSI.js").then((m) => m.default),
52
+ "email-settings": () => import("../email-settings-NG4J6IM6.js").then((m) => m.default),
53
+ "email-template": () => import("../email-template-GVI34ZOC.js").then((m) => m.default),
54
+ entity: () => import("../entity-AZTQCTNG.js").then((m) => m.default),
55
+ "entity-mapping": () => import("../entity-mapping-NN32XUJX.js").then((m) => m.default),
56
+ environments: () => import("../environments-3ASNXU73.js").then((m) => m.default),
57
+ "event-catalog": () => import("../event-catalog-JU7XOJLT.js").then((m) => m.default),
58
+ file: () => import("../file-YDLNXKZR.js").then((m) => m.default),
59
+ iban: () => import("../iban-7HDVKBUS.js").then((m) => m.default),
60
+ "integration-toolkit": () => import("../integration-toolkit-WBDJB76S.js").then((m) => m.default),
61
+ journey: () => import("../journey-RZ7UI5ZA.js").then((m) => m.default),
62
+ kanban: () => import("../kanban-7CZGNU52.js").then((m) => m.default),
63
+ message: () => import("../message-BFAKIAPX.js").then((m) => m.default),
64
+ metering: () => import("../metering-R4HXARRF.js").then((m) => m.default),
65
+ notes: () => import("../notes-MHH5OZ2E.js").then((m) => m.default),
66
+ notification: () => import("../notification-RPBIG3FC.js").then((m) => m.default),
67
+ organization: () => import("../organization-AUBBICVD.js").then((m) => m.default),
68
+ "partner-directory": () => import("../partner-directory-FYZJUNAW.js").then((m) => m.default),
69
+ permissions: () => import("../permissions-4TQQYZXO.js").then((m) => m.default),
70
+ pricing: () => import("../pricing-SPMVLPRL.js").then((m) => m.default),
71
+ "pricing-tier": () => import("../pricing-tier-7LVSXXMJ.js").then((m) => m.default),
72
+ purpose: () => import("../purpose-GVCQT7YJ.js").then((m) => m.default),
73
+ query: () => import("../query-5QIXDE32.js").then((m) => m.default),
74
+ sandbox: () => import("../sandbox-Q3XHXMFY.js").then((m) => m.default),
75
+ sharing: () => import("../sharing-SQJ355YL.js").then((m) => m.default),
76
+ submission: () => import("../submission-WJUI3BYW.js").then((m) => m.default),
77
+ targeting: () => import("../targeting-6QHPH3GP.js").then((m) => m.default),
78
+ "template-variables": () => import("../template-variables-WVV7Y6HO.js").then((m) => m.default),
79
+ user: () => import("../user-TB64MVPS.js").then((m) => m.default),
80
+ "validation-rules": () => import("../validation-rules-I3MUNH5H.js").then((m) => m.default),
81
+ webhooks: () => import("../webhooks-R2ZJHOWQ.js").then((m) => m.default),
82
+ workflow: () => import("../workflow-NBX7EDI7.js").then((m) => m.default),
83
+ "workflow-definition": () => import("../workflow-definition-R6VB7HO3.js").then((m) => m.default)
81
84
  }
82
85
  });
83
86
 
@@ -90,7 +93,7 @@ process.stderr.on("error", (err) => {
90
93
  if (err.code === "EPIPE") process.exit(0);
91
94
  throw err;
92
95
  });
93
- var VERSION = true ? "0.1.18" : (await null).default.version;
96
+ var VERSION = true ? "0.1.20" : (await null).default.version;
94
97
  var args = process.argv.slice(2);
95
98
  var completionsIdx = args.indexOf("--_completions");
96
99
  if (completionsIdx >= 0) {
@@ -154,6 +157,10 @@ function printRootHelp() {
154
157
  w(` ${GREEN}--profile${R} <name> Use a named profile ${DIM}(or EPILOT_PROFILE)${R}
155
158
  `);
156
159
  w(` ${GREEN}-s, --server${R} <url> Override server base URL
160
+ `);
161
+ w(` ${GREEN}--use-dev${R} Target dev environment
162
+ `);
163
+ w(` ${GREEN}--use-staging${R} Target staging environment
157
164
  `);
158
165
  w(` ${GREEN}--json${R} Output raw JSON (no formatting)
159
166
  `);
@@ -190,6 +197,8 @@ function printRootHelp() {
190
197
  w(` ${CYAN}auth logout${R} Remove stored credentials
191
198
  `);
192
199
  w(` ${CYAN}profile${R} Manage named profiles
200
+ `);
201
+ w(` ${CYAN}config${R} Manage CLI configuration
193
202
  `);
194
203
  w(` ${CYAN}completion${R} Generate shell completion scripts
195
204
  `);
@@ -220,6 +229,10 @@ function printRootHelp() {
220
229
  w(` ${YELLOW}$${R} epilot entity searchEntities --jsonata 'results[0]._title'
221
230
  `);
222
231
  w(` ${YELLOW}$${R} echo '{"q":"*"}' | epilot entity searchEntities
232
+ `);
233
+ w(` ${YELLOW}$${R} epilot entity searchEntities --use-dev ${DIM}# target dev environment${R}
234
+ `);
235
+ w(` ${YELLOW}$${R} epilot config set stage dev ${DIM}# persist dev as default${R}
223
236
  `);
224
237
  w(`
225
238
  `);
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  callApi
4
- } from "./chunk-BYAEI4Z2.js";
5
- import "./chunk-RSA7K5HB.js";
6
- import "./chunk-PDMWUCWD.js";
4
+ } from "./chunk-5ZFPCFKV.js";
7
5
  import "./chunk-IOLKUHUB.js";
6
+ import "./chunk-M3M3C5WH.js";
7
+ import "./chunk-YHQA2AVG.js";
8
8
  import "./chunk-7ZQ666ZQ.js";
9
9
 
10
10
  // src/commands/apis/blueprint-manifest.ts
@@ -19,6 +19,8 @@ var blueprint_manifest_default = defineCommand({
19
19
  include: { type: "boolean", alias: "i", description: "Include response headers" },
20
20
  definition: { type: "string", description: "Override OpenAPI spec file/URL" },
21
21
  server: { type: "string", alias: "s", description: "Override server base URL" },
22
+ "use-dev": { type: "boolean", description: "Target dev environment" },
23
+ "use-staging": { type: "boolean", description: "Target staging environment" },
22
24
  profile: { type: "string", description: "Use a named profile" },
23
25
  token: { type: "string", alias: "t", description: "Bearer token" },
24
26
  json: { type: "boolean", description: "Output raw JSON" },
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  resolveToken
4
- } from "./chunk-RSA7K5HB.js";
4
+ } from "./chunk-M3M3C5WH.js";
5
5
  import {
6
6
  BOLD,
7
7
  DIM,
@@ -1,16 +1,17 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- resolveToken
4
- } from "./chunk-RSA7K5HB.js";
5
- import {
6
- getResolvedProfile
7
- } from "./chunk-PDMWUCWD.js";
8
2
  import {
9
3
  formatOperationsTable,
10
4
  isInteractive,
11
5
  pickOperation,
12
6
  promptParam
13
7
  } from "./chunk-IOLKUHUB.js";
8
+ import {
9
+ resolveToken
10
+ } from "./chunk-M3M3C5WH.js";
11
+ import {
12
+ getResolvedProfile,
13
+ getStage
14
+ } from "./chunk-YHQA2AVG.js";
14
15
  import {
15
16
  BG_GREEN,
16
17
  BG_RED,
@@ -378,6 +379,15 @@ var formatResponse = async (response, options) => {
378
379
  import { mock } from "mock-json-schema";
379
380
  import dereferenceJsonSchema from "dereference-json-schema";
380
381
  var OpenAPIClientAxios = OpenAPIClientAxiosModule.default ?? OpenAPIClientAxiosModule;
382
+ var toStageUrl = (prodUrl, stage) => {
383
+ if (stage === "prod") return prodUrl;
384
+ return prodUrl.replace(".sls.epilot.io", `.${stage}.sls.epilot.io`);
385
+ };
386
+ var resolveStage = (args) => {
387
+ if (args["use-dev"]) return "dev";
388
+ if (args["use-staging"]) return "staging";
389
+ return getStage() ?? "prod";
390
+ };
381
391
  var extractOperations = (spec) => {
382
392
  const operations = [];
383
393
  for (const [path, methods] of Object.entries(spec.paths ?? {})) {
@@ -530,6 +540,10 @@ ${BOLD}epilot ${apiName} ${operationId}${RESET}`);
530
540
  w(` ${GREEN}--profile${RESET} <name> Use a named profile
531
541
  `);
532
542
  w(` ${GREEN}-s, --server${RESET} <url> Override server base URL
543
+ `);
544
+ w(` ${GREEN}--use-dev${RESET} Target dev environment
545
+ `);
546
+ w(` ${GREEN}--use-staging${RESET} Target staging environment
533
547
  `);
534
548
  w(` ${GREEN}-i, --include${RESET} Include response headers in output
535
549
  `);
@@ -796,6 +810,14 @@ ${BOLD}Available operations:${RESET}
796
810
  if (serverOverride) {
797
811
  const specDoc = spec;
798
812
  specDoc.servers = [{ url: serverOverride }];
813
+ } else {
814
+ const stage = resolveStage(args);
815
+ if (stage !== "prod") {
816
+ const specDoc = spec;
817
+ if (specDoc.servers?.length) {
818
+ specDoc.servers = specDoc.servers.map((s) => ({ ...s, url: toStageUrl(s.url, stage) }));
819
+ }
820
+ }
799
821
  }
800
822
  const api = new OpenAPIClientAxios({
801
823
  definition: spec,
@@ -3,7 +3,7 @@ import {
3
3
  getResolvedProfile,
4
4
  resolveProfileName,
5
5
  upsertProfile
6
- } from "./chunk-PDMWUCWD.js";
6
+ } from "./chunk-YHQA2AVG.js";
7
7
 
8
8
  // src/lib/auth-store.ts
9
9
  import { existsSync, mkdirSync, readFileSync, writeFileSync, unlinkSync } from "fs";
@@ -58,6 +58,15 @@ var deleteProfile = (name) => {
58
58
  saveProfiles(config);
59
59
  return true;
60
60
  };
61
+ var getStage = () => {
62
+ const config = loadProfiles();
63
+ return config.stage;
64
+ };
65
+ var setStage = (stage) => {
66
+ const config = loadProfiles();
67
+ config.stage = stage;
68
+ saveProfiles(config);
69
+ };
61
70
  var listProfiles = () => {
62
71
  const config = loadProfiles();
63
72
  return Object.entries(config.profiles).map(([name, profile]) => ({
@@ -74,5 +83,7 @@ export {
74
83
  setActiveProfile,
75
84
  upsertProfile,
76
85
  deleteProfile,
86
+ getStage,
87
+ setStage,
77
88
  listProfiles
78
89
  };