@storm-software/unbuild 0.49.58 → 0.49.59
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 -2
- package/bin/unbuild.cjs +0 -1
- package/bin/unbuild.js +0 -1
- package/dist/build.cjs +7 -7
- package/dist/build.js +6 -6
- package/dist/{chunk-XYJZZ344.cjs → chunk-2RC3F2SN.cjs} +0 -1
- package/dist/{chunk-OFVF6S56.cjs → chunk-37HUZIZ5.cjs} +2 -2
- package/dist/{chunk-2JGN6MY2.js → chunk-3QBGMWVL.js} +1 -1
- package/dist/{chunk-OLZAJZH3.cjs → chunk-3UNJMX5X.cjs} +3 -3
- package/dist/{chunk-XOTBO2DH.js → chunk-CPOQ3QRP.js} +5 -5
- package/dist/{chunk-R4X5DZHY.cjs → chunk-ETV4W5W2.cjs} +105 -105
- package/dist/{chunk-DISUG5EB.js → chunk-KCEFJ3KA.js} +1 -1
- package/dist/{chunk-PODQ2EOY.cjs → chunk-QNJHN6NF.cjs} +3 -3
- package/dist/{chunk-FAV5IYU4.js → chunk-QX4UI7BX.js} +0 -1
- package/dist/{chunk-Y7I3BI57.js → chunk-SLMCYERU.js} +1 -1
- package/dist/{chunk-NND4A432.js → chunk-U2JTX5UH.js} +1 -1
- package/dist/{chunk-PVXLVUJO.cjs → chunk-WVBB4LDX.cjs} +2 -2
- package/dist/clean.cjs +3 -3
- package/dist/clean.js +2 -2
- package/dist/index.cjs +7 -7
- package/dist/index.js +6 -6
- package/dist/plugins/analyze.cjs +3 -3
- package/dist/plugins/analyze.js +2 -2
- package/dist/plugins/on-error.cjs +3 -3
- package/dist/plugins/on-error.js +2 -2
- package/dist/plugins/tsc.cjs +3 -3
- package/dist/plugins/tsc.js +2 -2
- package/package.json +5 -5
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 -->
|
|
@@ -40,7 +40,6 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
40
40
|
|
|
41
41
|
<!-- START doctoc -->
|
|
42
42
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
43
|
-
|
|
44
43
|
## Table of Contents
|
|
45
44
|
|
|
46
45
|
- [Storm Unbuild Package](#storm-unbuild-package)
|
package/bin/unbuild.cjs
CHANGED
|
@@ -470,7 +470,6 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
|
470
470
|
|
|
471
471
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
472
472
|
var rootFiles = [
|
|
473
|
-
"storm-workspace.json",
|
|
474
473
|
"storm-workspace.json",
|
|
475
474
|
"storm-workspace.yaml",
|
|
476
475
|
"storm-workspace.yml",
|
package/bin/unbuild.js
CHANGED
|
@@ -448,7 +448,6 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
|
448
448
|
|
|
449
449
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
450
450
|
var rootFiles = [
|
|
451
|
-
"storm-workspace.json",
|
|
452
451
|
"storm-workspace.json",
|
|
453
452
|
"storm-workspace.yaml",
|
|
454
453
|
"storm-workspace.yml",
|
package/dist/build.cjs
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
require('./chunk-
|
|
10
|
-
require('./chunk-
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
13
|
-
require('./chunk-
|
|
8
|
+
var _chunkETV4W5W2cjs = require('./chunk-ETV4W5W2.cjs');
|
|
9
|
+
require('./chunk-QNJHN6NF.cjs');
|
|
10
|
+
require('./chunk-37HUZIZ5.cjs');
|
|
11
|
+
require('./chunk-3UNJMX5X.cjs');
|
|
12
|
+
require('./chunk-WVBB4LDX.cjs');
|
|
13
|
+
require('./chunk-2RC3F2SN.cjs');
|
|
14
14
|
require('./chunk-OBGZSXTJ.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
@@ -19,4 +19,4 @@ require('./chunk-OBGZSXTJ.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
exports.build =
|
|
22
|
+
exports.build = _chunkETV4W5W2cjs.build; exports.cleanOutputPath = _chunkETV4W5W2cjs.cleanOutputPath; exports.copyBuildAssets = _chunkETV4W5W2cjs.copyBuildAssets; exports.executeUnbuild = _chunkETV4W5W2cjs.executeUnbuild; exports.generatePackageJson = _chunkETV4W5W2cjs.generatePackageJson; exports.resolveOptions = _chunkETV4W5W2cjs.resolveOptions;
|
package/dist/build.js
CHANGED
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
executeUnbuild,
|
|
6
6
|
generatePackageJson,
|
|
7
7
|
resolveOptions
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-CPOQ3QRP.js";
|
|
9
|
+
import "./chunk-KCEFJ3KA.js";
|
|
10
|
+
import "./chunk-SLMCYERU.js";
|
|
11
|
+
import "./chunk-U2JTX5UH.js";
|
|
12
|
+
import "./chunk-3QBGMWVL.js";
|
|
13
|
+
import "./chunk-QX4UI7BX.js";
|
|
14
14
|
import "./chunk-3RG5ZIWI.js";
|
|
15
15
|
export {
|
|
16
16
|
build,
|
|
@@ -492,7 +492,6 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
|
492
492
|
|
|
493
493
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
494
494
|
var rootFiles = [
|
|
495
|
-
"storm-workspace.json",
|
|
496
495
|
"storm-workspace.json",
|
|
497
496
|
"storm-workspace.yaml",
|
|
498
497
|
"storm-workspace.yml",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk2RC3F2SNcjs = require('./chunk-2RC3F2SN.cjs');
|
|
4
4
|
|
|
5
5
|
// src/plugins/analyze.ts
|
|
6
6
|
var formatBytes = (bytes) => {
|
|
@@ -17,7 +17,7 @@ var analyzePlugin = (options) => {
|
|
|
17
17
|
renderChunk(source, chunk) {
|
|
18
18
|
const sourceBytes = formatBytes(source.length);
|
|
19
19
|
const fileName = chunk.fileName;
|
|
20
|
-
|
|
20
|
+
_chunk2RC3F2SNcjs.writeInfo.call(void 0, ` - ${fileName} ${sourceBytes}`, options.config);
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk2RC3F2SNcjs = require('./chunk-2RC3F2SN.cjs');
|
|
4
4
|
|
|
5
5
|
// src/plugins/on-error.ts
|
|
6
6
|
var onErrorPlugin = (options) => ({
|
|
7
7
|
name: "storm:on-error",
|
|
8
8
|
buildEnd(error) {
|
|
9
9
|
if (error) {
|
|
10
|
-
|
|
10
|
+
_chunk2RC3F2SNcjs.writeError.call(void 0,
|
|
11
11
|
`The following errors occurred during the build:
|
|
12
12
|
${error ? error.message : "Unknown build error"}
|
|
13
13
|
|
|
@@ -18,7 +18,7 @@ ${error ? error.message : "Unknown build error"}
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
renderError(error) {
|
|
21
|
-
|
|
21
|
+
_chunk2RC3F2SNcjs.writeError.call(void 0,
|
|
22
22
|
`The following errors occurred during the build:
|
|
23
23
|
${error ? error.message : "Unknown build error"}
|
|
24
24
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cleanDirectories
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KCEFJ3KA.js";
|
|
4
4
|
import {
|
|
5
5
|
analyzePlugin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SLMCYERU.js";
|
|
7
7
|
import {
|
|
8
8
|
onErrorPlugin
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-U2JTX5UH.js";
|
|
10
10
|
import {
|
|
11
11
|
loadConfig,
|
|
12
12
|
tscPlugin
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3QBGMWVL.js";
|
|
14
14
|
import {
|
|
15
15
|
COLOR_KEYS,
|
|
16
16
|
LogLevel,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
writeSuccess,
|
|
35
35
|
writeTrace,
|
|
36
36
|
writeWarning
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-QX4UI7BX.js";
|
|
38
38
|
|
|
39
39
|
// src/build.ts
|
|
40
40
|
import {
|
|
@@ -1,16 +1,16 @@
|
|
|
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 _chunkQNJHN6NFcjs = require('./chunk-QNJHN6NF.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk37HUZIZ5cjs = require('./chunk-37HUZIZ5.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk3UNJMX5Xcjs = require('./chunk-3UNJMX5X.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkWVBB4LDXcjs = require('./chunk-WVBB4LDX.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -34,7 +34,7 @@ var _chunkPVXLVUJOcjs = require('./chunk-PVXLVUJO.cjs');
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunk2RC3F2SNcjs = require('./chunk-2RC3F2SN.cjs');
|
|
38
38
|
|
|
39
39
|
// src/build.ts
|
|
40
40
|
|
|
@@ -88,9 +88,9 @@ var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, gen
|
|
|
88
88
|
output: "src/"
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
_chunk2RC3F2SNcjs.writeTrace.call(void 0,
|
|
92
92
|
`\u{1F4DD} Copying the following assets to the output directory:
|
|
93
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${
|
|
93
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunk2RC3F2SNcjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
94
94
|
config
|
|
95
95
|
);
|
|
96
96
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
@@ -100,20 +100,20 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
100
100
|
assets: pendingAssets
|
|
101
101
|
});
|
|
102
102
|
await assetHandler.processAllAssetsOnce();
|
|
103
|
-
|
|
103
|
+
_chunk2RC3F2SNcjs.writeTrace.call(void 0, "Completed copying assets to the output directory", config);
|
|
104
104
|
if (includeSrc === true) {
|
|
105
|
-
|
|
106
|
-
`\u{1F4DD} Adding banner and writing source files: ${
|
|
105
|
+
_chunk2RC3F2SNcjs.writeDebug.call(void 0,
|
|
106
|
+
`\u{1F4DD} Adding banner and writing source files: ${_chunk2RC3F2SNcjs.joinPaths.call(void 0,
|
|
107
107
|
outputPath,
|
|
108
108
|
"src"
|
|
109
109
|
)}`,
|
|
110
110
|
config
|
|
111
111
|
);
|
|
112
112
|
const files = await _glob.glob.call(void 0, [
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
_chunk2RC3F2SNcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
114
|
+
_chunk2RC3F2SNcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
115
|
+
_chunk2RC3F2SNcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
116
|
+
_chunk2RC3F2SNcjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
117
117
|
]);
|
|
118
118
|
await Promise.allSettled(
|
|
119
119
|
files.map(
|
|
@@ -168,7 +168,7 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
168
168
|
)) {
|
|
169
169
|
const projectNode = project.node;
|
|
170
170
|
if (projectNode.data.root) {
|
|
171
|
-
const projectPackageJsonPath =
|
|
171
|
+
const projectPackageJsonPath = _chunk2RC3F2SNcjs.joinPaths.call(void 0,
|
|
172
172
|
workspaceRoot,
|
|
173
173
|
projectNode.data.root,
|
|
174
174
|
"package.json"
|
|
@@ -186,11 +186,11 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
if (localPackages.length > 0) {
|
|
189
|
-
|
|
189
|
+
_chunk2RC3F2SNcjs.writeTrace.call(void 0,
|
|
190
190
|
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
191
191
|
);
|
|
192
192
|
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
193
|
-
|
|
193
|
+
_chunk2RC3F2SNcjs.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
194
194
|
"utf8"
|
|
195
195
|
);
|
|
196
196
|
const projectJson = JSON.parse(projectJsonFile);
|
|
@@ -203,7 +203,7 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
203
203
|
}
|
|
204
204
|
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) => {
|
|
205
205
|
if (_optionalChain([projectConfigurations, 'access', _14 => _14.projects, 'optionalAccess', _15 => _15[dep]])) {
|
|
206
|
-
const depPackageJsonPath =
|
|
206
|
+
const depPackageJsonPath = _chunk2RC3F2SNcjs.joinPaths.call(void 0,
|
|
207
207
|
workspaceRoot,
|
|
208
208
|
projectConfigurations.projects[dep].root,
|
|
209
209
|
"package.json"
|
|
@@ -234,14 +234,14 @@ var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, pac
|
|
|
234
234
|
return ret;
|
|
235
235
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
236
236
|
} else {
|
|
237
|
-
|
|
237
|
+
_chunk2RC3F2SNcjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
238
238
|
}
|
|
239
239
|
return packageJson;
|
|
240
240
|
};
|
|
241
241
|
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
242
|
-
const workspaceRoot = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot :
|
|
242
|
+
const workspaceRoot = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunk2RC3F2SNcjs.findWorkspaceRoot.call(void 0, );
|
|
243
243
|
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
244
|
-
|
|
244
|
+
_chunk2RC3F2SNcjs.joinPaths.call(void 0, workspaceRoot, "package.json"),
|
|
245
245
|
"utf8"
|
|
246
246
|
);
|
|
247
247
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
@@ -252,7 +252,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
252
252
|
if (distSrc.startsWith("/")) {
|
|
253
253
|
distSrc = distSrc.substring(1);
|
|
254
254
|
}
|
|
255
|
-
packageJson.source ??= `${
|
|
255
|
+
packageJson.source ??= `${_chunk2RC3F2SNcjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
256
256
|
}
|
|
257
257
|
packageJson.files ??= ["dist/**/*"];
|
|
258
258
|
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
@@ -277,7 +277,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
277
277
|
packageJson.contributors = [packageJson.author];
|
|
278
278
|
}
|
|
279
279
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
280
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
280
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunk2RC3F2SNcjs.joinPaths.call(void 0, "packages", projectName);
|
|
281
281
|
return packageJson;
|
|
282
282
|
};
|
|
283
283
|
|
|
@@ -285,7 +285,7 @@ var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceR
|
|
|
285
285
|
var _c12 = require('c12');
|
|
286
286
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
287
287
|
var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
288
|
-
const workspacePath = filePath ||
|
|
288
|
+
const workspacePath = filePath || _chunk2RC3F2SNcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
289
289
|
const configs = await Promise.all([
|
|
290
290
|
_c12.loadConfig.call(void 0, {
|
|
291
291
|
cwd: workspacePath,
|
|
@@ -294,7 +294,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
294
294
|
envName: _optionalChain([fileName, 'optionalAccess', _24 => _24.toUpperCase, 'call', _25 => _25()]),
|
|
295
295
|
jitiOptions: {
|
|
296
296
|
debug: false,
|
|
297
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
297
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk2RC3F2SNcjs.joinPaths.call(void 0,
|
|
298
298
|
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
299
299
|
"jiti"
|
|
300
300
|
)
|
|
@@ -308,7 +308,7 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
308
308
|
envName: _optionalChain([fileName, 'optionalAccess', _26 => _26.toUpperCase, 'call', _27 => _27()]),
|
|
309
309
|
jitiOptions: {
|
|
310
310
|
debug: false,
|
|
311
|
-
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false :
|
|
311
|
+
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : _chunk2RC3F2SNcjs.joinPaths.call(void 0,
|
|
312
312
|
process.env.STORM_CACHE_DIR || "node_modules/.cache/storm",
|
|
313
313
|
"jiti"
|
|
314
314
|
)
|
|
@@ -320,12 +320,12 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
|
|
|
320
320
|
return _defu2.default.call(void 0, _nullishCoalesce(configs[0], () => ( {})), _nullishCoalesce(configs[1], () => ( {})));
|
|
321
321
|
};
|
|
322
322
|
var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
323
|
-
const workspacePath = filePath ? filePath :
|
|
323
|
+
const workspacePath = filePath ? filePath : _chunk2RC3F2SNcjs.findWorkspaceRoot.call(void 0, filePath);
|
|
324
324
|
const result = await getConfigFileByName("storm-workspace", workspacePath);
|
|
325
325
|
let config = result.config;
|
|
326
326
|
const configFile = result.configFile;
|
|
327
327
|
if (config && configFile && Object.keys(config).length > 0 && !config.skipConfigLogging) {
|
|
328
|
-
|
|
328
|
+
_chunk2RC3F2SNcjs.writeTrace.call(void 0,
|
|
329
329
|
`Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
|
|
330
330
|
{
|
|
331
331
|
logLevel: "all"
|
|
@@ -341,7 +341,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
|
|
|
341
341
|
for (const result2 of results) {
|
|
342
342
|
if (_optionalChain([result2, 'optionalAccess', _28 => _28.config]) && _optionalChain([result2, 'optionalAccess', _29 => _29.configFile]) && Object.keys(result2.config).length > 0) {
|
|
343
343
|
if (!config.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
344
|
-
|
|
344
|
+
_chunk2RC3F2SNcjs.writeTrace.call(void 0,
|
|
345
345
|
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
346
346
|
{
|
|
347
347
|
logLevel: "all"
|
|
@@ -420,15 +420,15 @@ var getConfigEnv = () => {
|
|
|
420
420
|
support: process.env[`${prefix}SUPPORT`] || void 0,
|
|
421
421
|
timezone: process.env[`${prefix}TIMEZONE`] || process.env.TZ || void 0,
|
|
422
422
|
locale: process.env[`${prefix}LOCALE`] || process.env.LOCALE || void 0,
|
|
423
|
-
configFile: process.env[`${prefix}CONFIG_FILE`] ?
|
|
424
|
-
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ?
|
|
423
|
+
configFile: process.env[`${prefix}CONFIG_FILE`] ? _chunk2RC3F2SNcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_FILE`]) : void 0,
|
|
424
|
+
workspaceRoot: process.env[`${prefix}WORKSPACE_ROOT`] ? _chunk2RC3F2SNcjs.correctPaths.call(void 0, process.env[`${prefix}WORKSPACE_ROOT`]) : void 0,
|
|
425
425
|
directories: {
|
|
426
|
-
cache: process.env[`${prefix}CACHE_DIR`] ?
|
|
427
|
-
data: process.env[`${prefix}DATA_DIR`] ?
|
|
428
|
-
config: process.env[`${prefix}CONFIG_DIR`] ?
|
|
429
|
-
temp: process.env[`${prefix}TEMP_DIR`] ?
|
|
430
|
-
log: process.env[`${prefix}LOG_DIR`] ?
|
|
431
|
-
build: process.env[`${prefix}BUILD_DIR`] ?
|
|
426
|
+
cache: process.env[`${prefix}CACHE_DIR`] ? _chunk2RC3F2SNcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIR`]) : process.env[`${prefix}CACHE_DIRECTORY`] ? _chunk2RC3F2SNcjs.correctPaths.call(void 0, process.env[`${prefix}CACHE_DIRECTORY`]) : void 0,
|
|
427
|
+
data: process.env[`${prefix}DATA_DIR`] ? _chunk2RC3F2SNcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIR`]) : process.env[`${prefix}DATA_DIRECTORY`] ? _chunk2RC3F2SNcjs.correctPaths.call(void 0, process.env[`${prefix}DATA_DIRECTORY`]) : void 0,
|
|
428
|
+
config: process.env[`${prefix}CONFIG_DIR`] ? _chunk2RC3F2SNcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIR`]) : process.env[`${prefix}CONFIG_DIRECTORY`] ? _chunk2RC3F2SNcjs.correctPaths.call(void 0, process.env[`${prefix}CONFIG_DIRECTORY`]) : void 0,
|
|
429
|
+
temp: process.env[`${prefix}TEMP_DIR`] ? _chunk2RC3F2SNcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIR`]) : process.env[`${prefix}TEMP_DIRECTORY`] ? _chunk2RC3F2SNcjs.correctPaths.call(void 0, process.env[`${prefix}TEMP_DIRECTORY`]) : void 0,
|
|
430
|
+
log: process.env[`${prefix}LOG_DIR`] ? _chunk2RC3F2SNcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIR`]) : process.env[`${prefix}LOG_DIRECTORY`] ? _chunk2RC3F2SNcjs.correctPaths.call(void 0, process.env[`${prefix}LOG_DIRECTORY`]) : void 0,
|
|
431
|
+
build: process.env[`${prefix}BUILD_DIR`] ? _chunk2RC3F2SNcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIR`]) : process.env[`${prefix}BUILD_DIRECTORY`] ? _chunk2RC3F2SNcjs.correctPaths.call(void 0, process.env[`${prefix}BUILD_DIRECTORY`]) : void 0
|
|
432
432
|
},
|
|
433
433
|
skipCache: process.env[`${prefix}SKIP_CACHE`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CACHE`]) : void 0,
|
|
434
434
|
mode: (_nullishCoalesce(_nullishCoalesce(process.env[`${prefix}MODE`], () => ( process.env.NODE_ENV)), () => ( process.env.ENVIRONMENT))) || void 0,
|
|
@@ -452,13 +452,13 @@ var getConfigEnv = () => {
|
|
|
452
452
|
},
|
|
453
453
|
logLevel: process.env[`${prefix}LOG_LEVEL`] !== null && process.env[`${prefix}LOG_LEVEL`] !== void 0 ? process.env[`${prefix}LOG_LEVEL`] && Number.isSafeInteger(
|
|
454
454
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
455
|
-
) ?
|
|
455
|
+
) ? _chunk2RC3F2SNcjs.getLogLevelLabel.call(void 0,
|
|
456
456
|
Number.parseInt(process.env[`${prefix}LOG_LEVEL`])
|
|
457
457
|
) : process.env[`${prefix}LOG_LEVEL`] : void 0,
|
|
458
458
|
skipConfigLogging: process.env[`${prefix}SKIP_CONFIG_LOGGING`] !== void 0 ? Boolean(process.env[`${prefix}SKIP_CONFIG_LOGGING`]) : void 0
|
|
459
459
|
};
|
|
460
460
|
const themeNames = Object.keys(process.env).filter(
|
|
461
|
-
(envKey) => envKey.startsWith(`${prefix}COLOR_`) &&
|
|
461
|
+
(envKey) => envKey.startsWith(`${prefix}COLOR_`) && _chunk2RC3F2SNcjs.COLOR_KEYS.every(
|
|
462
462
|
(colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
|
|
463
463
|
)
|
|
464
464
|
);
|
|
@@ -469,16 +469,16 @@ var getConfigEnv = () => {
|
|
|
469
469
|
},
|
|
470
470
|
{}
|
|
471
471
|
) : getThemeColorConfigEnv(prefix);
|
|
472
|
-
if (config.docs ===
|
|
473
|
-
if (config.homepage ===
|
|
474
|
-
config.docs = `${
|
|
472
|
+
if (config.docs === _chunk2RC3F2SNcjs.STORM_DEFAULT_DOCS) {
|
|
473
|
+
if (config.homepage === _chunk2RC3F2SNcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
474
|
+
config.docs = `${_chunk2RC3F2SNcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/docs`;
|
|
475
475
|
} else {
|
|
476
476
|
config.docs = `${config.homepage}/docs`;
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
if (config.licensing ===
|
|
480
|
-
if (config.homepage ===
|
|
481
|
-
config.licensing = `${
|
|
479
|
+
if (config.licensing === _chunk2RC3F2SNcjs.STORM_DEFAULT_LICENSING) {
|
|
480
|
+
if (config.homepage === _chunk2RC3F2SNcjs.STORM_DEFAULT_HOMEPAGE) {
|
|
481
|
+
config.licensing = `${_chunk2RC3F2SNcjs.STORM_DEFAULT_HOMEPAGE}/projects/${config.name}/licensing`;
|
|
482
482
|
} else {
|
|
483
483
|
config.licensing = `${config.homepage}/docs`;
|
|
484
484
|
}
|
|
@@ -679,40 +679,40 @@ var setConfigEnv = (config) => {
|
|
|
679
679
|
process.env.LANG = config.locale ? `${config.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
|
|
680
680
|
}
|
|
681
681
|
if (config.configFile) {
|
|
682
|
-
process.env[`${prefix}CONFIG_FILE`] =
|
|
682
|
+
process.env[`${prefix}CONFIG_FILE`] = _chunk2RC3F2SNcjs.correctPaths.call(void 0, config.configFile);
|
|
683
683
|
}
|
|
684
684
|
if (config.workspaceRoot) {
|
|
685
|
-
process.env[`${prefix}WORKSPACE_ROOT`] =
|
|
686
|
-
process.env.NX_WORKSPACE_ROOT =
|
|
687
|
-
process.env.NX_WORKSPACE_ROOT_PATH =
|
|
685
|
+
process.env[`${prefix}WORKSPACE_ROOT`] = _chunk2RC3F2SNcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
686
|
+
process.env.NX_WORKSPACE_ROOT = _chunk2RC3F2SNcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
687
|
+
process.env.NX_WORKSPACE_ROOT_PATH = _chunk2RC3F2SNcjs.correctPaths.call(void 0, config.workspaceRoot);
|
|
688
688
|
}
|
|
689
689
|
if (config.directories) {
|
|
690
690
|
if (!config.skipCache && config.directories.cache) {
|
|
691
|
-
process.env[`${prefix}CACHE_DIR`] =
|
|
691
|
+
process.env[`${prefix}CACHE_DIR`] = _chunk2RC3F2SNcjs.correctPaths.call(void 0,
|
|
692
692
|
config.directories.cache
|
|
693
693
|
);
|
|
694
694
|
process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
|
|
695
695
|
}
|
|
696
696
|
if (config.directories.data) {
|
|
697
|
-
process.env[`${prefix}DATA_DIR`] =
|
|
697
|
+
process.env[`${prefix}DATA_DIR`] = _chunk2RC3F2SNcjs.correctPaths.call(void 0, config.directories.data);
|
|
698
698
|
process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
|
|
699
699
|
}
|
|
700
700
|
if (config.directories.config) {
|
|
701
|
-
process.env[`${prefix}CONFIG_DIR`] =
|
|
701
|
+
process.env[`${prefix}CONFIG_DIR`] = _chunk2RC3F2SNcjs.correctPaths.call(void 0,
|
|
702
702
|
config.directories.config
|
|
703
703
|
);
|
|
704
704
|
process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
|
|
705
705
|
}
|
|
706
706
|
if (config.directories.temp) {
|
|
707
|
-
process.env[`${prefix}TEMP_DIR`] =
|
|
707
|
+
process.env[`${prefix}TEMP_DIR`] = _chunk2RC3F2SNcjs.correctPaths.call(void 0, config.directories.temp);
|
|
708
708
|
process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
|
|
709
709
|
}
|
|
710
710
|
if (config.directories.log) {
|
|
711
|
-
process.env[`${prefix}LOG_DIR`] =
|
|
711
|
+
process.env[`${prefix}LOG_DIR`] = _chunk2RC3F2SNcjs.correctPaths.call(void 0, config.directories.log);
|
|
712
712
|
process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
|
|
713
713
|
}
|
|
714
714
|
if (config.directories.build) {
|
|
715
|
-
process.env[`${prefix}BUILD_DIR`] =
|
|
715
|
+
process.env[`${prefix}BUILD_DIR`] = _chunk2RC3F2SNcjs.correctPaths.call(void 0,
|
|
716
716
|
config.directories.build
|
|
717
717
|
);
|
|
718
718
|
process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
|
|
@@ -774,9 +774,9 @@ var setConfigEnv = (config) => {
|
|
|
774
774
|
process.env[`${prefix}LOG_LEVEL`] = String(config.logLevel);
|
|
775
775
|
process.env.LOG_LEVEL = String(config.logLevel);
|
|
776
776
|
process.env.NX_VERBOSE_LOGGING = String(
|
|
777
|
-
|
|
777
|
+
_chunk2RC3F2SNcjs.getLogLevel.call(void 0, config.logLevel) >= _chunk2RC3F2SNcjs.LogLevel.DEBUG ? true : false
|
|
778
778
|
);
|
|
779
|
-
process.env.RUST_BACKTRACE =
|
|
779
|
+
process.env.RUST_BACKTRACE = _chunk2RC3F2SNcjs.getLogLevel.call(void 0, config.logLevel) >= _chunk2RC3F2SNcjs.LogLevel.DEBUG ? "full" : "none";
|
|
780
780
|
}
|
|
781
781
|
if (config.skipConfigLogging !== void 0) {
|
|
782
782
|
process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
|
|
@@ -896,13 +896,13 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
896
896
|
if (!_optionalChain([_static_cache, 'optionalAccess', _52 => _52.data]) || !_optionalChain([_static_cache, 'optionalAccess', _53 => _53.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
897
897
|
let _workspaceRoot = workspaceRoot;
|
|
898
898
|
if (!_workspaceRoot) {
|
|
899
|
-
_workspaceRoot =
|
|
899
|
+
_workspaceRoot = _chunk2RC3F2SNcjs.findWorkspaceRoot.call(void 0, );
|
|
900
900
|
}
|
|
901
901
|
const configEnv = getConfigEnv();
|
|
902
902
|
const configFile = await getConfigFile(_workspaceRoot);
|
|
903
903
|
if (!configFile) {
|
|
904
904
|
if (!skipLogs) {
|
|
905
|
-
|
|
905
|
+
_chunk2RC3F2SNcjs.writeWarning.call(void 0,
|
|
906
906
|
"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",
|
|
907
907
|
{ logLevel: "all" }
|
|
908
908
|
);
|
|
@@ -911,22 +911,22 @@ var createStormWorkspaceConfig = async (extensionName, schema, workspaceRoot, sk
|
|
|
911
911
|
return void 0;
|
|
912
912
|
}
|
|
913
913
|
}
|
|
914
|
-
const defaultConfig = await
|
|
914
|
+
const defaultConfig = await _chunk2RC3F2SNcjs.getPackageJsonConfig.call(void 0, _workspaceRoot);
|
|
915
915
|
const configInput = _defu2.default.call(void 0,
|
|
916
916
|
configEnv,
|
|
917
917
|
configFile,
|
|
918
918
|
defaultConfig
|
|
919
919
|
);
|
|
920
920
|
try {
|
|
921
|
-
result =
|
|
922
|
-
await
|
|
921
|
+
result = _chunk2RC3F2SNcjs.applyDefaultConfig.call(void 0,
|
|
922
|
+
await _chunk2RC3F2SNcjs.stormWorkspaceConfigSchema.parseAsync(configInput)
|
|
923
923
|
);
|
|
924
924
|
result.workspaceRoot ??= _workspaceRoot;
|
|
925
925
|
} catch (error) {
|
|
926
926
|
throw new Error(
|
|
927
927
|
`Failed to parse Storm Workspace configuration${_optionalChain([error, 'optionalAccess', _54 => _54.message]) ? `: ${error.message}` : ""}
|
|
928
928
|
|
|
929
|
-
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${
|
|
929
|
+
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${_chunk2RC3F2SNcjs.formatLogMessage.call(void 0,
|
|
930
930
|
configInput
|
|
931
931
|
)}`,
|
|
932
932
|
{
|
|
@@ -971,9 +971,9 @@ var loadStormWorkspaceConfig = async (workspaceRoot, skipLogs = false) => {
|
|
|
971
971
|
);
|
|
972
972
|
setConfigEnv(config);
|
|
973
973
|
if (!skipLogs && !config.skipConfigLogging) {
|
|
974
|
-
|
|
974
|
+
_chunk2RC3F2SNcjs.writeTrace.call(void 0,
|
|
975
975
|
`\u2699\uFE0F Using Storm Workspace configuration:
|
|
976
|
-
${
|
|
976
|
+
${_chunk2RC3F2SNcjs.formatLogMessage.call(void 0, config)}`,
|
|
977
977
|
config
|
|
978
978
|
);
|
|
979
979
|
}
|
|
@@ -1009,15 +1009,15 @@ var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
|
|
|
1009
1009
|
|
|
1010
1010
|
var _unbuild = require('unbuild');
|
|
1011
1011
|
async function resolveOptions(options, config) {
|
|
1012
|
-
|
|
1013
|
-
const stopwatch =
|
|
1012
|
+
_chunk2RC3F2SNcjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", config);
|
|
1013
|
+
const stopwatch = _chunk2RC3F2SNcjs.getStopwatch.call(void 0, "Build options resolution");
|
|
1014
1014
|
if (options.configPath) {
|
|
1015
|
-
const configFile = await
|
|
1015
|
+
const configFile = await _chunkWVBB4LDXcjs.loadConfig.call(void 0, options.configPath);
|
|
1016
1016
|
if (configFile) {
|
|
1017
1017
|
options = _defu2.default.call(void 0, options, configFile);
|
|
1018
1018
|
}
|
|
1019
1019
|
}
|
|
1020
|
-
const outputPath = options.outputPath ||
|
|
1020
|
+
const outputPath = options.outputPath || _chunk2RC3F2SNcjs.joinPaths.call(void 0, "dist", options.projectRoot);
|
|
1021
1021
|
let projectGraph;
|
|
1022
1022
|
try {
|
|
1023
1023
|
projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
@@ -1030,7 +1030,7 @@ async function resolveOptions(options, config) {
|
|
|
1030
1030
|
"The build process failed because the project graph is not available. Please run the build command again."
|
|
1031
1031
|
);
|
|
1032
1032
|
}
|
|
1033
|
-
const projectJsonPath =
|
|
1033
|
+
const projectJsonPath = _chunk2RC3F2SNcjs.joinPaths.call(void 0,
|
|
1034
1034
|
config.workspaceRoot,
|
|
1035
1035
|
options.projectRoot,
|
|
1036
1036
|
"project.json"
|
|
@@ -1041,7 +1041,7 @@ async function resolveOptions(options, config) {
|
|
|
1041
1041
|
const projectJsonContent = await _promises.readFile.call(void 0, projectJsonPath, "utf8");
|
|
1042
1042
|
const projectJson = JSON.parse(projectJsonContent);
|
|
1043
1043
|
const projectName = projectJson.name;
|
|
1044
|
-
const packageJsonPath =
|
|
1044
|
+
const packageJsonPath = _chunk2RC3F2SNcjs.joinPaths.call(void 0,
|
|
1045
1045
|
config.workspaceRoot,
|
|
1046
1046
|
options.projectRoot,
|
|
1047
1047
|
"package.json"
|
|
@@ -1053,17 +1053,17 @@ async function resolveOptions(options, config) {
|
|
|
1053
1053
|
const packageJson = JSON.parse(packageJsonContent);
|
|
1054
1054
|
let tsconfig = options.tsconfig;
|
|
1055
1055
|
if (!tsconfig) {
|
|
1056
|
-
tsconfig =
|
|
1056
|
+
tsconfig = _chunk2RC3F2SNcjs.joinPaths.call(void 0, options.projectRoot, "tsconfig.json");
|
|
1057
1057
|
}
|
|
1058
1058
|
if (!tsconfig.startsWith(config.workspaceRoot)) {
|
|
1059
|
-
tsconfig =
|
|
1059
|
+
tsconfig = _chunk2RC3F2SNcjs.joinPaths.call(void 0, config.workspaceRoot, tsconfig);
|
|
1060
1060
|
}
|
|
1061
1061
|
if (!_fs.existsSync.call(void 0, tsconfig)) {
|
|
1062
1062
|
throw new Error("Cannot find tsconfig.json configuration");
|
|
1063
1063
|
}
|
|
1064
1064
|
let sourceRoot = projectJson.sourceRoot;
|
|
1065
1065
|
if (!sourceRoot) {
|
|
1066
|
-
sourceRoot =
|
|
1066
|
+
sourceRoot = _chunk2RC3F2SNcjs.joinPaths.call(void 0, options.projectRoot, "src");
|
|
1067
1067
|
}
|
|
1068
1068
|
if (!_fs.existsSync.call(void 0, sourceRoot)) {
|
|
1069
1069
|
throw new Error("Cannot find sourceRoot directory");
|
|
@@ -1112,9 +1112,9 @@ async function resolveOptions(options, config) {
|
|
|
1112
1112
|
while (entryPath.startsWith("/")) {
|
|
1113
1113
|
entryPath = entryPath.substring(1);
|
|
1114
1114
|
}
|
|
1115
|
-
const outDir =
|
|
1115
|
+
const outDir = _chunk2RC3F2SNcjs.joinPaths.call(void 0,
|
|
1116
1116
|
_path.relative.call(void 0,
|
|
1117
|
-
|
|
1117
|
+
_chunk2RC3F2SNcjs.joinPaths.call(void 0, config.workspaceRoot, options.projectRoot),
|
|
1118
1118
|
config.workspaceRoot
|
|
1119
1119
|
),
|
|
1120
1120
|
outputPath,
|
|
@@ -1193,7 +1193,7 @@ async function resolveOptions(options, config) {
|
|
|
1193
1193
|
treeShaking: options.treeShaking !== false,
|
|
1194
1194
|
platform: options.platform || "neutral",
|
|
1195
1195
|
color: true,
|
|
1196
|
-
logLevel: config.logLevel ===
|
|
1196
|
+
logLevel: config.logLevel === _chunk2RC3F2SNcjs.LogLevelLabel.FATAL ? _chunk2RC3F2SNcjs.LogLevelLabel.ERROR : _chunk2RC3F2SNcjs.isVerbose.call(void 0, ) ? "verbose" : config.logLevel
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
1199
1199
|
};
|
|
@@ -1214,7 +1214,7 @@ async function resolveOptions(options, config) {
|
|
|
1214
1214
|
if (options.rollup) {
|
|
1215
1215
|
let rollup = {};
|
|
1216
1216
|
if (typeof options.rollup === "string") {
|
|
1217
|
-
const rollupFile = await
|
|
1217
|
+
const rollupFile = await _chunkWVBB4LDXcjs.loadConfig.call(void 0, options.rollup);
|
|
1218
1218
|
if (rollupFile) {
|
|
1219
1219
|
rollup = rollupFile;
|
|
1220
1220
|
}
|
|
@@ -1226,20 +1226,20 @@ async function resolveOptions(options, config) {
|
|
|
1226
1226
|
resolvedOptions.hooks = {
|
|
1227
1227
|
"rollup:options": async (ctx, opts) => {
|
|
1228
1228
|
if (options.plugins && options.plugins.length > 0) {
|
|
1229
|
-
|
|
1229
|
+
_chunk2RC3F2SNcjs.writeDebug.call(void 0,
|
|
1230
1230
|
` \u{1F9E9} Found ${options.plugins.length} plugins in provided build options`,
|
|
1231
1231
|
config
|
|
1232
1232
|
);
|
|
1233
1233
|
opts.plugins = options.plugins;
|
|
1234
1234
|
} else {
|
|
1235
|
-
|
|
1235
|
+
_chunk2RC3F2SNcjs.writeDebug.call(void 0,
|
|
1236
1236
|
` \u{1F9E9} No plugins found in provided build options, using default plugins`,
|
|
1237
1237
|
config
|
|
1238
1238
|
);
|
|
1239
1239
|
opts.plugins = await Promise.all([
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1240
|
+
_chunk37HUZIZ5cjs.analyzePlugin.call(void 0, resolvedOptions),
|
|
1241
|
+
_chunkWVBB4LDXcjs.tscPlugin.call(void 0, resolvedOptions),
|
|
1242
|
+
_chunk3UNJMX5Xcjs.onErrorPlugin.call(void 0, resolvedOptions)
|
|
1243
1243
|
]);
|
|
1244
1244
|
}
|
|
1245
1245
|
},
|
|
@@ -1293,15 +1293,15 @@ var addPackageJsonExport = (file, type = "module", sourceRoot, projectRoot) => {
|
|
|
1293
1293
|
};
|
|
1294
1294
|
};
|
|
1295
1295
|
async function generatePackageJson(options) {
|
|
1296
|
-
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
1297
|
-
|
|
1298
|
-
const stopwatch =
|
|
1299
|
-
const packageJsonPath =
|
|
1296
|
+
if (options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunk2RC3F2SNcjs.joinPaths.call(void 0, options.projectRoot, "package.json"))) {
|
|
1297
|
+
_chunk2RC3F2SNcjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", options.config);
|
|
1298
|
+
const stopwatch = _chunk2RC3F2SNcjs.getStopwatch.call(void 0, "Write package.json file");
|
|
1299
|
+
const packageJsonPath = _chunk2RC3F2SNcjs.joinPaths.call(void 0, options.projectRoot, "project.json");
|
|
1300
1300
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
1301
1301
|
throw new Error("Cannot find package.json configuration");
|
|
1302
1302
|
}
|
|
1303
1303
|
const packageJsonContent = await _promises.readFile.call(void 0,
|
|
1304
|
-
|
|
1304
|
+
_chunk2RC3F2SNcjs.joinPaths.call(void 0,
|
|
1305
1305
|
options.config.workspaceRoot,
|
|
1306
1306
|
options.projectRoot,
|
|
1307
1307
|
"package.json"
|
|
@@ -1337,7 +1337,7 @@ async function generatePackageJson(options) {
|
|
|
1337
1337
|
while (entryPath.startsWith("/")) {
|
|
1338
1338
|
entryPath = entryPath.substring(1);
|
|
1339
1339
|
}
|
|
1340
|
-
entryPath = `./${
|
|
1340
|
+
entryPath = `./${_chunk2RC3F2SNcjs.joinPaths.call(void 0, options.projectRoot, entryPath)}`;
|
|
1341
1341
|
if (!ret.includes(entryPath)) {
|
|
1342
1342
|
ret.push(entryPath);
|
|
1343
1343
|
}
|
|
@@ -1387,28 +1387,28 @@ async function generatePackageJson(options) {
|
|
|
1387
1387
|
options.sourceRoot,
|
|
1388
1388
|
options.projectRoot
|
|
1389
1389
|
);
|
|
1390
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
1390
|
+
await _devkit.writeJsonFile.call(void 0, _chunk2RC3F2SNcjs.joinPaths.call(void 0, options.outDir, "package.json"), packageJson);
|
|
1391
1391
|
stopwatch();
|
|
1392
1392
|
}
|
|
1393
1393
|
return options;
|
|
1394
1394
|
}
|
|
1395
1395
|
async function executeUnbuild(options) {
|
|
1396
|
-
|
|
1396
|
+
_chunk2RC3F2SNcjs.writeDebug.call(void 0,
|
|
1397
1397
|
` \u{1F680} Running ${options.name} (${options.projectRoot}) build`,
|
|
1398
1398
|
options.config
|
|
1399
1399
|
);
|
|
1400
|
-
const stopwatch =
|
|
1400
|
+
const stopwatch = _chunk2RC3F2SNcjs.getStopwatch.call(void 0,
|
|
1401
1401
|
`${options.name} (${options.projectRoot}) build`
|
|
1402
1402
|
);
|
|
1403
1403
|
try {
|
|
1404
1404
|
const config = {
|
|
1405
1405
|
...options,
|
|
1406
1406
|
config: null,
|
|
1407
|
-
rootDir:
|
|
1407
|
+
rootDir: _chunk2RC3F2SNcjs.joinPaths.call(void 0, options.config.workspaceRoot, options.projectRoot)
|
|
1408
1408
|
};
|
|
1409
|
-
|
|
1409
|
+
_chunk2RC3F2SNcjs.writeTrace.call(void 0,
|
|
1410
1410
|
`Running with unbuild configuration:
|
|
1411
|
-
${
|
|
1411
|
+
${_chunk2RC3F2SNcjs.formatLogMessage.call(void 0, { ...config, env: "<Hidden>" })}
|
|
1412
1412
|
`,
|
|
1413
1413
|
options.config
|
|
1414
1414
|
);
|
|
@@ -1419,11 +1419,11 @@ ${_chunkXYJZZ344cjs.formatLogMessage.call(void 0, { ...config, env: "<Hidden>" }
|
|
|
1419
1419
|
return options;
|
|
1420
1420
|
}
|
|
1421
1421
|
async function copyBuildAssets(options) {
|
|
1422
|
-
|
|
1422
|
+
_chunk2RC3F2SNcjs.writeDebug.call(void 0,
|
|
1423
1423
|
` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`,
|
|
1424
1424
|
options.config
|
|
1425
1425
|
);
|
|
1426
|
-
const stopwatch =
|
|
1426
|
+
const stopwatch = _chunk2RC3F2SNcjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
1427
1427
|
await copyAssets(
|
|
1428
1428
|
options.config,
|
|
1429
1429
|
_nullishCoalesce(options.assets, () => ( [])),
|
|
@@ -1438,12 +1438,12 @@ async function copyBuildAssets(options) {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
async function cleanOutputPath(options) {
|
|
1440
1440
|
if (options.clean !== false && options.outDir) {
|
|
1441
|
-
|
|
1441
|
+
_chunk2RC3F2SNcjs.writeDebug.call(void 0,
|
|
1442
1442
|
` \u{1F9F9} Cleaning ${options.name} output path: ${options.outDir}`,
|
|
1443
1443
|
options.config
|
|
1444
1444
|
);
|
|
1445
|
-
const stopwatch =
|
|
1446
|
-
await
|
|
1445
|
+
const stopwatch = _chunk2RC3F2SNcjs.getStopwatch.call(void 0, `${options.name} output clean`);
|
|
1446
|
+
await _chunkQNJHN6NFcjs.cleanDirectories.call(void 0, options.name, options.outDir, options.config);
|
|
1447
1447
|
stopwatch();
|
|
1448
1448
|
}
|
|
1449
1449
|
return options;
|
|
@@ -1458,10 +1458,10 @@ async function build(options) {
|
|
|
1458
1458
|
throw new Error("Cannot find workspace root");
|
|
1459
1459
|
}
|
|
1460
1460
|
const config = await getConfig(workspaceRoot.dir);
|
|
1461
|
-
|
|
1462
|
-
const stopwatch =
|
|
1461
|
+
_chunk2RC3F2SNcjs.writeDebug.call(void 0, ` \u26A1 Executing Storm Unbuild pipeline`, config);
|
|
1462
|
+
const stopwatch = _chunk2RC3F2SNcjs.getStopwatch.call(void 0, "Unbuild pipeline");
|
|
1463
1463
|
try {
|
|
1464
|
-
options.projectRoot =
|
|
1464
|
+
options.projectRoot = _chunk2RC3F2SNcjs.correctPaths.call(void 0, projectRoot);
|
|
1465
1465
|
const resolvedOptions = await resolveOptions(options, config);
|
|
1466
1466
|
await cleanOutputPath(resolvedOptions);
|
|
1467
1467
|
if (options.buildOnly !== true) {
|
|
@@ -1471,12 +1471,12 @@ async function build(options) {
|
|
|
1471
1471
|
if (options.buildOnly !== true) {
|
|
1472
1472
|
await copyBuildAssets(resolvedOptions);
|
|
1473
1473
|
}
|
|
1474
|
-
|
|
1474
|
+
_chunk2RC3F2SNcjs.writeSuccess.call(void 0,
|
|
1475
1475
|
` \u{1F3C1} The ${resolvedOptions.name} build completed successfully`,
|
|
1476
1476
|
config
|
|
1477
1477
|
);
|
|
1478
1478
|
} catch (error) {
|
|
1479
|
-
|
|
1479
|
+
_chunk2RC3F2SNcjs.writeFatal.call(void 0,
|
|
1480
1480
|
"Fatal errors that the build process could not recover from have occured. The build process has been terminated.",
|
|
1481
1481
|
config
|
|
1482
1482
|
);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk2RC3F2SNcjs = require('./chunk-2RC3F2SN.cjs');
|
|
5
5
|
|
|
6
6
|
// src/clean.ts
|
|
7
7
|
var _promises = require('fs/promises');
|
|
8
8
|
async function clean(name = "Unbuild", directory, config) {
|
|
9
|
-
|
|
10
|
-
const stopwatch =
|
|
9
|
+
_chunk2RC3F2SNcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
|
|
10
|
+
const stopwatch = _chunk2RC3F2SNcjs.getStopwatch.call(void 0, `${name} output clean`);
|
|
11
11
|
await cleanDirectories(name, directory, config);
|
|
12
12
|
stopwatch();
|
|
13
13
|
}
|
|
@@ -492,7 +492,6 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
|
492
492
|
|
|
493
493
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
494
494
|
var rootFiles = [
|
|
495
|
-
"storm-workspace.json",
|
|
496
495
|
"storm-workspace.json",
|
|
497
496
|
"storm-workspace.yaml",
|
|
498
497
|
"storm-workspace.yml",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk2RC3F2SNcjs = require('./chunk-2RC3F2SN.cjs');
|
|
4
4
|
|
|
5
5
|
// src/plugins/tsc.ts
|
|
6
6
|
|
|
@@ -45,7 +45,7 @@ async function createTsCompilerOptions(config, tsConfigPath, projectRoot, depend
|
|
|
45
45
|
declaration: true,
|
|
46
46
|
paths: _buildablelibsutils.computeCompilerOptionsPaths.call(void 0, tsConfig, _nullishCoalesce(dependencies, () => ( [])))
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
_chunk2RC3F2SNcjs.writeTrace.call(void 0, compilerOptions, config);
|
|
49
49
|
return compilerOptions;
|
|
50
50
|
}
|
|
51
51
|
|
package/dist/clean.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
4
|
+
var _chunkQNJHN6NFcjs = require('./chunk-QNJHN6NF.cjs');
|
|
5
|
+
require('./chunk-2RC3F2SN.cjs');
|
|
6
6
|
require('./chunk-OBGZSXTJ.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.clean =
|
|
10
|
+
exports.clean = _chunkQNJHN6NFcjs.clean; exports.cleanDirectories = _chunkQNJHN6NFcjs.cleanDirectories;
|
package/dist/clean.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -5,19 +5,19 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkETV4W5W2cjs = require('./chunk-ETV4W5W2.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkQNJHN6NFcjs = require('./chunk-QNJHN6NF.cjs');
|
|
13
13
|
require('./chunk-SFZRYJZ2.cjs');
|
|
14
|
-
require('./chunk-
|
|
15
|
-
require('./chunk-
|
|
14
|
+
require('./chunk-37HUZIZ5.cjs');
|
|
15
|
+
require('./chunk-3UNJMX5X.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
20
|
-
require('./chunk-
|
|
19
|
+
var _chunkWVBB4LDXcjs = require('./chunk-WVBB4LDX.cjs');
|
|
20
|
+
require('./chunk-2RC3F2SN.cjs');
|
|
21
21
|
require('./chunk-OBGZSXTJ.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
@@ -30,4 +30,4 @@ require('./chunk-OBGZSXTJ.cjs');
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
exports.build =
|
|
33
|
+
exports.build = _chunkETV4W5W2cjs.build; exports.clean = _chunkQNJHN6NFcjs.clean; exports.cleanDirectories = _chunkQNJHN6NFcjs.cleanDirectories; exports.cleanOutputPath = _chunkETV4W5W2cjs.cleanOutputPath; exports.copyBuildAssets = _chunkETV4W5W2cjs.copyBuildAssets; exports.createTsCompilerOptions = _chunkWVBB4LDXcjs.createTsCompilerOptions; exports.executeUnbuild = _chunkETV4W5W2cjs.executeUnbuild; exports.generatePackageJson = _chunkETV4W5W2cjs.generatePackageJson; exports.loadConfig = _chunkWVBB4LDXcjs.loadConfig; exports.resolveOptions = _chunkETV4W5W2cjs.resolveOptions;
|
package/dist/index.js
CHANGED
|
@@ -5,19 +5,19 @@ import {
|
|
|
5
5
|
executeUnbuild,
|
|
6
6
|
generatePackageJson,
|
|
7
7
|
resolveOptions
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CPOQ3QRP.js";
|
|
9
9
|
import {
|
|
10
10
|
clean,
|
|
11
11
|
cleanDirectories
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-KCEFJ3KA.js";
|
|
13
13
|
import "./chunk-GGNOJ77I.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-SLMCYERU.js";
|
|
15
|
+
import "./chunk-U2JTX5UH.js";
|
|
16
16
|
import {
|
|
17
17
|
createTsCompilerOptions,
|
|
18
18
|
loadConfig
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-3QBGMWVL.js";
|
|
20
|
+
import "./chunk-QX4UI7BX.js";
|
|
21
21
|
import "./chunk-3RG5ZIWI.js";
|
|
22
22
|
export {
|
|
23
23
|
build,
|
package/dist/plugins/analyze.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunk37HUZIZ5cjs = require('../chunk-37HUZIZ5.cjs');
|
|
4
|
+
require('../chunk-2RC3F2SN.cjs');
|
|
5
5
|
require('../chunk-OBGZSXTJ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.analyzePlugin =
|
|
8
|
+
exports.analyzePlugin = _chunk37HUZIZ5cjs.analyzePlugin;
|
package/dist/plugins/analyze.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunk3UNJMX5Xcjs = require('../chunk-3UNJMX5X.cjs');
|
|
4
|
+
require('../chunk-2RC3F2SN.cjs');
|
|
5
5
|
require('../chunk-OBGZSXTJ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.onErrorPlugin =
|
|
8
|
+
exports.onErrorPlugin = _chunk3UNJMX5Xcjs.onErrorPlugin;
|
package/dist/plugins/on-error.js
CHANGED
package/dist/plugins/tsc.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkWVBB4LDXcjs = require('../chunk-WVBB4LDX.cjs');
|
|
4
|
+
require('../chunk-2RC3F2SN.cjs');
|
|
5
5
|
require('../chunk-OBGZSXTJ.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.tscPlugin =
|
|
8
|
+
exports.tscPlugin = _chunkWVBB4LDXcjs.tscPlugin;
|
package/dist/plugins/tsc.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storm-software/unbuild",
|
|
3
|
-
"version": "0.49.
|
|
3
|
+
"version": "0.49.59",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing `unbuild` utilities for building Storm Software libraries and applications",
|
|
6
6
|
"repository": {
|
|
@@ -147,9 +147,9 @@
|
|
|
147
147
|
"typescript": { "optional": false }
|
|
148
148
|
},
|
|
149
149
|
"dependencies": {
|
|
150
|
-
"@storm-software/build-tools": "^0.151.
|
|
151
|
-
"@storm-software/config": "^1.125.
|
|
152
|
-
"@storm-software/config-tools": "^1.176.
|
|
150
|
+
"@storm-software/build-tools": "^0.151.34",
|
|
151
|
+
"@storm-software/config": "^1.125.22",
|
|
152
|
+
"@storm-software/config-tools": "^1.176.24",
|
|
153
153
|
"commander": "^12.1.0",
|
|
154
154
|
"defu": "6.1.4",
|
|
155
155
|
"esbuild": "^0.25.0",
|
|
@@ -171,5 +171,5 @@
|
|
|
171
171
|
},
|
|
172
172
|
"publishConfig": { "access": "public" },
|
|
173
173
|
"sideEffects": false,
|
|
174
|
-
"gitHead": "
|
|
174
|
+
"gitHead": "f63566d09672df3e8f30ec67936afaad49ebd749"
|
|
175
175
|
}
|