@storm-software/config-tools 1.148.2 → 1.148.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/README.md +1 -1
  2. package/dist/config-file/get-config-file.cjs +66 -22
  3. package/dist/config-file/get-config-file.js +65 -21
  4. package/dist/config-file/index.cjs +1 -27
  5. package/dist/config-file/index.js +1 -27
  6. package/dist/create-storm-config.cjs +68 -26
  7. package/dist/create-storm-config.js +67 -25
  8. package/dist/env/get-env.cjs +152 -9
  9. package/dist/env/get-env.js +151 -8
  10. package/dist/env/index.cjs +2 -20
  11. package/dist/env/index.js +2 -20
  12. package/dist/env/set-env.cjs +259 -8
  13. package/dist/env/set-env.js +258 -7
  14. package/dist/get-config.cjs +9 -25
  15. package/dist/get-config.js +9 -25
  16. package/dist/index.cjs +7 -171
  17. package/dist/index.js +7 -171
  18. package/dist/logger/chalk.cjs +30 -4
  19. package/dist/logger/chalk.js +29 -3
  20. package/dist/logger/console-icons.cjs +15 -5
  21. package/dist/logger/console-icons.js +15 -5
  22. package/dist/logger/console.cjs +126 -38
  23. package/dist/logger/console.js +112 -24
  24. package/dist/logger/create-logger.cjs +31 -16
  25. package/dist/logger/create-logger.js +30 -15
  26. package/dist/logger/format-timestamp.cjs +5 -3
  27. package/dist/logger/format-timestamp.js +5 -3
  28. package/dist/logger/get-log-level.cjs +56 -6
  29. package/dist/logger/get-log-level.js +56 -6
  30. package/dist/logger/index.cjs +7 -62
  31. package/dist/logger/index.js +7 -62
  32. package/dist/logger/is-unicode-supported.cjs +16 -4
  33. package/dist/logger/is-unicode-supported.js +15 -3
  34. package/dist/types.cjs +24 -6
  35. package/dist/types.js +22 -4
  36. package/dist/utilities/apply-workspace-tokens.cjs +55 -9
  37. package/dist/utilities/apply-workspace-tokens.js +54 -8
  38. package/dist/utilities/correct-paths.cjs +242 -33
  39. package/dist/utilities/correct-paths.js +225 -16
  40. package/dist/utilities/file-path-utils.cjs +18 -5
  41. package/dist/utilities/file-path-utils.js +17 -4
  42. package/dist/utilities/find-up.cjs +22 -4
  43. package/dist/utilities/find-up.js +21 -3
  44. package/dist/utilities/find-workspace-root.cjs +64 -7
  45. package/dist/utilities/find-workspace-root.js +63 -6
  46. package/dist/utilities/get-default-config.cjs +79 -8
  47. package/dist/utilities/get-default-config.js +79 -8
  48. package/dist/utilities/index.cjs +7 -85
  49. package/dist/utilities/index.js +7 -85
  50. package/dist/utilities/process-handler.cjs +35 -17
  51. package/dist/utilities/process-handler.js +35 -17
  52. package/dist/utilities/run.cjs +34 -6
  53. package/dist/utilities/run.js +33 -5
  54. package/package.json +1 -1
  55. package/dist/chunk-2AVLCXLT.js +0 -0
  56. package/dist/chunk-2IKEUEGY.cjs +0 -94
  57. package/dist/chunk-2ZXJS2DW.js +0 -49
  58. package/dist/chunk-3557WSPY.js +0 -168
  59. package/dist/chunk-3NWKPYIG.cjs +0 -68
  60. package/dist/chunk-4DLP6LZY.cjs +0 -65
  61. package/dist/chunk-65SWKEHV.cjs +0 -1
  62. package/dist/chunk-6OM23J4N.js +0 -65
  63. package/dist/chunk-6T3V5XJK.js +0 -180
  64. package/dist/chunk-7CYF3NP3.cjs +0 -19
  65. package/dist/chunk-7NSHGJWY.cjs +0 -12
  66. package/dist/chunk-7PV6L7I7.cjs +0 -1
  67. package/dist/chunk-B7WWBK5Z.cjs +0 -93
  68. package/dist/chunk-BHZFTVXN.js +0 -42
  69. package/dist/chunk-C3W5DCMU.js +0 -19
  70. package/dist/chunk-DD3HX2NX.cjs +0 -1
  71. package/dist/chunk-GKI43HTL.cjs +0 -44
  72. package/dist/chunk-GZFXEQPB.js +0 -94
  73. package/dist/chunk-HESFC24Z.cjs +0 -245
  74. package/dist/chunk-HI33NNPB.js +0 -68
  75. package/dist/chunk-HSCCBYAV.js +0 -25
  76. package/dist/chunk-IRCFHYKZ.cjs +0 -28
  77. package/dist/chunk-IUT7Y2UY.js +0 -26
  78. package/dist/chunk-IWD6YQKX.cjs +0 -1
  79. package/dist/chunk-J2TOMCZU.cjs +0 -168
  80. package/dist/chunk-JHJGK3T7.js +0 -272
  81. package/dist/chunk-KNLWLA7O.cjs +0 -75
  82. package/dist/chunk-L6UNTUC4.js +0 -0
  83. package/dist/chunk-LOSUA6RB.js +0 -79
  84. package/dist/chunk-M7ASNATT.js +0 -142
  85. package/dist/chunk-MLUBD3PU.js +0 -245
  86. package/dist/chunk-NJVL3GF4.js +0 -0
  87. package/dist/chunk-OIEEXHKO.js +0 -75
  88. package/dist/chunk-POXTJ6GF.js +0 -28
  89. package/dist/chunk-PR7RQHRE.js +0 -12
  90. package/dist/chunk-QBS3OCHH.js +0 -22
  91. package/dist/chunk-QNYJXMP3.cjs +0 -79
  92. package/dist/chunk-RRKB32OH.js +0 -0
  93. package/dist/chunk-RVM5N5ZI.cjs +0 -22
  94. package/dist/chunk-SLGVSUEV.cjs +0 -36
  95. package/dist/chunk-SVQE7WVB.cjs +0 -180
  96. package/dist/chunk-SWX2MJHI.cjs +0 -28
  97. package/dist/chunk-TCTVN2ED.js +0 -44
  98. package/dist/chunk-U34AT42J.cjs +0 -49
  99. package/dist/chunk-ULZULP7Q.cjs +0 -142
  100. package/dist/chunk-XAJB3BSF.cjs +0 -25
  101. package/dist/chunk-XDBACKKN.cjs +0 -42
  102. package/dist/chunk-XQPQRRG3.js +0 -28
  103. package/dist/chunk-XY2LDOQ4.cjs +0 -26
  104. package/dist/chunk-XZ2SIQVM.js +0 -93
  105. package/dist/chunk-YBGTC6FM.cjs +0 -272
  106. package/dist/chunk-ZA4IO7YJ.js +0 -36
