@storm-software/config-tools 1.150.5 → 1.150.9

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 (130) hide show
  1. package/README.md +1 -1
  2. package/bin/config.cjs +14795 -283
  3. package/bin/config.js +14806 -266
  4. package/dist/chunk-2MY3KGBB.cjs +70 -0
  5. package/dist/chunk-322YBAWX.js +6 -0
  6. package/dist/chunk-3BGF4LNL.cjs +67 -0
  7. package/dist/chunk-3OZGKUMC.js +1120 -0
  8. package/dist/chunk-4CTFS6DM.js +143 -0
  9. package/dist/chunk-4YA7DJB5.cjs +451 -0
  10. package/dist/chunk-56RY3KW7.cjs +6 -0
  11. package/dist/chunk-5LYWI7E7.cjs +49 -0
  12. package/dist/chunk-5SDU662B.js +274 -0
  13. package/dist/chunk-5XAQKBRL.js +510 -0
  14. package/dist/chunk-6JG5O6FD.js +2645 -0
  15. package/dist/chunk-6R6FJLKT.cjs +84 -0
  16. package/dist/chunk-6ZPVROB4.js +51 -0
  17. package/dist/chunk-73C3QB67.js +27 -0
  18. package/dist/chunk-77YC3XPW.js +9228 -0
  19. package/dist/chunk-7PDFNXOV.js +67 -0
  20. package/dist/chunk-B2HXAAFT.cjs +274 -0
  21. package/dist/chunk-BKJUQIEL.cjs +6 -0
  22. package/dist/chunk-CHYZZRN6.cjs +165 -0
  23. package/dist/chunk-CUX3BOLK.cjs +6 -0
  24. package/dist/chunk-DYTSQ3L3.js +14 -0
  25. package/dist/chunk-E554LMEP.cjs +28 -0
  26. package/dist/chunk-FUALBFYR.cjs +247 -0
  27. package/dist/chunk-FZMUKCM5.js +50 -0
  28. package/dist/chunk-G62PQROD.cjs +510 -0
  29. package/dist/chunk-GJDVCWVL.cjs +27 -0
  30. package/dist/chunk-GZ6SGFYZ.cjs +2645 -0
  31. package/dist/chunk-HAYTD5F2.js +247 -0
  32. package/dist/chunk-HBJSM6VU.js +6 -0
  33. package/dist/chunk-HLB4MOTZ.js +6 -0
  34. package/dist/chunk-HUMXKKE6.js +765 -0
  35. package/dist/chunk-HVVHVCVH.js +24 -0
  36. package/dist/chunk-I2LFMHGF.cjs +14 -0
  37. package/dist/chunk-I5FJ2QOS.js +84 -0
  38. package/dist/chunk-IYMLNFGA.cjs +33 -0
  39. package/dist/chunk-JN37L7NL.js +33 -0
  40. package/dist/chunk-JVONSFJS.cjs +765 -0
  41. package/dist/chunk-KN7POPML.cjs +21 -0
  42. package/dist/chunk-KONO4OMT.cjs +9231 -0
  43. package/dist/chunk-KQLERSRE.js +93 -0
  44. package/dist/chunk-KXHNOCVY.cjs +24 -0
  45. package/dist/chunk-LAIQ2Z5B.cjs +93 -0
  46. package/dist/chunk-LUQRLSMI.js +6 -0
  47. package/dist/chunk-M3KQNO7N.cjs +93 -0
  48. package/dist/chunk-MJL6D7T3.js +28 -0
  49. package/dist/chunk-MKB5GTL4.js +451 -0
  50. package/dist/chunk-MMMRCNC6.js +77 -0
  51. package/dist/chunk-NERZUU47.js +93 -0
  52. package/dist/chunk-NVXMXDZM.js +70 -0
  53. package/dist/chunk-NWFS53UA.js +21 -0
  54. package/dist/chunk-PBEGXSGU.js +165 -0
  55. package/dist/chunk-PMRCDW2Q.cjs +44 -0
  56. package/dist/chunk-RDWCJD4I.cjs +30 -0
  57. package/dist/chunk-RN5XBSCX.cjs +77 -0
  58. package/dist/chunk-TJ7RSPG3.cjs +6 -0
  59. package/dist/chunk-US52HP52.cjs +143 -0
  60. package/dist/chunk-UXYX4UF4.cjs +50 -0
  61. package/dist/chunk-W7YJIINP.js +49 -0
  62. package/dist/chunk-WTHXS4H2.js +44 -0
  63. package/dist/chunk-X3T2GC65.cjs +51 -0
  64. package/dist/chunk-XUGBUGHC.cjs +1120 -0
  65. package/dist/chunk-YO6XHACG.js +30 -0
  66. package/dist/config-file/get-config-file.cjs +26 -66
  67. package/dist/config-file/get-config-file.js +25 -65
  68. package/dist/config-file/index.cjs +31 -1
  69. package/dist/config-file/index.js +31 -1
  70. package/dist/create-storm-config.cjs +30 -68
  71. package/dist/create-storm-config.js +29 -67
  72. package/dist/env/get-env.cjs +8 -152
  73. package/dist/env/get-env.js +7 -151
  74. package/dist/env/index.cjs +19 -2
  75. package/dist/env/index.js +19 -2
  76. package/dist/env/set-env.cjs +8 -259
  77. package/dist/env/set-env.js +7 -258
  78. package/dist/esm-HKV66HQZ.js +1716 -0
  79. package/dist/esm-TZUWSATN.cjs +1716 -0
  80. package/dist/get-config.cjs +29 -9
  81. package/dist/get-config.js +29 -9
  82. package/dist/index.cjs +180 -7
  83. package/dist/index.js +180 -7
  84. package/dist/json5-NI4CISQP.cjs +10 -0
  85. package/dist/json5-XMK3UBET.js +10 -0
  86. package/dist/jsonc-GYGN4BMZ.js +15 -0
  87. package/dist/jsonc-TDL6NXBV.cjs +15 -0
  88. package/dist/logger/chalk.cjs +4 -30
  89. package/dist/logger/chalk.js +3 -29
  90. package/dist/logger/console-icons.cjs +5 -15
  91. package/dist/logger/console-icons.js +5 -15
  92. package/dist/logger/console.cjs +37 -125
  93. package/dist/logger/console.js +23 -111
  94. package/dist/logger/create-logger.cjs +15 -31
  95. package/dist/logger/create-logger.js +14 -30
  96. package/dist/logger/format-timestamp.cjs +3 -5
  97. package/dist/logger/format-timestamp.js +3 -5
  98. package/dist/logger/get-log-level.cjs +6 -56
  99. package/dist/logger/get-log-level.js +6 -56
  100. package/dist/logger/index.cjs +61 -7
  101. package/dist/logger/index.js +61 -7
  102. package/dist/logger/is-unicode-supported.cjs +4 -16
  103. package/dist/logger/is-unicode-supported.js +3 -15
  104. package/dist/toml-5NX5FGDD.cjs +10 -0
  105. package/dist/toml-ZYXFVZLI.js +10 -0
  106. package/dist/types.cjs +6 -24
  107. package/dist/types.js +5 -23
  108. package/dist/utilities/apply-workspace-tokens.cjs +9 -55
  109. package/dist/utilities/apply-workspace-tokens.js +8 -54
  110. package/dist/utilities/correct-paths.cjs +33 -242
  111. package/dist/utilities/correct-paths.js +16 -225
  112. package/dist/utilities/file-path-utils.cjs +5 -18
  113. package/dist/utilities/file-path-utils.js +4 -17
  114. package/dist/utilities/find-up.cjs +4 -22
  115. package/dist/utilities/find-up.js +3 -21
  116. package/dist/utilities/find-workspace-root.cjs +7 -64
  117. package/dist/utilities/find-workspace-root.js +6 -63
  118. package/dist/utilities/get-default-config.cjs +7 -79
  119. package/dist/utilities/get-default-config.js +7 -79
  120. package/dist/utilities/index.cjs +84 -7
  121. package/dist/utilities/index.js +84 -7
  122. package/dist/utilities/process-handler.cjs +16 -35
  123. package/dist/utilities/process-handler.js +16 -35
  124. package/dist/utilities/run.cjs +6 -34
  125. package/dist/utilities/run.js +5 -33
  126. package/dist/yaml-GRT7ORXT.cjs +10 -0
  127. package/dist/yaml-WD4DF2QH.js +10 -0
  128. package/package.json +7 -4
  129. package/dist/chunk-SHUYVCID.js +0 -6
  130. package/dist/chunk-USNT2KNT.cjs +0 -6
