@scalar/cli 2.12.0 → 2.12.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 (81) hide show
  1. package/README.md +2 -0
  2. package/chunks/{action-NF5E7JKA.js → action-2GIOY3HU.js} +20 -20
  3. package/chunks/{action-YWQ2OKS3.js → action-2NJJO35T.js} +9 -9
  4. package/chunks/{action-KDT6H6ML.js → action-2RIPHL6V.js} +4 -4
  5. package/chunks/{action-2OPUQFUY.js → action-6IL6KE3L.js} +16 -16
  6. package/chunks/{action-UTFRCKGE.js → action-7OJTNQRM.js} +4 -4
  7. package/chunks/{action-AC5ENU6Z.js → action-AZNY2B7G.js} +7 -7
  8. package/chunks/{action-FUO5F7NV.js → action-DJ6FLPXH.js} +4 -4
  9. package/chunks/{action-VGFAIFYE.js → action-H5XQIZKX.js} +13 -13
  10. package/chunks/{action-NIZBME45.js → action-HMPATNVE.js} +18 -18
  11. package/chunks/{action-SLB52XRG.js → action-HOLFCPUY.js} +12 -12
  12. package/chunks/{action-6CLEENBI.js → action-HRRNN33O.js} +18 -18
  13. package/chunks/{action-36LZ6XXE.js → action-II3OJSGP.js} +12 -12
  14. package/chunks/{action-FDTVHVHF.js → action-IYUOT7XX.js} +6 -6
  15. package/chunks/{action-ONR7QSN7.js → action-JDXGQSQN.js} +13 -13
  16. package/chunks/{action-EBZJS367.js → action-JXCU2JKC.js} +2 -2
  17. package/chunks/{action-WCU5O2VT.js → action-KE53K5EJ.js} +15 -15
  18. package/chunks/{action-XS5EESHW.js → action-LCTTNNFD.js} +17 -17
  19. package/chunks/{action-QM2BMMHG.js → action-LGNWFVEG.js} +14 -14
  20. package/chunks/{action-AOKHLTZ6.js → action-OWWGJ34K.js} +5 -5
  21. package/chunks/{action-JT6C472I.js → action-OY5LI7TW.js} +4 -4
  22. package/chunks/{action-VESBFIP3.js → action-PRLW546C.js} +13 -13
  23. package/chunks/{action-EZXHSAJ2.js → action-QA5ATGWB.js} +9 -9
  24. package/chunks/{action-7HXYZPOT.js → action-QEYNGQXG.js} +4 -4
  25. package/chunks/{action-3XMTJJRT.js → action-RNVV27ET.js} +8 -8
  26. package/chunks/{action-D3IVCY24.js → action-SFRYHYTZ.js} +4 -4
  27. package/chunks/{action-ADGLTNFC.js → action-U3R6AXJY.js} +4 -4
  28. package/chunks/{action-KJDIJQ3A.js → action-UHXBY3RD.js} +2 -2
  29. package/chunks/{action-AVSJ3AJY.js → action-UOH5L2JF.js} +8 -8
  30. package/chunks/{action-IG3BK2LF.js → action-WLPCBFRE.js} +16 -16
  31. package/chunks/{action-HA3CMV3P.js → action-XBTIONQD.js} +4 -4
  32. package/chunks/{action-O757TFA2.js → action-Z3UXS5KI.js} +4 -4
  33. package/chunks/{action-XVNRZ5VX.js → action-ZHDGAUGG.js} +13 -13
  34. package/chunks/{action-QVTAZCKY.js → action-ZNBXKA7T.js} +4 -4
  35. package/chunks/{actions-6QG7LH7P.js → actions-DKQERAKZ.js} +13 -13
  36. package/chunks/{agent-ONXROEAE.js → agent-KQKNJZKK.js} +4 -4
  37. package/chunks/{asyncapi-7IFXAIE3.js → asyncapi-MKBEQYBV.js} +8 -8
  38. package/chunks/{build.action-FI4OWY3T.js → build.action-EGAOPKSX.js} +16 -16
  39. package/chunks/{chunk-BCFUMXMC.js → chunk-3DKOVKCV.js} +3 -3
  40. package/chunks/{chunk-VUNOOPEG.js → chunk-4RF2NKQN.js} +1 -1
  41. package/chunks/{chunk-BB6WWG25.js → chunk-4YQVGOHX.js} +1 -1
  42. package/chunks/{chunk-LCSU43NJ.js → chunk-5VZSFLRO.js} +2 -2
  43. package/chunks/{chunk-PERC34BV.js → chunk-672Y6REB.js} +1 -1
  44. package/chunks/{chunk-RYWXF3LO.js → chunk-6YOXEMMX.js} +1 -1
  45. package/chunks/{chunk-QJQTSRU4.js → chunk-7GOHWSPA.js} +93 -2
  46. package/chunks/{chunk-RNZVZMYC.js → chunk-A27OERJM.js} +55 -10
  47. package/chunks/{chunk-ZNLMQKDU.js → chunk-AC62V47N.js} +1 -1
  48. package/chunks/{chunk-UODTHS76.js → chunk-BDNCJLJP.js} +1 -1
  49. package/chunks/{chunk-FJCOYEKT.js → chunk-F3TQHNSQ.js} +139 -95
  50. package/chunks/{chunk-VVQOFG76.js → chunk-FD364GM7.js} +1 -1
  51. package/chunks/{chunk-UAFCSWQ6.js → chunk-FJREFWEE.js} +1 -1
  52. package/chunks/{chunk-3HCEUGOE.js → chunk-GUF4PKDL.js} +39 -7
  53. package/chunks/{chunk-26VIHQGL.js → chunk-GZA7GEZW.js} +2 -2
  54. package/chunks/{chunk-EJSGWV2K.js → chunk-HDNCXPCZ.js} +1 -1
  55. package/chunks/{chunk-YTFFBGNQ.js → chunk-MLBEF6MB.js} +2 -2
  56. package/chunks/{chunk-T3R66THO.js → chunk-MQ65WBVF.js} +28 -4
  57. package/chunks/{chunk-V3MYP5SQ.js → chunk-TQL55CUG.js} +13 -2
  58. package/chunks/{chunk-U73OW57G.js → chunk-UJU2ORWU.js} +1 -1
  59. package/chunks/{chunk-UBLFIMUA.js → chunk-VJAVNG6U.js} +1 -1
  60. package/chunks/{chunk-HU47OMI4.js → chunk-VRZRTOZF.js} +2 -2
  61. package/chunks/{chunk-SNOAL2C5.js → chunk-W2JGSGIQ.js} +1 -1
  62. package/chunks/{chunk-RLBS4HJT.js → chunk-W3Y5X3X3.js} +2 -2
  63. package/chunks/{chunk-5TNKTLQP.js → chunk-W6FLDNRM.js} +7 -5
  64. package/chunks/{chunk-Y6C3H27E.js → chunk-YTTDYTVB.js} +1 -1
  65. package/chunks/{chunk-JLNHOA5Z.js → chunk-ZK76AK3B.js} +17 -4
  66. package/chunks/{chunk-N645RGAB.js → chunk-ZZTCEMCG.js} +33 -33
  67. package/chunks/{create.action-PPMZEMZL.js → create.action-UUDVWZ3F.js} +16 -16
  68. package/chunks/{delete.action-VAHKEHEU.js → delete.action-EUQ4ESLJ.js} +15 -15
  69. package/chunks/{delete.action-GDOHATRZ.js → delete.action-XRP3VU5C.js} +16 -16
  70. package/chunks/{get.action-XON3EZDT.js → get.action-IYA5Q3RI.js} +9 -9
  71. package/chunks/{get.action-UXFTGO7W.js → get.action-UHCFOKUQ.js} +15 -15
  72. package/chunks/{list.action-OQEAEJ5U.js → list.action-3CCWEEAM.js} +15 -15
  73. package/chunks/{list.action-24F5WDGR.js → list.action-D3GHA6S5.js} +16 -16
  74. package/chunks/{publish.action-G7FPDRBZ.js → publish.action-HIVWJ7QE.js} +20 -20
  75. package/chunks/{update.action-MJDHVVR3.js → update.action-NSKVEZES.js} +16 -16
  76. package/chunks/{update.action-IFIFXZWA.js → update.action-VOZNA7BV.js} +15 -15
  77. package/index.js +206 -92
  78. package/package.json +1 -1
  79. package/skills/scalar-cli/SKILL.md +1 -1
  80. package/template.md +2 -0
  81. /package/chunks/{chunk-U764PQUA.js → chunk-PIWBFJX3.js} +0 -0
