@scalar/cli 2.1.0 → 2.5.2

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 (88) hide show
  1. package/README.md +28 -24
  2. package/chunks/action-42D2C47G.js +18 -0
  3. package/chunks/{action-DFKHSDFV.js → action-6FAJNP6C.js} +7 -3
  4. package/chunks/{action-5R5FDF6S.js → action-6MZZHPVQ.js} +120 -22
  5. package/chunks/{action-BYZUBXVB.js → action-7H3XARJP.js} +8 -4
  6. package/chunks/{action-H5OHT2GV.js → action-AMNYOA4B.js} +7 -3
  7. package/chunks/{action-ANU5HGC4.js → action-DCINFQ57.js} +17 -14
  8. package/chunks/{action-GB6DM53B.js → action-DGD6Q6Y5.js} +21 -10
  9. package/chunks/{action-TPBKPHNS.js → action-EPNE5XCM.js} +22 -22
  10. package/chunks/{action-C5VB4ITT.js → action-FF2OMGAS.js} +36 -18
  11. package/chunks/{action-Q5UJ32D6.js → action-H3RTILLM.js} +1 -1
  12. package/chunks/action-HIL5ZFNB.js +84 -0
  13. package/chunks/{action-MENXFJH3.js → action-HXHBU7XC.js} +9 -9
  14. package/chunks/{action-F4Y6Q2VB.js → action-LFL3ZZKN.js} +21 -21
  15. package/chunks/action-LUVBQEIQ.js +250 -0
  16. package/chunks/{action-TZ5KGAQT.js → action-OILGZAMK.js} +17 -14
  17. package/chunks/{action-HD2T6BFJ.js → action-OK55BFGM.js} +10 -10
  18. package/chunks/{action-HNKM3Q65.js → action-P7RFXIC7.js} +17 -14
  19. package/chunks/action-PAA4NWUJ.js +374 -0
  20. package/chunks/action-PHLOE27S.js +522 -0
  21. package/chunks/{action-CYP4VDK3.js → action-RBVPKCRI.js} +12 -35
  22. package/chunks/action-SJYAMXYI.js +244 -0
  23. package/chunks/{action-45OGQB2M.js → action-TWHLZW4V.js} +17 -8
  24. package/chunks/{action-GEBRPNRT.js → action-V5KYG7XD.js} +15 -16
  25. package/chunks/{action-BNEGJBUH.js → action-W62AIEBN.js} +8 -9
  26. package/chunks/{action-PVDDRIM6.js → action-X7TZA3RE.js} +65 -26
  27. package/chunks/{action-CLSD7O2R.js → action-XUQ7TKKJ.js} +10 -10
  28. package/chunks/{action-BMFXENMX.js → action-Y6CEKYEK.js} +39 -34
  29. package/chunks/{action-STIEAXOE.js → action-YRWHX2AE.js} +16 -5
  30. package/chunks/{action-W5BATF4Q.js → action-ZLTUMRO2.js} +24 -24
  31. package/chunks/{action-UDZUUJSI.js → action-ZWQLQENM.js} +18 -7
  32. package/chunks/{agent-XGLOHXNA.js → agent-JAXLLDPE.js} +25 -5
  33. package/chunks/asyncapi-P6Y3L7RG.js +105 -0
  34. package/chunks/{build.action-LKOILPA6.js → build.action-AZ5ECU4B.js} +22 -22
  35. package/chunks/chunk-3BWGTPPT.js +27022 -0
  36. package/chunks/{chunk-ZTVWAKNJ.js → chunk-3DJ2GKEG.js} +1 -1
  37. package/chunks/chunk-3ZJYGGAA.js +30 -0
  38. package/chunks/{chunk-IX7LJ3AD.js → chunk-4ORL4MST.js} +2 -3
  39. package/chunks/{chunk-ASMHW5AY.js → chunk-6ZMT63IV.js} +1 -1
  40. package/chunks/{chunk-B6QZJWCQ.js → chunk-B2MHTD3R.js} +4 -6
  41. package/chunks/{chunk-P646T2WH.js → chunk-CIFOFSZ3.js} +131 -13
  42. package/chunks/chunk-CX7ZRMTC.js +404 -0
  43. package/chunks/{chunk-HQKBZOYU.js → chunk-FOKFF4EP.js} +3 -3
  44. package/chunks/{chunk-UPUTMFD4.js → chunk-FQVVKQPU.js} +185 -13
  45. package/chunks/{chunk-P2VH7DOC.js → chunk-HUCR333E.js} +6 -6
  46. package/chunks/{chunk-KWOL7A6J.js → chunk-HXIDUCSZ.js} +2 -2
  47. package/chunks/{chunk-H2WRMLYY.js → chunk-IKT5F47M.js} +3571 -7
  48. package/chunks/{chunk-OAXFCOJV.js → chunk-JV7TUEXQ.js} +2 -1
  49. package/chunks/{chunk-2BSG2QHO.js → chunk-KEOCJ3NJ.js} +133 -20
  50. package/chunks/{chunk-AHWWJ3MD.js → chunk-LCPFHE4Z.js} +1 -1
  51. package/chunks/{chunk-TLFMATXR.js → chunk-LQN4S62O.js} +33 -25
  52. package/chunks/chunk-M622VXRQ.js +14 -0
  53. package/chunks/chunk-M6Q3ARBV.js +210 -0
  54. package/chunks/{chunk-4QS7SJTG.js → chunk-MNLXYOVF.js} +51 -36
  55. package/chunks/{chunk-5BISXQX4.js → chunk-NIXG4KDE.js} +11 -13
  56. package/chunks/{chunk-47Y4L5IT.js → chunk-NNMSZVAB.js} +1031 -481
  57. package/chunks/chunk-OQKDBLOZ.js +741 -0
  58. package/chunks/{chunk-NUXPNUSS.js → chunk-RAO7VUGM.js} +1 -1
  59. package/chunks/{chunk-SHSHFGA7.js → chunk-RPVHJMQT.js} +4 -6
  60. package/chunks/{chunk-23I5PKZZ.js → chunk-SWWWYWHC.js} +32 -5
  61. package/chunks/{chunk-X4QLDBB5.js → chunk-T5HJUAWB.js} +24 -3
  62. package/chunks/chunk-TYLWJ2UL.js +25 -0
  63. package/chunks/{chunk-SXYALPYK.js → chunk-UB3XGOUW.js} +498 -60
  64. package/chunks/{chunk-TQ5XC2E3.js → chunk-UMPODUJO.js} +77 -11
  65. package/chunks/{chunk-4DGQIAJX.js → chunk-VNYE4R7N.js} +154 -14
  66. package/chunks/{create.action-FFQLBSJH.js → create.action-34OTO2SB.js} +22 -22
  67. package/chunks/{delete.action-QNN3LC2F.js → delete.action-6LRT4M3S.js} +22 -22
  68. package/chunks/{delete.action-STHQHP4F.js → delete.action-ZYXFMIOW.js} +22 -22
  69. package/chunks/{get.action-OTKYOP3Z.js → get.action-XP36SA2J.js} +15 -16
  70. package/chunks/{list.action-KDM5RHEH.js → list.action-6LF6KSD5.js} +19 -19
  71. package/chunks/{list.action-6I5EZAVB.js → list.action-WVRVLX5E.js} +22 -22
  72. package/chunks/{publish.action-PODTVRXS.js → publish.action-AHFUBT5C.js} +44 -36
  73. package/chunks/{update.action-KMD4ZM75.js → update.action-YQTVUDYE.js} +22 -22
  74. package/chunks/{update.action-4F6STTEQ.js → update.action-ZREAFJVG.js} +22 -22
  75. package/docs.html +107 -104
  76. package/index.js +84 -68
  77. package/package.json +19 -15
  78. package/chunks/action-CCW66QJN.js +0 -72
  79. package/chunks/action-CQ56FVES.js +0 -65
  80. package/chunks/action-JOSVV6YA.js +0 -71
  81. package/chunks/action-P7LN6FGY.js +0 -13
  82. package/chunks/action-R6ZZO26F.js +0 -299
  83. package/chunks/action-TWFJNQ2R.js +0 -95
  84. package/chunks/chunk-5BPPGTUU.js +0 -463
  85. package/chunks/chunk-DOVIWNKQ.js +0 -108
  86. package/chunks/chunk-ISGLWBXZ.js +0 -4265
  87. package/chunks/chunk-T7MDADON.js +0 -17
  88. package/chunks/chunk-VTYTPSXO.js +0 -161
