@storm-software/workspace-tools 1.277.34 → 1.278.4

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.
Files changed (212) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/README.md +1 -2
  3. package/config/base.json +14 -117
  4. package/dist/{chunk-6RHHYXZE.mjs → chunk-2AZFAMT2.mjs} +1 -1
  5. package/dist/chunk-2CDSXWFA.js +311 -0
  6. package/dist/chunk-2LY7DGBH.mjs +336 -0
  7. package/dist/{chunk-UXALGSQC.js → chunk-452FQZ3B.js} +2 -2
  8. package/dist/{chunk-3VAHUUNQ.mjs → chunk-47VSL76K.mjs} +1 -1
  9. package/dist/{chunk-PGIUP33N.mjs → chunk-47X3OTR5.mjs} +4 -4
  10. package/dist/{chunk-3TYXXJKV.js → chunk-4DLKOUQA.js} +2 -2
  11. package/dist/{chunk-NFK6PGAC.mjs → chunk-5FBIPGPD.mjs} +1 -1
  12. package/dist/{chunk-XPFT4BMH.mjs → chunk-5KP5KWGU.mjs} +1 -1
  13. package/dist/{chunk-S2N53PIP.js → chunk-63DISBXN.js} +2 -2
  14. package/dist/{chunk-NQ525HTH.mjs → chunk-64LWOWPE.mjs} +4 -4
  15. package/dist/{chunk-XBRR6YS3.js → chunk-73IC2JQV.js} +2 -2
  16. package/dist/{chunk-GH5ABWPU.mjs → chunk-7DLHAWLG.mjs} +1 -1
  17. package/dist/{chunk-J2Z4WP3E.js → chunk-A77PFJ72.js} +2 -2
  18. package/dist/{chunk-65P2PGPR.js → chunk-AH253N44.js} +5 -5
  19. package/dist/{chunk-6WBXO6UH.js → chunk-ARTBWDR4.js} +2 -2
  20. package/dist/{chunk-JRQIA2WV.js → chunk-BZTR7YL6.js} +2 -2
  21. package/dist/{chunk-7IPJE3E3.mjs → chunk-CCMBHSV7.mjs} +4 -4
  22. package/dist/{chunk-7YUXBCFS.js → chunk-CHSTJ3AR.js} +13 -11
  23. package/dist/{chunk-Q7MIY2SX.mjs → chunk-D26STI4S.mjs} +1 -1
  24. package/dist/{chunk-RVJSZ7SI.js → chunk-DJLGYPRA.js} +4 -4
  25. package/dist/{chunk-OFNVRO2Q.js → chunk-DLJY6UOI.js} +7 -7
  26. package/dist/{chunk-TJ3JPU6C.js → chunk-ESFH6QVE.js} +2 -2
  27. package/dist/{chunk-3ZBMLG4D.mjs → chunk-FHBOYSRN.mjs} +17 -13
  28. package/dist/{chunk-3CPOV3N6.mjs → chunk-FVGLL54Y.mjs} +1 -1
  29. package/dist/{chunk-R7DNGWVO.js → chunk-G3YKHGPE.js} +2 -2
  30. package/dist/{chunk-QPCOSMXY.mjs → chunk-GNIDPNI3.mjs} +2 -2
  31. package/dist/{chunk-OQUI7H7Z.js → chunk-GWT4ZQ6Y.js} +2 -2
  32. package/dist/{chunk-4WHSR4FK.js → chunk-HNFKVXBV.js} +0 -1
  33. package/dist/chunk-IBTPJDV6.js +336 -0
  34. package/dist/{chunk-PPMPCT7K.mjs → chunk-JCEMECUD.mjs} +2 -2
  35. package/dist/{chunk-V53473BD.js → chunk-JX3KVFO5.js} +2 -2
  36. package/dist/{chunk-YDXXSCNG.mjs → chunk-K7FEZWBA.mjs} +1 -1
  37. package/dist/{chunk-VLOTOQYE.mjs → chunk-KLAMLNPM.mjs} +1 -1
  38. package/dist/{chunk-ZLVVUMYO.js → chunk-KRAHIMKO.js} +2 -2
  39. package/dist/{chunk-BDA4N25E.js → chunk-KX7XTUYW.js} +461 -43
  40. package/dist/{chunk-X6PHOMFB.mjs → chunk-KYGWN2MB.mjs} +1 -1
  41. package/dist/{chunk-V5564COA.mjs → chunk-LVIDSVDC.mjs} +4 -4
  42. package/dist/{chunk-LSF4BHCI.mjs → chunk-M5Z57CUO.mjs} +0 -1
  43. package/dist/{chunk-KZIA4CGL.js → chunk-MZEFNYBT.js} +24 -24
  44. package/dist/{chunk-K262HGVZ.mjs → chunk-N46RWKEK.mjs} +1 -1
  45. package/dist/{chunk-5VY5IBBQ.js → chunk-NSSJMQFD.js} +16 -12
  46. package/dist/{chunk-L4NCVOB5.mjs → chunk-OWKH2ZBQ.mjs} +1 -1
  47. package/dist/{chunk-VRPEYRWI.mjs → chunk-PIK7KYVE.mjs} +1 -1
  48. package/dist/{chunk-PG7GBHUM.mjs → chunk-PYS5P7QE.mjs} +430 -12
  49. package/dist/{chunk-6UFOMB3R.mjs → chunk-R3OLB3C6.mjs} +141 -145
  50. package/dist/{chunk-TZJGO4US.js → chunk-RANQ4TXU.js} +141 -145
  51. package/dist/{chunk-HWCERW6A.mjs → chunk-RMWG74QA.mjs} +1 -1
  52. package/dist/{chunk-EUWPFP5C.mjs → chunk-SVIG7SR3.mjs} +1 -1
  53. package/dist/{chunk-ZRTYYXDL.mjs → chunk-UGBVA3KE.mjs} +6 -4
  54. package/dist/{chunk-6XYAQUU3.js → chunk-UGJVZ6LI.js} +26 -26
  55. package/dist/{chunk-AQOT2IAM.js → chunk-UTAJHUJL.js} +34 -34
  56. package/dist/{chunk-A5CKB6IJ.js → chunk-UZ63ALZQ.js} +2 -2
  57. package/dist/{chunk-ZFA26D42.mjs → chunk-V2UGPEY2.mjs} +1 -1
  58. package/dist/chunk-V44DYGWX.mjs +311 -0
  59. package/dist/{chunk-3OVLNULV.js → chunk-VR3OLKAI.js} +2 -2
  60. package/dist/{chunk-AZ5HDBYX.mjs → chunk-VVCIYZJD.mjs} +7 -7
  61. package/dist/{chunk-55FODDLQ.mjs → chunk-WASXXREW.mjs} +4 -4
  62. package/dist/{chunk-ABUZEUF7.js → chunk-WRXLSZ6I.js} +2 -2
  63. package/dist/{chunk-QEU3B4T6.js → chunk-YBUD4GFC.js} +21 -21
  64. package/dist/{chunk-EC7YQEHT.js → chunk-YEUILWDR.js} +2 -2
  65. package/dist/{chunk-E566KBB3.js → chunk-ZVL2TRR6.js} +6 -6
  66. package/dist/{executor-oIXMAz-g.d.ts → executor-BZYJEb9V.d.ts} +1 -1
  67. package/dist/{executor-DPIWxm-x.d.mts → executor-Bez_tWxf.d.mts} +1 -1
  68. package/dist/{executor-B8wLnXnx.d.mts → executor-CUlX29YN.d.mts} +1 -1
  69. package/dist/{executor-CFBDS3tc.d.mts → executor-CwENKkEy.d.mts} +1 -1
  70. package/dist/{executor-L8Jmwybf.d.ts → executor-CysN0MTH.d.ts} +1 -1
  71. package/dist/{executor-CRnQhNlT.d.ts → executor-D3Tip-ad.d.ts} +1 -1
  72. package/dist/{executor-BSkPYkkP.d.mts → executor-DJb8r-Zb.d.mts} +1 -1
  73. package/dist/{executor-BpITPYcR.d.ts → executor-_WT0Qd2F.d.ts} +1 -1
  74. package/dist/executors.d.mts +5 -5
  75. package/dist/executors.d.ts +5 -5
  76. package/dist/executors.js +19 -19
  77. package/dist/executors.mjs +18 -18
  78. package/dist/{generator-rgiO0GJQ.d.ts → generator-Biz_Ai4B.d.ts} +1 -1
  79. package/dist/{generator-Cb58mGnB.d.mts → generator-CVPI52z3.d.mts} +2 -2
  80. package/dist/{generator-CJABg49g.d.mts → generator-CYCzda2K.d.mts} +2 -2
  81. package/dist/{generator-Cj8BzNWS.d.ts → generator-CmkSA-dv.d.ts} +2 -2
  82. package/dist/{generator-CAV7jT3f.d.mts → generator-D7tljo-K.d.mts} +1 -1
  83. package/dist/{generator-BIMz19YK.d.mts → generator-DKZjOzNw.d.mts} +2 -2
  84. package/dist/{generator-DTjXg4Lz.d.mts → generator-De9XOTip.d.mts} +2 -2
  85. package/dist/{generator-mIOdDYVo.d.ts → generator-Dk1ihwF-.d.ts} +2 -2
  86. package/dist/{generator-Sm7r9ETR.d.ts → generator-DpjPMueC.d.ts} +2 -2
  87. package/dist/{generator-C0oESGRU.d.ts → generator-Dyk2TjIp.d.ts} +1 -1
  88. package/dist/{generator-Oe3vHbZC.d.mts → generator-o2v2Q4At.d.mts} +1 -1
  89. package/dist/{generator-Cf30wgA4.d.ts → generator-ujd2pu2I.d.ts} +2 -2
  90. package/dist/generators.d.mts +8 -8
  91. package/dist/generators.d.ts +8 -8
  92. package/dist/generators.js +13 -13
  93. package/dist/generators.mjs +12 -12
  94. package/dist/index.d.mts +14 -13
  95. package/dist/index.d.ts +14 -13
  96. package/dist/index.js +40 -30
  97. package/dist/index.mjs +40 -30
  98. package/dist/src/base/base-executor.d.mts +2 -2
  99. package/dist/src/base/base-executor.d.ts +2 -2
  100. package/dist/src/base/base-executor.js +6 -6
  101. package/dist/src/base/base-executor.mjs +5 -5
  102. package/dist/src/base/base-generator.d.mts +2 -2
  103. package/dist/src/base/base-generator.d.ts +2 -2
  104. package/dist/src/base/base-generator.js +6 -6
  105. package/dist/src/base/base-generator.mjs +5 -5
  106. package/dist/src/base/index.d.mts +2 -2
  107. package/dist/src/base/index.d.ts +2 -2
  108. package/dist/src/base/index.js +7 -7
  109. package/dist/src/base/index.mjs +6 -6
  110. package/dist/src/executors/cargo-build/executor.js +7 -7
  111. package/dist/src/executors/cargo-build/executor.mjs +6 -6
  112. package/dist/src/executors/cargo-check/executor.js +7 -7
  113. package/dist/src/executors/cargo-check/executor.mjs +6 -6
  114. package/dist/src/executors/cargo-clippy/executor.js +7 -7
  115. package/dist/src/executors/cargo-clippy/executor.mjs +6 -6
  116. package/dist/src/executors/cargo-doc/executor.js +7 -7
  117. package/dist/src/executors/cargo-doc/executor.mjs +6 -6
  118. package/dist/src/executors/cargo-format/executor.js +7 -7
  119. package/dist/src/executors/cargo-format/executor.mjs +6 -6
  120. package/dist/src/executors/cargo-publish/executor.js +4 -6
  121. package/dist/src/executors/cargo-publish/executor.mjs +3 -5
  122. package/dist/src/executors/clean-package/executor.d.mts +1 -1
  123. package/dist/src/executors/clean-package/executor.d.ts +1 -1
  124. package/dist/src/executors/clean-package/executor.js +9 -8
  125. package/dist/src/executors/clean-package/executor.mjs +6 -5
  126. package/dist/src/executors/esbuild/executor.d.mts +2 -2
  127. package/dist/src/executors/esbuild/executor.d.ts +2 -2
  128. package/dist/src/executors/esbuild/executor.js +7 -7
  129. package/dist/src/executors/esbuild/executor.mjs +6 -6
  130. package/dist/src/executors/npm-publish/executor.js +5 -6
  131. package/dist/src/executors/npm-publish/executor.mjs +4 -5
  132. package/dist/src/executors/size-limit/executor.d.mts +2 -2
  133. package/dist/src/executors/size-limit/executor.d.ts +2 -2
  134. package/dist/src/executors/size-limit/executor.js +7 -7
  135. package/dist/src/executors/size-limit/executor.mjs +6 -6
  136. package/dist/src/executors/typia/executor.d.mts +2 -2
  137. package/dist/src/executors/typia/executor.d.ts +2 -2
  138. package/dist/src/executors/typia/executor.js +7 -7
  139. package/dist/src/executors/typia/executor.mjs +6 -6
  140. package/dist/src/executors/unbuild/executor.d.mts +2 -2
  141. package/dist/src/executors/unbuild/executor.d.ts +2 -2
  142. package/dist/src/executors/unbuild/executor.js +7 -7
  143. package/dist/src/executors/unbuild/executor.mjs +6 -6
  144. package/dist/src/generators/browser-library/generator.d.mts +3 -3
  145. package/dist/src/generators/browser-library/generator.d.ts +3 -3
  146. package/dist/src/generators/browser-library/generator.js +7 -7
  147. package/dist/src/generators/browser-library/generator.mjs +6 -6
  148. package/dist/src/generators/config-schema/generator.d.mts +3 -3
  149. package/dist/src/generators/config-schema/generator.d.ts +3 -3
  150. package/dist/src/generators/config-schema/generator.js +7 -7
  151. package/dist/src/generators/config-schema/generator.mjs +6 -6
  152. package/dist/src/generators/neutral-library/generator.d.mts +3 -3
  153. package/dist/src/generators/neutral-library/generator.d.ts +3 -3
  154. package/dist/src/generators/neutral-library/generator.js +7 -7
  155. package/dist/src/generators/neutral-library/generator.mjs +6 -6
  156. package/dist/src/generators/node-library/generator.d.mts +3 -3
  157. package/dist/src/generators/node-library/generator.d.ts +3 -3
  158. package/dist/src/generators/node-library/generator.js +7 -7
  159. package/dist/src/generators/node-library/generator.mjs +6 -6
  160. package/dist/src/generators/preset/generator.d.mts +3 -3
  161. package/dist/src/generators/preset/generator.d.ts +3 -3
  162. package/dist/src/generators/preset/generator.js +7 -7
  163. package/dist/src/generators/preset/generator.mjs +6 -6
  164. package/dist/src/generators/release-version/generator.d.mts +2 -2
  165. package/dist/src/generators/release-version/generator.d.ts +2 -2
  166. package/dist/src/generators/release-version/generator.js +6 -6
  167. package/dist/src/generators/release-version/generator.mjs +5 -5
  168. package/dist/src/plugins/rust/cargo-toml.js +3 -2
  169. package/dist/src/plugins/rust/cargo-toml.mjs +2 -1
  170. package/dist/src/plugins/rust/index.js +3 -2
  171. package/dist/src/plugins/rust/index.mjs +2 -1
  172. package/dist/src/plugins/typescript/index.js +3 -3
  173. package/dist/src/plugins/typescript/index.mjs +2 -2
  174. package/dist/src/plugins/typescript/project-config.js +3 -3
  175. package/dist/src/plugins/typescript/project-config.mjs +2 -2
  176. package/dist/src/plugins/typescript/tsup.js +22 -19
  177. package/dist/src/plugins/typescript/tsup.mjs +21 -18
  178. package/dist/src/plugins/typescript/untyped-schema.js +18 -15
  179. package/dist/src/plugins/typescript/untyped-schema.mjs +18 -15
  180. package/dist/src/types.d.mts +2 -2
  181. package/dist/src/types.d.ts +2 -2
  182. package/dist/src/utils/apply-workspace-tokens.d.mts +1 -1
  183. package/dist/src/utils/apply-workspace-tokens.d.ts +1 -1
  184. package/dist/src/utils/apply-workspace-tokens.js +3 -3
  185. package/dist/src/utils/apply-workspace-tokens.mjs +2 -2
  186. package/dist/src/utils/get-project-configurations.js +3 -3
  187. package/dist/src/utils/get-project-configurations.mjs +2 -2
  188. package/dist/src/utils/index.d.mts +4 -3
  189. package/dist/src/utils/index.d.ts +4 -3
  190. package/dist/src/utils/index.js +19 -9
  191. package/dist/src/utils/index.mjs +20 -10
  192. package/dist/src/utils/nx-json.d.mts +57 -0
  193. package/dist/src/utils/nx-json.d.ts +57 -0
  194. package/dist/src/utils/nx-json.js +11 -0
  195. package/dist/src/utils/nx-json.mjs +11 -0
  196. package/dist/src/utils/package-helpers.js +4 -5
  197. package/dist/src/utils/package-helpers.mjs +3 -4
  198. package/dist/src/utils/plugin-helpers.d.mts +7 -6
  199. package/dist/src/utils/plugin-helpers.d.ts +7 -6
  200. package/dist/src/utils/plugin-helpers.js +4 -2
  201. package/dist/src/utils/plugin-helpers.mjs +5 -3
  202. package/dist/src/utils/project-tags.d.mts +2 -2
  203. package/dist/src/utils/project-tags.d.ts +2 -2
  204. package/dist/{types-DvynnIqE.d.mts → types-DWiPwz5j.d.mts} +12 -6
  205. package/dist/{types-DvynnIqE.d.ts → types-DWiPwz5j.d.ts} +12 -6
  206. package/dist/{types-jXJWvL7s.d.mts → types-DXRPpxuL.d.mts} +1 -1
  207. package/dist/{types-SUxfrM7H.d.ts → types-ifEQCCcO.d.ts} +1 -1
  208. package/package.json +5 -5
  209. package/dist/chunk-BP22TRDI.js +0 -665
  210. package/dist/chunk-SW2AFRXA.mjs +0 -665
  211. /package/dist/{chunk-JGP4YWZY.js → chunk-DO2X7OZO.js} +0 -0
  212. /package/dist/{chunk-6YZ3OUJB.mjs → chunk-XCVH63OO.mjs} +0 -0
