@scalar/cli 2.10.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.
Files changed (99) hide show
  1. package/README.md +82 -1290
  2. package/chunks/{action-YSVTZVKV.js → action-25QMCP5G.js} +37 -26
  3. package/chunks/{action-X7BA7PQQ.js → action-2VF6LODL.js} +20 -18
  4. package/chunks/{action-5N3P43MD.js → action-5I4XDPPG.js} +16 -15
  5. package/chunks/action-6M5PTDF6.js +100 -0
  6. package/chunks/{action-PAM2EZ22.js → action-73ELLN3T.js} +8 -7
  7. package/chunks/{action-XOADBXSX.js → action-7H3AWCHX.js} +17 -16
  8. package/chunks/{action-KDUFU7TZ.js → action-BRSLSOE5.js} +19 -16
  9. package/chunks/{action-7XOHYWYM.js → action-CQQCKSNS.js} +13 -15
  10. package/chunks/action-D5QWDNQ2.js +65 -0
  11. package/chunks/{action-5RL4NWUZ.js → action-DQDHBOLJ.js} +33 -30
  12. package/chunks/{action-DKDRAIKV.js → action-EYPYQQVM.js} +13 -15
  13. package/chunks/{action-ZFI77WA5.js → action-FMA5ECUA.js} +10 -10
  14. package/chunks/{action-DTEO4YNX.js → action-GXDJLF2G.js} +13 -11
  15. package/chunks/{action-657A4K2D.js → action-HUICEXJZ.js} +26 -23
  16. package/chunks/action-IH6G77C5.js +38 -0
  17. package/chunks/{action-H3RTILLM.js → action-IIQMZVRJ.js} +1 -1
  18. package/chunks/action-IQM54ITT.js +164 -0
  19. package/chunks/{action-EAUTQ77U.js → action-J5TO3UJW.js} +26 -24
  20. package/chunks/{action-UUL6SWV4.js → action-KC3ZCNDR.js} +12 -14
  21. package/chunks/{action-HT42NUUX.js → action-L7TMS3Q3.js} +40 -38
  22. package/chunks/{action-GWYYTUTM.js → action-LAAHRDSR.js} +5 -5
  23. package/chunks/{action-5LF4XYHX.js → action-LR75GHBA.js} +12 -12
  24. package/chunks/{action-PPTFYZWD.js → action-MJMLQFLT.js} +12 -12
  25. package/chunks/action-NHU4CUKT.js +130 -0
  26. package/chunks/{action-4GZI2M5B.js → action-NKTFNFU7.js} +19 -17
  27. package/chunks/{action-CB55NWAU.js → action-NMW5WPD2.js} +9 -9
  28. package/chunks/{action-GFLRD7LO.js → action-OTPXODUE.js} +8 -8
  29. package/chunks/{action-R4PGILN4.js → action-RPCDNGCI.js} +47 -36
  30. package/chunks/{action-TOBU74JH.js → action-RQCXSJPZ.js} +51 -27
  31. package/chunks/{action-JEYDBB3P.js → action-SOYSVG67.js} +15 -15
  32. package/chunks/action-Y7EBKCUU.js +16 -0
  33. package/chunks/{action-XLE37MZL.js → action-YN4TE7TG.js} +23 -22
  34. package/chunks/{action-CABLS46Q.js → action-ZGNVWTHZ.js} +11 -11
  35. package/chunks/{action-4W5GUGEG.js → action-ZKKRPLDK.js} +20 -19
  36. package/chunks/{action-ZKA3RR3S.js → action-ZUZL7R3H.js} +18 -17
  37. package/chunks/{actions-3SAMH7A5.js → actions-S6K76HCW.js} +23 -20
  38. package/chunks/{agent-2ESZI7NO.js → agent-IRNEV4K5.js} +44 -9
  39. package/chunks/{asyncapi-4HGVM3PR.js → asyncapi-WQPIQMEZ.js} +13 -12
  40. package/chunks/{build.action-VBGFGACM.js → build.action-CLBVKFWD.js} +28 -26
  41. package/chunks/chunk-25XERWCE.js +1058 -0
  42. package/chunks/{chunk-35Z7VTJT.js → chunk-3RIUDHLG.js} +52 -38
  43. package/chunks/{chunk-ZYBLQ5CT.js → chunk-3TFOA64C.js} +9 -4
  44. package/chunks/{chunk-CWVYOXXM.js → chunk-4JKXZ5CF.js} +11 -7
  45. package/chunks/{chunk-XAGJJNQW.js → chunk-5L7V7RCH.js} +10 -10
  46. package/chunks/{chunk-KZNRQVMY.js → chunk-ALYM4ZB2.js} +1 -1
  47. package/chunks/chunk-AVZFSWPD.js +37 -0
  48. package/chunks/{chunk-GYRQPDTK.js → chunk-BQYVSPAI.js} +14 -2
  49. package/chunks/{chunk-UDBSV3CK.js → chunk-CSSTCHHF.js} +6083 -4167
  50. package/chunks/{chunk-ZGNDXPLU.js → chunk-DQD2753S.js} +3 -3
  51. package/chunks/{action-F2ZJNURT.js → chunk-EBNFCIKS.js} +7 -10
  52. package/chunks/{chunk-ATNTXKMS.js → chunk-F3OPMYME.js} +118 -38
  53. package/chunks/{chunk-KHF2QXBG.js → chunk-FG5AOTDN.js} +1433 -641
  54. package/chunks/{chunk-K2HIB5BA.js → chunk-GKCVATQJ.js} +3 -3
  55. package/chunks/{chunk-BIMLCGKS.js → chunk-GMHIK5K2.js} +1 -1
  56. package/chunks/{chunk-5SMP756H.js → chunk-GYR5E6RB.js} +2 -2
  57. package/chunks/{chunk-MC4EMNOR.js → chunk-HZN6IIPZ.js} +7 -6
  58. package/chunks/{chunk-VVRUSQCY.js → chunk-I57ID5K7.js} +13 -0
  59. package/chunks/{chunk-VYFGRLVQ.js → chunk-KOD2HX5I.js} +1 -1
  60. package/chunks/{chunk-ZKJPLWRJ.js → chunk-LOLVJNI5.js} +4 -4
  61. package/chunks/{chunk-GLWTVLKM.js → chunk-MN2AFJXM.js} +9 -2
  62. package/chunks/{chunk-WB6PWTMU.js → chunk-N5CJ5MTY.js} +1 -1
  63. package/chunks/{chunk-JXGF5EHC.js → chunk-NWJ37GI2.js} +23 -13
  64. package/chunks/{chunk-3ZJYGGAA.js → chunk-ORCUZITN.js} +1 -1
  65. package/chunks/{chunk-H467HDVV.js → chunk-QMLRYD76.js} +1 -1
  66. package/chunks/{chunk-43WALAW3.js → chunk-SEURG74P.js} +64 -115
  67. package/chunks/{chunk-G4HRW2FZ.js → chunk-SOV4POMS.js} +366 -253
  68. package/chunks/chunk-T34TL6KL.js +222 -0
  69. package/chunks/{chunk-WDIWLXLV.js → chunk-U6VE6JOS.js} +3 -3
  70. package/chunks/{chunk-MMWSCTDB.js → chunk-UFSFY7Z4.js} +19 -19
  71. package/chunks/{chunk-WIEXQUTD.js → chunk-ULRJZXMS.js} +1 -1
  72. package/chunks/{chunk-DHZW7Q7U.js → chunk-US54KYOJ.js} +2 -4
  73. package/chunks/{chunk-36LXIJIZ.js → chunk-V6LUKXBV.js} +1 -16
  74. package/chunks/{chunk-6M7TL2G2.js → chunk-VRZSDUZK.js} +45 -5
  75. package/chunks/chunk-VUXPDHTQ.js +22 -0
  76. package/chunks/chunk-XP5UM7SF.js +21 -0
  77. package/chunks/{chunk-IPZP3VRA.js → chunk-Y6XGC4K5.js} +5 -21
  78. package/chunks/{create.action-DBNIS665.js → create.action-ITEOQ644.js} +34 -32
  79. package/chunks/{delete.action-K7BLK7DK.js → delete.action-77MFPLUN.js} +29 -27
  80. package/chunks/{delete.action-GBOZC45K.js → delete.action-C6VX4S5Q.js} +30 -28
  81. package/chunks/{get.action-N3JOY3OU.js → get.action-3BP4FHZC.js} +16 -15
  82. package/chunks/{get.action-QHKMYZBK.js → get.action-LNBOWUVE.js} +24 -20
  83. package/chunks/{list.action-6SSO3JVN.js → list.action-6CRFQPJT.js} +39 -29
  84. package/chunks/{list.action-TJCS6UEY.js → list.action-KR5YIDR4.js} +37 -26
  85. package/chunks/{publish.action-T24VHRMR.js → publish.action-YBORRPBM.js} +45 -43
  86. package/chunks/{scripts-VIBLGKYG.js → scripts-6CI6U32J.js} +1 -1
  87. package/chunks/{update.action-VOE6PH5F.js → update.action-O7TSXDGV.js} +29 -27
  88. package/chunks/{update.action-OGYNBXRU.js → update.action-QZI7M2MV.js} +30 -28
  89. package/index.js +283 -278
  90. package/package.json +2 -2
  91. package/skills/scalar-cli/SKILL.md +49 -49
  92. package/template.md +66 -253
  93. package/chunks/action-FBRY5JKU.js +0 -37
  94. package/chunks/action-LYCNT3KA.js +0 -73
  95. package/chunks/action-OJ2NK25F.js +0 -121
  96. package/chunks/action-U2L5DCFG.js +0 -91
  97. package/chunks/chunk-MNNGUUKJ.js +0 -405
  98. package/chunks/chunk-ZGVZU6L2.js +0 -422
  99. package/docs.html +0 -6977
