@storm-software/config-tools 1.145.0 → 1.145.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/README.md +1 -1
  2. package/bin/config.cjs +125 -22
  3. package/bin/config.js +125 -22
  4. package/dist/{chunk-EPBOQXUS.cjs → chunk-2V7MZG6O.cjs} +15 -15
  5. package/dist/{chunk-IKXDQ7DB.js → chunk-2VKMRURF.js} +1 -1
  6. package/dist/{chunk-GMMTDKYU.cjs → chunk-32ACHDIU.cjs} +11 -11
  7. package/dist/{chunk-GFL2DSZK.js → chunk-3ONZMUOD.js} +2 -2
  8. package/dist/{chunk-FXFNC4WC.js → chunk-4E4DSFC4.js} +1 -1
  9. package/dist/{chunk-CEEL5LLM.js → chunk-5GDS63DU.js} +1 -1
  10. package/dist/{chunk-EOQEK2MM.cjs → chunk-5K6CXYFF.cjs} +2 -2
  11. package/dist/{chunk-MZ5BNE43.js → chunk-CSIXX72P.js} +6 -6
  12. package/dist/{chunk-HSNM6VD2.cjs → chunk-FI7WN47Y.cjs} +4 -4
  13. package/dist/{chunk-R4O6ILOD.js → chunk-HDI7BCVL.js} +1 -1
  14. package/dist/chunk-HESFC24Z.cjs +245 -0
  15. package/dist/{chunk-YES7WAZK.js → chunk-HFGQYKYH.js} +2 -2
  16. package/dist/{chunk-6QCPF7DE.js → chunk-JCGZTN5H.js} +1 -1
  17. package/dist/{chunk-QGYINXXY.js → chunk-JHFMRUZ3.js} +1 -1
  18. package/dist/{chunk-MXRRZKNO.js → chunk-JVA7N2JV.js} +3 -3
  19. package/dist/{chunk-HE7RJB2E.cjs → chunk-LXAJWZ37.cjs} +9 -9
  20. package/dist/{chunk-B6J2YUGO.cjs → chunk-MAMYTWWY.cjs} +3 -3
  21. package/dist/{chunk-7FBGW2FI.js → chunk-MICZPWNF.js} +1 -1
  22. package/dist/chunk-MLUBD3PU.js +245 -0
  23. package/dist/{chunk-SA4LVIO6.cjs → chunk-MPQ5PFCS.cjs} +9 -9
  24. package/dist/{chunk-5BKIG4XN.cjs → chunk-P5GFKFI6.cjs} +2 -2
  25. package/dist/{chunk-SPNVYBT4.cjs → chunk-QPSRWTSZ.cjs} +11 -11
  26. package/dist/{chunk-DXUUXBG3.cjs → chunk-UJPJQXGA.cjs} +2 -2
  27. package/dist/{chunk-KRKGLKPD.cjs → chunk-ZQWK7Y2J.cjs} +9 -9
  28. package/dist/config-file/get-config-file.cjs +8 -8
  29. package/dist/config-file/get-config-file.js +7 -7
  30. package/dist/config-file/index.cjs +8 -8
  31. package/dist/config-file/index.js +7 -7
  32. package/dist/create-storm-config.cjs +11 -11
  33. package/dist/create-storm-config.js +10 -10
  34. package/dist/env/get-env.cjs +3 -3
  35. package/dist/env/get-env.js +2 -2
  36. package/dist/env/index.cjs +4 -4
  37. package/dist/env/index.js +3 -3
  38. package/dist/env/set-env.cjs +3 -3
  39. package/dist/env/set-env.js +2 -2
  40. package/dist/get-config.cjs +12 -12
  41. package/dist/get-config.js +11 -11
  42. package/dist/index.cjs +37 -13
  43. package/dist/index.d.cts +2 -1
  44. package/dist/index.d.ts +2 -1
  45. package/dist/index.js +37 -13
  46. package/dist/logger/console.cjs +5 -5
  47. package/dist/logger/console.js +4 -4
  48. package/dist/logger/create-logger.cjs +6 -6
  49. package/dist/logger/create-logger.js +5 -5
  50. package/dist/logger/index.cjs +6 -6
  51. package/dist/logger/index.js +5 -5
  52. package/dist/utilities/apply-workspace-tokens.cjs +4 -4
  53. package/dist/utilities/apply-workspace-tokens.js +3 -3
  54. package/dist/utilities/correct-paths.cjs +26 -2
  55. package/dist/utilities/correct-paths.d.cts +22 -11
  56. package/dist/utilities/correct-paths.d.ts +22 -11
  57. package/dist/utilities/correct-paths.js +27 -3
  58. package/dist/utilities/find-workspace-root.cjs +3 -3
  59. package/dist/utilities/find-workspace-root.js +2 -2
  60. package/dist/utilities/get-default-config.cjs +4 -4
  61. package/dist/utilities/get-default-config.js +3 -3
  62. package/dist/utilities/index.cjs +31 -7
  63. package/dist/utilities/index.d.cts +2 -1
  64. package/dist/utilities/index.d.ts +2 -1
  65. package/dist/utilities/index.js +32 -8
  66. package/dist/utilities/process-handler.cjs +6 -6
  67. package/dist/utilities/process-handler.js +5 -5
  68. package/package.json +1 -1
  69. package/dist/chunk-CRQ4EVX5.cjs +0 -32
  70. package/dist/chunk-LQJJD6FB.js +0 -32
