@scalar/cli 2.12.2 → 2.12.3
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/chunks/{action-OY5LI7TW.js → action-4ESHWOAM.js} +4 -4
- package/chunks/{action-QEYNGQXG.js → action-5BJL72JE.js} +4 -4
- package/chunks/{action-7OJTNQRM.js → action-6A4NM5WS.js} +4 -4
- package/chunks/{action-HRRNN33O.js → action-6I2PWENU.js} +15 -15
- package/chunks/{action-JDXGQSQN.js → action-7CUPRYNA.js} +11 -11
- package/chunks/{action-H5XQIZKX.js → action-AYKKHH7A.js} +11 -11
- package/chunks/{action-OWWGJ34K.js → action-B74PPGKB.js} +5 -5
- package/chunks/{action-ZHDGAUGG.js → action-BDDXF4YV.js} +11 -11
- package/chunks/{action-AZNY2B7G.js → action-BYYKW4S6.js} +5 -5
- package/chunks/action-D7L757PX.js +422 -0
- package/chunks/{action-II3OJSGP.js → action-ED4TSPRZ.js} +11 -11
- package/chunks/{action-LGNWFVEG.js → action-EPGS3U3T.js} +11 -11
- package/chunks/{action-SFRYHYTZ.js → action-EWDQOX5B.js} +4 -4
- package/chunks/{action-2GIOY3HU.js → action-EWZLVN45.js} +19 -19
- package/chunks/{action-2NJJO35T.js → action-FBOTIFVC.js} +9 -9
- package/chunks/{action-PRLW546C.js → action-FBQAU5LV.js} +11 -11
- package/chunks/{action-QA5ATGWB.js → action-GJHOZ6Q5.js} +65 -45
- package/chunks/{action-HOLFCPUY.js → action-GMJJMZXY.js} +11 -11
- package/chunks/{action-WLPCBFRE.js → action-H4GW3KAI.js} +15 -15
- package/chunks/{action-U3R6AXJY.js → action-HAKFAXTQ.js} +4 -4
- package/chunks/{action-LCTTNNFD.js → action-I2IV4VLL.js} +16 -16
- package/chunks/{action-2RIPHL6V.js → action-KIOYSVKX.js} +4 -4
- package/chunks/{action-IIQMZVRJ.js → action-LRR52RXL.js} +10 -8
- package/chunks/{action-ZNBXKA7T.js → action-M5OUEDV2.js} +4 -4
- package/chunks/{action-UOH5L2JF.js → action-O7ROX6NF.js} +88 -50
- package/chunks/{action-6IL6KE3L.js → action-Q3DI54OW.js} +15 -15
- package/chunks/{action-IYUOT7XX.js → action-RPTLQBMK.js} +6 -6
- package/chunks/{action-HMPATNVE.js → action-T4MM4OUS.js} +17 -17
- package/chunks/{action-DJ6FLPXH.js → action-VVKMUOKR.js} +7 -5
- package/chunks/{action-Z3UXS5KI.js → action-YXRCGKCK.js} +4 -4
- package/chunks/{action-XBTIONQD.js → action-ZBEOLJJR.js} +4 -4
- package/chunks/{action-KE53K5EJ.js → action-ZOYQBWGD.js} +13 -13
- package/chunks/{actions-DKQERAKZ.js → actions-EXQNVV4T.js} +11 -11
- package/chunks/{agent-KQKNJZKK.js → agent-XAHNA4MB.js} +3 -3
- package/chunks/{asyncapi-MKBEQYBV.js → asyncapi-FNOWXSKB.js} +50 -42
- package/chunks/{build.action-EGAOPKSX.js → build.action-TIKRZPQ5.js} +14 -14
- package/chunks/{chunk-ZZTCEMCG.js → chunk-2AK5O3NQ.js} +2 -2
- package/chunks/{chunk-A27OERJM.js → chunk-2GKXAGSH.js} +7 -7
- package/chunks/chunk-2I6V7AI3.js +68 -0
- package/chunks/{chunk-7GOHWSPA.js → chunk-62OOT7FY.js} +5 -2
- package/chunks/{chunk-FJREFWEE.js → chunk-7S34K2P3.js} +1 -1
- package/chunks/{chunk-PIWBFJX3.js → chunk-AOZQPCWI.js} +2 -0
- package/chunks/{chunk-AC62V47N.js → chunk-BOPEAS7H.js} +1 -1
- package/chunks/{chunk-UJU2ORWU.js → chunk-CUHVXHIV.js} +1 -1
- package/chunks/{chunk-VRZRTOZF.js → chunk-EUFK4MVX.js} +2 -2
- package/chunks/{chunk-TQL55CUG.js → chunk-EXJUFF6G.js} +1 -1
- package/chunks/{chunk-MLBEF6MB.js → chunk-FI7UKPRF.js} +1 -1
- package/chunks/{chunk-VJAVNG6U.js → chunk-FYMDIB7J.js} +1 -1
- package/chunks/{chunk-W2JGSGIQ.js → chunk-I7ZVWF57.js} +1 -1
- package/chunks/{chunk-FD364GM7.js → chunk-IOW726L2.js} +1 -1
- package/chunks/{chunk-W6FLDNRM.js → chunk-IRA5BW2J.js} +2 -2
- package/chunks/{chunk-W3Y5X3X3.js → chunk-JWNWOK2M.js} +2 -2
- package/chunks/{chunk-ZK76AK3B.js → chunk-KPLWZIOV.js} +22 -3
- package/chunks/{chunk-HDNCXPCZ.js → chunk-KWIY2QZY.js} +1 -1
- package/chunks/{chunk-5VZSFLRO.js → chunk-LEECPQZN.js} +2 -2
- package/chunks/{chunk-3DKOVKCV.js → chunk-OZQPMMTA.js} +3 -3
- package/chunks/{chunk-V6LUKXBV.js → chunk-RE5Z56QD.js} +2 -2
- package/chunks/{chunk-GUF4PKDL.js → chunk-TI4NDKQC.js} +6 -5
- package/chunks/{chunk-4RF2NKQN.js → chunk-TYNF7ROW.js} +1 -1
- package/chunks/{chunk-GZA7GEZW.js → chunk-UN2AAVO5.js} +2 -2
- package/chunks/chunk-V7RTDFHK.js +56 -0
- package/chunks/{chunk-672Y6REB.js → chunk-WKW5W2ZP.js} +1 -1
- package/chunks/{chunk-6YOXEMMX.js → chunk-Y2OQOAY7.js} +1 -1
- package/chunks/{create.action-UUDVWZ3F.js → create.action-K7GTWYST.js} +14 -14
- package/chunks/{delete.action-EUQ4ESLJ.js → delete.action-E4XRGKQW.js} +14 -14
- package/chunks/{delete.action-XRP3VU5C.js → delete.action-JKLXBYRD.js} +14 -14
- package/chunks/{get.action-IYA5Q3RI.js → get.action-2AKMD4W3.js} +9 -9
- package/chunks/{get.action-UHCFOKUQ.js → get.action-IY7WSJMX.js} +13 -13
- package/chunks/{list.action-3CCWEEAM.js → list.action-44YVCWKN.js} +13 -13
- package/chunks/{list.action-D3GHA6S5.js → list.action-NRL2DDL5.js} +15 -15
- package/chunks/{publish.action-HIVWJ7QE.js → publish.action-E76MHLCN.js} +19 -19
- package/chunks/{update.action-VOZNA7BV.js → update.action-FTTVWVAB.js} +14 -14
- package/chunks/{update.action-NSKVEZES.js → update.action-LZCAHAWW.js} +14 -14
- package/index.js +71 -79
- package/package.json +1 -1
- package/skills/scalar-cli/SKILL.md +1 -1
- package/chunks/action-RNVV27ET.js +0 -165
- package/chunks/chunk-JFIXNSPP.js +0 -26
package/index.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
DownloadIsolateCommand
|
|
5
|
-
} from "./chunks/chunk-
|
|
5
|
+
} from "./chunks/chunk-CUHVXHIV.js";
|
|
6
6
|
import {
|
|
7
7
|
buildCliContext,
|
|
8
8
|
runnableCommands
|
|
9
9
|
} from "./chunks/chunk-EBNFCIKS.js";
|
|
10
10
|
import {
|
|
11
11
|
openBrowser
|
|
12
|
-
} from "./chunks/chunk-
|
|
12
|
+
} from "./chunks/chunk-V7RTDFHK.js";
|
|
13
13
|
import {
|
|
14
14
|
measureTime
|
|
15
15
|
} from "./chunks/chunk-KHDYYVYF.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
BundleCommand,
|
|
18
18
|
parseFetchLimit,
|
|
19
19
|
parsePort
|
|
20
|
-
} from "./chunks/chunk-
|
|
20
|
+
} from "./chunks/chunk-KWIY2QZY.js";
|
|
21
21
|
import {
|
|
22
22
|
completeFiles
|
|
23
23
|
} from "./chunks/chunk-DFOZG7ZV.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from "./chunks/chunk-NAC63XJF.js";
|
|
28
28
|
import {
|
|
29
29
|
SdkLanguage
|
|
30
|
-
} from "./chunks/chunk-
|
|
30
|
+
} from "./chunks/chunk-Y2OQOAY7.js";
|
|
31
31
|
import {
|
|
32
32
|
err,
|
|
33
33
|
ok
|
|
@@ -39,13 +39,13 @@ import {
|
|
|
39
39
|
getMetadata,
|
|
40
40
|
logout,
|
|
41
41
|
setMetadata
|
|
42
|
-
} from "./chunks/chunk-
|
|
43
|
-
import "./chunks/chunk-
|
|
42
|
+
} from "./chunks/chunk-FI7UKPRF.js";
|
|
43
|
+
import "./chunks/chunk-FYMDIB7J.js";
|
|
44
44
|
import {
|
|
45
45
|
bin,
|
|
46
46
|
name,
|
|
47
47
|
version
|
|
48
|
-
} from "./chunks/chunk-
|
|
48
|
+
} from "./chunks/chunk-IOW726L2.js";
|
|
49
49
|
import "./chunks/chunk-F3TQHNSQ.js";
|
|
50
50
|
import "./chunks/chunk-VRZSDUZK.js";
|
|
51
51
|
import {
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
import {
|
|
55
55
|
output
|
|
56
56
|
} from "./chunks/chunk-T5HJUAWB.js";
|
|
57
|
-
import "./chunks/chunk-
|
|
57
|
+
import "./chunks/chunk-AOZQPCWI.js";
|
|
58
58
|
import "./chunks/chunk-Q26DFKTY.js";
|
|
59
59
|
import {
|
|
60
60
|
external_exports
|
|
@@ -78,7 +78,7 @@ var DeleteSchemaCommand = () => {
|
|
|
78
78
|
cmd3.option("-s, --slug <slug>", "Schema slug");
|
|
79
79
|
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
80
80
|
cmd3.action(async (...args) => {
|
|
81
|
-
const { deleteAction } = await import("./chunks/delete.action-
|
|
81
|
+
const { deleteAction } = await import("./chunks/delete.action-E4XRGKQW.js");
|
|
82
82
|
return deleteAction(...args);
|
|
83
83
|
});
|
|
84
84
|
return cmd3;
|
|
@@ -98,7 +98,7 @@ var GetSchemaCommand = () => {
|
|
|
98
98
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
99
99
|
completeFiles(cmd3, [], ["--output"]);
|
|
100
100
|
cmd3.action(async (...args) => {
|
|
101
|
-
const { getAction } = await import("./chunks/get.action-
|
|
101
|
+
const { getAction } = await import("./chunks/get.action-2AKMD4W3.js");
|
|
102
102
|
return getAction(...args);
|
|
103
103
|
});
|
|
104
104
|
return cmd3;
|
|
@@ -112,7 +112,7 @@ var ListSchemaCommand = () => {
|
|
|
112
112
|
cmd3.option("--namespace <namespace>", "Team namespace");
|
|
113
113
|
cmd3.option("--json", "Output schema metadata as JSON");
|
|
114
114
|
cmd3.action(async (...args) => {
|
|
115
|
-
const { listAction } = await import("./chunks/list.action-
|
|
115
|
+
const { listAction } = await import("./chunks/list.action-NRL2DDL5.js");
|
|
116
116
|
return listAction(...args);
|
|
117
117
|
});
|
|
118
118
|
return cmd3;
|
|
@@ -146,7 +146,7 @@ var PublishSchemaCommand = () => {
|
|
|
146
146
|
);
|
|
147
147
|
completeFiles(cmd3, ["file"], []);
|
|
148
148
|
cmd3.action(async (...args) => {
|
|
149
|
-
const { publishAction } = await import("./chunks/publish.action-
|
|
149
|
+
const { publishAction } = await import("./chunks/publish.action-E76MHLCN.js");
|
|
150
150
|
return publishAction(...args);
|
|
151
151
|
});
|
|
152
152
|
return cmd3;
|
|
@@ -168,7 +168,7 @@ var UpdateSchemaCommand = () => {
|
|
|
168
168
|
).choices([...PRIVACY_VALUES])
|
|
169
169
|
);
|
|
170
170
|
cmd3.action(async (...args) => {
|
|
171
|
-
const { updateAction } = await import("./chunks/update.action-
|
|
171
|
+
const { updateAction } = await import("./chunks/update.action-FTTVWVAB.js");
|
|
172
172
|
return updateAction(...args);
|
|
173
173
|
});
|
|
174
174
|
return cmd3;
|
|
@@ -198,7 +198,7 @@ var BuildSdkCommand = () => {
|
|
|
198
198
|
cmd3.option("-s, --slug <slug>", "SDK slug");
|
|
199
199
|
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
200
200
|
cmd3.action(async (...args) => {
|
|
201
|
-
const { buildAction } = await import("./chunks/build.action-
|
|
201
|
+
const { buildAction } = await import("./chunks/build.action-TIKRZPQ5.js");
|
|
202
202
|
return buildAction(...args);
|
|
203
203
|
});
|
|
204
204
|
return cmd3;
|
|
@@ -217,7 +217,7 @@ var CreateSdkCommand = () => {
|
|
|
217
217
|
)
|
|
218
218
|
);
|
|
219
219
|
cmd3.action(async (...args) => {
|
|
220
|
-
const { createAction } = await import("./chunks/create.action-
|
|
220
|
+
const { createAction } = await import("./chunks/create.action-K7GTWYST.js");
|
|
221
221
|
return createAction(...args);
|
|
222
222
|
});
|
|
223
223
|
return cmd3;
|
|
@@ -231,7 +231,7 @@ var DeleteSdkCommand = () => {
|
|
|
231
231
|
cmd3.option("-s, --slug <slug>", "SDK slug");
|
|
232
232
|
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
233
233
|
cmd3.action(async (...args) => {
|
|
234
|
-
const { deleteAction } = await import("./chunks/delete.action-
|
|
234
|
+
const { deleteAction } = await import("./chunks/delete.action-JKLXBYRD.js");
|
|
235
235
|
return deleteAction(...args);
|
|
236
236
|
});
|
|
237
237
|
return cmd3;
|
|
@@ -252,7 +252,7 @@ var UpdateSdkCommand = () => {
|
|
|
252
252
|
).choices([...PRIVACY_VALUES])
|
|
253
253
|
);
|
|
254
254
|
cmd3.action(async (...args) => {
|
|
255
|
-
const { updateAction } = await import("./chunks/update.action-
|
|
255
|
+
const { updateAction } = await import("./chunks/update.action-LZCAHAWW.js");
|
|
256
256
|
return updateAction(...args);
|
|
257
257
|
});
|
|
258
258
|
return cmd3;
|
|
@@ -269,7 +269,7 @@ var GetSdkCommand = () => {
|
|
|
269
269
|
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
270
270
|
cmd3.option("--json", "Output structured SDK metadata as JSON");
|
|
271
271
|
cmd3.action(async (...args) => {
|
|
272
|
-
const { getAction } = await import("./chunks/get.action-
|
|
272
|
+
const { getAction } = await import("./chunks/get.action-IY7WSJMX.js");
|
|
273
273
|
return getAction(...args);
|
|
274
274
|
});
|
|
275
275
|
return cmd3;
|
|
@@ -283,7 +283,7 @@ var ListSdkCommand = () => {
|
|
|
283
283
|
cmd3.option("--json", "Output structured SDK metadata as JSON");
|
|
284
284
|
cmd3.option("--namespace <namespace>", "Team namespace");
|
|
285
285
|
cmd3.action(async (...args) => {
|
|
286
|
-
const { listAction } = await import("./chunks/list.action-
|
|
286
|
+
const { listAction } = await import("./chunks/list.action-44YVCWKN.js");
|
|
287
287
|
return listAction(...args);
|
|
288
288
|
});
|
|
289
289
|
return cmd3;
|
|
@@ -312,41 +312,41 @@ function createAccessGroupCommand() {
|
|
|
312
312
|
"Manage access groups and allowed email domains for the current team"
|
|
313
313
|
);
|
|
314
314
|
command.command("list").description("List access groups for the current team").option("--json", "Print the result as JSON").action(async (options) => {
|
|
315
|
-
const { runAction } = await import("./chunks/actions-
|
|
315
|
+
const { runAction } = await import("./chunks/actions-EXQNVV4T.js");
|
|
316
316
|
await runAction({ operation: "list", ...options });
|
|
317
317
|
});
|
|
318
318
|
command.command("create").description("Create an access group (Pro or above)").argument("<slug>", "New access group slug").option("--name <name>", "Display name").option("--domain <domains...>", "Allowed email domains").option("--json", "Print the result as JSON").action(
|
|
319
319
|
async (slug, options) => {
|
|
320
|
-
const { runAction } = await import("./chunks/actions-
|
|
320
|
+
const { runAction } = await import("./chunks/actions-EXQNVV4T.js");
|
|
321
321
|
await runAction({ operation: "create", slug, ...options });
|
|
322
322
|
}
|
|
323
323
|
);
|
|
324
324
|
command.command("get").description("Get an access group and its allowlists").argument("<slug>", "Access group slug").option("--json", "Print the result as JSON").action(async (slug, options) => {
|
|
325
|
-
const { runAction } = await import("./chunks/actions-
|
|
325
|
+
const { runAction } = await import("./chunks/actions-EXQNVV4T.js");
|
|
326
326
|
await runAction({ operation: "get", slug, ...options });
|
|
327
327
|
});
|
|
328
328
|
command.command("update").description("Update access group metadata").argument("<slug>", "Current access group slug").option("--name <name>", "New display name").option("--new-slug <slug>", "New access group slug").option("--json", "Print the result as JSON").action(
|
|
329
329
|
async (slug, options) => {
|
|
330
|
-
const { runAction } = await import("./chunks/actions-
|
|
330
|
+
const { runAction } = await import("./chunks/actions-EXQNVV4T.js");
|
|
331
331
|
await runAction({ operation: "update", slug, ...options });
|
|
332
332
|
}
|
|
333
333
|
);
|
|
334
334
|
command.command("delete").description("Delete an access group and remove its project assignments").argument("<slug>", "Access group slug").option("-y, --yes", "Confirm deletion without prompting").option("--json", "Print the result as JSON (requires --yes)").action(
|
|
335
335
|
async (slug, options) => {
|
|
336
|
-
const { runAction } = await import("./chunks/actions-
|
|
336
|
+
const { runAction } = await import("./chunks/actions-EXQNVV4T.js");
|
|
337
337
|
await runAction({ operation: "delete", slug, ...options });
|
|
338
338
|
}
|
|
339
339
|
);
|
|
340
340
|
const domain = command.command("domain").description("Manage allowed email domains");
|
|
341
341
|
domain.command("add").description("Add an exact email domain to an access group").argument("<slug>", "Access group slug").argument("<domain>", "Email domain, such as example.com").option("--json", "Print the result as JSON").action(
|
|
342
342
|
async (slug, domain2, options) => {
|
|
343
|
-
const { runAction } = await import("./chunks/actions-
|
|
343
|
+
const { runAction } = await import("./chunks/actions-EXQNVV4T.js");
|
|
344
344
|
await runAction({ operation: "add-domain", slug, domain: domain2, ...options });
|
|
345
345
|
}
|
|
346
346
|
);
|
|
347
347
|
domain.command("remove").description("Remove an exact email domain from an access group").argument("<slug>", "Access group slug").argument("<domain>", "Email domain, such as example.com").option("--json", "Print the result as JSON").action(
|
|
348
348
|
async (slug, domain2, options) => {
|
|
349
|
-
const { runAction } = await import("./chunks/actions-
|
|
349
|
+
const { runAction } = await import("./chunks/actions-EXQNVV4T.js");
|
|
350
350
|
await runAction({
|
|
351
351
|
operation: "remove-domain",
|
|
352
352
|
slug,
|
|
@@ -381,7 +381,7 @@ var LoginCommand = () => {
|
|
|
381
381
|
).hideHelp()
|
|
382
382
|
);
|
|
383
383
|
cmd3.action(async (...args) => {
|
|
384
|
-
const { loginAction } = await import("./chunks/action-
|
|
384
|
+
const { loginAction } = await import("./chunks/action-VVKMUOKR.js");
|
|
385
385
|
return loginAction(...args);
|
|
386
386
|
});
|
|
387
387
|
return cmd3;
|
|
@@ -406,7 +406,7 @@ var WhoAmICommand = () => {
|
|
|
406
406
|
cmd3.description("Show the logged-in user and current team");
|
|
407
407
|
cmd3.option("--json", "Output authentication details as JSON");
|
|
408
408
|
cmd3.action(async (options) => {
|
|
409
|
-
const { whoamiAction } = await import("./chunks/action-
|
|
409
|
+
const { whoamiAction } = await import("./chunks/action-GMJJMZXY.js");
|
|
410
410
|
return whoamiAction(options);
|
|
411
411
|
});
|
|
412
412
|
return cmd3;
|
|
@@ -485,7 +485,7 @@ function JoinCommand() {
|
|
|
485
485
|
);
|
|
486
486
|
completeFiles(cmd3, ["files"], ["--output"]);
|
|
487
487
|
cmd3.action(async (...args) => {
|
|
488
|
-
const { joinAction } = await import("./chunks/action-
|
|
488
|
+
const { joinAction } = await import("./chunks/action-4ESHWOAM.js");
|
|
489
489
|
return joinAction(...args);
|
|
490
490
|
});
|
|
491
491
|
return cmd3;
|
|
@@ -509,7 +509,7 @@ function SplitCommand() {
|
|
|
509
509
|
);
|
|
510
510
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
511
511
|
cmd3.action(async (...args) => {
|
|
512
|
-
const { splitAction } = await import("./chunks/action-
|
|
512
|
+
const { splitAction } = await import("./chunks/action-5BJL72JE.js");
|
|
513
513
|
return splitAction(...args);
|
|
514
514
|
});
|
|
515
515
|
return cmd3;
|
|
@@ -527,7 +527,7 @@ function FormatCommand() {
|
|
|
527
527
|
);
|
|
528
528
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
529
529
|
cmd3.action(async (...args) => {
|
|
530
|
-
const { formatAction } = await import("./chunks/action-
|
|
530
|
+
const { formatAction } = await import("./chunks/action-KIOYSVKX.js");
|
|
531
531
|
return formatAction(...args);
|
|
532
532
|
});
|
|
533
533
|
return cmd3;
|
|
@@ -580,7 +580,7 @@ function LintCommand() {
|
|
|
580
580
|
);
|
|
581
581
|
completeFiles(cmd3, ["file|url"], ["--rule", "--output", "--ignore-file"]);
|
|
582
582
|
cmd3.action(async (...args) => {
|
|
583
|
-
const { lintAction } = await import("./chunks/action-
|
|
583
|
+
const { lintAction } = await import("./chunks/action-HAKFAXTQ.js");
|
|
584
584
|
return lintAction(...args);
|
|
585
585
|
});
|
|
586
586
|
return cmd3;
|
|
@@ -595,7 +595,7 @@ function MarkdownCommand() {
|
|
|
595
595
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
596
596
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
597
597
|
cmd3.action(async (...args) => {
|
|
598
|
-
const { markdownAction } = await import("./chunks/action-
|
|
598
|
+
const { markdownAction } = await import("./chunks/action-EWDQOX5B.js");
|
|
599
599
|
return markdownAction(...args);
|
|
600
600
|
});
|
|
601
601
|
return cmd3;
|
|
@@ -610,12 +610,11 @@ function MockCommand() {
|
|
|
610
610
|
);
|
|
611
611
|
cmd3.argument("[file|url]", "OpenAPI or AsyncAPI file or URL to mock");
|
|
612
612
|
cmd3.option("-w, --watch", "Watch the file or URL for changes");
|
|
613
|
-
cmd3.option("-o, --once", "Start the server, then stop it after two seconds");
|
|
614
613
|
cmd3.option("-p, --port <port>", "HTTP port for the Mock Server", parsePort);
|
|
615
614
|
completeFiles(cmd3, ["file|url"], []);
|
|
616
615
|
cmd3.action(async (...args) => {
|
|
617
|
-
const { mockAction } = await import("./chunks/action-
|
|
618
|
-
|
|
616
|
+
const { mockAction } = await import("./chunks/action-GJHOZ6Q5.js");
|
|
617
|
+
await mockAction(...args);
|
|
619
618
|
});
|
|
620
619
|
return cmd3;
|
|
621
620
|
}
|
|
@@ -633,7 +632,7 @@ function ConvertCommand() {
|
|
|
633
632
|
);
|
|
634
633
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
635
634
|
cmd3.action(async (...args) => {
|
|
636
|
-
const { convertAction } = await import("./chunks/action-
|
|
635
|
+
const { convertAction } = await import("./chunks/action-YXRCGKCK.js");
|
|
637
636
|
return convertAction(...args);
|
|
638
637
|
});
|
|
639
638
|
return cmd3;
|
|
@@ -652,7 +651,6 @@ function ServeCommand() {
|
|
|
652
651
|
"JSON file with API Reference configuration"
|
|
653
652
|
);
|
|
654
653
|
cmd3.option("-w, --watch", "Watch the file or URL for changes");
|
|
655
|
-
cmd3.option("-o, --once", "Start the server, then stop it after two seconds");
|
|
656
654
|
cmd3.option(
|
|
657
655
|
"-p, --port <port>",
|
|
658
656
|
"HTTP port for the API Reference server",
|
|
@@ -660,8 +658,8 @@ function ServeCommand() {
|
|
|
660
658
|
);
|
|
661
659
|
completeFiles(cmd3, ["file|url"], ["--config"]);
|
|
662
660
|
cmd3.action(async (...args) => {
|
|
663
|
-
const { serveAction } = await import("./chunks/action-
|
|
664
|
-
|
|
661
|
+
const { serveAction } = await import("./chunks/action-O7ROX6NF.js");
|
|
662
|
+
await serveAction(...args);
|
|
665
663
|
});
|
|
666
664
|
return cmd3;
|
|
667
665
|
}
|
|
@@ -680,7 +678,7 @@ function ShareCommand() {
|
|
|
680
678
|
);
|
|
681
679
|
completeFiles(cmd3, ["file"], []);
|
|
682
680
|
cmd3.action(async (...args) => {
|
|
683
|
-
const { shareAction } = await import("./chunks/action-
|
|
681
|
+
const { shareAction } = await import("./chunks/action-RPTLQBMK.js");
|
|
684
682
|
return shareAction(...args);
|
|
685
683
|
});
|
|
686
684
|
return cmd3;
|
|
@@ -700,7 +698,7 @@ function UpgradeCommand() {
|
|
|
700
698
|
);
|
|
701
699
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
702
700
|
cmd3.action(async (...args) => {
|
|
703
|
-
const { upgradeAction } = await import("./chunks/action-
|
|
701
|
+
const { upgradeAction } = await import("./chunks/action-ZBEOLJJR.js");
|
|
704
702
|
return upgradeAction(...args);
|
|
705
703
|
});
|
|
706
704
|
return cmd3;
|
|
@@ -714,7 +712,7 @@ function ValidateCommand() {
|
|
|
714
712
|
cmd3.argument("[file|url]", "File or URL to validate");
|
|
715
713
|
completeFiles(cmd3, ["file|url"], []);
|
|
716
714
|
cmd3.action(async (...args) => {
|
|
717
|
-
const { validateAction } = await import("./chunks/action-
|
|
715
|
+
const { validateAction } = await import("./chunks/action-6A4NM5WS.js");
|
|
718
716
|
return validateAction(...args);
|
|
719
717
|
});
|
|
720
718
|
return cmd3;
|
|
@@ -725,15 +723,14 @@ import { Command as Command32 } from "commander";
|
|
|
725
723
|
function VoidCommand() {
|
|
726
724
|
const cmd3 = new Command32("void");
|
|
727
725
|
cmd3.description("Mirror HTTP requests with a local server");
|
|
728
|
-
cmd3.option("-o, --once", "Start the server, then stop it after two seconds");
|
|
729
726
|
cmd3.option(
|
|
730
727
|
"-p, --port <port>",
|
|
731
728
|
"HTTP port for the request-mirroring server",
|
|
732
729
|
parsePort
|
|
733
730
|
);
|
|
734
731
|
cmd3.action(async (...args) => {
|
|
735
|
-
const { voidAction } = await import("./chunks/action-
|
|
736
|
-
|
|
732
|
+
const { voidAction } = await import("./chunks/action-LRR52RXL.js");
|
|
733
|
+
await voidAction(...args);
|
|
737
734
|
});
|
|
738
735
|
return cmd3;
|
|
739
736
|
}
|
|
@@ -783,7 +780,7 @@ var PreviewCommand = () => {
|
|
|
783
780
|
cmd3.option("-N, --no-open", "Do not open the browser automatically", true);
|
|
784
781
|
completeFiles(cmd3, ["config"], []);
|
|
785
782
|
cmd3.action(async (...args) => {
|
|
786
|
-
const { previewAction } = await import("./chunks/action-
|
|
783
|
+
const { previewAction } = await import("./chunks/action-D7L757PX.js");
|
|
787
784
|
return previewAction(...args);
|
|
788
785
|
});
|
|
789
786
|
return cmd3;
|
|
@@ -814,7 +811,7 @@ var CreateCommand = () => {
|
|
|
814
811
|
cmd3.option("-n, --name <name>", "Project name");
|
|
815
812
|
cmd3.option("-s, --slug <slug>", "Project slug");
|
|
816
813
|
cmd3.action(async (...args) => {
|
|
817
|
-
const { createAction } = await import("./chunks/action-
|
|
814
|
+
const { createAction } = await import("./chunks/action-7CUPRYNA.js");
|
|
818
815
|
return createAction(...args);
|
|
819
816
|
});
|
|
820
817
|
return cmd3;
|
|
@@ -830,7 +827,7 @@ var ListCommand = () => {
|
|
|
830
827
|
cmd3.description("List production deployments for a project");
|
|
831
828
|
cmd3.option("-s, --slug [slug]", "Project slug from scalar project list");
|
|
832
829
|
cmd3.action(async (...args) => {
|
|
833
|
-
const { listAction } = await import("./chunks/action-
|
|
830
|
+
const { listAction } = await import("./chunks/action-I2IV4VLL.js");
|
|
834
831
|
return listAction(...args);
|
|
835
832
|
});
|
|
836
833
|
return cmd3;
|
|
@@ -850,7 +847,7 @@ function GetCommand() {
|
|
|
850
847
|
const command = new Command39("get").description("Show project details for the current team").argument("<slug>", "Project slug from scalar project list").option("--json", "Print project details as JSON");
|
|
851
848
|
command.action(
|
|
852
849
|
async (slug, options) => {
|
|
853
|
-
const { getAction } = await import("./chunks/action-
|
|
850
|
+
const { getAction } = await import("./chunks/action-FBQAU5LV.js");
|
|
854
851
|
await getAction(slug, options);
|
|
855
852
|
}
|
|
856
853
|
);
|
|
@@ -868,7 +865,7 @@ var InitCommand = () => {
|
|
|
868
865
|
);
|
|
869
866
|
cmd3.option("--force", "Overwrite existing configuration");
|
|
870
867
|
cmd3.action(async (...args) => {
|
|
871
|
-
const { initAction } = await import("./chunks/action-
|
|
868
|
+
const { initAction } = await import("./chunks/action-EPGS3U3T.js");
|
|
872
869
|
return initAction(...args);
|
|
873
870
|
});
|
|
874
871
|
return cmd3;
|
|
@@ -879,7 +876,7 @@ import { Command as Command41 } from "commander";
|
|
|
879
876
|
function ListCommand2() {
|
|
880
877
|
const command = new Command41("list").description("List projects and their slugs for the current team").option("--json", "Print project details as JSON");
|
|
881
878
|
command.action(async (options) => {
|
|
882
|
-
const { listAction } = await import("./chunks/action-
|
|
879
|
+
const { listAction } = await import("./chunks/action-Q3DI54OW.js");
|
|
883
880
|
await listAction(options);
|
|
884
881
|
});
|
|
885
882
|
return command;
|
|
@@ -905,7 +902,7 @@ var PublishCommand = () => {
|
|
|
905
902
|
);
|
|
906
903
|
completeFiles(cmd3, [], ["--config"]);
|
|
907
904
|
cmd3.action(async (...args) => {
|
|
908
|
-
const { publishAction } = await import("./chunks/action-
|
|
905
|
+
const { publishAction } = await import("./chunks/action-6I2PWENU.js");
|
|
909
906
|
return publishAction(...args);
|
|
910
907
|
});
|
|
911
908
|
return cmd3;
|
|
@@ -925,7 +922,7 @@ var RollbackCommand = () => {
|
|
|
925
922
|
);
|
|
926
923
|
cmd3.option("-y, --yes", "Skip the confirmation prompt");
|
|
927
924
|
cmd3.action(async (...args) => {
|
|
928
|
-
const { rollbackAction } = await import("./chunks/action-
|
|
925
|
+
const { rollbackAction } = await import("./chunks/action-T4MM4OUS.js");
|
|
929
926
|
return rollbackAction(...args);
|
|
930
927
|
});
|
|
931
928
|
return cmd3;
|
|
@@ -1048,8 +1045,11 @@ import as2 from "ansis";
|
|
|
1048
1045
|
var CLI_DOCS_URL = "https://scalar.com/tools/cli/getting-started";
|
|
1049
1046
|
function ServeReadmeCommand(cmd3) {
|
|
1050
1047
|
cmd3.description("Open CLI documentation in your browser");
|
|
1051
|
-
cmd3.action(() => {
|
|
1052
|
-
openBrowser(CLI_DOCS_URL);
|
|
1048
|
+
cmd3.action(async () => {
|
|
1049
|
+
const browser = await openBrowser(CLI_DOCS_URL);
|
|
1050
|
+
if (!browser.ok) {
|
|
1051
|
+
return output.error().message(browser.error).exit("error");
|
|
1052
|
+
}
|
|
1053
1053
|
output.info().message(
|
|
1054
1054
|
"Opening CLI documentation in your default browser. If it does not open, visit:"
|
|
1055
1055
|
).line(as2.blue(CLI_DOCS_URL)).line().exit("success");
|
|
@@ -1100,7 +1100,7 @@ var PublishCommand2 = () => {
|
|
|
1100
1100
|
);
|
|
1101
1101
|
completeFiles(cmd3, ["file"], []);
|
|
1102
1102
|
cmd3.action(async (...args) => {
|
|
1103
|
-
const { publishAction } = await import("./chunks/action-
|
|
1103
|
+
const { publishAction } = await import("./chunks/action-EWZLVN45.js");
|
|
1104
1104
|
return publishAction(...args);
|
|
1105
1105
|
});
|
|
1106
1106
|
return cmd3;
|
|
@@ -1114,7 +1114,7 @@ var DeleteCommand = () => {
|
|
|
1114
1114
|
cmd3.argument("[namespace]", "Team namespace");
|
|
1115
1115
|
cmd3.argument("[slug]", "API description slug");
|
|
1116
1116
|
cmd3.action(async (...args) => {
|
|
1117
|
-
const { deleteAction } = await import("./chunks/action-
|
|
1117
|
+
const { deleteAction } = await import("./chunks/action-BDDXF4YV.js");
|
|
1118
1118
|
return deleteAction(...args);
|
|
1119
1119
|
});
|
|
1120
1120
|
return cmd3;
|
|
@@ -1139,7 +1139,7 @@ var GetCommand2 = () => {
|
|
|
1139
1139
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
1140
1140
|
completeFiles(cmd3, [], ["--output"]);
|
|
1141
1141
|
cmd3.action(async (...args) => {
|
|
1142
|
-
const { getAction } = await import("./chunks/action-
|
|
1142
|
+
const { getAction } = await import("./chunks/action-FBOTIFVC.js");
|
|
1143
1143
|
return getAction(...args);
|
|
1144
1144
|
});
|
|
1145
1145
|
return cmd3;
|
|
@@ -1153,7 +1153,7 @@ var ListCommand3 = () => {
|
|
|
1153
1153
|
cmd3.option("--namespace <namespace>", "Team namespace");
|
|
1154
1154
|
cmd3.option("--json", "Output Scalar Registry API metadata as JSON");
|
|
1155
1155
|
cmd3.action(async (...args) => {
|
|
1156
|
-
const { listAction } = await import("./chunks/action-
|
|
1156
|
+
const { listAction } = await import("./chunks/action-H4GW3KAI.js");
|
|
1157
1157
|
return listAction(...args);
|
|
1158
1158
|
});
|
|
1159
1159
|
return cmd3;
|
|
@@ -1169,7 +1169,7 @@ var UpdateCommand = () => {
|
|
|
1169
1169
|
cmd3.option("--title <title>", "API description title");
|
|
1170
1170
|
cmd3.option("--description <description>", "API description summary");
|
|
1171
1171
|
cmd3.action(async (...args) => {
|
|
1172
|
-
const { updateAction } = await import("./chunks/action-
|
|
1172
|
+
const { updateAction } = await import("./chunks/action-AYKKHH7A.js");
|
|
1173
1173
|
return updateAction(...args);
|
|
1174
1174
|
});
|
|
1175
1175
|
return cmd3;
|
|
@@ -1198,7 +1198,7 @@ var GetCommand3 = () => {
|
|
|
1198
1198
|
cmd3.description("Show the current team and its namespaces");
|
|
1199
1199
|
cmd3.option("--json", "Output the current team as JSON");
|
|
1200
1200
|
cmd3.action(async (...args) => {
|
|
1201
|
-
const { getAction } = await import("./chunks/action-
|
|
1201
|
+
const { getAction } = await import("./chunks/action-ED4TSPRZ.js");
|
|
1202
1202
|
return getAction(...args);
|
|
1203
1203
|
});
|
|
1204
1204
|
return cmd3;
|
|
@@ -1211,7 +1211,7 @@ var ListCommand4 = () => {
|
|
|
1211
1211
|
cmd3.description("List your Scalar teams");
|
|
1212
1212
|
cmd3.option("--json", "Output teams as JSON");
|
|
1213
1213
|
cmd3.action(async (...args) => {
|
|
1214
|
-
const { listAction } = await import("./chunks/action-
|
|
1214
|
+
const { listAction } = await import("./chunks/action-ZOYQBWGD.js");
|
|
1215
1215
|
return listAction(...args);
|
|
1216
1216
|
});
|
|
1217
1217
|
return cmd3;
|
|
@@ -1224,7 +1224,7 @@ var SetCommand = () => {
|
|
|
1224
1224
|
cmd3.description("Select the current team");
|
|
1225
1225
|
cmd3.option("--team <team>", "Team ID");
|
|
1226
1226
|
cmd3.action(async (...args) => {
|
|
1227
|
-
const { setAction } = await import("./chunks/action-
|
|
1227
|
+
const { setAction } = await import("./chunks/action-BYYKW4S6.js");
|
|
1228
1228
|
return setAction(...args);
|
|
1229
1229
|
});
|
|
1230
1230
|
return cmd3;
|
|
@@ -1244,7 +1244,6 @@ import { execSync } from "node:child_process";
|
|
|
1244
1244
|
import { Command as Command58, Option as Option9 } from "commander";
|
|
1245
1245
|
|
|
1246
1246
|
// src/helpers/upgrade.ts
|
|
1247
|
-
import as3 from "ansis";
|
|
1248
1247
|
import semver from "semver";
|
|
1249
1248
|
var packageJsonSchema = external_exports.object({
|
|
1250
1249
|
version: external_exports.string().refine((value) => semver.valid(value) !== null)
|
|
@@ -1271,17 +1270,11 @@ async function getUpgradeInformation(timeoutMs = USER_INITIATED_TIMEOUT_MS) {
|
|
|
1271
1270
|
latestVersion
|
|
1272
1271
|
});
|
|
1273
1272
|
}
|
|
1274
|
-
async function checkUpgrade(
|
|
1273
|
+
async function checkUpgrade() {
|
|
1275
1274
|
const emitOutput = () => {
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
);
|
|
1280
|
-
return;
|
|
1281
|
-
}
|
|
1282
|
-
return output.info().message(
|
|
1283
|
-
`A new Scalar CLI version is available. Run ${as3.cyan("`scalar upgrade`")} to install the latest version.`
|
|
1284
|
-
).print();
|
|
1275
|
+
process.stderr.write(
|
|
1276
|
+
"A new Scalar CLI version is available. Run `scalar upgrade` to install the latest version.\n"
|
|
1277
|
+
);
|
|
1285
1278
|
};
|
|
1286
1279
|
const now = Date.now();
|
|
1287
1280
|
const delay = 1 * 60 * 60 * 1e3;
|
|
@@ -1501,10 +1494,9 @@ var program = getProgram();
|
|
|
1501
1494
|
if (process.argv.length === 2) {
|
|
1502
1495
|
program.help();
|
|
1503
1496
|
}
|
|
1504
|
-
program.hook("preAction", (
|
|
1505
|
-
if (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") {
|
|
1506
|
-
|
|
1507
|
-
checkUpgrade(usesDocumentStdout ? "stderr" : "stdout").catch(() => {
|
|
1497
|
+
program.hook("preAction", () => {
|
|
1498
|
+
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") {
|
|
1499
|
+
checkUpgrade().catch(() => {
|
|
1508
1500
|
});
|
|
1509
1501
|
}
|
|
1510
1502
|
});
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ description: "Operate the Scalar CLI (`scalar`, or `npx @scalar/cli`) to validat
|
|
|
5
5
|
|
|
6
6
|
# Scalar CLI
|
|
7
7
|
|
|
8
|
-
Validate, lint, bundle, mock, and preview OpenAPI and AsyncAPI descriptions, and publish them to Scalar (`@scalar/cli` 2.12.
|
|
8
|
+
Validate, lint, bundle, mock, and preview OpenAPI and AsyncAPI descriptions, and publish them to Scalar (`@scalar/cli` 2.12.3).
|
|
9
9
|
|
|
10
10
|
## Operating notes
|
|
11
11
|
|