@@ -0,0 +1,222 @@
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-25XERWCE.js";
8
+ import {
9
+ environmentSlugSchema
10
+ } from "./chunk-AVZFSWPD.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/deploy.js
43
+ var subpathSchema = external_exports.object({
44
+ subpath: external_exports.string(),
45
+ projectUid: external_exports.string(),
46
+ /**
47
+ * The project's own title, for labelling it in cross-project search.
48
+ * Written on publish, so it is absent until the project next publishes.
49
+ */
50
+ name: external_exports.string().optional(),
51
+ /**
52
+ * The project's active publish, used to cache-bust its search index the
53
+ * way a project already busts its own. Absent until it next publishes.
54
+ */
55
+ publishUid: external_exports.string().optional(),
56
+ /**
57
+ * Present only for sites still served by Typesense. Builds on the jsonl
58
+ * search backend omit it; federated search fetches `${subpath}/search-entries.jsonl`.
59
+ */
60
+ typesenseConfig: typesenseConfigSchema.optional().nullable()
61
+ }).meta({ id: "subpath" });
62
+ var cloudflareHttpTokenSchema = external_exports.object({
63
+ /** URL path, e.g. `/.well-known/pki-validation/ca3-<id>.txt` */
64
+ path: external_exports.string(),
65
+ /** Plain-text response body the token path must answer with */
66
+ body: external_exports.string()
67
+ }).meta({ id: "cloudflare-http-token" });
68
+ var cloudflareHostnameStateSchema = external_exports.object({
69
+ /** Custom hostname id in the Cloudflare zone */
70
+ hostnameId: external_exports.string(),
71
+ /** Hostname ownership status reported by Cloudflare (pending, active, …) */
72
+ status: external_exports.string(),
73
+ /** Certificate status reported by Cloudflare (pending_validation, active, …) */
74
+ sslStatus: external_exports.string(),
75
+ httpTokens: cloudflareHttpTokenSchema.array().default([]),
76
+ /** Unix seconds of the reconciler run that last wrote this state */
77
+ syncedAt: external_exports.number()
78
+ }).meta({ id: "cloudflare-hostname-state" });
79
+ var siteDeploySchema = entitySchema.extend({
80
+ domain: external_exports.string(),
81
+ teamUid: nanoidSchema,
82
+ projectUid: nanoidSchema,
83
+ /**
84
+ * Title of the project mounted at the domain root.
85
+ *
86
+ * The root project is deliberately not one of `subpaths` — both request
87
+ * matchers resolve by longest path prefix, so a '/' entry would become a
88
+ * catch-all that every request matched. It is denormalized here instead so
89
+ * search can name and scope it without a second lookup.
90
+ */
91
+ rootName: external_exports.string().optional(),
92
+ subpaths: subpathSchema.array().default([]),
93
+ cloudflare: cloudflareHostnameStateSchema.optional().nullable()
94
+ }).meta({ id: "site-deploy" });
95
+ var searchConfigRootSchema = external_exports.object({
96
+ projectUid: external_exports.string(),
97
+ name: external_exports.string().optional()
98
+ }).meta({ id: "search-config-root" });
99
+ var searchConfigResponseSchema = external_exports.object({
100
+ subpaths: subpathSchema.array(),
101
+ root: searchConfigRootSchema.optional()
102
+ }).meta({ id: "search-config-response" });
103
+
104
+ // ../../packages/entities/dist/mcp-server/schema.js
105
+ var openApiServersSchema = external_exports.array(external_exports.looseObject({
106
+ url: external_exports.string().min(1),
107
+ description: external_exports.string().optional(),
108
+ variables: external_exports.record(external_exports.string(), external_exports.looseObject({
109
+ default: external_exports.string(),
110
+ enum: external_exports.string().array().optional()
111
+ })).optional()
112
+ }));
113
+ var openApiSecurityRequirementsSchema = external_exports.array(external_exports.record(external_exports.string(), external_exports.array(external_exports.string())));
114
+ var openApiOauthFlowSchema = external_exports.looseObject({
115
+ authorizationUrl: external_exports.string().optional(),
116
+ tokenUrl: external_exports.string().optional(),
117
+ refreshUrl: external_exports.string().optional(),
118
+ scopes: external_exports.record(external_exports.string(), external_exports.string()).optional()
119
+ });
120
+ var openApiSecuritySchemeSchema = external_exports.discriminatedUnion("type", [
121
+ external_exports.looseObject({
122
+ type: external_exports.literal("apiKey"),
123
+ name: external_exports.string().min(1),
124
+ in: external_exports.enum(["query", "header", "cookie"])
125
+ }),
126
+ external_exports.looseObject({ type: external_exports.literal("http"), scheme: external_exports.string().min(1) }),
127
+ external_exports.looseObject({
128
+ type: external_exports.literal("oauth2"),
129
+ flows: external_exports.looseObject({
130
+ implicit: openApiOauthFlowSchema.optional(),
131
+ password: openApiOauthFlowSchema.optional(),
132
+ clientCredentials: openApiOauthFlowSchema.optional(),
133
+ authorizationCode: openApiOauthFlowSchema.optional()
134
+ })
135
+ }),
136
+ external_exports.looseObject({
137
+ type: external_exports.literal("openIdConnect"),
138
+ openIdConnectUrl: external_exports.string().min(1)
139
+ }),
140
+ external_exports.looseObject({ type: external_exports.literal("mutualTLS") })
141
+ ]);
142
+ var mcpChannelSettingsSchema = external_exports.object({
143
+ /** OpenAPI root `servers`. Operation- and path-level servers in the document still apply. */
144
+ servers: openApiServersSchema.optional(),
145
+ /** OpenAPI root `security`. */
146
+ security: openApiSecurityRequirementsSchema.optional(),
147
+ /** OpenAPI `components.securitySchemes`, with `x-scalar-secret-*` fields set to `{{ secrets.NAME }}` references and Scalar's own scheme marked `x-scalar-access: true`. */
148
+ securitySchemes: external_exports.record(external_exports.string(), openApiSecuritySchemeSchema).optional()
149
+ });
150
+ var MCP_CHANNEL_CONFIG_MAX_BYTES = 5 * 1024 * 1024;
151
+ var MCP_SERVER_ENVIRONMENTS_MAX_BYTES = 12 * 1024 * 1024;
152
+ var MCP_SERVER_ENVIRONMENTS_BODY_LIMIT = 2 * MCP_SERVER_ENVIRONMENTS_MAX_BYTES;
153
+ var MCP_ENVIRONMENTS_WHOLE_MATCH_MAX_BYTES = 2 * 1024 * 1024;
154
+ var MCP_CHANNEL_CONFIG_TOO_LARGE = `A Config is at most ${MCP_CHANNEL_CONFIG_MAX_BYTES / 1024 / 1024} MB of JSON`;
155
+ var MCP_SERVER_ENVIRONMENTS_TOO_LARGE = `A server's Configs are at most ${MCP_SERVER_ENVIRONMENTS_MAX_BYTES / 1024 / 1024} MB of JSON together`;
156
+ var mcpChannelConfigBytes = (config) => new TextEncoder().encode(JSON.stringify(config)).length;
157
+ var configMappingSchema = external_exports.record(external_exports.string(), external_exports.unknown());
158
+ var mcpChannelConfigSchema = external_exports.looseObject({
159
+ servers: external_exports.array(external_exports.unknown()).optional(),
160
+ security: external_exports.array(external_exports.unknown()).optional(),
161
+ paths: external_exports.record(external_exports.string(), configMappingSchema).optional(),
162
+ components: external_exports.looseObject({
163
+ securitySchemes: external_exports.record(external_exports.string(), configMappingSchema).optional()
164
+ }).optional(),
165
+ "x-scalar-expose": external_exports.unknown().optional()
166
+ }).refine((config) => mcpChannelConfigBytes(config) <= MCP_CHANNEL_CONFIG_MAX_BYTES, { message: MCP_CHANNEL_CONFIG_TOO_LARGE });
167
+ var mcpEnvironmentSchema = external_exports.object({
168
+ /** Per API channel, keyed by the agent document uid: the channel's Config in this environment. */
169
+ channels: external_exports.record(external_exports.string(), mcpChannelConfigSchema).optional(),
170
+ /** Who may sign in on a Scalar-fronted environment. */
171
+ accessGroups: external_exports.string().array().optional(),
172
+ loginPortalUid: external_exports.string().nullable().optional(),
173
+ piiRedaction: external_exports.boolean().optional(),
174
+ credentialRedaction: external_exports.boolean().optional(),
175
+ /** Whether the environment's build pointer advances on its own. */
176
+ policy: external_exports.enum(mcpEnvironmentPolicies).optional()
177
+ });
178
+ var mcpServerRecordSchema = baseRegistrySchema.extend({
179
+ /** Own uid, branded so it cannot be confused with another entity's uid */
180
+ uid: brandedUid().default(mintUid).meta({ default: "nanoid()" }),
181
+ /** A custom domain the server is served from, when one is configured. */
182
+ domain: external_exports.string().nullable().default(null),
183
+ /**
184
+ * The Cloudflare custom hostname behind `domain`, mirrored by the edge
185
+ * cache sync. Absent until the sync has provisioned it.
186
+ */
187
+ cloudflare: cloudflareHostnameStateSchema.optional().nullable(),
188
+ /**
189
+ * When core last asked the sync to re-read the hostname from Cloudflare,
190
+ * in Unix milliseconds. The sync's own refresh schedule ends ten minutes
191
+ * after a claim, and core holds no Cloudflare credentials, so a domain
192
+ * check that finds the CNAME in place but the certificate not yet active
193
+ * stamps this for the sync to pick up.
194
+ */
195
+ domainRefreshRequestedAt: external_exports.number().nullable().optional(),
196
+ /**
197
+ * Mirrored from the agent's row, which writes both on create, on every
198
+ * link change and on conversion. A record from before the channel
199
+ * backfill reads as `multi` with no channels.
200
+ */
201
+ channelMode: external_exports.enum(mcpChannelModes).default("multi"),
202
+ /** The server's upstreams, which are the dependency graph's edges. */
203
+ channels: mcpServerChannelSchema.array().default([]),
204
+ /**
205
+ * The server's environments, keyed by environment slug, each a slug in
206
+ * the team's environment list. Production's entry holds the server's own
207
+ * settings and every other entry overrides it field by field.
208
+ */
209
+ environments: external_exports.record(environmentSlugSchema, mcpEnvironmentSchema).default({ production: {} }),
210
+ /**
211
+ * Bumped by every write of `environments`, which compare-and-sets on it:
212
+ * a guard as small as a number, where the value itself can be megabytes.
213
+ * Null on a record no write has stamped yet.
214
+ */
215
+ environmentsRevision: external_exports.number().int().nonnegative().nullish()
216
+ }).meta({ id: "mcp-server-record" });
217
+
218
+ export {
219
+ cloudflareHostnameStateSchema,
220
+ siteDeploySchema,
221
+ mcpEnvironmentSchema
222
+ };
@@ -1,15 +1,15 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  getAuthData
4
- } from "./chunk-35Z7VTJT.js";
4
+ } from "./chunk-3RIUDHLG.js";
5
5
  import {
6
6
  config
7
- } from "./chunk-WB6PWTMU.js";
7
+ } from "./chunk-N5CJ5MTY.js";
8
8
  import {
9
9
  external_exports,
10
10
  objectSchema,
11
11
  schemaModel
12
- } from "./chunk-VVRUSQCY.js";
12
+ } from "./chunk-I57ID5K7.js";
13
13
 