@@ -0,0 +1,245 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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
+ var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
4
+
5
+ // src/utilities/correct-paths.ts
6
+ var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
7
+ function normalizeWindowsPath(input = "") {
8
+ if (!input) {
9
+ return input;
10
+ }
11
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
12
+ }
13
+ _chunkUSNT2KNTcjs.__name.call(void 0, normalizeWindowsPath, "normalizeWindowsPath");
14
+ var _UNC_REGEX = /^[/\\]{2}/;
15
+ var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
16
+ var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
17
+ var _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
18
+ var _EXTNAME_RE = /.(\.[^./]+|\.)$/;
19
+ var _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
20
+ var sep = "/";
21
+ var correctPaths = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(path) {
22
+ if (!path || path.length === 0) {
23
+ return ".";
24
+ }
25
+ path = normalizeWindowsPath(path);
26
+ const isUNCPath = path.match(_UNC_REGEX);
27
+ const isPathAbsolute = isAbsolute(path);
28
+ const trailingSeparator = path[path.length - 1] === "/";
29
+ path = normalizeString(path, !isPathAbsolute);
30
+ if (path.length === 0) {
31
+ if (isPathAbsolute) {
32
+ return "/";
33
+ }
34
+ return trailingSeparator ? "./" : ".";
35
+ }
36
+ if (trailingSeparator) {
37
+ path += "/";
38
+ }
39
+ if (_DRIVE_LETTER_RE.test(path)) {
40
+ path += "/";
41
+ }
42
+ if (isUNCPath) {
43
+ if (!isPathAbsolute) {
44
+ return `//./${path}`;
45
+ }
46
+ return `//${path}`;
47
+ }
48
+ return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
49
+ }, "correctPaths");
50
+ var joinPaths = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(...segments) {
51
+ let path = "";
52
+ for (const seg of segments) {
53
+ if (!seg) {
54
+ continue;
55
+ }
56
+ if (path.length > 0) {
57
+ const pathTrailing = path[path.length - 1] === "/";
58
+ const segLeading = seg[0] === "/";
59
+ const both = pathTrailing && segLeading;
60
+ if (both) {
61
+ path += seg.slice(1);
62
+ } else {
63
+ path += pathTrailing || segLeading ? seg : `/${seg}`;
64
+ }
65
+ } else {
66
+ path += seg;
67
+ }
68
+ }
69
+ return correctPaths(path);
70
+ }, "joinPaths");
71
+ function cwd() {
72
+ if (typeof process !== "undefined" && typeof process.cwd === "function") {
73
+ return process.cwd().replace(/\\/g, "/");
74
+ }
75
+ return "/";
76
+ }
77
+ _chunkUSNT2KNTcjs.__name.call(void 0, cwd, "cwd");
78
+ var resolve = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(...arguments_) {
79
+ arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
80
+ let resolvedPath = "";
81
+ let resolvedAbsolute = false;
82
+ for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
83
+ const path = index >= 0 ? arguments_[index] : cwd();
84
+ if (!path || path.length === 0) {
85
+ continue;
86
+ }
87
+ resolvedPath = `${path}/${resolvedPath}`;
88
+ resolvedAbsolute = isAbsolute(path);
89
+ }
90
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
91
+ if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
92
+ return `/${resolvedPath}`;
93
+ }
94
+ return resolvedPath.length > 0 ? resolvedPath : ".";
95
+ }, "resolve");
96
+ function normalizeString(path, allowAboveRoot) {
97
+ let res = "";
98
+ let lastSegmentLength = 0;
99
+ let lastSlash = -1;
100
+ let dots = 0;
101
+ let char = null;
102
+ for (let index = 0; index <= path.length; ++index) {
103
+ if (index < path.length) {
104
+ char = path[index];
105
+ } else if (char === "/") {
106
+ break;
107
+ } else {
108
+ char = "/";
109
+ }
110
+ if (char === "/") {
111
+ if (lastSlash === index - 1 || dots === 1) {
112
+ } else if (dots === 2) {
113
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
114
+ if (res.length > 2) {
115
+ const lastSlashIndex = res.lastIndexOf("/");
116
+ if (lastSlashIndex === -1) {
117
+ res = "";
118
+ lastSegmentLength = 0;
119
+ } else {
120
+ res = res.slice(0, lastSlashIndex);
121
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
122
+ }
123
+ lastSlash = index;
124
+ dots = 0;
125
+ continue;
126
+ } else if (res.length > 0) {
127
+ res = "";
128
+ lastSegmentLength = 0;
129
+ lastSlash = index;
130
+ dots = 0;
131
+ continue;
132
+ }
133
+ }
134
+ if (allowAboveRoot) {
135
+ res += res.length > 0 ? "/.." : "..";
136
+ lastSegmentLength = 2;
137
+ }
138
+ } else {
139
+ if (res.length > 0) {
140
+ res += `/${path.slice(lastSlash + 1, index)}`;
141
+ } else {
142
+ res = path.slice(lastSlash + 1, index);
143
+ }
144
+ lastSegmentLength = index - lastSlash - 1;
145
+ }
146
+ lastSlash = index;
147
+ dots = 0;
148
+ } else if (char === "." && dots !== -1) {
149
+ ++dots;
150
+ } else {
151
+ dots = -1;
152
+ }
153
+ }
154
+ return res;
155
+ }
156
+ _chunkUSNT2KNTcjs.__name.call(void 0, normalizeString, "normalizeString");
157
+ var isAbsolute = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(p) {
158
+ return _IS_ABSOLUTE_RE.test(p);
159
+ }, "isAbsolute");
160
+ var toNamespacedPath = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(p) {
161
+ return normalizeWindowsPath(p);
162
+ }, "toNamespacedPath");
163
+ var extname = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(p) {
164
+ if (p === "..") return "";
165
+ const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
166
+ return match && match[1] || "";
167
+ }, "extname");
168
+ var relative = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(from, to) {
169
+ const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
170
+ const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
171
+ if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
172
+ return _to.join("/");
173
+ }
174
+ const _fromCopy = [
175
+ ..._from
176
+ ];
177
+ for (const segment of _fromCopy) {
178
+ if (_to[0] !== segment) {
179
+ break;
180
+ }
181
+ _from.shift();
182
+ _to.shift();
183
+ }
184
+ return [
185
+ ..._from.map(() => ".."),
186
+ ..._to
187
+ ].join("/");
188
+ }, "relative");
189
+ var dirname = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(p) {
190
+ const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
191
+ if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
192
+ segments[0] += "/";
193
+ }
194
+ return segments.join("/") || (isAbsolute(p) ? "/" : ".");
195
+ }, "dirname");
196
+ var format = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(p) {
197
+ const ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "";
198
+ const segments = [
199
+ p.root,
200
+ p.dir,
201
+ _nullishCoalesce(p.base, () => ( (_nullishCoalesce(p.name, () => ( ""))) + ext))
202
+ ].filter(Boolean);
203
+ return normalizeWindowsPath(p.root ? resolve(...segments) : segments.join("/"));
204
+ }, "format");
205
+ var basename = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(p, extension) {
206
+ const segments = normalizeWindowsPath(p).split("/");
207
+ let lastSegment = "";
208
+ for (let i = segments.length - 1; i >= 0; i--) {
209
+ const val = segments[i];
210
+ if (val) {
211
+ lastSegment = val;
212
+ break;
213
+ }
214
+ }
215
+ return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
216
+ }, "basename");
217
+ var parse = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, function(p) {
218
+ const root = _optionalChain([_PATH_ROOT_RE, 'access', _ => _.exec, 'call', _2 => _2(p), 'optionalAccess', _3 => _3[0], 'optionalAccess', _4 => _4.replace, 'call', _5 => _5(/\\/g, "/")]) || "";
219
+ const base = basename(p);
220
+ const extension = extname(base);
221
+ return {
222
+ root,
223
+ dir: dirname(p),
224
+ base,
225
+ ext: extension,
226
+ name: base.slice(0, base.length - extension.length)
227
+ };
228
+ }, "parse");
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+ exports.normalizeWindowsPath = normalizeWindowsPath; exports.sep = sep; exports.correctPaths = correctPaths; exports.joinPaths = joinPaths; exports.resolve = resolve; exports.normalizeString = normalizeString; exports.isAbsolute = isAbsolute; exports.toNamespacedPath = toNamespacedPath; exports.extname = extname; exports.relative = relative; exports.dirname = dirname; exports.format = format; exports.basename = basename; exports.parse = parse;
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  findWorkspaceRoot
3
- } from "./chunk-FXFNC4WC.js";
3
+ } from "./chunk-4E4DSFC4.js";
4
4
  import {
5
5
  STORM_DEFAULT_HOMEPAGE,
6
6
  STORM_DEFAULT_LICENSE
7
7
  } from "./chunk-WRGFZXJE.js";
