@storm-software/config-tools 1.190.119 → 1.190.121

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 (211) hide show
  1. package/README.md +1 -1
  2. package/bin/config.cjs +1213 -1558
  3. package/bin/config.mjs +1271 -0
  4. package/dist/_virtual/_rolldown/runtime.cjs +23 -0
  5. package/dist/config-file/get-config-file.cjs +67 -28
  6. package/dist/config-file/get-config-file.d.cts +5 -5
  7. package/dist/config-file/{get-config-file.d.ts → get-config-file.d.mts} +7 -5
  8. package/dist/config-file/get-config-file.mjs +66 -0
  9. package/dist/config-file/index.cjs +4 -29
  10. package/dist/config-file/index.d.cts +2 -3
  11. package/dist/config-file/index.d.mts +4 -0
  12. package/dist/config-file/index.mjs +5 -0
  13. package/dist/create-storm-config.cjs +115 -34
  14. package/dist/create-storm-config.d.cts +5 -5
  15. package/dist/{create-storm-config.d.ts → create-storm-config.d.mts} +7 -5
  16. package/dist/create-storm-config.mjs +113 -0
  17. package/dist/env/get-env.cjs +202 -11
  18. package/dist/env/get-env.d.cts +5 -5
  19. package/dist/env/{get-env.d.ts → get-env.d.mts} +7 -5
  20. package/dist/env/get-env.mjs +203 -0
  21. package/dist/env/index.cjs +7 -18
  22. package/dist/env/index.d.cts +3 -4
  23. package/dist/env/index.d.mts +5 -0
  24. package/dist/env/index.mjs +6 -0
  25. package/dist/env/set-env.cjs +230 -11
  26. package/dist/env/set-env.d.cts +8 -8
  27. package/dist/env/{set-env.d.ts → set-env.d.mts} +10 -8
  28. package/dist/env/set-env.mjs +231 -0
  29. package/dist/get-config.cjs +46 -34
  30. package/dist/get-config.d.cts +18 -18
  31. package/dist/{get-config.d.ts → get-config.d.mts} +20 -18
  32. package/dist/get-config.mjs +46 -0
  33. package/dist/index.cjs +98 -201
  34. package/dist/index.d.cts +27 -28
  35. package/dist/index.d.mts +29 -0
  36. package/dist/index.mjs +26 -0
  37. package/dist/logger/chalk.cjs +43 -6
  38. package/dist/logger/chalk.d.cts +18 -17
  39. package/dist/logger/chalk.d.mts +37 -0
  40. package/dist/logger/chalk.mjs +43 -0
  41. package/dist/logger/console-icons.cjs +18 -8
  42. package/dist/logger/console-icons.d.cts +5 -8
  43. package/dist/logger/console-icons.d.mts +7 -0
  44. package/dist/logger/console-icons.mjs +20 -0
  45. package/dist/logger/console.cjs +195 -37
  46. package/dist/logger/console.d.cts +25 -25
  47. package/dist/logger/{console.d.ts → console.d.mts} +27 -25
  48. package/dist/logger/console.mjs +185 -0
  49. package/dist/logger/create-logger.cjs +34 -14
  50. package/dist/logger/create-logger.d.cts +5 -6
  51. package/dist/logger/{create-logger.d.ts → create-logger.d.mts} +7 -6
  52. package/dist/logger/create-logger.mjs +34 -0
  53. package/dist/logger/format-timestamp.cjs +14 -6
  54. package/dist/logger/format-timestamp.d.cts +3 -2
  55. package/dist/logger/{format-timestamp.d.ts → format-timestamp.d.mts} +5 -2
  56. package/dist/logger/format-timestamp.mjs +16 -0
  57. package/dist/logger/get-log-level.cjs +54 -11
  58. package/dist/logger/get-log-level.d.cts +4 -5
  59. package/dist/logger/{get-log-level.d.ts → get-log-level.d.mts} +6 -5
  60. package/dist/logger/get-log-level.mjs +54 -0
  61. package/dist/logger/index.cjs +29 -61
  62. package/dist/logger/index.d.cts +8 -10
  63. package/dist/logger/index.d.mts +10 -0
  64. package/dist/logger/index.mjs +11 -0
  65. package/dist/logger/is-unicode-supported.cjs +8 -6
  66. package/dist/logger/is-unicode-supported.d.cts +3 -2
  67. package/dist/logger/is-unicode-supported.d.mts +6 -0
  68. package/dist/logger/is-unicode-supported.mjs +10 -0
  69. package/dist/types.cjs +29 -8
  70. package/dist/types.d.cts +39 -41
  71. package/dist/types.d.mts +53 -0
  72. package/dist/types.mjs +30 -0
  73. package/dist/utilities/apply-workspace-tokens.cjs +37 -13
  74. package/dist/utilities/apply-workspace-tokens.d.cts +4 -5
  75. package/dist/utilities/{apply-workspace-tokens.d.ts → apply-workspace-tokens.d.mts} +6 -5
  76. package/dist/utilities/apply-workspace-tokens.mjs +37 -0
  77. package/dist/utilities/colors.cjs +98 -12
  78. package/dist/utilities/colors.d.cts +4 -4
  79. package/dist/utilities/{colors.d.ts → colors.d.mts} +6 -4
  80. package/dist/utilities/colors.mjs +97 -0
  81. package/dist/utilities/correct-paths.cjs +201 -32
  82. package/dist/utilities/correct-paths.d.cts +4 -4
  83. package/dist/utilities/{correct-paths.d.ts → correct-paths.d.mts} +6 -4
  84. package/dist/utilities/correct-paths.mjs +190 -0
  85. package/dist/utilities/file-path-utils.cjs +48 -11
  86. package/dist/utilities/file-path-utils.d.cts +15 -14
  87. package/dist/utilities/{file-path-utils.d.ts → file-path-utils.d.mts} +17 -14
  88. package/dist/utilities/file-path-utils.mjs +48 -0
  89. package/dist/utilities/find-up.cjs +17 -6
  90. package/dist/utilities/find-up.d.cts +3 -2
  91. package/dist/utilities/{find-up.d.ts → find-up.d.mts} +5 -2
  92. package/dist/utilities/find-up.mjs +19 -0
  93. package/dist/utilities/find-workspace-root.cjs +72 -10
  94. package/dist/utilities/find-workspace-root.d.cts +3 -2
  95. package/dist/utilities/{find-workspace-root.d.ts → find-workspace-root.d.mts} +5 -2
  96. package/dist/utilities/find-workspace-root.mjs +73 -0
  97. package/dist/utilities/get-default-config.cjs +73 -11
  98. package/dist/utilities/get-default-config.d.cts +4 -4
  99. package/dist/utilities/{get-default-config.d.ts → get-default-config.d.mts} +6 -4
  100. package/dist/utilities/get-default-config.mjs +74 -0
  101. package/dist/utilities/index.cjs +49 -109
  102. package/dist/utilities/index.d.cts +10 -14
  103. package/dist/utilities/index.d.mts +12 -0
  104. package/dist/utilities/index.mjs +13 -0
  105. package/dist/utilities/process-handler.cjs +38 -18
  106. package/dist/utilities/process-handler.d.cts +4 -4
  107. package/dist/utilities/process-handler.d.mts +9 -0
  108. package/dist/utilities/process-handler.mjs +38 -0
  109. package/dist/utilities/run.cjs +64 -10
  110. package/dist/utilities/run.d.cts +5 -6
  111. package/dist/utilities/{run.d.ts → run.d.mts} +7 -6
  112. package/dist/utilities/run.mjs +64 -0
  113. package/dist/utilities/toml.cjs +37 -24
  114. package/dist/utilities/toml.d.cts +148 -147
  115. package/dist/utilities/toml.d.mts +192 -0
  116. package/dist/utilities/toml.mjs +33 -0
  117. package/package.json +106 -158
  118. package/bin/config.js +0 -1616
  119. package/dist/chunk-24B36RDB.cjs +0 -81
  120. package/dist/chunk-27N3QEX5.js +0 -40
  121. package/dist/chunk-2AVLCXLT.js +0 -0
  122. package/dist/chunk-2RLMTBVZ.js +0 -233
  123. package/dist/chunk-2WBD2G3E.cjs +0 -38
  124. package/dist/chunk-3COHMHPU.cjs +0 -1
  125. package/dist/chunk-4Q45WJYQ.js +0 -165
  126. package/dist/chunk-5C7PIENF.js +0 -92
  127. package/dist/chunk-5J2SS4QU.js +0 -83
  128. package/dist/chunk-65SWKEHV.cjs +0 -1
  129. package/dist/chunk-6Y623TCS.cjs +0 -40
  130. package/dist/chunk-7PV6L7I7.cjs +0 -1
  131. package/dist/chunk-7QBTVNMR.cjs +0 -30
  132. package/dist/chunk-BDATZ3UB.cjs +0 -233
  133. package/dist/chunk-BZRTSWH4.cjs +0 -395
  134. package/dist/chunk-D3FRXXDE.js +0 -947
  135. package/dist/chunk-DTGT4OI3.cjs +0 -14
  136. package/dist/chunk-EC2KPWRG.cjs +0 -24
  137. package/dist/chunk-EENQN6N2.js +0 -40
  138. package/dist/chunk-ENI4UUSK.cjs +0 -35
  139. package/dist/chunk-FJNXECWU.js +0 -395
  140. package/dist/chunk-FMDVBSP6.cjs +0 -83
  141. package/dist/chunk-G2MK47WL.js +0 -14
  142. package/dist/chunk-HFS7WJVW.js +0 -81
  143. package/dist/chunk-HVVJHTFS.js +0 -36
  144. package/dist/chunk-IWD6YQKX.cjs +0 -1
  145. package/dist/chunk-IWQRXQ4N.cjs +0 -84
  146. package/dist/chunk-JK4TT5IV.js +0 -35
  147. package/dist/chunk-JWLDCEBZ.cjs +0 -70
  148. package/dist/chunk-JZAYHDV3.js +0 -8
  149. package/dist/chunk-KSMN3HSC.js +0 -38
  150. package/dist/chunk-L6UNTUC4.js +0 -0
  151. package/dist/chunk-LOY6ICHZ.cjs +0 -36
  152. package/dist/chunk-MBG2FTBL.cjs +0 -47
  153. package/dist/chunk-MQG74XF7.js +0 -102
  154. package/dist/chunk-MSAQEGBK.cjs +0 -92
  155. package/dist/chunk-NJFLUTGH.cjs +0 -25
  156. package/dist/chunk-PCYB64MB.cjs +0 -40
  157. package/dist/chunk-RALMUN5C.js +0 -30
  158. package/dist/chunk-RRKB32OH.js +0 -0
  159. package/dist/chunk-RUKM6FCF.js +0 -25
  160. package/dist/chunk-SIW7AXUG.js +0 -56
  161. package/dist/chunk-SLICWTO2.cjs +0 -165
  162. package/dist/chunk-SO3FWVXC.js +0 -84
  163. package/dist/chunk-SXPH7ILL.js +0 -70
  164. package/dist/chunk-T7YISGRS.cjs +0 -102
  165. package/dist/chunk-TZZRLM5J.cjs +0 -947
  166. package/dist/chunk-UJ77IBHD.cjs +0 -233
  167. package/dist/chunk-UKGRDKIH.js +0 -0
  168. package/dist/chunk-V3GMJ4TX.js +0 -233
  169. package/dist/chunk-WQJYIPSL.cjs +0 -8
  170. package/dist/chunk-YBVOKYAM.cjs +0 -56
  171. package/dist/chunk-YX4736HU.js +0 -47
  172. package/dist/chunk-ZFNAUMQS.js +0 -24
  173. package/dist/config-file/get-config-file.js +0 -28
  174. package/dist/config-file/index.d.ts +0 -3
  175. package/dist/config-file/index.js +0 -29
  176. package/dist/create-storm-config.js +0 -35
  177. package/dist/env/get-env.js +0 -11
  178. package/dist/env/index.d.ts +0 -4
  179. package/dist/env/index.js +0 -18
  180. package/dist/env/set-env.js +0 -11
  181. package/dist/get-config.js +0 -34
  182. package/dist/index.d.ts +0 -28
  183. package/dist/index.js +0 -201
  184. package/dist/logger/chalk.d.ts +0 -34
  185. package/dist/logger/chalk.js +0 -6
  186. package/dist/logger/console-icons.d.ts +0 -8
  187. package/dist/logger/console-icons.js +0 -8
  188. package/dist/logger/console.js +0 -37
  189. package/dist/logger/create-logger.js +0 -14
  190. package/dist/logger/format-timestamp.js +0 -6
  191. package/dist/logger/get-log-level.js +0 -11
  192. package/dist/logger/index.d.ts +0 -10
  193. package/dist/logger/index.js +0 -61
  194. package/dist/logger/is-unicode-supported.d.ts +0 -3
  195. package/dist/logger/is-unicode-supported.js +0 -6
  196. package/dist/types.d.ts +0 -53
  197. package/dist/types.js +0 -8
  198. package/dist/utilities/apply-workspace-tokens.js +0 -13
  199. package/dist/utilities/colors.js +0 -12
  200. package/dist/utilities/correct-paths.js +0 -32
  201. package/dist/utilities/file-path-utils.js +0 -11
  202. package/dist/utilities/find-up.js +0 -6
  203. package/dist/utilities/find-workspace-root.js +0 -10
  204. package/dist/utilities/get-default-config.js +0 -11
  205. package/dist/utilities/index.d.ts +0 -14
  206. package/dist/utilities/index.js +0 -109
  207. package/dist/utilities/process-handler.d.ts +0 -7
  208. package/dist/utilities/process-handler.js +0 -18
  209. package/dist/utilities/run.js +0 -10
  210. package/dist/utilities/toml.d.ts +0 -189
  211. package/dist/utilities/toml.js +0 -24