@@ -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
  };
@@ -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.0";
5
+ var version = "2.12.2";
6
6
  var bin = {
7
7
  scalar: "./dist/index.js",
8
8
  "scalar-cli": "./dist/index.js"
@@ -2,7 +2,7 @@ import { createRequire as $$cR } from "node:module"; const require = $$cR(import
2
2
  import {
3
3
  getPublishPreviewUrl,
4
4
  getPublishUrl
5
- } from "./chunk-QJQTSRU4.js";
5
+ } from "./chunk-7GOHWSPA.js";
6
6
 
7
7
  // src/domains/project/publish/url.ts
8
8
  function getPublishDeploymentUrl(publish) {
@@ -5,22 +5,22 @@ import {
5
5
  loginPortalSchema,
6
6
  managedSchema,
7
7
  workspaceSchema
8
- } from "./chunk-JLNHOA5Z.js";
8
+ } from "./chunk-ZK76AK3B.js";
9
9
  import {
10
10
  userSchema
11
- } from "./chunk-Y6C3H27E.js";
11
+ } from "./chunk-YTTDYTVB.js";
12
12
  import {
13
13
  sdkSchema
14
- } from "./chunk-RYWXF3LO.js";
14
+ } from "./chunk-6YOXEMMX.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-TQL55CUG.js";
21
21
  import {
22
22
  teamSchema
23
- } from "./chunk-FJCOYEKT.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-4RF2NKQN.js";
33
33
  import {
34
34
  docInstanceOriginSchema,
35
35
  docInstanceSchema,
36
36
  docVersionRecordSchema
37
- } from "./chunk-U764PQUA.js";
37
+ } from "./chunk-PIWBFJX3.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);
@@ -1,10 +1,10 @@
1
1
  import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
