@scalar/cli 2.15.0 → 2.18.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 +121 -25
- package/chunks/{action-3W4IC7QL.js → action-2WVJ2WEW.js} +26 -27
- package/chunks/{action-HOCCP353.js → action-4BDZ2CXP.js} +12 -13
- package/chunks/{action-3QQSKGM3.js → action-5AXDB5VN.js} +21 -23
- package/chunks/{action-LD5B5QQ4.js → action-6I3TJLRO.js} +34 -33
- package/chunks/{action-T7SD3ETN.js → action-6WZN63LT.js} +299 -75
- package/chunks/{action-IUAYC2SC.js → action-7GZGVTYI.js} +1071 -775
- package/chunks/{action-2BGAMGXU.js → action-7ZCJAWI2.js} +9 -9
- package/chunks/{action-6HFH7DAW.js → action-A6YOY24G.js} +14 -10
- package/chunks/{action-IU2AVNOW.js → action-AGGHY4N2.js} +26 -26
- package/chunks/{action-B2WWTOF6.js → action-BVZOA2G5.js} +15 -16
- package/chunks/{action-2UZWKMSJ.js → action-BYDJ4R4F.js} +18 -19
- package/chunks/{action-HDT7EO7W.js → action-CBAL5CYB.js} +19 -21
- package/chunks/action-COFGCCYS.js +89 -0
- package/chunks/action-CYU5Q5LT.js +254 -0
- package/chunks/{action-MJHLG7AE.js → action-DTQH6CKR.js} +33 -33
- package/chunks/{action-P2RPH5R2.js → action-ED5WLLIE.js} +11 -12
- package/chunks/action-F4CQ4DW3.js +654 -0
- package/chunks/{action-SRFBOLDL.js → action-GQDQU2WE.js} +1 -1
- package/chunks/{action-PDSSIW2A.js → action-GVW5PSPT.js} +26 -28
- package/chunks/{action-WOLNPEUQ.js → action-H5VRLFCY.js} +16 -12
- package/chunks/{action-G2WBTXOK.js → action-IWEAWDT3.js} +19 -19
- package/chunks/{action-NZJ4Z64U.js → action-JN6JVQUV.js} +16 -18
- package/chunks/{action-PNSWHIHC.js → action-KVM76ZKQ.js} +20 -20
- package/chunks/{action-JNH4DCZX.js → action-LLMFEBHH.js} +3 -4
- package/chunks/{action-QJMRAFOF.js → action-PEG7AUA6.js} +20 -19
- package/chunks/{action-2HPMP473.js → action-QC72LLYE.js} +13 -11
- package/chunks/{action-ZTLOQZTT.js → action-QP6MRSQW.js} +16 -15
- package/chunks/{action-4HXB3YQR.js → action-R53K22GE.js} +230 -52
- package/chunks/{action-U2RJ3ZAU.js → action-SJPWL723.js} +6 -5
- package/chunks/{action-57SV3ZBM.js → action-T3R4SDAI.js} +9 -9
- package/chunks/{action-777R7LOG.js → action-TT7ZJNST.js} +25 -25
- package/chunks/{action-TY4BZEMN.js → action-UPVVJE26.js} +18 -19
- package/chunks/{action-MBAAYXKK.js → action-V35W4MRK.js} +18 -19
- package/chunks/{action-TR2T2UYB.js → action-W4KGRBRV.js} +9 -9
- package/chunks/{action-ENDUKGWS.js → action-ZIVYJCC2.js} +16 -18
- package/chunks/{action-7LK4RUDP.js → action-ZU5X2KQX.js} +52 -49
- package/chunks/{actions-D5OHPBWC.js → actions-CERT7BL4.js} +25 -26
- package/chunks/{actions-RI42JY6H.js → actions-RCIS37Y6.js} +22 -24
- package/chunks/{agent-NA3QFKJX.js → agent-CT3RRYPJ.js} +7 -7
- package/chunks/{asyncapi-YBTWMTW6.js → asyncapi-DVBS23QW.js} +17 -18
- package/chunks/{build.action-4YDNDBXC.js → build.action-7MKMMV6V.js} +38 -32
- package/chunks/{chunk-MGGMCT77.js → chunk-36UI2W7I.js} +1 -1
- package/chunks/chunk-4BMOCIYO.js +536 -0
- package/chunks/{chunk-ADQ6B6QI.js → chunk-5DRLDTTU.js} +1 -1
- package/chunks/{chunk-G5WWW7VD.js → chunk-5EO2CVAR.js} +6 -6
- package/chunks/{chunk-Q26DFKTY.js → chunk-5GZAGHKL.js} +1 -1
- package/chunks/{chunk-DWJMPHLY.js → chunk-7LUXRNKV.js} +27 -2
- package/chunks/{chunk-BY4NGQ5D.js → chunk-A2MPF6GE.js} +7 -3
- package/chunks/{chunk-5D3T63G4.js → chunk-BIQFYZP6.js} +1 -1
- package/chunks/chunk-CNJ4TLU7.js +83 -0
- package/chunks/{chunk-UM3WZUGF.js → chunk-CWCRBWA6.js} +7 -3
- package/chunks/{chunk-Z6HOHGUJ.js → chunk-CYIGEQOJ.js} +2 -2
- package/chunks/{chunk-4S3DGMMZ.js → chunk-DUIMDHQQ.js} +1 -1
- package/chunks/{chunk-W7P6VTCG.js → chunk-DVA4NCCY.js} +6 -4
- package/chunks/chunk-DWWY3LPC.js +85 -0
- package/chunks/{chunk-USVU6AC2.js → chunk-F6E7FJEC.js} +18 -12
- package/chunks/{chunk-E24BNP6E.js → chunk-FDW4LC45.js} +1 -1
- package/chunks/{chunk-TW2UASEW.js → chunk-FMPJSW6A.js} +4 -4
- package/chunks/{chunk-IPWJEGPD.js → chunk-GCVB22TG.js} +2 -2
- package/chunks/{chunk-6BQHLHBE.js → chunk-GXKNYM54.js} +3 -3
- package/chunks/chunk-I25ZCHBJ.js +22 -0
- package/chunks/{chunk-I57ID5K7.js → chunk-JBMHCTZD.js} +8 -1
- package/chunks/{chunk-KOLEQNLG.js → chunk-JEOQ7LSA.js} +1 -1
- package/chunks/{chunk-QMERQSPM.js → chunk-KI2AVDKM.js} +8 -6
- package/chunks/{chunk-2KSOARE4.js → chunk-KSY2GH53.js} +3 -3
- package/chunks/{chunk-SHRUJFQI.js → chunk-KWQVA66H.js} +105 -18
- package/chunks/{chunk-DLYMDGFW.js → chunk-LPWRG2MS.js} +4 -4
- package/chunks/{chunk-Y6GKZ2FM.js → chunk-LVUMNGVA.js} +1 -1
- package/chunks/{chunk-PIDLENYN.js → chunk-M34HMQMV.js} +42 -83
- package/chunks/{chunk-7FS7BAUX.js → chunk-MRZ5A7LB.js} +133 -19
- package/chunks/chunk-O3I3LTTJ.js +24 -0
- package/chunks/{chunk-VBHPHAGS.js → chunk-O4DJIA6Y.js} +2 -18
- package/chunks/chunk-OKLL5422.js +263 -0
- package/chunks/{chunk-HIDIW2FN.js → chunk-OQE3WKI3.js} +1 -1
- package/chunks/{chunk-ERZ3HYB5.js → chunk-PMDHYIB4.js} +9 -21
- package/chunks/{chunk-IDGT5RAQ.js → chunk-RELSIFIL.js} +2 -2
- package/chunks/{chunk-BOCMOHQA.js → chunk-RGJPENX7.js} +1 -1
- package/chunks/{chunk-7FGJIUDN.js → chunk-RHAQ4XBA.js} +3 -3
- package/chunks/chunk-RQ7QBRJT.js +93 -0
- package/chunks/chunk-S3LY7RKP.js +54 -0
- package/chunks/{chunk-T76K7QNX.js → chunk-S5OGPH2P.js} +3 -3
- package/chunks/{chunk-ANP5XF26.js → chunk-U36HEOGO.js} +12625 -1369
- package/chunks/{chunk-IPUJEBMI.js → chunk-UWRJCJVG.js} +1 -1
- package/chunks/chunk-V7DBDXSJ.js +24 -0
- package/chunks/{chunk-RRYUCZYO.js → chunk-WGTZEX4Y.js} +7 -3
- package/chunks/{chunk-7PNOYE6B.js → chunk-Y3CXAIAG.js} +30 -3
- package/chunks/{chunk-GOKHFNB2.js → chunk-Z7EH7CJC.js} +3 -3
- package/chunks/{chunk-42MIV6WF.js → chunk-ZMJW5UWU.js} +6 -5
- package/chunks/chunk-ZQDAPKWX.js +111 -0
- package/chunks/{create.action-52K3XAYN.js → create.action-VA2ISPIM.js} +27 -29
- package/chunks/{delete.action-47LPLTOX.js → delete.action-AIWMDGXV.js} +26 -28
- package/chunks/{delete.action-3NMOQPIR.js → delete.action-GEN6OD7A.js} +26 -28
- package/chunks/{diff.action-5TLC2EHT.js → diff.action-LBK656RN.js} +32 -27
- package/chunks/{get.action-BCMLG7C7.js → get.action-5SWRNQ3D.js} +20 -19
- package/chunks/{get.action-TOZ474GO.js → get.action-UPPPGGI4.js} +29 -23
- package/chunks/{list.action-6ZWEENT6.js → list.action-YJZBC25S.js} +26 -28
- package/chunks/{list.action-CMAA5KTY.js → list.action-YOWWC4I4.js} +54 -25
- package/chunks/{publish.action-U3VIU5LZ.js → publish.action-QMVDHDJZ.js} +52 -49
- package/chunks/{update.action-UQHZYVTP.js → update.action-GFDZIGEP.js} +27 -29
- package/chunks/{update.action-QZOP25ME.js → update.action-SNGKPS7A.js} +26 -28
- package/index.js +688 -212
- package/package.json +11 -11
- package/skills/scalar-cli/SKILL.md +4 -3
- package/template.md +120 -24
- package/chunks/action-3KP3WVPZ.js +0 -112
- package/chunks/action-APBLB3IU.js +0 -235
- package/chunks/chunk-BLY2CF4S.js +0 -58
- package/chunks/chunk-BMQFEKHA.js +0 -3534
- package/chunks/chunk-EOTD7HAV.js +0 -318
- package/chunks/chunk-QXOUDBFK.js +0 -92
- package/chunks/chunk-TR5U7G7T.js +0 -32
|
@@ -4,37 +4,40 @@ import {
|
|
|
4
4
|
identityProviderRecordSchema,
|
|
5
5
|
loginPortalSchema,
|
|
6
6
|
managedSchema,
|
|
7
|
+
sdkVersionRecordSchema,
|
|
7
8
|
workspaceSchema
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MRZ5A7LB.js";
|
|
9
10
|
import {
|
|
10
11
|
userSchema
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CYIGEQOJ.js";
|
|
12
13
|
import {
|
|
14
|
+
SdkLanguage,
|
|
15
|
+
sdkBuildStatusSchema,
|
|
13
16
|
sdkSchema
|
|
14
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4BMOCIYO.js";
|
|
15
18
|
import {
|
|
16
19
|
FEEDBACK_PATH_MAX_LENGTH,
|
|
17
20
|
helpfulReasons,
|
|
18
21
|
siteDeploySchema,
|
|
19
22
|
unhelpfulReasons
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import {
|
|
22
|
-
teamSchema
|
|
23
|
-
} from "./chunk-6BQHLHBE.js";
|
|
24
|
-
import {
|
|
25
|
-
activeDeploymentSchema,
|
|
26
|
-
publishRecordSchema,
|
|
27
|
-
themeSchema
|
|
28
|
-
} from "./chunk-BOCMOHQA.js";
|
|
23
|
+
} from "./chunk-DVA4NCCY.js";
|
|
29
24
|
import {
|
|
30
25
|
managedDocSchema,
|
|
31
26
|
ruleSchema
|
|
32
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-KSY2GH53.js";
|
|
33
28
|
import {
|
|
34
29
|
docInstanceOriginSchema,
|
|
35
30
|
docInstanceSchema,
|
|
36
31
|
docVersionRecordSchema
|
|
37
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-Y3CXAIAG.js";
|
|
33
|
+
import {
|
|
34
|
+
teamSchema
|
|
35
|
+
} from "./chunk-GXKNYM54.js";
|
|
36
|
+
import {
|
|
37
|
+
activeDeploymentSchema,
|
|
38
|
+
publishRecordSchema,
|
|
39
|
+
themeSchema
|
|
40
|
+
} from "./chunk-RGJPENX7.js";
|
|
38
41
|
import {
|
|
39
42
|
brandedUid,
|
|
40
43
|
emailSchema,
|
|
@@ -46,7 +49,7 @@ import {
|
|
|
46
49
|
timestampSchema,
|
|
47
50
|
unixTimestamp,
|
|
48
51
|
zod_default
|
|
49
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-JBMHCTZD.js";
|
|
50
53
|
|
|
51
54
|
// ../../packages/entities/dist/admins/index.js
|
|
52
55
|
var scalarAdminSchema = entitySchema.extend({
|
|
@@ -219,6 +222,7 @@ var BaseCollections = {
|
|
|
219
222
|
SdkVersions: (teamUid, sdkUid) => `team/${teamUid}/sdks/${sdkUid}/versions`,
|
|
220
223
|
SdkBuilds: (teamUid) => `team/${teamUid}/sdk-builds`,
|
|
221
224
|
SdkBuildLogs: (teamUid) => `team/${teamUid}/sdk-build-logs`,
|
|
225
|
+
SdkMigrationBackups: (teamUid) => `team/${teamUid}/sdk-migration-backups`,
|
|
222
226
|
McpServers: (teamUid) => `team/${teamUid}/mcp-servers`,
|
|
223
227
|
PersonalTokens: (userUid) => `user/${userUid}/personal-tokens`,
|
|
224
228
|
IdentityProviders: (teamUid) => `team/${teamUid}/identity-providers`,
|
|
@@ -271,7 +275,7 @@ function generateRegistryPath(entity) {
|
|
|
271
275
|
function teamUidFromPath(path) {
|
|
272
276
|
return path.split("/").at(1) ?? "";
|
|
273
277
|
}
|
|
274
|
-
var edgeCacheDeploySchema = siteDeploySchema.omit({ cloudflare: true }).extend(requiredUid);
|
|
278
|
+
var edgeCacheDeploySchema = siteDeploySchema.omit({ cloudflare: true, domainRefreshRequestedAt: true }).extend(requiredUid);
|
|
275
279
|
var edgeCacheProjectSchema = external_exports.object({
|
|
276
280
|
...requiredUid,
|
|
277
281
|
loginPortalUid: external_exports.string().default(""),
|
|
@@ -371,7 +375,55 @@ var edgeCacheDocInstanceSchema = docInstanceSchema.pick({
|
|
|
371
375
|
};
|
|
372
376
|
});
|
|
373
377
|
var edgeCacheRuleSchema = ruleSchema.pick(registryRequiredFields).extend(entityExtension).transform(generateRegistryPath);
|
|
374
|
-
var edgeCacheSdkSchema = sdkSchema.pick({
|
|
378
|
+
var edgeCacheSdkSchema = sdkSchema.pick({
|
|
379
|
+
...registryRequiredFields,
|
|
380
|
+
targets: true,
|
|
381
|
+
current: true,
|
|
382
|
+
currentVersion: true,
|
|
383
|
+
latestVersion: true,
|
|
384
|
+
versionPointersAt: true
|
|
385
|
+
}).extend(entityExtension).transform(generateRegistryPath);
|
|
386
|
+
function sdkUidFromVersionPath(path) {
|
|
387
|
+
return path.split("/").at(3) ?? "";
|
|
388
|
+
}
|
|
389
|
+
var edgeCacheSdkVersionSchema = sdkVersionRecordSchema.pick({ uid: true, version: true, active: true }).extend({ ...requiredUid, _path: external_exports.string() }).transform(({ uid, _path, version, active }) => ({
|
|
390
|
+
uid,
|
|
391
|
+
_path,
|
|
392
|
+
sdkUid: sdkUidFromVersionPath(_path),
|
|
393
|
+
version,
|
|
394
|
+
active
|
|
395
|
+
}));
|
|
396
|
+
var edgeCacheSdkBuildSchema = external_exports.object({
|
|
397
|
+
...requiredUid,
|
|
398
|
+
_path: external_exports.string(),
|
|
399
|
+
sdk: external_exports.object({ uid: nanoidSchema, versionUid: nanoidSchema.nullish() }),
|
|
400
|
+
targets: external_exports.object({
|
|
401
|
+
language: external_exports.enum(SdkLanguage),
|
|
402
|
+
buildStatus: sdkBuildStatusSchema,
|
|
403
|
+
hash: external_exports.string().nullish(),
|
|
404
|
+
reusedFrom: nanoidSchema.nullish()
|
|
405
|
+
}).array()
|
|
406
|
+
});
|
|
407
|
+
var edgeCacheSdkBuildHashSchema = external_exports.object({
|
|
408
|
+
uid: external_exports.string().min(1),
|
|
409
|
+
hash: external_exports.string().min(1),
|
|
410
|
+
sdkUid: nanoidSchema,
|
|
411
|
+
versionUid: nanoidSchema.nullable(),
|
|
412
|
+
buildUid: nanoidSchema,
|
|
413
|
+
language: external_exports.enum(SdkLanguage)
|
|
414
|
+
});
|
|
415
|
+
function sdkBuildHashRows(build) {
|
|
416
|
+
return build.targets.flatMap(({ language, buildStatus, hash, reusedFrom }) => buildStatus === "generated" && hash && !reusedFrom ? [
|
|
417
|
+
{
|
|
418
|
+
uid: `${build.uid}:${language}`,
|
|
419
|
+
hash,
|
|
420
|
+
sdkUid: build.sdk.uid,
|
|
421
|
+
versionUid: build.sdk.versionUid ?? null,
|
|
422
|
+
buildUid: build.uid,
|
|
423
|
+
language
|
|
424
|
+
}
|
|
425
|
+
] : []);
|
|
426
|
+
}
|
|
375
427
|
var edgeCacheWorkspaceSchema = workspaceSchema.pick({ ...registryRequiredFields, version: true, versions: true }).extend(entityExtension).transform(generateRegistryPath);
|
|
376
428
|
var edgeCacheTeamSchema = teamSchema.pick({
|
|
377
429
|
uid: true,
|
|
@@ -413,6 +465,12 @@ function defineCollection(config) {
|
|
|
413
465
|
if (config.source !== void 0) {
|
|
414
466
|
assertSafeIdentifier(config.source, `source "${config.source}" on "${config.tableName}"`);
|
|
415
467
|
}
|
|
468
|
+
if (config.fanOut && !config.indexFields.includes(config.fanOut.parentColumn)) {
|
|
469
|
+
throw new Error(`Edge-cache fan-out on "${config.tableName}" names parent column "${config.fanOut.parentColumn}", which is not one of its indexFields.`);
|
|
470
|
+
}
|
|
471
|
+
if (config.fanOut && config.source !== void 0) {
|
|
472
|
+
throw new Error(`Edge-cache fan-out on "${config.tableName}" declares source "${config.source}", but a fan-out cannot share its table.`);
|
|
473
|
+
}
|
|
416
474
|
return config;
|
|
417
475
|
}
|
|
418
476
|
var edgeCacheCollections = {
|
|
@@ -614,12 +672,38 @@ var edgeCacheCollections = {
|
|
|
614
672
|
loginPortalUid: 1,
|
|
615
673
|
isPrivate: 1,
|
|
616
674
|
accessGroups: 1,
|
|
617
|
-
versions: 1,
|
|
618
675
|
targets: 1,
|
|
676
|
+
current: 1,
|
|
677
|
+
currentVersion: 1,
|
|
678
|
+
latestVersion: 1,
|
|
679
|
+
versionPointersAt: 1,
|
|
619
680
|
_path: 1,
|
|
620
681
|
_registryPath: 1
|
|
621
682
|
}
|
|
622
683
|
}),
|
|
684
|
+
// Pseudo-nested under each SDK, written as a static pattern for the same
|
|
685
|
+
// reason as the document versions above.
|
|
686
|
+
sdkVersion: defineCollection({
|
|
687
|
+
schema: edgeCacheSdkVersionSchema,
|
|
688
|
+
indexFields: ["sdkUid", "version"],
|
|
689
|
+
tableName: "sdkVersion",
|
|
690
|
+
mongoCollection: "team/<uid-0>/sdks/<uid-1>/versions",
|
|
691
|
+
projection: { uid: 1, version: 1, active: 1, _path: 1 }
|
|
692
|
+
}),
|
|
693
|
+
sdkBuildHash: defineCollection({
|
|
694
|
+
schema: edgeCacheSdkBuildSchema,
|
|
695
|
+
indexFields: ["hash", "sdkUid", "versionUid", "buildUid", "language"],
|
|
696
|
+
tableName: "sdkBuildHash",
|
|
697
|
+
mongoCollection: BaseCollections.SdkBuilds,
|
|
698
|
+
projection: { uid: 1, _path: 1, sdk: 1, targets: 1 },
|
|
699
|
+
fanOut: {
|
|
700
|
+
parentColumn: "buildUid",
|
|
701
|
+
rowSchema: edgeCacheSdkBuildHashSchema,
|
|
702
|
+
rows: sdkBuildHashRows,
|
|
703
|
+
// A row per language, keyed `<build>:<language>`.
|
|
704
|
+
maxRows: Object.values(SdkLanguage).length
|
|
705
|
+
}
|
|
706
|
+
}),
|
|
623
707
|
workspace: defineCollection({
|
|
624
708
|
schema: edgeCacheWorkspaceSchema,
|
|
625
709
|
indexFields: ["_registryPath"],
|
|
@@ -683,6 +767,9 @@ var edgeCacheCollections = {
|
|
|
683
767
|
var sharedTables = new Set(Object.values(edgeCacheCollections).map((config) => config.tableName).filter((table, index, all) => all.indexOf(table) !== index));
|
|
684
768
|
for (const [key, config] of Object.entries(edgeCacheCollections)) {
|
|
685
769
|
const shared = sharedTables.has(config.tableName);
|
|
770
|
+
if (shared && config.fanOut) {
|
|
771
|
+
throw new Error(`Edge-cache collection "${key}" fans out onto table "${config.tableName}", which another collection shares.`);
|
|
772
|
+
}
|
|
686
773
|
if (shared && !config.source) {
|
|
687
774
|
throw new Error(`Edge-cache collection "${key}" shares table "${config.tableName}" but declares no source.`);
|
|
688
775
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
registryUrl
|
|
4
|
-
} from "./chunk-TW2UASEW.js";
|
|
5
2
|
import {
|
|
6
3
|
readUrl
|
|
7
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FDW4LC45.js";
|
|
5
|
+
import {
|
|
6
|
+
registryUrl
|
|
7
|
+
} from "./chunk-FMPJSW6A.js";
|
|
8
8
|
|
|
9
9
|
// src/domains/registry/helpers/fetch.ts
|
|
10
10
|
async function fetchFromRegistry(path, accessToken) {
|
|
@@ -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-LLMFEBHH.js");
|
|
14
14
|
await downloadIsolate();
|
|
15
15
|
});
|
|
16
16
|
return cmd;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
ConfigVersion
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RGJPENX7.js";
|
|
5
5
|
import {
|
|
6
6
|
deduplicateSlugInSet,
|
|
7
7
|
emailSchema,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
slugSchema,
|
|
14
14
|
slugify,
|
|
15
15
|
zod_default
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JBMHCTZD.js";
|
|
17
17
|
import {
|
|
18
18
|
__commonJS,
|
|
19
19
|
__reExport,
|
|
@@ -3397,7 +3397,7 @@ var require_parse = __commonJS({
|
|
|
3397
3397
|
var require_gray_matter = __commonJS({
|
|
3398
3398
|
"../../node_modules/.pnpm/gray-matter@4.0.3/node_modules/gray-matter/index.js"(exports2, module2) {
|
|
3399
3399
|
"use strict";
|
|
3400
|
-
var
|
|
3400
|
+
var fs = __require("fs");
|
|
3401
3401
|
var sections = require_section_matter();
|
|
3402
3402
|
var defaults = require_defaults();
|
|
3403
3403
|
var stringify = require_stringify();
|
|
@@ -3481,7 +3481,7 @@ var require_gray_matter = __commonJS({
|
|
|
3481
3481
|
return stringify(file, data, options2);
|
|
3482
3482
|
};
|
|
3483
3483
|
matter2.read = function(filepath, options2) {
|
|
3484
|
-
const str2 =
|
|
3484
|
+
const str2 = fs.readFileSync(filepath, "utf8");
|
|
3485
3485
|
const file = matter2(str2, options2);
|
|
3486
3486
|
file.path = filepath;
|
|
3487
3487
|
return file;
|
|
@@ -3764,8 +3764,8 @@ var require_utils2 = __commonJS({
|
|
|
3764
3764
|
}
|
|
3765
3765
|
return output;
|
|
3766
3766
|
};
|
|
3767
|
-
exports2.basename = (
|
|
3768
|
-
const segs =
|
|
3767
|
+
exports2.basename = (path, { windows } = {}) => {
|
|
3768
|
+
const segs = path.split(windows ? /[\\/]/ : "/");
|
|
3769
3769
|
const last = segs[segs.length - 1];
|
|
3770
3770
|
if (last === "") {
|
|
3771
3771
|
return segs[segs.length - 2];
|
|
@@ -23374,27 +23374,27 @@ var require_util2 = __commonJS({
|
|
|
23374
23374
|
};
|
|
23375
23375
|
}
|
|
23376
23376
|
var normalize2 = lruMemoize(function normalize3(aPath) {
|
|
23377
|
-
var
|
|
23377
|
+
var path = aPath;
|
|
23378
23378
|
var url = urlParse(aPath);
|
|
23379
23379
|
if (url) {
|
|
23380
23380
|
if (!url.path) {
|
|
23381
23381
|
return aPath;
|
|
23382
23382
|
}
|
|
23383
|
-
|
|
23383
|
+
path = url.path;
|
|
23384
23384
|
}
|
|
23385
|
-
var isAbsolute = exports2.isAbsolute(
|
|
23385
|
+
var isAbsolute = exports2.isAbsolute(path);
|
|
23386
23386
|
var parts = [];
|
|
23387
23387
|
var start = 0;
|
|
23388
23388
|
var i = 0;
|
|
23389
23389
|
while (true) {
|
|
23390
23390
|
start = i;
|
|
23391
|
-
i =
|
|
23391
|
+
i = path.indexOf("/", start);
|
|
23392
23392
|
if (i === -1) {
|
|
23393
|
-
parts.push(
|
|
23393
|
+
parts.push(path.slice(start));
|
|
23394
23394
|
break;
|
|
23395
23395
|
} else {
|
|
23396
|
-
parts.push(
|
|
23397
|
-
while (i <
|
|
23396
|
+
parts.push(path.slice(start, i));
|
|
23397
|
+
while (i < path.length && path[i] === "/") {
|
|
23398
23398
|
i++;
|
|
23399
23399
|
}
|
|
23400
23400
|
}
|
|
@@ -23415,15 +23415,15 @@ var require_util2 = __commonJS({
|
|
|
23415
23415
|
}
|
|
23416
23416
|
}
|
|
23417
23417
|
}
|
|
23418
|
-
|
|
23419
|
-
if (
|
|
23420
|
-
|
|
23418
|
+
path = parts.join("/");
|
|
23419
|
+
if (path === "") {
|
|
23420
|
+
path = isAbsolute ? "/" : ".";
|
|
23421
23421
|
}
|
|
23422
23422
|
if (url) {
|
|
23423
|
-
url.path =
|
|
23423
|
+
url.path = path;
|
|
23424
23424
|
return urlGenerate(url);
|
|
23425
23425
|
}
|
|
23426
|
-
return
|
|
23426
|
+
return path;
|
|
23427
23427
|
});
|
|
23428
23428
|
exports2.normalize = normalize2;
|
|
23429
23429
|
function join2(aRoot, aPath) {
|
|
@@ -27096,14 +27096,14 @@ For props declared with defineModel(), assign the returned ref to a variable and
|
|
|
27096
27096
|
var whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
|
|
27097
27097
|
var getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;
|
|
27098
27098
|
var isMemberExpressionBrowser = (exp) => {
|
|
27099
|
-
const
|
|
27099
|
+
const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim());
|
|
27100
27100
|
let state = 0;
|
|
27101
27101
|
let stateStack = [];
|
|
27102
27102
|
let currentOpenBracketCount = 0;
|
|
27103
27103
|
let currentOpenParensCount = 0;
|
|
27104
27104
|
let currentStringType = null;
|
|
27105
|
-
for (let i = 0; i <
|
|
27106
|
-
const char =
|
|
27105
|
+
for (let i = 0; i < path.length; i++) {
|
|
27106
|
+
const char = path.charAt(i);
|
|
27107
27107
|
switch (state) {
|
|
27108
27108
|
case 0:
|
|
27109
27109
|
if (char === "[") {
|
|
@@ -27139,7 +27139,7 @@ For props declared with defineModel(), assign the returned ref to a variable and
|
|
|
27139
27139
|
} else if (char === `(`) {
|
|
27140
27140
|
currentOpenParensCount++;
|
|
27141
27141
|
} else if (char === `)`) {
|
|
27142
|
-
if (i ===
|
|
27142
|
+
if (i === path.length - 1) {
|
|
27143
27143
|
return false;
|
|
27144
27144
|
}
|
|
27145
27145
|
if (!--currentOpenParensCount) {
|
|
@@ -33906,14 +33906,14 @@ For props declared with defineModel(), assign the returned ref to a variable and
|
|
|
33906
33906
|
var whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
|
|
33907
33907
|
var getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;
|
|
33908
33908
|
var isMemberExpressionBrowser = (exp) => {
|
|
33909
|
-
const
|
|
33909
|
+
const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim());
|
|
33910
33910
|
let state = 0;
|
|
33911
33911
|
let stateStack = [];
|
|
33912
33912
|
let currentOpenBracketCount = 0;
|
|
33913
33913
|
let currentOpenParensCount = 0;
|
|
33914
33914
|
let currentStringType = null;
|
|
33915
|
-
for (let i = 0; i <
|
|
33916
|
-
const char =
|
|
33915
|
+
for (let i = 0; i < path.length; i++) {
|
|
33916
|
+
const char = path.charAt(i);
|
|
33917
33917
|
switch (state) {
|
|
33918
33918
|
case 0:
|
|
33919
33919
|
if (char === "[") {
|
|
@@ -33949,7 +33949,7 @@ For props declared with defineModel(), assign the returned ref to a variable and
|
|
|
33949
33949
|
} else if (char === `(`) {
|
|
33950
33950
|
currentOpenParensCount++;
|
|
33951
33951
|
} else if (char === `)`) {
|
|
33952
|
-
if (i ===
|
|
33952
|
+
if (i === path.length - 1) {
|
|
33953
33953
|
return false;
|
|
33954
33954
|
}
|
|
33955
33955
|
if (!--currentOpenParensCount) {
|
|
@@ -44933,8 +44933,8 @@ var require_runtime_core_cjs_prod = __commonJS({
|
|
|
44933
44933
|
reset();
|
|
44934
44934
|
return res;
|
|
44935
44935
|
}
|
|
44936
|
-
function createPathGetter(ctx,
|
|
44937
|
-
const segments =
|
|
44936
|
+
function createPathGetter(ctx, path) {
|
|
44937
|
+
const segments = path.split(".");
|
|
44938
44938
|
return () => {
|
|
44939
44939
|
let cur = ctx;
|
|
44940
44940
|
for (let i = 0; i < segments.length && cur; i++) {
|
|
@@ -52466,8 +52466,8 @@ var require_runtime_core_cjs = __commonJS({
|
|
|
52466
52466
|
reset();
|
|
52467
52467
|
return res;
|
|
52468
52468
|
}
|
|
52469
|
-
function createPathGetter(ctx,
|
|
52470
|
-
const segments =
|
|
52469
|
+
function createPathGetter(ctx, path) {
|
|
52470
|
+
const segments = path.split(".");
|
|
52471
52471
|
return () => {
|
|
52472
52472
|
let cur = ctx;
|
|
52473
52473
|
for (let i = 0; i < segments.length && cur; i++) {
|
|
@@ -64660,7 +64660,7 @@ async function expandFolderGuides(config, folderGetter) {
|
|
|
64660
64660
|
var SKIPPED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
|
|
64661
64661
|
function folderGuideFilter(guide, root) {
|
|
64662
64662
|
const matchesGlobs = globFilterFactory(guide);
|
|
64663
|
-
return (
|
|
64663
|
+
return (path) => isValidPageFile(path) && matchesGlobs(join(root, path));
|
|
64664
64664
|
}
|
|
64665
64665
|
async function listFolder({ folderPath, folderGetter, isIncluded }) {
|
|
64666
64666
|
const items = [];
|
|
@@ -64765,6 +64765,7 @@ var pathSchema = external_exports.string().startsWith("/");
|
|
|
64765
64765
|
var linkSectionSchema = external_exports.string().min(1, "A section heading cannot be empty. Omit `section` instead.").describe("The column heading this link sits under inside its dropdown. A dropdown renders as a multi-column mega menu when any child names a section; consecutive children sharing a section become one column. Ignored for items outside a group.");
|
|
64766
64766
|
var groupsSchema = userGroupSchema.array().max(MAX_USER_INFO_GROUPS).optional().describe("Groups a signed-in visitor must belong to (any of them) for this entry to show. Entries without groups are visible to everyone. Controls visibility only; the page stays reachable at its URL.");
|
|
64767
64767
|
var colorSchemeTogglePositionSchema = external_exports.union([external_exports.enum(["sidebar", "header", "tabs"]), external_exports.literal(false)]).describe('Where the light/dark toggle renders: "sidebar" (default), "header", or "tabs". Falls back to the next surface the page has (sidebar, header, tabs) when the chosen one is missing. Set false to hide it.');
|
|
64768
|
+
var tocLayoutSchema = external_exports.enum(["default", "condensed"]).describe('How the table of contents is laid out: "default" (a column beside the content) or "condensed" (a stack of short lines, one per heading, that stays in view while the page scrolls and opens the list of headings on hover or click). Has no effect where `toc` is false.');
|
|
64768
64769
|
|
|
64769
64770
|
// ../../packages/scalar-config/dist/schema/navigation/header.js
|
|
64770
64771
|
var HEADER_ALIGNS = ["start", "center", "end"];
|
|
@@ -64996,6 +64997,7 @@ var pageFrontmatterSchema = external_exports.object({
|
|
|
64996
64997
|
/** Optional layout options for the page. This will override the global layout options. */
|
|
64997
64998
|
layout: external_exports.object({
|
|
64998
64999
|
toc: external_exports.boolean().optional(),
|
|
65000
|
+
tocLayout: tocLayoutSchema.optional(),
|
|
64999
65001
|
header: external_exports.boolean().optional(),
|
|
65000
65002
|
sidebar: external_exports.boolean().optional(),
|
|
65001
65003
|
tabs: external_exports.boolean().optional(),
|
|
@@ -65306,6 +65308,7 @@ var siteConfigSchema = external_exports.object({
|
|
|
65306
65308
|
/** Global layout options to hide/show select elements */
|
|
65307
65309
|
layout: external_exports.object({
|
|
65308
65310
|
toc: external_exports.boolean().optional(),
|
|
65311
|
+
tocLayout: tocLayoutSchema.optional(),
|
|
65309
65312
|
header: external_exports.boolean().optional(),
|
|
65310
65313
|
pageTitle: external_exports.boolean().optional(),
|
|
65311
65314
|
pageActions: external_exports.boolean().optional(),
|
|
@@ -65542,11 +65545,11 @@ function resolveHeader({ references, guides, header }) {
|
|
|
65542
65545
|
|
|
65543
65546
|
// ../../packages/scalar-config/dist/transformers/helpers.js
|
|
65544
65547
|
import { parse as parse2 } from "node:path";
|
|
65545
|
-
function createUrlSlug({ name, path
|
|
65548
|
+
function createUrlSlug({ name, path }) {
|
|
65546
65549
|
if (name)
|
|
65547
65550
|
return `/${slugify(name)}`;
|
|
65548
|
-
if (
|
|
65549
|
-
return `/${slugify(parse2(
|
|
65551
|
+
if (path)
|
|
65552
|
+
return `/${slugify(parse2(path).name)}`;
|
|
65550
65553
|
return `/${slugify(randomSlug({ words: 2 }))}`;
|
|
65551
65554
|
}
|
|
65552
65555
|
|
|
@@ -65721,8 +65724,8 @@ var legacyTo2_0_0 = (config, { isPathTaken = () => false } = {}) => {
|
|
|
65721
65724
|
});
|
|
65722
65725
|
}
|
|
65723
65726
|
}
|
|
65724
|
-
const cssStyles = config.siteConfig.cssFiles?.map((
|
|
65725
|
-
path
|
|
65727
|
+
const cssStyles = config.siteConfig.cssFiles?.map((path) => ({
|
|
65728
|
+
path
|
|
65726
65729
|
})) ?? [];
|
|
65727
65730
|
const legacyThemePath = freePath("theme.css");
|
|
65728
65731
|
const legacyFooterCssPath = freePath("footer.css");
|
|
@@ -66210,58 +66213,14 @@ var DEFAULT_ASSETS_DIR = "assets";
|
|
|
66210
66213
|
var vue_exports = {};
|
|
66211
66214
|
__reExport(vue_exports, __toESM(require_vue(), 1));
|
|
66212
66215
|
|
|
66213
|
-
// src/domains/project/helpers.ts
|
|
66214
|
-
import fs from "node:fs";
|
|
66215
|
-
import path from "node:path";
|
|
66216
|
-
var DEFAULT_MARKDOWN_FILE_NAME = "docs-quickstart.md";
|
|
66217
|
-
var DEFAULT_OPENAPI_FILE_NAME = "docs-openapi.json";
|
|
66218
|
-
var DEFAULT_CONFIG_EXTENSION = ".json";
|
|
66219
|
-
var CONFIG_FILE_DEFAULT = CONFIG_FILE_NAME + DEFAULT_CONFIG_EXTENSION;
|
|
66220
|
-
function findConfig(searchPath) {
|
|
66221
|
-
if (!searchPath) {
|
|
66222
|
-
return searchInDirectory(process.cwd());
|
|
66223
|
-
}
|
|
66224
|
-
const searchPathResolved = path.resolve(searchPath);
|
|
66225
|
-
const stat = fs.statSync(searchPathResolved, { throwIfNoEntry: false });
|
|
66226
|
-
if (!stat) {
|
|
66227
|
-
return null;
|
|
66228
|
-
}
|
|
66229
|
-
if (stat.isDirectory()) {
|
|
66230
|
-
return searchInDirectory(searchPathResolved);
|
|
66231
|
-
}
|
|
66232
|
-
if (stat.isFile()) {
|
|
66233
|
-
return searchPathResolved;
|
|
66234
|
-
}
|
|
66235
|
-
return null;
|
|
66236
|
-
}
|
|
66237
|
-
function getCurrentFolderName() {
|
|
66238
|
-
return path.basename(process.cwd());
|
|
66239
|
-
}
|
|
66240
|
-
function searchInDirectory(directory) {
|
|
66241
|
-
try {
|
|
66242
|
-
const entries = fs.readdirSync(directory);
|
|
66243
|
-
for (const entry of entries) {
|
|
66244
|
-
if (isConfigFileName(entry)) {
|
|
66245
|
-
return path.join(directory, entry);
|
|
66246
|
-
}
|
|
66247
|
-
}
|
|
66248
|
-
return null;
|
|
66249
|
-
} catch (_) {
|
|
66250
|
-
return null;
|
|
66251
|
-
}
|
|
66252
|
-
}
|
|
66253
|
-
|
|
66254
66216
|
export {
|
|
66217
|
+
CONFIG_FILE_NAME,
|
|
66218
|
+
isConfigFileName,
|
|
66255
66219
|
expandFolderGuides,
|
|
66256
66220
|
scalarConfigSchema,
|
|
66257
66221
|
parseConfig,
|
|
66258
66222
|
DEFAULT_ASSETS_DIR,
|
|
66259
|
-
legacyTo2_0_0
|
|
66260
|
-
DEFAULT_MARKDOWN_FILE_NAME,
|
|
66261
|
-
DEFAULT_OPENAPI_FILE_NAME,
|
|
66262
|
-
CONFIG_FILE_DEFAULT,
|
|
66263
|
-
findConfig,
|
|
66264
|
-
getCurrentFolderName
|
|
66223
|
+
legacyTo2_0_0
|
|
66265
66224
|
};
|
|
66266
66225
|
/*! Bundled license information:
|
|
66267
66226
|
|