@scalar/cli 2.12.2 → 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.
- package/README.md +221 -2
- package/chunks/{action-JXCU2JKC.js → action-27BJMHFD.js} +38 -6
- package/chunks/{action-WLPCBFRE.js → action-4EJA6UEB.js} +16 -16
- package/chunks/{action-JDXGQSQN.js → action-5MJTAO5X.js} +36 -23
- package/chunks/{action-H5XQIZKX.js → action-6FPGU5SY.js} +51 -24
- package/chunks/{action-HMPATNVE.js → action-6RQDLMOM.js} +53 -30
- package/chunks/{action-Y7EBKCUU.js → action-ASBFLTOA.js} +1 -1
- package/chunks/{action-HRRNN33O.js → action-AWHBOHGW.js} +68 -89
- package/chunks/{action-UOH5L2JF.js → action-ENN7KFBZ.js} +93 -54
- package/chunks/{action-ZNBXKA7T.js → action-ESVI46KE.js} +4 -4
- package/chunks/{action-LCTTNNFD.js → action-EVNUUWR5.js} +33 -17
- package/chunks/{action-OWWGJ34K.js → action-F6JSCBEU.js} +34 -16
- package/chunks/{action-2RIPHL6V.js → action-FZNFBX6U.js} +23 -6
- package/chunks/{action-DJ6FLPXH.js → action-GNYNOFDK.js} +15 -5
- package/chunks/{action-HOLFCPUY.js → action-JSYHIEYP.js} +12 -12
- package/chunks/action-KTY5ICV5.js +55 -0
- package/chunks/{action-IIQMZVRJ.js → action-LRR52RXL.js} +10 -8
- package/chunks/{action-Z3UXS5KI.js → action-LVYFHK4D.js} +6 -4
- package/chunks/{action-XBTIONQD.js → action-NN7QF6MI.js} +9 -6
- package/chunks/{action-2GIOY3HU.js → action-OD4GNHM3.js} +48 -28
- package/chunks/{action-OY5LI7TW.js → action-OZWRV54F.js} +9 -8
- package/chunks/{action-AZNY2B7G.js → action-QZV6IPK4.js} +26 -11
- package/chunks/action-S7PMEFCE.js +423 -0
- package/chunks/{action-6IL6KE3L.js → action-SZ6SG3RB.js} +16 -16
- package/chunks/{action-PRLW546C.js → action-U3MQZ5ZQ.js} +12 -12
- package/chunks/action-UAGYB4ZS.js +48 -0
- package/chunks/{action-U3R6AXJY.js → action-UVAYACFA.js} +6 -6
- package/chunks/{action-7OJTNQRM.js → action-VXEJNBNR.js} +9 -8
- package/chunks/{action-KE53K5EJ.js → action-W24B4YT5.js} +14 -14
- package/chunks/{action-QA5ATGWB.js → action-WQICTF7K.js} +67 -45
- package/chunks/{action-SFRYHYTZ.js → action-WUWWJGRJ.js} +6 -4
- package/chunks/{action-II3OJSGP.js → action-Y4YLWZHL.js} +12 -12
- package/chunks/{action-2NJJO35T.js → action-YEAOKB6V.js} +13 -11
- package/chunks/{action-LGNWFVEG.js → action-YFTRHKOK.js} +63 -48
- package/chunks/{action-QEYNGQXG.js → action-YQSSXJAX.js} +10 -7
- package/chunks/{action-IYUOT7XX.js → action-ZL2CXRJR.js} +8 -6
- package/chunks/{actions-DKQERAKZ.js → actions-GHHWF4Q2.js} +20 -18
- package/chunks/{agent-KQKNJZKK.js → agent-XAHNA4MB.js} +3 -3
- package/chunks/{asyncapi-MKBEQYBV.js → asyncapi-TICSLZRM.js} +52 -42
- package/chunks/{build.action-EGAOPKSX.js → build.action-AURC6QZ6.js} +37 -20
- package/chunks/{chunk-ZZTCEMCG.js → chunk-2AK5O3NQ.js} +2 -2
- package/chunks/chunk-2I6V7AI3.js +68 -0
- package/chunks/chunk-2XWUFFEZ.js +133 -0
- package/chunks/{chunk-7GOHWSPA.js → chunk-62OOT7FY.js} +5 -2
- package/chunks/{chunk-W2JGSGIQ.js → chunk-7K6I2GUG.js} +15 -9
- package/chunks/{chunk-5VZSFLRO.js → chunk-7O5H2SQP.js} +2 -2
- package/chunks/{chunk-FJREFWEE.js → chunk-7S34K2P3.js} +1 -1
- package/chunks/{chunk-PIWBFJX3.js → chunk-AOZQPCWI.js} +2 -0
- package/chunks/{chunk-EBNFCIKS.js → chunk-APX65SRT.js} +2 -1
- package/chunks/{chunk-GZA7GEZW.js → chunk-B3XOSR6W.js} +2 -2
- package/chunks/{chunk-VJAVNG6U.js → chunk-CSJIKXUD.js} +1 -1
- package/chunks/{chunk-MLBEF6MB.js → chunk-DDDYR2HF.js} +1 -1
- package/chunks/{chunk-TQL55CUG.js → chunk-EXJUFF6G.js} +1 -1
- package/chunks/{chunk-W6FLDNRM.js → chunk-IRA5BW2J.js} +2 -2
- package/chunks/chunk-IRQJDPZE.js +34 -0
- package/chunks/{chunk-ZK76AK3B.js → chunk-KPLWZIOV.js} +22 -3
- package/chunks/chunk-LK2ZIDHH.js +32 -0
- package/chunks/{chunk-3DKOVKCV.js → chunk-M2MMGSLK.js} +5 -5
- package/chunks/{chunk-FD364GM7.js → chunk-NRHHB3YY.js} +1 -1
- package/chunks/{chunk-W3Y5X3X3.js → chunk-OVKTA5CX.js} +12 -5
- package/chunks/chunk-PVDORWEM.js +167 -0
- package/chunks/chunk-RAJM56L7.js +60 -0
- package/chunks/{chunk-UJU2ORWU.js → chunk-RAU5KE6F.js} +1 -1
- package/chunks/{chunk-V6LUKXBV.js → chunk-RE5Z56QD.js} +2 -2
- package/chunks/chunk-SNQFFEYH.js +11 -0
- package/chunks/{chunk-GUF4PKDL.js → chunk-TI4NDKQC.js} +6 -5
- package/chunks/{chunk-VRZRTOZF.js → chunk-TKT5UW3G.js} +2 -2
- package/chunks/{chunk-A27OERJM.js → chunk-TVPVXL73.js} +7 -7
- package/chunks/{chunk-4RF2NKQN.js → chunk-TYNF7ROW.js} +1 -1
- package/chunks/{chunk-HDNCXPCZ.js → chunk-VNF2GRZA.js} +2 -2
- package/chunks/chunk-WDFZ7WYJ.js +16 -0
- package/chunks/{chunk-672Y6REB.js → chunk-WKW5W2ZP.js} +1 -1
- package/chunks/chunk-XUX6JXU5.js +58 -0
- package/chunks/{chunk-6YOXEMMX.js → chunk-Y2OQOAY7.js} +1 -1
- package/chunks/{create.action-UUDVWZ3F.js → create.action-O3HN6GV2.js} +32 -23
- package/chunks/{delete.action-XRP3VU5C.js → delete.action-2L2RWLPI.js} +36 -22
- package/chunks/{delete.action-EUQ4ESLJ.js → delete.action-KEBI2QCS.js} +38 -22
- package/chunks/{get.action-IYA5Q3RI.js → get.action-BUNTDW54.js} +13 -11
- package/chunks/{get.action-UHCFOKUQ.js → get.action-WDMTCZZR.js} +14 -14
- package/chunks/{list.action-3CCWEEAM.js → list.action-JNSEJVHX.js} +14 -14
- package/chunks/{list.action-D3GHA6S5.js → list.action-NSK7OBRH.js} +16 -16
- package/chunks/{publish.action-HIVWJ7QE.js → publish.action-ZRZQUL7S.js} +49 -29
- package/chunks/{update.action-NSKVEZES.js → update.action-7TA46AE6.js} +36 -22
- package/chunks/{update.action-VOZNA7BV.js → update.action-O2R5ODGG.js} +47 -27
- package/index.js +226 -149
- package/package.json +1 -1
- package/skills/scalar-cli/SKILL.md +4 -2
- package/template.md +220 -1
- package/chunks/action-RNVV27ET.js +0 -165
- package/chunks/action-ZHDGAUGG.js +0 -38
- package/chunks/chunk-AC62V47N.js +0 -38
- package/chunks/chunk-EGOXR5FB.js +0 -15
- package/chunks/chunk-JFIXNSPP.js +0 -26
- package/chunks/{action-UHXBY3RD.js → action-3P66ZSL3.js} +1 -1
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-
|
|
5
|
+
} from "./chunks/chunk-RAU5KE6F.js";
|
|
6
6
|
import {
|
|
7
7
|
buildCliContext,
|
|
8
8
|
runnableCommands
|
|
9
|
-
} from "./chunks/chunk-
|
|
9
|
+
} from "./chunks/chunk-APX65SRT.js";
|
|
10
10
|
import {
|
|
11
11
|
openBrowser
|
|
12
|
-
} from "./chunks/chunk-
|
|
12
|
+
} from "./chunks/chunk-RAJM56L7.js";
|
|
13
13
|
import {
|
|
14
14
|
measureTime
|
|
15
15
|
} from "./chunks/chunk-KHDYYVYF.js";
|
|
@@ -17,21 +17,20 @@ import {
|
|
|
17
17
|
BundleCommand,
|
|
18
18
|
parseFetchLimit,
|
|
19
19
|
parsePort
|
|
20
|
-
} from "./chunks/chunk-
|
|
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
|
|
27
30
|
} from "./chunks/chunk-NAC63XJF.js";
|
|
28
31
|
import {
|
|
29
32
|
SdkLanguage
|
|
30
|
-
} from "./chunks/chunk-
|
|
31
|
-
import {
|
|
32
|
-
err,
|
|
33
|
-
ok
|
|
34
|
-
} from "./chunks/chunk-5ENKYZA4.js";
|
|
33
|
+
} from "./chunks/chunk-Y2OQOAY7.js";
|
|
35
34
|
import {
|
|
36
35
|
checkNodeVersion
|
|
37
36
|
} from "./chunks/chunk-VUXPDHTQ.js";
|
|
@@ -39,22 +38,32 @@ import {
|
|
|
39
38
|
getMetadata,
|
|
40
39
|
logout,
|
|
41
40
|
setMetadata
|
|
42
|
-
} from "./chunks/chunk-
|
|
43
|
-
import "./chunks/chunk-
|
|
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-
|
|
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
|
-
|
|
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";
|
|
57
|
-
import
|
|
62
|
+
import {
|
|
63
|
+
err,
|
|
64
|
+
ok
|
|
65
|
+
} from "./chunks/chunk-5ENKYZA4.js";
|
|
66
|
+
import "./chunks/chunk-AOZQPCWI.js";
|
|
58
67
|
import "./chunks/chunk-Q26DFKTY.js";
|
|
59
68
|
import {
|
|
60
69
|
external_exports
|
|
@@ -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-
|
|
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-
|
|
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-
|
|
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(
|
|
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-
|
|
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
|
-
"
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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(
|
|
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-
|
|
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-
|
|
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-
|
|
630
|
+
const { markdownAction } = await import("./chunks/action-WUWWJGRJ.js");
|
|
599
631
|
return markdownAction(...args);
|
|
600
632
|
});
|
|
601
633
|
return cmd3;
|
|
@@ -610,12 +642,11 @@ function MockCommand() {
|
|
|
610
642
|
);
|
|
611
643
|
cmd3.argument("[file|url]", "OpenAPI or AsyncAPI file or URL to mock");
|
|
612
644
|
cmd3.option("-w, --watch", "Watch the file or URL for changes");
|
|
613
|
-
cmd3.option("-o, --once", "Start the server, then stop it after two seconds");
|
|
614
645
|
cmd3.option("-p, --port <port>", "HTTP port for the Mock Server", parsePort);
|
|
615
646
|
completeFiles(cmd3, ["file|url"], []);
|
|
616
647
|
cmd3.action(async (...args) => {
|
|
617
|
-
const { mockAction } = await import("./chunks/action-
|
|
618
|
-
|
|
648
|
+
const { mockAction } = await import("./chunks/action-WQICTF7K.js");
|
|
649
|
+
await mockAction(...args);
|
|
619
650
|
});
|
|
620
651
|
return cmd3;
|
|
621
652
|
}
|
|
@@ -633,7 +664,7 @@ function ConvertCommand() {
|
|
|
633
664
|
);
|
|
634
665
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
635
666
|
cmd3.action(async (...args) => {
|
|
636
|
-
const { convertAction } = await import("./chunks/action-
|
|
667
|
+
const { convertAction } = await import("./chunks/action-LVYFHK4D.js");
|
|
637
668
|
return convertAction(...args);
|
|
638
669
|
});
|
|
639
670
|
return cmd3;
|
|
@@ -652,7 +683,6 @@ function ServeCommand() {
|
|
|
652
683
|
"JSON file with API Reference configuration"
|
|
653
684
|
);
|
|
654
685
|
cmd3.option("-w, --watch", "Watch the file or URL for changes");
|
|
655
|
-
cmd3.option("-o, --once", "Start the server, then stop it after two seconds");
|
|
656
686
|
cmd3.option(
|
|
657
687
|
"-p, --port <port>",
|
|
658
688
|
"HTTP port for the API Reference server",
|
|
@@ -660,8 +690,8 @@ function ServeCommand() {
|
|
|
660
690
|
);
|
|
661
691
|
completeFiles(cmd3, ["file|url"], ["--config"]);
|
|
662
692
|
cmd3.action(async (...args) => {
|
|
663
|
-
const { serveAction } = await import("./chunks/action-
|
|
664
|
-
|
|
693
|
+
const { serveAction } = await import("./chunks/action-ENN7KFBZ.js");
|
|
694
|
+
await serveAction(...args);
|
|
665
695
|
});
|
|
666
696
|
return cmd3;
|
|
667
697
|
}
|
|
@@ -680,7 +710,7 @@ function ShareCommand() {
|
|
|
680
710
|
);
|
|
681
711
|
completeFiles(cmd3, ["file"], []);
|
|
682
712
|
cmd3.action(async (...args) => {
|
|
683
|
-
const { shareAction } = await import("./chunks/action-
|
|
713
|
+
const { shareAction } = await import("./chunks/action-ZL2CXRJR.js");
|
|
684
714
|
return shareAction(...args);
|
|
685
715
|
});
|
|
686
716
|
return cmd3;
|
|
@@ -700,7 +730,7 @@ function UpgradeCommand() {
|
|
|
700
730
|
);
|
|
701
731
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
702
732
|
cmd3.action(async (...args) => {
|
|
703
|
-
const { upgradeAction } = await import("./chunks/action-
|
|
733
|
+
const { upgradeAction } = await import("./chunks/action-NN7QF6MI.js");
|
|
704
734
|
return upgradeAction(...args);
|
|
705
735
|
});
|
|
706
736
|
return cmd3;
|
|
@@ -714,7 +744,7 @@ function ValidateCommand() {
|
|
|
714
744
|
cmd3.argument("[file|url]", "File or URL to validate");
|
|
715
745
|
completeFiles(cmd3, ["file|url"], []);
|
|
716
746
|
cmd3.action(async (...args) => {
|
|
717
|
-
const { validateAction } = await import("./chunks/action-
|
|
747
|
+
const { validateAction } = await import("./chunks/action-VXEJNBNR.js");
|
|
718
748
|
return validateAction(...args);
|
|
719
749
|
});
|
|
720
750
|
return cmd3;
|
|
@@ -725,15 +755,14 @@ import { Command as Command32 } from "commander";
|
|
|
725
755
|
function VoidCommand() {
|
|
726
756
|
const cmd3 = new Command32("void");
|
|
727
757
|
cmd3.description("Mirror HTTP requests with a local server");
|
|
728
|
-
cmd3.option("-o, --once", "Start the server, then stop it after two seconds");
|
|
729
758
|
cmd3.option(
|
|
730
759
|
"-p, --port <port>",
|
|
731
760
|
"HTTP port for the request-mirroring server",
|
|
732
761
|
parsePort
|
|
733
762
|
);
|
|
734
763
|
cmd3.action(async (...args) => {
|
|
735
|
-
const { voidAction } = await import("./chunks/action-
|
|
736
|
-
|
|
764
|
+
const { voidAction } = await import("./chunks/action-LRR52RXL.js");
|
|
765
|
+
await voidAction(...args);
|
|
737
766
|
});
|
|
738
767
|
return cmd3;
|
|
739
768
|
}
|
|
@@ -760,7 +789,7 @@ documentCommands.forEach((command) => documentDomain.addCommand(command()));
|
|
|
760
789
|
var document_default = documentDomain;
|
|
761
790
|
|
|
762
791
|
// src/domains/project/index.ts
|
|
763
|
-
import { Command as
|
|
792
|
+
import { Command as Command46 } from "commander";
|
|
764
793
|
|
|
765
794
|
// src/domains/project/preview/index.ts
|
|
766
795
|
import { Command as Command34, Option as Option7 } from "commander";
|
|
@@ -783,7 +812,7 @@ var PreviewCommand = () => {
|
|
|
783
812
|
cmd3.option("-N, --no-open", "Do not open the browser automatically", true);
|
|
784
813
|
completeFiles(cmd3, ["config"], []);
|
|
785
814
|
cmd3.action(async (...args) => {
|
|
786
|
-
const { previewAction } = await import("./chunks/action-
|
|
815
|
+
const { previewAction } = await import("./chunks/action-S7PMEFCE.js");
|
|
787
816
|
return previewAction(...args);
|
|
788
817
|
});
|
|
789
818
|
return cmd3;
|
|
@@ -800,7 +829,7 @@ function CheckConfigCommand() {
|
|
|
800
829
|
);
|
|
801
830
|
completeFiles(cmd3, ["file"], []);
|
|
802
831
|
cmd3.action(async (...args) => {
|
|
803
|
-
const { checkConfigAction } = await import("./chunks/action-
|
|
832
|
+
const { checkConfigAction } = await import("./chunks/action-3P66ZSL3.js");
|
|
804
833
|
return checkConfigAction(...args);
|
|
805
834
|
});
|
|
806
835
|
return cmd3;
|
|
@@ -810,27 +839,43 @@ function CheckConfigCommand() {
|
|
|
810
839
|
import { Command as Command36 } from "commander";
|
|
811
840
|
var CreateCommand = () => {
|
|
812
841
|
const cmd3 = new Command36("create");
|
|
842
|
+
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
813
843
|
cmd3.description("Create a Scalar project without a linked GitHub repository");
|
|
814
844
|
cmd3.option("-n, --name <name>", "Project name");
|
|
815
845
|
cmd3.option("-s, --slug <slug>", "Project slug");
|
|
816
846
|
cmd3.action(async (...args) => {
|
|
817
|
-
const { createAction } = await import("./chunks/action-
|
|
847
|
+
const { createAction } = await import("./chunks/action-5MJTAO5X.js");
|
|
818
848
|
return createAction(...args);
|
|
819
849
|
});
|
|
820
850
|
return cmd3;
|
|
821
851
|
};
|
|
822
852
|
|
|
823
853
|
// src/domains/project/deployments/index.ts
|
|
824
|
-
import { Command as
|
|
854
|
+
import { Command as Command39 } from "commander";
|
|
825
855
|
|
|
826
|
-
// src/domains/project/deployments/
|
|
856
|
+
// src/domains/project/deployments/get/index.ts
|
|
827
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";
|
|
828
872
|
var ListCommand = () => {
|
|
829
|
-
const cmd3 = new
|
|
873
|
+
const cmd3 = new Command38("list");
|
|
874
|
+
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
830
875
|
cmd3.description("List production deployments for a project");
|
|
831
876
|
cmd3.option("-s, --slug [slug]", "Project slug from scalar project list");
|
|
832
877
|
cmd3.action(async (...args) => {
|
|
833
|
-
const { listAction } = await import("./chunks/action-
|
|
878
|
+
const { listAction } = await import("./chunks/action-EVNUUWR5.js");
|
|
834
879
|
return listAction(...args);
|
|
835
880
|
});
|
|
836
881
|
return cmd3;
|
|
@@ -838,19 +883,20 @@ var ListCommand = () => {
|
|
|
838
883
|
|
|
839
884
|
// src/domains/project/deployments/index.ts
|
|
840
885
|
var DeploymentsCommand = () => {
|
|
841
|
-
const cmd3 = new
|
|
886
|
+
const cmd3 = new Command39("deployments");
|
|
842
887
|
cmd3.description("Show project deployment history");
|
|
843
888
|
cmd3.addCommand(ListCommand());
|
|
889
|
+
cmd3.addCommand(GetCommand());
|
|
844
890
|
return cmd3;
|
|
845
891
|
};
|
|
846
892
|
|
|
847
893
|
// src/domains/project/get/index.ts
|
|
848
|
-
import { Command as
|
|
849
|
-
function
|
|
850
|
-
const command = new
|
|
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");
|
|
851
897
|
command.action(
|
|
852
898
|
async (slug, options) => {
|
|
853
|
-
const { getAction } = await import("./chunks/action-
|
|
899
|
+
const { getAction } = await import("./chunks/action-U3MQZ5ZQ.js");
|
|
854
900
|
await getAction(slug, options);
|
|
855
901
|
}
|
|
856
902
|
);
|
|
@@ -858,9 +904,10 @@ function GetCommand() {
|
|
|
858
904
|
}
|
|
859
905
|
|
|
860
906
|
// src/domains/project/init/index.ts
|
|
861
|
-
import { Command as
|
|
907
|
+
import { Command as Command41 } from "commander";
|
|
862
908
|
var InitCommand = () => {
|
|
863
|
-
const cmd3 = new
|
|
909
|
+
const cmd3 = new Command41("init");
|
|
910
|
+
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
864
911
|
cmd3.description("Initialize a local Scalar Docs project");
|
|
865
912
|
cmd3.option(
|
|
866
913
|
"-s, --subdomain [url]",
|
|
@@ -868,27 +915,28 @@ var InitCommand = () => {
|
|
|
868
915
|
);
|
|
869
916
|
cmd3.option("--force", "Overwrite existing configuration");
|
|
870
917
|
cmd3.action(async (...args) => {
|
|
871
|
-
const { initAction } = await import("./chunks/action-
|
|
918
|
+
const { initAction } = await import("./chunks/action-YFTRHKOK.js");
|
|
872
919
|
return initAction(...args);
|
|
873
920
|
});
|
|
874
921
|
return cmd3;
|
|
875
922
|
};
|
|
876
923
|
|
|
877
924
|
// src/domains/project/list/index.ts
|
|
878
|
-
import { Command as
|
|
925
|
+
import { Command as Command42 } from "commander";
|
|
879
926
|
function ListCommand2() {
|
|
880
|
-
const command = new
|
|
927
|
+
const command = new Command42("list").description("List projects and their slugs for the current team").option("--json", "Print project details as JSON");
|
|
881
928
|
command.action(async (options) => {
|
|
882
|
-
const { listAction } = await import("./chunks/action-
|
|
929
|
+
const { listAction } = await import("./chunks/action-SZ6SG3RB.js");
|
|
883
930
|
await listAction(options);
|
|
884
931
|
});
|
|
885
932
|
return command;
|
|
886
933
|
}
|
|
887
934
|
|
|
888
935
|
// src/domains/project/publish/index.ts
|
|
889
|
-
import { Command as
|
|
936
|
+
import { Command as Command43 } from "commander";
|
|
890
937
|
var PublishCommand = () => {
|
|
891
|
-
const cmd3 = new
|
|
938
|
+
const cmd3 = new Command43("publish");
|
|
939
|
+
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
892
940
|
cmd3.description("Publish a new build of a Scalar project");
|
|
893
941
|
cmd3.option("-s, --slug [slug]", "Project slug from scalar project list");
|
|
894
942
|
cmd3.option(
|
|
@@ -903,18 +951,27 @@ var PublishCommand = () => {
|
|
|
903
951
|
"-g, --github",
|
|
904
952
|
"Publish from the linked GitHub repository instead of local files"
|
|
905
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
|
+
);
|
|
906
962
|
completeFiles(cmd3, [], ["--config"]);
|
|
907
963
|
cmd3.action(async (...args) => {
|
|
908
|
-
const { publishAction } = await import("./chunks/action-
|
|
964
|
+
const { publishAction } = await import("./chunks/action-AWHBOHGW.js");
|
|
909
965
|
return publishAction(...args);
|
|
910
966
|
});
|
|
911
967
|
return cmd3;
|
|
912
968
|
};
|
|
913
969
|
|
|
914
970
|
// src/domains/project/rollback/index.ts
|
|
915
|
-
import { Command as
|
|
971
|
+
import { Command as Command44 } from "commander";
|
|
916
972
|
var RollbackCommand = () => {
|
|
917
|
-
const cmd3 = new
|
|
973
|
+
const cmd3 = new Command44("rollback");
|
|
974
|
+
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
918
975
|
cmd3.description(
|
|
919
976
|
"Roll the live deployment back to a previously deployed build."
|
|
920
977
|
);
|
|
@@ -925,16 +982,17 @@ var RollbackCommand = () => {
|
|
|
925
982
|
);
|
|
926
983
|
cmd3.option("-y, --yes", "Skip the confirmation prompt");
|
|
927
984
|
cmd3.action(async (...args) => {
|
|
928
|
-
const { rollbackAction } = await import("./chunks/action-
|
|
985
|
+
const { rollbackAction } = await import("./chunks/action-6RQDLMOM.js");
|
|
929
986
|
return rollbackAction(...args);
|
|
930
987
|
});
|
|
931
988
|
return cmd3;
|
|
932
989
|
};
|
|
933
990
|
|
|
934
991
|
// src/domains/project/upgrade/index.ts
|
|
935
|
-
import { Command as
|
|
992
|
+
import { Command as Command45 } from "commander";
|
|
936
993
|
var UpgradeCommand2 = () => {
|
|
937
|
-
const cmd3 = new
|
|
994
|
+
const cmd3 = new Command45("upgrade");
|
|
995
|
+
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
938
996
|
cmd3.description("Upgrade a Scalar Docs configuration");
|
|
939
997
|
cmd3.argument(
|
|
940
998
|
"[config]",
|
|
@@ -942,7 +1000,7 @@ var UpgradeCommand2 = () => {
|
|
|
942
1000
|
);
|
|
943
1001
|
completeFiles(cmd3, ["config"], []);
|
|
944
1002
|
cmd3.action(async (...args) => {
|
|
945
|
-
const { upgradeAction } = await import("./chunks/action-
|
|
1003
|
+
const { upgradeAction } = await import("./chunks/action-27BJMHFD.js");
|
|
946
1004
|
return upgradeAction(...args);
|
|
947
1005
|
});
|
|
948
1006
|
return cmd3;
|
|
@@ -951,7 +1009,7 @@ var UpgradeCommand2 = () => {
|
|
|
951
1009
|
// src/domains/project/index.ts
|
|
952
1010
|
var projectCommands = [
|
|
953
1011
|
ListCommand2,
|
|
954
|
-
|
|
1012
|
+
GetCommand2,
|
|
955
1013
|
InitCommand,
|
|
956
1014
|
CheckConfigCommand,
|
|
957
1015
|
CreateCommand,
|
|
@@ -961,7 +1019,7 @@ var projectCommands = [
|
|
|
961
1019
|
DeploymentsCommand,
|
|
962
1020
|
UpgradeCommand2
|
|
963
1021
|
];
|
|
964
|
-
var projectDomain = new
|
|
1022
|
+
var projectDomain = new Command46("project");
|
|
965
1023
|
projectDomain.description("Manage Scalar Docs projects");
|
|
966
1024
|
for (const command of projectCommands) {
|
|
967
1025
|
projectDomain.addCommand(command());
|
|
@@ -970,12 +1028,11 @@ projectDomain.addCommand(DownloadIsolateCommand(), { hidden: true });
|
|
|
970
1028
|
var project_default = projectDomain;
|
|
971
1029
|
|
|
972
1030
|
// src/domains/readme/index.ts
|
|
973
|
-
import { Command as
|
|
1031
|
+
import { Command as Command48 } from "commander";
|
|
974
1032
|
|
|
975
1033
|
// src/domains/readme/generate.ts
|
|
976
|
-
import { text } from "@clack/prompts";
|
|
977
1034
|
import as from "ansis";
|
|
978
|
-
import { Command as
|
|
1035
|
+
import { Command as Command47 } from "commander";
|
|
979
1036
|
|
|
980
1037
|
// src/helpers/documentation/index.ts
|
|
981
1038
|
import fs from "node:fs/promises";
|
|
@@ -1009,7 +1066,7 @@ var generateDocumentationFile = async (outputPath) => {
|
|
|
1009
1066
|
|
|
1010
1067
|
// src/domains/readme/generate.ts
|
|
1011
1068
|
function GenerateReadmeCommand() {
|
|
1012
|
-
const cmd3 = new
|
|
1069
|
+
const cmd3 = new Command47("generate");
|
|
1013
1070
|
cmd3.description("Generate the CLI README from the command tree");
|
|
1014
1071
|
cmd3.option(
|
|
1015
1072
|
"-o, --output [file]",
|
|
@@ -1048,28 +1105,32 @@ import as2 from "ansis";
|
|
|
1048
1105
|
var CLI_DOCS_URL = "https://scalar.com/tools/cli/getting-started";
|
|
1049
1106
|
function ServeReadmeCommand(cmd3) {
|
|
1050
1107
|
cmd3.description("Open CLI documentation in your browser");
|
|
1051
|
-
cmd3.action(() => {
|
|
1052
|
-
openBrowser(CLI_DOCS_URL);
|
|
1108
|
+
cmd3.action(async () => {
|
|
1109
|
+
const browser = await openBrowser(CLI_DOCS_URL);
|
|
1110
|
+
if (!browser.ok) {
|
|
1111
|
+
return output.error().message(browser.error).exit("error");
|
|
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
|
|
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
|
|
1127
|
+
import { Command as Command54 } from "commander";
|
|
1068
1128
|
|
|
1069
1129
|
// src/domains/registry/publish/index.ts
|
|
1070
|
-
import { Command as
|
|
1130
|
+
import { Command as Command49 } from "commander";
|
|
1071
1131
|
var PublishCommand2 = () => {
|
|
1072
|
-
const cmd3 = new
|
|
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(
|
|
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-
|
|
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
|
|
1175
|
+
import { Command as Command50 } from "commander";
|
|
1111
1176
|
var DeleteCommand = () => {
|
|
1112
|
-
const cmd3 = new
|
|
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-
|
|
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
|
|
1125
|
-
var
|
|
1126
|
-
const cmd3 = new
|
|
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-
|
|
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
|
|
1215
|
+
import { Command as Command52 } from "commander";
|
|
1150
1216
|
var ListCommand3 = () => {
|
|
1151
|
-
const cmd3 = new
|
|
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-
|
|
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
|
|
1229
|
+
import { Command as Command53 } from "commander";
|
|
1164
1230
|
var UpdateCommand = () => {
|
|
1165
|
-
const cmd3 = new
|
|
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-
|
|
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
|
-
|
|
1263
|
+
GetCommand3
|
|
1185
1264
|
];
|
|
1186
|
-
var registryDomain = new
|
|
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
|
|
1271
|
+
import { Command as Command58 } from "commander";
|
|
1193
1272
|
|
|
1194
1273
|
// src/domains/team/get/index.ts
|
|
1195
|
-
import { Command as
|
|
1196
|
-
var
|
|
1197
|
-
const cmd3 = new
|
|
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-
|
|
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
|
|
1287
|
+
import { Command as Command56 } from "commander";
|
|
1209
1288
|
var ListCommand4 = () => {
|
|
1210
|
-
const cmd3 = new
|
|
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-
|
|
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
|
|
1300
|
+
import { Command as Command57 } from "commander";
|
|
1222
1301
|
var SetCommand = () => {
|
|
1223
|
-
const cmd3 = new
|
|
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-
|
|
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,
|
|
1235
|
-
var teamDomain = new
|
|
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,10 +1321,9 @@ 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
|
|
1324
|
+
import { Command as Command59, Option as Option9 } from "commander";
|
|
1245
1325
|
|
|
1246
1326
|
// src/helpers/upgrade.ts
|
|
1247
|
-
import as3 from "ansis";
|
|
1248
1327
|
import semver from "semver";
|
|
1249
1328
|
var packageJsonSchema = external_exports.object({
|
|
1250
1329
|
version: external_exports.string().refine((value) => semver.valid(value) !== null)
|
|
@@ -1271,17 +1350,11 @@ async function getUpgradeInformation(timeoutMs = USER_INITIATED_TIMEOUT_MS) {
|
|
|
1271
1350
|
latestVersion
|
|
1272
1351
|
});
|
|
1273
1352
|
}
|
|
1274
|
-
async function checkUpgrade(
|
|
1353
|
+
async function checkUpgrade() {
|
|
1275
1354
|
const emitOutput = () => {
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
);
|
|
1280
|
-
return;
|
|
1281
|
-
}
|
|
1282
|
-
return output.info().message(
|
|
1283
|
-
`A new Scalar CLI version is available. Run ${as3.cyan("`scalar upgrade`")} to install the latest version.`
|
|
1284
|
-
).print();
|
|
1355
|
+
process.stderr.write(
|
|
1356
|
+
"A new Scalar CLI version is available. Run `scalar upgrade` to install the latest version.\n"
|
|
1357
|
+
);
|
|
1285
1358
|
};
|
|
1286
1359
|
const now = Date.now();
|
|
1287
1360
|
const delay = 1 * 60 * 60 * 1e3;
|
|
@@ -1358,7 +1431,7 @@ function getUpgradeInstructions(portable, platform, arch, env, latestVersion) {
|
|
|
1358
1431
|
}
|
|
1359
1432
|
|
|
1360
1433
|
// src/domains/upgrade/index.ts
|
|
1361
|
-
var cmd2 = new
|
|
1434
|
+
var cmd2 = new Command59("upgrade");
|
|
1362
1435
|
cmd2.description("Upgrade the Scalar CLI to the latest version");
|
|
1363
1436
|
cmd2.option(
|
|
1364
1437
|
"--check",
|
|
@@ -1474,7 +1547,7 @@ var domains_default = domains;
|
|
|
1474
1547
|
|
|
1475
1548
|
// src/program.ts
|
|
1476
1549
|
var getProgram = () => {
|
|
1477
|
-
const program2 = new
|
|
1550
|
+
const program2 = new InputPolicyCommand();
|
|
1478
1551
|
program2.enablePositionalOptions().name(Object.keys(bin)[0]).description(
|
|
1479
1552
|
"Validate, lint, bundle, mock, and preview OpenAPI and AsyncAPI descriptions, and publish them to Scalar"
|
|
1480
1553
|
).version(version, "-v, --version", "Show the version number");
|
|
@@ -1486,6 +1559,7 @@ var getProgram = () => {
|
|
|
1486
1559
|
command.createHelp().visibleCommands(command).find((child) => child.name() === "help")?.description("Show help for a command");
|
|
1487
1560
|
for (const child of command.commands) configureHelpCopy(child);
|
|
1488
1561
|
};
|
|
1562
|
+
configureInputPolicy(program2);
|
|
1489
1563
|
configureHelpCopy(program2);
|
|
1490
1564
|
return program2;
|
|
1491
1565
|
};
|
|
@@ -1502,9 +1576,12 @@ if (process.argv.length === 2) {
|
|
|
1502
1576
|
program.help();
|
|
1503
1577
|
}
|
|
1504
1578
|
program.hook("preAction", (_program, command) => {
|
|
1505
|
-
if (
|
|
1506
|
-
const
|
|
1507
|
-
|
|
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
|
+
}
|
|
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") {
|
|
1584
|
+
checkUpgrade().catch(() => {
|
|
1508
1585
|
});
|
|
1509
1586
|
}
|
|
1510
1587
|
});
|