@scalar/cli 2.5.2 → 2.8.0

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 (79) hide show
  1. package/README.md +319 -55
  2. package/chunks/{action-XUQ7TKKJ.js → action-354TUG4H.js} +11 -7
  3. package/chunks/{action-PHLOE27S.js → action-43YBNBDR.js} +33 -26
  4. package/chunks/{action-DGD6Q6Y5.js → action-5SK5NE7E.js} +10 -4
  5. package/chunks/{action-Y6CEKYEK.js → action-6BYGBXRC.js} +40 -23
  6. package/chunks/{action-LUVBQEIQ.js → action-7PEQXDWT.js} +4 -4
  7. package/chunks/action-AQRPFQKI.js +231 -0
  8. package/chunks/{action-RBVPKCRI.js → action-CA4QYPI6.js} +6 -6
  9. package/chunks/{action-7H3XARJP.js → action-EOAVVL52.js} +11 -5
  10. package/chunks/action-F2ZJNURT.js +72 -0
  11. package/chunks/{action-AMNYOA4B.js → action-F7A2K74G.js} +4 -4
  12. package/chunks/{action-HIL5ZFNB.js → action-FCAYFPVR.js} +5 -5
  13. package/chunks/{action-42D2C47G.js → action-GWXLHL2Z.js} +3 -3
  14. package/chunks/{action-ZWQLQENM.js → action-H6OUJWWM.js} +4 -4
  15. package/chunks/{action-TWHLZW4V.js → action-HT2DJ34Z.js} +49 -26
  16. package/chunks/{action-PAA4NWUJ.js → action-JAHFRYWZ.js} +58 -9
  17. package/chunks/{action-HXHBU7XC.js → action-KTYOCA2V.js} +37 -12
  18. package/chunks/{action-LFL3ZZKN.js → action-LEUD5P2U.js} +17 -17
  19. package/chunks/{action-FF2OMGAS.js → action-LLH4QPXM.js} +34 -20
  20. package/chunks/{action-OILGZAMK.js → action-LXGXKXZZ.js} +20 -15
  21. package/chunks/{action-W62AIEBN.js → action-NVI5DWFP.js} +6 -6
  22. package/chunks/{action-EPNE5XCM.js → action-QQZLPI42.js} +17 -17
  23. package/chunks/{action-ZLTUMRO2.js → action-UIKH4SZX.js} +25 -21
  24. package/chunks/{action-6FAJNP6C.js → action-VOFDW3U2.js} +4 -4
  25. package/chunks/{action-OK55BFGM.js → action-W3C53GPH.js} +7 -7
  26. package/chunks/{action-P7RFXIC7.js → action-WFDNRA7D.js} +32 -23
  27. package/chunks/{action-V5KYG7XD.js → action-XIUO64C7.js} +10 -10
  28. package/chunks/{action-X7TZA3RE.js → action-Y6NXJQ4H.js} +89 -14
  29. package/chunks/{action-6MZZHPVQ.js → action-Y7OUGD56.js} +27 -14
  30. package/chunks/{action-DCINFQ57.js → action-YLF2G4G5.js} +13 -13
  31. package/chunks/{action-SJYAMXYI.js → action-YRX6SN5F.js} +10 -4
  32. package/chunks/actions-OGIVBQC7.js +158 -0
  33. package/chunks/{agent-JAXLLDPE.js → agent-ASPV3R5U.js} +4 -4
  34. package/chunks/{asyncapi-P6Y3L7RG.js → asyncapi-QNFKXHEI.js} +10 -11
  35. package/chunks/{build.action-AZ5ECU4B.js → build.action-NM6CAE5F.js} +37 -33
  36. package/chunks/{chunk-FOKFF4EP.js → chunk-22HYZ7LE.js} +3 -3
  37. package/chunks/{chunk-KEOCJ3NJ.js → chunk-2OCWX42S.js} +38 -87
  38. package/chunks/{chunk-RPVHJMQT.js → chunk-5DEU2DVL.js} +2 -2
  39. package/chunks/{chunk-OQKDBLOZ.js → chunk-5JLVQVKO.js} +8 -0
  40. package/chunks/{chunk-VNYE4R7N.js → chunk-5UHLAJQD.js} +2 -1
  41. package/chunks/{chunk-CX7ZRMTC.js → chunk-6XWCMJDB.js} +1 -1
  42. package/chunks/{chunk-6ZMT63IV.js → chunk-6YPQGVF4.js} +1 -1
  43. package/chunks/{chunk-HXIDUCSZ.js → chunk-BPGFSSUH.js} +1 -1
  44. package/chunks/{chunk-M622VXRQ.js → chunk-C2KAWRIX.js} +1 -1
  45. package/chunks/chunk-EGOXR5FB.js +15 -0
  46. package/chunks/{chunk-UB3XGOUW.js → chunk-EXY3ZTV4.js} +262 -9
  47. package/chunks/{chunk-3BWGTPPT.js → chunk-FDC2IESH.js} +1776 -1113
  48. package/chunks/{chunk-TYLWJ2UL.js → chunk-GTV2BVXV.js} +2 -2
  49. package/chunks/{chunk-SWWWYWHC.js → chunk-HGOD6THU.js} +27 -18
  50. package/chunks/{chunk-3DJ2GKEG.js → chunk-IMG35UXX.js} +1 -1
  51. package/chunks/{chunk-MNLXYOVF.js → chunk-KCCFN4F7.js} +2 -2
  52. package/chunks/{chunk-FQVVKQPU.js → chunk-KKRGBXCE.js} +137 -1
  53. package/chunks/{chunk-UMPODUJO.js → chunk-L3UXDCBI.js} +105 -15
  54. package/chunks/{chunk-B2MHTD3R.js → chunk-MLSZVVTT.js} +1 -1
  55. package/chunks/{chunk-LCPFHE4Z.js → chunk-OJ2EWIJH.js} +21 -2
  56. package/chunks/{chunk-RAO7VUGM.js → chunk-PH3WFNXJ.js} +1 -1
  57. package/chunks/{chunk-NIXG4KDE.js → chunk-QVQ4PNVL.js} +170 -5
  58. package/chunks/{chunk-CIFOFSZ3.js → chunk-R5LK6VPY.js} +72 -7
  59. package/chunks/{chunk-T7B6WNZC.js → chunk-TSURUX4A.js} +12 -3
  60. package/chunks/{chunk-JV7TUEXQ.js → chunk-UXJ753NV.js} +14 -1
  61. package/chunks/{chunk-HUCR333E.js → chunk-W24BETFG.js} +2 -2
  62. package/chunks/{chunk-LQN4S62O.js → chunk-XEDGMZJD.js} +18 -4
  63. package/chunks/{chunk-NNMSZVAB.js → chunk-XXSQUBXS.js} +82 -6
  64. package/chunks/{chunk-M6Q3ARBV.js → chunk-YILQODZF.js} +2 -2
  65. package/chunks/{create.action-34OTO2SB.js → create.action-FUQ2BVJA.js} +29 -17
  66. package/chunks/{delete.action-ZYXFMIOW.js → delete.action-47E66R3I.js} +26 -17
  67. package/chunks/{delete.action-6LRT4M3S.js → delete.action-BTDFH7WY.js} +26 -17
  68. package/chunks/{get.action-XP36SA2J.js → get.action-XC7KC2JO.js} +10 -10
  69. package/chunks/{list.action-6LF6KSD5.js → list.action-LXKEUYKO.js} +13 -13
  70. package/chunks/{list.action-WVRVLX5E.js → list.action-OFGLMRE7.js} +17 -17
  71. package/chunks/{publish.action-AHFUBT5C.js → publish.action-OS27XOX4.js} +50 -24
  72. package/chunks/{update.action-YQTVUDYE.js → update.action-AEIBLCWD.js} +27 -18
  73. package/chunks/{update.action-ZREAFJVG.js → update.action-ZMS4CQ3T.js} +27 -18
  74. package/docs.html +679 -175
  75. package/index.js +492 -406
  76. package/package.json +14 -22
  77. package/skills/scalar-cli/SKILL.md +77 -0
  78. package/template.md +101 -3
  79. package/chunks/action-YRWHX2AE.js +0 -64
package/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
3
3
  import {
4
4
  DownloadIsolateCommand
5
- } from "./chunks/chunk-HXIDUCSZ.js";
5
+ } from "./chunks/chunk-BPGFSSUH.js";
6
6
  import {
7
7
  openBrowser
8
8
  } from "./chunks/chunk-JFIXNSPP.js";
@@ -10,29 +10,38 @@ import {
10
10
  measureTime
11
11
  } from "./chunks/chunk-KHDYYVYF.js";
12
12
  import {
13
- BundleCommand
14
- } from "./chunks/chunk-LCPFHE4Z.js";
13
+ BundleCommand,
14
+ parseFetchLimit,
15
+ parsePort
16
+ } from "./chunks/chunk-OJ2EWIJH.js";
15
17
  import {
16
18
  SdkLanguage
17
- } from "./chunks/chunk-3BWGTPPT.js";
18
- import "./chunks/chunk-M622VXRQ.js";
19
+ } from "./chunks/chunk-FDC2IESH.js";
20
+ import "./chunks/chunk-C2KAWRIX.js";
19
21
  import {
20
22
  checkNodeVersion,
21
23
  clearAuthData,
22
24
  getAuthData,
23
25
  getMetadata,
24
26
  setMetadata
25
- } from "./chunks/chunk-NIXG4KDE.js";
26
- import "./chunks/chunk-JV7TUEXQ.js";
27
- import "./chunks/chunk-VNYE4R7N.js";
28
- import "./chunks/chunk-OQKDBLOZ.js";
27
+ } from "./chunks/chunk-QVQ4PNVL.js";
28
+ import {
29
+ bin,
30
+ name,
31
+ version
32
+ } from "./chunks/chunk-UXJ753NV.js";
33
+ import "./chunks/chunk-5UHLAJQD.js";
34
+ import "./chunks/chunk-5JLVQVKO.js";
35
+ import {
36
+ requireInteractive
37
+ } from "./chunks/chunk-EGOXR5FB.js";
29
38
  import "./chunks/chunk-K74E42RV.js";
