@scalar/cli 2.5.1 → 2.7.1
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 +113 -28
- package/chunks/{action-VTVFY2MP.js → action-4NGK5XMD.js} +38 -21
- package/chunks/{action-FDB7NEOK.js → action-5SK5NE7E.js} +10 -4
- package/chunks/{action-QE2ZQQX7.js → action-7PEQXDWT.js} +4 -4
- package/chunks/action-AQRPFQKI.js +231 -0
- package/chunks/{action-R7IMFHQ5.js → action-ATGZOWSH.js} +49 -26
- package/chunks/{action-XMNX5ZYT.js → action-BAQYJ6UE.js} +25 -21
- package/chunks/{action-M7RQKBSB.js → action-BOZNBCNZ.js} +89 -14
- package/chunks/{action-QPUSPD5M.js → action-BRSSC2SR.js} +7 -7
- package/chunks/{action-37EV4UHW.js → action-CA4QYPI6.js} +6 -6
- package/chunks/{action-JZLZ7ZAD.js → action-CPLH2CQ5.js} +17 -17
- package/chunks/{action-SQG3JAII.js → action-E4YSRFGT.js} +34 -20
- package/chunks/{action-CH24QGTE.js → action-EOAVVL52.js} +11 -5
- package/chunks/action-F2ZJNURT.js +72 -0
- package/chunks/{action-5IU77OII.js → action-F7A2K74G.js} +4 -4
- package/chunks/{action-SH4UUXPL.js → action-H6OUJWWM.js} +4 -4
- package/chunks/{action-SNLCIBQC.js → action-HJYZCPUN.js} +5 -5
- package/chunks/{action-LA6KVAXQ.js → action-JAHFRYWZ.js} +58 -9
- package/chunks/{action-UZQJNYK4.js → action-LPVITMWA.js} +3 -3
- package/chunks/{action-VC4DCVST.js → action-LVDU6YOI.js} +32 -23
- package/chunks/{action-4XI7XJR4.js → action-N7BA5I3E.js} +37 -12
- package/chunks/{action-NVSZT2ZD.js → action-NVI5DWFP.js} +6 -6
- package/chunks/{action-F3UX5E3M.js → action-OX2566BE.js} +32 -25
- package/chunks/{action-OGQSTRMX.js → action-QYGOPSTY.js} +13 -13
- package/chunks/{action-IUE4IOWO.js → action-RBOLLIGX.js} +82 -16
- package/chunks/{action-MSLBC2SO.js → action-SCOXTCPR.js} +15 -15
- package/chunks/{action-WFWYGY7O.js → action-SNPOOW6S.js} +20 -15
- package/chunks/{action-HGBBV353.js → action-SRBN7N3R.js} +10 -10
- package/chunks/{action-PAGJ5PWC.js → action-T5XMJXPO.js} +11 -7
- package/chunks/{action-G26LSVZ7.js → action-VOFDW3U2.js} +4 -4
- package/chunks/{action-FIXBOJEW.js → action-YRX6SN5F.js} +10 -4
- package/chunks/{agent-HCQRMHQ5.js → agent-ASPV3R5U.js} +4 -4
- package/chunks/{asyncapi-QM76O55R.js → asyncapi-H4FU6GPC.js} +10 -11
- package/chunks/{build.action-P7FCIMYU.js → build.action-6V6GXI3X.js} +35 -31
- package/chunks/{chunk-PT5TI77I.js → chunk-2DSVF5AD.js} +3 -3
- package/chunks/{chunk-X5T526CE.js → chunk-2PPRO2QB.js} +1 -1
- package/chunks/{chunk-Z2KMGFE6.js → chunk-4X47MN6Q.js} +2 -2
- package/chunks/{chunk-OQKDBLOZ.js → chunk-5JLVQVKO.js} +8 -0
- package/chunks/{chunk-VNYE4R7N.js → chunk-5UHLAJQD.js} +2 -1
- package/chunks/{chunk-Q7DOQHZN.js → chunk-6XWCMJDB.js} +1 -1
- package/chunks/{chunk-6ZMT63IV.js → chunk-6YPQGVF4.js} +1 -1
- package/chunks/{chunk-UGGNHILG.js → chunk-BDEPNGTO.js} +1 -1
- package/chunks/{chunk-HCPN3KNF.js → chunk-BIKOD3SG.js} +134 -1
- package/chunks/{chunk-P7H7GY5A.js → chunk-C2KAWRIX.js} +1 -1
- package/chunks/{chunk-M37TP6U2.js → chunk-CWCETP6H.js} +170 -5
- package/chunks/chunk-EGOXR5FB.js +15 -0
- package/chunks/{chunk-3L6DLIXJ.js → chunk-FDC2IESH.js} +3474 -1319
- package/chunks/{chunk-4ZDQXWBT.js → chunk-GPNB7ISG.js} +14 -1
- package/chunks/{chunk-24WAOKGG.js → chunk-HGOD6THU.js} +27 -18
- package/chunks/{chunk-4NHMAG6F.js → chunk-IMG35UXX.js} +1 -1
- package/chunks/{chunk-AO3F5XWR.js → chunk-ISXH6Q7I.js} +253 -9
- package/chunks/{chunk-CISTON3A.js → chunk-KCCFN4F7.js} +2 -2
- package/chunks/{chunk-F467BYYR.js → chunk-LG7IFACX.js} +38 -87
- package/chunks/{chunk-B2MHTD3R.js → chunk-MLSZVVTT.js} +1 -1
- package/chunks/{chunk-K4DTP5TV.js → chunk-OJ2EWIJH.js} +21 -2
- package/chunks/{chunk-LFU5ZUAP.js → chunk-QXQZVEDC.js} +105 -15
- package/chunks/{chunk-HPL3ZZ2P.js → chunk-R5LK6VPY.js} +72 -7
- package/chunks/{chunk-T7B6WNZC.js → chunk-TSURUX4A.js} +12 -3
- package/chunks/{chunk-7AGLC7WV.js → chunk-W24BETFG.js} +2 -2
- package/chunks/{chunk-GSGZHE26.js → chunk-XEDGMZJD.js} +19 -5
- package/chunks/{chunk-PBXZN65A.js → chunk-XXSQUBXS.js} +82 -6
- package/chunks/{chunk-XCSR4RIT.js → chunk-YILQODZF.js} +2 -2
- package/chunks/{chunk-COBPBRQF.js → chunk-ZJVYOZFB.js} +2 -2
- package/chunks/{create.action-HDD2WUON.js → create.action-P6DLCK4W.js} +27 -15
- package/chunks/{delete.action-VE66JFDS.js → delete.action-HJKRRHE2.js} +24 -15
- package/chunks/{delete.action-7GOZY7ID.js → delete.action-Z3GAA4ZN.js} +24 -15
- package/chunks/{get.action-2745EB4N.js → get.action-IT4EHAV4.js} +10 -10
- package/chunks/{list.action-4QDCZLSZ.js → list.action-2FU5UZNH.js} +15 -15
- package/chunks/{list.action-3VTXQJRA.js → list.action-WLIAO5UW.js} +13 -13
- package/chunks/{publish.action-ULQLZKWU.js → publish.action-T4J4DRXR.js} +48 -22
- package/chunks/{update.action-OROQSP2S.js → update.action-3OVS3HWC.js} +25 -16
- package/chunks/{update.action-6QEFP7NA.js → update.action-MY7QPSSU.js} +25 -16
- package/docs.html +294 -99
- package/index.js +436 -401
- package/package.json +15 -23
- package/skills/scalar-cli/SKILL.md +71 -0
- package/template.md +81 -3
- package/chunks/action-B3KKREWQ.js +0 -64
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-2PPRO2QB.js";
|
|
6
6
|
import {
|
|
7
7
|
openBrowser
|
|
8
8
|
} from "./chunks/chunk-JFIXNSPP.js";
|
|
@@ -10,29 +10,38 @@ import {
|
|
|
10
10
|
measureTime
|
|
11
11
|
} from "./chunks/chunk-KHDYYVYF.js";
|
|
12
12
|
import {
|
|
13
|
-
BundleCommand
|
|
14
|
-
|
|
13
|
+
BundleCommand,
|
|
14
|
+
parseFetchLimit,
|
|
15
|
+
parsePort
|
|
16
|
+
} from "./chunks/chunk-OJ2EWIJH.js";
|
|
15
17
|
import {
|
|
16
18
|
SdkLanguage
|
|
17
|
-
} from "./chunks/chunk-
|
|
18
|
-
import "./chunks/chunk-
|
|
19
|
+
} from "./chunks/chunk-FDC2IESH.js";
|
|
20
|
+
import "./chunks/chunk-C2KAWRIX.js";
|
|
19
21
|
import {
|
|
20
22
|
checkNodeVersion,
|
|
21
23
|
clearAuthData,
|
|
22
24
|
getAuthData,
|
|
23
25
|
getMetadata,
|
|
24
26
|
setMetadata
|
|
25
|
-
} from "./chunks/chunk-
|
|
26
|
-
import
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
} from "./chunks/chunk-CWCETP6H.js";
|
|
28
|
+
import {
|
|
29
|
+
bin,
|
|
30
|
+
name,
|
|
31
|
+
version
|
|
32
|
+
} from "./chunks/chunk-GPNB7ISG.js";
|
|
33
|
+
import "./chunks/chunk-5UHLAJQD.js";
|
|
34
|
+
import "./chunks/chunk-5JLVQVKO.js";
|
|
35
|
+
import {
|
|
36
|
+
requireInteractive
|
|
37
|
+
} from "./chunks/chunk-EGOXR5FB.js";
|
|
29
38
|
import "./chunks/chunk-K74E42RV.js";
|
|
30
|
-
import "./chunks/chunk-
|
|
39
|
+
import "./chunks/chunk-6XWCMJDB.js";
|
|
31
40
|
import "./chunks/chunk-4ORL4MST.js";
|
|
32
41
|
import {
|
|
33
42
|
output
|
|
34
43
|
} from "./chunks/chunk-T5HJUAWB.js";
|
|
35
|
-
import "./chunks/chunk-
|
|
44
|
+
import "./chunks/chunk-XEDGMZJD.js";
|
|
36
45
|
import {
|
|
37
46
|
external_exports
|
|
38
47
|
} from "./chunks/chunk-IKT5F47M.js";
|
|
@@ -42,15 +51,7 @@ import "./chunks/chunk-3MZYUBJ6.js";
|
|
|
42
51
|
import { Agent, setGlobalDispatcher } from "undici";
|
|
43
52
|
|
|
44
53
|
// src/program.ts
|
|
45
|
-
import { Command as
|
|
46
|
-
|
|
47
|
-
// package.json
|
|
48
|
-
var name = "@scalar/cli";
|
|
49
|
-
var version = "2.5.1";
|
|
50
|
-
var bin = {
|
|
51
|
-
scalar: "./dist/index.js",
|
|
52
|
-
"scalar-cli": "./dist/index.js"
|
|
53
|
-
};
|
|
54
|
+
import { Command as Command53 } from "commander";
|
|
54
55
|
|
|
55
56
|
// src/domains/schema/index.ts
|
|
56
57
|
import { Command as Command6 } from "commander";
|
|
@@ -58,97 +59,101 @@ import { Command as Command6 } from "commander";
|
|
|
58
59
|
// src/domains/schema/delete.ts
|
|
59
60
|
import { Command } from "commander";
|
|
60
61
|
var DeleteSchemaCommand = () => {
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
const { deleteAction } = await import("./chunks/delete.action-
|
|
62
|
+
const cmd3 = new Command("delete");
|
|
63
|
+
cmd3.description("Delete a schema.");
|
|
64
|
+
cmd3.option("-s, --slug <slug>", "Schema slug");
|
|
65
|
+
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
66
|
+
cmd3.action(async (...args) => {
|
|
67
|
+
const { deleteAction } = await import("./chunks/delete.action-Z3GAA4ZN.js");
|
|
67
68
|
return deleteAction(...args);
|
|
68
69
|
});
|
|
69
|
-
return
|
|
70
|
+
return cmd3;
|
|
70
71
|
};
|
|
71
72
|
|
|
72
73
|
// src/domains/schema/get.ts
|
|
73
74
|
import { Command as Command2 } from "commander";
|
|
74
75
|
var GetSchemaCommand = () => {
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
const { getAction } = await import("./chunks/get.action-
|
|
76
|
+
const cmd3 = new Command2("get");
|
|
77
|
+
cmd3.description("Get a schema document version from the Scalar registry");
|
|
78
|
+
cmd3.argument("[namespace]", "Team namespace");
|
|
79
|
+
cmd3.argument("[slug]", "Schema slug");
|
|
80
|
+
cmd3.option("--version <version>", "Schema version (defaults to latest)");
|
|
81
|
+
cmd3.option("--format <format>", "Output format (json or yaml)", "json");
|
|
82
|
+
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
83
|
+
cmd3.action(async (...args) => {
|
|
84
|
+
const { getAction } = await import("./chunks/get.action-IT4EHAV4.js");
|
|
84
85
|
return getAction(...args);
|
|
85
86
|
});
|
|
86
|
-
return
|
|
87
|
+
return cmd3;
|
|
87
88
|
};
|
|
88
89
|
|
|
89
90
|
// src/domains/schema/list.ts
|
|
90
91
|
import { Command as Command3 } from "commander";
|
|
91
92
|
var ListSchemaCommand = () => {
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
const { listAction } = await import("./chunks/list.action-
|
|
93
|
+
const cmd3 = new Command3("list");
|
|
94
|
+
cmd3.description("List all schemas for a team namespace");
|
|
95
|
+
cmd3.option("--namespace <namespace>", "Team namespace");
|
|
96
|
+
cmd3.action(async (...args) => {
|
|
97
|
+
const { listAction } = await import("./chunks/list.action-2FU5UZNH.js");
|
|
97
98
|
return listAction(...args);
|
|
98
99
|
});
|
|
99
|
-
return
|
|
100
|
+
return cmd3;
|
|
100
101
|
};
|
|
101
102
|
|
|
102
103
|
// src/domains/schema/publish.ts
|
|
103
104
|
import { Command as Command4 } from "commander";
|
|
104
105
|
var PublishSchemaCommand = () => {
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
const cmd3 = new Command4("publish");
|
|
107
|
+
cmd3.description("Publish a shared schema to the Scalar registry");
|
|
108
|
+
cmd3.argument("[file]", "OpenAPI file to upload");
|
|
109
|
+
cmd3.option(
|
|
109
110
|
"--slug <slug>",
|
|
110
111
|
"Slug identifier for the registry entry. Defaults to title."
|
|
111
112
|
);
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
113
|
+
cmd3.option("--title <title>", "Schema title");
|
|
114
|
+
cmd3.option("--namespace <namespace>", "Scalar team namespace");
|
|
115
|
+
cmd3.option("--version <version>", "API version (e.g. 0.1.0)");
|
|
116
|
+
cmd3.option("--private", "Make API private", false);
|
|
117
|
+
cmd3.option("--force", "Force override an existing version", false);
|
|
118
|
+
cmd3.option("--bundle", "Bundle all external references before uploading");
|
|
119
|
+
cmd3.option(
|
|
119
120
|
"--treeShake",
|
|
120
121
|
"Remove unused components from the bundled document"
|
|
121
122
|
);
|
|
122
|
-
|
|
123
|
+
cmd3.option(
|
|
123
124
|
"--urlMap",
|
|
124
125
|
"Generate a map of resolved URLs when bundling the document"
|
|
125
126
|
);
|
|
126
|
-
|
|
127
|
+
cmd3.option(
|
|
127
128
|
"--fetchLimit <limit>",
|
|
128
|
-
"Maximum number of concurrent URLs to fetch when bundling the document"
|
|
129
|
+
"Maximum number of concurrent URLs to fetch when bundling the document",
|
|
130
|
+
parseFetchLimit
|
|
129
131
|
);
|
|
130
|
-
|
|
131
|
-
const { publishAction } = await import("./chunks/publish.action-
|
|
132
|
+
cmd3.action(async (...args) => {
|
|
133
|
+
const { publishAction } = await import("./chunks/publish.action-T4J4DRXR.js");
|
|
132
134
|
return publishAction(...args);
|
|
133
135
|
});
|
|
134
|
-
return
|
|
136
|
+
return cmd3;
|
|
135
137
|
};
|
|
136
138
|
|
|
137
139
|
// src/domains/schema/update.ts
|
|
138
140
|
import { Command as Command5 } from "commander";
|
|
139
141
|
var UpdateSchemaCommand = () => {
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
142
|
+
const cmd3 = new Command5("update");
|
|
143
|
+
cmd3.description("Update schema metadata.");
|
|
144
|
+
cmd3.option("-s, --slug <slug>", "Schema slug");
|
|
145
|
+
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
146
|
+
cmd3.option("--title <title>", "Title");
|
|
147
|
+
cmd3.option("--description <description>", "Description");
|
|
148
|
+
cmd3.option(
|
|
149
|
+
"--isPrivate <isPrivate>",
|
|
150
|
+
"Privacy (true/false or public/private)"
|
|
151
|
+
);
|
|
152
|
+
cmd3.action(async (...args) => {
|
|
153
|
+
const { updateAction } = await import("./chunks/update.action-MY7QPSSU.js");
|
|
149
154
|
return updateAction(...args);
|
|
150
155
|
});
|
|
151
|
-
return
|
|
156
|
+
return cmd3;
|
|
152
157
|
};
|
|
153
158
|
|
|
154
159
|
// src/domains/schema/index.ts
|
|
@@ -170,78 +175,85 @@ import { Command as Command12 } from "commander";
|
|
|
170
175
|
// src/domains/sdk/build.ts
|
|
171
176
|
import { Command as Command7 } from "commander";
|
|
172
177
|
var BuildSdkCommand = () => {
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
const { buildAction } = await import("./chunks/build.action-P7FCIMYU.js");
|
|
178
|
+
const cmd3 = new Command7("build");
|
|
179
|
+
cmd3.description("Build an SDK.");
|
|
180
|
+
cmd3.option("-s, --slug <slug>", "SDK slug");
|
|
181
|
+
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
182
|
+
cmd3.action(async (...args) => {
|
|
183
|
+
const { buildAction } = await import("./chunks/build.action-6V6GXI3X.js");
|
|
180
184
|
return buildAction(...args);
|
|
181
185
|
});
|
|
182
|
-
return
|
|
186
|
+
return cmd3;
|
|
183
187
|
};
|
|
184
188
|
|
|
185
189
|
// src/domains/sdk/create.ts
|
|
186
190
|
import { Command as Command8, Option } from "commander";
|
|
187
191
|
var CreateSdkCommand = () => {
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
192
|
+
const cmd3 = new Command8("create");
|
|
193
|
+
cmd3.description(
|
|
194
|
+
"Create a new SDK. The SDK is created in the namespace of the API it is built from."
|
|
195
|
+
);
|
|
196
|
+
cmd3.option("-a, --api <api>", "Registry API slug");
|
|
197
|
+
cmd3.option(
|
|
198
|
+
"-n, --namespace <namespace>",
|
|
199
|
+
"Team namespace to look the API up in"
|
|
200
|
+
);
|
|
201
|
+
cmd3.addOption(
|
|
193
202
|
new Option("-l, --language <language>", "Language of your SDK").choices(
|
|
194
203
|
Object.values(SdkLanguage)
|
|
195
204
|
)
|
|
196
205
|
);
|
|
197
|
-
|
|
198
|
-
const { createAction } = await import("./chunks/create.action-
|
|
206
|
+
cmd3.action(async (...args) => {
|
|
207
|
+
const { createAction } = await import("./chunks/create.action-P6DLCK4W.js");
|
|
199
208
|
return createAction(...args);
|
|
200
209
|
});
|
|
201
|
-
return
|
|
210
|
+
return cmd3;
|
|
202
211
|
};
|
|
203
212
|
|
|
204
213
|
// src/domains/sdk/delete.ts
|
|
205
214
|
import { Command as Command9 } from "commander";
|
|
206
215
|
var DeleteSdkCommand = () => {
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
const { deleteAction } = await import("./chunks/delete.action-
|
|
216
|
+
const cmd3 = new Command9("delete");
|
|
217
|
+
cmd3.description("Delete an SDK.");
|
|
218
|
+
cmd3.option("-s, --slug <slug>", "SDK slug");
|
|
219
|
+
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
220
|
+
cmd3.action(async (...args) => {
|
|
221
|
+
const { deleteAction } = await import("./chunks/delete.action-HJKRRHE2.js");
|
|
213
222
|
return deleteAction(...args);
|
|
214
223
|
});
|
|
215
|
-
return
|
|
224
|
+
return cmd3;
|
|
216
225
|
};
|
|
217
226
|
|
|
218
227
|
// src/domains/sdk/update.ts
|
|
219
228
|
import { Command as Command10 } from "commander";
|
|
220
229
|
var UpdateSdkCommand = () => {
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
230
|
+
const cmd3 = new Command10("update");
|
|
231
|
+
cmd3.description("Update SDK metadata.");
|
|
232
|
+
cmd3.option("-s, --slug <slug>", "SDK slug");
|
|
233
|
+
cmd3.option("-n, --namespace <namespace>", "Team namespace");
|
|
234
|
+
cmd3.option("--title <title>", "Title");
|
|
235
|
+
cmd3.option(
|
|
236
|
+
"--isPrivate <isPrivate>",
|
|
237
|
+
"Privacy (true/false or public/private)"
|
|
238
|
+
);
|
|
239
|
+
cmd3.action(async (...args) => {
|
|
240
|
+
const { updateAction } = await import("./chunks/update.action-3OVS3HWC.js");
|
|
229
241
|
return updateAction(...args);
|
|
230
242
|
});
|
|
231
|
-
return
|
|
243
|
+
return cmd3;
|
|
232
244
|
};
|
|
233
245
|
|
|
234
246
|
// src/domains/sdk/list.ts
|
|
235
247
|
import { Command as Command11 } from "commander";
|
|
236
248
|
var ListSdkCommand = () => {
|
|
237
|
-
const
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
const { listAction } = await import("./chunks/list.action-
|
|
249
|
+
const cmd3 = new Command11("list");
|
|
250
|
+
cmd3.description("List all SDKs for a team namespace");
|
|
251
|
+
cmd3.option("--namespace <namespace>", "Team namespace");
|
|
252
|
+
cmd3.action(async (...args) => {
|
|
253
|
+
const { listAction } = await import("./chunks/list.action-WLIAO5UW.js");
|
|
242
254
|
return listAction(...args);
|
|
243
255
|
});
|
|
244
|
-
return
|
|
256
|
+
return cmd3;
|
|
245
257
|
};
|
|
246
258
|
|
|
247
259
|
// src/domains/sdk/index.ts
|
|
@@ -263,43 +275,43 @@ import { Command as Command16 } from "commander";
|
|
|
263
275
|
// src/domains/auth/login/index.ts
|
|
264
276
|
import { Command as Command13 } from "commander";
|
|
265
277
|
var LoginCommand = () => {
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
const { loginAction } = await import("./chunks/action-
|
|
278
|
+
const cmd3 = new Command13("login");
|
|
279
|
+
cmd3.description("Login to scalar");
|
|
280
|
+
cmd3.option("--email <email>", "Email");
|
|
281
|
+
cmd3.option("--password <password>", "Password");
|
|
282
|
+
cmd3.option("--token <token>", "Personal token");
|
|
283
|
+
cmd3.action(async (...args) => {
|
|
284
|
+
const { loginAction } = await import("./chunks/action-N7BA5I3E.js");
|
|
273
285
|
return loginAction(...args);
|
|
274
286
|
});
|
|
275
|
-
return
|
|
287
|
+
return cmd3;
|
|
276
288
|
};
|
|
277
289
|
|
|
278
290
|
// src/domains/auth/logout/index.ts
|
|
279
291
|
import { Command as Command14 } from "commander";
|
|
280
292
|
var LogoutCommand = () => {
|
|
281
|
-
const
|
|
282
|
-
|
|
283
|
-
|
|
293
|
+
const cmd3 = new Command14("logout");
|
|
294
|
+
cmd3.description("Logout from scalar");
|
|
295
|
+
cmd3.action(async () => {
|
|
284
296
|
await clearAuthData();
|
|
285
297
|
output.info().message("Successfully logged out.").print();
|
|
286
298
|
});
|
|
287
|
-
return
|
|
299
|
+
return cmd3;
|
|
288
300
|
};
|
|
289
301
|
|
|
290
302
|
// src/domains/auth/whoami/index.ts
|
|
291
303
|
import as from "ansis";
|
|
292
304
|
import { Command as Command15 } from "commander";
|
|
293
305
|
var WhoAmICommand = () => {
|
|
294
|
-
const
|
|
295
|
-
|
|
296
|
-
|
|
306
|
+
const cmd3 = new Command15("whoami");
|
|
307
|
+
cmd3.description("Display the current user");
|
|
308
|
+
cmd3.action(async () => {
|
|
297
309
|
const auth = await getAuthData();
|
|
298
310
|
output.info().message(
|
|
299
311
|
`You are logged in as ${as.cyan(auth.email ?? "")} (role: ${as.cyan(auth.role ?? "Owner")})`
|
|
300
312
|
).line().print();
|
|
301
313
|
});
|
|
302
|
-
return
|
|
314
|
+
return cmd3;
|
|
303
315
|
};
|
|
304
316
|
|
|
305
317
|
// src/domains/auth/index.ts
|
|
@@ -309,201 +321,226 @@ authDomain.description("Manage authorization on scalar platform");
|
|
|
309
321
|
authCommands.forEach((command) => authDomain.addCommand(command()));
|
|
310
322
|
var auth_default = authDomain;
|
|
311
323
|
|
|
324
|
+
// src/domains/context/index.ts
|
|
325
|
+
import { Command as Command17 } from "commander";
|
|
326
|
+
var cmd = new Command17("context");
|
|
327
|
+
cmd.description(
|
|
328
|
+
"Print every command, argument, and option as JSON for AI agents"
|
|
329
|
+
);
|
|
330
|
+
cmd.action(async () => {
|
|
331
|
+
const { contextAction } = await import("./chunks/action-F2ZJNURT.js");
|
|
332
|
+
return contextAction(cmd);
|
|
333
|
+
});
|
|
334
|
+
var context_default = cmd;
|
|
335
|
+
|
|
312
336
|
// src/domains/document/index.ts
|
|
313
|
-
import { Command as
|
|
337
|
+
import { Command as Command30 } from "commander";
|
|
314
338
|
|
|
315
339
|
// src/domains/document/join/index.ts
|
|
316
|
-
import { Command as
|
|
340
|
+
import { Command as Command18 } from "commander";
|
|
317
341
|
function JoinCommand() {
|
|
318
|
-
const
|
|
319
|
-
|
|
342
|
+
const cmd3 = new Command18("join");
|
|
343
|
+
cmd3.description(
|
|
320
344
|
"Merge multiple OpenAPI or AsyncAPI documents into a single unified document"
|
|
321
345
|
);
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
346
|
+
cmd3.argument("<files...>", "Paths to the OpenAPI or AsyncAPI files to merge");
|
|
347
|
+
cmd3.option("--output -o <file>", "Path to save the merged output file");
|
|
348
|
+
cmd3.option(
|
|
325
349
|
"--prefix-components-with-path-value -p <path>",
|
|
326
350
|
"Dot-separated path to extract a prefix value from each input file for component names"
|
|
327
351
|
);
|
|
328
|
-
|
|
329
|
-
const { joinAction } = await import("./chunks/action-
|
|
352
|
+
cmd3.action(async (...args) => {
|
|
353
|
+
const { joinAction } = await import("./chunks/action-7PEQXDWT.js");
|
|
330
354
|
return joinAction(...args);
|
|
331
355
|
});
|
|
332
|
-
return
|
|
356
|
+
return cmd3;
|
|
333
357
|
}
|
|
334
358
|
|
|
335
359
|
// src/domains/document/split/index.ts
|
|
336
|
-
import { Command as
|
|
360
|
+
import { Command as Command19 } from "commander";
|
|
337
361
|
function SplitCommand() {
|
|
338
|
-
const
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
362
|
+
const cmd3 = new Command19("split");
|
|
363
|
+
cmd3.description("Split OpenAPI or AsyncAPI documents into small chunks");
|
|
364
|
+
cmd3.argument("[file|url]", "Path to OpenAPI or AsyncAPI file or URL to split");
|
|
365
|
+
cmd3.option("-o, --output <path>", "Path to save the chunks");
|
|
366
|
+
cmd3.addHelpText(
|
|
343
367
|
"after",
|
|
344
368
|
"\nAsyncAPI versions are preserved (including 2.6, 3.0, and 3.1). External references are bundled before splitting.\n"
|
|
345
369
|
);
|
|
346
|
-
|
|
347
|
-
const { splitAction } = await import("./chunks/action-
|
|
370
|
+
cmd3.action(async (...args) => {
|
|
371
|
+
const { splitAction } = await import("./chunks/action-YRX6SN5F.js");
|
|
348
372
|
return splitAction(...args);
|
|
349
373
|
});
|
|
350
|
-
return
|
|
374
|
+
return cmd3;
|
|
351
375
|
}
|
|
352
376
|
|
|
353
377
|
// src/domains/document/format/index.ts
|
|
354
|
-
import { Command as
|
|
378
|
+
import { Command as Command20 } from "commander";
|
|
355
379
|
function FormatCommand() {
|
|
356
|
-
const
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
const { formatAction } = await import("./chunks/action-
|
|
380
|
+
const cmd3 = new Command20("format");
|
|
381
|
+
cmd3.description("Format an OpenAPI or AsyncAPI file");
|
|
382
|
+
cmd3.argument("[file|url]", "File or URL to format");
|
|
383
|
+
cmd3.option("-o, --output <file>", "Output file");
|
|
384
|
+
cmd3.action(async (...args) => {
|
|
385
|
+
const { formatAction } = await import("./chunks/action-H6OUJWWM.js");
|
|
362
386
|
return formatAction(...args);
|
|
363
387
|
});
|
|
364
|
-
return
|
|
388
|
+
return cmd3;
|
|
365
389
|
}
|
|
366
390
|
|
|
367
391
|
// src/domains/document/lint/index.ts
|
|
368
|
-
import { Command as
|
|
392
|
+
import { Command as Command21 } from "commander";
|
|
369
393
|
function LintCommand() {
|
|
370
|
-
const
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
const { lintAction } = await import("./chunks/action-
|
|
394
|
+
const cmd3 = new Command21("lint");
|
|
395
|
+
cmd3.description("Lint your OpenAPI or AsyncAPI file using spectral rules");
|
|
396
|
+
cmd3.argument("[file|url]", "OpenAPI or AsyncAPI file path or url");
|
|
397
|
+
cmd3.option("-r, --rule <file|url>", "Rule path or url");
|
|
398
|
+
cmd3.action(async (...args) => {
|
|
399
|
+
const { lintAction } = await import("./chunks/action-JAHFRYWZ.js");
|
|
376
400
|
return lintAction(...args);
|
|
377
401
|
});
|
|
378
|
-
return
|
|
402
|
+
return cmd3;
|
|
379
403
|
}
|
|
380
404
|
|
|
381
405
|
// src/domains/document/markdown/index.ts
|
|
382
|
-
import { Command as
|
|
406
|
+
import { Command as Command22 } from "commander";
|
|
383
407
|
function MarkdownCommand() {
|
|
384
|
-
const
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
const { markdownAction } = await import("./chunks/action-
|
|
408
|
+
const cmd3 = new Command22("markdown");
|
|
409
|
+
cmd3.description("Generate Markdown from an OpenAPI file");
|
|
410
|
+
cmd3.argument("[file|url]", "OpenAPI file path or URL to convert");
|
|
411
|
+
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
412
|
+
cmd3.action(async (...args) => {
|
|
413
|
+
const { markdownAction } = await import("./chunks/action-VOFDW3U2.js");
|
|
390
414
|
return markdownAction(...args);
|
|
391
415
|
});
|
|
392
|
-
return
|
|
416
|
+
return cmd3;
|
|
393
417
|
}
|
|
394
418
|
|
|
395
419
|
// src/domains/document/mock/index.ts
|
|
396
|
-
import { Command as
|
|
420
|
+
import { Command as Command23 } from "commander";
|
|
397
421
|
function MockCommand() {
|
|
398
|
-
const
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
422
|
+
const cmd3 = new Command23("mock");
|
|
423
|
+
cmd3.description("Mock an OpenAPI API or AsyncAPI WebSocket and SSE channels");
|
|
424
|
+
cmd3.argument("[file|url]", "OpenAPI or AsyncAPI file or URL to mock");
|
|
425
|
+
cmd3.option("-w, --watch", "watch the file for changes");
|
|
426
|
+
cmd3.option("-o, --once", "run the server only once and exit after that");
|
|
427
|
+
cmd3.option(
|
|
428
|
+
"-p, --port <port>",
|
|
429
|
+
"set the HTTP port for the mock server",
|
|
430
|
+
parsePort
|
|
431
|
+
);
|
|
432
|
+
cmd3.action(async (...args) => {
|
|
433
|
+
const { mockAction } = await import("./chunks/action-ATGZOWSH.js");
|
|
406
434
|
return mockAction(...args);
|
|
407
435
|
});
|
|
408
|
-
return
|
|
436
|
+
return cmd3;
|
|
409
437
|
}
|
|
410
438
|
|
|
411
439
|
// src/domains/document/postman/index.ts
|
|
412
|
-
import { Command as
|
|
440
|
+
import { Command as Command24 } from "commander";
|
|
413
441
|
function ConvertCommand() {
|
|
414
|
-
const
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
442
|
+
const cmd3 = new Command24("convert");
|
|
443
|
+
cmd3.description("Convert a Postman collection to an OpenAPI document");
|
|
444
|
+
cmd3.argument("[file|url]", "Postman collection file path or URL to convert");
|
|
445
|
+
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
446
|
+
cmd3.option(
|
|
419
447
|
"--merge-operations",
|
|
420
448
|
"Merge operations with shared path+method combinations"
|
|
421
449
|
);
|
|
422
|
-
|
|
423
|
-
const { convertAction } = await import("./chunks/action-
|
|
450
|
+
cmd3.action(async (...args) => {
|
|
451
|
+
const { convertAction } = await import("./chunks/action-F7A2K74G.js");
|
|
424
452
|
return convertAction(...args);
|
|
425
453
|
});
|
|
426
|
-
return
|
|
454
|
+
return cmd3;
|
|
427
455
|
}
|
|
428
456
|
|
|
429
457
|
// src/domains/document/serve/index.ts
|
|
430
|
-
import { Command as
|
|
458
|
+
import { Command as Command25 } from "commander";
|
|
431
459
|
function ServeCommand() {
|
|
432
|
-
const
|
|
433
|
-
|
|
434
|
-
|
|
460
|
+
const cmd3 = new Command25("serve");
|
|
461
|
+
cmd3.description("Serve an API Reference from an OpenAPI or AsyncAPI file");
|
|
462
|
+
cmd3.argument(
|
|
435
463
|
"[file|url]",
|
|
436
464
|
"OpenAPI or AsyncAPI file or URL to show the reference for"
|
|
437
465
|
);
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
466
|
+
cmd3.option(
|
|
467
|
+
"-c, --config <file>",
|
|
468
|
+
"JSON file with API Reference configuration"
|
|
469
|
+
);
|
|
470
|
+
cmd3.option("-w, --watch", "watch the file for changes");
|
|
471
|
+
cmd3.option("-o, --once", "run the server only once and exit after that");
|
|
472
|
+
cmd3.option(
|
|
441
473
|
"-p, --port <port>",
|
|
442
|
-
"set the HTTP port for the API reference server"
|
|
474
|
+
"set the HTTP port for the API reference server",
|
|
475
|
+
parsePort
|
|
443
476
|
);
|
|
444
|
-
|
|
445
|
-
const { serveAction } = await import("./chunks/action-
|
|
477
|
+
cmd3.action(async (...args) => {
|
|
478
|
+
const { serveAction } = await import("./chunks/action-BOZNBCNZ.js");
|
|
446
479
|
return serveAction(...args);
|
|
447
480
|
});
|
|
448
|
-
return
|
|
481
|
+
return cmd3;
|
|
449
482
|
}
|
|
450
483
|
|
|
451
484
|
// src/domains/document/share/index.ts
|
|
452
|
-
import { Command as
|
|
485
|
+
import { Command as Command26 } from "commander";
|
|
453
486
|
function ShareCommand() {
|
|
454
|
-
const
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
487
|
+
const cmd3 = new Command26("share");
|
|
488
|
+
cmd3.description("Share an OpenAPI or AsyncAPI file");
|
|
489
|
+
cmd3.argument("[file]", "file to share");
|
|
490
|
+
cmd3.option(
|
|
458
491
|
"-t, --token <token>",
|
|
459
492
|
"pass a token to update an existing sandbox"
|
|
460
493
|
);
|
|
461
|
-
|
|
462
|
-
const { shareAction } = await import("./chunks/action-
|
|
494
|
+
cmd3.action(async (...args) => {
|
|
495
|
+
const { shareAction } = await import("./chunks/action-HJYZCPUN.js");
|
|
463
496
|
return shareAction(...args);
|
|
464
497
|
});
|
|
465
|
-
return
|
|
498
|
+
return cmd3;
|
|
466
499
|
}
|
|
467
500
|
|
|
468
501
|
// src/domains/document/upgrade/index.ts
|
|
469
|
-
import { Command as
|
|
502
|
+
import { Command as Command27 } from "commander";
|
|
470
503
|
function UpgradeCommand() {
|
|
471
|
-
const
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
const { upgradeAction } = await import("./chunks/action-
|
|
504
|
+
const cmd3 = new Command27("upgrade");
|
|
505
|
+
cmd3.description("Upgrade an OpenAPI or AsyncAPI document to version 3.1");
|
|
506
|
+
cmd3.argument("[file|url]", "File or URL to upgrade");
|
|
507
|
+
cmd3.option("-o, --output <file>", "Path to save the upgraded output file");
|
|
508
|
+
cmd3.action(async (...args) => {
|
|
509
|
+
const { upgradeAction } = await import("./chunks/action-5SK5NE7E.js");
|
|
477
510
|
return upgradeAction(...args);
|
|
478
511
|
});
|
|
479
|
-
return
|
|
512
|
+
return cmd3;
|
|
480
513
|
}
|
|
481
514
|
|
|
482
515
|
// src/domains/document/validate/index.ts
|
|
483
|
-
import { Command as
|
|
516
|
+
import { Command as Command28 } from "commander";
|
|
484
517
|
function ValidateCommand() {
|
|
485
|
-
const
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
const { validateAction } = await import("./chunks/action-
|
|
518
|
+
const cmd3 = new Command28("validate");
|
|
519
|
+
cmd3.description("Validate an OpenAPI or AsyncAPI file");
|
|
520
|
+
cmd3.argument("[file|url]", "File or URL to validate");
|
|
521
|
+
cmd3.action(async (...args) => {
|
|
522
|
+
const { validateAction } = await import("./chunks/action-AQRPFQKI.js");
|
|
490
523
|
return validateAction(...args);
|
|
491
524
|
});
|
|
492
|
-
return
|
|
525
|
+
return cmd3;
|
|
493
526
|
}
|
|
494
527
|
|
|
495
528
|
// src/domains/document/void/index.ts
|
|
496
|
-
import { Command as
|
|
529
|
+
import { Command as Command29 } from "commander";
|
|
497
530
|
function VoidCommand() {
|
|
498
|
-
const
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
531
|
+
const cmd3 = new Command29("void");
|
|
532
|
+
cmd3.description("Boot a server to mirror HTTP requests");
|
|
533
|
+
cmd3.option("-o, --once", "run the server only once and exit after that");
|
|
534
|
+
cmd3.option(
|
|
535
|
+
"-p, --port <port>",
|
|
536
|
+
"set the HTTP port for the mock server",
|
|
537
|
+
parsePort
|
|
538
|
+
);
|
|
539
|
+
cmd3.action(async (...args) => {
|
|
503
540
|
const { voidAction } = await import("./chunks/action-H3RTILLM.js");
|
|
504
541
|
return voidAction(...args);
|
|
505
542
|
});
|
|
506
|
-
return
|
|
543
|
+
return cmd3;
|
|
507
544
|
}
|
|
508
545
|
|
|
509
546
|
// src/domains/document/index.ts
|
|
@@ -522,172 +559,165 @@ var documentCommands = [
|
|
|
522
559
|
LintCommand,
|
|
523
560
|
UpgradeCommand
|
|
524
561
|
];
|
|
525
|
-
var documentDomain = new
|
|
562
|
+
var documentDomain = new Command30("document");
|
|
526
563
|
documentDomain.description("Manage local openapi file");
|
|
527
564
|
documentCommands.forEach((command) => documentDomain.addCommand(command()));
|
|
528
565
|
var document_default = documentDomain;
|
|
529
566
|
|
|
530
567
|
// src/domains/project/index.ts
|
|
531
|
-
import { Command as
|
|
568
|
+
import { Command as Command40 } from "commander";
|
|
532
569
|
|
|
533
570
|
// src/domains/project/preview/index.ts
|
|
534
|
-
import { Command as
|
|
571
|
+
import { Command as Command31, Option as Option2 } from "commander";
|
|
535
572
|
var PreviewCommand = () => {
|
|
536
|
-
const
|
|
537
|
-
|
|
538
|
-
|
|
573
|
+
const cmd3 = new Command31("preview");
|
|
574
|
+
cmd3.description("Preview scalar guides");
|
|
575
|
+
cmd3.argument(
|
|
539
576
|
"[config]",
|
|
540
577
|
"Path to the Scalar configuration file (usually `scalar.config.json5` or `scalar.config.json`)"
|
|
541
578
|
);
|
|
542
|
-
|
|
579
|
+
cmd3.option(
|
|
543
580
|
"-p, --port [port]",
|
|
544
581
|
"port to run the server on. If the port is not available, it will select another one.",
|
|
545
582
|
"7970"
|
|
546
583
|
);
|
|
547
|
-
|
|
548
|
-
"-
|
|
584
|
+
cmd3.option(
|
|
585
|
+
"-H, --host [host]",
|
|
549
586
|
"Specify which IP addresses the server should listen on."
|
|
550
587
|
);
|
|
551
|
-
|
|
552
|
-
"-L, --log-level <level>",
|
|
553
|
-
"Set the log level (debug, info, warn, error, trace)",
|
|
554
|
-
"info"
|
|
555
|
-
);
|
|
556
|
-
cmd2.option(
|
|
557
|
-
"-F, --log-formatting <formatting>",
|
|
558
|
-
"Set the log formatting (pretty|none). Defaults to pretty formatting outside of CI.",
|
|
559
|
-
"pretty"
|
|
588
|
+
cmd3.addOption(
|
|
589
|
+
new Option2("-L, --log-level <level>", "Set the log level").choices(["debug", "info"]).default("info")
|
|
560
590
|
);
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
const { previewAction } = await import("./chunks/action-
|
|
591
|
+
cmd3.option("-N, --no-open", "Do not open the browser automatically", true);
|
|
592
|
+
cmd3.action(async (...args) => {
|
|
593
|
+
const { previewAction } = await import("./chunks/action-E4YSRFGT.js");
|
|
564
594
|
return previewAction(...args);
|
|
565
595
|
});
|
|
566
|
-
return
|
|
596
|
+
return cmd3;
|
|
567
597
|
};
|
|
568
598
|
|
|
569
599
|
// src/domains/project/check-config/index.ts
|
|
570
|
-
import { Command as
|
|
600
|
+
import { Command as Command32 } from "commander";
|
|
571
601
|
function CheckConfigCommand() {
|
|
572
|
-
const
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
const { checkConfigAction } = await import("./chunks/action-
|
|
602
|
+
const cmd3 = new Command32("check-config");
|
|
603
|
+
cmd3.description("Check a Scalar Configuration file");
|
|
604
|
+
cmd3.argument("[file]", "File to check");
|
|
605
|
+
cmd3.action(async (...args) => {
|
|
606
|
+
const { checkConfigAction } = await import("./chunks/action-NVI5DWFP.js");
|
|
577
607
|
return checkConfigAction(...args);
|
|
578
608
|
});
|
|
579
|
-
return
|
|
609
|
+
return cmd3;
|
|
580
610
|
}
|
|
581
611
|
|
|
582
612
|
// src/domains/project/create/index.ts
|
|
583
|
-
import { Command as
|
|
613
|
+
import { Command as Command33 } from "commander";
|
|
584
614
|
var CreateCommand = () => {
|
|
585
|
-
const
|
|
586
|
-
|
|
615
|
+
const cmd3 = new Command33("create");
|
|
616
|
+
cmd3.description(
|
|
587
617
|
"Create a new project that is not linked to a github project."
|
|
588
618
|
);
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
const { createAction } = await import("./chunks/action-
|
|
619
|
+
cmd3.option("-n, --name <name>", "name of your project");
|
|
620
|
+
cmd3.option("-s, --slug <slug>", "project slug");
|
|
621
|
+
cmd3.action(async (...args) => {
|
|
622
|
+
const { createAction } = await import("./chunks/action-LVDU6YOI.js");
|
|
593
623
|
return createAction(...args);
|
|
594
624
|
});
|
|
595
|
-
return
|
|
625
|
+
return cmd3;
|
|
596
626
|
};
|
|
597
627
|
|
|
598
628
|
// src/domains/project/deployments/index.ts
|
|
599
|
-
import { Command as
|
|
629
|
+
import { Command as Command35 } from "commander";
|
|
600
630
|
|
|
601
631
|
// src/domains/project/deployments/list/index.ts
|
|
602
|
-
import { Command as
|
|
632
|
+
import { Command as Command34 } from "commander";
|
|
603
633
|
var ListCommand = () => {
|
|
604
|
-
const
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
const { listAction } = await import("./chunks/action-
|
|
634
|
+
const cmd3 = new Command34("list");
|
|
635
|
+
cmd3.description("List the production deployment history for a project.");
|
|
636
|
+
cmd3.option("-s, --slug [slug]", "Project slug found in Scalar Dashboard");
|
|
637
|
+
cmd3.action(async (...args) => {
|
|
638
|
+
const { listAction } = await import("./chunks/action-CPLH2CQ5.js");
|
|
609
639
|
return listAction(...args);
|
|
610
640
|
});
|
|
611
|
-
return
|
|
641
|
+
return cmd3;
|
|
612
642
|
};
|
|
613
643
|
|
|
614
644
|
// src/domains/project/deployments/index.ts
|
|
615
645
|
var DeploymentsCommand = () => {
|
|
616
|
-
const
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
return
|
|
646
|
+
const cmd3 = new Command35("deployments");
|
|
647
|
+
cmd3.description("Inspect a project deployment history.");
|
|
648
|
+
cmd3.addCommand(ListCommand());
|
|
649
|
+
return cmd3;
|
|
620
650
|
};
|
|
621
651
|
|
|
622
652
|
// src/domains/project/init/index.ts
|
|
623
|
-
import { Command as
|
|
653
|
+
import { Command as Command36 } from "commander";
|
|
624
654
|
var InitCommand = () => {
|
|
625
|
-
const
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
const { initAction } = await import("./chunks/action-
|
|
655
|
+
const cmd3 = new Command36("init");
|
|
656
|
+
cmd3.description("Create a new Scalar Docs project.");
|
|
657
|
+
cmd3.option("-s, --subdomain [url]", "subdomain to publish on");
|
|
658
|
+
cmd3.option("--force", "override existing configuration");
|
|
659
|
+
cmd3.action(async (...args) => {
|
|
660
|
+
const { initAction } = await import("./chunks/action-RBOLLIGX.js");
|
|
631
661
|
return initAction(...args);
|
|
632
662
|
});
|
|
633
|
-
return
|
|
663
|
+
return cmd3;
|
|
634
664
|
};
|
|
635
665
|
|
|
636
666
|
// src/domains/project/publish/index.ts
|
|
637
|
-
import { Command as
|
|
667
|
+
import { Command as Command37 } from "commander";
|
|
638
668
|
var PublishCommand = () => {
|
|
639
|
-
const
|
|
640
|
-
|
|
669
|
+
const cmd3 = new Command37("publish");
|
|
670
|
+
cmd3.description(
|
|
641
671
|
"Publish new build for a github sync project that is not linked."
|
|
642
672
|
);
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
673
|
+
cmd3.option("-s, --slug [slug]", "Project slug found in Scalar Dashboard");
|
|
674
|
+
cmd3.option("-c, --config [config]", "Your config file of the project");
|
|
675
|
+
cmd3.option("-p, --preview", "Publish in preview mode");
|
|
676
|
+
cmd3.option(
|
|
647
677
|
"-g, --github",
|
|
648
678
|
"Publish from your linked remote GitHub repository"
|
|
649
679
|
);
|
|
650
|
-
|
|
651
|
-
const { publishAction } = await import("./chunks/action-
|
|
680
|
+
cmd3.action(async (...args) => {
|
|
681
|
+
const { publishAction } = await import("./chunks/action-OX2566BE.js");
|
|
652
682
|
return publishAction(...args);
|
|
653
683
|
});
|
|
654
|
-
return
|
|
684
|
+
return cmd3;
|
|
655
685
|
};
|
|
656
686
|
|
|
657
687
|
// src/domains/project/rollback/index.ts
|
|
658
|
-
import { Command as
|
|
688
|
+
import { Command as Command38 } from "commander";
|
|
659
689
|
var RollbackCommand = () => {
|
|
660
|
-
const
|
|
661
|
-
|
|
690
|
+
const cmd3 = new Command38("rollback");
|
|
691
|
+
cmd3.description(
|
|
662
692
|
"Roll the live deployment back to a previously deployed build."
|
|
663
693
|
);
|
|
664
|
-
|
|
665
|
-
|
|
694
|
+
cmd3.option("-s, --slug [slug]", "Project slug found in Scalar Dashboard");
|
|
695
|
+
cmd3.option(
|
|
666
696
|
"-t, --to <publishUid>",
|
|
667
697
|
"Roll back to a specific build id (defaults to the next older deployed build)"
|
|
668
698
|
);
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
const { rollbackAction } = await import("./chunks/action-
|
|
699
|
+
cmd3.option("-y, --yes", "Skip the confirmation prompt");
|
|
700
|
+
cmd3.action(async (...args) => {
|
|
701
|
+
const { rollbackAction } = await import("./chunks/action-BAQYJ6UE.js");
|
|
672
702
|
return rollbackAction(...args);
|
|
673
703
|
});
|
|
674
|
-
return
|
|
704
|
+
return cmd3;
|
|
675
705
|
};
|
|
676
706
|
|
|
677
707
|
// src/domains/project/upgrade/index.ts
|
|
678
|
-
import { Command as
|
|
708
|
+
import { Command as Command39 } from "commander";
|
|
679
709
|
var UpgradeCommand2 = () => {
|
|
680
|
-
const
|
|
681
|
-
|
|
682
|
-
|
|
710
|
+
const cmd3 = new Command39("upgrade");
|
|
711
|
+
cmd3.description("Upgrade scalar project");
|
|
712
|
+
cmd3.argument(
|
|
683
713
|
"[config]",
|
|
684
714
|
"Path to the Scalar configuration file (usually `scalar.config.json5` or `scalar.config.json`)"
|
|
685
715
|
);
|
|
686
|
-
|
|
687
|
-
const { upgradeAction } = await import("./chunks/action-
|
|
716
|
+
cmd3.action(async (...args) => {
|
|
717
|
+
const { upgradeAction } = await import("./chunks/action-CA4QYPI6.js");
|
|
688
718
|
return upgradeAction(...args);
|
|
689
719
|
});
|
|
690
|
-
return
|
|
720
|
+
return cmd3;
|
|
691
721
|
};
|
|
692
722
|
|
|
693
723
|
// src/domains/project/index.ts
|
|
@@ -701,19 +731,19 @@ var projectCommands = [
|
|
|
701
731
|
DeploymentsCommand,
|
|
702
732
|
UpgradeCommand2
|
|
703
733
|
];
|
|
704
|
-
var projectDomain = new
|
|
734
|
+
var projectDomain = new Command40("project");
|
|
705
735
|
projectDomain.description("Manage scalar project");
|
|
706
736
|
projectCommands.forEach((command) => projectDomain.addCommand(command()));
|
|
707
737
|
projectDomain.addCommand(DownloadIsolateCommand(), { hidden: true });
|
|
708
738
|
var project_default = projectDomain;
|
|
709
739
|
|
|
710
740
|
// src/domains/readme/index.ts
|
|
711
|
-
import { Command as
|
|
741
|
+
import { Command as Command42 } from "commander";
|
|
712
742
|
|
|
713
743
|
// src/domains/readme/generate.ts
|
|
714
744
|
import { text } from "@clack/prompts";
|
|
715
745
|
import as2 from "ansis";
|
|
716
|
-
import { Command as
|
|
746
|
+
import { Command as Command41 } from "commander";
|
|
717
747
|
|
|
718
748
|
// src/helpers/documentation/index.ts
|
|
719
749
|
import fs from "node:fs/promises";
|
|
@@ -760,17 +790,20 @@ var generateDocumentationFile = async (outputPath) => {
|
|
|
760
790
|
|
|
761
791
|
// src/domains/readme/generate.ts
|
|
762
792
|
function GenerateReadmeCommand() {
|
|
763
|
-
const
|
|
764
|
-
|
|
765
|
-
|
|
793
|
+
const cmd3 = new Command41("generate");
|
|
794
|
+
cmd3.description("Self generate documentation for the cli");
|
|
795
|
+
cmd3.option(
|
|
766
796
|
"-o, --output [file]",
|
|
767
797
|
"Path where the documentation file will be written"
|
|
768
798
|
);
|
|
769
|
-
|
|
799
|
+
cmd3.action(async ({ output: __outputPath }) => {
|
|
770
800
|
const getOutputPath = async () => {
|
|
771
801
|
if (__outputPath !== void 0 && typeof __outputPath === "string") {
|
|
772
802
|
return __outputPath;
|
|
773
803
|
}
|
|
804
|
+
requireInteractive(
|
|
805
|
+
"Pass --output <file> to generate documentation without a terminal."
|
|
806
|
+
);
|
|
774
807
|
const outputPath2 = await text({
|
|
775
808
|
message: "Where should the documentation file be written?",
|
|
776
809
|
defaultValue: "./README.md",
|
|
@@ -789,7 +822,7 @@ function GenerateReadmeCommand() {
|
|
|
789
822
|
`\u23F1\uFE0F Generation completed in ${as2.yellow(executionTimeMs.toFixed(2))}ms`
|
|
790
823
|
).line("").exit("success");
|
|
791
824
|
});
|
|
792
|
-
return
|
|
825
|
+
return cmd3;
|
|
793
826
|
}
|
|
794
827
|
|
|
795
828
|
// src/domains/readme/serve.ts
|
|
@@ -804,9 +837,9 @@ var fileExists = async (filePath) => {
|
|
|
804
837
|
return false;
|
|
805
838
|
}
|
|
806
839
|
};
|
|
807
|
-
function ServeReadmeCommand(
|
|
808
|
-
|
|
809
|
-
|
|
840
|
+
function ServeReadmeCommand(cmd3) {
|
|
841
|
+
cmd3.description("Open documentation for the CLI");
|
|
842
|
+
cmd3.action(async () => {
|
|
810
843
|
const docsPath = path2.join(import.meta.dirname, "docs.html");
|
|
811
844
|
if (await fileExists(docsPath) === false) {
|
|
812
845
|
return output.error().title("Documentation not found").message(
|
|
@@ -819,111 +852,112 @@ function ServeReadmeCommand(cmd2) {
|
|
|
819
852
|
"Documentation is being opened in your default browser. If it does not open automatically, please visit the following URL:"
|
|
820
853
|
).line(as3.blue(docsUrl)).line().exit("success");
|
|
821
854
|
});
|
|
822
|
-
return
|
|
855
|
+
return cmd3;
|
|
823
856
|
}
|
|
824
857
|
|
|
825
858
|
// src/domains/readme/index.ts
|
|
826
|
-
var readmeDomain = new
|
|
859
|
+
var readmeDomain = new Command42("readme");
|
|
827
860
|
readmeDomain.addCommand(GenerateReadmeCommand());
|
|
828
861
|
ServeReadmeCommand(readmeDomain);
|
|
829
862
|
var readme_default = readmeDomain;
|
|
830
863
|
|
|
831
864
|
// src/domains/registry/index.ts
|
|
832
|
-
import { Command as
|
|
865
|
+
import { Command as Command48 } from "commander";
|
|
833
866
|
|
|
834
867
|
// src/domains/registry/publish/index.ts
|
|
835
|
-
import { Command as
|
|
868
|
+
import { Command as Command43 } from "commander";
|
|
836
869
|
var PublishCommand2 = () => {
|
|
837
|
-
const
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
870
|
+
const cmd3 = new Command43("publish");
|
|
871
|
+
cmd3.description("Publish an OpenAPI document to the Scalar registry");
|
|
872
|
+
cmd3.argument("[file]", "OpenAPI file to upload");
|
|
873
|
+
cmd3.option(
|
|
841
874
|
"--slug <slug>",
|
|
842
875
|
"Slug identifier for the registry entry. Defaults to title."
|
|
843
876
|
);
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
877
|
+
cmd3.option("--namespace <namespace>", "Scalar team namespace");
|
|
878
|
+
cmd3.option("--version <version>", "API version (e.g. 0.1.0)");
|
|
879
|
+
cmd3.option("--private", "Make API private", false);
|
|
880
|
+
cmd3.option("--no-current", "Do not set as the current version");
|
|
881
|
+
cmd3.option("--force", "Force override an existing version", false);
|
|
882
|
+
cmd3.option("--bundle", "Bundle all external references before uploading");
|
|
883
|
+
cmd3.option(
|
|
851
884
|
"--treeShake",
|
|
852
885
|
"Remove unused components from the bundled document"
|
|
853
886
|
);
|
|
854
|
-
|
|
887
|
+
cmd3.option(
|
|
855
888
|
"--urlMap",
|
|
856
889
|
"Generate a map of resolved URLs when bundling the document"
|
|
857
890
|
);
|
|
858
|
-
|
|
891
|
+
cmd3.option(
|
|
859
892
|
"--fetchLimit <limit>",
|
|
860
|
-
"Maximum number of concurrent URLs to fetch when bundling the document"
|
|
893
|
+
"Maximum number of concurrent URLs to fetch when bundling the document",
|
|
894
|
+
parseFetchLimit
|
|
861
895
|
);
|
|
862
|
-
|
|
863
|
-
const { publishAction } = await import("./chunks/action-
|
|
896
|
+
cmd3.action(async (...args) => {
|
|
897
|
+
const { publishAction } = await import("./chunks/action-4NGK5XMD.js");
|
|
864
898
|
return publishAction(...args);
|
|
865
899
|
});
|
|
866
|
-
return
|
|
900
|
+
return cmd3;
|
|
867
901
|
};
|
|
868
902
|
|
|
869
903
|
// src/domains/registry/delete/index.ts
|
|
870
|
-
import { Command as
|
|
904
|
+
import { Command as Command44 } from "commander";
|
|
871
905
|
var DeleteCommand = () => {
|
|
872
|
-
const
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
const { deleteAction } = await import("./chunks/action-
|
|
906
|
+
const cmd3 = new Command44("delete");
|
|
907
|
+
cmd3.description("Delete a document from scalar registry");
|
|
908
|
+
cmd3.argument("[namespace]", "Team namespace");
|
|
909
|
+
cmd3.argument("[slug]", "Managed doc slug");
|
|
910
|
+
cmd3.action(async (...args) => {
|
|
911
|
+
const { deleteAction } = await import("./chunks/action-QYGOPSTY.js");
|
|
878
912
|
return deleteAction(...args);
|
|
879
913
|
});
|
|
880
|
-
return
|
|
914
|
+
return cmd3;
|
|
881
915
|
};
|
|
882
916
|
|
|
883
917
|
// src/domains/registry/get/index.ts
|
|
884
|
-
import { Command as
|
|
918
|
+
import { Command as Command45 } from "commander";
|
|
885
919
|
var GetCommand = () => {
|
|
886
|
-
const
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
const { getAction } = await import("./chunks/action-
|
|
920
|
+
const cmd3 = new Command45("get");
|
|
921
|
+
cmd3.description("Get a document version from scalar registry");
|
|
922
|
+
cmd3.argument("[namespace]", "Team namespace");
|
|
923
|
+
cmd3.argument("[slug]", "Managed doc slug");
|
|
924
|
+
cmd3.option("--version <version>", "Document version (defaults to latest)");
|
|
925
|
+
cmd3.option("--format <format>", "Output format (json or yaml)", "json");
|
|
926
|
+
cmd3.option("-o, --output <file>", "Output file (defaults to stdout)");
|
|
927
|
+
cmd3.action(async (...args) => {
|
|
928
|
+
const { getAction } = await import("./chunks/action-SRBN7N3R.js");
|
|
895
929
|
return getAction(...args);
|
|
896
930
|
});
|
|
897
|
-
return
|
|
931
|
+
return cmd3;
|
|
898
932
|
};
|
|
899
933
|
|
|
900
934
|
// src/domains/registry/list/index.ts
|
|
901
|
-
import { Command as
|
|
935
|
+
import { Command as Command46 } from "commander";
|
|
902
936
|
var ListCommand2 = () => {
|
|
903
|
-
const
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
const { listAction } = await import("./chunks/action-
|
|
937
|
+
const cmd3 = new Command46("list");
|
|
938
|
+
cmd3.description("List all registry APIs for a team namespace");
|
|
939
|
+
cmd3.option("--namespace <namespace>", "Team namespace");
|
|
940
|
+
cmd3.action(async (...args) => {
|
|
941
|
+
const { listAction } = await import("./chunks/action-SCOXTCPR.js");
|
|
908
942
|
return listAction(...args);
|
|
909
943
|
});
|
|
910
|
-
return
|
|
944
|
+
return cmd3;
|
|
911
945
|
};
|
|
912
946
|
|
|
913
947
|
// src/domains/registry/update/index.ts
|
|
914
|
-
import { Command as
|
|
948
|
+
import { Command as Command47 } from "commander";
|
|
915
949
|
var UpdateCommand = () => {
|
|
916
|
-
const
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
const { updateAction } = await import("./chunks/action-
|
|
950
|
+
const cmd3 = new Command47("update");
|
|
951
|
+
cmd3.description("Update document metadata on scalar registry");
|
|
952
|
+
cmd3.argument("[namespace]", "namespace of document you want to update");
|
|
953
|
+
cmd3.argument("[slug]", "slug of document you want to update");
|
|
954
|
+
cmd3.option("--title <title>", "Document title");
|
|
955
|
+
cmd3.option("--description <description>", "Document description");
|
|
956
|
+
cmd3.action(async (...args) => {
|
|
957
|
+
const { updateAction } = await import("./chunks/action-SNPOOW6S.js");
|
|
924
958
|
return updateAction(...args);
|
|
925
959
|
});
|
|
926
|
-
return
|
|
960
|
+
return cmd3;
|
|
927
961
|
};
|
|
928
962
|
|
|
929
963
|
// src/domains/registry/index.ts
|
|
@@ -934,42 +968,42 @@ var registryCommands = [
|
|
|
934
968
|
ListCommand2,
|
|
935
969
|
GetCommand
|
|
936
970
|
];
|
|
937
|
-
var registryDomain = new
|
|
971
|
+
var registryDomain = new Command48("registry");
|
|
938
972
|
registryDomain.description("Manage your scalar registry");
|
|
939
973
|
registryCommands.forEach((command) => registryDomain.addCommand(command()));
|
|
940
974
|
var registry_default = registryDomain;
|
|
941
975
|
|
|
942
976
|
// src/domains/team/index.ts
|
|
943
|
-
import { Command as
|
|
977
|
+
import { Command as Command51 } from "commander";
|
|
944
978
|
|
|
945
979
|
// src/domains/team/list/index.ts
|
|
946
|
-
import { Command as
|
|
980
|
+
import { Command as Command49 } from "commander";
|
|
947
981
|
var ListCommand3 = () => {
|
|
948
|
-
const
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
const { listAction } = await import("./chunks/action-
|
|
982
|
+
const cmd3 = new Command49("list");
|
|
983
|
+
cmd3.description("List all teams current user is part of");
|
|
984
|
+
cmd3.action(async (...args) => {
|
|
985
|
+
const { listAction } = await import("./chunks/action-BRSSC2SR.js");
|
|
952
986
|
return listAction(...args);
|
|
953
987
|
});
|
|
954
|
-
return
|
|
988
|
+
return cmd3;
|
|
955
989
|
};
|
|
956
990
|
|
|
957
991
|
// src/domains/team/set/index.ts
|
|
958
|
-
import { Command as
|
|
992
|
+
import { Command as Command50 } from "commander";
|
|
959
993
|
var SetCommand = () => {
|
|
960
|
-
const
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
const { setAction } = await import("./chunks/action-
|
|
994
|
+
const cmd3 = new Command50("set");
|
|
995
|
+
cmd3.description("Set current active team for the user");
|
|
996
|
+
cmd3.option("--team <team>", "Team uid");
|
|
997
|
+
cmd3.action(async (...args) => {
|
|
998
|
+
const { setAction } = await import("./chunks/action-T5XMJXPO.js");
|
|
965
999
|
return setAction(...args);
|
|
966
1000
|
});
|
|
967
|
-
return
|
|
1001
|
+
return cmd3;
|
|
968
1002
|
};
|
|
969
1003
|
|
|
970
1004
|
// src/domains/team/index.ts
|
|
971
1005
|
var teamCommands = [ListCommand3, SetCommand];
|
|
972
|
-
var teamDomain = new
|
|
1006
|
+
var teamDomain = new Command51("team");
|
|
973
1007
|
teamDomain.description("Manage user teams");
|
|
974
1008
|
teamCommands.forEach((command) => teamDomain.addCommand(command()));
|
|
975
1009
|
var team_default = teamDomain;
|
|
@@ -977,7 +1011,7 @@ var team_default = teamDomain;
|
|
|
977
1011
|
// src/domains/upgrade/index.ts
|
|
978
1012
|
import { execSync } from "node:child_process";
|
|
979
1013
|
import as5 from "ansis";
|
|
980
|
-
import { Command as
|
|
1014
|
+
import { Command as Command52 } from "commander";
|
|
981
1015
|
|
|
982
1016
|
// src/helpers/upgrade.ts
|
|
983
1017
|
import as4 from "ansis";
|
|
@@ -1044,9 +1078,9 @@ async function checkUpgrade() {
|
|
|
1044
1078
|
}
|
|
1045
1079
|
|
|
1046
1080
|
// src/domains/upgrade/index.ts
|
|
1047
|
-
var
|
|
1048
|
-
|
|
1049
|
-
|
|
1081
|
+
var cmd2 = new Command52("upgrade");
|
|
1082
|
+
cmd2.description("Upgrade current version of your cli");
|
|
1083
|
+
cmd2.action(async () => {
|
|
1050
1084
|
if (process.env.SCALAR_CLI_DISTRIBUTION === "portable") {
|
|
1051
1085
|
output.info().message(
|
|
1052
1086
|
"To upgrade this portable installation, download and extract the newer Scalar archive, then replace the installation directory."
|
|
@@ -1070,12 +1104,13 @@ cmd.action(async () => {
|
|
|
1070
1104
|
output.error().title("Upgrade failed").message("Failed to upgrade the CLI. Please try running:").message(as5.cyan(`npm install -g ${upgradeStatus.name}@latest`)).exit("error");
|
|
1071
1105
|
}
|
|
1072
1106
|
});
|
|
1073
|
-
var upgrade_default =
|
|
1107
|
+
var upgrade_default = cmd2;
|
|
1074
1108
|
|
|
1075
1109
|
// src/domains/index.ts
|
|
1076
1110
|
var domains = [
|
|
1077
1111
|
readme_default,
|
|
1078
1112
|
upgrade_default,
|
|
1113
|
+
context_default,
|
|
1079
1114
|
auth_default,
|
|
1080
1115
|
document_default,
|
|
1081
1116
|
project_default,
|
|
@@ -1088,7 +1123,7 @@ var domains_default = domains;
|
|
|
1088
1123
|
|
|
1089
1124
|
// src/program.ts
|
|
1090
1125
|
var getProgram = () => {
|
|
1091
|
-
const program2 = new
|
|
1126
|
+
const program2 = new Command53();
|
|
1092
1127
|
program2.enablePositionalOptions().name(Object.keys(bin)[0]).description("CLI to work with your OpenAPI files").version(version, "-v, --version");
|
|
1093
1128
|
program2.showHelpAfterError();
|
|
1094
1129
|
domains_default.forEach((domain) => program2.addCommand(domain));
|
|
@@ -1106,7 +1141,7 @@ var program = getProgram();
|
|
|
1106
1141
|
if (process.argv.length === 2) {
|
|
1107
1142
|
program.help();
|
|
1108
1143
|
}
|
|
1109
|
-
if (process.argv[2] !== "upgrade" && process.env.SCALAR_CLI_DISTRIBUTION !== "portable") {
|
|
1144
|
+
if (process.argv[2] !== "upgrade" && process.argv[2] !== "context" && process.env.SCALAR_CLI_DISTRIBUTION !== "portable") {
|
|
1110
1145
|
checkUpgrade().catch(() => {
|
|
1111
1146
|
});
|
|
1112
1147
|
}
|