@storm-software/workspace-tools 1.230.1 → 1.231.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/dist/{chunk-3SXUH27J.js → chunk-22DNWOG2.js} +18 -29
- package/dist/{chunk-MPOEEZVK.mjs → chunk-3QS2VXIW.mjs} +1 -1
- package/dist/{chunk-YCJU7YTL.js → chunk-4KC6BQY6.js} +3 -3
- package/dist/{chunk-CZJZJQ6D.js → chunk-6G34PMHG.js} +3 -3
- package/dist/{chunk-HLPAP24L.mjs → chunk-6S33LGZA.mjs} +2 -2
- package/dist/{chunk-XW4IO5F6.js → chunk-AEHR536C.js} +15 -15
- package/dist/{chunk-KS44WFBU.mjs → chunk-BXRWY5YI.mjs} +3 -3
- package/dist/{chunk-H3UJL3I6.mjs → chunk-E4RAOLUW.mjs} +1 -1
- package/dist/{chunk-55PB3HGB.mjs → chunk-GFOMWTSR.mjs} +20 -31
- package/dist/{chunk-IR6D2ZXA.js → chunk-I56CGXM6.js} +3 -3
- package/dist/{chunk-MBCXSLG7.js → chunk-IQU4KSXC.js} +3 -3
- package/dist/{chunk-BCM66MXI.mjs → chunk-JXN5JXWD.mjs} +3 -3
- package/dist/{chunk-6NIVQXVH.js → chunk-LXPMDNMJ.js} +7 -7
- package/dist/{chunk-UHT3YMUI.mjs → chunk-NZMTUJGQ.mjs} +3 -3
- package/dist/{chunk-4CWRH5ZE.mjs → chunk-S73VA7HH.mjs} +3 -3
- package/dist/{chunk-ZHQOK3NF.js → chunk-S7QZCTBR.js} +11 -11
- package/dist/{chunk-46HPJEJW.mjs → chunk-TAJBCIVO.mjs} +3 -3
- package/dist/{chunk-K7MNWUOY.js → chunk-TRTFGC6N.js} +3 -3
- package/dist/{chunk-RMRYTZQJ.mjs → chunk-X7G7IR2C.mjs} +2 -2
- package/dist/{chunk-AP62YOGH.js → chunk-X7YSSPPZ.js} +2 -2
- package/dist/{chunk-3O66TDXL.js → chunk-Y2IMY233.js} +2 -2
- package/dist/{chunk-JAWTCSKA.mjs → chunk-YMGOLNMM.mjs} +2 -2
- package/dist/executors.js +17 -17
- package/dist/executors.mjs +18 -18
- package/dist/generators.js +8 -8
- package/dist/generators.mjs +10 -10
- package/dist/index.js +47 -47
- package/dist/index.mjs +62 -62
- package/dist/src/base/base-executor.js +3 -3
- package/dist/src/base/base-executor.mjs +2 -2
- package/dist/src/base/index.js +10 -10
- package/dist/src/base/index.mjs +12 -12
- package/dist/src/executors/cargo-build/executor.js +5 -5
- package/dist/src/executors/cargo-build/executor.mjs +4 -4
- package/dist/src/executors/cargo-check/executor.js +5 -5
- package/dist/src/executors/cargo-check/executor.mjs +4 -4
- package/dist/src/executors/cargo-clippy/executor.js +5 -5
- package/dist/src/executors/cargo-clippy/executor.mjs +4 -4
- package/dist/src/executors/cargo-doc/executor.js +5 -5
- package/dist/src/executors/cargo-doc/executor.mjs +4 -4
- package/dist/src/executors/cargo-format/executor.js +5 -5
- package/dist/src/executors/cargo-format/executor.mjs +4 -4
- package/dist/src/executors/clean-package/executor.js +3 -3
- package/dist/src/executors/clean-package/executor.mjs +2 -2
- package/dist/src/executors/esbuild/executor.js +5 -5
- package/dist/src/executors/esbuild/executor.mjs +4 -4
- package/dist/src/executors/size-limit/executor.js +4 -4
- package/dist/src/executors/size-limit/executor.mjs +3 -3
- package/dist/src/executors/tsdown/executor.js +5 -5
- package/dist/src/executors/tsdown/executor.mjs +4 -4
- package/dist/src/executors/typia/executor.js +4 -4
- package/dist/src/executors/typia/executor.mjs +3 -3
- package/dist/src/executors/unbuild/executor.js +5 -5
- package/dist/src/executors/unbuild/executor.mjs +4 -4
- package/dist/src/generators/browser-library/generator.js +1 -1
- package/dist/src/generators/browser-library/generator.mjs +1 -1
- package/dist/src/generators/neutral-library/generator.js +1 -1
- package/dist/src/generators/neutral-library/generator.mjs +1 -1
- package/dist/src/generators/node-library/generator.js +3 -3
- package/dist/src/generators/node-library/generator.mjs +2 -2
- package/dist/src/generators/preset/generator.js +3 -3
- package/dist/src/generators/preset/generator.mjs +2 -2
- package/dist/src/generators/release-version/generator.js +3 -3
- package/dist/src/generators/release-version/generator.mjs +2 -2
- package/dist/src/plugins/rust/cargo-toml.js +3 -3
- package/dist/src/plugins/rust/cargo-toml.mjs +2 -2
- package/dist/src/plugins/rust/index.js +3 -3
- package/dist/src/plugins/rust/index.mjs +2 -2
- package/dist/src/utils/index.js +8 -8
- package/dist/src/utils/index.mjs +18 -18
- package/package.json +1 -1
- package/dist/{chunk-AXC2MN2T.js → chunk-AX2GAIC6.js} +2 -2
- package/dist/{chunk-PHWTI5FA.js → chunk-DDDV5CIY.js} +2 -2
- package/dist/{chunk-X5FFOC7V.js → chunk-EDHSW6KA.js} +2 -2
- package/dist/{chunk-A5H74FJO.mjs → chunk-KKDGYFKY.mjs} +3 -3
- package/dist/{chunk-72H4B5NB.js → chunk-LDCPNOWX.js} +3 -3
- package/dist/{chunk-J4POXWGW.mjs → chunk-UENELRBB.mjs} +3 -3
- package/dist/{chunk-SON5KDOS.mjs → chunk-UK7LZSMG.mjs} +6 -6
- package/dist/{chunk-TIKTN6ZZ.mjs → chunk-VHTLAFRU.mjs} +3 -3
- package/dist/{chunk-XONECYS4.js → chunk-YESI2BBC.js} +2 -2
- package/dist/{chunk-GZPCM2GI.mjs → chunk-Z322IWWR.mjs} +4 -4
package/CHANGELOG.md
CHANGED
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 -->
|
|
@@ -27,12 +27,13 @@ var DEFAULT_TARGET = "esnext";
|
|
|
27
27
|
var DEFAULT_ORGANIZATION = "storm-software";
|
|
28
28
|
|
|
29
29
|
// ../build-tools/src/utilities/copy-assets.ts
|
|
30
|
-
var _node = require('@humanfs/node');
|
|
31
30
|
var _devkit = require('@nx/devkit');
|
|
32
31
|
var _js = require('@nx/js');
|
|
33
32
|
var _glob = require('glob');
|
|
33
|
+
var _promises = require('fs/promises');
|
|
34
34
|
|
|
35
35
|
// ../build-tools/src/utilities/read-nx-config.ts
|
|
36
|
+
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
36
37
|
|
|
37
38
|
var readNxConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (workspaceRoot) => {
|
|
38
39
|
let rootDir = workspaceRoot;
|
|
@@ -41,10 +42,11 @@ var readNxConfig = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (w
|
|
|
41
42
|
rootDir = config.workspaceRoot;
|
|
42
43
|
}
|
|
43
44
|
const nxJsonPath = _chunkXCSSYTCUjs.joinPaths.call(void 0, rootDir, "nx.json");
|
|
44
|
-
if (!
|
|
45
|
+
if (!_fs.existsSync.call(void 0, nxJsonPath)) {
|
|
45
46
|
throw new Error("Cannot find project.json configuration");
|
|
46
47
|
}
|
|
47
|
-
|
|
48
|
+
const configContent = await _promises.readFile.call(void 0, nxJsonPath, "utf8");
|
|
49
|
+
return JSON.parse(configContent);
|
|
48
50
|
}, "readNxConfig");
|
|
49
51
|
|
|
50
52
|
// ../build-tools/src/utilities/copy-assets.ts
|
|
@@ -79,14 +81,12 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
|
|
|
79
81
|
});
|
|
80
82
|
}
|
|
81
83
|
const nxJson = readNxConfig(config.workspaceRoot);
|
|
82
|
-
const projectGraph =
|
|
83
|
-
exitOnError: true
|
|
84
|
-
});
|
|
84
|
+
const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
85
85
|
const projectsConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
86
86
|
if (!_optionalChain([projectsConfigurations, 'optionalAccess', _7 => _7.projects, 'optionalAccess', _8 => _8[projectName]])) {
|
|
87
87
|
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
88
88
|
}
|
|
89
|
-
const buildTarget = _optionalChain([projectsConfigurations, 'access', _9 => _9.projects, 'access', _10 => _10[projectName], '
|
|
89
|
+
const buildTarget = _optionalChain([projectsConfigurations, 'access', _9 => _9.projects, 'access', _10 => _10[projectName], 'access', _11 => _11.targets, 'optionalAccess', _12 => _12.build]);
|
|
90
90
|
if (!buildTarget) {
|
|
91
91
|
throw new Error(`The Build process failed because the project does not have a valid build target in the project.json file. Check if the file exists in the root of the project at ${_chunkXCSSYTCUjs.joinPaths.call(void 0, projectRoot, "project.json")}`);
|
|
92
92
|
}
|
|
@@ -116,42 +116,30 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
|
|
|
116
116
|
_chunkXCSSYTCUjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
117
117
|
_chunkXCSSYTCUjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
118
118
|
]);
|
|
119
|
-
await Promise.allSettled(files.map(async (file) =>
|
|
119
|
+
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
120
120
|
|
|
121
|
-
${await
|
|
121
|
+
${await _promises.readFile.call(void 0, file, "utf8")}
|
|
122
122
|
|
|
123
123
|
${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`)));
|
|
124
124
|
}
|
|
125
125
|
}, "copyAssets");
|
|
126
126
|
|
|
127
127
|
// ../build-tools/src/utilities/generate-package-json.ts
|
|
128
|
-
|
|
129
128
|
var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
|
|
130
129
|
|
|
130
|
+
|
|
131
|
+
|
|
131
132
|
var _projectgraph = require('nx/src/project-graph/project-graph');
|
|
132
133
|
var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (workspaceRoot, projectRoot, projectName, packageJson) => {
|
|
133
|
-
const
|
|
134
|
-
exitOnError: true
|
|
135
|
-
});
|
|
136
|
-
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
137
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess', _13 => _13.projects, 'optionalAccess', _14 => _14[projectName]])) {
|
|
138
|
-
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
139
|
-
}
|
|
140
|
-
const projectJsonPath = _chunkXCSSYTCUjs.joinPaths.call(void 0, workspaceRoot, projectRoot, "project.json");
|
|
141
|
-
if (!await _node.hfs.isFile(projectJsonPath)) {
|
|
142
|
-
throw new Error("Cannot find project.json configuration");
|
|
143
|
-
}
|
|
144
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess', _15 => _15.projects, 'optionalAccess', _16 => _16[projectName]])) {
|
|
145
|
-
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
146
|
-
}
|
|
147
|
-
const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, projectGraph, workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
134
|
+
const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0, void 0, _projectgraph.readCachedProjectGraph.call(void 0, ), workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
148
135
|
const localPackages = [];
|
|
149
136
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot)) {
|
|
150
137
|
const projectNode = project.node;
|
|
151
138
|
if (projectNode.data.root) {
|
|
152
139
|
const projectPackageJsonPath = _chunkXCSSYTCUjs.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
|
|
153
|
-
if (
|
|
154
|
-
const
|
|
140
|
+
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
141
|
+
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
142
|
+
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
155
143
|
if (projectPackageJson.private !== false) {
|
|
156
144
|
localPackages.push(projectPackageJson);
|
|
157
145
|
}
|
|
@@ -187,7 +175,8 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
187
175
|
}, "addPackageDependencies");
|
|
188
176
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
189
177
|
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunk5MKQX2FEjs.findWorkspaceRoot.call(void 0, );
|
|
190
|
-
const
|
|
178
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkXCSSYTCUjs.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
|
|
179
|
+
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
191
180
|
packageJson.type ??= "module";
|
|
192
181
|
packageJson.sideEffects ??= false;
|
|
193
182
|
if (includeSrc === true) {
|
|
@@ -336,7 +325,7 @@ var getEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (builder, opti
|
|
|
336
325
|
var _core = require('@swc/core');
|
|
337
326
|
|
|
338
327
|
// ../build-tools/src/plugins/ts-resolve.ts
|
|
339
|
-
|
|
328
|
+
|
|
340
329
|
var _module = require('module');
|
|
341
330
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
342
331
|
var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_resolve2);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
+
var _chunkLDCPNOWXjs = require('./chunk-LDCPNOWX.js');
|
|
3
4
|
|
|
4
|
-
var _chunkULBTYC2Bjs = require('./chunk-ULBTYC2B.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkULBTYC2Bjs = require('./chunk-ULBTYC2B.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -15,7 +15,7 @@ async function cargoFormatExecutor(options, context) {
|
|
|
15
15
|
return await _chunkULBTYC2Bjs.cargoCommand.call(void 0, ...command);
|
|
16
16
|
}
|
|
17
17
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoFormatExecutor, "cargoFormatExecutor");
|
|
18
|
-
var executor_default =
|
|
18
|
+
var executor_default = _chunkLDCPNOWXjs.withRunExecutor.call(void 0, "Cargo Format", cargoFormatExecutor, {
|
|
19
19
|
skipReadingConfig: false,
|
|
20
20
|
hooks: {
|
|
21
21
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
+
var _chunkLDCPNOWXjs = require('./chunk-LDCPNOWX.js');
|
|
3
4
|
|
|
4
|
-
var _chunkULBTYC2Bjs = require('./chunk-ULBTYC2B.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkULBTYC2Bjs = require('./chunk-ULBTYC2B.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -15,7 +15,7 @@ async function cargoCheckExecutor(options, context) {
|
|
|
15
15
|
return await _chunkULBTYC2Bjs.cargoCommand.call(void 0, ...command);
|
|
16
16
|
}
|
|
17
17
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoCheckExecutor, "cargoCheckExecutor");
|
|
18
|
-
var executor_default =
|
|
18
|
+
var executor_default = _chunkLDCPNOWXjs.withRunExecutor.call(void 0, "Cargo Check", cargoCheckExecutor, {
|
|
19
19
|
skipReadingConfig: false,
|
|
20
20
|
hooks: {
|
|
21
21
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
getEntryPoints,
|
|
9
9
|
getEnv,
|
|
10
10
|
getOutExtension
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GFOMWTSR.mjs";
|
|
12
12
|
import {
|
|
13
13
|
withRunExecutor
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-UENELRBB.mjs";
|
|
15
15
|
import {
|
|
16
16
|
getStopwatch,
|
|
17
17
|
isVerbose,
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk22DNWOG2js = require('./chunk-22DNWOG2.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkLDCPNOWXjs = require('./chunk-LDCPNOWX.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -487,7 +487,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, getTypeDependencyPackageName, "getTypeDepen
|
|
|
487
487
|
|
|
488
488
|
// ../esbuild/src/config.ts
|
|
489
489
|
var getOutputExtensionMap = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, pkgType) => {
|
|
490
|
-
return options.outExtension ? options.outExtension(options.format, pkgType) :
|
|
490
|
+
return options.outExtension ? options.outExtension(options.format, pkgType) : _chunk22DNWOG2js.getOutExtension.call(void 0, options.format, pkgType);
|
|
491
491
|
}, "getOutputExtensionMap");
|
|
492
492
|
var getDefaultBuildPlugins = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, resolvedOptions) => [
|
|
493
493
|
nodeProtocolPlugin(options, resolvedOptions),
|
|
@@ -535,7 +535,7 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
535
535
|
".woff": "file",
|
|
536
536
|
".woff2": "file"
|
|
537
537
|
},
|
|
538
|
-
banner:
|
|
538
|
+
banner: _chunk22DNWOG2js.DEFAULT_COMPILED_BANNER
|
|
539
539
|
};
|
|
540
540
|
|
|
541
541
|
// ../esbuild/src/plugins/deps-check.ts
|
|
@@ -730,14 +730,14 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
730
730
|
}
|
|
731
731
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
732
732
|
options.name ??= `${projectName}-${options.format}`;
|
|
733
|
-
options.target ??=
|
|
733
|
+
options.target ??= _chunk22DNWOG2js.DEFAULT_TARGET;
|
|
734
734
|
const packageJsonPath = _chunkXCSSYTCUjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
|
|
735
735
|
if (!await _node.hfs.isFile(packageJsonPath)) {
|
|
736
736
|
throw new Error("Cannot find package.json configuration");
|
|
737
737
|
}
|
|
738
738
|
const packageJson = await _node.hfs.json(packageJsonPath);
|
|
739
739
|
const outExtension = getOutputExtensionMap(options, packageJson.type);
|
|
740
|
-
const env =
|
|
740
|
+
const env = _chunk22DNWOG2js.getEnv.call(void 0, "esbuild", options);
|
|
741
741
|
const result = {
|
|
742
742
|
...options,
|
|
743
743
|
config,
|
|
@@ -757,7 +757,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
757
757
|
...userOptions,
|
|
758
758
|
tsconfig: _chunkXCSSYTCUjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
759
759
|
format: options.format || "cjs",
|
|
760
|
-
entryPoints: await
|
|
760
|
+
entryPoints: await _chunk22DNWOG2js.getEntryPoints.call(void 0, config, projectRoot, projectJson.sourceRoot, userOptions.entry || [
|
|
761
761
|
"./src/index.ts"
|
|
762
762
|
], userOptions.emitOnAll),
|
|
763
763
|
outdir: userOptions.outputPath || _chunkXCSSYTCUjs.joinPaths.call(void 0, "dist", projectRoot),
|
|
@@ -782,8 +782,8 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
782
782
|
outExtension,
|
|
783
783
|
footer: userOptions.footer,
|
|
784
784
|
banner: {
|
|
785
|
-
js: options.banner ||
|
|
786
|
-
css: options.banner ||
|
|
785
|
+
js: options.banner || _chunk22DNWOG2js.DEFAULT_COMPILED_BANNER,
|
|
786
|
+
css: options.banner || _chunk22DNWOG2js.DEFAULT_COMPILED_BANNER
|
|
787
787
|
},
|
|
788
788
|
splitting: options.format === "iife" ? false : typeof options.splitting === "boolean" ? options.splitting : options.format === "esm",
|
|
789
789
|
treeShaking: options.format === "esm",
|
|
@@ -825,11 +825,11 @@ async function generatePackageJson(context2) {
|
|
|
825
825
|
if (!packageJson) {
|
|
826
826
|
throw new Error("Cannot find package.json configuration file");
|
|
827
827
|
}
|
|
828
|
-
packageJson = await
|
|
829
|
-
packageJson = await
|
|
828
|
+
packageJson = await _chunk22DNWOG2js.addPackageDependencies.call(void 0, context2.options.config.workspaceRoot, context2.options.projectRoot, context2.options.projectName, packageJson);
|
|
829
|
+
packageJson = await _chunk22DNWOG2js.addWorkspacePackageJsonFields.call(void 0, context2.options.config, context2.options.projectRoot, context2.options.sourceRoot, context2.options.projectName, false, packageJson);
|
|
830
830
|
packageJson.exports ??= {};
|
|
831
831
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
832
|
-
packageJson.exports["."] ??=
|
|
832
|
+
packageJson.exports["."] ??= _chunk22DNWOG2js.addPackageJsonExport.call(void 0, "index", packageJson.type, context2.options.sourceRoot);
|
|
833
833
|
let entryPoints = [
|
|
834
834
|
{
|
|
835
835
|
in: "./src/index.ts",
|
|
@@ -847,7 +847,7 @@ async function generatePackageJson(context2) {
|
|
|
847
847
|
const split = entryPoint.out.split(".");
|
|
848
848
|
split.pop();
|
|
849
849
|
const entry = split.join(".").replaceAll("\\", "/");
|
|
850
|
-
packageJson.exports[`./${entry}`] ??=
|
|
850
|
+
packageJson.exports[`./${entry}`] ??= _chunk22DNWOG2js.addPackageJsonExport.call(void 0, entry, packageJson.type, context2.options.sourceRoot);
|
|
851
851
|
}
|
|
852
852
|
}
|
|
853
853
|
packageJson.main = packageJson.type === "commonjs" ? "./dist/index.js" : "./dist/index.cjs";
|
|
@@ -904,7 +904,7 @@ async function copyBuildAssets(context2) {
|
|
|
904
904
|
if (_optionalChain([context2, 'access', _26 => _26.result, 'optionalAccess', _27 => _27.errors, 'access', _28 => _28.length]) === 0) {
|
|
905
905
|
_chunkIX2EZD3Fjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
906
906
|
const stopwatch = _chunkIX2EZD3Fjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
907
|
-
await
|
|
907
|
+
await _chunk22DNWOG2js.copyAssets.call(void 0, context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.projectName, context2.options.sourceRoot, true, false);
|
|
908
908
|
stopwatch();
|
|
909
909
|
}
|
|
910
910
|
return context2;
|
|
@@ -1025,7 +1025,7 @@ async function esbuildExecutorFn(options, context2, config) {
|
|
|
1025
1025
|
};
|
|
1026
1026
|
}
|
|
1027
1027
|
_chunk3GQAWCBQjs.__name.call(void 0, esbuildExecutorFn, "esbuildExecutorFn");
|
|
1028
|
-
var executor_default =
|
|
1028
|
+
var executor_default = _chunkLDCPNOWXjs.withRunExecutor.call(void 0, "Storm ESBuild build", esbuildExecutorFn, {
|
|
1029
1029
|
skipReadingConfig: false,
|
|
1030
1030
|
hooks: {
|
|
1031
1031
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
withRunExecutor
|
|
3
|
+
} from "./chunk-UENELRBB.mjs";
|
|
1
4
|
import {
|
|
2
5
|
buildCargoCommand,
|
|
3
6
|
cargoCommand
|
|
4
7
|
} from "./chunk-QZHIWK5Z.mjs";
|
|
5
|
-
import {
|
|
6
|
-
withRunExecutor
|
|
7
|
-
} from "./chunk-J4POXWGW.mjs";
|
|
8
8
|
import {
|
|
9
9
|
__name
|
|
10
10
|
} from "./chunk-XUV4U54K.mjs";
|
|
@@ -27,13 +27,14 @@ var DEFAULT_TARGET = "esnext";
|
|
|
27
27
|
var DEFAULT_ORGANIZATION = "storm-software";
|
|
28
28
|
|
|
29
29
|
// ../build-tools/src/utilities/copy-assets.ts
|
|
30
|
-
import {
|
|
31
|
-
import { createProjectGraphAsync, readProjectsConfigurationFromProjectGraph } from "@nx/devkit";
|
|
30
|
+
import { readCachedProjectGraph, readProjectsConfigurationFromProjectGraph } from "@nx/devkit";
|
|
32
31
|
import { copyAssets as copyAssetsBase } from "@nx/js";
|
|
33
32
|
import { glob } from "glob";
|
|
33
|
+
import { readFile as readFile2, writeFile } from "node:fs/promises";
|
|
34
34
|
|
|
35
35
|
// ../build-tools/src/utilities/read-nx-config.ts
|
|
36
|
-
import {
|
|
36
|
+
import { existsSync } from "node:fs";
|
|
37
|
+
import { readFile } from "node:fs/promises";
|
|
37
38
|
var readNxConfig = /* @__PURE__ */ __name(async (workspaceRoot) => {
|
|
38
39
|
let rootDir = workspaceRoot;
|
|
39
40
|
if (!rootDir) {
|
|
@@ -41,10 +42,11 @@ var readNxConfig = /* @__PURE__ */ __name(async (workspaceRoot) => {
|
|
|
41
42
|
rootDir = config.workspaceRoot;
|
|
42
43
|
}
|
|
43
44
|
const nxJsonPath = joinPaths(rootDir, "nx.json");
|
|
44
|
-
if (!
|
|
45
|
+
if (!existsSync(nxJsonPath)) {
|
|
45
46
|
throw new Error("Cannot find project.json configuration");
|
|
46
47
|
}
|
|
47
|
-
|
|
48
|
+
const configContent = await readFile(nxJsonPath, "utf8");
|
|
49
|
+
return JSON.parse(configContent);
|
|
48
50
|
}, "readNxConfig");
|
|
49
51
|
|
|
50
52
|
// ../build-tools/src/utilities/copy-assets.ts
|
|
@@ -79,14 +81,12 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
|
|
|
79
81
|
});
|
|
80
82
|
}
|
|
81
83
|
const nxJson = readNxConfig(config.workspaceRoot);
|
|
82
|
-
const projectGraph =
|
|
83
|
-
exitOnError: true
|
|
84
|
-
});
|
|
84
|
+
const projectGraph = readCachedProjectGraph();
|
|
85
85
|
const projectsConfigurations = readProjectsConfigurationFromProjectGraph(projectGraph);
|
|
86
86
|
if (!projectsConfigurations?.projects?.[projectName]) {
|
|
87
87
|
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
88
88
|
}
|
|
89
|
-
const buildTarget = projectsConfigurations.projects[projectName]
|
|
89
|
+
const buildTarget = projectsConfigurations.projects[projectName].targets?.build;
|
|
90
90
|
if (!buildTarget) {
|
|
91
91
|
throw new Error(`The Build process failed because the project does not have a valid build target in the project.json file. Check if the file exists in the root of the project at ${joinPaths(projectRoot, "project.json")}`);
|
|
92
92
|
}
|
|
@@ -116,42 +116,30 @@ var copyAssets = /* @__PURE__ */ __name(async (config, assets, outputPath, proje
|
|
|
116
116
|
joinPaths(config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
117
117
|
joinPaths(config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
118
118
|
]);
|
|
119
|
-
await Promise.allSettled(files.map(async (file) =>
|
|
119
|
+
await Promise.allSettled(files.map(async (file) => writeFile(file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
120
120
|
|
|
121
|
-
${await
|
|
121
|
+
${await readFile2(file, "utf8")}
|
|
122
122
|
|
|
123
123
|
${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`)));
|
|
124
124
|
}
|
|
125
125
|
}, "copyAssets");
|
|
126
126
|
|
|
127
127
|
// ../build-tools/src/utilities/generate-package-json.ts
|
|
128
|
-
import { hfs as hfs3 } from "@humanfs/node";
|
|
129
128
|
import { calculateProjectBuildableDependencies } from "@nx/js/src/utils/buildable-libs-utils";
|
|
130
129
|
import { Glob } from "glob";
|
|
131
|
-
import {
|
|
130
|
+
import { existsSync as existsSync2 } from "node:fs";
|
|
131
|
+
import { readFile as readFile3 } from "node:fs/promises";
|
|
132
|
+
import { readCachedProjectGraph as readCachedProjectGraph2 } from "nx/src/project-graph/project-graph";
|
|
132
133
|
var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projectRoot, projectName, packageJson) => {
|
|
133
|
-
const
|
|
134
|
-
exitOnError: true
|
|
135
|
-
});
|
|
136
|
-
const projectConfigurations = readProjectsConfigurationFromProjectGraph2(projectGraph);
|
|
137
|
-
if (!projectConfigurations?.projects?.[projectName]) {
|
|
138
|
-
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
139
|
-
}
|
|
140
|
-
const projectJsonPath = joinPaths(workspaceRoot, projectRoot, "project.json");
|
|
141
|
-
if (!await hfs3.isFile(projectJsonPath)) {
|
|
142
|
-
throw new Error("Cannot find project.json configuration");
|
|
143
|
-
}
|
|
144
|
-
if (!projectConfigurations?.projects?.[projectName]) {
|
|
145
|
-
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
146
|
-
}
|
|
147
|
-
const projectDependencies = calculateProjectBuildableDependencies(void 0, projectGraph, workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
134
|
+
const projectDependencies = calculateProjectBuildableDependencies(void 0, readCachedProjectGraph2(), workspaceRoot, projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
|
|
148
135
|
const localPackages = [];
|
|
149
136
|
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot)) {
|
|
150
137
|
const projectNode = project.node;
|
|
151
138
|
if (projectNode.data.root) {
|
|
152
139
|
const projectPackageJsonPath = joinPaths(workspaceRoot, projectNode.data.root, "package.json");
|
|
153
|
-
if (
|
|
154
|
-
const
|
|
140
|
+
if (existsSync2(projectPackageJsonPath)) {
|
|
141
|
+
const projectPackageJsonContent = await readFile3(projectPackageJsonPath, "utf8");
|
|
142
|
+
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
155
143
|
if (projectPackageJson.private !== false) {
|
|
156
144
|
localPackages.push(projectPackageJson);
|
|
157
145
|
}
|
|
@@ -187,7 +175,8 @@ var addPackageDependencies = /* @__PURE__ */ __name(async (workspaceRoot, projec
|
|
|
187
175
|
}, "addPackageDependencies");
|
|
188
176
|
var addWorkspacePackageJsonFields = /* @__PURE__ */ __name(async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
189
177
|
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : findWorkspaceRoot();
|
|
190
|
-
const
|
|
178
|
+
const workspacePackageJsonContent = await readFile3(joinPaths(workspaceRoot, "package.json"), "utf8");
|
|
179
|
+
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
191
180
|
packageJson.type ??= "module";
|
|
192
181
|
packageJson.sideEffects ??= false;
|
|
193
182
|
if (includeSrc === true) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
+
var _chunkLDCPNOWXjs = require('./chunk-LDCPNOWX.js');
|
|
3
4
|
|
|
4
|
-
var _chunkULBTYC2Bjs = require('./chunk-ULBTYC2B.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkULBTYC2Bjs = require('./chunk-ULBTYC2B.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -15,7 +15,7 @@ async function cargoBuildExecutor(options, context) {
|
|
|
15
15
|
return await _chunkULBTYC2Bjs.cargoCommand.call(void 0, ...command);
|
|
16
16
|
}
|
|
17
17
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoBuildExecutor, "cargoBuildExecutor");
|
|
18
|
-
var executor_default =
|
|
18
|
+
var executor_default = _chunkLDCPNOWXjs.withRunExecutor.call(void 0, "Cargo Build", cargoBuildExecutor, {
|
|
19
19
|
skipReadingConfig: false,
|
|
20
20
|
hooks: {
|
|
21
21
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
+
var _chunkLDCPNOWXjs = require('./chunk-LDCPNOWX.js');
|
|
3
4
|
|
|
4
|
-
var _chunkULBTYC2Bjs = require('./chunk-ULBTYC2B.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkULBTYC2Bjs = require('./chunk-ULBTYC2B.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
@@ -15,7 +15,7 @@ async function cargoClippyExecutor(options, context) {
|
|
|
15
15
|
return await _chunkULBTYC2Bjs.cargoCommand.call(void 0, ...command);
|
|
16
16
|
}
|
|
17
17
|
_chunk3GQAWCBQjs.__name.call(void 0, cargoClippyExecutor, "cargoClippyExecutor");
|
|
18
|
-
var executor_default =
|
|
18
|
+
var executor_default = _chunkLDCPNOWXjs.withRunExecutor.call(void 0, "Cargo Clippy", cargoClippyExecutor, {
|
|
19
19
|
skipReadingConfig: false,
|
|
20
20
|
hooks: {
|
|
21
21
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
withRunExecutor
|
|
3
|
+
} from "./chunk-UENELRBB.mjs";
|
|
1
4
|
import {
|
|
2
5
|
buildCargoCommand,
|
|
3
6
|
cargoCommand
|
|
4
7
|
} from "./chunk-QZHIWK5Z.mjs";
|
|
5
|
-
import {
|
|
6
|
-
withRunExecutor
|
|
7
|
-
} from "./chunk-J4POXWGW.mjs";
|
|
8
8
|
import {
|
|
9
9
|
__name
|
|
10
10
|
} from "./chunk-XUV4U54K.mjs";
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk22DNWOG2js = require('./chunk-22DNWOG2.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkLDCPNOWXjs = require('./chunk-LDCPNOWX.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -366,9 +366,9 @@ async function generatePackageJson(options) {
|
|
|
366
366
|
throw new Error("Cannot find package.json configuration file");
|
|
367
367
|
}
|
|
368
368
|
let packageJson = JSON.parse(packageJsonContent);
|
|
369
|
-
packageJson = await
|
|
370
|
-
packageJson = await
|
|
371
|
-
await _devkit.writeJsonFile.call(void 0, _chunkXCSSYTCUjs.joinPaths.call(void 0, options.outDir, "package.json"), await
|
|
369
|
+
packageJson = await _chunk22DNWOG2js.addPackageDependencies.call(void 0, options.config.workspaceRoot, options.projectRoot, options.projectName, packageJson);
|
|
370
|
+
packageJson = await _chunk22DNWOG2js.addWorkspacePackageJsonFields.call(void 0, options.config, options.projectRoot, options.sourceRoot, options.projectName, false, packageJson);
|
|
371
|
+
await _devkit.writeJsonFile.call(void 0, _chunkXCSSYTCUjs.joinPaths.call(void 0, options.outDir, "package.json"), await _chunk22DNWOG2js.addPackageJsonExports.call(void 0, options.sourceRoot, packageJson));
|
|
372
372
|
stopwatch();
|
|
373
373
|
}
|
|
374
374
|
return options;
|
|
@@ -391,7 +391,7 @@ _chunk3GQAWCBQjs.__name.call(void 0, executeUnbuild, "executeUnbuild");
|
|
|
391
391
|
async function copyBuildAssets(options) {
|
|
392
392
|
_chunkIX2EZD3Fjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${options.outDir}`, options.config);
|
|
393
393
|
const stopwatch = _chunkIX2EZD3Fjs.getStopwatch.call(void 0, `${options.name} asset copy`);
|
|
394
|
-
await
|
|
394
|
+
await _chunk22DNWOG2js.copyAssets.call(void 0, options.config, _nullishCoalesce(options.assets, () => ( [])), options.outDir, options.projectRoot, options.projectName, options.sourceRoot, options.generatePackageJson, options.includeSrc);
|
|
395
395
|
stopwatch();
|
|
396
396
|
return options;
|
|
397
397
|
}
|
|
@@ -468,7 +468,7 @@ async function unbuildExecutorFn(options, context, config) {
|
|
|
468
468
|
};
|
|
469
469
|
}
|
|
470
470
|
_chunk3GQAWCBQjs.__name.call(void 0, unbuildExecutorFn, "unbuildExecutorFn");
|
|
471
|
-
var executor_default =
|
|
471
|
+
var executor_default = _chunkLDCPNOWXjs.withRunExecutor.call(void 0, "TypeScript Unbuild build", unbuildExecutorFn, {
|
|
472
472
|
skipReadingConfig: false,
|
|
473
473
|
hooks: {
|
|
474
474
|
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (options, config) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
withRunExecutor
|
|
3
|
+
} from "./chunk-UENELRBB.mjs";
|
|
1
4
|
import {
|
|
2
5
|
buildCargoCommand,
|
|
3
6
|
cargoCommand
|
|
4
7
|
} from "./chunk-QZHIWK5Z.mjs";
|
|
5
|
-
import {
|
|
6
|
-
withRunExecutor
|
|
7
|
-
} from "./chunk-J4POXWGW.mjs";
|
|
8
8
|
import {
|
|
9
9
|
__name
|
|
10
10
|
} from "./chunk-XUV4U54K.mjs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
withRunExecutor
|
|
3
|
+
} from "./chunk-UENELRBB.mjs";
|
|
1
4
|
import {
|
|
2
5
|
buildCargoCommand,
|
|
3
6
|
cargoCommand
|
|
4
7
|
} from "./chunk-QZHIWK5Z.mjs";
|
|
5
|
-
import {
|
|
6
|
-
withRunExecutor
|
|
7
|
-
} from "./chunk-J4POXWGW.mjs";
|
|
8
8
|
import {
|
|
9
9
|
__name
|
|
10
10
|
} from "./chunk-XUV4U54K.mjs";
|