@@ -1,245 +0,0 @@
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
- };
File without changes
@@ -1,75 +0,0 @@
1
- import {
2
- findFolderUp
3
- } from "./chunk-XQPQRRG3.js";
4
- import {
5
- correctPaths
6
- } from "./chunk-MLUBD3PU.js";
7
- import {
8
- __name
9
- } from "./chunk-SHUYVCID.js";
10
-
11
- // src/utilities/find-workspace-root.ts
12
- var rootFiles = [
13
- "storm-workspace.json",
14
- "storm-workspace.json",
15
- "storm-workspace.yaml",
16
- "storm-workspace.yml",
17
- "storm-workspace.js",
18
- "storm-workspace.ts",
19
- ".storm-workspace.json",
20
- ".storm-workspace.yaml",
21
- ".storm-workspace.yml",
22
- ".storm-workspace.js",
23
- ".storm-workspace.ts",
24
- "lerna.json",
25
- "nx.json",
26
- "turbo.json",
27
- "npm-workspace.json",
28
- "yarn-workspace.json",
29
- "pnpm-workspace.json",
30
- "npm-workspace.yaml",
31
- "yarn-workspace.yaml",
32
- "pnpm-workspace.yaml",
33
- "npm-workspace.yml",
34
- "yarn-workspace.yml",
35
- "pnpm-workspace.yml",
36
- "npm-lock.json",
37
- "yarn-lock.json",
38
- "pnpm-lock.json",
39
- "npm-lock.yaml",
40
- "yarn-lock.yaml",
41
- "pnpm-lock.yaml",
42
- "npm-lock.yml",
43
- "yarn-lock.yml",
44
- "pnpm-lock.yml",
45
- "bun.lockb"
46
- ];
47
- var rootDirectories = [
48
- ".storm-workspace",
49
- ".nx",
50
- ".github",
51
- ".vscode",
52
- ".verdaccio"
53
- ];
54
- function findWorkspaceRootSafe(pathInsideMonorepo) {
55
- if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
56
- return correctPaths(process.env.STORM_WORKSPACE_ROOT ?? process.env.NX_WORKSPACE_ROOT_PATH);
57
- }
58
- return correctPaths(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
59
- }
60
- __name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
61
- function findWorkspaceRoot(pathInsideMonorepo) {
62
- const result = findWorkspaceRootSafe(pathInsideMonorepo);
63
- if (!result) {
64
- throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
65
- ${rootFiles.join("\n")}
66
- Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
67
- }
68
- return result;
69
- }
70
- __name(findWorkspaceRoot, "findWorkspaceRoot");
71
-
72
- export {
73
- findWorkspaceRootSafe,
74
- findWorkspaceRoot
75
- };
@@ -1,28 +0,0 @@
1
- // src/types.ts
2
- var LogLevel = {
3
- SILENT: 0,
4
- FATAL: 10,
5
- ERROR: 20,
6
- WARN: 30,
7
- SUCCESS: 35,
8
- INFO: 40,
9
- DEBUG: 60,
10
- TRACE: 70,
11
- ALL: 100
12
- };
13
- var LogLevelLabel = {
14
- SILENT: "silent",
15
- FATAL: "fatal",
16
- ERROR: "error",
17
- WARN: "warn",
18
- SUCCESS: "success",
19
- INFO: "info",
20
- DEBUG: "debug",
21
- TRACE: "trace",
22
- ALL: "all"
23
- };
24
-
25
- export {
26
- LogLevel,
27
- LogLevelLabel
28
- };
@@ -1,12 +0,0 @@
1
- import {
2
- __name
3
- } from "./chunk-SHUYVCID.js";
4
-
5
- // src/logger/format-timestamp.ts
6
- var formatTimestamp = /* @__PURE__ */ __name((date = /* @__PURE__ */ new Date()) => {
7
- return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
8
- }, "formatTimestamp");
9
-
10
- export {
11
- formatTimestamp
12
- };
@@ -1,22 +0,0 @@
1
- import {
2
- __name
3
- } from "./chunk-SHUYVCID.js";
4
-
5
- // src/logger/is-unicode-supported.ts
6
- import process from "node:process";
7
- function isUnicodeSupported() {
8
- const { env } = process;
9
- const { TERM, TERM_PROGRAM } = env;
10
- if (process.platform !== "win32") {
11
- return TERM !== "linux";
12
- }
13
- return Boolean(env.WT_SESSION) || // Windows Terminal
14
- Boolean(env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
15
- env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
16
- TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
17
- }
18
- __name(isUnicodeSupported, "isUnicodeSupported");
19
-
20
- export {
21
- isUnicodeSupported
22
- };
@@ -1,79 +0,0 @@
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
-
3
- var _chunkULZULP7Qcjs = require('./chunk-ULZULP7Q.cjs');
4
-
5
-
6
- var _chunkKNLWLA7Ocjs = require('./chunk-KNLWLA7O.cjs');
7
-
8
-
9
- var _chunkHESFC24Zcjs = require('./chunk-HESFC24Z.cjs');
10
-
11
-
12
- var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
13
-
14
- // src/config-file/get-config-file.ts
15
- var _c12 = require('c12');
16
- var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
17
- var getConfigFileByName = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
18
- const workspacePath = filePath || _chunkKNLWLA7Ocjs.findWorkspaceRoot.call(void 0, filePath);
19
- const configs = await Promise.all([
20
- _c12.loadConfig.call(void 0, {
21
- cwd: workspacePath,
22
- packageJson: true,
23
- name: fileName,
24
- envName: _optionalChain([fileName, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]),
25
- jitiOptions: {
26
- debug: false,
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
- },
29
- ...options
30
- }),
31
- _c12.loadConfig.call(void 0, {
32
- cwd: workspacePath,
33
- packageJson: true,
34
- name: fileName,
35
- envName: _optionalChain([fileName, 'optionalAccess', _3 => _3.toUpperCase, 'call', _4 => _4()]),
36
- jitiOptions: {
37
- debug: false,
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
- },
40
- configFile: fileName,
41
- ...options
42
- })
43
- ]);
44
- return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
45
- }, "getConfigFileByName");
46
- var getConfigFile = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
47
- const workspacePath = filePath ? filePath : _chunkKNLWLA7Ocjs.findWorkspaceRoot.call(void 0, filePath);
48
- const result = await getConfigFileByName("storm-workspace", workspacePath);
49
- let config = result.config;
50
- const configFile = result.configFile;
51
- if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
52
- _chunkULZULP7Qcjs.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
53
- logLevel: "all"
54
- });
55
- }
56
- if (additionalFileNames && additionalFileNames.length > 0) {
57
- const results = await Promise.all(additionalFileNames.map((fileName) => getConfigFileByName(fileName, workspacePath)));
58
- for (const result2 of results) {
59
- if (_optionalChain([result2, 'optionalAccess', _5 => _5.config]) && _optionalChain([result2, 'optionalAccess', _6 => _6.configFile]) && Object.keys(result2.config).length > 0) {
60
- if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
61
- _chunkULZULP7Qcjs.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
62
- logLevel: "all"
63
- });
64
- }
65
- config = _defu2.default.call(void 0, _nullishCoalesce(result2.config, () => ( {})), _nullishCoalesce(config, () => ( {})));
66
- }
67
- }
68
- }
69
- if (!config) {
70
- return void 0;
71
- }
72
- config.configFile = configFile;
73
- return config;
74
- }, "getConfigFile");
75
-
76
-
77
-
78
-
79
- exports.getConfigFileByName = getConfigFileByName; exports.getConfigFile = getConfigFile;
File without changes
@@ -1,22 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
-
3
- var _chunkUSNT2KNTcjs = require('./chunk-USNT2KNT.cjs');
4
-
5
- // src/logger/is-unicode-supported.ts
6
- var _process = require('process'); var _process2 = _interopRequireDefault(_process);
7
- function isUnicodeSupported() {
8
- const { env } = _process2.default;
9
- const { TERM, TERM_PROGRAM } = env;
10
- if (_process2.default.platform !== "win32") {
11
- return TERM !== "linux";
12
- }
13
- return Boolean(env.WT_SESSION) || // Windows Terminal
14
- Boolean(env.TERMINUS_SUBLIME) || // Terminus (<0.2.27)
15
- env.ConEmuTask === "{cmd::Cmder}" || // ConEmu and cmder
16
- TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
17
- }
18
- _chunkUSNT2KNTcjs.__name.call(void 0, isUnicodeSupported, "isUnicodeSupported");
19
-
20
-
21
-
22
- exports.isUnicodeSupported = isUnicodeSupported;
@@ -1,36 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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/logger/chalk.ts
6
- var _chalk2 = require('chalk'); var _chalk3 = _interopRequireDefault(_chalk2);
7
- var chalkDefault = {
8
- hex: /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (_) => (message) => message, "hex"),
9
- bgHex: /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (_) => ({
10
- whiteBright: /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (message) => message, "whiteBright")
11
- }), "bgHex"),
12
- whiteBright: /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (message) => message, "whiteBright"),
13
- gray: /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (message) => message, "gray"),
14
- bold: {
15
- hex: /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (_) => (message) => message, "hex"),
16
- bgHex: /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (_) => ({
17
- whiteBright: /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (message) => message, "whiteBright")
18
- }), "bgHex"),
19
- whiteBright: /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (message) => message, "whiteBright")
20
- },
21
- dim: {
22
- hex: /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (_) => (message) => message, "hex"),
23
- gray: /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, (message) => message, "gray")
24
- }
25
- };
26
- var getChalk = /* @__PURE__ */ _chunkUSNT2KNTcjs.__name.call(void 0, () => {
27
- let _chalk = _chalk3.default;
28
- if (!_optionalChain([_chalk, 'optionalAccess', _2 => _2.hex]) || !_optionalChain([_chalk, 'optionalAccess', _3 => _3.bold, 'optionalAccess', _4 => _4.hex]) || !_optionalChain([_chalk, 'optionalAccess', _5 => _5.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _6 => _6.whiteBright])) {
29
- _chalk = chalkDefault;
30
- }
31
- return _chalk;
32
- }, "getChalk");
33
-
34
-
35
-
36
- exports.getChalk = getChalk;