@storm-software/esbuild 0.46.1 → 0.47.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -359,7 +359,7 @@ _chunk46KVHK5Gcjs.init_cjs_shims.call(void 0, );
359
359
 
360
360
  // ../config/src/schema.ts
361
361
  _chunk46KVHK5Gcjs.init_cjs_shims.call(void 0, );
362
- var _zod = require('zod'); var z = _interopRequireWildcard(_zod);
362
+ var _mini = require('zod/mini'); var z = _interopRequireWildcard(_mini);
363
363
 
364
364
  // ../config/src/constants.ts
365
365
  _chunk46KVHK5Gcjs.init_cjs_shims.call(void 0, );
@@ -368,12 +368,8 @@ var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
368
368
  var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
369
369
  var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
370
370
  var STORM_DEFAULT_LICENSE = "Apache-2.0";
371
- var STORM_DEFAULT_SOCIAL_TWITTER = "StormSoftwareHQ";
372
371
  var STORM_DEFAULT_SOCIAL_DISCORD = "https://discord.gg/MQ6YVzakM5";
373
- var STORM_DEFAULT_SOCIAL_TELEGRAM = "https://t.me/storm_software";
374
372
  var STORM_DEFAULT_SOCIAL_SLACK = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
375
- var STORM_DEFAULT_SOCIAL_MEDIUM = "https://medium.com/storm-software";
376
- var STORM_DEFAULT_SOCIAL_GITHUB = "https://github.com/storm-software";
377
373
  var STORM_DEFAULT_RELEASE_FOOTER = `
378
374
  Storm Software is an open source software development organization with the mission is to make software development more accessible. Our ideal future is one where anyone can create software without years of prior development experience serving as a barrier to entry. We hope to achieve this via LLMs, Generative AI, and intuitive, high-level data modeling/programming languages.
379
375
 
@@ -382,233 +378,487 @@ Join us on [Discord](${STORM_DEFAULT_SOCIAL_DISCORD}) to chat with the team, rec
382
378
  If this sounds interesting, and you would like to help us in creating the next generation of development tools, please reach out on our [website](${STORM_DEFAULT_CONTACT}) or join our [Slack](${STORM_DEFAULT_SOCIAL_SLACK}) channel!
383
379
  `;
384
380
  var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
381
+ var STORM_DEFAULT_BANNER_ALT = "The workspace's banner image";
385
382
 
386
383
  // ../config/src/schema.ts