14
14
  // ../../packages/mongobase-client/dist/database/access.js
15
15
  var primitiveSchema = external_exports.union([
@@ -1,16 +1,32 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  RegistryAsset
4
- } from "./chunk-GLWTVLKM.js";
4
+ } from "./chunk-MN2AFJXM.js";
5
5
  import {
6
6
  contentShaSchema
7
- } from "./chunk-MNNGUUKJ.js";
7
+ } from "./chunk-25XERWCE.js";
8
8
  import {
9
9
  docVersionSchema,
10
10
  external_exports,
11
11
  namespaceSchema,
12
12
  nanoidSchema
13
- } from "./chunk-VVRUSQCY.js";
13
+ } from "./chunk-I57ID5K7.js";
14
+
15
+ // ../../packages/urls/dist/publish/full.js
16
+ function getPublishUrl(domain, subpath) {
17
+ const url = `https://${domain}${subpath ?? ""}`;
18
+ return new URL(url).toString();
19
+ }
20
+
21
+ // ../../packages/urls/dist/publish/previews.js
22
+ function getPublishPreviewUrl(publishUid, domain, subpath = "") {
23
+ const url = `https://${getPublishPreviewDomain(publishUid, domain)}${subpath ?? ""}`;
24
+ new URL(url);
25
+ return url;
26
+ }
27
+ function getPublishPreviewDomain(publishUid, domain) {
28
+ return `${publishUid}--${domain}`;
29
+ }
14
30
 
