@scalar/cli 2.12.3 → 2.13.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 (76) hide show
  1. package/README.md +221 -2
  2. package/chunks/{action-JXCU2JKC.js → action-27BJMHFD.js} +38 -6
  3. package/chunks/{action-H4GW3KAI.js → action-4EJA6UEB.js} +7 -7
  4. package/chunks/{action-7CUPRYNA.js → action-5MJTAO5X.js} +29 -16
  5. package/chunks/{action-AYKKHH7A.js → action-6FPGU5SY.js} +44 -17
  6. package/chunks/{action-T4MM4OUS.js → action-6RQDLMOM.js} +42 -19
  7. package/chunks/{action-Y7EBKCUU.js → action-ASBFLTOA.js} +1 -1
  8. package/chunks/{action-6I2PWENU.js → action-AWHBOHGW.js} +60 -81
  9. package/chunks/{action-O7ROX6NF.js → action-ENN7KFBZ.js} +9 -8
  10. package/chunks/{action-M5OUEDV2.js → action-ESVI46KE.js} +4 -4
  11. package/chunks/{action-I2IV4VLL.js → action-EVNUUWR5.js} +23 -7
  12. package/chunks/{action-B74PPGKB.js → action-F6JSCBEU.js} +31 -13
  13. package/chunks/{action-KIOYSVKX.js → action-FZNFBX6U.js} +20 -3
  14. package/chunks/{action-VVKMUOKR.js → action-GNYNOFDK.js} +13 -5
  15. package/chunks/{action-GMJJMZXY.js → action-JSYHIEYP.js} +5 -5
  16. package/chunks/action-KTY5ICV5.js +55 -0
  17. package/chunks/{action-YXRCGKCK.js → action-LVYFHK4D.js} +3 -1
  18. package/chunks/{action-ZBEOLJJR.js → action-NN7QF6MI.js} +6 -3
  19. package/chunks/{action-EWZLVN45.js → action-OD4GNHM3.js} +37 -17
  20. package/chunks/{action-4ESHWOAM.js → action-OZWRV54F.js} +6 -5
  21. package/chunks/{action-BYYKW4S6.js → action-QZV6IPK4.js} +25 -10
  22. package/chunks/{action-D7L757PX.js → action-S7PMEFCE.js} +13 -12
  23. package/chunks/{action-Q3DI54OW.js → action-SZ6SG3RB.js} +6 -6
  24. package/chunks/{action-FBQAU5LV.js → action-U3MQZ5ZQ.js} +5 -5
  25. package/chunks/{action-BDDXF4YV.js → action-UAGYB4ZS.js} +18 -8
  26. package/chunks/{action-HAKFAXTQ.js → action-UVAYACFA.js} +4 -4
  27. package/chunks/{action-6A4NM5WS.js → action-VXEJNBNR.js} +6 -5
  28. package/chunks/{action-ZOYQBWGD.js → action-W24B4YT5.js} +6 -6
  29. package/chunks/{action-GJHOZ6Q5.js → action-WQICTF7K.js} +7 -5
  30. package/chunks/{action-EWDQOX5B.js → action-WUWWJGRJ.js} +3 -1
  31. package/chunks/{action-ED4TSPRZ.js → action-Y4YLWZHL.js} +5 -5
  32. package/chunks/{action-FBOTIFVC.js → action-YEAOKB6V.js} +9 -7
  33. package/chunks/{action-EPGS3U3T.js → action-YFTRHKOK.js} +56 -41
  34. package/chunks/{action-5BJL72JE.js → action-YQSSXJAX.js} +7 -4
  35. package/chunks/{action-RPTLQBMK.js → action-ZL2CXRJR.js} +5 -3
  36. package/chunks/{actions-EXQNVV4T.js → actions-GHHWF4Q2.js} +13 -11
  37. package/chunks/{asyncapi-FNOWXSKB.js → asyncapi-TICSLZRM.js} +6 -4
  38. package/chunks/{build.action-TIKRZPQ5.js → build.action-AURC6QZ6.js} +28 -11
  39. package/chunks/chunk-2XWUFFEZ.js +133 -0
  40. package/chunks/{chunk-I7ZVWF57.js → chunk-7K6I2GUG.js} +14 -8
  41. package/chunks/{chunk-LEECPQZN.js → chunk-7O5H2SQP.js} +1 -1
  42. package/chunks/{chunk-EBNFCIKS.js → chunk-APX65SRT.js} +2 -1
  43. package/chunks/{chunk-UN2AAVO5.js → chunk-B3XOSR6W.js} +1 -1
  44. package/chunks/{chunk-FYMDIB7J.js → chunk-CSJIKXUD.js} +1 -1
  45. package/chunks/{chunk-FI7UKPRF.js → chunk-DDDYR2HF.js} +1 -1
  46. package/chunks/chunk-IRQJDPZE.js +34 -0
  47. package/chunks/chunk-LK2ZIDHH.js +32 -0
  48. package/chunks/{chunk-IOW726L2.js → chunk-NRHHB3YY.js} +1 -1
  49. package/chunks/{chunk-JWNWOK2M.js → chunk-OVKTA5CX.js} +12 -5
  50. package/chunks/chunk-PVDORWEM.js +167 -0
  51. package/chunks/{chunk-V7RTDFHK.js → chunk-RAJM56L7.js} +5 -1
  52. package/chunks/{chunk-CUHVXHIV.js → chunk-RAU5KE6F.js} +1 -1
  53. package/chunks/chunk-SNQFFEYH.js +11 -0
  54. package/chunks/{chunk-EUFK4MVX.js → chunk-TKT5UW3G.js} +2 -2
  55. package/chunks/{chunk-2GKXAGSH.js → chunk-TVPVXL73.js} +2 -2
  56. package/chunks/{chunk-KWIY2QZY.js → chunk-VNF2GRZA.js} +2 -2
  57. package/chunks/chunk-WDFZ7WYJ.js +16 -0
  58. package/chunks/chunk-XUX6JXU5.js +58 -0
  59. package/chunks/{create.action-K7GTWYST.js → create.action-O3HN6GV2.js} +23 -14
  60. package/chunks/{delete.action-JKLXBYRD.js → delete.action-2L2RWLPI.js} +27 -13
  61. package/chunks/{delete.action-E4XRGKQW.js → delete.action-KEBI2QCS.js} +29 -13
  62. package/chunks/{get.action-2AKMD4W3.js → get.action-BUNTDW54.js} +9 -7
  63. package/chunks/{get.action-IY7WSJMX.js → get.action-WDMTCZZR.js} +6 -6
  64. package/chunks/{list.action-44YVCWKN.js → list.action-JNSEJVHX.js} +6 -6
  65. package/chunks/{list.action-NRL2DDL5.js → list.action-NSK7OBRH.js} +7 -7
  66. package/chunks/{publish.action-E76MHLCN.js → publish.action-ZRZQUL7S.js} +38 -18
  67. package/chunks/{update.action-LZCAHAWW.js → update.action-7TA46AE6.js} +27 -13
  68. package/chunks/{update.action-FTTVWVAB.js → update.action-O2R5ODGG.js} +38 -18
  69. package/index.js +210 -125
  70. package/package.json +1 -1
  71. package/skills/scalar-cli/SKILL.md +4 -2
  72. package/template.md +220 -1
  73. package/chunks/chunk-BOPEAS7H.js +0 -38
  74. package/chunks/chunk-EGOXR5FB.js +0 -15
  75. package/chunks/{action-UHXBY3RD.js → action-3P66ZSL3.js} +1 -1
  76. package/chunks/{chunk-OZQPMMTA.js → chunk-M2MMGSLK.js} +3 -3
