@scalar/cli 2.12.1 → 2.12.3

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 (87) hide show
  1. package/README.md +2 -0
  2. package/chunks/{action-JT6C472I.js → action-4ESHWOAM.js} +4 -4
  3. package/chunks/{action-7HXYZPOT.js → action-5BJL72JE.js} +4 -4
  4. package/chunks/{action-UTFRCKGE.js → action-6A4NM5WS.js} +4 -4
  5. package/chunks/{action-KWFAMQN5.js → action-6I2PWENU.js} +19 -19
  6. package/chunks/{action-D52JJ3NL.js → action-7CUPRYNA.js} +13 -13
  7. package/chunks/{action-6IHAGCNR.js → action-AYKKHH7A.js} +13 -13
  8. package/chunks/{action-AOKHLTZ6.js → action-B74PPGKB.js} +5 -5
  9. package/chunks/{action-NY2MGVBS.js → action-BDDXF4YV.js} +13 -13
  10. package/chunks/{action-T2I4TFLU.js → action-BYYKW4S6.js} +8 -8
  11. package/chunks/action-D7L757PX.js +422 -0
  12. package/chunks/{action-HJSRU322.js → action-ED4TSPRZ.js} +13 -13
  13. package/chunks/{action-IASJWF5P.js → action-EPGS3U3T.js} +14 -14
  14. package/chunks/{action-D3IVCY24.js → action-EWDQOX5B.js} +4 -4
  15. package/chunks/{action-TH3TYR2A.js → action-EWZLVN45.js} +21 -21
  16. package/chunks/{action-A2GXYB2K.js → action-FBOTIFVC.js} +10 -10
  17. package/chunks/{action-YL3CEKE7.js → action-FBQAU5LV.js} +13 -13
  18. package/chunks/{action-4G23NFVD.js → action-GJHOZ6Q5.js} +66 -46
  19. package/chunks/{action-GZKDPO3N.js → action-GMJJMZXY.js} +13 -13
  20. package/chunks/{action-XPJFCCAT.js → action-H4GW3KAI.js} +17 -17
  21. package/chunks/{action-6IZYBY5P.js → action-HAKFAXTQ.js} +4 -4
  22. package/chunks/{action-4B3MNNEG.js → action-I2IV4VLL.js} +18 -18
  23. package/chunks/{action-6UOTMYQ4.js → action-JXCU2JKC.js} +2 -2
  24. package/chunks/{action-KDT6H6ML.js → action-KIOYSVKX.js} +4 -4
  25. package/chunks/{action-IIQMZVRJ.js → action-LRR52RXL.js} +10 -8
  26. package/chunks/{action-INB2R2NQ.js → action-M5OUEDV2.js} +4 -4
  27. package/chunks/{action-AQ7BSPBE.js → action-O7ROX6NF.js} +89 -51
  28. package/chunks/{action-JHPUNA7Z.js → action-Q3DI54OW.js} +17 -17
  29. package/chunks/{action-6KP6KOYC.js → action-RPTLQBMK.js} +6 -6
  30. package/chunks/{action-RDXVIAS3.js → action-T4MM4OUS.js} +19 -19
  31. package/chunks/{action-S7SONQ5E.js → action-UHXBY3RD.js} +2 -2
  32. package/chunks/{action-ENZGEP4Y.js → action-VVKMUOKR.js} +8 -6
  33. package/chunks/{action-O757TFA2.js → action-YXRCGKCK.js} +4 -4
  34. package/chunks/{action-HA3CMV3P.js → action-ZBEOLJJR.js} +4 -4
  35. package/chunks/{action-5I763IT2.js → action-ZOYQBWGD.js} +16 -16
  36. package/chunks/{actions-LNIEIP7C.js → actions-EXQNVV4T.js} +13 -13
  37. package/chunks/{agent-F2A4UROF.js → agent-XAHNA4MB.js} +4 -4
  38. package/chunks/{asyncapi-HASQNFWS.js → asyncapi-FNOWXSKB.js} +51 -43
  39. package/chunks/{build.action-XKJ4ET3G.js → build.action-TIKRZPQ5.js} +17 -17
  40. package/chunks/{chunk-N645RGAB.js → chunk-2AK5O3NQ.js} +33 -33
  41. package/chunks/{chunk-LWIAFTKX.js → chunk-2GKXAGSH.js} +55 -10
  42. package/chunks/chunk-2I6V7AI3.js +68 -0
  43. package/chunks/{chunk-CFI5GBAK.js → chunk-4YQVGOHX.js} +1 -1
  44. package/chunks/{chunk-ZW62VYJW.js → chunk-62OOT7FY.js} +5 -5
  45. package/chunks/{chunk-KWLAZV7P.js → chunk-7S34K2P3.js} +1 -1
  46. package/chunks/{chunk-U764PQUA.js → chunk-AOZQPCWI.js} +2 -0
  47. package/chunks/{chunk-BHWUD65X.js → chunk-BDNCJLJP.js} +1 -1
  48. package/chunks/{chunk-WZJTV4ET.js → chunk-BOPEAS7H.js} +1 -1
  49. package/chunks/{chunk-D5YZ3FXG.js → chunk-CUHVXHIV.js} +1 -1
  50. package/chunks/{chunk-PU5UIHAF.js → chunk-EUFK4MVX.js} +2 -2
  51. package/chunks/{chunk-V3MYP5SQ.js → chunk-EXJUFF6G.js} +13 -2
  52. package/chunks/{chunk-7M44FQHX.js → chunk-F3TQHNSQ.js} +139 -95
  53. package/chunks/{chunk-NTRWXCXD.js → chunk-FI7UKPRF.js} +2 -2
  54. package/chunks/{chunk-LLZDQXYS.js → chunk-FYMDIB7J.js} +1 -1
  55. package/chunks/{chunk-SNOAL2C5.js → chunk-I7ZVWF57.js} +1 -1
  56. package/chunks/{chunk-DKZ3PS3X.js → chunk-IOW726L2.js} +1 -1
  57. package/chunks/{chunk-7TSQ7ZGU.js → chunk-IRA5BW2J.js} +7 -5
  58. package/chunks/{chunk-4BE7UCJO.js → chunk-JWNWOK2M.js} +2 -2
  59. package/chunks/{chunk-JLNHOA5Z.js → chunk-KPLWZIOV.js} +36 -4
  60. package/chunks/{chunk-EJSGWV2K.js → chunk-KWIY2QZY.js} +1 -1
  61. package/chunks/{chunk-GPQXLA43.js → chunk-LEECPQZN.js} +2 -2
  62. package/chunks/{chunk-YLZP3W37.js → chunk-MQ65WBVF.js} +22 -1
  63. package/chunks/{chunk-IZVRYC2N.js → chunk-OZQPMMTA.js} +3 -3
  64. package/chunks/{chunk-V6LUKXBV.js → chunk-RE5Z56QD.js} +2 -2
  65. package/chunks/{chunk-XLZEIIPW.js → chunk-TI4NDKQC.js} +40 -7
  66. package/chunks/{chunk-VUNOOPEG.js → chunk-TYNF7ROW.js} +1 -1
  67. package/chunks/{chunk-YMRRFDEQ.js → chunk-UN2AAVO5.js} +2 -2
  68. package/chunks/chunk-V7RTDFHK.js +56 -0
  69. package/chunks/{chunk-PERC34BV.js → chunk-WKW5W2ZP.js} +1 -1
  70. package/chunks/{chunk-RYWXF3LO.js → chunk-Y2OQOAY7.js} +1 -1
  71. package/chunks/{chunk-E57QCEAV.js → chunk-YTTDYTVB.js} +1 -1
  72. package/chunks/{create.action-XXOLILUS.js → create.action-K7GTWYST.js} +17 -17
  73. package/chunks/{delete.action-R5KGPLDG.js → delete.action-E4XRGKQW.js} +16 -16
  74. package/chunks/{delete.action-TQJOZRV7.js → delete.action-JKLXBYRD.js} +17 -17
  75. package/chunks/{get.action-IQMOL4WM.js → get.action-2AKMD4W3.js} +10 -10
  76. package/chunks/{get.action-46OBVOQQ.js → get.action-IY7WSJMX.js} +16 -16
  77. package/chunks/{list.action-RIS7Q4OU.js → list.action-44YVCWKN.js} +16 -16
  78. package/chunks/{list.action-GXTKKVHY.js → list.action-NRL2DDL5.js} +17 -17
  79. package/chunks/{publish.action-A4T4BT3F.js → publish.action-E76MHLCN.js} +21 -21
  80. package/chunks/{update.action-TK5L4PXB.js → update.action-FTTVWVAB.js} +16 -16
  81. package/chunks/{update.action-IZ5GULPY.js → update.action-LZCAHAWW.js} +17 -17
  82. package/index.js +223 -117
  83. package/package.json +1 -1
  84. package/skills/scalar-cli/SKILL.md +1 -1
  85. package/template.md +2 -0
  86. package/chunks/action-VK5HZHSC.js +0 -165
  87. package/chunks/chunk-JFIXNSPP.js +0 -26
