@scalar/cli 2.13.0 → 2.13.2
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 +4 -0
- package/chunks/{action-ZL2CXRJR.js → action-2LFAO27S.js} +6 -6
- package/chunks/{action-SZ6SG3RB.js → action-3OYAJ5F6.js} +17 -17
- package/chunks/{action-ENN7KFBZ.js → action-3QTDQRAO.js} +9 -9
- package/chunks/{action-YEAOKB6V.js → action-4DEIYLOW.js} +10 -10
- package/chunks/{action-WUWWJGRJ.js → action-4U36CMZG.js} +4 -4
- package/chunks/{action-AWHBOHGW.js → action-6LNC6MMJ.js} +20 -20
- package/chunks/{action-Y4YLWZHL.js → action-6WWWTCCB.js} +13 -13
- package/chunks/{action-U3MQZ5ZQ.js → action-AQCSAFDU.js} +14 -14
- package/chunks/{action-FZNFBX6U.js → action-BIEKRF2X.js} +4 -4
- package/chunks/{action-EVNUUWR5.js → action-BVORONSB.js} +18 -18
- package/chunks/{action-5MJTAO5X.js → action-D7D3YH2N.js} +14 -14
- package/chunks/{action-OZWRV54F.js → action-E7EK6TJJ.js} +4 -4
- package/chunks/{action-NN7QF6MI.js → action-FIKVZPFG.js} +4 -4
- package/chunks/{action-W24B4YT5.js → action-HGPGL624.js} +16 -16
- package/chunks/{action-LVYFHK4D.js → action-IN7SNSSI.js} +4 -4
- package/chunks/{action-QZV6IPK4.js → action-JOKVK5PP.js} +8 -8
- package/chunks/{action-27BJMHFD.js → action-KCJTUKNF.js} +3 -3
- package/chunks/{action-KTY5ICV5.js → action-LKMBK3MO.js} +11 -11
- package/chunks/{action-YQSSXJAX.js → action-MHBMWRU4.js} +4 -4
- package/chunks/{action-S7PMEFCE.js → action-MHJOOGII.js} +9 -9
- package/chunks/{action-3P66ZSL3.js → action-NY2R6VH2.js} +3 -3
- package/chunks/{action-F6JSCBEU.js → action-O4WDOJVV.js} +5 -5
- package/chunks/{action-UVAYACFA.js → action-Q7OD2QHZ.js} +4 -4
- package/chunks/{action-6FPGU5SY.js → action-RDG3SJ2G.js} +14 -14
- package/chunks/{action-YFTRHKOK.js → action-S7NCRXKS.js} +15 -15
- package/chunks/{action-ASBFLTOA.js → action-SRFBOLDL.js} +1 -1
- package/chunks/{action-JSYHIEYP.js → action-V2B42324.js} +13 -13
- package/chunks/{action-UAGYB4ZS.js → action-VK6HFIZ5.js} +14 -14
- package/chunks/{action-GNYNOFDK.js → action-WJMC3TDN.js} +9 -6
- package/chunks/{action-6RQDLMOM.js → action-WMOLIVXC.js} +19 -19
- package/chunks/{action-4EJA6UEB.js → action-XZDNARAW.js} +17 -17
- package/chunks/{action-OD4GNHM3.js → action-YH3KB4NR.js} +21 -21
- package/chunks/{action-WQICTF7K.js → action-YXAOA3TJ.js} +10 -10
- package/chunks/{action-VXEJNBNR.js → action-ZSUVSURQ.js} +4 -4
- package/chunks/{action-ESVI46KE.js → action-ZYQEUYF7.js} +4 -4
- package/chunks/{actions-GHHWF4Q2.js → actions-K2RSZCU4.js} +14 -14
- package/chunks/{agent-XAHNA4MB.js → agent-YNVT6RJ6.js} +7 -5
- package/chunks/{asyncapi-TICSLZRM.js → asyncapi-XLHXPF2X.js} +9 -9
- package/chunks/{build.action-AURC6QZ6.js → build.action-TAMUO3F2.js} +16 -16
- package/chunks/{chunk-4YQVGOHX.js → chunk-3CZG44E4.js} +2 -2
- package/chunks/{chunk-EXJUFF6G.js → chunk-3MKTCEUX.js} +8 -3
- package/chunks/{chunk-VRZSDUZK.js → chunk-4T5XUXTP.js} +5 -0
- package/chunks/{chunk-PVDORWEM.js → chunk-66POUWQA.js} +3 -3
- package/chunks/{chunk-TI4NDKQC.js → chunk-7UKLAB2Q.js} +8 -8
- package/chunks/{chunk-APX65SRT.js → chunk-ADQ6B6QI.js} +1 -1
- package/chunks/{chunk-OVKTA5CX.js → chunk-AP2O742I.js} +2 -2
- package/chunks/{chunk-RAU5KE6F.js → chunk-DDTGQKVB.js} +1 -1
- package/chunks/{chunk-F3TQHNSQ.js → chunk-DRXJRWZA.js} +4 -2
- package/chunks/{chunk-IRA5BW2J.js → chunk-G7DFH6WK.js} +35 -6
- package/chunks/{chunk-TVPVXL73.js → chunk-I2JLVALT.js} +77 -11
- package/chunks/{chunk-AOZQPCWI.js → chunk-JA7EIRUB.js} +5 -0
- package/chunks/{chunk-M2MMGSLK.js → chunk-JQJSNCGD.js} +3 -3
- package/chunks/{chunk-DDDYR2HF.js → chunk-KAKAN5X3.js} +2 -2
- package/chunks/{chunk-2AK5O3NQ.js → chunk-KVK4LNTB.js} +28 -28
- package/chunks/{chunk-7K6I2GUG.js → chunk-KYJLZCM3.js} +1 -1
- package/chunks/{chunk-VNF2GRZA.js → chunk-MQNTUZ2B.js} +1 -1
- package/chunks/{chunk-Y2OQOAY7.js → chunk-NDCXYF5Q.js} +1 -1
- package/chunks/{chunk-KPLWZIOV.js → chunk-NEB25B57.js} +3 -3
- package/chunks/{chunk-CSJIKXUD.js → chunk-OBJCYCIV.js} +1 -1
- package/chunks/{chunk-TYNF7ROW.js → chunk-ORHGCCJR.js} +1 -1
- package/chunks/{chunk-YTTDYTVB.js → chunk-PFP35UAF.js} +1 -1
- package/chunks/{chunk-WKW5W2ZP.js → chunk-PFUJVZFI.js} +1 -1
- package/chunks/{chunk-7S34K2P3.js → chunk-QHR5X4FO.js} +1 -1
- package/chunks/{chunk-WDFZ7WYJ.js → chunk-RQOKASNF.js} +1 -1
- package/chunks/{chunk-62OOT7FY.js → chunk-TWTUSPPI.js} +2 -2
- package/chunks/{chunk-BDNCJLJP.js → chunk-UPYLTC2Z.js} +1 -1
- package/chunks/{chunk-7O5H2SQP.js → chunk-UXCQFVXG.js} +2 -2
- package/chunks/{chunk-NRHHB3YY.js → chunk-VMRXSVEE.js} +1 -1
- package/chunks/{chunk-TKT5UW3G.js → chunk-XG6WXQFN.js} +2 -2
- package/chunks/{chunk-B3XOSR6W.js → chunk-Z2NUKRKG.js} +3 -3
- package/chunks/{chunk-MQ65WBVF.js → chunk-ZO7KDO3C.js} +1 -1
- package/chunks/{create.action-O3HN6GV2.js → create.action-UX5TVHST.js} +16 -16
- package/chunks/{delete.action-KEBI2QCS.js → delete.action-C3ZGIXJX.js} +19 -16
- package/chunks/{delete.action-2L2RWLPI.js → delete.action-UMVF2N4A.js} +19 -16
- package/chunks/{get.action-BUNTDW54.js → get.action-KFLT4UUT.js} +10 -10
- package/chunks/{get.action-WDMTCZZR.js → get.action-KIEUFN4D.js} +15 -15
- package/chunks/{list.action-JNSEJVHX.js → list.action-F3M4XJFC.js} +15 -15
- package/chunks/{list.action-NSK7OBRH.js → list.action-QK5DK5X3.js} +17 -17
- package/chunks/{publish.action-ZRZQUL7S.js → publish.action-GZ2TSAPE.js} +21 -21
- package/chunks/{update.action-O2R5ODGG.js → update.action-DNINDNBT.js} +16 -16
- package/chunks/{update.action-7TA46AE6.js → update.action-OTRO76PF.js} +16 -16
- package/index.js +65 -62
- package/package.json +1 -1
- package/skills/scalar-cli/SKILL.md +2 -2
- package/template.md +4 -0
package/index.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
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-DDTGQKVB.js";
|
|
6
6
|
import {
|
|
7
7
|
buildCliContext,
|
|
8
8
|
runnableCommands
|
|
9
|
-
} from "./chunks/chunk-
|
|
9
|
+
} from "./chunks/chunk-ADQ6B6QI.js";
|
|
10
10
|
import {
|
|
11
11
|
openBrowser
|
|
12
12
|
} from "./chunks/chunk-RAJM56L7.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
BundleCommand,
|
|
18
18
|
parseFetchLimit,
|
|
19
19
|
parsePort
|
|
20
|
-
} from "./chunks/chunk-
|
|
20
|
+
} from "./chunks/chunk-MQNTUZ2B.js";
|
|
21
21
|
import {
|
|
22
22
|
completeFiles
|
|
23
23
|
} from "./chunks/chunk-DFOZG7ZV.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "./chunks/chunk-NAC63XJF.js";
|
|
31
31
|
import {
|
|
32
32
|
SdkLanguage
|
|
33
|
-
} from "./chunks/chunk-
|
|
33
|
+
} from "./chunks/chunk-NDCXYF5Q.js";
|
|
34
34
|
import {
|
|
35
35
|
checkNodeVersion
|
|
36
36
|
} from "./chunks/chunk-VUXPDHTQ.js";
|
|
@@ -38,15 +38,15 @@ import {
|
|
|
38
38
|
getMetadata,
|
|
39
39
|
logout,
|
|
40
40
|
setMetadata
|
|
41
|
-
} from "./chunks/chunk-
|
|
42
|
-
import "./chunks/chunk-
|
|
41
|
+
} from "./chunks/chunk-KAKAN5X3.js";
|
|
42
|
+
import "./chunks/chunk-OBJCYCIV.js";
|
|
43
43
|
import {
|
|
44
44
|
bin,
|
|
45
45
|
name,
|
|
46
46
|
version
|
|
47
|
-
} from "./chunks/chunk-
|
|
48
|
-
import "./chunks/chunk-
|
|
49
|
-
import "./chunks/chunk-
|
|
47
|
+
} from "./chunks/chunk-VMRXSVEE.js";
|
|
48
|
+
import "./chunks/chunk-DRXJRWZA.js";
|
|
49
|
+
import "./chunks/chunk-4T5XUXTP.js";
|
|
50
50
|
import {
|
|
51
51
|
requireInteractive,
|
|
52
52
|
text
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
err,
|
|
64
64
|
ok
|
|
65
65
|
} from "./chunks/chunk-5ENKYZA4.js";
|
|
66
|
-
import "./chunks/chunk-
|
|
66
|
+
import "./chunks/chunk-JA7EIRUB.js";
|
|
67
67
|
import "./chunks/chunk-Q26DFKTY.js";
|
|
68
68
|
import {
|
|
69
69
|
external_exports
|
|
@@ -85,7 +85,7 @@ var DeleteSchemaCommand = () => {
|
|
|
85
85
|
cmd3.option("-s, --slug <slug>", "Schema slug");
|
|
86
86
|
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
87
87
|
cmd3.action(async (...args) => {
|
|
88
|
-
const { deleteAction } = await import("./chunks/delete.action-
|
|
88
|
+
const { deleteAction } = await import("./chunks/delete.action-C3ZGIXJX.js");
|
|
89
89
|
return deleteAction(...args);
|
|
90
90
|
});
|
|
91
91
|
return cmd3;
|
|
@@ -105,7 +105,7 @@ var GetSchemaCommand = () => {
|
|
|
105
105
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
106
106
|
completeFiles(cmd3, [], ["--output"]);
|
|
107
107
|
cmd3.action(async (...args) => {
|
|
108
|
-
const { getAction } = await import("./chunks/get.action-
|
|
108
|
+
const { getAction } = await import("./chunks/get.action-KFLT4UUT.js");
|
|
109
109
|
return getAction(...args);
|
|
110
110
|
});
|
|
111
111
|
return cmd3;
|
|
@@ -119,7 +119,7 @@ var ListSchemaCommand = () => {
|
|
|
119
119
|
cmd3.option("--namespace <namespace>", "Team namespace");
|
|
120
120
|
cmd3.option("--json", "Output schema metadata as JSON");
|
|
121
121
|
cmd3.action(async (...args) => {
|
|
122
|
-
const { listAction } = await import("./chunks/list.action-
|
|
122
|
+
const { listAction } = await import("./chunks/list.action-QK5DK5X3.js");
|
|
123
123
|
return listAction(...args);
|
|
124
124
|
});
|
|
125
125
|
return cmd3;
|
|
@@ -158,7 +158,7 @@ var PublishSchemaCommand = () => {
|
|
|
158
158
|
);
|
|
159
159
|
completeFiles(cmd3, ["file"], []);
|
|
160
160
|
cmd3.action(async (...args) => {
|
|
161
|
-
const { publishAction } = await import("./chunks/publish.action-
|
|
161
|
+
const { publishAction } = await import("./chunks/publish.action-GZ2TSAPE.js");
|
|
162
162
|
return publishAction(...args);
|
|
163
163
|
});
|
|
164
164
|
return cmd3;
|
|
@@ -193,7 +193,7 @@ var UpdateSchemaCommand = () => {
|
|
|
193
193
|
"\nOmitting visibility options leaves access unchanged.\nExample: scalar schema update --namespace acme --slug my-schema --public"
|
|
194
194
|
);
|
|
195
195
|
cmd3.action(async (...args) => {
|
|
196
|
-
const { updateAction } = await import("./chunks/update.action-
|
|
196
|
+
const { updateAction } = await import("./chunks/update.action-DNINDNBT.js");
|
|
197
197
|
return updateAction(...args);
|
|
198
198
|
});
|
|
199
199
|
return cmd3;
|
|
@@ -224,7 +224,7 @@ var BuildSdkCommand = () => {
|
|
|
224
224
|
cmd3.option("-s, --slug <slug>", "SDK slug");
|
|
225
225
|
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
226
226
|
cmd3.action(async (...args) => {
|
|
227
|
-
const { buildAction } = await import("./chunks/build.action-
|
|
227
|
+
const { buildAction } = await import("./chunks/build.action-TAMUO3F2.js");
|
|
228
228
|
return buildAction(...args);
|
|
229
229
|
});
|
|
230
230
|
return cmd3;
|
|
@@ -244,7 +244,7 @@ var CreateSdkCommand = () => {
|
|
|
244
244
|
)
|
|
245
245
|
);
|
|
246
246
|
cmd3.action(async (...args) => {
|
|
247
|
-
const { createAction } = await import("./chunks/create.action-
|
|
247
|
+
const { createAction } = await import("./chunks/create.action-UX5TVHST.js");
|
|
248
248
|
return createAction(...args);
|
|
249
249
|
});
|
|
250
250
|
return cmd3;
|
|
@@ -259,7 +259,7 @@ var DeleteSdkCommand = () => {
|
|
|
259
259
|
cmd3.option("-s, --slug <slug>", "SDK slug");
|
|
260
260
|
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
261
261
|
cmd3.action(async (...args) => {
|
|
262
|
-
const { deleteAction } = await import("./chunks/delete.action-
|
|
262
|
+
const { deleteAction } = await import("./chunks/delete.action-UMVF2N4A.js");
|
|
263
263
|
return deleteAction(...args);
|
|
264
264
|
});
|
|
265
265
|
return cmd3;
|
|
@@ -281,7 +281,7 @@ var UpdateSdkCommand = () => {
|
|
|
281
281
|
).choices([...PRIVACY_VALUES])
|
|
282
282
|
);
|
|
283
283
|
cmd3.action(async (...args) => {
|
|
284
|
-
const { updateAction } = await import("./chunks/update.action-
|
|
284
|
+
const { updateAction } = await import("./chunks/update.action-OTRO76PF.js");
|
|
285
285
|
return updateAction(...args);
|
|
286
286
|
});
|
|
287
287
|
return cmd3;
|
|
@@ -298,7 +298,7 @@ var GetSdkCommand = () => {
|
|
|
298
298
|
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
299
299
|
cmd3.option("--json", "Output structured SDK metadata as JSON");
|
|
300
300
|
cmd3.action(async (...args) => {
|
|
301
|
-
const { getAction } = await import("./chunks/get.action-
|
|
301
|
+
const { getAction } = await import("./chunks/get.action-KIEUFN4D.js");
|
|
302
302
|
return getAction(...args);
|
|
303
303
|
});
|
|
304
304
|
return cmd3;
|
|
@@ -312,7 +312,7 @@ var ListSdkCommand = () => {
|
|
|
312
312
|
cmd3.option("--json", "Output structured SDK metadata as JSON");
|
|
313
313
|
cmd3.option("--namespace <namespace>", "Team namespace");
|
|
314
314
|
cmd3.action(async (...args) => {
|
|
315
|
-
const { listAction } = await import("./chunks/list.action-
|
|
315
|
+
const { listAction } = await import("./chunks/list.action-F3M4XJFC.js");
|
|
316
316
|
return listAction(...args);
|
|
317
317
|
});
|
|
318
318
|
return cmd3;
|
|
@@ -341,41 +341,41 @@ function createAccessGroupCommand() {
|
|
|
341
341
|
"Manage access groups and allowed email domains for the current team"
|
|
342
342
|
);
|
|
343
343
|
command.command("list").description("List access groups for the current team").option("--json", "Print the result as JSON").action(async (options) => {
|
|
344
|
-
const { runAction } = await import("./chunks/actions-
|
|
344
|
+
const { runAction } = await import("./chunks/actions-K2RSZCU4.js");
|
|
345
345
|
await runAction({ operation: "list", ...options });
|
|
346
346
|
});
|
|
347
347
|
command.command("create").description("Create an access group (Pro or above)").argument("<slug>", "New access group slug").option("--name <name>", "Display name").option("--domain <domains...>", "Allowed email domains").option("--json", "Print the result as JSON").action(
|
|
348
348
|
async (slug, options) => {
|
|
349
|
-
const { runAction } = await import("./chunks/actions-
|
|
349
|
+
const { runAction } = await import("./chunks/actions-K2RSZCU4.js");
|
|
350
350
|
await runAction({ operation: "create", slug, ...options });
|
|
351
351
|
}
|
|
352
352
|
);
|
|
353
353
|
command.command("get").description("Get an access group and its allowlists").argument("<slug>", "Access group slug").option("--json", "Print the result as JSON").action(async (slug, options) => {
|
|
354
|
-
const { runAction } = await import("./chunks/actions-
|
|
354
|
+
const { runAction } = await import("./chunks/actions-K2RSZCU4.js");
|
|
355
355
|
await runAction({ operation: "get", slug, ...options });
|
|
356
356
|
});
|
|
357
357
|
command.command("update").description("Update access group metadata").argument("<slug>", "Current access group slug").option("--name <name>", "New display name").option("--new-slug <slug>", "New access group slug").option("--json", "Print the result as JSON").action(
|
|
358
358
|
async (slug, options) => {
|
|
359
|
-
const { runAction } = await import("./chunks/actions-
|
|
359
|
+
const { runAction } = await import("./chunks/actions-K2RSZCU4.js");
|
|
360
360
|
await runAction({ operation: "update", slug, ...options });
|
|
361
361
|
}
|
|
362
362
|
);
|
|
363
363
|
command.command("delete").description("Delete an access group and remove its project assignments").argument("<slug>", "Access group slug").option("-y, --yes", "Confirm deletion without prompting").option("--json", "Print the result as JSON (requires --yes)").action(
|
|
364
364
|
async (slug, options) => {
|
|
365
|
-
const { runAction } = await import("./chunks/actions-
|
|
365
|
+
const { runAction } = await import("./chunks/actions-K2RSZCU4.js");
|
|
366
366
|
await runAction({ operation: "delete", slug, ...options });
|
|
367
367
|
}
|
|
368
368
|
);
|
|
369
369
|
const domain = command.command("domain").description("Manage allowed email domains");
|
|
370
370
|
domain.command("add").description("Add an exact email domain to an access group").argument("<slug>", "Access group slug").argument("<domain>", "Email domain, such as example.com").option("--json", "Print the result as JSON").action(
|
|
371
371
|
async (slug, domain2, options) => {
|
|
372
|
-
const { runAction } = await import("./chunks/actions-
|
|
372
|
+
const { runAction } = await import("./chunks/actions-K2RSZCU4.js");
|
|
373
373
|
await runAction({ operation: "add-domain", slug, domain: domain2, ...options });
|
|
374
374
|
}
|
|
375
375
|
);
|
|
376
376
|
domain.command("remove").description("Remove an exact email domain from an access group").argument("<slug>", "Access group slug").argument("<domain>", "Email domain, such as example.com").option("--json", "Print the result as JSON").action(
|
|
377
377
|
async (slug, domain2, options) => {
|
|
378
|
-
const { runAction } = await import("./chunks/actions-
|
|
378
|
+
const { runAction } = await import("./chunks/actions-K2RSZCU4.js");
|
|
379
379
|
await runAction({
|
|
380
380
|
operation: "remove-domain",
|
|
381
381
|
slug,
|
|
@@ -396,7 +396,10 @@ import { Command as Command15, Option as Option5 } from "commander";
|
|
|
396
396
|
var LoginCommand = () => {
|
|
397
397
|
const cmd3 = new Command15("login");
|
|
398
398
|
cmd3.description("Log in to Scalar");
|
|
399
|
-
cmd3.option(
|
|
399
|
+
cmd3.option(
|
|
400
|
+
"--token <token>",
|
|
401
|
+
"Personal token for authentication (overrides SCALAR_API_KEY; must not be empty)"
|
|
402
|
+
);
|
|
400
403
|
cmd3.addOption(
|
|
401
404
|
new Option5(
|
|
402
405
|
"--email <email>",
|
|
@@ -410,7 +413,7 @@ var LoginCommand = () => {
|
|
|
410
413
|
).hideHelp()
|
|
411
414
|
);
|
|
412
415
|
cmd3.action(async (...args) => {
|
|
413
|
-
const { loginAction } = await import("./chunks/action-
|
|
416
|
+
const { loginAction } = await import("./chunks/action-WJMC3TDN.js");
|
|
414
417
|
return loginAction(...args);
|
|
415
418
|
});
|
|
416
419
|
return cmd3;
|
|
@@ -435,7 +438,7 @@ var WhoAmICommand = () => {
|
|
|
435
438
|
cmd3.description("Show the logged-in user and current team");
|
|
436
439
|
cmd3.option("--json", "Output authentication details as JSON");
|
|
437
440
|
cmd3.action(async (options) => {
|
|
438
|
-
const { whoamiAction } = await import("./chunks/action-
|
|
441
|
+
const { whoamiAction } = await import("./chunks/action-V2B42324.js");
|
|
439
442
|
return whoamiAction(options);
|
|
440
443
|
});
|
|
441
444
|
return cmd3;
|
|
@@ -488,7 +491,7 @@ cmd.description(
|
|
|
488
491
|
"Print every command, argument, and option as JSON for AI agents"
|
|
489
492
|
);
|
|
490
493
|
cmd.action(async () => {
|
|
491
|
-
const { contextAction } = await import("./chunks/action-
|
|
494
|
+
const { contextAction } = await import("./chunks/action-SRFBOLDL.js");
|
|
492
495
|
return contextAction(cmd);
|
|
493
496
|
});
|
|
494
497
|
var context_default = cmd;
|
|
@@ -514,7 +517,7 @@ function JoinCommand() {
|
|
|
514
517
|
);
|
|
515
518
|
completeFiles(cmd3, ["files"], ["--output"]);
|
|
516
519
|
cmd3.action(async (...args) => {
|
|
517
|
-
const { joinAction } = await import("./chunks/action-
|
|
520
|
+
const { joinAction } = await import("./chunks/action-E7EK6TJJ.js");
|
|
518
521
|
return joinAction(...args);
|
|
519
522
|
});
|
|
520
523
|
return cmd3;
|
|
@@ -538,7 +541,7 @@ function SplitCommand() {
|
|
|
538
541
|
);
|
|
539
542
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
540
543
|
cmd3.action(async (...args) => {
|
|
541
|
-
const { splitAction } = await import("./chunks/action-
|
|
544
|
+
const { splitAction } = await import("./chunks/action-MHBMWRU4.js");
|
|
542
545
|
return splitAction(...args);
|
|
543
546
|
});
|
|
544
547
|
return cmd3;
|
|
@@ -559,7 +562,7 @@ function FormatCommand() {
|
|
|
559
562
|
);
|
|
560
563
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
561
564
|
cmd3.action(async (...args) => {
|
|
562
|
-
const { formatAction } = await import("./chunks/action-
|
|
565
|
+
const { formatAction } = await import("./chunks/action-BIEKRF2X.js");
|
|
563
566
|
return formatAction(...args);
|
|
564
567
|
});
|
|
565
568
|
return cmd3;
|
|
@@ -612,7 +615,7 @@ function LintCommand() {
|
|
|
612
615
|
);
|
|
613
616
|
completeFiles(cmd3, ["file|url"], ["--rule", "--output", "--ignore-file"]);
|
|
614
617
|
cmd3.action(async (...args) => {
|
|
615
|
-
const { lintAction } = await import("./chunks/action-
|
|
618
|
+
const { lintAction } = await import("./chunks/action-Q7OD2QHZ.js");
|
|
616
619
|
return lintAction(...args);
|
|
617
620
|
});
|
|
618
621
|
return cmd3;
|
|
@@ -627,7 +630,7 @@ function MarkdownCommand() {
|
|
|
627
630
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
628
631
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
629
632
|
cmd3.action(async (...args) => {
|
|
630
|
-
const { markdownAction } = await import("./chunks/action-
|
|
633
|
+
const { markdownAction } = await import("./chunks/action-4U36CMZG.js");
|
|
631
634
|
return markdownAction(...args);
|
|
632
635
|
});
|
|
633
636
|
return cmd3;
|
|
@@ -645,7 +648,7 @@ function MockCommand() {
|
|
|
645
648
|
cmd3.option("-p, --port <port>", "HTTP port for the Mock Server", parsePort);
|
|
646
649
|
completeFiles(cmd3, ["file|url"], []);
|
|
647
650
|
cmd3.action(async (...args) => {
|
|
648
|
-
const { mockAction } = await import("./chunks/action-
|
|
651
|
+
const { mockAction } = await import("./chunks/action-YXAOA3TJ.js");
|
|
649
652
|
await mockAction(...args);
|
|
650
653
|
});
|
|
651
654
|
return cmd3;
|
|
@@ -664,7 +667,7 @@ function ConvertCommand() {
|
|
|
664
667
|
);
|
|
665
668
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
666
669
|
cmd3.action(async (...args) => {
|
|
667
|
-
const { convertAction } = await import("./chunks/action-
|
|
670
|
+
const { convertAction } = await import("./chunks/action-IN7SNSSI.js");
|
|
668
671
|
return convertAction(...args);
|
|
669
672
|
});
|
|
670
673
|
return cmd3;
|
|
@@ -690,7 +693,7 @@ function ServeCommand() {
|
|
|
690
693
|
);
|
|
691
694
|
completeFiles(cmd3, ["file|url"], ["--config"]);
|
|
692
695
|
cmd3.action(async (...args) => {
|
|
693
|
-
const { serveAction } = await import("./chunks/action-
|
|
696
|
+
const { serveAction } = await import("./chunks/action-3QTDQRAO.js");
|
|
694
697
|
await serveAction(...args);
|
|
695
698
|
});
|
|
696
699
|
return cmd3;
|
|
@@ -710,7 +713,7 @@ function ShareCommand() {
|
|
|
710
713
|
);
|
|
711
714
|
completeFiles(cmd3, ["file"], []);
|
|
712
715
|
cmd3.action(async (...args) => {
|
|
713
|
-
const { shareAction } = await import("./chunks/action-
|
|
716
|
+
const { shareAction } = await import("./chunks/action-2LFAO27S.js");
|
|
714
717
|
return shareAction(...args);
|
|
715
718
|
});
|
|
716
719
|
return cmd3;
|
|
@@ -730,7 +733,7 @@ function UpgradeCommand() {
|
|
|
730
733
|
);
|
|
731
734
|
completeFiles(cmd3, ["file|url"], ["--output"]);
|
|
732
735
|
cmd3.action(async (...args) => {
|
|
733
|
-
const { upgradeAction } = await import("./chunks/action-
|
|
736
|
+
const { upgradeAction } = await import("./chunks/action-FIKVZPFG.js");
|
|
734
737
|
return upgradeAction(...args);
|
|
735
738
|
});
|
|
736
739
|
return cmd3;
|
|
@@ -744,7 +747,7 @@ function ValidateCommand() {
|
|
|
744
747
|
cmd3.argument("[file|url]", "File or URL to validate");
|
|
745
748
|
completeFiles(cmd3, ["file|url"], []);
|
|
746
749
|
cmd3.action(async (...args) => {
|
|
747
|
-
const { validateAction } = await import("./chunks/action-
|
|
750
|
+
const { validateAction } = await import("./chunks/action-ZSUVSURQ.js");
|
|
748
751
|
return validateAction(...args);
|
|
749
752
|
});
|
|
750
753
|
return cmd3;
|
|
@@ -812,7 +815,7 @@ var PreviewCommand = () => {
|
|
|
812
815
|
cmd3.option("-N, --no-open", "Do not open the browser automatically", true);
|
|
813
816
|
completeFiles(cmd3, ["config"], []);
|
|
814
817
|
cmd3.action(async (...args) => {
|
|
815
|
-
const { previewAction } = await import("./chunks/action-
|
|
818
|
+
const { previewAction } = await import("./chunks/action-MHJOOGII.js");
|
|
816
819
|
return previewAction(...args);
|
|
817
820
|
});
|
|
818
821
|
return cmd3;
|
|
@@ -829,7 +832,7 @@ function CheckConfigCommand() {
|
|
|
829
832
|
);
|
|
830
833
|
completeFiles(cmd3, ["file"], []);
|
|
831
834
|
cmd3.action(async (...args) => {
|
|
832
|
-
const { checkConfigAction } = await import("./chunks/action-
|
|
835
|
+
const { checkConfigAction } = await import("./chunks/action-NY2R6VH2.js");
|
|
833
836
|
return checkConfigAction(...args);
|
|
834
837
|
});
|
|
835
838
|
return cmd3;
|
|
@@ -844,7 +847,7 @@ var CreateCommand = () => {
|
|
|
844
847
|
cmd3.option("-n, --name <name>", "Project name");
|
|
845
848
|
cmd3.option("-s, --slug <slug>", "Project slug");
|
|
846
849
|
cmd3.action(async (...args) => {
|
|
847
|
-
const { createAction } = await import("./chunks/action-
|
|
850
|
+
const { createAction } = await import("./chunks/action-D7D3YH2N.js");
|
|
848
851
|
return createAction(...args);
|
|
849
852
|
});
|
|
850
853
|
return cmd3;
|
|
@@ -862,7 +865,7 @@ var GetCommand = () => new Command37("get").description(
|
|
|
862
865
|
"Maximum status wait in seconds (default: 30, or 600 with --wait)"
|
|
863
866
|
).action(
|
|
864
867
|
async (buildId, options) => {
|
|
865
|
-
const { getAction } = await import("./chunks/action-
|
|
868
|
+
const { getAction } = await import("./chunks/action-LKMBK3MO.js");
|
|
866
869
|
await getAction(buildId, options);
|
|
867
870
|
}
|
|
868
871
|
);
|
|
@@ -875,7 +878,7 @@ var ListCommand = () => {
|
|
|
875
878
|
cmd3.description("List production deployments for a project");
|
|
876
879
|
cmd3.option("-s, --slug [slug]", "Project slug from scalar project list");
|
|
877
880
|
cmd3.action(async (...args) => {
|
|
878
|
-
const { listAction } = await import("./chunks/action-
|
|
881
|
+
const { listAction } = await import("./chunks/action-BVORONSB.js");
|
|
879
882
|
return listAction(...args);
|
|
880
883
|
});
|
|
881
884
|
return cmd3;
|
|
@@ -896,7 +899,7 @@ function GetCommand2() {
|
|
|
896
899
|
const command = new Command40("get").description("Show project details for the current team").argument("<slug>", "Project slug from scalar project list").option("--json", "Print project details as JSON");
|
|
897
900
|
command.action(
|
|
898
901
|
async (slug, options) => {
|
|
899
|
-
const { getAction } = await import("./chunks/action-
|
|
902
|
+
const { getAction } = await import("./chunks/action-AQCSAFDU.js");
|
|
900
903
|
await getAction(slug, options);
|
|
901
904
|
}
|
|
902
905
|
);
|
|
@@ -915,7 +918,7 @@ var InitCommand = () => {
|
|
|
915
918
|
);
|
|
916
919
|
cmd3.option("--force", "Overwrite existing configuration");
|
|
917
920
|
cmd3.action(async (...args) => {
|
|
918
|
-
const { initAction } = await import("./chunks/action-
|
|
921
|
+
const { initAction } = await import("./chunks/action-S7NCRXKS.js");
|
|
919
922
|
return initAction(...args);
|
|
920
923
|
});
|
|
921
924
|
return cmd3;
|
|
@@ -926,7 +929,7 @@ import { Command as Command42 } from "commander";
|
|
|
926
929
|
function ListCommand2() {
|
|
927
930
|
const command = new Command42("list").description("List projects and their slugs for the current team").option("--json", "Print project details as JSON");
|
|
928
931
|
command.action(async (options) => {
|
|
929
|
-
const { listAction } = await import("./chunks/action-
|
|
932
|
+
const { listAction } = await import("./chunks/action-3OYAJ5F6.js");
|
|
930
933
|
await listAction(options);
|
|
931
934
|
});
|
|
932
935
|
return command;
|
|
@@ -961,7 +964,7 @@ var PublishCommand = () => {
|
|
|
961
964
|
);
|
|
962
965
|
completeFiles(cmd3, [], ["--config"]);
|
|
963
966
|
cmd3.action(async (...args) => {
|
|
964
|
-
const { publishAction } = await import("./chunks/action-
|
|
967
|
+
const { publishAction } = await import("./chunks/action-6LNC6MMJ.js");
|
|
965
968
|
return publishAction(...args);
|
|
966
969
|
});
|
|
967
970
|
return cmd3;
|
|
@@ -982,7 +985,7 @@ var RollbackCommand = () => {
|
|
|
982
985
|
);
|
|
983
986
|
cmd3.option("-y, --yes", "Skip the confirmation prompt");
|
|
984
987
|
cmd3.action(async (...args) => {
|
|
985
|
-
const { rollbackAction } = await import("./chunks/action-
|
|
988
|
+
const { rollbackAction } = await import("./chunks/action-WMOLIVXC.js");
|
|
986
989
|
return rollbackAction(...args);
|
|
987
990
|
});
|
|
988
991
|
return cmd3;
|
|
@@ -1000,7 +1003,7 @@ var UpgradeCommand2 = () => {
|
|
|
1000
1003
|
);
|
|
1001
1004
|
completeFiles(cmd3, ["config"], []);
|
|
1002
1005
|
cmd3.action(async (...args) => {
|
|
1003
|
-
const { upgradeAction } = await import("./chunks/action-
|
|
1006
|
+
const { upgradeAction } = await import("./chunks/action-KCJTUKNF.js");
|
|
1004
1007
|
return upgradeAction(...args);
|
|
1005
1008
|
});
|
|
1006
1009
|
return cmd3;
|
|
@@ -1165,7 +1168,7 @@ var PublishCommand2 = () => {
|
|
|
1165
1168
|
);
|
|
1166
1169
|
completeFiles(cmd3, ["file"], []);
|
|
1167
1170
|
cmd3.action(async (...args) => {
|
|
1168
|
-
const { publishAction } = await import("./chunks/action-
|
|
1171
|
+
const { publishAction } = await import("./chunks/action-YH3KB4NR.js");
|
|
1169
1172
|
return publishAction(...args);
|
|
1170
1173
|
});
|
|
1171
1174
|
return cmd3;
|
|
@@ -1180,7 +1183,7 @@ var DeleteCommand = () => {
|
|
|
1180
1183
|
cmd3.argument("[namespace]", "Team namespace");
|
|
1181
1184
|
cmd3.argument("[slug]", "API description slug");
|
|
1182
1185
|
cmd3.action(async (...args) => {
|
|
1183
|
-
const { deleteAction } = await import("./chunks/action-
|
|
1186
|
+
const { deleteAction } = await import("./chunks/action-VK6HFIZ5.js");
|
|
1184
1187
|
return deleteAction(...args);
|
|
1185
1188
|
});
|
|
1186
1189
|
return cmd3;
|
|
@@ -1205,7 +1208,7 @@ var GetCommand3 = () => {
|
|
|
1205
1208
|
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
1206
1209
|
completeFiles(cmd3, [], ["--output"]);
|
|
1207
1210
|
cmd3.action(async (...args) => {
|
|
1208
|
-
const { getAction } = await import("./chunks/action-
|
|
1211
|
+
const { getAction } = await import("./chunks/action-4DEIYLOW.js");
|
|
1209
1212
|
return getAction(...args);
|
|
1210
1213
|
});
|
|
1211
1214
|
return cmd3;
|
|
@@ -1219,7 +1222,7 @@ var ListCommand3 = () => {
|
|
|
1219
1222
|
cmd3.option("--namespace <namespace>", "Team namespace");
|
|
1220
1223
|
cmd3.option("--json", "Output Scalar Registry API metadata as JSON");
|
|
1221
1224
|
cmd3.action(async (...args) => {
|
|
1222
|
-
const { listAction } = await import("./chunks/action-
|
|
1225
|
+
const { listAction } = await import("./chunks/action-XZDNARAW.js");
|
|
1223
1226
|
return listAction(...args);
|
|
1224
1227
|
});
|
|
1225
1228
|
return cmd3;
|
|
@@ -1248,7 +1251,7 @@ var UpdateCommand = () => {
|
|
|
1248
1251
|
"\nOmitting visibility options leaves access unchanged.\nExample: scalar registry update acme my-api --private"
|
|
1249
1252
|
);
|
|
1250
1253
|
cmd3.action(async (...args) => {
|
|
1251
|
-
const { updateAction } = await import("./chunks/action-
|
|
1254
|
+
const { updateAction } = await import("./chunks/action-RDG3SJ2G.js");
|
|
1252
1255
|
return updateAction(...args);
|
|
1253
1256
|
});
|
|
1254
1257
|
return cmd3;
|
|
@@ -1277,7 +1280,7 @@ var GetCommand4 = () => {
|
|
|
1277
1280
|
cmd3.description("Show the current team and its namespaces");
|
|
1278
1281
|
cmd3.option("--json", "Output the current team as JSON");
|
|
1279
1282
|
cmd3.action(async (...args) => {
|
|
1280
|
-
const { getAction } = await import("./chunks/action-
|
|
1283
|
+
const { getAction } = await import("./chunks/action-6WWWTCCB.js");
|
|
1281
1284
|
return getAction(...args);
|
|
1282
1285
|
});
|
|
1283
1286
|
return cmd3;
|
|
@@ -1290,7 +1293,7 @@ var ListCommand4 = () => {
|
|
|
1290
1293
|
cmd3.description("List your Scalar teams");
|
|
1291
1294
|
cmd3.option("--json", "Output teams as JSON");
|
|
1292
1295
|
cmd3.action(async (...args) => {
|
|
1293
|
-
const { listAction } = await import("./chunks/action-
|
|
1296
|
+
const { listAction } = await import("./chunks/action-HGPGL624.js");
|
|
1294
1297
|
return listAction(...args);
|
|
1295
1298
|
});
|
|
1296
1299
|
return cmd3;
|
|
@@ -1304,7 +1307,7 @@ var SetCommand = () => {
|
|
|
1304
1307
|
cmd3.description("Select the current team");
|
|
1305
1308
|
cmd3.option("--team <team>", "Team ID");
|
|
1306
1309
|
cmd3.action(async (...args) => {
|
|
1307
|
-
const { setAction } = await import("./chunks/action-
|
|
1310
|
+
const { setAction } = await import("./chunks/action-JOKVK5PP.js");
|
|
1308
1311
|
return setAction(...args);
|
|
1309
1312
|
});
|
|
1310
1313
|
return cmd3;
|
package/package.json
CHANGED
|
@@ -5,13 +5,13 @@ 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.13.
|
|
8
|
+
Validate, lint, bundle, mock, and preview OpenAPI and AsyncAPI descriptions, and publish them to Scalar (`@scalar/cli` 2.13.2).
|
|
9
9
|
|
|
10
10
|
## Operating notes
|
|
11
11
|
|
|
12
12
|
- Run `scalar <command>` when the CLI is installed, or `npx @scalar/cli <command>` when it is not.
|
|
13
13
|
- Run `scalar context` for this command tree as JSON, or `scalar <command> --help` for a single command.
|
|
14
|
-
- Log in with a personal token: `scalar auth login --token <token>`, or set `SCALAR_API_KEY` and run `scalar auth login`. Both store the session on disk for later commands. Without a token, `scalar auth login` opens a browser and waits for a person to log in, so do not run it that way. Check the session with `scalar auth whoami`.
|
|
14
|
+
- Log in with a personal token: `scalar auth login --token <token>`, or set `SCALAR_API_KEY` and run `scalar auth login`. An explicit --token overrides SCALAR_API_KEY and must not be empty or whitespace-only. Both store the session on disk for later commands. Without a token, `scalar auth login` opens a browser and waits for a person to log in, so do not run it that way. Check the session with `scalar auth whoami`.
|
|
15
15
|
- Use --no-input before or after subcommands to disable prompts and browser launches, including under a PTY. Supply required values explicitly; missing inputs fail with exit code 1 and guidance. Piped input is never a confirmation. Cancelled prompts and EOF exit with code 1. The flag does not imply --yes or --force and neither option chooses an unspecified target.
|
|
16
16
|
- Many commands prompt when a value is left out, such as a slug, a team, or a confirmation before overwriting a file, and missing values fail when interaction is disabled. Pass every value as an argument or flag: for example `--output` on `document bundle` and `document upgrade`, `--yes` on `project rollback`, and `--force` on `project init`.
|
|
17
17
|
- Results go to stdout. Errors go to stderr, prefixed with `[ERROR]`.
|
package/template.md
CHANGED
|
@@ -143,6 +143,10 @@ The flag works before or after subcommands. It disables prompts and browser laun
|
|
|
143
143
|
|
|
144
144
|
For `auth login`, supply a personal token using the existing `SCALAR_API_KEY` source or `--token`; without one, noninteractive login fails before starting a browser or callback server. `project preview` still runs the requested preview server but never opens its browser under `--no-input`, even with an opening option. `readme` prints the documentation URL without launching a browser.
|
|
145
145
|
|
|
146
|
+
An explicit `--token` takes precedence over `SCALAR_API_KEY`. An empty or whitespace-only `--token` fails without falling back to the environment or browser login. With no flag, environment-only authentication remains supported; an unset or empty environment value uses browser login, or fails under `--no-input`.
|
|
147
|
+
|
|
148
|
+
Compatibility: login previously preferred `SCALAR_API_KEY` when both sources were supplied. Scripts that rely on the environment credential must omit `--token`. The selected credential is saved for later commands.
|
|
149
|
+
|
|
146
150
|
## Use in CI
|
|
147
151
|
|
|
148
152
|
```yml
|