387
- var ColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7);
388
- var DarkColorSchema = ColorSchema.default("#151718").describe(
389
- "The dark background color of the workspace"
384
+ var schemaRegistry = z.registry();
385
+ var colorSchema = z.string().check(
386
+ z.length(7),
387
+ z.toLowerCase(),
388
+ z.regex(/^#([0-9a-f]{3}){1,2}$/i),
389
+ z.trim()
390
390
  );
391
- var LightColorSchema = ColorSchema.default("#cbd5e1").describe(
392
- "The light background color of the workspace"
391
+ schemaRegistry.add(colorSchema, {
392
+ description: "A base schema for describing the format of colors"
393
+ });
394
+ var darkColorSchema = z._default(colorSchema, "#151718");
395
+ schemaRegistry.add(darkColorSchema, {
396
+ description: "The dark background color of the workspace"
397
+ });
398
+ var lightColorSchema = z._default(colorSchema, "#cbd5e1");
399
+ schemaRegistry.add(lightColorSchema, {
400
+ description: "The light background color of the workspace"
401
+ });
402
+ var brandColorSchema = z._default(colorSchema, "#1fb2a6");
403
+ schemaRegistry.add(brandColorSchema, {
404
+ description: "The primary brand specific color of the workspace"
405
+ });
406
+ var alternateColorSchema = z.optional(colorSchema);
407
+ schemaRegistry.add(alternateColorSchema, {
408
+ description: "The alternate brand specific color of the workspace"
409
+ });
410
+ var accentColorSchema = z.optional(colorSchema);
411
+ schemaRegistry.add(accentColorSchema, {
412
+ description: "The secondary brand specific color of the workspace"
413
+ });
414
+ var linkColorSchema = z._default(colorSchema, "#3fa6ff");
415
+ schemaRegistry.add(linkColorSchema, {
416
+ description: "The color used to display hyperlink text"
417
+ });
418
+ var helpColorSchema = z._default(colorSchema, "#818cf8");
419
+ schemaRegistry.add(helpColorSchema, {
420
+ description: "The second brand specific color of the workspace"
421
+ });
422
+ var successColorSchema = z._default(colorSchema, "#45b27e");
423
+ schemaRegistry.add(successColorSchema, {
424
+ description: "The success color of the workspace"
425
+ });
426
+ var infoColorSchema = z._default(colorSchema, "#38bdf8");
427
+ schemaRegistry.add(infoColorSchema, {
428
+ description: "The informational color of the workspace"
429
+ });
430
+ var warningColorSchema = z._default(colorSchema, "#f3d371");
431
+ schemaRegistry.add(warningColorSchema, {
432
+ description: "The warning color of the workspace"
433
+ });
434
+ var dangerColorSchema = z._default(colorSchema, "#d8314a");
435
+ schemaRegistry.add(dangerColorSchema, {
436
+ description: "The danger color of the workspace"
437
+ });
438
+ var fatalColorSchema = z.optional(colorSchema);
439
+ schemaRegistry.add(fatalColorSchema, {
440
+ description: "The fatal color of the workspace"
441
+ });
442
+ var positiveColorSchema = z._default(colorSchema, "#4ade80");
443
+ schemaRegistry.add(positiveColorSchema, {
444
+ description: "The positive number color of the workspace"
445
+ });
446
+ var negativeColorSchema = z._default(colorSchema, "#ef4444");
447
+ schemaRegistry.add(negativeColorSchema, {
448
+ description: "The negative number color of the workspace"
449
+ });
450
+ var gradientStopsSchema = z.optional(z.array(colorSchema));
451
+ schemaRegistry.add(gradientStopsSchema, {
452
+ description: "The color stops for the base gradient color pattern used in the workspace"
453
+ });
454
+ var darkColorsSchema = z.object({
455
+ foreground: lightColorSchema,
456
+ background: darkColorSchema,
457
+ brand: brandColorSchema,
458
+ alternate: alternateColorSchema,
459
+ accent: accentColorSchema,
460
+ link: linkColorSchema,
461
+ help: helpColorSchema,
462
+ success: successColorSchema,
463
+ info: infoColorSchema,
464
+ warning: warningColorSchema,
465
+ danger: dangerColorSchema,
466
+ fatal: fatalColorSchema,
467
+ positive: positiveColorSchema,
468
+ negative: negativeColorSchema,
469
+ gradient: gradientStopsSchema
470
+ });
471
+ var lightColorsSchema = z.object({
472
+ foreground: darkColorSchema,
473
+ background: lightColorSchema,
474
+ brand: brandColorSchema,
475
+ alternate: alternateColorSchema,
476
+ accent: accentColorSchema,
477
+ link: linkColorSchema,
478
+ help: helpColorSchema,
479
+ success: successColorSchema,
480
+ info: infoColorSchema,
481
+ warning: warningColorSchema,
482
+ danger: dangerColorSchema,
483
+ fatal: fatalColorSchema,
484
+ positive: positiveColorSchema,
485
+ negative: negativeColorSchema,
486
+ gradient: gradientStopsSchema
487
+ });
488
+ var multiColorsSchema = z.object({
489
+ dark: darkColorsSchema,
490
+ light: lightColorsSchema
491
+ });
492
+ var singleColorsSchema = z.object({
493
+ dark: darkColorSchema,
494
+ light: lightColorSchema,
495
+ brand: brandColorSchema,
496
+ alternate: alternateColorSchema,
497
+ accent: accentColorSchema,
498
+ link: linkColorSchema,
499
+ help: helpColorSchema,
500
+ success: successColorSchema,
501
+ info: infoColorSchema,
502
+ warning: warningColorSchema,
503
+ danger: dangerColorSchema,
504
+ fatal: fatalColorSchema,
505
+ positive: positiveColorSchema,
506
+ negative: negativeColorSchema,
507
+ gradient: gradientStopsSchema
508
+ });
509
+ var registryUrlConfigSchema = z.optional(z.url());
510
+ schemaRegistry.add(registryUrlConfigSchema, {
511
+ description: "A remote registry URL used to publish distributable packages"
512
+ });
513
+ var registrySchema = z._default(
514
+ z.object({
515
+ github: registryUrlConfigSchema,
516
+ npm: registryUrlConfigSchema,
517
+ cargo: registryUrlConfigSchema,
518
+ cyclone: registryUrlConfigSchema,
519
+ container: registryUrlConfigSchema
520
+ }),
521
+ {}
393
522
  );
394
- var BrandColorSchema = ColorSchema.default("#1fb2a6").describe(
395
- "The primary brand specific color of the workspace"
523
+ schemaRegistry.add(registrySchema, {
524
+ description: "A list of remote registry URLs used by Storm Software"
525
+ });
526
+ var colorsSchema = z.union([singleColorsSchema, multiColorsSchema]);
527
+ schemaRegistry.add(colorsSchema, {
528
+ description: "Colors used for various workspace elements"
529
+ });
530
+ var themeColorsSchema = z.record(
531
+ z.union([z.union([z.literal("base"), z.string()]), z.string()]),
532
+ colorsSchema
396
533
  );
397
- var AlternateColorSchema = ColorSchema.optional().describe(
398
- "The alternate brand specific color of the workspace"
534
+ schemaRegistry.add(themeColorsSchema, {
535
+ description: "Storm theme config values used for styling various package elements"
536
+ });
537
+ var extendsSchema = z.optional(
538
+ z.union([z.string().check(z.trim()), z.array(z.string().check(z.trim()))])
399
539
  );
400
- var AccentColorSchema = ColorSchema.optional().describe(
401
- "The secondary brand specific color of the workspace"
540
+ schemaRegistry.add(extendsSchema, {
541
+ description: "The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration."
542
+ });
543
+ var workspaceBotNameSchema = z.string().check(z.trim());
544
+ schemaRegistry.add(workspaceBotNameSchema, {
545
+ description: "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
546
+ });
547
+ var workspaceBotEmailSchema = z.string().check(z.trim());
548
+ schemaRegistry.add(workspaceBotEmailSchema, {
549
+ description: "The email of the workspace bot"
550
+ });
551
+ var workspaceBotSchema = z.object({
552
+ name: workspaceBotNameSchema,
553
+ email: workspaceBotEmailSchema
554
+ });
555
+ schemaRegistry.add(workspaceBotSchema, {
556
+ description: "The workspace's bot user's config used to automated various operations tasks"
557
+ });
558
+ var workspaceReleaseBannerUrlSchema = z.optional(
559
+ z.string().check(z.trim(), z.url())
402
560
  );
403
- var LinkColorSchema = ColorSchema.default("#3fa6ff").describe(
404
- "The color used to display hyperlink text"
561
+ schemaRegistry.add(workspaceReleaseBannerUrlSchema, {
562
+ description: "A URL to a banner image used to display the workspace's release"
563
+ });
564
+ var workspaceReleaseBannerAltSchema = z._default(
565
+ z.string().check(z.trim()),
566
+ STORM_DEFAULT_BANNER_ALT
405
567
  );
406
- var HelpColorSchema = ColorSchema.default("#818cf8").describe(
407
- "The second brand specific color of the workspace"
568
+ schemaRegistry.add(workspaceReleaseBannerAltSchema, {
569
+ description: "The alt text for the workspace's release banner image"
570
+ });
571
+ var workspaceReleaseBannerSchema = z.object({
572
+ url: workspaceReleaseBannerUrlSchema,
573
+ alt: workspaceReleaseBannerAltSchema
574
+ });
575
+ schemaRegistry.add(workspaceReleaseBannerSchema, {
576
+ description: "The workspace's banner image used during the release process"
577
+ });
578
+ var workspaceReleaseHeaderSchema = z.optional(
579
+ z.string().check(z.trim())
408
580
  );
409
- var SuccessColorSchema = ColorSchema.default("#45b27e").describe(
410
- "The success color of the workspace"
581
+ schemaRegistry.add(workspaceReleaseHeaderSchema, {
582
+ description: "A header message appended to the start of the workspace's release notes"
583
+ });
584
+ var workspaceReleaseFooterSchema = z.optional(
585
+ z.string().check(z.trim())
411
586
  );
412
- var InfoColorSchema = ColorSchema.default("#38bdf8").describe(
413
- "The informational color of the workspace"
587
+ schemaRegistry.add(workspaceReleaseFooterSchema, {
588
+ description: "A footer message appended to the end of the workspace's release notes"
589
+ });
590
+ var workspaceReleaseSchema = z.object({
591
+ banner: z.union([
592
+ workspaceReleaseBannerSchema,
593
+ z.string().check(z.trim(), z.url())
594
+ ]),
595
+ header: workspaceReleaseHeaderSchema,
596
+ footer: workspaceReleaseFooterSchema
597
+ });
598
+ schemaRegistry.add(workspaceReleaseSchema, {
599
+ description: "The workspace's release config used during the release process"
600
+ });
601
+ var workspaceSocialsTwitterSchema = z.optional(
602
+ z.string().check(z.trim())
414
603
  );
415
- var WarningColorSchema = ColorSchema.default("#f3d371").describe(
416
- "The warning color of the workspace"
604
+ schemaRegistry.add(workspaceSocialsTwitterSchema, {
605
+ description: "A Twitter/X account associated with the organization/project"
606
+ });
607
+ var workspaceSocialsDiscordSchema = z.optional(
608
+ z.string().check(z.trim())
417
609
  );
418
- var DangerColorSchema = ColorSchema.default("#d8314a").describe(
419
- "The danger color of the workspace"
610
+ schemaRegistry.add(workspaceSocialsDiscordSchema, {
611
+ description: "A Discord account associated with the organization/project"
612
+ });
613
+ var workspaceSocialsTelegramSchema = z.optional(
614
+ z.string().check(z.trim())
420
615
  );
421
- var FatalColorSchema = ColorSchema.optional().describe(
422
- "The fatal color of the workspace"
616
+ schemaRegistry.add(workspaceSocialsTelegramSchema, {
617
+ description: "A Telegram account associated with the organization/project"
618
+ });
619
+ var workspaceSocialsSlackSchema = z.optional(
620
+ z.string().check(z.trim())
423
621
  );
424
- var PositiveColorSchema = ColorSchema.default("#4ade80").describe(
425
- "The positive number color of the workspace"
622
+ schemaRegistry.add(workspaceSocialsSlackSchema, {
623
+ description: "A Slack account associated with the organization/project"
624
+ });
625
+ var workspaceSocialsMediumSchema = z.optional(
626
+ z.string().check(z.trim())
426
627
  );
427
- var NegativeColorSchema = ColorSchema.default("#ef4444").describe(
428
- "The negative number color of the workspace"
628
+ schemaRegistry.add(workspaceSocialsMediumSchema, {
629
+ description: "A Medium account associated with the organization/project"
630
+ });
631
+ var workspaceSocialsGithubSchema = z.optional(
632
+ z.string().check(z.trim())
429
633
  );
430
- var GradientStopsSchema = z.array(ColorSchema).optional().describe(
431
- "The color stops for the base gradient color pattern used in the workspace"
634
+ schemaRegistry.add(workspaceSocialsGithubSchema, {
635
+ description: "A GitHub account associated with the organization/project"
636
+ });
637
+ var workspaceSocialsSchema = z.object({
638
+ twitter: workspaceSocialsTwitterSchema,
639
+ discord: workspaceSocialsDiscordSchema,
640
+ telegram: workspaceSocialsTelegramSchema,
641
+ slack: workspaceSocialsSlackSchema,
642
+ medium: workspaceSocialsMediumSchema,
643
+ github: workspaceSocialsGithubSchema
644
+ });
645
+ schemaRegistry.add(workspaceSocialsSchema, {
646
+ description: "The workspace's account config used to store various social media links"
647
+ });
648
+ var workspaceDirectoryCacheSchema = z.optional(
649
+ z.string().check(z.trim())
432
650
  );
433
- var DarkThemeColorConfigSchema = z.object({
434
- foreground: LightColorSchema,
435
- background: DarkColorSchema,
436
- brand: BrandColorSchema,
437
- alternate: AlternateColorSchema,
438
- accent: AccentColorSchema,
439
- link: LinkColorSchema,
440
- help: HelpColorSchema,
441
- success: SuccessColorSchema,
442
- info: InfoColorSchema,
443
- warning: WarningColorSchema,
444
- danger: DangerColorSchema,
445
- fatal: FatalColorSchema,
446
- positive: PositiveColorSchema,
447
- negative: NegativeColorSchema,
448
- gradient: GradientStopsSchema
449
- });
450
- var LightThemeColorConfigSchema = z.object({
451
- foreground: DarkColorSchema,
452
- background: LightColorSchema,
453
- brand: BrandColorSchema,
454
- alternate: AlternateColorSchema,
455
- accent: AccentColorSchema,
456
- link: LinkColorSchema,
457
- help: HelpColorSchema,
458
- success: SuccessColorSchema,
459
- info: InfoColorSchema,
460
- warning: WarningColorSchema,
461
- danger: DangerColorSchema,
462
- fatal: FatalColorSchema,
463
- positive: PositiveColorSchema,
464
- negative: NegativeColorSchema,
465
- gradient: GradientStopsSchema
466
- });
467
- var MultiThemeColorConfigSchema = z.object({
468
- dark: DarkThemeColorConfigSchema,
469
- light: LightThemeColorConfigSchema
470
- });
471
- var SingleThemeColorConfigSchema = z.object({
472
- dark: DarkColorSchema,
473
- light: LightColorSchema,
474
- brand: BrandColorSchema,
475
- alternate: AlternateColorSchema,
476
- accent: AccentColorSchema,
477
- link: LinkColorSchema,
478
- help: HelpColorSchema,
479
- success: SuccessColorSchema,
480
- info: InfoColorSchema,
481
- warning: WarningColorSchema,
482
- danger: DangerColorSchema,
483
- fatal: FatalColorSchema,
484
- positive: PositiveColorSchema,
485
- negative: NegativeColorSchema,
486
- gradient: GradientStopsSchema
487
- });
488
- var RegistryUrlConfigSchema = z.url().optional().describe("A remote registry URL used to publish distributable packages");
489
- var RegistryConfigSchema = z.object({
490
- github: RegistryUrlConfigSchema,
491
- npm: RegistryUrlConfigSchema,
492
- cargo: RegistryUrlConfigSchema,
493
- cyclone: RegistryUrlConfigSchema,
494
- container: RegistryUrlConfigSchema
495
- }).default({}).describe("A list of remote registry URLs used by Storm Software");
496
- var ColorConfigSchema = SingleThemeColorConfigSchema.or(
497
- MultiThemeColorConfigSchema
498
- ).describe("Colors used for various workspace elements");
499
- var ColorConfigMapSchema = z.record(
500
- z.union([z.literal("base"), z.string()]),
501
- ColorConfigSchema
651
+ schemaRegistry.add(workspaceDirectoryCacheSchema, {
652
+ description: "The directory used to store the environment's cached file data"
653
+ });
654
+ var workspaceDirectoryDataSchema = z.optional(
655
+ z.string().check(z.trim())
502
656
  );
503
- var ExtendsItemSchema = z.string().trim().describe(
504
- "The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration."
657
+ schemaRegistry.add(workspaceDirectoryDataSchema, {
658
+ description: "The directory used to store the environment's data files"
659
+ });
660
+ var workspaceDirectoryConfigSchema = z.optional(
661
+ z.string().check(z.trim())
505
662
  );
506
- var ExtendsSchema = ExtendsItemSchema.or(
507
- z.array(ExtendsItemSchema)
508
- ).describe(
509
- "The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration."
663
+ schemaRegistry.add(workspaceDirectoryConfigSchema, {
664
+ description: "The directory used to store the environment's configuration files"
665
+ });
666
+ var workspaceDirectoryTempSchema = z.optional(
667
+ z.string().check(z.trim())
510
668
  );
511
- var WorkspaceBotConfigSchema = z.object({
512
- name: z.string().trim().default("stormie-bot").describe(
513
- "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
514
- ),
515
- email: z.email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
516
- }).describe(
517
- "The workspace's bot user's config used to automated various operations tasks"
669
+ schemaRegistry.add(workspaceDirectoryTempSchema, {
670
+ description: "The directory used to store the environment's temp files"
671
+ });
672
+ var workspaceDirectoryLogSchema = z.optional(
673
+ z.string().check(z.trim())
518
674
  );
519
- var WorkspaceReleaseConfigSchema = z.object({
520
- banner: z.string().trim().optional().describe(
521
- "A URL to a banner image used to display the workspace's release"
522
- ),
523
- header: z.string().trim().optional().describe(
524
- "A header message appended to the start of the workspace's release notes"
525
- ),
526
- footer: z.string().trim().optional().describe(
527
- "A footer message appended to the end of the workspace's release notes"
528
- )
529
- }).describe("The workspace's release config used during the release process");
530
- var WorkspaceSocialsConfigSchema = z.object({
531
- twitter: z.string().trim().default(STORM_DEFAULT_SOCIAL_TWITTER).describe("A Twitter/X account associated with the organization/project"),
532
- discord: z.string().trim().default(STORM_DEFAULT_SOCIAL_DISCORD).describe("A Discord account associated with the organization/project"),
533
- telegram: z.string().trim().default(STORM_DEFAULT_SOCIAL_TELEGRAM).describe("A Telegram account associated with the organization/project"),
534
- slack: z.string().trim().default(STORM_DEFAULT_SOCIAL_SLACK).describe("A Slack account associated with the organization/project"),
535
- medium: z.string().trim().default(STORM_DEFAULT_SOCIAL_MEDIUM).describe("A Medium account associated with the organization/project"),
536
- github: z.string().trim().default(STORM_DEFAULT_SOCIAL_GITHUB).describe("A GitHub account associated with the organization/project")
537
- }).describe(
538
- "The workspace's account config used to store various social media links"
675
+ schemaRegistry.add(workspaceDirectoryLogSchema, {
676
+ description: "The directory used to store the environment's log files"
677
+ });
678
+ var workspaceDirectoryBuildSchema = z._default(
679
+ z.string().check(z.trim()),
680
+ "dist"
539
681
  );
540
- var WorkspaceDirectoryConfigSchema = z.object({
541
- cache: z.string().trim().optional().describe(
542
- "The directory used to store the environment's cached file data"
543
- ),
544
- data: z.string().trim().optional().describe("The directory used to store the environment's data files"),
545
- config: z.string().trim().optional().describe(
546
- "The directory used to store the environment's configuration files"
547
- ),
548
- temp: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
549
- log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
550
- build: z.string().trim().default("dist").describe(
551
- "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
552
- )
553
- }).describe(
554
- "Various directories used by the workspace to store data, cache, and configuration files"
682
+ schemaRegistry.add(workspaceDirectoryBuildSchema, {
683
+ description: "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
684
+ });
685
+ var workspaceDirectorySchema = z.object({
686
+ cache: workspaceDirectoryCacheSchema,
687
+ data: workspaceDirectoryDataSchema,
688
+ config: workspaceDirectoryConfigSchema,
689
+ temp: workspaceDirectoryTempSchema,
690
+ log: workspaceDirectoryLogSchema,
691
+ build: workspaceDirectoryBuildSchema
692
+ });
693
+ schemaRegistry.add(workspaceDirectorySchema, {
694
+ description: "Various directories used by the workspace to store data, cache, and configuration files"
695
+ });
696
+ var errorCodesFileSchema = z._default(
697
+ z.string().check(z.trim()),
698
+ STORM_DEFAULT_ERROR_CODES_FILE
555
699
  );
556
- var errorConfigSchema = z.object({
557
- codesFile: z.string().trim().default(STORM_DEFAULT_ERROR_CODES_FILE).describe("The path to the workspace's error codes JSON file"),
558
- url: z.url().optional().describe(
559
- "A URL to a page that looks up the workspace's error messages given a specific error code"
560
- )
561
- }).describe("The workspace's error config used during the error process");
562
- var organizationConfigSchema = z.object({
563
- name: z.string().trim().describe("The name of the organization"),
564
- description: z.string().trim().optional().describe("A description of the organization"),
565
- logo: z.url().optional().describe("A URL to the organization's logo image"),
566
- icon: z.url().optional().describe("A URL to the organization's icon image"),
567
- url: z.url().optional().describe(
568
- "A URL to a page that provides more information about the organization"
569
- )
570
- }).describe("The workspace's organization details");
571
- var stormWorkspaceConfigSchema = z.object({
572
- $schema: z.string().trim().default(
573
- "https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
574
- ).describe(
575
- "The URL or file path to the JSON schema file that describes the Storm configuration file"
576
- ),
577
- extends: ExtendsSchema.optional(),
578
- name: z.string().trim().toLowerCase().optional().describe(
579
- "The name of the service/package/scope using this configuration"
580
- ),
581
- namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
582
- organization: organizationConfigSchema.or(z.string().trim().describe("The organization of the workspace")).optional().describe(
583
- "The organization of the workspace. This can be a string or an object containing the organization's details"
584
- ),
585
- repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
586
- license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
587
- homepage: z.url().optional().describe("The homepage of the workspace"),
588
- docs: z.url().optional().describe("The documentation site for the workspace"),
589
- portal: z.url().optional().describe("The development portal site for the workspace"),
590
- licensing: z.url().optional().describe("The licensing site for the workspace"),
591
- contact: z.url().optional().describe("The contact site for the workspace"),
592
- support: z.url().optional().describe(
593
- "The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
594
- ),
595
- branch: z.string().trim().default("main").describe("The branch of the workspace"),
596
- preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
597
- owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
598
- bot: WorkspaceBotConfigSchema,
599
- release: WorkspaceReleaseConfigSchema,
600
- socials: WorkspaceSocialsConfigSchema,
601
- error: errorConfigSchema,
602
- mode: z.string().trim().default("production").describe("The current runtime environment mode for the package"),
603
- workspaceRoot: z.string().trim().describe("The root directory of the workspace"),
604
- skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
605
- directories: WorkspaceDirectoryConfigSchema,
606
- packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
607
- "The JavaScript/TypeScript package manager used by the repository"
608
- ),
609
- timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
610
- locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
611
- logLevel: z.enum([
700
+ schemaRegistry.add(errorCodesFileSchema, {
701
+ description: "The path to the workspace's error codes JSON file"
702
+ });
703
+ var errorUrlSchema = z.optional(z.url());
704
+ schemaRegistry.add(errorUrlSchema, {
705
+ description: "A URL to a page that looks up the workspace's error messages given a specific error code"
706
+ });
707
+ var errorSchema = z.object({
708
+ codesFile: errorCodesFileSchema,
709
+ url: errorUrlSchema
710
+ });
711
+ schemaRegistry.add(errorSchema, {
712
+ description: "The workspace's error config used when creating error details during a system error"
713
+ });
714
+ var organizationNameSchema = z.optional(
715
+ z.string().check(z.trim(), z.toLowerCase())
716
+ );
717
+ schemaRegistry.add(organizationNameSchema, {
718
+ description: "The name of the organization"
719
+ });
720
+ var organizationDescriptionSchema = z.optional(
721
+ z.string().check(z.trim())
722
+ );
723
+ schemaRegistry.add(organizationDescriptionSchema, {
724
+ description: "A description of the organization"
725
+ });
726
+ var organizationLogoSchema = z.optional(z.url());
727
+ schemaRegistry.add(organizationLogoSchema, {
728
+ description: "A URL to the organization's logo image"
729
+ });
730
+ var organizationIconSchema = z.optional(z.url());
731
+ schemaRegistry.add(organizationIconSchema, {
732
+ description: "A URL to the organization's icon image"
733
+ });
734
+ var organizationUrlSchema = z.optional(z.url());
735
+ schemaRegistry.add(organizationUrlSchema, {
736
+ description: "A URL to a page that provides more information about the organization"
737
+ });
738
+ var organizationSchema = z.object({
739
+ name: organizationNameSchema,
740
+ description: organizationDescriptionSchema,
741
+ logo: organizationLogoSchema,
742
+ icon: organizationIconSchema,
743
+ url: organizationUrlSchema
744
+ });
745
+ schemaRegistry.add(organizationSchema, {
746
+ description: "The workspace's organization details"
747
+ });
748
+ var schemaNameSchema = z._default(
749
+ z.string().check(z.trim(), z.toLowerCase()),
750
+ "https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
751
+ );
752
+ schemaRegistry.add(schemaNameSchema, {
753
+ description: "The URL or file path to the JSON schema file that describes the Storm configuration file"
754
+ });
755
+ var nameSchema = z.string().check(z.trim(), z.toLowerCase());
756
+ schemaRegistry.add(nameSchema, {
757
+ description: "The name of the workspace/project/service/package/scope using this configuration"
758
+ });
759
+ var namespaceSchema = z.string().check(z.trim(), z.toLowerCase());
760
+ schemaRegistry.add(namespaceSchema, {
761
+ description: "The namespace of the workspace/project/service/package/scope using this configuration"
762
+ });
763
+ var orgSchema = z.union([
764
+ organizationSchema,
765
+ z.string().check(z.trim(), z.toLowerCase())
766
+ ]);
767
+ schemaRegistry.add(orgSchema, {
768
+ description: "The organization of the workspace. This can be a string or an object containing the organization's details"
769
+ });
770
+ var repositorySchema = z.string().check(z.trim(), z.toLowerCase());
771
+ schemaRegistry.add(repositorySchema, {
772
+ description: "The repo URL of the workspace (i.e. the GitHub repository URL)"
773
+ });
774
+ var licenseSchema = z._default(
775
+ z.string().check(z.trim()),
776
+ "Apache-2.0"
777
+ );
778
+ schemaRegistry.add(licenseSchema, {
779
+ description: "The license type of the package"
780
+ });
781
+ var homepageSchema = z.optional(z.url());
782
+ schemaRegistry.add(homepageSchema, {
783
+ description: "The homepage of the workspace"
784
+ });
785
+ var docsSchema = z.optional(z.url());
786
+ schemaRegistry.add(docsSchema, {
787
+ description: "The documentation site for the workspace"
788
+ });
789
+ var portalSchema = z.optional(z.url());
790
+ schemaRegistry.add(portalSchema, {
791
+ description: "The development portal site for the workspace"
792
+ });
793
+ var licensingSchema = z.optional(z.url());
794
+ schemaRegistry.add(licensingSchema, {
795
+ description: "The licensing site for the workspace"
796
+ });
797
+ var contactSchema = z.optional(z.url());
798
+ schemaRegistry.add(contactSchema, {
799
+ description: "The contact site for the workspace"
800
+ });
801
+ var supportSchema = z.optional(z.url());
802
+ schemaRegistry.add(supportSchema, {
803
+ description: "The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
804
+ });
805
+ var branchSchema = z._default(
806
+ z.string().check(z.trim(), z.toLowerCase()),
807
+ "main"
808
+ );
809
+ schemaRegistry.add(branchSchema, {
810
+ description: "The branch of the workspace"
811
+ });
812
+ var preidSchema = z.optional(
813
+ z.string().check(z.trim(), z.toLowerCase())
814
+ );
815
+ schemaRegistry.add(preidSchema, {
816
+ description: "A tag specifying the version pre-release identifier"
817
+ });
818
+ var ownerSchema = z.optional(
819
+ z.string().check(z.trim(), z.toLowerCase())
820
+ );
821
+ schemaRegistry.add(ownerSchema, {
822
+ description: "The owner of the package"
823
+ });
824
+ var modeSchema = z._default(
825
+ z.enum(["development", "staging", "production"]).check(z.trim(), z.toLowerCase()),
826
+ "production"
827
+ );
828
+ schemaRegistry.add(modeSchema, {
829
+ description: "The current runtime environment mode for the package"
830
+ });
831
+ var workspaceRootSchema = z.string().check(z.trim(), z.toLowerCase());
832
+ schemaRegistry.add(workspaceRootSchema, {
833
+ description: "The root directory of the workspace"
834
+ });
835
+ var skipCacheSchema = z._default(z.boolean(), false);
836
+ schemaRegistry.add(skipCacheSchema, {
837
+ description: "Should all known types of workspace caching be skipped?"
838
+ });
839
+ var packageManagerSchema = z._default(
840
+ z.enum(["npm", "yarn", "pnpm", "bun"]),
841
+ "npm"
842
+ );
843
+ schemaRegistry.add(packageManagerSchema, {
844
+ description: "The JavaScript/TypeScript package manager used by the repository"
845
+ });
846
+ var timezoneSchema = z._default(
847
+ z.string().check(z.trim(), z.toLowerCase()),
848
+ "America/New_York"
849
+ );
850
+ schemaRegistry.add(timezoneSchema, {
851
+ description: "The default timezone of the workspace"
852
+ });
853
+ var localeSchema = z._default(
854
+ z.string().check(z.trim(), z.toLowerCase()),
855
+ "en-US"
856
+ );
857
+ schemaRegistry.add(localeSchema, {
858
+ description: "The default locale of the workspace"
859
+ });
860
+ var logLevelSchema = z._default(
861
+ z.enum([
612
862
  "silent",
613
863
  "fatal",
614
864
  "error",
@@ -618,23 +868,65 @@ var stormWorkspaceConfigSchema = z.object({
618
868
  "debug",
619
869
  "trace",
620
870
  "all"
621
- ]).default("info").describe(
622
- "The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
623
- ),
624
- skipConfigLogging: z.boolean().optional().describe(
625
- "Should the logging of the current Storm Workspace configuration be skipped?"
626
- ),
627
- registry: RegistryConfigSchema,
628
- configFile: z.string().trim().nullable().default(null).describe(
629
- "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
630
- ),
631
- colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
632
- "Storm theme config values used for styling various package elements"
633
- ),
634
- extensions: z.record(z.string(), z.any()).optional().default({}).describe("Configuration of each used extension")
635
- }).describe(
636
- "Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo."
871
+ ]),
872
+ "info"
637
873
  );
874
+ schemaRegistry.add(logLevelSchema, {
875
+ description: "The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
876
+ });
877
+ var skipConfigLoggingSchema = z._default(z.boolean(), true);
878
+ schemaRegistry.add(skipConfigLoggingSchema, {
879
+ description: "Should the logging of the current Storm Workspace configuration be skipped?"
880
+ });
881
+ var configFileSchema = z._default(
882
+ z.nullable(z.string().check(z.trim())),
883
+ null
884
+ );
885
+ schemaRegistry.add(configFileSchema, {
886
+ description: "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
887
+ });
888
+ var extensionsSchema = z._default(z.record(z.string(), z.any()), {});
889
+ schemaRegistry.add(extensionsSchema, {
890
+ description: "Configuration of each used extension"
891
+ });
892
+ var workspaceConfigSchema = z.object({
893
+ $schema: schemaNameSchema,
894
+ extends: extendsSchema,
895
+ name: nameSchema,
896
+ namespace: namespaceSchema,
897
+ organization: orgSchema,
898
+ repository: repositorySchema,
899
+ license: licenseSchema,
900
+ homepage: homepageSchema,
901
+ docs: docsSchema,
902
+ portal: portalSchema,
903
+ licensing: licensingSchema,
904
+ contact: contactSchema,
905
+ support: supportSchema,
906
+ branch: branchSchema,
907
+ preid: preidSchema,
908
+ owner: ownerSchema,
909
+ bot: workspaceBotSchema,
910
+ release: workspaceReleaseSchema,
911
+ socials: workspaceSocialsSchema,
912
+ error: errorSchema,
913
+ mode: modeSchema,
914
+ workspaceRoot: workspaceRootSchema,
915
+ skipCache: skipCacheSchema,
916
+ directories: workspaceDirectorySchema,
917
+ packageManager: packageManagerSchema,
918
+ timezone: timezoneSchema,
919
+ locale: localeSchema,
920
+ logLevel: logLevelSchema,
921
+ skipConfigLogging: skipConfigLoggingSchema,
922
+ registry: registrySchema,
923
+ configFile: configFileSchema,
924
+ colors: z.union([colorsSchema, themeColorsSchema]),
925
+ extensions: extensionsSchema
926
+ });
927
+ schemaRegistry.add(extensionsSchema, {
928
+ description: "Storm Workspace config values used during various dev-ops processes. This type is a combination of the StormPackageConfig and StormProject types. It represents the config of the entire monorepo."
929
+ });
638
930
 
639
931
  // ../config-tools/src/create-storm-config.ts
640
932
  var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
@@ -862,7 +1154,10 @@ var getConfigEnv = () => {
862
1154
  email: process.env[`${prefix}BOT_EMAIL`] || void 0
863
1155
  },
864
1156
  release: {
865
- banner: process.env[`${prefix}RELEASE_BANNER`] || void 0,
1157
+ banner: {
1158
+ url: process.env[`${prefix}RELEASE_BANNER_URL`] || void 0,
1159
+ alt: process.env[`${prefix}RELEASE_BANNER_ALT`] || void 0
1160
+ },
866
1161
  header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
867
1162
  footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
868
1163
  },
@@ -939,11 +1234,11 @@ var getConfigEnv = () => {
939
1234
  );
940
1235
  config.colors = themeNames.length > 0 ? themeNames.reduce(
941
1236
  (ret, themeName) => {
942
- ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
1237
+ ret[themeName] = getThemeColorsEnv(prefix, themeName);
943
1238
  return ret;
944
1239
  },
945
1240
  {}
946
- ) : getThemeColorConfigEnv(prefix);
1241
+ ) : getThemeColorsEnv(prefix);
947
1242
  if (config.docs === STORM_DEFAULT_DOCS) {
948
1243
  if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
949
1244
  config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
@@ -970,11 +1265,11 @@ var getConfigEnv = () => {
970
1265
  }
971
1266
  return config;
972
1267
  };
973
- var getThemeColorConfigEnv = (prefix, theme) => {
1268
+ var getThemeColorsEnv = (prefix, theme) => {
974
1269
  const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
975
- return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
1270
+ return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorsEnv(prefix + themeName) : getSingleThemeColorsEnv(prefix + themeName);
976
1271
  };
977
- var getSingleThemeColorConfigEnv = (prefix) => {
1272
+ var getSingleThemeColorsEnv = (prefix) => {
978
1273
  const gradient = [];
979
1274
  if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
980
1275
  gradient.push(
@@ -1006,15 +1301,13 @@ var getSingleThemeColorConfigEnv = (prefix) => {
1006
1301
  gradient
1007
1302
  };
1008
1303
  };
1009
- var getMultiThemeColorConfigEnv = (prefix) => {
1304
+ var getMultiThemeColorsEnv = (prefix) => {
1010
1305
  return {
1011
- light: getBaseThemeColorConfigEnv(
1012
- `${prefix}_LIGHT_`
1013
- ),
1014
- dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
1306
+ light: getBaseThemeColorsEnv(`${prefix}_LIGHT_`),
1307
+ dark: getBaseThemeColorsEnv(`${prefix}_DARK_`)
1015
1308
  };
1016
1309
  };
1017
- var getBaseThemeColorConfigEnv = (prefix) => {
1310
+ var getBaseThemeColorsEnv = (prefix) => {
1018
1311
  const gradient = [];
1019
1312
  if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
1020
1313
  gradient.push(
@@ -1094,7 +1387,16 @@ var setConfigEnv = (config) => {
1094
1387
  process.env[`${prefix}ERROR_URL`] = config.error.url;
1095
1388
  }
1096
1389
  if (config.release) {
1097
- process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
1390
+ if (config.release.banner) {
1391
+ if (typeof config.release.banner === "string") {
1392
+ process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
1393
+ process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner;
1394
+ } else {
1395
+ process.env[`${prefix}RELEASE_BANNER`] = config.release.banner.url;
1396
+ process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner.url;
1397
+ process.env[`${prefix}RELEASE_BANNER_ALT`] = config.release.banner.alt;
1398
+ }
1399
+ }
1098
1400
  process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
1099
1401
  process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
1100
1402
  }
@@ -1237,10 +1539,10 @@ var setConfigEnv = (config) => {
1237
1539
  }
1238
1540
  if (_optionalChain([config, 'access', _46 => _46.colors, 'optionalAccess', _47 => _47.base, 'optionalAccess', _48 => _48.light]) || _optionalChain([config, 'access', _49 => _49.colors, 'optionalAccess', _50 => _50.base, 'optionalAccess', _51 => _51.dark])) {
1239
1541
  for (const key of Object.keys(config.colors)) {
1240
- setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
1542
+ setThemeColorsEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
1241
1543
  }
1242
1544
  } else {
1243
- setThemeColorConfigEnv(
1545
+ setThemeColorsEnv(
1244
1546
  `${prefix}COLOR_`,
1245
1547
  config.colors
1246
1548
  );
@@ -1295,10 +1597,10 @@ var setConfigEnv = (config) => {
1295
1597
  }
1296
1598
  }
1297
1599
  };
1298
- var setThemeColorConfigEnv = (prefix, config) => {
1299
- return _optionalChain([config, 'optionalAccess', _52 => _52.light, 'optionalAccess', _53 => _53.brand]) || _optionalChain([config, 'optionalAccess', _54 => _54.dark, 'optionalAccess', _55 => _55.brand]) ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
1600
+ var setThemeColorsEnv = (prefix, config) => {
1601
+ return _optionalChain([config, 'optionalAccess', _52 => _52.light, 'optionalAccess', _53 => _53.brand]) || _optionalChain([config, 'optionalAccess', _54 => _54.dark, 'optionalAccess', _55 => _55.brand]) ? setMultiThemeColorsEnv(prefix, config) : setSingleThemeColorsEnv(prefix, config);
1300
1602
  };
1301
- var setSingleThemeColorConfigEnv = (prefix, config) => {
1603
+ var setSingleThemeColorsEnv = (prefix, config) => {
1302
1604
  if (config.dark) {
1303
1605
  process.env[`${prefix}DARK`] = config.dark;
1304
1606
  }
@@ -1347,13 +1649,13 @@ var setSingleThemeColorConfigEnv = (prefix, config) => {
1347
1649
  }
1348
1650
  }
1349
1651
  };
1350
- var setMultiThemeColorConfigEnv = (prefix, config) => {
1652
+ var setMultiThemeColorsEnv = (prefix, config) => {
1351
1653
  return {
1352
- light: setBaseThemeColorConfigEnv(`${prefix}LIGHT_`, config.light),
1353
- dark: setBaseThemeColorConfigEnv(`${prefix}DARK_`, config.dark)
1654
+ light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config.light),
1655
+ dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config.dark)
1354
1656
  };
1355
1657
  };
1356
- var setBaseThemeColorConfigEnv = (prefix, config) => {
1658
+ var setBaseThemeColorsEnv = (prefix, config) => {
1357
1659
  if (config.foreground) {
1358
1660
  process.env[`${prefix}FOREGROUND`] = config.foreground;
1359
1661
  }
@@ -1434,7 +1736,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
1434
1736
  );
1435
1737
  try {
1436
1738
  result = applyDefaultConfig(
1437
- await stormWorkspaceConfigSchema.parseAsync(configInput)
1739
+ await workspaceConfigSchema.parseAsync(configInput)
1438
1740
  );
1439
1741
  result.workspaceRoot ??= _workspaceRoot;
1440
1742
  } catch (error) {