15
31
  // ../../packages/urls/dist/registry/path-generators.js
16
32
  function versionFormat(version) {
@@ -190,22 +206,6 @@ function registry(teamNamespace) {
190
206
  var artifactUidSchema = nanoidSchema.regex(/^[a-zA-Z0-9_-]+$/, "Artifact uids must be a single path segment");
191
207
  var artifactLanguageSchema = external_exports.string().regex(/^[a-z0-9]+$/, "Artifact languages must be a single path segment");
192
208
 
193
- // ../../packages/urls/dist/publish/full.js
194
- function getPublishUrl(domain, subpath) {
195
- const url = `https://${domain}${subpath ?? ""}`;
196
- return new URL(url).toString();
197
- }
198
-
199
- // ../../packages/urls/dist/publish/previews.js
200
- function getPublishPreviewUrl(publishUid, domain, subpath = "") {
201
- const url = `https://${getPublishPreviewDomain(publishUid, domain)}${subpath ?? ""}`;
202
- new URL(url);
203
- return url;
204
- }
205
- function getPublishPreviewDomain(publishUid, domain) {
206
- return `${publishUid}--${domain}`;
207
- }
208
-
209
209
  export {
210
210
  getPublishUrl,
211
211
  getPublishPreviewUrl,
@@ -1,7 +1,7 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  userSchema
4
- } from "./chunk-ZYBLQ5CT.js";
4
+ } from "./chunk-3TFOA64C.js";
5
5
 
6
6
  // src/domains/team/helpers.ts
7
7
  var getUserTeams = async (client, email) => {
@@ -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.10.0";
5
+ var version = "2.11.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: "A command-line interface to work with OpenAPI files",
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:*",
@@ -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(`Watch ${file}`).print();
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-VVRUSQCY.js";
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 meaning the site is missing
689
- * something the author expects — an asset, a feed, a registry document.
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
- agentToken: external_exports.string().nullable().default(null)
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"] }),
@@ -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
+ };
@@ -1,8 +1,7 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
- baseRegistrySchema,
4
- contentShaSchema
5
- } from "./chunk-MNNGUUKJ.js";
3
+ baseRegistrySchema
4
+ } from "./chunk-25XERWCE.js";
6
5
  import {
7
6
  brandedUid,
8
7
  docVersionSchema,
@@ -13,7 +12,7 @@ import {
13
12
  nanoidSchema,
14
13
  slugSchema,
15
14
  timestampSchema
16
- } from "./chunk-VVRUSQCY.js";
15
+ } from "./chunk-I57ID5K7.js";
17
16
 
