@scalar/cli 2.13.1 → 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 +46 -8
- package/chunks/{action-2BZ3AFBR.js → action-2BGAMGXU.js} +7 -6
- package/chunks/{action-27BJMHFD.js → action-2HPMP473.js} +4 -4
- package/chunks/{action-PBJFNJMY.js → action-3KP3WVPZ.js} +8 -7
- package/chunks/{action-5QDBZTBF.js → action-4HXB3YQR.js} +12 -11
- package/chunks/{action-3R3MVTP3.js → action-4HYLZRYW.js} +22 -21
- package/chunks/{action-WI6UW2AL.js → action-4MJXPSQU.js} +16 -15
- package/chunks/{action-JFNK5UCV.js → action-57SV3ZBM.js} +7 -6
- package/chunks/{action-FZZ2VLNA.js → action-6HFH7DAW.js} +7 -6
- package/chunks/{action-FR6UPGZP.js → action-APBLB3IU.js} +7 -6
- package/chunks/{action-5JTBIUPZ.js → action-APTGKF4W.js} +38 -36
- package/chunks/{action-CXQ3HLVC.js → action-BL5PWLFV.js} +21 -20
- package/chunks/{action-7HHTD65O.js → action-C7CNI7TP.js} +10 -10
- package/chunks/{action-VEXFHEQR.js → action-DJXZWPL7.js} +8 -7
- package/chunks/{action-F5LSDVJA.js → action-EPGLU5E3.js} +16 -15
- package/chunks/{action-WY4GOD2Y.js → action-EYOZ457H.js} +17 -16
- package/chunks/{action-XXIRB2F6.js → action-FLX3ESH7.js} +22 -21
- package/chunks/{action-JRPGHJGA.js → action-FOITEQNQ.js} +16 -15
- package/chunks/{action-5HWPNWVU.js → action-GOFCT7XK.js} +21 -20
- package/chunks/{action-KRXJWRCE.js → action-MJI3TI3W.js} +19 -18
- package/chunks/{action-PDOW5JS2.js → action-OP5DCAHN.js} +18 -16
- package/chunks/{action-W5VD63XO.js → action-P2QEJUBK.js} +11 -11
- package/chunks/{action-IUG6MPST.js → action-RRQNVUFW.js} +8 -8
- package/chunks/{action-3DBOUHKS.js → action-SCOJRZKD.js} +11 -10
- package/chunks/{action-ASBFLTOA.js → action-SRFBOLDL.js} +1 -1
- package/chunks/{action-W3AGGZ42.js → action-TR2T2UYB.js} +7 -6
- package/chunks/{action-3P66ZSL3.js → action-U2RJ3ZAU.js} +4 -4
- package/chunks/{action-RYLO75IN.js → action-VAJSWBMD.js} +14 -14
- package/chunks/{action-WEDLKGDY.js → action-VEP7LZPN.js} +4 -4
- package/chunks/{action-WQPMJZXL.js → action-VS22CPVB.js} +17 -16
- package/chunks/{action-GRAMP3QD.js → action-VW2POHCL.js} +15 -15
- package/chunks/{action-JEI24ZNE.js → action-VY3DRAO4.js} +11 -8
- package/chunks/{action-JCBTINNL.js → action-WOLNPEUQ.js} +10 -8
- package/chunks/{action-GLC54N3F.js → action-XA4MEYFP.js} +14 -14
- package/chunks/{action-GIKW67JB.js → action-Y4MKBDRC.js} +18 -17
- package/chunks/{action-EGF7LXVA.js → action-ZOU7EPX5.js} +19 -18
- package/chunks/{actions-I4HS6ASR.js → actions-PBYTDEMH.js} +16 -15
- package/chunks/{agent-E6PYTXAU.js → agent-NA3QFKJX.js} +7 -5
- package/chunks/{asyncapi-VQ7CCUCY.js → asyncapi-KCA6ZH3Q.js} +23 -18
- package/chunks/{build.action-LIAREWUF.js → build.action-54FHG7VL.js} +18 -17
- package/chunks/{chunk-JHJDLZSM.js → chunk-2KSOARE4.js} +2 -2
- package/chunks/{chunk-BDNCJLJP.js → chunk-2SBHCZPG.js} +1 -1
- package/chunks/{chunk-GARUDDWI.js → chunk-3CRO6NY4.js} +3 -1
- package/chunks/{chunk-UNV7BZD3.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-F3TQHNSQ.js → chunk-6BQHLHBE.js} +7 -3
- package/chunks/{chunk-P4EPNS46.js → chunk-7FS7BAUX.js} +3 -3
- package/chunks/{chunk-M4QTWCJ7.js → chunk-7PNOYE6B.js} +4 -1
- package/chunks/{chunk-KTI65ZVY.js → chunk-7ZDC34NA.js} +28 -8
- package/chunks/{chunk-QS2T7JAK.js → chunk-AAWPGVMG.js} +2 -2
- package/chunks/{chunk-APX65SRT.js → chunk-ADQ6B6QI.js} +1 -1
- package/chunks/{chunk-QRYMQPFT.js → chunk-BLY2CF4S.js} +3 -1
- package/chunks/{chunk-VRZSDUZK.js → chunk-BOCMOHQA.js} +8 -1
- package/chunks/chunk-BY4NGQ5D.js +15 -0
- package/chunks/{chunk-RZDLPTXV.js → chunk-DTZBE4ZX.js} +3 -3
- package/chunks/{chunk-2XWUFFEZ.js → chunk-E24BNP6E.js} +1 -1
- package/chunks/{chunk-RQNLEGMQ.js → chunk-EOTD7HAV.js} +1 -1
- package/chunks/{chunk-YTTDYTVB.js → chunk-F5Q7FJRG.js} +1 -1
- package/chunks/chunk-GO3TSREI.js +27 -0
- package/chunks/{chunk-6VAEDMCP.js → chunk-H5AMMMQ3.js} +77 -11
- 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-XFBCZL7J.js → chunk-KKHTS43A.js} +3 -3
- package/chunks/{chunk-R3NDJICA.js → chunk-KXMZXTLK.js} +1 -1
- package/chunks/{chunk-QUUBUPAW.js → chunk-KZSM2SUL.js} +4 -4
- package/chunks/{chunk-MQ65WBVF.js → chunk-PIDLENYN.js} +7192 -6436
- package/chunks/{chunk-PWFA23M2.js → chunk-PRW5TKYS.js} +1 -1
- package/chunks/{chunk-4YQVGOHX.js → chunk-QMERQSPM.js} +2 -2
- package/chunks/{chunk-HZ4UKLOE.js → chunk-QTMJ3VUZ.js} +2 -2
- package/chunks/{chunk-LUR7BA3W.js → chunk-RRYUCZYO.js} +2 -2
- package/chunks/{chunk-SNSJW2JT.js → chunk-S3U2VMVL.js} +2 -2
- package/chunks/{chunk-DWN6JOF2.js → chunk-UM3WZUGF.js} +4 -12
- package/chunks/{chunk-X62ZTOQF.js → chunk-USVU6AC2.js} +23 -5
- package/chunks/{chunk-SIPBGEVT.js → chunk-VJ7FHLN4.js} +2 -2
- package/chunks/{chunk-FXELV3AW.js → chunk-W7P6VTCG.js} +25 -2
- package/chunks/{chunk-IDWF5L45.js → chunk-WKMOUBQJ.js} +7884 -3730
- package/chunks/{chunk-NOD4CBF7.js → chunk-WZSU45SV.js} +1 -1
- package/chunks/{chunk-6YDIOXF7.js → chunk-WZUA7IAV.js} +2 -2
- package/chunks/{create.action-PZMCTYGS.js → create.action-NB3YYZ7K.js} +18 -17
- package/chunks/{delete.action-J57JIFG3.js → delete.action-5BT3TXVZ.js} +21 -17
- package/chunks/{delete.action-VDSTPSWG.js → delete.action-DWMQYW62.js} +21 -17
- package/chunks/diff.action-ENOOLRRB.js +324 -0
- package/chunks/{get.action-KUP32QJT.js → get.action-2ASGSZW3.js} +17 -16
- package/chunks/{get.action-ZOSML6XG.js → get.action-55JDC2MJ.js} +21 -27
- package/chunks/{list.action-VYENIC5L.js → list.action-6QBQFGVR.js} +17 -16
- package/chunks/{list.action-Q5MPDR42.js → list.action-NCG6Q6S2.js} +21 -20
- package/chunks/{publish.action-MBAZHQ2J.js → publish.action-4Y5EXBOY.js} +38 -36
- package/chunks/{update.action-IEXVMUKG.js → update.action-4V6MQMWG.js} +19 -18
- package/chunks/{update.action-BWMCXWQ5.js → update.action-6OE54B5O.js} +18 -17
- package/index.js +268 -206
- package/package.json +13 -12
- package/skills/scalar-cli/SKILL.md +3 -2
- package/template.md +45 -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-
|
|
6
|
-
import {
|
|
7
|
-
buildCliContext,
|
|
8
|
-
runnableCommands
|
|
9
|
-
} from "./chunks/chunk-APX65SRT.js";
|
|
5
|
+
} from "./chunks/chunk-PRW5TKYS.js";
|
|
10
6
|
import {
|
|
11
7
|
openBrowser
|
|
12
|
-
} from "./chunks/chunk-
|
|
8
|
+
} from "./chunks/chunk-HIDIW2FN.js";
|
|
13
9
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
BundleCommand,
|
|
18
|
-
parseFetchLimit,
|
|
19
|
-
parsePort
|
|
20
|
-
} from "./chunks/chunk-QRYMQPFT.js";
|
|
21
|
-
import {
|
|
22
|
-
completeFiles
|
|
23
|
-
} from "./chunks/chunk-DFOZG7ZV.js";
|
|
10
|
+
buildCliContext,
|
|
11
|
+
runnableCommands
|
|
12
|
+
} from "./chunks/chunk-ADQ6B6QI.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,37 +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
|
-
cmd3.option(
|
|
458
|
+
cmd3.option(
|
|
459
|
+
"--token <token>",
|
|
460
|
+
"Personal token for authentication (overrides SCALAR_API_KEY; must not be empty)"
|
|
461
|
+
);
|
|
400
462
|
cmd3.addOption(
|
|
401
|
-
new
|
|
463
|
+
new Option6(
|
|
402
464
|
"--email <email>",
|
|
403
465
|
"Email address (unsupported; use browser or token authentication)"
|
|
404
466
|
).hideHelp()
|
|
405
467
|
);
|
|
406
468
|
cmd3.addOption(
|
|
407
|
-
new
|
|
469
|
+
new Option6(
|
|
408
470
|
"--password <password>",
|
|
409
471
|
"Password (unsupported; use browser or token authentication)"
|
|
410
472
|
).hideHelp()
|
|
411
473
|
);
|
|
412
474
|
cmd3.action(async (...args) => {
|
|
413
|
-
const { loginAction } = await import("./chunks/action-
|
|
475
|
+
const { loginAction } = await import("./chunks/action-VY3DRAO4.js");
|
|
414
476
|
return loginAction(...args);
|
|
415
477
|
});
|
|
416
478
|
return cmd3;
|
|
417
479
|
};
|
|
418
480
|
|
|
419
481
|
// src/domains/auth/logout/index.ts
|
|
420
|
-
import { Command as
|
|
482
|
+
import { Command as Command17 } from "commander";
|
|
421
483
|
var LogoutCommand = () => {
|
|
422
|
-
const cmd3 = new
|
|
484
|
+
const cmd3 = new Command17("logout");
|
|
423
485
|
cmd3.description("Log out of Scalar");
|
|
424
486
|
cmd3.action(async () => {
|
|
425
487
|
await logout();
|
|
@@ -429,13 +491,13 @@ var LogoutCommand = () => {
|
|
|
429
491
|
};
|
|
430
492
|
|
|
431
493
|
// src/domains/auth/whoami/index.ts
|
|
432
|
-
import { Command as
|
|
494
|
+
import { Command as Command18 } from "commander";
|
|
433
495
|
var WhoAmICommand = () => {
|
|
434
|
-
const cmd3 = new
|
|
496
|
+
const cmd3 = new Command18("whoami");
|
|
435
497
|
cmd3.description("Show the logged-in user and current team");
|
|
436
498
|
cmd3.option("--json", "Output authentication details as JSON");
|
|
437
499
|
cmd3.action(async (options) => {
|
|
438
|
-
const { whoamiAction } = await import("./chunks/action-
|
|
500
|
+
const { whoamiAction } = await import("./chunks/action-VAJSWBMD.js");
|
|
439
501
|
return whoamiAction(options);
|
|
440
502
|
});
|
|
441
503
|
return cmd3;
|
|
@@ -443,19 +505,19 @@ var WhoAmICommand = () => {
|
|
|
443
505
|
|
|
444
506
|
// src/domains/auth/index.ts
|
|
445
507
|
var authCommands = [LoginCommand, WhoAmICommand, LogoutCommand];
|
|
446
|
-
var authDomain = new
|
|
508
|
+
var authDomain = new Command19("auth");
|
|
447
509
|
authDomain.description("Log in to Scalar and manage your session");
|
|
448
510
|
authCommands.forEach((command) => authDomain.addCommand(command()));
|
|
449
511
|
var auth_default = authDomain;
|
|
450
512
|
|
|
451
513
|
// src/domains/completion/index.ts
|
|
452
|
-
import { Argument, Command as
|
|
514
|
+
import { Argument, Command as Command20 } from "commander";
|
|
453
515
|
|
|
454
516
|
// src/helpers/completion/shells.ts
|
|
455
517
|
var COMPLETION_SHELLS = ["bash", "zsh", "fish"];
|
|
456
518
|
|
|
457
519
|
// src/domains/completion/index.ts
|
|
458
|
-
var createCompletionCommand = () => new
|
|
520
|
+
var createCompletionCommand = () => new Command20("completion").description("Generate shell completion definitions").addArgument(
|
|
459
521
|
new Argument("<shell>", "Shell to configure").choices([
|
|
460
522
|
...COMPLETION_SHELLS
|
|
461
523
|
])
|
|
@@ -463,7 +525,7 @@ var createCompletionCommand = () => new Command19("completion").description("Gen
|
|
|
463
525
|
const { renderCompletionScript } = await import("./chunks/scripts-6CI6U32J.js");
|
|
464
526
|
process.stdout.write(renderCompletionScript(shell));
|
|
465
527
|
});
|
|
466
|
-
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(
|
|
467
529
|
async (cursor, words, _options, command) => {
|
|
468
530
|
const { queryCompletion } = await import("./chunks/query-WKATAJJ6.js");
|
|
469
531
|
const index = Number(cursor);
|
|
@@ -482,24 +544,24 @@ ${result.candidates.map((candidate) => `${candidate}
|
|
|
482
544
|
);
|
|
483
545
|
|
|
484
546
|
// src/domains/context/index.ts
|
|
485
|
-
import { Command as
|
|
486
|
-
var cmd = new
|
|
547
|
+
import { Command as Command21 } from "commander";
|
|
548
|
+
var cmd = new Command21("context");
|
|
487
549
|
cmd.description(
|
|
488
550
|
"Print every command, argument, and option as JSON for AI agents"
|
|
489
551
|
);
|
|
490
552
|
cmd.action(async () => {
|
|
491
|
-
const { contextAction } = await import("./chunks/action-
|
|
553
|
+
const { contextAction } = await import("./chunks/action-SRFBOLDL.js");
|
|
492
554
|
return contextAction(cmd);
|
|
493
555
|
});
|
|
494
556
|
var context_default = cmd;
|
|
495
557
|
|
|
496
558
|
// src/domains/document/index.ts
|
|
497
|
-
import { Command as
|
|
559
|
+
import { Command as Command34 } from "commander";
|
|
498
560
|
|
|
499
561
|
// src/domains/document/join/index.ts
|
|
500
|
-
import { Command as
|
|
562
|
+
import { Command as Command22 } from "commander";
|
|
501
563
|
function JoinCommand() {
|
|
502
|
-
const cmd3 = new
|
|
564
|
+
const cmd3 = new Command22("join");
|
|
503
565
|
cmd3.description(
|
|
504
566
|
"Join API descriptions of the same format into one description"
|
|
505
567
|
);
|
|
@@ -514,16 +576,16 @@ function JoinCommand() {
|
|
|
514
576
|
);
|
|
515
577
|
completeFiles(cmd3, ["files"], ["--output"]);
|
|
516
578
|
cmd3.action(async (...args) => {
|
|
517
|
-
const { joinAction } = await import("./chunks/action-
|
|
579
|
+
const { joinAction } = await import("./chunks/action-4HXB3YQR.js");
|
|
518
580
|
return joinAction(...args);
|
|
519
581
|
});
|
|
520
582
|
return cmd3;
|
|
521
583
|
}
|
|
522
584
|
|
|
523
585
|
// src/domains/document/split/index.ts
|
|
524
|
-
import { Command as
|
|
586
|
+
import { Command as Command23 } from "commander";
|
|
525
587
|
function SplitCommand() {
|
|
526
|
-
const cmd3 = new
|
|
588
|
+
const cmd3 = new Command23("split");
|
|
527
589
|
cmd3.description(
|
|
528
590
|
"Split an OpenAPI or AsyncAPI description into referenced JSON files"
|
|
529
591
|
);
|
|
@@ -538,16 +600,16 @@ function SplitCommand() {
|
|
|
538
600
|
);
|
|
539
601
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
540
602
|
cmd3.action(async (...args) => {
|
|
541
|
-
const { splitAction } = await import("./chunks/action-
|
|
603
|
+
const { splitAction } = await import("./chunks/action-2BGAMGXU.js");
|
|
542
604
|
return splitAction(...args);
|
|
543
605
|
});
|
|
544
606
|
return cmd3;
|
|
545
607
|
}
|
|
546
608
|
|
|
547
609
|
// src/domains/document/format/index.ts
|
|
548
|
-
import { Command as
|
|
610
|
+
import { Command as Command24 } from "commander";
|
|
549
611
|
function FormatCommand() {
|
|
550
|
-
const cmd3 = new
|
|
612
|
+
const cmd3 = new Command24("format");
|
|
551
613
|
cmd3.description("Format an OpenAPI or AsyncAPI description");
|
|
552
614
|
cmd3.argument(
|
|
553
615
|
"[file|url]",
|
|
@@ -559,14 +621,14 @@ function FormatCommand() {
|
|
|
559
621
|
);
|
|
560
622
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
561
623
|
cmd3.action(async (...args) => {
|
|
562
|
-
const { formatAction } = await import("./chunks/action-
|
|
624
|
+
const { formatAction } = await import("./chunks/action-6HFH7DAW.js");
|
|
563
625
|
return formatAction(...args);
|
|
564
626
|
});
|
|
565
627
|
return cmd3;
|
|
566
628
|
}
|
|
567
629
|
|
|
568
630
|
// src/domains/document/lint/index.ts
|
|
569
|
-
import { Command as
|
|
631
|
+
import { Command as Command25, InvalidArgumentError as InvalidArgumentError2, Option as Option7 } from "commander";
|
|
570
632
|
|
|
571
633
|
// src/domains/document/lint/formats.ts
|
|
572
634
|
var reportFormats = [
|
|
@@ -581,19 +643,19 @@ var reportFormats = [
|
|
|
581
643
|
|
|
582
644
|
// src/domains/document/lint/index.ts
|
|
583
645
|
function LintCommand() {
|
|
584
|
-
const cmd3 = new
|
|
646
|
+
const cmd3 = new Command25("lint");
|
|
585
647
|
cmd3.description("Lint an OpenAPI or AsyncAPI description with Spectral rules");
|
|
586
648
|
cmd3.argument("[file|url]", "API description file path or URL to lint");
|
|
587
649
|
cmd3.option("-r, --rule <file|url>", "Spectral ruleset file path or URL");
|
|
588
650
|
cmd3.addOption(
|
|
589
|
-
new
|
|
651
|
+
new Option7("--format <format>", "Report format").choices([...reportFormats]).default("codeframe")
|
|
590
652
|
);
|
|
591
653
|
cmd3.option(
|
|
592
654
|
"--max-problems <number>",
|
|
593
655
|
"Maximum displayed findings (totals and exit status include all findings)",
|
|
594
656
|
(value) => {
|
|
595
657
|
if (!/^\d+$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
596
|
-
throw new
|
|
658
|
+
throw new InvalidArgumentError2("Expected a nonnegative integer");
|
|
597
659
|
return Number(value);
|
|
598
660
|
},
|
|
599
661
|
100
|
|
@@ -612,31 +674,31 @@ function LintCommand() {
|
|
|
612
674
|
);
|
|
613
675
|
completeFiles(cmd3, ["file|url"], ["--rule", "--output", "--ignore-file"]);
|
|
614
676
|
cmd3.action(async (...args) => {
|
|
615
|
-
const { lintAction } = await import("./chunks/action-
|
|
677
|
+
const { lintAction } = await import("./chunks/action-DJXZWPL7.js");
|
|
616
678
|
return lintAction(...args);
|
|
617
679
|
});
|
|
618
680
|
return cmd3;
|
|
619
681
|
}
|
|
620
682
|
|
|
621
683
|
// src/domains/document/markdown/index.ts
|
|
622
|
-
import { Command as
|
|
684
|
+
import { Command as Command26 } from "commander";
|
|
623
685
|
function MarkdownCommand() {
|
|
624
|
-
const cmd3 = new
|
|
686
|
+
const cmd3 = new Command26("markdown");
|
|
625
687
|
cmd3.description("Generate Markdown documentation from an OpenAPI description");
|
|
626
688
|
cmd3.argument("[file|url]", "OpenAPI file path or URL to convert");
|
|
627
689
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
628
690
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
629
691
|
cmd3.action(async (...args) => {
|
|
630
|
-
const { markdownAction } = await import("./chunks/action-
|
|
692
|
+
const { markdownAction } = await import("./chunks/action-57SV3ZBM.js");
|
|
631
693
|
return markdownAction(...args);
|
|
632
694
|
});
|
|
633
695
|
return cmd3;
|
|
634
696
|
}
|
|
635
697
|
|
|
636
698
|
// src/domains/document/mock/index.ts
|
|
637
|
-
import { Command as
|
|
699
|
+
import { Command as Command27 } from "commander";
|
|
638
700
|
function MockCommand() {
|
|
639
|
-
const cmd3 = new
|
|
701
|
+
const cmd3 = new Command27("mock");
|
|
640
702
|
cmd3.description(
|
|
641
703
|
"Run a Mock Server for OpenAPI operations or AsyncAPI WebSocket and SSE channels"
|
|
642
704
|
);
|
|
@@ -645,16 +707,16 @@ function MockCommand() {
|
|
|
645
707
|
cmd3.option("-p, --port <port>", "HTTP port for the Mock Server", parsePort);
|
|
646
708
|
completeFiles(cmd3, ["file|url"], []);
|
|
647
709
|
cmd3.action(async (...args) => {
|
|
648
|
-
const { mockAction } = await import("./chunks/action-
|
|
710
|
+
const { mockAction } = await import("./chunks/action-EYOZ457H.js");
|
|
649
711
|
await mockAction(...args);
|
|
650
712
|
});
|
|
651
713
|
return cmd3;
|
|
652
714
|
}
|
|
653
715
|
|
|
654
716
|
// src/domains/document/postman/index.ts
|
|
655
|
-
import { Command as
|
|
717
|
+
import { Command as Command28 } from "commander";
|
|
656
718
|
function ConvertCommand() {
|
|
657
|
-
const cmd3 = new
|
|
719
|
+
const cmd3 = new Command28("convert");
|
|
658
720
|
cmd3.description("Convert a Postman collection to an OpenAPI description");
|
|
659
721
|
cmd3.argument("[file|url]", "Postman collection file path or URL to convert");
|
|
660
722
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
@@ -664,16 +726,16 @@ function ConvertCommand() {
|
|
|
664
726
|
);
|
|
665
727
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
666
728
|
cmd3.action(async (...args) => {
|
|
667
|
-
const { convertAction } = await import("./chunks/action-
|
|
729
|
+
const { convertAction } = await import("./chunks/action-TR2T2UYB.js");
|
|
668
730
|
return convertAction(...args);
|
|
669
731
|
});
|
|
670
732
|
return cmd3;
|
|
671
733
|
}
|
|
672
734
|
|
|
673
735
|
// src/domains/document/serve/index.ts
|
|
674
|
-
import { Command as
|
|
736
|
+
import { Command as Command29 } from "commander";
|
|
675
737
|
function ServeCommand() {
|
|
676
|
-
const cmd3 = new
|
|
738
|
+
const cmd3 = new Command29("serve");
|
|
677
739
|
cmd3.description(
|
|
678
740
|
"Serve API Reference documentation from an OpenAPI or AsyncAPI description"
|
|
679
741
|
);
|
|
@@ -690,16 +752,16 @@ function ServeCommand() {
|
|
|
690
752
|
);
|
|
691
753
|
completeFiles(cmd3, ["file|url"], ["--config"]);
|
|
692
754
|
cmd3.action(async (...args) => {
|
|
693
|
-
const { serveAction } = await import("./chunks/action-
|
|
755
|
+
const { serveAction } = await import("./chunks/action-OP5DCAHN.js");
|
|
694
756
|
await serveAction(...args);
|
|
695
757
|
});
|
|
696
758
|
return cmd3;
|
|
697
759
|
}
|
|
698
760
|
|
|
699
761
|
// src/domains/document/share/index.ts
|
|
700
|
-
import { Command as
|
|
762
|
+
import { Command as Command30 } from "commander";
|
|
701
763
|
function ShareCommand() {
|
|
702
|
-
const cmd3 = new
|
|
764
|
+
const cmd3 = new Command30("share");
|
|
703
765
|
cmd3.description(
|
|
704
766
|
"Publish an OpenAPI or AsyncAPI description to a public sandbox"
|
|
705
767
|
);
|
|
@@ -710,16 +772,16 @@ function ShareCommand() {
|
|
|
710
772
|
);
|
|
711
773
|
completeFiles(cmd3, ["file"], []);
|
|
712
774
|
cmd3.action(async (...args) => {
|
|
713
|
-
const { shareAction } = await import("./chunks/action-
|
|
775
|
+
const { shareAction } = await import("./chunks/action-SCOJRZKD.js");
|
|
714
776
|
return shareAction(...args);
|
|
715
777
|
});
|
|
716
778
|
return cmd3;
|
|
717
779
|
}
|
|
718
780
|
|
|
719
781
|
// src/domains/document/upgrade/index.ts
|
|
720
|
-
import { Command as
|
|
782
|
+
import { Command as Command31 } from "commander";
|
|
721
783
|
function UpgradeCommand() {
|
|
722
|
-
const cmd3 = new
|
|
784
|
+
const cmd3 = new Command31("upgrade");
|
|
723
785
|
cmd3.description(
|
|
724
786
|
"Upgrade an API description to OpenAPI 3.1 or the latest supported AsyncAPI version"
|
|
725
787
|
);
|
|
@@ -730,30 +792,30 @@ function UpgradeCommand() {
|
|
|
730
792
|
);
|
|
731
793
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
732
794
|
cmd3.action(async (...args) => {
|
|
733
|
-
const { upgradeAction } = await import("./chunks/action-
|
|
795
|
+
const { upgradeAction } = await import("./chunks/action-WOLNPEUQ.js");
|
|
734
796
|
return upgradeAction(...args);
|
|
735
797
|
});
|
|
736
798
|
return cmd3;
|
|
737
799
|
}
|
|
738
800
|
|
|
739
801
|
// src/domains/document/validate/index.ts
|
|
740
|
-
import { Command as
|
|
802
|
+
import { Command as Command32 } from "commander";
|
|
741
803
|
function ValidateCommand() {
|
|
742
|
-
const cmd3 = new
|
|
804
|
+
const cmd3 = new Command32("validate");
|
|
743
805
|
cmd3.description("Validate an OpenAPI or AsyncAPI description");
|
|
744
806
|
cmd3.argument("[file|url]", "File or URL to validate");
|
|
745
807
|
completeFiles(cmd3, ["file|url"], []);
|
|
746
808
|
cmd3.action(async (...args) => {
|
|
747
|
-
const { validateAction } = await import("./chunks/action-
|
|
809
|
+
const { validateAction } = await import("./chunks/action-APBLB3IU.js");
|
|
748
810
|
return validateAction(...args);
|
|
749
811
|
});
|
|
750
812
|
return cmd3;
|
|
751
813
|
}
|
|
752
814
|
|
|
753
815
|
// src/domains/document/void/index.ts
|
|
754
|
-
import { Command as
|
|
816
|
+
import { Command as Command33 } from "commander";
|
|
755
817
|
function VoidCommand() {
|
|
756
|
-
const cmd3 = new
|
|
818
|
+
const cmd3 = new Command33("void");
|
|
757
819
|
cmd3.description("Mirror HTTP requests with a local server");
|
|
758
820
|
cmd3.option(
|
|
759
821
|
"-p, --port <port>",
|
|
@@ -783,18 +845,18 @@ var documentCommands = [
|
|
|
783
845
|
LintCommand,
|
|
784
846
|
UpgradeCommand
|
|
785
847
|
];
|
|
786
|
-
var documentDomain = new
|
|
848
|
+
var documentDomain = new Command34("document");
|
|
787
849
|
documentDomain.description("Work with OpenAPI and AsyncAPI descriptions");
|
|
788
850
|
documentCommands.forEach((command) => documentDomain.addCommand(command()));
|
|
789
851
|
var document_default = documentDomain;
|
|
790
852
|
|
|
791
853
|
// src/domains/project/index.ts
|
|
792
|
-
import { Command as
|
|
854
|
+
import { Command as Command47 } from "commander";
|
|
793
855
|
|
|
794
856
|
// src/domains/project/preview/index.ts
|
|
795
|
-
import { Command as
|
|
857
|
+
import { Command as Command35, Option as Option8 } from "commander";
|
|
796
858
|
var PreviewCommand = () => {
|
|
797
|
-
const cmd3 = new
|
|
859
|
+
const cmd3 = new Command35("preview");
|
|
798
860
|
cmd3.description("Preview a Scalar Docs project locally");
|
|
799
861
|
cmd3.argument(
|
|
800
862
|
"[config]",
|
|
@@ -807,21 +869,21 @@ var PreviewCommand = () => {
|
|
|
807
869
|
);
|
|
808
870
|
cmd3.option("-H, --host [host]", "Host address for the preview server");
|
|
809
871
|
cmd3.addOption(
|
|
810
|
-
new
|
|
872
|
+
new Option8("-L, --log-level <level>", "Set the log level").choices(["debug", "info"]).default("info")
|
|
811
873
|
);
|
|
812
874
|
cmd3.option("-N, --no-open", "Do not open the browser automatically", true);
|
|
813
875
|
completeFiles(cmd3, ["config"], []);
|
|
814
876
|
cmd3.action(async (...args) => {
|
|
815
|
-
const { previewAction } = await import("./chunks/action-
|
|
877
|
+
const { previewAction } = await import("./chunks/action-C7CNI7TP.js");
|
|
816
878
|
return previewAction(...args);
|
|
817
879
|
});
|
|
818
880
|
return cmd3;
|
|
819
881
|
};
|
|
820
882
|
|
|
821
883
|
// src/domains/project/check-config/index.ts
|
|
822
|
-
import { Command as
|
|
884
|
+
import { Command as Command36 } from "commander";
|
|
823
885
|
function CheckConfigCommand() {
|
|
824
|
-
const cmd3 = new
|
|
886
|
+
const cmd3 = new Command36("check-config");
|
|
825
887
|
cmd3.description("Validate a Scalar configuration file");
|
|
826
888
|
cmd3.argument(
|
|
827
889
|
"[file]",
|
|
@@ -829,53 +891,53 @@ function CheckConfigCommand() {
|
|
|
829
891
|
);
|
|
830
892
|
completeFiles(cmd3, ["file"], []);
|
|
831
893
|
cmd3.action(async (...args) => {
|
|
832
|
-
const { checkConfigAction } = await import("./chunks/action-
|
|
894
|
+
const { checkConfigAction } = await import("./chunks/action-U2RJ3ZAU.js");
|
|
833
895
|
return checkConfigAction(...args);
|
|
834
896
|
});
|
|
835
897
|
return cmd3;
|
|
836
898
|
}
|
|
837
899
|
|
|
838
900
|
// src/domains/project/create/index.ts
|
|
839
|
-
import { Command as
|
|
901
|
+
import { Command as Command37 } from "commander";
|
|
840
902
|
var CreateCommand = () => {
|
|
841
|
-
const cmd3 = new
|
|
903
|
+
const cmd3 = new Command37("create");
|
|
842
904
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
843
905
|
cmd3.description("Create a Scalar project without a linked GitHub repository");
|
|
844
906
|
cmd3.option("-n, --name <name>", "Project name");
|
|
845
907
|
cmd3.option("-s, --slug <slug>", "Project slug");
|
|
846
908
|
cmd3.action(async (...args) => {
|
|
847
|
-
const { createAction } = await import("./chunks/action-
|
|
909
|
+
const { createAction } = await import("./chunks/action-EPGLU5E3.js");
|
|
848
910
|
return createAction(...args);
|
|
849
911
|
});
|
|
850
912
|
return cmd3;
|
|
851
913
|
};
|
|
852
914
|
|
|
853
915
|
// src/domains/project/deployments/index.ts
|
|
854
|
-
import { Command as
|
|
916
|
+
import { Command as Command40 } from "commander";
|
|
855
917
|
|
|
856
918
|
// src/domains/project/deployments/get/index.ts
|
|
857
|
-
import { Command as
|
|
858
|
-
var GetCommand = () => new
|
|
919
|
+
import { Command as Command38 } from "commander";
|
|
920
|
+
var GetCommand = () => new Command38("get").description(
|
|
859
921
|
"Inspect an existing build in the selected team without resubmitting"
|
|
860
922
|
).argument("<build-id>", "Accepted build ID, including preview builds").option("--wait", "Wait for deployment instead of inspecting once").option(
|
|
861
923
|
"--timeout <seconds>",
|
|
862
924
|
"Maximum status wait in seconds (default: 30, or 600 with --wait)"
|
|
863
925
|
).action(
|
|
864
926
|
async (buildId, options) => {
|
|
865
|
-
const { getAction } = await import("./chunks/action-
|
|
927
|
+
const { getAction } = await import("./chunks/action-P2QEJUBK.js");
|
|
866
928
|
await getAction(buildId, options);
|
|
867
929
|
}
|
|
868
930
|
);
|
|
869
931
|
|
|
870
932
|
// src/domains/project/deployments/list/index.ts
|
|
871
|
-
import { Command as
|
|
933
|
+
import { Command as Command39 } from "commander";
|
|
872
934
|
var ListCommand = () => {
|
|
873
|
-
const cmd3 = new
|
|
935
|
+
const cmd3 = new Command39("list");
|
|
874
936
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
875
937
|
cmd3.description("List production deployments for a project");
|
|
876
938
|
cmd3.option("-s, --slug [slug]", "Project slug from scalar project list");
|
|
877
939
|
cmd3.action(async (...args) => {
|
|
878
|
-
const { listAction } = await import("./chunks/action-
|
|
940
|
+
const { listAction } = await import("./chunks/action-FLX3ESH7.js");
|
|
879
941
|
return listAction(...args);
|
|
880
942
|
});
|
|
881
943
|
return cmd3;
|
|
@@ -883,7 +945,7 @@ var ListCommand = () => {
|
|
|
883
945
|
|
|
884
946
|
// src/domains/project/deployments/index.ts
|
|
885
947
|
var DeploymentsCommand = () => {
|
|
886
|
-
const cmd3 = new
|
|
948
|
+
const cmd3 = new Command40("deployments");
|
|
887
949
|
cmd3.description("Show project deployment history");
|
|
888
950
|
cmd3.addCommand(ListCommand());
|
|
889
951
|
cmd3.addCommand(GetCommand());
|
|
@@ -891,12 +953,12 @@ var DeploymentsCommand = () => {
|
|
|
891
953
|
};
|
|
892
954
|
|
|
893
955
|
// src/domains/project/get/index.ts
|
|
894
|
-
import { Command as
|
|
956
|
+
import { Command as Command41 } from "commander";
|
|
895
957
|
function GetCommand2() {
|
|
896
|
-
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");
|
|
897
959
|
command.action(
|
|
898
960
|
async (slug, options) => {
|
|
899
|
-
const { getAction } = await import("./chunks/action-
|
|
961
|
+
const { getAction } = await import("./chunks/action-4MJXPSQU.js");
|
|
900
962
|
await getAction(slug, options);
|
|
901
963
|
}
|
|
902
964
|
);
|
|
@@ -904,9 +966,9 @@ function GetCommand2() {
|
|
|
904
966
|
}
|
|
905
967
|
|
|
906
968
|
// src/domains/project/init/index.ts
|
|
907
|
-
import { Command as
|
|
969
|
+
import { Command as Command42 } from "commander";
|
|
908
970
|
var InitCommand = () => {
|
|
909
|
-
const cmd3 = new
|
|
971
|
+
const cmd3 = new Command42("init");
|
|
910
972
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
911
973
|
cmd3.description("Initialize a local Scalar Docs project");
|
|
912
974
|
cmd3.option(
|
|
@@ -915,27 +977,27 @@ var InitCommand = () => {
|
|
|
915
977
|
);
|
|
916
978
|
cmd3.option("--force", "Overwrite existing configuration");
|
|
917
979
|
cmd3.action(async (...args) => {
|
|
918
|
-
const { initAction } = await import("./chunks/action-
|
|
980
|
+
const { initAction } = await import("./chunks/action-ZOU7EPX5.js");
|
|
919
981
|
return initAction(...args);
|
|
920
982
|
});
|
|
921
983
|
return cmd3;
|
|
922
984
|
};
|
|
923
985
|
|
|
924
986
|
// src/domains/project/list/index.ts
|
|
925
|
-
import { Command as
|
|
987
|
+
import { Command as Command43 } from "commander";
|
|
926
988
|
function ListCommand2() {
|
|
927
|
-
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");
|
|
928
990
|
command.action(async (options) => {
|
|
929
|
-
const { listAction } = await import("./chunks/action-
|
|
991
|
+
const { listAction } = await import("./chunks/action-MJI3TI3W.js");
|
|
930
992
|
await listAction(options);
|
|
931
993
|
});
|
|
932
994
|
return command;
|
|
933
995
|
}
|
|
934
996
|
|
|
935
997
|
// src/domains/project/publish/index.ts
|
|
936
|
-
import { Command as
|
|
998
|
+
import { Command as Command44 } from "commander";
|
|
937
999
|
var PublishCommand = () => {
|
|
938
|
-
const cmd3 = new
|
|
1000
|
+
const cmd3 = new Command44("publish");
|
|
939
1001
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
940
1002
|
cmd3.description("Publish a new build of a Scalar project");
|
|
941
1003
|
cmd3.option("-s, --slug [slug]", "Project slug from scalar project list");
|
|
@@ -961,16 +1023,16 @@ var PublishCommand = () => {
|
|
|
961
1023
|
);
|
|
962
1024
|
completeFiles(cmd3, [], ["--config"]);
|
|
963
1025
|
cmd3.action(async (...args) => {
|
|
964
|
-
const { publishAction } = await import("./chunks/action-
|
|
1026
|
+
const { publishAction } = await import("./chunks/action-4HYLZRYW.js");
|
|
965
1027
|
return publishAction(...args);
|
|
966
1028
|
});
|
|
967
1029
|
return cmd3;
|
|
968
1030
|
};
|
|
969
1031
|
|
|
970
1032
|
// src/domains/project/rollback/index.ts
|
|
971
|
-
import { Command as
|
|
1033
|
+
import { Command as Command45 } from "commander";
|
|
972
1034
|
var RollbackCommand = () => {
|
|
973
|
-
const cmd3 = new
|
|
1035
|
+
const cmd3 = new Command45("rollback");
|
|
974
1036
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
975
1037
|
cmd3.description(
|
|
976
1038
|
"Roll the live deployment back to a previously deployed build."
|
|
@@ -982,16 +1044,16 @@ var RollbackCommand = () => {
|
|
|
982
1044
|
);
|
|
983
1045
|
cmd3.option("-y, --yes", "Skip the confirmation prompt");
|
|
984
1046
|
cmd3.action(async (...args) => {
|
|
985
|
-
const { rollbackAction } = await import("./chunks/action-
|
|
1047
|
+
const { rollbackAction } = await import("./chunks/action-GOFCT7XK.js");
|
|
986
1048
|
return rollbackAction(...args);
|
|
987
1049
|
});
|
|
988
1050
|
return cmd3;
|
|
989
1051
|
};
|
|
990
1052
|
|
|
991
1053
|
// src/domains/project/upgrade/index.ts
|
|
992
|
-
import { Command as
|
|
1054
|
+
import { Command as Command46 } from "commander";
|
|
993
1055
|
var UpgradeCommand2 = () => {
|
|
994
|
-
const cmd3 = new
|
|
1056
|
+
const cmd3 = new Command46("upgrade");
|
|
995
1057
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
996
1058
|
cmd3.description("Upgrade a Scalar Docs configuration");
|
|
997
1059
|
cmd3.argument(
|
|
@@ -1000,7 +1062,7 @@ var UpgradeCommand2 = () => {
|
|
|
1000
1062
|
);
|
|
1001
1063
|
completeFiles(cmd3, ["config"], []);
|
|
1002
1064
|
cmd3.action(async (...args) => {
|
|
1003
|
-
const { upgradeAction } = await import("./chunks/action-
|
|
1065
|
+
const { upgradeAction } = await import("./chunks/action-2HPMP473.js");
|
|
1004
1066
|
return upgradeAction(...args);
|
|
1005
1067
|
});
|
|
1006
1068
|
return cmd3;
|
|
@@ -1019,7 +1081,7 @@ var projectCommands = [
|
|
|
1019
1081
|
DeploymentsCommand,
|
|
1020
1082
|
UpgradeCommand2
|
|
1021
1083
|
];
|
|
1022
|
-
var projectDomain = new
|
|
1084
|
+
var projectDomain = new Command47("project");
|
|
1023
1085
|
projectDomain.description("Manage Scalar Docs projects");
|
|
1024
1086
|
for (const command of projectCommands) {
|
|
1025
1087
|
projectDomain.addCommand(command());
|
|
@@ -1028,11 +1090,11 @@ projectDomain.addCommand(DownloadIsolateCommand(), { hidden: true });
|
|
|
1028
1090
|
var project_default = projectDomain;
|
|
1029
1091
|
|
|
1030
1092
|
// src/domains/readme/index.ts
|
|
1031
|
-
import { Command as
|
|
1093
|
+
import { Command as Command49 } from "commander";
|
|
1032
1094
|
|
|
1033
1095
|
// src/domains/readme/generate.ts
|
|
1034
1096
|
import as from "ansis";
|
|
1035
|
-
import { Command as
|
|
1097
|
+
import { Command as Command48 } from "commander";
|
|
1036
1098
|
|
|
1037
1099
|
// src/helpers/documentation/index.ts
|
|
1038
1100
|
import fs from "node:fs/promises";
|
|
@@ -1066,7 +1128,7 @@ var generateDocumentationFile = async (outputPath) => {
|
|
|
1066
1128
|
|
|
1067
1129
|
// src/domains/readme/generate.ts
|
|
1068
1130
|
function GenerateReadmeCommand() {
|
|
1069
|
-
const cmd3 = new
|
|
1131
|
+
const cmd3 = new Command48("generate");
|
|
1070
1132
|
cmd3.description("Generate the CLI README from the command tree");
|
|
1071
1133
|
cmd3.option(
|
|
1072
1134
|
"-o, --output [file]",
|
|
@@ -1118,18 +1180,18 @@ function ServeReadmeCommand(cmd3) {
|
|
|
1118
1180
|
}
|
|
1119
1181
|
|
|
1120
1182
|
// src/domains/readme/index.ts
|
|
1121
|
-
var readmeDomain = new
|
|
1183
|
+
var readmeDomain = new Command49("readme");
|
|
1122
1184
|
readmeDomain.addCommand(GenerateReadmeCommand());
|
|
1123
1185
|
ServeReadmeCommand(readmeDomain);
|
|
1124
1186
|
var readme_default = readmeDomain;
|
|
1125
1187
|
|
|
1126
1188
|
// src/domains/registry/index.ts
|
|
1127
|
-
import { Command as
|
|
1189
|
+
import { Command as Command55 } from "commander";
|
|
1128
1190
|
|
|
1129
1191
|
// src/domains/registry/publish/index.ts
|
|
1130
|
-
import { Command as
|
|
1192
|
+
import { Command as Command50 } from "commander";
|
|
1131
1193
|
var PublishCommand2 = () => {
|
|
1132
|
-
const cmd3 = new
|
|
1194
|
+
const cmd3 = new Command50("publish");
|
|
1133
1195
|
cmd3.option("--json", "Output the mutation result as JSON without prompting");
|
|
1134
1196
|
cmd3.description("Publish an OpenAPI description to the Scalar Registry");
|
|
1135
1197
|
cmd3.argument("[file]", "API description file path or URL to upload");
|
|
@@ -1165,31 +1227,31 @@ var PublishCommand2 = () => {
|
|
|
1165
1227
|
);
|
|
1166
1228
|
completeFiles(cmd3, ["file"], []);
|
|
1167
1229
|
cmd3.action(async (...args) => {
|
|
1168
|
-
const { publishAction } = await import("./chunks/action-
|
|
1230
|
+
const { publishAction } = await import("./chunks/action-APTGKF4W.js");
|
|
1169
1231
|
return publishAction(...args);
|
|
1170
1232
|
});
|
|
1171
1233
|
return cmd3;
|
|
1172
1234
|
};
|
|
1173
1235
|
|
|
1174
1236
|
// src/domains/registry/delete/index.ts
|
|
1175
|
-
import { Command as
|
|
1237
|
+
import { Command as Command51 } from "commander";
|
|
1176
1238
|
var DeleteCommand = () => {
|
|
1177
|
-
const cmd3 = new
|
|
1239
|
+
const cmd3 = new Command51("delete");
|
|
1178
1240
|
cmd3.option("--json", "Output the mutation result as JSON without prompting");
|
|
1179
1241
|
cmd3.description("Delete an API description from the Scalar Registry");
|
|
1180
1242
|
cmd3.argument("[namespace]", "Team namespace");
|
|
1181
1243
|
cmd3.argument("[slug]", "API description slug");
|
|
1182
1244
|
cmd3.action(async (...args) => {
|
|
1183
|
-
const { deleteAction } = await import("./chunks/action-
|
|
1245
|
+
const { deleteAction } = await import("./chunks/action-FOITEQNQ.js");
|
|
1184
1246
|
return deleteAction(...args);
|
|
1185
1247
|
});
|
|
1186
1248
|
return cmd3;
|
|
1187
1249
|
};
|
|
1188
1250
|
|
|
1189
1251
|
// src/domains/registry/get/index.ts
|
|
1190
|
-
import { Command as
|
|
1252
|
+
import { Command as Command52, Option as Option9 } from "commander";
|
|
1191
1253
|
var GetCommand3 = () => {
|
|
1192
|
-
const cmd3 = new
|
|
1254
|
+
const cmd3 = new Command52("get");
|
|
1193
1255
|
cmd3.description(
|
|
1194
1256
|
"Download an API description version from the Scalar Registry"
|
|
1195
1257
|
);
|
|
@@ -1200,35 +1262,35 @@ var GetCommand3 = () => {
|
|
|
1200
1262
|
"API description version (defaults to latest)"
|
|
1201
1263
|
);
|
|
1202
1264
|
cmd3.addOption(
|
|
1203
|
-
new
|
|
1265
|
+
new Option9("--format <format>", "Output format").choices([...DOCUMENT_FORMATS]).default("json")
|
|
1204
1266
|
);
|
|
1205
1267
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
1206
1268
|
completeFiles(cmd3, [], ["--output"]);
|
|
1207
1269
|
cmd3.action(async (...args) => {
|
|
1208
|
-
const { getAction } = await import("./chunks/action-
|
|
1270
|
+
const { getAction } = await import("./chunks/action-VW2POHCL.js");
|
|
1209
1271
|
return getAction(...args);
|
|
1210
1272
|
});
|
|
1211
1273
|
return cmd3;
|
|
1212
1274
|
};
|
|
1213
1275
|
|
|
1214
1276
|
// src/domains/registry/list/index.ts
|
|
1215
|
-
import { Command as
|
|
1277
|
+
import { Command as Command53 } from "commander";
|
|
1216
1278
|
var ListCommand3 = () => {
|
|
1217
|
-
const cmd3 = new
|
|
1279
|
+
const cmd3 = new Command53("list");
|
|
1218
1280
|
cmd3.description("List Scalar Registry API descriptions in a team namespace");
|
|
1219
1281
|
cmd3.option("--namespace <namespace>", "Team namespace");
|
|
1220
1282
|
cmd3.option("--json", "Output Scalar Registry API metadata as JSON");
|
|
1221
1283
|
cmd3.action(async (...args) => {
|
|
1222
|
-
const { listAction } = await import("./chunks/action-
|
|
1284
|
+
const { listAction } = await import("./chunks/action-BL5PWLFV.js");
|
|
1223
1285
|
return listAction(...args);
|
|
1224
1286
|
});
|
|
1225
1287
|
return cmd3;
|
|
1226
1288
|
};
|
|
1227
1289
|
|
|
1228
1290
|
// src/domains/registry/update/index.ts
|
|
1229
|
-
import { Command as
|
|
1291
|
+
import { Command as Command54 } from "commander";
|
|
1230
1292
|
var UpdateCommand = () => {
|
|
1231
|
-
const cmd3 = new
|
|
1293
|
+
const cmd3 = new Command54("update");
|
|
1232
1294
|
cmd3.option("--json", "Output the mutation result as JSON without prompting");
|
|
1233
1295
|
cmd3.description("Update API description metadata in the Scalar Registry");
|
|
1234
1296
|
cmd3.argument("[namespace]", "Team namespace");
|
|
@@ -1248,7 +1310,7 @@ var UpdateCommand = () => {
|
|
|
1248
1310
|
"\nOmitting visibility options leaves access unchanged.\nExample: scalar registry update acme my-api --private"
|
|
1249
1311
|
);
|
|
1250
1312
|
cmd3.action(async (...args) => {
|
|
1251
|
-
const { updateAction } = await import("./chunks/action-
|
|
1313
|
+
const { updateAction } = await import("./chunks/action-VS22CPVB.js");
|
|
1252
1314
|
return updateAction(...args);
|
|
1253
1315
|
});
|
|
1254
1316
|
return cmd3;
|
|
@@ -1262,49 +1324,49 @@ var registryCommands = [
|
|
|
1262
1324
|
ListCommand3,
|
|
1263
1325
|
GetCommand3
|
|
1264
1326
|
];
|
|
1265
|
-
var registryDomain = new
|
|
1327
|
+
var registryDomain = new Command55("registry");
|
|
1266
1328
|
registryDomain.description("Manage API descriptions in the Scalar Registry");
|
|
1267
1329
|
registryCommands.forEach((command) => registryDomain.addCommand(command()));
|
|
1268
1330
|
var registry_default = registryDomain;
|
|
1269
1331
|
|
|
1270
1332
|
// src/domains/team/index.ts
|
|
1271
|
-
import { Command as
|
|
1333
|
+
import { Command as Command59 } from "commander";
|
|
1272
1334
|
|
|
1273
1335
|
// src/domains/team/get/index.ts
|
|
1274
|
-
import { Command as
|
|
1336
|
+
import { Command as Command56 } from "commander";
|
|
1275
1337
|
var GetCommand4 = () => {
|
|
1276
|
-
const cmd3 = new
|
|
1338
|
+
const cmd3 = new Command56("get");
|
|
1277
1339
|
cmd3.description("Show the current team and its namespaces");
|
|
1278
1340
|
cmd3.option("--json", "Output the current team as JSON");
|
|
1279
1341
|
cmd3.action(async (...args) => {
|
|
1280
|
-
const { getAction } = await import("./chunks/action-
|
|
1342
|
+
const { getAction } = await import("./chunks/action-XA4MEYFP.js");
|
|
1281
1343
|
return getAction(...args);
|
|
1282
1344
|
});
|
|
1283
1345
|
return cmd3;
|
|
1284
1346
|
};
|
|
1285
1347
|
|
|
1286
1348
|
// src/domains/team/list/index.ts
|
|
1287
|
-
import { Command as
|
|
1349
|
+
import { Command as Command57 } from "commander";
|
|
1288
1350
|
var ListCommand4 = () => {
|
|
1289
|
-
const cmd3 = new
|
|
1351
|
+
const cmd3 = new Command57("list");
|
|
1290
1352
|
cmd3.description("List your Scalar teams");
|
|
1291
1353
|
cmd3.option("--json", "Output teams as JSON");
|
|
1292
1354
|
cmd3.action(async (...args) => {
|
|
1293
|
-
const { listAction } = await import("./chunks/action-
|
|
1355
|
+
const { listAction } = await import("./chunks/action-Y4MKBDRC.js");
|
|
1294
1356
|
return listAction(...args);
|
|
1295
1357
|
});
|
|
1296
1358
|
return cmd3;
|
|
1297
1359
|
};
|
|
1298
1360
|
|
|
1299
1361
|
// src/domains/team/set/index.ts
|
|
1300
|
-
import { Command as
|
|
1362
|
+
import { Command as Command58 } from "commander";
|
|
1301
1363
|
var SetCommand = () => {
|
|
1302
|
-
const cmd3 = new
|
|
1364
|
+
const cmd3 = new Command58("set");
|
|
1303
1365
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
1304
1366
|
cmd3.description("Select the current team");
|
|
1305
1367
|
cmd3.option("--team <team>", "Team ID");
|
|
1306
1368
|
cmd3.action(async (...args) => {
|
|
1307
|
-
const { setAction } = await import("./chunks/action-
|
|
1369
|
+
const { setAction } = await import("./chunks/action-RRQNVUFW.js");
|
|
1308
1370
|
return setAction(...args);
|
|
1309
1371
|
});
|
|
1310
1372
|
return cmd3;
|
|
@@ -1312,7 +1374,7 @@ var SetCommand = () => {
|
|
|
1312
1374
|
|
|
1313
1375
|
// src/domains/team/index.ts
|
|
1314
1376
|
var teamCommands = [ListCommand4, GetCommand4, SetCommand];
|
|
1315
|
-
var teamDomain = new
|
|
1377
|
+
var teamDomain = new Command59("team");
|
|
1316
1378
|
teamDomain.description("List and switch between your Scalar teams");
|
|
1317
1379
|
teamCommands.forEach((command) => {
|
|
1318
1380
|
teamDomain.addCommand(command());
|
|
@@ -1321,7 +1383,7 @@ var team_default = teamDomain;
|
|
|
1321
1383
|
|
|
1322
1384
|
// src/domains/upgrade/index.ts
|
|
1323
1385
|
import { execSync } from "node:child_process";
|
|
1324
|
-
import { Command as
|
|
1386
|
+
import { Command as Command60, Option as Option10 } from "commander";
|
|
1325
1387
|
|
|
1326
1388
|
// src/helpers/upgrade.ts
|
|
1327
1389
|
import semver from "semver";
|
|
@@ -1431,14 +1493,14 @@ function getUpgradeInstructions(portable, platform, arch, env, latestVersion) {
|
|
|
1431
1493
|
}
|
|
1432
1494
|
|
|
1433
1495
|
// src/domains/upgrade/index.ts
|
|
1434
|
-
var cmd2 = new
|
|
1496
|
+
var cmd2 = new Command60("upgrade");
|
|
1435
1497
|
cmd2.description("Upgrade the Scalar CLI to the latest version");
|
|
1436
1498
|
cmd2.option(
|
|
1437
1499
|
"--check",
|
|
1438
1500
|
"Show installed and available versions without installing"
|
|
1439
1501
|
);
|
|
1440
1502
|
cmd2.addOption(
|
|
1441
|
-
new
|
|
1503
|
+
new Option10(
|
|
1442
1504
|
"--json",
|
|
1443
1505
|
"Show the version check as JSON without installing"
|
|
1444
1506
|
).implies({ check: true })
|