@@ -373,6 +373,38 @@ var teamAuthenticationSchema = external_exports.object({
373
373
  */
374
374
  userControls: external_exports.record(nanoidSchema, teamAuthenticationMethodsSchema).default({})
375
375
  }).meta({ id: "team-authentication" });
376
+ var CONTROL_CHARACTERS = new RegExp("\\p{Cc}", "u");
377
+ var teamEmailDomainStatusSchema = external_exports.enum([
378
+ "pending",
379
+ "active",
380
+ "failed"
381
+ ]);
382
+ var teamEmailSenderSchema = external_exports.object({
383
+ /** The display name readers see. Unset sends as `DEFAULT_LOGIN_FROM_NAME`. */
384
+ fromName: external_exports.string().trim().min(1).max(100).refine((name) => !CONTROL_CHARACTERS.test(name), {
385
+ message: "The sender name cannot contain control characters"
386
+ }).nullish(),
387
+ replyTo: emailSchema.nullish(),
388
+ /** The address's local part on `domain`, e.g. `docs` */
389
+ localPart: external_exports.string().regex(/^[a-z0-9._+-]{1,64}$/i).nullish(),
390
+ /** Lower-cased with no trailing dot. One team holds a domain at a time. */
391
+ domain: external_exports.string().nullish(),
392
+ postmarkDomainId: external_exports.number().int().nullish(),
393
+ domainStatus: teamEmailDomainStatusSchema.nullish(),
394
+ /** The TXT record Postmark verifies DKIM against */
395
+ dkim: external_exports.object({ host: external_exports.string(), value: external_exports.string() }).nullish(),
396
+ /** The CNAME bounces return through. Optional for sending. */
397
+ returnPath: external_exports.object({ host: external_exports.string(), target: external_exports.string() }).nullish(),
398
+ /** Whether Postmark last found the Return-Path CNAME in place */
399
+ returnPathVerified: external_exports.boolean().nullish(),
400
+ /** When the domain was last checked with Postmark, in unix seconds */
401
+ checkedAt: timestampSchema.nullish(),
402
+ /**
403
+ * When the team claimed the domain, in unix seconds. A claim still
404
+ * unverified a while after this can be taken over by another team.
405
+ */
406
+ claimedAt: timestampSchema.nullish()
407
+ }).meta({ id: "team-email-sender" });
376
408
  var teamSchema = entitySchema.extend({
377
409
  /** Own uid, branded so it cannot be confused with another entity's uid */
378
410
  uid: brandedUid().default(mintUid).meta({ default: "nanoid()" }),
@@ -402,6 +434,8 @@ var teamSchema = entitySchema.extend({
402
434
  authentication: teamAuthenticationSchema.default(schemaModel({}, teamAuthenticationSchema)),
403
435
  externalAccess: externalAccessSchema.default(schemaModel({}, externalAccessSchema)),
404
436
  features: featureFlagSchema.default({}),
437
+ /** Who login portal emails come from. Absent means the Scalar sender. */
438
+ emailSender: teamEmailSenderSchema.nullish(),
405
439
  /**
406
440
  * Progress through the move off the legacy WYSIWYG editor. Absent on teams
407
441
  * that have never been touched by the migration — including every team that
@@ -415,101 +449,6 @@ var teamSchema = entitySchema.extend({
415
449
  verified: external_exports.boolean().default(false).optional()
416
450
  }).meta({ id: "team" });
417
451
 
418
- // ../../packages/entities/dist/team/flat-pricing-report.js
419
- var flatPricingSkipReasons = [
420
- "no-billing-id",
421
- "free-or-trial",
422
- /** Enterprise plan, or an `enterprise` or `enterprise_sla` item; never moved. */
423
- "enterprise",
424
- /** Seat or SDK auto-billing is frozen for a flat-rate contract. */
425
- "auto-billing-frozen",
426
- "past-due",
427
- "no-customer",
428
- "no-subscription",
429
- /** More than one subscription Stripe still bills; the webhooks assume one. */
430
- "multiple-subscriptions",
431
- /** A cancellation is pending. */
432
- "cancelling",
433
- "subscription-schedule",
434
- "non-usd",
435
- /** No plan item, more than one, a plan interval other than month or year, or two SDK lines landing on one price. */
436
- "unsupported-items",
437
- /** On 2026 pricing in Stripe and Mongo, within its tier's limits. */
438
- "already-flat",
439
- /** The target differs from the one the reviewed dry run listed. */
440
- "changed-since-review"
441
- ];
442
- var unmeasuredSdkReasons = [
443
- "unlinked",
444
- "unpublished",
445
- "no-version-row",
446
- /** The API, its version head or the stored document could not be read. */
447
- "no-content",
448
- "unparseable",
449
- "asyncapi"
450
- ];
451
- var lineItemSchema = zod_default.object({
452
- lookupKey: zod_default.string().nullable(),
453
- quantity: zod_default.number().int()
454
- });
455
- var flatPricingTargetSchema = zod_default.object({
456
- plan: billingPlanSchema,
457
- items: zod_default.array(lineItemSchema),
458
- pinnedSdkUids: zod_default.array(zod_default.string())
459
- });
460
- var flatPricingSdkSchema = zod_default.object({
461
- sdkUid: zod_default.string(),
462
- name: zod_default.string(),
463
- /** Targets the SDK bills. */
464
- targets: zod_default.number().int(),
465
- endpointCount: zod_default.number().int().nullable(),
466
- /** The version row's count, a count taken from the stored document, or neither. */
467
- source: zod_default.enum(["stored", "measured", "unmeasured"]),
468
- unmeasuredReason: zod_default.enum(unmeasuredSdkReasons).nullable(),
469
- /** The band its targets bill in today; every target on a legacy subscription bills standard. */
470
- currentBand: sdkPriceBandSchema,
471
- /** Pinned to the standard band once the team moves, by this migration or before it. */
472
- pinned: zod_default.boolean()
473
- });
474
- var flatPricingReportSchema = zod_default.object({
475
- teamUid: zod_default.string(),
476
- teamName: zod_default.string(),
477
- plan: billingPlanSchema,
478
- pricingModel: zod_default.literal("flat_2026").nullable(),
479
- outcome: zod_default.enum([
480
- "skipped",
481
- "would-migrate",
482
- "migrated",
483
- /** Flat in Stripe but stale in Mongo: only the team record is written. */
484
- "would-repair",
485
- "repaired"
486
- ]),
487
- skipReason: zod_default.enum(flatPricingSkipReasons).nullable(),
488
- subscriptionId: zod_default.string().nullable(),
489
- /** Which pricing the subscription's plan item is on, read from its lookup key. */
490
- stripeModel: zod_default.enum(["legacy", "flat"]).nullable(),
491
- interval: zod_default.enum(["month", "year"]).nullable(),
492
- /** The plan item's `current_period_end`, in unix seconds: when the new price is first invoiced. */
493
- renewsAt: zod_default.number().int().nullable(),
494
- currentItems: zod_default.array(lineItemSchema.extend({ unitAmountUsd: zod_default.number().nullable() })),
495
- /** Null when a licensed item has no flat unit amount to add up. */
496
- currentPerCycleUsd: zod_default.number().nullable(),
497
- projectedPerCycleUsd: zod_default.number().nullable(),
498
- /** Coupons on the subscription and the customer; an in-place update keeps them. */
499
- discounts: zod_default.array(zod_default.string()),
500
- editors: zod_default.number().int(),
501
- apis: zod_default.number().int(),
502
- sdks: zod_default.array(flatPricingSdkSchema),
503
- /** Targets on SDK rows the read drops, billed at the standard band. */
504
- legacySdkTargets: zod_default.number().int(),
505
- classification: zod_default.object({
506
- tier: zod_default.enum(["pro", "business"]),
507
- reasons: zod_default.array(zod_default.string()),
508
- exceedsBusiness: zod_default.array(zod_default.string())
509
- }).nullable(),
510
- target: flatPricingTargetSchema.nullable()
511
- }).meta({ id: "flat-pricing-report" });
512
-
513
452
  // ../../packages/entities/dist/team/helpers.js
514
453
  var billingFeatures = {
515
454
  team: {
@@ -523,6 +462,9 @@ var billingFeatures = {
523
462
  },
524
463
  publishing: {
525
464
  subpath: "subpathHosting"
465
+ },
466
+ email: {
467
+ sender: "emailSender"
526
468
  }
527
469
  };
528
470
  var teamBillingFeatures = {
@@ -556,6 +498,12 @@ var teamBillingFeatures = {
556
498
  [BillingPlan.BusinessMonthly]: true,
557
499
  [BillingPlan.BusinessYearly]: true,
558
500
  [BillingPlan.Enterprise]: true
501
+ },
502
+ // A team's own login portal email sender starts on Business.
503
+ [billingFeatures.email.sender]: {
504
+ [BillingPlan.BusinessMonthly]: true,
505
+ [BillingPlan.BusinessYearly]: true,
506
+ [BillingPlan.Enterprise]: true
559
507
  }
560
508
  };
561
509
  var permissions = {
@@ -609,6 +557,101 @@ var teamPermissions = {
609
557
  }
610
558
  };
611
559
 
560
+ // ../../packages/entities/dist/team/flat-pricing-report.js
561
+ var flatPricingSkipReasons = [
562
+ "no-billing-id",
563
+ "free-or-trial",
564
+ /** Enterprise plan, or an `enterprise` or `enterprise_sla` item; never moved. */
565
+ "enterprise",
566
+ /** Seat or SDK auto-billing is frozen for a flat-rate contract. */
567
+ "auto-billing-frozen",
568
+ "past-due",
569
+ "no-customer",
570
+ "no-subscription",
571
+ /** More than one subscription Stripe still bills; the webhooks assume one. */
572
+ "multiple-subscriptions",
573
+ /** A cancellation is pending. */
574
+ "cancelling",
575
+ "subscription-schedule",
576
+ "non-usd",
577
+ /** No plan item, more than one, a plan interval other than month or year, or two SDK lines landing on one price. */
578
+ "unsupported-items",
579
+ /** On 2026 pricing in Stripe and Mongo, within its tier's limits. */
580
+ "already-flat",
581
+ /** The target differs from the one the reviewed dry run listed. */
582
+ "changed-since-review"
583
+ ];
584
+ var unmeasuredSdkReasons = [
585
+ "unlinked",
586
+ "unpublished",
587
+ "no-version-row",
588
+ /** The API, its version head or the stored document could not be read. */
589
+ "no-content",
590
+ "unparseable",
591
+ "asyncapi"
592
+ ];
593
+ var lineItemSchema = zod_default.object({
594
+ lookupKey: zod_default.string().nullable(),
595
+ quantity: zod_default.number().int()
596
+ });
597
+ var flatPricingTargetSchema = zod_default.object({
598
+ plan: billingPlanSchema,
599
+ items: zod_default.array(lineItemSchema),
600
+ pinnedSdkUids: zod_default.array(zod_default.string())
601
+ });
602
+ var flatPricingSdkSchema = zod_default.object({
603
+ sdkUid: zod_default.string(),
604
+ name: zod_default.string(),
605
+ /** Targets the SDK bills. */
606
+ targets: zod_default.number().int(),
607
+ endpointCount: zod_default.number().int().nullable(),
608
+ /** The version row's count, a count taken from the stored document, or neither. */
609
+ source: zod_default.enum(["stored", "measured", "unmeasured"]),
610
+ unmeasuredReason: zod_default.enum(unmeasuredSdkReasons).nullable(),
611
+ /** The band its targets bill in today; every target on a legacy subscription bills standard. */
612
+ currentBand: sdkPriceBandSchema,
613
+ /** Pinned to the standard band once the team moves, by this migration or before it. */
614
+ pinned: zod_default.boolean()
615
+ });
616
+ var flatPricingReportSchema = zod_default.object({
617
+ teamUid: zod_default.string(),
618
+ teamName: zod_default.string(),
619
+ plan: billingPlanSchema,
620
+ pricingModel: zod_default.literal("flat_2026").nullable(),
621
+ outcome: zod_default.enum([
622
+ "skipped",
623
+ "would-migrate",
624
+ "migrated",
625
+ /** Flat in Stripe but stale in Mongo: only the team record is written. */
626
+ "would-repair",
627
+ "repaired"
628
+ ]),
629
+ skipReason: zod_default.enum(flatPricingSkipReasons).nullable(),
630
+ subscriptionId: zod_default.string().nullable(),
631
+ /** Which pricing the subscription's plan item is on, read from its lookup key. */
632
+ stripeModel: zod_default.enum(["legacy", "flat"]).nullable(),
633
+ interval: zod_default.enum(["month", "year"]).nullable(),
634
+ /** The plan item's `current_period_end`, in unix seconds: when the new price is first invoiced. */
635
+ renewsAt: zod_default.number().int().nullable(),
636
+ currentItems: zod_default.array(lineItemSchema.extend({ unitAmountUsd: zod_default.number().nullable() })),
637
+ /** Null when a licensed item has no flat unit amount to add up. */
638
+ currentPerCycleUsd: zod_default.number().nullable(),
639
+ projectedPerCycleUsd: zod_default.number().nullable(),
640
+ /** Coupons on the subscription and the customer; an in-place update keeps them. */
641
+ discounts: zod_default.array(zod_default.string()),
642
+ editors: zod_default.number().int(),
643
+ apis: zod_default.number().int(),
644
+ sdks: zod_default.array(flatPricingSdkSchema),
645
+ /** Targets on SDK rows the read drops, billed at the standard band. */
646
+ legacySdkTargets: zod_default.number().int(),
647
+ classification: zod_default.object({
648
+ tier: zod_default.enum(["pro", "business"]),
649
+ reasons: zod_default.array(zod_default.string()),
650
+ exceedsBusiness: zod_default.array(zod_default.string())
651
+ }).nullable(),
652
+ target: flatPricingTargetSchema.nullable()
653
+ }).meta({ id: "flat-pricing-report" });
654
+
612
655
  // ../../packages/entities/dist/team/usage-billing-report.js
613
656
  var usageBillingReportSchema = zod_default.object({
614
657
  teamUid: zod_default.string(),
@@ -646,5 +689,6 @@ export {
646
689
  teamImageSchema,
647
690
  emailAllowanceSchema,
648
691
  UnifiedDocsMigrationStatus,
692
+ teamEmailSenderSchema,
649
693
  teamSchema
650
694
  };
@@ -1,10 +1,10 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  config
4
- } from "./chunk-LLZDQXYS.js";
4
+ } from "./chunk-FYMDIB7J.js";
5
5
  import {
6
6
  roleSchema
7
- } from "./chunk-7M44FQHX.js";
7
+ } from "./chunk-F3TQHNSQ.js";
8
8
  import {
9
9
  output
10
10
  } from "./chunk-T5HJUAWB.js";
@@ -1,7 +1,7 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  version
4
- } from "./chunk-DKZ3PS3X.js";
4
+ } from "./chunk-IOW726L2.js";
5
5
 
6
6
  // src/config.ts
7
7
  import { portNumbers } from "get-port";
@@ -1,7 +1,7 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  safeNormalize
4
- } from "./chunk-PERC34BV.js";
4
+ } from "./chunk-WKW5W2ZP.js";
5
5
  import {
6
6
  isUrl
7
7
  } from "./chunk-4ORL4MST.js";