8
8
  import {
9
9
  joinPaths
10
- } from "./chunk-LQJJD6FB.js";
10
+ } from "./chunk-MLUBD3PU.js";
11
11
  import {
12
12
  __name
13
13
  } from "./chunk-SHUYVCID.js";
@@ -3,7 +3,7 @@ import {
3
3
  writeFatal,
4
4
  writeSuccess,
5
5
  writeTrace
6
- } from "./chunk-CEEL5LLM.js";
6
+ } from "./chunk-5GDS63DU.js";
7
7
  import {
8
8
  __name
9
9
  } from "./chunk-SHUYVCID.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  findWorkspaceRoot
3
- } from "./chunk-FXFNC4WC.js";
3
+ } from "./chunk-4E4DSFC4.js";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-SHUYVCID.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  writeTrace
3
- } from "./chunk-CEEL5LLM.js";
3
+ } from "./chunk-5GDS63DU.js";
4
4
  import {
5
5
  findWorkspaceRoot
6
- } from "./chunk-FXFNC4WC.js";
6
+ } from "./chunk-4E4DSFC4.js";
7
7
  import {
8
8
  joinPaths
9
- } from "./chunk-LQJJD6FB.js";
9
+ } from "./chunk-MLUBD3PU.js";
10
10
  import {
11
11
  __name
12
12
  } from "./chunk-SHUYVCID.js";