@@ -1,13 +1,15 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  RegistryResourceTypes,
4
- baseRegistrySchema
5
- } from "./chunk-VTYTPSXO.js";
4
+ baseRegistrySchema,
5
+ contentShaSchema
6
+ } from "./chunk-CX7ZRMTC.js";
6
7
  import {
7
8
  brandedUid,
8
9
  docVersionSchema,
9
10
  emailSchema,
10
11
  entitySchema,
12
+ external_exports,
11
13
  mintUid,
12
14
  nanoid,
13
15
  nanoidSchema,
@@ -17,10 +19,7 @@ import {
17
19
  slugSchema,
18
20
  timestampSchema,
19
21
  unixTimestamp
20
- } from "./chunk-ISGLWBXZ.js";
21
- import {
22
- external_exports
23
- } from "./chunk-H2WRMLYY.js";
22
+ } from "./chunk-IKT5F47M.js";
24
23
 
25
24
  // ../../packages/entities/dist/access-group/schema.js
26
25
  var emailDomainRegex = /^([A-Za-z0-9]+(-[A-Za-z0-9]+)*\.)+[A-Za-z]{2,}$/i;
@@ -120,7 +119,13 @@ var microsoftProfileSchema = external_exports.object({
120
119
  */
121
120
  xms_edov: external_exports.union([external_exports.boolean(), external_exports.string()]).optional()
122
121
  }).meta({ id: "microsoft-profile" });
