@scalar/cli 2.13.2 → 2.14.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 +42 -8
- package/chunks/{action-MHBMWRU4.js → action-2BGAMGXU.js} +7 -6
- package/chunks/{action-KCJTUKNF.js → action-2HPMP473.js} +4 -4
- package/chunks/{action-O4WDOJVV.js → action-3KP3WVPZ.js} +8 -7
- package/chunks/{action-E7EK6TJJ.js → action-4HXB3YQR.js} +12 -11
- package/chunks/{action-6LNC6MMJ.js → action-4HYLZRYW.js} +22 -21
- package/chunks/{action-AQCSAFDU.js → action-4MJXPSQU.js} +16 -15
- package/chunks/{action-4U36CMZG.js → action-57SV3ZBM.js} +7 -6
- package/chunks/{action-BIEKRF2X.js → action-6HFH7DAW.js} +7 -6
- package/chunks/{action-ZSUVSURQ.js → action-APBLB3IU.js} +7 -6
- package/chunks/{action-YH3KB4NR.js → action-APTGKF4W.js} +38 -36
- package/chunks/{action-XZDNARAW.js → action-BL5PWLFV.js} +21 -20
- package/chunks/{action-MHJOOGII.js → action-C7CNI7TP.js} +10 -10
- package/chunks/{action-Q7OD2QHZ.js → action-DJXZWPL7.js} +8 -7
- package/chunks/{action-D7D3YH2N.js → action-EPGLU5E3.js} +16 -15
- package/chunks/{action-YXAOA3TJ.js → action-EYOZ457H.js} +17 -16
- package/chunks/{action-BVORONSB.js → action-FLX3ESH7.js} +22 -21
- package/chunks/{action-VK6HFIZ5.js → action-FOITEQNQ.js} +16 -15
- package/chunks/{action-WMOLIVXC.js → action-GOFCT7XK.js} +21 -20
- package/chunks/{action-3OYAJ5F6.js → action-MJI3TI3W.js} +19 -18
- package/chunks/{action-3QTDQRAO.js → action-OP5DCAHN.js} +18 -16
- package/chunks/{action-LKMBK3MO.js → action-P2QEJUBK.js} +11 -11
- package/chunks/{action-JOKVK5PP.js → action-RRQNVUFW.js} +8 -8
- package/chunks/{action-2LFAO27S.js → action-SCOJRZKD.js} +11 -10
- package/chunks/{action-IN7SNSSI.js → action-TR2T2UYB.js} +7 -6
- package/chunks/{action-NY2R6VH2.js → action-U2RJ3ZAU.js} +4 -4
- package/chunks/{action-V2B42324.js → action-VAJSWBMD.js} +14 -14
- package/chunks/{action-ZYQEUYF7.js → action-VEP7LZPN.js} +4 -4
- package/chunks/{action-RDG3SJ2G.js → action-VS22CPVB.js} +17 -16
- package/chunks/{action-4DEIYLOW.js → action-VW2POHCL.js} +15 -15
- package/chunks/{action-WJMC3TDN.js → action-VY3DRAO4.js} +7 -7
- package/chunks/{action-FIKVZPFG.js → action-WOLNPEUQ.js} +10 -8
- package/chunks/{action-6WWWTCCB.js → action-XA4MEYFP.js} +14 -14
- package/chunks/{action-HGPGL624.js → action-Y4MKBDRC.js} +18 -17
- package/chunks/{action-S7NCRXKS.js → action-ZOU7EPX5.js} +19 -18
- package/chunks/{actions-K2RSZCU4.js → actions-PBYTDEMH.js} +16 -15
- package/chunks/{agent-YNVT6RJ6.js → agent-NA3QFKJX.js} +5 -5
- package/chunks/{asyncapi-XLHXPF2X.js → asyncapi-KCA6ZH3Q.js} +23 -18
- package/chunks/{build.action-TAMUO3F2.js → build.action-54FHG7VL.js} +18 -17
- package/chunks/{chunk-ORHGCCJR.js → chunk-2KSOARE4.js} +2 -2
- package/chunks/{chunk-UPYLTC2Z.js → chunk-2SBHCZPG.js} +1 -1
- package/chunks/{chunk-VMRXSVEE.js → chunk-3CRO6NY4.js} +3 -1
- package/chunks/{chunk-UXCQFVXG.js → chunk-42YF4H6W.js} +2 -2
- package/chunks/{chunk-5ENKYZA4.js → chunk-4S3DGMMZ.js} +1 -1
- package/chunks/chunk-5D3T63G4.js +14 -0
- package/chunks/{chunk-DRXJRWZA.js → chunk-6BQHLHBE.js} +4 -2
- package/chunks/{chunk-NEB25B57.js → chunk-7FS7BAUX.js} +3 -3
- package/chunks/{chunk-JA7EIRUB.js → chunk-7PNOYE6B.js} +1 -1
- package/chunks/{chunk-7UKLAB2Q.js → chunk-7ZDC34NA.js} +28 -8
- package/chunks/{chunk-KAKAN5X3.js → chunk-AAWPGVMG.js} +2 -2
- package/chunks/{chunk-MQNTUZ2B.js → chunk-BLY2CF4S.js} +3 -1
- package/chunks/{chunk-4T5XUXTP.js → chunk-BOCMOHQA.js} +3 -1
- package/chunks/chunk-BY4NGQ5D.js +15 -0
- package/chunks/{chunk-66POUWQA.js → chunk-DTZBE4ZX.js} +3 -3
- package/chunks/{chunk-2XWUFFEZ.js → chunk-E24BNP6E.js} +1 -1
- package/chunks/{chunk-NDCXYF5Q.js → chunk-EOTD7HAV.js} +1 -1
- package/chunks/{chunk-PFP35UAF.js → chunk-F5Q7FJRG.js} +1 -1
- package/chunks/chunk-GO3TSREI.js +27 -0
- package/chunks/{chunk-I2JLVALT.js → chunk-H5AMMMQ3.js} +10 -10
- package/chunks/{chunk-RAJM56L7.js → chunk-HIDIW2FN.js} +1 -1
- package/chunks/{chunk-LK2ZIDHH.js → chunk-IDGT5RAQ.js} +1 -1
- package/chunks/chunk-IPUJEBMI.js +9 -0
- package/chunks/{chunk-Z2NUKRKG.js → chunk-KKHTS43A.js} +3 -3
- package/chunks/{chunk-OBJCYCIV.js → chunk-KXMZXTLK.js} +1 -1
- package/chunks/{chunk-JQJSNCGD.js → chunk-KZSM2SUL.js} +4 -4
- package/chunks/{chunk-ZO7KDO3C.js → chunk-PIDLENYN.js} +7192 -6436
- package/chunks/{chunk-DDTGQKVB.js → chunk-PRW5TKYS.js} +1 -1
- package/chunks/{chunk-3CZG44E4.js → chunk-QMERQSPM.js} +2 -2
- package/chunks/{chunk-AP2O742I.js → chunk-QTMJ3VUZ.js} +2 -2
- package/chunks/{chunk-KYJLZCM3.js → chunk-RRYUCZYO.js} +2 -2
- package/chunks/{chunk-TWTUSPPI.js → chunk-S3U2VMVL.js} +2 -2
- package/chunks/{chunk-PFUJVZFI.js → chunk-UM3WZUGF.js} +4 -12
- package/chunks/{chunk-G7DFH6WK.js → chunk-USVU6AC2.js} +21 -5
- package/chunks/{chunk-RQOKASNF.js → chunk-VJ7FHLN4.js} +2 -2
- package/chunks/{chunk-3MKTCEUX.js → chunk-W7P6VTCG.js} +25 -2
- package/chunks/{chunk-KVK4LNTB.js → chunk-WKMOUBQJ.js} +7884 -3730
- package/chunks/{chunk-QHR5X4FO.js → chunk-WZSU45SV.js} +1 -1
- package/chunks/{chunk-XG6WXQFN.js → chunk-WZUA7IAV.js} +2 -2
- package/chunks/{create.action-UX5TVHST.js → create.action-NB3YYZ7K.js} +18 -17
- package/chunks/{delete.action-UMVF2N4A.js → delete.action-5BT3TXVZ.js} +18 -17
- package/chunks/{delete.action-C3ZGIXJX.js → delete.action-DWMQYW62.js} +18 -17
- package/chunks/diff.action-ENOOLRRB.js +324 -0
- package/chunks/{get.action-KIEUFN4D.js → get.action-2ASGSZW3.js} +17 -16
- package/chunks/{get.action-KFLT4UUT.js → get.action-55JDC2MJ.js} +21 -27
- package/chunks/{list.action-F3M4XJFC.js → list.action-6QBQFGVR.js} +17 -16
- package/chunks/{list.action-QK5DK5X3.js → list.action-NCG6Q6S2.js} +21 -20
- package/chunks/{publish.action-GZ2TSAPE.js → publish.action-4Y5EXBOY.js} +38 -36
- package/chunks/{update.action-DNINDNBT.js → update.action-4V6MQMWG.js} +19 -18
- package/chunks/{update.action-OTRO76PF.js → update.action-6OE54B5O.js} +18 -17
- package/index.js +262 -203
- package/package.json +13 -12
- package/skills/scalar-cli/SKILL.md +2 -1
- package/template.md +41 -7
package/index.js
CHANGED
|
@@ -2,35 +2,27 @@
|
|
|
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-PRW5TKYS.js";
|
|
6
|
+
import {
|
|
7
|
+
openBrowser
|
|
8
|
+
} from "./chunks/chunk-HIDIW2FN.js";
|
|
6
9
|
import {
|
|
7
10
|
buildCliContext,
|
|
8
11
|
runnableCommands
|
|
9
12
|
} from "./chunks/chunk-ADQ6B6QI.js";
|
|
10
|
-
import {
|
|
11
|
-
openBrowser
|
|
12
|
-
} from "./chunks/chunk-RAJM56L7.js";
|
|
13
|
-
import {
|
|
14
|
-
measureTime
|
|
15
|
-
} from "./chunks/chunk-KHDYYVYF.js";
|
|
16
|
-
import {
|
|
17
|
-
BundleCommand,
|
|
18
|
-
parseFetchLimit,
|
|
19
|
-
parsePort
|
|
20
|
-
} from "./chunks/chunk-MQNTUZ2B.js";
|
|
21
|
-
import {
|
|
22
|
-
completeFiles
|
|
23
|
-
} from "./chunks/chunk-DFOZG7ZV.js";
|
|
24
13
|
import {
|
|
25
14
|
normalizeVisibility
|
|
26
|
-
} from "./chunks/chunk-
|
|
15
|
+
} from "./chunks/chunk-IDGT5RAQ.js";
|
|
27
16
|
import {
|
|
28
17
|
DOCUMENT_FORMATS,
|
|
29
18
|
PRIVACY_VALUES
|
|
30
19
|
} from "./chunks/chunk-NAC63XJF.js";
|
|
20
|
+
import {
|
|
21
|
+
measureTime
|
|
22
|
+
} from "./chunks/chunk-KHDYYVYF.js";
|
|
31
23
|
import {
|
|
32
24
|
SdkLanguage
|
|
33
|
-
} from "./chunks/chunk-
|
|
25
|
+
} from "./chunks/chunk-EOTD7HAV.js";
|
|
34
26
|
import {
|
|
35
27
|
checkNodeVersion
|
|
36
28
|
} from "./chunks/chunk-VUXPDHTQ.js";
|
|
@@ -38,15 +30,24 @@ import {
|
|
|
38
30
|
getMetadata,
|
|
39
31
|
logout,
|
|
40
32
|
setMetadata
|
|
41
|
-
} from "./chunks/chunk-
|
|
42
|
-
import "./chunks/chunk-
|
|
33
|
+
} from "./chunks/chunk-AAWPGVMG.js";
|
|
34
|
+
import "./chunks/chunk-KXMZXTLK.js";
|
|
43
35
|
import {
|
|
44
36
|
bin,
|
|
45
37
|
name,
|
|
46
38
|
version
|
|
47
|
-
} from "./chunks/chunk-
|
|
48
|
-
import "./chunks/chunk-
|
|
49
|
-
import "./chunks/chunk-
|
|
39
|
+
} from "./chunks/chunk-3CRO6NY4.js";
|
|
40
|
+
import "./chunks/chunk-6BQHLHBE.js";
|
|
41
|
+
import "./chunks/chunk-BOCMOHQA.js";
|
|
42
|
+
import {
|
|
43
|
+
BundleCommand,
|
|
44
|
+
parseExitCode,
|
|
45
|
+
parseFetchLimit,
|
|
46
|
+
parsePort
|
|
47
|
+
} from "./chunks/chunk-BLY2CF4S.js";
|
|
48
|
+
import {
|
|
49
|
+
completeFiles
|
|
50
|
+
} from "./chunks/chunk-DFOZG7ZV.js";
|
|
50
51
|
import {
|
|
51
52
|
requireInteractive,
|
|
52
53
|
text
|
|
@@ -62,8 +63,8 @@ import {
|
|
|
62
63
|
import {
|
|
63
64
|
err,
|
|
64
65
|
ok
|
|
65
|
-
} from "./chunks/chunk-
|
|
66
|
-
import "./chunks/chunk-
|
|
66
|
+
} from "./chunks/chunk-4S3DGMMZ.js";
|
|
67
|
+
import "./chunks/chunk-7PNOYE6B.js";
|
|
67
68
|
import "./chunks/chunk-Q26DFKTY.js";
|
|
68
69
|
import {
|
|
69
70
|
external_exports
|
|
@@ -74,7 +75,7 @@ import "./chunks/chunk-3MZYUBJ6.js";
|
|
|
74
75
|
import { Agent, setGlobalDispatcher } from "undici";
|
|
75
76
|
|
|
76
77
|
// src/domains/schema/index.ts
|
|
77
|
-
import { Command as
|
|
78
|
+
import { Command as Command7 } from "commander";
|
|
78
79
|
|
|
79
80
|
// src/domains/schema/delete.ts
|
|
80
81
|
import { Command } from "commander";
|
|
@@ -85,50 +86,107 @@ var DeleteSchemaCommand = () => {
|
|
|
85
86
|
cmd3.option("-s, --slug <slug>", "Schema slug");
|
|
86
87
|
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
87
88
|
cmd3.action(async (...args) => {
|
|
88
|
-
const { deleteAction } = await import("./chunks/delete.action-
|
|
89
|
+
const { deleteAction } = await import("./chunks/delete.action-DWMQYW62.js");
|
|
89
90
|
return deleteAction(...args);
|
|
90
91
|
});
|
|
91
92
|
return cmd3;
|
|
92
93
|
};
|
|
93
94
|
|
|
95
|
+
// src/domains/schema/diff.ts
|
|
96
|
+
import { Command as Command2, InvalidArgumentError, Option } from "commander";
|
|
97
|
+
var parseCheckExitCode = (value) => {
|
|
98
|
+
if (!/^\d+$/.test(value)) {
|
|
99
|
+
throw new InvalidArgumentError(
|
|
100
|
+
"Expected an integer between 1 and 125. Put --check after the two schemas, or use --check=<code>."
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
return parseExitCode(value);
|
|
104
|
+
};
|
|
105
|
+
var DiffSchemaCommand = () => {
|
|
106
|
+
const cmd3 = new Command2("diff");
|
|
107
|
+
cmd3.description("Compare two schema versions, files, or URLs");
|
|
108
|
+
cmd3.argument(
|
|
109
|
+
"<from>",
|
|
110
|
+
"Published schema (namespace/slug@version), file, or URL"
|
|
111
|
+
);
|
|
112
|
+
cmd3.argument(
|
|
113
|
+
"<to>",
|
|
114
|
+
"Published schema (namespace/slug@version), file, or URL"
|
|
115
|
+
);
|
|
116
|
+
cmd3.addOption(
|
|
117
|
+
new Option(
|
|
118
|
+
"-v, --verbose",
|
|
119
|
+
"Show the full before and after value of every change"
|
|
120
|
+
).conflicts(["json", "quiet"])
|
|
121
|
+
);
|
|
122
|
+
cmd3.addOption(
|
|
123
|
+
new Option("--json", "Output the changes as JSON").conflicts([
|
|
124
|
+
"verbose",
|
|
125
|
+
"quiet"
|
|
126
|
+
])
|
|
127
|
+
);
|
|
128
|
+
cmd3.addOption(
|
|
129
|
+
new Option(
|
|
130
|
+
"--check [exit-code]",
|
|
131
|
+
"Exit with a non-zero code when the schemas differ (default 1)"
|
|
132
|
+
).preset("1").argParser(parseCheckExitCode)
|
|
133
|
+
);
|
|
134
|
+
cmd3.addOption(
|
|
135
|
+
new Option(
|
|
136
|
+
"-q, --quiet",
|
|
137
|
+
"Print nothing; use with --check to only set the exit code"
|
|
138
|
+
).conflicts(["verbose", "json"])
|
|
139
|
+
);
|
|
140
|
+
cmd3.option(
|
|
141
|
+
"--ignore <pointer...>",
|
|
142
|
+
"Skip changes at or under a JSON Pointer (repeatable)"
|
|
143
|
+
);
|
|
144
|
+
completeFiles(cmd3, ["from", "to"], []);
|
|
145
|
+
cmd3.action(async (...args) => {
|
|
146
|
+
const { diffAction } = await import("./chunks/diff.action-ENOOLRRB.js");
|
|
147
|
+
return diffAction(...args);
|
|
148
|
+
});
|
|
149
|
+
return cmd3;
|
|
150
|
+
};
|
|
151
|
+
|
|
94
152
|
// src/domains/schema/get.ts
|
|
95
|
-
import { Command as
|
|
153
|
+
import { Command as Command3, Option as Option2 } from "commander";
|
|
96
154
|
var GetSchemaCommand = () => {
|
|
97
|
-
const cmd3 = new
|
|
155
|
+
const cmd3 = new Command3("get");
|
|
98
156
|
cmd3.description("Download a shared schema version from the Scalar Registry");
|
|
99
157
|
cmd3.argument("[namespace]", "Team namespace");
|
|
100
158
|
cmd3.argument("[slug]", "Schema slug");
|
|
101
159
|
cmd3.option("--version <version>", "Schema version (defaults to latest)");
|
|
102
160
|
cmd3.addOption(
|
|
103
|
-
new
|
|
161
|
+
new Option2("--format <format>", "Output format").choices([...DOCUMENT_FORMATS]).default("json")
|
|
104
162
|
);
|
|
105
163
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
106
164
|
completeFiles(cmd3, [], ["--output"]);
|
|
107
165
|
cmd3.action(async (...args) => {
|
|
108
|
-
const { getAction } = await import("./chunks/get.action-
|
|
166
|
+
const { getAction } = await import("./chunks/get.action-55JDC2MJ.js");
|
|
109
167
|
return getAction(...args);
|
|
110
168
|
});
|
|
111
169
|
return cmd3;
|
|
112
170
|
};
|
|
113
171
|
|
|
114
172
|
// src/domains/schema/list.ts
|
|
115
|
-
import { Command as
|
|
173
|
+
import { Command as Command4 } from "commander";
|
|
116
174
|
var ListSchemaCommand = () => {
|
|
117
|
-
const cmd3 = new
|
|
175
|
+
const cmd3 = new Command4("list");
|
|
118
176
|
cmd3.description("List shared schemas in a team namespace");
|
|
119
177
|
cmd3.option("--namespace <namespace>", "Team namespace");
|
|
120
178
|
cmd3.option("--json", "Output schema metadata as JSON");
|
|
121
179
|
cmd3.action(async (...args) => {
|
|
122
|
-
const { listAction } = await import("./chunks/list.action-
|
|
180
|
+
const { listAction } = await import("./chunks/list.action-NCG6Q6S2.js");
|
|
123
181
|
return listAction(...args);
|
|
124
182
|
});
|
|
125
183
|
return cmd3;
|
|
126
184
|
};
|
|
127
185
|
|
|
128
186
|
// src/domains/schema/publish.ts
|
|
129
|
-
import { Command as
|
|
187
|
+
import { Command as Command5 } from "commander";
|
|
130
188
|
var PublishSchemaCommand = () => {
|
|
131
|
-
const cmd3 = new
|
|
189
|
+
const cmd3 = new Command5("publish");
|
|
132
190
|
cmd3.option("--json", "Output the mutation result as JSON without prompting");
|
|
133
191
|
cmd3.description("Publish a shared schema to the Scalar Registry");
|
|
134
192
|
cmd3.argument("[file]", "Shared schema file path or URL to upload");
|
|
@@ -158,16 +216,16 @@ var PublishSchemaCommand = () => {
|
|
|
158
216
|
);
|
|
159
217
|
completeFiles(cmd3, ["file"], []);
|
|
160
218
|
cmd3.action(async (...args) => {
|
|
161
|
-
const { publishAction } = await import("./chunks/publish.action-
|
|
219
|
+
const { publishAction } = await import("./chunks/publish.action-4Y5EXBOY.js");
|
|
162
220
|
return publishAction(...args);
|
|
163
221
|
});
|
|
164
222
|
return cmd3;
|
|
165
223
|
};
|
|
166
224
|
|
|
167
225
|
// src/domains/schema/update.ts
|
|
168
|
-
import { Command as
|
|
226
|
+
import { Command as Command6, Option as Option3 } from "commander";
|
|
169
227
|
var UpdateSchemaCommand = () => {
|
|
170
|
-
const cmd3 = new
|
|
228
|
+
const cmd3 = new Command6("update");
|
|
171
229
|
cmd3.option("--json", "Output the mutation result as JSON without prompting");
|
|
172
230
|
cmd3.description("Update shared schema metadata");
|
|
173
231
|
cmd3.option("-s, --slug <slug>", "Schema slug");
|
|
@@ -175,7 +233,7 @@ var UpdateSchemaCommand = () => {
|
|
|
175
233
|
cmd3.option("--title <title>", "Schema title");
|
|
176
234
|
cmd3.option("--description <description>", "Schema description");
|
|
177
235
|
cmd3.addOption(
|
|
178
|
-
new
|
|
236
|
+
new Option3(
|
|
179
237
|
"--isPrivate <isPrivate>",
|
|
180
238
|
"Whole-entry access, including existing versions (true/private or false/public)"
|
|
181
239
|
).choices([...PRIVACY_VALUES])
|
|
@@ -193,7 +251,7 @@ var UpdateSchemaCommand = () => {
|
|
|
193
251
|
"\nOmitting visibility options leaves access unchanged.\nExample: scalar schema update --namespace acme --slug my-schema --public"
|
|
194
252
|
);
|
|
195
253
|
cmd3.action(async (...args) => {
|
|
196
|
-
const { updateAction } = await import("./chunks/update.action-
|
|
254
|
+
const { updateAction } = await import("./chunks/update.action-4V6MQMWG.js");
|
|
197
255
|
return updateAction(...args);
|
|
198
256
|
});
|
|
199
257
|
return cmd3;
|
|
@@ -205,92 +263,93 @@ var schemaCommands = [
|
|
|
205
263
|
UpdateSchemaCommand,
|
|
206
264
|
ListSchemaCommand,
|
|
207
265
|
GetSchemaCommand,
|
|
208
|
-
PublishSchemaCommand
|
|
266
|
+
PublishSchemaCommand,
|
|
267
|
+
DiffSchemaCommand
|
|
209
268
|
];
|
|
210
|
-
var schemaDomain = new
|
|
269
|
+
var schemaDomain = new Command7("schema");
|
|
211
270
|
schemaDomain.description("Manage shared schemas in the Scalar Registry");
|
|
212
271
|
schemaCommands.forEach((command) => void schemaDomain.addCommand(command()));
|
|
213
272
|
var schema_default = schemaDomain;
|
|
214
273
|
|
|
215
274
|
// src/domains/sdk/index.ts
|
|
216
|
-
import { Command as
|
|
275
|
+
import { Command as Command14 } from "commander";
|
|
217
276
|
|
|
218
277
|
// src/domains/sdk/build.ts
|
|
219
|
-
import { Command as
|
|
278
|
+
import { Command as Command8 } from "commander";
|
|
220
279
|
var BuildSdkCommand = () => {
|
|
221
|
-
const cmd3 = new
|
|
280
|
+
const cmd3 = new Command8("build");
|
|
222
281
|
cmd3.option("--json", "Output the mutation result as JSON without prompting");
|
|
223
282
|
cmd3.description("Start an SDK build");
|
|
224
283
|
cmd3.option("-s, --slug <slug>", "SDK slug");
|
|
225
284
|
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
226
285
|
cmd3.action(async (...args) => {
|
|
227
|
-
const { buildAction } = await import("./chunks/build.action-
|
|
286
|
+
const { buildAction } = await import("./chunks/build.action-54FHG7VL.js");
|
|
228
287
|
return buildAction(...args);
|
|
229
288
|
});
|
|
230
289
|
return cmd3;
|
|
231
290
|
};
|
|
232
291
|
|
|
233
292
|
// src/domains/sdk/create.ts
|
|
234
|
-
import { Command as
|
|
293
|
+
import { Command as Command9, Option as Option4 } from "commander";
|
|
235
294
|
var CreateSdkCommand = () => {
|
|
236
|
-
const cmd3 = new
|
|
295
|
+
const cmd3 = new Command9("create");
|
|
237
296
|
cmd3.option("--json", "Output the mutation result as JSON without prompting");
|
|
238
297
|
cmd3.description("Create an SDK in the namespace of its source API");
|
|
239
298
|
cmd3.option("-a, --api <api>", "Scalar Registry API slug");
|
|
240
299
|
cmd3.option("-n, --namespace <namespace>", "Team namespace of the source API");
|
|
241
300
|
cmd3.addOption(
|
|
242
|
-
new
|
|
301
|
+
new Option4("-l, --language <language>", "SDK language").choices(
|
|
243
302
|
Object.values(SdkLanguage)
|
|
244
303
|
)
|
|
245
304
|
);
|
|
246
305
|
cmd3.action(async (...args) => {
|
|
247
|
-
const { createAction } = await import("./chunks/create.action-
|
|
306
|
+
const { createAction } = await import("./chunks/create.action-NB3YYZ7K.js");
|
|
248
307
|
return createAction(...args);
|
|
249
308
|
});
|
|
250
309
|
return cmd3;
|
|
251
310
|
};
|
|
252
311
|
|
|
253
312
|
// src/domains/sdk/delete.ts
|
|
254
|
-
import { Command as
|
|
313
|
+
import { Command as Command10 } from "commander";
|
|
255
314
|
var DeleteSdkCommand = () => {
|
|
256
|
-
const cmd3 = new
|
|
315
|
+
const cmd3 = new Command10("delete");
|
|
257
316
|
cmd3.option("--json", "Output the mutation result as JSON without prompting");
|
|
258
317
|
cmd3.description("Delete an SDK");
|
|
259
318
|
cmd3.option("-s, --slug <slug>", "SDK slug");
|
|
260
319
|
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
261
320
|
cmd3.action(async (...args) => {
|
|
262
|
-
const { deleteAction } = await import("./chunks/delete.action-
|
|
321
|
+
const { deleteAction } = await import("./chunks/delete.action-5BT3TXVZ.js");
|
|
263
322
|
return deleteAction(...args);
|
|
264
323
|
});
|
|
265
324
|
return cmd3;
|
|
266
325
|
};
|
|
267
326
|
|
|
268
327
|
// src/domains/sdk/update.ts
|
|
269
|
-
import { Command as
|
|
328
|
+
import { Command as Command11, Option as Option5 } from "commander";
|
|
270
329
|
var UpdateSdkCommand = () => {
|
|
271
|
-
const cmd3 = new
|
|
330
|
+
const cmd3 = new Command11("update");
|
|
272
331
|
cmd3.option("--json", "Output the mutation result as JSON without prompting");
|
|
273
332
|
cmd3.description("Update SDK metadata");
|
|
274
333
|
cmd3.option("-s, --slug <slug>", "SDK slug");
|
|
275
334
|
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
276
335
|
cmd3.option("--title <title>", "SDK title");
|
|
277
336
|
cmd3.addOption(
|
|
278
|
-
new
|
|
337
|
+
new Option5(
|
|
279
338
|
"--isPrivate <isPrivate>",
|
|
280
339
|
"Access setting (true/private or false/public)"
|
|
281
340
|
).choices([...PRIVACY_VALUES])
|
|
282
341
|
);
|
|
283
342
|
cmd3.action(async (...args) => {
|
|
284
|
-
const { updateAction } = await import("./chunks/update.action-
|
|
343
|
+
const { updateAction } = await import("./chunks/update.action-6OE54B5O.js");
|
|
285
344
|
return updateAction(...args);
|
|
286
345
|
});
|
|
287
346
|
return cmd3;
|
|
288
347
|
};
|
|
289
348
|
|
|
290
349
|
// src/domains/sdk/get.ts
|
|
291
|
-
import { Command as
|
|
350
|
+
import { Command as Command12 } from "commander";
|
|
292
351
|
var GetSdkCommand = () => {
|
|
293
|
-
const cmd3 = new
|
|
352
|
+
const cmd3 = new Command12("get");
|
|
294
353
|
cmd3.description(
|
|
295
354
|
"Inspect SDK metadata, API source, versions, and build status"
|
|
296
355
|
);
|
|
@@ -298,21 +357,21 @@ var GetSdkCommand = () => {
|
|
|
298
357
|
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
299
358
|
cmd3.option("--json", "Output structured SDK metadata as JSON");
|
|
300
359
|
cmd3.action(async (...args) => {
|
|
301
|
-
const { getAction } = await import("./chunks/get.action-
|
|
360
|
+
const { getAction } = await import("./chunks/get.action-2ASGSZW3.js");
|
|
302
361
|
return getAction(...args);
|
|
303
362
|
});
|
|
304
363
|
return cmd3;
|
|
305
364
|
};
|
|
306
365
|
|
|
307
366
|
// src/domains/sdk/list.ts
|
|
308
|
-
import { Command as
|
|
367
|
+
import { Command as Command13 } from "commander";
|
|
309
368
|
var ListSdkCommand = () => {
|
|
310
|
-
const cmd3 = new
|
|
369
|
+
const cmd3 = new Command13("list");
|
|
311
370
|
cmd3.description("List SDKs in a team namespace");
|
|
312
371
|
cmd3.option("--json", "Output structured SDK metadata as JSON");
|
|
313
372
|
cmd3.option("--namespace <namespace>", "Team namespace");
|
|
314
373
|
cmd3.action(async (...args) => {
|
|
315
|
-
const { listAction } = await import("./chunks/list.action-
|
|
374
|
+
const { listAction } = await import("./chunks/list.action-6QBQFGVR.js");
|
|
316
375
|
return listAction(...args);
|
|
317
376
|
});
|
|
318
377
|
return cmd3;
|
|
@@ -327,7 +386,7 @@ var sdkCommands = [
|
|
|
327
386
|
DeleteSdkCommand,
|
|
328
387
|
BuildSdkCommand
|
|
329
388
|
];
|
|
330
|
-
var sdkDomain = new
|
|
389
|
+
var sdkDomain = new Command14("sdk");
|
|
331
390
|
sdkDomain.description("Manage Scalar SDKs (Enterprise only)");
|
|
332
391
|
sdkCommands.forEach((command) => {
|
|
333
392
|
sdkDomain.addCommand(command());
|
|
@@ -335,47 +394,47 @@ sdkCommands.forEach((command) => {
|
|
|
335
394
|
var sdk_default = sdkDomain;
|
|
336
395
|
|
|
337
396
|
// src/domains/access-group/index.ts
|
|
338
|
-
import { Command as
|
|
397
|
+
import { Command as Command15 } from "commander";
|
|
339
398
|
function createAccessGroupCommand() {
|
|
340
|
-
const command = new
|
|
399
|
+
const command = new Command15("access-group").description(
|
|
341
400
|
"Manage access groups and allowed email domains for the current team"
|
|
342
401
|
);
|
|
343
402
|
command.command("list").description("List access groups for the current team").option("--json", "Print the result as JSON").action(async (options) => {
|
|
344
|
-
const { runAction } = await import("./chunks/actions-
|
|
403
|
+
const { runAction } = await import("./chunks/actions-PBYTDEMH.js");
|
|
345
404
|
await runAction({ operation: "list", ...options });
|
|
346
405
|
});
|
|
347
406
|
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(
|
|
348
407
|
async (slug, options) => {
|
|
349
|
-
const { runAction } = await import("./chunks/actions-
|
|
408
|
+
const { runAction } = await import("./chunks/actions-PBYTDEMH.js");
|
|
350
409
|
await runAction({ operation: "create", slug, ...options });
|
|
351
410
|
}
|
|
352
411
|
);
|
|
353
412
|
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) => {
|
|
354
|
-
const { runAction } = await import("./chunks/actions-
|
|
413
|
+
const { runAction } = await import("./chunks/actions-PBYTDEMH.js");
|
|
355
414
|
await runAction({ operation: "get", slug, ...options });
|
|
356
415
|
});
|
|
357
416
|
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(
|
|
358
417
|
async (slug, options) => {
|
|
359
|
-
const { runAction } = await import("./chunks/actions-
|
|
418
|
+
const { runAction } = await import("./chunks/actions-PBYTDEMH.js");
|
|
360
419
|
await runAction({ operation: "update", slug, ...options });
|
|
361
420
|
}
|
|
362
421
|
);
|
|
363
422
|
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(
|
|
364
423
|
async (slug, options) => {
|
|
365
|
-
const { runAction } = await import("./chunks/actions-
|
|
424
|
+
const { runAction } = await import("./chunks/actions-PBYTDEMH.js");
|
|
366
425
|
await runAction({ operation: "delete", slug, ...options });
|
|
367
426
|
}
|
|
368
427
|
);
|
|
369
428
|
const domain = command.command("domain").description("Manage allowed email domains");
|
|
370
429
|
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(
|
|
371
430
|
async (slug, domain2, options) => {
|
|
372
|
-
const { runAction } = await import("./chunks/actions-
|
|
431
|
+
const { runAction } = await import("./chunks/actions-PBYTDEMH.js");
|
|
373
432
|
await runAction({ operation: "add-domain", slug, domain: domain2, ...options });
|
|
374
433
|
}
|
|
375
434
|
);
|
|
376
435
|
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(
|
|
377
436
|
async (slug, domain2, options) => {
|
|
378
|
-
const { runAction } = await import("./chunks/actions-
|
|
437
|
+
const { runAction } = await import("./chunks/actions-PBYTDEMH.js");
|
|
379
438
|
await runAction({
|
|
380
439
|
operation: "remove-domain",
|
|
381
440
|
slug,
|
|
@@ -389,40 +448,40 @@ function createAccessGroupCommand() {
|
|
|
389
448
|
var access_group_default = createAccessGroupCommand();
|
|
390
449
|
|
|
391
450
|
// src/domains/auth/index.ts
|
|
392
|
-
import { Command as
|
|
451
|
+
import { Command as Command19 } from "commander";
|
|
393
452
|
|
|
394
453
|
// src/domains/auth/login/index.ts
|
|
395
|
-
import { Command as
|
|
454
|
+
import { Command as Command16, Option as Option6 } from "commander";
|
|
396
455
|
var LoginCommand = () => {
|
|
397
|
-
const cmd3 = new
|
|
456
|
+
const cmd3 = new Command16("login");
|
|
398
457
|
cmd3.description("Log in to Scalar");
|
|
399
458
|
cmd3.option(
|
|
400
459
|
"--token <token>",
|
|
401
460
|
"Personal token for authentication (overrides SCALAR_API_KEY; must not be empty)"
|
|
402
461
|
);
|
|
403
462
|
cmd3.addOption(
|
|
404
|
-
new
|
|
463
|
+
new Option6(
|
|
405
464
|
"--email <email>",
|
|
406
465
|
"Email address (unsupported; use browser or token authentication)"
|
|
407
466
|
).hideHelp()
|
|
408
467
|
);
|
|
409
468
|
cmd3.addOption(
|
|
410
|
-
new
|
|
469
|
+
new Option6(
|
|
411
470
|
"--password <password>",
|
|
412
471
|
"Password (unsupported; use browser or token authentication)"
|
|
413
472
|
).hideHelp()
|
|
414
473
|
);
|
|
415
474
|
cmd3.action(async (...args) => {
|
|
416
|
-
const { loginAction } = await import("./chunks/action-
|
|
475
|
+
const { loginAction } = await import("./chunks/action-VY3DRAO4.js");
|
|
417
476
|
return loginAction(...args);
|
|
418
477
|
});
|
|
419
478
|
return cmd3;
|
|
420
479
|
};
|
|
421
480
|
|
|
422
481
|
// src/domains/auth/logout/index.ts
|
|
423
|
-
import { Command as
|
|
482
|
+
import { Command as Command17 } from "commander";
|
|
424
483
|
var LogoutCommand = () => {
|
|
425
|
-
const cmd3 = new
|
|
484
|
+
const cmd3 = new Command17("logout");
|
|
426
485
|
cmd3.description("Log out of Scalar");
|
|
427
486
|
cmd3.action(async () => {
|
|
428
487
|
await logout();
|
|
@@ -432,13 +491,13 @@ var LogoutCommand = () => {
|
|
|
432
491
|
};
|
|
433
492
|
|
|
434
493
|
// src/domains/auth/whoami/index.ts
|
|
435
|
-
import { Command as
|
|
494
|
+
import { Command as Command18 } from "commander";
|
|
436
495
|
var WhoAmICommand = () => {
|
|
437
|
-
const cmd3 = new
|
|
496
|
+
const cmd3 = new Command18("whoami");
|
|
438
497
|
cmd3.description("Show the logged-in user and current team");
|
|
439
498
|
cmd3.option("--json", "Output authentication details as JSON");
|
|
440
499
|
cmd3.action(async (options) => {
|
|
441
|
-
const { whoamiAction } = await import("./chunks/action-
|
|
500
|
+
const { whoamiAction } = await import("./chunks/action-VAJSWBMD.js");
|
|
442
501
|
return whoamiAction(options);
|
|
443
502
|
});
|
|
444
503
|
return cmd3;
|
|
@@ -446,19 +505,19 @@ var WhoAmICommand = () => {
|
|
|
446
505
|
|
|
447
506
|
// src/domains/auth/index.ts
|
|
448
507
|
var authCommands = [LoginCommand, WhoAmICommand, LogoutCommand];
|
|
449
|
-
var authDomain = new
|
|
508
|
+
var authDomain = new Command19("auth");
|
|
450
509
|
authDomain.description("Log in to Scalar and manage your session");
|
|
451
510
|
authCommands.forEach((command) => authDomain.addCommand(command()));
|
|
452
511
|
var auth_default = authDomain;
|
|
453
512
|
|
|
454
513
|
// src/domains/completion/index.ts
|
|
455
|
-
import { Argument, Command as
|
|
514
|
+
import { Argument, Command as Command20 } from "commander";
|
|
456
515
|
|
|
457
516
|
// src/helpers/completion/shells.ts
|
|
458
517
|
var COMPLETION_SHELLS = ["bash", "zsh", "fish"];
|
|
459
518
|
|
|
460
519
|
// src/domains/completion/index.ts
|
|
461
|
-
var createCompletionCommand = () => new
|
|
520
|
+
var createCompletionCommand = () => new Command20("completion").description("Generate shell completion definitions").addArgument(
|
|
462
521
|
new Argument("<shell>", "Shell to configure").choices([
|
|
463
522
|
...COMPLETION_SHELLS
|
|
464
523
|
])
|
|
@@ -466,7 +525,7 @@ var createCompletionCommand = () => new Command19("completion").description("Gen
|
|
|
466
525
|
const { renderCompletionScript } = await import("./chunks/scripts-6CI6U32J.js");
|
|
467
526
|
process.stdout.write(renderCompletionScript(shell));
|
|
468
527
|
});
|
|
469
|
-
var createCompletionQueryCommand = () => new
|
|
528
|
+
var createCompletionQueryCommand = () => new Command20("__complete").description("Query shell completion candidates").argument("<cursor>", "Zero-based cursor word index").argument("[words...]", "Shell words including the executable").action(
|
|
470
529
|
async (cursor, words, _options, command) => {
|
|
471
530
|
const { queryCompletion } = await import("./chunks/query-WKATAJJ6.js");
|
|
472
531
|
const index = Number(cursor);
|
|
@@ -485,8 +544,8 @@ ${result.candidates.map((candidate) => `${candidate}
|
|
|
485
544
|
);
|
|
486
545
|
|
|
487
546
|
// src/domains/context/index.ts
|
|
488
|
-
import { Command as
|
|
489
|
-
var cmd = new
|
|
547
|
+
import { Command as Command21 } from "commander";
|
|
548
|
+
var cmd = new Command21("context");
|
|
490
549
|
cmd.description(
|
|
491
550
|
"Print every command, argument, and option as JSON for AI agents"
|
|
492
551
|
);
|
|
@@ -497,12 +556,12 @@ cmd.action(async () => {
|
|
|
497
556
|
var context_default = cmd;
|
|
498
557
|
|
|
499
558
|
// src/domains/document/index.ts
|
|
500
|
-
import { Command as
|
|
559
|
+
import { Command as Command34 } from "commander";
|
|
501
560
|
|
|
502
561
|
// src/domains/document/join/index.ts
|
|
503
|
-
import { Command as
|
|
562
|
+
import { Command as Command22 } from "commander";
|
|
504
563
|
function JoinCommand() {
|
|
505
|
-
const cmd3 = new
|
|
564
|
+
const cmd3 = new Command22("join");
|
|
506
565
|
cmd3.description(
|
|
507
566
|
"Join API descriptions of the same format into one description"
|
|
508
567
|
);
|
|
@@ -517,16 +576,16 @@ function JoinCommand() {
|
|
|
517
576
|
);
|
|
518
577
|
completeFiles(cmd3, ["files"], ["--output"]);
|
|
519
578
|
cmd3.action(async (...args) => {
|
|
520
|
-
const { joinAction } = await import("./chunks/action-
|
|
579
|
+
const { joinAction } = await import("./chunks/action-4HXB3YQR.js");
|
|
521
580
|
return joinAction(...args);
|
|
522
581
|
});
|
|
523
582
|
return cmd3;
|
|
524
583
|
}
|
|
525
584
|
|
|
526
585
|
// src/domains/document/split/index.ts
|
|
527
|
-
import { Command as
|
|
586
|
+
import { Command as Command23 } from "commander";
|
|
528
587
|
function SplitCommand() {
|
|
529
|
-
const cmd3 = new
|
|
588
|
+
const cmd3 = new Command23("split");
|
|
530
589
|
cmd3.description(
|
|
531
590
|
"Split an OpenAPI or AsyncAPI description into referenced JSON files"
|
|
532
591
|
);
|
|
@@ -541,16 +600,16 @@ function SplitCommand() {
|
|
|
541
600
|
);
|
|
542
601
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
543
602
|
cmd3.action(async (...args) => {
|
|
544
|
-
const { splitAction } = await import("./chunks/action-
|
|
603
|
+
const { splitAction } = await import("./chunks/action-2BGAMGXU.js");
|
|
545
604
|
return splitAction(...args);
|
|
546
605
|
});
|
|
547
606
|
return cmd3;
|
|
548
607
|
}
|
|
549
608
|
|
|
550
609
|
// src/domains/document/format/index.ts
|
|
551
|
-
import { Command as
|
|
610
|
+
import { Command as Command24 } from "commander";
|
|
552
611
|
function FormatCommand() {
|
|
553
|
-
const cmd3 = new
|
|
612
|
+
const cmd3 = new Command24("format");
|
|
554
613
|
cmd3.description("Format an OpenAPI or AsyncAPI description");
|
|
555
614
|
cmd3.argument(
|
|
556
615
|
"[file|url]",
|
|
@@ -562,14 +621,14 @@ function FormatCommand() {
|
|
|
562
621
|
);
|
|
563
622
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
564
623
|
cmd3.action(async (...args) => {
|
|
565
|
-
const { formatAction } = await import("./chunks/action-
|
|
624
|
+
const { formatAction } = await import("./chunks/action-6HFH7DAW.js");
|
|
566
625
|
return formatAction(...args);
|
|
567
626
|
});
|
|
568
627
|
return cmd3;
|
|
569
628
|
}
|
|
570
629
|
|
|
571
630
|
// src/domains/document/lint/index.ts
|
|
572
|
-
import { Command as
|
|
631
|
+
import { Command as Command25, InvalidArgumentError as InvalidArgumentError2, Option as Option7 } from "commander";
|
|
573
632
|
|
|
574
633
|
// src/domains/document/lint/formats.ts
|
|
575
634
|
var reportFormats = [
|
|
@@ -584,19 +643,19 @@ var reportFormats = [
|
|
|
584
643
|
|
|
585
644
|
// src/domains/document/lint/index.ts
|
|
586
645
|
function LintCommand() {
|
|
587
|
-
const cmd3 = new
|
|
646
|
+
const cmd3 = new Command25("lint");
|
|
588
647
|
cmd3.description("Lint an OpenAPI or AsyncAPI description with Spectral rules");
|
|
589
648
|
cmd3.argument("[file|url]", "API description file path or URL to lint");
|
|
590
649
|
cmd3.option("-r, --rule <file|url>", "Spectral ruleset file path or URL");
|
|
591
650
|
cmd3.addOption(
|
|
592
|
-
new
|
|
651
|
+
new Option7("--format <format>", "Report format").choices([...reportFormats]).default("codeframe")
|
|
593
652
|
);
|
|
594
653
|
cmd3.option(
|
|
595
654
|
"--max-problems <number>",
|
|
596
655
|
"Maximum displayed findings (totals and exit status include all findings)",
|
|
597
656
|
(value) => {
|
|
598
657
|
if (!/^\d+$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
599
|
-
throw new
|
|
658
|
+
throw new InvalidArgumentError2("Expected a nonnegative integer");
|
|
600
659
|
return Number(value);
|
|
601
660
|
},
|
|
602
661
|
100
|
|
@@ -615,31 +674,31 @@ function LintCommand() {
|
|
|
615
674
|
);
|
|
616
675
|
completeFiles(cmd3, ["file|url"], ["--rule", "--output", "--ignore-file"]);
|
|
617
676
|
cmd3.action(async (...args) => {
|
|
618
|
-
const { lintAction } = await import("./chunks/action-
|
|
677
|
+
const { lintAction } = await import("./chunks/action-DJXZWPL7.js");
|
|
619
678
|
return lintAction(...args);
|
|
620
679
|
});
|
|
621
680
|
return cmd3;
|
|
622
681
|
}
|
|
623
682
|
|
|
624
683
|
// src/domains/document/markdown/index.ts
|
|
625
|
-
import { Command as
|
|
684
|
+
import { Command as Command26 } from "commander";
|
|
626
685
|
function MarkdownCommand() {
|
|
627
|
-
const cmd3 = new
|
|
686
|
+
const cmd3 = new Command26("markdown");
|
|
628
687
|
cmd3.description("Generate Markdown documentation from an OpenAPI description");
|
|
629
688
|
cmd3.argument("[file|url]", "OpenAPI file path or URL to convert");
|
|
630
689
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
631
690
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
632
691
|
cmd3.action(async (...args) => {
|
|
633
|
-
const { markdownAction } = await import("./chunks/action-
|
|
692
|
+
const { markdownAction } = await import("./chunks/action-57SV3ZBM.js");
|
|
634
693
|
return markdownAction(...args);
|
|
635
694
|
});
|
|
636
695
|
return cmd3;
|
|
637
696
|
}
|
|
638
697
|
|
|
639
698
|
// src/domains/document/mock/index.ts
|
|
640
|
-
import { Command as
|
|
699
|
+
import { Command as Command27 } from "commander";
|
|
641
700
|
function MockCommand() {
|
|
642
|
-
const cmd3 = new
|
|
701
|
+
const cmd3 = new Command27("mock");
|
|
643
702
|
cmd3.description(
|
|
644
703
|
"Run a Mock Server for OpenAPI operations or AsyncAPI WebSocket and SSE channels"
|
|
645
704
|
);
|
|
@@ -648,16 +707,16 @@ function MockCommand() {
|
|
|
648
707
|
cmd3.option("-p, --port <port>", "HTTP port for the Mock Server", parsePort);
|
|
649
708
|
completeFiles(cmd3, ["file|url"], []);
|
|
650
709
|
cmd3.action(async (...args) => {
|
|
651
|
-
const { mockAction } = await import("./chunks/action-
|
|
710
|
+
const { mockAction } = await import("./chunks/action-EYOZ457H.js");
|
|
652
711
|
await mockAction(...args);
|
|
653
712
|
});
|
|
654
713
|
return cmd3;
|
|
655
714
|
}
|
|
656
715
|
|
|
657
716
|
// src/domains/document/postman/index.ts
|
|
658
|
-
import { Command as
|
|
717
|
+
import { Command as Command28 } from "commander";
|
|
659
718
|
function ConvertCommand() {
|
|
660
|
-
const cmd3 = new
|
|
719
|
+
const cmd3 = new Command28("convert");
|
|
661
720
|
cmd3.description("Convert a Postman collection to an OpenAPI description");
|
|
662
721
|
cmd3.argument("[file|url]", "Postman collection file path or URL to convert");
|
|
663
722
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
@@ -667,16 +726,16 @@ function ConvertCommand() {
|
|
|
667
726
|
);
|
|
668
727
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
669
728
|
cmd3.action(async (...args) => {
|
|
670
|
-
const { convertAction } = await import("./chunks/action-
|
|
729
|
+
const { convertAction } = await import("./chunks/action-TR2T2UYB.js");
|
|
671
730
|
return convertAction(...args);
|
|
672
731
|
});
|
|
673
732
|
return cmd3;
|
|
674
733
|
}
|
|
675
734
|
|
|
676
735
|
// src/domains/document/serve/index.ts
|
|
677
|
-
import { Command as
|
|
736
|
+
import { Command as Command29 } from "commander";
|
|
678
737
|
function ServeCommand() {
|
|
679
|
-
const cmd3 = new
|
|
738
|
+
const cmd3 = new Command29("serve");
|
|
680
739
|
cmd3.description(
|
|
681
740
|
"Serve API Reference documentation from an OpenAPI or AsyncAPI description"
|
|
682
741
|
);
|
|
@@ -693,16 +752,16 @@ function ServeCommand() {
|
|
|
693
752
|
);
|
|
694
753
|
completeFiles(cmd3, ["file|url"], ["--config"]);
|
|
695
754
|
cmd3.action(async (...args) => {
|
|
696
|
-
const { serveAction } = await import("./chunks/action-
|
|
755
|
+
const { serveAction } = await import("./chunks/action-OP5DCAHN.js");
|
|
697
756
|
await serveAction(...args);
|
|
698
757
|
});
|
|
699
758
|
return cmd3;
|
|
700
759
|
}
|
|
701
760
|
|
|
702
761
|
// src/domains/document/share/index.ts
|
|
703
|
-
import { Command as
|
|
762
|
+
import { Command as Command30 } from "commander";
|
|
704
763
|
function ShareCommand() {
|
|
705
|
-
const cmd3 = new
|
|
764
|
+
const cmd3 = new Command30("share");
|
|
706
765
|
cmd3.description(
|
|
707
766
|
"Publish an OpenAPI or AsyncAPI description to a public sandbox"
|
|
708
767
|
);
|
|
@@ -713,16 +772,16 @@ function ShareCommand() {
|
|
|
713
772
|
);
|
|
714
773
|
completeFiles(cmd3, ["file"], []);
|
|
715
774
|
cmd3.action(async (...args) => {
|
|
716
|
-
const { shareAction } = await import("./chunks/action-
|
|
775
|
+
const { shareAction } = await import("./chunks/action-SCOJRZKD.js");
|
|
717
776
|
return shareAction(...args);
|
|
718
777
|
});
|
|
719
778
|
return cmd3;
|
|
720
779
|
}
|
|
721
780
|
|
|
722
781
|
// src/domains/document/upgrade/index.ts
|
|
723
|
-
import { Command as
|
|
782
|
+
import { Command as Command31 } from "commander";
|
|
724
783
|
function UpgradeCommand() {
|
|
725
|
-
const cmd3 = new
|
|
784
|
+
const cmd3 = new Command31("upgrade");
|
|
726
785
|
cmd3.description(
|
|
727
786
|
"Upgrade an API description to OpenAPI 3.1 or the latest supported AsyncAPI version"
|
|
728
787
|
);
|
|
@@ -733,30 +792,30 @@ function UpgradeCommand() {
|
|
|
733
792
|
);
|
|
734
793
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
735
794
|
cmd3.action(async (...args) => {
|
|
736
|
-
const { upgradeAction } = await import("./chunks/action-
|
|
795
|
+
const { upgradeAction } = await import("./chunks/action-WOLNPEUQ.js");
|
|
737
796
|
return upgradeAction(...args);
|
|
738
797
|
});
|
|
739
798
|
return cmd3;
|
|
740
799
|
}
|
|
741
800
|
|
|
742
801
|
// src/domains/document/validate/index.ts
|
|
743
|
-
import { Command as
|
|
802
|
+
import { Command as Command32 } from "commander";
|
|
744
803
|
function ValidateCommand() {
|
|
745
|
-
const cmd3 = new
|
|
804
|
+
const cmd3 = new Command32("validate");
|
|
746
805
|
cmd3.description("Validate an OpenAPI or AsyncAPI description");
|
|
747
806
|
cmd3.argument("[file|url]", "File or URL to validate");
|
|
748
807
|
completeFiles(cmd3, ["file|url"], []);
|
|
749
808
|
cmd3.action(async (...args) => {
|
|
750
|
-
const { validateAction } = await import("./chunks/action-
|
|
809
|
+
const { validateAction } = await import("./chunks/action-APBLB3IU.js");
|
|
751
810
|
return validateAction(...args);
|
|
752
811
|
});
|
|
753
812
|
return cmd3;
|
|
754
813
|
}
|
|
755
814
|
|
|
756
815
|
// src/domains/document/void/index.ts
|
|
757
|
-
import { Command as
|
|
816
|
+
import { Command as Command33 } from "commander";
|
|
758
817
|
function VoidCommand() {
|
|
759
|
-
const cmd3 = new
|
|
818
|
+
const cmd3 = new Command33("void");
|
|
760
819
|
cmd3.description("Mirror HTTP requests with a local server");
|
|
761
820
|
cmd3.option(
|
|
762
821
|
"-p, --port <port>",
|
|
@@ -786,18 +845,18 @@ var documentCommands = [
|
|
|
786
845
|
LintCommand,
|
|
787
846
|
UpgradeCommand
|
|
788
847
|
];
|
|
789
|
-
var documentDomain = new
|
|
848
|
+
var documentDomain = new Command34("document");
|
|
790
849
|
documentDomain.description("Work with OpenAPI and AsyncAPI descriptions");
|
|
791
850
|
documentCommands.forEach((command) => documentDomain.addCommand(command()));
|
|
792
851
|
var document_default = documentDomain;
|
|
793
852
|
|
|
794
853
|
// src/domains/project/index.ts
|
|
795
|
-
import { Command as
|
|
854
|
+
import { Command as Command47 } from "commander";
|
|
796
855
|
|
|
797
856
|
// src/domains/project/preview/index.ts
|
|
798
|
-
import { Command as
|
|
857
|
+
import { Command as Command35, Option as Option8 } from "commander";
|
|
799
858
|
var PreviewCommand = () => {
|
|
800
|
-
const cmd3 = new
|
|
859
|
+
const cmd3 = new Command35("preview");
|
|
801
860
|
cmd3.description("Preview a Scalar Docs project locally");
|
|
802
861
|
cmd3.argument(
|
|
803
862
|
"[config]",
|
|
@@ -810,21 +869,21 @@ var PreviewCommand = () => {
|
|
|
810
869
|
);
|
|
811
870
|
cmd3.option("-H, --host [host]", "Host address for the preview server");
|
|
812
871
|
cmd3.addOption(
|
|
813
|
-
new
|
|
872
|
+
new Option8("-L, --log-level <level>", "Set the log level").choices(["debug", "info"]).default("info")
|
|
814
873
|
);
|
|
815
874
|
cmd3.option("-N, --no-open", "Do not open the browser automatically", true);
|
|
816
875
|
completeFiles(cmd3, ["config"], []);
|
|
817
876
|
cmd3.action(async (...args) => {
|
|
818
|
-
const { previewAction } = await import("./chunks/action-
|
|
877
|
+
const { previewAction } = await import("./chunks/action-C7CNI7TP.js");
|
|
819
878
|
return previewAction(...args);
|
|
820
879
|
});
|
|
821
880
|
return cmd3;
|
|
822
881
|
};
|
|
823
882
|
|
|
824
883
|
// src/domains/project/check-config/index.ts
|
|
825
|
-
import { Command as
|
|
884
|
+
import { Command as Command36 } from "commander";
|
|
826
885
|
function CheckConfigCommand() {
|
|
827
|
-
const cmd3 = new
|
|
886
|
+
const cmd3 = new Command36("check-config");
|
|
828
887
|
cmd3.description("Validate a Scalar configuration file");
|
|
829
888
|
cmd3.argument(
|
|
830
889
|
"[file]",
|
|
@@ -832,53 +891,53 @@ function CheckConfigCommand() {
|
|
|
832
891
|
);
|
|
833
892
|
completeFiles(cmd3, ["file"], []);
|
|
834
893
|
cmd3.action(async (...args) => {
|
|
835
|
-
const { checkConfigAction } = await import("./chunks/action-
|
|
894
|
+
const { checkConfigAction } = await import("./chunks/action-U2RJ3ZAU.js");
|
|
836
895
|
return checkConfigAction(...args);
|
|
837
896
|
});
|
|
838
897
|
return cmd3;
|
|
839
898
|
}
|
|
840
899
|
|
|
841
900
|
// src/domains/project/create/index.ts
|
|
842
|
-
import { Command as
|
|
901
|
+
import { Command as Command37 } from "commander";
|
|
843
902
|
var CreateCommand = () => {
|
|
844
|
-
const cmd3 = new
|
|
903
|
+
const cmd3 = new Command37("create");
|
|
845
904
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
846
905
|
cmd3.description("Create a Scalar project without a linked GitHub repository");
|
|
847
906
|
cmd3.option("-n, --name <name>", "Project name");
|
|
848
907
|
cmd3.option("-s, --slug <slug>", "Project slug");
|
|
849
908
|
cmd3.action(async (...args) => {
|
|
850
|
-
const { createAction } = await import("./chunks/action-
|
|
909
|
+
const { createAction } = await import("./chunks/action-EPGLU5E3.js");
|
|
851
910
|
return createAction(...args);
|
|
852
911
|
});
|
|
853
912
|
return cmd3;
|
|
854
913
|
};
|
|
855
914
|
|
|
856
915
|
// src/domains/project/deployments/index.ts
|
|
857
|
-
import { Command as
|
|
916
|
+
import { Command as Command40 } from "commander";
|
|
858
917
|
|
|
859
918
|
// src/domains/project/deployments/get/index.ts
|
|
860
|
-
import { Command as
|
|
861
|
-
var GetCommand = () => new
|
|
919
|
+
import { Command as Command38 } from "commander";
|
|
920
|
+
var GetCommand = () => new Command38("get").description(
|
|
862
921
|
"Inspect an existing build in the selected team without resubmitting"
|
|
863
922
|
).argument("<build-id>", "Accepted build ID, including preview builds").option("--wait", "Wait for deployment instead of inspecting once").option(
|
|
864
923
|
"--timeout <seconds>",
|
|
865
924
|
"Maximum status wait in seconds (default: 30, or 600 with --wait)"
|
|
866
925
|
).action(
|
|
867
926
|
async (buildId, options) => {
|
|
868
|
-
const { getAction } = await import("./chunks/action-
|
|
927
|
+
const { getAction } = await import("./chunks/action-P2QEJUBK.js");
|
|
869
928
|
await getAction(buildId, options);
|
|
870
929
|
}
|
|
871
930
|
);
|
|
872
931
|
|
|
873
932
|
// src/domains/project/deployments/list/index.ts
|
|
874
|
-
import { Command as
|
|
933
|
+
import { Command as Command39 } from "commander";
|
|
875
934
|
var ListCommand = () => {
|
|
876
|
-
const cmd3 = new
|
|
935
|
+
const cmd3 = new Command39("list");
|
|
877
936
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
878
937
|
cmd3.description("List production deployments for a project");
|
|
879
938
|
cmd3.option("-s, --slug [slug]", "Project slug from scalar project list");
|
|
880
939
|
cmd3.action(async (...args) => {
|
|
881
|
-
const { listAction } = await import("./chunks/action-
|
|
940
|
+
const { listAction } = await import("./chunks/action-FLX3ESH7.js");
|
|
882
941
|
return listAction(...args);
|
|
883
942
|
});
|
|
884
943
|
return cmd3;
|
|
@@ -886,7 +945,7 @@ var ListCommand = () => {
|
|
|
886
945
|
|
|
887
946
|
// src/domains/project/deployments/index.ts
|
|
888
947
|
var DeploymentsCommand = () => {
|
|
889
|
-
const cmd3 = new
|
|
948
|
+
const cmd3 = new Command40("deployments");
|
|
890
949
|
cmd3.description("Show project deployment history");
|
|
891
950
|
cmd3.addCommand(ListCommand());
|
|
892
951
|
cmd3.addCommand(GetCommand());
|
|
@@ -894,12 +953,12 @@ var DeploymentsCommand = () => {
|
|
|
894
953
|
};
|
|
895
954
|
|
|
896
955
|
// src/domains/project/get/index.ts
|
|
897
|
-
import { Command as
|
|
956
|
+
import { Command as Command41 } from "commander";
|
|
898
957
|
function GetCommand2() {
|
|
899
|
-
const command = new
|
|
958
|
+
const command = new Command41("get").description("Show project details for the current team").argument("<slug>", "Project slug from scalar project list").option("--json", "Print project details as JSON");
|
|
900
959
|
command.action(
|
|
901
960
|
async (slug, options) => {
|
|
902
|
-
const { getAction } = await import("./chunks/action-
|
|
961
|
+
const { getAction } = await import("./chunks/action-4MJXPSQU.js");
|
|
903
962
|
await getAction(slug, options);
|
|
904
963
|
}
|
|
905
964
|
);
|
|
@@ -907,9 +966,9 @@ function GetCommand2() {
|
|
|
907
966
|
}
|
|
908
967
|
|
|
909
968
|
// src/domains/project/init/index.ts
|
|
910
|
-
import { Command as
|
|
969
|
+
import { Command as Command42 } from "commander";
|
|
911
970
|
var InitCommand = () => {
|
|
912
|
-
const cmd3 = new
|
|
971
|
+
const cmd3 = new Command42("init");
|
|
913
972
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
914
973
|
cmd3.description("Initialize a local Scalar Docs project");
|
|
915
974
|
cmd3.option(
|
|
@@ -918,27 +977,27 @@ var InitCommand = () => {
|
|
|
918
977
|
);
|
|
919
978
|
cmd3.option("--force", "Overwrite existing configuration");
|
|
920
979
|
cmd3.action(async (...args) => {
|
|
921
|
-
const { initAction } = await import("./chunks/action-
|
|
980
|
+
const { initAction } = await import("./chunks/action-ZOU7EPX5.js");
|
|
922
981
|
return initAction(...args);
|
|
923
982
|
});
|
|
924
983
|
return cmd3;
|
|
925
984
|
};
|
|
926
985
|
|
|
927
986
|
// src/domains/project/list/index.ts
|
|
928
|
-
import { Command as
|
|
987
|
+
import { Command as Command43 } from "commander";
|
|
929
988
|
function ListCommand2() {
|
|
930
|
-
const command = new
|
|
989
|
+
const command = new Command43("list").description("List projects and their slugs for the current team").option("--json", "Print project details as JSON");
|
|
931
990
|
command.action(async (options) => {
|
|
932
|
-
const { listAction } = await import("./chunks/action-
|
|
991
|
+
const { listAction } = await import("./chunks/action-MJI3TI3W.js");
|
|
933
992
|
await listAction(options);
|
|
934
993
|
});
|
|
935
994
|
return command;
|
|
936
995
|
}
|
|
937
996
|
|
|
938
997
|
// src/domains/project/publish/index.ts
|
|
939
|
-
import { Command as
|
|
998
|
+
import { Command as Command44 } from "commander";
|
|
940
999
|
var PublishCommand = () => {
|
|
941
|
-
const cmd3 = new
|
|
1000
|
+
const cmd3 = new Command44("publish");
|
|
942
1001
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
943
1002
|
cmd3.description("Publish a new build of a Scalar project");
|
|
944
1003
|
cmd3.option("-s, --slug [slug]", "Project slug from scalar project list");
|
|
@@ -964,16 +1023,16 @@ var PublishCommand = () => {
|
|
|
964
1023
|
);
|
|
965
1024
|
completeFiles(cmd3, [], ["--config"]);
|
|
966
1025
|
cmd3.action(async (...args) => {
|
|
967
|
-
const { publishAction } = await import("./chunks/action-
|
|
1026
|
+
const { publishAction } = await import("./chunks/action-4HYLZRYW.js");
|
|
968
1027
|
return publishAction(...args);
|
|
969
1028
|
});
|
|
970
1029
|
return cmd3;
|
|
971
1030
|
};
|
|
972
1031
|
|
|
973
1032
|
// src/domains/project/rollback/index.ts
|
|
974
|
-
import { Command as
|
|
1033
|
+
import { Command as Command45 } from "commander";
|
|
975
1034
|
var RollbackCommand = () => {
|
|
976
|
-
const cmd3 = new
|
|
1035
|
+
const cmd3 = new Command45("rollback");
|
|
977
1036
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
978
1037
|
cmd3.description(
|
|
979
1038
|
"Roll the live deployment back to a previously deployed build."
|
|
@@ -985,16 +1044,16 @@ var RollbackCommand = () => {
|
|
|
985
1044
|
);
|
|
986
1045
|
cmd3.option("-y, --yes", "Skip the confirmation prompt");
|
|
987
1046
|
cmd3.action(async (...args) => {
|
|
988
|
-
const { rollbackAction } = await import("./chunks/action-
|
|
1047
|
+
const { rollbackAction } = await import("./chunks/action-GOFCT7XK.js");
|
|
989
1048
|
return rollbackAction(...args);
|
|
990
1049
|
});
|
|
991
1050
|
return cmd3;
|
|
992
1051
|
};
|
|
993
1052
|
|
|
994
1053
|
// src/domains/project/upgrade/index.ts
|
|
995
|
-
import { Command as
|
|
1054
|
+
import { Command as Command46 } from "commander";
|
|
996
1055
|
var UpgradeCommand2 = () => {
|
|
997
|
-
const cmd3 = new
|
|
1056
|
+
const cmd3 = new Command46("upgrade");
|
|
998
1057
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
999
1058
|
cmd3.description("Upgrade a Scalar Docs configuration");
|
|
1000
1059
|
cmd3.argument(
|
|
@@ -1003,7 +1062,7 @@ var UpgradeCommand2 = () => {
|
|
|
1003
1062
|
);
|
|
1004
1063
|
completeFiles(cmd3, ["config"], []);
|
|
1005
1064
|
cmd3.action(async (...args) => {
|
|
1006
|
-
const { upgradeAction } = await import("./chunks/action-
|
|
1065
|
+
const { upgradeAction } = await import("./chunks/action-2HPMP473.js");
|
|
1007
1066
|
return upgradeAction(...args);
|
|
1008
1067
|
});
|
|
1009
1068
|
return cmd3;
|
|
@@ -1022,7 +1081,7 @@ var projectCommands = [
|
|
|
1022
1081
|
DeploymentsCommand,
|
|
1023
1082
|
UpgradeCommand2
|
|
1024
1083
|
];
|
|
1025
|
-
var projectDomain = new
|
|
1084
|
+
var projectDomain = new Command47("project");
|
|
1026
1085
|
projectDomain.description("Manage Scalar Docs projects");
|
|
1027
1086
|
for (const command of projectCommands) {
|
|
1028
1087
|
projectDomain.addCommand(command());
|
|
@@ -1031,11 +1090,11 @@ projectDomain.addCommand(DownloadIsolateCommand(), { hidden: true });
|
|
|
1031
1090
|
var project_default = projectDomain;
|
|
1032
1091
|
|
|
1033
1092
|
// src/domains/readme/index.ts
|
|
1034
|
-
import { Command as
|
|
1093
|
+
import { Command as Command49 } from "commander";
|
|
1035
1094
|
|
|
1036
1095
|
// src/domains/readme/generate.ts
|
|
1037
1096
|
import as from "ansis";
|
|
1038
|
-
import { Command as
|
|
1097
|
+
import { Command as Command48 } from "commander";
|
|
1039
1098
|
|
|
1040
1099
|
// src/helpers/documentation/index.ts
|
|
1041
1100
|
import fs from "node:fs/promises";
|
|
@@ -1069,7 +1128,7 @@ var generateDocumentationFile = async (outputPath) => {
|
|
|
1069
1128
|
|
|
1070
1129
|
// src/domains/readme/generate.ts
|
|
1071
1130
|
function GenerateReadmeCommand() {
|
|
1072
|
-
const cmd3 = new
|
|
1131
|
+
const cmd3 = new Command48("generate");
|
|
1073
1132
|
cmd3.description("Generate the CLI README from the command tree");
|
|
1074
1133
|
cmd3.option(
|
|
1075
1134
|
"-o, --output [file]",
|
|
@@ -1121,18 +1180,18 @@ function ServeReadmeCommand(cmd3) {
|
|
|
1121
1180
|
}
|
|
1122
1181
|
|
|
1123
1182
|
// src/domains/readme/index.ts
|
|
1124
|
-
var readmeDomain = new
|
|
1183
|
+
var readmeDomain = new Command49("readme");
|
|
1125
1184
|
readmeDomain.addCommand(GenerateReadmeCommand());
|
|
1126
1185
|
ServeReadmeCommand(readmeDomain);
|
|
1127
1186
|
var readme_default = readmeDomain;
|
|
1128
1187
|
|
|
1129
1188
|
// src/domains/registry/index.ts
|
|
1130
|
-
import { Command as
|
|
1189
|
+
import { Command as Command55 } from "commander";
|
|
1131
1190
|
|
|
1132
1191
|
// src/domains/registry/publish/index.ts
|
|
1133
|
-
import { Command as
|
|
1192
|
+
import { Command as Command50 } from "commander";
|
|
1134
1193
|
var PublishCommand2 = () => {
|
|
1135
|
-
const cmd3 = new
|
|
1194
|
+
const cmd3 = new Command50("publish");
|
|
1136
1195
|
cmd3.option("--json", "Output the mutation result as JSON without prompting");
|
|
1137
1196
|
cmd3.description("Publish an OpenAPI description to the Scalar Registry");
|
|
1138
1197
|
cmd3.argument("[file]", "API description file path or URL to upload");
|
|
@@ -1168,31 +1227,31 @@ var PublishCommand2 = () => {
|
|
|
1168
1227
|
);
|
|
1169
1228
|
completeFiles(cmd3, ["file"], []);
|
|
1170
1229
|
cmd3.action(async (...args) => {
|
|
1171
|
-
const { publishAction } = await import("./chunks/action-
|
|
1230
|
+
const { publishAction } = await import("./chunks/action-APTGKF4W.js");
|
|
1172
1231
|
return publishAction(...args);
|
|
1173
1232
|
});
|
|
1174
1233
|
return cmd3;
|
|
1175
1234
|
};
|
|
1176
1235
|
|
|
1177
1236
|
// src/domains/registry/delete/index.ts
|
|
1178
|
-
import { Command as
|
|
1237
|
+
import { Command as Command51 } from "commander";
|
|
1179
1238
|
var DeleteCommand = () => {
|
|
1180
|
-
const cmd3 = new
|
|
1239
|
+
const cmd3 = new Command51("delete");
|
|
1181
1240
|
cmd3.option("--json", "Output the mutation result as JSON without prompting");
|
|
1182
1241
|
cmd3.description("Delete an API description from the Scalar Registry");
|
|
1183
1242
|
cmd3.argument("[namespace]", "Team namespace");
|
|
1184
1243
|
cmd3.argument("[slug]", "API description slug");
|
|
1185
1244
|
cmd3.action(async (...args) => {
|
|
1186
|
-
const { deleteAction } = await import("./chunks/action-
|
|
1245
|
+
const { deleteAction } = await import("./chunks/action-FOITEQNQ.js");
|
|
1187
1246
|
return deleteAction(...args);
|
|
1188
1247
|
});
|
|
1189
1248
|
return cmd3;
|
|
1190
1249
|
};
|
|
1191
1250
|
|
|
1192
1251
|
// src/domains/registry/get/index.ts
|
|
1193
|
-
import { Command as
|
|
1252
|
+
import { Command as Command52, Option as Option9 } from "commander";
|
|
1194
1253
|
var GetCommand3 = () => {
|
|
1195
|
-
const cmd3 = new
|
|
1254
|
+
const cmd3 = new Command52("get");
|
|
1196
1255
|
cmd3.description(
|
|
1197
1256
|
"Download an API description version from the Scalar Registry"
|
|
1198
1257
|
);
|
|
@@ -1203,35 +1262,35 @@ var GetCommand3 = () => {
|
|
|
1203
1262
|
"API description version (defaults to latest)"
|
|
1204
1263
|
);
|
|
1205
1264
|
cmd3.addOption(
|
|
1206
|
-
new
|
|
1265
|
+
new Option9("--format <format>", "Output format").choices([...DOCUMENT_FORMATS]).default("json")
|
|
1207
1266
|
);
|
|
1208
1267
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
1209
1268
|
completeFiles(cmd3, [], ["--output"]);
|
|
1210
1269
|
cmd3.action(async (...args) => {
|
|
1211
|
-
const { getAction } = await import("./chunks/action-
|
|
1270
|
+
const { getAction } = await import("./chunks/action-VW2POHCL.js");
|
|
1212
1271
|
return getAction(...args);
|
|
1213
1272
|
});
|
|
1214
1273
|
return cmd3;
|
|
1215
1274
|
};
|
|
1216
1275
|
|
|
1217
1276
|
// src/domains/registry/list/index.ts
|
|
1218
|
-
import { Command as
|
|
1277
|
+
import { Command as Command53 } from "commander";
|
|
1219
1278
|
var ListCommand3 = () => {
|
|
1220
|
-
const cmd3 = new
|
|
1279
|
+
const cmd3 = new Command53("list");
|
|
1221
1280
|
cmd3.description("List Scalar Registry API descriptions in a team namespace");
|
|
1222
1281
|
cmd3.option("--namespace <namespace>", "Team namespace");
|
|
1223
1282
|
cmd3.option("--json", "Output Scalar Registry API metadata as JSON");
|
|
1224
1283
|
cmd3.action(async (...args) => {
|
|
1225
|
-
const { listAction } = await import("./chunks/action-
|
|
1284
|
+
const { listAction } = await import("./chunks/action-BL5PWLFV.js");
|
|
1226
1285
|
return listAction(...args);
|
|
1227
1286
|
});
|
|
1228
1287
|
return cmd3;
|
|
1229
1288
|
};
|
|
1230
1289
|
|
|
1231
1290
|
// src/domains/registry/update/index.ts
|
|
1232
|
-
import { Command as
|
|
1291
|
+
import { Command as Command54 } from "commander";
|
|
1233
1292
|
var UpdateCommand = () => {
|
|
1234
|
-
const cmd3 = new
|
|
1293
|
+
const cmd3 = new Command54("update");
|
|
1235
1294
|
cmd3.option("--json", "Output the mutation result as JSON without prompting");
|
|
1236
1295
|
cmd3.description("Update API description metadata in the Scalar Registry");
|
|
1237
1296
|
cmd3.argument("[namespace]", "Team namespace");
|
|
@@ -1251,7 +1310,7 @@ var UpdateCommand = () => {
|
|
|
1251
1310
|
"\nOmitting visibility options leaves access unchanged.\nExample: scalar registry update acme my-api --private"
|
|
1252
1311
|
);
|
|
1253
1312
|
cmd3.action(async (...args) => {
|
|
1254
|
-
const { updateAction } = await import("./chunks/action-
|
|
1313
|
+
const { updateAction } = await import("./chunks/action-VS22CPVB.js");
|
|
1255
1314
|
return updateAction(...args);
|
|
1256
1315
|
});
|
|
1257
1316
|
return cmd3;
|
|
@@ -1265,49 +1324,49 @@ var registryCommands = [
|
|
|
1265
1324
|
ListCommand3,
|
|
1266
1325
|
GetCommand3
|
|
1267
1326
|
];
|
|
1268
|
-
var registryDomain = new
|
|
1327
|
+
var registryDomain = new Command55("registry");
|
|
1269
1328
|
registryDomain.description("Manage API descriptions in the Scalar Registry");
|
|
1270
1329
|
registryCommands.forEach((command) => registryDomain.addCommand(command()));
|
|
1271
1330
|
var registry_default = registryDomain;
|
|
1272
1331
|
|
|
1273
1332
|
// src/domains/team/index.ts
|
|
1274
|
-
import { Command as
|
|
1333
|
+
import { Command as Command59 } from "commander";
|
|
1275
1334
|
|
|
1276
1335
|
// src/domains/team/get/index.ts
|
|
1277
|
-
import { Command as
|
|
1336
|
+
import { Command as Command56 } from "commander";
|
|
1278
1337
|
var GetCommand4 = () => {
|
|
1279
|
-
const cmd3 = new
|
|
1338
|
+
const cmd3 = new Command56("get");
|
|
1280
1339
|
cmd3.description("Show the current team and its namespaces");
|
|
1281
1340
|
cmd3.option("--json", "Output the current team as JSON");
|
|
1282
1341
|
cmd3.action(async (...args) => {
|
|
1283
|
-
const { getAction } = await import("./chunks/action-
|
|
1342
|
+
const { getAction } = await import("./chunks/action-XA4MEYFP.js");
|
|
1284
1343
|
return getAction(...args);
|
|
1285
1344
|
});
|
|
1286
1345
|
return cmd3;
|
|
1287
1346
|
};
|
|
1288
1347
|
|
|
1289
1348
|
// src/domains/team/list/index.ts
|
|
1290
|
-
import { Command as
|
|
1349
|
+
import { Command as Command57 } from "commander";
|
|
1291
1350
|
var ListCommand4 = () => {
|
|
1292
|
-
const cmd3 = new
|
|
1351
|
+
const cmd3 = new Command57("list");
|
|
1293
1352
|
cmd3.description("List your Scalar teams");
|
|
1294
1353
|
cmd3.option("--json", "Output teams as JSON");
|
|
1295
1354
|
cmd3.action(async (...args) => {
|
|
1296
|
-
const { listAction } = await import("./chunks/action-
|
|
1355
|
+
const { listAction } = await import("./chunks/action-Y4MKBDRC.js");
|
|
1297
1356
|
return listAction(...args);
|
|
1298
1357
|
});
|
|
1299
1358
|
return cmd3;
|
|
1300
1359
|
};
|
|
1301
1360
|
|
|
1302
1361
|
// src/domains/team/set/index.ts
|
|
1303
|
-
import { Command as
|
|
1362
|
+
import { Command as Command58 } from "commander";
|
|
1304
1363
|
var SetCommand = () => {
|
|
1305
|
-
const cmd3 = new
|
|
1364
|
+
const cmd3 = new Command58("set");
|
|
1306
1365
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
1307
1366
|
cmd3.description("Select the current team");
|
|
1308
1367
|
cmd3.option("--team <team>", "Team ID");
|
|
1309
1368
|
cmd3.action(async (...args) => {
|
|
1310
|
-
const { setAction } = await import("./chunks/action-
|
|
1369
|
+
const { setAction } = await import("./chunks/action-RRQNVUFW.js");
|
|
1311
1370
|
return setAction(...args);
|
|
1312
1371
|
});
|
|
1313
1372
|
return cmd3;
|
|
@@ -1315,7 +1374,7 @@ var SetCommand = () => {
|
|
|
1315
1374
|
|
|
1316
1375
|
// src/domains/team/index.ts
|
|
1317
1376
|
var teamCommands = [ListCommand4, GetCommand4, SetCommand];
|
|
1318
|
-
var teamDomain = new
|
|
1377
|
+
var teamDomain = new Command59("team");
|
|
1319
1378
|
teamDomain.description("List and switch between your Scalar teams");
|
|
1320
1379
|
teamCommands.forEach((command) => {
|
|
1321
1380
|
teamDomain.addCommand(command());
|
|
@@ -1324,7 +1383,7 @@ var team_default = teamDomain;
|
|
|
1324
1383
|
|
|
1325
1384
|
// src/domains/upgrade/index.ts
|
|
1326
1385
|
import { execSync } from "node:child_process";
|
|
1327
|
-
import { Command as
|
|
1386
|
+
import { Command as Command60, Option as Option10 } from "commander";
|
|
1328
1387
|
|
|
1329
1388
|
// src/helpers/upgrade.ts
|
|
1330
1389
|
import semver from "semver";
|
|
@@ -1434,14 +1493,14 @@ function getUpgradeInstructions(portable, platform, arch, env, latestVersion) {
|
|
|
1434
1493
|
}
|
|
1435
1494
|
|
|
1436
1495
|
// src/domains/upgrade/index.ts
|
|
1437
|
-
var cmd2 = new
|
|
1496
|
+
var cmd2 = new Command60("upgrade");
|
|
1438
1497
|
cmd2.description("Upgrade the Scalar CLI to the latest version");
|
|
1439
1498
|
cmd2.option(
|
|
1440
1499
|
"--check",
|
|
1441
1500
|
"Show installed and available versions without installing"
|
|
1442
1501
|
);
|
|
1443
1502
|
cmd2.addOption(
|
|
1444
|
-
new
|
|
1503
|
+
new Option10(
|
|
1445
1504
|
"--json",
|
|
1446
1505
|
"Show the version check as JSON without installing"
|
|
1447
1506
|
).implies({ check: true })
|