@@ -2,7 +2,7 @@ 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.12.1";
5
+ var version = "2.12.3";
6
6
  var bin = {
7
7
  scalar: "./dist/index.js",
8
8
  "scalar-cli": "./dist/index.js"
@@ -1,10 +1,10 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  mcpEnvironmentSchema
4
- } from "./chunk-V3MYP5SQ.js";
4
+ } from "./chunk-EXJUFF6G.js";
5
5
  import {
6
6
  billingPlanSchema
7
- } from "./chunk-7M44FQHX.js";
7
+ } from "./chunk-F3TQHNSQ.js";
8
8
  import {
9
9
  sharedProjectSchema
10
10
  } from "./chunk-VRZSDUZK.js";
@@ -26,7 +26,7 @@ import {
26
26
  mcpServerSchema,
27
27
  mcpServerVersionSchema,
28
28
  monthlyUsageSchema
29
- } from "./chunk-U764PQUA.js";
29
+ } from "./chunk-AOZQPCWI.js";
30
30
  import {
31
31
  environmentSlugSchema
32
32
  } from "./chunk-Q26DFKTY.js";
@@ -633,8 +633,10 @@ var mcpChannelOverridesSchema = external_exports.object({
633
633
  * The channel's Config as parsed from JSON or YAML: an OpenAPI-shaped patch
634
634
  * over the API description, replacing the environment's own whole; `{}`
635
635
  * clears it. Its root `x-scalar-access` sets the environment's login
636
- * portal, access groups and access group secrets by slug. The agent
637
- * validates it with `validateMcpConfig` and answers 422 with the refusals.
636
+ * portal, access groups and access group secrets by slug, and its root
637
+ * `x-scalar-customization` the theme (by slug) and logo of the page a
638
+ * browser gets at its address. The agent validates it with
639
+ * `validateMcpConfig` and answers 422 with the refusals.
638
640
  */
639
641
  config: external_exports.record(external_exports.string(), external_exports.unknown())
640
642
  });
