@storm-software/git-tools 2.114.1 → 2.115.0

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.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chalk = require('chalk');
4
- var z = require('zod');
4
+ var z = require('zod/mini');
5
5
  var c12 = require('c12');
6
6
  var fs = require('fs');
7
7
  var path = require('path');
@@ -345,240 +345,488 @@ var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
345
345
  var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
346
346
  var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
347
347
  var STORM_DEFAULT_LICENSE = "Apache-2.0";
348
- var STORM_DEFAULT_SOCIAL_TWITTER = "StormSoftwareHQ";
349
- var STORM_DEFAULT_SOCIAL_DISCORD = "https://discord.gg/MQ6YVzakM5";
350
- var STORM_DEFAULT_SOCIAL_TELEGRAM = "https://t.me/storm_software";
351
- var STORM_DEFAULT_SOCIAL_SLACK = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
352
- var STORM_DEFAULT_SOCIAL_MEDIUM = "https://medium.com/storm-software";
353
- var STORM_DEFAULT_SOCIAL_GITHUB = "https://github.com/storm-software";
354
348
  var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
349
+ var STORM_DEFAULT_BANNER_ALT = "The workspace's banner image";
355
350
 
356
351
  // ../config/src/schema.ts
357
- var ColorSchema = z__namespace.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7);
358
- var DarkColorSchema = ColorSchema.default("#151718").describe(
359
- "The dark background color of the workspace"
352
+ var schemaRegistry = z__namespace.registry();
353
+ var colorSchema = z__namespace.string().check(
354
+ z__namespace.length(7),
355
+ z__namespace.toLowerCase(),
356
+ z__namespace.regex(/^#([0-9a-f]{3}){1,2}$/i),
357
+ z__namespace.trim()
360
358
  );
361
- var LightColorSchema = ColorSchema.default("#cbd5e1").describe(
362
- "The light background color of the workspace"
359
+ schemaRegistry.add(colorSchema, {
360
+ description: "A base schema for describing the format of colors"
361
+ });
362
+ var darkColorSchema = z__namespace._default(colorSchema, "#151718");
363
+ schemaRegistry.add(darkColorSchema, {
364
+ description: "The dark background color of the workspace"
365
+ });
366
+ var lightColorSchema = z__namespace._default(colorSchema, "#cbd5e1");
367
+ schemaRegistry.add(lightColorSchema, {
368
+ description: "The light background color of the workspace"
369
+ });
370
+ var brandColorSchema = z__namespace._default(colorSchema, "#1fb2a6");
371
+ schemaRegistry.add(brandColorSchema, {
372
+ description: "The primary brand specific color of the workspace"
373
+ });
374
+ var alternateColorSchema = z__namespace.optional(colorSchema);
375
+ schemaRegistry.add(alternateColorSchema, {
376
+ description: "The alternate brand specific color of the workspace"
377
+ });
378
+ var accentColorSchema = z__namespace.optional(colorSchema);
379
+ schemaRegistry.add(accentColorSchema, {
380
+ description: "The secondary brand specific color of the workspace"
381
+ });
382
+ var linkColorSchema = z__namespace._default(colorSchema, "#3fa6ff");
383
+ schemaRegistry.add(linkColorSchema, {
384
+ description: "The color used to display hyperlink text"
385
+ });
386
+ var helpColorSchema = z__namespace._default(colorSchema, "#818cf8");
387
+ schemaRegistry.add(helpColorSchema, {
388
+ description: "The second brand specific color of the workspace"
389
+ });
390
+ var successColorSchema = z__namespace._default(colorSchema, "#45b27e");
391
+ schemaRegistry.add(successColorSchema, {
392
+ description: "The success color of the workspace"
393
+ });
394
+ var infoColorSchema = z__namespace._default(colorSchema, "#38bdf8");
395
+ schemaRegistry.add(infoColorSchema, {
396
+ description: "The informational color of the workspace"
397
+ });
398
+ var warningColorSchema = z__namespace._default(colorSchema, "#f3d371");
399
+ schemaRegistry.add(warningColorSchema, {
400
+ description: "The warning color of the workspace"
401
+ });
402
+ var dangerColorSchema = z__namespace._default(colorSchema, "#d8314a");
403
+ schemaRegistry.add(dangerColorSchema, {
404
+ description: "The danger color of the workspace"
405
+ });
406
+ var fatalColorSchema = z__namespace.optional(colorSchema);
407
+ schemaRegistry.add(fatalColorSchema, {
408
+ description: "The fatal color of the workspace"
409
+ });
410
+ var positiveColorSchema = z__namespace._default(colorSchema, "#4ade80");
411
+ schemaRegistry.add(positiveColorSchema, {
412
+ description: "The positive number color of the workspace"
413
+ });
414
+ var negativeColorSchema = z__namespace._default(colorSchema, "#ef4444");
415
+ schemaRegistry.add(negativeColorSchema, {
416
+ description: "The negative number color of the workspace"
417
+ });
418
+ var gradientStopsSchema = z__namespace.optional(z__namespace.array(colorSchema));
419
+ schemaRegistry.add(gradientStopsSchema, {
420
+ description: "The color stops for the base gradient color pattern used in the workspace"
421
+ });
422
+ var darkColorsSchema = z__namespace.object({
423
+ foreground: lightColorSchema,
424
+ background: darkColorSchema,
425
+ brand: brandColorSchema,
426
+ alternate: alternateColorSchema,
427
+ accent: accentColorSchema,
428
+ link: linkColorSchema,
429
+ help: helpColorSchema,
430
+ success: successColorSchema,
431
+ info: infoColorSchema,
432
+ warning: warningColorSchema,
433
+ danger: dangerColorSchema,
434
+ fatal: fatalColorSchema,
435
+ positive: positiveColorSchema,
436
+ negative: negativeColorSchema,
437
+ gradient: gradientStopsSchema
438
+ });
439
+ var lightColorsSchema = z__namespace.object({
440
+ foreground: darkColorSchema,
441
+ background: lightColorSchema,
442
+ brand: brandColorSchema,
443
+ alternate: alternateColorSchema,
444
+ accent: accentColorSchema,
445
+ link: linkColorSchema,
446
+ help: helpColorSchema,
447
+ success: successColorSchema,
448
+ info: infoColorSchema,
449
+ warning: warningColorSchema,
450
+ danger: dangerColorSchema,
451
+ fatal: fatalColorSchema,
452
+ positive: positiveColorSchema,
453
+ negative: negativeColorSchema,
454
+ gradient: gradientStopsSchema
455
+ });
456
+ var multiColorsSchema = z__namespace.object({
457
+ dark: darkColorsSchema,
458
+ light: lightColorsSchema
459
+ });
460
+ var singleColorsSchema = z__namespace.object({
461
+ dark: darkColorSchema,
462
+ light: lightColorSchema,
463
+ brand: brandColorSchema,
464
+ alternate: alternateColorSchema,
465
+ accent: accentColorSchema,
466
+ link: linkColorSchema,
467
+ help: helpColorSchema,
468
+ success: successColorSchema,
469
+ info: infoColorSchema,
470
+ warning: warningColorSchema,
471
+ danger: dangerColorSchema,
472
+ fatal: fatalColorSchema,
473
+ positive: positiveColorSchema,
474
+ negative: negativeColorSchema,
475
+ gradient: gradientStopsSchema
476
+ });
477
+ var registryUrlConfigSchema = z__namespace.optional(z__namespace.url());
478
+ schemaRegistry.add(registryUrlConfigSchema, {
479
+ description: "A remote registry URL used to publish distributable packages"
480
+ });
481
+ var registrySchema = z__namespace._default(
482
+ z__namespace.object({
483
+ github: registryUrlConfigSchema,
484
+ npm: registryUrlConfigSchema,
485
+ cargo: registryUrlConfigSchema,
486
+ cyclone: registryUrlConfigSchema,
487
+ container: registryUrlConfigSchema
488
+ }),
489
+ {}
490
+ );
491
+ schemaRegistry.add(registrySchema, {
492
+ description: "A list of remote registry URLs used by Storm Software"
493
+ });
494
+ var colorsSchema = z__namespace.union([singleColorsSchema, multiColorsSchema]);
495
+ schemaRegistry.add(colorsSchema, {
496
+ description: "Colors used for various workspace elements"
497
+ });
498
+ var themeColorsSchema = z__namespace.record(
499
+ z__namespace.union([z__namespace.union([z__namespace.literal("base"), z__namespace.string()]), z__namespace.string()]),
500
+ colorsSchema
501
+ );
502
+ schemaRegistry.add(themeColorsSchema, {
503
+ description: "Storm theme config values used for styling various package elements"
504
+ });
505
+ var extendsSchema = z__namespace.optional(
506
+ z__namespace.union([z__namespace.string().check(z__namespace.trim()), z__namespace.array(z__namespace.string().check(z__namespace.trim()))])
363
507
  );
364
- var BrandColorSchema = ColorSchema.default("#1fb2a6").describe(
365
- "The primary brand specific color of the workspace"
508
+ schemaRegistry.add(extendsSchema, {
509
+ 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."
510
+ });
511
+ var workspaceBotNameSchema = z__namespace.string().check(z__namespace.trim());
512
+ schemaRegistry.add(workspaceBotNameSchema, {
513
+ description: "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
514
+ });
515
+ var workspaceBotEmailSchema = z__namespace.string().check(z__namespace.trim());
516
+ schemaRegistry.add(workspaceBotEmailSchema, {
517
+ description: "The email of the workspace bot"
518
+ });
519
+ var workspaceBotSchema = z__namespace.object({
520
+ name: workspaceBotNameSchema,
521
+ email: workspaceBotEmailSchema
522
+ });
523
+ schemaRegistry.add(workspaceBotSchema, {
524
+ description: "The workspace's bot user's config used to automated various operations tasks"
525
+ });
526
+ var workspaceReleaseBannerUrlSchema = z__namespace.optional(
527
+ z__namespace.string().check(z__namespace.trim(), z__namespace.url())
528
+ );
529
+ schemaRegistry.add(workspaceReleaseBannerUrlSchema, {
530
+ description: "A URL to a banner image used to display the workspace's release"
531
+ });
532
+ var workspaceReleaseBannerAltSchema = z__namespace._default(
533
+ z__namespace.string().check(z__namespace.trim()),
534
+ STORM_DEFAULT_BANNER_ALT
535
+ );
536
+ schemaRegistry.add(workspaceReleaseBannerAltSchema, {
537
+ description: "The alt text for the workspace's release banner image"
538
+ });
539
+ var workspaceReleaseBannerSchema = z__namespace.object({
540
+ url: workspaceReleaseBannerUrlSchema,
541
+ alt: workspaceReleaseBannerAltSchema
542
+ });
543
+ schemaRegistry.add(workspaceReleaseBannerSchema, {
544
+ description: "The workspace's banner image used during the release process"
545
+ });
546
+ var workspaceReleaseHeaderSchema = z__namespace.optional(
547
+ z__namespace.string().check(z__namespace.trim())
548
+ );
549
+ schemaRegistry.add(workspaceReleaseHeaderSchema, {
550
+ description: "A header message appended to the start of the workspace's release notes"
551
+ });
552
+ var workspaceReleaseFooterSchema = z__namespace.optional(
553
+ z__namespace.string().check(z__namespace.trim())
554
+ );
555
+ schemaRegistry.add(workspaceReleaseFooterSchema, {
556
+ description: "A footer message appended to the end of the workspace's release notes"
557
+ });
558
+ var workspaceReleaseSchema = z__namespace.object({
559
+ banner: z__namespace.union([
560
+ workspaceReleaseBannerSchema,
561
+ z__namespace.string().check(z__namespace.trim(), z__namespace.url())
562
+ ]),
563
+ header: workspaceReleaseHeaderSchema,
564
+ footer: workspaceReleaseFooterSchema
565
+ });
566
+ schemaRegistry.add(workspaceReleaseSchema, {
567
+ description: "The workspace's release config used during the release process"
568
+ });
569
+ var workspaceSocialsTwitterSchema = z__namespace.optional(
570
+ z__namespace.string().check(z__namespace.trim())
571
+ );
572
+ schemaRegistry.add(workspaceSocialsTwitterSchema, {
573
+ description: "A Twitter/X account associated with the organization/project"
574
+ });
575
+ var workspaceSocialsDiscordSchema = z__namespace.optional(
576
+ z__namespace.string().check(z__namespace.trim())
577
+ );
578
+ schemaRegistry.add(workspaceSocialsDiscordSchema, {
579
+ description: "A Discord account associated with the organization/project"
580
+ });
581
+ var workspaceSocialsTelegramSchema = z__namespace.optional(
582
+ z__namespace.string().check(z__namespace.trim())
583
+ );
584
+ schemaRegistry.add(workspaceSocialsTelegramSchema, {
585
+ description: "A Telegram account associated with the organization/project"
586
+ });
587
+ var workspaceSocialsSlackSchema = z__namespace.optional(
588
+ z__namespace.string().check(z__namespace.trim())
589
+ );
590
+ schemaRegistry.add(workspaceSocialsSlackSchema, {
591
+ description: "A Slack account associated with the organization/project"
592
+ });
593
+ var workspaceSocialsMediumSchema = z__namespace.optional(
594
+ z__namespace.string().check(z__namespace.trim())
595
+ );
596
+ schemaRegistry.add(workspaceSocialsMediumSchema, {
597
+ description: "A Medium account associated with the organization/project"
598
+ });
599
+ var workspaceSocialsGithubSchema = z__namespace.optional(
600
+ z__namespace.string().check(z__namespace.trim())
366
601
  );
367
- var AlternateColorSchema = ColorSchema.optional().describe(
368
- "The alternate brand specific color of the workspace"
602
+ schemaRegistry.add(workspaceSocialsGithubSchema, {
603
+ description: "A GitHub account associated with the organization/project"
604
+ });
605
+ var workspaceSocialsSchema = z__namespace.object({
606
+ twitter: workspaceSocialsTwitterSchema,
607
+ discord: workspaceSocialsDiscordSchema,
608
+ telegram: workspaceSocialsTelegramSchema,
609
+ slack: workspaceSocialsSlackSchema,
610
+ medium: workspaceSocialsMediumSchema,
611
+ github: workspaceSocialsGithubSchema
612
+ });
613
+ schemaRegistry.add(workspaceSocialsSchema, {
614
+ description: "The workspace's account config used to store various social media links"
615
+ });
616
+ var workspaceDirectoryCacheSchema = z__namespace.optional(
617
+ z__namespace.string().check(z__namespace.trim())
369
618
  );
370
- var AccentColorSchema = ColorSchema.optional().describe(
371
- "The secondary brand specific color of the workspace"
619
+ schemaRegistry.add(workspaceDirectoryCacheSchema, {
620
+ description: "The directory used to store the environment's cached file data"
621
+ });
622
+ var workspaceDirectoryDataSchema = z__namespace.optional(
623
+ z__namespace.string().check(z__namespace.trim())
372
624
  );
373
- var LinkColorSchema = ColorSchema.default("#3fa6ff").describe(
374
- "The color used to display hyperlink text"
625
+ schemaRegistry.add(workspaceDirectoryDataSchema, {
626
+ description: "The directory used to store the environment's data files"
627
+ });
628
+ var workspaceDirectoryConfigSchema = z__namespace.optional(
629
+ z__namespace.string().check(z__namespace.trim())
375
630
  );
376
- var HelpColorSchema = ColorSchema.default("#818cf8").describe(
377
- "The second brand specific color of the workspace"
631
+ schemaRegistry.add(workspaceDirectoryConfigSchema, {
632
+ description: "The directory used to store the environment's configuration files"
633
+ });
634
+ var workspaceDirectoryTempSchema = z__namespace.optional(
635
+ z__namespace.string().check(z__namespace.trim())
378
636
  );
379
- var SuccessColorSchema = ColorSchema.default("#45b27e").describe(
380
- "The success color of the workspace"
637
+ schemaRegistry.add(workspaceDirectoryTempSchema, {
638
+ description: "The directory used to store the environment's temp files"
639
+ });
640
+ var workspaceDirectoryLogSchema = z__namespace.optional(
641
+ z__namespace.string().check(z__namespace.trim())
381
642
  );
382
- var InfoColorSchema = ColorSchema.default("#38bdf8").describe(
383
- "The informational color of the workspace"
643
+ schemaRegistry.add(workspaceDirectoryLogSchema, {
644
+ description: "The directory used to store the environment's log files"
645
+ });
646
+ var workspaceDirectoryBuildSchema = z__namespace._default(
647
+ z__namespace.string().check(z__namespace.trim()),
648
+ "dist"
384
649
  );
385
- var WarningColorSchema = ColorSchema.default("#f3d371").describe(
386
- "The warning color of the workspace"
650
+ schemaRegistry.add(workspaceDirectoryBuildSchema, {
651
+ description: "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
652
+ });
653
+ var workspaceDirectorySchema = z__namespace.object({
654
+ cache: workspaceDirectoryCacheSchema,
655
+ data: workspaceDirectoryDataSchema,
656
+ config: workspaceDirectoryConfigSchema,
657
+ temp: workspaceDirectoryTempSchema,
658
+ log: workspaceDirectoryLogSchema,
659
+ build: workspaceDirectoryBuildSchema
660
+ });
661
+ schemaRegistry.add(workspaceDirectorySchema, {
662
+ description: "Various directories used by the workspace to store data, cache, and configuration files"
663
+ });
664
+ var errorCodesFileSchema = z__namespace._default(
665
+ z__namespace.string().check(z__namespace.trim()),
666
+ STORM_DEFAULT_ERROR_CODES_FILE
387
667
  );
388
- var DangerColorSchema = ColorSchema.default("#d8314a").describe(
389
- "The danger color of the workspace"
668
+ schemaRegistry.add(errorCodesFileSchema, {
669
+ description: "The path to the workspace's error codes JSON file"
670
+ });
671
+ var errorUrlSchema = z__namespace.optional(z__namespace.url());
672
+ schemaRegistry.add(errorUrlSchema, {
673
+ description: "A URL to a page that looks up the workspace's error messages given a specific error code"
674
+ });
675
+ var errorSchema = z__namespace.object({
676
+ codesFile: errorCodesFileSchema,
677
+ url: errorUrlSchema
678
+ });
679
+ schemaRegistry.add(errorSchema, {
680
+ description: "The workspace's error config used when creating error details during a system error"
681
+ });
682
+ var organizationNameSchema = z__namespace.optional(
683
+ z__namespace.string().check(z__namespace.trim(), z__namespace.toLowerCase())
390
684
  );
391
- var FatalColorSchema = ColorSchema.optional().describe(
392
- "The fatal color of the workspace"
685
+ schemaRegistry.add(organizationNameSchema, {
686
+ description: "The name of the organization"
687
+ });
688
+ var organizationDescriptionSchema = z__namespace.optional(
689
+ z__namespace.string().check(z__namespace.trim())
393
690
  );
394
- var PositiveColorSchema = ColorSchema.default("#4ade80").describe(
395
- "The positive number color of the workspace"
691
+ schemaRegistry.add(organizationDescriptionSchema, {
692
+ description: "A description of the organization"
693
+ });
694
+ var organizationLogoSchema = z__namespace.optional(z__namespace.url());
695
+ schemaRegistry.add(organizationLogoSchema, {
696
+ description: "A URL to the organization's logo image"
697
+ });
698
+ var organizationIconSchema = z__namespace.optional(z__namespace.url());
699
+ schemaRegistry.add(organizationIconSchema, {
700
+ description: "A URL to the organization's icon image"
701
+ });
702
+ var organizationUrlSchema = z__namespace.optional(z__namespace.url());
703
+ schemaRegistry.add(organizationUrlSchema, {
704
+ description: "A URL to a page that provides more information about the organization"
705
+ });
706
+ var organizationSchema = z__namespace.object({
707
+ name: organizationNameSchema,
708
+ description: organizationDescriptionSchema,
709
+ logo: organizationLogoSchema,
710
+ icon: organizationIconSchema,
711
+ url: organizationUrlSchema
712
+ });
713
+ schemaRegistry.add(organizationSchema, {
714
+ description: "The workspace's organization details"
715
+ });
716
+ var schemaNameSchema = z__namespace._default(
717
+ z__namespace.string().check(z__namespace.trim(), z__namespace.toLowerCase()),
718
+ "https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
396
719
  );
397
- var NegativeColorSchema = ColorSchema.default("#ef4444").describe(
398
- "The negative number color of the workspace"
720
+ schemaRegistry.add(schemaNameSchema, {
721
+ description: "The URL or file path to the JSON schema file that describes the Storm configuration file"
722
+ });
723
+ var nameSchema = z__namespace.string().check(z__namespace.trim(), z__namespace.toLowerCase());
724
+ schemaRegistry.add(nameSchema, {
725
+ description: "The name of the workspace/project/service/package/scope using this configuration"
726
+ });
727
+ var namespaceSchema = z__namespace.string().check(z__namespace.trim(), z__namespace.toLowerCase());
728
+ schemaRegistry.add(namespaceSchema, {
729
+ description: "The namespace of the workspace/project/service/package/scope using this configuration"
730
+ });
731
+ var orgSchema = z__namespace.union([
732
+ organizationSchema,
733
+ z__namespace.string().check(z__namespace.trim(), z__namespace.toLowerCase())
734
+ ]);
735
+ schemaRegistry.add(orgSchema, {
736
+ description: "The organization of the workspace. This can be a string or an object containing the organization's details"
737
+ });
738
+ var repositorySchema = z__namespace.string().check(z__namespace.trim(), z__namespace.toLowerCase());
739
+ schemaRegistry.add(repositorySchema, {
740
+ description: "The repo URL of the workspace (i.e. the GitHub repository URL)"
741
+ });
742
+ var licenseSchema = z__namespace._default(
743
+ z__namespace.string().check(z__namespace.trim()),
744
+ "Apache-2.0"
399
745
  );
400
- var GradientStopsSchema = z__namespace.array(ColorSchema).optional().describe(
401
- "The color stops for the base gradient color pattern used in the workspace"
746
+ schemaRegistry.add(licenseSchema, {
747
+ description: "The license type of the package"
748
+ });
749
+ var homepageSchema = z__namespace.optional(z__namespace.url());
750
+ schemaRegistry.add(homepageSchema, {
751
+ description: "The homepage of the workspace"
752
+ });
753
+ var docsSchema = z__namespace.optional(z__namespace.url());
754
+ schemaRegistry.add(docsSchema, {
755
+ description: "The documentation site for the workspace"
756
+ });
757
+ var portalSchema = z__namespace.optional(z__namespace.url());
758
+ schemaRegistry.add(portalSchema, {
759
+ description: "The development portal site for the workspace"
760
+ });
761
+ var licensingSchema = z__namespace.optional(z__namespace.url());
762
+ schemaRegistry.add(licensingSchema, {
763
+ description: "The licensing site for the workspace"
764
+ });
765
+ var contactSchema = z__namespace.optional(z__namespace.url());
766
+ schemaRegistry.add(contactSchema, {
767
+ description: "The contact site for the workspace"
768
+ });
769
+ var supportSchema = z__namespace.optional(z__namespace.url());
770
+ schemaRegistry.add(supportSchema, {
771
+ description: "The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
772
+ });
773
+ var branchSchema = z__namespace._default(
774
+ z__namespace.string().check(z__namespace.trim(), z__namespace.toLowerCase()),
775
+ "main"
402
776
  );
403
- var DarkThemeColorConfigSchema = z__namespace.object({
404
- foreground: LightColorSchema,
405
- background: DarkColorSchema,
406
- brand: BrandColorSchema,
407
- alternate: AlternateColorSchema,
408
- accent: AccentColorSchema,
409
- link: LinkColorSchema,
410
- help: HelpColorSchema,
411
- success: SuccessColorSchema,
412
- info: InfoColorSchema,
413
- warning: WarningColorSchema,
414
- danger: DangerColorSchema,
415
- fatal: FatalColorSchema,
416
- positive: PositiveColorSchema,
417
- negative: NegativeColorSchema,
418
- gradient: GradientStopsSchema
419
- });
420
- var LightThemeColorConfigSchema = z__namespace.object({
421
- foreground: DarkColorSchema,
422
- background: LightColorSchema,
423
- brand: BrandColorSchema,
424
- alternate: AlternateColorSchema,
425
- accent: AccentColorSchema,
426
- link: LinkColorSchema,
427
- help: HelpColorSchema,
428
- success: SuccessColorSchema,
429
- info: InfoColorSchema,
430
- warning: WarningColorSchema,
431
- danger: DangerColorSchema,
432
- fatal: FatalColorSchema,
433
- positive: PositiveColorSchema,
434
- negative: NegativeColorSchema,
435
- gradient: GradientStopsSchema
436
- });
437
- var MultiThemeColorConfigSchema = z__namespace.object({
438
- dark: DarkThemeColorConfigSchema,
439
- light: LightThemeColorConfigSchema
440
- });
441
- var SingleThemeColorConfigSchema = z__namespace.object({
442
- dark: DarkColorSchema,
443
- light: LightColorSchema,
444
- brand: BrandColorSchema,
445
- alternate: AlternateColorSchema,
446
- accent: AccentColorSchema,
447
- link: LinkColorSchema,
448
- help: HelpColorSchema,
449
- success: SuccessColorSchema,
450
- info: InfoColorSchema,
451
- warning: WarningColorSchema,
452
- danger: DangerColorSchema,
453
- fatal: FatalColorSchema,
454
- positive: PositiveColorSchema,
455
- negative: NegativeColorSchema,
456
- gradient: GradientStopsSchema
457
- });
458
- var RegistryUrlConfigSchema = z__namespace.url().optional().describe("A remote registry URL used to publish distributable packages");
459
- var RegistryConfigSchema = z__namespace.object({
460
- github: RegistryUrlConfigSchema,
461
- npm: RegistryUrlConfigSchema,
462
- cargo: RegistryUrlConfigSchema,
463
- cyclone: RegistryUrlConfigSchema,
464
- container: RegistryUrlConfigSchema
465
- }).default({}).describe("A list of remote registry URLs used by Storm Software");
466
- var ColorConfigSchema = SingleThemeColorConfigSchema.or(
467
- MultiThemeColorConfigSchema
468
- ).describe("Colors used for various workspace elements");
469
- var ColorConfigMapSchema = z__namespace.record(
470
- z__namespace.union([z__namespace.literal("base"), z__namespace.string()]),
471
- ColorConfigSchema
777
+ schemaRegistry.add(branchSchema, {
778
+ description: "The branch of the workspace"
779
+ });
780
+ var preidSchema = z__namespace.optional(
781
+ z__namespace.string().check(z__namespace.trim(), z__namespace.toLowerCase())
472
782
  );
473
- var ExtendsItemSchema = z__namespace.string().trim().describe(
474
- "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."
783
+ schemaRegistry.add(preidSchema, {
784
+ description: "A tag specifying the version pre-release identifier"
785
+ });
786
+ var ownerSchema = z__namespace.optional(
787
+ z__namespace.string().check(z__namespace.trim(), z__namespace.toLowerCase())
475
788
  );
476
- var ExtendsSchema = ExtendsItemSchema.or(
477
- z__namespace.array(ExtendsItemSchema)
478
- ).describe(
479
- "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."
789
+ schemaRegistry.add(ownerSchema, {
790
+ description: "The owner of the package"
791
+ });
792
+ var modeSchema = z__namespace._default(
793
+ z__namespace.enum(["development", "staging", "production"]).check(z__namespace.trim(), z__namespace.toLowerCase()),
794
+ "production"
480
795
  );
481
- var WorkspaceBotConfigSchema = z__namespace.object({
482
- name: z__namespace.string().trim().default("stormie-bot").describe(
483
- "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
484
- ),
485
- email: z__namespace.email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
486
- }).describe(
487
- "The workspace's bot user's config used to automated various operations tasks"
796
+ schemaRegistry.add(modeSchema, {
797
+ description: "The current runtime environment mode for the package"
798
+ });
799
+ var workspaceRootSchema = z__namespace.string().check(z__namespace.trim(), z__namespace.toLowerCase());
800
+ schemaRegistry.add(workspaceRootSchema, {
801
+ description: "The root directory of the workspace"
802
+ });
803
+ var skipCacheSchema = z__namespace._default(z__namespace.boolean(), false);
804
+ schemaRegistry.add(skipCacheSchema, {
805
+ description: "Should all known types of workspace caching be skipped?"
806
+ });
807
+ var packageManagerSchema = z__namespace._default(
808
+ z__namespace.enum(["npm", "yarn", "pnpm", "bun"]),
809
+ "npm"
488
810
  );
489
- var WorkspaceReleaseConfigSchema = z__namespace.object({
490
- banner: z__namespace.string().trim().optional().describe(
491
- "A URL to a banner image used to display the workspace's release"
492
- ),
493
- header: z__namespace.string().trim().optional().describe(
494
- "A header message appended to the start of the workspace's release notes"
495
- ),
496
- footer: z__namespace.string().trim().optional().describe(
497
- "A footer message appended to the end of the workspace's release notes"
498
- )
499
- }).describe("The workspace's release config used during the release process");
500
- var WorkspaceSocialsConfigSchema = z__namespace.object({
501
- twitter: z__namespace.string().trim().default(STORM_DEFAULT_SOCIAL_TWITTER).describe("A Twitter/X account associated with the organization/project"),
502
- discord: z__namespace.string().trim().default(STORM_DEFAULT_SOCIAL_DISCORD).describe("A Discord account associated with the organization/project"),
503
- telegram: z__namespace.string().trim().default(STORM_DEFAULT_SOCIAL_TELEGRAM).describe("A Telegram account associated with the organization/project"),
504
- slack: z__namespace.string().trim().default(STORM_DEFAULT_SOCIAL_SLACK).describe("A Slack account associated with the organization/project"),
505
- medium: z__namespace.string().trim().default(STORM_DEFAULT_SOCIAL_MEDIUM).describe("A Medium account associated with the organization/project"),
506
- github: z__namespace.string().trim().default(STORM_DEFAULT_SOCIAL_GITHUB).describe("A GitHub account associated with the organization/project")
507
- }).describe(
508
- "The workspace's account config used to store various social media links"
811
+ schemaRegistry.add(packageManagerSchema, {
812
+ description: "The JavaScript/TypeScript package manager used by the repository"
813
+ });
814
+ var timezoneSchema = z__namespace._default(
815
+ z__namespace.string().check(z__namespace.trim(), z__namespace.toLowerCase()),
816
+ "America/New_York"
509
817
  );
510
- var WorkspaceDirectoryConfigSchema = z__namespace.object({
511
- cache: z__namespace.string().trim().optional().describe(
512
- "The directory used to store the environment's cached file data"
513
- ),
514
- data: z__namespace.string().trim().optional().describe("The directory used to store the environment's data files"),
515
- config: z__namespace.string().trim().optional().describe(
516
- "The directory used to store the environment's configuration files"
517
- ),
518
- temp: z__namespace.string().trim().optional().describe("The directory used to store the environment's temp files"),
519
- log: z__namespace.string().trim().optional().describe("The directory used to store the environment's temp files"),
520
- build: z__namespace.string().trim().default("dist").describe(
521
- "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
522
- )
523
- }).describe(
524
- "Various directories used by the workspace to store data, cache, and configuration files"
818
+ schemaRegistry.add(timezoneSchema, {
819
+ description: "The default timezone of the workspace"
820
+ });
821
+ var localeSchema = z__namespace._default(
822
+ z__namespace.string().check(z__namespace.trim(), z__namespace.toLowerCase()),
823
+ "en-US"
525
824
  );
526
- var errorConfigSchema = z__namespace.object({
527
- codesFile: z__namespace.string().trim().default(STORM_DEFAULT_ERROR_CODES_FILE).describe("The path to the workspace's error codes JSON file"),
528
- url: z__namespace.url().optional().describe(
529
- "A URL to a page that looks up the workspace's error messages given a specific error code"
530
- )
531
- }).describe("The workspace's error config used during the error process");
532
- var organizationConfigSchema = z__namespace.object({
533
- name: z__namespace.string().trim().describe("The name of the organization"),
534
- description: z__namespace.string().trim().optional().describe("A description of the organization"),
535
- logo: z__namespace.url().optional().describe("A URL to the organization's logo image"),
536
- icon: z__namespace.url().optional().describe("A URL to the organization's icon image"),
537
- url: z__namespace.url().optional().describe(
538
- "A URL to a page that provides more information about the organization"
539
- )
540
- }).describe("The workspace's organization details");
541
- var stormWorkspaceConfigSchema = z__namespace.object({
542
- $schema: z__namespace.string().trim().default(
543
- "https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
544
- ).describe(
545
- "The URL or file path to the JSON schema file that describes the Storm configuration file"
546
- ),
547
- extends: ExtendsSchema.optional(),
548
- name: z__namespace.string().trim().toLowerCase().optional().describe(
549
- "The name of the service/package/scope using this configuration"
550
- ),
551
- namespace: z__namespace.string().trim().toLowerCase().optional().describe("The namespace of the package"),
552
- organization: organizationConfigSchema.or(z__namespace.string().trim().describe("The organization of the workspace")).optional().describe(
553
- "The organization of the workspace. This can be a string or an object containing the organization's details"
554
- ),
555
- repository: z__namespace.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
556
- license: z__namespace.string().trim().default("Apache-2.0").describe("The license type of the package"),
557
- homepage: z__namespace.url().optional().describe("The homepage of the workspace"),
558
- docs: z__namespace.url().optional().describe("The documentation site for the workspace"),
559
- portal: z__namespace.url().optional().describe("The development portal site for the workspace"),
560
- licensing: z__namespace.url().optional().describe("The licensing site for the workspace"),
561
- contact: z__namespace.url().optional().describe("The contact site for the workspace"),
562
- support: z__namespace.url().optional().describe(
563
- "The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
564
- ),
565
- branch: z__namespace.string().trim().default("main").describe("The branch of the workspace"),
566
- preid: z__namespace.string().optional().describe("A tag specifying the version pre-release identifier"),
567
- owner: z__namespace.string().trim().default("@storm-software/admin").describe("The owner of the package"),
568
- bot: WorkspaceBotConfigSchema,
569
- release: WorkspaceReleaseConfigSchema,
570
- socials: WorkspaceSocialsConfigSchema,
571
- error: errorConfigSchema,
572
- mode: z__namespace.string().trim().default("production").describe("The current runtime environment mode for the package"),
573
- workspaceRoot: z__namespace.string().trim().describe("The root directory of the workspace"),
574
- skipCache: z__namespace.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
575
- directories: WorkspaceDirectoryConfigSchema,
576
- packageManager: z__namespace.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
577
- "The JavaScript/TypeScript package manager used by the repository"
578
- ),
579
- timezone: z__namespace.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
580
- locale: z__namespace.string().trim().default("en-US").describe("The default locale of the workspace"),
581
- logLevel: z__namespace.enum([
825
+ schemaRegistry.add(localeSchema, {
826
+ description: "The default locale of the workspace"
827
+ });
828
+ var logLevelSchema = z__namespace._default(
829
+ z__namespace.enum([
582
830
  "silent",
583
831
  "fatal",
584
832
  "error",
@@ -588,23 +836,65 @@ var stormWorkspaceConfigSchema = z__namespace.object({
588
836
  "debug",
589
837
  "trace",
590
838
  "all"
591
- ]).default("info").describe(
592
- "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`)."
593
- ),
594
- skipConfigLogging: z__namespace.boolean().optional().describe(
595
- "Should the logging of the current Storm Workspace configuration be skipped?"
596
- ),
597
- registry: RegistryConfigSchema,
598
- configFile: z__namespace.string().trim().nullable().default(null).describe(
599
- "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
600
- ),
601
- colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
602
- "Storm theme config values used for styling various package elements"
603
- ),
604
- extensions: z__namespace.record(z__namespace.string(), z__namespace.any()).optional().default({}).describe("Configuration of each used extension")
605
- }).describe(
606
- "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."
839
+ ]),
840
+ "info"
607
841
  );
842
+ schemaRegistry.add(logLevelSchema, {
843
+ 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`)."
844
+ });
845
+ var skipConfigLoggingSchema = z__namespace._default(z__namespace.boolean(), true);
846
+ schemaRegistry.add(skipConfigLoggingSchema, {
847
+ description: "Should the logging of the current Storm Workspace configuration be skipped?"
848
+ });
849
+ var configFileSchema = z__namespace._default(
850
+ z__namespace.nullable(z__namespace.string().check(z__namespace.trim())),
851
+ null
852
+ );
853
+ schemaRegistry.add(configFileSchema, {
854
+ description: "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
855
+ });
856
+ var extensionsSchema = z__namespace._default(z__namespace.record(z__namespace.string(), z__namespace.any()), {});
857
+ schemaRegistry.add(extensionsSchema, {
858
+ description: "Configuration of each used extension"
859
+ });
860
+ var workspaceConfigSchema = z__namespace.object({
861
+ $schema: schemaNameSchema,
862
+ extends: extendsSchema,
863
+ name: nameSchema,
864
+ namespace: namespaceSchema,
865
+ organization: orgSchema,
866
+ repository: repositorySchema,
867
+ license: licenseSchema,
868
+ homepage: homepageSchema,
869
+ docs: docsSchema,
870
+ portal: portalSchema,
871
+ licensing: licensingSchema,
872
+ contact: contactSchema,
873
+ support: supportSchema,
874
+ branch: branchSchema,
875
+ preid: preidSchema,
876
+ owner: ownerSchema,
877
+ bot: workspaceBotSchema,
878
+ release: workspaceReleaseSchema,
879
+ socials: workspaceSocialsSchema,
880
+ error: errorSchema,
881
+ mode: modeSchema,
882
+ workspaceRoot: workspaceRootSchema,
883
+ skipCache: skipCacheSchema,
884
+ directories: workspaceDirectorySchema,
885
+ packageManager: packageManagerSchema,
886
+ timezone: timezoneSchema,
887
+ locale: localeSchema,
888
+ logLevel: logLevelSchema,
889
+ skipConfigLogging: skipConfigLoggingSchema,
890
+ registry: registrySchema,
891
+ configFile: configFileSchema,
892
+ colors: z__namespace.union([colorsSchema, themeColorsSchema]),
893
+ extensions: extensionsSchema
894
+ });
895
+ schemaRegistry.add(extensionsSchema, {
896
+ 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."
897
+ });
608
898
 
609
899
  // ../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs
610
900
  function isPlainObject(value) {
@@ -1064,7 +1354,10 @@ var getConfigEnv = () => {
1064
1354
  email: process.env[`${prefix}BOT_EMAIL`] || void 0
1065
1355
  },
1066
1356
  release: {
1067
- banner: process.env[`${prefix}RELEASE_BANNER`] || void 0,
1357
+ banner: {
1358
+ url: process.env[`${prefix}RELEASE_BANNER_URL`] || void 0,
1359
+ alt: process.env[`${prefix}RELEASE_BANNER_ALT`] || void 0
1360
+ },
1068
1361
  header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
1069
1362
  footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
1070
1363
  },
@@ -1141,11 +1434,11 @@ var getConfigEnv = () => {
1141
1434
  );
1142
1435
  config.colors = themeNames.length > 0 ? themeNames.reduce(
1143
1436
  (ret, themeName) => {
1144
- ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
1437
+ ret[themeName] = getThemeColorsEnv(prefix, themeName);
1145
1438
  return ret;
1146
1439
  },
1147
1440
  {}
1148
- ) : getThemeColorConfigEnv(prefix);
1441
+ ) : getThemeColorsEnv(prefix);
1149
1442
  if (config.docs === STORM_DEFAULT_DOCS) {
1150
1443
  if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
1151
1444
  config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
@@ -1172,11 +1465,11 @@ var getConfigEnv = () => {
1172
1465
  }
1173
1466
  return config;
1174
1467
  };
1175
- var getThemeColorConfigEnv = (prefix, theme) => {
1468
+ var getThemeColorsEnv = (prefix, theme) => {
1176
1469
  const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
1177
- return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
1470
+ return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorsEnv(prefix + themeName) : getSingleThemeColorsEnv(prefix + themeName);
1178
1471
  };
1179
- var getSingleThemeColorConfigEnv = (prefix) => {
1472
+ var getSingleThemeColorsEnv = (prefix) => {
1180
1473
  const gradient = [];
1181
1474
  if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
1182
1475
  gradient.push(
@@ -1208,15 +1501,13 @@ var getSingleThemeColorConfigEnv = (prefix) => {
1208
1501
  gradient
1209
1502
  };
1210
1503
  };
1211
- var getMultiThemeColorConfigEnv = (prefix) => {
1504
+ var getMultiThemeColorsEnv = (prefix) => {
1212
1505
  return {
1213
- light: getBaseThemeColorConfigEnv(
1214
- `${prefix}_LIGHT_`
1215
- ),
1216
- dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
1506
+ light: getBaseThemeColorsEnv(`${prefix}_LIGHT_`),
1507
+ dark: getBaseThemeColorsEnv(`${prefix}_DARK_`)
1217
1508
  };
1218
1509
  };
1219
- var getBaseThemeColorConfigEnv = (prefix) => {
1510
+ var getBaseThemeColorsEnv = (prefix) => {
1220
1511
  const gradient = [];
1221
1512
  if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
1222
1513
  gradient.push(
@@ -1295,7 +1586,16 @@ var setConfigEnv = (config) => {
1295
1586
  process.env[`${prefix}ERROR_URL`] = config.error.url;
1296
1587
  }
1297
1588
  if (config.release) {
1298
- process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
1589
+ if (config.release.banner) {
1590
+ if (typeof config.release.banner === "string") {
1591
+ process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
1592
+ process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner;
1593
+ } else {
1594
+ process.env[`${prefix}RELEASE_BANNER`] = config.release.banner.url;
1595
+ process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner.url;
1596
+ process.env[`${prefix}RELEASE_BANNER_ALT`] = config.release.banner.alt;
1597
+ }
1598
+ }
1299
1599
  process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
1300
1600
  process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
1301
1601
  }
@@ -1438,10 +1738,10 @@ var setConfigEnv = (config) => {
1438
1738
  }
1439
1739
  if (config.colors?.base?.light || config.colors?.base?.dark) {
1440
1740
  for (const key of Object.keys(config.colors)) {
1441
- setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
1741
+ setThemeColorsEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
1442
1742
  }
1443
1743
  } else {
1444
- setThemeColorConfigEnv(
1744
+ setThemeColorsEnv(
1445
1745
  `${prefix}COLOR_`,
1446
1746
  config.colors
1447
1747
  );
@@ -1496,10 +1796,10 @@ var setConfigEnv = (config) => {
1496
1796
  }
1497
1797
  }
1498
1798
  };
1499
- var setThemeColorConfigEnv = (prefix, config) => {
1500
- return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
1799
+ var setThemeColorsEnv = (prefix, config) => {
1800
+ return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorsEnv(prefix, config) : setSingleThemeColorsEnv(prefix, config);
1501
1801
  };
1502
- var setSingleThemeColorConfigEnv = (prefix, config) => {
1802
+ var setSingleThemeColorsEnv = (prefix, config) => {
1503
1803
  if (config.dark) {
1504
1804
  process.env[`${prefix}DARK`] = config.dark;
1505
1805
  }
@@ -1548,13 +1848,13 @@ var setSingleThemeColorConfigEnv = (prefix, config) => {
1548
1848
  }
1549
1849
  }
1550
1850
  };
1551
- var setMultiThemeColorConfigEnv = (prefix, config) => {
1851
+ var setMultiThemeColorsEnv = (prefix, config) => {
1552
1852
  return {
1553
- light: setBaseThemeColorConfigEnv(`${prefix}LIGHT_`, config.light),
1554
- dark: setBaseThemeColorConfigEnv(`${prefix}DARK_`, config.dark)
1853
+ light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config.light),
1854
+ dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config.dark)
1555
1855
  };
1556
1856
  };
1557
- var setBaseThemeColorConfigEnv = (prefix, config) => {
1857
+ var setBaseThemeColorsEnv = (prefix, config) => {
1558
1858
  if (config.foreground) {
1559
1859
  process.env[`${prefix}FOREGROUND`] = config.foreground;
1560
1860
  }
@@ -1632,7 +1932,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
1632
1932
  );
1633
1933
  try {
1634
1934
  result = applyDefaultConfig(
1635
- await stormWorkspaceConfigSchema.parseAsync(configInput)
1935
+ await workspaceConfigSchema.parseAsync(configInput)
1636
1936
  );
1637
1937
  result.workspaceRoot ??= _workspaceRoot;
1638
1938
  } catch (error) {