30
- import "./chunks/chunk-CX7ZRMTC.js";
39
+ import "./chunks/chunk-6XWCMJDB.js";
31
40
  import "./chunks/chunk-4ORL4MST.js";
32
41
  import {
33
42
  output
34
43
  } from "./chunks/chunk-T5HJUAWB.js";
35
- import "./chunks/chunk-LQN4S62O.js";
44
+ import "./chunks/chunk-XEDGMZJD.js";
36
45
  import {
37
46
  external_exports
38
47
  } from "./chunks/chunk-IKT5F47M.js";
@@ -42,15 +51,7 @@ import "./chunks/chunk-3MZYUBJ6.js";
42
51
  import { Agent, setGlobalDispatcher } from "undici";
43
52
 
44
53
  // src/program.ts
45
- import { Command as Command52 } from "commander";
46
-
47
- // package.json
48
- var name = "@scalar/cli";
49
- var version = "2.5.2";
50
- var bin = {
51
- scalar: "./dist/index.js",
52
- "scalar-cli": "./dist/index.js"
53
- };
54
+ import { Command as Command54 } from "commander";
54
55
 
55
56
  // src/domains/schema/index.ts
56
57
  import { Command as Command6 } from "commander";
@@ -58,97 +59,101 @@ import { Command as Command6 } from "commander";
58
59
  // src/domains/schema/delete.ts
59
60
  import { Command } from "commander";
