@scalar/cli 2.5.2 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +319 -55
- package/chunks/{action-XUQ7TKKJ.js → action-354TUG4H.js} +11 -7
- package/chunks/{action-PHLOE27S.js → action-43YBNBDR.js} +33 -26
- package/chunks/{action-DGD6Q6Y5.js → action-5SK5NE7E.js} +10 -4
- package/chunks/{action-Y6CEKYEK.js → action-6BYGBXRC.js} +40 -23
- package/chunks/{action-LUVBQEIQ.js → action-7PEQXDWT.js} +4 -4
- package/chunks/action-AQRPFQKI.js +231 -0
- package/chunks/{action-RBVPKCRI.js → action-CA4QYPI6.js} +6 -6
- package/chunks/{action-7H3XARJP.js → action-EOAVVL52.js} +11 -5
- package/chunks/action-F2ZJNURT.js +72 -0
- package/chunks/{action-AMNYOA4B.js → action-F7A2K74G.js} +4 -4
- package/chunks/{action-HIL5ZFNB.js → action-FCAYFPVR.js} +5 -5
- package/chunks/{action-42D2C47G.js → action-GWXLHL2Z.js} +3 -3
- package/chunks/{action-ZWQLQENM.js → action-H6OUJWWM.js} +4 -4
- package/chunks/{action-TWHLZW4V.js → action-HT2DJ34Z.js} +49 -26
- package/chunks/{action-PAA4NWUJ.js → action-JAHFRYWZ.js} +58 -9
- package/chunks/{action-HXHBU7XC.js → action-KTYOCA2V.js} +37 -12
- package/chunks/{action-LFL3ZZKN.js → action-LEUD5P2U.js} +17 -17
- package/chunks/{action-FF2OMGAS.js → action-LLH4QPXM.js} +34 -20
- package/chunks/{action-OILGZAMK.js → action-LXGXKXZZ.js} +20 -15
- package/chunks/{action-W62AIEBN.js → action-NVI5DWFP.js} +6 -6
- package/chunks/{action-EPNE5XCM.js → action-QQZLPI42.js} +17 -17
- package/chunks/{action-ZLTUMRO2.js → action-UIKH4SZX.js} +25 -21
- package/chunks/{action-6FAJNP6C.js → action-VOFDW3U2.js} +4 -4
- package/chunks/{action-OK55BFGM.js → action-W3C53GPH.js} +7 -7
- package/chunks/{action-P7RFXIC7.js → action-WFDNRA7D.js} +32 -23
- package/chunks/{action-V5KYG7XD.js → action-XIUO64C7.js} +10 -10
- package/chunks/{action-X7TZA3RE.js → action-Y6NXJQ4H.js} +89 -14
- package/chunks/{action-6MZZHPVQ.js → action-Y7OUGD56.js} +27 -14
- package/chunks/{action-DCINFQ57.js → action-YLF2G4G5.js} +13 -13
- package/chunks/{action-SJYAMXYI.js → action-YRX6SN5F.js} +10 -4
- package/chunks/actions-OGIVBQC7.js +158 -0
- package/chunks/{agent-JAXLLDPE.js → agent-ASPV3R5U.js} +4 -4
- package/chunks/{asyncapi-P6Y3L7RG.js → asyncapi-QNFKXHEI.js} +10 -11
- package/chunks/{build.action-AZ5ECU4B.js → build.action-NM6CAE5F.js} +37 -33
- package/chunks/{chunk-FOKFF4EP.js → chunk-22HYZ7LE.js} +3 -3
- package/chunks/{chunk-KEOCJ3NJ.js → chunk-2OCWX42S.js} +38 -87
- package/chunks/{chunk-RPVHJMQT.js → chunk-5DEU2DVL.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-CX7ZRMTC.js → chunk-6XWCMJDB.js} +1 -1
- package/chunks/{chunk-6ZMT63IV.js → chunk-6YPQGVF4.js} +1 -1
- package/chunks/{chunk-HXIDUCSZ.js → chunk-BPGFSSUH.js} +1 -1
- package/chunks/{chunk-M622VXRQ.js → chunk-C2KAWRIX.js} +1 -1
- package/chunks/chunk-EGOXR5FB.js +15 -0
- package/chunks/{chunk-UB3XGOUW.js → chunk-EXY3ZTV4.js} +262 -9
- package/chunks/{chunk-3BWGTPPT.js → chunk-FDC2IESH.js} +1776 -1113
- package/chunks/{chunk-TYLWJ2UL.js → chunk-GTV2BVXV.js} +2 -2
- package/chunks/{chunk-SWWWYWHC.js → chunk-HGOD6THU.js} +27 -18
- package/chunks/{chunk-3DJ2GKEG.js → chunk-IMG35UXX.js} +1 -1
- package/chunks/{chunk-MNLXYOVF.js → chunk-KCCFN4F7.js} +2 -2
- package/chunks/{chunk-FQVVKQPU.js → chunk-KKRGBXCE.js} +137 -1
- package/chunks/{chunk-UMPODUJO.js → chunk-L3UXDCBI.js} +105 -15
- package/chunks/{chunk-B2MHTD3R.js → chunk-MLSZVVTT.js} +1 -1
- package/chunks/{chunk-LCPFHE4Z.js → chunk-OJ2EWIJH.js} +21 -2
- package/chunks/{chunk-RAO7VUGM.js → chunk-PH3WFNXJ.js} +1 -1
- package/chunks/{chunk-NIXG4KDE.js → chunk-QVQ4PNVL.js} +170 -5
- package/chunks/{chunk-CIFOFSZ3.js → chunk-R5LK6VPY.js} +72 -7
- package/chunks/{chunk-T7B6WNZC.js → chunk-TSURUX4A.js} +12 -3
- package/chunks/{chunk-JV7TUEXQ.js → chunk-UXJ753NV.js} +14 -1
- package/chunks/{chunk-HUCR333E.js → chunk-W24BETFG.js} +2 -2
- package/chunks/{chunk-LQN4S62O.js → chunk-XEDGMZJD.js} +18 -4
- package/chunks/{chunk-NNMSZVAB.js → chunk-XXSQUBXS.js} +82 -6
- package/chunks/{chunk-M6Q3ARBV.js → chunk-YILQODZF.js} +2 -2
- package/chunks/{create.action-34OTO2SB.js → create.action-FUQ2BVJA.js} +29 -17
- package/chunks/{delete.action-ZYXFMIOW.js → delete.action-47E66R3I.js} +26 -17
- package/chunks/{delete.action-6LRT4M3S.js → delete.action-BTDFH7WY.js} +26 -17
- package/chunks/{get.action-XP36SA2J.js → get.action-XC7KC2JO.js} +10 -10
- package/chunks/{list.action-6LF6KSD5.js → list.action-LXKEUYKO.js} +13 -13
- package/chunks/{list.action-WVRVLX5E.js → list.action-OFGLMRE7.js} +17 -17
- package/chunks/{publish.action-AHFUBT5C.js → publish.action-OS27XOX4.js} +50 -24
- package/chunks/{update.action-YQTVUDYE.js → update.action-AEIBLCWD.js} +27 -18
- package/chunks/{update.action-ZREAFJVG.js → update.action-ZMS4CQ3T.js} +27 -18
- package/docs.html +679 -175
- package/index.js +492 -406
- package/package.json +14 -22
- package/skills/scalar-cli/SKILL.md +77 -0
- package/template.md +101 -3
- package/chunks/action-YRWHX2AE.js +0 -64
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
apiService
|
|
4
|
+
} from "./chunk-EXY3ZTV4.js";
|
|
5
|
+
import {
|
|
6
|
+
accessGroupDomains,
|
|
7
|
+
accessGroupNameSchema,
|
|
8
|
+
emailDomainSchema
|
|
9
|
+
} from "./chunk-KKRGBXCE.js";
|
|
10
|
+
import "./chunk-MLSZVVTT.js";
|
|
11
|
+
import "./chunk-FDC2IESH.js";
|
|
12
|
+
import "./chunk-C2KAWRIX.js";
|
|
13
|
+
import "./chunk-R5LK6VPY.js";
|
|
14
|
+
import "./chunk-QVQ4PNVL.js";
|
|
15
|
+
import "./chunk-UXJ753NV.js";
|
|
16
|
+
import "./chunk-5UHLAJQD.js";
|
|
17
|
+
import "./chunk-5JLVQVKO.js";
|
|
18
|
+
import "./chunk-K74E42RV.js";
|
|
19
|
+
import "./chunk-KCCFN4F7.js";
|
|
20
|
+
import "./chunk-6XWCMJDB.js";
|
|
21
|
+
import "./chunk-4ORL4MST.js";
|
|
22
|
+
import {
|
|
23
|
+
output
|
|
24
|
+
} from "./chunk-T5HJUAWB.js";
|
|
25
|
+
import "./chunk-XEDGMZJD.js";
|
|
26
|
+
import {
|
|
27
|
+
external_exports,
|
|
28
|
+
slugSchema
|
|
29
|
+
} from "./chunk-IKT5F47M.js";
|
|
30
|
+
import "./chunk-3MZYUBJ6.js";
|
|
31
|
+
|
|
32
|
+
// src/domains/access-group/actions.ts
|
|
33
|
+
import { confirm, isCancel } from "@clack/prompts";
|
|
34
|
+
var common = { slug: slugSchema, json: external_exports.boolean().default(false) };
|
|
35
|
+
var argsSchema = external_exports.discriminatedUnion("operation", [
|
|
36
|
+
external_exports.object({
|
|
37
|
+
...common,
|
|
38
|
+
operation: external_exports.literal("create"),
|
|
39
|
+
name: accessGroupNameSchema.optional(),
|
|
40
|
+
domain: accessGroupDomains.optional()
|
|
41
|
+
}),
|
|
42
|
+
external_exports.object({ ...common, operation: external_exports.literal("get") }),
|
|
43
|
+
external_exports.object({
|
|
44
|
+
...common,
|
|
45
|
+
operation: external_exports.literal("update"),
|
|
46
|
+
name: accessGroupNameSchema.optional(),
|
|
47
|
+
newSlug: slugSchema.optional()
|
|
48
|
+
}).refine(
|
|
49
|
+
(args) => args.name !== void 0 || args.newSlug !== void 0,
|
|
50
|
+
"Provide --name or --new-slug"
|
|
51
|
+
),
|
|
52
|
+
external_exports.object({
|
|
53
|
+
...common,
|
|
54
|
+
operation: external_exports.literal("delete"),
|
|
55
|
+
yes: external_exports.boolean().default(false)
|
|
56
|
+
}),
|
|
57
|
+
external_exports.object({
|
|
58
|
+
...common,
|
|
59
|
+
operation: external_exports.literal("add-domain"),
|
|
60
|
+
domain: emailDomainSchema
|
|
61
|
+
}),
|
|
62
|
+
external_exports.object({
|
|
63
|
+
...common,
|
|
64
|
+
operation: external_exports.literal("remove-domain"),
|
|
65
|
+
domain: emailDomainSchema
|
|
66
|
+
})
|
|
67
|
+
]);
|
|
68
|
+
async function runAction(input) {
|
|
69
|
+
const parsed = argsSchema.safeParse(input);
|
|
70
|
+
if (!parsed.success) {
|
|
71
|
+
return output.error().title("Invalid arguments").message(parsed.error.issues[0].message).exit("error");
|
|
72
|
+
}
|
|
73
|
+
const args = parsed.data;
|
|
74
|
+
if (args.operation === "delete" && !args.yes) {
|
|
75
|
+
if (args.json || !process.stdin.isTTY || !process.stdout.isTTY) {
|
|
76
|
+
return output.error().title("Confirmation required").message("Pass --yes to delete an access group without prompting.").exit("error");
|
|
77
|
+
}
|
|
78
|
+
const accepted = await confirm({
|
|
79
|
+
message: `Delete access group "${args.slug}" and remove its project assignments?`
|
|
80
|
+
});
|
|
81
|
+
if (isCancel(accepted) || !accepted) {
|
|
82
|
+
output.info().message("Deletion cancelled.").print();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
const client = await apiService();
|
|
87
|
+
if (args.operation === "create") {
|
|
88
|
+
const response2 = await client.accessGroups.create({
|
|
89
|
+
slug: args.slug,
|
|
90
|
+
name: args.name,
|
|
91
|
+
allowedDomains: args.domain
|
|
92
|
+
});
|
|
93
|
+
if (response2.error)
|
|
94
|
+
return output.error().title("Could not create access group").message(response2.message).exit("error");
|
|
95
|
+
if (args.json) console.log(JSON.stringify(response2.data));
|
|
96
|
+
else
|
|
97
|
+
output.info().message(
|
|
98
|
+
`Created access group "${response2.data.slug}" (${response2.data.uid}).`
|
|
99
|
+
).print();
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const group = await client.accessGroups.get(args.slug);
|
|
103
|
+
if (group.error)
|
|
104
|
+
return output.error().title("Could not find access group").message(group.message).exit("error");
|
|
105
|
+
if (args.operation === "get") {
|
|
106
|
+
if (args.json) console.log(JSON.stringify(group.data));
|
|
107
|
+
else
|
|
108
|
+
output.info().title(group.data.name || group.data.slug).line(`Slug: ${group.data.slug}`).line(`UID: ${group.data.uid}`).line(
|
|
109
|
+
`Allowed domains: ${group.data.allowedDomains.join(", ") || "(none)"}`
|
|
110
|
+
).line(
|
|
111
|
+
`Allowed emails: ${group.data.allowedEmails.join(", ") || "(none)"}`
|
|
112
|
+
).print();
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const response = await (async () => {
|
|
116
|
+
switch (args.operation) {
|
|
117
|
+
case "update":
|
|
118
|
+
return client.accessGroups.update(group.data.uid, {
|
|
119
|
+
name: args.name,
|
|
120
|
+
slug: args.newSlug
|
|
121
|
+
});
|
|
122
|
+
case "delete":
|
|
123
|
+
return client.accessGroups.delete(group.data.uid);
|
|
124
|
+
case "add-domain":
|
|
125
|
+
return client.accessGroups.addDomain(group.data.uid, args.domain);
|
|
126
|
+
case "remove-domain":
|
|
127
|
+
return client.accessGroups.removeDomain(group.data.uid, args.domain);
|
|
128
|
+
}
|
|
129
|
+
})();
|
|
130
|
+
if (response.error)
|
|
131
|
+
return output.error().title(
|
|
132
|
+
{
|
|
133
|
+
update: "Could not update access group",
|
|
134
|
+
delete: "Could not delete access group",
|
|
135
|
+
"add-domain": "Could not add domain",
|
|
136
|
+
"remove-domain": "Could not remove domain"
|
|
137
|
+
}[args.operation]
|
|
138
|
+
).message(response.message).exit("error");
|
|
139
|
+
if (args.json) console.log(JSON.stringify(response.data));
|
|
140
|
+
else
|
|
141
|
+
output.info().message(
|
|
142
|
+
(() => {
|
|
143
|
+
switch (args.operation) {
|
|
144
|
+
case "update":
|
|
145
|
+
return `Updated access group "${args.newSlug ?? args.slug}".`;
|
|
146
|
+
case "delete":
|
|
147
|
+
return `Deleted access group "${args.slug}".`;
|
|
148
|
+
case "add-domain":
|
|
149
|
+
return `Added domain "${args.domain}" to access group "${args.slug}".`;
|
|
150
|
+
case "remove-domain":
|
|
151
|
+
return `Removed domain "${args.domain}" from access group "${args.slug}".`;
|
|
152
|
+
}
|
|
153
|
+
})()
|
|
154
|
+
).print();
|
|
155
|
+
}
|
|
156
|
+
export {
|
|
157
|
+
runAction
|
|
158
|
+
};
|
|
@@ -61,10 +61,10 @@ import {
|
|
|
61
61
|
teamUsageResponseSchema,
|
|
62
62
|
usageRecordSchema,
|
|
63
63
|
usageRoutes
|
|
64
|
-
} from "./chunk-
|
|
65
|
-
import "./chunk-
|
|
66
|
-
import "./chunk-
|
|
67
|
-
import "./chunk-
|
|
64
|
+
} from "./chunk-R5LK6VPY.js";
|
|
65
|
+
import "./chunk-5UHLAJQD.js";
|
|
66
|
+
import "./chunk-5JLVQVKO.js";
|
|
67
|
+
import "./chunk-XEDGMZJD.js";
|
|
68
68
|
import "./chunk-IKT5F47M.js";
|
|
69
69
|
import "./chunk-3MZYUBJ6.js";
|
|
70
70
|
export {
|
|
@@ -2,20 +2,20 @@ import { createRequire as $$cR } from "node:module"; const require = $$cR(import
|
|
|
2
2
|
import {
|
|
3
3
|
isAsyncApiDocument,
|
|
4
4
|
isDocument
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HGOD6THU.js";
|
|
6
6
|
import {
|
|
7
7
|
watchFile
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-QVQ4PNVL.js";
|
|
9
|
+
import "./chunk-UXJ753NV.js";
|
|
10
|
+
import "./chunk-5UHLAJQD.js";
|
|
11
|
+
import "./chunk-5JLVQVKO.js";
|
|
12
|
+
import "./chunk-KCCFN4F7.js";
|
|
13
|
+
import "./chunk-6XWCMJDB.js";
|
|
14
14
|
import "./chunk-4ORL4MST.js";
|
|
15
15
|
import {
|
|
16
16
|
output
|
|
17
17
|
} from "./chunk-T5HJUAWB.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-XEDGMZJD.js";
|
|
19
19
|
import "./chunk-IKT5F47M.js";
|
|
20
20
|
import "./chunk-3MZYUBJ6.js";
|
|
21
21
|
|
|
@@ -49,7 +49,7 @@ var mockAsyncApi = async (input, options) => {
|
|
|
49
49
|
if (!document) return;
|
|
50
50
|
const connections = /* @__PURE__ */ new Set();
|
|
51
51
|
const start = async (nextDocument) => {
|
|
52
|
-
const { app,
|
|
52
|
+
const { app, websocket } = await createAsyncApiMockServer({
|
|
53
53
|
document: nextDocument,
|
|
54
54
|
logger: (line) => output.info().line(line).print(),
|
|
55
55
|
onMessage: ({ channel, direction }) => {
|
|
@@ -57,7 +57,7 @@ var mockAsyncApi = async (input, options) => {
|
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
59
|
const server2 = serve(
|
|
60
|
-
{ fetch: app.fetch, port: options.port ?? 3e3 },
|
|
60
|
+
{ fetch: app.fetch, port: options.port ?? 3e3, websocket },
|
|
61
61
|
({ port }) => {
|
|
62
62
|
output.info().line(`AsyncAPI Mock Server listening on http://localhost:${port}`).print();
|
|
63
63
|
}
|
|
@@ -66,7 +66,6 @@ var mockAsyncApi = async (input, options) => {
|
|
|
66
66
|
connections.add(socket);
|
|
67
67
|
socket.once("close", () => connections.delete(socket));
|
|
68
68
|
});
|
|
69
|
-
injectWebSocket(server2);
|
|
70
69
|
return server2;
|
|
71
70
|
};
|
|
72
71
|
let server = await start(document);
|
|
@@ -1,38 +1,37 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
apiService
|
|
4
|
-
} from "./chunk-UB3XGOUW.js";
|
|
5
2
|
import {
|
|
6
3
|
BaseCollections
|
|
7
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2OCWX42S.js";
|
|
8
5
|
import {
|
|
9
6
|
getDatabaseClient
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import
|
|
12
|
-
|
|
7
|
+
} from "./chunk-5DEU2DVL.js";
|
|
8
|
+
import {
|
|
9
|
+
apiService
|
|
10
|
+
} from "./chunk-EXY3ZTV4.js";
|
|
11
|
+
import "./chunk-KKRGBXCE.js";
|
|
12
|
+
import "./chunk-MLSZVVTT.js";
|
|
13
13
|
import {
|
|
14
14
|
sdkSchema
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-FDC2IESH.js";
|
|
16
|
+
import "./chunk-C2KAWRIX.js";
|
|
17
|
+
import "./chunk-R5LK6VPY.js";
|
|
18
18
|
import {
|
|
19
19
|
getAuthData
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-QVQ4PNVL.js";
|
|
21
|
+
import "./chunk-UXJ753NV.js";
|
|
22
22
|
import {
|
|
23
23
|
teamSchema
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-5UHLAJQD.js";
|
|
25
|
+
import "./chunk-5JLVQVKO.js";
|
|
26
26
|
import "./chunk-K74E42RV.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-KCCFN4F7.js";
|
|
28
|
+
import "./chunk-6XWCMJDB.js";
|
|
29
29
|
import "./chunk-4ORL4MST.js";
|
|
30
30
|
import {
|
|
31
31
|
output
|
|
32
32
|
} from "./chunk-T5HJUAWB.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-XEDGMZJD.js";
|
|
34
34
|
import {
|
|
35
|
-
docVersionSchema,
|
|
36
35
|
external_exports,
|
|
37
36
|
namespaceSchema,
|
|
38
37
|
slugSchema
|
|
@@ -44,8 +43,7 @@ import { select } from "@clack/prompts";
|
|
|
44
43
|
async function buildAction(opts) {
|
|
45
44
|
const { error, data } = external_exports.object({
|
|
46
45
|
slug: slugSchema.optional(),
|
|
47
|
-
namespace: namespaceSchema.optional()
|
|
48
|
-
version: docVersionSchema.optional()
|
|
46
|
+
namespace: namespaceSchema.optional()
|
|
49
47
|
}).safeParse(opts);
|
|
50
48
|
if (error)
|
|
51
49
|
return output.error().title("Invalid input").message(error.issues[0].message).exit("error");
|
|
@@ -76,31 +74,37 @@ async function buildAction(opts) {
|
|
|
76
74
|
schema: sdkSchema.array()
|
|
77
75
|
});
|
|
78
76
|
if (sdks.error) return output.error().title(sdks.message).exit("error");
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
if (sdks.data.length === 0)
|
|
78
|
+
return output.error().title(`No SDKs found for namespace "${namespace}".`).exit("error");
|
|
79
|
+
const availableSlugs = sdks.data.map((sdk) => sdk.slug).join(", ");
|
|
80
|
+
if (data.slug) {
|
|
81
|
+
if (!sdks.data.some((sdk) => sdk.slug === data.slug))
|
|
82
|
+
return output.error().title("No SDK found").message(
|
|
83
|
+
`No SDK "${data.slug}" in namespace "${namespace}". Available: ${availableSlugs}`
|
|
84
|
+
).exit("error");
|
|
85
|
+
} else if (!process.stdin.isTTY || !process.stdout.isTTY) {
|
|
86
|
+
return output.error().title("Missing SDK slug").message(
|
|
87
|
+
`Pass --slug when running without a terminal. Available in "${namespace}": ${availableSlugs}`
|
|
88
|
+
).exit("error");
|
|
89
|
+
}
|
|
90
|
+
const slug = data.slug || await select({
|
|
91
|
+
message: "Please select an SDK to build",
|
|
81
92
|
options: sdks.data.map((sdk) => ({
|
|
82
|
-
value: sdk.
|
|
93
|
+
value: sdk.slug,
|
|
83
94
|
label: sdk.slug
|
|
84
95
|
}))
|
|
85
96
|
});
|
|
86
|
-
const matchingSdk = sdks.data.find((sdk) => sdk.
|
|
97
|
+
const matchingSdk = sdks.data.find((sdk) => sdk.slug === slug);
|
|
87
98
|
if (!matchingSdk) {
|
|
88
99
|
return output.error().title("No SDK found").message("Please provide a valid SDK slug").exit("error");
|
|
89
100
|
}
|
|
90
|
-
const version = matchingSdk.versions.find((v) => v.version === data.version)?.version || await select({
|
|
91
|
-
message: "Please select an SDK version to build",
|
|
92
|
-
options: matchingSdk.versions.map((version2) => ({
|
|
93
|
-
value: version2.version,
|
|
94
|
-
label: `v${version2.version}`
|
|
95
|
-
}))
|
|
96
|
-
});
|
|
97
101
|
const logger = output.info().loader("Creating SDK Build");
|
|
98
|
-
const response = await client.sdks.build(
|
|
102
|
+
const response = await client.sdks.build(matchingSdk.uid);
|
|
99
103
|
if (response.error) {
|
|
100
104
|
return output.error().title("Something went wrong").message(response.message).exit("error");
|
|
101
105
|
}
|
|
102
106
|
logger.update("loader", 0, {
|
|
103
|
-
content: `SDK build
|
|
107
|
+
content: `SDK build started for ${matchingSdk.slug}`
|
|
104
108
|
}).exit("success");
|
|
105
109
|
}
|
|
106
110
|
export {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
BaseCollections
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2OCWX42S.js";
|
|
5
5
|
import {
|
|
6
6
|
getDatabaseClient
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5DEU2DVL.js";
|
|
8
8
|
import {
|
|
9
9
|
publishRecordSchema
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5JLVQVKO.js";
|
|
11
11
|
|
|
12
12
|
// src/domains/project/deployments/get-deployments.ts
|
|
13
13
|
function orderDeployments(records) {
|
|
@@ -4,34 +4,40 @@ import {
|
|
|
4
4
|
identityProviderRecordSchema,
|
|
5
5
|
loginPortalSchema,
|
|
6
6
|
managedSchema,
|
|
7
|
+
siteDeploySchema,
|
|
7
8
|
workspaceSchema
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KKRGBXCE.js";
|
|
9
10
|
import {
|
|
10
11
|
userSchema
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MLSZVVTT.js";
|
|
12
13
|
import {
|
|
13
14
|
sdkSchema
|
|
14
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FDC2IESH.js";
|
|
15
16
|
import {
|
|
16
17
|
teamSchema
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5UHLAJQD.js";
|
|
18
19
|
import {
|
|
19
20
|
activeDeploymentSchema,
|
|
20
21
|
publishRecordSchema,
|
|
21
22
|
themeSchema
|
|
22
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-5JLVQVKO.js";
|
|
23
24
|
import {
|
|
24
25
|
managedDocSchema,
|
|
25
26
|
ruleSchema
|
|
26
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-KCCFN4F7.js";
|
|
27
28
|
import {
|
|
28
29
|
docVersionRecordSchema
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-6XWCMJDB.js";
|
|
30
31
|
import {
|
|
32
|
+
brandedUid,
|
|
31
33
|
emailSchema,
|
|
32
34
|
entitySchema,
|
|
33
35
|
external_exports,
|
|
36
|
+
mintUid,
|
|
37
|
+
namespaceSchema,
|
|
34
38
|
nanoidSchema,
|
|
39
|
+
timestampSchema,
|
|
40
|
+
unixTimestamp,
|
|
35
41
|
zod_default
|
|
36
42
|
} from "./chunk-IKT5F47M.js";
|
|
37
43
|
|
|
@@ -42,86 +48,17 @@ var scalarAdminSchema = entitySchema.extend({
|
|
|
42
48
|
role: zod_default.enum(["admin", "super-admin"])
|
|
43
49
|
}).meta({ id: "scalar-admin" });
|
|
44
50
|
|
|
45
|
-
// ../../packages/entities/dist/
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
data: external_exports.string()
|
|
57
|
-
}).meta({ id: "publish-asset" });
|
|
58
|
-
var typesenseConfigSchema = external_exports.object({
|
|
59
|
-
keyId: external_exports.number(),
|
|
60
|
-
keyValue: external_exports.string(),
|
|
61
|
-
collectionName: external_exports.string()
|
|
62
|
-
}).meta({ id: "typesense-config" });
|
|
63
|
-
|
|
64
|
-
// ../../packages/entities/dist/deploys/deploy.js
|
|
65
|
-
var subpathSchema = external_exports.object({
|
|
66
|
-
subpath: external_exports.string(),
|
|
67
|
-
projectUid: external_exports.string(),
|
|
68
|
-
/**
|
|
69
|
-
* The project's own title, for labelling it in cross-project search.
|
|
70
|
-
* Written on publish, so it is absent until the project next publishes.
|
|
71
|
-
*/
|
|
72
|
-
name: external_exports.string().optional(),
|
|
73
|
-
/**
|
|
74
|
-
* The project's active publish, used to cache-bust its search index the
|
|
75
|
-
* way a project already busts its own. Absent until it next publishes.
|
|
76
|
-
*/
|
|
77
|
-
publishUid: external_exports.string().optional(),
|
|
78
|
-
/**
|
|
79
|
-
* Present only for sites still served by Typesense. Builds on the jsonl
|
|
80
|
-
* search backend omit it; federated search fetches `${subpath}/search-entries.jsonl`.
|
|
81
|
-
*/
|
|
82
|
-
typesenseConfig: typesenseConfigSchema.optional().nullable()
|
|
83
|
-
}).meta({ id: "subpath" });
|
|
84
|
-
var cloudflareHttpTokenSchema = external_exports.object({
|
|
85
|
-
/** URL path, e.g. `/.well-known/pki-validation/ca3-<id>.txt` */
|
|
86
|
-
path: external_exports.string(),
|
|
87
|
-
/** Plain-text response body the token path must answer with */
|
|
88
|
-
body: external_exports.string()
|
|
89
|
-
}).meta({ id: "cloudflare-http-token" });
|
|
90
|
-
var cloudflareHostnameStateSchema = external_exports.object({
|
|
91
|
-
/** Custom hostname id in the Cloudflare zone */
|
|
92
|
-
hostnameId: external_exports.string(),
|
|
93
|
-
/** Hostname ownership status reported by Cloudflare (pending, active, …) */
|
|
94
|
-
status: external_exports.string(),
|
|
95
|
-
/** Certificate status reported by Cloudflare (pending_validation, active, …) */
|
|
96
|
-
sslStatus: external_exports.string(),
|
|
97
|
-
httpTokens: cloudflareHttpTokenSchema.array().default([]),
|
|
98
|
-
/** Unix seconds of the reconciler run that last wrote this state */
|
|
99
|
-
syncedAt: external_exports.number()
|
|
100
|
-
}).meta({ id: "cloudflare-hostname-state" });
|
|
101
|
-
var siteDeploySchema = entitySchema.extend({
|
|
102
|
-
domain: external_exports.string(),
|
|
103
|
-
teamUid: nanoidSchema,
|
|
104
|
-
projectUid: nanoidSchema,
|
|
105
|
-
/**
|
|
106
|
-
* Title of the project mounted at the domain root.
|
|
107
|
-
*
|
|
108
|
-
* The root project is deliberately not one of `subpaths` — both request
|
|
109
|
-
* matchers resolve by longest path prefix, so a '/' entry would become a
|
|
110
|
-
* catch-all that every request matched. It is denormalized here instead so
|
|
111
|
-
* search can name and scope it without a second lookup.
|
|
112
|
-
*/
|
|
113
|
-
rootName: external_exports.string().optional(),
|
|
114
|
-
subpaths: subpathSchema.array().default([]),
|
|
115
|
-
cloudflare: cloudflareHostnameStateSchema.optional().nullable()
|
|
116
|
-
}).meta({ id: "site-deploy" });
|
|
117
|
-
var searchConfigRootSchema = external_exports.object({
|
|
118
|
-
projectUid: external_exports.string(),
|
|
119
|
-
name: external_exports.string().optional()
|
|
120
|
-
}).meta({ id: "search-config-root" });
|
|
121
|
-
var searchConfigResponseSchema = external_exports.object({
|
|
122
|
-
subpaths: subpathSchema.array(),
|
|
123
|
-
root: searchConfigRootSchema.optional()
|
|
124
|
-
}).meta({ id: "search-config-response" });
|
|
51
|
+
// ../../packages/entities/dist/namespace/schema.js
|
|
52
|
+
var namespaceTombstoneSchema = entitySchema.extend({
|
|
53
|
+
uid: brandedUid().default(mintUid).meta({ default: "nanoid()" }),
|
|
54
|
+
namespace: namespaceSchema,
|
|
55
|
+
/** The team that held the name last. Only this team may claim it again. */
|
|
56
|
+
teamUid: brandedUid(),
|
|
57
|
+
/** Unix seconds at which the team gave the name up. */
|
|
58
|
+
releasedAt: timestampSchema.default(unixTimestamp).meta({ default: "unixTimestamp()" }),
|
|
59
|
+
/** The user whose action released the name. */
|
|
60
|
+
releasedBy: external_exports.string()
|
|
61
|
+
}).meta({ id: "namespace-tombstone" });
|
|
125
62
|
|
|
126
63
|
// ../../packages/entities/dist/user/ban.js
|
|
127
64
|
var bannedUserSchema = entitySchema.extend({
|
|
@@ -139,6 +76,9 @@ var BaseCollections = {
|
|
|
139
76
|
HostingExchange: "hosting-exchange",
|
|
140
77
|
HostingLoginTokens: "hosting-login-tokens",
|
|
141
78
|
HostingOauthStates: "hosting-oauth-states",
|
|
79
|
+
OauthClients: "oauth-clients",
|
|
80
|
+
OauthAuthorizationRequests: "oauth-authorization-requests",
|
|
81
|
+
OauthAuthorizationCodes: "oauth-authorization-codes",
|
|
142
82
|
Passwords: "passwords",
|
|
143
83
|
SignupOtp: "signup-otp",
|
|
144
84
|
GithubUsers: "github-users",
|
|
@@ -165,11 +105,14 @@ var BaseCollections = {
|
|
|
165
105
|
RegistryPublishes: (teamUid) => `team/${teamUid}/registry-publishes`,
|
|
166
106
|
LinkedRepositories: (teamUid) => `team/${teamUid}/repositories`,
|
|
167
107
|
RegistryGitMigrations: "registry-git-migrations",
|
|
108
|
+
NamespaceTombstones: "namespace-tombstones",
|
|
168
109
|
AccessGroups: (teamUid) => `team/${teamUid}/access-groups`,
|
|
169
110
|
LoginPortals: (teamUid) => `team/${teamUid}/login-portals`,
|
|
111
|
+
UserInfoHookSecrets: (teamUid) => `team/${teamUid}/user-info-hook-secrets`,
|
|
170
112
|
Sdks: (teamUid) => `team/${teamUid}/sdks`,
|
|
171
113
|
SdkBuilds: (teamUid) => `team/${teamUid}/sdk-builds`,
|
|
172
114
|
SdkBuildLogs: (teamUid) => `team/${teamUid}/sdk-build-logs`,
|
|
115
|
+
McpServers: (teamUid) => `team/${teamUid}/mcp-servers`,
|
|
173
116
|
PersonalTokens: (userUid) => `user/${userUid}/personal-tokens`,
|
|
174
117
|
IdentityProviders: (teamUid) => `team/${teamUid}/identity-providers`,
|
|
175
118
|
Workspaces: (teamUid) => `team/${teamUid}/workspaces`,
|
|
@@ -181,6 +124,7 @@ var BaseCollections = {
|
|
|
181
124
|
Waitlist: "waitlist",
|
|
182
125
|
BannedUsers: "banned-users"
|
|
183
126
|
};
|
|
127
|
+
var MONGO_PLACEHOLDER_UID = "<uid-0>";
|
|
184
128
|
|
|
185
129
|
// ../../packages/entities/dist/database/edge-cache.js
|
|
186
130
|
var requiredUid = { uid: nanoidSchema };
|
|
@@ -209,6 +153,7 @@ var edgeCacheDeploySchema = siteDeploySchema.omit({ cloudflare: true }).extend(r
|
|
|
209
153
|
var edgeCacheProjectSchema = external_exports.object({
|
|
210
154
|
...requiredUid,
|
|
211
155
|
loginPortalUid: external_exports.string().default(""),
|
|
156
|
+
userInfoHookUrl: external_exports.string().default(""),
|
|
212
157
|
accessGroups: external_exports.array(external_exports.string()).default([]),
|
|
213
158
|
identityProviders: external_exports.string().array().default([]),
|
|
214
159
|
isPrivate: external_exports.boolean().default(false),
|
|
@@ -305,6 +250,7 @@ var edgeCacheCollections = {
|
|
|
305
250
|
projection: {
|
|
306
251
|
uid: 1,
|
|
307
252
|
loginPortalUid: 1,
|
|
253
|
+
userInfoHookUrl: 1,
|
|
308
254
|
accessGroups: 1,
|
|
309
255
|
identityProviders: 1,
|
|
310
256
|
isPrivate: 1,
|
|
@@ -323,6 +269,7 @@ var edgeCacheCollections = {
|
|
|
323
269
|
projection: {
|
|
324
270
|
uid: 1,
|
|
325
271
|
loginPortalUid: 1,
|
|
272
|
+
userInfoHookUrl: 1,
|
|
326
273
|
accessGroups: 1,
|
|
327
274
|
identityProviders: 1,
|
|
328
275
|
isPrivate: 1,
|
|
@@ -341,6 +288,7 @@ var edgeCacheCollections = {
|
|
|
341
288
|
projection: {
|
|
342
289
|
uid: 1,
|
|
343
290
|
loginPortalUid: 1,
|
|
291
|
+
userInfoHookUrl: 1,
|
|
344
292
|
accessGroups: 1,
|
|
345
293
|
identityProviders: 1,
|
|
346
294
|
isPrivate: 1,
|
|
@@ -563,6 +511,9 @@ for (const [key, config] of Object.entries(edgeCacheCollections)) {
|
|
|
563
511
|
prioritiesByTable.set(config.tableName, taken);
|
|
564
512
|
}
|
|
565
513
|
|
|
514
|
+
// ../../packages/entities/dist/database/mcp-domain-holder.js
|
|
515
|
+
var MCP_SERVERS_MONGO_COLLECTION = BaseCollections.McpServers(MONGO_PLACEHOLDER_UID);
|
|
516
|
+
|
|
566
517
|
export {
|
|
567
518
|
BaseCollections
|
|
568
519
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
getAuthData
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QVQ4PNVL.js";
|
|
5
5
|
import {
|
|
6
6
|
config
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UXJ753NV.js";
|
|
8
8
|
import {
|
|
9
9
|
external_exports,
|
|
10
10
|
objectSchema,
|
|
@@ -507,6 +507,8 @@ var sharedProjectSchema = entitySchema.extend({
|
|
|
507
507
|
lastPublishedUid: external_exports.string().nullable().default(null),
|
|
508
508
|
/** Uid of the login portal customization object for private projects */
|
|
509
509
|
loginPortalUid: external_exports.string().default(""),
|
|
510
|
+
/** HTTPS endpoint that enriches signed-in visitors, synced from the site config; empty when unset */
|
|
511
|
+
userInfoHookUrl: external_exports.string().default(""),
|
|
510
512
|
/** Active theme id for the project */
|
|
511
513
|
activeThemeId: external_exports.string().default(""),
|
|
512
514
|
/** Typesense id for the project */
|
|
@@ -682,6 +684,12 @@ var publishRecordSchema = entitySchema.extend({
|
|
|
682
684
|
]),
|
|
683
685
|
deployedAt: external_exports.number().nullable().default(null),
|
|
684
686
|
message: external_exports.string().default(""),
|
|
687
|
+
/**
|
|
688
|
+
* The build succeeded but logged a warning meaning the site is missing
|
|
689
|
+
* something the author expects — an asset, a feed, a registry document.
|
|
690
|
+
* Only meaningful on a deployed publish.
|
|
691
|
+
*/
|
|
692
|
+
hasWarnings: external_exports.boolean().default(false),
|
|
685
693
|
domain: external_exports.string().default(""),
|
|
686
694
|
preview: external_exports.boolean().optional().default(false),
|
|
687
695
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
customProjectIconSchema
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5JLVQVKO.js";
|
|
5
5
|
import {
|
|
6
6
|
brandedUid,
|
|
7
7
|
emailSchema,
|
|
@@ -486,6 +486,7 @@ var teamPermissions = {
|
|
|
486
486
|
};
|
|
487
487
|
|
|
488
488
|
export {
|
|
489
|
+
TeamUserRole,
|
|
489
490
|
roleSchema,
|
|
490
491
|
userRefSchema,
|
|
491
492
|
billingPlanSchema,
|
|
@@ -10,7 +10,7 @@ var DownloadIsolateCommand = () => {
|
|
|
10
10
|
const cmd = new Command("download-isolate");
|
|
11
11
|
cmd.description("Download the docs preview server");
|
|
12
12
|
cmd.action(async () => {
|
|
13
|
-
const { downloadIsolate } = await import("./action-
|
|
13
|
+
const { downloadIsolate } = await import("./action-GWXLHL2Z.js");
|
|
14
14
|
await downloadIsolate();
|
|
15
15
|
});
|
|
16
16
|
return cmd;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// ../../node_modules/.pnpm/@scalar+helpers@0.
|
|
3
|
+
// ../../node_modules/.pnpm/@scalar+helpers@0.15.0/node_modules/@scalar/helpers/dist/types/result.js
|
|
4
4
|
var ok = (data) => ({ ok: true, data });
|
|
5
5
|
var err = (error, message) => ({
|
|
6
6
|
ok: false,
|