@scalar/cli 2.10.0 → 2.12.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 -1289
- package/chunks/action-2OPUQFUY.js +164 -0
- package/chunks/{action-4GZI2M5B.js → action-36LZ6XXE.js} +19 -17
- package/chunks/{action-KDUFU7TZ.js → action-3XMTJJRT.js} +19 -16
- package/chunks/{action-R4PGILN4.js → action-6CLEENBI.js} +47 -36
- package/chunks/{action-ZFI77WA5.js → action-7HXYZPOT.js} +10 -10
- package/chunks/{action-X7BA7PQQ.js → action-AC5ENU6Z.js} +20 -18
- package/chunks/{action-PPTFYZWD.js → action-ADGLTNFC.js} +28 -22
- package/chunks/{action-7XOHYWYM.js → action-AOKHLTZ6.js} +25 -21
- package/chunks/{action-XOADBXSX.js → action-AVSJ3AJY.js} +17 -16
- package/chunks/{action-GFLRD7LO.js → action-D3IVCY24.js} +8 -8
- package/chunks/action-EBZJS367.js +130 -0
- package/chunks/{action-ZKA3RR3S.js → action-EZXHSAJ2.js} +18 -17
- package/chunks/{action-5LF4XYHX.js → action-FDTVHVHF.js} +12 -12
- package/chunks/{action-JEYDBB3P.js → action-FUO5F7NV.js} +15 -15
- package/chunks/{action-DKDRAIKV.js → action-HA3CMV3P.js} +13 -15
- package/chunks/{action-YSVTZVKV.js → action-IG3BK2LF.js} +37 -26
- package/chunks/{action-H3RTILLM.js → action-IIQMZVRJ.js} +1 -1
- package/chunks/{action-DTEO4YNX.js → action-JT6C472I.js} +13 -11
- package/chunks/{action-UUL6SWV4.js → action-KDT6H6ML.js} +12 -14
- package/chunks/{action-PAM2EZ22.js → action-KJDIJQ3A.js} +8 -7
- package/chunks/{action-HT42NUUX.js → action-NF5E7JKA.js} +40 -38
- package/chunks/{action-EAUTQ77U.js → action-NIZBME45.js} +26 -24
- package/chunks/{action-CB55NWAU.js → action-O757TFA2.js} +9 -9
- package/chunks/{action-XLE37MZL.js → action-ONR7QSN7.js} +23 -22
- package/chunks/{action-5RL4NWUZ.js → action-QM2BMMHG.js} +33 -30
- package/chunks/{action-GWYYTUTM.js → action-QVTAZCKY.js} +5 -5
- package/chunks/action-SLB52XRG.js +65 -0
- package/chunks/{action-CABLS46Q.js → action-UTFRCKGE.js} +11 -11
- package/chunks/{action-4W5GUGEG.js → action-VESBFIP3.js} +20 -19
- package/chunks/{action-657A4K2D.js → action-VGFAIFYE.js} +26 -23
- package/chunks/action-WCU5O2VT.js +100 -0
- package/chunks/{action-TOBU74JH.js → action-XS5EESHW.js} +51 -27
- package/chunks/action-XVNRZ5VX.js +38 -0
- package/chunks/action-Y7EBKCUU.js +16 -0
- package/chunks/{action-5N3P43MD.js → action-YWQ2OKS3.js} +16 -15
- package/chunks/{actions-3SAMH7A5.js → actions-6QG7LH7P.js} +23 -20
- package/chunks/{agent-2ESZI7NO.js → agent-ONXROEAE.js} +44 -9
- package/chunks/{asyncapi-4HGVM3PR.js → asyncapi-7IFXAIE3.js} +13 -12
- package/chunks/{build.action-VBGFGACM.js → build.action-FI4OWY3T.js} +28 -26
- package/chunks/{chunk-ZGNDXPLU.js → chunk-26VIHQGL.js} +3 -3
- package/chunks/{chunk-JXGF5EHC.js → chunk-3HCEUGOE.js} +42 -13
- package/chunks/{chunk-G4HRW2FZ.js → chunk-5TNKTLQP.js} +370 -254
- package/chunks/{chunk-XAGJJNQW.js → chunk-BB6WWG25.js} +10 -10
- package/chunks/{chunk-K2HIB5BA.js → chunk-BCFUMXMC.js} +3 -3
- package/chunks/{action-F2ZJNURT.js → chunk-EBNFCIKS.js} +7 -10
- package/chunks/{chunk-MC4EMNOR.js → chunk-EJSGWV2K.js} +7 -6
- package/chunks/{chunk-GYRQPDTK.js → chunk-FJCOYEKT.js} +139 -3
- package/chunks/{chunk-ZKJPLWRJ.js → chunk-HU47OMI4.js} +4 -4
- package/chunks/{chunk-VVRUSQCY.js → chunk-I57ID5K7.js} +13 -0
- package/chunks/{chunk-43WALAW3.js → chunk-JLNHOA5Z.js} +64 -115
- package/chunks/{chunk-5SMP756H.js → chunk-LCSU43NJ.js} +2 -2
- package/chunks/{chunk-KHF2QXBG.js → chunk-N645RGAB.js} +1853 -683
- package/chunks/{chunk-3ZJYGGAA.js → chunk-ORCUZITN.js} +1 -1
- package/chunks/{chunk-H467HDVV.js → chunk-PERC34BV.js} +1 -1
- package/chunks/chunk-Q26DFKTY.js +37 -0
- package/chunks/{chunk-MMWSCTDB.js → chunk-QJQTSRU4.js} +19 -19
- package/chunks/{chunk-WDIWLXLV.js → chunk-RLBS4HJT.js} +3 -3
- package/chunks/{chunk-ATNTXKMS.js → chunk-RNZVZMYC.js} +198 -42
- package/chunks/{chunk-IPZP3VRA.js → chunk-RYWXF3LO.js} +12 -21
- package/chunks/{chunk-CWVYOXXM.js → chunk-SNOAL2C5.js} +11 -7
- package/chunks/{chunk-UDBSV3CK.js → chunk-T3R66THO.js} +6085 -4167
- package/chunks/{chunk-VYFGRLVQ.js → chunk-U73OW57G.js} +1 -1
- package/chunks/chunk-U764PQUA.js +1034 -0
- package/chunks/{chunk-KZNRQVMY.js → chunk-UAFCSWQ6.js} +1 -1
- package/chunks/{chunk-WB6PWTMU.js → chunk-UBLFIMUA.js} +1 -1
- package/chunks/{chunk-WIEXQUTD.js → chunk-UODTHS76.js} +1 -1
- package/chunks/chunk-V3MYP5SQ.js +247 -0
- package/chunks/{chunk-36LXIJIZ.js → chunk-V6LUKXBV.js} +1 -16
- package/chunks/{chunk-6M7TL2G2.js → chunk-VRZSDUZK.js} +45 -5
- package/chunks/{chunk-GLWTVLKM.js → chunk-VUNOOPEG.js} +9 -2
- package/chunks/chunk-VUXPDHTQ.js +22 -0
- package/chunks/{chunk-DHZW7Q7U.js → chunk-VVQOFG76.js} +2 -4
- package/chunks/chunk-XP5UM7SF.js +21 -0
- package/chunks/{chunk-ZYBLQ5CT.js → chunk-Y6C3H27E.js} +9 -4
- package/chunks/{chunk-35Z7VTJT.js → chunk-YTFFBGNQ.js} +52 -38
- package/chunks/{chunk-BIMLCGKS.js → chunk-ZNLMQKDU.js} +1 -1
- package/chunks/{create.action-DBNIS665.js → create.action-PPMZEMZL.js} +34 -32
- package/chunks/{delete.action-GBOZC45K.js → delete.action-GDOHATRZ.js} +30 -28
- package/chunks/{delete.action-K7BLK7DK.js → delete.action-VAHKEHEU.js} +29 -27
- package/chunks/{get.action-QHKMYZBK.js → get.action-UXFTGO7W.js} +24 -20
- package/chunks/{get.action-N3JOY3OU.js → get.action-XON3EZDT.js} +16 -15
- package/chunks/{list.action-TJCS6UEY.js → list.action-24F5WDGR.js} +37 -26
- package/chunks/{list.action-6SSO3JVN.js → list.action-OQEAEJ5U.js} +39 -29
- package/chunks/{publish.action-T24VHRMR.js → publish.action-G7FPDRBZ.js} +45 -43
- package/chunks/{scripts-VIBLGKYG.js → scripts-6CI6U32J.js} +1 -1
- package/chunks/{update.action-VOE6PH5F.js → update.action-IFIFXZWA.js} +29 -27
- package/chunks/{update.action-OGYNBXRU.js → update.action-MJDHVVR3.js} +30 -28
- package/index.js +290 -284
- package/package.json +2 -2
- package/skills/scalar-cli/SKILL.md +49 -49
- package/template.md +68 -252
- package/chunks/action-FBRY5JKU.js +0 -37
- package/chunks/action-LYCNT3KA.js +0 -73
- package/chunks/action-OJ2NK25F.js +0 -121
- package/chunks/action-U2L5DCFG.js +0 -91
- package/chunks/chunk-MNNGUUKJ.js +0 -405
- package/chunks/chunk-ZGVZU6L2.js +0 -422
- package/docs.html +0 -6977
|
@@ -2,7 +2,7 @@ import { createRequire as $$cR } from "node:module"; const require = $$cR(import
|
|
|
2
2
|
import {
|
|
3
3
|
getPublishPreviewUrl,
|
|
4
4
|
getPublishUrl
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QJQTSRU4.js";
|
|
6
6
|
|
|
7
7
|
// src/domains/project/publish/url.ts
|
|
8
8
|
function getPublishDeploymentUrl(publish) {
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
baseRegistrySchema,
|
|
4
|
+
mcpChannelModes,
|
|
5
|
+
mcpEnvironmentPolicies,
|
|
6
|
+
mcpServerChannelSchema
|
|
7
|
+
} from "./chunk-U764PQUA.js";
|
|
8
|
+
import {
|
|
9
|
+
environmentSlugSchema
|
|
10
|
+
} from "./chunk-Q26DFKTY.js";
|
|
11
|
+
import {
|
|
12
|
+
brandedUid,
|
|
13
|
+
entitySchema,
|
|
14
|
+
external_exports,
|
|
15
|
+
mintUid,
|
|
16
|
+
nanoidSchema
|
|
17
|
+
} from "./chunk-I57ID5K7.js";
|
|
18
|
+
|
|
19
|
+
// ../../packages/entities/dist/publish/publish.js
|
|
20
|
+
var headingRecordSchema = external_exports.object({
|
|
21
|
+
slug: external_exports.string(),
|
|
22
|
+
name: external_exports.string(),
|
|
23
|
+
level: external_exports.coerce.number().int(),
|
|
24
|
+
uid: nanoidSchema,
|
|
25
|
+
parent: external_exports.string().optional(),
|
|
26
|
+
isPageTitle: external_exports.boolean().optional(),
|
|
27
|
+
/** `timeline-item` for a changelog entry (`scalar-timeline-item`). Absent for headings. */
|
|
28
|
+
kind: external_exports.enum(["timeline-item"]).optional(),
|
|
29
|
+
/** Secondary TOC line for a changelog entry, usually its date */
|
|
30
|
+
description: external_exports.string().optional()
|
|
31
|
+
}).meta({ id: "heading-record" });
|
|
32
|
+
var publishAssetSchema = external_exports.object({
|
|
33
|
+
path: external_exports.string(),
|
|
34
|
+
data: external_exports.string()
|
|
35
|
+
}).meta({ id: "publish-asset" });
|
|
36
|
+
var typesenseConfigSchema = external_exports.object({
|
|
37
|
+
keyId: external_exports.number(),
|
|
38
|
+
keyValue: external_exports.string(),
|
|
39
|
+
collectionName: external_exports.string()
|
|
40
|
+
}).meta({ id: "typesense-config" });
|
|
41
|
+
|
|
42
|
+
// ../../packages/entities/dist/deploys/constants.js
|
|
43
|
+
var helpfulReasons = [
|
|
44
|
+
"solved-problem",
|
|
45
|
+
"easy-to-follow",
|
|
46
|
+
"good-examples"
|
|
47
|
+
];
|
|
48
|
+
var unhelpfulReasons = [
|
|
49
|
+
"inaccurate",
|
|
50
|
+
"unclear",
|
|
51
|
+
"missing-information",
|
|
52
|
+
"broken-example",
|
|
53
|
+
"other"
|
|
54
|
+
];
|
|
55
|
+
var FEEDBACK_PATH_MAX_LENGTH = 2048;
|
|
56
|
+
var FEEDBACK_BODY_LIMIT = FEEDBACK_PATH_MAX_LENGTH + 512;
|
|
57
|
+
|
|
58
|
+
// ../../packages/entities/dist/deploys/deploy.js
|
|
59
|
+
var subpathSchema = external_exports.object({
|
|
60
|
+
subpath: external_exports.string(),
|
|
61
|
+
projectUid: external_exports.string(),
|
|
62
|
+
/**
|
|
63
|
+
* The project's own title, for labelling it in cross-project search.
|
|
64
|
+
* Written on publish, so it is absent until the project next publishes.
|
|
65
|
+
*/
|
|
66
|
+
name: external_exports.string().optional(),
|
|
67
|
+
/**
|
|
68
|
+
* The project's active publish, used to cache-bust its search index the
|
|
69
|
+
* way a project already busts its own. Absent until it next publishes.
|
|
70
|
+
*/
|
|
71
|
+
publishUid: external_exports.string().optional(),
|
|
72
|
+
/**
|
|
73
|
+
* Present only for sites still served by Typesense. Builds on the jsonl
|
|
74
|
+
* search backend omit it; federated search fetches `${subpath}/search-entries.jsonl`.
|
|
75
|
+
*/
|
|
76
|
+
typesenseConfig: typesenseConfigSchema.optional().nullable()
|
|
77
|
+
}).meta({ id: "subpath" });
|
|
78
|
+
var cloudflareHttpTokenSchema = external_exports.object({
|
|
79
|
+
/** URL path, e.g. `/.well-known/pki-validation/ca3-<id>.txt` */
|
|
80
|
+
path: external_exports.string(),
|
|
81
|
+
/** Plain-text response body the token path must answer with */
|
|
82
|
+
body: external_exports.string()
|
|
83
|
+
}).meta({ id: "cloudflare-http-token" });
|
|
84
|
+
var cloudflareHostnameStateSchema = external_exports.object({
|
|
85
|
+
/** Custom hostname id in the Cloudflare zone */
|
|
86
|
+
hostnameId: external_exports.string(),
|
|
87
|
+
/** Hostname ownership status reported by Cloudflare (pending, active, …) */
|
|
88
|
+
status: external_exports.string(),
|
|
89
|
+
/** Certificate status reported by Cloudflare (pending_validation, active, …) */
|
|
90
|
+
sslStatus: external_exports.string(),
|
|
91
|
+
httpTokens: cloudflareHttpTokenSchema.array().default([]),
|
|
92
|
+
/** Unix seconds of the reconciler run that last wrote this state */
|
|
93
|
+
syncedAt: external_exports.number()
|
|
94
|
+
}).meta({ id: "cloudflare-hostname-state" });
|
|
95
|
+
var siteDeploySchema = entitySchema.extend({
|
|
96
|
+
domain: external_exports.string(),
|
|
97
|
+
teamUid: nanoidSchema,
|
|
98
|
+
projectUid: nanoidSchema,
|
|
99
|
+
/**
|
|
100
|
+
* Title of the project mounted at the domain root.
|
|
101
|
+
*
|
|
102
|
+
* The root project is deliberately not one of `subpaths` — both request
|
|
103
|
+
* matchers resolve by longest path prefix, so a '/' entry would become a
|
|
104
|
+
* catch-all that every request matched. It is denormalized here instead so
|
|
105
|
+
* search can name and scope it without a second lookup.
|
|
106
|
+
*/
|
|
107
|
+
rootName: external_exports.string().optional(),
|
|
108
|
+
subpaths: subpathSchema.array().default([]),
|
|
109
|
+
cloudflare: cloudflareHostnameStateSchema.optional().nullable()
|
|
110
|
+
}).meta({ id: "site-deploy" });
|
|
111
|
+
var searchConfigRootSchema = external_exports.object({
|
|
112
|
+
projectUid: external_exports.string(),
|
|
113
|
+
name: external_exports.string().optional()
|
|
114
|
+
}).meta({ id: "search-config-root" });
|
|
115
|
+
var searchConfigResponseSchema = external_exports.object({
|
|
116
|
+
subpaths: subpathSchema.array(),
|
|
117
|
+
root: searchConfigRootSchema.optional()
|
|
118
|
+
}).meta({ id: "search-config-response" });
|
|
119
|
+
|
|
120
|
+
// ../../packages/entities/dist/mcp-server/schema.js
|
|
121
|
+
var openApiServersSchema = external_exports.array(external_exports.looseObject({
|
|
122
|
+
url: external_exports.string().min(1),
|
|
123
|
+
description: external_exports.string().optional(),
|
|
124
|
+
variables: external_exports.record(external_exports.string(), external_exports.looseObject({
|
|
125
|
+
default: external_exports.string(),
|
|
126
|
+
enum: external_exports.string().array().optional()
|
|
127
|
+
})).optional()
|
|
128
|
+
}));
|
|
129
|
+
var openApiSecurityRequirementsSchema = external_exports.array(external_exports.record(external_exports.string(), external_exports.array(external_exports.string())));
|
|
130
|
+
var openApiOauthFlowSchema = external_exports.looseObject({
|
|
131
|
+
authorizationUrl: external_exports.string().optional(),
|
|
132
|
+
tokenUrl: external_exports.string().optional(),
|
|
133
|
+
refreshUrl: external_exports.string().optional(),
|
|
134
|
+
scopes: external_exports.record(external_exports.string(), external_exports.string()).optional()
|
|
135
|
+
});
|
|
136
|
+
var openApiSecuritySchemeSchema = external_exports.discriminatedUnion("type", [
|
|
137
|
+
external_exports.looseObject({
|
|
138
|
+
type: external_exports.literal("apiKey"),
|
|
139
|
+
name: external_exports.string().min(1),
|
|
140
|
+
in: external_exports.enum(["query", "header", "cookie"])
|
|
141
|
+
}),
|
|
142
|
+
external_exports.looseObject({ type: external_exports.literal("http"), scheme: external_exports.string().min(1) }),
|
|
143
|
+
external_exports.looseObject({
|
|
144
|
+
type: external_exports.literal("oauth2"),
|
|
145
|
+
flows: external_exports.looseObject({
|
|
146
|
+
implicit: openApiOauthFlowSchema.optional(),
|
|
147
|
+
password: openApiOauthFlowSchema.optional(),
|
|
148
|
+
clientCredentials: openApiOauthFlowSchema.optional(),
|
|
149
|
+
authorizationCode: openApiOauthFlowSchema.optional()
|
|
150
|
+
})
|
|
151
|
+
}),
|
|
152
|
+
external_exports.looseObject({
|
|
153
|
+
type: external_exports.literal("openIdConnect"),
|
|
154
|
+
openIdConnectUrl: external_exports.string().min(1)
|
|
155
|
+
}),
|
|
156
|
+
external_exports.looseObject({ type: external_exports.literal("mutualTLS") })
|
|
157
|
+
]);
|
|
158
|
+
var mcpChannelSettingsSchema = external_exports.object({
|
|
159
|
+
/** OpenAPI root `servers`. Operation- and path-level servers in the document still apply. */
|
|
160
|
+
servers: openApiServersSchema.optional(),
|
|
161
|
+
/** OpenAPI root `security`. */
|
|
162
|
+
security: openApiSecurityRequirementsSchema.optional(),
|
|
163
|
+
/** OpenAPI `components.securitySchemes`, with `x-scalar-secret-*` fields set to `{{ secrets.NAME }}` references and Scalar's own scheme marked `x-scalar-access: true`. */
|
|
164
|
+
securitySchemes: external_exports.record(external_exports.string(), openApiSecuritySchemeSchema).optional()
|
|
165
|
+
});
|
|
166
|
+
var MCP_CHANNEL_CONFIG_MAX_BYTES = 5 * 1024 * 1024;
|
|
167
|
+
var MCP_SERVER_ENVIRONMENTS_MAX_BYTES = 12 * 1024 * 1024;
|
|
168
|
+
var MCP_SERVER_ENVIRONMENTS_BODY_LIMIT = 2 * MCP_SERVER_ENVIRONMENTS_MAX_BYTES;
|
|
169
|
+
var MCP_ENVIRONMENTS_WHOLE_MATCH_MAX_BYTES = 2 * 1024 * 1024;
|
|
170
|
+
var MCP_CHANNEL_CONFIG_TOO_LARGE = `A Config is at most ${MCP_CHANNEL_CONFIG_MAX_BYTES / 1024 / 1024} MB of JSON`;
|
|
171
|
+
var MCP_SERVER_ENVIRONMENTS_TOO_LARGE = `A server's Configs are at most ${MCP_SERVER_ENVIRONMENTS_MAX_BYTES / 1024 / 1024} MB of JSON together`;
|
|
172
|
+
var mcpChannelConfigBytes = (config) => new TextEncoder().encode(JSON.stringify(config)).length;
|
|
173
|
+
var configMappingSchema = external_exports.record(external_exports.string(), external_exports.unknown());
|
|
174
|
+
var mcpChannelConfigSchema = external_exports.looseObject({
|
|
175
|
+
servers: external_exports.array(external_exports.unknown()).optional(),
|
|
176
|
+
security: external_exports.array(external_exports.unknown()).optional(),
|
|
177
|
+
paths: external_exports.record(external_exports.string(), configMappingSchema).optional(),
|
|
178
|
+
components: external_exports.looseObject({
|
|
179
|
+
securitySchemes: external_exports.record(external_exports.string(), configMappingSchema).optional()
|
|
180
|
+
}).optional(),
|
|
181
|
+
"x-scalar-expose": external_exports.unknown().optional()
|
|
182
|
+
}).refine((config) => mcpChannelConfigBytes(config) <= MCP_CHANNEL_CONFIG_MAX_BYTES, { message: MCP_CHANNEL_CONFIG_TOO_LARGE });
|
|
183
|
+
var mcpEnvironmentSchema = external_exports.object({
|
|
184
|
+
/** Per API channel, keyed by the agent document uid: the channel's Config in this environment. */
|
|
185
|
+
channels: external_exports.record(external_exports.string(), mcpChannelConfigSchema).optional(),
|
|
186
|
+
/** Who may sign in on a Scalar-fronted environment. */
|
|
187
|
+
accessGroups: external_exports.string().array().optional(),
|
|
188
|
+
/**
|
|
189
|
+
* Per access group uid, key to the name of the team secret
|
|
190
|
+
* `{{ group.KEY }}` sends for a reader that group admits; `""` is none.
|
|
191
|
+
* Null is none at all, so the environment stops taking production's.
|
|
192
|
+
*/
|
|
193
|
+
groupSecrets: external_exports.record(external_exports.string(), external_exports.record(external_exports.string(), external_exports.string())).nullish(),
|
|
194
|
+
loginPortalUid: external_exports.string().nullable().optional(),
|
|
195
|
+
piiRedaction: external_exports.boolean().optional(),
|
|
196
|
+
credentialRedaction: external_exports.boolean().optional(),
|
|
197
|
+
/** Whether the environment's build pointer advances on its own. */
|
|
198
|
+
policy: external_exports.enum(mcpEnvironmentPolicies).optional()
|
|
199
|
+
});
|
|
200
|
+
var mcpServerRecordSchema = baseRegistrySchema.extend({
|
|
201
|
+
/** Own uid, branded so it cannot be confused with another entity's uid */
|
|
202
|
+
uid: brandedUid().default(mintUid).meta({ default: "nanoid()" }),
|
|
203
|
+
/** A custom domain the server is served from, when one is configured. */
|
|
204
|
+
domain: external_exports.string().nullable().default(null),
|
|
205
|
+
/**
|
|
206
|
+
* The Cloudflare custom hostname behind `domain`, mirrored by the edge
|
|
207
|
+
* cache sync. Absent until the sync has provisioned it.
|
|
208
|
+
*/
|
|
209
|
+
cloudflare: cloudflareHostnameStateSchema.optional().nullable(),
|
|
210
|
+
/**
|
|
211
|
+
* When core last asked the sync to re-read the hostname from Cloudflare,
|
|
212
|
+
* in Unix milliseconds. The sync's own refresh schedule ends ten minutes
|
|
213
|
+
* after a claim, and core holds no Cloudflare credentials, so a domain
|
|
214
|
+
* check that finds the CNAME in place but the certificate not yet active
|
|
215
|
+
* stamps this for the sync to pick up.
|
|
216
|
+
*/
|
|
217
|
+
domainRefreshRequestedAt: external_exports.number().nullable().optional(),
|
|
218
|
+
/**
|
|
219
|
+
* Mirrored from the agent's row, which writes both on create, on every
|
|
220
|
+
* link change and on conversion. A record from before the channel
|
|
221
|
+
* backfill reads as `multi` with no channels.
|
|
222
|
+
*/
|
|
223
|
+
channelMode: external_exports.enum(mcpChannelModes).default("multi"),
|
|
224
|
+
/** The server's upstreams, which are the dependency graph's edges. */
|
|
225
|
+
channels: mcpServerChannelSchema.array().default([]),
|
|
226
|
+
/**
|
|
227
|
+
* The server's environments, keyed by environment slug, each a slug in
|
|
228
|
+
* the team's environment list. Production's entry holds the server's own
|
|
229
|
+
* settings and every other entry overrides it field by field.
|
|
230
|
+
*/
|
|
231
|
+
environments: external_exports.record(environmentSlugSchema, mcpEnvironmentSchema).default({ production: {} }),
|
|
232
|
+
/**
|
|
233
|
+
* Bumped by every write of `environments`, which compare-and-sets on it:
|
|
234
|
+
* a guard as small as a number, where the value itself can be megabytes.
|
|
235
|
+
* Null on a record no write has stamped yet.
|
|
236
|
+
*/
|
|
237
|
+
environmentsRevision: external_exports.number().int().nonnegative().nullish()
|
|
238
|
+
}).meta({ id: "mcp-server-record" });
|
|
239
|
+
|
|
240
|
+
export {
|
|
241
|
+
helpfulReasons,
|
|
242
|
+
unhelpfulReasons,
|
|
243
|
+
FEEDBACK_PATH_MAX_LENGTH,
|
|
244
|
+
cloudflareHostnameStateSchema,
|
|
245
|
+
siteDeploySchema,
|
|
246
|
+
mcpEnvironmentSchema
|
|
247
|
+
};
|
|
@@ -6,20 +6,6 @@ import {
|
|
|
6
6
|
output
|
|
7
7
|
} from "./chunk-T5HJUAWB.js";
|
|
8
8
|
|
|
9
|
-
// src/helpers/node-version.ts
|
|
10
|
-
import semver from "semver";
|
|
11
|
-
function checkNodeVersion() {
|
|
12
|
-
const currentVersion = process.version;
|
|
13
|
-
if (!semver.satisfies(currentVersion, ">=24")) {
|
|
14
|
-
output.error().title("Node.js version incompatible").message(
|
|
15
|
-
`Current Node.js version: ${currentVersion}
|
|
16
|
-
Minimum required version: ${">=24"}
|
|
17
|
-
Please upgrade your Node.js version and try again.
|
|
18
|
-
Visit https://nodejs.org to download the latest version.`
|
|
19
|
-
).exit("error");
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
9
|
// src/helpers/watch-file.ts
|
|
24
10
|
import fs from "node:fs";
|
|
25
11
|
import path from "node:path";
|
|
@@ -33,7 +19,7 @@ var watchFile = async (file, callback, options) => {
|
|
|
33
19
|
if (!fs.existsSync(absoluteFilePath)) {
|
|
34
20
|
throw new Error(`File ${absoluteFilePath} does not exist`);
|
|
35
21
|
}
|
|
36
|
-
output.info().title(`
|
|
22
|
+
output.info().title(`Watching ${file}`).print();
|
|
37
23
|
const watcher = chokidar.watch(absoluteFilePath, { persistent: true });
|
|
38
24
|
watcher.on("change", () => {
|
|
39
25
|
callback();
|
|
@@ -47,6 +33,5 @@ var watchFile = async (file, callback, options) => {
|
|
|
47
33
|
};
|
|
48
34
|
|
|
49
35
|
export {
|
|
50
|
-
checkNodeVersion,
|
|
51
36
|
watchFile
|
|
52
37
|
};
|
|
@@ -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,7 +9,7 @@ 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({
|
|
@@ -509,6 +510,13 @@ var sharedProjectSchema = entitySchema.extend({
|
|
|
509
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
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
521
|
activeThemeId: external_exports.string().default("").meta({ examples: ["TakgbKJ5m9gl0JDMbcJqL"] }),
|
|
514
522
|
/** Typesense id for the project */
|
|
@@ -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,9 +727,34 @@ 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
760
|
uid: nanoidSchema.meta({ examples: ["UakgbKJ5m9gl0JDMbcJqL"] }),
|
|
@@ -2,14 +2,14 @@ import { createRequire as $$cR } from "node:module"; const require = $$cR(import
|
|
|
2
2
|
import {
|
|
3
3
|
baseRegistrySchema,
|
|
4
4
|
docVersionToolSchema
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-U764PQUA.js";
|
|
6
6
|
import {
|
|
7
7
|
brandedUid,
|
|
8
8
|
docVersionSchema,
|
|
9
9
|
external_exports,
|
|
10
10
|
mintUid,
|
|
11
11
|
nanoidSchema
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-I57ID5K7.js";
|
|
13
13
|
|
|
14
14
|
// ../../packages/entities/dist/rule/default-data.js
|
|
15
15
|
var scalarRuleset = `extends: spectral:oas
|
|
@@ -89,6 +89,13 @@ var managedDocSchema = baseRegistrySchema.extend({
|
|
|
89
89
|
* Absent until the document goes through the instance-based ingest path.
|
|
90
90
|
*/
|
|
91
91
|
latestVersion: docVersionSchema.optional(),
|
|
92
|
+
/**
|
|
93
|
+
* The head of every line other than production, keyed by environment tag:
|
|
94
|
+
* its highest version and the version it serves by default. Production's
|
|
95
|
+
* head stays on `latestVersion` and `version`; read any line through
|
|
96
|
+
* `docHead`.
|
|
97
|
+
*/
|
|
98
|
+
heads: external_exports.record(external_exports.string(), external_exports.object({ latest: docVersionSchema, current: docVersionSchema })).default({}),
|
|
92
99
|
/**
|
|
93
100
|
* @deprecated Never read anywhere — superseded by `source` on the base
|
|
94
101
|
* registry schema. Dropped at decommission.
|
|
@@ -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
|
+
};
|
|
@@ -2,14 +2,14 @@ import { createRequire as $$cR } from "node:module"; const require = $$cR(import
|
|
|
2
2
|
|
|
3
3
|
// package.json
|
|
4
4
|
var name = "@scalar/cli";
|
|
5
|
-
var version = "2.
|
|
5
|
+
var version = "2.12.0";
|
|
6
6
|
var bin = {
|
|
7
7
|
scalar: "./dist/index.js",
|
|
8
8
|
"scalar-cli": "./dist/index.js"
|
|
9
9
|
};
|
|
10
10
|
var package_default = {
|
|
11
11
|
name,
|
|
12
|
-
description: "
|
|
12
|
+
description: "Validate, lint, bundle, mock, and preview OpenAPI and AsyncAPI descriptions, and publish them to Scalar",
|
|
13
13
|
keywords: [
|
|
14
14
|
"scalar",
|
|
15
15
|
"openapi",
|
|
@@ -59,9 +59,7 @@ var package_default = {
|
|
|
59
59
|
"@hono/node-server": "catalog:*",
|
|
60
60
|
"@quobix/vacuum": "catalog:*",
|
|
61
61
|
"@scalar-org/api-document-lint": "workspace:*",
|
|
62
|
-
"@scalar-org/css": "workspace:*",
|
|
63
62
|
"@scalar-org/entities": "workspace:*",
|
|
64
|
-
"@scalar-org/guide-render": "workspace:*",
|
|
65
63
|
"@scalar-org/helpers": "workspace:*",
|
|
66
64
|
"@scalar-org/mongobase-client": "workspace:*",
|
|
67
65
|
"@scalar-org/oauth": "workspace:*",
|
|
@@ -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
|
+
};
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
emailAllowanceSchema,
|
|
4
4
|
teamImageSchema,
|
|
5
5
|
teamNameSchema
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FJCOYEKT.js";
|
|
7
7
|
import {
|
|
8
8
|
brandedUid,
|
|
9
9
|
emailSchema,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
mintUid,
|
|
13
13
|
timestampSchema,
|
|
14
14
|
zod_default
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-I57ID5K7.js";
|
|
16
16
|
|
|
17
17
|
// ../../packages/entities/dist/user/bitbucket.js
|
|
18
18
|
var userBitbucketSchema = entitySchema.extend({
|
|
@@ -22,6 +22,12 @@ var userBitbucketSchema = entitySchema.extend({
|
|
|
22
22
|
refreshExpiry: timestampSchema
|
|
23
23
|
}).meta({ id: "user-bitbucket" });
|
|
24
24
|
|
|
25
|
+
// ../../packages/entities/dist/user/forgejo.js
|
|
26
|
+
var userForgejoSchema = entitySchema.extend({
|
|
27
|
+
/** Personal access token with repository read and write scope */
|
|
28
|
+
token: external_exports.string()
|
|
29
|
+
}).meta({ id: "user-forgejo" });
|
|
30
|
+
|
|
25
31
|
// ../../packages/entities/dist/user/github.js
|
|
26
32
|
var userGithubSchema = entitySchema.extend({
|
|
27
33
|
token: zod_default.string(),
|
|
@@ -33,6 +39,7 @@ var userGithubSchema = entitySchema.extend({
|
|
|
33
39
|
// ../../packages/entities/dist/user/password.js
|
|
34
40
|
var userPasswordSchema = entitySchema.extend({
|
|
35
41
|
passwordHash: external_exports.string().nullable().default(null),
|
|
42
|
+
passwordSetAt: external_exports.number().int().nullable().default(null),
|
|
36
43
|
salt: external_exports.string().nullable().default(null),
|
|
37
44
|
password: external_exports.string().nullable().default(null),
|
|
38
45
|
passwordDeprecatedExp: external_exports.number().nullable().default(null)
|
|
@@ -82,8 +89,6 @@ var userSchema = entitySchema.extend({
|
|
|
82
89
|
activeTeamId: zod_default.string().brand().nullable().meta({ examples: ["GakgbKJ5m9gl0JDMbcJqL"] }),
|
|
83
90
|
hasGithub: zod_default.boolean().optional().default(false).meta({ examples: [true] }),
|
|
84
91
|
hasBitbucket: zod_default.boolean().optional().default(false),
|
|
85
|
-
/** Forgejo personal access token for git operations */
|
|
86
|
-
forgejoToken: zod_default.string().optional(),
|
|
87
92
|
/**
|
|
88
93
|
* Invite emails this user has sent from teams without a paid plan, in the
|
|
89
94
|
* current day and month.
|