package/index.js CHANGED
@@ -2,14 +2,14 @@
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-CUHVXHIV.js";
5
+ } from "./chunks/chunk-RAU5KE6F.js";
6
6
  import {
7
7
  buildCliContext,
8
8
  runnableCommands
9
- } from "./chunks/chunk-EBNFCIKS.js";
9
+ } from "./chunks/chunk-APX65SRT.js";
10
10
  import {
11
11
  openBrowser
12
- } from "./chunks/chunk-V7RTDFHK.js";
12
+ } from "./chunks/chunk-RAJM56L7.js";
13
13
  import {
14
14
  measureTime
15
15
  } from "./chunks/chunk-KHDYYVYF.js";
@@ -17,10 +17,13 @@ import {
17
17
  BundleCommand,
18
18
  parseFetchLimit,
19
19
  parsePort
20
- } from "./chunks/chunk-KWIY2QZY.js";
20
+ } from "./chunks/chunk-VNF2GRZA.js";
21
21
  import {
22
22
  completeFiles
23
23
  } from "./chunks/chunk-DFOZG7ZV.js";
24
+ import {
25
+ normalizeVisibility
26
+ } from "./chunks/chunk-LK2ZIDHH.js";
24
27
  import {
25
28
  DOCUMENT_FORMATS,
26
29
  PRIVACY_VALUES
@@ -28,10 +31,6 @@ import {
28
31
  import {
29
32
  SdkLanguage
30
33
  } from "./chunks/chunk-Y2OQOAY7.js";
31
- import {
32
- err,
33
- ok
34
- } from "./chunks/chunk-5ENKYZA4.js";
35
34
  import {
36
35
  checkNodeVersion
37
36
  } from "./chunks/chunk-VUXPDHTQ.js";
@@ -39,21 +38,31 @@ import {
39
38
  getMetadata,
40
39
  logout,
41
40
  setMetadata
42
- } from "./chunks/chunk-FI7UKPRF.js";
43
- import "./chunks/chunk-FYMDIB7J.js";
41
+ } from "./chunks/chunk-DDDYR2HF.js";
42
+ import "./chunks/chunk-CSJIKXUD.js";
44
43
  import {
45
44
  bin,
46
45
  name,
47
46
  version
48
- } from "./chunks/chunk-IOW726L2.js";
47
+ } from "./chunks/chunk-NRHHB3YY.js";
49
48
  import "./chunks/chunk-F3TQHNSQ.js";
50
49
  import "./chunks/chunk-VRZSDUZK.js";
51
50
  import {
52
- requireInteractive
53
- } from "./chunks/chunk-EGOXR5FB.js";
51
+ requireInteractive,
52
+ text
53
+ } from "./chunks/chunk-XUX6JXU5.js";
54
+ import {
55
+ InputPolicyCommand,
56
+ configureInputPolicy,
57
+ isInputDisabled
58
+ } from "./chunks/chunk-IRQJDPZE.js";
54
59
  import {
55
60
  output
56
61
  } from "./chunks/chunk-T5HJUAWB.js";
62
+ import {
63
+ err,
64
+ ok
65
+ } from "./chunks/chunk-5ENKYZA4.js";
57
66
  import "./chunks/chunk-AOZQPCWI.js";
58
67
  import "./chunks/chunk-Q26DFKTY.js";
