@scalar/cli 2.8.0 → 2.11.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 +84 -1076
- package/chunks/action-25QMCP5G.js +122 -0
- package/chunks/{action-354TUG4H.js → action-2VF6LODL.js} +20 -16
- package/chunks/{action-XIUO64C7.js → action-5I4XDPPG.js} +20 -14
- package/chunks/action-6M5PTDF6.js +100 -0
- package/chunks/{action-NVI5DWFP.js → action-73ELLN3T.js} +8 -11
- package/chunks/{action-Y6NXJQ4H.js → action-7H3AWCHX.js} +21 -16
- package/chunks/{action-LLH4QPXM.js → action-BRSLSOE5.js} +19 -18
- package/chunks/{action-EOAVVL52.js → action-CQQCKSNS.js} +17 -22
- package/chunks/action-D5QWDNQ2.js +65 -0
- package/chunks/{action-Y7OUGD56.js → action-DQDHBOLJ.js} +34 -31
- package/chunks/{action-5SK5NE7E.js → action-EYPYQQVM.js} +18 -23
- package/chunks/{action-YRX6SN5F.js → action-FMA5ECUA.js} +12 -10
- package/chunks/{action-7PEQXDWT.js → action-GXDJLF2G.js} +134 -25
- package/chunks/action-HUICEXJZ.js +75 -0
- package/chunks/action-IH6G77C5.js +38 -0
- package/chunks/{action-H3RTILLM.js → action-IIQMZVRJ.js} +1 -1
- package/chunks/action-IQM54ITT.js +164 -0
- package/chunks/{action-UIKH4SZX.js → action-J5TO3UJW.js} +32 -26
- package/chunks/{action-H6OUJWWM.js → action-KC3ZCNDR.js} +17 -22
- package/chunks/{action-6BYGBXRC.js → action-L7TMS3Q3.js} +44 -37
- package/chunks/{action-GWXLHL2Z.js → action-LAAHRDSR.js} +5 -4
- package/chunks/{action-FCAYFPVR.js → action-LR75GHBA.js} +14 -11
- package/chunks/action-MJMLQFLT.js +1552 -0
- package/chunks/action-NHU4CUKT.js +130 -0
- package/chunks/action-NKTFNFU7.js +64 -0
- package/chunks/{action-F7A2K74G.js → action-NMW5WPD2.js} +12 -16
- package/chunks/{action-VOFDW3U2.js → action-OTPXODUE.js} +8 -7
- package/chunks/{action-43YBNBDR.js → action-RPCDNGCI.js} +54 -39
- package/chunks/{action-QQZLPI42.js → action-RQCXSJPZ.js} +55 -27
- package/chunks/action-SOYSVG67.js +147 -0
- package/chunks/action-Y7EBKCUU.js +16 -0
- package/chunks/{action-WFDNRA7D.js → action-YN4TE7TG.js} +24 -23
- package/chunks/{action-AQRPFQKI.js → action-ZGNVWTHZ.js} +14 -12
- package/chunks/action-ZKKRPLDK.js +64 -0
- package/chunks/{action-HT2DJ34Z.js → action-ZUZL7R3H.js} +20 -15
- package/chunks/{actions-OGIVBQC7.js → actions-S6K76HCW.js} +46 -19
- package/chunks/{agent-ASPV3R5U.js → agent-IRNEV4K5.js} +46 -9
- package/chunks/{asyncapi-QNFKXHEI.js → asyncapi-WQPIQMEZ.js} +15 -10
- package/chunks/{build.action-NM6CAE5F.js → build.action-CLBVKFWD.js} +28 -24
- package/chunks/chunk-25XERWCE.js +1058 -0
- package/chunks/chunk-3RIUDHLG.js +467 -0
- package/chunks/{chunk-MLSZVVTT.js → chunk-3TFOA64C.js} +19 -8
- package/chunks/{chunk-HGOD6THU.js → chunk-4JKXZ5CF.js} +12 -25
- package/chunks/{chunk-C2KAWRIX.js → chunk-5ENKYZA4.js} +1 -1
- package/chunks/{chunk-W24BETFG.js → chunk-5L7V7RCH.js} +10 -10
- package/chunks/chunk-6PSYZO3U.js +24 -0
- package/chunks/{chunk-IMG35UXX.js → chunk-ALYM4ZB2.js} +1 -1
- package/chunks/chunk-AVZFSWPD.js +37 -0
- package/chunks/{chunk-5UHLAJQD.js → chunk-BQYVSPAI.js} +36 -10
- package/chunks/{chunk-XXSQUBXS.js → chunk-CSSTCHHF.js} +6212 -4642
- package/chunks/chunk-DFOZG7ZV.js +15 -0
- package/chunks/{chunk-22HYZ7LE.js → chunk-DQD2753S.js} +3 -3
- package/chunks/{action-F2ZJNURT.js → chunk-EBNFCIKS.js} +7 -10
- package/chunks/{chunk-EXY3ZTV4.js → chunk-F3OPMYME.js} +143 -301
- package/chunks/{chunk-FDC2IESH.js → chunk-FG5AOTDN.js} +8519 -14702
- package/chunks/chunk-GKCVATQJ.js +92 -0
- package/chunks/{chunk-PH3WFNXJ.js → chunk-GMHIK5K2.js} +1 -1
- package/chunks/{chunk-GTV2BVXV.js → chunk-GYR5E6RB.js} +2 -2
- package/chunks/{chunk-OJ2EWIJH.js → chunk-HZN6IIPZ.js} +11 -6
- package/chunks/{chunk-IKT5F47M.js → chunk-I57ID5K7.js} +24 -11
- package/chunks/{chunk-BPGFSSUH.js → chunk-KOD2HX5I.js} +1 -1
- package/chunks/{chunk-L3UXDCBI.js → chunk-LOLVJNI5.js} +4 -4
- package/chunks/{chunk-KCCFN4F7.js → chunk-MN2AFJXM.js} +36 -29
- package/chunks/{chunk-UXJ753NV.js → chunk-N5CJ5MTY.js} +5 -13
- package/chunks/chunk-NAC63XJF.js +10 -0
- package/chunks/{chunk-2OCWX42S.js → chunk-NWJ37GI2.js} +166 -22
- package/chunks/{chunk-3ZJYGGAA.js → chunk-ORCUZITN.js} +1 -1
- package/chunks/chunk-QMLRYD76.js +24 -0
- package/chunks/{chunk-KKRGBXCE.js → chunk-SEURG74P.js} +303 -209
- package/chunks/{chunk-R5LK6VPY.js → chunk-SOV4POMS.js} +370 -264
- package/chunks/chunk-T34TL6KL.js +222 -0
- package/chunks/{chunk-5DEU2DVL.js → chunk-U6VE6JOS.js} +3 -15
- package/chunks/{chunk-YILQODZF.js → chunk-UFSFY7Z4.js} +23 -20
- package/chunks/{chunk-6YPQGVF4.js → chunk-ULRJZXMS.js} +1 -1
- package/chunks/chunk-US54KYOJ.js +131 -0
- package/chunks/chunk-V6LUKXBV.js +37 -0
- package/chunks/{chunk-5JLVQVKO.js → chunk-VRZSDUZK.js} +190 -152
- package/chunks/chunk-VUXPDHTQ.js +22 -0
- package/chunks/chunk-XP5UM7SF.js +21 -0
- package/chunks/chunk-Y6XGC4K5.js +311 -0
- package/chunks/{create.action-FUQ2BVJA.js → create.action-ITEOQ644.js} +34 -30
- package/chunks/{delete.action-47E66R3I.js → delete.action-77MFPLUN.js} +30 -26
- package/chunks/{delete.action-BTDFH7WY.js → delete.action-C6VX4S5Q.js} +30 -26
- package/chunks/{get.action-XC7KC2JO.js → get.action-3BP4FHZC.js} +20 -14
- package/chunks/get.action-LNBOWUVE.js +95 -0
- package/chunks/list.action-6CRFQPJT.js +156 -0
- package/chunks/list.action-KR5YIDR4.js +126 -0
- package/chunks/{publish.action-OS27XOX4.js → publish.action-YBORRPBM.js} +49 -42
- package/chunks/query-WKATAJJ6.js +129 -0
- package/chunks/scripts-6CI6U32J.js +102 -0
- package/chunks/{update.action-AEIBLCWD.js → update.action-O7TSXDGV.js} +34 -27
- package/chunks/{update.action-ZMS4CQ3T.js → update.action-QZI7M2MV.js} +34 -27
- package/index.js +579 -382
- package/package.json +15 -14
- package/skills/scalar-cli/SKILL.md +52 -46
- package/template.md +71 -136
- package/chunks/action-CA4QYPI6.js +0 -125
- package/chunks/action-JAHFRYWZ.js +0 -423
- package/chunks/action-KTYOCA2V.js +0 -229
- package/chunks/action-LEUD5P2U.js +0 -92
- package/chunks/action-LXGXKXZZ.js +0 -72
- package/chunks/action-W3C53GPH.js +0 -54
- package/chunks/action-YLF2G4G5.js +0 -37
- package/chunks/chunk-6XWCMJDB.js +0 -404
- package/chunks/chunk-K74E42RV.js +0 -7311
- package/chunks/chunk-QVQ4PNVL.js +0 -610
- package/chunks/chunk-XEDGMZJD.js +0 -366
- package/chunks/list.action-LXKEUYKO.js +0 -116
- package/chunks/list.action-OFGLMRE7.js +0 -95
- package/docs.html +0 -6245
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
+
brandedUid,
|
|
3
4
|
entitySchema,
|
|
4
5
|
external_exports,
|
|
5
6
|
namespaceSchema,
|
|
@@ -8,132 +9,18 @@ import {
|
|
|
8
9
|
scalarSet,
|
|
9
10
|
slugSchema,
|
|
10
11
|
timestampSchema
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-I57ID5K7.js";
|
|
12
13
|
|
|
13
14
|
// ../../packages/entities/dist/project/active-deployment.js
|
|
14
15
|
var activeDeploymentSchema = external_exports.object({
|
|
15
16
|
/** uid of the publish record for the last successful deployment */
|
|
16
|
-
uid: external_exports.string(),
|
|
17
|
+
uid: external_exports.string().meta({ examples: ["UakgbKJ5m9gl0JDMbcJqL"] }),
|
|
17
18
|
/** subdomain or custom domain */
|
|
18
|
-
domain: external_exports.string(),
|
|
19
|
+
domain: external_exports.string().meta({ examples: ["docs.example.com"] }),
|
|
19
20
|
/** timestamp of the last successful deployment */
|
|
20
21
|
publishedAt: timestampSchema
|
|
21
22
|
}).meta({ id: "active-deployment" });
|
|
22
23
|
|
|
23
|
-
// ../../packages/entities/dist/project/icon.js
|
|
24
|
-
var projectIconDefinitionSchema = external_exports.object({
|
|
25
|
-
/** Key to local icon OR URL to hosted icon */
|
|
26
|
-
src: external_exports.string().default(""),
|
|
27
|
-
/** Image alt or svg title */
|
|
28
|
-
title: external_exports.string().optional(),
|
|
29
|
-
/** Mask a non-svg image */
|
|
30
|
-
mask: external_exports.boolean().optional(),
|
|
31
|
-
/** Search and group tags */
|
|
32
|
-
tags: external_exports.string().array().default([]),
|
|
33
|
-
/** Sorting group in list */
|
|
34
|
-
group: external_exports.string().default("")
|
|
35
|
-
}).meta({ id: "project-icon-definition" });
|
|
36
|
-
var customProjectIconSchema = projectIconDefinitionSchema.extend({
|
|
37
|
-
/** Timestamp for when the icon was uploaded */
|
|
38
|
-
createdAt: timestampSchema,
|
|
39
|
-
/** User ID who uploaded the icon */
|
|
40
|
-
uploadedBy: external_exports.string(),
|
|
41
|
-
/** Always a custom icon */
|
|
42
|
-
group: external_exports.literal("custom")
|
|
43
|
-
}).meta({ id: "custom-project-icon" });
|
|
44
|
-
var projectIconInfoSchema = external_exports.object({
|
|
45
|
-
src: external_exports.string().default(""),
|
|
46
|
-
title: external_exports.string().optional(),
|
|
47
|
-
mask: external_exports.boolean().optional()
|
|
48
|
-
}).meta({ id: "project-icon-info" });
|
|
49
|
-
var projectIconSchema = external_exports.preprocess((arg) => {
|
|
50
|
-
if (!arg)
|
|
51
|
-
return arg;
|
|
52
|
-
if (!arg.src)
|
|
53
|
-
arg.src = arg.local || arg.remote;
|
|
54
|
-
if (arg.local)
|
|
55
|
-
arg.group = "solid";
|
|
56
|
-
if (arg.remote)
|
|
57
|
-
arg.group = "custom";
|
|
58
|
-
return arg;
|
|
59
|
-
}, projectIconInfoSchema).meta({ id: "project-icon" });
|
|
60
|
-
|
|
61
|
-
// ../../packages/entities/dist/project/version/sidebar.js
|
|
62
|
-
var SidebarType;
|
|
63
|
-
(function(SidebarType2) {
|
|
64
|
-
SidebarType2["Page"] = "Page";
|
|
65
|
-
SidebarType2["Folder"] = "Folder";
|
|
66
|
-
SidebarType2["Link"] = "Link";
|
|
67
|
-
})(SidebarType || (SidebarType = {}));
|
|
68
|
-
var baseSidebarItemSchema = external_exports.object({
|
|
69
|
-
uid: nanoidSchema,
|
|
70
|
-
title: external_exports.string().trim().min(1),
|
|
71
|
-
type: external_exports.enum(SidebarType),
|
|
72
|
-
link: external_exports.string().optional(),
|
|
73
|
-
icon: projectIconSchema.optional(),
|
|
74
|
-
children: external_exports.string().array().optional(),
|
|
75
|
-
description: external_exports.string().optional(),
|
|
76
|
-
show: external_exports.boolean()
|
|
77
|
-
}).meta({ id: "base-sidebar-item" });
|
|
78
|
-
var linkSchema = baseSidebarItemSchema.extend({
|
|
79
|
-
title: external_exports.preprocess((arg) => arg?.trim() || "Link", external_exports.string().trim().min(1)),
|
|
80
|
-
link: external_exports.string(),
|
|
81
|
-
type: external_exports.literal(SidebarType.Link)
|
|
82
|
-
}).meta({ id: "sidebar-link" });
|
|
83
|
-
var pageSchema = baseSidebarItemSchema.extend({
|
|
84
|
-
title: external_exports.preprocess((arg) => arg?.trim() || "Page", external_exports.string().trim().min(1)),
|
|
85
|
-
sidebarTitle: external_exports.string().optional(),
|
|
86
|
-
description: external_exports.string(),
|
|
87
|
-
children: external_exports.string().array().default([]),
|
|
88
|
-
type: external_exports.literal(SidebarType.Page),
|
|
89
|
-
defaultOpen: external_exports.boolean().optional(),
|
|
90
|
-
yjsReference: external_exports.string(),
|
|
91
|
-
backgroundImage: external_exports.string().optional(),
|
|
92
|
-
icon: projectIconSchema.optional(),
|
|
93
|
-
/**
|
|
94
|
-
* Automatically set during sync builds when we map markdown and mdx files to pages
|
|
95
|
-
*
|
|
96
|
-
* Used by the Vue builds to determine how to render a given page item.
|
|
97
|
-
*/
|
|
98
|
-
isMdx: external_exports.boolean().default(false),
|
|
99
|
-
/**
|
|
100
|
-
* Automatically set during sync builds when we map HTML files to pages.
|
|
101
|
-
*/
|
|
102
|
-
isHtml: external_exports.boolean().default(false)
|
|
103
|
-
}).meta({ id: "sidebar-page" });
|
|
104
|
-
var defaultPage = () => ({
|
|
105
|
-
uid: nanoid(),
|
|
106
|
-
title: "Getting Started",
|
|
107
|
-
type: SidebarType.Page,
|
|
108
|
-
description: "Start writing your API Documentation with our platform",
|
|
109
|
-
children: [],
|
|
110
|
-
show: true,
|
|
111
|
-
yjsReference: nanoid(),
|
|
112
|
-
isMdx: false,
|
|
113
|
-
isHtml: false
|
|
114
|
-
});
|
|
115
|
-
var folderSchema = baseSidebarItemSchema.extend({
|
|
116
|
-
title: external_exports.preprocess((arg) => arg?.trim() || "Folder", external_exports.string().trim().min(1)),
|
|
117
|
-
children: external_exports.string().array().default([]),
|
|
118
|
-
type: external_exports.literal(SidebarType.Folder),
|
|
119
|
-
defaultOpen: external_exports.boolean().optional()
|
|
120
|
-
}).meta({ id: "sidebar-folder" });
|
|
121
|
-
var sidebarItemSchema = external_exports.union([linkSchema, pageSchema, folderSchema]).meta({ id: "sidebar-item" });
|
|
122
|
-
var sidebarSchema = external_exports.object({
|
|
123
|
-
/** Complete record of ALL sidebar items */
|
|
124
|
-
items: external_exports.record(external_exports.string(), sidebarItemSchema),
|
|
125
|
-
/** Ordered list of the direct children */
|
|
126
|
-
children: external_exports.string().array()
|
|
127
|
-
}).overwrite((val) => {
|
|
128
|
-
const hasPage = Object.values(val.items).some((item) => item.type === SidebarType.Page);
|
|
129
|
-
if (!hasPage) {
|
|
130
|
-
const firstPage = defaultPage();
|
|
131
|
-
val.items[firstPage.uid] = firstPage;
|
|
132
|
-
val.children.push(firstPage.uid);
|
|
133
|
-
}
|
|
134
|
-
return val;
|
|
135
|
-
}).meta({ id: "sidebar" });
|
|
136
|
-
|
|
137
24
|
// ../../packages/entities/dist/project/footer.js
|
|
138
25
|
var defaultFooter = `<footer>
|
|
139
26
|
<div class="footer-content">
|
|
@@ -332,6 +219,120 @@ function getHeaderLinks({ guides, references, header }) {
|
|
|
332
219
|
return complete;
|
|
333
220
|
}
|
|
334
221
|
|
|
222
|
+
// ../../packages/entities/dist/project/icon.js
|
|
223
|
+
var projectIconDefinitionSchema = external_exports.object({
|
|
224
|
+
/** Key to local icon OR URL to hosted icon */
|
|
225
|
+
src: external_exports.string().default(""),
|
|
226
|
+
/** Image alt or svg title */
|
|
227
|
+
title: external_exports.string().optional(),
|
|
228
|
+
/** Mask a non-svg image */
|
|
229
|
+
mask: external_exports.boolean().optional(),
|
|
230
|
+
/** Search and group tags */
|
|
231
|
+
tags: external_exports.string().array().default([]),
|
|
232
|
+
/** Sorting group in list */
|
|
233
|
+
group: external_exports.string().default("")
|
|
234
|
+
}).meta({ id: "project-icon-definition" });
|
|
235
|
+
var customProjectIconSchema = projectIconDefinitionSchema.extend({
|
|
236
|
+
/** Timestamp for when the icon was uploaded */
|
|
237
|
+
createdAt: timestampSchema,
|
|
238
|
+
/** User ID who uploaded the icon */
|
|
239
|
+
uploadedBy: external_exports.string(),
|
|
240
|
+
/** Always a custom icon */
|
|
241
|
+
group: external_exports.literal("custom")
|
|
242
|
+
}).meta({ id: "custom-project-icon" });
|
|
243
|
+
var projectIconInfoSchema = external_exports.object({
|
|
244
|
+
src: external_exports.string().default(""),
|
|
245
|
+
title: external_exports.string().optional(),
|
|
246
|
+
mask: external_exports.boolean().optional()
|
|
247
|
+
}).meta({ id: "project-icon-info" });
|
|
248
|
+
var projectIconSchema = external_exports.preprocess((arg) => {
|
|
249
|
+
if (!arg)
|
|
250
|
+
return arg;
|
|
251
|
+
if (!arg.src)
|
|
252
|
+
arg.src = arg.local || arg.remote;
|
|
253
|
+
if (arg.local)
|
|
254
|
+
arg.group = "solid";
|
|
255
|
+
if (arg.remote)
|
|
256
|
+
arg.group = "custom";
|
|
257
|
+
return arg;
|
|
258
|
+
}, projectIconInfoSchema).meta({ id: "project-icon" });
|
|
259
|
+
|
|
260
|
+
// ../../packages/entities/dist/project/version/sidebar.js
|
|
261
|
+
var SidebarType;
|
|
262
|
+
(function(SidebarType2) {
|
|
263
|
+
SidebarType2["Page"] = "Page";
|
|
264
|
+
SidebarType2["Folder"] = "Folder";
|
|
265
|
+
SidebarType2["Link"] = "Link";
|
|
266
|
+
})(SidebarType || (SidebarType = {}));
|
|
267
|
+
var baseSidebarItemSchema = external_exports.object({
|
|
268
|
+
uid: nanoidSchema,
|
|
269
|
+
title: external_exports.string().trim().min(1),
|
|
270
|
+
type: external_exports.enum(SidebarType),
|
|
271
|
+
link: external_exports.string().optional(),
|
|
272
|
+
icon: projectIconSchema.optional(),
|
|
273
|
+
children: external_exports.string().array().optional(),
|
|
274
|
+
description: external_exports.string().optional(),
|
|
275
|
+
show: external_exports.boolean()
|
|
276
|
+
}).meta({ id: "base-sidebar-item" });
|
|
277
|
+
var linkSchema = baseSidebarItemSchema.extend({
|
|
278
|
+
title: external_exports.preprocess((arg) => arg?.trim() || "Link", external_exports.string().trim().min(1)),
|
|
279
|
+
link: external_exports.string(),
|
|
280
|
+
type: external_exports.literal(SidebarType.Link)
|
|
281
|
+
}).meta({ id: "sidebar-link" });
|
|
282
|
+
var pageSchema = baseSidebarItemSchema.extend({
|
|
283
|
+
title: external_exports.preprocess((arg) => arg?.trim() || "Page", external_exports.string().trim().min(1)),
|
|
284
|
+
sidebarTitle: external_exports.string().optional(),
|
|
285
|
+
description: external_exports.string(),
|
|
286
|
+
children: external_exports.string().array().default([]),
|
|
287
|
+
type: external_exports.literal(SidebarType.Page),
|
|
288
|
+
defaultOpen: external_exports.boolean().optional(),
|
|
289
|
+
yjsReference: external_exports.string(),
|
|
290
|
+
backgroundImage: external_exports.string().optional(),
|
|
291
|
+
icon: projectIconSchema.optional(),
|
|
292
|
+
/**
|
|
293
|
+
* Automatically set during sync builds when we map markdown and mdx files to pages
|
|
294
|
+
*
|
|
295
|
+
* Used by the Vue builds to determine how to render a given page item.
|
|
296
|
+
*/
|
|
297
|
+
isMdx: external_exports.boolean().default(false),
|
|
298
|
+
/**
|
|
299
|
+
* Automatically set during sync builds when we map HTML files to pages.
|
|
300
|
+
*/
|
|
301
|
+
isHtml: external_exports.boolean().default(false)
|
|
302
|
+
}).meta({ id: "sidebar-page" });
|
|
303
|
+
var defaultPage = () => ({
|
|
304
|
+
uid: nanoid(),
|
|
305
|
+
title: "Getting Started",
|
|
306
|
+
type: SidebarType.Page,
|
|
307
|
+
description: "Start writing your API Documentation with our platform",
|
|
308
|
+
children: [],
|
|
309
|
+
show: true,
|
|
310
|
+
yjsReference: nanoid(),
|
|
311
|
+
isMdx: false,
|
|
312
|
+
isHtml: false
|
|
313
|
+
});
|
|
314
|
+
var folderSchema = baseSidebarItemSchema.extend({
|
|
315
|
+
title: external_exports.preprocess((arg) => arg?.trim() || "Folder", external_exports.string().trim().min(1)),
|
|
316
|
+
children: external_exports.string().array().default([]),
|
|
317
|
+
type: external_exports.literal(SidebarType.Folder),
|
|
318
|
+
defaultOpen: external_exports.boolean().optional()
|
|
319
|
+
}).meta({ id: "sidebar-folder" });
|
|
320
|
+
var sidebarItemSchema = external_exports.union([linkSchema, pageSchema, folderSchema]).meta({ id: "sidebar-item" });
|
|
321
|
+
var sidebarSchema = external_exports.object({
|
|
322
|
+
/** Complete record of ALL sidebar items */
|
|
323
|
+
items: external_exports.record(external_exports.string(), sidebarItemSchema),
|
|
324
|
+
/** Ordered list of the direct children */
|
|
325
|
+
children: external_exports.string().array()
|
|
326
|
+
}).overwrite((val) => {
|
|
327
|
+
const hasPage = Object.values(val.items).some((item) => item.type === SidebarType.Page);
|
|
328
|
+
if (!hasPage) {
|
|
329
|
+
const firstPage = defaultPage();
|
|
330
|
+
val.items[firstPage.uid] = firstPage;
|
|
331
|
+
val.children.push(firstPage.uid);
|
|
332
|
+
}
|
|
333
|
+
return val;
|
|
334
|
+
}).meta({ id: "sidebar" });
|
|
335
|
+
|
|
335
336
|
// ../../packages/entities/dist/project/version/guide.js
|
|
336
337
|
var guideSchema = external_exports.object({
|
|
337
338
|
/** Unique identifier for the guide */
|
|
@@ -498,29 +499,36 @@ var logoSchema = external_exports.object({
|
|
|
498
499
|
}).meta({ id: "logo" });
|
|
499
500
|
var sharedProjectSchema = entitySchema.extend({
|
|
500
501
|
/** Name of the project */
|
|
501
|
-
name: external_exports.string(),
|
|
502
|
+
name: external_exports.string().meta({ examples: ["Acme Documentation"] }),
|
|
502
503
|
/** Record of the last successful deployment */
|
|
503
504
|
activeDeployment: activeDeploymentSchema.nullable().default(null),
|
|
504
505
|
/** Track last published timestamp to allow build interrupts */
|
|
505
506
|
lastPublished: timestampSchema.nullable().default(null),
|
|
506
507
|
/** Uid of the most recent publish record (failed or successful) */
|
|
507
|
-
lastPublishedUid: external_exports.string().nullable().default(null),
|
|
508
|
+
lastPublishedUid: external_exports.string().nullable().default(null).meta({ examples: ["PakgbKJ5m9gl0JDMbcJqL"] }),
|
|
508
509
|
/** Uid of the login portal customization object for private projects */
|
|
509
|
-
loginPortalUid: external_exports.string().default(""),
|
|
510
|
+
loginPortalUid: external_exports.string().default("").meta({ examples: ["LakgbKJ5m9gl0JDMbcJqL"] }),
|
|
510
511
|
/** HTTPS endpoint that enriches signed-in visitors, synced from the site config; empty when unset */
|
|
511
|
-
userInfoHookUrl: external_exports.string().default(""),
|
|
512
|
+
userInfoHookUrl: external_exports.string().default("").meta({ examples: ["https://example.com/hooks/user-info"] }),
|
|
513
|
+
/**
|
|
514
|
+
* The uid of the team secret user-info hook requests are signed with, in
|
|
515
|
+
* the auth secret store. Null for a project whose secret is still the
|
|
516
|
+
* local record in `user-info-hook-secrets`, keyed by the project uid, or
|
|
517
|
+
* that has none.
|
|
518
|
+
*/
|
|
519
|
+
userInfoHookSecretUid: nanoidSchema.nullish(),
|
|
512
520
|
/** Active theme id for the project */
|
|
513
|
-
activeThemeId: external_exports.string().default(""),
|
|
521
|
+
activeThemeId: external_exports.string().default("").meta({ examples: ["TakgbKJ5m9gl0JDMbcJqL"] }),
|
|
514
522
|
/** Typesense id for the project */
|
|
515
|
-
typesenseId: external_exports.number().optional(),
|
|
523
|
+
typesenseId: external_exports.number().optional().meta({ examples: [42] }),
|
|
516
524
|
/** Private projects require a login from a user in an access group */
|
|
517
|
-
isPrivate: external_exports.boolean().default(false),
|
|
525
|
+
isPrivate: external_exports.boolean().default(false).meta({ examples: [false] }),
|
|
518
526
|
/** Toggle AI agent features for the docs project */
|
|
519
|
-
agentEnabled: external_exports.boolean().default(false),
|
|
527
|
+
agentEnabled: external_exports.boolean().default(false).meta({ examples: [true] }),
|
|
520
528
|
/** Toggle analytics tracking for the docs project */
|
|
521
|
-
analyticsEnabled: external_exports.boolean().default(true),
|
|
529
|
+
analyticsEnabled: external_exports.boolean().default(true).meta({ examples: [true] }),
|
|
522
530
|
/** Set of allowed access groups */
|
|
523
|
-
accessGroups: scalarSet(external_exports.set(nanoidSchema).max(50)).default([])
|
|
531
|
+
accessGroups: scalarSet(external_exports.set(nanoidSchema).max(50)).default([]).meta({ examples: [["UakgbKJ5m9gl0JDMbcJqL"]] })
|
|
524
532
|
}).meta({ id: "shared-project" });
|
|
525
533
|
var projectSchema = sharedProjectSchema.extend({
|
|
526
534
|
/** Versions of the project */
|
|
@@ -545,16 +553,16 @@ var projectSchema = sharedProjectSchema.extend({
|
|
|
545
553
|
return project;
|
|
546
554
|
}).meta({ id: "project" });
|
|
547
555
|
var githubProjectRepositorySchema = external_exports.object({
|
|
548
|
-
linkedBy: external_exports.string(),
|
|
549
|
-
id: external_exports.number(),
|
|
550
|
-
name: external_exports.string().min(2),
|
|
551
|
-
configPath: external_exports.string().default(""),
|
|
552
|
-
branch: external_exports.string().default(""),
|
|
553
|
-
publishOnMerge: external_exports.boolean().default(false),
|
|
554
|
-
publishPreviews: external_exports.boolean().default(false),
|
|
555
|
-
prComments: external_exports.boolean().default(false),
|
|
556
|
+
linkedBy: external_exports.string().meta({ examples: ["UakgbKJ5m9gl0JDMbcJqL"] }),
|
|
557
|
+
id: external_exports.number().meta({ examples: [123456789] }),
|
|
558
|
+
name: external_exports.string().min(2).meta({ examples: ["Acme Documentation"] }),
|
|
559
|
+
configPath: external_exports.string().default("").meta({ examples: ["scalar.config.json"] }),
|
|
560
|
+
branch: external_exports.string().default("").meta({ examples: ["main"] }),
|
|
561
|
+
publishOnMerge: external_exports.boolean().default(false).meta({ examples: [true] }),
|
|
562
|
+
publishPreviews: external_exports.boolean().default(false).meta({ examples: [true] }),
|
|
563
|
+
prComments: external_exports.boolean().default(false).meta({ examples: [true] }),
|
|
556
564
|
/** One-time repository expired tracking */
|
|
557
|
-
expired: external_exports.boolean().default(false)
|
|
565
|
+
expired: external_exports.boolean().default(false).meta({ examples: [false] })
|
|
558
566
|
}).meta({ id: "github-project-repository" });
|
|
559
567
|
var githubInstallSchema = external_exports.object({
|
|
560
568
|
id: external_exports.number().int(),
|
|
@@ -574,9 +582,9 @@ var githubInstallSchema = external_exports.object({
|
|
|
574
582
|
var githubProjectSchema = sharedProjectSchema.extend({
|
|
575
583
|
slug: slugSchema,
|
|
576
584
|
/** Last publish status info */
|
|
577
|
-
publishStatus: external_exports.string().default(""),
|
|
585
|
+
publishStatus: external_exports.string().default("").meta({ examples: ["published"] }),
|
|
578
586
|
/** Last publish output message */
|
|
579
|
-
publishMessage: external_exports.string().default(""),
|
|
587
|
+
publishMessage: external_exports.string().default("").meta({ examples: ["Documentation published successfully."] }),
|
|
580
588
|
/**
|
|
581
589
|
*
|
|
582
590
|
* Reference info for the link repository
|
|
@@ -651,9 +659,9 @@ var remoteActivitySchema = external_exports.object({
|
|
|
651
659
|
actorName: external_exports.string().nullable()
|
|
652
660
|
}).meta({ id: "docs-project-remote-activity" });
|
|
653
661
|
var docsProjectSchema = sharedProjectSchema.extend({
|
|
654
|
-
slug: slugSchema,
|
|
655
|
-
publishStatus: external_exports.string().default(""),
|
|
656
|
-
publishMessage: external_exports.string().default(""),
|
|
662
|
+
slug: slugSchema.meta({ examples: ["acme-api"] }),
|
|
663
|
+
publishStatus: external_exports.string().default("").meta({ examples: ["published"] }),
|
|
664
|
+
publishMessage: external_exports.string().default("").meta({ examples: ["Documentation published successfully."] }),
|
|
657
665
|
repository: docsProjectRepositorySchema,
|
|
658
666
|
/**
|
|
659
667
|
* `.catch(undefined)` so a malformed bump degrades to "no signal" instead
|
|
@@ -685,12 +693,19 @@ var publishRecordSchema = entitySchema.extend({
|
|
|
685
693
|
deployedAt: external_exports.number().nullable().default(null),
|
|
686
694
|
message: external_exports.string().default(""),
|
|
687
695
|
/**
|
|
688
|
-
* The build succeeded but logged a warning
|
|
689
|
-
*
|
|
690
|
-
* Only meaningful on a deployed publish.
|
|
696
|
+
* The build succeeded but logged a warning the author should act on — a
|
|
697
|
+
* missing asset, feed or registry document, or a v1 config that was
|
|
698
|
+
* upgraded for the build. Only meaningful on a deployed publish.
|
|
691
699
|
*/
|
|
692
700
|
hasWarnings: external_exports.boolean().default(false),
|
|
693
701
|
domain: external_exports.string().default(""),
|
|
702
|
+
/**
|
|
703
|
+
* The Scalar subdomain prepare allocated alongside `domain`. The build
|
|
704
|
+
* reports a subdomain when it finishes, but the completion handler
|
|
705
|
+
* aliases the deploy from this record, never from that report. Null on
|
|
706
|
+
* records prepared before it was stamped.
|
|
707
|
+
*/
|
|
708
|
+
subdomain: external_exports.string().nullable().default(null),
|
|
694
709
|
preview: external_exports.boolean().optional().default(false),
|
|
695
710
|
/**
|
|
696
711
|
* Whether this publish may comment its preview URL on the pull requests
|
|
@@ -712,16 +727,41 @@ var publishRecordSchema = entitySchema.extend({
|
|
|
712
727
|
uid: nanoidSchema,
|
|
713
728
|
version: external_exports.string()
|
|
714
729
|
}).array().optional().default([]),
|
|
715
|
-
|
|
730
|
+
/**
|
|
731
|
+
* The MCP server and environment the site's agent answers from: what the
|
|
732
|
+
* docs host's `/mcp` serves, and whether the site shows the agent at all.
|
|
733
|
+
* Null on a preview or when the project's agent is off or unbound.
|
|
734
|
+
*/
|
|
735
|
+
mcpAddress: external_exports.object({
|
|
736
|
+
namespace: external_exports.string(),
|
|
737
|
+
slug: external_exports.string(),
|
|
738
|
+
environment: external_exports.string(),
|
|
739
|
+
/**
|
|
740
|
+
* The server's record uid, which the docs host's `/mcp` is served by
|
|
741
|
+
* so a rename or a namespace move does not break it. Absent on records
|
|
742
|
+
* published before it was stamped, which are served by namespace and
|
|
743
|
+
* slug.
|
|
744
|
+
*/
|
|
745
|
+
mcpServerUid: external_exports.string().nullish()
|
|
746
|
+
}).nullable().default(null)
|
|
716
747
|
}).meta({ id: "publish-record" });
|
|
717
748
|
|
|
749
|
+
// ../../packages/entities/dist/project/preview-sandbox.js
|
|
750
|
+
var previewSandboxSchema = entitySchema.extend({
|
|
751
|
+
uid: external_exports.string().min(1).max(128).regex(/^[A-Za-z0-9_-]+$/),
|
|
752
|
+
teamUid: brandedUid(),
|
|
753
|
+
userUid: brandedUid(),
|
|
754
|
+
expiresAt: external_exports.date()
|
|
755
|
+
}).meta({ id: "preview-sandbox" });
|
|
756
|
+
var previewSandboxIdSchema = previewSandboxSchema.shape.uid;
|
|
757
|
+
|
|
718
758
|
// ../../packages/entities/dist/theme/index.js
|
|
719
759
|
var themeSchema = external_exports.object({
|
|
720
|
-
uid: nanoidSchema,
|
|
721
|
-
name: external_exports.string(),
|
|
722
|
-
description: external_exports.string(),
|
|
723
|
-
theme: external_exports.string(),
|
|
724
|
-
slug: slugSchema
|
|
760
|
+
uid: nanoidSchema.meta({ examples: ["UakgbKJ5m9gl0JDMbcJqL"] }),
|
|
761
|
+
name: external_exports.string().meta({ examples: ["Acme Theme"] }),
|
|
762
|
+
description: external_exports.string().meta({ examples: ["Custom colors for Acme documentation."] }),
|
|
763
|
+
theme: external_exports.string().meta({ examples: [":root { --scalar-color-1: #1f2937; }"] }),
|
|
764
|
+
slug: slugSchema.meta({ examples: ["acme-theme"] })
|
|
725
765
|
}).meta({ id: "theme" });
|
|
726
766
|
|
|
727
767
|
// ../../packages/entities/dist/project/signup.js
|
|
@@ -736,9 +776,7 @@ var signupDataSchema = external_exports.object({
|
|
|
736
776
|
export {
|
|
737
777
|
activeDeploymentSchema,
|
|
738
778
|
customProjectIconSchema,
|
|
739
|
-
SidebarType,
|
|
740
779
|
sharedProjectSchema,
|
|
741
|
-
projectSchema,
|
|
742
780
|
githubInstallSchema,
|
|
743
781
|
githubProjectSchema,
|
|
744
782
|
docsProjectSchema,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
output
|
|
4
|
+
} from "./chunk-T5HJUAWB.js";
|
|
5
|
+
|
|
6
|
+
// src/helpers/node-version.ts
|
|
7
|
+
import semver from "semver";
|
|
8
|
+
function checkNodeVersion() {
|
|
9
|
+
const currentVersion = process.version;
|
|
10
|
+
if (!semver.satisfies(currentVersion, ">=24")) {
|
|
11
|
+
output.error().title("Unsupported Node.js version").message(
|
|
12
|
+
`Current Node.js version: ${currentVersion}
|
|
13
|
+
Minimum required version: ${">=24"}
|
|
14
|
+
Upgrade Node.js and run the command again.
|
|
15
|
+
Visit https://nodejs.org to download the latest version.`
|
|
16
|
+
).exit("error");
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
checkNodeVersion
|
|
22
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
formatAbsoluteTime
|
|
4
|
+
} from "./chunk-AEFPCC4U.js";
|
|
5
|
+
|
|
6
|
+
// src/helpers/format-list-time.ts
|
|
7
|
+
function formatListTime(timestamp, now) {
|
|
8
|
+
const elapsed = now - timestamp * 1e3;
|
|
9
|
+
if (elapsed < 0 || elapsed >= 24 * 60 * 60 * 1e3) {
|
|
10
|
+
return formatAbsoluteTime(timestamp * 1e3);
|
|
11
|
+
}
|
|
12
|
+
if (elapsed < 60 * 1e3) return "just now";
|
|
13
|
+
const minutes = Math.floor(elapsed / (60 * 1e3));
|
|
14
|
+
if (minutes < 60) return `${minutes} minute${minutes === 1 ? "" : "s"} ago`;
|
|
15
|
+
const hours = Math.floor(minutes / 60);
|
|
16
|
+
return `${hours} hour${hours === 1 ? "" : "s"} ago`;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
formatListTime
|
|
21
|
+
};
|