@storm-software/config-tools 1.148.3 → 1.149.0
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.
- package/README.md +1 -1
- package/dist/config-file/get-config-file.cjs +66 -22
- package/dist/config-file/get-config-file.js +65 -21
- package/dist/config-file/index.cjs +1 -27
- package/dist/config-file/index.js +1 -27
- package/dist/create-storm-config.cjs +68 -26
- package/dist/create-storm-config.js +67 -25
- package/dist/env/get-env.cjs +152 -9
- package/dist/env/get-env.js +151 -8
- package/dist/env/index.cjs +2 -20
- package/dist/env/index.js +2 -20
- package/dist/env/set-env.cjs +259 -8
- package/dist/env/set-env.js +258 -7
- package/dist/get-config.cjs +9 -25
- package/dist/get-config.js +9 -25
- package/dist/index.cjs +7 -171
- package/dist/index.js +7 -171
- package/dist/logger/chalk.cjs +30 -4
- package/dist/logger/chalk.js +29 -3
- package/dist/logger/console-icons.cjs +15 -5
- package/dist/logger/console-icons.js +15 -5
- package/dist/logger/console.cjs +126 -38
- package/dist/logger/console.js +112 -24
- package/dist/logger/create-logger.cjs +31 -16
- package/dist/logger/create-logger.js +30 -15
- package/dist/logger/format-timestamp.cjs +5 -3
- package/dist/logger/format-timestamp.js +5 -3
- package/dist/logger/get-log-level.cjs +56 -6
- package/dist/logger/get-log-level.js +56 -6
- package/dist/logger/index.cjs +7 -62
- package/dist/logger/index.js +7 -62
- package/dist/logger/is-unicode-supported.cjs +16 -4
- package/dist/logger/is-unicode-supported.js +15 -3
- package/dist/types.cjs +24 -6
- package/dist/types.js +22 -4
- package/dist/utilities/apply-workspace-tokens.cjs +55 -9
- package/dist/utilities/apply-workspace-tokens.js +54 -8
- package/dist/utilities/correct-paths.cjs +242 -33
- package/dist/utilities/correct-paths.js +225 -16
- package/dist/utilities/file-path-utils.cjs +18 -5
- package/dist/utilities/file-path-utils.js +17 -4
- package/dist/utilities/find-up.cjs +22 -4
- package/dist/utilities/find-up.js +21 -3
- package/dist/utilities/find-workspace-root.cjs +64 -7
- package/dist/utilities/find-workspace-root.js +63 -6
- package/dist/utilities/get-default-config.cjs +79 -8
- package/dist/utilities/get-default-config.js +79 -8
- package/dist/utilities/index.cjs +7 -85
- package/dist/utilities/index.js +7 -85
- package/dist/utilities/process-handler.cjs +35 -17
- package/dist/utilities/process-handler.js +35 -17
- package/dist/utilities/run.cjs +34 -6
- package/dist/utilities/run.js +33 -5
- package/package.json +1 -1
- package/dist/chunk-23WUCNWX.js +0 -142
- package/dist/chunk-2AVLCXLT.js +0 -0
- package/dist/chunk-2IKEUEGY.cjs +0 -94
- package/dist/chunk-3NWKPYIG.cjs +0 -68
- package/dist/chunk-4DLP6LZY.cjs +0 -65
- package/dist/chunk-65SWKEHV.cjs +0 -1
- package/dist/chunk-6OM23J4N.js +0 -65
- package/dist/chunk-6T3V5XJK.js +0 -180
- package/dist/chunk-7JBLPO7O.cjs +0 -168
- package/dist/chunk-7NSHGJWY.cjs +0 -12
- package/dist/chunk-7PV6L7I7.cjs +0 -1
- package/dist/chunk-BHZFTVXN.js +0 -42
- package/dist/chunk-C4RHWKK6.cjs +0 -142
- package/dist/chunk-CCO2PASC.js +0 -168
- package/dist/chunk-DD3HX2NX.cjs +0 -1
- package/dist/chunk-DD5UX56L.cjs +0 -272
- package/dist/chunk-FDJZUZKJ.js +0 -93
- package/dist/chunk-GS25DBTT.cjs +0 -93
- package/dist/chunk-GZFXEQPB.js +0 -94
- package/dist/chunk-HESFC24Z.cjs +0 -245
- package/dist/chunk-HI33NNPB.js +0 -68
- package/dist/chunk-HKZSDZZ4.cjs +0 -19
- package/dist/chunk-HSCCBYAV.js +0 -25
- package/dist/chunk-IRCFHYKZ.cjs +0 -28
- package/dist/chunk-IUT7Y2UY.js +0 -26
- package/dist/chunk-IWD6YQKX.cjs +0 -1
- package/dist/chunk-KNLWLA7O.cjs +0 -75
- package/dist/chunk-L6UNTUC4.js +0 -0
- package/dist/chunk-MLUBD3PU.js +0 -245
- package/dist/chunk-NJVL3GF4.js +0 -0
- package/dist/chunk-OIEEXHKO.js +0 -75
- package/dist/chunk-P7Q327IR.js +0 -272
- package/dist/chunk-POXTJ6GF.js +0 -28
- package/dist/chunk-PR7RQHRE.js +0 -12
- package/dist/chunk-Q7MMWMEN.js +0 -44
- package/dist/chunk-QBS3OCHH.js +0 -22
- package/dist/chunk-RRKB32OH.js +0 -0
- package/dist/chunk-RVM5N5ZI.cjs +0 -22
- package/dist/chunk-SLGVSUEV.cjs +0 -36
- package/dist/chunk-SVQE7WVB.cjs +0 -180
- package/dist/chunk-SWX2MJHI.cjs +0 -28
- package/dist/chunk-TZO4SYUO.cjs +0 -49
- package/dist/chunk-UZ5SHCFX.js +0 -49
- package/dist/chunk-WMWOH7LS.js +0 -79
- package/dist/chunk-XAJB3BSF.cjs +0 -25
- package/dist/chunk-XDBACKKN.cjs +0 -42
- package/dist/chunk-XIVRONKM.cjs +0 -44
- package/dist/chunk-XQPQRRG3.js +0 -28
- package/dist/chunk-XVIPFWZW.cjs +0 -79
- package/dist/chunk-XY2LDOQ4.cjs +0 -26
- package/dist/chunk-ZA4IO7YJ.js +0 -36
- package/dist/chunk-ZU6V7IRV.js +0 -19
package/dist/chunk-MLUBD3PU.js
DELETED
|
@@ -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
|
-
};
|
package/dist/chunk-NJVL3GF4.js
DELETED
|
File without changes
|
package/dist/chunk-OIEEXHKO.js
DELETED
|
@@ -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
|
-
};
|
package/dist/chunk-P7Q327IR.js
DELETED
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
correctPaths
|
|
3
|
-
} from "./chunk-MLUBD3PU.js";
|
|
4
|
-
import {
|
|
5
|
-
getLogLevel
|
|
6
|
-
} from "./chunk-HI33NNPB.js";
|
|
7
|
-
import {
|
|
8
|
-
LogLevel
|
|
9
|
-
} from "./chunk-POXTJ6GF.js";
|
|
10
|
-
import {
|
|
11
|
-
__name
|
|
12
|
-
} from "./chunk-SHUYVCID.js";
|
|
13
|
-
|
|
14
|
-
// src/env/set-env.ts
|
|
15
|
-
var setExtensionEnv = /* @__PURE__ */ __name((extensionName, extension) => {
|
|
16
|
-
for (const key of Object.keys(extension ?? {})) {
|
|
17
|
-
if (extension[key]) {
|
|
18
|
-
const result = key?.replace(/([A-Z])+/g, (input) => input ? input[0]?.toUpperCase() + input.slice(1) : "").split(/(?=[A-Z])|[.\-\s_]/).map((x) => x.toLowerCase()) ?? [];
|
|
19
|
-
let extensionKey;
|
|
20
|
-
if (result.length === 0) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
if (result.length === 1) {
|
|
24
|
-
extensionKey = result[0]?.toUpperCase() ?? "";
|
|
25
|
-
} else {
|
|
26
|
-
extensionKey = result.reduce((ret, part) => {
|
|
27
|
-
return `${ret}_${part.toLowerCase()}`;
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
process.env[`STORM_EXTENSION_${extensionName.toUpperCase()}_${extensionKey.toUpperCase()}`] = extension[key];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}, "setExtensionEnv");
|
|
34
|
-
var setConfigEnv = /* @__PURE__ */ __name((config) => {
|
|
35
|
-
const prefix = "STORM_";
|
|
36
|
-
if (config.extends) {
|
|
37
|
-
process.env[`${prefix}EXTENDS`] = Array.isArray(config.extends) ? JSON.stringify(config.extends) : config.extends;
|
|
38
|
-
}
|
|
39
|
-
if (config.name) {
|
|
40
|
-
process.env[`${prefix}NAME`] = config.name;
|
|
41
|
-
}
|
|
42
|
-
if (config.namespace) {
|
|
43
|
-
process.env[`${prefix}NAMESPACE`] = config.namespace;
|
|
44
|
-
}
|
|
45
|
-
if (config.owner) {
|
|
46
|
-
process.env[`${prefix}OWNER`] = config.owner;
|
|
47
|
-
}
|
|
48
|
-
if (config.bot) {
|
|
49
|
-
process.env[`${prefix}BOT_NAME`] = config.bot.name;
|
|
50
|
-
process.env[`${prefix}BOT_EMAIL`] = config.bot.email;
|
|
51
|
-
}
|
|
52
|
-
if (config.organization) {
|
|
53
|
-
process.env[`${prefix}ORGANIZATION`] = config.organization;
|
|
54
|
-
}
|
|
55
|
-
if (config.packageManager) {
|
|
56
|
-
process.env[`${prefix}PACKAGE_MANAGER`] = config.packageManager;
|
|
57
|
-
}
|
|
58
|
-
if (config.license) {
|
|
59
|
-
process.env[`${prefix}LICENSE`] = config.license;
|
|
60
|
-
}
|
|
61
|
-
if (config.homepage) {
|
|
62
|
-
process.env[`${prefix}HOMEPAGE`] = config.homepage;
|
|
63
|
-
}
|
|
64
|
-
if (config.docs) {
|
|
65
|
-
process.env[`${prefix}DOCS`] = config.docs;
|
|
66
|
-
}
|
|
67
|
-
if (config.licensing) {
|
|
68
|
-
process.env[`${prefix}LICENSING`] = config.licensing;
|
|
69
|
-
}
|
|
70
|
-
if (config.timezone) {
|
|
71
|
-
process.env[`${prefix}TIMEZONE`] = config.timezone;
|
|
72
|
-
process.env.TZ = config.timezone;
|
|
73
|
-
process.env.DEFAULT_TIMEZONE = config.timezone;
|
|
74
|
-
}
|
|
75
|
-
if (config.locale) {
|
|
76
|
-
process.env[`${prefix}LOCALE`] = config.locale;
|
|
77
|
-
process.env.LOCALE = config.locale;
|
|
78
|
-
process.env.DEFAULT_LOCALE = config.locale;
|
|
79
|
-
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
80
|
-
}
|
|
81
|
-
if (config.configFile) {
|
|
82
|
-
process.env[`${prefix}CONFIG_FILE`] = correctPaths(config.configFile);
|
|
83
|
-
}
|
|
84
|
-
if (config.workspaceRoot) {
|
|
85
|
-
process.env[`${prefix}WORKSPACE_ROOT`] = correctPaths(config.workspaceRoot);
|
|
86
|
-
process.env.NX_WORKSPACE_ROOT = correctPaths(config.workspaceRoot);
|
|
87
|
-
process.env.NX_WORKSPACE_ROOT_PATH = correctPaths(config.workspaceRoot);
|
|
88
|
-
}
|
|
89
|
-
if (config.directories) {
|
|
90
|
-
if (!config.skipCache && config.directories.cache) {
|
|
91
|
-
process.env[`${prefix}CACHE_DIR`] = correctPaths(config.directories.cache);
|
|
92
|
-
}
|
|
93
|
-
if (config.directories.data) {
|
|
94
|
-
process.env[`${prefix}DATA_DIR`] = correctPaths(config.directories.data);
|
|
95
|
-
}
|
|
96
|
-
if (config.directories.config) {
|
|
97
|
-
process.env[`${prefix}CONFIG_DIR`] = correctPaths(config.directories.config);
|
|
98
|
-
}
|
|
99
|
-
if (config.directories.temp) {
|
|
100
|
-
process.env[`${prefix}TEMP_DIR`] = correctPaths(config.directories.temp);
|
|
101
|
-
}
|
|
102
|
-
if (config.directories.log) {
|
|
103
|
-
process.env[`${prefix}LOG_DIR`] = correctPaths(config.directories.log);
|
|
104
|
-
}
|
|
105
|
-
if (config.directories.build) {
|
|
106
|
-
process.env[`${prefix}BUILD_DIR`] = correctPaths(config.directories.build);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
if (config.skipCache !== void 0) {
|
|
110
|
-
process.env[`${prefix}SKIP_CACHE`] = String(config.skipCache);
|
|
111
|
-
if (config.skipCache) {
|
|
112
|
-
process.env.NX_SKIP_NX_CACHE ??= String(config.skipCache);
|
|
113
|
-
process.env.NX_CACHE_PROJECT_GRAPH ??= String(config.skipCache);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
if (config.env) {
|
|
117
|
-
process.env[`${prefix}ENV`] = config.env;
|
|
118
|
-
process.env.NODE_ENV = config.env;
|
|
119
|
-
process.env.ENVIRONMENT = config.env;
|
|
120
|
-
}
|
|
121
|
-
if (config.colors?.base?.light || config.colors?.base?.dark) {
|
|
122
|
-
for (const key of Object.keys(config.colors)) {
|
|
123
|
-
setThemeColorConfigEnv(`${prefix}COLOR_${key}_`, config.colors[key]);
|
|
124
|
-
}
|
|
125
|
-
} else {
|
|
126
|
-
setThemeColorConfigEnv(`${prefix}COLOR_`, config.colors);
|
|
127
|
-
}
|
|
128
|
-
if (config.repository) {
|
|
129
|
-
process.env[`${prefix}REPOSITORY`] = config.repository;
|
|
130
|
-
}
|
|
131
|
-
if (config.branch) {
|
|
132
|
-
process.env[`${prefix}BRANCH`] = config.branch;
|
|
133
|
-
}
|
|
134
|
-
if (config.preid) {
|
|
135
|
-
process.env[`${prefix}PRE_ID`] = String(config.preid);
|
|
136
|
-
}
|
|
137
|
-
if (config.externalPackagePatterns) {
|
|
138
|
-
process.env[`${prefix}EXTERNAL_PACKAGE_PATTERNS`] = JSON.stringify(config.externalPackagePatterns);
|
|
139
|
-
}
|
|
140
|
-
if (config.registry) {
|
|
141
|
-
if (config.registry.github) {
|
|
142
|
-
process.env[`${prefix}REGISTRY_GITHUB`] = String(config.registry.github);
|
|
143
|
-
}
|
|
144
|
-
if (config.registry.npm) {
|
|
145
|
-
process.env[`${prefix}REGISTRY_NPM`] = String(config.registry.npm);
|
|
146
|
-
}
|
|
147
|
-
if (config.registry.cargo) {
|
|
148
|
-
process.env[`${prefix}REGISTRY_CARGO`] = String(config.registry.cargo);
|
|
149
|
-
}
|
|
150
|
-
if (config.registry.cyclone) {
|
|
151
|
-
process.env[`${prefix}REGISTRY_CYCLONE`] = String(config.registry.cyclone);
|
|
152
|
-
}
|
|
153
|
-
if (config.registry.container) {
|
|
154
|
-
process.env[`${prefix}REGISTRY_CONTAINER`] = String(config.registry.cyclone);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
if (config.logLevel) {
|
|
158
|
-
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
159
|
-
process.env.LOG_LEVEL = String(config.logLevel);
|
|
160
|
-
process.env.NX_VERBOSE_LOGGING = String(getLogLevel(config.logLevel) >= LogLevel.DEBUG ? true : false);
|
|
161
|
-
process.env.RUST_BACKTRACE = getLogLevel(config.logLevel) >= LogLevel.DEBUG ? "full" : "none";
|
|
162
|
-
}
|
|
163
|
-
if (config.skipConfigLogging !== void 0) {
|
|
164
|
-
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
|
|
165
|
-
}
|
|
166
|
-
process.env[`${prefix}CONFIG`] = JSON.stringify(config);
|
|
167
|
-
for (const key of Object.keys(config.extensions ?? {})) {
|
|
168
|
-
config.extensions[key] && Object.keys(config.extensions[key]) && setExtensionEnv(key, config.extensions[key]);
|
|
169
|
-
}
|
|
170
|
-
}, "setConfigEnv");
|
|
171
|
-
var setThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
172
|
-
return config?.light?.brand || config?.dark?.brand ? setMultiThemeColorConfigEnv(prefix, config) : setSingleThemeColorConfigEnv(prefix, config);
|
|
173
|
-
}, "setThemeColorConfigEnv");
|
|
174
|
-
var setSingleThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
175
|
-
if (config.dark) {
|
|
176
|
-
process.env[`${prefix}DARK`] = config.dark;
|
|
177
|
-
}
|
|
178
|
-
if (config.light) {
|
|
179
|
-
process.env[`${prefix}LIGHT`] = config.light;
|
|
180
|
-
}
|
|
181
|
-
if (config.brand) {
|
|
182
|
-
process.env[`${prefix}BRAND`] = config.brand;
|
|
183
|
-
}
|
|
184
|
-
if (config.alternate) {
|
|
185
|
-
process.env[`${prefix}ALTERNATE`] = config.alternate;
|
|
186
|
-
}
|
|
187
|
-
if (config.accent) {
|
|
188
|
-
process.env[`${prefix}ACCENT`] = config.accent;
|
|
189
|
-
}
|
|
190
|
-
if (config.link) {
|
|
191
|
-
process.env[`${prefix}LINK`] = config.link;
|
|
192
|
-
}
|
|
193
|
-
if (config.help) {
|
|
194
|
-
process.env[`${prefix}HELP`] = config.help;
|
|
195
|
-
}
|
|
196
|
-
if (config.success) {
|
|
197
|
-
process.env[`${prefix}SUCCESS`] = config.success;
|
|
198
|
-
}
|
|
199
|
-
if (config.info) {
|
|
200
|
-
process.env[`${prefix}INFO`] = config.info;
|
|
201
|
-
}
|
|
202
|
-
if (config.warning) {
|
|
203
|
-
process.env[`${prefix}WARNING`] = config.warning;
|
|
204
|
-
}
|
|
205
|
-
if (config.danger) {
|
|
206
|
-
process.env[`${prefix}DANGER`] = config.danger;
|
|
207
|
-
}
|
|
208
|
-
if (config.fatal) {
|
|
209
|
-
process.env[`${prefix}FATAL`] = config.fatal;
|
|
210
|
-
}
|
|
211
|
-
if (config.positive) {
|
|
212
|
-
process.env[`${prefix}POSITIVE`] = config.positive;
|
|
213
|
-
}
|
|
214
|
-
if (config.negative) {
|
|
215
|
-
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
216
|
-
}
|
|
217
|
-
}, "setSingleThemeColorConfigEnv");
|
|
218
|
-
var setMultiThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
219
|
-
return {
|
|
220
|
-
light: setBaseThemeColorConfigEnv(`${prefix}LIGHT_`, config.light),
|
|
221
|
-
dark: setBaseThemeColorConfigEnv(`${prefix}DARK_`, config.dark)
|
|
222
|
-
};
|
|
223
|
-
}, "setMultiThemeColorConfigEnv");
|
|
224
|
-
var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
225
|
-
if (config.foreground) {
|
|
226
|
-
process.env[`${prefix}FOREGROUND`] = config.foreground;
|
|
227
|
-
}
|
|
228
|
-
if (config.background) {
|
|
229
|
-
process.env[`${prefix}BACKGROUND`] = config.background;
|
|
230
|
-
}
|
|
231
|
-
if (config.brand) {
|
|
232
|
-
process.env[`${prefix}BRAND`] = config.brand;
|
|
233
|
-
}
|
|
234
|
-
if (config.alternate) {
|
|
235
|
-
process.env[`${prefix}ALTERNATE`] = config.alternate;
|
|
236
|
-
}
|
|
237
|
-
if (config.accent) {
|
|
238
|
-
process.env[`${prefix}ACCENT`] = config.accent;
|
|
239
|
-
}
|
|
240
|
-
if (config.link) {
|
|
241
|
-
process.env[`${prefix}LINK`] = config.link;
|
|
242
|
-
}
|
|
243
|
-
if (config.help) {
|
|
244
|
-
process.env[`${prefix}HELP`] = config.help;
|
|
245
|
-
}
|
|
246
|
-
if (config.success) {
|
|
247
|
-
process.env[`${prefix}SUCCESS`] = config.success;
|
|
248
|
-
}
|
|
249
|
-
if (config.info) {
|
|
250
|
-
process.env[`${prefix}INFO`] = config.info;
|
|
251
|
-
}
|
|
252
|
-
if (config.warning) {
|
|
253
|
-
process.env[`${prefix}WARNING`] = config.warning;
|
|
254
|
-
}
|
|
255
|
-
if (config.danger) {
|
|
256
|
-
process.env[`${prefix}DANGER`] = config.danger;
|
|
257
|
-
}
|
|
258
|
-
if (config.fatal) {
|
|
259
|
-
process.env[`${prefix}FATAL`] = config.fatal;
|
|
260
|
-
}
|
|
261
|
-
if (config.positive) {
|
|
262
|
-
process.env[`${prefix}POSITIVE`] = config.positive;
|
|
263
|
-
}
|
|
264
|
-
if (config.negative) {
|
|
265
|
-
process.env[`${prefix}NEGATIVE`] = config.negative;
|
|
266
|
-
}
|
|
267
|
-
}, "setBaseThemeColorConfigEnv");
|
|
268
|
-
|
|
269
|
-
export {
|
|
270
|
-
setExtensionEnv,
|
|
271
|
-
setConfigEnv
|
|
272
|
-
};
|
package/dist/chunk-POXTJ6GF.js
DELETED
|
@@ -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
|
-
};
|
package/dist/chunk-PR7RQHRE.js
DELETED
|
@@ -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
|
-
};
|
package/dist/chunk-Q7MMWMEN.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getLogFn,
|
|
3
|
-
getStopwatch
|
|
4
|
-
} from "./chunk-23WUCNWX.js";
|
|
5
|
-
import {
|
|
6
|
-
findWorkspaceRoot
|
|
7
|
-
} from "./chunk-OIEEXHKO.js";
|
|
8
|
-
import {
|
|
9
|
-
LogLevel
|
|
10
|
-
} from "./chunk-POXTJ6GF.js";
|
|
11
|
-
import {
|
|
12
|
-
__name
|
|
13
|
-
} from "./chunk-SHUYVCID.js";
|
|
14
|
-
|
|
15
|
-
// src/logger/create-logger.ts
|
|
16
|
-
import chalk from "chalk";
|
|
17
|
-
async function createLogger(config) {
|
|
18
|
-
const workspaceRoot = findWorkspaceRoot();
|
|
19
|
-
if (!workspaceRoot) {
|
|
20
|
-
throw new Error("Cannot find workspace root");
|
|
21
|
-
}
|
|
22
|
-
const writeFatal = getLogFn(LogLevel.FATAL, config, chalk);
|
|
23
|
-
const writeError = getLogFn(LogLevel.ERROR, config, chalk);
|
|
24
|
-
const writeWarning = getLogFn(LogLevel.WARN, config, chalk);
|
|
25
|
-
const writeInfo = getLogFn(LogLevel.INFO, config, chalk);
|
|
26
|
-
const writeSuccess = getLogFn(LogLevel.SUCCESS, config, chalk);
|
|
27
|
-
const writeDebug = getLogFn(LogLevel.DEBUG, config, chalk);
|
|
28
|
-
const writeTrace = getLogFn(LogLevel.DEBUG, config, chalk);
|
|
29
|
-
return {
|
|
30
|
-
fatal: writeFatal,
|
|
31
|
-
error: writeError,
|
|
32
|
-
warning: writeWarning,
|
|
33
|
-
info: writeInfo,
|
|
34
|
-
success: writeSuccess,
|
|
35
|
-
debug: writeDebug,
|
|
36
|
-
trace: writeTrace,
|
|
37
|
-
getStopwatch
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
__name(createLogger, "createLogger");
|
|
41
|
-
|
|
42
|
-
export {
|
|
43
|
-
createLogger
|
|
44
|
-
};
|
package/dist/chunk-QBS3OCHH.js
DELETED
|
@@ -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
|
-
};
|
package/dist/chunk-RRKB32OH.js
DELETED
|
File without changes
|