123
- var hostingOauthResourceSchema = external_exports.enum([...RegistryResourceTypes, "sync-project", "project", "publish"]).meta({ id: "hosting-oauth-resource" });
122
+ var hostingOauthResourceSchema = external_exports.enum([
123
+ ...RegistryResourceTypes,
124
+ "sync-project",
125
+ "project",
126
+ "publish",
127
+ "namespace"
128
+ ]).meta({ id: "hosting-oauth-resource" });
124
129
  var hostingOauthStateSchema = external_exports.object({
125
130
  uid: nanoidSchema,
126
131
  resource: external_exports.object({
@@ -162,7 +167,15 @@ var samlStateSchema = external_exports.object({
162
167
  // Expiry
163
168
  expiresAt: external_exports.number()
164
169
  }).meta({ id: "saml-state" });
165
- var ssoResourceSchema = external_exports.enum([...RegistryResourceTypes, "sync-project", "project", "publish", "mcp"]).meta({ id: "sso-resource" });
170
+ var ssoResourceSchema = external_exports.enum([
171
+ ...RegistryResourceTypes,
172
+ "sync-project",
173
+ "project",
174
+ "publish",
175
+ "mcp",
176
+ /** A team's registry namespace page, rather than one record on it. */
177
+ "namespace"
178
+ ]).meta({ id: "sso-resource" });
166
179
  var relayStateSchema = external_exports.object({
167
180
  /** Uniquely identifies a relay state */
168
181
  uid: nanoidSchema.default(nanoid).meta({ default: "nanoid()" }),
@@ -190,11 +203,9 @@ var relayStateSchema = external_exports.object({
190
203
  var AuthDomains;
191
204
  (function(AuthDomains2) {
192
205
  AuthDomains2["Cli"] = "cli";
193
- AuthDomains2["Docs"] = "docs";
194
206
  AuthDomains2["Client"] = "client";
195
207
  AuthDomains2["Local"] = "local";
196
208
  AuthDomains2["Dashboard"] = "dashboard";
197
- AuthDomains2["Editor"] = "editor";
198
209
  AuthDomains2["Agent"] = "agent";
199
210
  AuthDomains2["Mcp"] = "mcp";
200
211
  })(AuthDomains || (AuthDomains = {}));
@@ -256,7 +267,19 @@ var loginPortalSchema = external_exports.object({
256
267
  // ../../packages/entities/dist/managed-schema/schema.js
257
268
  var managedSchemaVersion = entitySchema.extend({
258
269
  /** Version identifier (e.g. 0.0.1) for schema */
259
- version: docVersionSchema.default("0.0.1")
270
+ version: docVersionSchema.default("0.0.1"),
271
+ /**
272
+ * SHA-256 hex digest of the YAML content the version serves, from its
273
+ * chain head. Integrity metadata for the YAML serialization, never a
274
+ * storage key.
275
+ */
276
+ yamlSha: contentShaSchema.optional(),
277
+ /**
278
+ * SHA-256 hex digest of the JSON content the version serves, from its
279
+ * chain head. This is the blob key for both formats, matching the API
280
+ * document entity.
281
+ */
282
+ jsonSha: contentShaSchema.optional()
260
283
  }).meta({ id: "managed-schema-version" });
261
284
  var managedSchemaFormat = external_exports.enum(["json", "yaml"]).meta({ id: "managed-schema-format" });
262
285
  var managedSchema = baseRegistrySchema.extend({
@@ -264,12 +287,68 @@ var managedSchema = baseRegistrySchema.extend({
264
287
  uid: brandedUid().default(mintUid).meta({ default: "nanoid()" }),
265
288
  /** The current version served to consumers by default */
266
289
  version: docVersionSchema.default("0.0.1"),
267
- /** All schema versions */
268
- versions: managedSchemaVersion.array(),
269
290
  /** Default schema format for edit/view */
270
291
  format: managedSchemaFormat.default("json")
271
292
  }).meta({ id: "managed-schema" });
272
293
 
294
+ // ../../packages/entities/dist/repository/repository.js
295
+ var linkedRepositoryRemoteSchema = external_exports.discriminatedUnion("provider", [
296
+ external_exports.object({
297
+ provider: external_exports.literal("github"),
298
+ installationId: external_exports.number().int(),
299
+ /** GitHub's numeric repository id; stable across renames. */
300
+ id: external_exports.number().int(),
301
+ /** The `owner/repo` full name. */
302
+ name: external_exports.string().min(2),
303
+ defaultBranch: external_exports.string().default("main")
304
+ }),
305
+ external_exports.object({
306
+ provider: external_exports.literal("bitbucket"),
307
+ workspaceUuid: external_exports.string(),
308
+ workspaceSlug: external_exports.string(),
309
+ repoUuid: external_exports.string(),
310
+ repoSlug: external_exports.string(),
311
+ /** The `workspace/repo` full name. */
312
+ name: external_exports.string().min(2),
313
+ defaultBranch: external_exports.string().default("main")
314
+ })
315
+ ]).meta({ id: "linked-repository-remote" });
316
+ var linkedRepositorySchema = entitySchema.extend({
317
+ /** Own uid, branded so it cannot be confused with another entity's uid */
318
+ uid: brandedUid().default(mintUid).meta({ default: "nanoid()" }),
319
+ remote: linkedRepositoryRemoteSchema,
320
+ /**
321
+ * The single internal mirror. Null until provisioning succeeds — the link
322
+ * itself must not fail because Forgejo was briefly unreachable, so the
323
+ * mirror is re-ensured on demand rather than required up front.
324
+ */
325
+ forgejo: external_exports.object({
326
+ owner: external_exports.string(),
327
+ repo: external_exports.string(),
328
+ branch: external_exports.string().default("main")
329
+ }).nullable().default(null),
330
+ /** Email of the user who linked the repository. */
331
+ linkedBy: external_exports.string()
332
+ }).meta({ id: "linked-repository" });
333
+
334
+ // ../../packages/entities/dist/repository/webhook-event-claim.js
335
+ var webhookEventClaimRecordSchema = entitySchema.extend({
336
+ /** `<teamUid>:<projectUid>:<eventKey>`, unique across the collection. */
337
+ claimKey: external_exports.string(),
338
+ /**
339
+ * The delivery that holds the claim. A delivery whose work failed removes
340
+ * its own claim by this, so it cannot take away a claim another delivery
341
+ * has since taken over.
342
+ */
343
+ delivery: external_exports.string(),
344
+ /**
345
+ * When the claim lapses and this record may be collected, as a Date because
346
+ * MongoDB TTL indexes only act on BSON dates and silently ignore numeric
347
+ * fields.
348
+ */
349
+ expiresAt: external_exports.date()
350
+ }).meta({ id: "webhook-event-claim-record" });
351
+
273
352
  // ../../packages/entities/dist/waitlist/index.js
274
353
  var WaitlistProducts;
275
354
  (function(WaitlistProducts2) {
@@ -293,6 +372,95 @@ var waitlistRecordSchema = external_exports.object({
293
372
  })
294
373
  }).meta({ id: "waitlist-record" });
295
374
 
375
+ // ../../packages/entities/dist/webhook/schema.js
376
+ var webhookEventSchema = external_exports.enum(["sdk.build.completed"]).meta({ id: "webhook-event" });
377
+ var webhookDisabledReasonSchema = external_exports.enum(["consecutive-failures"]).meta({ id: "webhook-disabled-reason" });
378
+ var webhookSubscriptionSchema = entitySchema.extend({
379
+ uid: brandedUid().default(mintUid).meta({ default: "nanoid()" }),
380
+ teamUid: nanoidSchema,
381
+ /** Event delivered to this endpoint. */
382
+ event: webhookEventSchema.default("sdk.build.completed"),
383
+ /** Where deliveries are POSTed. Validated against the SSRF guard on write. */
384
+ url: external_exports.url(),
385
+ /** Whether deliveries are attempted. Cleared by the auto-disable path. */
386
+ enabled: external_exports.boolean().default(true),
387
+ /** Optional label describing the endpoint. */
388
+ description: external_exports.string().max(200).default(""),
389
+ /**
390
+ * Terminal failures since the last success. Reset to zero on any 2xx, and
391
+ * compared against {@link WEBHOOK_FAILURE_DISABLE_THRESHOLD}.
392
+ */
393
+ consecutiveFailures: external_exports.number().int().min(0).default(0),
394
+ /**
395
+ * Set when the platform disabled this itself, so the dashboard can explain
396
+ * why an endpoint stopped rather than showing a bare "off" toggle.
397
+ *
398
+ * Nullable as well as optional: mongobase round-trips an unset optional as
399
+ * null, and a strict parse would drop the whole document on read.
400
+ */
401
+ disabledReason: webhookDisabledReasonSchema.nullable().optional(),
402
+ /** When the platform disabled it, in unix seconds. Nullable, as above. */
403
+ disabledAt: external_exports.number().nullable().optional()
404
+ }).meta({ id: "webhook-subscription" });
405
+ var WEBHOOK_SECRET_KEY_VERSION = 1;
406
+ var WEBHOOK_SECRET_GRACE_PERIOD_SECONDS = 24 * 60 * 60;
407
+ var webhookSecretSchema = entitySchema.extend({
408
+ uid: brandedUid(),
409
+ teamUid: nanoidSchema,
410
+ /** AES-256-GCM ciphertext of the secret, hex encoded. */
411
+ ciphertext: external_exports.string(),
412
+ /** Initialisation vector for {@link ciphertext}, hex encoded. */
413
+ iv: external_exports.string(),
414
+ /**
415
+ * GCM authentication tag, hex encoded. Covers the ciphertext and the
416
+ * subscription the record belongs to, so tampering or moving a record
417
+ * between endpoints fails the decrypt.
418
+ */
419
+ tag: external_exports.string(),
420
+ /** {@link WEBHOOK_SECRET_KEY_VERSION} in force when this was written. */
421
+ keyVersion: external_exports.number().int().default(WEBHOOK_SECRET_KEY_VERSION),
422
+ /**
423
+ * The secret this one replaced, kept signing until `expiresAt` so a
424
+ * routine roll does not drop deliveries while the customer updates their
425
+ * receiver. At most one — rolling again inside the window replaces it.
426
+ *
427
+ * Nullable as well as optional: mongobase round-trips an unset optional as
428
+ * null, and a strict parse would drop the whole document on read.
429
+ */
430
+ previous: external_exports.object({
431
+ ciphertext: external_exports.string(),
432
+ iv: external_exports.string(),
433
+ tag: external_exports.string(),
434
+ keyVersion: external_exports.number().int(),
435
+ /** Unix seconds after which this secret stops signing deliveries. */
436
+ expiresAt: external_exports.number()
437
+ }).nullable().optional()
438
+ }).meta({ id: "webhook-secret" });
439
+ var webhookDeliveryStatusSchema = external_exports.enum(["pending", "succeeded", "failed"]).meta({ id: "webhook-delivery-status" });
440
+ var webhookDeliverySchema = entitySchema.extend({
441
+ uid: brandedUid().default(mintUid).meta({ default: "nanoid()" }),
442
+ teamUid: nanoidSchema,
443
+ subscriptionUid: brandedUid(),
444
+ event: webhookEventSchema,
445
+ /**
446
+ * What made this delivery unique for its subscription — the build uid for a
447
+ * build event. Pub/Sub is at-least-once, so a redelivered source message
448
+ * must land on the same delivery document rather than POSTing twice.
449
+ */
450
+ dedupeKey: external_exports.string(),
451
+ /** The exact JSON body that is sent. */
452
+ payload: external_exports.string(),
453
+ /** Attempts made so far, across Cloud Tasks retries. */
454
+ attempts: external_exports.number().int().min(0).default(0),
455
+ status: webhookDeliveryStatusSchema.default("pending"),
456
+ /** Unix seconds of the most recent attempt. Nullable for the round-trip reason above. */
457
+ lastAttemptAt: external_exports.number().nullable().optional(),
458
+ /** HTTP status the endpoint returned, when it returned one at all. */
459
+ responseStatus: external_exports.number().nullable().optional(),
460
+ /** Why the last attempt failed, in terms a customer can act on. */
461
+ errorMessage: external_exports.string().nullable().optional()
462
+ }).meta({ id: "webhook-delivery" });
463
+
296
464
  // ../../packages/entities/dist/workspace/hotkeys/constants.js
297
465
  var HOTKEY_EVENT_NAMES = [
298
466
  "closeModal",
@@ -457,9 +625,13 @@ export {
457
625
  identityProviders,
458
626
  identityProviderRecordSchema,
459
627
  loginPortalSchema,
628
+ managedSchemaVersion,
460
629
  managedSchema,
630
+ linkedRepositorySchema,
461
631
  WaitlistProducts,
462
632
  WaitlistSources,
633
+ webhookSubscriptionSchema,
634
+ webhookDeliverySchema,
463
635
  workspaceVersionSchema,
464
636
  workspaceSchema
465
637
  };
@@ -2,16 +2,16 @@ import { createRequire as $$cR } from "node:module"; const require = $$cR(import
2
2
  import {
3
3
  findConfig,
4
4
  parseConfig
5
- } from "./chunk-47Y4L5IT.js";
5
+ } from "./chunk-NNMSZVAB.js";
6
6
  import {
7
7
  ConfigVersion
8
- } from "./chunk-ISGLWBXZ.js";
9
- import {
10
- external_exports
11
- } from "./chunk-H2WRMLYY.js";
8
+ } from "./chunk-OQKDBLOZ.js";
12
9
  import {
13
10
  output
14
- } from "./chunk-X4QLDBB5.js";
11
+ } from "./chunk-T5HJUAWB.js";
12
+ import {
13
+ external_exports
14
+ } from "./chunk-IKT5F47M.js";
15
15
 
16
16
  // src/domains/project/check-config/parse-config.ts
17
17
  import fs from "node:fs";
@@ -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 isolate");
11
+ cmd.description("Download the docs preview server");
12
12
  cmd.action(async () => {
13
- const { downloadIsolate } = await import("./action-P7LN6FGY.js");
13
+ const { downloadIsolate } = await import("./action-42D2C47G.js");
14
14
  await downloadIsolate();
15
15
  });
16
16
  return cmd;