@@ -1,229 +1,20 @@
1
1
  import {
2
- __name
3
- } from "../chunk-SHUYVCID.js";
4
- const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
5
- function normalizeWindowsPath(input = "") {
6
- if (!input) {
7
- return input;
8
- }
9
- return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
10
- }
11
- __name(normalizeWindowsPath, "normalizeWindowsPath");
12
- const _UNC_REGEX = /^[/\\]{2}/;
13
- const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
14
- const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
15
- const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
16
- const _EXTNAME_RE = /.(\.[^./]+|\.)$/;
17
- const _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
18
- const sep = "/";
19
- const correctPaths = /* @__PURE__ */ __name(function(path) {
20
- if (!path || path.length === 0) {
21
- return ".";
22
- }
23
- path = normalizeWindowsPath(path);
24
- const isUNCPath = path.match(_UNC_REGEX);
25
- const isPathAbsolute = isAbsolute(path);
26
- const trailingSeparator = path[path.length - 1] === "/";
27
- path = normalizeString(path, !isPathAbsolute);
28
- if (path.length === 0) {
29
- if (isPathAbsolute) {
30
- return "/";
31
- }
32
- return trailingSeparator ? "./" : ".";
33
- }
34
- if (trailingSeparator) {
35
- path += "/";
36
- }
37
- if (_DRIVE_LETTER_RE.test(path)) {
38
- path += "/";
39
- }
40
- if (isUNCPath) {
41
- if (!isPathAbsolute) {
42
- return `//./${path}`;
43
- }
44
- return `//${path}`;
45
- }
46
- return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
47
- }, "correctPaths");
48
- const joinPaths = /* @__PURE__ */ __name(function(...segments) {
49
- let path = "";
50
- for (const seg of segments) {
51
- if (!seg) {
52
- continue;
53
- }
54
- if (path.length > 0) {
55
- const pathTrailing = path[path.length - 1] === "/";
56
- const segLeading = seg[0] === "/";
57
- const both = pathTrailing && segLeading;
58
- if (both) {
59
- path += seg.slice(1);
60
- } else {
61
- path += pathTrailing || segLeading ? seg : `/${seg}`;
62
- }
63
- } else {
64
- path += seg;
65
- }
66
- }
67
- return correctPaths(path);
68
- }, "joinPaths");
69
- function cwd() {
70
- if (typeof process !== "undefined" && typeof process.cwd === "function") {
71
- return process.cwd().replace(/\\/g, "/");
72
- }
73
- return "/";
74
- }
75
- __name(cwd, "cwd");
76
- const resolve = /* @__PURE__ */ __name(function(...arguments_) {
77
- arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
78
- let resolvedPath = "";
79
- let resolvedAbsolute = false;
80
- for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
81
- const path = index >= 0 ? arguments_[index] : cwd();
82
- if (!path || path.length === 0) {
83
- continue;
84
- }
85
- resolvedPath = `${path}/${resolvedPath}`;
86
- resolvedAbsolute = isAbsolute(path);
87
- }
88
- resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
89
- if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
90
- return `/${resolvedPath}`;
91
- }
92
- return resolvedPath.length > 0 ? resolvedPath : ".";
93
- }, "resolve");
94
- function normalizeString(path, allowAboveRoot) {
95
- let res = "";
96
- let lastSegmentLength = 0;
97
- let lastSlash = -1;
98
- let dots = 0;
99
- let char = null;
100
- for (let index = 0; index <= path.length; ++index) {
101
- if (index < path.length) {
102
- char = path[index];
103
- } else if (char === "/") {
104
- break;
105
- } else {
106
- char = "/";
107
- }
108
- if (char === "/") {
109
- if (lastSlash === index - 1 || dots === 1) {
110
- } else if (dots === 2) {
111
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
112
- if (res.length > 2) {
113
- const lastSlashIndex = res.lastIndexOf("/");
114
- if (lastSlashIndex === -1) {
115
- res = "";
116
- lastSegmentLength = 0;
117
- } else {
118
- res = res.slice(0, lastSlashIndex);
119
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
120
- }
121
- lastSlash = index;
122
- dots = 0;
123
- continue;
124
- } else if (res.length > 0) {
125
- res = "";
126
- lastSegmentLength = 0;
127
- lastSlash = index;
128
- dots = 0;
129
- continue;
130
- }
131
- }
132
- if (allowAboveRoot) {
133
- res += res.length > 0 ? "/.." : "..";
134
- lastSegmentLength = 2;
135
- }
136
- } else {
137
- if (res.length > 0) {
138
- res += `/${path.slice(lastSlash + 1, index)}`;
139
- } else {
140
- res = path.slice(lastSlash + 1, index);
141
- }
142
- lastSegmentLength = index - lastSlash - 1;
143
- }
144
- lastSlash = index;
145
- dots = 0;
146
- } else if (char === "." && dots !== -1) {
147
- ++dots;
148
- } else {
149
- dots = -1;
150
- }
151
- }
152
- return res;
153
- }
154
- __name(normalizeString, "normalizeString");
155
- const isAbsolute = /* @__PURE__ */ __name(function(p) {
156
- return _IS_ABSOLUTE_RE.test(p);
157
- }, "isAbsolute");
158
- const toNamespacedPath = /* @__PURE__ */ __name(function(p) {
159
- return normalizeWindowsPath(p);
160
- }, "toNamespacedPath");
161
- const extname = /* @__PURE__ */ __name(function(p) {
162
- if (p === "..") return "";
163
- const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
164
- return match && match[1] || "";
165
- }, "extname");
166
- const relative = /* @__PURE__ */ __name(function(from, to) {
167
- const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
168
- const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
169
- if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
170
- return _to.join("/");
171
- }
172
- const _fromCopy = [
173
- ..._from
174
- ];
175
- for (const segment of _fromCopy) {
176
- if (_to[0] !== segment) {
177
- break;
178
- }
179
- _from.shift();
180
- _to.shift();
181
- }
182
- return [
183
- ..._from.map(() => ".."),
184
- ..._to
185
- ].join("/");
186
- }, "relative");
187
- const dirname = /* @__PURE__ */ __name(function(p) {
188
- const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
189
- if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
190
- segments[0] += "/";
191
- }
192
- return segments.join("/") || (isAbsolute(p) ? "/" : ".");
193
- }, "dirname");
194
- const format = /* @__PURE__ */ __name(function(p) {
195
- const ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "";
196
- const segments = [
197
- p.root,
198
- p.dir,
199
- p.base ?? (p.name ?? "") + ext
200
- ].filter(Boolean);
201
- return normalizeWindowsPath(p.root ? resolve(...segments) : segments.join("/"));
202
- }, "format");
203
- const basename = /* @__PURE__ */ __name(function(p, extension) {
204
- const segments = normalizeWindowsPath(p).split("/");
205
- let lastSegment = "";
206
- for (let i = segments.length - 1; i >= 0; i--) {
207
- const val = segments[i];
208
- if (val) {
209
- lastSegment = val;
210
- break;
211
- }
212
- }
213
- return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
214
- }, "basename");
215
- const parse = /* @__PURE__ */ __name(function(p) {
216
- const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "";
217
- const base = basename(p);
218
- const extension = extname(base);
219
- return {
220
- root,
221
- dir: dirname(p),
222
- base,
223
- ext: extension,
224
- name: base.slice(0, base.length - extension.length)
225
- };
226
- }, "parse");
2
+ basename,
3
+ correctPaths,
4
+ dirname,
5
+ extname,
6
+ format,
7
+ isAbsolute,
8
+ joinPaths,
9
+ normalizeString,
10
+ normalizeWindowsPath,
11
+ parse,
12
+ relative,
13
+ resolve,
14
+ sep,
15
+ toNamespacedPath
16
+ } from "../chunk-HAYTD5F2.js";
17
+ import "../chunk-W7YJIINP.js";
227
18
  export {
228
19
  basename,
229
20
  correctPaths,
@@ -1,22 +1,9 @@
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; }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkUSNT2KNTcjs = require('../chunk-USNT2KNT.cjs');
4
- var _nodepath = require('node:path');
5
- const removeExtension = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (filePath) => {
6
- const result = !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
7
- if (result.startsWith("./")) {
8
- return result.substring(2);
9
- }
10
- if (result.startsWith(".") || result.startsWith("/")) {
11
- return result.substring(1);
12
- }
13
- return result;
14
- }, "removeExtension");
15
- function findFileName(filePath) {
16
- return _nullishCoalesce(_optionalChain([filePath, 'optionalAccess', _ => _.split, 'call', _2 => _2(_optionalChain([filePath, 'optionalAccess', _3 => _3.includes, 'call', _4 => _4(_nodepath.sep)]) ? _nodepath.sep : _optionalChain([filePath, 'optionalAccess', _5 => _5.includes, 'call', _6 => _6("/")]) ? "/" : "\\"), 'optionalAccess', _7 => _7.pop, 'call', _8 => _8()]), () => ( ""));
17
- }
18
- _chunkUSNT2KNTcjs.__name.call(void 0, findFileName, "findFileName");
19
3
 
