@scalar/cli 2.13.2 → 2.15.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 +75 -9
- package/chunks/{action-MHBMWRU4.js → action-2BGAMGXU.js} +7 -6
- package/chunks/{action-KCJTUKNF.js → action-2HPMP473.js} +4 -4
- package/chunks/{action-6WWWTCCB.js → action-2UZWKMSJ.js} +14 -14
- package/chunks/{action-O4WDOJVV.js → action-3KP3WVPZ.js} +8 -7
- package/chunks/{action-D7D3YH2N.js → action-3QQSKGM3.js} +16 -15
- package/chunks/{action-RDG3SJ2G.js → action-3W4IC7QL.js} +17 -16
- package/chunks/{action-E7EK6TJJ.js → action-4HXB3YQR.js} +12 -11
- package/chunks/{action-4U36CMZG.js → action-57SV3ZBM.js} +7 -6
- package/chunks/{action-BIEKRF2X.js → action-6HFH7DAW.js} +7 -6
- package/chunks/{action-3OYAJ5F6.js → action-777R7LOG.js} +20 -18
- package/chunks/{action-YH3KB4NR.js → action-7LK4RUDP.js} +39 -36
- package/chunks/{action-ZSUVSURQ.js → action-APBLB3IU.js} +7 -6
- package/chunks/{action-JOKVK5PP.js → action-B2WWTOF6.js} +8 -8
- package/chunks/{action-VK6HFIZ5.js → action-ENDUKGWS.js} +16 -15
- package/chunks/{action-3QTDQRAO.js → action-G2WBTXOK.js} +18 -16
- package/chunks/{action-HGPGL624.js → action-HDT7EO7W.js} +18 -17
- package/chunks/{action-2LFAO27S.js → action-HOCCP353.js} +11 -10
- package/chunks/{action-BVORONSB.js → action-IU2AVNOW.js} +23 -21
- package/chunks/{action-Q7OD2QHZ.js → action-IUAYC2SC.js} +8 -7
- package/chunks/{action-ZYQEUYF7.js → action-JNH4DCZX.js} +4 -4
- package/chunks/{action-6LNC6MMJ.js → action-LD5B5QQ4.js} +26 -24
- package/chunks/{action-YXAOA3TJ.js → action-MBAAYXKK.js} +17 -16
- package/chunks/{action-WMOLIVXC.js → action-MJHLG7AE.js} +24 -22
- package/chunks/{action-AQCSAFDU.js → action-NZJ4Z64U.js} +16 -15
- package/chunks/{action-WJMC3TDN.js → action-P2RPH5R2.js} +7 -7
- package/chunks/{action-XZDNARAW.js → action-PDSSIW2A.js} +21 -20
- package/chunks/{action-MHJOOGII.js → action-PNSWHIHC.js} +10 -10
- package/chunks/{action-4DEIYLOW.js → action-QJMRAFOF.js} +16 -15
- package/chunks/{action-S7NCRXKS.js → action-T7SD3ETN.js} +19 -18
- package/chunks/{action-IN7SNSSI.js → action-TR2T2UYB.js} +7 -6
- package/chunks/{action-V2B42324.js → action-TY4BZEMN.js} +14 -14
- package/chunks/{action-NY2R6VH2.js → action-U2RJ3ZAU.js} +4 -4
- package/chunks/{action-FIKVZPFG.js → action-WOLNPEUQ.js} +10 -8
- package/chunks/{action-LKMBK3MO.js → action-ZTLOQZTT.js} +12 -11
- package/chunks/actions-D5OHPBWC.js +327 -0
- package/chunks/{actions-K2RSZCU4.js → actions-RI42JY6H.js} +37 -15
- package/chunks/{agent-YNVT6RJ6.js → agent-NA3QFKJX.js} +5 -5
- package/chunks/{asyncapi-XLHXPF2X.js → asyncapi-YBTWMTW6.js} +23 -18
- package/chunks/{build.action-TAMUO3F2.js → build.action-4YDNDBXC.js} +18 -17
- package/chunks/{chunk-ORHGCCJR.js → chunk-2KSOARE4.js} +2 -2
- package/chunks/{chunk-KAKAN5X3.js → chunk-42MIV6WF.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-7FGJIUDN.js +27 -0
- package/chunks/{chunk-NEB25B57.js → chunk-7FS7BAUX.js} +3 -3
- package/chunks/{chunk-JA7EIRUB.js → chunk-7PNOYE6B.js} +1 -1
- package/chunks/{chunk-KVK4LNTB.js → chunk-ANP5XF26.js} +8108 -3716
- package/chunks/{chunk-MQNTUZ2B.js → chunk-BLY2CF4S.js} +3 -1
- package/chunks/{chunk-I2JLVALT.js → chunk-BMQFEKHA.js} +120 -15
- package/chunks/{chunk-4T5XUXTP.js → chunk-BOCMOHQA.js} +3 -1
- package/chunks/chunk-BY4NGQ5D.js +15 -0
- package/chunks/{chunk-RQOKASNF.js → chunk-DLYMDGFW.js} +2 -2
- package/chunks/{chunk-VMRXSVEE.js → chunk-DWJMPHLY.js} +3 -1
- package/chunks/{chunk-2XWUFFEZ.js → chunk-E24BNP6E.js} +1 -1
- package/chunks/{chunk-NDCXYF5Q.js → chunk-EOTD7HAV.js} +1 -1
- package/chunks/{chunk-TWTUSPPI.js → chunk-ERZ3HYB5.js} +2 -96
- package/chunks/{chunk-66POUWQA.js → chunk-G5WWW7VD.js} +3 -3
- package/chunks/{chunk-AP2O742I.js → chunk-GOKHFNB2.js} +2 -2
- 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-XG6WXQFN.js → chunk-IPWJEGPD.js} +2 -2
- package/chunks/{chunk-UPYLTC2Z.js → chunk-KOLEQNLG.js} +1 -1
- package/chunks/{chunk-QHR5X4FO.js → chunk-MGGMCT77.js} +1 -1
- package/chunks/{chunk-ZO7KDO3C.js → chunk-PIDLENYN.js} +7192 -6436
- package/chunks/{chunk-3CZG44E4.js → chunk-QMERQSPM.js} +2 -2
- package/chunks/{chunk-JQJSNCGD.js → chunk-QXOUDBFK.js} +4 -4
- package/chunks/{chunk-KYJLZCM3.js → chunk-RRYUCZYO.js} +2 -2
- package/chunks/{chunk-7UKLAB2Q.js → chunk-SHRUJFQI.js} +30 -8
- package/chunks/{chunk-Z2NUKRKG.js → chunk-T76K7QNX.js} +3 -3
- package/chunks/{chunk-OBJCYCIV.js → chunk-TR5U7G7T.js} +2 -1
- package/chunks/{chunk-UXCQFVXG.js → chunk-TW2UASEW.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-VBHPHAGS.js +114 -0
- package/chunks/{chunk-3MKTCEUX.js → chunk-W7P6VTCG.js} +25 -2
- package/chunks/{chunk-DDTGQKVB.js → chunk-Y6GKZ2FM.js} +1 -1
- package/chunks/{chunk-PFP35UAF.js → chunk-Z6HOHGUJ.js} +18 -1
- package/chunks/{create.action-UX5TVHST.js → create.action-52K3XAYN.js} +18 -17
- package/chunks/{delete.action-UMVF2N4A.js → delete.action-3NMOQPIR.js} +18 -17
- package/chunks/{delete.action-C3ZGIXJX.js → delete.action-47LPLTOX.js} +18 -17
- package/chunks/diff.action-5TLC2EHT.js +325 -0
- package/chunks/{get.action-KFLT4UUT.js → get.action-BCMLG7C7.js} +22 -27
- package/chunks/{get.action-KIEUFN4D.js → get.action-TOZ474GO.js} +17 -16
- package/chunks/{list.action-QK5DK5X3.js → list.action-6ZWEENT6.js} +21 -20
- package/chunks/{list.action-F3M4XJFC.js → list.action-CMAA5KTY.js} +17 -16
- package/chunks/{publish.action-GZ2TSAPE.js → publish.action-U3VIU5LZ.js} +39 -36
- package/chunks/{update.action-OTRO76PF.js → update.action-QZOP25ME.js} +18 -17
- package/chunks/{update.action-DNINDNBT.js → update.action-UQHZYVTP.js} +19 -18
- package/index.js +339 -219
- package/package.json +13 -12
- package/skills/scalar-cli/SKILL.md +9 -1
- package/template.md +72 -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-Y6GKZ2FM.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-42MIV6WF.js";
|
|
34
|
+
import "./chunks/chunk-TR5U7G7T.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-DWJMPHLY.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-47LPLTOX.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-5TLC2EHT.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-BCMLG7C7.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-6ZWEENT6.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-U3VIU5LZ.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-UQHZYVTP.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-4YDNDBXC.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-52K3XAYN.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-3NMOQPIR.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-QZOP25ME.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-TOZ474GO.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-CMAA5KTY.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,94 +394,109 @@ 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";
|
|
398
|
+
function createAllowlistCommand(field, descriptions) {
|
|
399
|
+
const command = new Command15(field).description(descriptions.description);
|
|
400
|
+
for (const operation of ["add", "remove"]) {
|
|
401
|
+
command.command(operation).description(descriptions[`${operation}Description`]).argument("<slug>", "Access group slug").argument(`<${field}>`, descriptions.valueDescription).option("--json", "Print the result as JSON").action(
|
|
402
|
+
async (slug, value, options) => {
|
|
403
|
+
const { runAction } = await import("./chunks/actions-RI42JY6H.js");
|
|
404
|
+
await runAction({
|
|
405
|
+
operation: `${operation}-${field}`,
|
|
406
|
+
slug,
|
|
407
|
+
[field]: value,
|
|
408
|
+
...options
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
);
|
|
412
|
+
}
|
|
413
|
+
return command;
|
|
414
|
+
}
|
|
339
415
|
function createAccessGroupCommand() {
|
|
340
|
-
const command = new
|
|
341
|
-
"Manage access groups
|
|
416
|
+
const command = new Command15("access-group").description(
|
|
417
|
+
"Manage access groups, allowed emails and domains for the current team"
|
|
342
418
|
);
|
|
343
419
|
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-
|
|
420
|
+
const { runAction } = await import("./chunks/actions-RI42JY6H.js");
|
|
345
421
|
await runAction({ operation: "list", ...options });
|
|
346
422
|
});
|
|
347
423
|
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
424
|
async (slug, options) => {
|
|
349
|
-
const { runAction } = await import("./chunks/actions-
|
|
425
|
+
const { runAction } = await import("./chunks/actions-RI42JY6H.js");
|
|
350
426
|
await runAction({ operation: "create", slug, ...options });
|
|
351
427
|
}
|
|
352
428
|
);
|
|
353
429
|
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-
|
|
430
|
+
const { runAction } = await import("./chunks/actions-RI42JY6H.js");
|
|
355
431
|
await runAction({ operation: "get", slug, ...options });
|
|
356
432
|
});
|
|
357
433
|
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
434
|
async (slug, options) => {
|
|
359
|
-
const { runAction } = await import("./chunks/actions-
|
|
435
|
+
const { runAction } = await import("./chunks/actions-RI42JY6H.js");
|
|
360
436
|
await runAction({ operation: "update", slug, ...options });
|
|
361
437
|
}
|
|
362
438
|
);
|
|
363
439
|
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
440
|
async (slug, options) => {
|
|
365
|
-
const { runAction } = await import("./chunks/actions-
|
|
441
|
+
const { runAction } = await import("./chunks/actions-RI42JY6H.js");
|
|
366
442
|
await runAction({ operation: "delete", slug, ...options });
|
|
367
443
|
}
|
|
368
444
|
);
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
});
|
|
385
|
-
}
|
|
445
|
+
command.addCommand(
|
|
446
|
+
createAllowlistCommand("domain", {
|
|
447
|
+
description: "Manage allowed email domains",
|
|
448
|
+
valueDescription: "Email domain, such as example.com",
|
|
449
|
+
addDescription: "Add an exact email domain to an access group",
|
|
450
|
+
removeDescription: "Remove an exact email domain from an access group"
|
|
451
|
+
})
|
|
452
|
+
);
|
|
453
|
+
command.addCommand(
|
|
454
|
+
createAllowlistCommand("email", {
|
|
455
|
+
description: "Manage allowed emails",
|
|
456
|
+
valueDescription: "Email address, such as alex@example.com",
|
|
457
|
+
addDescription: "Add an email address to an access group",
|
|
458
|
+
removeDescription: "Remove an email address from an access group"
|
|
459
|
+
})
|
|
386
460
|
);
|
|
387
461
|
return command;
|
|
388
462
|
}
|
|
389
463
|
var access_group_default = createAccessGroupCommand();
|
|
390
464
|
|
|
391
465
|
// src/domains/auth/index.ts
|
|
392
|
-
import { Command as
|
|
466
|
+
import { Command as Command19 } from "commander";
|
|
393
467
|
|
|
394
468
|
// src/domains/auth/login/index.ts
|
|
395
|
-
import { Command as
|
|
469
|
+
import { Command as Command16, Option as Option6 } from "commander";
|
|
396
470
|
var LoginCommand = () => {
|
|
397
|
-
const cmd3 = new
|
|
471
|
+
const cmd3 = new Command16("login");
|
|
398
472
|
cmd3.description("Log in to Scalar");
|
|
399
473
|
cmd3.option(
|
|
400
474
|
"--token <token>",
|
|
401
475
|
"Personal token for authentication (overrides SCALAR_API_KEY; must not be empty)"
|
|
402
476
|
);
|
|
403
477
|
cmd3.addOption(
|
|
404
|
-
new
|
|
478
|
+
new Option6(
|
|
405
479
|
"--email <email>",
|
|
406
480
|
"Email address (unsupported; use browser or token authentication)"
|
|
407
481
|
).hideHelp()
|
|
408
482
|
);
|
|
409
483
|
cmd3.addOption(
|
|
410
|
-
new
|
|
484
|
+
new Option6(
|
|
411
485
|
"--password <password>",
|
|
412
486
|
"Password (unsupported; use browser or token authentication)"
|
|
413
487
|
).hideHelp()
|
|
414
488
|
);
|
|
415
489
|
cmd3.action(async (...args) => {
|
|
416
|
-
const { loginAction } = await import("./chunks/action-
|
|
490
|
+
const { loginAction } = await import("./chunks/action-P2RPH5R2.js");
|
|
417
491
|
return loginAction(...args);
|
|
418
492
|
});
|
|
419
493
|
return cmd3;
|
|
420
494
|
};
|
|
421
495
|
|
|
422
496
|
// src/domains/auth/logout/index.ts
|
|
423
|
-
import { Command as
|
|
497
|
+
import { Command as Command17 } from "commander";
|
|
424
498
|
var LogoutCommand = () => {
|
|
425
|
-
const cmd3 = new
|
|
499
|
+
const cmd3 = new Command17("logout");
|
|
426
500
|
cmd3.description("Log out of Scalar");
|
|
427
501
|
cmd3.action(async () => {
|
|
428
502
|
await logout();
|
|
@@ -432,13 +506,13 @@ var LogoutCommand = () => {
|
|
|
432
506
|
};
|
|
433
507
|
|
|
434
508
|
// src/domains/auth/whoami/index.ts
|
|
435
|
-
import { Command as
|
|
509
|
+
import { Command as Command18 } from "commander";
|
|
436
510
|
var WhoAmICommand = () => {
|
|
437
|
-
const cmd3 = new
|
|
511
|
+
const cmd3 = new Command18("whoami");
|
|
438
512
|
cmd3.description("Show the logged-in user and current team");
|
|
439
513
|
cmd3.option("--json", "Output authentication details as JSON");
|
|
440
514
|
cmd3.action(async (options) => {
|
|
441
|
-
const { whoamiAction } = await import("./chunks/action-
|
|
515
|
+
const { whoamiAction } = await import("./chunks/action-TY4BZEMN.js");
|
|
442
516
|
return whoamiAction(options);
|
|
443
517
|
});
|
|
444
518
|
return cmd3;
|
|
@@ -446,19 +520,19 @@ var WhoAmICommand = () => {
|
|
|
446
520
|
|
|
447
521
|
// src/domains/auth/index.ts
|
|
448
522
|
var authCommands = [LoginCommand, WhoAmICommand, LogoutCommand];
|
|
449
|
-
var authDomain = new
|
|
523
|
+
var authDomain = new Command19("auth");
|
|
450
524
|
authDomain.description("Log in to Scalar and manage your session");
|
|
451
525
|
authCommands.forEach((command) => authDomain.addCommand(command()));
|
|
452
526
|
var auth_default = authDomain;
|
|
453
527
|
|
|
454
528
|
// src/domains/completion/index.ts
|
|
455
|
-
import { Argument, Command as
|
|
529
|
+
import { Argument, Command as Command20 } from "commander";
|
|
456
530
|
|
|
457
531
|
// src/helpers/completion/shells.ts
|
|
458
532
|
var COMPLETION_SHELLS = ["bash", "zsh", "fish"];
|
|
459
533
|
|
|
460
534
|
// src/domains/completion/index.ts
|
|
461
|
-
var createCompletionCommand = () => new
|
|
535
|
+
var createCompletionCommand = () => new Command20("completion").description("Generate shell completion definitions").addArgument(
|
|
462
536
|
new Argument("<shell>", "Shell to configure").choices([
|
|
463
537
|
...COMPLETION_SHELLS
|
|
464
538
|
])
|
|
@@ -466,7 +540,7 @@ var createCompletionCommand = () => new Command19("completion").description("Gen
|
|
|
466
540
|
const { renderCompletionScript } = await import("./chunks/scripts-6CI6U32J.js");
|
|
467
541
|
process.stdout.write(renderCompletionScript(shell));
|
|
468
542
|
});
|
|
469
|
-
var createCompletionQueryCommand = () => new
|
|
543
|
+
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
544
|
async (cursor, words, _options, command) => {
|
|
471
545
|
const { queryCompletion } = await import("./chunks/query-WKATAJJ6.js");
|
|
472
546
|
const index = Number(cursor);
|
|
@@ -485,8 +559,8 @@ ${result.candidates.map((candidate) => `${candidate}
|
|
|
485
559
|
);
|
|
486
560
|
|
|
487
561
|
// src/domains/context/index.ts
|
|
488
|
-
import { Command as
|
|
489
|
-
var cmd = new
|
|
562
|
+
import { Command as Command21 } from "commander";
|
|
563
|
+
var cmd = new Command21("context");
|
|
490
564
|
cmd.description(
|
|
491
565
|
"Print every command, argument, and option as JSON for AI agents"
|
|
492
566
|
);
|
|
@@ -497,12 +571,12 @@ cmd.action(async () => {
|
|
|
497
571
|
var context_default = cmd;
|
|
498
572
|
|
|
499
573
|
// src/domains/document/index.ts
|
|
500
|
-
import { Command as
|
|
574
|
+
import { Command as Command34 } from "commander";
|
|
501
575
|
|
|
502
576
|
// src/domains/document/join/index.ts
|
|
503
|
-
import { Command as
|
|
577
|
+
import { Command as Command22 } from "commander";
|
|
504
578
|
function JoinCommand() {
|
|
505
|
-
const cmd3 = new
|
|
579
|
+
const cmd3 = new Command22("join");
|
|
506
580
|
cmd3.description(
|
|
507
581
|
"Join API descriptions of the same format into one description"
|
|
508
582
|
);
|
|
@@ -517,16 +591,16 @@ function JoinCommand() {
|
|
|
517
591
|
);
|
|
518
592
|
completeFiles(cmd3, ["files"], ["--output"]);
|
|
519
593
|
cmd3.action(async (...args) => {
|
|
520
|
-
const { joinAction } = await import("./chunks/action-
|
|
594
|
+
const { joinAction } = await import("./chunks/action-4HXB3YQR.js");
|
|
521
595
|
return joinAction(...args);
|
|
522
596
|
});
|
|
523
597
|
return cmd3;
|
|
524
598
|
}
|
|
525
599
|
|
|
526
600
|
// src/domains/document/split/index.ts
|
|
527
|
-
import { Command as
|
|
601
|
+
import { Command as Command23 } from "commander";
|
|
528
602
|
function SplitCommand() {
|
|
529
|
-
const cmd3 = new
|
|
603
|
+
const cmd3 = new Command23("split");
|
|
530
604
|
cmd3.description(
|
|
531
605
|
"Split an OpenAPI or AsyncAPI description into referenced JSON files"
|
|
532
606
|
);
|
|
@@ -541,16 +615,16 @@ function SplitCommand() {
|
|
|
541
615
|
);
|
|
542
616
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
543
617
|
cmd3.action(async (...args) => {
|
|
544
|
-
const { splitAction } = await import("./chunks/action-
|
|
618
|
+
const { splitAction } = await import("./chunks/action-2BGAMGXU.js");
|
|
545
619
|
return splitAction(...args);
|
|
546
620
|
});
|
|
547
621
|
return cmd3;
|
|
548
622
|
}
|
|
549
623
|
|
|
550
624
|
// src/domains/document/format/index.ts
|
|
551
|
-
import { Command as
|
|
625
|
+
import { Command as Command24 } from "commander";
|
|
552
626
|
function FormatCommand() {
|
|
553
|
-
const cmd3 = new
|
|
627
|
+
const cmd3 = new Command24("format");
|
|
554
628
|
cmd3.description("Format an OpenAPI or AsyncAPI description");
|
|
555
629
|
cmd3.argument(
|
|
556
630
|
"[file|url]",
|
|
@@ -562,14 +636,14 @@ function FormatCommand() {
|
|
|
562
636
|
);
|
|
563
637
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
564
638
|
cmd3.action(async (...args) => {
|
|
565
|
-
const { formatAction } = await import("./chunks/action-
|
|
639
|
+
const { formatAction } = await import("./chunks/action-6HFH7DAW.js");
|
|
566
640
|
return formatAction(...args);
|
|
567
641
|
});
|
|
568
642
|
return cmd3;
|
|
569
643
|
}
|
|
570
644
|
|
|
571
645
|
// src/domains/document/lint/index.ts
|
|
572
|
-
import { Command as
|
|
646
|
+
import { Command as Command25, InvalidArgumentError as InvalidArgumentError2, Option as Option7 } from "commander";
|
|
573
647
|
|
|
574
648
|
// src/domains/document/lint/formats.ts
|
|
575
649
|
var reportFormats = [
|
|
@@ -584,19 +658,19 @@ var reportFormats = [
|
|
|
584
658
|
|
|
585
659
|
// src/domains/document/lint/index.ts
|
|
586
660
|
function LintCommand() {
|
|
587
|
-
const cmd3 = new
|
|
661
|
+
const cmd3 = new Command25("lint");
|
|
588
662
|
cmd3.description("Lint an OpenAPI or AsyncAPI description with Spectral rules");
|
|
589
663
|
cmd3.argument("[file|url]", "API description file path or URL to lint");
|
|
590
664
|
cmd3.option("-r, --rule <file|url>", "Spectral ruleset file path or URL");
|
|
591
665
|
cmd3.addOption(
|
|
592
|
-
new
|
|
666
|
+
new Option7("--format <format>", "Report format").choices([...reportFormats]).default("codeframe")
|
|
593
667
|
);
|
|
594
668
|
cmd3.option(
|
|
595
669
|
"--max-problems <number>",
|
|
596
670
|
"Maximum displayed findings (totals and exit status include all findings)",
|
|
597
671
|
(value) => {
|
|
598
672
|
if (!/^\d+$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
599
|
-
throw new
|
|
673
|
+
throw new InvalidArgumentError2("Expected a nonnegative integer");
|
|
600
674
|
return Number(value);
|
|
601
675
|
},
|
|
602
676
|
100
|
|
@@ -615,31 +689,31 @@ function LintCommand() {
|
|
|
615
689
|
);
|
|
616
690
|
completeFiles(cmd3, ["file|url"], ["--rule", "--output", "--ignore-file"]);
|
|
617
691
|
cmd3.action(async (...args) => {
|
|
618
|
-
const { lintAction } = await import("./chunks/action-
|
|
692
|
+
const { lintAction } = await import("./chunks/action-IUAYC2SC.js");
|
|
619
693
|
return lintAction(...args);
|
|
620
694
|
});
|
|
621
695
|
return cmd3;
|
|
622
696
|
}
|
|
623
697
|
|
|
624
698
|
// src/domains/document/markdown/index.ts
|
|
625
|
-
import { Command as
|
|
699
|
+
import { Command as Command26 } from "commander";
|
|
626
700
|
function MarkdownCommand() {
|
|
627
|
-
const cmd3 = new
|
|
701
|
+
const cmd3 = new Command26("markdown");
|
|
628
702
|
cmd3.description("Generate Markdown documentation from an OpenAPI description");
|
|
629
703
|
cmd3.argument("[file|url]", "OpenAPI file path or URL to convert");
|
|
630
704
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
631
705
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
632
706
|
cmd3.action(async (...args) => {
|
|
633
|
-
const { markdownAction } = await import("./chunks/action-
|
|
707
|
+
const { markdownAction } = await import("./chunks/action-57SV3ZBM.js");
|
|
634
708
|
return markdownAction(...args);
|
|
635
709
|
});
|
|
636
710
|
return cmd3;
|
|
637
711
|
}
|
|
638
712
|
|
|
639
713
|
// src/domains/document/mock/index.ts
|
|
640
|
-
import { Command as
|
|
714
|
+
import { Command as Command27 } from "commander";
|
|
641
715
|
function MockCommand() {
|
|
642
|
-
const cmd3 = new
|
|
716
|
+
const cmd3 = new Command27("mock");
|
|
643
717
|
cmd3.description(
|
|
644
718
|
"Run a Mock Server for OpenAPI operations or AsyncAPI WebSocket and SSE channels"
|
|
645
719
|
);
|
|
@@ -648,16 +722,16 @@ function MockCommand() {
|
|
|
648
722
|
cmd3.option("-p, --port <port>", "HTTP port for the Mock Server", parsePort);
|
|
649
723
|
completeFiles(cmd3, ["file|url"], []);
|
|
650
724
|
cmd3.action(async (...args) => {
|
|
651
|
-
const { mockAction } = await import("./chunks/action-
|
|
725
|
+
const { mockAction } = await import("./chunks/action-MBAAYXKK.js");
|
|
652
726
|
await mockAction(...args);
|
|
653
727
|
});
|
|
654
728
|
return cmd3;
|
|
655
729
|
}
|
|
656
730
|
|
|
657
731
|
// src/domains/document/postman/index.ts
|
|
658
|
-
import { Command as
|
|
732
|
+
import { Command as Command28 } from "commander";
|
|
659
733
|
function ConvertCommand() {
|
|
660
|
-
const cmd3 = new
|
|
734
|
+
const cmd3 = new Command28("convert");
|
|
661
735
|
cmd3.description("Convert a Postman collection to an OpenAPI description");
|
|
662
736
|
cmd3.argument("[file|url]", "Postman collection file path or URL to convert");
|
|
663
737
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
@@ -667,16 +741,16 @@ function ConvertCommand() {
|
|
|
667
741
|
);
|
|
668
742
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
669
743
|
cmd3.action(async (...args) => {
|
|
670
|
-
const { convertAction } = await import("./chunks/action-
|
|
744
|
+
const { convertAction } = await import("./chunks/action-TR2T2UYB.js");
|
|
671
745
|
return convertAction(...args);
|
|
672
746
|
});
|
|
673
747
|
return cmd3;
|
|
674
748
|
}
|
|
675
749
|
|
|
676
750
|
// src/domains/document/serve/index.ts
|
|
677
|
-
import { Command as
|
|
751
|
+
import { Command as Command29 } from "commander";
|
|
678
752
|
function ServeCommand() {
|
|
679
|
-
const cmd3 = new
|
|
753
|
+
const cmd3 = new Command29("serve");
|
|
680
754
|
cmd3.description(
|
|
681
755
|
"Serve API Reference documentation from an OpenAPI or AsyncAPI description"
|
|
682
756
|
);
|
|
@@ -693,16 +767,16 @@ function ServeCommand() {
|
|
|
693
767
|
);
|
|
694
768
|
completeFiles(cmd3, ["file|url"], ["--config"]);
|
|
695
769
|
cmd3.action(async (...args) => {
|
|
696
|
-
const { serveAction } = await import("./chunks/action-
|
|
770
|
+
const { serveAction } = await import("./chunks/action-G2WBTXOK.js");
|
|
697
771
|
await serveAction(...args);
|
|
698
772
|
});
|
|
699
773
|
return cmd3;
|
|
700
774
|
}
|
|
701
775
|
|
|
702
776
|
// src/domains/document/share/index.ts
|
|
703
|
-
import { Command as
|
|
777
|
+
import { Command as Command30 } from "commander";
|
|
704
778
|
function ShareCommand() {
|
|
705
|
-
const cmd3 = new
|
|
779
|
+
const cmd3 = new Command30("share");
|
|
706
780
|
cmd3.description(
|
|
707
781
|
"Publish an OpenAPI or AsyncAPI description to a public sandbox"
|
|
708
782
|
);
|
|
@@ -713,16 +787,16 @@ function ShareCommand() {
|
|
|
713
787
|
);
|
|
714
788
|
completeFiles(cmd3, ["file"], []);
|
|
715
789
|
cmd3.action(async (...args) => {
|
|
716
|
-
const { shareAction } = await import("./chunks/action-
|
|
790
|
+
const { shareAction } = await import("./chunks/action-HOCCP353.js");
|
|
717
791
|
return shareAction(...args);
|
|
718
792
|
});
|
|
719
793
|
return cmd3;
|
|
720
794
|
}
|
|
721
795
|
|
|
722
796
|
// src/domains/document/upgrade/index.ts
|
|
723
|
-
import { Command as
|
|
797
|
+
import { Command as Command31 } from "commander";
|
|
724
798
|
function UpgradeCommand() {
|
|
725
|
-
const cmd3 = new
|
|
799
|
+
const cmd3 = new Command31("upgrade");
|
|
726
800
|
cmd3.description(
|
|
727
801
|
"Upgrade an API description to OpenAPI 3.1 or the latest supported AsyncAPI version"
|
|
728
802
|
);
|
|
@@ -733,30 +807,30 @@ function UpgradeCommand() {
|
|
|
733
807
|
);
|
|
734
808
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
735
809
|
cmd3.action(async (...args) => {
|
|
736
|
-
const { upgradeAction } = await import("./chunks/action-
|
|
810
|
+
const { upgradeAction } = await import("./chunks/action-WOLNPEUQ.js");
|
|
737
811
|
return upgradeAction(...args);
|
|
738
812
|
});
|
|
739
813
|
return cmd3;
|
|
740
814
|
}
|
|
741
815
|
|
|
742
816
|
// src/domains/document/validate/index.ts
|
|
743
|
-
import { Command as
|
|
817
|
+
import { Command as Command32 } from "commander";
|
|
744
818
|
function ValidateCommand() {
|
|
745
|
-
const cmd3 = new
|
|
819
|
+
const cmd3 = new Command32("validate");
|
|
746
820
|
cmd3.description("Validate an OpenAPI or AsyncAPI description");
|
|
747
821
|
cmd3.argument("[file|url]", "File or URL to validate");
|
|
748
822
|
completeFiles(cmd3, ["file|url"], []);
|
|
749
823
|
cmd3.action(async (...args) => {
|
|
750
|
-
const { validateAction } = await import("./chunks/action-
|
|
824
|
+
const { validateAction } = await import("./chunks/action-APBLB3IU.js");
|
|
751
825
|
return validateAction(...args);
|
|
752
826
|
});
|
|
753
827
|
return cmd3;
|
|
754
828
|
}
|
|
755
829
|
|
|
756
830
|
// src/domains/document/void/index.ts
|
|
757
|
-
import { Command as
|
|
831
|
+
import { Command as Command33 } from "commander";
|
|
758
832
|
function VoidCommand() {
|
|
759
|
-
const cmd3 = new
|
|
833
|
+
const cmd3 = new Command33("void");
|
|
760
834
|
cmd3.description("Mirror HTTP requests with a local server");
|
|
761
835
|
cmd3.option(
|
|
762
836
|
"-p, --port <port>",
|
|
@@ -786,18 +860,63 @@ var documentCommands = [
|
|
|
786
860
|
LintCommand,
|
|
787
861
|
UpgradeCommand
|
|
788
862
|
];
|
|
789
|
-
var documentDomain = new
|
|
863
|
+
var documentDomain = new Command34("document");
|
|
790
864
|
documentDomain.description("Work with OpenAPI and AsyncAPI descriptions");
|
|
791
865
|
documentCommands.forEach((command) => documentDomain.addCommand(command()));
|
|
792
866
|
var document_default = documentDomain;
|
|
793
867
|
|
|
868
|
+
// src/domains/mcp/index.ts
|
|
869
|
+
import { Command as Command35 } from "commander";
|
|
870
|
+
var mcpDomain = new Command35("mcp").description(
|
|
871
|
+
"Manage Scalar-hosted MCP servers"
|
|
872
|
+
);
|
|
873
|
+
mcpDomain.addCommand(
|
|
874
|
+
new Command35("list").description("List MCP servers in the current team").option("--json", "Output server metadata as JSON").action(async (options) => {
|
|
875
|
+
const { listAction } = await import("./chunks/actions-D5OHPBWC.js");
|
|
876
|
+
return listAction(options);
|
|
877
|
+
})
|
|
878
|
+
);
|
|
879
|
+
mcpDomain.addCommand(
|
|
880
|
+
new Command35("get").description("Get an MCP server and its environment versions").argument("<server-id>", "Server UUID from scalar mcp list").option("--json", "Output server and environment metadata as JSON").action(async (id, options) => {
|
|
881
|
+
const { getAction } = await import("./chunks/actions-D5OHPBWC.js");
|
|
882
|
+
return getAction(id, options);
|
|
883
|
+
})
|
|
884
|
+
);
|
|
885
|
+
mcpDomain.addCommand(
|
|
886
|
+
new Command35("create").description(
|
|
887
|
+
"Create an MCP server from an existing Registry API or Docs project"
|
|
888
|
+
).requiredOption("--name <name>", "Server name").option("--slug <slug>", "Server slug (generated from the name by default)").option(
|
|
889
|
+
"--api <reference>",
|
|
890
|
+
"Registry API as namespace/slug[@version] (current version by default, pinned)"
|
|
891
|
+
).option("--project <uid>", "Docs project UID (tracks its active publish)").option("--json", "Output created server metadata as JSON").addHelpText(
|
|
892
|
+
"after",
|
|
893
|
+
"\nProvide exactly one of --api or --project. API tool exposure follows the API description.\nCreation does not wait for the endpoint to become ready. MCP_URL overrides the endpoint host.\n\nExamples:\n scalar mcp create --name Petstore --api acme/petstore@1.0.0 --no-input\n scalar mcp create --name Docs --project <project-uid> --json --no-input"
|
|
894
|
+
).action(async (options) => {
|
|
895
|
+
const { createAction } = await import("./chunks/actions-D5OHPBWC.js");
|
|
896
|
+
return createAction(options);
|
|
897
|
+
})
|
|
898
|
+
);
|
|
899
|
+
mcpDomain.addCommand(
|
|
900
|
+
new Command35("update").description("Change an MCP server name or slug").argument("<server-id>", "Server UUID from scalar mcp list").option("--name <name>", "New server name").option("--slug <slug>", "New server slug (changes the endpoint address)").option("--json", "Output updated server metadata as JSON").action(async (id, options) => {
|
|
901
|
+
const { updateAction } = await import("./chunks/actions-D5OHPBWC.js");
|
|
902
|
+
return updateAction(id, options);
|
|
903
|
+
})
|
|
904
|
+
);
|
|
905
|
+
mcpDomain.addCommand(
|
|
906
|
+
new Command35("delete").description("Delete an MCP server and stop its endpoints").argument("<server-id>", "Server UUID from scalar mcp list").option("--yes", "Confirm deletion of this server without prompting").option("--json", "Output the deletion result as JSON (requires --yes)").action(async (id, options) => {
|
|
907
|
+
const { deleteAction } = await import("./chunks/actions-D5OHPBWC.js");
|
|
908
|
+
return deleteAction(id, options);
|
|
909
|
+
})
|
|
910
|
+
);
|
|
911
|
+
var mcp_default = mcpDomain;
|
|
912
|
+
|
|
794
913
|
// src/domains/project/index.ts
|
|
795
|
-
import { Command as
|
|
914
|
+
import { Command as Command48 } from "commander";
|
|
796
915
|
|
|
797
916
|
// src/domains/project/preview/index.ts
|
|
798
|
-
import { Command as
|
|
917
|
+
import { Command as Command36, Option as Option8 } from "commander";
|
|
799
918
|
var PreviewCommand = () => {
|
|
800
|
-
const cmd3 = new
|
|
919
|
+
const cmd3 = new Command36("preview");
|
|
801
920
|
cmd3.description("Preview a Scalar Docs project locally");
|
|
802
921
|
cmd3.argument(
|
|
803
922
|
"[config]",
|
|
@@ -810,21 +929,21 @@ var PreviewCommand = () => {
|
|
|
810
929
|
);
|
|
811
930
|
cmd3.option("-H, --host [host]", "Host address for the preview server");
|
|
812
931
|
cmd3.addOption(
|
|
813
|
-
new
|
|
932
|
+
new Option8("-L, --log-level <level>", "Set the log level").choices(["debug", "info"]).default("info")
|
|
814
933
|
);
|
|
815
934
|
cmd3.option("-N, --no-open", "Do not open the browser automatically", true);
|
|
816
935
|
completeFiles(cmd3, ["config"], []);
|
|
817
936
|
cmd3.action(async (...args) => {
|
|
818
|
-
const { previewAction } = await import("./chunks/action-
|
|
937
|
+
const { previewAction } = await import("./chunks/action-PNSWHIHC.js");
|
|
819
938
|
return previewAction(...args);
|
|
820
939
|
});
|
|
821
940
|
return cmd3;
|
|
822
941
|
};
|
|
823
942
|
|
|
824
943
|
// src/domains/project/check-config/index.ts
|
|
825
|
-
import { Command as
|
|
944
|
+
import { Command as Command37 } from "commander";
|
|
826
945
|
function CheckConfigCommand() {
|
|
827
|
-
const cmd3 = new
|
|
946
|
+
const cmd3 = new Command37("check-config");
|
|
828
947
|
cmd3.description("Validate a Scalar configuration file");
|
|
829
948
|
cmd3.argument(
|
|
830
949
|
"[file]",
|
|
@@ -832,53 +951,53 @@ function CheckConfigCommand() {
|
|
|
832
951
|
);
|
|
833
952
|
completeFiles(cmd3, ["file"], []);
|
|
834
953
|
cmd3.action(async (...args) => {
|
|
835
|
-
const { checkConfigAction } = await import("./chunks/action-
|
|
954
|
+
const { checkConfigAction } = await import("./chunks/action-U2RJ3ZAU.js");
|
|
836
955
|
return checkConfigAction(...args);
|
|
837
956
|
});
|
|
838
957
|
return cmd3;
|
|
839
958
|
}
|
|
840
959
|
|
|
841
960
|
// src/domains/project/create/index.ts
|
|
842
|
-
import { Command as
|
|
961
|
+
import { Command as Command38 } from "commander";
|
|
843
962
|
var CreateCommand = () => {
|
|
844
|
-
const cmd3 = new
|
|
963
|
+
const cmd3 = new Command38("create");
|
|
845
964
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
846
965
|
cmd3.description("Create a Scalar project without a linked GitHub repository");
|
|
847
966
|
cmd3.option("-n, --name <name>", "Project name");
|
|
848
967
|
cmd3.option("-s, --slug <slug>", "Project slug");
|
|
849
968
|
cmd3.action(async (...args) => {
|
|
850
|
-
const { createAction } = await import("./chunks/action-
|
|
969
|
+
const { createAction } = await import("./chunks/action-3QQSKGM3.js");
|
|
851
970
|
return createAction(...args);
|
|
852
971
|
});
|
|
853
972
|
return cmd3;
|
|
854
973
|
};
|
|
855
974
|
|
|
856
975
|
// src/domains/project/deployments/index.ts
|
|
857
|
-
import { Command as
|
|
976
|
+
import { Command as Command41 } from "commander";
|
|
858
977
|
|
|
859
978
|
// src/domains/project/deployments/get/index.ts
|
|
860
|
-
import { Command as
|
|
861
|
-
var GetCommand = () => new
|
|
979
|
+
import { Command as Command39 } from "commander";
|
|
980
|
+
var GetCommand = () => new Command39("get").description(
|
|
862
981
|
"Inspect an existing build in the selected team without resubmitting"
|
|
863
982
|
).argument("<build-id>", "Accepted build ID, including preview builds").option("--wait", "Wait for deployment instead of inspecting once").option(
|
|
864
983
|
"--timeout <seconds>",
|
|
865
984
|
"Maximum status wait in seconds (default: 30, or 600 with --wait)"
|
|
866
985
|
).action(
|
|
867
986
|
async (buildId, options) => {
|
|
868
|
-
const { getAction } = await import("./chunks/action-
|
|
987
|
+
const { getAction } = await import("./chunks/action-ZTLOQZTT.js");
|
|
869
988
|
await getAction(buildId, options);
|
|
870
989
|
}
|
|
871
990
|
);
|
|
872
991
|
|
|
873
992
|
// src/domains/project/deployments/list/index.ts
|
|
874
|
-
import { Command as
|
|
993
|
+
import { Command as Command40 } from "commander";
|
|
875
994
|
var ListCommand = () => {
|
|
876
|
-
const cmd3 = new
|
|
995
|
+
const cmd3 = new Command40("list");
|
|
877
996
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
878
997
|
cmd3.description("List production deployments for a project");
|
|
879
998
|
cmd3.option("-s, --slug [slug]", "Project slug from scalar project list");
|
|
880
999
|
cmd3.action(async (...args) => {
|
|
881
|
-
const { listAction } = await import("./chunks/action-
|
|
1000
|
+
const { listAction } = await import("./chunks/action-IU2AVNOW.js");
|
|
882
1001
|
return listAction(...args);
|
|
883
1002
|
});
|
|
884
1003
|
return cmd3;
|
|
@@ -886,7 +1005,7 @@ var ListCommand = () => {
|
|
|
886
1005
|
|
|
887
1006
|
// src/domains/project/deployments/index.ts
|
|
888
1007
|
var DeploymentsCommand = () => {
|
|
889
|
-
const cmd3 = new
|
|
1008
|
+
const cmd3 = new Command41("deployments");
|
|
890
1009
|
cmd3.description("Show project deployment history");
|
|
891
1010
|
cmd3.addCommand(ListCommand());
|
|
892
1011
|
cmd3.addCommand(GetCommand());
|
|
@@ -894,12 +1013,12 @@ var DeploymentsCommand = () => {
|
|
|
894
1013
|
};
|
|
895
1014
|
|
|
896
1015
|
// src/domains/project/get/index.ts
|
|
897
|
-
import { Command as
|
|
1016
|
+
import { Command as Command42 } from "commander";
|
|
898
1017
|
function GetCommand2() {
|
|
899
|
-
const command = new
|
|
1018
|
+
const command = new Command42("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
1019
|
command.action(
|
|
901
1020
|
async (slug, options) => {
|
|
902
|
-
const { getAction } = await import("./chunks/action-
|
|
1021
|
+
const { getAction } = await import("./chunks/action-NZJ4Z64U.js");
|
|
903
1022
|
await getAction(slug, options);
|
|
904
1023
|
}
|
|
905
1024
|
);
|
|
@@ -907,9 +1026,9 @@ function GetCommand2() {
|
|
|
907
1026
|
}
|
|
908
1027
|
|
|
909
1028
|
// src/domains/project/init/index.ts
|
|
910
|
-
import { Command as
|
|
1029
|
+
import { Command as Command43 } from "commander";
|
|
911
1030
|
var InitCommand = () => {
|
|
912
|
-
const cmd3 = new
|
|
1031
|
+
const cmd3 = new Command43("init");
|
|
913
1032
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
914
1033
|
cmd3.description("Initialize a local Scalar Docs project");
|
|
915
1034
|
cmd3.option(
|
|
@@ -918,27 +1037,27 @@ var InitCommand = () => {
|
|
|
918
1037
|
);
|
|
919
1038
|
cmd3.option("--force", "Overwrite existing configuration");
|
|
920
1039
|
cmd3.action(async (...args) => {
|
|
921
|
-
const { initAction } = await import("./chunks/action-
|
|
1040
|
+
const { initAction } = await import("./chunks/action-T7SD3ETN.js");
|
|
922
1041
|
return initAction(...args);
|
|
923
1042
|
});
|
|
924
1043
|
return cmd3;
|
|
925
1044
|
};
|
|
926
1045
|
|
|
927
1046
|
// src/domains/project/list/index.ts
|
|
928
|
-
import { Command as
|
|
1047
|
+
import { Command as Command44 } from "commander";
|
|
929
1048
|
function ListCommand2() {
|
|
930
|
-
const command = new
|
|
1049
|
+
const command = new Command44("list").description("List projects and their slugs for the current team").option("--json", "Print project details as JSON");
|
|
931
1050
|
command.action(async (options) => {
|
|
932
|
-
const { listAction } = await import("./chunks/action-
|
|
1051
|
+
const { listAction } = await import("./chunks/action-777R7LOG.js");
|
|
933
1052
|
await listAction(options);
|
|
934
1053
|
});
|
|
935
1054
|
return command;
|
|
936
1055
|
}
|
|
937
1056
|
|
|
938
1057
|
// src/domains/project/publish/index.ts
|
|
939
|
-
import { Command as
|
|
1058
|
+
import { Command as Command45 } from "commander";
|
|
940
1059
|
var PublishCommand = () => {
|
|
941
|
-
const cmd3 = new
|
|
1060
|
+
const cmd3 = new Command45("publish");
|
|
942
1061
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
943
1062
|
cmd3.description("Publish a new build of a Scalar project");
|
|
944
1063
|
cmd3.option("-s, --slug [slug]", "Project slug from scalar project list");
|
|
@@ -964,16 +1083,16 @@ var PublishCommand = () => {
|
|
|
964
1083
|
);
|
|
965
1084
|
completeFiles(cmd3, [], ["--config"]);
|
|
966
1085
|
cmd3.action(async (...args) => {
|
|
967
|
-
const { publishAction } = await import("./chunks/action-
|
|
1086
|
+
const { publishAction } = await import("./chunks/action-LD5B5QQ4.js");
|
|
968
1087
|
return publishAction(...args);
|
|
969
1088
|
});
|
|
970
1089
|
return cmd3;
|
|
971
1090
|
};
|
|
972
1091
|
|
|
973
1092
|
// src/domains/project/rollback/index.ts
|
|
974
|
-
import { Command as
|
|
1093
|
+
import { Command as Command46 } from "commander";
|
|
975
1094
|
var RollbackCommand = () => {
|
|
976
|
-
const cmd3 = new
|
|
1095
|
+
const cmd3 = new Command46("rollback");
|
|
977
1096
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
978
1097
|
cmd3.description(
|
|
979
1098
|
"Roll the live deployment back to a previously deployed build."
|
|
@@ -985,16 +1104,16 @@ var RollbackCommand = () => {
|
|
|
985
1104
|
);
|
|
986
1105
|
cmd3.option("-y, --yes", "Skip the confirmation prompt");
|
|
987
1106
|
cmd3.action(async (...args) => {
|
|
988
|
-
const { rollbackAction } = await import("./chunks/action-
|
|
1107
|
+
const { rollbackAction } = await import("./chunks/action-MJHLG7AE.js");
|
|
989
1108
|
return rollbackAction(...args);
|
|
990
1109
|
});
|
|
991
1110
|
return cmd3;
|
|
992
1111
|
};
|
|
993
1112
|
|
|
994
1113
|
// src/domains/project/upgrade/index.ts
|
|
995
|
-
import { Command as
|
|
1114
|
+
import { Command as Command47 } from "commander";
|
|
996
1115
|
var UpgradeCommand2 = () => {
|
|
997
|
-
const cmd3 = new
|
|
1116
|
+
const cmd3 = new Command47("upgrade");
|
|
998
1117
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
999
1118
|
cmd3.description("Upgrade a Scalar Docs configuration");
|
|
1000
1119
|
cmd3.argument(
|
|
@@ -1003,7 +1122,7 @@ var UpgradeCommand2 = () => {
|
|
|
1003
1122
|
);
|
|
1004
1123
|
completeFiles(cmd3, ["config"], []);
|
|
1005
1124
|
cmd3.action(async (...args) => {
|
|
1006
|
-
const { upgradeAction } = await import("./chunks/action-
|
|
1125
|
+
const { upgradeAction } = await import("./chunks/action-2HPMP473.js");
|
|
1007
1126
|
return upgradeAction(...args);
|
|
1008
1127
|
});
|
|
1009
1128
|
return cmd3;
|
|
@@ -1022,7 +1141,7 @@ var projectCommands = [
|
|
|
1022
1141
|
DeploymentsCommand,
|
|
1023
1142
|
UpgradeCommand2
|
|
1024
1143
|
];
|
|
1025
|
-
var projectDomain = new
|
|
1144
|
+
var projectDomain = new Command48("project");
|
|
1026
1145
|
projectDomain.description("Manage Scalar Docs projects");
|
|
1027
1146
|
for (const command of projectCommands) {
|
|
1028
1147
|
projectDomain.addCommand(command());
|
|
@@ -1031,11 +1150,11 @@ projectDomain.addCommand(DownloadIsolateCommand(), { hidden: true });
|
|
|
1031
1150
|
var project_default = projectDomain;
|
|
1032
1151
|
|
|
1033
1152
|
// src/domains/readme/index.ts
|
|
1034
|
-
import { Command as
|
|
1153
|
+
import { Command as Command50 } from "commander";
|
|
1035
1154
|
|
|
1036
1155
|
// src/domains/readme/generate.ts
|
|
1037
1156
|
import as from "ansis";
|
|
1038
|
-
import { Command as
|
|
1157
|
+
import { Command as Command49 } from "commander";
|
|
1039
1158
|
|
|
1040
1159
|
// src/helpers/documentation/index.ts
|
|
1041
1160
|
import fs from "node:fs/promises";
|
|
@@ -1069,7 +1188,7 @@ var generateDocumentationFile = async (outputPath) => {
|
|
|
1069
1188
|
|
|
1070
1189
|
// src/domains/readme/generate.ts
|
|
1071
1190
|
function GenerateReadmeCommand() {
|
|
1072
|
-
const cmd3 = new
|
|
1191
|
+
const cmd3 = new Command49("generate");
|
|
1073
1192
|
cmd3.description("Generate the CLI README from the command tree");
|
|
1074
1193
|
cmd3.option(
|
|
1075
1194
|
"-o, --output [file]",
|
|
@@ -1121,18 +1240,18 @@ function ServeReadmeCommand(cmd3) {
|
|
|
1121
1240
|
}
|
|
1122
1241
|
|
|
1123
1242
|
// src/domains/readme/index.ts
|
|
1124
|
-
var readmeDomain = new
|
|
1243
|
+
var readmeDomain = new Command50("readme");
|
|
1125
1244
|
readmeDomain.addCommand(GenerateReadmeCommand());
|
|
1126
1245
|
ServeReadmeCommand(readmeDomain);
|
|
1127
1246
|
var readme_default = readmeDomain;
|
|
1128
1247
|
|
|
1129
1248
|
// src/domains/registry/index.ts
|
|
1130
|
-
import { Command as
|
|
1249
|
+
import { Command as Command56 } from "commander";
|
|
1131
1250
|
|
|
1132
1251
|
// src/domains/registry/publish/index.ts
|
|
1133
|
-
import { Command as
|
|
1252
|
+
import { Command as Command51 } from "commander";
|
|
1134
1253
|
var PublishCommand2 = () => {
|
|
1135
|
-
const cmd3 = new
|
|
1254
|
+
const cmd3 = new Command51("publish");
|
|
1136
1255
|
cmd3.option("--json", "Output the mutation result as JSON without prompting");
|
|
1137
1256
|
cmd3.description("Publish an OpenAPI description to the Scalar Registry");
|
|
1138
1257
|
cmd3.argument("[file]", "API description file path or URL to upload");
|
|
@@ -1168,31 +1287,31 @@ var PublishCommand2 = () => {
|
|
|
1168
1287
|
);
|
|
1169
1288
|
completeFiles(cmd3, ["file"], []);
|
|
1170
1289
|
cmd3.action(async (...args) => {
|
|
1171
|
-
const { publishAction } = await import("./chunks/action-
|
|
1290
|
+
const { publishAction } = await import("./chunks/action-7LK4RUDP.js");
|
|
1172
1291
|
return publishAction(...args);
|
|
1173
1292
|
});
|
|
1174
1293
|
return cmd3;
|
|
1175
1294
|
};
|
|
1176
1295
|
|
|
1177
1296
|
// src/domains/registry/delete/index.ts
|
|
1178
|
-
import { Command as
|
|
1297
|
+
import { Command as Command52 } from "commander";
|
|
1179
1298
|
var DeleteCommand = () => {
|
|
1180
|
-
const cmd3 = new
|
|
1299
|
+
const cmd3 = new Command52("delete");
|
|
1181
1300
|
cmd3.option("--json", "Output the mutation result as JSON without prompting");
|
|
1182
1301
|
cmd3.description("Delete an API description from the Scalar Registry");
|
|
1183
1302
|
cmd3.argument("[namespace]", "Team namespace");
|
|
1184
1303
|
cmd3.argument("[slug]", "API description slug");
|
|
1185
1304
|
cmd3.action(async (...args) => {
|
|
1186
|
-
const { deleteAction } = await import("./chunks/action-
|
|
1305
|
+
const { deleteAction } = await import("./chunks/action-ENDUKGWS.js");
|
|
1187
1306
|
return deleteAction(...args);
|
|
1188
1307
|
});
|
|
1189
1308
|
return cmd3;
|
|
1190
1309
|
};
|
|
1191
1310
|
|
|
1192
1311
|
// src/domains/registry/get/index.ts
|
|
1193
|
-
import { Command as
|
|
1312
|
+
import { Command as Command53, Option as Option9 } from "commander";
|
|
1194
1313
|
var GetCommand3 = () => {
|
|
1195
|
-
const cmd3 = new
|
|
1314
|
+
const cmd3 = new Command53("get");
|
|
1196
1315
|
cmd3.description(
|
|
1197
1316
|
"Download an API description version from the Scalar Registry"
|
|
1198
1317
|
);
|
|
@@ -1203,35 +1322,35 @@ var GetCommand3 = () => {
|
|
|
1203
1322
|
"API description version (defaults to latest)"
|
|
1204
1323
|
);
|
|
1205
1324
|
cmd3.addOption(
|
|
1206
|
-
new
|
|
1325
|
+
new Option9("--format <format>", "Output format").choices([...DOCUMENT_FORMATS]).default("json")
|
|
1207
1326
|
);
|
|
1208
1327
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
1209
1328
|
completeFiles(cmd3, [], ["--output"]);
|
|
1210
1329
|
cmd3.action(async (...args) => {
|
|
1211
|
-
const { getAction } = await import("./chunks/action-
|
|
1330
|
+
const { getAction } = await import("./chunks/action-QJMRAFOF.js");
|
|
1212
1331
|
return getAction(...args);
|
|
1213
1332
|
});
|
|
1214
1333
|
return cmd3;
|
|
1215
1334
|
};
|
|
1216
1335
|
|
|
1217
1336
|
// src/domains/registry/list/index.ts
|
|
1218
|
-
import { Command as
|
|
1337
|
+
import { Command as Command54 } from "commander";
|
|
1219
1338
|
var ListCommand3 = () => {
|
|
1220
|
-
const cmd3 = new
|
|
1339
|
+
const cmd3 = new Command54("list");
|
|
1221
1340
|
cmd3.description("List Scalar Registry API descriptions in a team namespace");
|
|
1222
1341
|
cmd3.option("--namespace <namespace>", "Team namespace");
|
|
1223
1342
|
cmd3.option("--json", "Output Scalar Registry API metadata as JSON");
|
|
1224
1343
|
cmd3.action(async (...args) => {
|
|
1225
|
-
const { listAction } = await import("./chunks/action-
|
|
1344
|
+
const { listAction } = await import("./chunks/action-PDSSIW2A.js");
|
|
1226
1345
|
return listAction(...args);
|
|
1227
1346
|
});
|
|
1228
1347
|
return cmd3;
|
|
1229
1348
|
};
|
|
1230
1349
|
|
|
1231
1350
|
// src/domains/registry/update/index.ts
|
|
1232
|
-
import { Command as
|
|
1351
|
+
import { Command as Command55 } from "commander";
|
|
1233
1352
|
var UpdateCommand = () => {
|
|
1234
|
-
const cmd3 = new
|
|
1353
|
+
const cmd3 = new Command55("update");
|
|
1235
1354
|
cmd3.option("--json", "Output the mutation result as JSON without prompting");
|
|
1236
1355
|
cmd3.description("Update API description metadata in the Scalar Registry");
|
|
1237
1356
|
cmd3.argument("[namespace]", "Team namespace");
|
|
@@ -1251,7 +1370,7 @@ var UpdateCommand = () => {
|
|
|
1251
1370
|
"\nOmitting visibility options leaves access unchanged.\nExample: scalar registry update acme my-api --private"
|
|
1252
1371
|
);
|
|
1253
1372
|
cmd3.action(async (...args) => {
|
|
1254
|
-
const { updateAction } = await import("./chunks/action-
|
|
1373
|
+
const { updateAction } = await import("./chunks/action-3W4IC7QL.js");
|
|
1255
1374
|
return updateAction(...args);
|
|
1256
1375
|
});
|
|
1257
1376
|
return cmd3;
|
|
@@ -1265,49 +1384,49 @@ var registryCommands = [
|
|
|
1265
1384
|
ListCommand3,
|
|
1266
1385
|
GetCommand3
|
|
1267
1386
|
];
|
|
1268
|
-
var registryDomain = new
|
|
1387
|
+
var registryDomain = new Command56("registry");
|
|
1269
1388
|
registryDomain.description("Manage API descriptions in the Scalar Registry");
|
|
1270
1389
|
registryCommands.forEach((command) => registryDomain.addCommand(command()));
|
|
1271
1390
|
var registry_default = registryDomain;
|
|
1272
1391
|
|
|
1273
1392
|
// src/domains/team/index.ts
|
|
1274
|
-
import { Command as
|
|
1393
|
+
import { Command as Command60 } from "commander";
|
|
1275
1394
|
|
|
1276
1395
|
// src/domains/team/get/index.ts
|
|
1277
|
-
import { Command as
|
|
1396
|
+
import { Command as Command57 } from "commander";
|
|
1278
1397
|
var GetCommand4 = () => {
|
|
1279
|
-
const cmd3 = new
|
|
1398
|
+
const cmd3 = new Command57("get");
|
|
1280
1399
|
cmd3.description("Show the current team and its namespaces");
|
|
1281
1400
|
cmd3.option("--json", "Output the current team as JSON");
|
|
1282
1401
|
cmd3.action(async (...args) => {
|
|
1283
|
-
const { getAction } = await import("./chunks/action-
|
|
1402
|
+
const { getAction } = await import("./chunks/action-2UZWKMSJ.js");
|
|
1284
1403
|
return getAction(...args);
|
|
1285
1404
|
});
|
|
1286
1405
|
return cmd3;
|
|
1287
1406
|
};
|
|
1288
1407
|
|
|
1289
1408
|
// src/domains/team/list/index.ts
|
|
1290
|
-
import { Command as
|
|
1409
|
+
import { Command as Command58 } from "commander";
|
|
1291
1410
|
var ListCommand4 = () => {
|
|
1292
|
-
const cmd3 = new
|
|
1411
|
+
const cmd3 = new Command58("list");
|
|
1293
1412
|
cmd3.description("List your Scalar teams");
|
|
1294
1413
|
cmd3.option("--json", "Output teams as JSON");
|
|
1295
1414
|
cmd3.action(async (...args) => {
|
|
1296
|
-
const { listAction } = await import("./chunks/action-
|
|
1415
|
+
const { listAction } = await import("./chunks/action-HDT7EO7W.js");
|
|
1297
1416
|
return listAction(...args);
|
|
1298
1417
|
});
|
|
1299
1418
|
return cmd3;
|
|
1300
1419
|
};
|
|
1301
1420
|
|
|
1302
1421
|
// src/domains/team/set/index.ts
|
|
1303
|
-
import { Command as
|
|
1422
|
+
import { Command as Command59 } from "commander";
|
|
1304
1423
|
var SetCommand = () => {
|
|
1305
|
-
const cmd3 = new
|
|
1424
|
+
const cmd3 = new Command59("set");
|
|
1306
1425
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
1307
1426
|
cmd3.description("Select the current team");
|
|
1308
1427
|
cmd3.option("--team <team>", "Team ID");
|
|
1309
1428
|
cmd3.action(async (...args) => {
|
|
1310
|
-
const { setAction } = await import("./chunks/action-
|
|
1429
|
+
const { setAction } = await import("./chunks/action-B2WWTOF6.js");
|
|
1311
1430
|
return setAction(...args);
|
|
1312
1431
|
});
|
|
1313
1432
|
return cmd3;
|
|
@@ -1315,7 +1434,7 @@ var SetCommand = () => {
|
|
|
1315
1434
|
|
|
1316
1435
|
// src/domains/team/index.ts
|
|
1317
1436
|
var teamCommands = [ListCommand4, GetCommand4, SetCommand];
|
|
1318
|
-
var teamDomain = new
|
|
1437
|
+
var teamDomain = new Command60("team");
|
|
1319
1438
|
teamDomain.description("List and switch between your Scalar teams");
|
|
1320
1439
|
teamCommands.forEach((command) => {
|
|
1321
1440
|
teamDomain.addCommand(command());
|
|
@@ -1324,7 +1443,7 @@ var team_default = teamDomain;
|
|
|
1324
1443
|
|
|
1325
1444
|
// src/domains/upgrade/index.ts
|
|
1326
1445
|
import { execSync } from "node:child_process";
|
|
1327
|
-
import { Command as
|
|
1446
|
+
import { Command as Command61, Option as Option10 } from "commander";
|
|
1328
1447
|
|
|
1329
1448
|
// src/helpers/upgrade.ts
|
|
1330
1449
|
import semver from "semver";
|
|
@@ -1434,14 +1553,14 @@ function getUpgradeInstructions(portable, platform, arch, env, latestVersion) {
|
|
|
1434
1553
|
}
|
|
1435
1554
|
|
|
1436
1555
|
// src/domains/upgrade/index.ts
|
|
1437
|
-
var cmd2 = new
|
|
1556
|
+
var cmd2 = new Command61("upgrade");
|
|
1438
1557
|
cmd2.description("Upgrade the Scalar CLI to the latest version");
|
|
1439
1558
|
cmd2.option(
|
|
1440
1559
|
"--check",
|
|
1441
1560
|
"Show installed and available versions without installing"
|
|
1442
1561
|
);
|
|
1443
1562
|
cmd2.addOption(
|
|
1444
|
-
new
|
|
1563
|
+
new Option10(
|
|
1445
1564
|
"--json",
|
|
1446
1565
|
"Show the version check as JSON without installing"
|
|
1447
1566
|
).implies({ check: true })
|
|
@@ -1541,6 +1660,7 @@ var domains = [
|
|
|
1541
1660
|
access_group_default,
|
|
1542
1661
|
document_default,
|
|
1543
1662
|
project_default,
|
|
1663
|
+
mcp_default,
|
|
1544
1664
|
registry_default,
|
|
1545
1665
|
team_default,
|
|
1546
1666
|
sdk_default,
|