2
2
  import {
3
3
  BaseCollections
4
- } from "./chunk-3HCEUGOE.js";
4
+ } from "./chunk-GUF4PKDL.js";
5
5
  import {
6
6
  getDatabaseClient
7
- } from "./chunk-RLBS4HJT.js";
7
+ } from "./chunk-W3Y5X3X3.js";
8
8
  import {
9
9
  publishRecordSchema
10
10
  } from "./chunk-VRZSDUZK.js";
@@ -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-OWWGJ34K.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-UBLFIMUA.js";
4
+ } from "./chunk-VJAVNG6U.js";
5
5
  import {
6
6
  roleSchema
7
- } from "./chunk-FJCOYEKT.js";
7
+ } from "./chunk-F3TQHNSQ.js";
8
8
  import {
9
9
  output
10
10
  } from "./chunk-T5HJUAWB.js";
@@ -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({
@@ -64004,6 +64008,7 @@ var titleSchema = external_exports.string().describe("Title to show use in any n
64004
64008
  var pathSchema = external_exports.string().startsWith("/");
64005
64009
  var linkSectionSchema = external_exports.string().min(1, "A section heading cannot be empty. Omit `section` instead.").describe("The column heading this link sits under inside its dropdown. A dropdown renders as a multi-column mega menu when any child names a section; consecutive children sharing a section become one column. Ignored for items outside a group.");
64006
64010
  var groupsSchema = userGroupSchema.array().max(MAX_USER_INFO_GROUPS).optional().describe("Groups a signed-in visitor must belong to (any of them) for this entry to show. Entries without groups are visible to everyone. Controls visibility only; the page stays reachable at its URL.");
64011
+ var colorSchemeTogglePositionSchema = external_exports.union([external_exports.enum(["sidebar", "header", "tabs"]), external_exports.literal(false)]).describe('Where the light/dark toggle renders: "sidebar" (default), "header", or "tabs". Falls back to the next surface the page has (sidebar, header, tabs) when the chosen one is missing. Set false to hide it.');
64007
64012
 
64008
64013
  // ../../packages/scalar-config/dist/schema/navigation/header.js
64009
64014
  var HEADER_ALIGNS = ["start", "center", "end"];
@@ -64247,7 +64252,8 @@ var pageFrontmatterSchema = external_exports.object({
64247
64252
  search: external_exports.object({
64248
64253
  position: external_exports.enum(["header", "sidebar"]).optional().describe("The position of the search bar in this page"),
64249
64254
  enabled: external_exports.boolean().optional().describe("Enable or disable search for this page")
64250
- }).optional().describe("Search bar configuration")
64255
+ }).optional().describe("Search bar configuration"),
64256
+ colorSchemeToggle: colorSchemeTogglePositionSchema.optional()
64251
64257
  }).optional().describe("Optional layout options for the page. This will override the global layout options."),
64252
64258
  /** Optional head options (meta, scripts, etc-). */
64253
64259
  head: headSchema.optional(),
@@ -64486,6 +64492,10 @@ var routingSchema = external_exports.object({
64486
64492
  referencePathPattern: external_exports.string().optional(),
64487
64493
  redirects: redirectSchema.array().optional().describe("Redirects for the site. Can be used to redirect from one path to another")
64488
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.");
64489
64499
  var SITE_BANNER_TYPES = [
64490
64500
  "neutral",
64491
64501
  "info",
@@ -64506,7 +64516,7 @@ var rssFeedSchema = external_exports.object({
64506
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.'),
64507
64517
  title: external_exports.string().optional().describe('Feed title. Defaults to the site title followed by "Changelog".'),
64508
64518
  description: external_exports.string().optional().describe("Feed description."),
64509
- 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.")
64510
64520
  });
64511
64521
  var hasUniqueFeedPaths = (rss) => {
64512
64522
  if (!Array.isArray(rss))
@@ -64532,6 +64542,11 @@ var siteConfigSchema = external_exports.object({
64532
64542
  * on a public site it also enables the sign-in flow.
64533
64543
  */
64534
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."),
64535
64550
  /** Global layout options to hide/show select elements */
64536
64551
  layout: external_exports.object({
64537
64552
  toc: external_exports.boolean().optional(),
@@ -64548,7 +64563,8 @@ var siteConfigSchema = external_exports.object({
64548
64563
  sidebar: external_exports.object({
64549
64564
  enabled: external_exports.boolean().optional().describe("Show or hide the sidebar globally"),
64550
64565
  navPosition: external_exports.enum(["top", "bottom"]).optional().describe("Top level sidebar nav item positioning")
64551
- }).optional()
64566
+ }).optional(),
64567
+ colorSchemeToggle: colorSchemeTogglePositionSchema.optional()
64552
64568
  }).optional().describe("Global layout options to hide/show select elements"),
64553
64569
  /** Slug for a platform defined theme, or a relative path to a local .css file (must end with .css). */
64554
64570
  theme: external_exports.string().optional().describe("Slug for a platform-defined theme, or a relative path to a local .css file (must end with .css)."),
@@ -64578,7 +64594,7 @@ var siteConfigSchema = external_exports.object({
64578
64594
  /** Color scheme toggle configuration */
64579
64595
  colorScheme: external_exports.object({
64580
64596
  default: external_exports.enum(["light", "dark", "system"]).optional().describe("Default color scheme on page load."),
64581
- showToggle: external_exports.boolean().optional().describe("Show color scheme toggle switch.")
64597
+ showToggle: external_exports.boolean().optional().describe("Deprecated, use layout.colorSchemeToggle. Show color scheme toggle switch.")
64582
64598
  }).optional().describe("Customize light/dark mode color scheme and toggle preferences."),
64583
64599
  /** Ask AI agent configuration */
64584
64600
  agent: external_exports.object({
@@ -64613,6 +64629,14 @@ var siteConfigSchema = external_exports.object({
64613
64629
  aiTrain: external_exports.enum(["yes", "no"]).optional().describe("Allow using content to train or fine-tune AI models. Defaults to yes.")
64614
64630
  })
64615
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
+ }
64616
64640
  }).default({});
64617
64641
 
64618
64642
  // ../../packages/scalar-config/dist/schema/schema.js
@@ -4,7 +4,7 @@ import {
4
4
  mcpChannelModes,
5
5
  mcpEnvironmentPolicies,
6
6
  mcpServerChannelSchema
7
- } from "./chunk-U764PQUA.js";
7
+ } from "./chunk-PIWBFJX3.js";
8
8
  import {
9
9
  environmentSlugSchema
10
10
  } from "./chunk-Q26DFKTY.js";
@@ -180,6 +180,15 @@ var mcpChannelConfigSchema = external_exports.looseObject({
180
180
  }).optional(),
181
181
  "x-scalar-expose": external_exports.unknown().optional()
182
182
  }).refine((config) => mcpChannelConfigBytes(config) <= MCP_CHANNEL_CONFIG_MAX_BYTES, { message: MCP_CHANNEL_CONFIG_TOO_LARGE });
183
+ var mcpCustomizationSchema = external_exports.object({
184
+ /** Uid of one of the team's themes or of a Scalar theme preset. */
185
+ theme: external_exports.string().min(1).max(100).nullish(),
186
+ /**
187
+ * The header logo, as the image upload returns it. A URL and never
188
+ * markup: the page also renders on the MCP host every team shares.
189
+ */
190
+ logo: external_exports.url({ protocol: /^https?$/ }).max(2048).nullish()
191
+ }).meta({ id: "mcp-customization" });
183
192
  var mcpEnvironmentSchema = external_exports.object({
184
193
  /** Per API channel, keyed by the agent document uid: the channel's Config in this environment. */
185
194
  channels: external_exports.record(external_exports.string(), mcpChannelConfigSchema).optional(),
@@ -195,7 +204,9 @@ var mcpEnvironmentSchema = external_exports.object({
195
204
  piiRedaction: external_exports.boolean().optional(),
196
205
  credentialRedaction: external_exports.boolean().optional(),
197
206
  /** Whether the environment's build pointer advances on its own. */
198
- policy: external_exports.enum(mcpEnvironmentPolicies).optional()
207
+ policy: external_exports.enum(mcpEnvironmentPolicies).optional(),
208
+ /** The page a browser gets at the environment's address. */
209
+ customization: mcpCustomizationSchema.optional()
199
210
  });
200
211
  var mcpServerRecordSchema = baseRegistrySchema.extend({
201
212
  /** Own uid, branded so it cannot be confused with another entity's uid */
@@ -10,7 +10,7 @@ var DownloadIsolateCommand = () => {
10
10
  const cmd = new Command("download-isolate");
11
11
  cmd.description("Download the docs preview server");
12
12
  cmd.action(async () => {
13
- const { downloadIsolate } = await import("./action-QVTAZCKY.js");
13
+ const { downloadIsolate } = await import("./action-ZNBXKA7T.js");
14
14
  await downloadIsolate();
15
15
  });
16
16
  return cmd;
@@ -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-VVQOFG76.js";
4
+ } from "./chunk-FD364GM7.js";
5
5
 
6
6
  // src/config.ts
7
7
  import { portNumbers } from "get-port";
@@ -5,10 +5,10 @@ import {
5
5
  import {
6
6
  ISOLATE_DIR,
7
7
  ISOLATE_EXTRACTION_DIR
8
- } from "./chunk-U73OW57G.js";
8
+ } from "./chunk-UJU2ORWU.js";
9
9
  import {
10
10
  config
11
- } from "./chunk-UBLFIMUA.js";
11
+ } from "./chunk-VJAVNG6U.js";
12
12
  import {
13
13
  output
14
14
  } 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
  safeNormalize
4
- } from "./chunk-PERC34BV.js";
4
+ } from "./chunk-672Y6REB.js";
5
5
  import {
6
6
  isUrl
7
7
  } from "./chunk-4ORL4MST.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
  getAuthData
4
- } from "./chunk-YTFFBGNQ.js";
4
+ } from "./chunk-MLBEF6MB.js";
5
5
  import {
6
6
  config
7
- } from "./chunk-UBLFIMUA.js";
7
+ } from "./chunk-VJAVNG6U.js";
8
8
  import {
9
9
  external_exports,
10
10
  objectSchema,
@@ -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-TQL55CUG.js";
5
5
  import {
6
6
  billingPlanSchema
7
- } from "./chunk-FJCOYEKT.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-PIWBFJX3.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
  });
@@ -3,7 +3,7 @@ import {
3
3
  emailAllowanceSchema,
4
4
  teamImageSchema,
5
5
  teamNameSchema
6
- } from "./chunk-FJCOYEKT.js";
6
+ } from "./chunk-F3TQHNSQ.js";
7
7
  import {
8
8
  brandedUid,
9
9
  emailSchema,