@@ -1,10 +1,10 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  getAuthData
4
- } from "./chunk-NTRWXCXD.js";
4
+ } from "./chunk-FI7UKPRF.js";
5
5
  import {
6
6
  config
7
- } from "./chunk-LLZDQXYS.js";
7
+ } from "./chunk-FYMDIB7J.js";
8
8
  import {
9
9
  external_exports,
10
10
  objectSchema,
@@ -3,15 +3,15 @@ import {
3
3
  SdkLanguage,
4
4
  sdkVersionStatusSchema,
5
5
  sdkVersionTargetStateSchema
6
- } from "./chunk-RYWXF3LO.js";
6
+ } from "./chunk-Y2OQOAY7.js";
7
7
  import {
8
8
  cloudflareHostnameStateSchema
9
- } from "./chunk-V3MYP5SQ.js";
9
+ } from "./chunk-EXJUFF6G.js";
10
10
  import {
11
11
  RegistryResourceTypes,
12
12
  baseRegistrySchema,
13
13
  contentShaSchema
14
- } from "./chunk-U764PQUA.js";
14
+ } from "./chunk-AOZQPCWI.js";
15
15
  import {
16
16
  brandedUid,
17
17
  docVersionSchema,
@@ -272,6 +272,12 @@ var oauthStateSchema = external_exports.object({
272
272
  }).meta({ id: "oauth-state" });
273
273
 
274
274
  // ../../packages/entities/dist/auth/personal-token.js
275
+ var expiryReminderSchema = external_exports.object({
276
+ claimUid: external_exports.string(),
277
+ retryAfter: external_exports.number().int(),
278
+ completedAt: external_exports.number().int().optional(),
279
+ outcome: external_exports.enum(["sent", "suppressed", "ineligible"]).optional()
280
+ });
275
281
  var personalTokenRecordSchema = external_exports.object({
276
282
  uid: external_exports.string(),
277
283
  /** User friendly name */
@@ -282,8 +288,15 @@ var personalTokenRecordSchema = external_exports.object({
282
288
  teamUid: external_exports.string(),
283
289
  /** Token expiry time in unix timestamp */
284
290
  expiresAt: external_exports.number().int(),
291
+ /** Most recent successful key authentication, in Unix seconds. */
292
+ lastUsedAt: external_exports.number().int().nonnegative().optional(),
285
293
  /** Tracks if a token is blacklisted. Should not be used if token is revoked */
286
- revoked: external_exports.boolean()
294
+ revoked: external_exports.boolean(),
295
+ /** Delivery state for the seven-day and one-day expiry reminders. */
296
+ expiryReminders: external_exports.object({
297
+ sevenDays: expiryReminderSchema.optional(),
298
+ oneDay: expiryReminderSchema.optional()
299
+ }).optional()
287
300
  }).meta({ id: "personal-token-record" });
288
301
 
289
302
  // ../../packages/entities/dist/auth/revocation.js
@@ -309,6 +322,25 @@ var limitsSnapshotSchema = external_exports.strictObject({
309
322
  teams: external_exports.array(epochSchema)
310
323
  });
311
324
 
325
+ // ../../packages/entities/dist/auth/secret-revocation.js
326
+ var SECRET_REVOCATION_TTL_MS = 120 * 6e4;
327
+ var secretRevocationSchema = entitySchema.extend({
328
+ /** `secretAddressKey`, `teamSecretsKey` or `ALL_SECRETS_KEY` */
329
+ key: external_exports.string().min(1),
330
+ /** Epoch ms of the latest change */
331
+ revokedBefore: external_exports.number().int(),
332
+ /** `revokedBefore` plus `SECRET_REVOCATION_TTL_MS`, as a Date for the TTL index */
333
+ expiresAt: external_exports.date()
334
+ });
335
+ var secretRevocationSnapshotSchema = external_exports.strictObject({
336
+ /** Epoch ms on the clock of whoever read the rows, sampled before the read */
337
+ syncedAt: external_exports.number().int().min(0),
338
+ secrets: external_exports.array(external_exports.strictObject({
339
+ key: external_exports.string(),
340
+ revokedBefore: external_exports.number().int()
341
+ }))
342
+ });
343
+
312
344
  // ../../packages/entities/dist/auth/vcs-link-state.js
313
345
  var vcsProviderSchema = external_exports.enum(["github", "bitbucket"]);
314
346
  var vcsLinkStateSchema = external_exports.object({
@@ -42,7 +42,7 @@ function BundleCommand() {
42
42
  );
43
43
  completeFiles(cmd, ["file|url"], ["--output"]);
44
44
  cmd.action(async (...args) => {
45
- const { bundleAction } = await import("./action-AOKHLTZ6.js");
45
+ const { bundleAction } = await import("./action-B74PPGKB.js");
46
46
  return bundleAction(...args);
47
47
  });
48
48
  return cmd;
@@ -1,10 +1,10 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  config
4
- } from "./chunk-LLZDQXYS.js";
4
+ } from "./chunk-FYMDIB7J.js";
5
5
  import {
6
6
  RegistryAsset
7
- } from "./chunk-VUNOOPEG.js";
7
+ } from "./chunk-TYNF7ROW.js";
8
8
 
9
9
  // src/domains/registry/helpers/links.ts
10
10
  function registryUrl(path) {
@@ -63990,6 +63990,10 @@ var userInfoHookRequestSchema = external_exports.object({
63990
63990
  /** Unix seconds when the request was signed. */
63991
63991
  timestamp: external_exports.number().int()
63992
63992
  }).meta({ id: "user-info-hook-request" });
63993
+ var sharedSessionUserSchema = userInfoSchema.extend({
63994
+ email: emailSchema.optional(),
63995
+ groups: external_exports.array(userGroupSchema).max(MAX_USER_INFO_GROUPS).default([])
63996
+ });
63993
63997
 
63994
63998
  // ../../packages/scalar-config/dist/schema/utility.js
63995
63999
  var jsonRef = external_exports.object({
@@ -64488,6 +64492,10 @@ var routingSchema = external_exports.object({
64488
64492
  referencePathPattern: external_exports.string().optional(),
64489
64493
  redirects: redirectSchema.array().optional().describe("Redirects for the site. Can be used to redirect from one path to another")
64490
64494
  });
64495
+ var sharedSessionUrlSchema = external_exports.url({ protocol: /^https$/, abort: true }).refine((value) => {
64496
+ const url = new URL(value);
64497
+ return !url.username && !url.password;
64498
+ }, "Session URLs must not contain credentials.");
64491
64499
  var SITE_BANNER_TYPES = [
64492
64500
  "neutral",
64493
64501
  "info",
@@ -64508,7 +64516,7 @@ var rssFeedSchema = external_exports.object({
64508
64516
  path: pathSchema.refine((value) => !value.split("/").includes(".."), 'Path must not contain ".." segments').describe('Route of the changelog, e.g. /changelog. Every heading carrying an ISO date on the page at this route, or on any page beneath it, becomes a feed item \u2014 e.g. `## 1.1.11 (2026-06-26)`. Headings without a date are part of the entry above them. Must be a plain site route with no ".." segments.'),
64509
64517
  title: external_exports.string().optional().describe('Feed title. Defaults to the site title followed by "Changelog".'),
64510
64518
  description: external_exports.string().optional().describe("Feed description."),
64511
- entries: external_exports.enum(["headings", "pages"]).optional().describe("How feed items are found under `path`. 'headings' (default): each heading carrying an ISO date, e.g. `## 1.1.11 (2026-06-26)`, is an item \u2014 one page, many releases. 'pages': each page under `path` with a frontmatter `date` is one item \u2014 one page per post; pages without a `date` are skipped.")
64519
+ entries: external_exports.enum(["headings", "pages"]).optional().describe("How feed items are found under `path`. 'headings' (default): each heading carrying an ISO date, e.g. `## 1.1.11 (2026-06-26)`, is an item \u2014 one page, many releases. 'pages': each page under `path` with a frontmatter `date` is one item carrying the whole rendered page \u2014 one page per post or release; pages without a `date` are skipped.")
64512
64520
  });
64513
64521
  var hasUniqueFeedPaths = (rss) => {
64514
64522
  if (!Array.isArray(rss))
@@ -64534,6 +64542,11 @@ var siteConfigSchema = external_exports.object({
64534
64542
  * on a public site it also enables the sign-in flow.
64535
64543
  */
64536
64544
  userInfoHook: external_exports.url({ protocol: /^https$/ }).optional().describe("HTTPS endpoint that personalizes the site for signed-in visitors. Scalar POSTs a signed request for each visitor and applies the groups, values, and playground inputs it returns."),
64545
+ sharedSession: external_exports.object({
64546
+ userInfoUrl: sharedSessionUrlSchema.describe("Customer endpoint the browser requests with session cookies to personalize public docs."),
64547
+ loginUrl: sharedSessionUrlSchema.optional().describe("Optional application login URL for anonymous visitors."),
64548
+ returnUrlParameter: external_exports.string().trim().min(1).max(100).optional().describe("Login query parameter for the absolute original docs URL. Defaults to returnTo.")
64549
+ }).optional().describe("Personalize public docs using an existing application session, without Scalar sign-in."),
64537
64550
  /** Global layout options to hide/show select elements */
64538
64551
  layout: external_exports.object({
64539
64552
  toc: external_exports.boolean().optional(),
@@ -64616,6 +64629,14 @@ var siteConfigSchema = external_exports.object({
64616
64629
  aiTrain: external_exports.enum(["yes", "no"]).optional().describe("Allow using content to train or fine-tune AI models. Defaults to yes.")
64617
64630
  })
64618
64631
  ]).optional().describe("AI and search content-usage preferences, emitted as a Content-Signal line in the generated robots.txt. See https://contentsignals.org.")
64632
+ }).superRefine((config, context) => {
64633
+ if (config.sharedSession && (config.userInfoHook || config.isPrivate)) {
64634
+ context.addIssue({
64635
+ code: "custom",
64636
+ path: ["sharedSession"],
64637
+ message: "Shared-session personalization requires public docs and cannot be combined with userInfoHook."
64638
+ });
64639
+ }
64619
64640
  }).default({});
64620
64641
 
64621
64642
  // ../../packages/scalar-config/dist/schema/schema.js
@@ -1,17 +1,17 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  BaseCollections
4
- } from "./chunk-XLZEIIPW.js";
4
+ } from "./chunk-TI4NDKQC.js";
5
5
  import {
6
6
  sdkTrackedApiVersionSpec
7
- } from "./chunk-N645RGAB.js";
7
+ } from "./chunk-2AK5O3NQ.js";
8
8
  import {
9
9
  err,
10
10
  ok
11
11
  } from "./chunk-5ENKYZA4.js";
12
12
  import {
13
13
  managedDocSchema
14
- } from "./chunk-VUNOOPEG.js";
14
+ } from "./chunk-TYNF7ROW.js";
15
15
 
16
16
  // src/domains/sdk/inspect-sdk.ts
17
17
  var sdkMetadata = (sdk, builds) => {
@@ -12,8 +12,8 @@ import path from "node:path";
12
12
  import chokidar from "chokidar";
13
13
  var watchFile = async (file, callback, options) => {
14
14
  if (isUrl(file)) {
15
- setInterval(callback, 5e3);
16
- return;
15
+ const interval = setInterval(callback, 5e3);
16
+ return { unsubscribe: () => clearInterval(interval) };
17
17
  }
18
18
  const absoluteFilePath = path.resolve(file);
19
19
  if (!fs.existsSync(absoluteFilePath)) {
@@ -5,22 +5,22 @@ import {
5
5
  loginPortalSchema,
6
6
  managedSchema,
7
7
  workspaceSchema
8
- } from "./chunk-JLNHOA5Z.js";
8
+ } from "./chunk-KPLWZIOV.js";
9
9
  import {
10
10
  userSchema
11
- } from "./chunk-E57QCEAV.js";
11
+ } from "./chunk-YTTDYTVB.js";
12
12
  import {
13
13
  sdkSchema
14
- } from "./chunk-RYWXF3LO.js";
14
+ } from "./chunk-Y2OQOAY7.js";
15
15
  import {
16
16
  FEEDBACK_PATH_MAX_LENGTH,
17
17
  helpfulReasons,
18
18
  siteDeploySchema,
19
19
  unhelpfulReasons
20
- } from "./chunk-V3MYP5SQ.js";
20
+ } from "./chunk-EXJUFF6G.js";
21
21
  import {
22
22
  teamSchema
23
- } from "./chunk-7M44FQHX.js";
23
+ } from "./chunk-F3TQHNSQ.js";
24
24
  import {
25
25
  activeDeploymentSchema,
26
26
  publishRecordSchema,
@@ -29,12 +29,12 @@ import {
29
29
  import {
30
30
  managedDocSchema,
31
31
  ruleSchema
32
- } from "./chunk-VUNOOPEG.js";
32
+ } from "./chunk-TYNF7ROW.js";
33
33
  import {
34
34
  docInstanceOriginSchema,
35
35
  docInstanceSchema,
36
36
  docVersionRecordSchema
37
- } from "./chunk-U764PQUA.js";
37
+ } from "./chunk-AOZQPCWI.js";
38
38
  import {
39
39
  brandedUid,
40
40
  emailSchema,
@@ -80,6 +80,38 @@ var aiInventorySchema = external_exports.object({
80
80
  }).nullable()
81
81
  });