@@ -1,32 +1,410 @@
1
1
  import {
2
- COLOR_KEYS,
3
2
  LogLevel,
4
- STORM_DEFAULT_DOCS,
5
- STORM_DEFAULT_HOMEPAGE,
6
- STORM_DEFAULT_LICENSING,
7
- applyDefaultConfig,
8
3
  formatLogMessage,
9
4
  getLogLevel,
10
5
  getLogLevelLabel,
11
- getPackageJsonConfig,
12
- stormWorkspaceConfigSchema,
13
6
  writeTrace,
14
7
  writeWarning
15
- } from "./chunk-SW2AFRXA.mjs";
8
+ } from "./chunk-V44DYGWX.mjs";
16
9
  import {
17
10
  findWorkspaceRoot
18
- } from "./chunk-LSF4BHCI.mjs";
11
+ } from "./chunk-M5Z57CUO.mjs";
19
12
  import {
20
13
  correctPaths,
21
14
  joinPaths
22
15
  } from "./chunk-U7JFVMCK.mjs";
23
16
 
17
+ // ../config/src/schema.ts
18
+ import * as z from "zod";
19
+
20
+ // ../config/src/constants.ts
21
+ var STORM_DEFAULT_DOCS = "https://docs.stormsoftware.com";
22
+ var STORM_DEFAULT_HOMEPAGE = "https://stormsoftware.com";
23
+ var STORM_DEFAULT_CONTACT = "https://stormsoftware.com/contact";
24
+ var STORM_DEFAULT_LICENSING = "https://stormsoftware.com/license";
25
+ var STORM_DEFAULT_LICENSE = "Apache-2.0";
26
+ var STORM_DEFAULT_SOCIAL_TWITTER = "StormSoftwareHQ";
27
+ var STORM_DEFAULT_SOCIAL_DISCORD = "https://discord.gg/MQ6YVzakM5";
28
+ var STORM_DEFAULT_SOCIAL_TELEGRAM = "https://t.me/storm_software";
29
+ var STORM_DEFAULT_SOCIAL_SLACK = "https://join.slack.com/t/storm-software/shared_invite/zt-2gsmk04hs-i6yhK_r6urq0dkZYAwq2pA";
30
+ var STORM_DEFAULT_SOCIAL_MEDIUM = "https://medium.com/storm-software";
31
+ var STORM_DEFAULT_SOCIAL_GITHUB = "https://github.com/storm-software";
32
+ var STORM_DEFAULT_RELEASE_FOOTER = `
33
+ 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.
34
+
35
+ Join us on [Discord](${STORM_DEFAULT_SOCIAL_DISCORD}) to chat with the team, receive release notifications, ask questions, and get involved.
36
+
37
+ 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!
38
+ `;
39
+ var STORM_DEFAULT_ERROR_CODES_FILE = "tools/errors/codes.json";
40
+
41
+ // ../config/src/schema.ts
42
+ var ColorSchema = z.string().trim().toLowerCase().regex(/^#([0-9a-f]{3}){1,2}$/i).length(7);
43
+ var DarkColorSchema = ColorSchema.default("#151718").describe(
44
+ "The dark background color of the workspace"
45
+ );
46
+ var LightColorSchema = ColorSchema.default("#cbd5e1").describe(
47
+ "The light background color of the workspace"
48
+ );
49
+ var BrandColorSchema = ColorSchema.default("#1fb2a6").describe(
50
+ "The primary brand specific color of the workspace"
51
+ );
52
+ var AlternateColorSchema = ColorSchema.optional().describe(
53
+ "The alternate brand specific color of the workspace"
54
+ );
55
+ var AccentColorSchema = ColorSchema.optional().describe(
56
+ "The secondary brand specific color of the workspace"
57
+ );
58
+ var LinkColorSchema = ColorSchema.default("#3fa6ff").describe(
59
+ "The color used to display hyperlink text"
60
+ );
61
+ var HelpColorSchema = ColorSchema.default("#818cf8").describe(
62
+ "The second brand specific color of the workspace"
63
+ );
64
+ var SuccessColorSchema = ColorSchema.default("#45b27e").describe(
65
+ "The success color of the workspace"
66
+ );
67
+ var InfoColorSchema = ColorSchema.default("#38bdf8").describe(
68
+ "The informational color of the workspace"
69
+ );
70
+ var WarningColorSchema = ColorSchema.default("#f3d371").describe(
71
+ "The warning color of the workspace"
72
+ );
73
+ var DangerColorSchema = ColorSchema.default("#d8314a").describe(
74
+ "The danger color of the workspace"
75
+ );
76
+ var FatalColorSchema = ColorSchema.optional().describe(
77
+ "The fatal color of the workspace"
78
+ );
79
+ var PositiveColorSchema = ColorSchema.default("#4ade80").describe(
80
+ "The positive number color of the workspace"
81
+ );
82
+ var NegativeColorSchema = ColorSchema.default("#ef4444").describe(
83
+ "The negative number color of the workspace"
84
+ );
85
+ var GradientStopsSchema = z.array(ColorSchema).optional().describe(
86
+ "The color stops for the base gradient color pattern used in the workspace"
87
+ );
88
+ var DarkThemeColorConfigSchema = z.object({
89
+ foreground: LightColorSchema,
90
+ background: DarkColorSchema,
91
+ brand: BrandColorSchema,
92
+ alternate: AlternateColorSchema,
93
+ accent: AccentColorSchema,
94
+ link: LinkColorSchema,
95
+ help: HelpColorSchema,
96
+ success: SuccessColorSchema,
97
+ info: InfoColorSchema,
98
+ warning: WarningColorSchema,
99
+ danger: DangerColorSchema,
100
+ fatal: FatalColorSchema,
101
+ positive: PositiveColorSchema,
102
+ negative: NegativeColorSchema,
103
+ gradient: GradientStopsSchema
104
+ });
105
+ var LightThemeColorConfigSchema = z.object({
106
+ foreground: DarkColorSchema,
107
+ background: LightColorSchema,
108
+ brand: BrandColorSchema,
109
+ alternate: AlternateColorSchema,
110
+ accent: AccentColorSchema,
111
+ link: LinkColorSchema,
112
+ help: HelpColorSchema,
113
+ success: SuccessColorSchema,
114
+ info: InfoColorSchema,
115
+ warning: WarningColorSchema,
116
+ danger: DangerColorSchema,
117
+ fatal: FatalColorSchema,
118
+ positive: PositiveColorSchema,
119
+ negative: NegativeColorSchema,
120
+ gradient: GradientStopsSchema
121
+ });
122
+ var MultiThemeColorConfigSchema = z.object({
123
+ dark: DarkThemeColorConfigSchema,
124
+ light: LightThemeColorConfigSchema
125
+ });
126
+ var SingleThemeColorConfigSchema = z.object({
127
+ dark: DarkColorSchema,
128
+ light: LightColorSchema,
129
+ brand: BrandColorSchema,
130
+ alternate: AlternateColorSchema,
131
+ accent: AccentColorSchema,
132
+ link: LinkColorSchema,
133
+ help: HelpColorSchema,
134
+ success: SuccessColorSchema,
135
+ info: InfoColorSchema,
136
+ warning: WarningColorSchema,
137
+ danger: DangerColorSchema,
138
+ fatal: FatalColorSchema,
139
+ positive: PositiveColorSchema,
140
+ negative: NegativeColorSchema,
141
+ gradient: GradientStopsSchema
142
+ });
143
+ var RegistryUrlConfigSchema = z.url().optional().describe("A remote registry URL used to publish distributable packages");
144
+ var RegistryConfigSchema = z.object({
145
+ github: RegistryUrlConfigSchema,
146
+ npm: RegistryUrlConfigSchema,
147
+ cargo: RegistryUrlConfigSchema,
148
+ cyclone: RegistryUrlConfigSchema,
149
+ container: RegistryUrlConfigSchema
150
+ }).default({}).describe("A list of remote registry URLs used by Storm Software");
151
+ var ColorConfigSchema = SingleThemeColorConfigSchema.or(
152
+ MultiThemeColorConfigSchema
153
+ ).describe("Colors used for various workspace elements");
154
+ var ColorConfigMapSchema = z.record(
155
+ z.union([z.literal("base"), z.string()]),
156
+ ColorConfigSchema
157
+ );
158
+ var ExtendsItemSchema = z.string().trim().describe(
159
+ "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."
160
+ );
161
+ var ExtendsSchema = ExtendsItemSchema.or(
162
+ z.array(ExtendsItemSchema)
163
+ ).describe(
164
+ "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."
165
+ );
166
+ var WorkspaceBotConfigSchema = z.object({
167
+ name: z.string().trim().default("stormie-bot").describe(
168
+ "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
169
+ ),
170
+ email: z.email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
171
+ }).describe(
172
+ "The workspace's bot user's config used to automated various operations tasks"
173
+ );
174
+ var WorkspaceReleaseConfigSchema = z.object({
175
+ banner: z.string().trim().optional().describe(
176
+ "A URL to a banner image used to display the workspace's release"
177
+ ),
178
+ header: z.string().trim().optional().describe(
179
+ "A header message appended to the start of the workspace's release notes"
180
+ ),
181
+ footer: z.string().trim().optional().describe(
182
+ "A footer message appended to the end of the workspace's release notes"
183
+ )
184
+ }).describe("The workspace's release config used during the release process");
185
+ var WorkspaceSocialsConfigSchema = z.object({
186
+ twitter: z.string().trim().default(STORM_DEFAULT_SOCIAL_TWITTER).describe("A Twitter/X account associated with the organization/project"),
187
+ discord: z.string().trim().default(STORM_DEFAULT_SOCIAL_DISCORD).describe("A Discord account associated with the organization/project"),
188
+ telegram: z.string().trim().default(STORM_DEFAULT_SOCIAL_TELEGRAM).describe("A Telegram account associated with the organization/project"),
189
+ slack: z.string().trim().default(STORM_DEFAULT_SOCIAL_SLACK).describe("A Slack account associated with the organization/project"),
190
+ medium: z.string().trim().default(STORM_DEFAULT_SOCIAL_MEDIUM).describe("A Medium account associated with the organization/project"),
191
+ github: z.string().trim().default(STORM_DEFAULT_SOCIAL_GITHUB).describe("A GitHub account associated with the organization/project")
192
+ }).describe(
193
+ "The workspace's account config used to store various social media links"
194
+ );
195
+ var WorkspaceDirectoryConfigSchema = z.object({
196
+ cache: z.string().trim().optional().describe(
197
+ "The directory used to store the environment's cached file data"
198
+ ),
199
+ data: z.string().trim().optional().describe("The directory used to store the environment's data files"),
200
+ config: z.string().trim().optional().describe(
201
+ "The directory used to store the environment's configuration files"
202
+ ),
203
+ temp: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
204
+ log: z.string().trim().optional().describe("The directory used to store the environment's temp files"),
205
+ build: z.string().trim().default("dist").describe(
206
+ "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
207
+ )
208
+ }).describe(
209
+ "Various directories used by the workspace to store data, cache, and configuration files"
210
+ );
211
+ var errorConfigSchema = z.object({
212
+ codesFile: z.string().trim().default(STORM_DEFAULT_ERROR_CODES_FILE).describe("The path to the workspace's error codes JSON file"),
213
+ url: z.url().optional().describe(
214
+ "A URL to a page that looks up the workspace's error messages given a specific error code"
215
+ )
216
+ }).describe("The workspace's error config used during the error process");
217
+ var organizationConfigSchema = z.object({
218
+ name: z.string().trim().describe("The name of the organization"),
219
+ description: z.string().trim().optional().describe("A description of the organization"),
220
+ logo: z.url().optional().describe("A URL to the organization's logo image"),
221
+ icon: z.url().optional().describe("A URL to the organization's icon image"),
222
+ url: z.url().optional().describe(
223
+ "A URL to a page that provides more information about the organization"
224
+ )
225
+ }).describe("The workspace's organization details");
226
+ var stormWorkspaceConfigSchema = z.object({
227
+ $schema: z.string().trim().default(
228
+ "https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
229
+ ).describe(
230
+ "The URL or file path to the JSON schema file that describes the Storm configuration file"
231
+ ),
232
+ extends: ExtendsSchema.optional(),
233
+ name: z.string().trim().toLowerCase().optional().describe(
234
+ "The name of the service/package/scope using this configuration"
235
+ ),
236
+ namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
237
+ organization: organizationConfigSchema.or(z.string().trim().describe("The organization of the workspace")).optional().describe(
238
+ "The organization of the workspace. This can be a string or an object containing the organization's details"
239
+ ),
240
+ repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
241
+ license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
242
+ homepage: z.url().optional().describe("The homepage of the workspace"),
243
+ docs: z.url().optional().describe("The documentation site for the workspace"),
244
+ portal: z.url().optional().describe("The development portal site for the workspace"),
245
+ licensing: z.url().optional().describe("The licensing site for the workspace"),
246
+ contact: z.url().optional().describe("The contact site for the workspace"),
247
+ support: z.url().optional().describe(
248
+ "The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
249
+ ),
250
+ branch: z.string().trim().default("main").describe("The branch of the workspace"),
251
+ preid: z.string().optional().describe("A tag specifying the version pre-release identifier"),
252
+ owner: z.string().trim().default("@storm-software/admin").describe("The owner of the package"),
253
+ bot: WorkspaceBotConfigSchema,
254
+ release: WorkspaceReleaseConfigSchema,
255
+ socials: WorkspaceSocialsConfigSchema,
256
+ error: errorConfigSchema,
257
+ mode: z.string().trim().default("production").describe("The current runtime environment mode for the package"),
258
+ workspaceRoot: z.string().trim().describe("The root directory of the workspace"),
259
+ skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
260
+ directories: WorkspaceDirectoryConfigSchema,
261
+ packageManager: z.enum(["npm", "yarn", "pnpm", "bun"]).default("npm").describe(
262
+ "The JavaScript/TypeScript package manager used by the repository"
263
+ ),
264
+ timezone: z.string().trim().default("America/New_York").describe("The default timezone of the workspace"),
265
+ locale: z.string().trim().default("en-US").describe("The default locale of the workspace"),
266
+ logLevel: z.enum([
267
+ "silent",
268
+ "fatal",
269
+ "error",
270
+ "warn",
271
+ "success",
272
+ "info",
273
+ "debug",
274
+ "trace",
275
+ "all"
276
+ ]).default("info").describe(
277
+ "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`)."
278
+ ),
279
+ skipConfigLogging: z.boolean().optional().describe(
280
+ "Should the logging of the current Storm Workspace configuration be skipped?"
281
+ ),
282
+ registry: RegistryConfigSchema,
283
+ configFile: z.string().trim().nullable().default(null).describe(
284
+ "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
285
+ ),
286
+ colors: ColorConfigSchema.or(ColorConfigMapSchema).describe(
287
+ "Storm theme config values used for styling various package elements"
288
+ ),
289
+ extensions: z.record(z.string(), z.any()).optional().default({}).describe("Configuration of each used extension")
290
+ }).describe(
291
+ "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."
292
+ );
293
+
294
+ // ../config/src/types.ts
295
+ var COLOR_KEYS = [
296
+ "dark",
297
+ "light",
298
+ "base",
299
+ "brand",
300
+ "alternate",
301
+ "accent",
302
+ "link",
303
+ "success",
304
+ "help",
305
+ "info",
306
+ "warning",
307
+ "danger",
308
+ "fatal",
309
+ "positive",
310
+ "negative"
311
+ ];
312
+
24
313
  // ../config-tools/src/create-storm-config.ts
25
314
  import defu2 from "defu";
26
315
 
27
316
  // ../config-tools/src/config-file/get-config-file.ts
28
317
  import { loadConfig } from "c12";
29
318
  import defu from "defu";
319
+
320
+ // ../config-tools/src/utilities/get-default-config.ts
321
+ import { existsSync } from "node:fs";
322
+ import { readFile } from "node:fs/promises";
323
+ import { join } from "node:path";
324
+ async function getPackageJsonConfig(root) {
325
+ let license = STORM_DEFAULT_LICENSE;
326
+ let homepage = void 0;
327
+ let support = void 0;
328
+ let name = void 0;
329
+ let namespace = void 0;
330
+ let repository = void 0;
331
+ const workspaceRoot = findWorkspaceRoot(root);
332
+ if (existsSync(join(workspaceRoot, "package.json"))) {
333
+ const file = await readFile(
334
+ joinPaths(workspaceRoot, "package.json"),
335
+ "utf8"
336
+ );
337
+ if (file) {
338
+ const packageJson = JSON.parse(file);
339
+ if (packageJson.name) {
340
+ name = packageJson.name;
341
+ }
342
+ if (packageJson.namespace) {
343
+ namespace = packageJson.namespace;
344
+ }
345
+ if (packageJson.repository) {
346
+ if (typeof packageJson.repository === "string") {
347
+ repository = packageJson.repository;
348
+ } else if (packageJson.repository.url) {
349
+ repository = packageJson.repository.url;
350
+ }
351
+ }
352
+ if (packageJson.license) {
353
+ license = packageJson.license;
354
+ }
355
+ if (packageJson.homepage) {
356
+ homepage = packageJson.homepage;
357
+ }
358
+ if (packageJson.bugs) {
359
+ if (typeof packageJson.bugs === "string") {
360
+ support = packageJson.bugs;
361
+ } else if (packageJson.bugs.url) {
362
+ support = packageJson.bugs.url;
363
+ }
364
+ }
365
+ }
366
+ }
367
+ return {
368
+ workspaceRoot,
369
+ name,
370
+ namespace,
371
+ repository,
372
+ license,
373
+ homepage,
374
+ support
375
+ };
376
+ }
377
+ function applyDefaultConfig(config) {
378
+ if (!config.support && config.contact) {
379
+ config.support = config.contact;
380
+ }
381
+ if (!config.contact && config.support) {
382
+ config.contact = config.support;
383
+ }
384
+ if (config.homepage) {
385
+ if (!config.docs) {
386
+ config.docs = `${config.homepage}/docs`;
387
+ }
388
+ if (!config.license) {
389
+ config.license = `${config.homepage}/license`;
390
+ }
391
+ if (!config.support) {
392
+ config.support = `${config.homepage}/support`;
393
+ }
394
+ if (!config.contact) {
395
+ config.contact = `${config.homepage}/contact`;
396
+ }
397
+ if (!config.error?.codesFile || !config?.error?.url) {
398
+ config.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
399
+ if (config.homepage) {
400
+ config.error.url ??= `${config.homepage}/errors`;
401
+ }
402
+ }
403
+ }
404
+ return config;
405
+ }
406
+
407
+ // ../config-tools/src/config-file/get-config-file.ts
30
408
  var getConfigFileByName = async (fileName, filePath, options = {}) => {
31
409
  const workspacePath = filePath || findWorkspaceRoot(filePath);
32
410
  const configs = await Promise.all([
@@ -240,6 +618,19 @@ var getThemeColorConfigEnv = (prefix, theme) => {
240
618
  return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorConfigEnv(prefix + themeName) : getSingleThemeColorConfigEnv(prefix + themeName);
241
619
  };
242
620
  var getSingleThemeColorConfigEnv = (prefix) => {
621
+ const gradient = [];
622
+ if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
623
+ gradient.push(
624
+ process.env[`${prefix}GRADIENT_START`],
625
+ process.env[`${prefix}GRADIENT_END`]
626
+ );
627
+ } else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
628
+ let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
629
+ while (process.env[`${prefix}GRADIENT_${index}`]) {
630
+ gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
631
+ index++;
632
+ }
633
+ }
243
634
  return {
244
635
  dark: process.env[`${prefix}DARK`],
245
636
  light: process.env[`${prefix}LIGHT`],
@@ -254,7 +645,8 @@ var getSingleThemeColorConfigEnv = (prefix) => {
254
645
  danger: process.env[`${prefix}DANGER`],
255
646
  fatal: process.env[`${prefix}FATAL`],
256
647
  positive: process.env[`${prefix}POSITIVE`],
257
- negative: process.env[`${prefix}NEGATIVE`]
648
+ negative: process.env[`${prefix}NEGATIVE`],
649
+ gradient
258
650
  };
259
651
  };
260
652
  var getMultiThemeColorConfigEnv = (prefix) => {
@@ -266,6 +658,19 @@ var getMultiThemeColorConfigEnv = (prefix) => {
266
658
  };
267
659
  };
268
660
  var getBaseThemeColorConfigEnv = (prefix) => {
661
+ const gradient = [];
662
+ if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
663
+ gradient.push(
664
+ process.env[`${prefix}GRADIENT_START`],
665
+ process.env[`${prefix}GRADIENT_END`]
666
+ );
667
+ } else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
668
+ let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
669
+ while (process.env[`${prefix}GRADIENT_${index}`]) {
670
+ gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
671
+ index++;
672
+ }
673
+ }
269
674
  return {
270
675
  foreground: process.env[`${prefix}FOREGROUND`],
271
676
  background: process.env[`${prefix}BACKGROUND`],
@@ -280,7 +685,8 @@ var getBaseThemeColorConfigEnv = (prefix) => {
280
685
  danger: process.env[`${prefix}DANGER`],
281
686
  fatal: process.env[`${prefix}FATAL`],
282
687
  positive: process.env[`${prefix}POSITIVE`],
283
- negative: process.env[`${prefix}NEGATIVE`]
688
+ negative: process.env[`${prefix}NEGATIVE`],
689
+ gradient
284
690
  };
285
691
  };
286
692
 
@@ -411,11 +817,12 @@ var setConfigEnv = (config) => {
411
817
  process.env[`${prefix}TIMEZONE`] = config.timezone;
412
818
  process.env.TZ = config.timezone;
413
819
  process.env.DEFAULT_TIMEZONE = config.timezone;
820
+ process.env.TIMEZONE = config.timezone;
414
821
  }
415
822
  if (config.locale) {
416
823
  process.env[`${prefix}LOCALE`] = config.locale;
417
- process.env.LOCALE = config.locale;
418
824
  process.env.DEFAULT_LOCALE = config.locale;
825
+ process.env.LOCALE = config.locale;
419
826
  process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
420
827
  }
421
828
  if (config.configFile) {
@@ -576,6 +983,11 @@ var setSingleThemeColorConfigEnv = (prefix, config) => {
576
983
  if (config.negative) {
577
984
  process.env[`${prefix}NEGATIVE`] = config.negative;
578
985
  }
986
+ if (config.gradient) {
987
+ for (let i = 0; i < config.gradient.length; i++) {
988
+ process.env[`${prefix}GRADIENT_${i}`] = config.gradient[i];
989
+ }
990
+ }
579
991
  };
580
992
  var setMultiThemeColorConfigEnv = (prefix, config) => {
581
993
  return {
@@ -626,6 +1038,11 @@ var setBaseThemeColorConfigEnv = (prefix, config) => {
626
1038
  if (config.negative) {
627
1039
  process.env[`${prefix}NEGATIVE`] = config.negative;
628
1040
  }
1041
+ if (config.gradient) {
1042
+ for (let i = 0; i < config.gradient.length; i++) {
1043
+ process.env[`${prefix}GRADIENT_${i}`] = config.gradient[i];
1044
+ }
1045
+ }
629
1046
  };
630
1047
 
631
1048
  // ../config-tools/src/create-storm-config.ts
@@ -733,6 +1150,7 @@ var getWorkspaceConfig = (skipLogs = true, options = {}) => {
733
1150
  };
734
1151
 
735
1152
  export {
1153
+ stormWorkspaceConfigSchema,
736
1154
  getConfig,
737
1155
  getWorkspaceConfig
738
1156
  };