@storm-software/build-tools 0.143.43 → 0.143.45
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/{chunk-UYTTXC2S.js → chunk-4Y7DUAMQ.js} +8 -8
- package/dist/{chunk-E3YQH37I.mjs → chunk-A6F6NNS6.mjs} +1 -1
- package/dist/{chunk-GLZE4DB3.js → chunk-CNKJQMCL.js} +8 -8
- package/dist/{chunk-H2FBZR4P.mjs → chunk-H2MR24BL.mjs} +1 -1
- package/dist/{chunk-JDS7XNLR.js → chunk-JIKBV5Z2.js} +10 -10
- package/dist/{chunk-ZCATDZ4F.mjs → chunk-M5AC3COW.mjs} +1 -1
- package/dist/{chunk-TEEE5W4D.js → chunk-MY55IIR6.js} +2 -2
- package/dist/{chunk-TW3Z4OGH.mjs → chunk-NOJLNIEC.mjs} +1 -1
- package/dist/{chunk-E3HEZEIW.js → chunk-NSNKG4UV.js} +53 -48
- package/dist/{chunk-BW3RW2LZ.js → chunk-QCTHJR6E.js} +1 -1
- package/dist/{chunk-2G3UEVSQ.mjs → chunk-QKEUU3L3.mjs} +14 -9
- package/dist/{chunk-7BET5MRC.js → chunk-S5V4ROWC.js} +6 -6
- package/dist/{chunk-EI5F6JDF.mjs → chunk-S7LT43EW.mjs} +1 -1
- package/dist/{chunk-2KCIWWAH.mjs → chunk-STJ5NLSZ.mjs} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/index.mjs +7 -7
- package/dist/plugins/analyze.js +3 -3
- package/dist/plugins/analyze.mjs +2 -2
- package/dist/plugins/index.js +4 -4
- package/dist/plugins/index.mjs +3 -3
- package/dist/plugins/ts-resolve.js +3 -3
- package/dist/plugins/ts-resolve.mjs +2 -2
- package/dist/{types-C3WeLGCj.d.ts → types-Dsy6SjaO.d.mts} +2 -2
- package/dist/{types-C3WeLGCj.d.mts → types-Dsy6SjaO.d.ts} +2 -2
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utilities/copy-assets.d.mts +1 -1
- package/dist/utilities/copy-assets.d.ts +1 -1
- package/dist/utilities/copy-assets.js +3 -3
- package/dist/utilities/copy-assets.mjs +2 -2
- package/dist/utilities/generate-package-json.d.mts +1 -1
- package/dist/utilities/generate-package-json.d.ts +1 -1
- package/dist/utilities/generate-package-json.js +3 -3
- package/dist/utilities/generate-package-json.mjs +2 -2
- package/dist/utilities/get-entry-points.d.mts +1 -1
- package/dist/utilities/get-entry-points.d.ts +1 -1
- package/dist/utilities/get-entry-points.js +3 -3
- package/dist/utilities/get-entry-points.mjs +2 -2
- package/dist/utilities/get-env.d.mts +1 -1
- package/dist/utilities/get-env.d.ts +1 -1
- package/dist/utilities/index.d.mts +1 -1
- package/dist/utilities/index.d.ts +1 -1
- package/dist/utilities/index.js +6 -6
- package/dist/utilities/index.mjs +5 -5
- package/dist/utilities/read-nx-config.js +3 -3
- package/dist/utilities/read-nx-config.mjs +2 -2
- package/package.json +45 -15
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 -->
|
|
@@ -1,6 +1,6 @@
|
|
|
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 _chunkQCTHJR6Ejs = require('./chunk-QCTHJR6E.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -29,8 +29,8 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
|
|
|
29
29
|
return {
|
|
30
30
|
name: `storm:ts-resolve`,
|
|
31
31
|
async resolveId(source, importer) {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
_chunkQCTHJR6Ejs.writeDebug.call(void 0, `ts-resolve - resolveId source: ${source}`);
|
|
33
|
+
_chunkQCTHJR6Ejs.writeDebug.call(void 0, `ts-resolve - resolveId importer: ${importer}`);
|
|
34
34
|
if (!importer) {
|
|
35
35
|
return null;
|
|
36
36
|
}
|
|
@@ -41,7 +41,7 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
|
|
|
41
41
|
return false;
|
|
42
42
|
}
|
|
43
43
|
if (ignore && ignore(source, importer)) {
|
|
44
|
-
|
|
44
|
+
_chunkQCTHJR6Ejs.writeDebug.call(void 0, `ts-resolve - ignored ${source}`);
|
|
45
45
|
return null;
|
|
46
46
|
}
|
|
47
47
|
if (resolveOnly) {
|
|
@@ -50,12 +50,12 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
|
|
|
50
50
|
return v.test(source);
|
|
51
51
|
});
|
|
52
52
|
if (!shouldResolve) {
|
|
53
|
-
|
|
53
|
+
_chunkQCTHJR6Ejs.writeDebug.call(void 0, `ts-resolve - skipped by matching resolveOnly ${source}`);
|
|
54
54
|
return null;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
if (_path2.default.isAbsolute(source)) {
|
|
58
|
-
|
|
58
|
+
_chunkQCTHJR6Ejs.writeDebug.call(void 0, `ts-resolve - skipped absolute path: ${source}`);
|
|
59
59
|
return null;
|
|
60
60
|
}
|
|
61
61
|
const basedir = importer ? await _fs2.default.promises.realpath(_path2.default.dirname(importer)) : process.cwd();
|
|
@@ -87,10 +87,10 @@ var tsResolvePlugin = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, ({ re
|
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
if (id) {
|
|
90
|
-
|
|
90
|
+
_chunkQCTHJR6Ejs.writeDebug.call(void 0, `ts-resolve - resolved ${source} to ${id}`);
|
|
91
91
|
return id;
|
|
92
92
|
}
|
|
93
|
-
|
|
93
|
+
_chunkQCTHJR6Ejs.writeDebug.call(void 0, `ts-resolve - mark ${source} as external`);
|
|
94
94
|
return false;
|
|
95
95
|
}
|
|
96
96
|
};
|
|
@@ -395,7 +395,7 @@ var stormWorkspaceConfigSchema = z.object({
|
|
|
395
395
|
"staging",
|
|
396
396
|
"production"
|
|
397
397
|
]).default("production").describe("The current runtime environment mode for the package"),
|
|
398
|
-
workspaceRoot: z.string().trim().
|
|
398
|
+
workspaceRoot: z.string().trim().describe("The root directory of the workspace"),
|
|
399
399
|
externalPackagePatterns: z.array(z.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
|
|
400
400
|
skipCache: z.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
401
401
|
directories: WorkspaceDirectoryConfigSchema,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkQCTHJR6Ejs = require('./chunk-QCTHJR6E.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -37,8 +37,8 @@ var copyAssets = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (con
|
|
|
37
37
|
output: "src/"
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
40
|
+
_chunkQCTHJR6Ejs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
41
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkQCTHJR6Ejs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
42
42
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
43
43
|
projectDir: projectRoot,
|
|
44
44
|
rootDir: config.workspaceRoot,
|
|
@@ -47,12 +47,12 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
47
47
|
});
|
|
48
48
|
await assetHandler.processAllAssetsOnce();
|
|
49
49
|
if (includeSrc === true) {
|
|
50
|
-
|
|
50
|
+
_chunkQCTHJR6Ejs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkQCTHJR6Ejs.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
51
51
|
const files = await _glob.glob.call(void 0, [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
_chunkQCTHJR6Ejs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
53
|
+
_chunkQCTHJR6Ejs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
54
|
+
_chunkQCTHJR6Ejs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
55
|
+
_chunkQCTHJR6Ejs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
56
56
|
]);
|
|
57
57
|
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
58
58
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkQCTHJR6Ejs = require('./chunk-QCTHJR6E.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -20,7 +20,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0
|
|
|
20
20
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _ => _.node, 'access', _2 => _2.data, 'optionalAccess', _3 => _3.root]) !== projectRoot && _optionalChain([dep, 'access', _4 => _4.node, 'access', _5 => _5.data, 'optionalAccess', _6 => _6.root]) !== workspaceRoot)) {
|
|
21
21
|
const projectNode = project.node;
|
|
22
22
|
if (projectNode.data.root) {
|
|
23
|
-
const projectPackageJsonPath =
|
|
23
|
+
const projectPackageJsonPath = _chunkQCTHJR6Ejs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
|
|
24
24
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
25
25
|
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
26
26
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
@@ -31,8 +31,8 @@ var addPackageDependencies = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
if (localPackages.length > 0) {
|
|
34
|
-
|
|
35
|
-
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
34
|
+
_chunkQCTHJR6Ejs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
35
|
+
const projectJsonFile = await _promises.readFile.call(void 0, _chunkQCTHJR6Ejs.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
|
|
36
36
|
const projectJson = JSON.parse(projectJsonFile);
|
|
37
37
|
const projectName2 = projectJson.name;
|
|
38
38
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
@@ -41,7 +41,7 @@ var addPackageDependencies = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0
|
|
|
41
41
|
}
|
|
42
42
|
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _9 => _9.projects, 'optionalAccess', _10 => _10[projectName2], 'access', _11 => _11.implicitDependencies, 'optionalAccess', _12 => _12.reduce, 'call', _13 => _13((ret, dep) => {
|
|
43
43
|
if (_optionalChain([projectConfigurations, 'access', _14 => _14.projects, 'optionalAccess', _15 => _15[dep]])) {
|
|
44
|
-
const depPackageJsonPath =
|
|
44
|
+
const depPackageJsonPath = _chunkQCTHJR6Ejs.joinPaths.call(void 0, workspaceRoot, projectConfigurations.projects[dep].root, "package.json");
|
|
45
45
|
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
46
46
|
const depPackageJsonContent = _fs.readFileSync.call(void 0, depPackageJsonPath, "utf8");
|
|
47
47
|
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
@@ -65,13 +65,13 @@ var addPackageDependencies = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0
|
|
|
65
65
|
return ret;
|
|
66
66
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
67
67
|
} else {
|
|
68
|
-
|
|
68
|
+
_chunkQCTHJR6Ejs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
69
69
|
}
|
|
70
70
|
return packageJson;
|
|
71
71
|
}, "addPackageDependencies");
|
|
72
72
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
73
|
-
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot :
|
|
74
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
73
|
+
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunkQCTHJR6Ejs.findWorkspaceRoot.call(void 0, );
|
|
74
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkQCTHJR6Ejs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
|
|
75
75
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
76
76
|
packageJson.type ??= "module";
|
|
77
77
|
packageJson.sideEffects ??= false;
|
|
@@ -80,7 +80,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call
|
|
|
80
80
|
if (distSrc.startsWith("/")) {
|
|
81
81
|
distSrc = distSrc.substring(1);
|
|
82
82
|
}
|
|
83
|
-
packageJson.source ??= `${
|
|
83
|
+
packageJson.source ??= `${_chunkQCTHJR6Ejs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
84
84
|
}
|
|
85
85
|
packageJson.files ??= [
|
|
86
86
|
"dist/**/*"
|
|
@@ -111,7 +111,7 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call
|
|
|
111
111
|
];
|
|
112
112
|
}
|
|
113
113
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
114
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
114
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkQCTHJR6Ejs.joinPaths.call(void 0, "packages", projectName);
|
|
115
115
|
return packageJson;
|
|
116
116
|
}, "addWorkspacePackageJsonFields");
|
|
117
117
|
var addPackageJsonExport = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (file, type = "module", sourceRoot) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQCTHJR6Ejs = require('./chunk-QCTHJR6E.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -30,7 +30,7 @@ function analyze() {
|
|
|
30
30
|
renderChunk(source, chunk) {
|
|
31
31
|
const sourceBytes = formatBytes(source.length);
|
|
32
32
|
const fileName = chunk.fileName;
|
|
33
|
-
|
|
33
|
+
_chunkQCTHJR6Ejs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`);
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkQCTHJR6Ejs = require('./chunk-QCTHJR6E.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -23,7 +23,7 @@ var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
|
23
23
|
var _c12 = require('c12');
|
|
24
24
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
25
25
|
var getConfigFileByName = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (fileName, filePath, options = {}) => {
|
|
26
|
-
const workspacePath = filePath ||
|
|
26
|
+
const workspacePath = filePath || _chunkQCTHJR6Ejs.findWorkspaceRoot.call(void 0, filePath);
|
|
27
27
|
const configs = await Promise.all([
|
|
28
28
|
_c12.loadConfig.call(void 0, {
|
|
29
29
|
cwd: workspacePath,
|
|
@@ -32,7 +32,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, a
|
|
|
32
32
|
envName: _optionalChain([fileName, 'optionalAccess', _ => _.toUpperCase, 'call', _2 => _2()]),
|
|
33
33
|
jitiOptions: {
|
|
34
34
|
debug: false,
|
|
35
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
35
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkQCTHJR6Ejs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
36
36
|
},
|
|
37
37
|
...options
|
|
38
38
|
}),
|
|
@@ -43,7 +43,7 @@ var getConfigFileByName = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, a
|
|
|
43
43
|
envName: _optionalChain([fileName, 'optionalAccess', _3 => _3.toUpperCase, 'call', _4 => _4()]),
|
|
44
44
|
jitiOptions: {
|
|
45
45
|
debug: false,
|
|
46
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
46
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunkQCTHJR6Ejs.joinPaths.call(void 0, process.env.STORM_CACHE_DIR || "node_modules/.cache/storm", "jiti")
|
|
47
47
|
},
|
|
48
48
|
configFile: fileName,
|
|
49
49
|
...options
|
|
@@ -52,12 +52,12 @@ var getConfigFileByName = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, a
|
|
|
52
52
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
53
53
|
}, "getConfigFileByName");
|
|
54
54
|
var getConfigFile = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (filePath, additionalFileNames = []) => {
|
|
55
|
-
const workspacePath = filePath ? filePath :
|
|
55
|
+
const workspacePath = filePath ? filePath : _chunkQCTHJR6Ejs.findWorkspaceRoot.call(void 0, filePath);
|
|
56
56
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
57
57
|
let config = result.config;
|
|
58
58
|
const configFile = result.configFile;
|
|
59
59
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
60
|
-
|
|
60
|
+
_chunkQCTHJR6Ejs.writeTrace.call(void 0, `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`, {
|
|
61
61
|
logLevel: "all"
|
|
62
62
|
});
|
|
63
63
|
}
|
|
@@ -66,7 +66,7 @@ var getConfigFile = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (
|
|
|
66
66
|
for (const result2 of results) {
|
|
67
67
|
if (_optionalChain([result2, 'optionalAccess', _5 => _5.config]) && _optionalChain([result2, 'optionalAccess', _6 => _6.configFile]) && Object.keys(result2.config).length > 0) {
|
|
68
68
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
69
|
-
|
|
69
|
+
_chunkQCTHJR6Ejs.writeTrace.call(void 0, `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`, {
|
|
70
70
|
logLevel: "all"
|
|
71
71
|
});
|
|
72
72
|
}
|
|
@@ -74,7 +74,7 @@ var getConfigFile = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
if (!config) {
|
|
77
|
+
if (!config || Object.keys(config).length === 0) {
|
|
78
78
|
return void 0;
|
|
79
79
|
}
|
|
80
80
|
config.configFile = configFile;
|
|
@@ -132,15 +132,15 @@ var getConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, () => {
|
|
|
132
132
|
contact: process.env[`${prefix}CONTACT`] || void 0,
|
|
133
133
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
134
134
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
135
|
-
configFile: process.env[`${prefix}CONFIG_FILE`] ?
|
|
136
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
135
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunkQCTHJR6Ejs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
136
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunkQCTHJR6Ejs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
137
137
|
directories: {
|
|
138
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
139
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
140
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
141
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
142
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
143
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
138
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunkQCTHJR6Ejs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunkQCTHJR6Ejs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
139
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunkQCTHJR6Ejs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunkQCTHJR6Ejs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
140
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunkQCTHJR6Ejs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunkQCTHJR6Ejs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
141
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunkQCTHJR6Ejs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunkQCTHJR6Ejs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
142
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunkQCTHJR6Ejs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunkQCTHJR6Ejs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
143
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunkQCTHJR6Ejs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunkQCTHJR6Ejs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
144
144
|
},
|
|
145
145
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
146
146
|
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -163,24 +163,24 @@ var getConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, () => {
|
|
|
163
163
|
cyclone: process.env[`${prefix}REGISTRY_CYCLONE`] || void 0,
|
|
164
164
|
container: process.env[`${prefix}REGISTRY_CONTAINER`] || void 0
|
|
165
165
|
},
|
|
166
|
-
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ?
|
|
166
|
+
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) ? _chunkQCTHJR6Ejs.getLogLevelLabel.call(void 0, Number.parseInt(process.env[`${prefix}LOG_LEVEL`])) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
167
167
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
168
168
|
};
|
|
169
|
-
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
169
|
+
const themeNames = Object.keys(process.env).filter((envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunkQCTHJR6Ejs.COLOR_KEYS.every((colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)));
|
|
170
170
|
config.colors = themeNames.length > 0 ? themeNames.reduce((ret, themeName) => {
|
|
171
171
|
ret[themeName] = getThemeColorConfigEnv(prefix, themeName);
|
|
172
172
|
return ret;
|
|
173
173
|
}, {}) : getThemeColorConfigEnv(prefix);
|
|
174
|
-
if (config.docs ===
|
|
175
|
-
if (config.homepage ===
|
|
176
|
-
config.docs = `${
|
|
174
|
+
if (config.docs === _chunkQCTHJR6Ejs.STORM_DEFAULT_DOCS) {
|
|
175
|
+
if (config.homepage === _chunkQCTHJR6Ejs.STORM_DEFAULT_HOMEPAGE) {
|
|
176
|
+
config.docs = `${_chunkQCTHJR6Ejs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
177
177
|
} else {
|
|
178
178
|
config.docs = `${config.homepage}/docs`;
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
if (config.licensing ===
|
|
182
|
-
if (config.homepage ===
|
|
183
|
-
config.licensing = `${
|
|
181
|
+
if (config.licensing === _chunkQCTHJR6Ejs.STORM_DEFAULT_LICENSING) {
|
|
182
|
+
if (config.homepage === _chunkQCTHJR6Ejs.STORM_DEFAULT_HOMEPAGE) {
|
|
183
|
+
config.licensing = `${_chunkQCTHJR6Ejs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
184
184
|
} else {
|
|
185
185
|
config.licensing = `${config.homepage}/docs`;
|
|
186
186
|
}
|
|
@@ -350,36 +350,36 @@ var setConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (config)
|
|
|
350
350
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
351
351
|
}
|
|
352
352
|
if (config.configFile) {
|
|
353
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
353
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunkQCTHJR6Ejs.correctPaths.call(void 0, config.configFile);
|
|
354
354
|
}
|
|
355
355
|
if (config.workspaceRoot) {
|
|
356
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
357
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
358
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
356
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunkQCTHJR6Ejs.correctPaths.call(void 0, config.workspaceRoot);
|
|
357
|
+
process.env.NX_WORKSPACE_ROOT = _chunkQCTHJR6Ejs.correctPaths.call(void 0, config.workspaceRoot);
|
|
358
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunkQCTHJR6Ejs.correctPaths.call(void 0, config.workspaceRoot);
|
|
359
359
|
}
|
|
360
360
|
if (config.directories) {
|
|
361
361
|
if (!config.skipCache && config.directories.cache) {
|
|
362
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
362
|
+
process.env[`${prefix}CACHE_DIR`] = _chunkQCTHJR6Ejs.correctPaths.call(void 0, config.directories.cache);
|
|
363
363
|
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
364
364
|
}
|
|
365
365
|
if (config.directories.data) {
|
|
366
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
366
|
+
process.env[`${prefix}DATA_DIR`] = _chunkQCTHJR6Ejs.correctPaths.call(void 0, config.directories.data);
|
|
367
367
|
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
368
368
|
}
|
|
369
369
|
if (config.directories.config) {
|
|
370
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
370
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunkQCTHJR6Ejs.correctPaths.call(void 0, config.directories.config);
|
|
371
371
|
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
372
372
|
}
|
|
373
373
|
if (config.directories.temp) {
|
|
374
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
374
|
+
process.env[`${prefix}TEMP_DIR`] = _chunkQCTHJR6Ejs.correctPaths.call(void 0, config.directories.temp);
|
|
375
375
|
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
376
376
|
}
|
|
377
377
|
if (config.directories.log) {
|
|
378
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
378
|
+
process.env[`${prefix}LOG_DIR`] = _chunkQCTHJR6Ejs.correctPaths.call(void 0, config.directories.log);
|
|
379
379
|
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
380
380
|
}
|
|
381
381
|
if (config.directories.build) {
|
|
382
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
382
|
+
process.env[`${prefix}BUILD_DIR`] = _chunkQCTHJR6Ejs.correctPaths.call(void 0, config.directories.build);
|
|
383
383
|
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
384
384
|
}
|
|
385
385
|
}
|
|
@@ -434,8 +434,8 @@ var setConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, (config)
|
|
|
434
434
|
if (config.logLevel) {
|
|
435
435
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
436
436
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
437
|
-
process.env.NX_VERBOSE_LOGGING = String(
|
|
438
|
-
process.env.RUST_BACKTRACE =
|
|
437
|
+
process.env.NX_VERBOSE_LOGGING = String(_chunkQCTHJR6Ejs.getLogLevel.call(void 0, config.logLevel) >= _chunkQCTHJR6Ejs.LogLevel.DEBUG ? true : false);
|
|
438
|
+
process.env.RUST_BACKTRACE = _chunkQCTHJR6Ejs.getLogLevel.call(void 0, config.logLevel) >= _chunkQCTHJR6Ejs.LogLevel.DEBUG ? "full" : "none";
|
|
439
439
|
}
|
|
440
440
|
if (config.skipConfigLogging !== void 0) {
|
|
441
441
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(config.skipConfigLogging);
|
|
@@ -548,22 +548,27 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(vo
|
|
|
548
548
|
// ../config-tools/src/create-storm-config.ts
|
|
549
549
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
550
550
|
var _static_cache = void 0;
|
|
551
|
-
var createStormWorkspaceConfig = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
551
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
552
552
|
let result;
|
|
553
553
|
if (!_optionalChain([_static_cache, 'optionalAccess', _29 => _29.data]) || !_optionalChain([_static_cache, 'optionalAccess', _30 => _30.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
554
554
|
let _workspaceRoot = workspaceRoot;
|
|
555
555
|
if (!_workspaceRoot) {
|
|
556
|
-
_workspaceRoot =
|
|
556
|
+
_workspaceRoot = _chunkQCTHJR6Ejs.findWorkspaceRoot.call(void 0, );
|
|
557
557
|
}
|
|
558
558
|
const configEnv = getConfigEnv();
|
|
559
|
-
const defaultConfig = await _chunkBW3RW2LZjs.getDefaultConfig.call(void 0, _workspaceRoot);
|
|
560
559
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
561
|
-
if (!configFile
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
560
|
+
if (!configFile) {
|
|
561
|
+
if (!skipLogs) {
|
|
562
|
+
_chunkQCTHJR6Ejs.writeWarning.call(void 0, "No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
|
|
563
|
+
logLevel: "all"
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
if (useDefault === false) {
|
|
567
|
+
return void 0;
|
|
568
|
+
}
|
|
565
569
|
}
|
|
566
|
-
|
|
570
|
+
const defaultConfig = await _chunkQCTHJR6Ejs.getDefaultConfig.call(void 0, _workspaceRoot);
|
|
571
|
+
result = await _chunkQCTHJR6Ejs.stormWorkspaceConfigSchema.parseAsync(_defu2.default.call(void 0, configEnv, configFile, defaultConfig));
|
|
567
572
|
result.workspaceRoot ??= _workspaceRoot;
|
|
568
573
|
} else {
|
|
569
574
|
result = _static_cache.data;
|
|
@@ -595,11 +600,11 @@ var createConfigExtension = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0,
|
|
|
595
600
|
return extension;
|
|
596
601
|
}, "createConfigExtension");
|
|
597
602
|
var loadStormWorkspaceConfig = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (workspaceRoot, skipLogs = false) => {
|
|
598
|
-
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
603
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, true);
|
|
599
604
|
setConfigEnv(config);
|
|
600
605
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
601
|
-
|
|
602
|
-
${
|
|
606
|
+
_chunkQCTHJR6Ejs.writeTrace.call(void 0, `\u2699\uFE0F Using Storm Workspace configuration:
|
|
607
|
+
${_chunkQCTHJR6Ejs.formatLogMessage.call(void 0, config)}`, config);
|
|
603
608
|
}
|
|
604
609
|
return config;
|
|
605
610
|
}, "loadStormWorkspaceConfig");
|
|
@@ -618,7 +623,7 @@ var readNxConfig = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (w
|
|
|
618
623
|
const config = await getConfig();
|
|
619
624
|
rootDir = config.workspaceRoot;
|
|
620
625
|
}
|
|
621
|
-
const nxJsonPath =
|
|
626
|
+
const nxJsonPath = _chunkQCTHJR6Ejs.joinPaths.call(void 0, rootDir, "nx.json");
|
|
622
627
|
if (!_fs.existsSync.call(void 0, nxJsonPath)) {
|
|
623
628
|
throw new Error("Cannot find project.json configuration");
|
|
624
629
|
}
|
|
@@ -395,7 +395,7 @@ var stormWorkspaceConfigSchema = _zod2.default.object({
|
|
|
395
395
|
"staging",
|
|
396
396
|
"production"
|
|
397
397
|
]).default("production").describe("The current runtime environment mode for the package"),
|
|
398
|
-
workspaceRoot: _zod2.default.string().trim().
|
|
398
|
+
workspaceRoot: _zod2.default.string().trim().describe("The root directory of the workspace"),
|
|
399
399
|
externalPackagePatterns: _zod2.default.array(_zod2.default.string()).default([]).describe("The build will use these package patterns to determine if they should be external to the bundle"),
|
|
400
400
|
skipCache: _zod2.default.boolean().default(false).describe("Should all known types of workspace caching be skipped?"),
|
|
401
401
|
directories: WorkspaceDirectoryConfigSchema,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
stormWorkspaceConfigSchema,
|
|
15
15
|
writeTrace,
|
|
16
16
|
writeWarning
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-A6F6NNS6.mjs";
|
|
18
18
|
import {
|
|
19
19
|
__name
|
|
20
20
|
} from "./chunk-O6YSETKJ.mjs";
|
|
@@ -74,7 +74,7 @@ var getConfigFile = /* @__PURE__ */ __name(async (filePath, additionalFileNames
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
if (!config) {
|
|
77
|
+
if (!config || Object.keys(config).length === 0) {
|
|
78
78
|
return void 0;
|
|
79
79
|
}
|
|
80
80
|
config.configFile = configFile;
|
|
@@ -548,7 +548,7 @@ var setBaseThemeColorConfigEnv = /* @__PURE__ */ __name((prefix, config) => {
|
|
|
548
548
|
// ../config-tools/src/create-storm-config.ts
|
|
549
549
|
var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
550
550
|
var _static_cache = void 0;
|
|
551
|
-
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false) => {
|
|
551
|
+
var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, schema, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
552
552
|
let result;
|
|
553
553
|
if (!_static_cache?.data || !_static_cache?.timestamp || _static_cache.timestamp < Date.now() - 8e3) {
|
|
554
554
|
let _workspaceRoot = workspaceRoot;
|
|
@@ -556,13 +556,18 @@ var createStormWorkspaceConfig = /* @__PURE__ */ __name(async (extensionName, sc
|
|
|
556
556
|
_workspaceRoot = findWorkspaceRoot();
|
|
557
557
|
}
|
|
558
558
|
const configEnv = getConfigEnv();
|
|
559
|
-
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
560
559
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
561
|
-
if (!configFile
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
560
|
+
if (!configFile) {
|
|
561
|
+
if (!skipLogs) {
|
|
562
|
+
writeWarning("No Storm Workspace configuration file found in the current repository. Please ensure this is the expected behavior - you can add a `storm-workspace.json` file to the root of your workspace if it is not.\n", {
|
|
563
|
+
logLevel: "all"
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
if (useDefault === false) {
|
|
567
|
+
return void 0;
|
|
568
|
+
}
|
|
565
569
|
}
|
|
570
|
+
const defaultConfig = await getDefaultConfig(_workspaceRoot);
|
|
566
571
|
result = await stormWorkspaceConfigSchema.parseAsync(defu2(configEnv, configFile, defaultConfig));
|
|
567
572
|
result.workspaceRoot ??= _workspaceRoot;
|
|
568
573
|
} else {
|
|
@@ -595,7 +600,7 @@ var createConfigExtension = /* @__PURE__ */ __name((extensionName, schema) => {
|
|
|
595
600
|
return extension;
|
|
596
601
|
}, "createConfigExtension");
|
|
597
602
|
var loadStormWorkspaceConfig = /* @__PURE__ */ __name(async (workspaceRoot, skipLogs = false) => {
|
|
598
|
-
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs);
|
|
603
|
+
const config = await createStormWorkspaceConfig(void 0, void 0, workspaceRoot, skipLogs, true);
|
|
599
604
|
setConfigEnv(config);
|
|
600
605
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
601
606
|
writeTrace(`\u2699\uFE0F Using Storm Workspace configuration:
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkQCTHJR6Ejs = require('./chunk-QCTHJR6E.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
@@ -11,7 +11,7 @@ var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
|
11
11
|
// src/utilities/get-entry-points.ts
|
|
12
12
|
var _glob = require('glob');
|
|
13
13
|
var getEntryPoints = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
14
|
-
const workspaceRoot = config.workspaceRoot ||
|
|
14
|
+
const workspaceRoot = config.workspaceRoot || _chunkQCTHJR6Ejs.findWorkspaceRoot.call(void 0, );
|
|
15
15
|
const entryPoints = [];
|
|
16
16
|
if (entry) {
|
|
17
17
|
if (typeof entry === "string") {
|
|
@@ -23,7 +23,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
if (emitOnAll) {
|
|
26
|
-
entryPoints.push(
|
|
26
|
+
entryPoints.push(_chunkQCTHJR6Ejs.joinPaths.call(void 0, workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
27
27
|
}
|
|
28
28
|
const results = await Promise.all(entryPoints.map(async (entryPoint) => {
|
|
29
29
|
const paths = [];
|
|
@@ -35,9 +35,9 @@ var getEntryPoints = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async
|
|
|
35
35
|
]
|
|
36
36
|
});
|
|
37
37
|
paths.push(...files.reduce((ret, filePath) => {
|
|
38
|
-
const result =
|
|
38
|
+
const result = _chunkQCTHJR6Ejs.correctPaths.call(void 0, _chunkQCTHJR6Ejs.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkQCTHJR6Ejs.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunkQCTHJR6Ejs.correctPaths.call(void 0, projectRoot), ""));
|
|
39
39
|
if (result) {
|
|
40
|
-
|
|
40
|
+
_chunkQCTHJR6Ejs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkQCTHJR6Ejs.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
41
41
|
if (!paths.includes(result)) {
|
|
42
42
|
paths.push(result);
|
|
43
43
|
}
|
|
@@ -45,7 +45,7 @@ var getEntryPoints = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async
|
|
|
45
45
|
return ret;
|
|
46
46
|
}, []));
|
|
47
47
|
} else {
|
|
48
|
-
|
|
48
|
+
_chunkQCTHJR6Ejs.writeDebug.call(void 0, `Trying to add entry point ${entryPoint}"`, config);
|
|
49
49
|
if (!paths.includes(entryPoint)) {
|
|
50
50
|
paths.push(entryPoint);
|
|
51
51
|
}
|