@@ -6,7 +6,7 @@
6
6
  var _chunkJXLUUN7Zcjs = require('./chunk-JXLUUN7Z.cjs');
7
7
 
8
8
 
9
- var _chunkCRQ4EVX5cjs = require('./chunk-CRQ4EVX5.cjs');
9
+ var _chunkHESFC24Zcjs = require('./chunk-HESFC24Z.cjs');
10
10
 
11
11
 
12
12
  var _chunk3NWKPYIGcjs = require('./chunk-3NWKPYIG.cjs');
@@ -44,15 +44,15 @@ var getConfigEnv = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, () => {
44
44
  licensing: process.env[`${prefix}LICENSING`] || void 0,
45
45
  timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
46
46
  locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
47
- configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkCRQ4EVX5cjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
48
- workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkCRQ4EVX5cjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
47
+ configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkHESFC24Zcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
48
+ workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkHESFC24Zcjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
49
49
  directories: {
50
- cache: process.env[`${prefix}CACHE_DIR`] ? _chunkCRQ4EVX5cjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
51
- data: process.env[`${prefix}DATA_DIR`] ? _chunkCRQ4EVX5cjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
52
- config: process.env[`${prefix}CONFIG_DIR`] ? _chunkCRQ4EVX5cjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
53
- temp: process.env[`${prefix}TEMP_DIR`] ? _chunkCRQ4EVX5cjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
54
- log: process.env[`${prefix}LOG_DIR`] ? _chunkCRQ4EVX5cjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
55
- build: process.env[`${prefix}BUILD_DIR`] ? _chunkCRQ4EVX5cjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
50
+ cache: process.env[`${prefix}CACHE_DIR`] ? _chunkHESFC24Zcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : void 0,
51
+ data: process.env[`${prefix}DATA_DIR`] ? _chunkHESFC24Zcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : void 0,
52
+ config: process.env[`${prefix}CONFIG_DIR`] ? _chunkHESFC24Zcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : void 0,
53
+ temp: process.env[`${prefix}TEMP_DIR`] ? _chunkHESFC24Zcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : void 0,
54
+ log: process.env[`${prefix}LOG_DIR`] ? _chunkHESFC24Zcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : void 0,
55
+ build: process.env[`${prefix}BUILD_DIR`] ? _chunkHESFC24Zcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : void 0
56
56
  },
57
57
  skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
58
58
  env: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}ENV`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
@@ -3,7 +3,7 @@
3
3
  var _chunkXYV3B7TTcjs = require('./chunk-XYV3B7TT.cjs');
4
4
 
5
5
 
6
- var _chunkCRQ4EVX5cjs = require('./chunk-CRQ4EVX5.cjs');
6
+ var _chunkHESFC24Zcjs = require('./chunk-HESFC24Z.cjs');
7
7
 
8
8
 
9
9
  var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
@@ -46,9 +46,9 @@ var rootFiles = [
46
46
  ];
47
47
  function findWorkspaceRootSafe(pathInsideMonorepo) {
48
48
  if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
49
- return _chunkCRQ4EVX5cjs.correctPaths.call(void 0, _nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH)));
49
+ return _chunkHESFC24Zcjs.correctPaths.call(void 0, _nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH)));
50
50
  }
51
- return _chunkCRQ4EVX5cjs.correctPaths.call(void 0, _chunkXYV3B7TTcjs.findFolderUp.call(void 0, _nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles));
51
+ return _chunkHESFC24Zcjs.correctPaths.call(void 0, _chunkXYV3B7TTcjs.findFolderUp.call(void 0, _nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles));
52
52
  }
53
53
  _chunkUSNT2KNTcjs.__name.call(void 0, findWorkspaceRootSafe, "findWorkspaceRootSafe");
54
54
  function findWorkspaceRoot(pathInsideMonorepo) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadStormConfig
3
- } from "./chunk-MZ5BNE43.js";
3
+ } from "./chunk-CSIXX72P.js";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-SHUYVCID.js";
@@ -0,0 +1,245 @@
1
+ import {
2
+ __name
3
+ } from "./chunk-SHUYVCID.js";
4
+
5
+ // src/utilities/correct-paths.ts
6
+ var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
7
+ function normalizeWindowsPath(input = "") {
8
+ if (!input) {
9
+ return input;
10
+ }
11
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
12
+ }
13
+ __name(normalizeWindowsPath, "normalizeWindowsPath");
14
+ var _UNC_REGEX = /^[/\\]{2}/;
15
+ var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
16
+ var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
17
+ var _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
18
+ var _EXTNAME_RE = /.(\.[^./]+|\.)$/;
19
+ var _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
20
+ var sep = "/";
21
+ var correctPaths = /* @__PURE__ */ __name(function(path) {
22
+ if (!path || path.length === 0) {
23
+ return ".";
24
+ }
25
+ path = normalizeWindowsPath(path);
26
+ const isUNCPath = path.match(_UNC_REGEX);
27
+ const isPathAbsolute = isAbsolute(path);
28
+ const trailingSeparator = path[path.length - 1] === "/";
29
+ path = normalizeString(path, !isPathAbsolute);
30
+ if (path.length === 0) {
31
+ if (isPathAbsolute) {
32
+ return "/";
33
+ }
34
+ return trailingSeparator ? "./" : ".";
35
+ }
36
+ if (trailingSeparator) {
37
+ path += "/";
38
+ }
39
+ if (_DRIVE_LETTER_RE.test(path)) {
40
+ path += "/";
41
+ }
42
+ if (isUNCPath) {
43
+ if (!isPathAbsolute) {
44
+ return `//./${path}`;
45
+ }
46
+ return `//${path}`;
47
+ }
48
+ return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
49
+ }, "correctPaths");
50
+ var joinPaths = /* @__PURE__ */ __name(function(...segments) {
51
+ let path = "";
52
+ for (const seg of segments) {
53
+ if (!seg) {
54
+ continue;
55
+ }
56
+ if (path.length > 0) {
57
+ const pathTrailing = path[path.length - 1] === "/";
58
+ const segLeading = seg[0] === "/";
59
+ const both = pathTrailing && segLeading;
60
+ if (both) {
61
+ path += seg.slice(1);
62
+ } else {
63
+ path += pathTrailing || segLeading ? seg : `/${seg}`;
64
+ }
65
+ } else {
66
+ path += seg;
67
+ }
68
+ }
69
+ return correctPaths(path);
70
+ }, "joinPaths");
71
+ function cwd() {
72
+ if (typeof process !== "undefined" && typeof process.cwd === "function") {
73
+ return process.cwd().replace(/\\/g, "/");
74
+ }
75
+ return "/";
76
+ }
77
+ __name(cwd, "cwd");
78
+ var resolve = /* @__PURE__ */ __name(function(...arguments_) {
79
+ arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
80
+ let resolvedPath = "";
81
+ let resolvedAbsolute = false;
82
+ for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
83
+ const path = index >= 0 ? arguments_[index] : cwd();
84
+ if (!path || path.length === 0) {
85
+ continue;
86
+ }
87
+ resolvedPath = `${path}/${resolvedPath}`;
88
+ resolvedAbsolute = isAbsolute(path);
89
+ }
90
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
91
+ if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
92
+ return `/${resolvedPath}`;
93
+ }
94
+ return resolvedPath.length > 0 ? resolvedPath : ".";
95
+ }, "resolve");
96
+ function normalizeString(path, allowAboveRoot) {
97
+ let res = "";
98
+ let lastSegmentLength = 0;
99
+ let lastSlash = -1;
100
+ let dots = 0;
101
+ let char = null;
102
+ for (let index = 0; index <= path.length; ++index) {
103
+ if (index < path.length) {
104
+ char = path[index];
105
+ } else if (char === "/") {
106
+ break;
107
+ } else {
108
+ char = "/";
109
+ }
110
+ if (char === "/") {
111
+ if (lastSlash === index - 1 || dots === 1) {
112
+ } else if (dots === 2) {
113
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
114
+ if (res.length > 2) {
115
+ const lastSlashIndex = res.lastIndexOf("/");
116
+ if (lastSlashIndex === -1) {
117
+ res = "";
118
+ lastSegmentLength = 0;
119
+ } else {
120
+ res = res.slice(0, lastSlashIndex);
121
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
122
+ }
123
+ lastSlash = index;
124
+ dots = 0;
125
+ continue;
126
+ } else if (res.length > 0) {
127
+ res = "";
128
+ lastSegmentLength = 0;
129
+ lastSlash = index;
130
+ dots = 0;
131
+ continue;
132
+ }
133
+ }
134
+ if (allowAboveRoot) {
135
+ res += res.length > 0 ? "/.." : "..";
136
+ lastSegmentLength = 2;
137
+ }
138
+ } else {
139
+ if (res.length > 0) {
140
+ res += `/${path.slice(lastSlash + 1, index)}`;
141
+ } else {
142
+ res = path.slice(lastSlash + 1, index);
143
+ }
144
+ lastSegmentLength = index - lastSlash - 1;
145
+ }
146
+ lastSlash = index;
147
+ dots = 0;
148
+ } else if (char === "." && dots !== -1) {
149
+ ++dots;
150
+ } else {
151
+ dots = -1;
152
+ }
153
+ }
154
+ return res;
155
+ }
156
+ __name(normalizeString, "normalizeString");
157
+ var isAbsolute = /* @__PURE__ */ __name(function(p) {
158
+ return _IS_ABSOLUTE_RE.test(p);
159
+ }, "isAbsolute");
160
+ var toNamespacedPath = /* @__PURE__ */ __name(function(p) {
161
+ return normalizeWindowsPath(p);
162
+ }, "toNamespacedPath");
163
+ var extname = /* @__PURE__ */ __name(function(p) {
164
+ if (p === "..") return "";
165
+ const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
166
+ return match && match[1] || "";
167
+ }, "extname");
168
+ var relative = /* @__PURE__ */ __name(function(from, to) {
169
+ const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
170
+ const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
171
+ if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
172
+ return _to.join("/");
173
+ }
174
+ const _fromCopy = [
175
+ ..._from
176
+ ];
177
+ for (const segment of _fromCopy) {
178
+ if (_to[0] !== segment) {
179
+ break;
180
+ }
181
+ _from.shift();
182
+ _to.shift();
183
+ }
184
+ return [
185
+ ..._from.map(() => ".."),
186
+ ..._to
187
+ ].join("/");
188
+ }, "relative");
189
+ var dirname = /* @__PURE__ */ __name(function(p) {
190
+ const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
191
+ if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
192
+ segments[0] += "/";
193
+ }
194
+ return segments.join("/") || (isAbsolute(p) ? "/" : ".");
195
+ }, "dirname");
196
+ var format = /* @__PURE__ */ __name(function(p) {
197
+ const ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "";
198
+ const segments = [
199
+ p.root,
200
+ p.dir,
201
+ p.base ?? (p.name ?? "") + ext
202
+ ].filter(Boolean);
203
+ return normalizeWindowsPath(p.root ? resolve(...segments) : segments.join("/"));
204
+ }, "format");
205
+ var basename = /* @__PURE__ */ __name(function(p, extension) {
206
+ const segments = normalizeWindowsPath(p).split("/");
207
+ let lastSegment = "";
208
+ for (let i = segments.length - 1; i >= 0; i--) {
209
+ const val = segments[i];
210
+ if (val) {
211
+ lastSegment = val;
212
+ break;
213
+ }
214
+ }
215
+ return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
216
+ }, "basename");
217
+ var parse = /* @__PURE__ */ __name(function(p) {
218
+ const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "";
219
+ const base = basename(p);
220
+ const extension = extname(base);
221
+ return {
222
+ root,
223
+ dir: dirname(p),
224
+ base,
225
+ ext: extension,
226
+ name: base.slice(0, base.length - extension.length)
227
+ };
228
+ }, "parse");
229
+
230
+ export {
231
+ normalizeWindowsPath,
232
+ sep,
233
+ correctPaths,
234
+ joinPaths,
235
+ resolve,
236
+ normalizeString,
237
+ isAbsolute,
238
+ toNamespacedPath,
239
+ extname,
240
+ relative,
241
+ dirname,
242
+ format,
243
+ basename,
244
+ parse
245
+ };
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } 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
2
 