4
+ var _chunkGJDVCWVLcjs = require('../chunk-GJDVCWVL.cjs');
5
+ require('../chunk-5LYWI7E7.cjs');
20
6
 
21
7
 
22
- exports.findFileName = findFileName; exports.removeExtension = removeExtension;
8
+
9
+ exports.findFileName = _chunkGJDVCWVLcjs.findFileName; exports.removeExtension = _chunkGJDVCWVLcjs.removeExtension;
@@ -1,21 +1,8 @@
1
1
  import {
2
- __name
3
- } from "../chunk-SHUYVCID.js";
4
- import { sep } from "node:path";
5
- const removeExtension = /* @__PURE__ */ __name((filePath) => {
6
- const result = !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
7
- if (result.startsWith("./")) {
8
- return result.substring(2);
9
- }
10
- if (result.startsWith(".") || result.startsWith("/")) {
11
- return result.substring(1);
12
- }
13
- return result;
14
- }, "removeExtension");
15
- function findFileName(filePath) {
16
- return filePath?.split(filePath?.includes(sep) ? sep : filePath?.includes("/") ? "/" : "\\")?.pop() ?? "";
17
- }
18
- __name(findFileName, "findFileName");
2
+ findFileName,
3
+ removeExtension
4
+ } from "../chunk-73C3QB67.js";
5
+ import "../chunk-W7YJIINP.js";
19
6
  export {
20
7
  findFileName,
21
8
  removeExtension
@@ -1,25 +1,7 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkUSNT2KNTcjs = require('../chunk-USNT2KNT.cjs');
4
- var _nodefs = require('node:fs');
5
- var _nodepath = require('node:path');
6
- const MAX_PATH_SEARCH_DEPTH = 30;
7
- let depth = 0;
8
- function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
9
- const _startPath = _nullishCoalesce(startPath, () => ( process.cwd()));
10
- if (endDirectoryNames.some((endDirName) => _nodefs.existsSync.call(void 0, _nodepath.join.call(void 0, _startPath, endDirName)))) {
11
- return _startPath;
12
- }
13
- if (endFileNames.some((endFileName) => _nodefs.existsSync.call(void 0, _nodepath.join.call(void 0, _startPath, endFileName)))) {
14
- return _startPath;
15
- }
16
- if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
17
- const parent = _nodepath.join.call(void 0, _startPath, "..");
18
- return findFolderUp(parent, endFileNames, endDirectoryNames);
19
- }
20
- return void 0;
21
- }
22
- _chunkUSNT2KNTcjs.__name.call(void 0, findFolderUp, "findFolderUp");
3
+ var _chunkRDWCJD4Icjs = require('../chunk-RDWCJD4I.cjs');
4
+ require('../chunk-5LYWI7E7.cjs');
23
5
 
