@scalar/cli 2.17.0 → 2.18.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 +77 -3
- package/chunks/{action-Y4L4OPPH.js → action-2WVJ2WEW.js} +15 -16
- package/chunks/{action-UOUS2G2B.js → action-4BDZ2CXP.js} +6 -7
- package/chunks/{action-52ZSECW2.js → action-5AXDB5VN.js} +14 -15
- package/chunks/{action-7PVWQJ7V.js → action-6I3TJLRO.js} +28 -26
- package/chunks/{action-MPBZUWQ2.js → action-6WZN63LT.js} +20 -19
- package/chunks/{action-5NYKJDBG.js → action-7GZGVTYI.js} +1067 -766
- package/chunks/{action-2Y6UTXAG.js → action-7ZCJAWI2.js} +5 -5
- package/chunks/{action-UWVZ6V7B.js → action-A6YOY24G.js} +5 -5
- package/chunks/{action-KJJ35X2T.js → action-AGGHY4N2.js} +21 -20
- package/chunks/{action-MKZYWAXH.js → action-BVZOA2G5.js} +9 -10
- package/chunks/{action-5TQHROY5.js → action-BYDJ4R4F.js} +14 -15
- package/chunks/{action-VJDK7ROI.js → action-CBAL5CYB.js} +16 -17
- package/chunks/action-COFGCCYS.js +89 -0
- package/chunks/action-CYU5Q5LT.js +254 -0
- package/chunks/{action-XMANK72Z.js → action-DTQH6CKR.js} +24 -23
- package/chunks/{action-AFZE62DU.js → action-ED5WLLIE.js} +6 -7
- package/chunks/action-F4CQ4DW3.js +654 -0
- package/chunks/{action-TA6VOPQ5.js → action-GVW5PSPT.js} +17 -18
- package/chunks/{action-TTDV5NIP.js → action-H5VRLFCY.js} +5 -5
- package/chunks/{action-2SZMLOYJ.js → action-IWEAWDT3.js} +9 -10
- package/chunks/{action-3EATJRIK.js → action-JN6JVQUV.js} +14 -15
- package/chunks/{action-WPUITVPF.js → action-KVM76ZKQ.js} +11 -11
- package/chunks/{action-PS4F4QWI.js → action-LLMFEBHH.js} +3 -4
- package/chunks/{action-WUMW2GH6.js → action-PEG7AUA6.js} +14 -13
- package/chunks/{action-UVWH2KZY.js → action-QC72LLYE.js} +7 -5
- package/chunks/{action-P5MGMJG3.js → action-QP6MRSQW.js} +15 -14
- package/chunks/{action-W47MFJSP.js → action-R53K22GE.js} +219 -45
- package/chunks/{action-RWITXLMW.js → action-SJPWL723.js} +5 -4
- package/chunks/{action-SBD4TFRS.js → action-T3R4SDAI.js} +5 -5
- package/chunks/{action-GOKWY3AQ.js → action-TT7ZJNST.js} +20 -19
- package/chunks/{action-LALZGEVR.js → action-UPVVJE26.js} +14 -15
- package/chunks/{action-RM4RZFZV.js → action-V35W4MRK.js} +10 -11
- package/chunks/{action-J3C4LAT5.js → action-W4KGRBRV.js} +5 -5
- package/chunks/{action-VWQNDXZT.js → action-ZIVYJCC2.js} +14 -15
- package/chunks/{action-LI6DZLDZ.js → action-ZU5X2KQX.js} +22 -21
- package/chunks/{actions-GWMW7V2B.js → actions-CERT7BL4.js} +16 -16
- package/chunks/{actions-4X5RTQCM.js → actions-RCIS37Y6.js} +14 -15
- package/chunks/{agent-LB5ZCVUN.js → agent-CT3RRYPJ.js} +7 -7
- package/chunks/{asyncapi-J6VAMIMO.js → asyncapi-DVBS23QW.js} +9 -10
- package/chunks/{build.action-YP46CGLS.js → build.action-7MKMMV6V.js} +16 -17
- package/chunks/{chunk-B3CMXTHQ.js → chunk-36UI2W7I.js} +1 -1
- package/chunks/{chunk-4TSZVWGM.js → chunk-4BMOCIYO.js} +19 -4
- package/chunks/{chunk-SKXMYIA2.js → chunk-5EO2CVAR.js} +4 -4
- package/chunks/{chunk-4YQNT5UH.js → chunk-5GZAGHKL.js} +1 -1
- package/chunks/{chunk-3BZ3VY6H.js → chunk-7LUXRNKV.js} +27 -2
- package/chunks/{chunk-KDEKIOIP.js → chunk-CWCRBWA6.js} +1 -1
- package/chunks/{chunk-YFUHTGGP.js → chunk-CYIGEQOJ.js} +2 -2
- package/chunks/{chunk-I4FQOD5L.js → chunk-DVA4NCCY.js} +3 -3
- package/chunks/{chunk-63AB5A5B.js → chunk-F6E7FJEC.js} +6 -6
- package/chunks/{chunk-2KMYC3ZI.js → chunk-FMPJSW6A.js} +2 -2
- package/chunks/{chunk-IZ3UMB7D.js → chunk-GCVB22TG.js} +2 -2
- package/chunks/{chunk-36AMOACU.js → chunk-GXKNYM54.js} +3 -3
- package/chunks/chunk-I25ZCHBJ.js +22 -0
- package/chunks/{chunk-KYCM5SL3.js → chunk-JBMHCTZD.js} +1 -0
- package/chunks/{chunk-57EMU765.js → chunk-JEOQ7LSA.js} +1 -1
- package/chunks/{chunk-DXEHHE6H.js → chunk-KI2AVDKM.js} +6 -4
- package/chunks/{chunk-QDT27U6O.js → chunk-KSY2GH53.js} +2 -2
- package/chunks/{chunk-LS6XOFVD.js → chunk-KWQVA66H.js} +11 -23
- package/chunks/{chunk-KJT4VYUO.js → chunk-LPWRG2MS.js} +1 -1
- package/chunks/{chunk-NKCM2UH5.js → chunk-LVUMNGVA.js} +1 -1
- package/chunks/{chunk-H6LOSAC7.js → chunk-M34HMQMV.js} +39 -83
- package/chunks/{chunk-XGKFAPON.js → chunk-MRZ5A7LB.js} +4 -4
- package/chunks/chunk-O3I3LTTJ.js +24 -0
- package/chunks/{chunk-XQPB4OGW.js → chunk-O4DJIA6Y.js} +2 -19
- package/chunks/{action-B3IDMFFO.js → chunk-OKLL5422.js} +5 -243
- package/chunks/{chunk-RVZZQKVE.js → chunk-PMDHYIB4.js} +4 -22
- package/chunks/{chunk-BIYCLKLZ.js → chunk-RELSIFIL.js} +1 -1
- package/chunks/{chunk-QLKBXVUV.js → chunk-RGJPENX7.js} +1 -1
- package/chunks/{chunk-3KK72EMO.js → chunk-RHAQ4XBA.js} +3 -3
- package/chunks/{action-S7DB6MBK.js → chunk-RQ7QBRJT.js} +1 -82
- package/chunks/chunk-S3LY7RKP.js +54 -0
- package/chunks/{chunk-X2NZINNR.js → chunk-S5OGPH2P.js} +3 -3
- package/chunks/{chunk-VNMVAJ6X.js → chunk-U36HEOGO.js} +17 -21
- package/chunks/{chunk-CAD672DX.js → chunk-Y3CXAIAG.js} +1 -1
- package/chunks/{chunk-HNWIIDGX.js → chunk-Z7EH7CJC.js} +3 -3
- package/chunks/{chunk-SVDXXGEO.js → chunk-ZMJW5UWU.js} +3 -3
- package/chunks/{chunk-UI5PWDNE.js → chunk-ZQDAPKWX.js} +9 -16
- package/chunks/{create.action-PRZKNQHM.js → create.action-VA2ISPIM.js} +16 -17
- package/chunks/{delete.action-G7OAQBR5.js → delete.action-AIWMDGXV.js} +16 -17
- package/chunks/{delete.action-2BLCOX6Y.js → delete.action-GEN6OD7A.js} +16 -17
- package/chunks/{diff.action-KDOJQVJ5.js → diff.action-LBK656RN.js} +15 -14
- package/chunks/{get.action-IKO22SCB.js → get.action-5SWRNQ3D.js} +15 -14
- package/chunks/{get.action-HSYV5TFY.js → get.action-UPPPGGI4.js} +17 -18
- package/chunks/{list.action-KYIFUM3C.js → list.action-YJZBC25S.js} +17 -18
- package/chunks/{list.action-IVJS7UFI.js → list.action-YOWWC4I4.js} +19 -20
- package/chunks/{publish.action-2QIOUMVY.js → publish.action-QMVDHDJZ.js} +22 -21
- package/chunks/{update.action-XZD6T5UR.js → update.action-GFDZIGEP.js} +17 -18
- package/chunks/{update.action-7QATFOGP.js → update.action-SNGKPS7A.js} +16 -17
- package/index.js +194 -154
- package/package.json +11 -11
- package/skills/scalar-cli/SKILL.md +3 -2
- package/template.md +76 -2
- package/chunks/chunk-YTJ67DWS.js +0 -32
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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-LVUMNGVA.js";
|
|
6
6
|
import {
|
|
7
7
|
completeFiles
|
|
8
8
|
} from "./chunks/chunk-DFOZG7ZV.js";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./chunks/chunk-V7DBDXSJ.js";
|
|
25
25
|
import {
|
|
26
26
|
normalizeVisibility
|
|
27
|
-
} from "./chunks/chunk-
|
|
27
|
+
} from "./chunks/chunk-RELSIFIL.js";
|
|
28
28
|
import {
|
|
29
29
|
DOCUMENT_FORMATS,
|
|
30
30
|
PRIVACY_VALUES
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
} from "./chunks/chunk-IRQJDPZE.js";
|
|
41
41
|
import {
|
|
42
42
|
SdkLanguage
|
|
43
|
-
} from "./chunks/chunk-
|
|
43
|
+
} from "./chunks/chunk-4BMOCIYO.js";
|
|
44
44
|
import {
|
|
45
45
|
checkNodeVersion
|
|
46
46
|
} from "./chunks/chunk-VUXPDHTQ.js";
|
|
@@ -48,13 +48,12 @@ import {
|
|
|
48
48
|
getMetadata,
|
|
49
49
|
logout,
|
|
50
50
|
setMetadata
|
|
51
|
-
} from "./chunks/chunk-
|
|
52
|
-
import "./chunks/chunk-YTJ67DWS.js";
|
|
51
|
+
} from "./chunks/chunk-ZMJW5UWU.js";
|
|
53
52
|
import {
|
|
54
53
|
bin,
|
|
55
54
|
name,
|
|
56
55
|
version
|
|
57
|
-
} from "./chunks/chunk-
|
|
56
|
+
} from "./chunks/chunk-7LUXRNKV.js";
|
|
58
57
|
import {
|
|
59
58
|
output
|
|
60
59
|
} from "./chunks/chunk-T5HJUAWB.js";
|
|
@@ -62,13 +61,13 @@ import {
|
|
|
62
61
|
err,
|
|
63
62
|
ok
|
|
64
63
|
} from "./chunks/chunk-DUIMDHQQ.js";
|
|
65
|
-
import "./chunks/chunk-
|
|
66
|
-
import "./chunks/chunk-
|
|
67
|
-
import "./chunks/chunk-
|
|
68
|
-
import "./chunks/chunk-
|
|
64
|
+
import "./chunks/chunk-Y3CXAIAG.js";
|
|
65
|
+
import "./chunks/chunk-GXKNYM54.js";
|
|
66
|
+
import "./chunks/chunk-RGJPENX7.js";
|
|
67
|
+
import "./chunks/chunk-5GZAGHKL.js";
|
|
69
68
|
import {
|
|
70
69
|
external_exports
|
|
71
|
-
} from "./chunks/chunk-
|
|
70
|
+
} from "./chunks/chunk-JBMHCTZD.js";
|
|
72
71
|
import "./chunks/chunk-3MZYUBJ6.js";
|
|
73
72
|
|
|
74
73
|
// src/index.ts
|
|
@@ -86,7 +85,7 @@ var DeleteSchemaCommand = () => {
|
|
|
86
85
|
cmd3.option("-s, --slug <slug>", "Schema slug");
|
|
87
86
|
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
88
87
|
cmd3.action(async (...args) => {
|
|
89
|
-
const { deleteAction } = await import("./chunks/delete.action-
|
|
88
|
+
const { deleteAction } = await import("./chunks/delete.action-AIWMDGXV.js");
|
|
90
89
|
return deleteAction(...args);
|
|
91
90
|
});
|
|
92
91
|
return cmd3;
|
|
@@ -143,7 +142,7 @@ var DiffSchemaCommand = () => {
|
|
|
143
142
|
);
|
|
144
143
|
completeFiles(cmd3, ["from", "to"], []);
|
|
145
144
|
cmd3.action(async (...args) => {
|
|
146
|
-
const { diffAction } = await import("./chunks/diff.action-
|
|
145
|
+
const { diffAction } = await import("./chunks/diff.action-LBK656RN.js");
|
|
147
146
|
return diffAction(...args);
|
|
148
147
|
});
|
|
149
148
|
return cmd3;
|
|
@@ -163,7 +162,7 @@ var GetSchemaCommand = () => {
|
|
|
163
162
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
164
163
|
completeFiles(cmd3, [], ["--output"]);
|
|
165
164
|
cmd3.action(async (...args) => {
|
|
166
|
-
const { getAction } = await import("./chunks/get.action-
|
|
165
|
+
const { getAction } = await import("./chunks/get.action-5SWRNQ3D.js");
|
|
167
166
|
return getAction(...args);
|
|
168
167
|
});
|
|
169
168
|
return cmd3;
|
|
@@ -177,7 +176,7 @@ var ListSchemaCommand = () => {
|
|
|
177
176
|
cmd3.option("--namespace <namespace>", "Team namespace");
|
|
178
177
|
cmd3.option("--json", "Output schema metadata as JSON");
|
|
179
178
|
cmd3.action(async (...args) => {
|
|
180
|
-
const { listAction } = await import("./chunks/list.action-
|
|
179
|
+
const { listAction } = await import("./chunks/list.action-YJZBC25S.js");
|
|
181
180
|
return listAction(...args);
|
|
182
181
|
});
|
|
183
182
|
return cmd3;
|
|
@@ -217,7 +216,7 @@ var PublishSchemaCommand = () => {
|
|
|
217
216
|
);
|
|
218
217
|
completeFiles(cmd3, ["file"], []);
|
|
219
218
|
cmd3.action(async (...args) => {
|
|
220
|
-
const { publishAction } = await import("./chunks/publish.action-
|
|
219
|
+
const { publishAction } = await import("./chunks/publish.action-QMVDHDJZ.js");
|
|
221
220
|
return publishAction(...args);
|
|
222
221
|
});
|
|
223
222
|
return cmd3;
|
|
@@ -252,7 +251,7 @@ var UpdateSchemaCommand = () => {
|
|
|
252
251
|
"\nOmitting visibility options leaves access unchanged.\nExample: scalar schema update --namespace acme --slug my-schema --public"
|
|
253
252
|
);
|
|
254
253
|
cmd3.action(async (...args) => {
|
|
255
|
-
const { updateAction } = await import("./chunks/update.action-
|
|
254
|
+
const { updateAction } = await import("./chunks/update.action-GFDZIGEP.js");
|
|
256
255
|
return updateAction(...args);
|
|
257
256
|
});
|
|
258
257
|
return cmd3;
|
|
@@ -298,7 +297,7 @@ var BuildSdkCommand = () => {
|
|
|
298
297
|
).choices(Object.values(SdkLanguage))
|
|
299
298
|
);
|
|
300
299
|
cmd3.action(async (...args) => {
|
|
301
|
-
const { buildAction } = await import("./chunks/build.action-
|
|
300
|
+
const { buildAction } = await import("./chunks/build.action-7MKMMV6V.js");
|
|
302
301
|
return buildAction(...args);
|
|
303
302
|
});
|
|
304
303
|
return cmd3;
|
|
@@ -318,7 +317,7 @@ var CreateSdkCommand = () => {
|
|
|
318
317
|
)
|
|
319
318
|
);
|
|
320
319
|
cmd3.action(async (...args) => {
|
|
321
|
-
const { createAction } = await import("./chunks/create.action-
|
|
320
|
+
const { createAction } = await import("./chunks/create.action-VA2ISPIM.js");
|
|
322
321
|
return createAction(...args);
|
|
323
322
|
});
|
|
324
323
|
return cmd3;
|
|
@@ -333,7 +332,7 @@ var DeleteSdkCommand = () => {
|
|
|
333
332
|
cmd3.option("-s, --slug <slug>", "SDK slug");
|
|
334
333
|
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
335
334
|
cmd3.action(async (...args) => {
|
|
336
|
-
const { deleteAction } = await import("./chunks/delete.action-
|
|
335
|
+
const { deleteAction } = await import("./chunks/delete.action-GEN6OD7A.js");
|
|
337
336
|
return deleteAction(...args);
|
|
338
337
|
});
|
|
339
338
|
return cmd3;
|
|
@@ -355,7 +354,7 @@ var UpdateSdkCommand = () => {
|
|
|
355
354
|
).choices([...PRIVACY_VALUES])
|
|
356
355
|
);
|
|
357
356
|
cmd3.action(async (...args) => {
|
|
358
|
-
const { updateAction } = await import("./chunks/update.action-
|
|
357
|
+
const { updateAction } = await import("./chunks/update.action-SNGKPS7A.js");
|
|
359
358
|
return updateAction(...args);
|
|
360
359
|
});
|
|
361
360
|
return cmd3;
|
|
@@ -372,7 +371,7 @@ var GetSdkCommand = () => {
|
|
|
372
371
|
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
373
372
|
cmd3.option("--json", "Output structured SDK metadata as JSON");
|
|
374
373
|
cmd3.action(async (...args) => {
|
|
375
|
-
const { getAction } = await import("./chunks/get.action-
|
|
374
|
+
const { getAction } = await import("./chunks/get.action-UPPPGGI4.js");
|
|
376
375
|
return getAction(...args);
|
|
377
376
|
});
|
|
378
377
|
return cmd3;
|
|
@@ -386,7 +385,7 @@ var ListSdkCommand = () => {
|
|
|
386
385
|
cmd3.option("--json", "Output structured SDK metadata as JSON");
|
|
387
386
|
cmd3.option("--namespace <namespace>", "Team namespace");
|
|
388
387
|
cmd3.action(async (...args) => {
|
|
389
|
-
const { listAction } = await import("./chunks/list.action-
|
|
388
|
+
const { listAction } = await import("./chunks/list.action-YOWWC4I4.js");
|
|
390
389
|
return listAction(...args);
|
|
391
390
|
});
|
|
392
391
|
return cmd3;
|
|
@@ -415,7 +414,7 @@ function createAllowlistCommand(field, descriptions) {
|
|
|
415
414
|
for (const operation of ["add", "remove"]) {
|
|
416
415
|
command.command(operation).description(descriptions[`${operation}Description`]).argument("<slug>", "Access group slug").argument(`<${field}>`, descriptions.valueDescription).option("--json", "Print the result as JSON").action(
|
|
417
416
|
async (slug, value, options) => {
|
|
418
|
-
const { runAction } = await import("./chunks/actions-
|
|
417
|
+
const { runAction } = await import("./chunks/actions-RCIS37Y6.js");
|
|
419
418
|
await runAction({
|
|
420
419
|
operation: `${operation}-${field}`,
|
|
421
420
|
slug,
|
|
@@ -432,28 +431,28 @@ function createAccessGroupCommand() {
|
|
|
432
431
|
"Manage access groups, allowed emails and domains for the current team"
|
|
433
432
|
);
|
|
434
433
|
command.command("list").description("List access groups for the current team").option("--json", "Print the result as JSON").action(async (options) => {
|
|
435
|
-
const { runAction } = await import("./chunks/actions-
|
|
434
|
+
const { runAction } = await import("./chunks/actions-RCIS37Y6.js");
|
|
436
435
|
await runAction({ operation: "list", ...options });
|
|
437
436
|
});
|
|
438
437
|
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(
|
|
439
438
|
async (slug, options) => {
|
|
440
|
-
const { runAction } = await import("./chunks/actions-
|
|
439
|
+
const { runAction } = await import("./chunks/actions-RCIS37Y6.js");
|
|
441
440
|
await runAction({ operation: "create", slug, ...options });
|
|
442
441
|
}
|
|
443
442
|
);
|
|
444
443
|
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) => {
|
|
445
|
-
const { runAction } = await import("./chunks/actions-
|
|
444
|
+
const { runAction } = await import("./chunks/actions-RCIS37Y6.js");
|
|
446
445
|
await runAction({ operation: "get", slug, ...options });
|
|
447
446
|
});
|
|
448
447
|
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(
|
|
449
448
|
async (slug, options) => {
|
|
450
|
-
const { runAction } = await import("./chunks/actions-
|
|
449
|
+
const { runAction } = await import("./chunks/actions-RCIS37Y6.js");
|
|
451
450
|
await runAction({ operation: "update", slug, ...options });
|
|
452
451
|
}
|
|
453
452
|
);
|
|
454
453
|
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(
|
|
455
454
|
async (slug, options) => {
|
|
456
|
-
const { runAction } = await import("./chunks/actions-
|
|
455
|
+
const { runAction } = await import("./chunks/actions-RCIS37Y6.js");
|
|
457
456
|
await runAction({ operation: "delete", slug, ...options });
|
|
458
457
|
}
|
|
459
458
|
);
|
|
@@ -502,7 +501,7 @@ var LoginCommand = () => {
|
|
|
502
501
|
).hideHelp()
|
|
503
502
|
);
|
|
504
503
|
cmd3.action(async (...args) => {
|
|
505
|
-
const { loginAction } = await import("./chunks/action-
|
|
504
|
+
const { loginAction } = await import("./chunks/action-ED5WLLIE.js");
|
|
506
505
|
return loginAction(...args);
|
|
507
506
|
});
|
|
508
507
|
return cmd3;
|
|
@@ -527,7 +526,7 @@ var WhoAmICommand = () => {
|
|
|
527
526
|
cmd3.description("Show the logged-in user and current team");
|
|
528
527
|
cmd3.option("--json", "Output authentication details as JSON");
|
|
529
528
|
cmd3.action(async (options) => {
|
|
530
|
-
const { whoamiAction } = await import("./chunks/action-
|
|
529
|
+
const { whoamiAction } = await import("./chunks/action-UPVVJE26.js");
|
|
531
530
|
return whoamiAction(options);
|
|
532
531
|
});
|
|
533
532
|
return cmd3;
|
|
@@ -586,7 +585,7 @@ cmd.action(async () => {
|
|
|
586
585
|
var context_default = cmd;
|
|
587
586
|
|
|
588
587
|
// src/domains/document/index.ts
|
|
589
|
-
import { Command as
|
|
588
|
+
import { Command as Command36 } from "commander";
|
|
590
589
|
|
|
591
590
|
// src/domains/document/join/index.ts
|
|
592
591
|
import { Command as Command22 } from "commander";
|
|
@@ -606,7 +605,7 @@ function JoinCommand() {
|
|
|
606
605
|
);
|
|
607
606
|
completeFiles(cmd3, ["files"], ["--output"]);
|
|
608
607
|
cmd3.action(async (...args) => {
|
|
609
|
-
const { joinAction } = await import("./chunks/action-
|
|
608
|
+
const { joinAction } = await import("./chunks/action-R53K22GE.js");
|
|
610
609
|
return joinAction(...args);
|
|
611
610
|
});
|
|
612
611
|
return cmd3;
|
|
@@ -630,16 +629,45 @@ function SplitCommand() {
|
|
|
630
629
|
);
|
|
631
630
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
632
631
|
cmd3.action(async (...args) => {
|
|
633
|
-
const { splitAction } = await import("./chunks/action-
|
|
632
|
+
const { splitAction } = await import("./chunks/action-7ZCJAWI2.js");
|
|
634
633
|
return splitAction(...args);
|
|
635
634
|
});
|
|
636
635
|
return cmd3;
|
|
637
636
|
}
|
|
638
637
|
|
|
638
|
+
// src/domains/document/transform/index.ts
|
|
639
|
+
import { Command as Command24 } from "commander";
|
|
640
|
+
var TransformCommand = () => {
|
|
641
|
+
const command = new Command24("transform").description("Create public or environment-specific API descriptions").argument("<file|url>", "OpenAPI or AsyncAPI description file path or URL").requiredOption(
|
|
642
|
+
"-c, --config <file>",
|
|
643
|
+
"JSON or YAML transformation configuration"
|
|
644
|
+
).requiredOption(
|
|
645
|
+
"-o, --output <file>",
|
|
646
|
+
"JSON or YAML output file, or - for stdout; source files cannot be overwritten"
|
|
647
|
+
).addHelpText(
|
|
648
|
+
"after",
|
|
649
|
+
"\nExample:\n scalar document transform api.yaml --config public.yaml --output public-api.yaml"
|
|
650
|
+
);
|
|
651
|
+
completeFiles(command, ["file|url"], ["--config", "--output"]);
|
|
652
|
+
command.action(
|
|
653
|
+
async (input, options) => {
|
|
654
|
+
const { transformAction } = await import("./chunks/action-F4CQ4DW3.js");
|
|
655
|
+
await transformAction(input, options).catch((error) => {
|
|
656
|
+
process.stderr.write(
|
|
657
|
+
`Could not transform API description: ${error instanceof Error ? error.message : String(error)}
|
|
658
|
+
`
|
|
659
|
+
);
|
|
660
|
+
process.exitCode = 1;
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
);
|
|
664
|
+
return command;
|
|
665
|
+
};
|
|
666
|
+
|
|
639
667
|
// src/domains/document/bundle/index.ts
|
|
640
|
-
import { Command as
|
|
668
|
+
import { Command as Command25, Option as Option8 } from "commander";
|
|
641
669
|
function BundleCommand() {
|
|
642
|
-
const cmd3 = new
|
|
670
|
+
const cmd3 = new Command25("bundle");
|
|
643
671
|
cmd3.description("Bundle external references into a single API description");
|
|
644
672
|
cmd3.argument("[file|url]", "API description file path or URL to bundle");
|
|
645
673
|
cmd3.option(
|
|
@@ -669,16 +697,16 @@ function BundleCommand() {
|
|
|
669
697
|
);
|
|
670
698
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
671
699
|
cmd3.action(async (...args) => {
|
|
672
|
-
const { bundleAction } = await import("./chunks/action-
|
|
700
|
+
const { bundleAction } = await import("./chunks/action-CYU5Q5LT.js");
|
|
673
701
|
return bundleAction(...args);
|
|
674
702
|
});
|
|
675
703
|
return cmd3;
|
|
676
704
|
}
|
|
677
705
|
|
|
678
706
|
// src/domains/document/format/index.ts
|
|
679
|
-
import { Command as
|
|
707
|
+
import { Command as Command26 } from "commander";
|
|
680
708
|
function FormatCommand() {
|
|
681
|
-
const cmd3 = new
|
|
709
|
+
const cmd3 = new Command26("format");
|
|
682
710
|
cmd3.description("Format an OpenAPI or AsyncAPI description");
|
|
683
711
|
cmd3.argument(
|
|
684
712
|
"[file|url]",
|
|
@@ -690,14 +718,14 @@ function FormatCommand() {
|
|
|
690
718
|
);
|
|
691
719
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
692
720
|
cmd3.action(async (...args) => {
|
|
693
|
-
const { formatAction } = await import("./chunks/action-
|
|
721
|
+
const { formatAction } = await import("./chunks/action-A6YOY24G.js");
|
|
694
722
|
return formatAction(...args);
|
|
695
723
|
});
|
|
696
724
|
return cmd3;
|
|
697
725
|
}
|
|
698
726
|
|
|
699
727
|
// src/domains/document/lint/index.ts
|
|
700
|
-
import { Command as
|
|
728
|
+
import { Command as Command27, InvalidArgumentError as InvalidArgumentError2, Option as Option9 } from "commander";
|
|
701
729
|
|
|
702
730
|
// src/domains/document/lint/formats.ts
|
|
703
731
|
var reportFormats = [
|
|
@@ -712,9 +740,16 @@ var reportFormats = [
|
|
|
712
740
|
|
|
713
741
|
// src/domains/document/lint/index.ts
|
|
714
742
|
function LintCommand() {
|
|
715
|
-
const cmd3 = new
|
|
716
|
-
cmd3.description("Lint
|
|
717
|
-
cmd3.argument(
|
|
743
|
+
const cmd3 = new Command27("lint");
|
|
744
|
+
cmd3.description("Lint OpenAPI or AsyncAPI descriptions with Spectral rules");
|
|
745
|
+
cmd3.argument(
|
|
746
|
+
"[file|url...]",
|
|
747
|
+
"API description files or URLs (defaults to APIs in scalar.config)"
|
|
748
|
+
);
|
|
749
|
+
cmd3.option(
|
|
750
|
+
"--config <file>",
|
|
751
|
+
"Scalar configuration file to read when no inputs are provided"
|
|
752
|
+
);
|
|
718
753
|
cmd3.option("-r, --rule <file|url>", "Spectral ruleset file path or URL");
|
|
719
754
|
cmd3.addOption(
|
|
720
755
|
new Option9("--format <format>", "Report format").choices([...reportFormats]).default("codeframe")
|
|
@@ -741,33 +776,37 @@ function LintCommand() {
|
|
|
741
776
|
"--ignore-file <file>",
|
|
742
777
|
"Ignore baseline path (Scalar file takes priority over Redocly fallback in the current directory)"
|
|
743
778
|
);
|
|
744
|
-
completeFiles(
|
|
779
|
+
completeFiles(
|
|
780
|
+
cmd3,
|
|
781
|
+
["file|url"],
|
|
782
|
+
["--rule", "--output", "--ignore-file", "--config"]
|
|
783
|
+
);
|
|
745
784
|
cmd3.action(async (...args) => {
|
|
746
|
-
const { lintAction } = await import("./chunks/action-
|
|
785
|
+
const { lintAction } = await import("./chunks/action-7GZGVTYI.js");
|
|
747
786
|
return lintAction(...args);
|
|
748
787
|
});
|
|
749
788
|
return cmd3;
|
|
750
789
|
}
|
|
751
790
|
|
|
752
791
|
// src/domains/document/markdown/index.ts
|
|
753
|
-
import { Command as
|
|
792
|
+
import { Command as Command28 } from "commander";
|
|
754
793
|
function MarkdownCommand() {
|
|
755
|
-
const cmd3 = new
|
|
794
|
+
const cmd3 = new Command28("markdown");
|
|
756
795
|
cmd3.description("Generate Markdown documentation from an OpenAPI description");
|
|
757
796
|
cmd3.argument("[file|url]", "OpenAPI file path or URL to convert");
|
|
758
797
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
759
798
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
760
799
|
cmd3.action(async (...args) => {
|
|
761
|
-
const { markdownAction } = await import("./chunks/action-
|
|
800
|
+
const { markdownAction } = await import("./chunks/action-T3R4SDAI.js");
|
|
762
801
|
return markdownAction(...args);
|
|
763
802
|
});
|
|
764
803
|
return cmd3;
|
|
765
804
|
}
|
|
766
805
|
|
|
767
806
|
// src/domains/document/mock/index.ts
|
|
768
|
-
import { Command as
|
|
807
|
+
import { Command as Command29 } from "commander";
|
|
769
808
|
function MockCommand() {
|
|
770
|
-
const cmd3 = new
|
|
809
|
+
const cmd3 = new Command29("mock");
|
|
771
810
|
cmd3.description(
|
|
772
811
|
"Run a Mock Server for OpenAPI operations or AsyncAPI WebSocket and SSE channels"
|
|
773
812
|
);
|
|
@@ -776,16 +815,16 @@ function MockCommand() {
|
|
|
776
815
|
cmd3.option("-p, --port <port>", "HTTP port for the Mock Server", parsePort);
|
|
777
816
|
completeFiles(cmd3, ["file|url"], []);
|
|
778
817
|
cmd3.action(async (...args) => {
|
|
779
|
-
const { mockAction } = await import("./chunks/action-
|
|
818
|
+
const { mockAction } = await import("./chunks/action-V35W4MRK.js");
|
|
780
819
|
await mockAction(...args);
|
|
781
820
|
});
|
|
782
821
|
return cmd3;
|
|
783
822
|
}
|
|
784
823
|
|
|
785
824
|
// src/domains/document/postman/index.ts
|
|
786
|
-
import { Command as
|
|
825
|
+
import { Command as Command30 } from "commander";
|
|
787
826
|
function ConvertCommand() {
|
|
788
|
-
const cmd3 = new
|
|
827
|
+
const cmd3 = new Command30("convert");
|
|
789
828
|
cmd3.description("Convert a Postman collection to an OpenAPI description");
|
|
790
829
|
cmd3.argument("[file|url]", "Postman collection file path or URL to convert");
|
|
791
830
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
@@ -795,16 +834,16 @@ function ConvertCommand() {
|
|
|
795
834
|
);
|
|
796
835
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
797
836
|
cmd3.action(async (...args) => {
|
|
798
|
-
const { convertAction } = await import("./chunks/action-
|
|
837
|
+
const { convertAction } = await import("./chunks/action-W4KGRBRV.js");
|
|
799
838
|
return convertAction(...args);
|
|
800
839
|
});
|
|
801
840
|
return cmd3;
|
|
802
841
|
}
|
|
803
842
|
|
|
804
843
|
// src/domains/document/serve/index.ts
|
|
805
|
-
import { Command as
|
|
844
|
+
import { Command as Command31 } from "commander";
|
|
806
845
|
function ServeCommand() {
|
|
807
|
-
const cmd3 = new
|
|
846
|
+
const cmd3 = new Command31("serve");
|
|
808
847
|
cmd3.description(
|
|
809
848
|
"Serve API Reference documentation from an OpenAPI or AsyncAPI description"
|
|
810
849
|
);
|
|
@@ -821,16 +860,16 @@ function ServeCommand() {
|
|
|
821
860
|
);
|
|
822
861
|
completeFiles(cmd3, ["file|url"], ["--config"]);
|
|
823
862
|
cmd3.action(async (...args) => {
|
|
824
|
-
const { serveAction } = await import("./chunks/action-
|
|
863
|
+
const { serveAction } = await import("./chunks/action-IWEAWDT3.js");
|
|
825
864
|
await serveAction(...args);
|
|
826
865
|
});
|
|
827
866
|
return cmd3;
|
|
828
867
|
}
|
|
829
868
|
|
|
830
869
|
// src/domains/document/share/index.ts
|
|
831
|
-
import { Command as
|
|
870
|
+
import { Command as Command32 } from "commander";
|
|
832
871
|
function ShareCommand() {
|
|
833
|
-
const cmd3 = new
|
|
872
|
+
const cmd3 = new Command32("share");
|
|
834
873
|
cmd3.description(
|
|
835
874
|
"Publish an OpenAPI or AsyncAPI description to a public sandbox"
|
|
836
875
|
);
|
|
@@ -841,16 +880,16 @@ function ShareCommand() {
|
|
|
841
880
|
);
|
|
842
881
|
completeFiles(cmd3, ["file"], []);
|
|
843
882
|
cmd3.action(async (...args) => {
|
|
844
|
-
const { shareAction } = await import("./chunks/action-
|
|
883
|
+
const { shareAction } = await import("./chunks/action-4BDZ2CXP.js");
|
|
845
884
|
return shareAction(...args);
|
|
846
885
|
});
|
|
847
886
|
return cmd3;
|
|
848
887
|
}
|
|
849
888
|
|
|
850
889
|
// src/domains/document/upgrade/index.ts
|
|
851
|
-
import { Command as
|
|
890
|
+
import { Command as Command33 } from "commander";
|
|
852
891
|
function UpgradeCommand() {
|
|
853
|
-
const cmd3 = new
|
|
892
|
+
const cmd3 = new Command33("upgrade");
|
|
854
893
|
cmd3.description(
|
|
855
894
|
"Upgrade an API description to OpenAPI 3.1 or the latest supported AsyncAPI version"
|
|
856
895
|
);
|
|
@@ -861,30 +900,30 @@ function UpgradeCommand() {
|
|
|
861
900
|
);
|
|
862
901
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
863
902
|
cmd3.action(async (...args) => {
|
|
864
|
-
const { upgradeAction } = await import("./chunks/action-
|
|
903
|
+
const { upgradeAction } = await import("./chunks/action-H5VRLFCY.js");
|
|
865
904
|
return upgradeAction(...args);
|
|
866
905
|
});
|
|
867
906
|
return cmd3;
|
|
868
907
|
}
|
|
869
908
|
|
|
870
909
|
// src/domains/document/validate/index.ts
|
|
871
|
-
import { Command as
|
|
910
|
+
import { Command as Command34 } from "commander";
|
|
872
911
|
function ValidateCommand() {
|
|
873
|
-
const cmd3 = new
|
|
912
|
+
const cmd3 = new Command34("validate");
|
|
874
913
|
cmd3.description("Validate an OpenAPI or AsyncAPI description");
|
|
875
914
|
cmd3.argument("[file|url]", "File or URL to validate");
|
|
876
915
|
completeFiles(cmd3, ["file|url"], []);
|
|
877
916
|
cmd3.action(async (...args) => {
|
|
878
|
-
const { validateAction } = await import("./chunks/action-
|
|
917
|
+
const { validateAction } = await import("./chunks/action-COFGCCYS.js");
|
|
879
918
|
return validateAction(...args);
|
|
880
919
|
});
|
|
881
920
|
return cmd3;
|
|
882
921
|
}
|
|
883
922
|
|
|
884
923
|
// src/domains/document/void/index.ts
|
|
885
|
-
import { Command as
|
|
924
|
+
import { Command as Command35 } from "commander";
|
|
886
925
|
function VoidCommand() {
|
|
887
|
-
const cmd3 = new
|
|
926
|
+
const cmd3 = new Command35("void");
|
|
888
927
|
cmd3.description("Mirror HTTP requests with a local server");
|
|
889
928
|
cmd3.option(
|
|
890
929
|
"-p, --port <port>",
|
|
@@ -901,6 +940,7 @@ function VoidCommand() {
|
|
|
901
940
|
// src/domains/document/index.ts
|
|
902
941
|
var documentCommands = [
|
|
903
942
|
BundleCommand,
|
|
943
|
+
TransformCommand,
|
|
904
944
|
SplitCommand,
|
|
905
945
|
JoinCommand,
|
|
906
946
|
FormatCommand,
|
|
@@ -914,30 +954,30 @@ var documentCommands = [
|
|
|
914
954
|
LintCommand,
|
|
915
955
|
UpgradeCommand
|
|
916
956
|
];
|
|
917
|
-
var documentDomain = new
|
|
957
|
+
var documentDomain = new Command36("document");
|
|
918
958
|
documentDomain.description("Work with OpenAPI and AsyncAPI descriptions");
|
|
919
959
|
documentCommands.forEach((command) => documentDomain.addCommand(command()));
|
|
920
960
|
var document_default = documentDomain;
|
|
921
961
|
|
|
922
962
|
// src/domains/mcp/index.ts
|
|
923
|
-
import { Command as
|
|
924
|
-
var mcpDomain = new
|
|
963
|
+
import { Command as Command37 } from "commander";
|
|
964
|
+
var mcpDomain = new Command37("mcp").description(
|
|
925
965
|
"Manage Scalar-hosted MCP servers"
|
|
926
966
|
);
|
|
927
967
|
mcpDomain.addCommand(
|
|
928
|
-
new
|
|
929
|
-
const { listAction } = await import("./chunks/actions-
|
|
968
|
+
new Command37("list").description("List MCP servers in the current team").option("--json", "Output server metadata as JSON").action(async (options) => {
|
|
969
|
+
const { listAction } = await import("./chunks/actions-CERT7BL4.js");
|
|
930
970
|
return listAction(options);
|
|
931
971
|
})
|
|
932
972
|
);
|
|
933
973
|
mcpDomain.addCommand(
|
|
934
|
-
new
|
|
935
|
-
const { getAction } = await import("./chunks/actions-
|
|
974
|
+
new Command37("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) => {
|
|
975
|
+
const { getAction } = await import("./chunks/actions-CERT7BL4.js");
|
|
936
976
|
return getAction(id, options);
|
|
937
977
|
})
|
|
938
978
|
);
|
|
939
979
|
mcpDomain.addCommand(
|
|
940
|
-
new
|
|
980
|
+
new Command37("create").description(
|
|
941
981
|
"Create an MCP server from an existing Registry API or Docs project"
|
|
942
982
|
).requiredOption("--name <name>", "Server name").option("--slug <slug>", "Server slug (generated from the name by default)").option(
|
|
943
983
|
"--api <reference>",
|
|
@@ -946,31 +986,31 @@ mcpDomain.addCommand(
|
|
|
946
986
|
"after",
|
|
947
987
|
"\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"
|
|
948
988
|
).action(async (options) => {
|
|
949
|
-
const { createAction } = await import("./chunks/actions-
|
|
989
|
+
const { createAction } = await import("./chunks/actions-CERT7BL4.js");
|
|
950
990
|
return createAction(options);
|
|
951
991
|
})
|
|
952
992
|
);
|
|
953
993
|
mcpDomain.addCommand(
|
|
954
|
-
new
|
|
955
|
-
const { updateAction } = await import("./chunks/actions-
|
|
994
|
+
new Command37("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) => {
|
|
995
|
+
const { updateAction } = await import("./chunks/actions-CERT7BL4.js");
|
|
956
996
|
return updateAction(id, options);
|
|
957
997
|
})
|
|
958
998
|
);
|
|
959
999
|
mcpDomain.addCommand(
|
|
960
|
-
new
|
|
961
|
-
const { deleteAction } = await import("./chunks/actions-
|
|
1000
|
+
new Command37("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) => {
|
|
1001
|
+
const { deleteAction } = await import("./chunks/actions-CERT7BL4.js");
|
|
962
1002
|
return deleteAction(id, options);
|
|
963
1003
|
})
|
|
964
1004
|
);
|
|
965
1005
|
var mcp_default = mcpDomain;
|
|
966
1006
|
|
|
967
1007
|
// src/domains/project/index.ts
|
|
968
|
-
import { Command as
|
|
1008
|
+
import { Command as Command50 } from "commander";
|
|
969
1009
|
|
|
970
1010
|
// src/domains/project/preview/index.ts
|
|
971
|
-
import { Command as
|
|
1011
|
+
import { Command as Command38, Option as Option10 } from "commander";
|
|
972
1012
|
var PreviewCommand = () => {
|
|
973
|
-
const cmd3 = new
|
|
1013
|
+
const cmd3 = new Command38("preview");
|
|
974
1014
|
cmd3.description("Preview a Scalar Docs project locally");
|
|
975
1015
|
cmd3.argument(
|
|
976
1016
|
"[config]",
|
|
@@ -988,16 +1028,16 @@ var PreviewCommand = () => {
|
|
|
988
1028
|
cmd3.option("-N, --no-open", "Do not open the browser automatically", true);
|
|
989
1029
|
completeFiles(cmd3, ["config"], []);
|
|
990
1030
|
cmd3.action(async (...args) => {
|
|
991
|
-
const { previewAction } = await import("./chunks/action-
|
|
1031
|
+
const { previewAction } = await import("./chunks/action-KVM76ZKQ.js");
|
|
992
1032
|
return previewAction(...args);
|
|
993
1033
|
});
|
|
994
1034
|
return cmd3;
|
|
995
1035
|
};
|
|
996
1036
|
|
|
997
1037
|
// src/domains/project/check-config/index.ts
|
|
998
|
-
import { Command as
|
|
1038
|
+
import { Command as Command39 } from "commander";
|
|
999
1039
|
function CheckConfigCommand() {
|
|
1000
|
-
const cmd3 = new
|
|
1040
|
+
const cmd3 = new Command39("check-config");
|
|
1001
1041
|
cmd3.description("Validate a Scalar configuration file");
|
|
1002
1042
|
cmd3.argument(
|
|
1003
1043
|
"[file]",
|
|
@@ -1005,53 +1045,53 @@ function CheckConfigCommand() {
|
|
|
1005
1045
|
);
|
|
1006
1046
|
completeFiles(cmd3, ["file"], []);
|
|
1007
1047
|
cmd3.action(async (...args) => {
|
|
1008
|
-
const { checkConfigAction } = await import("./chunks/action-
|
|
1048
|
+
const { checkConfigAction } = await import("./chunks/action-SJPWL723.js");
|
|
1009
1049
|
return checkConfigAction(...args);
|
|
1010
1050
|
});
|
|
1011
1051
|
return cmd3;
|
|
1012
1052
|
}
|
|
1013
1053
|
|
|
1014
1054
|
// src/domains/project/create/index.ts
|
|
1015
|
-
import { Command as
|
|
1055
|
+
import { Command as Command40 } from "commander";
|
|
1016
1056
|
var CreateCommand = () => {
|
|
1017
|
-
const cmd3 = new
|
|
1057
|
+
const cmd3 = new Command40("create");
|
|
1018
1058
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
1019
1059
|
cmd3.description("Create a Scalar project without a linked GitHub repository");
|
|
1020
1060
|
cmd3.option("-n, --name <name>", "Project name");
|
|
1021
1061
|
cmd3.option("-s, --slug <slug>", "Project slug");
|
|
1022
1062
|
cmd3.action(async (...args) => {
|
|
1023
|
-
const { createAction } = await import("./chunks/action-
|
|
1063
|
+
const { createAction } = await import("./chunks/action-5AXDB5VN.js");
|
|
1024
1064
|
return createAction(...args);
|
|
1025
1065
|
});
|
|
1026
1066
|
return cmd3;
|
|
1027
1067
|
};
|
|
1028
1068
|
|
|
1029
1069
|
// src/domains/project/deployments/index.ts
|
|
1030
|
-
import { Command as
|
|
1070
|
+
import { Command as Command43 } from "commander";
|
|
1031
1071
|
|
|
1032
1072
|
// src/domains/project/deployments/get/index.ts
|
|
1033
|
-
import { Command as
|
|
1034
|
-
var GetCommand = () => new
|
|
1073
|
+
import { Command as Command41 } from "commander";
|
|
1074
|
+
var GetCommand = () => new Command41("get").description(
|
|
1035
1075
|
"Inspect an existing build in the selected team without resubmitting"
|
|
1036
1076
|
).argument("<build-id>", "Accepted build ID, including preview builds").option("--wait", "Wait for deployment instead of inspecting once").option(
|
|
1037
1077
|
"--timeout <seconds>",
|
|
1038
1078
|
"Maximum status wait in seconds (default: 30, or 600 with --wait)"
|
|
1039
1079
|
).action(
|
|
1040
1080
|
async (buildId, options) => {
|
|
1041
|
-
const { getAction } = await import("./chunks/action-
|
|
1081
|
+
const { getAction } = await import("./chunks/action-QP6MRSQW.js");
|
|
1042
1082
|
await getAction(buildId, options);
|
|
1043
1083
|
}
|
|
1044
1084
|
);
|
|
1045
1085
|
|
|
1046
1086
|
// src/domains/project/deployments/list/index.ts
|
|
1047
|
-
import { Command as
|
|
1087
|
+
import { Command as Command42 } from "commander";
|
|
1048
1088
|
var ListCommand = () => {
|
|
1049
|
-
const cmd3 = new
|
|
1089
|
+
const cmd3 = new Command42("list");
|
|
1050
1090
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
1051
1091
|
cmd3.description("List production deployments for a project");
|
|
1052
1092
|
cmd3.option("-s, --slug [slug]", "Project slug from scalar project list");
|
|
1053
1093
|
cmd3.action(async (...args) => {
|
|
1054
|
-
const { listAction } = await import("./chunks/action-
|
|
1094
|
+
const { listAction } = await import("./chunks/action-AGGHY4N2.js");
|
|
1055
1095
|
return listAction(...args);
|
|
1056
1096
|
});
|
|
1057
1097
|
return cmd3;
|
|
@@ -1059,7 +1099,7 @@ var ListCommand = () => {
|
|
|
1059
1099
|
|
|
1060
1100
|
// src/domains/project/deployments/index.ts
|
|
1061
1101
|
var DeploymentsCommand = () => {
|
|
1062
|
-
const cmd3 = new
|
|
1102
|
+
const cmd3 = new Command43("deployments");
|
|
1063
1103
|
cmd3.description("Show project deployment history");
|
|
1064
1104
|
cmd3.addCommand(ListCommand());
|
|
1065
1105
|
cmd3.addCommand(GetCommand());
|
|
@@ -1067,12 +1107,12 @@ var DeploymentsCommand = () => {
|
|
|
1067
1107
|
};
|
|
1068
1108
|
|
|
1069
1109
|
// src/domains/project/get/index.ts
|
|
1070
|
-
import { Command as
|
|
1110
|
+
import { Command as Command44 } from "commander";
|
|
1071
1111
|
function GetCommand2() {
|
|
1072
|
-
const command = new
|
|
1112
|
+
const command = new Command44("get").description("Show project details for the current team").argument("<slug>", "Project slug from scalar project list").option("--json", "Print project details as JSON");
|
|
1073
1113
|
command.action(
|
|
1074
1114
|
async (slug, options) => {
|
|
1075
|
-
const { getAction } = await import("./chunks/action-
|
|
1115
|
+
const { getAction } = await import("./chunks/action-JN6JVQUV.js");
|
|
1076
1116
|
await getAction(slug, options);
|
|
1077
1117
|
}
|
|
1078
1118
|
);
|
|
@@ -1080,9 +1120,9 @@ function GetCommand2() {
|
|
|
1080
1120
|
}
|
|
1081
1121
|
|
|
1082
1122
|
// src/domains/project/init/index.ts
|
|
1083
|
-
import { Command as
|
|
1123
|
+
import { Command as Command45 } from "commander";
|
|
1084
1124
|
var InitCommand = () => {
|
|
1085
|
-
const cmd3 = new
|
|
1125
|
+
const cmd3 = new Command45("init");
|
|
1086
1126
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
1087
1127
|
cmd3.description("Initialize a local Scalar Docs project");
|
|
1088
1128
|
cmd3.option(
|
|
@@ -1094,27 +1134,27 @@ var InitCommand = () => {
|
|
|
1094
1134
|
"Replace the configuration, docs-quickstart.md, and docs-openapi.json"
|
|
1095
1135
|
);
|
|
1096
1136
|
cmd3.action(async (...args) => {
|
|
1097
|
-
const { initAction } = await import("./chunks/action-
|
|
1137
|
+
const { initAction } = await import("./chunks/action-6WZN63LT.js");
|
|
1098
1138
|
return initAction(...args);
|
|
1099
1139
|
});
|
|
1100
1140
|
return cmd3;
|
|
1101
1141
|
};
|
|
1102
1142
|
|
|
1103
1143
|
// src/domains/project/list/index.ts
|
|
1104
|
-
import { Command as
|
|
1144
|
+
import { Command as Command46 } from "commander";
|
|
1105
1145
|
function ListCommand2() {
|
|
1106
|
-
const command = new
|
|
1146
|
+
const command = new Command46("list").description("List projects and their slugs for the current team").option("--json", "Print project details as JSON");
|
|
1107
1147
|
command.action(async (options) => {
|
|
1108
|
-
const { listAction } = await import("./chunks/action-
|
|
1148
|
+
const { listAction } = await import("./chunks/action-TT7ZJNST.js");
|
|
1109
1149
|
await listAction(options);
|
|
1110
1150
|
});
|
|
1111
1151
|
return command;
|
|
1112
1152
|
}
|
|
1113
1153
|
|
|
1114
1154
|
// src/domains/project/publish/index.ts
|
|
1115
|
-
import { Command as
|
|
1155
|
+
import { Command as Command47 } from "commander";
|
|
1116
1156
|
var PublishCommand = () => {
|
|
1117
|
-
const cmd3 = new
|
|
1157
|
+
const cmd3 = new Command47("publish");
|
|
1118
1158
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
1119
1159
|
cmd3.description("Publish a new build of a Scalar project");
|
|
1120
1160
|
cmd3.option("-s, --slug [slug]", "Project slug from scalar project list");
|
|
@@ -1140,16 +1180,16 @@ var PublishCommand = () => {
|
|
|
1140
1180
|
);
|
|
1141
1181
|
completeFiles(cmd3, [], ["--config"]);
|
|
1142
1182
|
cmd3.action(async (...args) => {
|
|
1143
|
-
const { publishAction } = await import("./chunks/action-
|
|
1183
|
+
const { publishAction } = await import("./chunks/action-6I3TJLRO.js");
|
|
1144
1184
|
return publishAction(...args);
|
|
1145
1185
|
});
|
|
1146
1186
|
return cmd3;
|
|
1147
1187
|
};
|
|
1148
1188
|
|
|
1149
1189
|
// src/domains/project/rollback/index.ts
|
|
1150
|
-
import { Command as
|
|
1190
|
+
import { Command as Command48 } from "commander";
|
|
1151
1191
|
var RollbackCommand = () => {
|
|
1152
|
-
const cmd3 = new
|
|
1192
|
+
const cmd3 = new Command48("rollback");
|
|
1153
1193
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
1154
1194
|
cmd3.description(
|
|
1155
1195
|
"Roll the live deployment back to a previously deployed build."
|
|
@@ -1161,16 +1201,16 @@ var RollbackCommand = () => {
|
|
|
1161
1201
|
);
|
|
1162
1202
|
cmd3.option("-y, --yes", "Skip the confirmation prompt");
|
|
1163
1203
|
cmd3.action(async (...args) => {
|
|
1164
|
-
const { rollbackAction } = await import("./chunks/action-
|
|
1204
|
+
const { rollbackAction } = await import("./chunks/action-DTQH6CKR.js");
|
|
1165
1205
|
return rollbackAction(...args);
|
|
1166
1206
|
});
|
|
1167
1207
|
return cmd3;
|
|
1168
1208
|
};
|
|
1169
1209
|
|
|
1170
1210
|
// src/domains/project/upgrade/index.ts
|
|
1171
|
-
import { Command as
|
|
1211
|
+
import { Command as Command49 } from "commander";
|
|
1172
1212
|
var UpgradeCommand2 = () => {
|
|
1173
|
-
const cmd3 = new
|
|
1213
|
+
const cmd3 = new Command49("upgrade");
|
|
1174
1214
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
1175
1215
|
cmd3.description("Upgrade a Scalar Docs configuration");
|
|
1176
1216
|
cmd3.argument(
|
|
@@ -1179,7 +1219,7 @@ var UpgradeCommand2 = () => {
|
|
|
1179
1219
|
);
|
|
1180
1220
|
completeFiles(cmd3, ["config"], []);
|
|
1181
1221
|
cmd3.action(async (...args) => {
|
|
1182
|
-
const { upgradeAction } = await import("./chunks/action-
|
|
1222
|
+
const { upgradeAction } = await import("./chunks/action-QC72LLYE.js");
|
|
1183
1223
|
return upgradeAction(...args);
|
|
1184
1224
|
});
|
|
1185
1225
|
return cmd3;
|
|
@@ -1198,7 +1238,7 @@ var projectCommands = [
|
|
|
1198
1238
|
DeploymentsCommand,
|
|
1199
1239
|
UpgradeCommand2
|
|
1200
1240
|
];
|
|
1201
|
-
var projectDomain = new
|
|
1241
|
+
var projectDomain = new Command50("project");
|
|
1202
1242
|
projectDomain.description("Manage Scalar Docs projects");
|
|
1203
1243
|
for (const command of projectCommands) {
|
|
1204
1244
|
projectDomain.addCommand(command());
|
|
@@ -1207,11 +1247,11 @@ projectDomain.addCommand(DownloadIsolateCommand(), { hidden: true });
|
|
|
1207
1247
|
var project_default = projectDomain;
|
|
1208
1248
|
|
|
1209
1249
|
// src/domains/readme/index.ts
|
|
1210
|
-
import { Command as
|
|
1250
|
+
import { Command as Command52 } from "commander";
|
|
1211
1251
|
|
|
1212
1252
|
// src/domains/readme/generate.ts
|
|
1213
1253
|
import as from "ansis";
|
|
1214
|
-
import { Command as
|
|
1254
|
+
import { Command as Command51 } from "commander";
|
|
1215
1255
|
|
|
1216
1256
|
// src/helpers/documentation/index.ts
|
|
1217
1257
|
import fs from "node:fs/promises";
|
|
@@ -1245,7 +1285,7 @@ var generateDocumentationFile = async (outputPath) => {
|
|
|
1245
1285
|
|
|
1246
1286
|
// src/domains/readme/generate.ts
|
|
1247
1287
|
function GenerateReadmeCommand() {
|
|
1248
|
-
const cmd3 = new
|
|
1288
|
+
const cmd3 = new Command51("generate");
|
|
1249
1289
|
cmd3.description("Generate the CLI README from the command tree");
|
|
1250
1290
|
cmd3.option(
|
|
1251
1291
|
"-o, --output [file]",
|
|
@@ -1297,18 +1337,18 @@ function ServeReadmeCommand(cmd3) {
|
|
|
1297
1337
|
}
|
|
1298
1338
|
|
|
1299
1339
|
// src/domains/readme/index.ts
|
|
1300
|
-
var readmeDomain = new
|
|
1340
|
+
var readmeDomain = new Command52("readme");
|
|
1301
1341
|
readmeDomain.addCommand(GenerateReadmeCommand());
|
|
1302
1342
|
ServeReadmeCommand(readmeDomain);
|
|
1303
1343
|
var readme_default = readmeDomain;
|
|
1304
1344
|
|
|
1305
1345
|
// src/domains/registry/index.ts
|
|
1306
|
-
import { Command as
|
|
1346
|
+
import { Command as Command58 } from "commander";
|
|
1307
1347
|
|
|
1308
1348
|
// src/domains/registry/publish/index.ts
|
|
1309
|
-
import { Command as
|
|
1349
|
+
import { Command as Command53 } from "commander";
|
|
1310
1350
|
var PublishCommand2 = () => {
|
|
1311
|
-
const cmd3 = new
|
|
1351
|
+
const cmd3 = new Command53("publish");
|
|
1312
1352
|
cmd3.option("--json", "Output the mutation result as JSON without prompting");
|
|
1313
1353
|
cmd3.description("Publish an OpenAPI description to the Scalar Registry");
|
|
1314
1354
|
cmd3.argument("[file]", "API description file path or URL to upload");
|
|
@@ -1345,31 +1385,31 @@ var PublishCommand2 = () => {
|
|
|
1345
1385
|
);
|
|
1346
1386
|
completeFiles(cmd3, ["file"], []);
|
|
1347
1387
|
cmd3.action(async (...args) => {
|
|
1348
|
-
const { publishAction } = await import("./chunks/action-
|
|
1388
|
+
const { publishAction } = await import("./chunks/action-ZU5X2KQX.js");
|
|
1349
1389
|
return publishAction(...args);
|
|
1350
1390
|
});
|
|
1351
1391
|
return cmd3;
|
|
1352
1392
|
};
|
|
1353
1393
|
|
|
1354
1394
|
// src/domains/registry/delete/index.ts
|
|
1355
|
-
import { Command as
|
|
1395
|
+
import { Command as Command54 } from "commander";
|
|
1356
1396
|
var DeleteCommand = () => {
|
|
1357
|
-
const cmd3 = new
|
|
1397
|
+
const cmd3 = new Command54("delete");
|
|
1358
1398
|
cmd3.option("--json", "Output the mutation result as JSON without prompting");
|
|
1359
1399
|
cmd3.description("Delete an API description from the Scalar Registry");
|
|
1360
1400
|
cmd3.argument("[namespace]", "Team namespace");
|
|
1361
1401
|
cmd3.argument("[slug]", "API description slug");
|
|
1362
1402
|
cmd3.action(async (...args) => {
|
|
1363
|
-
const { deleteAction } = await import("./chunks/action-
|
|
1403
|
+
const { deleteAction } = await import("./chunks/action-ZIVYJCC2.js");
|
|
1364
1404
|
return deleteAction(...args);
|
|
1365
1405
|
});
|
|
1366
1406
|
return cmd3;
|
|
1367
1407
|
};
|
|
1368
1408
|
|
|
1369
1409
|
// src/domains/registry/get/index.ts
|
|
1370
|
-
import { Command as
|
|
1410
|
+
import { Command as Command55, Option as Option11 } from "commander";
|
|
1371
1411
|
var GetCommand3 = () => {
|
|
1372
|
-
const cmd3 = new
|
|
1412
|
+
const cmd3 = new Command55("get");
|
|
1373
1413
|
cmd3.description(
|
|
1374
1414
|
"Download an API description version from the Scalar Registry"
|
|
1375
1415
|
);
|
|
@@ -1385,30 +1425,30 @@ var GetCommand3 = () => {
|
|
|
1385
1425
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
1386
1426
|
completeFiles(cmd3, [], ["--output"]);
|
|
1387
1427
|
cmd3.action(async (...args) => {
|
|
1388
|
-
const { getAction } = await import("./chunks/action-
|
|
1428
|
+
const { getAction } = await import("./chunks/action-PEG7AUA6.js");
|
|
1389
1429
|
return getAction(...args);
|
|
1390
1430
|
});
|
|
1391
1431
|
return cmd3;
|
|
1392
1432
|
};
|
|
1393
1433
|
|
|
1394
1434
|
// src/domains/registry/list/index.ts
|
|
1395
|
-
import { Command as
|
|
1435
|
+
import { Command as Command56 } from "commander";
|
|
1396
1436
|
var ListCommand3 = () => {
|
|
1397
|
-
const cmd3 = new
|
|
1437
|
+
const cmd3 = new Command56("list");
|
|
1398
1438
|
cmd3.description("List Scalar Registry API descriptions in a team namespace");
|
|
1399
1439
|
cmd3.option("--namespace <namespace>", "Team namespace");
|
|
1400
1440
|
cmd3.option("--json", "Output Scalar Registry API metadata as JSON");
|
|
1401
1441
|
cmd3.action(async (...args) => {
|
|
1402
|
-
const { listAction } = await import("./chunks/action-
|
|
1442
|
+
const { listAction } = await import("./chunks/action-GVW5PSPT.js");
|
|
1403
1443
|
return listAction(...args);
|
|
1404
1444
|
});
|
|
1405
1445
|
return cmd3;
|
|
1406
1446
|
};
|
|
1407
1447
|
|
|
1408
1448
|
// src/domains/registry/update/index.ts
|
|
1409
|
-
import { Command as
|
|
1449
|
+
import { Command as Command57 } from "commander";
|
|
1410
1450
|
var UpdateCommand = () => {
|
|
1411
|
-
const cmd3 = new
|
|
1451
|
+
const cmd3 = new Command57("update");
|
|
1412
1452
|
cmd3.option("--json", "Output the mutation result as JSON without prompting");
|
|
1413
1453
|
cmd3.description("Update API description metadata in the Scalar Registry");
|
|
1414
1454
|
cmd3.argument("[namespace]", "Team namespace");
|
|
@@ -1431,7 +1471,7 @@ var UpdateCommand = () => {
|
|
|
1431
1471
|
"\nOmitting visibility options leaves access unchanged.\nExample: scalar registry update acme my-api --private"
|
|
1432
1472
|
);
|
|
1433
1473
|
cmd3.action(async (...args) => {
|
|
1434
|
-
const { updateAction } = await import("./chunks/action-
|
|
1474
|
+
const { updateAction } = await import("./chunks/action-2WVJ2WEW.js");
|
|
1435
1475
|
return updateAction(...args);
|
|
1436
1476
|
});
|
|
1437
1477
|
return cmd3;
|
|
@@ -1445,49 +1485,49 @@ var registryCommands = [
|
|
|
1445
1485
|
ListCommand3,
|
|
1446
1486
|
GetCommand3
|
|
1447
1487
|
];
|
|
1448
|
-
var registryDomain = new
|
|
1488
|
+
var registryDomain = new Command58("registry");
|
|
1449
1489
|
registryDomain.description("Manage API descriptions in the Scalar Registry");
|
|
1450
1490
|
registryCommands.forEach((command) => registryDomain.addCommand(command()));
|
|
1451
1491
|
var registry_default = registryDomain;
|
|
1452
1492
|
|
|
1453
1493
|
// src/domains/team/index.ts
|
|
1454
|
-
import { Command as
|
|
1494
|
+
import { Command as Command62 } from "commander";
|
|
1455
1495
|
|
|
1456
1496
|
// src/domains/team/get/index.ts
|
|
1457
|
-
import { Command as
|
|
1497
|
+
import { Command as Command59 } from "commander";
|
|
1458
1498
|
var GetCommand4 = () => {
|
|
1459
|
-
const cmd3 = new
|
|
1499
|
+
const cmd3 = new Command59("get");
|
|
1460
1500
|
cmd3.description("Show the current team and its namespaces");
|
|
1461
1501
|
cmd3.option("--json", "Output the current team as JSON");
|
|
1462
1502
|
cmd3.action(async (...args) => {
|
|
1463
|
-
const { getAction } = await import("./chunks/action-
|
|
1503
|
+
const { getAction } = await import("./chunks/action-BYDJ4R4F.js");
|
|
1464
1504
|
return getAction(...args);
|
|
1465
1505
|
});
|
|
1466
1506
|
return cmd3;
|
|
1467
1507
|
};
|
|
1468
1508
|
|
|
1469
1509
|
// src/domains/team/list/index.ts
|
|
1470
|
-
import { Command as
|
|
1510
|
+
import { Command as Command60 } from "commander";
|
|
1471
1511
|
var ListCommand4 = () => {
|
|
1472
|
-
const cmd3 = new
|
|
1512
|
+
const cmd3 = new Command60("list");
|
|
1473
1513
|
cmd3.description("List your Scalar teams");
|
|
1474
1514
|
cmd3.option("--json", "Output teams as JSON");
|
|
1475
1515
|
cmd3.action(async (...args) => {
|
|
1476
|
-
const { listAction } = await import("./chunks/action-
|
|
1516
|
+
const { listAction } = await import("./chunks/action-CBAL5CYB.js");
|
|
1477
1517
|
return listAction(...args);
|
|
1478
1518
|
});
|
|
1479
1519
|
return cmd3;
|
|
1480
1520
|
};
|
|
1481
1521
|
|
|
1482
1522
|
// src/domains/team/set/index.ts
|
|
1483
|
-
import { Command as
|
|
1523
|
+
import { Command as Command61 } from "commander";
|
|
1484
1524
|
var SetCommand = () => {
|
|
1485
|
-
const cmd3 = new
|
|
1525
|
+
const cmd3 = new Command61("set");
|
|
1486
1526
|
cmd3.option("--json", "Output the result as JSON without prompting");
|
|
1487
1527
|
cmd3.description("Select the current team");
|
|
1488
1528
|
cmd3.option("--team <team>", "Team ID");
|
|
1489
1529
|
cmd3.action(async (...args) => {
|
|
1490
|
-
const { setAction } = await import("./chunks/action-
|
|
1530
|
+
const { setAction } = await import("./chunks/action-BVZOA2G5.js");
|
|
1491
1531
|
return setAction(...args);
|
|
1492
1532
|
});
|
|
1493
1533
|
return cmd3;
|
|
@@ -1495,7 +1535,7 @@ var SetCommand = () => {
|
|
|
1495
1535
|
|
|
1496
1536
|
// src/domains/team/index.ts
|
|
1497
1537
|
var teamCommands = [ListCommand4, GetCommand4, SetCommand];
|
|
1498
|
-
var teamDomain = new
|
|
1538
|
+
var teamDomain = new Command62("team");
|
|
1499
1539
|
teamDomain.description("List and switch between your Scalar teams");
|
|
1500
1540
|
teamCommands.forEach((command) => {
|
|
1501
1541
|
teamDomain.addCommand(command());
|
|
@@ -1503,7 +1543,7 @@ teamCommands.forEach((command) => {
|
|
|
1503
1543
|
var team_default = teamDomain;
|
|
1504
1544
|
|
|
1505
1545
|
// src/domains/upgrade/index.ts
|
|
1506
|
-
import { Command as
|
|
1546
|
+
import { Command as Command63, Option as Option12 } from "commander";
|
|
1507
1547
|
|
|
1508
1548
|
// src/helpers/upgrade.ts
|
|
1509
1549
|
import semver from "semver";
|
|
@@ -1981,7 +2021,7 @@ function getUpgradeInstructions(installation, platform, arch, env, latestVersion
|
|
|
1981
2021
|
}
|
|
1982
2022
|
|
|
1983
2023
|
// src/domains/upgrade/index.ts
|
|
1984
|
-
var cmd2 = new
|
|
2024
|
+
var cmd2 = new Command63("upgrade");
|
|
1985
2025
|
cmd2.description("Upgrade the Scalar CLI to the latest version");
|
|
1986
2026
|
cmd2.option(
|
|
1987
2027
|
"--check",
|
|
@@ -2139,7 +2179,7 @@ program.hook("preAction", (_program, command) => {
|
|
|
2139
2179
|
const visibility = normalizeVisibility(command.opts());
|
|
2140
2180
|
if (!visibility.ok) command.error(visibility.error);
|
|
2141
2181
|
}
|
|
2142
|
-
if (process.stdout.isTTY && process.stderr.isTTY && process.argv[2] !== "upgrade" && process.argv[2] !== "context" && process.argv[2] !== "completion" && process.argv[2] !== "__complete" && !process.argv.includes("--json") && process.env.SCALAR_CLI_DISTRIBUTION !== "portable") {
|
|
2182
|
+
if (process.stdout.isTTY && process.stderr.isTTY && process.argv[2] !== "upgrade" && process.argv[2] !== "context" && process.argv[2] !== "completion" && process.argv[2] !== "__complete" && command.name() !== "transform" && !process.argv.includes("--json") && process.env.SCALAR_CLI_DISTRIBUTION !== "portable") {
|
|
2143
2183
|
checkUpgrade().catch(() => {
|
|
2144
2184
|
});
|
|
2145
2185
|
}
|