@storm-software/git-tools 2.113.38 → 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,5 +1,5 @@
1
1
  import chalk from 'chalk';
2
- import * as z from 'zod';
2
+ import * as z from 'zod/mini';
3
3
  import { loadConfig } from 'c12';
4
4
  import { existsSync } from 'node:fs';
5
5
  import { join } from 'node:path';
@@ -320,240 +320,488 @@ var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
320
320
  var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
321
321
  var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
322
322
  var STORM_DEFAULT_LICENSE = "Apache-2.0";
323
- var STORM_DEFAULT_SOCIAL_TWITTER = "StormSoftwareHQ";
324
- var STORM_DEFAULT_SOCIAL_DISCORD = "https://discord.gg/MQ6YVzakM5";
325
- var STORM_DEFAULT_SOCIAL_TELEGRAM = "https://t.me/storm_software";
326
- var STORM_DEFAULT_SOCIAL_SLACK = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
327
- var STORM_DEFAULT_SOCIAL_MEDIUM = "https://medium.com/storm-software";
328
- var STORM_DEFAULT_SOCIAL_GITHUB = "https://github.com/storm-software";
329
323
  var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
324
+ var STORM_DEFAULT_BANNER_ALT = "The workspace's banner image";
330
325
 
331
326
  // ../config/src/schema.ts