24
6
 
25
- exports.findFolderUp = findFolderUp;
7
+ exports.findFolderUp = _chunkRDWCJD4Icjs.findFolderUp;
@@ -1,25 +1,7 @@
1
1
  import {
2
- __name
3
- } from "../chunk-SHUYVCID.js";
4
- import { existsSync } from "node:fs";
5
- import { join } from "node:path";
6
- const MAX_PATH_SEARCH_DEPTH = 30;
7
- let depth = 0;
8
- function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
9
- const _startPath = startPath ?? process.cwd();
10
- if (endDirectoryNames.some((endDirName) => existsSync(join(_startPath, endDirName)))) {
11
- return _startPath;
12
- }
13
- if (endFileNames.some((endFileName) => existsSync(join(_startPath, endFileName)))) {
14
- return _startPath;
15
- }
16
- if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
17
- const parent = join(_startPath, "..");
18
- return findFolderUp(parent, endFileNames, endDirectoryNames);
19
- }
20
- return void 0;
21
- }
22
- __name(findFolderUp, "findFolderUp");
2
+ findFolderUp
3
+ } from "../chunk-YO6XHACG.js";
4
+ import "../chunk-W7YJIINP.js";
23
5
  export {
24
6
  findFolderUp
25
7
  };
@@ -1,68 +1,11 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkUSNT2KNTcjs = require('../chunk-USNT2KNT.cjs');
4
- var _correctpaths = require('./correct-paths');
5
- var _findup = require('./find-up');
6
- const rootFiles = [
7
- "storm-workspace.json",
8
- "storm-workspace.json",
9
- "storm-workspace.yaml",
10
- "storm-workspace.yml",
11
- "storm-workspace.js",
12
- "storm-workspace.ts",
13
- ".storm-workspace.json",
14
- ".storm-workspace.yaml",
15
- ".storm-workspace.yml",
16
- ".storm-workspace.js",
17
- ".storm-workspace.ts",
18
- "lerna.json",
19
- "nx.json",
20
- "turbo.json",
21
- "npm-workspace.json",
22
- "yarn-workspace.json",
23
- "pnpm-workspace.json",
24
- "npm-workspace.yaml",
25
- "yarn-workspace.yaml",
26
- "pnpm-workspace.yaml",
27
- "npm-workspace.yml",
28
- "yarn-workspace.yml",
29
- "pnpm-workspace.yml",
30
- "npm-lock.json",
31
- "yarn-lock.json",
32
- "pnpm-lock.json",
33
- "npm-lock.yaml",
34
- "yarn-lock.yaml",
35
- "pnpm-lock.yaml",
36
- "npm-lock.yml",
37
- "yarn-lock.yml",
38
- "pnpm-lock.yml",
39
- "bun.lockb"
40
- ];
41
- const rootDirectories = [
42
- ".storm-workspace",
43
- ".nx",
44
- ".github",
45
- ".vscode",
46
- ".verdaccio"
47
- ];
48
- function findWorkspaceRootSafe(pathInsideMonorepo) {
49
- if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
50
- return _correctpaths.correctPaths.call(void 0, _nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH)));
51
- }
52
- return _correctpaths.correctPaths.call(void 0, _findup.findFolderUp.call(void 0, _nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles, rootDirectories));
53
- }
54
- _chunkUSNT2KNTcjs.__name.call(void 0, findWorkspaceRootSafe, "findWorkspaceRootSafe");
55
- function findWorkspaceRoot(pathInsideMonorepo) {
56
- const result = findWorkspaceRootSafe(pathInsideMonorepo);
57
- if (!result) {
58
- throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
59
- ${rootFiles.join("\n")}
60
- Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
61
- }
62
- return result;
63
- }
64
- _chunkUSNT2KNTcjs.__name.call(void 0, findWorkspaceRoot, "findWorkspaceRoot");
65
3
 