18
17
  // ../../packages/entities/dist/sdk/schema.js
19
18
  var SdkLanguage;
@@ -303,25 +302,10 @@ var sdkCodeSampleSchema = external_exports.object({
303
302
  source: external_exports.string()
304
303
  }).meta({ id: "sdk-code-sample" });
305
304
 
306
- // ../../packages/entities/dist/sdk/version.js
307
- var sdkVersionRecordSchema = entitySchema.extend({
308
- /** Own uid, branded so it cannot be confused with another entity's uid */
309
- uid: brandedUid().default(mintUid).meta({ default: "nanoid()" }),
310
- version: docVersionSchema,
311
- /** The exact API version this SDK version was created against. */
312
- apiVersion: docVersionSchema,
313
- apiDocumentHash: external_exports.string().nullish(),
314
- status: sdkVersionStatusSchema,
315
- publishedAt: timestampSchema.nullish(),
316
- changeSource: external_exports.enum(["user", "api-version", "created"]).nullish(),
317
- /** SHA-256 of the config string, naming its blob under the SDK's artifacts. */
318
- configSha: contentShaSchema,
319
- languages: external_exports.enum(SdkLanguage).array(),
320
- targets: external_exports.partialRecord(external_exports.enum(SdkLanguage), sdkVersionTargetStateSchema)
321
- }).meta({ id: "sdk-version-record" });
322
-
323
305
  export {
324
306
  SdkLanguage,
307
+ sdkVersionTargetStateSchema,
308
+ sdkVersionStatusSchema,
325
309
  sdkSchema,
326
310
  sdkBuildSchema
327
311
  };