@scalar/cli 2.1.0 → 2.5.1
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 +28 -24
- package/chunks/{action-CYP4VDK3.js → action-37EV4UHW.js} +12 -35
- package/chunks/{action-MENXFJH3.js → action-4XI7XJR4.js} +9 -9
- package/chunks/{action-H5OHT2GV.js → action-5IU77OII.js} +7 -3
- package/chunks/{action-STIEAXOE.js → action-B3KKREWQ.js} +16 -5
- package/chunks/{action-BYZUBXVB.js → action-CH24QGTE.js} +8 -4
- package/chunks/action-F3UX5E3M.js +522 -0
- package/chunks/{action-GB6DM53B.js → action-FDB7NEOK.js} +21 -10
- package/chunks/action-FIXBOJEW.js +244 -0
- package/chunks/{action-DFKHSDFV.js → action-G26LSVZ7.js} +7 -3
- package/chunks/{action-Q5UJ32D6.js → action-H3RTILLM.js} +1 -1
- package/chunks/{action-GEBRPNRT.js → action-HGBBV353.js} +15 -16
- package/chunks/{action-5R5FDF6S.js → action-IUE4IOWO.js} +67 -22
- package/chunks/{action-TPBKPHNS.js → action-JZLZ7ZAD.js} +22 -22
- package/chunks/action-LA6KVAXQ.js +374 -0
- package/chunks/{action-PVDDRIM6.js → action-M7RQKBSB.js} +65 -26
- package/chunks/{action-F4Y6Q2VB.js → action-MSLBC2SO.js} +21 -21
- package/chunks/{action-BNEGJBUH.js → action-NVSZT2ZD.js} +8 -9
- package/chunks/{action-ANU5HGC4.js → action-OGQSTRMX.js} +17 -14
- package/chunks/{action-CLSD7O2R.js → action-PAGJ5PWC.js} +10 -10
- package/chunks/action-QE2ZQQX7.js +250 -0
- package/chunks/{action-HD2T6BFJ.js → action-QPUSPD5M.js} +10 -10
- package/chunks/{action-45OGQB2M.js → action-R7IMFHQ5.js} +17 -8
- package/chunks/{action-UDZUUJSI.js → action-SH4UUXPL.js} +18 -7
- package/chunks/action-SNLCIBQC.js +84 -0
- package/chunks/{action-C5VB4ITT.js → action-SQG3JAII.js} +36 -18
- package/chunks/action-UZQJNYK4.js +18 -0
- package/chunks/{action-HNKM3Q65.js → action-VC4DCVST.js} +17 -14
- package/chunks/{action-BMFXENMX.js → action-VTVFY2MP.js} +39 -34
- package/chunks/{action-TZ5KGAQT.js → action-WFWYGY7O.js} +17 -14
- package/chunks/{action-W5BATF4Q.js → action-XMNX5ZYT.js} +24 -24
- package/chunks/{agent-XGLOHXNA.js → agent-HCQRMHQ5.js} +25 -5
- package/chunks/asyncapi-QM76O55R.js +105 -0
- package/chunks/{build.action-LKOILPA6.js → build.action-P7FCIMYU.js} +22 -22
- package/chunks/{chunk-23I5PKZZ.js → chunk-24WAOKGG.js} +32 -5
- package/chunks/chunk-3L6DLIXJ.js +25530 -0
- package/chunks/chunk-3ZJYGGAA.js +30 -0
- package/chunks/{chunk-ZTVWAKNJ.js → chunk-4NHMAG6F.js} +1 -1
- package/chunks/{chunk-IX7LJ3AD.js → chunk-4ORL4MST.js} +2 -3
- package/chunks/{chunk-OAXFCOJV.js → chunk-4ZDQXWBT.js} +2 -1
- package/chunks/{chunk-ASMHW5AY.js → chunk-6ZMT63IV.js} +1 -1
- package/chunks/{chunk-P2VH7DOC.js → chunk-7AGLC7WV.js} +6 -6
- package/chunks/{chunk-SXYALPYK.js → chunk-AO3F5XWR.js} +498 -60
- package/chunks/{chunk-B6QZJWCQ.js → chunk-B2MHTD3R.js} +4 -6
- package/chunks/{chunk-4QS7SJTG.js → chunk-CISTON3A.js} +51 -36
- package/chunks/chunk-COBPBRQF.js +25 -0
- package/chunks/{chunk-2BSG2QHO.js → chunk-F467BYYR.js} +133 -20
- package/chunks/{chunk-TLFMATXR.js → chunk-GSGZHE26.js} +33 -25
- package/chunks/{chunk-UPUTMFD4.js → chunk-HCPN3KNF.js} +185 -13
- package/chunks/{chunk-P646T2WH.js → chunk-HPL3ZZ2P.js} +131 -13
- package/chunks/{chunk-H2WRMLYY.js → chunk-IKT5F47M.js} +3571 -7
- package/chunks/{chunk-AHWWJ3MD.js → chunk-K4DTP5TV.js} +1 -1
- package/chunks/{chunk-TQ5XC2E3.js → chunk-LFU5ZUAP.js} +77 -11
- package/chunks/{chunk-5BISXQX4.js → chunk-M37TP6U2.js} +11 -13
- package/chunks/chunk-OQKDBLOZ.js +741 -0
- package/chunks/chunk-P7H7GY5A.js +14 -0
- package/chunks/{chunk-47Y4L5IT.js → chunk-PBXZN65A.js} +1031 -481
- package/chunks/{chunk-HQKBZOYU.js → chunk-PT5TI77I.js} +3 -3
- package/chunks/chunk-Q7DOQHZN.js +404 -0
- package/chunks/{chunk-X4QLDBB5.js → chunk-T5HJUAWB.js} +24 -3
- package/chunks/{chunk-NUXPNUSS.js → chunk-UGGNHILG.js} +1 -1
- package/chunks/{chunk-4DGQIAJX.js → chunk-VNYE4R7N.js} +154 -14
- package/chunks/{chunk-KWOL7A6J.js → chunk-X5T526CE.js} +2 -2
- package/chunks/chunk-XCSR4RIT.js +210 -0
- package/chunks/{chunk-SHSHFGA7.js → chunk-Z2KMGFE6.js} +4 -6
- package/chunks/{create.action-FFQLBSJH.js → create.action-HDD2WUON.js} +22 -22
- package/chunks/{delete.action-STHQHP4F.js → delete.action-7GOZY7ID.js} +22 -22
- package/chunks/{delete.action-QNN3LC2F.js → delete.action-VE66JFDS.js} +22 -22
- package/chunks/{get.action-OTKYOP3Z.js → get.action-2745EB4N.js} +15 -16
- package/chunks/{list.action-KDM5RHEH.js → list.action-3VTXQJRA.js} +19 -19
- package/chunks/{list.action-6I5EZAVB.js → list.action-4QDCZLSZ.js} +22 -22
- package/chunks/{publish.action-PODTVRXS.js → publish.action-ULQLZKWU.js} +44 -36
- package/chunks/{update.action-KMD4ZM75.js → update.action-6QEFP7NA.js} +22 -22
- package/chunks/{update.action-4F6STTEQ.js → update.action-OROQSP2S.js} +22 -22
- package/docs.html +104 -103
- package/index.js +84 -68
- package/package.json +16 -12
- package/chunks/action-CCW66QJN.js +0 -72
- package/chunks/action-CQ56FVES.js +0 -65
- package/chunks/action-JOSVV6YA.js +0 -71
- package/chunks/action-P7LN6FGY.js +0 -13
- package/chunks/action-R6ZZO26F.js +0 -299
- package/chunks/action-TWFJNQ2R.js +0 -95
- package/chunks/chunk-5BPPGTUU.js +0 -463
- package/chunks/chunk-DOVIWNKQ.js +0 -108
- package/chunks/chunk-ISGLWBXZ.js +0 -4265
- package/chunks/chunk-T7MDADON.js +0 -17
- package/chunks/chunk-VTYTPSXO.js +0 -161
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
customProjectIconSchema
|
|
4
|
+
} from "./chunk-OQKDBLOZ.js";
|
|
2
5
|
import {
|
|
3
6
|
brandedUid,
|
|
4
|
-
customProjectIconSchema,
|
|
5
7
|
emailSchema,
|
|
6
8
|
entitySchema,
|
|
9
|
+
external_exports,
|
|
7
10
|
mintUid,
|
|
8
11
|
namespaceSchema,
|
|
9
12
|
nanoidSchema,
|
|
10
13
|
schemaModel,
|
|
11
|
-
slugSchema
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "./chunk-H2WRMLYY.js";
|
|
14
|
+
slugSchema,
|
|
15
|
+
timestampSchema,
|
|
16
|
+
unixTimestamp
|
|
17
|
+
} from "./chunk-IKT5F47M.js";
|
|
16
18
|
|
|
17
19
|
// ../../packages/entities/dist/team/access.js
|
|
18
20
|
var ExternalAccessMethod;
|
|
@@ -55,14 +57,18 @@ var BillingPlan;
|
|
|
55
57
|
BillingPlan2["ProMonthly"] = "pro_monthly";
|
|
56
58
|
BillingPlan2["ProYearly"] = "pro_yearly";
|
|
57
59
|
BillingPlan2["Premium"] = "premium";
|
|
60
|
+
BillingPlan2["BusinessMonthly"] = "business_monthly";
|
|
61
|
+
BillingPlan2["BusinessYearly"] = "business_yearly";
|
|
58
62
|
BillingPlan2["Enterprise"] = "enterprise";
|
|
59
63
|
})(BillingPlan || (BillingPlan = {}));
|
|
60
64
|
var billingPlanLabels = {
|
|
61
65
|
[BillingPlan.Free]: "Free",
|
|
62
66
|
[BillingPlan.Trial]: "Trial",
|
|
63
|
-
[BillingPlan.ProMonthly]: "Monthly",
|
|
64
|
-
[BillingPlan.Premium]: "Monthly",
|
|
65
|
-
[BillingPlan.ProYearly]: "Yearly",
|
|
67
|
+
[BillingPlan.ProMonthly]: "Pro (Monthly)",
|
|
68
|
+
[BillingPlan.Premium]: "Pro (Monthly)",
|
|
69
|
+
[BillingPlan.ProYearly]: "Pro (Yearly)",
|
|
70
|
+
[BillingPlan.BusinessMonthly]: "Business (Monthly)",
|
|
71
|
+
[BillingPlan.BusinessYearly]: "Business (Yearly)",
|
|
66
72
|
[BillingPlan.Enterprise]: "Enterprise"
|
|
67
73
|
};
|
|
68
74
|
|
|
@@ -81,6 +87,7 @@ var FeatureFlag;
|
|
|
81
87
|
FeatureFlag2["DocsMCP"] = "docsMcp";
|
|
82
88
|
FeatureFlag2["DisableApiSSR"] = "disableApiSSR";
|
|
83
89
|
FeatureFlag2["UnifiedDocs"] = "unifiedDocs";
|
|
90
|
+
FeatureFlag2["UnifiedMcp"] = "unifiedMcp";
|
|
84
91
|
FeatureFlag2["DocsAnalytics"] = "docsAnalytics";
|
|
85
92
|
FeatureFlag2["McpAnalytics"] = "mcpAnalytics";
|
|
86
93
|
FeatureFlag2["MicrosoftLogin"] = "microsoftLogin";
|
|
@@ -88,6 +95,8 @@ var FeatureFlag;
|
|
|
88
95
|
FeatureFlag2["RegistryGit"] = "registryGit";
|
|
89
96
|
FeatureFlag2["AutoBillSeats"] = "autoBillSeats";
|
|
90
97
|
FeatureFlag2["AutoBillSdks"] = "autoBillSdks";
|
|
98
|
+
FeatureFlag2["SdkOpenApiEditor"] = "sdkOpenApiEditor";
|
|
99
|
+
FeatureFlag2["DashboardChat"] = "dashboardChat";
|
|
91
100
|
})(FeatureFlag || (FeatureFlag = {}));
|
|
92
101
|
var featureSchema = external_exports.boolean().optional().meta({ id: "feature" });
|
|
93
102
|
var featureUpdateSchema = external_exports.boolean().nullable().optional();
|
|
@@ -104,13 +113,16 @@ var featureFlagSchema = external_exports.object({
|
|
|
104
113
|
[FeatureFlag.DocsMCP]: featureSchema,
|
|
105
114
|
[FeatureFlag.DisableApiSSR]: featureSchema,
|
|
106
115
|
[FeatureFlag.UnifiedDocs]: featureSchema,
|
|
116
|
+
[FeatureFlag.UnifiedMcp]: featureSchema,
|
|
107
117
|
[FeatureFlag.DocsAnalytics]: featureSchema,
|
|
108
118
|
[FeatureFlag.McpAnalytics]: featureSchema,
|
|
109
119
|
[FeatureFlag.MicrosoftLogin]: featureSchema,
|
|
110
120
|
[FeatureFlag.EditorPreview]: featureSchema,
|
|
111
121
|
[FeatureFlag.RegistryGit]: featureSchema,
|
|
112
122
|
[FeatureFlag.AutoBillSeats]: featureSchema,
|
|
113
|
-
[FeatureFlag.AutoBillSdks]: featureSchema
|
|
123
|
+
[FeatureFlag.AutoBillSdks]: featureSchema,
|
|
124
|
+
[FeatureFlag.SdkOpenApiEditor]: featureSchema,
|
|
125
|
+
[FeatureFlag.DashboardChat]: featureSchema
|
|
114
126
|
}).meta({ id: "feature-flag" });
|
|
115
127
|
var featureFlagUpdateSchema = external_exports.object(Object.fromEntries(Object.values(FeatureFlag).map((featureFlag) => [
|
|
116
128
|
featureFlag,
|
|
@@ -128,7 +140,38 @@ var DEFAULT_ON_FLAGS = /* @__PURE__ */ new Set([
|
|
|
128
140
|
* this grants read access to records that already exist rather than starting
|
|
129
141
|
* any new collection.
|
|
130
142
|
*/
|
|
131
|
-
FeatureFlag.McpAnalytics
|
|
143
|
+
FeatureFlag.McpAnalytics,
|
|
144
|
+
/**
|
|
145
|
+
* The dashboard assistant is on for everyone; an explicit per-team false
|
|
146
|
+
* remains the kill switch, which also hides the docs editor's Ask AI entry
|
|
147
|
+
* points since the editor's chat is a plug-in of the assistant. Listed here
|
|
148
|
+
* so the server-side gate and the admin flag editor's "Default (On)" label
|
|
149
|
+
* agree with the dashboard's client default.
|
|
150
|
+
*/
|
|
151
|
+
FeatureFlag.DashboardChat,
|
|
152
|
+
/**
|
|
153
|
+
* The MCP studio is on for everyone; an explicit per-team false remains the
|
|
154
|
+
* kill switch back to the legacy MCP pages. Listed here so the server-side
|
|
155
|
+
* gate and the admin flag editor's "Default (On)" label agree with the
|
|
156
|
+
* dashboard's client default.
|
|
157
|
+
*/
|
|
158
|
+
FeatureFlag.UnifiedMcp,
|
|
159
|
+
/**
|
|
160
|
+
* The unified editor is on for everyone: the legacy dashboard surfaces are
|
|
161
|
+
* deleted, so the dashboard serves the studios regardless. Listed here so
|
|
162
|
+
* the server-side gate and the admin flag editor's "Default (On)" label
|
|
163
|
+
* agree with the dashboard's client default; an explicit per-team false
|
|
164
|
+
* remains the kill switch.
|
|
165
|
+
*/
|
|
166
|
+
FeatureFlag.UnifiedDocs,
|
|
167
|
+
/**
|
|
168
|
+
* Editing an SDK's OpenAPI document is on for everyone; an explicit per-team
|
|
169
|
+
* false remains the kill switch, and the dashboard still gates the surface on
|
|
170
|
+
* the flag, so withdrawing it withdraws the panel. Listed here so the
|
|
171
|
+
* server-side gate and the admin flag editor's "Default (On)" label agree
|
|
172
|
+
* with the dashboard's client default.
|
|
173
|
+
*/
|
|
174
|
+
FeatureFlag.SdkOpenApiEditor
|
|
132
175
|
]);
|
|
133
176
|
|
|
134
177
|
// ../../packages/entities/dist/team/schema.js
|
|
@@ -159,7 +202,10 @@ var billingInfoSchema = external_exports.preprocess((arg) => {
|
|
|
159
202
|
if (typeof arg?.hasTrial === "boolean" && ![
|
|
160
203
|
BillingPlan.Premium,
|
|
161
204
|
BillingPlan.ProMonthly,
|
|
162
|
-
BillingPlan.ProYearly
|
|
205
|
+
BillingPlan.ProYearly,
|
|
206
|
+
BillingPlan.BusinessMonthly,
|
|
207
|
+
BillingPlan.BusinessYearly,
|
|
208
|
+
BillingPlan.Enterprise
|
|
163
209
|
].includes(arg?.plan)) {
|
|
164
210
|
arg.plan = "trial";
|
|
165
211
|
}
|
|
@@ -172,7 +218,9 @@ var billingInfoSchema = external_exports.preprocess((arg) => {
|
|
|
172
218
|
sdkTrialReminderSentAt: external_exports.number().optional(),
|
|
173
219
|
trialEndedReminderSentAt: external_exports.number().optional(),
|
|
174
220
|
trialExtendedAt: external_exports.number().optional(),
|
|
175
|
-
includedCreditsOverride: external_exports.number().optional()
|
|
221
|
+
includedCreditsOverride: external_exports.number().optional(),
|
|
222
|
+
pastDue: external_exports.boolean().optional(),
|
|
223
|
+
pricingModel: external_exports.enum(["flat_2026"]).nullish()
|
|
176
224
|
})).meta({ id: "billing-info" });
|
|
177
225
|
var invoiceStatusSchema = external_exports.enum(["open", "paid", "draft", "void", "uncollectible"]).meta({ id: "invoice-status" });
|
|
178
226
|
var billingInvoiceSchema = external_exports.object({
|
|
@@ -202,6 +250,39 @@ var teamBillingSummary = external_exports.object({
|
|
|
202
250
|
/** Basic Scalar billing info from team record */
|
|
203
251
|
billingInfo: billingInfoSchema
|
|
204
252
|
}).meta({ id: "team-billing-summary" });
|
|
253
|
+
var sdkPriceBandLiterals = {
|
|
254
|
+
standard: "standard",
|
|
255
|
+
large: "large"
|
|
256
|
+
};
|
|
257
|
+
var sdkPriceBandSchema = external_exports.enum(sdkPriceBandLiterals);
|
|
258
|
+
var requiredTierLiterals = {
|
|
259
|
+
pro: "pro",
|
|
260
|
+
business: "business",
|
|
261
|
+
enterprise: "enterprise"
|
|
262
|
+
};
|
|
263
|
+
var teamSdkPricing = external_exports.object({
|
|
264
|
+
sdks: external_exports.object({
|
|
265
|
+
uid: nanoidSchema,
|
|
266
|
+
/** Endpoints in the document this SDK builds against; null when unmeasured. */
|
|
267
|
+
endpointCount: external_exports.number().int().nullable(),
|
|
268
|
+
/** Targets this SDK currently bills. */
|
|
269
|
+
billedTargets: external_exports.number().int(),
|
|
270
|
+
band: sdkPriceBandSchema
|
|
271
|
+
}).array().default([]),
|
|
272
|
+
/**
|
|
273
|
+
* Managed APIs with the size of the version they serve, for quoting an SDK
|
|
274
|
+
* that does not exist yet.
|
|
275
|
+
*/
|
|
276
|
+
apis: external_exports.object({
|
|
277
|
+
uid: nanoidSchema,
|
|
278
|
+
endpointCount: external_exports.number().int().nullable(),
|
|
279
|
+
band: sdkPriceBandSchema
|
|
280
|
+
}).array().default([]),
|
|
281
|
+
/** Billable targets per band, after the plan's included unit is comped. */
|
|
282
|
+
bands: external_exports.record(sdkPriceBandSchema, external_exports.number().int()),
|
|
283
|
+
/** The lowest tier the team's largest SDK requires. */
|
|
284
|
+
requiredTier: external_exports.enum(requiredTierLiterals)
|
|
285
|
+
}).meta({ id: "team-sdk-pricing" });
|
|
205
286
|
var pendingInviteSchema = external_exports.object({
|
|
206
287
|
uid: nanoidSchema,
|
|
207
288
|
role: roleSchema.default(TeamUserRole.Editor),
|
|
@@ -215,6 +296,27 @@ var TeamOnboardingState;
|
|
|
215
296
|
TeamOnboardingState2["Setup"] = "setup";
|
|
216
297
|
TeamOnboardingState2["Complete"] = "complete";
|
|
217
298
|
})(TeamOnboardingState || (TeamOnboardingState = {}));
|
|
299
|
+
var UnifiedDocsMigrationStatus;
|
|
300
|
+
(function(UnifiedDocsMigrationStatus2) {
|
|
301
|
+
UnifiedDocsMigrationStatus2["Requested"] = "requested";
|
|
302
|
+
UnifiedDocsMigrationStatus2["InProgress"] = "in-progress";
|
|
303
|
+
UnifiedDocsMigrationStatus2["Completed"] = "completed";
|
|
304
|
+
UnifiedDocsMigrationStatus2["Failed"] = "failed";
|
|
305
|
+
})(UnifiedDocsMigrationStatus || (UnifiedDocsMigrationStatus = {}));
|
|
306
|
+
var unifiedDocsMigrationSchema = external_exports.object({
|
|
307
|
+
status: external_exports.enum(UnifiedDocsMigrationStatus),
|
|
308
|
+
/** When the current status was entered, not when the team first asked */
|
|
309
|
+
updatedAt: timestampSchema.default(unixTimestamp).meta({ default: "unixTimestamp()" }),
|
|
310
|
+
/**
|
|
311
|
+
* The user who pressed the button, or null when ops started the migration.
|
|
312
|
+
* Only used to attribute the request — permissions are checked at the route.
|
|
313
|
+
*/
|
|
314
|
+
requestedBy: external_exports.string().nullable().default(null),
|
|
315
|
+
/** Populated on `Failed` so the dashboard can show why without a log dive */
|
|
316
|
+
error: external_exports.string().nullable().default(null),
|
|
317
|
+
projectsMigrated: external_exports.number().int().default(0),
|
|
318
|
+
projectsTotal: external_exports.number().int().default(0)
|
|
319
|
+
});
|
|
218
320
|
var TeamAuthenticationMethod;
|
|
219
321
|
(function(TeamAuthenticationMethod2) {
|
|
220
322
|
TeamAuthenticationMethod2["Password"] = "password";
|
|
@@ -271,6 +373,12 @@ var teamSchema = entitySchema.extend({
|
|
|
271
373
|
authentication: teamAuthenticationSchema.default(schemaModel({}, teamAuthenticationSchema)),
|
|
272
374
|
externalAccess: externalAccessSchema.default(schemaModel({}, externalAccessSchema)),
|
|
273
375
|
features: featureFlagSchema.default({}),
|
|
376
|
+
/**
|
|
377
|
+
* Progress through the move off the legacy WYSIWYG editor. Absent on teams
|
|
378
|
+
* that have never been touched by the migration — including every team that
|
|
379
|
+
* signed up already on Unified Docs, which has nothing to migrate.
|
|
380
|
+
*/
|
|
381
|
+
unifiedDocsMigration: unifiedDocsMigrationSchema.optional(),
|
|
274
382
|
/**
|
|
275
383
|
* Teams can be manually verified when they need to upload documents
|
|
276
384
|
* containing prohibited text or links. This is manually set by request.
|
|
@@ -285,6 +393,12 @@ var billingFeatures = {
|
|
|
285
393
|
},
|
|
286
394
|
authentication: {
|
|
287
395
|
sso: "sso"
|
|
396
|
+
},
|
|
397
|
+
access: {
|
|
398
|
+
groups: "accessGroups"
|
|
399
|
+
},
|
|
400
|
+
publishing: {
|
|
401
|
+
subpath: "subpathHosting"
|
|
288
402
|
}
|
|
289
403
|
};
|
|
290
404
|
var teamBillingFeatures = {
|
|
@@ -292,9 +406,31 @@ var teamBillingFeatures = {
|
|
|
292
406
|
[BillingPlan.Enterprise]: true,
|
|
293
407
|
[BillingPlan.Premium]: true,
|
|
294
408
|
[BillingPlan.ProMonthly]: true,
|
|
295
|
-
[BillingPlan.ProYearly]: true
|
|
409
|
+
[BillingPlan.ProYearly]: true,
|
|
410
|
+
[BillingPlan.BusinessMonthly]: true,
|
|
411
|
+
[BillingPlan.BusinessYearly]: true
|
|
296
412
|
},
|
|
413
|
+
// SSO/SAML starts on Business under the four-plan model.
|
|
297
414
|
[billingFeatures.authentication.sso]: {
|
|
415
|
+
[BillingPlan.BusinessMonthly]: true,
|
|
416
|
+
[BillingPlan.BusinessYearly]: true,
|
|
417
|
+
[BillingPlan.Enterprise]: true
|
|
418
|
+
},
|
|
419
|
+
// Access groups start on Pro; Trial is included so it keeps demoing the Pro
|
|
420
|
+
// experience (expiry already short-circuits in hasTeamBillingFeature).
|
|
421
|
+
[billingFeatures.access.groups]: {
|
|
422
|
+
[BillingPlan.Trial]: true,
|
|
423
|
+
[BillingPlan.Premium]: true,
|
|
424
|
+
[BillingPlan.ProMonthly]: true,
|
|
425
|
+
[BillingPlan.ProYearly]: true,
|
|
426
|
+
[BillingPlan.BusinessMonthly]: true,
|
|
427
|
+
[BillingPlan.BusinessYearly]: true,
|
|
428
|
+
[BillingPlan.Enterprise]: true
|
|
429
|
+
},
|
|
430
|
+
// Subpath hosting starts on Business.
|
|
431
|
+
[billingFeatures.publishing.subpath]: {
|
|
432
|
+
[BillingPlan.BusinessMonthly]: true,
|
|
433
|
+
[BillingPlan.BusinessYearly]: true,
|
|
298
434
|
[BillingPlan.Enterprise]: true
|
|
299
435
|
}
|
|
300
436
|
};
|
|
@@ -351,9 +487,13 @@ var teamPermissions = {
|
|
|
351
487
|
|
|
352
488
|
export {
|
|
353
489
|
roleSchema,
|
|
490
|
+
userRefSchema,
|
|
354
491
|
billingPlanSchema,
|
|
355
492
|
teamBillingSummary,
|
|
493
|
+
teamSdkPricing,
|
|
494
|
+
pendingInviteSchema,
|
|
356
495
|
teamNameSchema,
|
|
357
496
|
teamImageSchema,
|
|
497
|
+
UnifiedDocsMigrationStatus,
|
|
358
498
|
teamSchema
|
|
359
499
|
};
|
|
@@ -8,9 +8,9 @@ var ISOLATE_EXTRACTION_DIR = path.join(os.homedir(), ".scalar");
|
|
|
8
8
|
var ISOLATE_DIR = path.join(ISOLATE_EXTRACTION_DIR, "isolate");
|
|
9
9
|
var DownloadIsolateCommand = () => {
|
|
10
10
|
const cmd = new Command("download-isolate");
|
|
11
|
-
cmd.description("Download the docs
|
|
11
|
+
cmd.description("Download the docs preview server");
|
|
12
12
|
cmd.action(async () => {
|
|
13
|
-
const { downloadIsolate } = await import("./action-
|
|
13
|
+
const { downloadIsolate } = await import("./action-UZQJNYK4.js");
|
|
14
14
|
await downloadIsolate();
|
|
15
15
|
});
|
|
16
16
|
return cmd;
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
RegistryAsset
|
|
4
|
+
} from "./chunk-CISTON3A.js";
|
|
5
|
+
import {
|
|
6
|
+
contentShaSchema
|
|
7
|
+
} from "./chunk-Q7DOQHZN.js";
|
|
8
|
+
import {
|
|
9
|
+
docVersionSchema,
|
|
10
|
+
external_exports,
|
|
11
|
+
namespaceSchema
|
|
12
|
+
} from "./chunk-IKT5F47M.js";
|
|
13
|
+
|
|
14
|
+
// ../../packages/urls/dist/registry/path-generators.js
|
|
15
|
+
function versionFormat(version) {
|
|
16
|
+
if (!version || version === "latest")
|
|
17
|
+
return "latest";
|
|
18
|
+
return docVersionSchema.parse(version);
|
|
19
|
+
}
|
|
20
|
+
function filetypeFormat(filetype) {
|
|
21
|
+
return filetype ? external_exports.enum(["yaml", "json", "zip"]).parse(filetype) : "yaml";
|
|
22
|
+
}
|
|
23
|
+
function registryFormat(format) {
|
|
24
|
+
return external_exports.enum(["yaml", "json", "preview"]).parse(format);
|
|
25
|
+
}
|
|
26
|
+
var pagesSha = (sha) => contentShaSchema.parse(sha);
|
|
27
|
+
var pageChunkFile = (entryId) => {
|
|
28
|
+
const id = external_exports.string().min(1, "Page chunk entry id must not be empty").parse(entryId);
|
|
29
|
+
return `${encodeURIComponent(id)}.json`;
|
|
30
|
+
};
|
|
31
|
+
var MAX_OBJECT_NAME_BYTES = 1024;
|
|
32
|
+
var withinObjectNameLimit = (key, entryId) => {
|
|
33
|
+
const bytes = new TextEncoder().encode(key).length;
|
|
34
|
+
if (bytes > MAX_OBJECT_NAME_BYTES) {
|
|
35
|
+
throw new Error(`Page chunk key is ${bytes} bytes, over the ${MAX_OBJECT_NAME_BYTES}-byte object name limit, for entry id "${entryId}"`);
|
|
36
|
+
}
|
|
37
|
+
return key;
|
|
38
|
+
};
|
|
39
|
+
function buildAsset(namespace, asset, slug) {
|
|
40
|
+
return {
|
|
41
|
+
/**
|
|
42
|
+
* Get registry record path.
|
|
43
|
+
*
|
|
44
|
+
* Registry collection records have a base resource path
|
|
45
|
+
* with the primary registry item metadata: namespace,
|
|
46
|
+
* asset type and slug.
|
|
47
|
+
*
|
|
48
|
+
* @example scalar/apis/scalar-galaxy
|
|
49
|
+
*/
|
|
50
|
+
path: () => {
|
|
51
|
+
return `${namespace}/${asset}/${slug}`;
|
|
52
|
+
},
|
|
53
|
+
/**
|
|
54
|
+
* Get registry GCS file storage path
|
|
55
|
+
*
|
|
56
|
+
* Unlike registry record paths, storage paths contain the version
|
|
57
|
+
* of a registry item, and the respective file type.
|
|
58
|
+
*
|
|
59
|
+
* @example scalar/apis/scalar-galaxy/1.0.0.json
|
|
60
|
+
*/
|
|
61
|
+
file: (opts) => {
|
|
62
|
+
return `${namespace}/${asset}/${slug}/${opts?.build || versionFormat(opts?.version)}${opts?.upgraded ? "_upgraded" : ""}${opts?.variant === "processed" ? "_processed" : ""}.${filetypeFormat(opts?.type)}`;
|
|
63
|
+
},
|
|
64
|
+
/**
|
|
65
|
+
* Get registry GCS folder storage path
|
|
66
|
+
*
|
|
67
|
+
* @example scalar/apis/scalar-galaxy
|
|
68
|
+
*/
|
|
69
|
+
folder: (opts) => {
|
|
70
|
+
return `${namespace}/${asset}/${slug}${opts?.version ? `/${opts.version}` : ""}`;
|
|
71
|
+
},
|
|
72
|
+
/**
|
|
73
|
+
* Content-addressed blob path for an immutable content instance. Blobs are
|
|
74
|
+
* write-once — the sha in the key is the SHA-256 of the exact bytes stored,
|
|
75
|
+
* so identical content dedupes to the same object and nothing at this path
|
|
76
|
+
* is ever overwritten.
|
|
77
|
+
*
|
|
78
|
+
* The optional `variant` keys derived artifacts next to the content they
|
|
79
|
+
* derive from: `_processed` (SDK overlay output) and `_upgraded`
|
|
80
|
+
* (normalized OpenAPI) share the source content's json sha, so a variant
|
|
81
|
+
* object is immutable for the same reason the content blob is.
|
|
82
|
+
*
|
|
83
|
+
* @example scalar/apis/scalar-galaxy/blobs/2f7a...c9.json
|
|
84
|
+
* @example scalar/apis/scalar-galaxy/blobs/2f7a...c9_processed.json
|
|
85
|
+
*/
|
|
86
|
+
blob: (opts) => {
|
|
87
|
+
const sha = external_exports.string().regex(/^[a-f0-9]{64}$/, "Blob sha must be a sha-256 hex digest").parse(opts.sha);
|
|
88
|
+
const variant = opts.variant ? `_${opts.variant}` : "";
|
|
89
|
+
return `${namespace}/${asset}/${slug}/blobs/${sha}${variant}.${filetypeFormat(opts.type)}`;
|
|
90
|
+
},
|
|
91
|
+
/**
|
|
92
|
+
* Prefix holding the per-page sidecar derived from one content instance:
|
|
93
|
+
* a manifest, a models bundle and one chunk per navigation entry.
|
|
94
|
+
*
|
|
95
|
+
* Deliberately beside `blobs/`, not inside it. {@link copyBlobsFolder}
|
|
96
|
+
* copies the whole `blobs/` prefix on every resource rename, twice and with
|
|
97
|
+
* unbounded concurrency; a sidecar contributes roughly ten thousand objects
|
|
98
|
+
* per sha, which would turn a rename into tens of thousands of concurrent
|
|
99
|
+
* copies. `pages/` is instead deleted with the resource and regenerated
|
|
100
|
+
* lazily under the new path, where the cost is one rebuild rather than a
|
|
101
|
+
* rename that may not finish.
|
|
102
|
+
*
|
|
103
|
+
* @example scalar/apis/scalar-galaxy/pages/2f7a...c9/
|
|
104
|
+
*/
|
|
105
|
+
pagesPrefix: (opts) => {
|
|
106
|
+
return `${namespace}/${asset}/${slug}/pages/${pagesSha(opts.sha)}/`;
|
|
107
|
+
},
|
|
108
|
+
/**
|
|
109
|
+
* The sidecar's index: the stripped base document, the navigation tree and
|
|
110
|
+
* the entry table. Written last, so its presence is what marks a sidecar
|
|
111
|
+
* complete.
|
|
112
|
+
*
|
|
113
|
+
* @example scalar/apis/scalar-galaxy/pages/2f7a...c9/manifest.json
|
|
114
|
+
*/
|
|
115
|
+
pagesManifest: (opts) => {
|
|
116
|
+
return `${namespace}/${asset}/${slug}/pages/${pagesSha(opts.sha)}/manifest.json`;
|
|
117
|
+
},
|
|
118
|
+
/**
|
|
119
|
+
* Every component schema of the sidecar, in one object. Split out of the
|
|
120
|
+
* manifest because the sidebar only needs it once a reader opens Models.
|
|
121
|
+
*
|
|
122
|
+
* @example scalar/apis/scalar-galaxy/pages/2f7a...c9/models.json
|
|
123
|
+
*/
|
|
124
|
+
pagesModels: (opts) => {
|
|
125
|
+
return `${namespace}/${asset}/${slug}/pages/${pagesSha(opts.sha)}/models.json`;
|
|
126
|
+
},
|
|
127
|
+
/**
|
|
128
|
+
* One navigation entry's chunk — the slice of the document that entry's
|
|
129
|
+
* page renders, merged onto the manifest's stripped base document.
|
|
130
|
+
*
|
|
131
|
+
* @example scalar/apis/scalar-galaxy/pages/2f7a...c9/chunks/tag%2Fplanets%2Fget%2Fplanets.json
|
|
132
|
+
*/
|
|
133
|
+
pageChunk: (opts) => {
|
|
134
|
+
return withinObjectNameLimit(`${namespace}/${asset}/${slug}/pages/${pagesSha(opts.sha)}/chunks/${pageChunkFile(opts.entryId)}`, opts.entryId);
|
|
135
|
+
},
|
|
136
|
+
/**
|
|
137
|
+
* Claim marker for a sidecar being built. Created with
|
|
138
|
+
* `ifGenerationMatch: 0` so exactly one producer wins across the fleet, and
|
|
139
|
+
* deleted when the job settles.
|
|
140
|
+
*
|
|
141
|
+
* Mutable, unlike everything else under the prefix: it is written, read for
|
|
142
|
+
* its age and removed within one build. See {@link planPagesCacheControl}
|
|
143
|
+
* in `@scalar-org/entities/registry` for what that means for serving.
|
|
144
|
+
*
|
|
145
|
+
* @example scalar/apis/scalar-galaxy/pages/2f7a...c9/preparing.json
|
|
146
|
+
*/
|
|
147
|
+
pagesPreparing: (opts) => {
|
|
148
|
+
return `${namespace}/${asset}/${slug}/pages/${pagesSha(opts.sha)}/preparing.json`;
|
|
149
|
+
},
|
|
150
|
+
/**
|
|
151
|
+
* Records that building this sha's sidecar failed, so a reader is told so
|
|
152
|
+
* instead of polling a job that will not finish. Cleared by a rebuild, so
|
|
153
|
+
* it is mutable in the same way the claim marker is.
|
|
154
|
+
*
|
|
155
|
+
* @example scalar/apis/scalar-galaxy/pages/2f7a...c9/failed.json
|
|
156
|
+
*/
|
|
157
|
+
pagesFailed: (opts) => {
|
|
158
|
+
return `${namespace}/${asset}/${slug}/pages/${pagesSha(opts.sha)}/failed.json`;
|
|
159
|
+
},
|
|
160
|
+
/**
|
|
161
|
+
* Get a full standardized registry url path
|
|
162
|
+
*
|
|
163
|
+
* Our registry resolver understands a few path formats.
|
|
164
|
+
* However, this is our primary registry format to use across
|
|
165
|
+
* internal products.
|
|
166
|
+
*
|
|
167
|
+
* @example @scalar/apis/scalar-galaxy/1.0.0?format=preview
|
|
168
|
+
*/
|
|
169
|
+
url: (opts) => {
|
|
170
|
+
const query = [
|
|
171
|
+
opts?.format ? `format=${registryFormat(opts.format)}` : "",
|
|
172
|
+
opts?.variant === "processed" ? "variant=processed" : "",
|
|
173
|
+
opts?.lang ? `lang=${opts.lang}` : ""
|
|
174
|
+
].filter(Boolean).join("&");
|
|
175
|
+
return `@${namespace}/${asset}/${slug}@${versionFormat(opts?.version)}${query ? `?${query}` : ""}`;
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
function registry(teamNamespace) {
|
|
180
|
+
const namespace = namespaceSchema.parse(teamNamespace);
|
|
181
|
+
return {
|
|
182
|
+
apis: (slug) => buildAsset(namespace, RegistryAsset.Apis, slug),
|
|
183
|
+
rules: (slug) => buildAsset(namespace, RegistryAsset.Rules, slug),
|
|
184
|
+
sdks: (slug) => buildAsset(namespace, RegistryAsset.Sdks, slug),
|
|
185
|
+
schemas: (slug) => buildAsset(namespace, RegistryAsset.Schemas, slug),
|
|
186
|
+
workspaces: (slug) => buildAsset(namespace, RegistryAsset.Workspaces, slug)
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// ../../packages/urls/dist/publish/full.js
|
|
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
|
+
}
|
|
205
|
+
|
|
206
|
+
export {
|
|
207
|
+
getPublishUrl,
|
|
208
|
+
getPublishPreviewUrl,
|
|
209
|
+
registry
|
|
210
|
+
};
|
|
@@ -1,17 +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-M37TP6U2.js";
|
|
5
5
|
import {
|
|
6
6
|
config
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4ZDQXWBT.js";
|
|
8
8
|
import {
|
|
9
|
+
external_exports,
|
|
9
10
|
objectSchema,
|
|
10
11
|
schemaModel
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
external_exports
|
|
14
|
-
} from "./chunk-H2WRMLYY.js";
|
|
12
|
+
} from "./chunk-IKT5F47M.js";
|
|
15
13
|
|
|
16
14
|
// ../../packages/mongobase-client/dist/auth/tokens.js
|
|
17
15
|
var tokenResponseSchema = external_exports.object({
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
apiService
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AO3F5XWR.js";
|
|
5
5
|
import {
|
|
6
6
|
BaseCollections
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-F467BYYR.js";
|
|
8
8
|
import {
|
|
9
9
|
getDatabaseClient
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-Z2KMGFE6.js";
|
|
11
|
+
import "./chunk-HCPN3KNF.js";
|
|
12
|
+
import "./chunk-B2MHTD3R.js";
|
|
13
13
|
import {
|
|
14
14
|
SdkLanguage
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-VTYTPSXO.js";
|
|
15
|
+
} from "./chunk-3L6DLIXJ.js";
|
|
16
|
+
import "./chunk-P7H7GY5A.js";
|
|
17
|
+
import "./chunk-HPL3ZZ2P.js";
|
|
19
18
|
import {
|
|
20
19
|
getAuthData
|
|
21
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-M37TP6U2.js";
|
|
22
21
|
import {
|
|
23
22
|
config
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-TLFMATXR.js";
|
|
23
|
+
} from "./chunk-4ZDQXWBT.js";
|
|
26
24
|
import {
|
|
27
25
|
teamSchema
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import
|
|
30
|
-
namespaceSchema,
|
|
31
|
-
slugSchema
|
|
32
|
-
} from "./chunk-ISGLWBXZ.js";
|
|
33
|
-
import {
|
|
34
|
-
external_exports
|
|
35
|
-
} from "./chunk-H2WRMLYY.js";
|
|
26
|
+
} from "./chunk-VNYE4R7N.js";
|
|
27
|
+
import "./chunk-OQKDBLOZ.js";
|
|
36
28
|
import "./chunk-K74E42RV.js";
|
|
37
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-CISTON3A.js";
|
|
30
|
+
import "./chunk-Q7DOQHZN.js";
|
|
31
|
+
import "./chunk-4ORL4MST.js";
|
|
38
32
|
import {
|
|
39
33
|
output
|
|
40
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-T5HJUAWB.js";
|
|
35
|
+
import "./chunk-GSGZHE26.js";
|
|
36
|
+
import {
|
|
37
|
+
external_exports,
|
|
38
|
+
namespaceSchema,
|
|
39
|
+
slugSchema
|
|
40
|
+
} from "./chunk-IKT5F47M.js";
|
|
41
41
|
import "./chunk-3MZYUBJ6.js";
|
|
42
42
|
|
|
43
43
|
// src/domains/sdk/create.action.ts
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
apiService
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AO3F5XWR.js";
|
|
5
5
|
import {
|
|
6
6
|
BaseCollections
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-F467BYYR.js";
|
|
8
8
|
import {
|
|
9
9
|
getDatabaseClient
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-VTYTPSXO.js";
|
|
10
|
+
} from "./chunk-Z2KMGFE6.js";
|
|
11
|
+
import "./chunk-HCPN3KNF.js";
|
|
12
|
+
import "./chunk-B2MHTD3R.js";
|
|
13
|
+
import "./chunk-3L6DLIXJ.js";
|
|
14
|
+
import "./chunk-P7H7GY5A.js";
|
|
15
|
+
import "./chunk-HPL3ZZ2P.js";
|
|
17
16
|
import {
|
|
18
17
|
getAuthData
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-TLFMATXR.js";
|
|
18
|
+
} from "./chunk-M37TP6U2.js";
|
|
19
|
+
import "./chunk-4ZDQXWBT.js";
|
|
22
20
|
import {
|
|
23
21
|
teamSchema
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import
|
|
26
|
-
namespaceSchema,
|
|
27
|
-
slugSchema
|
|
28
|
-
} from "./chunk-ISGLWBXZ.js";
|
|
29
|
-
import {
|
|
30
|
-
external_exports
|
|
31
|
-
} from "./chunk-H2WRMLYY.js";
|
|
22
|
+
} from "./chunk-VNYE4R7N.js";
|
|
23
|
+
import "./chunk-OQKDBLOZ.js";
|
|
32
24
|
import "./chunk-K74E42RV.js";
|
|
33
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-CISTON3A.js";
|
|
26
|
+
import "./chunk-Q7DOQHZN.js";
|
|
27
|
+
import "./chunk-4ORL4MST.js";
|
|
34
28
|
import {
|
|
35
29
|
output
|
|
36
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-T5HJUAWB.js";
|
|
31
|
+
import "./chunk-GSGZHE26.js";
|
|
32
|
+
import {
|
|
33
|
+
external_exports,
|
|
34
|
+
namespaceSchema,
|
|
35
|
+
slugSchema
|
|
36
|
+
} from "./chunk-IKT5F47M.js";
|
|
37
37
|
import "./chunk-3MZYUBJ6.js";
|
|
38
38
|
|
|
39
39
|
// src/domains/schema/delete.action.ts
|