@storm-software/tsdown 0.36.73 → 0.38.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.
- package/README.md +2 -1
- package/dist/build.cjs +2 -2
- package/dist/build.js +1 -1
- package/dist/{chunk-AQ4RJKTQ.js → chunk-BMIDUIMZ.js} +550 -248
- package/dist/{chunk-7L7BKTGQ.cjs → chunk-F7XVI3XC.cjs} +550 -248
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/package.json +6 -6
|
@@ -517,12 +517,8 @@ var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
|
|
|
517
517
|
var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
|
|
518
518
|
var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
|
|
519
519
|
var STORM_DEFAULT_LICENSE = "Apache-2.0";
|
|
520
|
-
var STORM_DEFAULT_SOCIAL_TWITTER = "StormSoftwareHQ";
|
|
521
520
|
var STORM_DEFAULT_SOCIAL_DISCORD = "https://discord.gg/MQ6YVzakM5";
|
|
522
|
-
var STORM_DEFAULT_SOCIAL_TELEGRAM = "https://t.me/storm_software";
|
|
523
521
|
var STORM_DEFAULT_SOCIAL_SLACK = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
|
|
524
|
-
var STORM_DEFAULT_SOCIAL_MEDIUM = "https://medium.com/storm-software";
|
|
525
|
-
var STORM_DEFAULT_SOCIAL_GITHUB = "https://github.com/storm-software";
|
|
526
522
|
var STORM_DEFAULT_RELEASE_FOOTER = `
|
|
527
523
|
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.
|
|
528
524
|
|
|
@@ -531,234 +527,488 @@ Join us on [Discord](${STORM_DEFAULT_SOCIAL_DISCORD}) to chat with the team, rec
|
|
|
531
527
|
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!
|
|
532
528
|
`;
|
|
533
529
|
var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
|
|
530
|
+
var STORM_DEFAULT_BANNER_ALT = "The workspace's banner image";
|
|
534
531
|
|
|
535
532
|
// ../config/src/schema.ts
|
|
536
|
-
import * as z from "zod";
|
|
537
|
-
var
|
|
538
|
-
var
|
|
539
|
-
|
|
533
|
+
import * as z from "zod/mini";
|
|
534
|
+
var schemaRegistry = z.registry();
|
|
535
|
+
var colorSchema = z.string().check(
|
|
536
|
+
z.length(7),
|
|
537
|
+
z.toLowerCase(),
|
|
538
|
+
z.regex(/^#([0-9a-f]{3}){1,2}$/i),
|
|
539
|
+
z.trim()
|
|
540
540
|
);
|
|
541
|
-
|
|
542
|
-
"
|
|
541
|
+
schemaRegistry.add(colorSchema, {
|
|
542
|
+
description: "A base schema for describing the format of colors"
|
|
543
|
+
});
|
|
544
|
+
var darkColorSchema = z._default(colorSchema, "#151718");
|
|
545
|
+
schemaRegistry.add(darkColorSchema, {
|
|
546
|
+
description: "The dark background color of the workspace"
|
|
547
|
+
});
|
|
548
|
+
var lightColorSchema = z._default(colorSchema, "#cbd5e1");
|
|
549
|
+
schemaRegistry.add(lightColorSchema, {
|
|
550
|
+
description: "The light background color of the workspace"
|
|
551
|
+
});
|
|
552
|
+
var brandColorSchema = z._default(colorSchema, "#1fb2a6");
|
|
553
|
+
schemaRegistry.add(brandColorSchema, {
|
|
554
|
+
description: "The primary brand specific color of the workspace"
|
|
555
|
+
});
|
|
556
|
+
var alternateColorSchema = z.optional(colorSchema);
|
|
557
|
+
schemaRegistry.add(alternateColorSchema, {
|
|
558
|
+
description: "The alternate brand specific color of the workspace"
|
|
559
|
+
});
|
|
560
|
+
var accentColorSchema = z.optional(colorSchema);
|
|
561
|
+
schemaRegistry.add(accentColorSchema, {
|
|
562
|
+
description: "The secondary brand specific color of the workspace"
|
|
563
|
+
});
|
|
564
|
+
var linkColorSchema = z._default(colorSchema, "#3fa6ff");
|
|
565
|
+
schemaRegistry.add(linkColorSchema, {
|
|
566
|
+
description: "The color used to display hyperlink text"
|
|
567
|
+
});
|
|
568
|
+
var helpColorSchema = z._default(colorSchema, "#818cf8");
|
|
569
|
+
schemaRegistry.add(helpColorSchema, {
|
|
570
|
+
description: "The second brand specific color of the workspace"
|
|
571
|
+
});
|
|
572
|
+
var successColorSchema = z._default(colorSchema, "#45b27e");
|
|
573
|
+
schemaRegistry.add(successColorSchema, {
|
|
574
|
+
description: "The success color of the workspace"
|
|
575
|
+
});
|
|
576
|
+
var infoColorSchema = z._default(colorSchema, "#38bdf8");
|
|
577
|
+
schemaRegistry.add(infoColorSchema, {
|
|
578
|
+
description: "The informational color of the workspace"
|
|
579
|
+
});
|
|
580
|
+
var warningColorSchema = z._default(colorSchema, "#f3d371");
|
|
581
|
+
schemaRegistry.add(warningColorSchema, {
|
|
582
|
+
description: "The warning color of the workspace"
|
|
583
|
+
});
|
|
584
|
+
var dangerColorSchema = z._default(colorSchema, "#d8314a");
|
|
585
|
+
schemaRegistry.add(dangerColorSchema, {
|
|
586
|
+
description: "The danger color of the workspace"
|
|
587
|
+
});
|
|
588
|
+
var fatalColorSchema = z.optional(colorSchema);
|
|
589
|
+
schemaRegistry.add(fatalColorSchema, {
|
|
590
|
+
description: "The fatal color of the workspace"
|
|
591
|
+
});
|
|
592
|
+
var positiveColorSchema = z._default(colorSchema, "#4ade80");
|
|
593
|
+
schemaRegistry.add(positiveColorSchema, {
|
|
594
|
+
description: "The positive number color of the workspace"
|
|
595
|
+
});
|
|
596
|
+
var negativeColorSchema = z._default(colorSchema, "#ef4444");
|
|
597
|
+
schemaRegistry.add(negativeColorSchema, {
|
|
598
|
+
description: "The negative number color of the workspace"
|
|
599
|
+
});
|
|
600
|
+
var gradientStopsSchema = z.optional(z.array(colorSchema));
|
|
601
|
+
schemaRegistry.add(gradientStopsSchema, {
|
|
602
|
+
description: "The color stops for the base gradient color pattern used in the workspace"
|
|
603
|
+
});
|
|
604
|
+
var darkColorsSchema = z.object({
|
|
605
|
+
foreground: lightColorSchema,
|
|
606
|
+
background: darkColorSchema,
|
|
607
|
+
brand: brandColorSchema,
|
|
608
|
+
alternate: alternateColorSchema,
|
|
609
|
+
accent: accentColorSchema,
|
|
610
|
+
link: linkColorSchema,
|
|
611
|
+
help: helpColorSchema,
|
|
612
|
+
success: successColorSchema,
|
|
613
|
+
info: infoColorSchema,
|
|
614
|
+
warning: warningColorSchema,
|
|
615
|
+
danger: dangerColorSchema,
|
|
616
|
+
fatal: fatalColorSchema,
|
|
617
|
+
positive: positiveColorSchema,
|
|
618
|
+
negative: negativeColorSchema,
|
|
619
|
+
gradient: gradientStopsSchema
|
|
620
|
+
});
|
|
621
|
+
var lightColorsSchema = z.object({
|
|
622
|
+
foreground: darkColorSchema,
|
|
623
|
+
background: lightColorSchema,
|
|
624
|
+
brand: brandColorSchema,
|
|
625
|
+
alternate: alternateColorSchema,
|
|
626
|
+
accent: accentColorSchema,
|
|
627
|
+
link: linkColorSchema,
|
|
628
|
+
help: helpColorSchema,
|
|
629
|
+
success: successColorSchema,
|
|
630
|
+
info: infoColorSchema,
|
|
631
|
+
warning: warningColorSchema,
|
|
632
|
+
danger: dangerColorSchema,
|
|
633
|
+
fatal: fatalColorSchema,
|
|
634
|
+
positive: positiveColorSchema,
|
|
635
|
+
negative: negativeColorSchema,
|
|
636
|
+
gradient: gradientStopsSchema
|
|
637
|
+
});
|
|
638
|
+
var multiColorsSchema = z.object({
|
|
639
|
+
dark: darkColorsSchema,
|
|
640
|
+
light: lightColorsSchema
|
|
641
|
+
});
|
|
642
|
+
var singleColorsSchema = z.object({
|
|
643
|
+
dark: darkColorSchema,
|
|
644
|
+
light: lightColorSchema,
|
|
645
|
+
brand: brandColorSchema,
|
|
646
|
+
alternate: alternateColorSchema,
|
|
647
|
+
accent: accentColorSchema,
|
|
648
|
+
link: linkColorSchema,
|
|
649
|
+
help: helpColorSchema,
|
|
650
|
+
success: successColorSchema,
|
|
651
|
+
info: infoColorSchema,
|
|
652
|
+
warning: warningColorSchema,
|
|
653
|
+
danger: dangerColorSchema,
|
|
654
|
+
fatal: fatalColorSchema,
|
|
655
|
+
positive: positiveColorSchema,
|
|
656
|
+
negative: negativeColorSchema,
|
|
657
|
+
gradient: gradientStopsSchema
|
|
658
|
+
});
|
|
659
|
+
var registryUrlConfigSchema = z.optional(z.url());
|
|
660
|
+
schemaRegistry.add(registryUrlConfigSchema, {
|
|
661
|
+
description: "A remote registry URL used to publish distributable packages"
|
|
662
|
+
});
|
|
663
|
+
var registrySchema = z._default(
|
|
664
|
+
z.object({
|
|
665
|
+
github: registryUrlConfigSchema,
|
|
666
|
+
npm: registryUrlConfigSchema,
|
|
667
|
+
cargo: registryUrlConfigSchema,
|
|
668
|
+
cyclone: registryUrlConfigSchema,
|
|
669
|
+
container: registryUrlConfigSchema
|
|
670
|
+
}),
|
|
671
|
+
{}
|
|
672
|
+
);
|
|
673
|
+
schemaRegistry.add(registrySchema, {
|
|
674
|
+
description: "A list of remote registry URLs used by Storm Software"
|
|
675
|
+
});
|
|
676
|
+
var colorsSchema = z.union([singleColorsSchema, multiColorsSchema]);
|
|
677
|
+
schemaRegistry.add(colorsSchema, {
|
|
678
|
+
description: "Colors used for various workspace elements"
|
|
679
|
+
});
|
|
680
|
+
var themeColorsSchema = z.record(
|
|
681
|
+
z.union([z.union([z.literal("base"), z.string()]), z.string()]),
|
|
682
|
+
colorsSchema
|
|
683
|
+
);
|
|
684
|
+
schemaRegistry.add(themeColorsSchema, {
|
|
685
|
+
description: "Storm theme config values used for styling various package elements"
|
|
686
|
+
});
|
|
687
|
+
var extendsSchema = z.optional(
|
|
688
|
+
z.union([z.string().check(z.trim()), z.array(z.string().check(z.trim()))])
|
|
689
|
+
);
|
|
690
|
+
schemaRegistry.add(extendsSchema, {
|
|
691
|
+
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."
|
|
692
|
+
});
|
|
693
|
+
var workspaceBotNameSchema = z.string().check(z.trim());
|
|
694
|
+
schemaRegistry.add(workspaceBotNameSchema, {
|
|
695
|
+
description: "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
|
|
696
|
+
});
|
|
697
|
+
var workspaceBotEmailSchema = z.string().check(z.trim());
|
|
698
|
+
schemaRegistry.add(workspaceBotEmailSchema, {
|
|
699
|
+
description: "The email of the workspace bot"
|
|
700
|
+
});
|
|
701
|
+
var workspaceBotSchema = z.object({
|
|
702
|
+
name: workspaceBotNameSchema,
|
|
703
|
+
email: workspaceBotEmailSchema
|
|
704
|
+
});
|
|
705
|
+
schemaRegistry.add(workspaceBotSchema, {
|
|
706
|
+
description: "The workspace's bot user's config used to automated various operations tasks"
|
|
707
|
+
});
|
|
708
|
+
var workspaceReleaseBannerUrlSchema = z.optional(
|
|
709
|
+
z.string().check(z.trim(), z.url())
|
|
710
|
+
);
|
|
711
|
+
schemaRegistry.add(workspaceReleaseBannerUrlSchema, {
|
|
712
|
+
description: "A URL to a banner image used to display the workspace's release"
|
|
713
|
+
});
|
|
714
|
+
var workspaceReleaseBannerAltSchema = z._default(
|
|
715
|
+
z.string().check(z.trim()),
|
|
716
|
+
STORM_DEFAULT_BANNER_ALT
|
|
543
717
|
);
|
|
544
|
-
|
|
545
|
-
"The
|
|
718
|
+
schemaRegistry.add(workspaceReleaseBannerAltSchema, {
|
|
719
|
+
description: "The alt text for the workspace's release banner image"
|
|
720
|
+
});
|
|
721
|
+
var workspaceReleaseBannerSchema = z.object({
|
|
722
|
+
url: workspaceReleaseBannerUrlSchema,
|
|
723
|
+
alt: workspaceReleaseBannerAltSchema
|
|
724
|
+
});
|
|
725
|
+
schemaRegistry.add(workspaceReleaseBannerSchema, {
|
|
726
|
+
description: "The workspace's banner image used during the release process"
|
|
727
|
+
});
|
|
728
|
+
var workspaceReleaseHeaderSchema = z.optional(
|
|
729
|
+
z.string().check(z.trim())
|
|
546
730
|
);
|
|
547
|
-
|
|
548
|
-
"
|
|
731
|
+
schemaRegistry.add(workspaceReleaseHeaderSchema, {
|
|
732
|
+
description: "A header message appended to the start of the workspace's release notes"
|
|
733
|
+
});
|
|
734
|
+
var workspaceReleaseFooterSchema = z.optional(
|
|
735
|
+
z.string().check(z.trim())
|
|
736
|
+
);
|
|
737
|
+
schemaRegistry.add(workspaceReleaseFooterSchema, {
|
|
738
|
+
description: "A footer message appended to the end of the workspace's release notes"
|
|
739
|
+
});
|
|
740
|
+
var workspaceReleaseSchema = z.object({
|
|
741
|
+
banner: z.union([
|
|
742
|
+
workspaceReleaseBannerSchema,
|
|
743
|
+
z.string().check(z.trim(), z.url())
|
|
744
|
+
]),
|
|
745
|
+
header: workspaceReleaseHeaderSchema,
|
|
746
|
+
footer: workspaceReleaseFooterSchema
|
|
747
|
+
});
|
|
748
|
+
schemaRegistry.add(workspaceReleaseSchema, {
|
|
749
|
+
description: "The workspace's release config used during the release process"
|
|
750
|
+
});
|
|
751
|
+
var workspaceSocialsTwitterSchema = z.optional(
|
|
752
|
+
z.string().check(z.trim())
|
|
753
|
+
);
|
|
754
|
+
schemaRegistry.add(workspaceSocialsTwitterSchema, {
|
|
755
|
+
description: "A Twitter/X account associated with the organization/project"
|
|
756
|
+
});
|
|
757
|
+
var workspaceSocialsDiscordSchema = z.optional(
|
|
758
|
+
z.string().check(z.trim())
|
|
759
|
+
);
|
|
760
|
+
schemaRegistry.add(workspaceSocialsDiscordSchema, {
|
|
761
|
+
description: "A Discord account associated with the organization/project"
|
|
762
|
+
});
|
|
763
|
+
var workspaceSocialsTelegramSchema = z.optional(
|
|
764
|
+
z.string().check(z.trim())
|
|
765
|
+
);
|
|
766
|
+
schemaRegistry.add(workspaceSocialsTelegramSchema, {
|
|
767
|
+
description: "A Telegram account associated with the organization/project"
|
|
768
|
+
});
|
|
769
|
+
var workspaceSocialsSlackSchema = z.optional(
|
|
770
|
+
z.string().check(z.trim())
|
|
771
|
+
);
|
|
772
|
+
schemaRegistry.add(workspaceSocialsSlackSchema, {
|
|
773
|
+
description: "A Slack account associated with the organization/project"
|
|
774
|
+
});
|
|
775
|
+
var workspaceSocialsMediumSchema = z.optional(
|
|
776
|
+
z.string().check(z.trim())
|
|
777
|
+
);
|
|
778
|
+
schemaRegistry.add(workspaceSocialsMediumSchema, {
|
|
779
|
+
description: "A Medium account associated with the organization/project"
|
|
780
|
+
});
|
|
781
|
+
var workspaceSocialsGithubSchema = z.optional(
|
|
782
|
+
z.string().check(z.trim())
|
|
783
|
+
);
|
|
784
|
+
schemaRegistry.add(workspaceSocialsGithubSchema, {
|
|
785
|
+
description: "A GitHub account associated with the organization/project"
|
|
786
|
+
});
|
|
787
|
+
var workspaceSocialsSchema = z.object({
|
|
788
|
+
twitter: workspaceSocialsTwitterSchema,
|
|
789
|
+
discord: workspaceSocialsDiscordSchema,
|
|
790
|
+
telegram: workspaceSocialsTelegramSchema,
|
|
791
|
+
slack: workspaceSocialsSlackSchema,
|
|
792
|
+
medium: workspaceSocialsMediumSchema,
|
|
793
|
+
github: workspaceSocialsGithubSchema
|
|
794
|
+
});
|
|
795
|
+
schemaRegistry.add(workspaceSocialsSchema, {
|
|
796
|
+
description: "The workspace's account config used to store various social media links"
|
|
797
|
+
});
|
|
798
|
+
var workspaceDirectoryCacheSchema = z.optional(
|
|
799
|
+
z.string().check(z.trim())
|
|
549
800
|
);
|
|
550
|
-
|
|
551
|
-
"The
|
|
801
|
+
schemaRegistry.add(workspaceDirectoryCacheSchema, {
|
|
802
|
+
description: "The directory used to store the environment's cached file data"
|
|
803
|
+
});
|
|
804
|
+
var workspaceDirectoryDataSchema = z.optional(
|
|
805
|
+
z.string().check(z.trim())
|
|
552
806
|
);
|
|
553
|
-
|
|
554
|
-
"The
|
|
807
|
+
schemaRegistry.add(workspaceDirectoryDataSchema, {
|
|
808
|
+
description: "The directory used to store the environment's data files"
|
|
809
|
+
});
|
|
810
|
+
var workspaceDirectoryConfigSchema = z.optional(
|
|
811
|
+
z.string().check(z.trim())
|
|
555
812
|
);
|
|
556
|
-
|
|
557
|
-
"The
|
|
813
|
+
schemaRegistry.add(workspaceDirectoryConfigSchema, {
|
|
814
|
+
description: "The directory used to store the environment's configuration files"
|
|
815
|
+
});
|
|
816
|
+
var workspaceDirectoryTempSchema = z.optional(
|
|
817
|
+
z.string().check(z.trim())
|
|
558
818
|
);
|
|
559
|
-
|
|
560
|
-
"The
|
|
819
|
+
schemaRegistry.add(workspaceDirectoryTempSchema, {
|
|
820
|
+
description: "The directory used to store the environment's temp files"
|
|
821
|
+
});
|
|
822
|
+
var workspaceDirectoryLogSchema = z.optional(
|
|
823
|
+
z.string().check(z.trim())
|
|
561
824
|
);
|
|
562
|
-
|
|
563
|
-
"The
|
|
825
|
+
schemaRegistry.add(workspaceDirectoryLogSchema, {
|
|
826
|
+
description: "The directory used to store the environment's log files"
|
|
827
|
+
});
|
|
828
|
+
var workspaceDirectoryBuildSchema = z._default(
|
|
829
|
+
z.string().check(z.trim()),
|
|
830
|
+
"dist"
|
|
564
831
|
);
|
|
565
|
-
|
|
566
|
-
"The
|
|
832
|
+
schemaRegistry.add(workspaceDirectoryBuildSchema, {
|
|
833
|
+
description: "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
|
|
834
|
+
});
|
|
835
|
+
var workspaceDirectorySchema = z.object({
|
|
836
|
+
cache: workspaceDirectoryCacheSchema,
|
|
837
|
+
data: workspaceDirectoryDataSchema,
|
|
838
|
+
config: workspaceDirectoryConfigSchema,
|
|
839
|
+
temp: workspaceDirectoryTempSchema,
|
|
840
|
+
log: workspaceDirectoryLogSchema,
|
|
841
|
+
build: workspaceDirectoryBuildSchema
|
|
842
|
+
});
|
|
843
|
+
schemaRegistry.add(workspaceDirectorySchema, {
|
|
844
|
+
description: "Various directories used by the workspace to store data, cache, and configuration files"
|
|
845
|
+
});
|
|
846
|
+
var errorCodesFileSchema = z._default(
|
|
847
|
+
z.string().check(z.trim()),
|
|
848
|
+
STORM_DEFAULT_ERROR_CODES_FILE
|
|
567
849
|
);
|
|
568
|
-
|
|
569
|
-
"The
|
|
850
|
+
schemaRegistry.add(errorCodesFileSchema, {
|
|
851
|
+
description: "The path to the workspace's error codes JSON file"
|
|
852
|
+
});
|
|
853
|
+
var errorUrlSchema = z.optional(z.url());
|
|
854
|
+
schemaRegistry.add(errorUrlSchema, {
|
|
855
|
+
description: "A URL to a page that looks up the workspace's error messages given a specific error code"
|
|
856
|
+
});
|
|
857
|
+
var errorSchema = z.object({
|
|
858
|
+
codesFile: errorCodesFileSchema,
|
|
859
|
+
url: errorUrlSchema
|
|
860
|
+
});
|
|
861
|
+
schemaRegistry.add(errorSchema, {
|
|
862
|
+
description: "The workspace's error config used when creating error details during a system error"
|
|
863
|
+
});
|
|
864
|
+
var organizationNameSchema = z.optional(
|
|
865
|
+
z.string().check(z.trim(), z.toLowerCase())
|
|
570
866
|
);
|
|
571
|
-
|
|
572
|
-
"The
|
|
867
|
+
schemaRegistry.add(organizationNameSchema, {
|
|
868
|
+
description: "The name of the organization"
|
|
869
|
+
});
|
|
870
|
+
var organizationDescriptionSchema = z.optional(
|
|
871
|
+
z.string().check(z.trim())
|
|
573
872
|
);
|
|
574
|
-
|
|
575
|
-
"
|
|
873
|
+
schemaRegistry.add(organizationDescriptionSchema, {
|
|
874
|
+
description: "A description of the organization"
|
|
875
|
+
});
|
|
876
|
+
var organizationLogoSchema = z.optional(z.url());
|
|
877
|
+
schemaRegistry.add(organizationLogoSchema, {
|
|
878
|
+
description: "A URL to the organization's logo image"
|
|
879
|
+
});
|
|
880
|
+
var organizationIconSchema = z.optional(z.url());
|
|
881
|
+
schemaRegistry.add(organizationIconSchema, {
|
|
882
|
+
description: "A URL to the organization's icon image"
|
|
883
|
+
});
|
|
884
|
+
var organizationUrlSchema = z.optional(z.url());
|
|
885
|
+
schemaRegistry.add(organizationUrlSchema, {
|
|
886
|
+
description: "A URL to a page that provides more information about the organization"
|
|
887
|
+
});
|
|
888
|
+
var organizationSchema = z.object({
|
|
889
|
+
name: organizationNameSchema,
|
|
890
|
+
description: organizationDescriptionSchema,
|
|
891
|
+
logo: organizationLogoSchema,
|
|
892
|
+
icon: organizationIconSchema,
|
|
893
|
+
url: organizationUrlSchema
|
|
894
|
+
});
|
|
895
|
+
schemaRegistry.add(organizationSchema, {
|
|
896
|
+
description: "The workspace's organization details"
|
|
897
|
+
});
|
|
898
|
+
var schemaNameSchema = z._default(
|
|
899
|
+
z.string().check(z.trim(), z.toLowerCase()),
|
|
900
|
+
"https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
|
|
576
901
|
);
|
|
577
|
-
|
|
578
|
-
"The
|
|
902
|
+
schemaRegistry.add(schemaNameSchema, {
|
|
903
|
+
description: "The URL or file path to the JSON schema file that describes the Storm configuration file"
|
|
904
|
+
});
|
|
905
|
+
var nameSchema = z.string().check(z.trim(), z.toLowerCase());
|
|
906
|
+
schemaRegistry.add(nameSchema, {
|
|
907
|
+
description: "The name of the workspace/project/service/package/scope using this configuration"
|
|
908
|
+
});
|
|
909
|
+
var namespaceSchema = z.string().check(z.trim(), z.toLowerCase());
|
|
910
|
+
schemaRegistry.add(namespaceSchema, {
|
|
911
|
+
description: "The namespace of the workspace/project/service/package/scope using this configuration"
|
|
912
|
+
});
|
|
913
|
+
var orgSchema = z.union([
|
|
914
|
+
organizationSchema,
|
|
915
|
+
z.string().check(z.trim(), z.toLowerCase())
|
|
916
|
+
]);
|
|
917
|
+
schemaRegistry.add(orgSchema, {
|
|
918
|
+
description: "The organization of the workspace. This can be a string or an object containing the organization's details"
|
|
919
|
+
});
|
|
920
|
+
var repositorySchema = z.string().check(z.trim(), z.toLowerCase());
|
|
921
|
+
schemaRegistry.add(repositorySchema, {
|
|
922
|
+
description: "The repo URL of the workspace (i.e. the GitHub repository URL)"
|
|
923
|
+
});
|
|
924
|
+
var licenseSchema = z._default(
|
|
925
|
+
z.string().check(z.trim()),
|
|
926
|
+
"Apache-2.0"
|
|
579
927
|
);
|
|
580
|
-
|
|
581
|
-
"The
|
|
928
|
+
schemaRegistry.add(licenseSchema, {
|
|
929
|
+
description: "The license type of the package"
|
|
930
|
+
});
|
|
931
|
+
var homepageSchema = z.optional(z.url());
|
|
932
|
+
schemaRegistry.add(homepageSchema, {
|
|
933
|
+
description: "The homepage of the workspace"
|
|
934
|
+
});
|
|
935
|
+
var docsSchema = z.optional(z.url());
|
|
936
|
+
schemaRegistry.add(docsSchema, {
|
|
937
|
+
description: "The documentation site for the workspace"
|
|
938
|
+
});
|
|
939
|
+
var portalSchema = z.optional(z.url());
|
|
940
|
+
schemaRegistry.add(portalSchema, {
|
|
941
|
+
description: "The development portal site for the workspace"
|
|
942
|
+
});
|
|
943
|
+
var licensingSchema = z.optional(z.url());
|
|
944
|
+
schemaRegistry.add(licensingSchema, {
|
|
945
|
+
description: "The licensing site for the workspace"
|
|
946
|
+
});
|
|
947
|
+
var contactSchema = z.optional(z.url());
|
|
948
|
+
schemaRegistry.add(contactSchema, {
|
|
949
|
+
description: "The contact site for the workspace"
|
|
950
|
+
});
|
|
951
|
+
var supportSchema = z.optional(z.url());
|
|
952
|
+
schemaRegistry.add(supportSchema, {
|
|
953
|
+
description: "The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
954
|
+
});
|
|
955
|
+
var branchSchema = z._default(
|
|
956
|
+
z.string().check(z.trim(), z.toLowerCase()),
|
|
957
|
+
"main"
|
|
582
958
|
);
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
accent: AccentColorSchema,
|
|
589
|
-
link: LinkColorSchema,
|
|
590
|
-
help: HelpColorSchema,
|
|
591
|
-
success: SuccessColorSchema,
|
|
592
|
-
info: InfoColorSchema,
|
|
593
|
-
warning: WarningColorSchema,
|
|
594
|
-
danger: DangerColorSchema,
|
|
595
|
-
fatal: FatalColorSchema,
|
|
596
|
-
positive: PositiveColorSchema,
|
|
597
|
-
negative: NegativeColorSchema,
|
|
598
|
-
gradient: GradientStopsSchema
|
|
599
|
-
});
|
|
600
|
-
var LightThemeColorConfigSchema = z.object({
|
|
601
|
-
foreground: DarkColorSchema,
|
|
602
|
-
background: LightColorSchema,
|
|
603
|
-
brand: BrandColorSchema,
|
|
604
|
-
alternate: AlternateColorSchema,
|
|
605
|
-
accent: AccentColorSchema,
|
|
606
|
-
link: LinkColorSchema,
|
|
607
|
-
help: HelpColorSchema,
|
|
608
|
-
success: SuccessColorSchema,
|
|
609
|
-
info: InfoColorSchema,
|
|
610
|
-
warning: WarningColorSchema,
|
|
611
|
-
danger: DangerColorSchema,
|
|
612
|
-
fatal: FatalColorSchema,
|
|
613
|
-
positive: PositiveColorSchema,
|
|
614
|
-
negative: NegativeColorSchema,
|
|
615
|
-
gradient: GradientStopsSchema
|
|
616
|
-
});
|
|
617
|
-
var MultiThemeColorConfigSchema = z.object({
|
|
618
|
-
dark: DarkThemeColorConfigSchema,
|
|
619
|
-
light: LightThemeColorConfigSchema
|
|
620
|
-
});
|
|
621
|
-
var SingleThemeColorConfigSchema = z.object({
|
|
622
|
-
dark: DarkColorSchema,
|
|
623
|
-
light: LightColorSchema,
|
|
624
|
-
brand: BrandColorSchema,
|
|
625
|
-
alternate: AlternateColorSchema,
|
|
626
|
-
accent: AccentColorSchema,
|
|
627
|
-
link: LinkColorSchema,
|
|
628
|
-
help: HelpColorSchema,
|
|
629
|
-
success: SuccessColorSchema,
|
|
630
|
-
info: InfoColorSchema,
|
|
631
|
-
warning: WarningColorSchema,
|
|
632
|
-
danger: DangerColorSchema,
|
|
633
|
-
fatal: FatalColorSchema,
|
|
634
|
-
positive: PositiveColorSchema,
|
|
635
|
-
negative: NegativeColorSchema,
|
|
636
|
-
gradient: GradientStopsSchema
|
|
637
|
-
});
|
|
638
|
-
var RegistryUrlConfigSchema = z.url().optional().describe("A remote registry URL used to publish distributable packages");
|
|
639
|
-
var RegistryConfigSchema = z.object({
|
|
640
|
-
github: RegistryUrlConfigSchema,
|
|
641
|
-
npm: RegistryUrlConfigSchema,
|
|
642
|
-
cargo: RegistryUrlConfigSchema,
|
|
643
|
-
cyclone: RegistryUrlConfigSchema,
|
|
644
|
-
container: RegistryUrlConfigSchema
|
|
645
|
-
}).default({}).describe("A list of remote registry URLs used by Storm Software");
|
|
646
|
-
var ColorConfigSchema = SingleThemeColorConfigSchema.or(
|
|
647
|
-
MultiThemeColorConfigSchema
|
|
648
|
-
).describe("Colors used for various workspace elements");
|
|
649
|
-
var ColorConfigMapSchema = z.record(
|
|
650
|
-
z.union([z.literal("base"), z.string()]),
|
|
651
|
-
ColorConfigSchema
|
|
959
|
+
schemaRegistry.add(branchSchema, {
|
|
960
|
+
description: "The branch of the workspace"
|
|
961
|
+
});
|
|
962
|
+
var preidSchema = z.optional(
|
|
963
|
+
z.string().check(z.trim(), z.toLowerCase())
|
|
652
964
|
);
|
|
653
|
-
|
|
654
|
-
"
|
|
965
|
+
schemaRegistry.add(preidSchema, {
|
|
966
|
+
description: "A tag specifying the version pre-release identifier"
|
|
967
|
+
});
|
|
968
|
+
var ownerSchema = z.optional(
|
|
969
|
+
z.string().check(z.trim(), z.toLowerCase())
|
|
655
970
|
);
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
)
|
|
659
|
-
|
|
971
|
+
schemaRegistry.add(ownerSchema, {
|
|
972
|
+
description: "The owner of the package"
|
|
973
|
+
});
|
|
974
|
+
var modeSchema = z._default(
|
|
975
|
+
z.enum(["development", "staging", "production"]).check(z.trim(), z.toLowerCase()),
|
|
976
|
+
"production"
|
|
660
977
|
);
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
978
|
+
schemaRegistry.add(modeSchema, {
|
|
979
|
+
description: "The current runtime environment mode for the package"
|
|
980
|
+
});
|
|
981
|
+
var workspaceRootSchema = z.string().check(z.trim(), z.toLowerCase());
|
|
982
|
+
schemaRegistry.add(workspaceRootSchema, {
|
|
983
|
+
description: "The root directory of the workspace"
|
|
984
|
+
});
|
|
985
|
+
var skipCacheSchema = z._default(z.boolean(), false);
|
|
986
|
+
schemaRegistry.add(skipCacheSchema, {
|
|
987
|
+
description: "Should all known types of workspace caching be skipped?"
|
|
988
|
+
});
|
|
989
|
+
var packageManagerSchema = z._default(
|
|
990
|
+
z.enum(["npm", "yarn", "pnpm", "bun"]),
|
|
991
|
+
"npm"
|
|
668
992
|
);
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
),
|
|
676
|
-
footer: z.string().trim().optional().describe(
|
|
677
|
-
"A footer message appended to the end of the workspace's release notes"
|
|
678
|
-
)
|
|
679
|
-
}).describe("The workspace's release config used during the release process");
|
|
680
|
-
var WorkspaceSocialsConfigSchema = z.object({
|
|
681
|
-
twitter: z.string().trim().default(STORM_DEFAULT_SOCIAL_TWITTER).describe("A Twitter/X account associated with the organization/project"),
|
|
682
|
-
discord: z.string().trim().default(STORM_DEFAULT_SOCIAL_DISCORD).describe("A Discord account associated with the organization/project"),
|
|
683
|
-
telegram: z.string().trim().default(STORM_DEFAULT_SOCIAL_TELEGRAM).describe("A Telegram account associated with the organization/project"),
|
|
684
|
-
slack: z.string().trim().default(STORM_DEFAULT_SOCIAL_SLACK).describe("A Slack account associated with the organization/project"),
|
|
685
|
-
medium: z.string().trim().default(STORM_DEFAULT_SOCIAL_MEDIUM).describe("A Medium account associated with the organization/project"),
|
|
686
|
-
github: z.string().trim().default(STORM_DEFAULT_SOCIAL_GITHUB).describe("A GitHub account associated with the organization/project")
|
|
687
|
-
}).describe(
|
|
688
|
-
"The workspace's account config used to store various social media links"
|
|
993
|
+
schemaRegistry.add(packageManagerSchema, {
|
|
994
|
+
description: "The JavaScript/TypeScript package manager used by the repository"
|
|
995
|
+
});
|
|
996
|
+
var timezoneSchema = z._default(
|
|
997
|
+
z.string().check(z.trim(), z.toLowerCase()),
|
|
998
|
+
"America/New_York"
|
|
689
999
|
);
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
"The directory used to store the environment's configuration files"
|
|
697
|
-
),
|
|
698
|
-
temp: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
699
|
-
log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
|
|
700
|
-
build: z.string().trim().default("dist").describe(
|
|
701
|
-
"The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
|
|
702
|
-
)
|
|
703
|
-
}).describe(
|
|
704
|
-
"Various directories used by the workspace to store data, cache, and configuration files"
|
|
1000
|
+
schemaRegistry.add(timezoneSchema, {
|
|
1001
|
+
description: "The default timezone of the workspace"
|
|
1002
|
+
});
|
|
1003
|
+
var localeSchema = z._default(
|
|
1004
|
+
z.string().check(z.trim(), z.toLowerCase()),
|
|
1005
|
+
"en-US"
|
|
705
1006
|
);
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
}).describe("The workspace's error config used during the error process");
|
|
712
|
-
var organizationConfigSchema = z.object({
|
|
713
|
-
name: z.string().trim().describe("The name of the organization"),
|
|
714
|
-
description: z.string().trim().optional().describe("A description of the organization"),
|
|
715
|
-
logo: z.url().optional().describe("A URL to the organization's logo image"),
|
|
716
|
-
icon: z.url().optional().describe("A URL to the organization's icon image"),
|
|
717
|
-
url: z.url().optional().describe(
|
|
718
|
-
"A URL to a page that provides more information about the organization"
|
|
719
|
-
)
|
|
720
|
-
}).describe("The workspace's organization details");
|
|
721
|
-
var stormWorkspaceConfigSchema = z.object({
|
|
722
|
-
$schema: z.string().trim().default(
|
|
723
|
-
"https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
|
|
724
|
-
).describe(
|
|
725
|
-
"The URL or file path to the JSON schema file that describes the Storm configuration file"
|
|
726
|
-
),
|
|
727
|
-
extends: ExtendsSchema.optional(),
|
|
728
|
-
name: z.string().trim().toLowerCase().optional().describe(
|
|
729
|
-
"The name of the service/package/scope using this configuration"
|
|
730
|
-
),
|
|
731
|
-
namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
|
|
732
|
-
organization: organizationConfigSchema.or(z.string().trim().describe("The organization of the workspace")).optional().describe(
|
|
733
|
-
"The organization of the workspace. This can be a string or an object containing the organization's details"
|
|
734
|
-
),
|
|
735
|
-
repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
|
|
736
|
-
license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
|
|
737
|
-
homepage: z.url().optional().describe("The homepage of the workspace"),
|
|
738
|
-
docs: z.url().optional().describe("The documentation site for the workspace"),
|
|
739
|
-
portal: z.url().optional().describe("The development portal site for the workspace"),
|
|
740
|
-
licensing: z.url().optional().describe("The licensing site for the workspace"),
|
|
741
|
-
contact: z.url().optional().describe("The contact site for the workspace"),
|
|
742
|
-
support: z.url().optional().describe(
|
|
743
|
-
"The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
|
|
744
|
-
),
|
|
745
|
-
branch: z.string().trim().default("main").describe("The branch of the workspace"),
|
|
746
|
-
preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
|
|
747
|
-
owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
|
|
748
|
-
bot: WorkspaceBotConfigSchema,
|
|
749
|
-
release: WorkspaceReleaseConfigSchema,
|
|
750
|
-
socials: WorkspaceSocialsConfigSchema,
|
|
751
|
-
error: errorConfigSchema,
|
|
752
|
-
mode: z.string().trim().default("production").describe("The current runtime environment mode for the package"),
|
|
753
|
-
workspaceRoot: z.string().trim().describe("The root directory of the workspace"),
|
|
754
|
-
skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
755
|
-
directories: WorkspaceDirectoryConfigSchema,
|
|
756
|
-
packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
|
|
757
|
-
"The JavaScript/TypeScript package manager used by the repository"
|
|
758
|
-
),
|
|
759
|
-
timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
|
|
760
|
-
locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
|
|
761
|
-
logLevel: z.enum([
|
|
1007
|
+
schemaRegistry.add(localeSchema, {
|
|
1008
|
+
description: "The default locale of the workspace"
|
|
1009
|
+
});
|
|
1010
|
+
var logLevelSchema = z._default(
|
|
1011
|
+
z.enum([
|
|
762
1012
|
"silent",
|
|
763
1013
|
"fatal",
|
|
764
1014
|
"error",
|
|
@@ -768,23 +1018,65 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
768
1018
|
"debug",
|
|
769
1019
|
"trace",
|
|
770
1020
|
"all"
|
|
771
|
-
])
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
extensions: z.record(z.string(), z.any()).optional().default({}).describe("Configuration of each used extension")
|
|
785
|
-
}).describe(
|
|
786
|
-
"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."
|
|
1021
|
+
]),
|
|
1022
|
+
"info"
|
|
1023
|
+
);
|
|
1024
|
+
schemaRegistry.add(logLevelSchema, {
|
|
1025
|
+
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`)."
|
|
1026
|
+
});
|
|
1027
|
+
var skipConfigLoggingSchema = z._default(z.boolean(), true);
|
|
1028
|
+
schemaRegistry.add(skipConfigLoggingSchema, {
|
|
1029
|
+
description: "Should the logging of the current Storm Workspace configuration be skipped?"
|
|
1030
|
+
});
|
|
1031
|
+
var configFileSchema = z._default(
|
|
1032
|
+
z.nullable(z.string().check(z.trim())),
|
|
1033
|
+
null
|
|
787
1034
|
);
|
|
1035
|
+
schemaRegistry.add(configFileSchema, {
|
|
1036
|
+
description: "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
|
|
1037
|
+
});
|
|
1038
|
+
var extensionsSchema = z._default(z.record(z.string(), z.any()), {});
|
|
1039
|
+
schemaRegistry.add(extensionsSchema, {
|
|
1040
|
+
description: "Configuration of each used extension"
|
|
1041
|
+
});
|
|
1042
|
+
var workspaceConfigSchema = z.object({
|
|
1043
|
+
$schema: schemaNameSchema,
|
|
1044
|
+
extends: extendsSchema,
|
|
1045
|
+
name: nameSchema,
|
|
1046
|
+
namespace: namespaceSchema,
|
|
1047
|
+
organization: orgSchema,
|
|
1048
|
+
repository: repositorySchema,
|
|
1049
|
+
license: licenseSchema,
|
|
1050
|
+
homepage: homepageSchema,
|
|
1051
|
+
docs: docsSchema,
|
|
1052
|
+
portal: portalSchema,
|
|
1053
|
+
licensing: licensingSchema,
|
|
1054
|
+
contact: contactSchema,
|
|
1055
|
+
support: supportSchema,
|
|
1056
|
+
branch: branchSchema,
|
|
1057
|
+
preid: preidSchema,
|
|
1058
|
+
owner: ownerSchema,
|
|
1059
|
+
bot: workspaceBotSchema,
|
|
1060
|
+
release: workspaceReleaseSchema,
|
|
1061
|
+
socials: workspaceSocialsSchema,
|
|
1062
|
+
error: errorSchema,
|
|
1063
|
+
mode: modeSchema,
|
|
1064
|
+
workspaceRoot: workspaceRootSchema,
|
|
1065
|
+
skipCache: skipCacheSchema,
|
|
1066
|
+
directories: workspaceDirectorySchema,
|
|
1067
|
+
packageManager: packageManagerSchema,
|
|
1068
|
+
timezone: timezoneSchema,
|
|
1069
|
+
locale: localeSchema,
|
|
1070
|
+
logLevel: logLevelSchema,
|
|
1071
|
+
skipConfigLogging: skipConfigLoggingSchema,
|
|
1072
|
+
registry: registrySchema,
|
|
1073
|
+
configFile: configFileSchema,
|
|
1074
|
+
colors: z.union([colorsSchema, themeColorsSchema]),
|
|
1075
|
+
extensions: extensionsSchema
|
|
1076
|
+
});
|
|
1077
|
+
schemaRegistry.add(extensionsSchema, {
|
|
1078
|
+
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."
|
|
1079
|
+
});
|
|
788
1080
|
|
|
789
1081
|
// ../config/src/types.ts
|
|
790
1082
|
var COLOR_KEYS = [
|
|
@@ -996,7 +1288,10 @@ var getConfigEnv = () => {
|
|
|
996
1288
|
email: process.env[`${prefix}BOT_EMAIL`] || void 0
|
|
997
1289
|
},
|
|
998
1290
|
release: {
|
|
999
|
-
banner:
|
|
1291
|
+
banner: {
|
|
1292
|
+
url: process.env[`${prefix}RELEASE_BANNER_URL`] || void 0,
|
|
1293
|
+
alt: process.env[`${prefix}RELEASE_BANNER_ALT`] || void 0
|
|
1294
|
+
},
|
|
1000
1295
|
header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
|
|
1001
1296
|
footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
|
|
1002
1297
|
},
|
|
@@ -1073,11 +1368,11 @@ var getConfigEnv = () => {
|
|
|
1073
1368
|
);
|
|
1074
1369
|
config.colors = themeNames.length > 0 ? themeNames.reduce(
|
|
1075
1370
|
(ret, themeName) => {
|
|
1076
|
-
ret[themeName] =
|
|
1371
|
+
ret[themeName] = getThemeColorsEnv(prefix, themeName);
|
|
1077
1372
|
return ret;
|
|
1078
1373
|
},
|
|
1079
1374
|
{}
|
|
1080
|
-
) :
|
|
1375
|
+
) : getThemeColorsEnv(prefix);
|
|
1081
1376
|
if (config.docs === STORM_DEFAULT_DOCS) {
|
|
1082
1377
|
if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
|
|
1083
1378
|
config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
@@ -1104,11 +1399,11 @@ var getConfigEnv = () => {
|
|
|
1104
1399
|
}
|
|
1105
1400
|
return config;
|
|
1106
1401
|
};
|
|
1107
|
-
var
|
|
1402
|
+
var getThemeColorsEnv = (prefix, theme) => {
|
|
1108
1403
|
const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
|
|
1109
|
-
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ?
|
|
1404
|
+
return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorsEnv(prefix + themeName) : getSingleThemeColorsEnv(prefix + themeName);
|
|
1110
1405
|
};
|
|
1111
|
-
var
|
|
1406
|
+
var getSingleThemeColorsEnv = (prefix) => {
|
|
1112
1407
|
const gradient = [];
|
|
1113
1408
|
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
1114
1409
|
gradient.push(
|
|
@@ -1140,15 +1435,13 @@ var getSingleThemeColorConfigEnv = (prefix) => {
|
|
|
1140
1435
|
gradient
|
|
1141
1436
|
};
|
|
1142
1437
|
};
|
|
1143
|
-
var
|
|
1438
|
+
var getMultiThemeColorsEnv = (prefix) => {
|
|
1144
1439
|
return {
|
|
1145
|
-
light:
|
|
1146
|
-
|
|
1147
|
-
),
|
|
1148
|
-
dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
|
|
1440
|
+
light: getBaseThemeColorsEnv(`${prefix}_LIGHT_`),
|
|
1441
|
+
dark: getBaseThemeColorsEnv(`${prefix}_DARK_`)
|
|
1149
1442
|
};
|
|
1150
1443
|
};
|
|
1151
|
-
var
|
|
1444
|
+
var getBaseThemeColorsEnv = (prefix) => {
|
|
1152
1445
|
const gradient = [];
|
|
1153
1446
|
if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
|
|
1154
1447
|
gradient.push(
|
|
@@ -1227,7 +1520,16 @@ var setConfigEnv = (config) => {
|
|
|
1227
1520
|
process.env[`${prefix}ERROR_URL`] = config.error.url;
|
|
1228
1521
|
}
|
|
1229
1522
|
if (config.release) {
|
|
1230
|
-
|
|
1523
|
+
if (config.release.banner) {
|
|
1524
|
+
if (typeof config.release.banner === "string") {
|
|
1525
|
+
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
|
|
1526
|
+
process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner;
|
|
1527
|
+
} else {
|
|
1528
|
+
process.env[`${prefix}RELEASE_BANNER`] = config.release.banner.url;
|
|
1529
|
+
process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner.url;
|
|
1530
|
+
process.env[`${prefix}RELEASE_BANNER_ALT`] = config.release.banner.alt;
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1231
1533
|
process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
|
|
1232
1534
|
process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
|
|
1233
1535
|
}
|
|
@@ -1370,10 +1672,10 @@ var setConfigEnv = (config) => {
|
|
|
1370
1672
|
}
|
|
1371
1673
|
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
1372
1674
|
for (const key of Object.keys(config.colors)) {
|
|
1373
|
-
|
|
1675
|
+
setThemeColorsEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
1374
1676
|
}
|
|
1375
1677
|
} else {
|
|
1376
|
-
|
|
1678
|
+
setThemeColorsEnv(
|
|
1377
1679
|
`${prefix}COLOR_`,
|
|
1378
1680
|
config.colors
|
|
1379
1681
|
);
|
|
@@ -1428,10 +1730,10 @@ var setConfigEnv = (config) => {
|
|
|
1428
1730
|
}
|
|
1429
1731
|
}
|
|
1430
1732
|
};
|
|
1431
|
-
var
|
|
1432
|
-
return config?.light?.brand || config?.dark?.brand ?
|
|
1733
|
+
var setThemeColorsEnv = (prefix, config) => {
|
|
1734
|
+
return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorsEnv(prefix, config) : setSingleThemeColorsEnv(prefix, config);
|
|
1433
1735
|
};
|
|
1434
|
-
var
|
|
1736
|
+
var setSingleThemeColorsEnv = (prefix, config) => {
|
|
1435
1737
|
if (config.dark) {
|
|
1436
1738
|
process.env[`${prefix}DARK`] = config.dark;
|
|
1437
1739
|
}
|
|
@@ -1480,13 +1782,13 @@ var setSingleThemeColorConfigEnv = (prefix, config) => {
|
|
|
1480
1782
|
}
|
|
1481
1783
|
}
|
|
1482
1784
|
};
|
|
1483
|
-
var
|
|
1785
|
+
var setMultiThemeColorsEnv = (prefix, config) => {
|
|
1484
1786
|
return {
|
|
1485
|
-
light:
|
|
1486
|
-
dark:
|
|
1787
|
+
light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config.light),
|
|
1788
|
+
dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config.dark)
|
|
1487
1789
|
};
|
|
1488
1790
|
};
|
|
1489
|
-
var
|
|
1791
|
+
var setBaseThemeColorsEnv = (prefix, config) => {
|
|
1490
1792
|
if (config.foreground) {
|
|
1491
1793
|
process.env[`${prefix}FOREGROUND`] = config.foreground;
|
|
1492
1794
|
}
|
|
@@ -1567,7 +1869,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
1567
1869
|
);
|
|
1568
1870
|
try {
|
|
1569
1871
|
result = applyDefaultConfig(
|
|
1570
|
-
await
|
|
1872
|
+
await workspaceConfigSchema.parseAsync(configInput)
|
|
1571
1873
|
);
|
|
1572
1874
|
result.workspaceRoot ??= _workspaceRoot;
|
|
1573
1875
|
} catch (error) {
|