59
68
  import {
@@ -64,9 +73,6 @@ import "./chunks/chunk-3MZYUBJ6.js";
64
73
  // src/index.ts
65
74
  import { Agent, setGlobalDispatcher } from "undici";
66
75
 
67
- // src/program.ts
68
- import { Command as Command59 } from "commander";
69
-
70
76
  // src/domains/schema/index.ts
71
77
  import { Command as Command6 } from "commander";
72
78
 
@@ -74,11 +80,12 @@ import { Command as Command6 } from "commander";
74
80
  import { Command } from "commander";
75
81
  var DeleteSchemaCommand = () => {
76
82
  const cmd3 = new Command("delete");
83
+ cmd3.option("--json", "Output the mutation result as JSON without prompting");
77
84
  cmd3.description("Delete a shared schema");
78
85
  cmd3.option("-s, --slug <slug>", "Schema slug");
79
86
  cmd3.option("-n, --namespace <namespace>", "Team namespace");
80
87
  cmd3.action(async (...args) => {
81
- const { deleteAction } = await import("./chunks/delete.action-E4XRGKQW.js");
88
+ const { deleteAction } = await import("./chunks/delete.action-KEBI2QCS.js");
82
89
  return deleteAction(...args);
83
90
  });
84
91
  return cmd3;
@@ -98,7 +105,7 @@ var GetSchemaCommand = () => {
98
105
  cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
99
106
  completeFiles(cmd3, [], ["--output"]);
100
107
  cmd3.action(async (...args) => {
101
- const { getAction } = await import("./chunks/get.action-2AKMD4W3.js");
108
+ const { getAction } = await import("./chunks/get.action-BUNTDW54.js");
102
109
  return getAction(...args);
103
110
  });
104
111
  return cmd3;
@@ -112,7 +119,7 @@ var ListSchemaCommand = () => {
112
119
  cmd3.option("--namespace <namespace>", "Team namespace");
113
120
  cmd3.option("--json", "Output schema metadata as JSON");
114
121
  cmd3.action(async (...args) => {
115
- const { listAction } = await import("./chunks/list.action-NRL2DDL5.js");
122
+ const { listAction } = await import("./chunks/list.action-NSK7OBRH.js");
116
123
  return listAction(...args);
117
124
  });
118
125
  return cmd3;
@@ -122,13 +129,18 @@ var ListSchemaCommand = () => {
122
129
  import { Command as Command4 } from "commander";
123
130
  var PublishSchemaCommand = () => {
124
131
  const cmd3 = new Command4("publish");
132
+ cmd3.option("--json", "Output the mutation result as JSON without prompting");
125
133
  cmd3.description("Publish a shared schema to the Scalar Registry");
126
134
  cmd3.argument("[file]", "Shared schema file path or URL to upload");
127
135
  cmd3.option("--slug <slug>", "Shared schema slug");
128
136
  cmd3.option("--title <title>", "Schema title");
129
137
  cmd3.option("--namespace <namespace>", "Scalar team namespace");
130
138
  cmd3.option("--version <version>", "Schema version (for example, 0.1.0)");
131
- cmd3.option("--private", "Make the shared schema private", false);
139
+ cmd3.option(
140
+ "--private",
141
+ "Create a private entry or require an existing private entry",
142
+ false
143
+ );
132
144
  cmd3.option("--force", "Overwrite an existing version", false);
133
145
  cmd3.option("--bundle", "Bundle all external references before uploading");
134
146
  cmd3.option(
@@ -146,7 +158,7 @@ var PublishSchemaCommand = () => {
146
158
  );
147
159
  completeFiles(cmd3, ["file"], []);
148
160
  cmd3.action(async (...args) => {
149
- const { publishAction } = await import("./chunks/publish.action-E76MHLCN.js");
161
+ const { publishAction } = await import("./chunks/publish.action-ZRZQUL7S.js");
150
162
  return publishAction(...args);
151
163
  });
152
164
  return cmd3;
@@ -156,6 +168,7 @@ var PublishSchemaCommand = () => {
156
168
  import { Command as Command5, Option as Option2 } from "commander";
157
169
  var UpdateSchemaCommand = () => {
158
170
  const cmd3 = new Command5("update");
171
+ cmd3.option("--json", "Output the mutation result as JSON without prompting");
159
172
  cmd3.description("Update shared schema metadata");
160
173
  cmd3.option("-s, --slug <slug>", "Schema slug");
161
174
  cmd3.option("-n, --namespace <namespace>", "Team namespace");
@@ -164,11 +177,23 @@ var UpdateSchemaCommand = () => {
164
177
  cmd3.addOption(
165
178
  new Option2(
166
179
  "--isPrivate <isPrivate>",
167
- "Access setting (true/private or false/public)"
180
+ "Whole-entry access, including existing versions (true/private or false/public)"
168
181
  ).choices([...PRIVACY_VALUES])
169
182
  );
183
+ cmd3.option(
184
+ "--public",
185
+ "Make the whole entry public, including existing versions"
186
+ );
187
+ cmd3.option(
188
+ "--private",
189
+ "Make the whole entry private, including existing versions"
190
+ );
191
+ cmd3.addHelpText(
192
+ "after",
193
+ "\nOmitting visibility options leaves access unchanged.\nExample: scalar schema update --namespace acme --slug my-schema --public"
194
+ );
170
195
  cmd3.action(async (...args) => {
171
- const { updateAction } = await import("./chunks/update.action-FTTVWVAB.js");
196
+ const { updateAction } = await import("./chunks/update.action-O2R5ODGG.js");
172
197
  return updateAction(...args);
173
198
  });
174
199
  return cmd3;
@@ -194,11 +219,12 @@ import { Command as Command13 } from "commander";
194
219
  import { Command as Command7 } from "commander";
195
220
  var BuildSdkCommand = () => {
196
221
  const cmd3 = new Command7("build");
222
+ cmd3.option("--json", "Output the mutation result as JSON without prompting");
197
223
  cmd3.description("Start an SDK build");
198
224
  cmd3.option("-s, --slug <slug>", "SDK slug");
199
225
  cmd3.option("-n, --namespace <namespace>", "Team namespace");
200
226
  cmd3.action(async (...args) => {
201
- const { buildAction } = await import("./chunks/build.action-TIKRZPQ5.js");
227
+ const { buildAction } = await import("./chunks/build.action-AURC6QZ6.js");
202
228
  return buildAction(...args);
203
229
  });
204
230
  return cmd3;
@@ -208,6 +234,7 @@ var BuildSdkCommand = () => {
208
234
  import { Command as Command8, Option as Option3 } from "commander";
209
235
  var CreateSdkCommand = () => {
210
236
  const cmd3 = new Command8("create");
237
+ cmd3.option("--json", "Output the mutation result as JSON without prompting");
211
238
  cmd3.description("Create an SDK in the namespace of its source API");
212
239
  cmd3.option("-a, --api <api>", "Scalar Registry API slug");
213
240
  cmd3.option("-n, --namespace <namespace>", "Team namespace of the source API");
@@ -217,7 +244,7 @@ var CreateSdkCommand = () => {
217
244
  )
218
245
  );
219
246
  cmd3.action(async (...args) => {
220
- const { createAction } = await import("./chunks/create.action-K7GTWYST.js");
247
+ const { createAction } = await import("./chunks/create.action-O3HN6GV2.js");
221
248
  return createAction(...args);
222
249
  });
223
250
  return cmd3;
@@ -227,11 +254,12 @@ var CreateSdkCommand = () => {
227
254
  import { Command as Command9 } from "commander";
228
255
  var DeleteSdkCommand = () => {
229
256
  const cmd3 = new Command9("delete");
257
+ cmd3.option("--json", "Output the mutation result as JSON without prompting");
230
258
  cmd3.description("Delete an SDK");
231
259
  cmd3.option("-s, --slug <slug>", "SDK slug");
232
260
  cmd3.option("-n, --namespace <namespace>", "Team namespace");
233
261
  cmd3.action(async (...args) => {
234
- const { deleteAction } = await import("./chunks/delete.action-JKLXBYRD.js");
262
+ const { deleteAction } = await import("./chunks/delete.action-2L2RWLPI.js");
235
263
  return deleteAction(...args);
236
264
  });
237
265
  return cmd3;
@@ -241,6 +269,7 @@ var DeleteSdkCommand = () => {
241
269
  import { Command as Command10, Option as Option4 } from "commander";
242
270
  var UpdateSdkCommand = () => {
243
271
  const cmd3 = new Command10("update");
272
+ cmd3.option("--json", "Output the mutation result as JSON without prompting");
244
273
  cmd3.description("Update SDK metadata");
245
274
  cmd3.option("-s, --slug <slug>", "SDK slug");
246
275
  cmd3.option("-n, --namespace <namespace>", "Team namespace");
@@ -252,7 +281,7 @@ var UpdateSdkCommand = () => {
252
281
  ).choices([...PRIVACY_VALUES])
253
282
  );
254
283
  cmd3.action(async (...args) => {
255
- const { updateAction } = await import("./chunks/update.action-LZCAHAWW.js");
284
+ const { updateAction } = await import("./chunks/update.action-7TA46AE6.js");
256
285
  return updateAction(...args);
257
286
  });
258
287
  return cmd3;
@@ -269,7 +298,7 @@ var GetSdkCommand = () => {
269
298
  cmd3.option("-n, --namespace <namespace>", "Team namespace");
270
299
  cmd3.option("--json", "Output structured SDK metadata as JSON");
271
300
  cmd3.action(async (...args) => {
272
- const { getAction } = await import("./chunks/get.action-IY7WSJMX.js");
301
+ const { getAction } = await import("./chunks/get.action-WDMTCZZR.js");
273
302
  return getAction(...args);
274
303
  });
275
304
  return cmd3;
@@ -283,7 +312,7 @@ var ListSdkCommand = () => {
283
312
  cmd3.option("--json", "Output structured SDK metadata as JSON");
284
313
  cmd3.option("--namespace <namespace>", "Team namespace");
285
314
  cmd3.action(async (...args) => {
286
- const { listAction } = await import("./chunks/list.action-44YVCWKN.js");
315
+ const { listAction } = await import("./chunks/list.action-JNSEJVHX.js");
287
316
  return listAction(...args);
288
317
  });
289
318
  return cmd3;
@@ -312,41 +341,41 @@ function createAccessGroupCommand() {
312
341
  "Manage access groups and allowed email domains for the current team"
313
342
  );
314
343
  command.command("list").description("List access groups for the current team").option("--json", "Print the result as JSON").action(async (options) => {
315
- const { runAction } = await import("./chunks/actions-EXQNVV4T.js");
344
+ const { runAction } = await import("./chunks/actions-GHHWF4Q2.js");
316
345
  await runAction({ operation: "list", ...options });
317
346
  });
318
347
  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(
319
348
  async (slug, options) => {
320
- const { runAction } = await import("./chunks/actions-EXQNVV4T.js");
349
+ const { runAction } = await import("./chunks/actions-GHHWF4Q2.js");
321
350
  await runAction({ operation: "create", slug, ...options });
322
351
  }
323
352
  );
324
353
  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) => {
325
- const { runAction } = await import("./chunks/actions-EXQNVV4T.js");
354
+ const { runAction } = await import("./chunks/actions-GHHWF4Q2.js");
326
355
  await runAction({ operation: "get", slug, ...options });
327
356
  });
328
357
  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(
329
358
  async (slug, options) => {
330
- const { runAction } = await import("./chunks/actions-EXQNVV4T.js");
359
+ const { runAction } = await import("./chunks/actions-GHHWF4Q2.js");
331
360
  await runAction({ operation: "update", slug, ...options });
332
361
  }
333
362
  );
334
363
  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(
335
364
  async (slug, options) => {
336
- const { runAction } = await import("./chunks/actions-EXQNVV4T.js");
365
+ const { runAction } = await import("./chunks/actions-GHHWF4Q2.js");
337
366
  await runAction({ operation: "delete", slug, ...options });
338
367
  }
339
368
  );
340
369
  const domain = command.command("domain").description("Manage allowed email domains");
341
370
  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(
342
371
  async (slug, domain2, options) => {
343
- const { runAction } = await import("./chunks/actions-EXQNVV4T.js");
372
+ const { runAction } = await import("./chunks/actions-GHHWF4Q2.js");
344
373
  await runAction({ operation: "add-domain", slug, domain: domain2, ...options });
345
374
  }
346
375
  );
347
376
  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(
348
377
  async (slug, domain2, options) => {
349
- const { runAction } = await import("./chunks/actions-EXQNVV4T.js");
378
+ const { runAction } = await import("./chunks/actions-GHHWF4Q2.js");
350
379
  await runAction({
351
380
  operation: "remove-domain",
352
381
  slug,
@@ -381,7 +410,7 @@ var LoginCommand = () => {
381
410
  ).hideHelp()
382
411
  );
383
412
  cmd3.action(async (...args) => {
384
- const { loginAction } = await import("./chunks/action-VVKMUOKR.js");
413
+ const { loginAction } = await import("./chunks/action-GNYNOFDK.js");
385
414
  return loginAction(...args);
386
415
  });
387
416
  return cmd3;
@@ -406,7 +435,7 @@ var WhoAmICommand = () => {
406
435
  cmd3.description("Show the logged-in user and current team");
407
436
  cmd3.option("--json", "Output authentication details as JSON");
408
437
  cmd3.action(async (options) => {
409
- const { whoamiAction } = await import("./chunks/action-GMJJMZXY.js");
438
+ const { whoamiAction } = await import("./chunks/action-JSYHIEYP.js");
410
439
  return whoamiAction(options);
411
440
  });
412
441
  return cmd3;
@@ -459,7 +488,7 @@ cmd.description(
459
488
  "Print every command, argument, and option as JSON for AI agents"
460
489
  );
461
490
  cmd.action(async () => {
462
- const { contextAction } = await import("./chunks/action-Y7EBKCUU.js");
491
+ const { contextAction } = await import("./chunks/action-ASBFLTOA.js");
463
492
  return contextAction(cmd);
464
493
  });
465
494
  var context_default = cmd;
@@ -485,7 +514,7 @@ function JoinCommand() {
485
514
  );
486
515
  completeFiles(cmd3, ["files"], ["--output"]);
487
516
  cmd3.action(async (...args) => {
488
- const { joinAction } = await import("./chunks/action-4ESHWOAM.js");
517
+ const { joinAction } = await import("./chunks/action-OZWRV54F.js");
489
518
  return joinAction(...args);
490
519
  });
491
520
  return cmd3;
@@ -509,7 +538,7 @@ function SplitCommand() {
509
538
  );
510
539
  completeFiles(cmd3, ["file|url"], ["--output"]);
511
540
  cmd3.action(async (...args) => {
512
- const { splitAction } = await import("./chunks/action-5BJL72JE.js");
541
+ const { splitAction } = await import("./chunks/action-YQSSXJAX.js");
513
542
  return splitAction(...args);
514
543
  });
515
544
  return cmd3;
@@ -520,14 +549,17 @@ import { Command as Command23 } from "commander";
520
549
  function FormatCommand() {
521
550
  const cmd3 = new Command23("format");
522
551
  cmd3.description("Format an OpenAPI or AsyncAPI description");
523
- cmd3.argument("[file|url]", "File or URL to format");
552
+ cmd3.argument(
553
+ "[file|url]",
554
+ "File or URL to format, or - to read JSON or YAML from stdin"
555
+ );
524
556
  cmd3.option(
525
557
  "-o, --output <file>",
526
- "Output file (required for URLs; otherwise overwrites the input file)"
558
+ "Output file, or - for stdout in the input format (required for URLs; defaults to stdout in the input format for stdin, otherwise overwrites the input file)"
527
559
  );
528
560
  completeFiles(cmd3, ["file|url"], ["--output"]);
529
561
  cmd3.action(async (...args) => {
530
- const { formatAction } = await import("./chunks/action-KIOYSVKX.js");
562
+ const { formatAction } = await import("./chunks/action-FZNFBX6U.js");
531
563
  return formatAction(...args);
532
564
  });
533
565
  return cmd3;
@@ -580,7 +612,7 @@ function LintCommand() {
580
612
  );
581
613
  completeFiles(cmd3, ["file|url"], ["--rule", "--output", "--ignore-file"]);
582
614
  cmd3.action(async (...args) => {
583
- const { lintAction } = await import("./chunks/action-HAKFAXTQ.js");
615
+ const { lintAction } = await import("./chunks/action-UVAYACFA.js");
584
616
  return lintAction(...args);
585
617
  });
586
618
  return cmd3;
@@ -595,7 +627,7 @@ function MarkdownCommand() {
595
627
  cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
596
628
  completeFiles(cmd3, ["file|url"], ["--output"]);
597
629
  cmd3.action(async (...args) => {
598
- const { markdownAction } = await import("./chunks/action-EWDQOX5B.js");
630
+ const { markdownAction } = await import("./chunks/action-WUWWJGRJ.js");
599
631
  return markdownAction(...args);
600
632
  });
601
633
  return cmd3;
@@ -613,7 +645,7 @@ function MockCommand() {
613
645
  cmd3.option("-p, --port <port>", "HTTP port for the Mock Server", parsePort);
614
646
  completeFiles(cmd3, ["file|url"], []);
615
647
  cmd3.action(async (...args) => {
616
- const { mockAction } = await import("./chunks/action-GJHOZ6Q5.js");
648
+ const { mockAction } = await import("./chunks/action-WQICTF7K.js");
617
649
  await mockAction(...args);
618
650
  });
619
651
  return cmd3;
@@ -632,7 +664,7 @@ function ConvertCommand() {
632
664
  );
633
665
  completeFiles(cmd3, ["file|url"], ["--output"]);
634
666
  cmd3.action(async (...args) => {
635
- const { convertAction } = await import("./chunks/action-YXRCGKCK.js");
667
+ const { convertAction } = await import("./chunks/action-LVYFHK4D.js");
636
668
  return convertAction(...args);
637
669
  });
638
670
  return cmd3;
@@ -658,7 +690,7 @@ function ServeCommand() {
658
690
  );
659
691
  completeFiles(cmd3, ["file|url"], ["--config"]);
660
692
  cmd3.action(async (...args) => {
661
- const { serveAction } = await import("./chunks/action-O7ROX6NF.js");
693
+ const { serveAction } = await import("./chunks/action-ENN7KFBZ.js");
662
694
  await serveAction(...args);
663
695
  });
664
696
  return cmd3;
@@ -678,7 +710,7 @@ function ShareCommand() {
678
710
  );
679
711
  completeFiles(cmd3, ["file"], []);
680
712
  cmd3.action(async (...args) => {
681
- const { shareAction } = await import("./chunks/action-RPTLQBMK.js");
713
+ const { shareAction } = await import("./chunks/action-ZL2CXRJR.js");
682
714
  return shareAction(...args);
683
715
  });
684
716
  return cmd3;
@@ -698,7 +730,7 @@ function UpgradeCommand() {
698
730
  );
699
731
  completeFiles(cmd3, ["file|url"], ["--output"]);
700
732
  cmd3.action(async (...args) => {
701
- const { upgradeAction } = await import("./chunks/action-ZBEOLJJR.js");
733
+ const { upgradeAction } = await import("./chunks/action-NN7QF6MI.js");
702
734
  return upgradeAction(...args);
703
735
  });
704
736
  return cmd3;
@@ -712,7 +744,7 @@ function ValidateCommand() {
712
744
  cmd3.argument("[file|url]", "File or URL to validate");
713
745
  completeFiles(cmd3, ["file|url"], []);
714
746
  cmd3.action(async (...args) => {
715
- const { validateAction } = await import("./chunks/action-6A4NM5WS.js");
747
+ const { validateAction } = await import("./chunks/action-VXEJNBNR.js");
716
748
  return validateAction(...args);
717
749
  });
718
750
  return cmd3;
@@ -757,7 +789,7 @@ documentCommands.forEach((command) => documentDomain.addCommand(command()));
757
789
  var document_default = documentDomain;
758
790
 
759
791
  // src/domains/project/index.ts
760
- import { Command as Command45 } from "commander";
792
+ import { Command as Command46 } from "commander";
761
793
 
762
794
  // src/domains/project/preview/index.ts
763
795
  import { Command as Command34, Option as Option7 } from "commander";
@@ -780,7 +812,7 @@ var PreviewCommand = () => {
780
812
  cmd3.option("-N, --no-open", "Do not open the browser automatically", true);
781
813
  completeFiles(cmd3, ["config"], []);
782
814
  cmd3.action(async (...args) => {
783
- const { previewAction } = await import("./chunks/action-D7L757PX.js");
815
+ const { previewAction } = await import("./chunks/action-S7PMEFCE.js");
784
816
  return previewAction(...args);
785
817
  });
786
818
  return cmd3;
@@ -797,7 +829,7 @@ function CheckConfigCommand() {
797
829
  );
798
830
  completeFiles(cmd3, ["file"], []);
799
831
  cmd3.action(async (...args) => {
800
- const { checkConfigAction } = await import("./chunks/action-UHXBY3RD.js");
832
+ const { checkConfigAction } = await import("./chunks/action-3P66ZSL3.js");
801
833
  return checkConfigAction(...args);
802
834
  });
803
835
  return cmd3;
@@ -807,27 +839,43 @@ function CheckConfigCommand() {
807
839
  import { Command as Command36 } from "commander";
808
840
  var CreateCommand = () => {
809
841
  const cmd3 = new Command36("create");
842
+ cmd3.option("--json", "Output the result as JSON without prompting");
810
843
  cmd3.description("Create a Scalar project without a linked GitHub repository");
811
844
  cmd3.option("-n, --name <name>", "Project name");
812
845
  cmd3.option("-s, --slug <slug>", "Project slug");
813
846
  cmd3.action(async (...args) => {
814
- const { createAction } = await import("./chunks/action-7CUPRYNA.js");
847
+ const { createAction } = await import("./chunks/action-5MJTAO5X.js");
815
848
  return createAction(...args);
816
849
  });
817
850
  return cmd3;
818
851
  };
819
852
 
820
853
  // src/domains/project/deployments/index.ts
821
- import { Command as Command38 } from "commander";
854
+ import { Command as Command39 } from "commander";
822
855
 
823
- // src/domains/project/deployments/list/index.ts
856
+ // src/domains/project/deployments/get/index.ts
824
857
  import { Command as Command37 } from "commander";
858
+ var GetCommand = () => new Command37("get").description(
859
+ "Inspect an existing build in the selected team without resubmitting"
860
+ ).argument("<build-id>", "Accepted build ID, including preview builds").option("--wait", "Wait for deployment instead of inspecting once").option(
861
+ "--timeout <seconds>",
862
+ "Maximum status wait in seconds (default: 30, or 600 with --wait)"
863
+ ).action(
864
+ async (buildId, options) => {
865
+ const { getAction } = await import("./chunks/action-KTY5ICV5.js");
866
+ await getAction(buildId, options);
867
+ }
868
+ );
869
+
870
+ // src/domains/project/deployments/list/index.ts
871
+ import { Command as Command38 } from "commander";
825
872
  var ListCommand = () => {
826
- const cmd3 = new Command37("list");
873
+ const cmd3 = new Command38("list");
874
+ cmd3.option("--json", "Output the result as JSON without prompting");
827
875
  cmd3.description("List production deployments for a project");
828
876
  cmd3.option("-s, --slug [slug]", "Project slug from scalar project list");
829
877
  cmd3.action(async (...args) => {
830
- const { listAction } = await import("./chunks/action-I2IV4VLL.js");
878
+ const { listAction } = await import("./chunks/action-EVNUUWR5.js");
831
879
  return listAction(...args);
832
880
  });
833
881
  return cmd3;
@@ -835,19 +883,20 @@ var ListCommand = () => {
835
883
 
836
884
  // src/domains/project/deployments/index.ts
837
885
  var DeploymentsCommand = () => {
838
- const cmd3 = new Command38("deployments");
886
+ const cmd3 = new Command39("deployments");
839
887
  cmd3.description("Show project deployment history");
840
888
  cmd3.addCommand(ListCommand());
889
+ cmd3.addCommand(GetCommand());
841
890
  return cmd3;
842
891
  };
843
892
 
844
893
  // src/domains/project/get/index.ts
845
- import { Command as Command39 } from "commander";
846
- function GetCommand() {
847
- const command = new Command39("get").description("Show project details for the current team").argument("<slug>", "Project slug from scalar project list").option("--json", "Print project details as JSON");
894
+ import { Command as Command40 } from "commander";
895
+ function GetCommand2() {
896
+ const command = new Command40("get").description("Show project details for the current team").argument("<slug>", "Project slug from scalar project list").option("--json", "Print project details as JSON");
848
897
  command.action(
849
898
  async (slug, options) => {
850
- const { getAction } = await import("./chunks/action-FBQAU5LV.js");
899
+ const { getAction } = await import("./chunks/action-U3MQZ5ZQ.js");
851
900
  await getAction(slug, options);
852
901
  }
853
902
  );
@@ -855,9 +904,10 @@ function GetCommand() {
855
904
  }
856
905
 
857
906
  // src/domains/project/init/index.ts
858
- import { Command as Command40 } from "commander";
907
+ import { Command as Command41 } from "commander";
859
908
  var InitCommand = () => {
860
- const cmd3 = new Command40("init");
909
+ const cmd3 = new Command41("init");
910
+ cmd3.option("--json", "Output the result as JSON without prompting");
861
911
  cmd3.description("Initialize a local Scalar Docs project");
862
912
  cmd3.option(
863
913
  "-s, --subdomain [url]",
@@ -865,27 +915,28 @@ var InitCommand = () => {
865
915
  );
866
916
  cmd3.option("--force", "Overwrite existing configuration");
867
917
  cmd3.action(async (...args) => {
868
- const { initAction } = await import("./chunks/action-EPGS3U3T.js");
918
+ const { initAction } = await import("./chunks/action-YFTRHKOK.js");
869
919
  return initAction(...args);
870
920
  });
871
921
  return cmd3;
872
922
  };
873
923
 
874
924
  // src/domains/project/list/index.ts
875
- import { Command as Command41 } from "commander";
925
+ import { Command as Command42 } from "commander";
876
926
  function ListCommand2() {
877
- const command = new Command41("list").description("List projects and their slugs for the current team").option("--json", "Print project details as JSON");
927
+ const command = new Command42("list").description("List projects and their slugs for the current team").option("--json", "Print project details as JSON");
878
928
  command.action(async (options) => {
879
- const { listAction } = await import("./chunks/action-Q3DI54OW.js");
929
+ const { listAction } = await import("./chunks/action-SZ6SG3RB.js");
880
930
  await listAction(options);
881
931
  });
882
932
  return command;
883
933
  }
884
934
 
885
935
  // src/domains/project/publish/index.ts
886
- import { Command as Command42 } from "commander";
936
+ import { Command as Command43 } from "commander";
887
937
  var PublishCommand = () => {
888
- const cmd3 = new Command42("publish");
938
+ const cmd3 = new Command43("publish");
939
+ cmd3.option("--json", "Output the result as JSON without prompting");
889
940
  cmd3.description("Publish a new build of a Scalar project");
890
941
  cmd3.option("-s, --slug [slug]", "Project slug from scalar project list");
891
942
  cmd3.option(
@@ -900,18 +951,27 @@ var PublishCommand = () => {
900
951
  "-g, --github",
901
952
  "Publish from the linked GitHub repository instead of local files"
902
953
  );
954
+ cmd3.option(
955
+ "--no-wait",
956
+ "Return after acceptance without waiting for deployment"
957
+ );
958
+ cmd3.option(
959
+ "--timeout <seconds>",
960
+ "Maximum deployment wait in seconds (default: 600; cannot combine with --no-wait)"
961
+ );
903
962
  completeFiles(cmd3, [], ["--config"]);
904
963
  cmd3.action(async (...args) => {
905
- const { publishAction } = await import("./chunks/action-6I2PWENU.js");
964
+ const { publishAction } = await import("./chunks/action-AWHBOHGW.js");
906
965
  return publishAction(...args);
907
966
  });
908
967
  return cmd3;
909
968
  };
910
969
 
911
970
  // src/domains/project/rollback/index.ts
912
- import { Command as Command43 } from "commander";
971
+ import { Command as Command44 } from "commander";
913
972
  var RollbackCommand = () => {
914
- const cmd3 = new Command43("rollback");
973
+ const cmd3 = new Command44("rollback");
974
+ cmd3.option("--json", "Output the result as JSON without prompting");
915
975
  cmd3.description(
916
976
  "Roll the live deployment back to a previously deployed build."
917
977
  );
@@ -922,16 +982,17 @@ var RollbackCommand = () => {
922
982
  );
923
983
  cmd3.option("-y, --yes", "Skip the confirmation prompt");
924
984
  cmd3.action(async (...args) => {
925
- const { rollbackAction } = await import("./chunks/action-T4MM4OUS.js");
985
+ const { rollbackAction } = await import("./chunks/action-6RQDLMOM.js");
926
986
  return rollbackAction(...args);
927
987
  });
928
988
  return cmd3;
929
989
  };
930
990
 
931
991
  // src/domains/project/upgrade/index.ts
932
- import { Command as Command44 } from "commander";
992
+ import { Command as Command45 } from "commander";
933
993
  var UpgradeCommand2 = () => {
934
- const cmd3 = new Command44("upgrade");
994
+ const cmd3 = new Command45("upgrade");
995
+ cmd3.option("--json", "Output the result as JSON without prompting");
935
996
  cmd3.description("Upgrade a Scalar Docs configuration");
936
997
  cmd3.argument(
937
998
  "[config]",
@@ -939,7 +1000,7 @@ var UpgradeCommand2 = () => {
939
1000
  );
940
1001
  completeFiles(cmd3, ["config"], []);
941
1002
  cmd3.action(async (...args) => {
942
- const { upgradeAction } = await import("./chunks/action-JXCU2JKC.js");
1003
+ const { upgradeAction } = await import("./chunks/action-27BJMHFD.js");
943
1004
  return upgradeAction(...args);
944
1005
  });
945
1006
  return cmd3;
@@ -948,7 +1009,7 @@ var UpgradeCommand2 = () => {
948
1009
  // src/domains/project/index.ts
949
1010
  var projectCommands = [
950
1011
  ListCommand2,
951
- GetCommand,
1012
+ GetCommand2,
952
1013
  InitCommand,
953
1014
  CheckConfigCommand,
954
1015
  CreateCommand,
@@ -958,7 +1019,7 @@ var projectCommands = [
958
1019
  DeploymentsCommand,
959
1020
  UpgradeCommand2
960
1021
  ];
961
- var projectDomain = new Command45("project");
1022
+ var projectDomain = new Command46("project");
962
1023
  projectDomain.description("Manage Scalar Docs projects");
963
1024
  for (const command of projectCommands) {
964
1025
  projectDomain.addCommand(command());
@@ -967,12 +1028,11 @@ projectDomain.addCommand(DownloadIsolateCommand(), { hidden: true });
967
1028
  var project_default = projectDomain;
968
1029
 
969
1030
  // src/domains/readme/index.ts
970
- import { Command as Command47 } from "commander";
1031
+ import { Command as Command48 } from "commander";
971
1032
 
972
1033
  // src/domains/readme/generate.ts
973
- import { text } from "@clack/prompts";
974
1034
  import as from "ansis";
975
- import { Command as Command46 } from "commander";
1035
+ import { Command as Command47 } from "commander";
976
1036
 
977
1037
  // src/helpers/documentation/index.ts
978
1038
  import fs from "node:fs/promises";
@@ -1006,7 +1066,7 @@ var generateDocumentationFile = async (outputPath) => {
1006
1066
 
1007
1067
  // src/domains/readme/generate.ts
1008
1068
  function GenerateReadmeCommand() {
1009
- const cmd3 = new Command46("generate");
1069
+ const cmd3 = new Command47("generate");
1010
1070
  cmd3.description("Generate the CLI README from the command tree");
1011
1071
  cmd3.option(
1012
1072
  "-o, --output [file]",
@@ -1051,25 +1111,26 @@ function ServeReadmeCommand(cmd3) {
1051
1111
  return output.error().message(browser.error).exit("error");
1052
1112
  }
1053
1113
  output.info().message(
1054
- "Opening CLI documentation in your default browser. If it does not open, visit:"
1114
+ isInputDisabled() ? "CLI documentation:" : "Opening CLI documentation in your default browser. If it does not open, visit:"
1055
1115
  ).line(as2.blue(CLI_DOCS_URL)).line().exit("success");
1056
1116
  });
1057
1117
  return cmd3;
1058
1118
  }
1059
1119
 
1060
1120
  // src/domains/readme/index.ts
1061
- var readmeDomain = new Command47("readme");
1121
+ var readmeDomain = new Command48("readme");
1062
1122
  readmeDomain.addCommand(GenerateReadmeCommand());
1063
1123
  ServeReadmeCommand(readmeDomain);
1064
1124
  var readme_default = readmeDomain;
1065
1125
 
1066
1126
  // src/domains/registry/index.ts
1067
- import { Command as Command53 } from "commander";
1127
+ import { Command as Command54 } from "commander";
1068
1128
 
1069
1129
  // src/domains/registry/publish/index.ts
1070
- import { Command as Command48 } from "commander";
1130
+ import { Command as Command49 } from "commander";
1071
1131
  var PublishCommand2 = () => {
1072
- const cmd3 = new Command48("publish");
1132
+ const cmd3 = new Command49("publish");
1133
+ cmd3.option("--json", "Output the mutation result as JSON without prompting");
1073
1134
  cmd3.description("Publish an OpenAPI description to the Scalar Registry");
1074
1135
  cmd3.argument("[file]", "API description file path or URL to upload");
1075
1136
  cmd3.option(
@@ -1081,7 +1142,11 @@ var PublishCommand2 = () => {
1081
1142
  "--version <version>",
1082
1143
  "API description version (for example, 0.1.0)"
1083
1144
  );
1084
- cmd3.option("--private", "Make the API description private", false);
1145
+ cmd3.option(
1146
+ "--private",
1147
+ "Create a private entry or require an existing private entry",
1148
+ false
1149
+ );
1085
1150
  cmd3.option("--no-current", "Keep the existing current version");
1086
1151
  cmd3.option("--force", "Overwrite an existing version", false);
1087
1152
  cmd3.option("--bundle", "Bundle all external references before uploading");
@@ -1100,30 +1165,31 @@ var PublishCommand2 = () => {
1100
1165
  );
1101
1166
  completeFiles(cmd3, ["file"], []);
1102
1167
  cmd3.action(async (...args) => {
1103
- const { publishAction } = await import("./chunks/action-EWZLVN45.js");
1168
+ const { publishAction } = await import("./chunks/action-OD4GNHM3.js");
1104
1169
  return publishAction(...args);
1105
1170
  });
1106
1171
  return cmd3;
1107
1172
  };
1108
1173
 
1109
1174
  // src/domains/registry/delete/index.ts
1110
- import { Command as Command49 } from "commander";
1175
+ import { Command as Command50 } from "commander";
1111
1176
  var DeleteCommand = () => {
1112
- const cmd3 = new Command49("delete");
1177
+ const cmd3 = new Command50("delete");
1178
+ cmd3.option("--json", "Output the mutation result as JSON without prompting");
1113
1179
  cmd3.description("Delete an API description from the Scalar Registry");
1114
1180
  cmd3.argument("[namespace]", "Team namespace");
1115
1181
  cmd3.argument("[slug]", "API description slug");
1116
1182
  cmd3.action(async (...args) => {
1117
- const { deleteAction } = await import("./chunks/action-BDDXF4YV.js");
1183
+ const { deleteAction } = await import("./chunks/action-UAGYB4ZS.js");
1118
1184
  return deleteAction(...args);
1119
1185
  });
1120
1186
  return cmd3;
1121
1187
  };
1122
1188
 
1123
1189
  // src/domains/registry/get/index.ts
1124
- import { Command as Command50, Option as Option8 } from "commander";
1125
- var GetCommand2 = () => {
1126
- const cmd3 = new Command50("get");
1190
+ import { Command as Command51, Option as Option8 } from "commander";
1191
+ var GetCommand3 = () => {
1192
+ const cmd3 = new Command51("get");
1127
1193
  cmd3.description(
1128
1194
  "Download an API description version from the Scalar Registry"
1129
1195
  );
@@ -1139,37 +1205,50 @@ var GetCommand2 = () => {
1139
1205
  cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
1140
1206
  completeFiles(cmd3, [], ["--output"]);
1141
1207
  cmd3.action(async (...args) => {
1142
- const { getAction } = await import("./chunks/action-FBOTIFVC.js");
1208
+ const { getAction } = await import("./chunks/action-YEAOKB6V.js");
1143
1209
  return getAction(...args);
1144
1210
  });
1145
1211
  return cmd3;
1146
1212
  };
1147
1213
 
1148
1214
  // src/domains/registry/list/index.ts
1149
- import { Command as Command51 } from "commander";
1215
+ import { Command as Command52 } from "commander";
1150
1216
  var ListCommand3 = () => {
1151
- const cmd3 = new Command51("list");
1217
+ const cmd3 = new Command52("list");
1152
1218
  cmd3.description("List Scalar Registry API descriptions in a team namespace");
1153
1219
  cmd3.option("--namespace <namespace>", "Team namespace");
1154
1220
  cmd3.option("--json", "Output Scalar Registry API metadata as JSON");
1155
1221
  cmd3.action(async (...args) => {
1156
- const { listAction } = await import("./chunks/action-H4GW3KAI.js");
1222
+ const { listAction } = await import("./chunks/action-4EJA6UEB.js");
1157
1223
  return listAction(...args);
1158
1224
  });
1159
1225
  return cmd3;
1160
1226
  };
1161
1227
 
1162
1228
  // src/domains/registry/update/index.ts
1163
- import { Command as Command52 } from "commander";
1229
+ import { Command as Command53 } from "commander";
1164
1230
  var UpdateCommand = () => {
1165
- const cmd3 = new Command52("update");
1231
+ const cmd3 = new Command53("update");
1232
+ cmd3.option("--json", "Output the mutation result as JSON without prompting");
1166
1233
  cmd3.description("Update API description metadata in the Scalar Registry");
1167
1234
  cmd3.argument("[namespace]", "Team namespace");
1168
1235
  cmd3.argument("[slug]", "API description slug");
1169
1236
  cmd3.option("--title <title>", "API description title");
1170
1237
  cmd3.option("--description <description>", "API description summary");
1238
+ cmd3.option(
1239
+ "--public",
1240
+ "Make the whole entry public, including existing versions"
1241
+ );
1242
+ cmd3.option(
1243
+ "--private",
1244
+ "Make the whole entry private, including existing versions"
1245
+ );
1246
+ cmd3.addHelpText(
1247
+ "after",
1248
+ "\nOmitting visibility options leaves access unchanged.\nExample: scalar registry update acme my-api --private"
1249
+ );
1171
1250
  cmd3.action(async (...args) => {
1172
- const { updateAction } = await import("./chunks/action-AYKKHH7A.js");
1251
+ const { updateAction } = await import("./chunks/action-6FPGU5SY.js");
1173
1252
  return updateAction(...args);
1174
1253
  });
1175
1254
  return cmd3;
@@ -1181,58 +1260,59 @@ var registryCommands = [
1181
1260
  UpdateCommand,
1182
1261
  DeleteCommand,
1183
1262
  ListCommand3,
1184
- GetCommand2
1263
+ GetCommand3
1185
1264
  ];
1186
- var registryDomain = new Command53("registry");
1265
+ var registryDomain = new Command54("registry");
1187
1266
  registryDomain.description("Manage API descriptions in the Scalar Registry");
1188
1267
  registryCommands.forEach((command) => registryDomain.addCommand(command()));
1189
1268
  var registry_default = registryDomain;
1190
1269
 
1191
1270
  // src/domains/team/index.ts
1192
- import { Command as Command57 } from "commander";
1271
+ import { Command as Command58 } from "commander";
1193
1272
 
1194
1273
  // src/domains/team/get/index.ts
1195
- import { Command as Command54 } from "commander";
1196
- var GetCommand3 = () => {
1197
- const cmd3 = new Command54("get");
1274
+ import { Command as Command55 } from "commander";
1275
+ var GetCommand4 = () => {
1276
+ const cmd3 = new Command55("get");
1198
1277
  cmd3.description("Show the current team and its namespaces");
1199
1278
  cmd3.option("--json", "Output the current team as JSON");
1200
1279
  cmd3.action(async (...args) => {
1201
- const { getAction } = await import("./chunks/action-ED4TSPRZ.js");
1280
+ const { getAction } = await import("./chunks/action-Y4YLWZHL.js");
1202
1281
  return getAction(...args);
1203
1282
  });
1204
1283
  return cmd3;
1205
1284
  };
1206
1285
 
1207
1286
  // src/domains/team/list/index.ts
1208
- import { Command as Command55 } from "commander";
1287
+ import { Command as Command56 } from "commander";
1209
1288
  var ListCommand4 = () => {
1210
- const cmd3 = new Command55("list");
1289
+ const cmd3 = new Command56("list");
1211
1290
  cmd3.description("List your Scalar teams");
1212
1291
  cmd3.option("--json", "Output teams as JSON");
1213
1292
  cmd3.action(async (...args) => {
1214
- const { listAction } = await import("./chunks/action-ZOYQBWGD.js");
1293
+ const { listAction } = await import("./chunks/action-W24B4YT5.js");
1215
1294
  return listAction(...args);
1216
1295
  });
1217
1296
  return cmd3;
1218
1297
  };
1219
1298
 
1220
1299
  // src/domains/team/set/index.ts
1221
- import { Command as Command56 } from "commander";
1300
+ import { Command as Command57 } from "commander";
1222
1301
  var SetCommand = () => {
1223
- const cmd3 = new Command56("set");
1302
+ const cmd3 = new Command57("set");
1303
+ cmd3.option("--json", "Output the result as JSON without prompting");
1224
1304
  cmd3.description("Select the current team");
1225
1305
  cmd3.option("--team <team>", "Team ID");
1226
1306
  cmd3.action(async (...args) => {
1227
- const { setAction } = await import("./chunks/action-BYYKW4S6.js");
1307
+ const { setAction } = await import("./chunks/action-QZV6IPK4.js");
1228
1308
  return setAction(...args);
1229
1309
  });
1230
1310
  return cmd3;
1231
1311
  };
1232
1312
 
1233
1313
  // src/domains/team/index.ts
1234
- var teamCommands = [ListCommand4, GetCommand3, SetCommand];
1235
- var teamDomain = new Command57("team");
1314
+ var teamCommands = [ListCommand4, GetCommand4, SetCommand];
1315
+ var teamDomain = new Command58("team");
1236
1316
  teamDomain.description("List and switch between your Scalar teams");
1237
1317
  teamCommands.forEach((command) => {
1238
1318
  teamDomain.addCommand(command());
@@ -1241,7 +1321,7 @@ var team_default = teamDomain;
1241
1321
 
1242
1322
  // src/domains/upgrade/index.ts
1243
1323
  import { execSync } from "node:child_process";
1244
- import { Command as Command58, Option as Option9 } from "commander";
1324
+ import { Command as Command59, Option as Option9 } from "commander";
1245
1325
 
1246
1326
  // src/helpers/upgrade.ts
1247
1327
  import semver from "semver";
@@ -1351,7 +1431,7 @@ function getUpgradeInstructions(portable, platform, arch, env, latestVersion) {
1351
1431
  }
1352
1432
 
1353
1433
  // src/domains/upgrade/index.ts
1354
- var cmd2 = new Command58("upgrade");
1434
+ var cmd2 = new Command59("upgrade");
1355
1435
  cmd2.description("Upgrade the Scalar CLI to the latest version");
1356
1436
  cmd2.option(
1357
1437
  "--check",
@@ -1467,7 +1547,7 @@ var domains_default = domains;
1467
1547
 
1468
1548
  // src/program.ts
1469
1549
  var getProgram = () => {
1470
- const program2 = new Command59();
1550
+ const program2 = new InputPolicyCommand();
1471
1551
  program2.enablePositionalOptions().name(Object.keys(bin)[0]).description(
1472
1552
  "Validate, lint, bundle, mock, and preview OpenAPI and AsyncAPI descriptions, and publish them to Scalar"
1473
1553
  ).version(version, "-v, --version", "Show the version number");
@@ -1479,6 +1559,7 @@ var getProgram = () => {
1479
1559
  command.createHelp().visibleCommands(command).find((child) => child.name() === "help")?.description("Show help for a command");
1480
1560
  for (const child of command.commands) configureHelpCopy(child);
1481
1561
  };
1562
+ configureInputPolicy(program2);
1482
1563
  configureHelpCopy(program2);
1483
1564
  return program2;
1484
1565
  };
@@ -1494,7 +1575,11 @@ var program = getProgram();
1494
1575
  if (process.argv.length === 2) {
1495
1576
  program.help();
1496
1577
  }
1497
- program.hook("preAction", () => {
1578
+ program.hook("preAction", (_program, command) => {
1579
+ if (command.name() === "update" && ["registry", "schema"].includes(command.parent?.name() ?? "")) {
1580
+ const visibility = normalizeVisibility(command.opts());
1581
+ if (!visibility.ok) command.error(visibility.error);
1582
+ }
1498
1583
  if (process.stdout.isTTY && process.stderr.isTTY && process.argv[2] !== "upgrade" && process.argv[2] !== "context" && process.argv[2] !== "completion" && process.argv[2] !== "__complete" && !process.argv.includes("--json") && process.env.SCALAR_CLI_DISTRIBUTION !== "portable") {
1499
1584
  checkUpgrade().catch(() => {
1500
1585
  });