4
+ var _chunkRN5XBSCXcjs = require('../chunk-RN5XBSCX.cjs');
5
+ require('../chunk-RDWCJD4I.cjs');
6
+ require('../chunk-FUALBFYR.cjs');
7
+ require('../chunk-5LYWI7E7.cjs');
66
8
 
67
9
 
68
- exports.findWorkspaceRoot = findWorkspaceRoot; exports.findWorkspaceRootSafe = findWorkspaceRootSafe;
10
+
11
+ exports.findWorkspaceRoot = _chunkRN5XBSCXcjs.findWorkspaceRoot; exports.findWorkspaceRootSafe = _chunkRN5XBSCXcjs.findWorkspaceRootSafe;
@@ -1,67 +1,10 @@
1
1
  import {
2
- __name
3
- } from "../chunk-SHUYVCID.js";
4
- import { correctPaths } from "./correct-paths";
5
- import { findFolderUp } from "./find-up";
6
- const rootFiles = [
7
- "storm-workspace.json",
8
- "storm-workspace.json",
9
- "storm-workspace.yaml",
10
- "storm-workspace.yml",
11
- "storm-workspace.js",
12
- "storm-workspace.ts",
13
- ".storm-workspace.json",
14
- ".storm-workspace.yaml",
15
- ".storm-workspace.yml",
16
- ".storm-workspace.js",
17
- ".storm-workspace.ts",
18
- "lerna.json",
19
- "nx.json",
20
- "turbo.json",
21
- "npm-workspace.json",
22
- "yarn-workspace.json",
23
- "pnpm-workspace.json",
24
- "npm-workspace.yaml",
25
- "yarn-workspace.yaml",
26
- "pnpm-workspace.yaml",
27
- "npm-workspace.yml",
28
- "yarn-workspace.yml",
29
- "pnpm-workspace.yml",
30
- "npm-lock.json",
31
- "yarn-lock.json",
32
- "pnpm-lock.json",
33
- "npm-lock.yaml",
34
- "yarn-lock.yaml",
35
- "pnpm-lock.yaml",
36
- "npm-lock.yml",
37
- "yarn-lock.yml",
38
- "pnpm-lock.yml",
39
- "bun.lockb"
40
- ];
41
- const rootDirectories = [
42
- ".storm-workspace",
43
- ".nx",
44
- ".github",
45
- ".vscode",
46
- ".verdaccio"
47
- ];
48
- function findWorkspaceRootSafe(pathInsideMonorepo) {
49
- if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
50
- return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
51
- }
52
- return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
53
- }
54
- __name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
55
- function findWorkspaceRoot(pathInsideMonorepo) {
56
- const result = findWorkspaceRootSafe(pathInsideMonorepo);
57
- if (!result) {
58
- throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
59
- ${rootFiles.join("\n")}
60
- Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
61
- }
62
- return result;
63
- }
64
- __name(findWorkspaceRoot, "findWorkspaceRoot");
2
+ findWorkspaceRoot,
3
+ findWorkspaceRootSafe
4
+ } from "../chunk-MMMRCNC6.js";
5
+ import "../chunk-YO6XHACG.js";
6
+ import "../chunk-HAYTD5F2.js";
7
+ import "../chunk-W7YJIINP.js";
65
8
  export {
66
9
  findWorkspaceRoot,
67
10
  findWorkspaceRootSafe
@@ -1,84 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkUSNT2KNTcjs = require('../chunk-USNT2KNT.cjs');
4
- var _config = require('@storm-software/config');
5
- var _nodefs = require('node:fs');
6
- var _promises = require('node:fs/promises');
7
- var _nodepath = require('node:path');
8
- var _correctpaths = require('./correct-paths');
9
- var _findworkspaceroot = require('./find-workspace-root');
10
- const DEFAULT_COLOR_CONFIG = {
11
- "light": {
12
- "background": "#fafafa",
13
- "foreground": "#1d1e22",
14
- "brand": "#1fb2a6",
15
- "alternate": "#db2777",
16
- "help": "#5C4EE5",
17
- "success": "#087f5b",
18
- "info": "#0550ae",
19
- "warning": "#e3b341",
20
- "danger": "#D8314A",
21
- "positive": "#22c55e",
22
- "negative": "#dc2626"
23
- },
24
- "dark": {
25
- "background": "#1d1e22",
26
- "foreground": "#cbd5e1",
27
- "brand": "#2dd4bf",
28
- "alternate": "#db2777",
29
- "help": "#818cf8",
30
- "success": "#10b981",
31
- "info": "#58a6ff",
32
- "warning": "#f3d371",
33
- "danger": "#D8314A",
34
- "positive": "#22c55e",
35
- "negative": "#dc2626"
36
- }
37
- };
38
- const getDefaultConfig = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (root) => {
39
- let license = _config.STORM_DEFAULT_LICENSE;
40
- let homepage = _config.STORM_DEFAULT_HOMEPAGE;
41
- let name = void 0;
42
- let namespace = void 0;
43
- let repository = void 0;
44
- const workspaceRoot = _findworkspaceroot.findWorkspaceRoot.call(void 0, root);
45
- if (_nodefs.existsSync.call(void 0, _nodepath.join.call(void 0, workspaceRoot, "package.json"))) {
46
- const file = await _promises.readFile.call(void 0, _correctpaths.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
47
- if (file) {
48
- const packageJson = JSON.parse(file);
49
- if (packageJson.name) {
50
- name = packageJson.name;
51
- }
52
- if (packageJson.namespace) {
53
- namespace = packageJson.namespace;
54
- }
55
- if (packageJson.repository) {
56
- if (typeof packageJson.repository === "string") {
57
- repository = packageJson.repository;
58
- } else if (packageJson.repository.url) {
59
- repository = packageJson.repository.url;
60
- }
61
- }
62
- if (packageJson.license) {
63
- license = packageJson.license;
64
- }
65
- if (packageJson.homepage) {
66
- homepage = packageJson.homepage;
67
- }
68
- }
69
- }
70
- return {
71
- workspaceRoot,
72
- name,
73
- namespace,
74
- repository,
75
- license,
76
- homepage,
77
- docs: `${homepage || _config.STORM_DEFAULT_HOMEPAGE}/docs`,
78
- licensing: `${homepage || _config.STORM_DEFAULT_HOMEPAGE}/license`
79
- };
80
- }, "getDefaultConfig");
81
3
 
4
+ var _chunkM3KQNO7Ncjs = require('../chunk-M3KQNO7N.cjs');
5
+ require('../chunk-RN5XBSCX.cjs');
6
+ require('../chunk-RDWCJD4I.cjs');
7
+ require('../chunk-FUALBFYR.cjs');
8
+ require('../chunk-5LYWI7E7.cjs');
82
9
 
83
10
 
84
- exports.DEFAULT_COLOR_CONFIG = DEFAULT_COLOR_CONFIG; exports.getDefaultConfig = getDefaultConfig;
11
+
12
+ exports.DEFAULT_COLOR_CONFIG = _chunkM3KQNO7Ncjs.DEFAULT_COLOR_CONFIG; exports.getDefaultConfig = _chunkM3KQNO7Ncjs.getDefaultConfig;