@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
|
@@ -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,27 +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-
|
|
4
|
+
} from "./chunk-3RIUDHLG.js";
|
|
5
5
|
import {
|
|
6
6
|
config
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-N5CJ5MTY.js";
|
|
8
8
|
import {
|
|
9
9
|
external_exports,
|
|
10
10
|
objectSchema,
|
|
11
11
|
schemaModel
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
|
|
14
|
-
// ../../packages/mongobase-client/dist/auth/tokens.js
|
|
15
|
-
var tokenResponseSchema = external_exports.object({
|
|
16
|
-
accessToken: external_exports.string(),
|
|
17
|
-
refreshToken: external_exports.string()
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
// ../../packages/mongobase-client/dist/auth/utility.js
|
|
21
|
-
var ErrorCode;
|
|
22
|
-
(function(ErrorCode2) {
|
|
23
|
-
ErrorCode2["AuthFail"] = "auth-fail";
|
|
24
|
-
})(ErrorCode || (ErrorCode = {}));
|
|
12
|
+
} from "./chunk-I57ID5K7.js";
|
|
25
13
|
|
|
26
14
|
// ../../packages/mongobase-client/dist/database/access.js
|
|
27
15
|
var primitiveSchema = external_exports.union([
|
|
@@ -1,15 +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-
|
|
4
|
+
} from "./chunk-MN2AFJXM.js";
|
|
5
5
|
import {
|
|
6
6
|
contentShaSchema
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-25XERWCE.js";
|
|
8
8
|
import {
|
|
9
9
|
docVersionSchema,
|
|
10
10
|
external_exports,
|
|
11
|
-
namespaceSchema
|
|
12
|
-
|
|
11
|
+
namespaceSchema,
|
|
12
|
+
nanoidSchema
|
|
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
|
+
}
|
|
13
30
|
|
|
14
31
|
// ../../packages/urls/dist/registry/path-generators.js
|
|
15
32
|
function versionFormat(version) {
|
|
@@ -186,22 +203,8 @@ function registry(teamNamespace) {
|
|
|
186
203
|
workspaces: (slug) => buildAsset(namespace, RegistryAsset.Workspaces, slug)
|
|
187
204
|
};
|
|
188
205
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
function getPublishUrl(domain, subpath) {
|
|
192
|
-
const url = `https://${domain}${subpath ?? ""}`;
|
|
193
|
-
return new URL(url).toString();
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
// ../../packages/urls/dist/publish/previews.js
|
|
197
|
-
function getPublishPreviewUrl(publishUid, domain, subpath = "") {
|
|
198
|
-
const url = `https://${getPublishPreviewDomain(publishUid, domain)}${subpath ?? ""}`;
|
|
199
|
-
new URL(url);
|
|
200
|
-
return url;
|
|
201
|
-
}
|
|
202
|
-
function getPublishPreviewDomain(publishUid, domain) {
|
|
203
|
-
return `${publishUid}--${domain}`;
|
|
204
|
-
}
|
|
206
|
+
var artifactUidSchema = nanoidSchema.regex(/^[a-zA-Z0-9_-]+$/, "Artifact uids must be a single path segment");
|
|
207
|
+
var artifactLanguageSchema = external_exports.string().regex(/^[a-z0-9]+$/, "Artifact languages must be a single path segment");
|
|
205
208
|
|
|
206
209
|
export {
|
|
207
210
|
getPublishUrl,
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// package.json
|
|
4
|
+
var name = "@scalar/cli";
|
|
5
|
+
var version = "2.11.0";
|
|
6
|
+
var bin = {
|
|
7
|
+
scalar: "./dist/index.js",
|
|
8
|
+
"scalar-cli": "./dist/index.js"
|
|
9
|
+
};
|
|
10
|
+
var package_default = {
|
|
11
|
+
name,
|
|
12
|
+
description: "Validate, lint, bundle, mock, and preview OpenAPI and AsyncAPI descriptions, and publish them to Scalar",
|
|
13
|
+
keywords: [
|
|
14
|
+
"scalar",
|
|
15
|
+
"openapi",
|
|
16
|
+
"swagger",
|
|
17
|
+
"cli"
|
|
18
|
+
],
|
|
19
|
+
version,
|
|
20
|
+
author: "Copyright API Documentation Inc. 2026",
|
|
21
|
+
license: "UNLICENSED",
|
|
22
|
+
private: true,
|
|
23
|
+
engines: {
|
|
24
|
+
node: ">=24"
|
|
25
|
+
},
|
|
26
|
+
scripts: {
|
|
27
|
+
build: "tsx esbuild.ts",
|
|
28
|
+
"cli:link": "pnpm run build && npm unlink -g @scalar/cli && npm link",
|
|
29
|
+
dev: "pnpm build && dotenv -o -- pnpm start",
|
|
30
|
+
"generate:docs": "pnpm build && pnpm start readme generate --output README.md",
|
|
31
|
+
"package:portable": "tsx portable/build.ts",
|
|
32
|
+
start: "node dist-tar-unpack/index.js",
|
|
33
|
+
"test:cli": "NODE_ENV=INTEGRATION dotenv -o -- vitest --config test/vitest.config.ts test/**",
|
|
34
|
+
"test:portable": "vitest run --config portable/vitest.config.ts",
|
|
35
|
+
"test:unit": "vitest src portable",
|
|
36
|
+
"types:check": "tsc --noEmit"
|
|
37
|
+
},
|
|
38
|
+
type: "module",
|
|
39
|
+
exports: {
|
|
40
|
+
".": {
|
|
41
|
+
import: "./dist/index.js",
|
|
42
|
+
types: "./dist/index.d.ts",
|
|
43
|
+
default: "./dist/index.js"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
files: [
|
|
47
|
+
"dist"
|
|
48
|
+
],
|
|
49
|
+
homepage: "https://github.com/scalar/scalar",
|
|
50
|
+
bugs: "https://github.com/scalar/scalar/issues/new/choose",
|
|
51
|
+
repository: {
|
|
52
|
+
type: "git",
|
|
53
|
+
url: "git+https://github.com/scalar/scalar.git",
|
|
54
|
+
directory: "projects/cli"
|
|
55
|
+
},
|
|
56
|
+
bin,
|
|
57
|
+
dependencies: {
|
|
58
|
+
"@clack/prompts": "catalog:*",
|
|
59
|
+
"@hono/node-server": "catalog:*",
|
|
60
|
+
"@quobix/vacuum": "catalog:*",
|
|
61
|
+
"@scalar-org/api-document-lint": "workspace:*",
|
|
62
|
+
"@scalar-org/entities": "workspace:*",
|
|
63
|
+
"@scalar-org/helpers": "workspace:*",
|
|
64
|
+
"@scalar-org/mongobase-client": "workspace:*",
|
|
65
|
+
"@scalar-org/oauth": "workspace:*",
|
|
66
|
+
"@scalar-org/scalar-config": "workspace:*",
|
|
67
|
+
"@scalar-org/service-api": "workspace:*",
|
|
68
|
+
"@scalar-org/tokens": "workspace:*",
|
|
69
|
+
"@scalar-org/urls": "workspace:*",
|
|
70
|
+
"@scalar/asyncapi-upgrader": "catalog:scalar",
|
|
71
|
+
"@scalar/asyncapi-validator": "catalog:scalar",
|
|
72
|
+
"@scalar/json-magic": "catalog:scalar",
|
|
73
|
+
"@scalar/mock-server": "catalog:scalar",
|
|
74
|
+
"@scalar/openapi-to-markdown": "catalog:scalar",
|
|
75
|
+
"@scalar/openapi-upgrader": "catalog:scalar",
|
|
76
|
+
"@scalar/openapi-validator": "catalog:scalar",
|
|
77
|
+
"@scalar/postman-to-openapi": "catalog:scalar",
|
|
78
|
+
"@scalar/void-server": "catalog:scalar",
|
|
79
|
+
"@scalar/workspace-store": "catalog:scalar",
|
|
80
|
+
"@stoplight/spectral-core": "catalog:*",
|
|
81
|
+
"@stoplight/spectral-parsers": "catalog:*",
|
|
82
|
+
"@stoplight/spectral-ruleset-bundler": "catalog:*",
|
|
83
|
+
"@stoplight/spectral-rulesets": "catalog:*",
|
|
84
|
+
ansis: "catalog:*",
|
|
85
|
+
chokidar: "catalog:*",
|
|
86
|
+
commander: "catalog:*",
|
|
87
|
+
"console-table-printer": "catalog:*",
|
|
88
|
+
"get-port": "catalog:*",
|
|
89
|
+
hono: "catalog:*",
|
|
90
|
+
ignore: "catalog:*",
|
|
91
|
+
"jsonc-parser": "catalog:*",
|
|
92
|
+
nanoid: "catalog:*",
|
|
93
|
+
neverpanic: "catalog:*",
|
|
94
|
+
prettyjson: "catalog:*",
|
|
95
|
+
semver: "catalog:*",
|
|
96
|
+
"stdout-update": "catalog:*",
|
|
97
|
+
"tar-fs": "catalog:*",
|
|
98
|
+
undici: "catalog:*",
|
|
99
|
+
yaml: "catalog:*"
|
|
100
|
+
},
|
|
101
|
+
devDependencies: {
|
|
102
|
+
"@fastify/static": "catalog:*",
|
|
103
|
+
"@scalar-org/api-framework": "workspace:*",
|
|
104
|
+
"@scalar-org/mongobase": "workspace:*",
|
|
105
|
+
"@scalar-org/random-slug": "workspace:*",
|
|
106
|
+
"@scalar-org/ssg-docs": "workspace:*",
|
|
107
|
+
"@scalar-org/test-helpers": "workspace:*",
|
|
108
|
+
"@scalar/galaxy": "catalog:scalar",
|
|
109
|
+
"@scalar/helpers": "catalog:scalar",
|
|
110
|
+
"@scalar/openapi-types": "catalog:scalar",
|
|
111
|
+
"@scalar/themes": "catalog:scalar",
|
|
112
|
+
"@types/node": "catalog:*",
|
|
113
|
+
"@types/prettyjson": "catalog:*",
|
|
114
|
+
"@types/semver": "catalog:*",
|
|
115
|
+
"@types/tar-fs": "catalog:*",
|
|
116
|
+
esbuild: "catalog:*",
|
|
117
|
+
fastify: "catalog:*",
|
|
118
|
+
"remark-gfm": "catalog:*",
|
|
119
|
+
"remark-parse": "catalog:*",
|
|
120
|
+
"strip-ansi": "catalog:*",
|
|
121
|
+
unified: "catalog:*",
|
|
122
|
+
vite: "catalog:*"
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export {
|
|
127
|
+
name,
|
|
128
|
+
version,
|
|
129
|
+
bin,
|
|
130
|
+
package_default
|
|
131
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
isUrl
|
|
4
|
+
} from "./chunk-4ORL4MST.js";
|
|
5
|
+
import {
|
|
6
|
+
output
|
|
7
|
+
} from "./chunk-T5HJUAWB.js";
|
|
8
|
+
|
|
9
|
+
// src/helpers/watch-file.ts
|
|
10
|
+
import fs from "node:fs";
|
|
11
|
+
import path from "node:path";
|
|
12
|
+
import chokidar from "chokidar";
|
|
13
|
+
var watchFile = async (file, callback, options) => {
|
|
14
|
+
if (isUrl(file)) {
|
|
15
|
+
setInterval(callback, 5e3);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const absoluteFilePath = path.resolve(file);
|
|
19
|
+
if (!fs.existsSync(absoluteFilePath)) {
|
|
20
|
+
throw new Error(`File ${absoluteFilePath} does not exist`);
|
|
21
|
+
}
|
|
22
|
+
output.info().title(`Watching ${file}`).print();
|
|
23
|
+
const watcher = chokidar.watch(absoluteFilePath, { persistent: true });
|
|
24
|
+
watcher.on("change", () => {
|
|
25
|
+
callback();
|
|
26
|
+
});
|
|
27
|
+
if (options?.immediate) {
|
|
28
|
+
callback();
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
unsubscribe: () => watcher.close()
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
watchFile
|
|
37
|
+
};
|