@storm-software/projen 0.16.1 → 0.17.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.
- package/CHANGELOG.md +25 -0
- package/README.md +1 -2
- package/dist/{chunk-XMXNVGYL.mjs → chunk-2FTRAMI4.mjs} +549 -246
- package/dist/{chunk-LFXCWSER.js → chunk-YEKOAYG4.js} +550 -247
- package/dist/generators.js +2 -2
- package/dist/generators.mjs +1 -1
- package/dist/index.js +3 -3
- package/dist/index.mjs +1 -1
- package/dist/src/generators/init/generator.js +2 -2
- package/dist/src/generators/init/generator.mjs +1 -1
- package/package.json +2 -2
|
@@ -529,12 +529,8 @@ var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
|
529
529
|
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
530
530
|
var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
|
|
531
531
|
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
532
|
-
var STORM_DEFAULT_SOCIAL_TWITTER = "StormSoftwareHQ";
|
|
533
532
|
var STORM_DEFAULT_SOCIAL_DISCORD = "https://discord.gg/MQ6YVzakM5";
|
|
534
|
-
var STORM_DEFAULT_SOCIAL_TELEGRAM = "https://t.me/storm_software";
|
|
535
533
|
var STORM_DEFAULT_SOCIAL_SLACK = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
|
|
536
|
-
var STORM_DEFAULT_SOCIAL_MEDIUM = "https://medium.com/storm-software";
|
|
537
|
-
var STORM_DEFAULT_SOCIAL_GITHUB = "https://github.com/storm-software";
|
|
538
534
|
var STORM_DEFAULT_RELEASE_FOOTER = `
|
|
539
535
|
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.
|
|
540
536
|
|
|
@@ -543,238 +539,492 @@ Join us on [Discord](${STORM_DEFAULT_SOCIAL_DISCORD}) to chat with the team, rec
|
|
|
543
539
|
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!
|
|
544
540
|
`;
|
|
545
541
|
var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
|
|
542
|
+
var STORM_DEFAULT_BANNER_ALT = "The workspace's banner image";
|
|
546
543
|
|
|
547
544
|
// ../config/src/define-config.ts
|
|
548
545
|
init_esm_shims();
|
|
549
546
|
|
|
550
547
|
// ../config/src/schema.ts
|
|
551
548
|
init_esm_shims();
|
|
552
|
-
import * as z from "zod";
|
|
553
|
-
var
|
|
554
|
-
var
|
|
555
|
-
|
|
549
|
+
import * as z from "zod/mini";
|
|
550
|
+
var schemaRegistry = z.registry();
|
|
551
|
+
var colorSchema = z.string().check(
|
|
552
|
+
z.length(7),
|
|
553
|
+
z.toLowerCase(),
|
|
554
|
+
z.regex(/^#([0-9a-f]{3}){1,2}$/i),
|
|
555
|
+
z.trim()
|
|
556
556
|
);
|
|
557
|
-
|
|
558
|
-
"
|
|
557
|
+
schemaRegistry.add(colorSchema, {
|
|
558
|
+
description: "A base schema for describing the format of colors"
|
|
559
|
+
});
|
|
560
|
+
var darkColorSchema = z._default(colorSchema, "#151718");
|
|
561
|
+
schemaRegistry.add(darkColorSchema, {
|
|
562
|
+
description: "The dark background color of the workspace"
|
|
563
|
+
});
|
|
564
|
+
var lightColorSchema = z._default(colorSchema, "#cbd5e1");
|
|
565
|
+
schemaRegistry.add(lightColorSchema, {
|
|
566
|
+
description: "The light background color of the workspace"
|
|
567
|
+
});
|
|
568
|
+
var brandColorSchema = z._default(colorSchema, "#1fb2a6");
|
|
569
|
+
schemaRegistry.add(brandColorSchema, {
|
|
570
|
+
description: "The primary brand specific color of the workspace"
|
|
571
|
+
});
|
|
572
|
+
var alternateColorSchema = z.optional(colorSchema);
|
|
573
|
+
schemaRegistry.add(alternateColorSchema, {
|
|
574
|
+
description: "The alternate brand specific color of the workspace"
|
|
575
|
+
});
|
|
576
|
+
var accentColorSchema = z.optional(colorSchema);
|
|
577
|
+
schemaRegistry.add(accentColorSchema, {
|
|
578
|
+
description: "The secondary brand specific color of the workspace"
|
|
579
|
+
});
|
|
580
|
+
var linkColorSchema = z._default(colorSchema, "#3fa6ff");
|
|
581
|
+
schemaRegistry.add(linkColorSchema, {
|
|
582
|
+
description: "The color used to display hyperlink text"
|
|
583
|
+
});
|
|
584
|
+
var helpColorSchema = z._default(colorSchema, "#818cf8");
|
|
585
|
+
schemaRegistry.add(helpColorSchema, {
|
|
586
|
+
description: "The second brand specific color of the workspace"
|
|
587
|
+
});
|
|
588
|
+
var successColorSchema = z._default(colorSchema, "#45b27e");
|
|
589
|
+
schemaRegistry.add(successColorSchema, {
|
|
590
|
+
description: "The success color of the workspace"
|
|
591
|
+
});
|
|
592
|
+
var infoColorSchema = z._default(colorSchema, "#38bdf8");
|
|
593
|
+
schemaRegistry.add(infoColorSchema, {
|
|
594
|
+
description: "The informational color of the workspace"
|
|
595
|
+
});
|
|
596
|
+
var warningColorSchema = z._default(colorSchema, "#f3d371");
|
|
597
|
+
schemaRegistry.add(warningColorSchema, {
|
|
598
|
+
description: "The warning color of the workspace"
|
|
599
|
+
});
|
|
600
|
+
var dangerColorSchema = z._default(colorSchema, "#d8314a");
|
|
601
|
+
schemaRegistry.add(dangerColorSchema, {
|
|
602
|
+
description: "The danger color of the workspace"
|
|
603
|
+
});
|
|
604
|
+
var fatalColorSchema = z.optional(colorSchema);
|
|
605
|
+
schemaRegistry.add(fatalColorSchema, {
|
|
606
|
+
description: "The fatal color of the workspace"
|
|
607
|
+
});
|
|
608
|
+
var positiveColorSchema = z._default(colorSchema, "#4ade80");
|
|
609
|
+
schemaRegistry.add(positiveColorSchema, {
|
|
610
|
+
description: "The positive number color of the workspace"
|
|
611
|
+
});
|
|
612
|
+
var negativeColorSchema = z._default(colorSchema, "#ef4444");
|
|
613
|
+
schemaRegistry.add(negativeColorSchema, {
|
|
614
|
+
description: "The negative number color of the workspace"
|
|
615
|
+
});
|
|
616
|
+
var gradientStopsSchema = z.optional(z.array(colorSchema));
|
|
617
|
+
schemaRegistry.add(gradientStopsSchema, {
|
|
618
|
+
description: "The color stops for the base gradient color pattern used in the workspace"
|
|
619
|
+
});
|
|
620
|
+
var darkColorsSchema = z.object({
|
|
621
|
+
foreground: lightColorSchema,
|
|
622
|
+
background: darkColorSchema,
|
|
623
|
+
brand: brandColorSchema,
|
|
624
|
+
alternate: alternateColorSchema,
|
|
625
|
+
accent: accentColorSchema,
|
|
626
|
+
link: linkColorSchema,
|
|
627
|
+
help: helpColorSchema,
|
|
628
|
+
success: successColorSchema,
|
|
629
|
+
info: infoColorSchema,
|
|
630
|
+
warning: warningColorSchema,
|
|
631
|
+
danger: dangerColorSchema,
|
|
632
|
+
fatal: fatalColorSchema,
|
|
633
|
+
positive: positiveColorSchema,
|
|
634
|
+
negative: negativeColorSchema,
|
|
635
|
+
gradient: gradientStopsSchema
|
|
636
|
+
});
|
|
637
|
+
var lightColorsSchema = z.object({
|
|
638
|
+
foreground: darkColorSchema,
|
|
639
|
+
background: lightColorSchema,
|
|
640
|
+
brand: brandColorSchema,
|
|
641
|
+
alternate: alternateColorSchema,
|
|
642
|
+
accent: accentColorSchema,
|
|
643
|
+
link: linkColorSchema,
|
|
644
|
+
help: helpColorSchema,
|
|
645
|
+
success: successColorSchema,
|
|
646
|
+
info: infoColorSchema,
|
|
647
|
+
warning: warningColorSchema,
|
|
648
|
+
danger: dangerColorSchema,
|
|
649
|
+
fatal: fatalColorSchema,
|
|
650
|
+
positive: positiveColorSchema,
|
|
651
|
+
negative: negativeColorSchema,
|
|
652
|
+
gradient: gradientStopsSchema
|
|
653
|
+
});
|
|
654
|
+
var multiColorsSchema = z.object({
|
|
655
|
+
dark: darkColorsSchema,
|
|
656
|
+
light: lightColorsSchema
|
|
657
|
+
});
|
|
658
|
+
var singleColorsSchema = z.object({
|
|
659
|
+
dark: darkColorSchema,
|
|
660
|
+
light: lightColorSchema,
|
|
661
|
+
brand: brandColorSchema,
|
|
662
|
+
alternate: alternateColorSchema,
|
|
663
|
+
accent: accentColorSchema,
|
|
664
|
+
link: linkColorSchema,
|
|
665
|
+
help: helpColorSchema,
|
|
666
|
+
success: successColorSchema,
|
|
667
|
+
info: infoColorSchema,
|
|
668
|
+
warning: warningColorSchema,
|
|
669
|
+
danger: dangerColorSchema,
|
|
670
|
+
fatal: fatalColorSchema,
|
|
671
|
+
positive: positiveColorSchema,
|
|
672
|
+
negative: negativeColorSchema,
|
|
673
|
+
gradient: gradientStopsSchema
|
|
674
|
+
});
|
|
675
|
+
var registryUrlConfigSchema = z.optional(z.url());
|
|
676
|
+
schemaRegistry.add(registryUrlConfigSchema, {
|
|
677
|
+
description: "A remote registry URL used to publish distributable packages"
|
|
678
|
+
});
|
|
679
|
+
var registrySchema = z._default(
|
|
680
|
+
z.object({
|
|
681
|
+
github: registryUrlConfigSchema,
|
|
682
|
+
npm: registryUrlConfigSchema,
|
|
683
|
+
cargo: registryUrlConfigSchema,
|
|
684
|
+
cyclone: registryUrlConfigSchema,
|
|
685
|
+
container: registryUrlConfigSchema
|
|
686
|
+
}),
|
|
687
|
+
{}
|
|
559
688
|
);
|
|
560
|
-
|
|
561
|
-
"
|
|
689
|
+
schemaRegistry.add(registrySchema, {
|
|
690
|
+
description: "A list of remote registry URLs used by Storm Software"
|
|
691
|
+
});
|
|
692
|
+
var colorsSchema = z.union([singleColorsSchema, multiColorsSchema]);
|
|
693
|
+
schemaRegistry.add(colorsSchema, {
|
|
694
|
+
description: "Colors used for various workspace elements"
|
|
695
|
+
});
|
|
696
|
+
var themeColorsSchema = z.record(
|
|
697
|
+
z.union([z.union([z.literal("base"), z.string()]), z.string()]),
|
|
698
|
+
colorsSchema
|
|
562
699
|
);
|
|
563
|
-
|
|
564
|
-
"
|
|
700
|
+
schemaRegistry.add(themeColorsSchema, {
|
|
701
|
+
description: "Storm theme config values used for styling various package elements"
|
|
702
|
+
});
|
|
703
|
+
var extendsSchema = z.optional(
|
|
704
|
+
z.union([z.string().check(z.trim()), z.array(z.string().check(z.trim()))])
|
|
565
705
|
);
|
|
566
|
-
|
|
567
|
-
"The
|
|
706
|
+
schemaRegistry.add(extendsSchema, {
|
|
707
|
+
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."
|
|
708
|
+
});
|
|
709
|
+
var workspaceBotNameSchema = z.string().check(z.trim());
|
|
710
|
+
schemaRegistry.add(workspaceBotNameSchema, {
|
|
711
|
+
description: "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
|
|
712
|
+
});
|
|
713
|
+
var workspaceBotEmailSchema = z.string().check(z.trim());
|
|
714
|
+
schemaRegistry.add(workspaceBotEmailSchema, {
|
|
715
|
+
description: "The email of the workspace bot"
|
|
716
|
+
});
|
|
717
|
+
var workspaceBotSchema = z.object({
|
|
718
|
+
name: workspaceBotNameSchema,
|
|
719
|
+
email: workspaceBotEmailSchema
|
|
720
|
+
});
|
|
721
|
+
schemaRegistry.add(workspaceBotSchema, {
|
|
722
|
+
description: "The workspace's bot user's config used to automated various operations tasks"
|
|
723
|
+
});
|
|
724
|
+
var workspaceReleaseBannerUrlSchema = z.optional(
|
|
725
|
+
z.string().check(z.trim(), z.url())
|
|
568
726
|
);
|
|
569
|
-
|
|
570
|
-
"
|
|
727
|
+
schemaRegistry.add(workspaceReleaseBannerUrlSchema, {
|
|
728
|
+
description: "A URL to a banner image used to display the workspace's release"
|
|
729
|
+
});
|
|
730
|
+
var workspaceReleaseBannerAltSchema = z._default(
|
|
731
|
+
z.string().check(z.trim()),
|
|
732
|
+
STORM_DEFAULT_BANNER_ALT
|
|
571
733
|
);
|
|
572
|
-
|
|
573
|
-
"The
|
|
734
|
+
schemaRegistry.add(workspaceReleaseBannerAltSchema, {
|
|
735
|
+
description: "The alt text for the workspace's release banner image"
|
|
736
|
+
});
|
|
737
|
+
var workspaceReleaseBannerSchema = z.object({
|
|
738
|
+
url: workspaceReleaseBannerUrlSchema,
|
|
739
|
+
alt: workspaceReleaseBannerAltSchema
|
|
740
|
+
});
|
|
741
|
+
schemaRegistry.add(workspaceReleaseBannerSchema, {
|
|
742
|
+
description: "The workspace's banner image used during the release process"
|
|
743
|
+
});
|
|
744
|
+
var workspaceReleaseHeaderSchema = z.optional(
|
|
745
|
+
z.string().check(z.trim())
|
|
574
746
|
);
|
|
575
|
-
|
|
576
|
-
"
|
|
747
|
+
schemaRegistry.add(workspaceReleaseHeaderSchema, {
|
|
748
|
+
description: "A header message appended to the start of the workspace's release notes"
|
|
749
|
+
});
|
|
750
|
+
var workspaceReleaseFooterSchema = z.optional(
|
|
751
|
+
z.string().check(z.trim())
|
|
577
752
|
);
|
|
578
|
-
|
|
579
|
-
"
|
|
753
|
+
schemaRegistry.add(workspaceReleaseFooterSchema, {
|
|
754
|
+
description: "A footer message appended to the end of the workspace's release notes"
|
|
755
|
+
});
|
|
756
|
+
var workspaceReleaseSchema = z.object({
|
|
757
|
+
banner: z.union([
|
|
758
|
+
workspaceReleaseBannerSchema,
|
|
759
|
+
z.string().check(z.trim(), z.url())
|
|
760
|
+
]),
|
|
761
|
+
header: workspaceReleaseHeaderSchema,
|
|
762
|
+
footer: workspaceReleaseFooterSchema
|
|
763
|
+
});
|
|
764
|
+
schemaRegistry.add(workspaceReleaseSchema, {
|
|
765
|
+
description: "The workspace's release config used during the release process"
|
|
766
|
+
});
|
|
767
|
+
var workspaceSocialsTwitterSchema = z.optional(
|
|
768
|
+
z.string().check(z.trim())
|
|
580
769
|
);
|
|
581
|
-
|
|
582
|
-
"
|
|
770
|
+
schemaRegistry.add(workspaceSocialsTwitterSchema, {
|
|
771
|
+
description: "A Twitter/X account associated with the organization/project"
|
|
772
|
+
});
|
|
773
|
+
var workspaceSocialsDiscordSchema = z.optional(
|
|
774
|
+
z.string().check(z.trim())
|
|
583
775
|
);
|
|
584
|
-
|
|
585
|
-
"
|
|
776
|
+
schemaRegistry.add(workspaceSocialsDiscordSchema, {
|
|
777
|
+
description: "A Discord account associated with the organization/project"
|
|
778
|
+
});
|
|
779
|
+
var workspaceSocialsTelegramSchema = z.optional(
|
|
780
|
+
z.string().check(z.trim())
|
|
586
781
|
);
|
|
587
|
-
|
|
588
|
-
"
|
|
782
|
+
schemaRegistry.add(workspaceSocialsTelegramSchema, {
|
|
783
|
+
description: "A Telegram account associated with the organization/project"
|
|
784
|
+
});
|
|
785
|
+
var workspaceSocialsSlackSchema = z.optional(
|
|
786
|
+
z.string().check(z.trim())
|
|
589
787
|
);
|
|
590
|
-
|
|
591
|
-
"
|
|
788
|
+
schemaRegistry.add(workspaceSocialsSlackSchema, {
|
|
789
|
+
description: "A Slack account associated with the organization/project"
|
|
790
|
+
});
|
|
791
|
+
var workspaceSocialsMediumSchema = z.optional(
|
|
792
|
+
z.string().check(z.trim())
|
|
592
793
|
);
|
|
593
|
-
|
|
594
|
-
"
|
|
794
|
+
schemaRegistry.add(workspaceSocialsMediumSchema, {
|
|
795
|
+
description: "A Medium account associated with the organization/project"
|
|
796
|
+
});
|
|
797
|
+
var workspaceSocialsGithubSchema = z.optional(
|
|
798
|
+
z.string().check(z.trim())
|
|
595
799
|
);
|
|
596
|
-
|
|
597
|
-
"
|
|
800
|
+
schemaRegistry.add(workspaceSocialsGithubSchema, {
|
|
801
|
+
description: "A GitHub account associated with the organization/project"
|
|
802
|
+
});
|
|
803
|
+
var workspaceSocialsSchema = z.object({
|
|
804
|
+
twitter: workspaceSocialsTwitterSchema,
|
|
805
|
+
discord: workspaceSocialsDiscordSchema,
|
|
806
|
+
telegram: workspaceSocialsTelegramSchema,
|
|
807
|
+
slack: workspaceSocialsSlackSchema,
|
|
808
|
+
medium: workspaceSocialsMediumSchema,
|
|
809
|
+
github: workspaceSocialsGithubSchema
|
|
810
|
+
});
|
|
811
|
+
schemaRegistry.add(workspaceSocialsSchema, {
|
|
812
|
+
description: "The workspace's account config used to store various social media links"
|
|
813
|
+
});
|
|
814
|
+
var workspaceDirectoryCacheSchema = z.optional(
|
|
815
|
+
z.string().check(z.trim())
|
|
598
816
|
);
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
background: DarkColorSchema,
|
|
602
|
-
brand: BrandColorSchema,
|
|
603
|
-
alternate: AlternateColorSchema,
|
|
604
|
-
accent: AccentColorSchema,
|
|
605
|
-
link: LinkColorSchema,
|
|
606
|
-
help: HelpColorSchema,
|
|
607
|
-
success: SuccessColorSchema,
|
|
608
|
-
info: InfoColorSchema,
|
|
609
|
-
warning: WarningColorSchema,
|
|
610
|
-
danger: DangerColorSchema,
|
|
611
|
-
fatal: FatalColorSchema,
|
|
612
|
-
positive: PositiveColorSchema,
|
|
613
|
-
negative: NegativeColorSchema,
|
|
614
|
-
gradient: GradientStopsSchema
|
|
817
|
+
schemaRegistry.add(workspaceDirectoryCacheSchema, {
|
|
818
|
+
description: "The directory used to store the environment's cached file data"
|
|
615
819
|
});
|
|
616
|
-
var
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
accent: AccentColorSchema,
|
|
622
|
-
link: LinkColorSchema,
|
|
623
|
-
help: HelpColorSchema,
|
|
624
|
-
success: SuccessColorSchema,
|
|
625
|
-
info: InfoColorSchema,
|
|
626
|
-
warning: WarningColorSchema,
|
|
627
|
-
danger: DangerColorSchema,
|
|
628
|
-
fatal: FatalColorSchema,
|
|
629
|
-
positive: PositiveColorSchema,
|
|
630
|
-
negative: NegativeColorSchema,
|
|
631
|
-
gradient: GradientStopsSchema
|
|
820
|
+
var workspaceDirectoryDataSchema = z.optional(
|
|
821
|
+
z.string().check(z.trim())
|
|
822
|
+
);
|
|
823
|
+
schemaRegistry.add(workspaceDirectoryDataSchema, {
|
|
824
|
+
description: "The directory used to store the environment's data files"
|
|
632
825
|
});
|
|
633
|
-
var
|
|
634
|
-
|
|
635
|
-
|
|
826
|
+
var workspaceDirectoryConfigSchema = z.optional(
|
|
827
|
+
z.string().check(z.trim())
|
|
828
|
+
);
|
|
829
|
+
schemaRegistry.add(workspaceDirectoryConfigSchema, {
|
|
830
|
+
description: "The directory used to store the environment's configuration files"
|
|
636
831
|
});
|
|
637
|
-
var
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
accent: AccentColorSchema,
|
|
643
|
-
link: LinkColorSchema,
|
|
644
|
-
help: HelpColorSchema,
|
|
645
|
-
success: SuccessColorSchema,
|
|
646
|
-
info: InfoColorSchema,
|
|
647
|
-
warning: WarningColorSchema,
|
|
648
|
-
danger: DangerColorSchema,
|
|
649
|
-
fatal: FatalColorSchema,
|
|
650
|
-
positive: PositiveColorSchema,
|
|
651
|
-
negative: NegativeColorSchema,
|
|
652
|
-
gradient: GradientStopsSchema
|
|
832
|
+
var workspaceDirectoryTempSchema = z.optional(
|
|
833
|
+
z.string().check(z.trim())
|
|
834
|
+
);
|
|
835
|
+
schemaRegistry.add(workspaceDirectoryTempSchema, {
|
|
836
|
+
description: "The directory used to store the environment's temp files"
|
|
653
837
|
});
|
|
654
|
-
var
|
|
655
|
-
|
|
656
|
-
github: RegistryUrlConfigSchema,
|
|
657
|
-
npm: RegistryUrlConfigSchema,
|
|
658
|
-
cargo: RegistryUrlConfigSchema,
|
|
659
|
-
cyclone: RegistryUrlConfigSchema,
|
|
660
|
-
container: RegistryUrlConfigSchema
|
|
661
|
-
}).default({}).describe("A list of remote registry URLs used by Storm Software");
|
|
662
|
-
var ColorConfigSchema = SingleThemeColorConfigSchema.or(
|
|
663
|
-
MultiThemeColorConfigSchema
|
|
664
|
-
).describe("Colors used for various workspace elements");
|
|
665
|
-
var ColorConfigMapSchema = z.record(
|
|
666
|
-
z.union([z.literal("base"), z.string()]),
|
|
667
|
-
ColorConfigSchema
|
|
838
|
+
var workspaceDirectoryLogSchema = z.optional(
|
|
839
|
+
z.string().check(z.trim())
|
|
668
840
|
);
|
|
669
|
-
|
|
670
|
-
"The
|
|
841
|
+
schemaRegistry.add(workspaceDirectoryLogSchema, {
|
|
842
|
+
description: "The directory used to store the environment's log files"
|
|
843
|
+
});
|
|
844
|
+
var workspaceDirectoryBuildSchema = z._default(
|
|
845
|
+
z.string().check(z.trim()),
|
|
846
|
+
"dist"
|
|
671
847
|
);
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
)
|
|
675
|
-
|
|
848
|
+
schemaRegistry.add(workspaceDirectoryBuildSchema, {
|
|
849
|
+
description: "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
|
|
850
|
+
});
|
|
851
|
+
var workspaceDirectorySchema = z.object({
|
|
852
|
+
cache: workspaceDirectoryCacheSchema,
|
|
853
|
+
data: workspaceDirectoryDataSchema,
|
|
854
|
+
config: workspaceDirectoryConfigSchema,
|
|
855
|
+
temp: workspaceDirectoryTempSchema,
|
|
856
|
+
log: workspaceDirectoryLogSchema,
|
|
857
|
+
build: workspaceDirectoryBuildSchema
|
|
858
|
+
});
|
|
859
|
+
schemaRegistry.add(workspaceDirectorySchema, {
|
|
860
|
+
description: "Various directories used by the workspace to store data, cache, and configuration files"
|
|
861
|
+
});
|
|
862
|
+
var errorCodesFileSchema = z._default(
|
|
863
|
+
z.string().check(z.trim()),
|
|
864
|
+
STORM_DEFAULT_ERROR_CODES_FILE
|
|
676
865
|
);
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
866
|
+
schemaRegistry.add(errorCodesFileSchema, {
|
|
867
|
+
description: "The path to the workspace's error codes JSON file"
|
|
868
|
+
});
|
|
869
|
+
var errorUrlSchema = z.optional(z.url());
|
|
870
|
+
schemaRegistry.add(errorUrlSchema, {
|
|
871
|
+
description: "A URL to a page that looks up the workspace's error messages given a specific error code"
|
|
872
|
+
});
|
|
873
|
+
var errorSchema = z.object({
|
|
874
|
+
codesFile: errorCodesFileSchema,
|
|
875
|
+
url: errorUrlSchema
|
|
876
|
+
});
|
|
877
|
+
schemaRegistry.add(errorSchema, {
|
|
878
|
+
description: "The workspace's error config used when creating error details during a system error"
|
|
879
|
+
});
|
|
880
|
+
var organizationNameSchema = z.optional(
|
|
881
|
+
z.string().check(z.trim(), z.toLowerCase())
|
|
882
|
+
);
|
|
883
|
+
schemaRegistry.add(organizationNameSchema, {
|
|
884
|
+
description: "The name of the organization"
|
|
885
|
+
});
|
|
886
|
+
var organizationDescriptionSchema = z.optional(
|
|
887
|
+
z.string().check(z.trim())
|
|
888
|
+
);
|
|
889
|
+
schemaRegistry.add(organizationDescriptionSchema, {
|
|
890
|
+
description: "A description of the organization"
|
|
891
|
+
});
|
|
892
|
+
var organizationLogoSchema = z.optional(z.url());
|
|
893
|
+
schemaRegistry.add(organizationLogoSchema, {
|
|
894
|
+
description: "A URL to the organization's logo image"
|
|
895
|
+
});
|
|
896
|
+
var organizationIconSchema = z.optional(z.url());
|
|
897
|
+
schemaRegistry.add(organizationIconSchema, {
|
|
898
|
+
description: "A URL to the organization's icon image"
|
|
899
|
+
});
|
|
900
|
+
var organizationUrlSchema = z.optional(z.url());
|
|
901
|
+
schemaRegistry.add(organizationUrlSchema, {
|
|
902
|
+
description: "A URL to a page that provides more information about the organization"
|
|
903
|
+
});
|
|
904
|
+
var organizationSchema = z.object({
|
|
905
|
+
name: organizationNameSchema,
|
|
906
|
+
description: organizationDescriptionSchema,
|
|
907
|
+
logo: organizationLogoSchema,
|
|
908
|
+
icon: organizationIconSchema,
|
|
909
|
+
url: organizationUrlSchema
|
|
910
|
+
});
|
|
911
|
+
schemaRegistry.add(organizationSchema, {
|
|
912
|
+
description: "The workspace's organization details"
|
|
913
|
+
});
|
|
914
|
+
var schemaNameSchema = z._default(
|
|
915
|
+
z.string().check(z.trim(), z.toLowerCase()),
|
|
916
|
+
"https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
|
|
917
|
+
);
|
|
918
|
+
schemaRegistry.add(schemaNameSchema, {
|
|
919
|
+
description: "The URL or file path to the JSON schema file that describes the Storm configuration file"
|
|
920
|
+
});
|
|
921
|
+
var nameSchema = z.string().check(z.trim(), z.toLowerCase());
|
|
922
|
+
schemaRegistry.add(nameSchema, {
|
|
923
|
+
description: "The name of the workspace/project/service/package/scope using this configuration"
|
|
924
|
+
});
|
|
925
|
+
var namespaceSchema = z.string().check(z.trim(), z.toLowerCase());
|
|
926
|
+
schemaRegistry.add(namespaceSchema, {
|
|
927
|
+
description: "The namespace of the workspace/project/service/package/scope using this configuration"
|
|
928
|
+
});
|
|
929
|
+
var orgSchema = z.union([
|
|
930
|
+
organizationSchema,
|
|
931
|
+
z.string().check(z.trim(), z.toLowerCase())
|
|
932
|
+
]);
|
|
933
|
+
schemaRegistry.add(orgSchema, {
|
|
934
|
+
description: "The organization of the workspace. This can be a string or an object containing the organization's details"
|
|
935
|
+
});
|
|
936
|
+
var repositorySchema = z.string().check(z.trim(), z.toLowerCase());
|
|
937
|
+
schemaRegistry.add(repositorySchema, {
|
|
938
|
+
description: "The repo URL of the workspace (i.e. the GitHub repository URL)"
|
|
939
|
+
});
|
|
940
|
+
var licenseSchema = z._default(
|
|
941
|
+
z.string().check(z.trim()),
|
|
942
|
+
"Apache-2.0"
|
|
943
|
+
);
|
|
944
|
+
schemaRegistry.add(licenseSchema, {
|
|
945
|
+
description: "The license type of the package"
|
|
946
|
+
});
|
|
947
|
+
var homepageSchema = z.optional(z.url());
|
|
948
|
+
schemaRegistry.add(homepageSchema, {
|
|
949
|
+
description: "The homepage of the workspace"
|
|
950
|
+
});
|
|
951
|
+
var docsSchema = z.optional(z.url());
|
|
952
|
+
schemaRegistry.add(docsSchema, {
|
|
953
|
+
description: "The documentation site for the workspace"
|
|
954
|
+
});
|
|
955
|
+
var portalSchema = z.optional(z.url());
|
|
956
|
+
schemaRegistry.add(portalSchema, {
|
|
957
|
+
description: "The development portal site for the workspace"
|
|
958
|
+
});
|
|
959
|
+
var licensingSchema = z.optional(z.url());
|
|
960
|
+
schemaRegistry.add(licensingSchema, {
|
|
961
|
+
description: "The licensing site for the workspace"
|
|
962
|
+
});
|
|
963
|
+
var contactSchema = z.optional(z.url());
|
|
964
|
+
schemaRegistry.add(contactSchema, {
|
|
965
|
+
description: "The contact site for the workspace"
|
|
966
|
+
});
|
|
967
|
+
var supportSchema = z.optional(z.url());
|
|
968
|
+
schemaRegistry.add(supportSchema, {
|
|
969
|
+
description: "The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
970
|
+
});
|
|
971
|
+
var branchSchema = z._default(
|
|
972
|
+
z.string().check(z.trim(), z.toLowerCase()),
|
|
973
|
+
"main"
|
|
974
|
+
);
|
|
975
|
+
schemaRegistry.add(branchSchema, {
|
|
976
|
+
description: "The branch of the workspace"
|
|
977
|
+
});
|
|
978
|
+
var preidSchema = z.optional(
|
|
979
|
+
z.string().check(z.trim(), z.toLowerCase())
|
|
684
980
|
);
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
"A header message appended to the start of the workspace's release notes"
|
|
691
|
-
),
|
|
692
|
-
footer: z.string().trim().optional().describe(
|
|
693
|
-
"A footer message appended to the end of the workspace's release notes"
|
|
694
|
-
)
|
|
695
|
-
}).describe("The workspace's release config used during the release process");
|
|
696
|
-
var WorkspaceSocialsConfigSchema = z.object({
|
|
697
|
-
twitter: z.string().trim().default(STORM_DEFAULT_SOCIAL_TWITTER).describe("A Twitter/X account associated with the organization/project"),
|
|
698
|
-
discord: z.string().trim().default(STORM_DEFAULT_SOCIAL_DISCORD).describe("A Discord account associated with the organization/project"),
|
|
699
|
-
telegram: z.string().trim().default(STORM_DEFAULT_SOCIAL_TELEGRAM).describe("A Telegram account associated with the organization/project"),
|
|
700
|
-
slack: z.string().trim().default(STORM_DEFAULT_SOCIAL_SLACK).describe("A Slack account associated with the organization/project"),
|
|
701
|
-
medium: z.string().trim().default(STORM_DEFAULT_SOCIAL_MEDIUM).describe("A Medium account associated with the organization/project"),
|
|
702
|
-
github: z.string().trim().default(STORM_DEFAULT_SOCIAL_GITHUB).describe("A GitHub account associated with the organization/project")
|
|
703
|
-
}).describe(
|
|
704
|
-
"The workspace's account config used to store various social media links"
|
|
981
|
+
schemaRegistry.add(preidSchema, {
|
|
982
|
+
description: "A tag specifying the version pre-release identifier"
|
|
983
|
+
});
|
|
984
|
+
var ownerSchema = z.optional(
|
|
985
|
+
z.string().check(z.trim(), z.toLowerCase())
|
|
705
986
|
);
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
})
|
|
720
|
-
|
|
987
|
+
schemaRegistry.add(ownerSchema, {
|
|
988
|
+
description: "The owner of the package"
|
|
989
|
+
});
|
|
990
|
+
var modeSchema = z._default(
|
|
991
|
+
z.enum(["development", "staging", "production"]).check(z.trim(), z.toLowerCase()),
|
|
992
|
+
"production"
|
|
993
|
+
);
|
|
994
|
+
schemaRegistry.add(modeSchema, {
|
|
995
|
+
description: "The current runtime environment mode for the package"
|
|
996
|
+
});
|
|
997
|
+
var workspaceRootSchema = z.string().check(z.trim(), z.toLowerCase());
|
|
998
|
+
schemaRegistry.add(workspaceRootSchema, {
|
|
999
|
+
description: "The root directory of the workspace"
|
|
1000
|
+
});
|
|
1001
|
+
var skipCacheSchema = z._default(z.boolean(), false);
|
|
1002
|
+
schemaRegistry.add(skipCacheSchema, {
|
|
1003
|
+
description: "Should all known types of workspace caching be skipped?"
|
|
1004
|
+
});
|
|
1005
|
+
var packageManagerSchema = z._default(
|
|
1006
|
+
z.enum(["npm", "yarn", "pnpm", "bun"]),
|
|
1007
|
+
"npm"
|
|
1008
|
+
);
|
|
1009
|
+
schemaRegistry.add(packageManagerSchema, {
|
|
1010
|
+
description: "The JavaScript/TypeScript package manager used by the repository"
|
|
1011
|
+
});
|
|
1012
|
+
var timezoneSchema = z._default(
|
|
1013
|
+
z.string().check(z.trim(), z.toLowerCase()),
|
|
1014
|
+
"America/New_York"
|
|
1015
|
+
);
|
|
1016
|
+
schemaRegistry.add(timezoneSchema, {
|
|
1017
|
+
description: "The default timezone of the workspace"
|
|
1018
|
+
});
|
|
1019
|
+
var localeSchema = z._default(
|
|
1020
|
+
z.string().check(z.trim(), z.toLowerCase()),
|
|
1021
|
+
"en-US"
|
|
721
1022
|
);
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
}).describe("The workspace's error config used during the error process");
|
|
728
|
-
var organizationConfigSchema = z.object({
|
|
729
|
-
name: z.string().trim().describe("The name of the organization"),
|
|
730
|
-
description: z.string().trim().optional().describe("A description of the organization"),
|
|
731
|
-
logo: z.url().optional().describe("A URL to the organization's logo image"),
|
|
732
|
-
icon: z.url().optional().describe("A URL to the organization's icon image"),
|
|
733
|
-
url: z.url().optional().describe(
|
|
734
|
-
"A URL to a page that provides more information about the organization"
|
|
735
|
-
)
|
|
736
|
-
}).describe("The workspace's organization details");
|
|
737
|
-
var stormWorkspaceConfigSchema = z.object({
|
|
738
|
-
$schema: z.string().trim().default(
|
|
739
|
-
"https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
|
|
740
|
-
).describe(
|
|
741
|
-
"The URL or file path to the JSON schema file that describes the Storm configuration file"
|
|
742
|
-
),
|
|
743
|
-
extends: ExtendsSchema.optional(),
|
|
744
|
-
name: z.string().trim().toLowerCase().optional().describe(
|
|
745
|
-
"The name of the service/package/scope using this configuration"
|
|
746
|
-
),
|
|
747
|
-
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
748
|
-
organization: organizationConfigSchema.or(z.string().trim().describe("The organization of the workspace")).optional().describe(
|
|
749
|
-
"The organization of the workspace. This can be a string or an object containing the organization's details"
|
|
750
|
-
),
|
|
751
|
-
repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
752
|
-
license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
753
|
-
homepage: z.url().optional().describe("The homepage of the workspace"),
|
|
754
|
-
docs: z.url().optional().describe("The documentation site for the workspace"),
|
|
755
|
-
portal: z.url().optional().describe("The development portal site for the workspace"),
|
|
756
|
-
licensing: z.url().optional().describe("The licensing site for the workspace"),
|
|
757
|
-
contact: z.url().optional().describe("The contact site for the workspace"),
|
|
758
|
-
support: z.url().optional().describe(
|
|
759
|
-
"The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
760
|
-
),
|
|
761
|
-
branch: z.string().trim().default("main").describe("The branch of the workspace"),
|
|
762
|
-
preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
763
|
-
owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
764
|
-
bot: WorkspaceBotConfigSchema,
|
|
765
|
-
release: WorkspaceReleaseConfigSchema,
|
|
766
|
-
socials: WorkspaceSocialsConfigSchema,
|
|
767
|
-
error: errorConfigSchema,
|
|
768
|
-
mode: z.string().trim().default("production").describe("The current runtime environment mode for the package"),
|
|
769
|
-
workspaceRoot: z.string().trim().describe("The root directory of the workspace"),
|
|
770
|
-
skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
771
|
-
directories: WorkspaceDirectoryConfigSchema,
|
|
772
|
-
packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
|
|
773
|
-
"The JavaScript/TypeScript package manager used by the repository"
|
|
774
|
-
),
|
|
775
|
-
timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
776
|
-
locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
|
|
777
|
-
logLevel: z.enum([
|
|
1023
|
+
schemaRegistry.add(localeSchema, {
|
|
1024
|
+
description: "The default locale of the workspace"
|
|
1025
|
+
});
|
|
1026
|
+
var logLevelSchema = z._default(
|
|
1027
|
+
z.enum([
|
|
778
1028
|
"silent",
|
|
779
1029
|
"fatal",
|
|
780
1030
|
"error",
|
|
@@ -784,23 +1034,65 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
784
1034
|
"debug",
|
|
785
1035
|
"trace",
|
|
786
1036
|
"all"
|
|
787
|
-
])
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
extensions: z.record(z.string(), z.any()).optional().default({}).describe("Configuration of each used extension")
|
|
801
|
-
}).describe(
|
|
802
|
-
"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."
|
|
1037
|
+
]),
|
|
1038
|
+
"info"
|
|
1039
|
+
);
|
|
1040
|
+
schemaRegistry.add(logLevelSchema, {
|
|
1041
|
+
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`)."
|
|
1042
|
+
});
|
|
1043
|
+
var skipConfigLoggingSchema = z._default(z.boolean(), true);
|
|
1044
|
+
schemaRegistry.add(skipConfigLoggingSchema, {
|
|
1045
|
+
description: "Should the logging of the current Storm Workspace configuration be skipped?"
|
|
1046
|
+
});
|
|
1047
|
+
var configFileSchema = z._default(
|
|
1048
|
+
z.nullable(z.string().check(z.trim())),
|
|
1049
|
+
null
|
|
803
1050
|
);
|
|
1051
|
+
schemaRegistry.add(configFileSchema, {
|
|
1052
|
+
description: "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
|
|
1053
|
+
});
|
|
1054
|
+
var extensionsSchema = z._default(z.record(z.string(), z.any()), {});
|
|
1055
|
+
schemaRegistry.add(extensionsSchema, {
|
|
1056
|
+
description: "Configuration of each used extension"
|
|
1057
|
+
});
|
|
1058
|
+
var workspaceConfigSchema = z.object({
|
|
1059
|
+
$schema: schemaNameSchema,
|
|
1060
|
+
extends: extendsSchema,
|
|
1061
|
+
name: nameSchema,
|
|
1062
|
+
namespace: namespaceSchema,
|
|
1063
|
+
organization: orgSchema,
|
|
1064
|
+
repository: repositorySchema,
|
|
1065
|
+
license: licenseSchema,
|
|
1066
|
+
homepage: homepageSchema,
|
|
1067
|
+
docs: docsSchema,
|
|
1068
|
+
portal: portalSchema,
|
|
1069
|
+
licensing: licensingSchema,
|
|
1070
|
+
contact: contactSchema,
|
|
1071
|
+
support: supportSchema,
|
|
1072
|
+
branch: branchSchema,
|
|
1073
|
+
preid: preidSchema,
|
|
1074
|
+
owner: ownerSchema,
|
|
1075
|
+
bot: workspaceBotSchema,
|
|
1076
|
+
release: workspaceReleaseSchema,
|
|
1077
|
+
socials: workspaceSocialsSchema,
|
|
1078
|
+
error: errorSchema,
|
|
1079
|
+
mode: modeSchema,
|
|
1080
|
+
workspaceRoot: workspaceRootSchema,
|
|
1081
|
+
skipCache: skipCacheSchema,
|
|
1082
|
+
directories: workspaceDirectorySchema,
|
|
1083
|
+
packageManager: packageManagerSchema,
|
|
1084
|
+
timezone: timezoneSchema,
|
|
1085
|
+
locale: localeSchema,
|
|
1086
|
+
logLevel: logLevelSchema,
|
|
1087
|
+
skipConfigLogging: skipConfigLoggingSchema,
|
|
1088
|
+
registry: registrySchema,
|
|
1089
|
+
configFile: configFileSchema,
|
|
1090
|
+
colors: z.union([colorsSchema, themeColorsSchema]),
|
|
1091
|
+
extensions: extensionsSchema
|
|
1092
|
+
});
|
|
1093
|
+
schemaRegistry.add(extensionsSchema, {
|
|
1094
|
+
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."
|
|
1095
|
+
});
|
|
804
1096
|
|
|
805
1097
|
// ../config/src/types.ts
|
|
806
1098
|
init_esm_shims();
|
|
@@ -1015,7 +1307,10 @@ var getConfigEnv = () => {
|
|
|
1015
1307
|
email: process.env[`${prefix}BOT_EMAIL`] || void 0
|
|
1016
1308
|
},
|
|
1017
1309
|
release: {
|
|
1018
|
-
banner:
|
|
1310
|
+
banner: {
|
|
1311
|
+
url: process.env[`${prefix}RELEASE_BANNER_URL`] || void 0,
|
|
1312
|
+
alt: process.env[`${prefix}RELEASE_BANNER_ALT`] || void 0
|
|
1313
|
+
},
|
|
1019
1314
|
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
1020
1315
|
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
1021
1316
|
},
|
|
@@ -1092,11 +1387,11 @@ var getConfigEnv = () => {
|
|
|
1092
1387
|
);
|
|
1093
1388
|
config.colors = themeNames.length > 0 ? themeNames.reduce(
|
|
1094
1389
|
(ret, themeName) => {
|
|
1095
|
-
ret[themeName] =
|
|
1390
|
+
ret[themeName] = getThemeColorsEnv(prefix, themeName);
|
|
1096
1391
|
return ret;
|
|
1097
1392
|
},
|
|
1098
1393
|
{}
|
|
1099
|
-
) :
|
|
1394
|
+
) : getThemeColorsEnv(prefix);
|
|
1100
1395
|
if (config.docs === STORM_DEFAULT_DOCS) {
|
|
1101
1396
|
if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
1102
1397
|
config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
@@ -1123,11 +1418,11 @@ var getConfigEnv = () => {
|
|
|
1123
1418
|
}
|
|
1124
1419
|
return config;
|
|
1125
1420
|
};
|
|
1126
|
-
var
|
|
1421
|
+
var getThemeColorsEnv = (prefix, theme) => {
|
|
1127
1422
|
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
1128
|
-
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ?
|
|
1423
|
+
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorsEnv(prefix + themeName) : getSingleThemeColorsEnv(prefix + themeName);
|
|
1129
1424
|
};
|
|
1130
|
-
var
|
|
1425
|
+
var getSingleThemeColorsEnv = (prefix) => {
|
|
1131
1426
|
const gradient = [];
|
|
1132
1427
|
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
1133
1428
|
gradient.push(
|
|
@@ -1159,15 +1454,13 @@ var getSingleThemeColorConfigEnv = (prefix) => {
|
|
|
1159
1454
|
gradient
|
|
1160
1455
|
};
|
|
1161
1456
|
};
|
|
1162
|
-
var
|
|
1457
|
+
var getMultiThemeColorsEnv = (prefix) => {
|
|
1163
1458
|
return {
|
|
1164
|
-
light:
|
|
1165
|
-
|
|
1166
|
-
),
|
|
1167
|
-
dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
|
|
1459
|
+
light: getBaseThemeColorsEnv(`${prefix}_LIGHT_`),
|
|
1460
|
+
dark: getBaseThemeColorsEnv(`${prefix}_DARK_`)
|
|
1168
1461
|
};
|
|
1169
1462
|
};
|
|
1170
|
-
var
|
|
1463
|
+
var getBaseThemeColorsEnv = (prefix) => {
|
|
1171
1464
|
const gradient = [];
|
|
1172
1465
|
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
1173
1466
|
gradient.push(
|
|
@@ -1247,7 +1540,16 @@ var setConfigEnv = (config) => {
|
|
|
1247
1540
|
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
1248
1541
|
}
|
|
1249
1542
|
if (config.release) {
|
|
1250
|
-
|
|
1543
|
+
if (config.release.banner) {
|
|
1544
|
+
if (typeof config.release.banner === "string") {
|
|
1545
|
+
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
1546
|
+
process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner;
|
|
1547
|
+
} else {
|
|
1548
|
+
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner.url;
|
|
1549
|
+
process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner.url;
|
|
1550
|
+
process.env[`${prefix}RELEASE_BANNER_ALT`] = config.release.banner.alt;
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1251
1553
|
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
1252
1554
|
process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
|
|
1253
1555
|
}
|
|
@@ -1390,10 +1692,10 @@ var setConfigEnv = (config) => {
|
|
|
1390
1692
|
}
|
|
1391
1693
|
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
1392
1694
|
for (const key of Object.keys(config.colors)) {
|
|
1393
|
-
|
|
1695
|
+
setThemeColorsEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
1394
1696
|
}
|
|
1395
1697
|
} else {
|
|
1396
|
-
|
|
1698
|
+
setThemeColorsEnv(
|
|
1397
1699
|
`${prefix}COLOR_`,
|
|
1398
1700
|
config.colors
|
|
1399
1701
|
);
|
|
@@ -1448,10 +1750,10 @@ var setConfigEnv = (config) => {
|
|
|
1448
1750
|
}
|
|
1449
1751
|
}
|
|
1450
1752
|
};
|
|
1451
|
-
var
|
|
1452
|
-
return config?.light?.brand || config?.dark?.brand ?
|
|
1753
|
+
var setThemeColorsEnv = (prefix, config) => {
|
|
1754
|
+
return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorsEnv(prefix, config) : setSingleThemeColorsEnv(prefix, config);
|
|
1453
1755
|
};
|
|
1454
|
-
var
|
|
1756
|
+
var setSingleThemeColorsEnv = (prefix, config) => {
|
|
1455
1757
|
if (config.dark) {
|
|
1456
1758
|
process.env[`${prefix}DARK`] = config.dark;
|
|
1457
1759
|
}
|
|
@@ -1500,13 +1802,13 @@ var setSingleThemeColorConfigEnv = (prefix, config) => {
|
|
|
1500
1802
|
}
|
|
1501
1803
|
}
|
|
1502
1804
|
};
|
|
1503
|
-
var
|
|
1805
|
+
var setMultiThemeColorsEnv = (prefix, config) => {
|
|
1504
1806
|
return {
|
|
1505
|
-
light:
|
|
1506
|
-
dark:
|
|
1807
|
+
light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config.light),
|
|
1808
|
+
dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config.dark)
|
|
1507
1809
|
};
|
|
1508
1810
|
};
|
|
1509
|
-
var
|
|
1811
|
+
var setBaseThemeColorsEnv = (prefix, config) => {
|
|
1510
1812
|
if (config.foreground) {
|
|
1511
1813
|
process.env[`${prefix}FOREGROUND`] = config.foreground;
|
|
1512
1814
|
}
|
|
@@ -1587,7 +1889,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot3, s
|
|
|
1587
1889
|
);
|
|
1588
1890
|
try {
|
|
1589
1891
|
result = applyDefaultConfig(
|
|
1590
|
-
await
|
|
1892
|
+
await workspaceConfigSchema.parseAsync(configInput)
|
|
1591
1893
|
);
|
|
1592
1894
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1593
1895
|
} catch (error) {
|
|
@@ -3642,8 +3944,9 @@ async function configSchemaGeneratorFn(tree, options, config) {
|
|
|
3642
3944
|
`Determining the Storm Workspace Configuration JSON Schema...`,
|
|
3643
3945
|
config
|
|
3644
3946
|
);
|
|
3645
|
-
const jsonSchema = z2.toJSONSchema(
|
|
3646
|
-
target: "draft-7"
|
|
3947
|
+
const jsonSchema = z2.toJSONSchema(workspaceConfigSchema, {
|
|
3948
|
+
target: "draft-7",
|
|
3949
|
+
metadata: schemaRegistry
|
|
3647
3950
|
});
|
|
3648
3951
|
jsonSchema.$id ??= "https://public.storm-cdn.com/schemas/storm-workspace.schema.json";
|
|
3649
3952
|
jsonSchema.title ??= "Storm Workspace Configuration JSON Schema";
|