82
82
 
83
+ // ../../packages/entities/dist/deploys/branding.js
84
+ function isImageSource(value) {
85
+ if (/[\\\r\n]/.test(value))
86
+ return false;
87
+ if (value.startsWith("/"))
88
+ return !value.startsWith("//");
89
+ if (/^data:image\//i.test(value))
90
+ return true;
91
+ return URL.canParse(value) && /^https?:$/.test(new URL(value).protocol);
92
+ }
93
+ var imageSource = external_exports.string().refine(isImageSource);
94
+ var docsBrandingSchema = external_exports.object({
95
+ /** The resolved theme stylesheet the site inlines on every page. */
96
+ themeCss: external_exports.string().catch(""),
97
+ /** The header logo as the site serves it, one image or one per color mode. */
98
+ logo: external_exports.union([
99
+ imageSource,
100
+ external_exports.object({
101
+ lightMode: imageSource.optional().catch(void 0),
102
+ darkMode: imageSource.optional().catch(void 0)
103
+ }).refine((pair) => Boolean(pair.lightMode || pair.darkMode))
104
+ ]).optional().catch(void 0),
105
+ /** The site title, which the header shows when there is no logo. */
106
+ title: external_exports.string().trim().min(1).optional().catch(void 0),
107
+ /** The first `rel="icon"` link the site's head carries. */
108
+ favicon: imageSource.optional().catch(void 0),
109
+ /** The color mode a visitor starts in until they pick one. */
110
+ colorScheme: external_exports.enum(["light", "dark", "system"]).optional().catch(void 0),
111
+ /** False when the site hides its light/dark toggle everywhere. */
112
+ showColorSchemeToggle: external_exports.boolean().catch(true)
113
+ });
114
+
83
115
  // ../../packages/entities/dist/deploys/feedback.js
84
116
  var helpfulReasonSchema = external_exports.enum(helpfulReasons);
85
117
  var unhelpfulReasonSchema = external_exports.enum(unhelpfulReasons);
@@ -186,6 +218,7 @@ var BaseCollections = {
186
218
  AuthSessions: "auth-sessions",
187
219
  AuthCounters: "auth-counters",
188
220
  AuthRevocations: "auth-revocations",
221
+ SecretRevocations: "secret-revocations",
189
222
  SecretMetadata: (teamUid) => `team/${teamUid}/secrets`,
190
223
  SecretValues: (teamUid) => `team/${teamUid}/secret-values`,
191
224
  Vars: (teamUid) => `team/${teamUid}/vars`,
@@ -2,7 +2,7 @@ import { createRequire as $$cR } from "node:module"; const require = $$cR(import
2
2
  import {
3
3
  baseRegistrySchema,
4
4
  docVersionToolSchema
5
- } from "./chunk-U764PQUA.js";
5
+ } from "./chunk-AOZQPCWI.js";
6
6
  import {
7
7
  brandedUid,
8
8
  docVersionSchema,