3
- var _chunkEOQEK2MMcjs = require('./chunk-EOQEK2MM.cjs');
3
+ var _chunk5K6CXYFFcjs = require('./chunk-5K6CXYFF.cjs');
4
4
 
5
5
 
6
- var _chunkB6J2YUGOcjs = require('./chunk-B6J2YUGO.cjs');
6
+ var _chunkMAMYTWWYcjs = require('./chunk-MAMYTWWY.cjs');
7
7
 
8
8
 
9
- var _chunkCRQ4EVX5cjs = require('./chunk-CRQ4EVX5.cjs');
9
+ var _chunkHESFC24Zcjs = require('./chunk-HESFC24Z.cjs');
10
10
 
11
11
 
12
12
  var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
@@ -15,7 +15,7 @@ var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
15
15
  var _c12 = require('c12');
16
16
  var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
17
17
  var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
18
- const workspacePath = filePath || _chunkB6J2YUGOcjs.findWorkspaceRoot.call(void 0, filePath);
18
+ const workspacePath = filePath || _chunkMAMYTWWYcjs.findWorkspaceRoot.call(void 0, filePath);
19
19
  const configs = await Promise.all([
20
20
  _c12.loadConfig.call(void 0, {
21
21
  cwd: workspacePath,
@@ -24,7 +24,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0,
24
24
  envName: _optionalChain([fileName, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]),
25
25
  jitiOptions: {
26
26
  debug: false,
27
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkCRQ4EVX5cjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
27
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkHESFC24Zcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
28
28
  },
29
29
  ...options
30
30
  }),
@@ -35,7 +35,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0,
35
35
  envName: _optionalChain([fileName, 'optionalAccess', _3 => _3.toUpperCase, 'call', _4 => _4()]),
36
36
  jitiOptions: {
37
37
  debug: false,
38
- fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkCRQ4EVX5cjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
38
+ fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkHESFC24Zcjs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
39
39
  },
40
40
  configFile: fileName,
41
41
  ...options
@@ -44,12 +44,12 @@ var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0,
44
44
  return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
45
45
  }, "getConfigFileByName");
46
46
  var getConfigFile = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
47
- const workspacePath = filePath ? filePath : _chunkB6J2YUGOcjs.findWorkspaceRoot.call(void 0, filePath);
47
+ const workspacePath = filePath ? filePath : _chunkMAMYTWWYcjs.findWorkspaceRoot.call(void 0, filePath);
48
48
  const result = await getConfigFileByName("storm", workspacePath);
49
49
  let config = result.config;
50
50
  const configFile = result.configFile;
51
51
  if (config && configFile && Object.keys(config).length > 0) {
52
- _chunkEOQEK2MMcjs.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
52
+ _chunk5K6CXYFFcjs.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
53
53
  logLevel: "all"
54
54
  });
55
55
  }
@@ -57,7 +57,7 @@ var getConfigFile = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async
57
57
  const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
58
58
  for (const result2 of results) {
59
59
  if (_optionalChain([result2, 'optionalAccess', _5 => _5.config]) && _optionalChain([result2, 'optionalAccess', _6 => _6.configFile]) && Object.keys(result2.config).length > 0) {
60
- _chunkEOQEK2MMcjs.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
60
+ _chunk5K6CXYFFcjs.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
61
61
  logLevel: "all"
62
62
  });
63
63
  config = _defu2.default.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));