@scalar/cli 2.1.0 → 2.5.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 +28 -24
- package/chunks/action-42D2C47G.js +18 -0
- package/chunks/{action-DFKHSDFV.js → action-6FAJNP6C.js} +7 -3
- package/chunks/{action-5R5FDF6S.js → action-6MZZHPVQ.js} +120 -22
- package/chunks/{action-BYZUBXVB.js → action-7H3XARJP.js} +8 -4
- package/chunks/{action-H5OHT2GV.js → action-AMNYOA4B.js} +7 -3
- package/chunks/{action-ANU5HGC4.js → action-DCINFQ57.js} +17 -14
- package/chunks/{action-GB6DM53B.js → action-DGD6Q6Y5.js} +21 -10
- package/chunks/{action-TPBKPHNS.js → action-EPNE5XCM.js} +22 -22
- package/chunks/{action-C5VB4ITT.js → action-FF2OMGAS.js} +36 -18
- package/chunks/{action-Q5UJ32D6.js → action-H3RTILLM.js} +1 -1
- package/chunks/action-HIL5ZFNB.js +84 -0
- package/chunks/{action-MENXFJH3.js → action-HXHBU7XC.js} +9 -9
- package/chunks/{action-F4Y6Q2VB.js → action-LFL3ZZKN.js} +21 -21
- package/chunks/action-LUVBQEIQ.js +250 -0
- package/chunks/{action-TZ5KGAQT.js → action-OILGZAMK.js} +17 -14
- package/chunks/{action-HD2T6BFJ.js → action-OK55BFGM.js} +10 -10
- package/chunks/{action-HNKM3Q65.js → action-P7RFXIC7.js} +17 -14
- package/chunks/action-PAA4NWUJ.js +374 -0
- package/chunks/action-PHLOE27S.js +522 -0
- package/chunks/{action-CYP4VDK3.js → action-RBVPKCRI.js} +12 -35
- package/chunks/action-SJYAMXYI.js +244 -0
- package/chunks/{action-45OGQB2M.js → action-TWHLZW4V.js} +17 -8
- package/chunks/{action-GEBRPNRT.js → action-V5KYG7XD.js} +15 -16
- package/chunks/{action-BNEGJBUH.js → action-W62AIEBN.js} +8 -9
- package/chunks/{action-PVDDRIM6.js → action-X7TZA3RE.js} +65 -26
- package/chunks/{action-CLSD7O2R.js → action-XUQ7TKKJ.js} +10 -10
- package/chunks/{action-BMFXENMX.js → action-Y6CEKYEK.js} +39 -34
- package/chunks/{action-STIEAXOE.js → action-YRWHX2AE.js} +16 -5
- package/chunks/{action-W5BATF4Q.js → action-ZLTUMRO2.js} +24 -24
- package/chunks/{action-UDZUUJSI.js → action-ZWQLQENM.js} +18 -7
- package/chunks/{agent-XGLOHXNA.js → agent-JAXLLDPE.js} +25 -5
- package/chunks/asyncapi-P6Y3L7RG.js +105 -0
- package/chunks/{build.action-LKOILPA6.js → build.action-AZ5ECU4B.js} +22 -22
- package/chunks/chunk-3BWGTPPT.js +27022 -0
- package/chunks/{chunk-ZTVWAKNJ.js → chunk-3DJ2GKEG.js} +1 -1
- package/chunks/chunk-3ZJYGGAA.js +30 -0
- package/chunks/{chunk-IX7LJ3AD.js → chunk-4ORL4MST.js} +2 -3
- package/chunks/{chunk-ASMHW5AY.js → chunk-6ZMT63IV.js} +1 -1
- package/chunks/{chunk-B6QZJWCQ.js → chunk-B2MHTD3R.js} +4 -6
- package/chunks/{chunk-P646T2WH.js → chunk-CIFOFSZ3.js} +131 -13
- package/chunks/chunk-CX7ZRMTC.js +404 -0
- package/chunks/{chunk-HQKBZOYU.js → chunk-FOKFF4EP.js} +3 -3
- package/chunks/{chunk-UPUTMFD4.js → chunk-FQVVKQPU.js} +185 -13
- package/chunks/{chunk-P2VH7DOC.js → chunk-HUCR333E.js} +6 -6
- package/chunks/{chunk-KWOL7A6J.js → chunk-HXIDUCSZ.js} +2 -2
- package/chunks/{chunk-H2WRMLYY.js → chunk-IKT5F47M.js} +3571 -7
- package/chunks/{chunk-OAXFCOJV.js → chunk-JV7TUEXQ.js} +2 -1
- package/chunks/{chunk-2BSG2QHO.js → chunk-KEOCJ3NJ.js} +133 -20
- package/chunks/{chunk-AHWWJ3MD.js → chunk-LCPFHE4Z.js} +1 -1
- package/chunks/{chunk-TLFMATXR.js → chunk-LQN4S62O.js} +33 -25
- package/chunks/chunk-M622VXRQ.js +14 -0
- package/chunks/chunk-M6Q3ARBV.js +210 -0
- package/chunks/{chunk-4QS7SJTG.js → chunk-MNLXYOVF.js} +51 -36
- package/chunks/{chunk-5BISXQX4.js → chunk-NIXG4KDE.js} +11 -13
- package/chunks/{chunk-47Y4L5IT.js → chunk-NNMSZVAB.js} +1031 -481
- package/chunks/chunk-OQKDBLOZ.js +741 -0
- package/chunks/{chunk-NUXPNUSS.js → chunk-RAO7VUGM.js} +1 -1
- package/chunks/{chunk-SHSHFGA7.js → chunk-RPVHJMQT.js} +4 -6
- package/chunks/{chunk-23I5PKZZ.js → chunk-SWWWYWHC.js} +32 -5
- package/chunks/{chunk-X4QLDBB5.js → chunk-T5HJUAWB.js} +24 -3
- package/chunks/chunk-TYLWJ2UL.js +25 -0
- package/chunks/{chunk-SXYALPYK.js → chunk-UB3XGOUW.js} +498 -60
- package/chunks/{chunk-TQ5XC2E3.js → chunk-UMPODUJO.js} +77 -11
- package/chunks/{chunk-4DGQIAJX.js → chunk-VNYE4R7N.js} +154 -14
- package/chunks/{create.action-FFQLBSJH.js → create.action-34OTO2SB.js} +22 -22
- package/chunks/{delete.action-QNN3LC2F.js → delete.action-6LRT4M3S.js} +22 -22
- package/chunks/{delete.action-STHQHP4F.js → delete.action-ZYXFMIOW.js} +22 -22
- package/chunks/{get.action-OTKYOP3Z.js → get.action-XP36SA2J.js} +15 -16
- package/chunks/{list.action-KDM5RHEH.js → list.action-6LF6KSD5.js} +19 -19
- package/chunks/{list.action-6I5EZAVB.js → list.action-WVRVLX5E.js} +22 -22
- package/chunks/{publish.action-PODTVRXS.js → publish.action-AHFUBT5C.js} +44 -36
- package/chunks/{update.action-KMD4ZM75.js → update.action-YQTVUDYE.js} +22 -22
- package/chunks/{update.action-4F6STTEQ.js → update.action-ZREAFJVG.js} +22 -22
- package/docs.html +107 -104
- package/index.js +84 -68
- package/package.json +19 -15
- package/chunks/action-CCW66QJN.js +0 -72
- package/chunks/action-CQ56FVES.js +0 -65
- package/chunks/action-JOSVV6YA.js +0 -71
- package/chunks/action-P7LN6FGY.js +0 -13
- package/chunks/action-R6ZZO26F.js +0 -299
- package/chunks/action-TWFJNQ2R.js +0 -95
- package/chunks/chunk-5BPPGTUU.js +0 -463
- package/chunks/chunk-DOVIWNKQ.js +0 -108
- package/chunks/chunk-ISGLWBXZ.js +0 -4265
- package/chunks/chunk-T7MDADON.js +0 -17
- package/chunks/chunk-VTYTPSXO.js +0 -161
|
@@ -17,7 +17,8 @@ var config = {
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
cdnUrl: process.env.CDN_URL ?? "https://cdn.scalar.com",
|
|
20
|
-
|
|
20
|
+
publishTld: process.env.PUBLISH_TLD ?? ((URL.parse(process.env.BASE_URL ?? "", "https://services.scalar.com")?.hostname ?? "services.scalar.com") === "services.scalar.com" ? "apidocumentation.com" : "staging-apidocumentation.com"),
|
|
21
|
+
ssgDocsIsolateVersion: process.env.SSG_DOCS_ISOLATE_VERSION ?? "1.6.3"
|
|
21
22
|
};
|
|
22
23
|
|
|
23
24
|
export {
|
|
@@ -5,32 +5,35 @@ import {
|
|
|
5
5
|
loginPortalSchema,
|
|
6
6
|
managedSchema,
|
|
7
7
|
workspaceSchema
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FQVVKQPU.js";
|
|
9
9
|
import {
|
|
10
10
|
userSchema
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-B2MHTD3R.js";
|
|
12
12
|
import {
|
|
13
13
|
sdkSchema
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import {
|
|
16
|
-
managedDocSchema,
|
|
17
|
-
ruleSchema
|
|
18
|
-
} from "./chunk-4QS7SJTG.js";
|
|
14
|
+
} from "./chunk-3BWGTPPT.js";
|
|
19
15
|
import {
|
|
20
16
|
teamSchema
|
|
21
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VNYE4R7N.js";
|
|
22
18
|
import {
|
|
23
19
|
activeDeploymentSchema,
|
|
24
|
-
emailSchema,
|
|
25
|
-
entitySchema,
|
|
26
|
-
nanoidSchema,
|
|
27
20
|
publishRecordSchema,
|
|
28
21
|
themeSchema
|
|
29
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-OQKDBLOZ.js";
|
|
30
23
|
import {
|
|
24
|
+
managedDocSchema,
|
|
25
|
+
ruleSchema
|
|
26
|
+
} from "./chunk-MNLXYOVF.js";
|
|
27
|
+
import {
|
|
28
|
+
docVersionRecordSchema
|
|
29
|
+
} from "./chunk-CX7ZRMTC.js";
|
|
30
|
+
import {
|
|
31
|
+
emailSchema,
|
|
32
|
+
entitySchema,
|
|
31
33
|
external_exports,
|
|
34
|
+
nanoidSchema,
|
|
32
35
|
zod_default
|
|
33
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-IKT5F47M.js";
|
|
34
37
|
|
|
35
38
|
// ../../packages/entities/dist/admins/index.js
|
|
36
39
|
var scalarAdminSchema = entitySchema.extend({
|
|
@@ -62,20 +65,62 @@ var typesenseConfigSchema = external_exports.object({
|
|
|
62
65
|
var subpathSchema = external_exports.object({
|
|
63
66
|
subpath: external_exports.string(),
|
|
64
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(),
|
|
65
78
|
/**
|
|
66
79
|
* Present only for sites still served by Typesense. Builds on the jsonl
|
|
67
80
|
* search backend omit it; federated search fetches `${subpath}/search-entries.jsonl`.
|
|
68
81
|
*/
|
|
69
82
|
typesenseConfig: typesenseConfigSchema.optional().nullable()
|
|
70
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" });
|
|
71
101
|
var siteDeploySchema = entitySchema.extend({
|
|
72
102
|
domain: external_exports.string(),
|
|
73
103
|
teamUid: nanoidSchema,
|
|
74
104
|
projectUid: nanoidSchema,
|
|
75
|
-
|
|
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()
|
|
76
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" });
|
|
77
121
|
var searchConfigResponseSchema = external_exports.object({
|
|
78
|
-
subpaths: subpathSchema.array()
|
|
122
|
+
subpaths: subpathSchema.array(),
|
|
123
|
+
root: searchConfigRootSchema.optional()
|
|
79
124
|
}).meta({ id: "search-config-response" });
|
|
80
125
|
|
|
81
126
|
// ../../packages/entities/dist/user/ban.js
|
|
@@ -110,9 +155,15 @@ var BaseCollections = {
|
|
|
110
155
|
Themes: (teamUid) => `team/${teamUid}/themes`,
|
|
111
156
|
PublishRecords: (teamUid) => `team/${teamUid}/publish`,
|
|
112
157
|
ManagedDocs: (teamUid) => `team/${teamUid}/managed-docs`,
|
|
158
|
+
ManagedDocInstances: (teamUid, docUid) => `team/${teamUid}/managed-docs/${docUid}/instances`,
|
|
159
|
+
ManagedDocVersions: (teamUid, docUid) => `team/${teamUid}/managed-docs/${docUid}/versions`,
|
|
113
160
|
ManagedSchemas: (teamUid) => `team/${teamUid}/managed-schemas`,
|
|
161
|
+
ManagedSchemaInstances: (teamUid, schemaUid) => `team/${teamUid}/managed-schemas/${schemaUid}/instances`,
|
|
162
|
+
ManagedSchemaVersions: (teamUid, schemaUid) => `team/${teamUid}/managed-schemas/${schemaUid}/versions`,
|
|
114
163
|
Rules: (teamUid) => `team/${teamUid}/rules`,
|
|
164
|
+
RuleInstances: (teamUid, ruleUid) => `team/${teamUid}/rules/${ruleUid}/instances`,
|
|
115
165
|
RegistryPublishes: (teamUid) => `team/${teamUid}/registry-publishes`,
|
|
166
|
+
LinkedRepositories: (teamUid) => `team/${teamUid}/repositories`,
|
|
116
167
|
RegistryGitMigrations: "registry-git-migrations",
|
|
117
168
|
AccessGroups: (teamUid) => `team/${teamUid}/access-groups`,
|
|
118
169
|
LoginPortals: (teamUid) => `team/${teamUid}/login-portals`,
|
|
@@ -122,6 +173,10 @@ var BaseCollections = {
|
|
|
122
173
|
PersonalTokens: (userUid) => `user/${userUid}/personal-tokens`,
|
|
123
174
|
IdentityProviders: (teamUid) => `team/${teamUid}/identity-providers`,
|
|
124
175
|
Workspaces: (teamUid) => `team/${teamUid}/workspaces`,
|
|
176
|
+
WebhookSubscriptions: (teamUid) => `team/${teamUid}/webhook-subscriptions`,
|
|
177
|
+
WebhookDeliveries: (teamUid) => `team/${teamUid}/webhook-deliveries`,
|
|
178
|
+
WebhookSecrets: (teamUid) => `team/${teamUid}/webhook-secrets`,
|
|
179
|
+
WebhookEventClaims: "webhook-event-claims",
|
|
125
180
|
OauthStates: "oauth-states",
|
|
126
181
|
Waitlist: "waitlist",
|
|
127
182
|
BannedUsers: "banned-users"
|
|
@@ -150,7 +205,7 @@ function generateRegistryPath(entity) {
|
|
|
150
205
|
function teamUidFromPath(path) {
|
|
151
206
|
return path.split("/").at(1) ?? "";
|
|
152
207
|
}
|
|
153
|
-
var edgeCacheDeploySchema = siteDeploySchema.extend(requiredUid);
|
|
208
|
+
var edgeCacheDeploySchema = siteDeploySchema.omit({ cloudflare: true }).extend(requiredUid);
|
|
154
209
|
var edgeCacheProjectSchema = external_exports.object({
|
|
155
210
|
...requiredUid,
|
|
156
211
|
loginPortalUid: external_exports.string().default(""),
|
|
@@ -179,10 +234,15 @@ var edgeCacheApiSchema = managedDocSchema.pick({
|
|
|
179
234
|
...registryRequiredFields,
|
|
180
235
|
theme: true,
|
|
181
236
|
version: true,
|
|
182
|
-
|
|
237
|
+
latestVersion: true,
|
|
183
238
|
agentEnabled: true
|
|
184
239
|
}).extend(entityExtension).transform(generateRegistryPath);
|
|
185
|
-
var edgeCacheSchemaSchema = managedSchema.pick({ ...registryRequiredFields, version: true
|
|
240
|
+
var edgeCacheSchemaSchema = managedSchema.pick({ ...registryRequiredFields, version: true }).extend(entityExtension).transform(generateRegistryPath);
|
|
241
|
+
var edgeCacheDocVersionSchema = docVersionRecordSchema.pick({
|
|
242
|
+
uid: true,
|
|
243
|
+
version: true,
|
|
244
|
+
upgraded: true
|
|
245
|
+
}).extend({ ...requiredUid, _path: external_exports.string() });
|
|
186
246
|
var edgeCacheRuleSchema = ruleSchema.pick(registryRequiredFields).extend(entityExtension).transform(generateRegistryPath);
|
|
187
247
|
var edgeCacheSdkSchema = sdkSchema.pick({ ...registryRequiredFields, versions: true, targets: true }).extend(entityExtension).transform(generateRegistryPath);
|
|
188
248
|
var edgeCacheWorkspaceSchema = workspaceSchema.pick({ ...registryRequiredFields, version: true, versions: true }).extend(entityExtension).transform(generateRegistryPath);
|
|
@@ -241,6 +301,7 @@ var edgeCacheCollections = {
|
|
|
241
301
|
tableName: PROJECT_TABLE,
|
|
242
302
|
mongoCollection: BaseCollections.Projects,
|
|
243
303
|
source: "project",
|
|
304
|
+
priority: 2,
|
|
244
305
|
projection: {
|
|
245
306
|
uid: 1,
|
|
246
307
|
loginPortalUid: 1,
|
|
@@ -258,6 +319,7 @@ var edgeCacheCollections = {
|
|
|
258
319
|
tableName: PROJECT_TABLE,
|
|
259
320
|
mongoCollection: BaseCollections.GithubProjects,
|
|
260
321
|
source: "github",
|
|
322
|
+
priority: 1,
|
|
261
323
|
projection: {
|
|
262
324
|
uid: 1,
|
|
263
325
|
loginPortalUid: 1,
|
|
@@ -275,6 +337,7 @@ var edgeCacheCollections = {
|
|
|
275
337
|
tableName: PROJECT_TABLE,
|
|
276
338
|
mongoCollection: BaseCollections.DocsProjects,
|
|
277
339
|
source: "docs",
|
|
340
|
+
priority: 3,
|
|
278
341
|
projection: {
|
|
279
342
|
uid: 1,
|
|
280
343
|
loginPortalUid: 1,
|
|
@@ -310,7 +373,7 @@ var edgeCacheCollections = {
|
|
|
310
373
|
_path: 1,
|
|
311
374
|
_registryPath: 1,
|
|
312
375
|
version: 1,
|
|
313
|
-
|
|
376
|
+
latestVersion: 1,
|
|
314
377
|
agentEnabled: 1
|
|
315
378
|
}
|
|
316
379
|
}),
|
|
@@ -328,11 +391,42 @@ var edgeCacheCollections = {
|
|
|
328
391
|
isPrivate: 1,
|
|
329
392
|
accessGroups: 1,
|
|
330
393
|
version: 1,
|
|
331
|
-
versions: 1,
|
|
332
394
|
_path: 1,
|
|
333
395
|
_registryPath: 1
|
|
334
396
|
}
|
|
335
397
|
}),
|
|
398
|
+
// The versions collections are pseudo-nested under each document, so their
|
|
399
|
+
// physical Mongo collection names carry two uid placeholders (see
|
|
400
|
+
// collectionNameFromPath in mongobase) — written as static patterns here
|
|
401
|
+
// because the config's function form substitutes only the first uid.
|
|
402
|
+
apiVersion: defineCollection({
|
|
403
|
+
schema: edgeCacheDocVersionSchema,
|
|
404
|
+
indexFields: ["_path", "version"],
|
|
405
|
+
tableName: "docVersion",
|
|
406
|
+
mongoCollection: "team/<uid-0>/managed-docs/<uid-1>/versions",
|
|
407
|
+
source: "api",
|
|
408
|
+
priority: 2,
|
|
409
|
+
projection: {
|
|
410
|
+
uid: 1,
|
|
411
|
+
version: 1,
|
|
412
|
+
upgraded: 1,
|
|
413
|
+
_path: 1
|
|
414
|
+
}
|
|
415
|
+
}),
|
|
416
|
+
schemaVersion: defineCollection({
|
|
417
|
+
schema: edgeCacheDocVersionSchema,
|
|
418
|
+
indexFields: ["_path", "version"],
|
|
419
|
+
tableName: "docVersion",
|
|
420
|
+
mongoCollection: "team/<uid-0>/managed-schemas/<uid-1>/versions",
|
|
421
|
+
source: "schema",
|
|
422
|
+
priority: 1,
|
|
423
|
+
projection: {
|
|
424
|
+
uid: 1,
|
|
425
|
+
version: 1,
|
|
426
|
+
upgraded: 1,
|
|
427
|
+
_path: 1
|
|
428
|
+
}
|
|
429
|
+
}),
|
|
336
430
|
rule: defineCollection({
|
|
337
431
|
schema: edgeCacheRuleSchema,
|
|
338
432
|
indexFields: ["_registryPath"],
|
|
@@ -449,6 +543,25 @@ for (const [key, config] of Object.entries(edgeCacheCollections)) {
|
|
|
449
543
|
}
|
|
450
544
|
sourcesByTable.set(`${config.tableName}:${config.source}`, key);
|
|
451
545
|
}
|
|
546
|
+
var prioritiesByTable = /* @__PURE__ */ new Map();
|
|
547
|
+
for (const [key, config] of Object.entries(edgeCacheCollections)) {
|
|
548
|
+
const shared = sharedTables.has(config.tableName);
|
|
549
|
+
if (shared && config.priority === void 0) {
|
|
550
|
+
throw new Error(`Edge-cache collection "${key}" shares table "${config.tableName}" but declares no priority.`);
|
|
551
|
+
}
|
|
552
|
+
if (!shared && config.priority !== void 0) {
|
|
553
|
+
throw new Error(`Edge-cache collection "${key}" declares a priority but does not share table "${config.tableName}".`);
|
|
554
|
+
}
|
|
555
|
+
if (config.priority === void 0)
|
|
556
|
+
continue;
|
|
557
|
+
const taken = prioritiesByTable.get(config.tableName) ?? /* @__PURE__ */ new Map();
|
|
558
|
+
const holder = taken.get(config.priority);
|
|
559
|
+
if (holder) {
|
|
560
|
+
throw new Error(`Edge-cache collections "${holder}" and "${key}" both use priority ${config.priority} on table "${config.tableName}".`);
|
|
561
|
+
}
|
|
562
|
+
taken.set(config.priority, key);
|
|
563
|
+
prioritiesByTable.set(config.tableName, taken);
|
|
564
|
+
}
|
|
452
565
|
|
|
453
566
|
export {
|
|
454
567
|
BaseCollections
|
|
@@ -20,7 +20,7 @@ function BundleCommand() {
|
|
|
20
20
|
"Maximum number of URLs to fetch during bundling at the same time"
|
|
21
21
|
);
|
|
22
22
|
cmd.action(async (...args) => {
|
|
23
|
-
const { bundleAction } = await import("./action-
|
|
23
|
+
const { bundleAction } = await import("./action-7H3XARJP.js");
|
|
24
24
|
return bundleAction(...args);
|
|
25
25
|
});
|
|
26
26
|
return cmd;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
docVersionSchema,
|
|
4
|
+
external_exports,
|
|
4
5
|
namespaceSchema,
|
|
5
6
|
nanoidSchema,
|
|
6
|
-
slugSchema
|
|
7
|
-
} from "./chunk-ISGLWBXZ.js";
|
|
8
|
-
import {
|
|
9
|
-
external_exports,
|
|
7
|
+
slugSchema,
|
|
10
8
|
zod_default
|
|
11
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IKT5F47M.js";
|
|
12
10
|
|
|
13
11
|
// ../../packages/entities/dist/agent/embed.js
|
|
14
12
|
var embedStatuses = ["pending", "success", "failed"];
|
|
@@ -106,6 +104,9 @@ var mcpServerSchema = external_exports.object({
|
|
|
106
104
|
teamUid: external_exports.string(),
|
|
107
105
|
name: external_exports.string(),
|
|
108
106
|
slug: slugSchema,
|
|
107
|
+
// Missing key parses to false, so a dashboard bundle keeps parsing agent
|
|
108
|
+
// responses that predate this column, whichever side deploys first.
|
|
109
|
+
autoAddOperations: external_exports.boolean().default(false),
|
|
109
110
|
createdAt: external_exports.string(),
|
|
110
111
|
updatedAt: external_exports.string()
|
|
111
112
|
}).meta({ id: "mcp-server" });
|
|
@@ -138,6 +139,8 @@ var mcpServerOperationToolSchema = external_exports.object({
|
|
|
138
139
|
curatedToolEnabled: external_exports.boolean(),
|
|
139
140
|
name: external_exports.string().nullable(),
|
|
140
141
|
description: external_exports.string().nullable(),
|
|
142
|
+
deprecated: external_exports.boolean(),
|
|
143
|
+
deprecationMessage: external_exports.string().nullable(),
|
|
141
144
|
createdAt: external_exports.string(),
|
|
142
145
|
updatedAt: external_exports.string()
|
|
143
146
|
}).meta({
|
|
@@ -244,7 +247,9 @@ var mcpInstallationSchema = external_exports.object({
|
|
|
244
247
|
accessGroups: external_exports.array(external_exports.string()).default([]),
|
|
245
248
|
loginPortalUid: external_exports.string().nullable().default(null),
|
|
246
249
|
authConfig: mcpAuthConfigSchema.default({}),
|
|
247
|
-
mcpVersion: external_exports.string().nullable().default(null)
|
|
250
|
+
mcpVersion: external_exports.string().nullable().default(null),
|
|
251
|
+
piiRedactionEnabled: external_exports.boolean().default(false),
|
|
252
|
+
credentialRedactionEnabled: external_exports.boolean().default(false)
|
|
248
253
|
}).meta({ id: "mcp-installation" });
|
|
249
254
|
|
|
250
255
|
// ../../packages/entities/dist/agent/monthly-usage.js
|
|
@@ -268,25 +273,6 @@ var monthlyUsageSchema = zod_default.object({
|
|
|
268
273
|
microCredits: zod_default.coerce.number()
|
|
269
274
|
}).meta({ id: "monthly-usage" });
|
|
270
275
|
|
|
271
|
-
// ../../node_modules/.pnpm/@scalar+helpers@0.9.2/node_modules/@scalar/helpers/dist/http/http-methods.js
|
|
272
|
-
var HTTP_METHODS = ["delete", "get", "head", "options", "patch", "post", "put", "trace"];
|
|
273
|
-
var httpMethods = Object.freeze(new Set(HTTP_METHODS));
|
|
274
|
-
|
|
275
|
-
// ../../packages/entities/dist/agent/operation.js
|
|
276
|
-
var methodSchema = zod_default.enum(HTTP_METHODS).meta({ id: "method" });
|
|
277
|
-
var operationSchema = zod_default.object({
|
|
278
|
-
id: zod_default.uuid(),
|
|
279
|
-
path: zod_default.string(),
|
|
280
|
-
method: methodSchema,
|
|
281
|
-
versionId: zod_default.uuid(),
|
|
282
|
-
embedding: zod_default.number().array(),
|
|
283
|
-
searchToolEnabled: zod_default.boolean(),
|
|
284
|
-
executeRequestToolEnabled: zod_default.boolean(),
|
|
285
|
-
operationId: zod_default.string().nullable(),
|
|
286
|
-
summary: zod_default.string().nullable(),
|
|
287
|
-
description: zod_default.string().nullable()
|
|
288
|
-
}).meta({ id: "operation" });
|
|
289
|
-
|
|
290
276
|
// ../../packages/entities/dist/agent/document.js
|
|
291
277
|
var documentSchema = zod_default.object({
|
|
292
278
|
id: zod_default.uuid(),
|
|
@@ -312,6 +298,27 @@ var keyDocumentSchema = zod_default.object({
|
|
|
312
298
|
documentId: zod_default.uuid()
|
|
313
299
|
}).meta({ id: "key-documents" });
|
|
314
300
|
|
|
301
|
+
// ../../node_modules/.pnpm/@scalar+helpers@0.12.0/node_modules/@scalar/helpers/dist/http/http-methods.js
|
|
302
|
+
var HTTP_METHODS = ["delete", "get", "head", "options", "patch", "post", "put", "query", "trace"];
|
|
303
|
+
var httpMethods = Object.freeze(new Set(HTTP_METHODS));
|
|
304
|
+
|
|
305
|
+
// ../../packages/entities/dist/agent/operation.js
|
|
306
|
+
var methodSchema = zod_default.enum(HTTP_METHODS).meta({ id: "method" });
|
|
307
|
+
var operationSchema = zod_default.object({
|
|
308
|
+
id: zod_default.uuid(),
|
|
309
|
+
path: zod_default.string(),
|
|
310
|
+
method: methodSchema,
|
|
311
|
+
versionId: zod_default.uuid(),
|
|
312
|
+
embedding: zod_default.number().array(),
|
|
313
|
+
searchToolEnabled: zod_default.boolean(),
|
|
314
|
+
executeRequestToolEnabled: zod_default.boolean(),
|
|
315
|
+
operationId: zod_default.string().nullable(),
|
|
316
|
+
summary: zod_default.string().nullable(),
|
|
317
|
+
description: zod_default.string().nullable()
|
|
318
|
+
}).meta({ id: "operation" });
|
|
319
|
+
var UNEXECUTABLE_HTTP_METHODS = ["connect", "trace", "track"];
|
|
320
|
+
var unexecutableLookup = new Set(UNEXECUTABLE_HTTP_METHODS);
|
|
321
|
+
|
|
315
322
|
// ../../packages/entities/dist/agent/version.js
|
|
316
323
|
var versionSchema = zod_default.object({
|
|
317
324
|
id: zod_default.uuid(),
|
|
@@ -340,5 +347,6 @@ export {
|
|
|
340
347
|
mcpAuthConfigSchema,
|
|
341
348
|
mcpInstallationSchema,
|
|
342
349
|
monthlyUsageSchema,
|
|
350
|
+
HTTP_METHODS,
|
|
343
351
|
methodSchema
|
|
344
352
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// ../../node_modules/.pnpm/@scalar+helpers@0.12.0/node_modules/@scalar/helpers/dist/types/result.js
|
|
4
|
+
var ok = (data) => ({ ok: true, data });
|
|
5
|
+
var err = (error, message) => ({
|
|
6
|
+
ok: false,
|
|
7
|
+
error,
|
|
8
|
+
message
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
ok,
|
|
13
|
+
err
|
|
14
|
+
};
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
RegistryAsset
|
|
4
|
+
} from "./chunk-MNLXYOVF.js";
|
|
5
|
+
import {
|
|
6
|
+
contentShaSchema
|
|
7
|
+
} from "./chunk-CX7ZRMTC.js";
|
|
8
|
+
import {
|
|
9
|
+
docVersionSchema,
|
|
10
|
+
external_exports,
|
|
11
|
+
namespaceSchema
|
|
12
|
+
} from "./chunk-IKT5F47M.js";
|
|
13
|
+
|
|
14
|
+
// ../../packages/urls/dist/registry/path-generators.js
|
|
15
|
+
function versionFormat(version) {
|
|
16
|
+
if (!version || version === "latest")
|
|
17
|
+
return "latest";
|
|
18
|
+
return docVersionSchema.parse(version);
|
|
19
|
+
}
|
|
20
|
+
function filetypeFormat(filetype) {
|
|
21
|
+
return filetype ? external_exports.enum(["yaml", "json", "zip"]).parse(filetype) : "yaml";
|
|
22
|
+
}
|
|
23
|
+
function registryFormat(format) {
|
|
24
|
+
return external_exports.enum(["yaml", "json", "preview"]).parse(format);
|
|
25
|
+
}
|
|
26
|
+
var pagesSha = (sha) => contentShaSchema.parse(sha);
|
|
27
|
+
var pageChunkFile = (entryId) => {
|
|
28
|
+
const id = external_exports.string().min(1, "Page chunk entry id must not be empty").parse(entryId);
|
|
29
|
+
return `${encodeURIComponent(id)}.json`;
|
|
30
|
+
};
|
|
31
|
+
var MAX_OBJECT_NAME_BYTES = 1024;
|
|
32
|
+
var withinObjectNameLimit = (key, entryId) => {
|
|
33
|
+
const bytes = new TextEncoder().encode(key).length;
|
|
34
|
+
if (bytes > MAX_OBJECT_NAME_BYTES) {
|
|
35
|
+
throw new Error(`Page chunk key is ${bytes} bytes, over the ${MAX_OBJECT_NAME_BYTES}-byte object name limit, for entry id "${entryId}"`);
|
|
36
|
+
}
|
|
37
|
+
return key;
|
|
38
|
+
};
|
|
39
|
+
function buildAsset(namespace, asset, slug) {
|
|
40
|
+
return {
|
|
41
|
+
/**
|
|
42
|
+
* Get registry record path.
|
|
43
|
+
*
|
|
44
|
+
* Registry collection records have a base resource path
|
|
45
|
+
* with the primary registry item metadata: namespace,
|
|
46
|
+
* asset type and slug.
|
|
47
|
+
*
|
|
48
|
+
* @example scalar/apis/scalar-galaxy
|
|
49
|
+
*/
|
|
50
|
+
path: () => {
|
|
51
|
+
return `${namespace}/${asset}/${slug}`;
|
|
52
|
+
},
|
|
53
|
+
/**
|
|
54
|
+
* Get registry GCS file storage path
|
|
55
|
+
*
|
|
56
|
+
* Unlike registry record paths, storage paths contain the version
|
|
57
|
+
* of a registry item, and the respective file type.
|
|
58
|
+
*
|
|
59
|
+
* @example scalar/apis/scalar-galaxy/1.0.0.json
|
|
60
|
+
*/
|
|
61
|
+
file: (opts) => {
|
|
62
|
+
return `${namespace}/${asset}/${slug}/${opts?.build || versionFormat(opts?.version)}${opts?.upgraded ? "_upgraded" : ""}${opts?.variant === "processed" ? "_processed" : ""}.${filetypeFormat(opts?.type)}`;
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* Get registry GCS folder storage path
|
|
66
|
+
*
|
|
67
|
+
* @example scalar/apis/scalar-galaxy
|
|
68
|
+
*/
|
|
69
|
+
folder: (opts) => {
|
|
70
|
+
return `${namespace}/${asset}/${slug}${opts?.version ? `/${opts.version}` : ""}`;
|
|
71
|
+
},
|
|
72
|
+
/**
|
|
73
|
+
* Content-addressed blob path for an immutable content instance. Blobs are
|
|
74
|
+
* write-once — the sha in the key is the SHA-256 of the exact bytes stored,
|
|
75
|
+
* so identical content dedupes to the same object and nothing at this path
|
|
76
|
+
* is ever overwritten.
|
|
77
|
+
*
|
|
78
|
+
* The optional `variant` keys derived artifacts next to the content they
|
|
79
|
+
* derive from: `_processed` (SDK overlay output) and `_upgraded`
|
|
80
|
+
* (normalized OpenAPI) share the source content's json sha, so a variant
|
|
81
|
+
* object is immutable for the same reason the content blob is.
|
|
82
|
+
*
|
|
83
|
+
* @example scalar/apis/scalar-galaxy/blobs/2f7a...c9.json
|
|
84
|
+
* @example scalar/apis/scalar-galaxy/blobs/2f7a...c9_processed.json
|
|
85
|
+
*/
|
|
86
|
+
blob: (opts) => {
|
|
87
|
+
const sha = external_exports.string().regex(/^[a-f0-9]{64}$/, "Blob sha must be a sha-256 hex digest").parse(opts.sha);
|
|
88
|
+
const variant = opts.variant ? `_${opts.variant}` : "";
|
|
89
|
+
return `${namespace}/${asset}/${slug}/blobs/${sha}${variant}.${filetypeFormat(opts.type)}`;
|
|
90
|
+
},
|
|
91
|
+
/**
|
|
92
|
+
* Prefix holding the per-page sidecar derived from one content instance:
|
|
93
|
+
* a manifest, a models bundle and one chunk per navigation entry.
|
|
94
|
+
*
|
|
95
|
+
* Deliberately beside `blobs/`, not inside it. {@link copyBlobsFolder}
|
|
96
|
+
* copies the whole `blobs/` prefix on every resource rename, twice and with
|
|
97
|
+
* unbounded concurrency; a sidecar contributes roughly ten thousand objects
|
|
98
|
+
* per sha, which would turn a rename into tens of thousands of concurrent
|
|
99
|
+
* copies. `pages/` is instead deleted with the resource and regenerated
|
|
100
|
+
* lazily under the new path, where the cost is one rebuild rather than a
|
|
101
|
+
* rename that may not finish.
|
|
102
|
+
*
|
|
103
|
+
* @example scalar/apis/scalar-galaxy/pages/2f7a...c9/
|
|
104
|
+
*/
|
|
105
|
+
pagesPrefix: (opts) => {
|
|
106
|
+
return `${namespace}/${asset}/${slug}/pages/${pagesSha(opts.sha)}/`;
|
|
107
|
+
},
|
|
108
|
+
/**
|
|
109
|
+
* The sidecar's index: the stripped base document, the navigation tree and
|
|
110
|
+
* the entry table. Written last, so its presence is what marks a sidecar
|
|
111
|
+
* complete.
|
|
112
|
+
*
|
|
113
|
+
* @example scalar/apis/scalar-galaxy/pages/2f7a...c9/manifest.json
|
|
114
|
+
*/
|
|
115
|
+
pagesManifest: (opts) => {
|
|
116
|
+
return `${namespace}/${asset}/${slug}/pages/${pagesSha(opts.sha)}/manifest.json`;
|
|
117
|
+
},
|
|
118
|
+
/**
|
|
119
|
+
* Every component schema of the sidecar, in one object. Split out of the
|
|
120
|
+
* manifest because the sidebar only needs it once a reader opens Models.
|
|
121
|
+
*
|
|
122
|
+
* @example scalar/apis/scalar-galaxy/pages/2f7a...c9/models.json
|
|
123
|
+
*/
|
|
124
|
+
pagesModels: (opts) => {
|
|
125
|
+
return `${namespace}/${asset}/${slug}/pages/${pagesSha(opts.sha)}/models.json`;
|
|
126
|
+
},
|
|
127
|
+
/**
|
|
128
|
+
* One navigation entry's chunk — the slice of the document that entry's
|
|
129
|
+
* page renders, merged onto the manifest's stripped base document.
|
|
130
|
+
*
|
|
131
|
+
* @example scalar/apis/scalar-galaxy/pages/2f7a...c9/chunks/tag%2Fplanets%2Fget%2Fplanets.json
|
|
132
|
+
*/
|
|
133
|
+
pageChunk: (opts) => {
|
|
134
|
+
return withinObjectNameLimit(`${namespace}/${asset}/${slug}/pages/${pagesSha(opts.sha)}/chunks/${pageChunkFile(opts.entryId)}`, opts.entryId);
|
|
135
|
+
},
|
|
136
|
+
/**
|
|
137
|
+
* Claim marker for a sidecar being built. Created with
|
|
138
|
+
* `ifGenerationMatch: 0` so exactly one producer wins across the fleet, and
|
|
139
|
+
* deleted when the job settles.
|
|
140
|
+
*
|
|
141
|
+
* Mutable, unlike everything else under the prefix: it is written, read for
|
|
142
|
+
* its age and removed within one build. See {@link planPagesCacheControl}
|
|
143
|
+
* in `@scalar-org/entities/registry` for what that means for serving.
|
|
144
|
+
*
|
|
145
|
+
* @example scalar/apis/scalar-galaxy/pages/2f7a...c9/preparing.json
|
|
146
|
+
*/
|
|
147
|
+
pagesPreparing: (opts) => {
|
|
148
|
+
return `${namespace}/${asset}/${slug}/pages/${pagesSha(opts.sha)}/preparing.json`;
|
|
149
|
+
},
|
|
150
|
+
/**
|
|
151
|
+
* Records that building this sha's sidecar failed, so a reader is told so
|
|
152
|
+
* instead of polling a job that will not finish. Cleared by a rebuild, so
|
|
153
|
+
* it is mutable in the same way the claim marker is.
|
|
154
|
+
*
|
|
155
|
+
* @example scalar/apis/scalar-galaxy/pages/2f7a...c9/failed.json
|
|
156
|
+
*/
|
|
157
|
+
pagesFailed: (opts) => {
|
|
158
|
+
return `${namespace}/${asset}/${slug}/pages/${pagesSha(opts.sha)}/failed.json`;
|
|
159
|
+
},
|
|
160
|
+
/**
|
|
161
|
+
* Get a full standardized registry url path
|
|
162
|
+
*
|
|
163
|
+
* Our registry resolver understands a few path formats.
|
|
164
|
+
* However, this is our primary registry format to use across
|
|
165
|
+
* internal products.
|
|
166
|
+
*
|
|
167
|
+
* @example @scalar/apis/scalar-galaxy/1.0.0?format=preview
|
|
168
|
+
*/
|
|
169
|
+
url: (opts) => {
|
|
170
|
+
const query = [
|
|
171
|
+
opts?.format ? `format=${registryFormat(opts.format)}` : "",
|
|
172
|
+
opts?.variant === "processed" ? "variant=processed" : "",
|
|
173
|
+
opts?.lang ? `lang=${opts.lang}` : ""
|
|
174
|
+
].filter(Boolean).join("&");
|
|
175
|
+
return `@${namespace}/${asset}/${slug}@${versionFormat(opts?.version)}${query ? `?${query}` : ""}`;
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
function registry(teamNamespace) {
|
|
180
|
+
const namespace = namespaceSchema.parse(teamNamespace);
|
|
181
|
+
return {
|
|
182
|
+
apis: (slug) => buildAsset(namespace, RegistryAsset.Apis, slug),
|
|
183
|
+
rules: (slug) => buildAsset(namespace, RegistryAsset.Rules, slug),
|
|
184
|
+
sdks: (slug) => buildAsset(namespace, RegistryAsset.Sdks, slug),
|
|
185
|
+
schemas: (slug) => buildAsset(namespace, RegistryAsset.Schemas, slug),
|
|
186
|
+
workspaces: (slug) => buildAsset(namespace, RegistryAsset.Workspaces, slug)
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// ../../packages/urls/dist/publish/full.js
|
|
191
|
+
function getPublishUrl(domain, subpath) {
|
|
192
|
+
const url = `https://${domain}${subpath ?? ""}`;
|
|
193
|
+
return new URL(url).toString();
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// ../../packages/urls/dist/publish/previews.js
|
|
197
|
+
function getPublishPreviewUrl(publishUid, domain, subpath = "") {
|
|
198
|
+
const url = `https://${getPublishPreviewDomain(publishUid, domain)}${subpath ?? ""}`;
|
|
199
|
+
new URL(url);
|
|
200
|
+
return url;
|
|
201
|
+
}
|
|
202
|
+
function getPublishPreviewDomain(publishUid, domain) {
|
|
203
|
+
return `${publishUid}--${domain}`;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export {
|
|
207
|
+
getPublishUrl,
|
|
208
|
+
getPublishPreviewUrl,
|
|
209
|
+
registry
|
|
210
|
+
};
|