@storm-software/config-tools 1.185.2 → 1.185.3
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/bin/config.cjs +1 -1
- package/bin/config.js +1 -1
- package/dist/{chunk-JMI7BRL7.cjs → chunk-2WBD2G3E.cjs} +4 -4
- package/dist/{chunk-NOTWBXXM.cjs → chunk-7KQGBOBB.cjs} +3 -3
- package/dist/{chunk-OUICITIJ.js → chunk-ANURULFO.js} +2 -2
- package/dist/{chunk-M3REM2FU.cjs → chunk-BDATZ3UB.cjs} +2 -2
- package/dist/{chunk-VDG3JG4I.js → chunk-CHGYDPKJ.js} +2 -2
- package/dist/{chunk-ADFY75XS.cjs → chunk-DCBJYNGT.cjs} +6 -6
- package/dist/{chunk-P3ZMLNC2.cjs → chunk-DW7S5IU3.cjs} +11 -11
- package/dist/{chunk-VGSLMSNV.cjs → chunk-EIHTQY4T.cjs} +13 -13
- package/dist/{chunk-J7BFGUIX.cjs → chunk-JEQNG6OF.cjs} +2 -2
- package/dist/{chunk-VGRV7U7A.cjs → chunk-JL3JIFMN.cjs} +9 -9
- package/dist/{chunk-FOHZ3IDH.js → chunk-KJ7E5BJ3.js} +1 -1
- package/dist/{chunk-WYQYWPLE.js → chunk-KSMN3HSC.js} +2 -2
- package/dist/{chunk-SZXSPLS6.js → chunk-M7ENPKGB.js} +1 -1
- package/dist/{chunk-EQU3L4HQ.js → chunk-O3EPTOYQ.js} +5 -5
- package/dist/{chunk-MBEJXPRQ.cjs → chunk-S3VLNC3X.cjs} +4 -4
- package/dist/{chunk-5BZL5JNY.js → chunk-UVQ4XFPZ.js} +2 -2
- package/dist/{chunk-7IMLZPZF.js → chunk-V3GMJ4TX.js} +1 -1
- package/dist/{chunk-ZVT775K3.js → chunk-WRVRTVCX.js} +1 -1
- package/dist/{chunk-PZLRGHBS.cjs → chunk-XWFDOXDV.cjs} +6 -6
- package/dist/{chunk-HOTVYRCT.js → chunk-ZWZLRNXP.js} +1 -1
- package/dist/config-file/get-config-file.cjs +7 -7
- package/dist/config-file/get-config-file.js +6 -6
- package/dist/config-file/index.cjs +7 -7
- package/dist/config-file/index.js +6 -6
- package/dist/create-storm-config.cjs +10 -10
- package/dist/create-storm-config.js +9 -9
- package/dist/env/get-env.cjs +3 -3
- package/dist/env/get-env.js +2 -2
- package/dist/env/index.cjs +4 -4
- package/dist/env/index.js +3 -3
- package/dist/env/set-env.cjs +3 -3
- package/dist/env/set-env.js +2 -2
- package/dist/get-config.cjs +11 -11
- package/dist/get-config.js +10 -10
- package/dist/index.cjs +11 -11
- package/dist/index.js +10 -10
- package/dist/utilities/apply-workspace-tokens.cjs +4 -4
- package/dist/utilities/apply-workspace-tokens.js +3 -3
- package/dist/utilities/correct-paths.cjs +2 -2
- package/dist/utilities/correct-paths.js +1 -1
- package/dist/utilities/file-path-utils.cjs +3 -3
- package/dist/utilities/file-path-utils.js +2 -2
- package/dist/utilities/find-workspace-root.cjs +3 -3
- package/dist/utilities/find-workspace-root.js +2 -2
- package/dist/utilities/get-default-config.cjs +4 -4
- package/dist/utilities/get-default-config.js +3 -3
- package/dist/utilities/index.cjs +6 -6
- package/dist/utilities/index.js +5 -5
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
package/bin/config.cjs
CHANGED
|
@@ -344,7 +344,7 @@ var correctPaths = function(path) {
|
|
|
344
344
|
return ".";
|
|
345
345
|
}
|
|
346
346
|
path = normalizeWindowsPath(path);
|
|
347
|
-
const isUNCPath = path
|
|
347
|
+
const isUNCPath = path?.match(_UNC_REGEX);
|
|
348
348
|
const isPathAbsolute = isAbsolute(path);
|
|
349
349
|
const trailingSeparator = path[path.length - 1] === "/";
|
|
350
350
|
path = normalizeString(path, !isPathAbsolute);
|
package/bin/config.js
CHANGED
|
@@ -311,7 +311,7 @@ var correctPaths = function(path) {
|
|
|
311
311
|
return ".";
|
|
312
312
|
}
|
|
313
313
|
path = normalizeWindowsPath(path);
|
|
314
|
-
const isUNCPath = path
|
|
314
|
+
const isUNCPath = path?.match(_UNC_REGEX);
|
|
315
315
|
const isPathAbsolute = isAbsolute(path);
|
|
316
316
|
const trailingSeparator = path[path.length - 1] === "/";
|
|
317
317
|
path = normalizeString(path, !isPathAbsolute);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
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
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkBDATZ3UBcjs = require('./chunk-BDATZ3UB.cjs');
|
|
4
4
|
|
|
5
5
|
// src/utilities/file-path-utils.ts
|
|
6
6
|
var removeExtension = (filePath) => {
|
|
7
|
-
const result = !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
7
|
+
const result = !filePath || (_optionalChain([filePath, 'optionalAccess', _ => _.match, 'call', _2 => _2(/./g)]) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
8
8
|
if (result.startsWith("./")) {
|
|
9
9
|
return result.substring(2);
|
|
10
10
|
}
|
|
@@ -14,7 +14,7 @@ var removeExtension = (filePath) => {
|
|
|
14
14
|
return result;
|
|
15
15
|
};
|
|
16
16
|
function findFileName(filePath, { requireExtension, withExtension } = {}) {
|
|
17
|
-
const result = _nullishCoalesce(_optionalChain([
|
|
17
|
+
const result = _nullishCoalesce(_optionalChain([_chunkBDATZ3UBcjs.normalizeWindowsPath.call(void 0, filePath), 'optionalAccess', _3 => _3.split, 'call', _4 => _4(_optionalChain([filePath, 'optionalAccess', _5 => _5.includes, 'call', _6 => _6("\\")]) ? "\\" : "/"), 'optionalAccess', _7 => _7.pop, 'call', _8 => _8()]), () => ( ""));
|
|
18
18
|
if (requireExtension === true && !result.includes(".")) {
|
|
19
19
|
return "";
|
|
20
20
|
}
|
|
@@ -24,7 +24,7 @@ function findFileName(filePath, { requireExtension, withExtension } = {}) {
|
|
|
24
24
|
return result;
|
|
25
25
|
}
|
|
26
26
|
function findFilePath(filePath) {
|
|
27
|
-
const normalizedPath =
|
|
27
|
+
const normalizedPath = _chunkBDATZ3UBcjs.normalizeWindowsPath.call(void 0, filePath);
|
|
28
28
|
return normalizedPath.replace(
|
|
29
29
|
findFileName(normalizedPath, { requireExtension: true }),
|
|
30
30
|
""
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkN3UX6L7Xcjs = require('./chunk-N3UX6L7X.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkBDATZ3UBcjs = require('./chunk-BDATZ3UB.cjs');
|
|
7
7
|
|
|
8
8
|
// src/utilities/find-workspace-root.ts
|
|
9
9
|
var rootFiles = [
|
|
@@ -49,11 +49,11 @@ var rootDirectories = [
|
|
|
49
49
|
];
|
|
50
50
|
function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
51
51
|
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
52
|
-
return
|
|
52
|
+
return _chunkBDATZ3UBcjs.correctPaths.call(void 0,
|
|
53
53
|
_nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH))
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
|
-
return
|
|
56
|
+
return _chunkBDATZ3UBcjs.correctPaths.call(void 0,
|
|
57
57
|
_chunkN3UX6L7Xcjs.findFolderUp.call(void 0,
|
|
58
58
|
_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())),
|
|
59
59
|
rootFiles,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadStormWorkspaceConfig,
|
|
3
3
|
tryLoadStormWorkspaceConfig
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-O3EPTOYQ.js";
|
|
5
5
|
import {
|
|
6
6
|
findWorkspaceRoot
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-M7ENPKGB.js";
|
|
8
8
|
|
|
9
9
|
// src/get-config.ts
|
|
10
10
|
var getConfig = (workspaceRoot, skipLogs = false) => {
|
|
@@ -18,7 +18,7 @@ var correctPaths = function(path) {
|
|
|
18
18
|
return ".";
|
|
19
19
|
}
|
|
20
20
|
path = normalizeWindowsPath(path);
|
|
21
|
-
const isUNCPath = path.match(_UNC_REGEX);
|
|
21
|
+
const isUNCPath = _optionalChain([path, 'optionalAccess', _ => _.match, 'call', _2 => _2(_UNC_REGEX)]);
|
|
22
22
|
const isPathAbsolute = isAbsolute(path);
|
|
23
23
|
const trailingSeparator = path[path.length - 1] === "/";
|
|
24
24
|
path = normalizeString(path, !isPathAbsolute);
|
|
@@ -203,7 +203,7 @@ var basename = function(p, extension) {
|
|
|
203
203
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
204
204
|
};
|
|
205
205
|
var parse = function(p) {
|
|
206
|
-
const root = _optionalChain([_PATH_ROOT_RE, 'access',
|
|
206
|
+
const root = _optionalChain([_PATH_ROOT_RE, 'access', _3 => _3.exec, 'call', _4 => _4(p), 'optionalAccess', _5 => _5[0], 'optionalAccess', _6 => _6.replace, 'call', _7 => _7(/\\/g, "/")]) || "";
|
|
207
207
|
const base = basename(p);
|
|
208
208
|
const extension = extname(base);
|
|
209
209
|
return {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
findWorkspaceRoot
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-M7ENPKGB.js";
|
|
4
4
|
import {
|
|
5
5
|
writeTrace
|
|
6
6
|
} from "./chunk-7L77OWOV.js";
|
|
7
7
|
import {
|
|
8
8
|
joinPaths
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-V3GMJ4TX.js";
|
|
10
10
|
|
|
11
11
|
// src/config-file/get-config-file.ts
|
|
12
12
|
import { loadConfig } from "c12";
|
|
@@ -1,18 +1,18 @@
|
|
|
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
|
|
3
|
+
var _chunk7KQGBOBBcjs = require('./chunk-7KQGBOBB.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunk72EOBSKWcjs = require('./chunk-72EOBSKW.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkBDATZ3UBcjs = require('./chunk-BDATZ3UB.cjs');
|
|
10
10
|
|
|
11
11
|
// src/config-file/get-config-file.ts
|
|
12
12
|
var _c12 = require('c12');
|
|
13
13
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
14
14
|
var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
15
|
-
const workspacePath = filePath ||
|
|
15
|
+
const workspacePath = filePath || _chunk7KQGBOBBcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
16
16
|
const configs = await Promise.all([
|
|
17
17
|
_c12.loadConfig.call(void 0, {
|
|
18
18
|
cwd: workspacePath,
|
|
@@ -21,7 +21,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
21
21
|
envName: _optionalChain([fileName, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]),
|
|
22
22
|
jitiOptions: {
|
|
23
23
|
debug: false,
|
|
24
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
24
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkBDATZ3UBcjs.joinPaths.call(void 0,
|
|
25
25
|
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
26
26
|
"jiti"
|
|
27
27
|
)
|
|
@@ -35,7 +35,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
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 :
|
|
38
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkBDATZ3UBcjs.joinPaths.call(void 0,
|
|
39
39
|
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
40
40
|
"jiti"
|
|
41
41
|
)
|
|
@@ -47,7 +47,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
47
47
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
48
48
|
};
|
|
49
49
|
var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
50
|
-
const workspacePath = filePath ? filePath :
|
|
50
|
+
const workspacePath = filePath ? filePath : _chunk7KQGBOBBcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
51
51
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
52
52
|
let config = result.config;
|
|
53
53
|
const configFile = result.configFile;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkBDATZ3UBcjs = require('./chunk-BDATZ3UB.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunk4PX5UVANcjs = require('./chunk-4PX5UVAN.cjs');
|
|
@@ -156,42 +156,42 @@ var setConfigEnv = (config) => {
|
|
|
156
156
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
157
157
|
}
|
|
158
158
|
if (config.configFile) {
|
|
159
|
-
process.env[`${prefix}WORKSPACE_CONFIG_FILE`] =
|
|
159
|
+
process.env[`${prefix}WORKSPACE_CONFIG_FILE`] = _chunkBDATZ3UBcjs.correctPaths.call(void 0,
|
|
160
160
|
config.configFile
|
|
161
161
|
);
|
|
162
162
|
}
|
|
163
163
|
if (config.workspaceRoot) {
|
|
164
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
165
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
166
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
164
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkBDATZ3UBcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
165
|
+
process.env.NX_WORKSPACE_ROOT = _chunkBDATZ3UBcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
166
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkBDATZ3UBcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
167
167
|
}
|
|
168
168
|
if (config.directories) {
|
|
169
169
|
if (!config.skipCache && config.directories.cache) {
|
|
170
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
170
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkBDATZ3UBcjs.correctPaths.call(void 0,
|
|
171
171
|
config.directories.cache
|
|
172
172
|
);
|
|
173
173
|
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
174
174
|
}
|
|
175
175
|
if (config.directories.data) {
|
|
176
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
176
|
+
process.env[`${prefix}DATA_DIR`] = _chunkBDATZ3UBcjs.correctPaths.call(void 0, config.directories.data);
|
|
177
177
|
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
178
178
|
}
|
|
179
179
|
if (config.directories.config) {
|
|
180
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
180
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkBDATZ3UBcjs.correctPaths.call(void 0,
|
|
181
181
|
config.directories.config
|
|
182
182
|
);
|
|
183
183
|
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
184
184
|
}
|
|
185
185
|
if (config.directories.temp) {
|
|
186
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
186
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkBDATZ3UBcjs.correctPaths.call(void 0, config.directories.temp);
|
|
187
187
|
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
188
188
|
}
|
|
189
189
|
if (config.directories.log) {
|
|
190
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
190
|
+
process.env[`${prefix}LOG_DIR`] = _chunkBDATZ3UBcjs.correctPaths.call(void 0, config.directories.log);
|
|
191
191
|
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
192
192
|
}
|
|
193
193
|
if (config.directories.build) {
|
|
194
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
194
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkBDATZ3UBcjs.correctPaths.call(void 0,
|
|
195
195
|
config.directories.build
|
|
196
196
|
);
|
|
197
197
|
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
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
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkDCBJYNGTcjs = require('./chunk-DCBJYNGT.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkS3VLNC3Xcjs = require('./chunk-S3VLNC3X.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk7KQGBOBBcjs = require('./chunk-7KQGBOBB.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -15,11 +15,11 @@ var _chunkNOTWBXXMcjs = require('./chunk-NOTWBXXM.cjs');
|
|
|
15
15
|
var _chunk72EOBSKWcjs = require('./chunk-72EOBSKW.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkDW7S5IU3cjs = require('./chunk-DW7S5IU3.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkJL3JIFMNcjs = require('./chunk-JL3JIFMN.cjs');
|
|
23
23
|
|
|
24
24
|
// src/create-storm-config.ts
|
|
25
25
|
var _schema = require('@storm-software/config/schema');
|
|
@@ -31,10 +31,10 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
31
31
|
if (!_optionalChain([_static_cache, 'optionalAccess', _ => _.data]) || !_optionalChain([_static_cache, 'optionalAccess', _2 => _2.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
32
32
|
let _workspaceRoot = workspaceRoot;
|
|
33
33
|
if (!_workspaceRoot) {
|
|
34
|
-
_workspaceRoot =
|
|
34
|
+
_workspaceRoot = _chunk7KQGBOBBcjs.findWorkspaceRoot.call(void 0, );
|
|
35
35
|
}
|
|
36
|
-
const configEnv =
|
|
37
|
-
const configFile = await
|
|
36
|
+
const configEnv = _chunkJL3JIFMNcjs.getConfigEnv.call(void 0, );
|
|
37
|
+
const configFile = await _chunkDCBJYNGTcjs.getConfigFile.call(void 0, _workspaceRoot);
|
|
38
38
|
if (!configFile) {
|
|
39
39
|
if (!skipLogs) {
|
|
40
40
|
_chunk72EOBSKWcjs.writeWarning.call(void 0,
|
|
@@ -46,14 +46,14 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
46
46
|
return void 0;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
const defaultConfig = await
|
|
49
|
+
const defaultConfig = await _chunkS3VLNC3Xcjs.getPackageJsonConfig.call(void 0, _workspaceRoot);
|
|
50
50
|
const configInput = _defu2.default.call(void 0,
|
|
51
51
|
configEnv,
|
|
52
52
|
configFile,
|
|
53
53
|
defaultConfig
|
|
54
54
|
);
|
|
55
55
|
try {
|
|
56
|
-
result =
|
|
56
|
+
result = _chunkS3VLNC3Xcjs.applyDefaultConfig.call(void 0,
|
|
57
57
|
await _schema.workspaceConfigSchema.parseAsync(configInput)
|
|
58
58
|
);
|
|
59
59
|
result.workspaceRoot ??= _workspaceRoot;
|
|
@@ -89,7 +89,7 @@ var createConfigExtension = (extensionName, schema) => {
|
|
|
89
89
|
if (_extension_cache.has(extension_cache_key)) {
|
|
90
90
|
return _extension_cache.get(extension_cache_key);
|
|
91
91
|
}
|
|
92
|
-
let extension =
|
|
92
|
+
let extension = _chunkJL3JIFMNcjs.getExtensionEnv.call(void 0, extensionName);
|
|
93
93
|
if (schema) {
|
|
94
94
|
extension = schema.parse(extension);
|
|
95
95
|
}
|
|
@@ -104,7 +104,7 @@ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
|
|
|
104
104
|
skipLogs,
|
|
105
105
|
true
|
|
106
106
|
);
|
|
107
|
-
|
|
107
|
+
_chunkDW7S5IU3cjs.setConfigEnv.call(void 0, config);
|
|
108
108
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
109
109
|
_chunk72EOBSKWcjs.writeTrace.call(void 0,
|
|
110
110
|
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
@@ -126,7 +126,7 @@ var tryLoadStormWorkspaceConfig = async (workspaceRoot, skipLogs = true, useDefa
|
|
|
126
126
|
if (!config) {
|
|
127
127
|
return void 0;
|
|
128
128
|
}
|
|
129
|
-
|
|
129
|
+
_chunkDW7S5IU3cjs.setConfigEnv.call(void 0, config);
|
|
130
130
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
131
131
|
_chunk72EOBSKWcjs.writeTrace.call(void 0,
|
|
132
132
|
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk7KQGBOBBcjs = require('./chunk-7KQGBOBB.cjs');
|
|
4
4
|
|
|
5
5
|
// src/utilities/apply-workspace-tokens.ts
|
|
6
6
|
var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
@@ -37,7 +37,7 @@ var applyWorkspaceBaseTokens = async (option, tokenParams) => {
|
|
|
37
37
|
if (result.includes("{workspaceRoot}")) {
|
|
38
38
|
result = result.replaceAll(
|
|
39
39
|
"{workspaceRoot}",
|
|
40
|
-
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _2 => _2.config, 'optionalAccess', _3 => _3.workspaceRoot]))), () => (
|
|
40
|
+
_nullishCoalesce(_nullishCoalesce(tokenParams.workspaceRoot, () => ( _optionalChain([tokenParams, 'access', _2 => _2.config, 'optionalAccess', _3 => _3.workspaceRoot]))), () => ( _chunk7KQGBOBBcjs.findWorkspaceRoot.call(void 0, )))
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
43
|
return result;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkBDATZ3UBcjs = require('./chunk-BDATZ3UB.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunk4PX5UVANcjs = require('./chunk-4PX5UVAN.cjs');
|
|
@@ -73,15 +73,15 @@ var getConfigEnv = () => {
|
|
|
73
73
|
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
74
74
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
75
75
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
76
|
-
configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ?
|
|
77
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
76
|
+
configFile: process.env[`${prefix}WORKSPACE_CONFIG_FILE`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_CONFIG_FILE`]) : void 0,
|
|
77
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
78
78
|
directories: {
|
|
79
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
80
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
81
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
82
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
83
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
84
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
79
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
80
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
81
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
82
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
83
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
84
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunkBDATZ3UBcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
85
85
|
},
|
|
86
86
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
87
87
|
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeWindowsPath
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-V3GMJ4TX.js";
|
|
4
4
|
|
|
5
5
|
// src/utilities/file-path-utils.ts
|
|
6
6
|
var removeExtension = (filePath) => {
|
|
7
|
-
const result = !filePath || (filePath
|
|
7
|
+
const result = !filePath || (filePath?.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
|
|
8
8
|
if (result.startsWith("./")) {
|
|
9
9
|
return result.substring(2);
|
|
10
10
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getConfigFile
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CHGYDPKJ.js";
|
|
4
4
|
import {
|
|
5
5
|
applyDefaultConfig,
|
|
6
6
|
getPackageJsonConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UVQ4XFPZ.js";
|
|
8
8
|
import {
|
|
9
9
|
findWorkspaceRoot
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-M7ENPKGB.js";
|
|
11
11
|
import {
|
|
12
12
|
formatLogMessage,
|
|
13
13
|
writeTrace,
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
} from "./chunk-7L77OWOV.js";
|
|
16
16
|
import {
|
|
17
17
|
setConfigEnv
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-KJ7E5BJ3.js";
|
|
19
19
|
import {
|
|
20
20
|
getConfigEnv,
|
|
21
21
|
getExtensionEnv
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ZWZLRNXP.js";
|
|
23
23
|
|
|
24
24
|
// src/create-storm-config.ts
|
|
25
25
|
import { workspaceConfigSchema } from "@storm-software/config/schema";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk7KQGBOBBcjs = require('./chunk-7KQGBOBB.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkBDATZ3UBcjs = require('./chunk-BDATZ3UB.cjs');
|
|
7
7
|
|
|
8
8
|
// src/utilities/get-default-config.ts
|
|
9
9
|
|
|
@@ -20,10 +20,10 @@ async function getPackageJsonConfig(root) {
|
|
|
20
20
|
let name = void 0;
|
|
21
21
|
let namespace = void 0;
|
|
22
22
|
let repository = void 0;
|
|
23
|
-
const workspaceRoot =
|
|
23
|
+
const workspaceRoot = _chunk7KQGBOBBcjs.findWorkspaceRoot.call(void 0, root);
|
|
24
24
|
if (_fs.existsSync.call(void 0, _path.join.call(void 0, workspaceRoot, "package.json"))) {
|
|
25
25
|
const file = await _promises.readFile.call(void 0,
|
|
26
|
-
|
|
26
|
+
_chunkBDATZ3UBcjs.joinPaths.call(void 0, workspaceRoot, "package.json"),
|
|
27
27
|
"utf8"
|
|
28
28
|
);
|
|
29
29
|
if (file) {
|
|
@@ -18,7 +18,7 @@ var correctPaths = function(path) {
|
|
|
18
18
|
return ".";
|
|
19
19
|
}
|
|
20
20
|
path = normalizeWindowsPath(path);
|
|
21
|
-
const isUNCPath = path
|
|
21
|
+
const isUNCPath = path?.match(_UNC_REGEX);
|
|
22
22
|
const isPathAbsolute = isAbsolute(path);
|
|
23
23
|
const trailingSeparator = path[path.length - 1] === "/";
|
|
24
24
|
path = normalizeString(path, !isPathAbsolute);
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkEIHTQY4Tcjs = require('./chunk-EIHTQY4T.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk7KQGBOBBcjs = require('./chunk-7KQGBOBB.cjs');
|
|
8
8
|
|
|
9
9
|
// src/get-config.ts
|
|
10
10
|
var getConfig = (workspaceRoot, skipLogs = false) => {
|
|
11
|
-
return
|
|
11
|
+
return _chunkEIHTQY4Tcjs.loadStormWorkspaceConfig.call(void 0, workspaceRoot, skipLogs);
|
|
12
12
|
};
|
|
13
13
|
var getWorkspaceConfig = (skipLogs = true, options = {}) => {
|
|
14
14
|
let workspaceRoot = options.workspaceRoot;
|
|
15
15
|
if (!workspaceRoot) {
|
|
16
|
-
workspaceRoot =
|
|
16
|
+
workspaceRoot = _chunk7KQGBOBBcjs.findWorkspaceRoot.call(void 0, options.cwd);
|
|
17
17
|
}
|
|
18
18
|
return getConfig(workspaceRoot, skipLogs);
|
|
19
19
|
};
|
|
@@ -21,9 +21,9 @@ var tryGetWorkspaceConfig = async (skipLogs = true, options = {}) => {
|
|
|
21
21
|
try {
|
|
22
22
|
let workspaceRoot = options.workspaceRoot;
|
|
23
23
|
if (!workspaceRoot) {
|
|
24
|
-
workspaceRoot =
|
|
24
|
+
workspaceRoot = _chunk7KQGBOBBcjs.findWorkspaceRoot.call(void 0, options.cwd);
|
|
25
25
|
}
|
|
26
|
-
return
|
|
26
|
+
return _chunkEIHTQY4Tcjs.tryLoadStormWorkspaceConfig.call(void 0,
|
|
27
27
|
workspaceRoot,
|
|
28
28
|
skipLogs,
|
|
29
29
|
options.useDefault
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkDCBJYNGTcjs = require('../chunk-DCBJYNGT.cjs');
|
|
5
5
|
require('../chunk-3COHMHPU.cjs');
|
|
6
6
|
require('../chunk-CRQ64CT5.cjs');
|
|
7
7
|
require('../chunk-DQT6QJRQ.cjs');
|
|
8
8
|
require('../chunk-363CTBPH.cjs');
|
|
9
|
-
require('../chunk-
|
|
10
|
-
require('../chunk-
|
|
11
|
-
require('../chunk-
|
|
12
|
-
require('../chunk-
|
|
9
|
+
require('../chunk-JEQNG6OF.cjs');
|
|
10
|
+
require('../chunk-2WBD2G3E.cjs');
|
|
11
|
+
require('../chunk-S3VLNC3X.cjs');
|
|
12
|
+
require('../chunk-7KQGBOBB.cjs');
|
|
13
13
|
require('../chunk-N3UX6L7X.cjs');
|
|
14
14
|
require('../chunk-7PV6L7I7.cjs');
|
|
15
15
|
require('../chunk-ESUPAI3Y.cjs');
|
|
@@ -19,10 +19,10 @@ require('../chunk-LOY6ICHZ.cjs');
|
|
|
19
19
|
require('../chunk-WBQ4VS7E.cjs');
|
|
20
20
|
require('../chunk-DTGT4OI3.cjs');
|
|
21
21
|
require('../chunk-BN6MEGGY.cjs');
|
|
22
|
-
require('../chunk-
|
|
22
|
+
require('../chunk-BDATZ3UB.cjs');
|
|
23
23
|
require('../chunk-4PX5UVAN.cjs');
|
|
24
24
|
require('../chunk-IRCFHYKZ.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
exports.getConfigFile =
|
|
28
|
+
exports.getConfigFile = _chunkDCBJYNGTcjs.getConfigFile; exports.getConfigFileByName = _chunkDCBJYNGTcjs.getConfigFileByName;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getConfigFile,
|
|
3
3
|
getConfigFileByName
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-CHGYDPKJ.js";
|
|
5
5
|
import "../chunk-UKGRDKIH.js";
|
|
6
6
|
import "../chunk-FVKBGSDE.js";
|
|
7
7
|
import "../chunk-6RVIJKY3.js";
|
|
8
8
|
import "../chunk-L72FV3TP.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-WRVRTVCX.js";
|
|
10
|
+
import "../chunk-KSMN3HSC.js";
|
|
11
|
+
import "../chunk-UVQ4XFPZ.js";
|
|
12
|
+
import "../chunk-M7ENPKGB.js";
|
|
13
13
|
import "../chunk-6JBGUE4A.js";
|
|
14
14
|
import "../chunk-RRKB32OH.js";
|
|
15
15
|
import "../chunk-BCAYP4JB.js";
|
|
@@ -19,7 +19,7 @@ import "../chunk-HVVJHTFS.js";
|
|
|
19
19
|
import "../chunk-LM2UMGYA.js";
|
|
20
20
|
import "../chunk-G2MK47WL.js";
|
|
21
21
|
import "../chunk-CZ4IE2QN.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-V3GMJ4TX.js";
|
|
23
23
|
import "../chunk-K4CDYUQR.js";
|
|
24
24
|
import "../chunk-POXTJ6GF.js";
|
|
25
25
|
export {
|