@@ -1,233 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
-
3
- var _chunkBDATZ3UBcjs = require('./chunk-BDATZ3UB.cjs');
4
-
5
-
6
- var _chunkJWLDCEBZcjs = require('./chunk-JWLDCEBZ.cjs');
7
-
8
- // src/env/get-env.ts
9
-
10
-
11
-
12
-
13
-
14
- var _config = require('@storm-software/config');
15
- var getExtensionEnv = (extensionName) => {
16
- const prefix = `STORM_EXTENSION_${extensionName.toUpperCase()}_`;
17
- return Object.keys(process.env).filter((key) => key.startsWith(prefix)).reduce((ret, key) => {
18
- const name = key.replace(prefix, "").split("_").map(
19
- (i) => i.length > 0 ? i.trim().charAt(0).toUpperCase() + i.trim().slice(1) : ""
20
- ).join("");
21
- if (name) {
22
- ret[name] = process.env[key];
23
- }
24
- return ret;
25
- }, {});
26
- };
27
- var getConfigEnv = () => {
28
- const prefix = "STORM_";
29
- let config = {
30
- extends: process.env[`${prefix}EXTENDS`] || void 0,
31
- name: process.env[`${prefix}NAME`] || void 0,
32
- variant: process.env[`${prefix}VARIANT`] || void 0,
33
- namespace: process.env[`${prefix}NAMESPACE`] || void 0,
34
- owner: process.env[`${prefix}OWNER`] || void 0,
35
- bot: {
36
- name: process.env[`${prefix}BOT_NAME`] || void 0,
37
- email: process.env[`${prefix}BOT_EMAIL`] || void 0
38
- },
39
- release: {
40
- banner: {
41
- url: process.env[`${prefix}RELEASE_BANNER_URL`] || void 0,
42
- alt: process.env[`${prefix}RELEASE_BANNER_ALT`] || void 0
43
- },
44
- header: process.env[`${prefix}RELEASE_HEADER`] || void 0,
45
- footer: process.env[`${prefix}RELEASE_FOOTER`] || void 0
46
- },
47
- error: {
48
- codesFile: process.env[`${prefix}ERROR_CODES_FILE`] || void 0,
49
- url: process.env[`${prefix}ERROR_URL`] || void 0
50
- },
51
- socials: {
52
- twitter: process.env[`${prefix}SOCIAL_TWITTER`] || void 0,
53
- discord: process.env[`${prefix}SOCIAL_DISCORD`] || void 0,
54
- telegram: process.env[`${prefix}SOCIAL_TELEGRAM`] || void 0,
55
- slack: process.env[`${prefix}SOCIAL_SLACK`] || void 0,
56
- medium: process.env[`${prefix}SOCIAL_MEDIUM`] || void 0,
57
- github: process.env[`${prefix}SOCIAL_GITHUB`] || void 0
58
- },
59
- organization: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] ? process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] ? {
60
- name: process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`],
61
- description: process.env[`${prefix}ORG_DESCRIPTION`] || process.env[`${prefix}ORGANIZATION_DESCRIPTION`] || void 0,
62
- url: process.env[`${prefix}ORG_URL`] || process.env[`${prefix}ORGANIZATION_URL`] || void 0,
63
- logo: process.env[`${prefix}ORG_LOGO`] || process.env[`${prefix}ORGANIZATION_LOGO`] || void 0,
64
- icon: process.env[`${prefix}ORG_ICON`] || process.env[`${prefix}ORGANIZATION_ICON`] || void 0
65
- } : process.env[`${prefix}ORG`] || process.env[`${prefix}ORGANIZATION`] || process.env[`${prefix}ORG_NAME`] || process.env[`${prefix}ORGANIZATION_NAME`] : void 0,
66
- packageManager: process.env[`${prefix}PACKAGE_MANAGER`] || void 0,
67
- license: process.env[`${prefix}LICENSE`] || void 0,
68
- homepage: process.env[`${prefix}HOMEPAGE`] || void 0,
69
- docs: process.env[`${prefix}DOCS`] || void 0,
70
- portal: process.env[`${prefix}PORTAL`] || void 0,
71
- licensing: process.env[`${prefix}LICENSING`] || void 0,
72
- contact: process.env[`${prefix}CONTACT`] || void 0,
73
- support: process.env[`${prefix}SUPPORT`] || void 0,
74
- timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
75
- locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
76
- configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_CONFIG_FILE`]) : void 0,
77
- workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
78
- directories: {
79
- cache: process.env[`${prefix}CACHE_DIR`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
80
- data: process.env[`${prefix}DATA_DIR`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
81
- config: process.env[`${prefix}CONFIG_DIR`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
82
- temp: process.env[`${prefix}TEMP_DIR`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
83
- log: process.env[`${prefix}LOG_DIR`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
84
- build: process.env[`${prefix}BUILD_DIR`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
85
- },
86
- skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
87
- mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
88
- // ci:
89
- // process.env[`${prefix}CI`] !== undefined
90
- // ? Boolean(
91
- // process.env[`${prefix}CI`] ??
92
- // process.env.CI ??
93
- // process.env.CONTINUOUS_INTEGRATION
94
- // )
95
- // : undefined,
96
- repository: process.env[`${prefix}REPOSITORY`] || void 0,
97
- branch: process.env[`${prefix}BRANCH`] || void 0,
98
- preid: process.env[`${prefix}PRE_ID`] || void 0,
99
- registry: {
100
- github: process.env[`${prefix}REGISTRY_GITHUB`] || void 0,
101
- npm: process.env[`${prefix}REGISTRY_NPM`] || void 0,
102
- cargo: process.env[`${prefix}REGISTRY_CARGO`] || void 0,
103
- cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
104
- container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
105
- },
106
- logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
107
- Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
108
- ) ? _chunkJWLDCEBZcjs.getLogLevelLabel.call(void 0,
109
- Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
110
- ) : process.env[`${prefix}LOG_LEVEL`] : void 0,
111
- skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
112
- };
113
- const themeNames = Object.keys(process.env).filter(
114
- (envKey) => envKey.startsWith(`${prefix}COLOR_`) && _config.COLOR_KEYS.every(
115
- (colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
116
- )
117
- );
118
- config.colors = themeNames.length > 0 ? themeNames.reduce(
119
- (ret, themeName) => {
120
- ret[themeName] = getThemeColorsEnv(prefix, themeName);
121
- return ret;
122
- },
123
- {}
124
- ) : getThemeColorsEnv(prefix);
125
- if (config.docs === _config.STORM_DEFAULT_DOCS) {
126
- if (config.homepage === _config.STORM_DEFAULT_HOMEPAGE) {
127
- config.docs = `${_config.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
128
- } else {
129
- config.docs = `${config.homepage}/docs`;
130
- }
131
- }
132
- if (config.licensing === _config.STORM_DEFAULT_LICENSING) {
133
- if (config.homepage === _config.STORM_DEFAULT_HOMEPAGE) {
134
- config.licensing = `${_config.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
135
- } else {
136
- config.licensing = `${config.homepage}/docs`;
137
- }
138
- }
139
- const serializedConfig = process.env[`${prefix}WORKSPACE_CONFIG`];
140
- if (serializedConfig) {
141
- const parsed = JSON.parse(serializedConfig);
142
- config = {
143
- ...config,
144
- ...parsed,
145
- colors: { ...config.colors, ...parsed.colors },
146
- extensions: { ...config.extensions, ...parsed.extensions }
147
- };
148
- }
149
- return config;
150
- };
151
- var getThemeColorsEnv = (prefix, theme) => {
152
- const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
153
- return process.env[`${prefix}${themeName}LIGHT_BRAND`] || process.env[`${prefix}${themeName}DARK_BRAND`] ? getMultiThemeColorsEnv(prefix + themeName) : getSingleThemeColorsEnv(prefix + themeName);
154
- };
155
- var getSingleThemeColorsEnv = (prefix) => {
156
- const gradient = [];
157
- if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
158
- gradient.push(
159
- process.env[`${prefix}GRADIENT_START`],
160
- process.env[`${prefix}GRADIENT_END`]
161
- );
162
- } else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
163
- let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
164
- while (process.env[`${prefix}GRADIENT_${index}`]) {
165
- gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
166
- index++;
167
- }
168
- }
169
- return {
170
- dark: process.env[`${prefix}DARK`],
171
- light: process.env[`${prefix}LIGHT`],
172
- brand: process.env[`${prefix}BRAND`],
173
- alternate: process.env[`${prefix}ALTERNATE`],
174
- accent: process.env[`${prefix}ACCENT`],
175
- link: process.env[`${prefix}LINK`],
176
- discovery: process.env[`${prefix}DISCOVERY`],
177
- success: process.env[`${prefix}SUCCESS`],
178
- info: process.env[`${prefix}INFO`],
179
- debug: process.env[`${prefix}DEBUG`],
180
- warning: process.env[`${prefix}WARNING`],
181
- danger: process.env[`${prefix}DANGER`],
182
- fatal: process.env[`${prefix}FATAL`],
183
- performance: process.env[`${prefix}PERFORMANCE`],
184
- positive: process.env[`${prefix}POSITIVE`],
185
- negative: process.env[`${prefix}NEGATIVE`],
186
- gradient
187
- };
188
- };
189
- var getMultiThemeColorsEnv = (prefix) => {
190
- return {
191
- light: getBaseThemeColorsEnv(`${prefix}_LIGHT_`),
192
- dark: getBaseThemeColorsEnv(`${prefix}_DARK_`)
193
- };
194
- };
195
- var getBaseThemeColorsEnv = (prefix) => {
196
- const gradient = [];
197
- if (process.env[`${prefix}GRADIENT_START`] && process.env[`${prefix}GRADIENT_END`]) {
198
- gradient.push(
199
- process.env[`${prefix}GRADIENT_START`],
200
- process.env[`${prefix}GRADIENT_END`]
201
- );
202
- } else if (process.env[`${prefix}GRADIENT_0`] || process.env[`${prefix}GRADIENT_1`]) {
203
- let index = process.env[`${prefix}GRADIENT_0`] ? 0 : 1;
204
- while (process.env[`${prefix}GRADIENT_${index}`]) {
205
- gradient.push(process.env[`${prefix}GRADIENT_${index}`]);
206
- index++;
207
- }
208
- }
209
- return {
210
- foreground: process.env[`${prefix}FOREGROUND`],
211
- background: process.env[`${prefix}BACKGROUND`],
212
- brand: process.env[`${prefix}BRAND`],
213
- alternate: process.env[`${prefix}ALTERNATE`],
214
- accent: process.env[`${prefix}ACCENT`],
215
- link: process.env[`${prefix}LINK`],
216
- discovery: process.env[`${prefix}DISCOVERY`],
217
- success: process.env[`${prefix}SUCCESS`],
218
- info: process.env[`${prefix}INFO`],
219
- debug: process.env[`${prefix}DEBUG`],
220
- warning: process.env[`${prefix}WARNING`],
221
- danger: process.env[`${prefix}DANGER`],
222
- fatal: process.env[`${prefix}FATAL`],
223
- performance: process.env[`${prefix}PERFORMANCE`],
224
- positive: process.env[`${prefix}POSITIVE`],
225
- negative: process.env[`${prefix}NEGATIVE`],
226
- gradient
227
- };
228
- };
229
-
230
-
231
-
232
-
233
- exports.getExtensionEnv = getExtensionEnv; exports.getConfigEnv = getConfigEnv;
File without changes
@@ -1,233 +0,0 @@
1
- // src/utilities/correct-paths.ts
2
- var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
3
- function normalizeWindowsPath(input = "") {
4
- if (!input) {
5
- return input;
6
- }
7
- return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
8
- }
9
- var _UNC_REGEX = /^[/\\]{2}/;
10
- var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
11
- var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
12
- var _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
13
- var _EXTNAME_RE = /.(\.[^./]+|\.)$/;
14
- var _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
15
- var sep = "/";
16
- var correctPaths = function(path) {
17
- if (!path || path.length === 0) {
18
- return ".";
19
- }
20
- path = normalizeWindowsPath(path);
21
- const isUNCPath = path?.match(_UNC_REGEX);
22
- const isPathAbsolute = isAbsolute(path);
23
- const trailingSeparator = path[path.length - 1] === "/";
24
- path = normalizeString(path, !isPathAbsolute);
25
- if (path.length === 0) {
26
- if (isPathAbsolute) {
27
- return "/";
28
- }
29
- return trailingSeparator ? "./" : ".";
30
- }
31
- if (trailingSeparator) {
32
- path += "/";
33
- }
34
- if (_DRIVE_LETTER_RE.test(path)) {
35
- path += "/";
36
- }
37
- if (isUNCPath) {
38
- if (!isPathAbsolute) {
39
- return `//./${path}`;
40
- }
41
- return `//${path}`;
42
- }
43
- return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
44
- };
45
- var joinPaths = function(...segments) {
46
- let path = "";
47
- for (const seg of segments) {
48
- if (!seg) {
49
- continue;
50
- }
51
- if (path.length > 0) {
52
- const pathTrailing = path[path.length - 1] === "/";
53
- const segLeading = seg[0] === "/";
54
- const both = pathTrailing && segLeading;
55
- if (both) {
56
- path += seg.slice(1);
57
- } else {
58
- path += pathTrailing || segLeading ? seg : `/${seg}`;
59
- }
60
- } else {
61
- path += seg;
62
- }
63
- }
64
- return correctPaths(path);
65
- };
66
- function cwd() {
67
- if (typeof process !== "undefined" && typeof process.cwd === "function") {
68
- return process.cwd().replace(/\\/g, "/");
69
- }
70
- return "/";
71
- }
72
- var resolve = function(...arguments_) {
73
- arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
74
- let resolvedPath = "";
75
- let resolvedAbsolute = false;
76
- for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
77
- const path = index >= 0 ? arguments_[index] : cwd();
78
- if (!path || path.length === 0) {
79
- continue;
80
- }
81
- resolvedPath = `${path}/${resolvedPath}`;
82
- resolvedAbsolute = isAbsolute(path);
83
- }
84
- resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
85
- if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
86
- return `/${resolvedPath}`;
87
- }
88
- return resolvedPath.length > 0 ? resolvedPath : ".";
89
- };
90
- function normalizeString(path, allowAboveRoot) {
91
- let res = "";
92
- let lastSegmentLength = 0;
93
- let lastSlash = -1;
94
- let dots = 0;
95
- let char = null;
96
- for (let index = 0; index <= path.length; ++index) {
97
- if (index < path.length) {
98
- char = path[index];
99
- } else if (char === "/") {
100
- break;
101
- } else {
102
- char = "/";
103
- }
104
- if (char === "/") {
105
- if (lastSlash === index - 1 || dots === 1) {
106
- } else if (dots === 2) {
107
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
108
- if (res.length > 2) {
109
- const lastSlashIndex = res.lastIndexOf("/");
110
- if (lastSlashIndex === -1) {
111
- res = "";
112
- lastSegmentLength = 0;
113
- } else {
114
- res = res.slice(0, lastSlashIndex);
115
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
116
- }
117
- lastSlash = index;
118
- dots = 0;
119
- continue;
120
- } else if (res.length > 0) {
121
- res = "";
122
- lastSegmentLength = 0;
123
- lastSlash = index;
124
- dots = 0;
125
- continue;
126
- }
127
- }
128
- if (allowAboveRoot) {
129
- res += res.length > 0 ? "/.." : "..";
130
- lastSegmentLength = 2;
131
- }
132
- } else {
133
- if (res.length > 0) {
134
- res += `/${path.slice(lastSlash + 1, index)}`;
135
- } else {
136
- res = path.slice(lastSlash + 1, index);
137
- }
138
- lastSegmentLength = index - lastSlash - 1;
139
- }
140
- lastSlash = index;
141
- dots = 0;
142
- } else if (char === "." && dots !== -1) {
143
- ++dots;
144
- } else {
145
- dots = -1;
146
- }
147
- }
148
- return res;
149
- }
150
- var isAbsolute = function(p) {
151
- return _IS_ABSOLUTE_RE.test(p);
152
- };
153
- var toNamespacedPath = function(p) {
154
- return normalizeWindowsPath(p);
155
- };
156
- var extname = function(p) {
157
- if (p === "..") return "";
158
- const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
159
- return match && match[1] || "";
160
- };
161
- var relative = function(from, to) {
162
- const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
163
- const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
164
- if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
165
- return _to.join("/");
166
- }
167
- const _fromCopy = [..._from];
168
- for (const segment of _fromCopy) {
169
- if (_to[0] !== segment) {
170
- break;
171
- }
172
- _from.shift();
173
- _to.shift();
174
- }
175
- return [..._from.map(() => ".."), ..._to].join("/");
176
- };
177
- var dirname = function(p) {
178
- const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
179
- if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
180
- segments[0] += "/";
181
- }
182
- return segments.join("/") || (isAbsolute(p) ? "/" : ".");
183
- };
184
- var format = function(p) {
185
- const ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "";
186
- const segments = [p.root, p.dir, p.base ?? (p.name ?? "") + ext].filter(
187
- Boolean
188
- );
189
- return normalizeWindowsPath(
190
- p.root ? resolve(...segments) : segments.join("/")
191
- );
192
- };
193
- var basename = function(p, extension) {
194
- const segments = normalizeWindowsPath(p).split("/");
195
- let lastSegment = "";
196
- for (let i = segments.length - 1; i >= 0; i--) {
197
- const val = segments[i];
198
- if (val) {
199
- lastSegment = val;
200
- break;
201
- }
202
- }
203
- return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
204
- };
205
- var parse = function(p) {
206
- const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "";
207
- const base = basename(p);
208
- const extension = extname(base);
209
- return {
210
- root,
211
- dir: dirname(p),
212
- base,
213
- ext: extension,
214
- name: base.slice(0, base.length - extension.length)
215
- };
216
- };
217
-
218
- export {
219
- normalizeWindowsPath,
220
- sep,
221
- correctPaths,
222
- joinPaths,
223
- resolve,
224
- normalizeString,
225
- isAbsolute,
226
- toNamespacedPath,
227
- extname,
228
- relative,
229
- dirname,
230
- format,
231
- basename,
232
- parse
233
- };
@@ -1,8 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/logger/format-timestamp.ts
2
- var formatTimestamp = (fullDateTime = false, date = /* @__PURE__ */ new Date()) => {
3
- return fullDateTime ? `${date.toLocaleDateString()} ${date.toLocaleTimeString()}` : `${date.toLocaleTimeString()}`;
4
- };
5
-
6
-
7
-
8
- exports.formatTimestamp = formatTimestamp;
@@ -1,56 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
-
3
-
4
-
5
-
6
- var _chunkTZZRLM5Jcjs = require('./chunk-TZZRLM5J.cjs');
7
-
8
- // src/utilities/process-handler.ts
9
- var exitWithError = (config) => {
10
- _chunkTZZRLM5Jcjs.writeFatal.call(void 0, "Exiting script with an error status...", config);
11
- process.exit(1);
12
- };
13
- var exitWithSuccess = (config) => {
14
- _chunkTZZRLM5Jcjs.writeSuccess.call(void 0, "Script completed successfully. Exiting...", config);
15
- process.exit(0);
16
- };
17
- var handleProcess = (config) => {
18
- _chunkTZZRLM5Jcjs.writeTrace.call(void 0,
19
- `Using the following arguments to process the script: ${process.argv.join(", ")}`,
20
- config
21
- );
22
- process.on("unhandledRejection", (error) => {
23
- _chunkTZZRLM5Jcjs.writeError.call(void 0,
24
- `An Unhandled Rejection occurred while running the program: ${error && typeof error === "object" && "message" in error && _optionalChain([error, 'optionalAccess', _ => _.message]) ? error.message : typeof error === "string" ? error : "Unknown error"}
25
- Stacktrace: ${error && typeof error === "object" && "stack" in error && _optionalChain([error, 'optionalAccess', _2 => _2.stack]) ? error.stack : ""}`,
26
- config
27
- );
28
- exitWithError(config);
29
- });
30
- process.on("uncaughtException", (error) => {
31
- _chunkTZZRLM5Jcjs.writeError.call(void 0,
32
- `An Uncaught Exception occurred while running the program: ${error && typeof error === "object" && "message" in error && _optionalChain([error, 'optionalAccess', _3 => _3.message]) ? error.message : typeof error === "string" ? error : "Unknown error"}
33
- Stacktrace: ${error && typeof error === "object" && "stack" in error && _optionalChain([error, 'optionalAccess', _4 => _4.stack]) ? error.stack : ""}`,
34
- config
35
- );
36
- exitWithError(config);
37
- });
38
- process.on("SIGTERM", (signal) => {
39
- _chunkTZZRLM5Jcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
40
- exitWithError(config);
41
- });
42
- process.on("SIGINT", (signal) => {
43
- _chunkTZZRLM5Jcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
44
- exitWithError(config);
45
- });
46
- process.on("SIGHUP", (signal) => {
47
- _chunkTZZRLM5Jcjs.writeError.call(void 0, `The program terminated with signal code: ${signal}`, config);
48
- exitWithError(config);
49
- });
50
- };
51
-
52
-
53
-
54
-
55
-
56
- exports.exitWithError = exitWithError; exports.exitWithSuccess = exitWithSuccess; exports.handleProcess = handleProcess;
@@ -1,47 +0,0 @@
1
- import {
2
- writeError
3
- } from "./chunk-D3FRXXDE.js";
4
-
5
- // src/utilities/toml.ts
6
- import TOML from "@ltd/j-toml";
7
- function parseCargoTomlWithTree(tree, projectRoot, projectName) {
8
- const cargoTomlString = tree.read(`${projectRoot}/Cargo.toml`)?.toString();
9
- if (!cargoTomlString) {
10
- writeError(`Cannot find a Cargo.toml file in the ${projectName}`);
11
- throw new Error();
12
- }
13
- return parseCargoToml(cargoTomlString);
14
- }
15
- function parseCargoToml(cargoString) {
16
- if (!cargoString) {
17
- throw new Error("Cargo.toml is empty");
18
- }
19
- return TOML.parse(cargoString, {
20
- x: { comment: true }
21
- });
22
- }
23
- function stringifyCargoToml(cargoToml) {
24
- const tomlString = TOML.stringify(cargoToml, {
25
- newlineAround: "section"
26
- });
27
- if (Array.isArray(tomlString)) {
28
- return tomlString.join("\n");
29
- }
30
- return tomlString;
31
- }
32
- function modifyCargoTable(toml, section, key, value) {
33
- toml[section] ??= TOML.Section({});
34
- toml[section][key] = typeof value === "object" && !Array.isArray(value) ? TOML.inline(value) : typeof value === "function" ? value() : value;
35
- }
36
- function modifyCargoNestedTable(toml, section, key, value) {
37
- toml[section] ??= {};
38
- toml[section][key] = TOML.Section(value);
39
- }
40
-
41
- export {
42
- parseCargoTomlWithTree,
43
- parseCargoToml,
44
- stringifyCargoToml,
45
- modifyCargoTable,
46
- modifyCargoNestedTable
47
- };
@@ -1,24 +0,0 @@
1
- import {
2
- isUnicodeSupported
3
- } from "./chunk-G2MK47WL.js";
4
- import {
5
- LogLevelLabel
6
- } from "./chunk-RALMUN5C.js";
7
-
8
- // src/logger/console-icons.ts
9
- var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
10
- var CONSOLE_ICONS = {
11
- [LogLevelLabel.ERROR]: useIcon("\u2718", "\xD7"),
12
- [LogLevelLabel.FATAL]: useIcon("\u{1F571}", "\xD7"),
13
- [LogLevelLabel.WARN]: useIcon("\u26A0", "\u203C"),
14
- [LogLevelLabel.INFO]: useIcon("\u2139", "i"),
15
- [LogLevelLabel.PERFORMANCE]: useIcon("\u23F1", "\u23F1"),
16
- [LogLevelLabel.SUCCESS]: useIcon("\u2714", "\u221A"),
17
- [LogLevelLabel.DEBUG]: useIcon("\u{1F6E0}", "D"),
18
- [LogLevelLabel.TRACE]: useIcon("\u2699", "T"),
19
- [LogLevelLabel.ALL]: useIcon("\u2709", "\u2192")
20
- };
21
-
22
- export {
23
- CONSOLE_ICONS
24
- };
@@ -1,28 +0,0 @@
1
- import {
2
- getConfigFile,
3
- getConfigFileByName
4
- } from "../chunk-5C7PIENF.js";
5
- import "../chunk-UKGRDKIH.js";
6
- import "../chunk-SIW7AXUG.js";
7
- import "../chunk-EENQN6N2.js";
8
- import "../chunk-YX4736HU.js";
9
- import "../chunk-HFS7WJVW.js";
10
- import "../chunk-KSMN3HSC.js";
11
- import "../chunk-MQG74XF7.js";
12
- import "../chunk-SO3FWVXC.js";
13
- import "../chunk-RUKM6FCF.js";
14
- import "../chunk-RRKB32OH.js";
15
- import "../chunk-JK4TT5IV.js";
16
- import "../chunk-D3FRXXDE.js";
17
- import "../chunk-5J2SS4QU.js";
18
- import "../chunk-HVVJHTFS.js";
19
- import "../chunk-ZFNAUMQS.js";
20
- import "../chunk-G2MK47WL.js";
21
- import "../chunk-JZAYHDV3.js";
22
- import "../chunk-V3GMJ4TX.js";
23
- import "../chunk-SXPH7ILL.js";
24
- import "../chunk-RALMUN5C.js";
25
- export {
26
- getConfigFile,
27
- getConfigFileByName
28
- };
@@ -1,3 +0,0 @@
1
- export { getConfigFile, getConfigFileByName } from './get-config-file.js';
2
- import '@storm-software/config';
3
- import 'c12';
@@ -1,29 +0,0 @@
1
- import "../chunk-2AVLCXLT.js";
2
- import {
3
- getConfigFile,
4
- getConfigFileByName
5
- } from "../chunk-5C7PIENF.js";
6
- import "../chunk-UKGRDKIH.js";
7
- import "../chunk-SIW7AXUG.js";
8
- import "../chunk-EENQN6N2.js";
9
- import "../chunk-YX4736HU.js";
10
- import "../chunk-HFS7WJVW.js";
11
- import "../chunk-KSMN3HSC.js";
12
- import "../chunk-MQG74XF7.js";
13
- import "../chunk-SO3FWVXC.js";
14
- import "../chunk-RUKM6FCF.js";
15
- import "../chunk-RRKB32OH.js";
16
- import "../chunk-JK4TT5IV.js";
17
- import "../chunk-D3FRXXDE.js";
18
- import "../chunk-5J2SS4QU.js";
19
- import "../chunk-HVVJHTFS.js";
20
- import "../chunk-ZFNAUMQS.js";
21
- import "../chunk-G2MK47WL.js";
22
- import "../chunk-JZAYHDV3.js";
23
- import "../chunk-V3GMJ4TX.js";
24
- import "../chunk-SXPH7ILL.js";
25
- import "../chunk-RALMUN5C.js";
26
- export {
27
- getConfigFile,
28
- getConfigFileByName
29
- };