60
61
  var DeleteSchemaCommand = () => {
61
- const cmd2 = new Command("delete");
62
- cmd2.description("Delete a schema.");
63
- cmd2.option("-s, --slug <slug>", "Schema slug");
64
- cmd2.option("-n, --namespace <namespace>", "Team namespace");
65
- cmd2.action(async (...args) => {
66
- const { deleteAction } = await import("./chunks/delete.action-ZYXFMIOW.js");
62
+ const cmd3 = new Command("delete");
63
+ cmd3.description("Delete a schema.");
64
+ cmd3.option("-s, --slug <slug>", "Schema slug");
65
+ cmd3.option("-n, --namespace <namespace>", "Team namespace");
66
+ cmd3.action(async (...args) => {
67
+ const { deleteAction } = await import("./chunks/delete.action-47E66R3I.js");
67
68
  return deleteAction(...args);
68
69
  });
69
- return cmd2;
70
+ return cmd3;
70
71
  };
71
72
 
72
73
  // src/domains/schema/get.ts
73
74
  import { Command as Command2 } from "commander";
74
75
  var GetSchemaCommand = () => {
75
- const cmd2 = new Command2("get");
76
- cmd2.description("Get a schema document version from the Scalar registry");
77
- cmd2.argument("[namespace]", "Team namespace");
78
- cmd2.argument("[slug]", "Schema slug");
79
- cmd2.option("--version <version>", "Schema version (defaults to latest)");
80
- cmd2.option("--format <format>", "Output format (json or yaml)", "json");
81
- cmd2.option("-o, --output <file>", "Output file (defaults to stdout)");
82
- cmd2.action(async (...args) => {
83
- const { getAction } = await import("./chunks/get.action-XP36SA2J.js");
76
+ const cmd3 = new Command2("get");
77
+ cmd3.description("Get a schema document version from the Scalar registry");
78
+ cmd3.argument("[namespace]", "Team namespace");
79
+ cmd3.argument("[slug]", "Schema slug");
80
+ cmd3.option("--version <version>", "Schema version (defaults to latest)");
81
+ cmd3.option("--format <format>", "Output format (json or yaml)", "json");
82
+ cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
83
+ cmd3.action(async (...args) => {
84
+ const { getAction } = await import("./chunks/get.action-XC7KC2JO.js");
84
85
  return getAction(...args);
85
86
  });
86
- return cmd2;
87
+ return cmd3;
87
88
  };
88
89
 
89
90
  // src/domains/schema/list.ts
90
91
  import { Command as Command3 } from "commander";
91
92
  var ListSchemaCommand = () => {
92
- const cmd2 = new Command3("list");
93
- cmd2.description("List all schemas for a team namespace");
94
- cmd2.option("--namespace <namespace>", "Team namespace");
95
- cmd2.action(async (...args) => {
96
- const { listAction } = await import("./chunks/list.action-WVRVLX5E.js");
93
+ const cmd3 = new Command3("list");
94
+ cmd3.description("List all schemas for a team namespace");
95
+ cmd3.option("--namespace <namespace>", "Team namespace");
96
+ cmd3.action(async (...args) => {
97
+ const { listAction } = await import("./chunks/list.action-OFGLMRE7.js");
97
98
  return listAction(...args);
98
99
  });
99
- return cmd2;
100
+ return cmd3;
100
101
  };
101
102
 
102
103
  // src/domains/schema/publish.ts
103
104
  import { Command as Command4 } from "commander";
104
105
  var PublishSchemaCommand = () => {
105
- const cmd2 = new Command4("publish");
106
- cmd2.description("Publish a shared schema to the Scalar registry");
107
- cmd2.argument("[file]", "OpenAPI file to upload");
108
- cmd2.option(
106
+ const cmd3 = new Command4("publish");
107
+ cmd3.description("Publish a shared schema to the Scalar registry");
108
+ cmd3.argument("[file]", "OpenAPI file to upload");
109
+ cmd3.option(
109
110
  "--slug <slug>",
110
111
  "Slug identifier for the registry entry. Defaults to title."
111
112
  );
112
- cmd2.option("--title <title>", "Schema title");
113
- cmd2.option("--namespace <namespace>", "Scalar team namespace");
114
- cmd2.option("--version <version>", "API version (e.g. 0.1.0)");
115
- cmd2.option("--private", "Make API private", false);
116
- cmd2.option("--force", "Force override an existing version", false);
117
- cmd2.option("--bundle", "Bundle all external references before uploading");
118
- cmd2.option(
113
+ cmd3.option("--title <title>", "Schema title");
114
+ cmd3.option("--namespace <namespace>", "Scalar team namespace");
115
+ cmd3.option("--version <version>", "API version (e.g. 0.1.0)");
116
+ cmd3.option("--private", "Make API private", false);
117
+ cmd3.option("--force", "Force override an existing version", false);
118
+ cmd3.option("--bundle", "Bundle all external references before uploading");
119
+ cmd3.option(
119
120
  "--treeShake",
120
121
  "Remove unused components from the bundled document"
121
122
  );
122
- cmd2.option(
123
+ cmd3.option(
123
124
  "--urlMap",
124
125
  "Generate a map of resolved URLs when bundling the document"
125
126
  );
126
- cmd2.option(
127
+ cmd3.option(
127
128
  "--fetchLimit <limit>",
128
- "Maximum number of concurrent URLs to fetch when bundling the document"
129
+ "Maximum number of concurrent URLs to fetch when bundling the document",
130
+ parseFetchLimit
129
131
  );
130
- cmd2.action(async (...args) => {
131
- const { publishAction } = await import("./chunks/publish.action-AHFUBT5C.js");
132
+ cmd3.action(async (...args) => {
133
+ const { publishAction } = await import("./chunks/publish.action-OS27XOX4.js");
132
134
  return publishAction(...args);
133
135
  });
134
- return cmd2;
136
+ return cmd3;
135
137
  };
136
138
 
137
139
  // src/domains/schema/update.ts
138
140
  import { Command as Command5 } from "commander";
139
141
  var UpdateSchemaCommand = () => {
140
- const cmd2 = new Command5("update");
141
- cmd2.description("Update schema metadata.");
142
- cmd2.option("-s, --slug <slug>", "Schema slug");
143
- cmd2.option("-n, --namespace <namespace>", "Team namespace");
144
- cmd2.option("--title <title>", "Title");
145
- cmd2.option("--description <description>", "Description");
146
- cmd2.option("--isPrivate <isPrivate>", "Privacy (public/private)");
147
- cmd2.action(async (...args) => {
148
- const { updateAction } = await import("./chunks/update.action-YQTVUDYE.js");
142
+ const cmd3 = new Command5("update");
143
+ cmd3.description("Update schema metadata.");
144
+ cmd3.option("-s, --slug <slug>", "Schema slug");
145
+ cmd3.option("-n, --namespace <namespace>", "Team namespace");
146
+ cmd3.option("--title <title>", "Title");
147
+ cmd3.option("--description <description>", "Description");
148
+ cmd3.option(
149
+ "--isPrivate <isPrivate>",
150
+ "Privacy (true/false or public/private)"
151
+ );
152
+ cmd3.action(async (...args) => {
153
+ const { updateAction } = await import("./chunks/update.action-AEIBLCWD.js");
149
154
  return updateAction(...args);
150
155
  });
151
- return cmd2;
156
+ return cmd3;
152
157
  };
153
158
 
154
159
  // src/domains/schema/index.ts
@@ -170,78 +175,85 @@ import { Command as Command12 } from "commander";
170
175
  // src/domains/sdk/build.ts
171
176
  import { Command as Command7 } from "commander";
172
177
  var BuildSdkCommand = () => {
173
- const cmd2 = new Command7("build");
174
- cmd2.description("Create an SDK build.");
175
- cmd2.option("-s, --slug <slug>", "SDK slug");
176
- cmd2.option("-n, --namespace <namespace>", "Team namespace");
177
- cmd2.option("-v, --version <version>", "SDK Version");
178
- cmd2.action(async (...args) => {
179
- const { buildAction } = await import("./chunks/build.action-AZ5ECU4B.js");
178
+ const cmd3 = new Command7("build");
179
+ cmd3.description("Build an SDK.");
180
+ cmd3.option("-s, --slug <slug>", "SDK slug");
181
+ cmd3.option("-n, --namespace <namespace>", "Team namespace");
182
+ cmd3.action(async (...args) => {
183
+ const { buildAction } = await import("./chunks/build.action-NM6CAE5F.js");
180
184
  return buildAction(...args);
181
185
  });
182
- return cmd2;
186
+ return cmd3;
183
187
  };
184
188
 
185
189
  // src/domains/sdk/create.ts
186
190
  import { Command as Command8, Option } from "commander";
187
191
  var CreateSdkCommand = () => {
188
- const cmd2 = new Command8("create");
189
- cmd2.description("Create a new SDK.");
190
- cmd2.option("-a, --api <api>", "Registry API slug");
191
- cmd2.option("-n, --namespace <namespace>", "Team namespace");
192
- cmd2.addOption(
192
+ const cmd3 = new Command8("create");
193
+ cmd3.description(
194
+ "Create a new SDK. The SDK is created in the namespace of the API it is built from."
195
+ );
196
+ cmd3.option("-a, --api <api>", "Registry API slug");
197
+ cmd3.option(
198
+ "-n, --namespace <namespace>",
199
+ "Team namespace to look the API up in"
200
+ );
201
+ cmd3.addOption(
193
202
  new Option("-l, --language <language>", "Language of your SDK").choices(
194
203
  Object.values(SdkLanguage)
195
204
  )
196
205
  );
197
- cmd2.action(async (...args) => {
198
- const { createAction } = await import("./chunks/create.action-34OTO2SB.js");
206
+ cmd3.action(async (...args) => {
207
+ const { createAction } = await import("./chunks/create.action-FUQ2BVJA.js");
199
208
  return createAction(...args);
200
209
  });
201
- return cmd2;
210
+ return cmd3;
202
211
  };
203
212
 
204
213
  // src/domains/sdk/delete.ts
205
214
  import { Command as Command9 } from "commander";
206
215
  var DeleteSdkCommand = () => {
207
- const cmd2 = new Command9("delete");
208
- cmd2.description("Delete an SDK.");
209
- cmd2.option("-s, --slug <slug>", "SDK slug");
210
- cmd2.option("-n, --namespace <namespace>", "Team namespace");
211
- cmd2.action(async (...args) => {
212
- const { deleteAction } = await import("./chunks/delete.action-6LRT4M3S.js");
216
+ const cmd3 = new Command9("delete");
217
+ cmd3.description("Delete an SDK.");
218
+ cmd3.option("-s, --slug <slug>", "SDK slug");
219
+ cmd3.option("-n, --namespace <namespace>", "Team namespace");
220
+ cmd3.action(async (...args) => {
221
+ const { deleteAction } = await import("./chunks/delete.action-BTDFH7WY.js");
213
222
  return deleteAction(...args);
214
223
  });
215
- return cmd2;
224
+ return cmd3;
216
225
  };
217
226
 
218
227
  // src/domains/sdk/update.ts
219
228
  import { Command as Command10 } from "commander";
220
229
  var UpdateSdkCommand = () => {
221
- const cmd2 = new Command10("update");
222
- cmd2.description("Update SDK metadata.");
223
- cmd2.option("-s, --slug <slug>", "SDK slug");
224
- cmd2.option("-n, --namespace <namespace>", "Team namespace");
225
- cmd2.option("--title <title>", "Title");
226
- cmd2.option("--isPrivate <isPrivate>", "Privacy (public/private)");
227
- cmd2.action(async (...args) => {
228
- const { updateAction } = await import("./chunks/update.action-ZREAFJVG.js");
230
+ const cmd3 = new Command10("update");
231
+ cmd3.description("Update SDK metadata.");
232
+ cmd3.option("-s, --slug <slug>", "SDK slug");
233
+ cmd3.option("-n, --namespace <namespace>", "Team namespace");
234
+ cmd3.option("--title <title>", "Title");
235
+ cmd3.option(
236
+ "--isPrivate <isPrivate>",
237
+ "Privacy (true/false or public/private)"
238
+ );
239
+ cmd3.action(async (...args) => {
240
+ const { updateAction } = await import("./chunks/update.action-ZMS4CQ3T.js");
229
241
  return updateAction(...args);
230
242
  });
231
- return cmd2;
243
+ return cmd3;
232
244
  };
233
245
 
234
246
  // src/domains/sdk/list.ts
235
247
  import { Command as Command11 } from "commander";
236
248
  var ListSdkCommand = () => {
237
- const cmd2 = new Command11("list");
238
- cmd2.description("List all SDKs for a team namespace");
239
- cmd2.option("--namespace <namespace>", "Team namespace");
240
- cmd2.action(async (...args) => {
241
- const { listAction } = await import("./chunks/list.action-6LF6KSD5.js");
249
+ const cmd3 = new Command11("list");
250
+ cmd3.description("List all SDKs for a team namespace");
251
+ cmd3.option("--namespace <namespace>", "Team namespace");
252
+ cmd3.action(async (...args) => {
253
+ const { listAction } = await import("./chunks/list.action-LXKEUYKO.js");
242
254
  return listAction(...args);
243
255
  });
244
- return cmd2;
256
+ return cmd3;
245
257
  };
246
258
 
247
259
  // src/domains/sdk/index.ts
@@ -257,253 +269,328 @@ sdkDomain.description("Manage your Scalar SDKs (Enterprise Only)");
257
269
  sdkCommands.forEach((command) => sdkDomain.addCommand(command()));
258
270
  var sdk_default = sdkDomain;
259
271
 
272
+ // src/domains/access-group/index.ts
273
+ import { Command as Command13 } from "commander";
274
+ function createAccessGroupCommand() {
275
+ const command = new Command13("access-group").description(
276
+ "Manage access groups and allowed email domains for the current team"
277
+ );
278
+ command.command("create").description("Create an access group (Pro or above)").argument("<slug>", "New access group slug").option("--name <name>", "Display name").option("--domain <domains...>", "Allowed email domains").option("--json", "Print the result as JSON").action(
279
+ async (slug, options) => {
280
+ const { runAction } = await import("./chunks/actions-OGIVBQC7.js");
281
+ await runAction({ operation: "create", slug, ...options });
282
+ }
283
+ );
284
+ command.command("get").description("Get an access group and its allowlists").argument("<slug>", "Access group slug").option("--json", "Print the result as JSON").action(async (slug, options) => {
285
+ const { runAction } = await import("./chunks/actions-OGIVBQC7.js");
286
+ await runAction({ operation: "get", slug, ...options });
287
+ });
288
+ command.command("update").description("Update access group metadata").argument("<slug>", "Current access group slug").option("--name <name>", "New display name").option("--new-slug <slug>", "New access group slug").option("--json", "Print the result as JSON").action(
289
+ async (slug, options) => {
290
+ const { runAction } = await import("./chunks/actions-OGIVBQC7.js");
291
+ await runAction({ operation: "update", slug, ...options });
292
+ }
293
+ );
294
+ command.command("delete").description("Delete an access group and remove its project assignments").argument("<slug>", "Access group slug").option("-y, --yes", "Confirm deletion without prompting").option("--json", "Print the result as JSON (requires --yes)").action(
295
+ async (slug, options) => {
296
+ const { runAction } = await import("./chunks/actions-OGIVBQC7.js");
297
+ await runAction({ operation: "delete", slug, ...options });
298
+ }
299
+ );
300
+ const domain = command.command("domain").description("Manage allowed email domains");
301
+ domain.command("add").description("Add an exact email domain to an access group").argument("<slug>", "Access group slug").argument("<domain>", "Email domain, such as example.com").option("--json", "Print the result as JSON").action(
302
+ async (slug, domain2, options) => {
303
+ const { runAction } = await import("./chunks/actions-OGIVBQC7.js");
304
+ await runAction({ operation: "add-domain", slug, domain: domain2, ...options });
305
+ }
306
+ );
307
+ domain.command("remove").description("Remove an exact email domain from an access group").argument("<slug>", "Access group slug").argument("<domain>", "Email domain, such as example.com").option("--json", "Print the result as JSON").action(
308
+ async (slug, domain2, options) => {
309
+ const { runAction } = await import("./chunks/actions-OGIVBQC7.js");
310
+ await runAction({
311
+ operation: "remove-domain",
312
+ slug,
313
+ domain: domain2,
314
+ ...options
315
+ });
316
+ }
317
+ );
318
+ return command;
319
+ }
320
+ var access_group_default = createAccessGroupCommand();
321
+
260
322
  // src/domains/auth/index.ts
261
- import { Command as Command16 } from "commander";
323
+ import { Command as Command17 } from "commander";
262
324
 
263
325
  // src/domains/auth/login/index.ts
264
- import { Command as Command13 } from "commander";
326
+ import { Command as Command14 } from "commander";
265
327
  var LoginCommand = () => {
266
- const cmd2 = new Command13("login");
267
- cmd2.description("Login to scalar");
268
- cmd2.option("--email <email>", "Email");
269
- cmd2.option("--password <password>", "Password");
270
- cmd2.option("--token <token>", "Personal token");
271
- cmd2.action(async (...args) => {
272
- const { loginAction } = await import("./chunks/action-HXHBU7XC.js");
328
+ const cmd3 = new Command14("login");
329
+ cmd3.description("Login to scalar");
330
+ cmd3.option("--email <email>", "Email");
331
+ cmd3.option("--password <password>", "Password");
332
+ cmd3.option("--token <token>", "Personal token");
333
+ cmd3.action(async (...args) => {
334
+ const { loginAction } = await import("./chunks/action-KTYOCA2V.js");
273
335
  return loginAction(...args);
274
336
  });
275
- return cmd2;
337
+ return cmd3;
276
338
  };
277
339
 
278
340
  // src/domains/auth/logout/index.ts
279
- import { Command as Command14 } from "commander";
341
+ import { Command as Command15 } from "commander";
280
342
  var LogoutCommand = () => {
281
- const cmd2 = new Command14("logout");
282
- cmd2.description("Logout from scalar");
283
- cmd2.action(async () => {
343
+ const cmd3 = new Command15("logout");
344
+ cmd3.description("Logout from scalar");
345
+ cmd3.action(async () => {
284
346
  await clearAuthData();
285
347
  output.info().message("Successfully logged out.").print();
286
348
  });
287
- return cmd2;
349
+ return cmd3;
288
350
  };
289
351
 
290
352
  // src/domains/auth/whoami/index.ts
291
353
  import as from "ansis";
292
- import { Command as Command15 } from "commander";
354
+ import { Command as Command16 } from "commander";
293
355
  var WhoAmICommand = () => {
294
- const cmd2 = new Command15("whoami");
295
- cmd2.description("Display the current user");
296
- cmd2.action(async () => {
356
+ const cmd3 = new Command16("whoami");
357
+ cmd3.description("Display the current user");
358
+ cmd3.action(async () => {
297
359
  const auth = await getAuthData();
298
360
  output.info().message(
299
361
  `You are logged in as ${as.cyan(auth.email ?? "")} (role: ${as.cyan(auth.role ?? "Owner")})`
300
362
  ).line().print();
301
363
  });
302
- return cmd2;
364
+ return cmd3;
303
365
  };
304
366
 
305
367
  // src/domains/auth/index.ts
306
368
  var authCommands = [LoginCommand, WhoAmICommand, LogoutCommand];
307
- var authDomain = new Command16("auth");
369
+ var authDomain = new Command17("auth");
308
370
  authDomain.description("Manage authorization on scalar platform");
309
371
  authCommands.forEach((command) => authDomain.addCommand(command()));
310
372
  var auth_default = authDomain;
311
373
 
374
+ // src/domains/context/index.ts
375
+ import { Command as Command18 } from "commander";
376
+ var cmd = new Command18("context");
377
+ cmd.description(
378
+ "Print every command, argument, and option as JSON for AI agents"
379
+ );
380
+ cmd.action(async () => {
381
+ const { contextAction } = await import("./chunks/action-F2ZJNURT.js");
382
+ return contextAction(cmd);
383
+ });
384
+ var context_default = cmd;
385
+
312
386
  // src/domains/document/index.ts
313
- import { Command as Command29 } from "commander";
387
+ import { Command as Command31 } from "commander";
314
388
 
315
389
  // src/domains/document/join/index.ts
316
- import { Command as Command17 } from "commander";
390
+ import { Command as Command19 } from "commander";
317
391
  function JoinCommand() {
318
- const cmd2 = new Command17("join");
319
- cmd2.description(
392
+ const cmd3 = new Command19("join");
393
+ cmd3.description(
320
394
  "Merge multiple OpenAPI or AsyncAPI documents into a single unified document"
321
395
  );
322
- cmd2.argument("<files...>", "Paths to the OpenAPI or AsyncAPI files to merge");
323
- cmd2.option("--output -o <file>", "Path to save the merged output file");
324
- cmd2.option(
396
+ cmd3.argument("<files...>", "Paths to the OpenAPI or AsyncAPI files to merge");
397
+ cmd3.option("--output -o <file>", "Path to save the merged output file");
398
+ cmd3.option(
325
399
  "--prefix-components-with-path-value -p <path>",
326
400
  "Dot-separated path to extract a prefix value from each input file for component names"
327
401
  );
328
- cmd2.action(async (...args) => {
329
- const { joinAction } = await import("./chunks/action-LUVBQEIQ.js");
402
+ cmd3.action(async (...args) => {
403
+ const { joinAction } = await import("./chunks/action-7PEQXDWT.js");
330
404
  return joinAction(...args);
331
405
  });
332
- return cmd2;
406
+ return cmd3;
333
407
  }
334
408
 
335
409
  // src/domains/document/split/index.ts
336
- import { Command as Command18 } from "commander";
410
+ import { Command as Command20 } from "commander";
337
411
  function SplitCommand() {
338
- const cmd2 = new Command18("split");
339
- cmd2.description("Split OpenAPI or AsyncAPI documents into small chunks");
340
- cmd2.argument("[file|url]", "Path to OpenAPI or AsyncAPI file or URL to split");
341
- cmd2.option("-o, --output <path>", "Path to save the chunks");
342
- cmd2.addHelpText(
412
+ const cmd3 = new Command20("split");
413
+ cmd3.description("Split OpenAPI or AsyncAPI documents into small chunks");
414
+ cmd3.argument("[file|url]", "Path to OpenAPI or AsyncAPI file or URL to split");
415
+ cmd3.option("-o, --output <path>", "Path to save the chunks");
416
+ cmd3.addHelpText(
343
417
  "after",
344
418
  "\nAsyncAPI versions are preserved (including 2.6, 3.0, and 3.1). External references are bundled before splitting.\n"
345
419
  );
346
- cmd2.action(async (...args) => {
347
- const { splitAction } = await import("./chunks/action-SJYAMXYI.js");
420
+ cmd3.action(async (...args) => {
421
+ const { splitAction } = await import("./chunks/action-YRX6SN5F.js");
348
422
  return splitAction(...args);
349
423
  });
350
- return cmd2;
424
+ return cmd3;
351
425
  }
352
426
 
353
427
  // src/domains/document/format/index.ts
354
- import { Command as Command19 } from "commander";
428
+ import { Command as Command21 } from "commander";
355
429
  function FormatCommand() {
356
- const cmd2 = new Command19("format");
357
- cmd2.description("Format an OpenAPI or AsyncAPI file");
358
- cmd2.argument("[file|url]", "File or URL to format");
359
- cmd2.option("-o, --output <file>", "Output file");
360
- cmd2.action(async (...args) => {
361
- const { formatAction } = await import("./chunks/action-ZWQLQENM.js");
430
+ const cmd3 = new Command21("format");
431
+ cmd3.description("Format an OpenAPI or AsyncAPI file");
432
+ cmd3.argument("[file|url]", "File or URL to format");
433
+ cmd3.option("-o, --output <file>", "Output file");
434
+ cmd3.action(async (...args) => {
435
+ const { formatAction } = await import("./chunks/action-H6OUJWWM.js");
362
436
  return formatAction(...args);
363
437
  });
364
- return cmd2;
438
+ return cmd3;
365
439
  }
366
440
 
367
441
  // src/domains/document/lint/index.ts
368
- import { Command as Command20 } from "commander";
442
+ import { Command as Command22 } from "commander";
369
443
  function LintCommand() {
370
- const cmd2 = new Command20("lint");
371
- cmd2.description("Lint your OpenAPI or AsyncAPI file using spectral rules");
372
- cmd2.argument("[file|url]", "OpenAPI or AsyncAPI file path or url");
373
- cmd2.option("-r, --rule <file|url>", "Rule path or url");
374
- cmd2.action(async (...args) => {
375
- const { lintAction } = await import("./chunks/action-PAA4NWUJ.js");
444
+ const cmd3 = new Command22("lint");
445
+ cmd3.description("Lint your OpenAPI or AsyncAPI file using spectral rules");
446
+ cmd3.argument("[file|url]", "OpenAPI or AsyncAPI file path or url");
447
+ cmd3.option("-r, --rule <file|url>", "Rule path or url");
448
+ cmd3.action(async (...args) => {
449
+ const { lintAction } = await import("./chunks/action-JAHFRYWZ.js");
376
450
  return lintAction(...args);
377
451
  });
378
- return cmd2;
452
+ return cmd3;
379
453
  }
380
454
 
381
455
  // src/domains/document/markdown/index.ts
382
- import { Command as Command21 } from "commander";
456
+ import { Command as Command23 } from "commander";
383
457
  function MarkdownCommand() {
384
- const cmd2 = new Command21("markdown");
385
- cmd2.description("Generate Markdown from an OpenAPI file");
386
- cmd2.argument("[file|url]", "OpenAPI file path or URL to convert");
387
- cmd2.option("-o, --output <file>", "Output file (defaults to stdout)");
388
- cmd2.action(async (...args) => {
389
- const { markdownAction } = await import("./chunks/action-6FAJNP6C.js");
458
+ const cmd3 = new Command23("markdown");
459
+ cmd3.description("Generate Markdown from an OpenAPI file");
460
+ cmd3.argument("[file|url]", "OpenAPI file path or URL to convert");
461
+ cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
462
+ cmd3.action(async (...args) => {
463
+ const { markdownAction } = await import("./chunks/action-VOFDW3U2.js");
390
464
  return markdownAction(...args);
391
465
  });
392
- return cmd2;
466
+ return cmd3;
393
467
  }
394
468
 
395
469
  // src/domains/document/mock/index.ts
396
- import { Command as Command22 } from "commander";
470
+ import { Command as Command24 } from "commander";
397
471
  function MockCommand() {
398
- const cmd2 = new Command22("mock");
399
- cmd2.description("Mock an OpenAPI API or AsyncAPI WebSocket and SSE channels");
400
- cmd2.argument("[file|url]", "OpenAPI or AsyncAPI file or URL to mock");
401
- cmd2.option("-w, --watch", "watch the file for changes");
402
- cmd2.option("-o, --once", "run the server only once and exit after that");
403
- cmd2.option("-p, --port <port>", "set the HTTP port for the mock server");
404
- cmd2.action(async (...args) => {
405
- const { mockAction } = await import("./chunks/action-TWHLZW4V.js");
472
+ const cmd3 = new Command24("mock");
473
+ cmd3.description("Mock an OpenAPI API or AsyncAPI WebSocket and SSE channels");
474
+ cmd3.argument("[file|url]", "OpenAPI or AsyncAPI file or URL to mock");
475
+ cmd3.option("-w, --watch", "watch the file for changes");
476
+ cmd3.option("-o, --once", "run the server only once and exit after that");
477
+ cmd3.option(
478
+ "-p, --port <port>",
479
+ "set the HTTP port for the mock server",
480
+ parsePort
481
+ );
482
+ cmd3.action(async (...args) => {
483
+ const { mockAction } = await import("./chunks/action-HT2DJ34Z.js");
406
484
  return mockAction(...args);
407
485
  });
408
- return cmd2;
486
+ return cmd3;
409
487
  }
410
488
 
411
489
  // src/domains/document/postman/index.ts
412
- import { Command as Command23 } from "commander";
490
+ import { Command as Command25 } from "commander";
413
491
  function ConvertCommand() {
414
- const cmd2 = new Command23("convert");
415
- cmd2.description("Convert a Postman collection to an OpenAPI document");
416
- cmd2.argument("[file|url]", "Postman collection file path or URL to convert");
417
- cmd2.option("-o, --output <file>", "Output file (defaults to stdout)");
418
- cmd2.option(
492
+ const cmd3 = new Command25("convert");
493
+ cmd3.description("Convert a Postman collection to an OpenAPI document");
494
+ cmd3.argument("[file|url]", "Postman collection file path or URL to convert");
495
+ cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
496
+ cmd3.option(
419
497
  "--merge-operations",
420
498
  "Merge operations with shared path+method combinations"
421
499
  );
422
- cmd2.action(async (...args) => {
423
- const { convertAction } = await import("./chunks/action-AMNYOA4B.js");
500
+ cmd3.action(async (...args) => {
501
+ const { convertAction } = await import("./chunks/action-F7A2K74G.js");
424
502
  return convertAction(...args);
425
503
  });
426
- return cmd2;
504
+ return cmd3;
427
505
  }
428
506
 
429
507
  // src/domains/document/serve/index.ts
430
- import { Command as Command24 } from "commander";
508
+ import { Command as Command26 } from "commander";
431
509
  function ServeCommand() {
432
- const cmd2 = new Command24("serve");
433
- cmd2.description("Serve an API Reference from an OpenAPI or AsyncAPI file");
434
- cmd2.argument(
510
+ const cmd3 = new Command26("serve");
511
+ cmd3.description("Serve an API Reference from an OpenAPI or AsyncAPI file");
512
+ cmd3.argument(
435
513
  "[file|url]",
436
514
  "OpenAPI or AsyncAPI file or URL to show the reference for"
437
515
  );
438
- cmd2.option("-w, --watch", "watch the file for changes");
439
- cmd2.option("-o, --once", "run the server only once and exit after that");
440
- cmd2.option(
516
+ cmd3.option(
517
+ "-c, --config <file>",
518
+ "JSON file with API Reference configuration"
519
+ );
520
+ cmd3.option("-w, --watch", "watch the file for changes");
521
+ cmd3.option("-o, --once", "run the server only once and exit after that");
522
+ cmd3.option(
441
523
  "-p, --port <port>",
442
- "set the HTTP port for the API reference server"
524
+ "set the HTTP port for the API reference server",
525
+ parsePort
443
526
  );
444
- cmd2.action(async (...args) => {
445
- const { serveAction } = await import("./chunks/action-X7TZA3RE.js");
527
+ cmd3.action(async (...args) => {
528
+ const { serveAction } = await import("./chunks/action-Y6NXJQ4H.js");
446
529
  return serveAction(...args);
447
530
  });
448
- return cmd2;
531
+ return cmd3;
449
532
  }
450
533
 
451
534
  // src/domains/document/share/index.ts
452
- import { Command as Command25 } from "commander";
535
+ import { Command as Command27 } from "commander";
453
536
  function ShareCommand() {
454
- const cmd2 = new Command25("share");
455
- cmd2.description("Share an OpenAPI or AsyncAPI file");
456
- cmd2.argument("[file]", "file to share");
457
- cmd2.option(
537
+ const cmd3 = new Command27("share");
538
+ cmd3.description("Share an OpenAPI or AsyncAPI file");
539
+ cmd3.argument("[file]", "file to share");
540
+ cmd3.option(
458
541
  "-t, --token <token>",
459
542
  "pass a token to update an existing sandbox"
460
543
  );
461
- cmd2.action(async (...args) => {
462
- const { shareAction } = await import("./chunks/action-HIL5ZFNB.js");
544
+ cmd3.action(async (...args) => {
545
+ const { shareAction } = await import("./chunks/action-FCAYFPVR.js");
463
546
  return shareAction(...args);
464
547
  });
465
- return cmd2;
548
+ return cmd3;
466
549
  }
467
550
 
468
551
  // src/domains/document/upgrade/index.ts
469
- import { Command as Command26 } from "commander";
552
+ import { Command as Command28 } from "commander";
470
553
  function UpgradeCommand() {
471
- const cmd2 = new Command26("upgrade");
472
- cmd2.description("Upgrade an OpenAPI or AsyncAPI document to version 3.1");
473
- cmd2.argument("[file|url]", "File or URL to upgrade");
474
- cmd2.option("-o, --output <file>", "Path to save the upgraded output file");
475
- cmd2.action(async (...args) => {
476
- const { upgradeAction } = await import("./chunks/action-DGD6Q6Y5.js");
554
+ const cmd3 = new Command28("upgrade");
555
+ cmd3.description("Upgrade an OpenAPI or AsyncAPI document to version 3.1");
556
+ cmd3.argument("[file|url]", "File or URL to upgrade");
557
+ cmd3.option("-o, --output <file>", "Path to save the upgraded output file");
558
+ cmd3.action(async (...args) => {
559
+ const { upgradeAction } = await import("./chunks/action-5SK5NE7E.js");
477
560
  return upgradeAction(...args);
478
561
  });
479
- return cmd2;
562
+ return cmd3;
480
563
  }
481
564
 
482
565
  // src/domains/document/validate/index.ts
483
- import { Command as Command27 } from "commander";
566
+ import { Command as Command29 } from "commander";
484
567
  function ValidateCommand() {
485
- const cmd2 = new Command27("validate");
486
- cmd2.description("Validate an OpenAPI or AsyncAPI file");
487
- cmd2.argument("[file|url]", "File or URL to validate");
488
- cmd2.action(async (...args) => {
489
- const { validateAction } = await import("./chunks/action-YRWHX2AE.js");
568
+ const cmd3 = new Command29("validate");
569
+ cmd3.description("Validate an OpenAPI or AsyncAPI file");
570
+ cmd3.argument("[file|url]", "File or URL to validate");
571
+ cmd3.action(async (...args) => {
572
+ const { validateAction } = await import("./chunks/action-AQRPFQKI.js");
490
573
  return validateAction(...args);
491
574
  });
492
- return cmd2;
575
+ return cmd3;
493
576
  }
494
577
 
495
578
  // src/domains/document/void/index.ts
496
- import { Command as Command28 } from "commander";
579
+ import { Command as Command30 } from "commander";
497
580
  function VoidCommand() {
498
- const cmd2 = new Command28("void");
499
- cmd2.description("Boot a server to mirror HTTP requests");
500
- cmd2.option("-o, --once", "run the server only once and exit after that");
501
- cmd2.option("-p, --port <port>", "set the HTTP port for the mock server");
502
- cmd2.action(async (...args) => {
581
+ const cmd3 = new Command30("void");
582
+ cmd3.description("Boot a server to mirror HTTP requests");
583
+ cmd3.option("-o, --once", "run the server only once and exit after that");
584
+ cmd3.option(
585
+ "-p, --port <port>",
586
+ "set the HTTP port for the mock server",
587
+ parsePort
588
+ );
589
+ cmd3.action(async (...args) => {
503
590
  const { voidAction } = await import("./chunks/action-H3RTILLM.js");
504
591
  return voidAction(...args);
505
592
  });
506
- return cmd2;
593
+ return cmd3;
507
594
  }
508
595
 
509
596
  // src/domains/document/index.ts
@@ -522,172 +609,165 @@ var documentCommands = [
522
609
  LintCommand,
523
610
  UpgradeCommand
524
611
  ];
525
- var documentDomain = new Command29("document");
612
+ var documentDomain = new Command31("document");
526
613
  documentDomain.description("Manage local openapi file");
527
614
  documentCommands.forEach((command) => documentDomain.addCommand(command()));
528
615
  var document_default = documentDomain;
529
616
 
530
617
  // src/domains/project/index.ts
531
- import { Command as Command39 } from "commander";
618
+ import { Command as Command41 } from "commander";
532
619
 
533
620
  // src/domains/project/preview/index.ts
534
- import { Command as Command30 } from "commander";
621
+ import { Command as Command32, Option as Option2 } from "commander";
535
622
  var PreviewCommand = () => {
536
- const cmd2 = new Command30("preview");
537
- cmd2.description("Preview scalar guides");
538
- cmd2.argument(
623
+ const cmd3 = new Command32("preview");
624
+ cmd3.description("Preview scalar guides");
625
+ cmd3.argument(
539
626
  "[config]",
540
627
  "Path to the Scalar configuration file (usually `scalar.config.json5` or `scalar.config.json`)"
541
628
  );
542
- cmd2.option(
629
+ cmd3.option(
543
630
  "-p, --port [port]",
544
631
  "port to run the server on. If the port is not available, it will select another one.",
545
632
  "7970"
546
633
  );
547
- cmd2.option(
548
- "-h, --host [host]",
634
+ cmd3.option(
635
+ "-H, --host [host]",
549
636
  "Specify which IP addresses the server should listen on."
550
637
  );
551
- cmd2.option(
552
- "-L, --log-level <level>",
553
- "Set the log level (debug, info, warn, error, trace)",
554
- "info"
638
+ cmd3.addOption(
639
+ new Option2("-L, --log-level <level>", "Set the log level").choices(["debug", "info"]).default("info")
555
640
  );
556
- cmd2.option(
557
- "-F, --log-formatting <formatting>",
558
- "Set the log formatting (pretty|none). Defaults to pretty formatting outside of CI.",
559
- "pretty"
560
- );
561
- cmd2.option("-N, --no-open", "Do not open the browser automatically", true);
562
- cmd2.action(async (...args) => {
563
- const { previewAction } = await import("./chunks/action-FF2OMGAS.js");
641
+ cmd3.option("-N, --no-open", "Do not open the browser automatically", true);
642
+ cmd3.action(async (...args) => {
643
+ const { previewAction } = await import("./chunks/action-LLH4QPXM.js");
564
644
  return previewAction(...args);
565
645
  });
566
- return cmd2;
646
+ return cmd3;
567
647
  };
568
648
 
569
649
  // src/domains/project/check-config/index.ts
570
- import { Command as Command31 } from "commander";
650
+ import { Command as Command33 } from "commander";
571
651
  function CheckConfigCommand() {
572
- const cmd2 = new Command31("check-config");
573
- cmd2.description("Check a Scalar Configuration file");
574
- cmd2.argument("[file]", "File to check");
575
- cmd2.action(async (...args) => {
576
- const { checkConfigAction } = await import("./chunks/action-W62AIEBN.js");
652
+ const cmd3 = new Command33("check-config");
653
+ cmd3.description("Check a Scalar Configuration file");
654
+ cmd3.argument("[file]", "File to check");
655
+ cmd3.action(async (...args) => {
656
+ const { checkConfigAction } = await import("./chunks/action-NVI5DWFP.js");
577
657
  return checkConfigAction(...args);
578
658
  });
579
- return cmd2;
659
+ return cmd3;
580
660
  }
581
661
 
582
662
  // src/domains/project/create/index.ts
583
- import { Command as Command32 } from "commander";
663
+ import { Command as Command34 } from "commander";
584
664
  var CreateCommand = () => {
585
- const cmd2 = new Command32("create");
586
- cmd2.description(
665
+ const cmd3 = new Command34("create");
666
+ cmd3.description(
587
667
  "Create a new project that is not linked to a github project."
588
668
  );
589
- cmd2.option("-n, --name [name]", "name of your project");
590
- cmd2.option("-s, --slug [slug]", "project slug");
591
- cmd2.action(async (...args) => {
592
- const { createAction } = await import("./chunks/action-P7RFXIC7.js");
669
+ cmd3.option("-n, --name <name>", "name of your project");
670
+ cmd3.option("-s, --slug <slug>", "project slug");
671
+ cmd3.action(async (...args) => {
672
+ const { createAction } = await import("./chunks/action-WFDNRA7D.js");
593
673
  return createAction(...args);
594
674
  });
595
- return cmd2;
675
+ return cmd3;
596
676
  };
597
677
 
598
678
  // src/domains/project/deployments/index.ts
599
- import { Command as Command34 } from "commander";
679
+ import { Command as Command36 } from "commander";
600
680
 
601
681
  // src/domains/project/deployments/list/index.ts
602
- import { Command as Command33 } from "commander";
682
+ import { Command as Command35 } from "commander";
603
683
  var ListCommand = () => {
604
- const cmd2 = new Command33("list");
605
- cmd2.description("List the production deployment history for a project.");
606
- cmd2.option("-s, --slug [slug]", "Project slug found in Scalar Dashboard");
607
- cmd2.action(async (...args) => {
608
- const { listAction } = await import("./chunks/action-EPNE5XCM.js");
684
+ const cmd3 = new Command35("list");
685
+ cmd3.description("List the production deployment history for a project.");
686
+ cmd3.option("-s, --slug [slug]", "Project slug found in Scalar Dashboard");
687
+ cmd3.action(async (...args) => {
688
+ const { listAction } = await import("./chunks/action-QQZLPI42.js");
609
689
  return listAction(...args);
610
690
  });
611
- return cmd2;
691
+ return cmd3;
612
692
  };
613
693
 
614
694
  // src/domains/project/deployments/index.ts
615
695
  var DeploymentsCommand = () => {
616
- const cmd2 = new Command34("deployments");
617
- cmd2.description("Inspect a project deployment history.");
618
- cmd2.addCommand(ListCommand());
619
- return cmd2;
696
+ const cmd3 = new Command36("deployments");
697
+ cmd3.description("Inspect a project deployment history.");
698
+ cmd3.addCommand(ListCommand());
699
+ return cmd3;
620
700
  };
621
701
 
622
702
  // src/domains/project/init/index.ts
623
- import { Command as Command35 } from "commander";
703
+ import { Command as Command37 } from "commander";
624
704
  var InitCommand = () => {
625
- const cmd2 = new Command35("init");
626
- cmd2.description("Create a new Scalar Docs project.");
627
- cmd2.option("-s, --subdomain [url]", "subdomain to publish on");
628
- cmd2.option("--force", "override existing configuration");
629
- cmd2.action(async (...args) => {
630
- const { initAction } = await import("./chunks/action-6MZZHPVQ.js");
705
+ const cmd3 = new Command37("init");
706
+ cmd3.description("Create a new Scalar Docs project.");
707
+ cmd3.option("-s, --subdomain [url]", "subdomain to publish on");
708
+ cmd3.option("--force", "override existing configuration");
709
+ cmd3.action(async (...args) => {
710
+ const { initAction } = await import("./chunks/action-Y7OUGD56.js");
631
711
  return initAction(...args);
632
712
  });
633
- return cmd2;
713
+ return cmd3;
634
714
  };
635
715
 
636
716
  // src/domains/project/publish/index.ts
637
- import { Command as Command36 } from "commander";
717
+ import { Command as Command38 } from "commander";
638
718
  var PublishCommand = () => {
639
- const cmd2 = new Command36("publish");
640
- cmd2.description(
719
+ const cmd3 = new Command38("publish");
720
+ cmd3.description(
641
721
  "Publish new build for a github sync project that is not linked."
642
722
  );
643
- cmd2.option("-s, --slug [slug]", "Project slug found in Scalar Dashboard");
644
- cmd2.option("-c, --config [config]", "Your config file of the project");
645
- cmd2.option("-p, --preview", "Publish in preview mode");
646
- cmd2.option(
723
+ cmd3.option("-s, --slug [slug]", "Project slug found in Scalar Dashboard");
724
+ cmd3.option("-c, --config [config]", "Your config file of the project");
725
+ cmd3.option("-p, --preview", "Publish in preview mode");
726
+ cmd3.option(
647
727
  "-g, --github",
648
728
  "Publish from your linked remote GitHub repository"
649
729
  );
650
- cmd2.action(async (...args) => {
651
- const { publishAction } = await import("./chunks/action-PHLOE27S.js");
730
+ cmd3.action(async (...args) => {
731
+ const { publishAction } = await import("./chunks/action-43YBNBDR.js");
652
732
  return publishAction(...args);
653
733
  });
654
- return cmd2;
734
+ return cmd3;
655
735
  };
656
736
 
657
737
  // src/domains/project/rollback/index.ts
658
- import { Command as Command37 } from "commander";
738
+ import { Command as Command39 } from "commander";
659
739
  var RollbackCommand = () => {
660
- const cmd2 = new Command37("rollback");
661
- cmd2.description(
740
+ const cmd3 = new Command39("rollback");
741
+ cmd3.description(
662
742
  "Roll the live deployment back to a previously deployed build."
663
743
  );
664
- cmd2.option("-s, --slug [slug]", "Project slug found in Scalar Dashboard");
665
- cmd2.option(
744
+ cmd3.option("-s, --slug [slug]", "Project slug found in Scalar Dashboard");
745
+ cmd3.option(
666
746
  "-t, --to <publishUid>",
667
747
  "Roll back to a specific build id (defaults to the next older deployed build)"
668
748
  );
669
- cmd2.option("-y, --yes", "Skip the confirmation prompt");
670
- cmd2.action(async (...args) => {
671
- const { rollbackAction } = await import("./chunks/action-ZLTUMRO2.js");
749
+ cmd3.option("-y, --yes", "Skip the confirmation prompt");
750
+ cmd3.action(async (...args) => {
751
+ const { rollbackAction } = await import("./chunks/action-UIKH4SZX.js");
672
752
  return rollbackAction(...args);
673
753
  });
674
- return cmd2;
754
+ return cmd3;
675
755
  };
676
756
 
677
757
  // src/domains/project/upgrade/index.ts
678
- import { Command as Command38 } from "commander";
758
+ import { Command as Command40 } from "commander";
679
759
  var UpgradeCommand2 = () => {
680
- const cmd2 = new Command38("upgrade");
681
- cmd2.description("Upgrade scalar project");
682
- cmd2.argument(
760
+ const cmd3 = new Command40("upgrade");
761
+ cmd3.description("Upgrade scalar project");
762
+ cmd3.argument(
683
763
  "[config]",
684
764
  "Path to the Scalar configuration file (usually `scalar.config.json5` or `scalar.config.json`)"
685
765
  );
686
- cmd2.action(async (...args) => {
687
- const { upgradeAction } = await import("./chunks/action-RBVPKCRI.js");
766
+ cmd3.action(async (...args) => {
767
+ const { upgradeAction } = await import("./chunks/action-CA4QYPI6.js");
688
768
  return upgradeAction(...args);
689
769
  });
690
- return cmd2;
770
+ return cmd3;
691
771
  };
692
772
 
693
773
  // src/domains/project/index.ts
@@ -701,19 +781,19 @@ var projectCommands = [
701
781
  DeploymentsCommand,
702
782
  UpgradeCommand2
703
783
  ];
704
- var projectDomain = new Command39("project");
784
+ var projectDomain = new Command41("project");
705
785
  projectDomain.description("Manage scalar project");
706
786
  projectCommands.forEach((command) => projectDomain.addCommand(command()));
707
787
  projectDomain.addCommand(DownloadIsolateCommand(), { hidden: true });
708
788
  var project_default = projectDomain;
709
789
 
710
790
  // src/domains/readme/index.ts
711
- import { Command as Command41 } from "commander";
791
+ import { Command as Command43 } from "commander";
712
792
 
713
793
  // src/domains/readme/generate.ts
714
794
  import { text } from "@clack/prompts";
715
795
  import as2 from "ansis";
716
- import { Command as Command40 } from "commander";
796
+ import { Command as Command42 } from "commander";
717
797
 
718
798
  // src/helpers/documentation/index.ts
719
799
  import fs from "node:fs/promises";
@@ -760,17 +840,20 @@ var generateDocumentationFile = async (outputPath) => {
760
840
 
761
841
  // src/domains/readme/generate.ts
762
842
  function GenerateReadmeCommand() {
763
- const cmd2 = new Command40("generate");
764
- cmd2.description("Self generate documentation for the cli");
765
- cmd2.option(
843
+ const cmd3 = new Command42("generate");
844
+ cmd3.description("Self generate documentation for the cli");
845
+ cmd3.option(
766
846
  "-o, --output [file]",
767
847
  "Path where the documentation file will be written"
768
848
  );
769
- cmd2.action(async ({ output: __outputPath }) => {
849
+ cmd3.action(async ({ output: __outputPath }) => {
770
850
  const getOutputPath = async () => {
771
851
  if (__outputPath !== void 0 && typeof __outputPath === "string") {
772
852
  return __outputPath;
773
853
  }
854
+ requireInteractive(
855
+ "Pass --output <file> to generate documentation without a terminal."
856
+ );
774
857
  const outputPath2 = await text({
775
858
  message: "Where should the documentation file be written?",
776
859
  defaultValue: "./README.md",
@@ -789,7 +872,7 @@ function GenerateReadmeCommand() {
789
872
  `\u23F1\uFE0F Generation completed in ${as2.yellow(executionTimeMs.toFixed(2))}ms`
790
873
  ).line("").exit("success");
791
874
  });
792
- return cmd2;
875
+ return cmd3;
793
876
  }
794
877
 
795
878
  // src/domains/readme/serve.ts
@@ -804,9 +887,9 @@ var fileExists = async (filePath) => {
804
887
  return false;
805
888
  }
806
889
  };
807
- function ServeReadmeCommand(cmd2) {
808
- cmd2.description("Open documentation for the CLI");
809
- cmd2.action(async () => {
890
+ function ServeReadmeCommand(cmd3) {
891
+ cmd3.description("Open documentation for the CLI");
892
+ cmd3.action(async () => {
810
893
  const docsPath = path2.join(import.meta.dirname, "docs.html");
811
894
  if (await fileExists(docsPath) === false) {
812
895
  return output.error().title("Documentation not found").message(
@@ -819,111 +902,112 @@ function ServeReadmeCommand(cmd2) {
819
902
  "Documentation is being opened in your default browser. If it does not open automatically, please visit the following URL:"
820
903
  ).line(as3.blue(docsUrl)).line().exit("success");
821
904
  });
822
- return cmd2;
905
+ return cmd3;
823
906
  }
824
907
 
825
908
  // src/domains/readme/index.ts
826
- var readmeDomain = new Command41("readme");
909
+ var readmeDomain = new Command43("readme");
827
910
  readmeDomain.addCommand(GenerateReadmeCommand());
828
911
  ServeReadmeCommand(readmeDomain);
829
912
  var readme_default = readmeDomain;
830
913
 
831
914
  // src/domains/registry/index.ts
832
- import { Command as Command47 } from "commander";
915
+ import { Command as Command49 } from "commander";
833
916
 
834
917
  // src/domains/registry/publish/index.ts
835
- import { Command as Command42 } from "commander";
918
+ import { Command as Command44 } from "commander";
836
919
  var PublishCommand2 = () => {
837
- const cmd2 = new Command42("publish");
838
- cmd2.description("Publish an OpenAPI document to the Scalar registry");
839
- cmd2.argument("[file]", "OpenAPI file to upload");
840
- cmd2.option(
920
+ const cmd3 = new Command44("publish");
921
+ cmd3.description("Publish an OpenAPI document to the Scalar registry");
922
+ cmd3.argument("[file]", "OpenAPI file to upload");
923
+ cmd3.option(
841
924
  "--slug <slug>",
842
925
  "Slug identifier for the registry entry. Defaults to title."
843
926
  );
844
- cmd2.option("--namespace <namespace>", "Scalar team namespace");
845
- cmd2.option("--version <version>", "API version (e.g. 0.1.0)");
846
- cmd2.option("--private", "Make API private", false);
847
- cmd2.option("--no-current", "Do not set as the current version");
848
- cmd2.option("--force", "Force override an existing version", false);
849
- cmd2.option("--bundle", "Bundle all external references before uploading");
850
- cmd2.option(
927
+ cmd3.option("--namespace <namespace>", "Scalar team namespace");
928
+ cmd3.option("--version <version>", "API version (e.g. 0.1.0)");
929
+ cmd3.option("--private", "Make API private", false);
930
+ cmd3.option("--no-current", "Do not set as the current version");
931
+ cmd3.option("--force", "Force override an existing version", false);
932
+ cmd3.option("--bundle", "Bundle all external references before uploading");
933
+ cmd3.option(
851
934
  "--treeShake",
852
935
  "Remove unused components from the bundled document"
853
936
  );
854
- cmd2.option(
937
+ cmd3.option(
855
938
  "--urlMap",
856
939
  "Generate a map of resolved URLs when bundling the document"
857
940
  );
858
- cmd2.option(
941
+ cmd3.option(
859
942
  "--fetchLimit <limit>",
860
- "Maximum number of concurrent URLs to fetch when bundling the document"
943
+ "Maximum number of concurrent URLs to fetch when bundling the document",
944
+ parseFetchLimit
861
945
  );
862
- cmd2.action(async (...args) => {
863
- const { publishAction } = await import("./chunks/action-Y6CEKYEK.js");
946
+ cmd3.action(async (...args) => {
947
+ const { publishAction } = await import("./chunks/action-6BYGBXRC.js");
864
948
  return publishAction(...args);
865
949
  });
866
- return cmd2;
950
+ return cmd3;
867
951
  };
868
952
 
869
953
  // src/domains/registry/delete/index.ts
870
- import { Command as Command43 } from "commander";
954
+ import { Command as Command45 } from "commander";
871
955
  var DeleteCommand = () => {
872
- const cmd2 = new Command43("delete");
873
- cmd2.description("Delete a document from scalar registry");
874
- cmd2.argument("[namespace]", "Team namespace");
875
- cmd2.argument("[slug]", "Managed doc slug");
876
- cmd2.action(async (...args) => {
877
- const { deleteAction } = await import("./chunks/action-DCINFQ57.js");
956
+ const cmd3 = new Command45("delete");
957
+ cmd3.description("Delete a document from scalar registry");
958
+ cmd3.argument("[namespace]", "Team namespace");
959
+ cmd3.argument("[slug]", "Managed doc slug");
960
+ cmd3.action(async (...args) => {
961
+ const { deleteAction } = await import("./chunks/action-YLF2G4G5.js");
878
962
  return deleteAction(...args);
879
963
  });
880
- return cmd2;
964
+ return cmd3;
881
965
  };
882
966
 
883
967
  // src/domains/registry/get/index.ts
884
- import { Command as Command44 } from "commander";
968
+ import { Command as Command46 } from "commander";
885
969
  var GetCommand = () => {
886
- const cmd2 = new Command44("get");
887
- cmd2.description("Get a document version from scalar registry");
888
- cmd2.argument("[namespace]", "Team namespace");
889
- cmd2.argument("[slug]", "Managed doc slug");
890
- cmd2.option("--version <version>", "Document version (defaults to latest)");
891
- cmd2.option("--format <format>", "Output format (json or yaml)", "json");
892
- cmd2.option("-o, --output <file>", "Output file (defaults to stdout)");
893
- cmd2.action(async (...args) => {
894
- const { getAction } = await import("./chunks/action-V5KYG7XD.js");
970
+ const cmd3 = new Command46("get");
971
+ cmd3.description("Get a document version from scalar registry");
972
+ cmd3.argument("[namespace]", "Team namespace");
973
+ cmd3.argument("[slug]", "Managed doc slug");
974
+ cmd3.option("--version <version>", "Document version (defaults to latest)");
975
+ cmd3.option("--format <format>", "Output format (json or yaml)", "json");
976
+ cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
977
+ cmd3.action(async (...args) => {
978
+ const { getAction } = await import("./chunks/action-XIUO64C7.js");
895
979
  return getAction(...args);
896
980
  });
897
- return cmd2;
981
+ return cmd3;
898
982
  };
899
983
 
900
984
  // src/domains/registry/list/index.ts
901
- import { Command as Command45 } from "commander";
985
+ import { Command as Command47 } from "commander";
902
986
  var ListCommand2 = () => {
903
- const cmd2 = new Command45("list");
904
- cmd2.description("List all registry APIs for a team namespace");
905
- cmd2.option("--namespace <namespace>", "Team namespace");
906
- cmd2.action(async (...args) => {
907
- const { listAction } = await import("./chunks/action-LFL3ZZKN.js");
987
+ const cmd3 = new Command47("list");
988
+ cmd3.description("List all registry APIs for a team namespace");
989
+ cmd3.option("--namespace <namespace>", "Team namespace");
990
+ cmd3.action(async (...args) => {
991
+ const { listAction } = await import("./chunks/action-LEUD5P2U.js");
908
992
  return listAction(...args);
909
993
  });
910
- return cmd2;
994
+ return cmd3;
911
995
  };
912
996
 
913
997
  // src/domains/registry/update/index.ts
914
- import { Command as Command46 } from "commander";
998
+ import { Command as Command48 } from "commander";
915
999
  var UpdateCommand = () => {
916
- const cmd2 = new Command46("update");
917
- cmd2.description("Update document metadata on scalar registry");
918
- cmd2.argument("[namespace]", "namespace of document you want to update");
919
- cmd2.argument("[slug]", "slug of document you want to update");
920
- cmd2.option("--title <title>", "Document title");
921
- cmd2.option("--description <description>", "Document description");
922
- cmd2.action(async (...args) => {
923
- const { updateAction } = await import("./chunks/action-OILGZAMK.js");
1000
+ const cmd3 = new Command48("update");
1001
+ cmd3.description("Update document metadata on scalar registry");
1002
+ cmd3.argument("[namespace]", "namespace of document you want to update");
1003
+ cmd3.argument("[slug]", "slug of document you want to update");
1004
+ cmd3.option("--title <title>", "Document title");
1005
+ cmd3.option("--description <description>", "Document description");
1006
+ cmd3.action(async (...args) => {
1007
+ const { updateAction } = await import("./chunks/action-LXGXKXZZ.js");
924
1008
  return updateAction(...args);
925
1009
  });
926
- return cmd2;
1010
+ return cmd3;
927
1011
  };
928
1012
 
929
1013
  // src/domains/registry/index.ts
@@ -934,42 +1018,42 @@ var registryCommands = [
934
1018
  ListCommand2,
935
1019
  GetCommand
936
1020
  ];
937
- var registryDomain = new Command47("registry");
1021
+ var registryDomain = new Command49("registry");
938
1022
  registryDomain.description("Manage your scalar registry");
939
1023
  registryCommands.forEach((command) => registryDomain.addCommand(command()));
940
1024
  var registry_default = registryDomain;
941
1025
 
942
1026
  // src/domains/team/index.ts
943
- import { Command as Command50 } from "commander";
1027
+ import { Command as Command52 } from "commander";
944
1028
 
945
1029
  // src/domains/team/list/index.ts
946
- import { Command as Command48 } from "commander";
1030
+ import { Command as Command50 } from "commander";
947
1031
  var ListCommand3 = () => {
948
- const cmd2 = new Command48("list");
949
- cmd2.description("List all teams current user is part of");
950
- cmd2.action(async (...args) => {
951
- const { listAction } = await import("./chunks/action-OK55BFGM.js");
1032
+ const cmd3 = new Command50("list");
1033
+ cmd3.description("List all teams current user is part of");
1034
+ cmd3.action(async (...args) => {
1035
+ const { listAction } = await import("./chunks/action-W3C53GPH.js");
952
1036
  return listAction(...args);
953
1037
  });
954
- return cmd2;
1038
+ return cmd3;
955
1039
  };
956
1040
 
957
1041
  // src/domains/team/set/index.ts
958
- import { Command as Command49 } from "commander";
1042
+ import { Command as Command51 } from "commander";
959
1043
  var SetCommand = () => {
960
- const cmd2 = new Command49("set");
961
- cmd2.description("Set current active team for the user");
962
- cmd2.option("--team <team>", "Team uid");
963
- cmd2.action(async (...args) => {
964
- const { setAction } = await import("./chunks/action-XUQ7TKKJ.js");
1044
+ const cmd3 = new Command51("set");
1045
+ cmd3.description("Set current active team for the user");
1046
+ cmd3.option("--team <team>", "Team uid");
1047
+ cmd3.action(async (...args) => {
1048
+ const { setAction } = await import("./chunks/action-354TUG4H.js");
965
1049
  return setAction(...args);
966
1050
  });
967
- return cmd2;
1051
+ return cmd3;
968
1052
  };
969
1053
 
970
1054
  // src/domains/team/index.ts
971
1055
  var teamCommands = [ListCommand3, SetCommand];
972
- var teamDomain = new Command50("team");
1056
+ var teamDomain = new Command52("team");
973
1057
  teamDomain.description("Manage user teams");
974
1058
  teamCommands.forEach((command) => teamDomain.addCommand(command()));
975
1059
  var team_default = teamDomain;
@@ -977,7 +1061,7 @@ var team_default = teamDomain;
977
1061
  // src/domains/upgrade/index.ts
978
1062
  import { execSync } from "node:child_process";
979
1063
  import as5 from "ansis";
980
- import { Command as Command51 } from "commander";
1064
+ import { Command as Command53 } from "commander";
981
1065
 
982
1066
  // src/helpers/upgrade.ts
983
1067
  import as4 from "ansis";
@@ -1044,9 +1128,9 @@ async function checkUpgrade() {
1044
1128
  }
1045
1129
 
1046
1130
  // src/domains/upgrade/index.ts
1047
- var cmd = new Command51("upgrade");
1048
- cmd.description("Upgrade current version of your cli");
1049
- cmd.action(async () => {
1131
+ var cmd2 = new Command53("upgrade");
1132
+ cmd2.description("Upgrade current version of your cli");
1133
+ cmd2.action(async () => {
1050
1134
  if (process.env.SCALAR_CLI_DISTRIBUTION === "portable") {
1051
1135
  output.info().message(
1052
1136
  "To upgrade this portable installation, download and extract the newer Scalar archive, then replace the installation directory."
@@ -1070,13 +1154,15 @@ cmd.action(async () => {
1070
1154
  output.error().title("Upgrade failed").message("Failed to upgrade the CLI. Please try running:").message(as5.cyan(`npm install -g ${upgradeStatus.name}@latest`)).exit("error");
1071
1155
  }
1072
1156
  });
1073
- var upgrade_default = cmd;
1157
+ var upgrade_default = cmd2;
1074
1158
 
1075
1159
  // src/domains/index.ts
1076
1160
  var domains = [
1077
1161
  readme_default,
1078
1162
  upgrade_default,
1163
+ context_default,
1079
1164
  auth_default,
1165
+ access_group_default,
1080
1166
  document_default,
1081
1167
  project_default,
1082
1168
  registry_default,
@@ -1088,7 +1174,7 @@ var domains_default = domains;
1088
1174
 
1089
1175
  // src/program.ts
1090
1176
  var getProgram = () => {
1091
- const program2 = new Command52();
1177
+ const program2 = new Command54();
1092
1178
  program2.enablePositionalOptions().name(Object.keys(bin)[0]).description("CLI to work with your OpenAPI files").version(version, "-v, --version");
1093
1179
  program2.showHelpAfterError();
1094
1180
  domains_default.forEach((domain) => program2.addCommand(domain));
@@ -1106,7 +1192,7 @@ var program = getProgram();
1106
1192
  if (process.argv.length === 2) {
1107
1193
  program.help();
1108
1194
  }
1109
- if (process.argv[2] !== "upgrade" && process.env.SCALAR_CLI_DISTRIBUTION !== "portable") {
1195
+ if (process.argv[2] !== "upgrade" && process.argv[2] !== "context" && !(process.argv[2] === "access-group" && process.argv.includes("--json")) && process.env.SCALAR_CLI_DISTRIBUTION !== "portable") {
1110
1196
  checkUpgrade().catch(() => {
1111
1197
  });
1112
1198
  }