332
- var ColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7);
333
- var DarkColorSchema = ColorSchema.default("#151718").describe(
334
- "The dark background color of the workspace"
327
+ var schemaRegistry = z.registry();
328
+ var colorSchema = z.string().check(
329
+ z.length(7),
330
+ z.toLowerCase(),
331
+ z.regex(/^#([0-9a-f]{3}){1,2}$/i),
332
+ z.trim()
335
333
  );
336
- var LightColorSchema = ColorSchema.default("#cbd5e1").describe(
337
- "The light background color of the workspace"
334
+ schemaRegistry.add(colorSchema, {
335
+ description: "A base schema for describing the format of colors"
336
+ });
337
+ var darkColorSchema = z._default(colorSchema, "#151718");
338
+ schemaRegistry.add(darkColorSchema, {
339
+ description: "The dark background color of the workspace"
340
+ });
341
+ var lightColorSchema = z._default(colorSchema, "#cbd5e1");
342
+ schemaRegistry.add(lightColorSchema, {
343
+ description: "The light background color of the workspace"
344
+ });
345
+ var brandColorSchema = z._default(colorSchema, "#1fb2a6");
346
+ schemaRegistry.add(brandColorSchema, {
347
+ description: "The primary brand specific color of the workspace"
348
+ });
349
+ var alternateColorSchema = z.optional(colorSchema);
350
+ schemaRegistry.add(alternateColorSchema, {
351
+ description: "The alternate brand specific color of the workspace"
352
+ });
353
+ var accentColorSchema = z.optional(colorSchema);
354
+ schemaRegistry.add(accentColorSchema, {
355
+ description: "The secondary brand specific color of the workspace"
356
+ });
357
+ var linkColorSchema = z._default(colorSchema, "#3fa6ff");
358
+ schemaRegistry.add(linkColorSchema, {
359
+ description: "The color used to display hyperlink text"
360
+ });
361
+ var helpColorSchema = z._default(colorSchema, "#818cf8");
362
+ schemaRegistry.add(helpColorSchema, {
363
+ description: "The second brand specific color of the workspace"
364
+ });
365
+ var successColorSchema = z._default(colorSchema, "#45b27e");
366
+ schemaRegistry.add(successColorSchema, {
367
+ description: "The success color of the workspace"
368
+ });
369
+ var infoColorSchema = z._default(colorSchema, "#38bdf8");
370
+ schemaRegistry.add(infoColorSchema, {
371
+ description: "The informational color of the workspace"
372
+ });
373
+ var warningColorSchema = z._default(colorSchema, "#f3d371");
374
+ schemaRegistry.add(warningColorSchema, {
375
+ description: "The warning color of the workspace"
376
+ });
377
+ var dangerColorSchema = z._default(colorSchema, "#d8314a");
378
+ schemaRegistry.add(dangerColorSchema, {
379
+ description: "The danger color of the workspace"
380
+ });
381
+ var fatalColorSchema = z.optional(colorSchema);
382
+ schemaRegistry.add(fatalColorSchema, {
383
+ description: "The fatal color of the workspace"
384
+ });
385
+ var positiveColorSchema = z._default(colorSchema, "#4ade80");
386
+ schemaRegistry.add(positiveColorSchema, {
387
+ description: "The positive number color of the workspace"
388
+ });
389
+ var negativeColorSchema = z._default(colorSchema, "#ef4444");
390
+ schemaRegistry.add(negativeColorSchema, {
391
+ description: "The negative number color of the workspace"
392
+ });
393
+ var gradientStopsSchema = z.optional(z.array(colorSchema));
394
+ schemaRegistry.add(gradientStopsSchema, {
395
+ description: "The color stops for the base gradient color pattern used in the workspace"
396
+ });
397
+ var darkColorsSchema = z.object({
398
+ foreground: lightColorSchema,
399
+ background: darkColorSchema,
400
+ brand: brandColorSchema,
401
+ alternate: alternateColorSchema,
402
+ accent: accentColorSchema,
403
+ link: linkColorSchema,
404
+ help: helpColorSchema,
405
+ success: successColorSchema,
406
+ info: infoColorSchema,
407
+ warning: warningColorSchema,
408
+ danger: dangerColorSchema,
409
+ fatal: fatalColorSchema,
410
+ positive: positiveColorSchema,
411
+ negative: negativeColorSchema,
412
+ gradient: gradientStopsSchema
413
+ });
414
+ var lightColorsSchema = z.object({
415
+ foreground: darkColorSchema,
416
+ background: lightColorSchema,
417
+ brand: brandColorSchema,
418
+ alternate: alternateColorSchema,
419
+ accent: accentColorSchema,
420
+ link: linkColorSchema,
421
+ help: helpColorSchema,
422
+ success: successColorSchema,
423
+ info: infoColorSchema,
424
+ warning: warningColorSchema,
425
+ danger: dangerColorSchema,
426
+ fatal: fatalColorSchema,
427
+ positive: positiveColorSchema,
428
+ negative: negativeColorSchema,
429
+ gradient: gradientStopsSchema
430
+ });
431
+ var multiColorsSchema = z.object({
432
+ dark: darkColorsSchema,
433
+ light: lightColorsSchema
434
+ });
435
+ var singleColorsSchema = z.object({
436
+ dark: darkColorSchema,
437
+ light: lightColorSchema,
438
+ brand: brandColorSchema,
439
+ alternate: alternateColorSchema,
440
+ accent: accentColorSchema,
441
+ link: linkColorSchema,
442
+ help: helpColorSchema,
443
+ success: successColorSchema,
444
+ info: infoColorSchema,
445
+ warning: warningColorSchema,
446
+ danger: dangerColorSchema,
447
+ fatal: fatalColorSchema,
448
+ positive: positiveColorSchema,
449
+ negative: negativeColorSchema,
450
+ gradient: gradientStopsSchema
451
+ });
452
+ var registryUrlConfigSchema = z.optional(z.url());
453
+ schemaRegistry.add(registryUrlConfigSchema, {
454
+ description: "A remote registry URL used to publish distributable packages"
455
+ });
456
+ var registrySchema = z._default(
457
+ z.object({
458
+ github: registryUrlConfigSchema,
459
+ npm: registryUrlConfigSchema,
460
+ cargo: registryUrlConfigSchema,
461
+ cyclone: registryUrlConfigSchema,
462
+ container: registryUrlConfigSchema
463
+ }),
464
+ {}
465
+ );
466
+ schemaRegistry.add(registrySchema, {
467
+ description: "A list of remote registry URLs used by Storm Software"
468
+ });
469
+ var colorsSchema = z.union([singleColorsSchema, multiColorsSchema]);
470
+ schemaRegistry.add(colorsSchema, {
471
+ description: "Colors used for various workspace elements"
472
+ });
473
+ var themeColorsSchema = z.record(
474
+ z.union([z.union([z.literal("base"), z.string()]), z.string()]),
475
+ colorsSchema
476
+ );
477
+ schemaRegistry.add(themeColorsSchema, {
478
+ description: "Storm theme config values used for styling various package elements"
479
+ });
480
+ var extendsSchema = z.optional(
481
+ z.union([z.string().check(z.trim()), z.array(z.string().check(z.trim()))])
338
482
  );
339
- var BrandColorSchema = ColorSchema.default("#1fb2a6").describe(
340
- "The primary brand specific color of the workspace"
483
+ schemaRegistry.add(extendsSchema, {
484
+ 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."
485
+ });
486
+ var workspaceBotNameSchema = z.string().check(z.trim());
487
+ schemaRegistry.add(workspaceBotNameSchema, {
488
+ description: "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
489
+ });
490
+ var workspaceBotEmailSchema = z.string().check(z.trim());
491
+ schemaRegistry.add(workspaceBotEmailSchema, {
492
+ description: "The email of the workspace bot"
493
+ });
494
+ var workspaceBotSchema = z.object({
495
+ name: workspaceBotNameSchema,
496
+ email: workspaceBotEmailSchema
497
+ });
498
+ schemaRegistry.add(workspaceBotSchema, {
499
+ description: "The workspace's bot user's config used to automated various operations tasks"
500
+ });
501
+ var workspaceReleaseBannerUrlSchema = z.optional(
502
+ z.string().check(z.trim(), z.url())
503
+ );
504
+ schemaRegistry.add(workspaceReleaseBannerUrlSchema, {
505
+ description: "A URL to a banner image used to display the workspace's release"
506
+ });
507
+ var workspaceReleaseBannerAltSchema = z._default(
508
+ z.string().check(z.trim()),
509
+ STORM_DEFAULT_BANNER_ALT
510
+ );
511
+ schemaRegistry.add(workspaceReleaseBannerAltSchema, {
512
+ description: "The alt text for the workspace's release banner image"
513
+ });
514
+ var workspaceReleaseBannerSchema = z.object({
515
+ url: workspaceReleaseBannerUrlSchema,
516
+ alt: workspaceReleaseBannerAltSchema
517
+ });
518
+ schemaRegistry.add(workspaceReleaseBannerSchema, {
519
+ description: "The workspace's banner image used during the release process"
520
+ });
521
+ var workspaceReleaseHeaderSchema = z.optional(
522
+ z.string().check(z.trim())
523
+ );
524
+ schemaRegistry.add(workspaceReleaseHeaderSchema, {
525
+ description: "A header message appended to the start of the workspace's release notes"
526
+ });
527
+ var workspaceReleaseFooterSchema = z.optional(
528
+ z.string().check(z.trim())
529
+ );
530
+ schemaRegistry.add(workspaceReleaseFooterSchema, {
531
+ description: "A footer message appended to the end of the workspace's release notes"
532
+ });
533
+ var workspaceReleaseSchema = z.object({
534
+ banner: z.union([
535
+ workspaceReleaseBannerSchema,
536
+ z.string().check(z.trim(), z.url())
537
+ ]),
538
+ header: workspaceReleaseHeaderSchema,
539
+ footer: workspaceReleaseFooterSchema
540
+ });
541
+ schemaRegistry.add(workspaceReleaseSchema, {
542
+ description: "The workspace's release config used during the release process"
543
+ });
544
+ var workspaceSocialsTwitterSchema = z.optional(
545
+ z.string().check(z.trim())
546
+ );
547
+ schemaRegistry.add(workspaceSocialsTwitterSchema, {
548
+ description: "A Twitter/X account associated with the organization/project"
549
+ });
550
+ var workspaceSocialsDiscordSchema = z.optional(
551
+ z.string().check(z.trim())
552
+ );
553
+ schemaRegistry.add(workspaceSocialsDiscordSchema, {
554
+ description: "A Discord account associated with the organization/project"
555
+ });
556
+ var workspaceSocialsTelegramSchema = z.optional(
557
+ z.string().check(z.trim())
558
+ );
559
+ schemaRegistry.add(workspaceSocialsTelegramSchema, {
560
+ description: "A Telegram account associated with the organization/project"
561
+ });
562
+ var workspaceSocialsSlackSchema = z.optional(
563
+ z.string().check(z.trim())
564
+ );
565
+ schemaRegistry.add(workspaceSocialsSlackSchema, {
566
+ description: "A Slack account associated with the organization/project"
567
+ });
568
+ var workspaceSocialsMediumSchema = z.optional(
569
+ z.string().check(z.trim())
570
+ );
571
+ schemaRegistry.add(workspaceSocialsMediumSchema, {
572
+ description: "A Medium account associated with the organization/project"
573
+ });
574
+ var workspaceSocialsGithubSchema = z.optional(
575
+ z.string().check(z.trim())
341
576
  );
342
- var AlternateColorSchema = ColorSchema.optional().describe(
343
- "The alternate brand specific color of the workspace"
577
+ schemaRegistry.add(workspaceSocialsGithubSchema, {
578
+ description: "A GitHub account associated with the organization/project"
579
+ });
580
+ var workspaceSocialsSchema = z.object({
581
+ twitter: workspaceSocialsTwitterSchema,
582
+ discord: workspaceSocialsDiscordSchema,
583
+ telegram: workspaceSocialsTelegramSchema,
584
+ slack: workspaceSocialsSlackSchema,
585
+ medium: workspaceSocialsMediumSchema,
586
+ github: workspaceSocialsGithubSchema
587
+ });
588
+ schemaRegistry.add(workspaceSocialsSchema, {
589
+ description: "The workspace's account config used to store various social media links"
590
+ });
591
+ var workspaceDirectoryCacheSchema = z.optional(
592
+ z.string().check(z.trim())
344
593
  );
345
- var AccentColorSchema = ColorSchema.optional().describe(
346
- "The secondary brand specific color of the workspace"
594
+ schemaRegistry.add(workspaceDirectoryCacheSchema, {
595
+ description: "The directory used to store the environment's cached file data"
596
+ });
597
+ var workspaceDirectoryDataSchema = z.optional(
598
+ z.string().check(z.trim())
347
599
  );
348
- var LinkColorSchema = ColorSchema.default("#3fa6ff").describe(
349
- "The color used to display hyperlink text"
600
+ schemaRegistry.add(workspaceDirectoryDataSchema, {
601
+ description: "The directory used to store the environment's data files"
602
+ });
603
+ var workspaceDirectoryConfigSchema = z.optional(
604
+ z.string().check(z.trim())
350
605
  );
351
- var HelpColorSchema = ColorSchema.default("#818cf8").describe(
352
- "The second brand specific color of the workspace"
606
+ schemaRegistry.add(workspaceDirectoryConfigSchema, {
607
+ description: "The directory used to store the environment's configuration files"
608
+ });
609
+ var workspaceDirectoryTempSchema = z.optional(
610
+ z.string().check(z.trim())
353
611
  );
354
- var SuccessColorSchema = ColorSchema.default("#45b27e").describe(
355
- "The success color of the workspace"
612
+ schemaRegistry.add(workspaceDirectoryTempSchema, {
613
+ description: "The directory used to store the environment's temp files"
614
+ });
615
+ var workspaceDirectoryLogSchema = z.optional(
616
+ z.string().check(z.trim())
356
617
  );
357
- var InfoColorSchema = ColorSchema.default("#38bdf8").describe(
358
- "The informational color of the workspace"
618
+ schemaRegistry.add(workspaceDirectoryLogSchema, {
619
+ description: "The directory used to store the environment's log files"
620
+ });
621
+ var workspaceDirectoryBuildSchema = z._default(
622
+ z.string().check(z.trim()),
623
+ "dist"
359
624
  );
360
- var WarningColorSchema = ColorSchema.default("#f3d371").describe(
361
- "The warning color of the workspace"
625
+ schemaRegistry.add(workspaceDirectoryBuildSchema, {
626
+ description: "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
627
+ });
628
+ var workspaceDirectorySchema = z.object({
629
+ cache: workspaceDirectoryCacheSchema,
630
+ data: workspaceDirectoryDataSchema,
631
+ config: workspaceDirectoryConfigSchema,
632
+ temp: workspaceDirectoryTempSchema,
633
+ log: workspaceDirectoryLogSchema,
634
+ build: workspaceDirectoryBuildSchema
635
+ });
636
+ schemaRegistry.add(workspaceDirectorySchema, {
637
+ description: "Various directories used by the workspace to store data, cache, and configuration files"
638
+ });
639
+ var errorCodesFileSchema = z._default(
640
+ z.string().check(z.trim()),
641
+ STORM_DEFAULT_ERROR_CODES_FILE
362
642
  );
363
- var DangerColorSchema = ColorSchema.default("#d8314a").describe(
364
- "The danger color of the workspace"
643
+ schemaRegistry.add(errorCodesFileSchema, {
644
+ description: "The path to the workspace's error codes JSON file"
645
+ });
646
+ var errorUrlSchema = z.optional(z.url());
647
+ schemaRegistry.add(errorUrlSchema, {
648
+ description: "A URL to a page that looks up the workspace's error messages given a specific error code"
649
+ });
650
+ var errorSchema = z.object({
651
+ codesFile: errorCodesFileSchema,
652
+ url: errorUrlSchema
653
+ });
654
+ schemaRegistry.add(errorSchema, {
655
+ description: "The workspace's error config used when creating error details during a system error"
656
+ });
657
+ var organizationNameSchema = z.optional(
658
+ z.string().check(z.trim(), z.toLowerCase())
365
659
  );
366
- var FatalColorSchema = ColorSchema.optional().describe(
367
- "The fatal color of the workspace"
660
+ schemaRegistry.add(organizationNameSchema, {
661
+ description: "The name of the organization"
662
+ });
663
+ var organizationDescriptionSchema = z.optional(
664
+ z.string().check(z.trim())
368
665
  );
369
- var PositiveColorSchema = ColorSchema.default("#4ade80").describe(
370
- "The positive number color of the workspace"
666
+ schemaRegistry.add(organizationDescriptionSchema, {
667
+ description: "A description of the organization"
668
+ });
669
+ var organizationLogoSchema = z.optional(z.url());
670
+ schemaRegistry.add(organizationLogoSchema, {
671
+ description: "A URL to the organization's logo image"
672
+ });
673
+ var organizationIconSchema = z.optional(z.url());
674
+ schemaRegistry.add(organizationIconSchema, {
675
+ description: "A URL to the organization's icon image"
676
+ });
677
+ var organizationUrlSchema = z.optional(z.url());
678
+ schemaRegistry.add(organizationUrlSchema, {
679
+ description: "A URL to a page that provides more information about the organization"
680
+ });
681
+ var organizationSchema = z.object({
682
+ name: organizationNameSchema,
683
+ description: organizationDescriptionSchema,
684
+ logo: organizationLogoSchema,
685
+ icon: organizationIconSchema,
686
+ url: organizationUrlSchema
687
+ });
688
+ schemaRegistry.add(organizationSchema, {
689
+ description: "The workspace's organization details"
690
+ });
691
+ var schemaNameSchema = z._default(
692
+ z.string().check(z.trim(), z.toLowerCase()),
693
+ "https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
371
694
  );
372
- var NegativeColorSchema = ColorSchema.default("#ef4444").describe(
373
- "The negative number color of the workspace"
695
+ schemaRegistry.add(schemaNameSchema, {
696
+ description: "The URL or file path to the JSON schema file that describes the Storm configuration file"
697
+ });
698
+ var nameSchema = z.string().check(z.trim(), z.toLowerCase());
699
+ schemaRegistry.add(nameSchema, {
700
+ description: "The name of the workspace/project/service/package/scope using this configuration"
701
+ });
702
+ var namespaceSchema = z.string().check(z.trim(), z.toLowerCase());
703
+ schemaRegistry.add(namespaceSchema, {
704
+ description: "The namespace of the workspace/project/service/package/scope using this configuration"
705
+ });
706
+ var orgSchema = z.union([
707
+ organizationSchema,
708
+ z.string().check(z.trim(), z.toLowerCase())
709
+ ]);
710
+ schemaRegistry.add(orgSchema, {
711
+ description: "The organization of the workspace. This can be a string or an object containing the organization's details"
712
+ });
713
+ var repositorySchema = z.string().check(z.trim(), z.toLowerCase());
714
+ schemaRegistry.add(repositorySchema, {
715
+ description: "The repo URL of the workspace (i.e. the GitHub repository URL)"
716
+ });
717
+ var licenseSchema = z._default(
718
+ z.string().check(z.trim()),
719
+ "Apache-2.0"
374
720
  );
375
- var GradientStopsSchema = z.array(ColorSchema).optional().describe(
376
- "The color stops for the base gradient color pattern used in the workspace"
721
+ schemaRegistry.add(licenseSchema, {
722
+ description: "The license type of the package"
723
+ });
724
+ var homepageSchema = z.optional(z.url());
725
+ schemaRegistry.add(homepageSchema, {
726
+ description: "The homepage of the workspace"
727
+ });
728
+ var docsSchema = z.optional(z.url());
729
+ schemaRegistry.add(docsSchema, {
730
+ description: "The documentation site for the workspace"
731
+ });
732
+ var portalSchema = z.optional(z.url());
733
+ schemaRegistry.add(portalSchema, {
734
+ description: "The development portal site for the workspace"
735
+ });
736
+ var licensingSchema = z.optional(z.url());
737
+ schemaRegistry.add(licensingSchema, {
738
+ description: "The licensing site for the workspace"
739
+ });
740
+ var contactSchema = z.optional(z.url());
741
+ schemaRegistry.add(contactSchema, {
742
+ description: "The contact site for the workspace"
743
+ });
744
+ var supportSchema = z.optional(z.url());
745
+ schemaRegistry.add(supportSchema, {
746
+ description: "The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
747
+ });
748
+ var branchSchema = z._default(
749
+ z.string().check(z.trim(), z.toLowerCase()),
750
+ "main"
377
751
  );
378
- var DarkThemeColorConfigSchema = z.object({
379
- foreground: LightColorSchema,
380
- background: DarkColorSchema,
381
- brand: BrandColorSchema,
382
- alternate: AlternateColorSchema,
383
- accent: AccentColorSchema,
384
- link: LinkColorSchema,
385
- help: HelpColorSchema,
386
- success: SuccessColorSchema,
387
- info: InfoColorSchema,
388
- warning: WarningColorSchema,
389
- danger: DangerColorSchema,
390
- fatal: FatalColorSchema,
391
- positive: PositiveColorSchema,
392
- negative: NegativeColorSchema,
393
- gradient: GradientStopsSchema
394
- });
395
- var LightThemeColorConfigSchema = z.object({
396
- foreground: DarkColorSchema,
397
- background: LightColorSchema,
398
- brand: BrandColorSchema,
399
- alternate: AlternateColorSchema,
400
- accent: AccentColorSchema,
401
- link: LinkColorSchema,
402
- help: HelpColorSchema,
403
- success: SuccessColorSchema,
404
- info: InfoColorSchema,
405
- warning: WarningColorSchema,
406
- danger: DangerColorSchema,
407
- fatal: FatalColorSchema,
408
- positive: PositiveColorSchema,
409
- negative: NegativeColorSchema,
410
- gradient: GradientStopsSchema
411
- });
412
- var MultiThemeColorConfigSchema = z.object({
413
- dark: DarkThemeColorConfigSchema,
414
- light: LightThemeColorConfigSchema
415
- });
416
- var SingleThemeColorConfigSchema = z.object({
417
- dark: DarkColorSchema,
418
- light: LightColorSchema,
419
- brand: BrandColorSchema,
420
- alternate: AlternateColorSchema,
421
- accent: AccentColorSchema,
422
- link: LinkColorSchema,
423
- help: HelpColorSchema,
424
- success: SuccessColorSchema,
425
- info: InfoColorSchema,
426
- warning: WarningColorSchema,
427
- danger: DangerColorSchema,
428
- fatal: FatalColorSchema,
429
- positive: PositiveColorSchema,
430
- negative: NegativeColorSchema,
431
- gradient: GradientStopsSchema
432
- });
433
- var RegistryUrlConfigSchema = z.url().optional().describe("A remote registry URL used to publish distributable packages");
434
- var RegistryConfigSchema = z.object({
435
- github: RegistryUrlConfigSchema,
436
- npm: RegistryUrlConfigSchema,
437
- cargo: RegistryUrlConfigSchema,
438
- cyclone: RegistryUrlConfigSchema,
439
- container: RegistryUrlConfigSchema
440
- }).default({}).describe("A list of remote registry URLs used by Storm Software");
441
- var ColorConfigSchema = SingleThemeColorConfigSchema.or(
442
- MultiThemeColorConfigSchema
443
- ).describe("Colors used for various workspace elements");
444
- var ColorConfigMapSchema = z.record(
445
- z.union([z.literal("base"), z.string()]),
446
- ColorConfigSchema
752
+ schemaRegistry.add(branchSchema, {
753
+ description: "The branch of the workspace"
754
+ });
755
+ var preidSchema = z.optional(
756
+ z.string().check(z.trim(), z.toLowerCase())
447
757
  );
448
- var ExtendsItemSchema = z.string().trim().describe(
449
- "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."
758
+ schemaRegistry.add(preidSchema, {
759
+ description: "A tag specifying the version pre-release identifier"
760
+ });
761
+ var ownerSchema = z.optional(
762
+ z.string().check(z.trim(), z.toLowerCase())
450
763
  );
451
- var ExtendsSchema = ExtendsItemSchema.or(
452
- z.array(ExtendsItemSchema)
453
- ).describe(
454
- "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."
764
+ schemaRegistry.add(ownerSchema, {
765
+ description: "The owner of the package"
766
+ });
767
+ var modeSchema = z._default(
768
+ z.enum(["development", "staging", "production"]).check(z.trim(), z.toLowerCase()),
769
+ "production"
455
770
  );
456
- var WorkspaceBotConfigSchema = z.object({
457
- name: z.string().trim().default("stormie-bot").describe(
458
- "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
459
- ),
460
- email: z.email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
461
- }).describe(
462
- "The workspace's bot user's config used to automated various operations tasks"
771
+ schemaRegistry.add(modeSchema, {
772
+ description: "The current runtime environment mode for the package"
773
+ });
774
+ var workspaceRootSchema = z.string().check(z.trim(), z.toLowerCase());
775
+ schemaRegistry.add(workspaceRootSchema, {
776
+ description: "The root directory of the workspace"
777
+ });
778
+ var skipCacheSchema = z._default(z.boolean(), false);
779
+ schemaRegistry.add(skipCacheSchema, {
780
+ description: "Should all known types of workspace caching be skipped?"
781
+ });
782
+ var packageManagerSchema = z._default(
783
+ z.enum(["npm", "yarn", "pnpm", "bun"]),
784
+ "npm"
463
785
  );
464
- var WorkspaceReleaseConfigSchema = z.object({
465
- banner: z.string().trim().optional().describe(
466
- "A URL to a banner image used to display the workspace's release"
467
- ),
468
- header: z.string().trim().optional().describe(
469
- "A header message appended to the start of the workspace's release notes"
470
- ),
471
- footer: z.string().trim().optional().describe(
472
- "A footer message appended to the end of the workspace's release notes"
473
- )
474
- }).describe("The workspace's release config used during the release process");
475
- var WorkspaceSocialsConfigSchema = z.object({
476
- twitter: z.string().trim().default(STORM_DEFAULT_SOCIAL_TWITTER).describe("A Twitter/X account associated with the organization/project"),
477
- discord: z.string().trim().default(STORM_DEFAULT_SOCIAL_DISCORD).describe("A Discord account associated with the organization/project"),
478
- telegram: z.string().trim().default(STORM_DEFAULT_SOCIAL_TELEGRAM).describe("A Telegram account associated with the organization/project"),
479
- slack: z.string().trim().default(STORM_DEFAULT_SOCIAL_SLACK).describe("A Slack account associated with the organization/project"),
480
- medium: z.string().trim().default(STORM_DEFAULT_SOCIAL_MEDIUM).describe("A Medium account associated with the organization/project"),
481
- github: z.string().trim().default(STORM_DEFAULT_SOCIAL_GITHUB).describe("A GitHub account associated with the organization/project")
482
- }).describe(
483
- "The workspace's account config used to store various social media links"
786
+ schemaRegistry.add(packageManagerSchema, {
787
+ description: "The JavaScript/TypeScript package manager used by the repository"
788
+ });
789
+ var timezoneSchema = z._default(
790
+ z.string().check(z.trim(), z.toLowerCase()),
791
+ "America/New_York"
484
792
  );
485
- var WorkspaceDirectoryConfigSchema = z.object({
486
- cache: z.string().trim().optional().describe(
487
- "The directory used to store the environment's cached file data"
488
- ),
489
- data: z.string().trim().optional().describe("The directory used to store the environment's data files"),
490
- config: z.string().trim().optional().describe(
491
- "The directory used to store the environment's configuration files"
492
- ),
493
- temp: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
494
- log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
495
- build: z.string().trim().default("dist").describe(
496
- "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
497
- )
498
- }).describe(
499
- "Various directories used by the workspace to store data, cache, and configuration files"
793
+ schemaRegistry.add(timezoneSchema, {
794
+ description: "The default timezone of the workspace"
795
+ });
796
+ var localeSchema = z._default(
797
+ z.string().check(z.trim(), z.toLowerCase()),
798
+ "en-US"
500
799
  );
501
- var errorConfigSchema = z.object({
502
- codesFile: z.string().trim().default(STORM_DEFAULT_ERROR_CODES_FILE).describe("The path to the workspace's error codes JSON file"),
503
- url: z.url().optional().describe(
504
- "A URL to a page that looks up the workspace's error messages given a specific error code"
505
- )
506
- }).describe("The workspace's error config used during the error process");
507
- var organizationConfigSchema = z.object({
508
- name: z.string().trim().describe("The name of the organization"),
509
- description: z.string().trim().optional().describe("A description of the organization"),
510
- logo: z.url().optional().describe("A URL to the organization's logo image"),
511
- icon: z.url().optional().describe("A URL to the organization's icon image"),
512
- url: z.url().optional().describe(
513
- "A URL to a page that provides more information about the organization"
514
- )
515
- }).describe("The workspace's organization details");
516
- var stormWorkspaceConfigSchema = z.object({
517
- $schema: z.string().trim().default(
518
- "https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
519
- ).describe(
520
- "The URL or file path to the JSON schema file that describes the Storm configuration file"
521
- ),
522
- extends: ExtendsSchema.optional(),
523
- name: z.string().trim().toLowerCase().optional().describe(
524
- "The name of the service/package/scope using this configuration"
525
- ),
526
- namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
527
- organization: organizationConfigSchema.or(z.string().trim().describe("The organization of the workspace")).optional().describe(
528
- "The organization of the workspace. This can be a string or an object containing the organization's details"
529
- ),
530
- repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
531
- license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
532
- homepage: z.url().optional().describe("The homepage of the workspace"),
533
- docs: z.url().optional().describe("The documentation site for the workspace"),
534
- portal: z.url().optional().describe("The development portal site for the workspace"),
535
- licensing: z.url().optional().describe("The licensing site for the workspace"),
536
- contact: z.url().optional().describe("The contact site for the workspace"),
537
- support: z.url().optional().describe(
538
- "The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
539
- ),
540
- branch: z.string().trim().default("main").describe("The branch of the workspace"),
541
- preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
542
- owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
543
- bot: WorkspaceBotConfigSchema,
544
- release: WorkspaceReleaseConfigSchema,
545
- socials: WorkspaceSocialsConfigSchema,
546
- error: errorConfigSchema,
547
- mode: z.string().trim().default("production").describe("The current runtime environment mode for the package"),
548
- workspaceRoot: z.string().trim().describe("The root directory of the workspace"),
549
- skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
550
- directories: WorkspaceDirectoryConfigSchema,
551
- packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
552
- "The JavaScript/TypeScript package manager used by the repository"
553
- ),
554
- timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
555
- locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
556
- logLevel: z.enum([
800
+ schemaRegistry.add(localeSchema, {
801
+ description: "The default locale of the workspace"
802
+ });
803
+ var logLevelSchema = z._default(
804
+ z.enum([
557
805
  "silent",
558
806
  "fatal",
559
807
  "error",
@@ -563,23 +811,65 @@ var stormWorkspaceConfigSchema = z.object({
563
811
  "debug",
564
812
  "trace",
565
813
  "all"
566
- ]).default("info").describe(
567
- "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`)."
568
- ),
569
- skipConfigLogging: z.boolean().optional().describe(
570
- "Should the logging of the current Storm Workspace configuration be skipped?"
571
- ),
572
- registry: RegistryConfigSchema,
573
- configFile: z.string().trim().nullable().default(null).describe(
574
- "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
575
- ),
576
- colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
577
- "Storm theme config values used for styling various package elements"
578
- ),
579
- extensions: z.record(z.string(), z.any()).optional().default({}).describe("Configuration of each used extension")
580
- }).describe(
581
- "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."
814
+ ]),
815
+ "info"
582
816
  );
817
+ schemaRegistry.add(logLevelSchema, {
818
+ 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`)."
819
+ });
820
+ var skipConfigLoggingSchema = z._default(z.boolean(), true);
821
+ schemaRegistry.add(skipConfigLoggingSchema, {
822
+ description: "Should the logging of the current Storm Workspace configuration be skipped?"
823
+ });
824
+ var configFileSchema = z._default(
825
+ z.nullable(z.string().check(z.trim())),
826
+ null
827
+ );
828
+ schemaRegistry.add(configFileSchema, {
829
+ description: "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
830
+ });
831
+ var extensionsSchema = z._default(z.record(z.string(), z.any()), {});
832
+ schemaRegistry.add(extensionsSchema, {
833
+ description: "Configuration of each used extension"
834
+ });
835
+ var workspaceConfigSchema = z.object({
836
+ $schema: schemaNameSchema,
837
+ extends: extendsSchema,
838
+ name: nameSchema,
839
+ namespace: namespaceSchema,
840
+ organization: orgSchema,
841
+ repository: repositorySchema,
842
+ license: licenseSchema,
843
+ homepage: homepageSchema,
844
+ docs: docsSchema,
845
+ portal: portalSchema,
846
+ licensing: licensingSchema,
847
+ contact: contactSchema,
848
+ support: supportSchema,
849
+ branch: branchSchema,
850
+ preid: preidSchema,
851
+ owner: ownerSchema,
852
+ bot: workspaceBotSchema,
853
+ release: workspaceReleaseSchema,
854
+ socials: workspaceSocialsSchema,
855
+ error: errorSchema,
856
+ mode: modeSchema,
857
+ workspaceRoot: workspaceRootSchema,
858
+ skipCache: skipCacheSchema,
859
+ directories: workspaceDirectorySchema,
860
+ packageManager: packageManagerSchema,
861
+ timezone: timezoneSchema,
862
+ locale: localeSchema,
863
+ logLevel: logLevelSchema,
864
+ skipConfigLogging: skipConfigLoggingSchema,
865
+ registry: registrySchema,
866
+ configFile: configFileSchema,
867
+ colors: z.union([colorsSchema, themeColorsSchema]),
868
+ extensions: extensionsSchema
869
+ });
870
+ schemaRegistry.add(extensionsSchema, {
871
+ 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."
872
+ });
583
873
 
584
874
  // ../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs
585
875
  function isPlainObject(value) {
@@ -1039,7 +1329,10 @@ var getConfigEnv = () => {
1039
1329
  email: process.env[`${prefix}BOT_EMAIL`] || void 0
1040
1330
  },
1041
1331
  release: {
1042
- banner: process.env[`${prefix}RELEASE_BANNER`] || void 0,
1332
+ banner: {
1333
+ url: process.env[`${prefix}RELEASE_BANNER_URL`] || void 0,
1334
+ alt: process.env[`${prefix}RELEASE_BANNER_ALT`] || void 0
1335
+ },
1043
1336
  header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
1044
1337
  footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
1045
1338
  },
@@ -1116,11 +1409,11 @@ var getConfigEnv = () => {
1116
1409
  );
1117
1410
  config.colors = themeNames.length > 0 ? themeNames.reduce(
1118
1411
  (ret, themeName) => {
1119
- ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
1412
+ ret[themeName] = getThemeColorsEnv(prefix, themeName);
1120
1413
  return ret;
1121
1414
  },
1122
1415
  {}
1123
- ) : getThemeColorConfigEnv(prefix);
1416
+ ) : getThemeColorsEnv(prefix);
1124
1417
  if (config.docs === STORM_DEFAULT_DOCS) {
1125
1418
  if (config.homepage === STORM_DEFAULT_HOMEPAGE) {
1126
1419
  config.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
@@ -1147,11 +1440,11 @@ var getConfigEnv = () => {
1147
1440
  }
1148
1441
  return config;
1149
1442
  };
1150
- var getThemeColorConfigEnv = (prefix, theme) => {
1443
+ var getThemeColorsEnv = (prefix, theme) => {
1151
1444
  const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
1152
- return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
1445
+ return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorsEnv(prefix + themeName) : getSingleThemeColorsEnv(prefix + themeName);
1153
1446
  };
1154
- var getSingleThemeColorConfigEnv = (prefix) => {
1447
+ var getSingleThemeColorsEnv = (prefix) => {
1155
1448
  const gradient = [];
1156
1449
  if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
1157
1450
  gradient.push(
@@ -1183,15 +1476,13 @@ var getSingleThemeColorConfigEnv = (prefix) => {
1183
1476
  gradient
1184
1477
  };
1185
1478
  };
1186
- var getMultiThemeColorConfigEnv = (prefix) => {
1479
+ var getMultiThemeColorsEnv = (prefix) => {
1187
1480
  return {
1188
- light: getBaseThemeColorConfigEnv(
1189
- `${prefix}_LIGHT_`
1190
- ),
1191
- dark: getBaseThemeColorConfigEnv(`${prefix}_DARK_`)
1481
+ light: getBaseThemeColorsEnv(`${prefix}_LIGHT_`),
1482
+ dark: getBaseThemeColorsEnv(`${prefix}_DARK_`)
1192
1483
  };
1193
1484
  };
1194
- var getBaseThemeColorConfigEnv = (prefix) => {
1485
+ var getBaseThemeColorsEnv = (prefix) => {
1195
1486
  const gradient = [];
1196
1487
  if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
1197
1488
  gradient.push(
@@ -1270,7 +1561,16 @@ var setConfigEnv = (config) => {
1270
1561
  process.env[`${prefix}ERROR_URL`] = config.error.url;
1271
1562
  }
1272
1563
  if (config.release) {
1273
- process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
1564
+ if (config.release.banner) {
1565
+ if (typeof config.release.banner === "string") {
1566
+ process.env[`${prefix}RELEASE_BANNER`] = config.release.banner;
1567
+ process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner;
1568
+ } else {
1569
+ process.env[`${prefix}RELEASE_BANNER`] = config.release.banner.url;
1570
+ process.env[`${prefix}RELEASE_BANNER_URL`] = config.release.banner.url;
1571
+ process.env[`${prefix}RELEASE_BANNER_ALT`] = config.release.banner.alt;
1572
+ }
1573
+ }
1274
1574
  process.env[`${prefix}RELEASE_HEADER`] = config.release.header;
1275
1575
  process.env[`${prefix}RELEASE_FOOTER`] = config.release.footer;
1276
1576
  }
@@ -1413,10 +1713,10 @@ var setConfigEnv = (config) => {
1413
1713
  }
1414
1714
  if (config.colors?.base?.light || config.colors?.base?.dark) {
1415
1715
  for (const key of Object.keys(config.colors)) {
1416
- setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
1716
+ setThemeColorsEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
1417
1717
  }
1418
1718
  } else {
1419
- setThemeColorConfigEnv(
1719
+ setThemeColorsEnv(
1420
1720
  `${prefix}COLOR_`,
1421
1721
  config.colors
1422
1722
  );
@@ -1471,10 +1771,10 @@ var setConfigEnv = (config) => {
1471
1771
  }
1472
1772
  }
1473
1773
  };
1474
- var setThemeColorConfigEnv = (prefix, config) => {
1475
- return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
1774
+ var setThemeColorsEnv = (prefix, config) => {
1775
+ return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorsEnv(prefix, config) : setSingleThemeColorsEnv(prefix, config);
1476
1776
  };
1477
- var setSingleThemeColorConfigEnv = (prefix, config) => {
1777
+ var setSingleThemeColorsEnv = (prefix, config) => {
1478
1778
  if (config.dark) {
1479
1779
  process.env[`${prefix}DARK`] = config.dark;
1480
1780
  }
@@ -1523,13 +1823,13 @@ var setSingleThemeColorConfigEnv = (prefix, config) => {
1523
1823
  }
1524
1824
  }
1525
1825
  };
1526
- var setMultiThemeColorConfigEnv = (prefix, config) => {
1826
+ var setMultiThemeColorsEnv = (prefix, config) => {
1527
1827
  return {
1528
- light: setBaseThemeColorConfigEnv(`${prefix}LIGHT_`, config.light),
1529
- dark: setBaseThemeColorConfigEnv(`${prefix}DARK_`, config.dark)
1828
+ light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config.light),
1829
+ dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config.dark)
1530
1830
  };
1531
1831
  };
1532
- var setBaseThemeColorConfigEnv = (prefix, config) => {
1832
+ var setBaseThemeColorsEnv = (prefix, config) => {
1533
1833
  if (config.foreground) {
1534
1834
  process.env[`${prefix}FOREGROUND`] = config.foreground;
1535
1835
  }
@@ -1607,7 +1907,7 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
1607
1907
  );
1608
1908
  try {
1609
1909
  result = applyDefaultConfig(
1610
- await stormWorkspaceConfigSchema.parseAsync(configInput)
1910
+ await workspaceConfigSchema.parseAsync(configInput)
1611
1911
  );
1612
1912
  result.workspaceRoot ??= _workspaceRoot;
1613
1913
  } catch (error) {