@storm-software/workspace-tools 1.263.1 → 1.264.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 +16 -0
- package/README.md +12 -30
- package/dist/{chunk-G6GGPUG7.mjs → chunk-267XQYEI.mjs} +4 -4
- package/dist/{chunk-2WTKQCPA.mjs → chunk-2BPV2XV2.mjs} +1 -1
- package/dist/{chunk-GCN3NUF6.mjs → chunk-3FTFBAIV.mjs} +1 -1
- package/dist/{chunk-OQ32KFGA.mjs → chunk-3PWCELL5.mjs} +2 -2
- package/dist/{chunk-IT3ENPW3.mjs → chunk-3RLLSZI3.mjs} +3 -3
- package/dist/{chunk-XEHJM6RO.mjs → chunk-5CZXBNEE.mjs} +1 -1
- package/dist/{chunk-VOIYJ67D.mjs → chunk-5DWBECCN.mjs} +4 -4
- package/dist/{chunk-GPOYI6OO.mjs → chunk-77KNPIOO.mjs} +3 -3
- package/dist/{chunk-4PDLEPIC.mjs → chunk-7ENGREV2.mjs} +1 -1
- package/dist/{chunk-IGJN2SBZ.mjs → chunk-AD4BVP7F.mjs} +2 -2
- package/dist/{chunk-HASYGI6W.mjs → chunk-ATIBREWM.mjs} +1 -1
- package/dist/{chunk-5JPH5VCU.mjs → chunk-AWKIWCLR.mjs} +2 -2
- package/dist/{chunk-GRU4UEE7.mjs → chunk-BMNXBEWE.mjs} +3 -3
- package/dist/{chunk-BV32SZPV.mjs → chunk-EVQJFIA7.mjs} +3 -3
- package/dist/{chunk-3I74ESKM.mjs → chunk-FIJJTQKT.mjs} +3 -3
- package/dist/{chunk-2PKZRCQJ.mjs → chunk-FR3YQN55.mjs} +2 -2
- package/dist/{chunk-U6DRC3BT.mjs → chunk-G6VTRIV6.mjs} +4 -4
- package/dist/{chunk-STVTZJIX.mjs → chunk-GKFEPODO.mjs} +3 -3
- package/dist/{chunk-6YMGUA6X.mjs → chunk-H5VTYV4U.mjs} +2 -2
- package/dist/{chunk-J53HKGFM.mjs → chunk-HUVBVDJ7.mjs} +1 -1
- package/dist/{chunk-L6CV744X.mjs → chunk-IXZ3PGBP.mjs} +3 -3
- package/dist/{chunk-GHJGKUBW.mjs → chunk-JIAGNEII.mjs} +1 -1
- package/dist/{chunk-H4RWKANW.mjs → chunk-KTJM6G4K.mjs} +1 -1
- package/dist/{chunk-TAJU54DW.mjs → chunk-LZ4WXOF5.mjs} +3 -3
- package/dist/{chunk-RGZAGFUD.mjs → chunk-MDK5L6VS.mjs} +4 -4
- package/dist/{chunk-3ABED6KX.mjs → chunk-NZAGHP4Q.mjs} +4 -4
- package/dist/{chunk-6QKCP4DS.js → chunk-PD4CDI7L.js} +296 -41
- package/dist/{chunk-R2BMSX6J.mjs → chunk-RLG36VMZ.mjs} +3 -3
- package/dist/{chunk-XIS3TY42.mjs → chunk-RMNEVFW4.mjs} +4 -4
- package/dist/{chunk-3XR4FSEA.mjs → chunk-V4QUJRZH.mjs} +4 -4
- package/dist/{chunk-AOOHLS72.mjs → chunk-VJJBBVYU.mjs} +3 -3
- package/dist/{chunk-EF7U4632.mjs → chunk-VYHRGNJQ.mjs} +306 -51
- package/dist/{chunk-OBUTMEEY.mjs → chunk-XB6ATVWM.mjs} +3 -3
- package/dist/{chunk-OVLYU6HE.mjs → chunk-XBRJIYCS.mjs} +2 -2
- package/dist/{chunk-HY43JWZ7.mjs → chunk-XDVGK64G.mjs} +2 -2
- package/dist/{chunk-RULS5ZOT.mjs → chunk-YBDZ7EWU.mjs} +2 -2
- package/dist/{chunk-BGSGM2KX.mjs → chunk-YPUNRGTW.mjs} +3 -3
- package/dist/{chunk-SF477J3B.mjs → chunk-YZLAY7R4.mjs} +3 -3
- package/dist/{chunk-WJTTZD3M.mjs → chunk-ZETTXDZO.mjs} +1 -1
- package/dist/{chunk-DGI7OQYG.mjs → chunk-ZPN57TH7.mjs} +4 -4
- package/dist/{chunk-B5OPGMAP.mjs → chunk-ZUYLHO4U.mjs} +1 -1
- package/dist/executors.d.mts +0 -1
- package/dist/executors.d.ts +0 -1
- package/dist/executors.js +5 -10
- package/dist/executors.mjs +23 -28
- package/dist/generators.js +5 -5
- package/dist/generators.mjs +20 -20
- package/dist/index.d.mts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +10 -15
- package/dist/index.mjs +45 -50
- package/dist/src/base/base-executor.mjs +6 -6
- package/dist/src/base/base-executor.untyped.mjs +1 -1
- package/dist/src/base/base-generator.mjs +6 -6
- package/dist/src/base/base-generator.untyped.mjs +1 -1
- package/dist/src/base/cargo-base-executor.untyped.mjs +1 -1
- package/dist/src/base/index.mjs +10 -10
- package/dist/src/base/typescript-build-executor.untyped.mjs +2 -2
- package/dist/src/base/typescript-library-generator.untyped.mjs +1 -1
- package/dist/src/executors/cargo-build/executor.mjs +8 -8
- package/dist/src/executors/cargo-build/untyped.mjs +1 -1
- package/dist/src/executors/cargo-check/executor.mjs +8 -8
- package/dist/src/executors/cargo-check/untyped.mjs +1 -1
- package/dist/src/executors/cargo-clippy/executor.mjs +8 -8
- package/dist/src/executors/cargo-clippy/untyped.mjs +1 -1
- package/dist/src/executors/cargo-doc/executor.mjs +8 -8
- package/dist/src/executors/cargo-doc/untyped.mjs +1 -1
- package/dist/src/executors/cargo-format/executor.mjs +8 -8
- package/dist/src/executors/cargo-format/untyped.mjs +1 -1
- package/dist/src/executors/cargo-publish/executor.mjs +3 -3
- package/dist/src/executors/cargo-publish/untyped.mjs +1 -1
- package/dist/src/executors/clean-package/executor.mjs +6 -6
- package/dist/src/executors/clean-package/untyped.mjs +1 -1
- package/dist/src/executors/esbuild/executor.js +2 -3
- package/dist/src/executors/esbuild/executor.mjs +7 -8
- package/dist/src/executors/esbuild/untyped.mjs +2 -2
- package/dist/src/executors/npm-publish/executor.mjs +4 -4
- package/dist/src/executors/npm-publish/untyped.mjs +1 -1
- package/dist/src/executors/size-limit/executor.mjs +7 -7
- package/dist/src/executors/size-limit/untyped.mjs +1 -1
- package/dist/src/executors/typia/executor.mjs +7 -7
- package/dist/src/executors/typia/untyped.mjs +1 -1
- package/dist/src/executors/unbuild/executor.mjs +7 -7
- package/dist/src/executors/unbuild/untyped.mjs +2 -2
- package/dist/src/generators/browser-library/generator.mjs +9 -9
- package/dist/src/generators/browser-library/untyped.mjs +1 -1
- package/dist/src/generators/config-schema/generator.mjs +7 -7
- package/dist/src/generators/config-schema/untyped.mjs +1 -1
- package/dist/src/generators/init/init.mjs +2 -2
- package/dist/src/generators/init/untyped.mjs +1 -1
- package/dist/src/generators/neutral-library/generator.mjs +9 -9
- package/dist/src/generators/neutral-library/untyped.mjs +1 -1
- package/dist/src/generators/node-library/generator.mjs +9 -9
- package/dist/src/generators/node-library/untyped.mjs +1 -1
- package/dist/src/generators/preset/generator.mjs +7 -7
- package/dist/src/generators/preset/untyped.mjs +1 -1
- package/dist/src/generators/release-version/generator.mjs +6 -6
- package/dist/src/generators/release-version/untyped.mjs +1 -1
- package/dist/src/plugins/rust/cargo-toml.mjs +4 -4
- package/dist/src/plugins/rust/index.mjs +4 -4
- package/dist/src/plugins/typescript/index.mjs +4 -4
- package/dist/src/plugins/typescript/project-config.mjs +4 -4
- package/dist/src/plugins/typescript/tsup.mjs +2 -2
- package/dist/src/plugins/typescript/untyped-schema.mjs +2 -2
- package/dist/src/types.mjs +1 -1
- package/dist/src/utils/apply-workspace-tokens.mjs +4 -4
- package/dist/src/utils/cargo.mjs +2 -2
- package/dist/src/utils/create-cli-options.mjs +2 -2
- package/dist/src/utils/get-project-configurations.mjs +4 -4
- package/dist/src/utils/index.mjs +14 -14
- package/dist/src/utils/lock-file.mjs +2 -2
- package/dist/src/utils/package-helpers.mjs +4 -4
- package/dist/src/utils/plugin-helpers.mjs +3 -3
- package/dist/src/utils/pnpm-deps-update.mjs +3 -3
- package/dist/src/utils/project-tags.mjs +2 -2
- package/dist/src/utils/toml.mjs +2 -2
- package/dist/src/utils/typia-transform.mjs +2 -2
- package/dist/src/utils/versions.mjs +1 -1
- package/executors.json +0 -5
- package/package.json +3 -6
- package/dist/chunk-55IQXVOQ.js +0 -308
- package/dist/chunk-IFSORSAN.js +0 -304
- package/dist/chunk-SE2XSR7P.mjs +0 -304
- package/dist/chunk-UFPTODUJ.mjs +0 -308
- package/dist/executor-BDvqiAmr.d.ts +0 -144
- package/dist/executor-KAQdKP88.d.mts +0 -144
- package/dist/src/executors/tsdown/executor.d.mts +0 -4
- package/dist/src/executors/tsdown/executor.d.ts +0 -4
- package/dist/src/executors/tsdown/executor.js +0 -15
- package/dist/src/executors/tsdown/executor.mjs +0 -15
- package/dist/src/executors/tsdown/schema.d.ts +0 -135
- package/dist/src/executors/tsdown/schema.json +0 -174
- package/dist/src/executors/tsdown/schema.md +0 -126
- package/dist/src/executors/tsdown/untyped.d.mts +0 -5
- package/dist/src/executors/tsdown/untyped.d.ts +0 -5
- package/dist/src/executors/tsdown/untyped.js +0 -19
- package/dist/src/executors/tsdown/untyped.mjs +0 -19
- package/dist/src/plugins/typescript/tsdown.d.mts +0 -7
- package/dist/src/plugins/typescript/tsdown.d.ts +0 -7
- package/dist/src/plugins/typescript/tsdown.js +0 -159
- package/dist/src/plugins/typescript/tsdown.mjs +0 -159
- package/docs/api/executors/tsdown/schema.md +0 -126
- /package/dist/{chunk-3J53KHVV.js → chunk-7VDOGZYO.js} +0 -0
- /package/dist/{chunk-V7YZ3666.mjs → chunk-BLX5SLPC.mjs} +0 -0
|
@@ -1,38 +1,220 @@
|
|
|
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(); } } 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 _chunkFGMOZZ77js = require('./chunk-FGMOZZ77.js');
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
|
|
9
|
-
var _chunkIFSORSANjs = require('./chunk-IFSORSAN.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var _chunkFGMOZZ77js = require('./chunk-FGMOZZ77.js');
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
|
|
16
|
+
var _chunkNG6GE2YZjs = require('./chunk-NG6GE2YZ.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
+
var _chunk4JOIS7WWjs = require('./chunk-4JOIS7WW.js');
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
|
|
23
|
+
var _chunkJTAXCQX6js = require('./chunk-JTAXCQX6.js');
|
|
22
24
|
|
|
23
25
|
|
|
24
26
|
|
|
25
|
-
var
|
|
27
|
+
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
26
28
|
|
|
29
|
+
// ../esbuild/src/build.ts
|
|
30
|
+
var _devkit = require('@nx/devkit');
|
|
27
31
|
|
|
28
|
-
|
|
32
|
+
// ../build-tools/src/config.ts
|
|
33
|
+
var DEFAULT_COMPILED_BANNER = `/*****************************************
|
|
34
|
+
*
|
|
35
|
+
* \u26A1 Built by Storm Software
|
|
36
|
+
*
|
|
37
|
+
*****************************************/
|
|
38
|
+
`;
|
|
39
|
+
var DEFAULT_ENVIRONMENT = "production";
|
|
40
|
+
var DEFAULT_TARGET = "esnext";
|
|
41
|
+
var DEFAULT_ORGANIZATION = "storm-software";
|
|
29
42
|
|
|
43
|
+
// ../build-tools/src/plugins/swc.ts
|
|
44
|
+
var _core = require('@swc/core');
|
|
30
45
|
|
|
46
|
+
// ../build-tools/src/plugins/ts-resolve.ts
|
|
47
|
+
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
48
|
+
var _module = require('module');
|
|
49
|
+
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
50
|
+
var _resolve2 = require('resolve'); var _resolve3 = _interopRequireDefault(_resolve2);
|
|
31
51
|
|
|
32
|
-
|
|
52
|
+
// ../build-tools/src/plugins/type-definitions.ts
|
|
33
53
|
|
|
34
|
-
|
|
35
|
-
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
// ../build-tools/src/utilities/copy-assets.ts
|
|
57
|
+
var _copyassetshandler = require('@nx/js/src/utils/assets/copy-assets-handler');
|
|
58
|
+
var _glob = require('glob');
|
|
59
|
+
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
60
|
+
var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
|
|
61
|
+
const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
|
|
62
|
+
pendingAssets.push({
|
|
63
|
+
input: projectRoot,
|
|
64
|
+
glob: "*.md",
|
|
65
|
+
output: "."
|
|
66
|
+
});
|
|
67
|
+
pendingAssets.push({
|
|
68
|
+
input: ".",
|
|
69
|
+
glob: "LICENSE",
|
|
70
|
+
output: "."
|
|
71
|
+
});
|
|
72
|
+
if (generatePackageJson2 === false) {
|
|
73
|
+
pendingAssets.push({
|
|
74
|
+
input: projectRoot,
|
|
75
|
+
glob: "package.json",
|
|
76
|
+
output: "."
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
if (includeSrc === true) {
|
|
80
|
+
pendingAssets.push({
|
|
81
|
+
input: sourceRoot,
|
|
82
|
+
glob: "**/{*.ts,*.tsx,*.js,*.jsx}",
|
|
83
|
+
output: "src/"
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
_chunkNG6GE2YZjs.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
87
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkJTAXCQX6js.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
88
|
+
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
89
|
+
projectDir: projectRoot,
|
|
90
|
+
rootDir: config.workspaceRoot,
|
|
91
|
+
outputDir: outputPath,
|
|
92
|
+
assets: pendingAssets
|
|
93
|
+
});
|
|
94
|
+
await assetHandler.processAllAssetsOnce();
|
|
95
|
+
if (includeSrc === true) {
|
|
96
|
+
_chunkNG6GE2YZjs.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkJTAXCQX6js.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
97
|
+
const files = await _glob.glob.call(void 0, [
|
|
98
|
+
_chunkJTAXCQX6js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
99
|
+
_chunkJTAXCQX6js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
100
|
+
_chunkJTAXCQX6js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
101
|
+
_chunkJTAXCQX6js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
102
|
+
]);
|
|
103
|
+
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
104
|
+
|
|
105
|
+
${await _promises.readFile.call(void 0, file, "utf8")}
|
|
106
|
+
|
|
107
|
+
${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`)));
|
|
108
|
+
}
|
|
109
|
+
}, "copyAssets");
|
|
110
|
+
|
|
111
|
+
// ../build-tools/src/utilities/generate-package-json.ts
|
|
112
|
+
var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
var _projectgraph = require('nx/src/project-graph/project-graph');
|
|
117
|
+
var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (workspaceRoot, projectRoot, projectName, packageJson) => {
|
|
118
|
+
const projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
119
|
+
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);
|
|
120
|
+
const localPackages = [];
|
|
121
|
+
for (const project of projectDependencies.dependencies.filter((dep) => dep.node.type === "lib" && dep.node.data.root !== projectRoot && dep.node.data.root !== workspaceRoot)) {
|
|
122
|
+
const projectNode = project.node;
|
|
123
|
+
if (projectNode.data.root) {
|
|
124
|
+
const projectPackageJsonPath = _chunkJTAXCQX6js.joinPaths.call(void 0, workspaceRoot, projectNode.data.root, "package.json");
|
|
125
|
+
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
126
|
+
const projectPackageJsonContent = await _promises.readFile.call(void 0, projectPackageJsonPath, "utf8");
|
|
127
|
+
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
128
|
+
if (projectPackageJson.private !== true) {
|
|
129
|
+
localPackages.push(projectPackageJson);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
if (localPackages.length > 0) {
|
|
135
|
+
_chunkNG6GE2YZjs.writeTrace.call(void 0, `\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`);
|
|
136
|
+
const projectJsonFile = await _promises.readFile.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, projectRoot, "project.json"), "utf8");
|
|
137
|
+
const projectJson = JSON.parse(projectJsonFile);
|
|
138
|
+
const projectName2 = projectJson.name;
|
|
139
|
+
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
140
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _2 => _2.projects, 'optionalAccess', _3 => _3[projectName2]])) {
|
|
141
|
+
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.");
|
|
142
|
+
}
|
|
143
|
+
const implicitDependencies = _optionalChain([projectConfigurations, 'access', _4 => _4.projects, 'optionalAccess', _5 => _5[projectName2], 'access', _6 => _6.implicitDependencies, 'optionalAccess', _7 => _7.reduce, 'call', _8 => _8((ret, dep) => {
|
|
144
|
+
if (_optionalChain([projectConfigurations, 'access', _9 => _9.projects, 'optionalAccess', _10 => _10[dep]])) {
|
|
145
|
+
const depPackageJsonPath = _chunkJTAXCQX6js.joinPaths.call(void 0, workspaceRoot, projectConfigurations.projects[dep].root, "package.json");
|
|
146
|
+
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
147
|
+
const depPackageJsonContent = _fs.readFileSync.call(void 0, depPackageJsonPath, "utf8");
|
|
148
|
+
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
149
|
+
if (depPackageJson.private !== true && !ret.includes(depPackageJson.name)) {
|
|
150
|
+
ret.push(depPackageJson.name);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return ret;
|
|
155
|
+
}, [])]);
|
|
156
|
+
packageJson.dependencies = localPackages.reduce((ret, localPackage) => {
|
|
157
|
+
if (!ret[localPackage.name] && !_optionalChain([implicitDependencies, 'optionalAccess', _11 => _11.includes, 'call', _12 => _12(localPackage.name)])) {
|
|
158
|
+
ret[localPackage.name] = `>=${localPackage.version || "0.0.1"}`;
|
|
159
|
+
}
|
|
160
|
+
return ret;
|
|
161
|
+
}, _nullishCoalesce(packageJson.dependencies, () => ( {})));
|
|
162
|
+
packageJson.devDependencies = localPackages.reduce((ret, localPackage) => {
|
|
163
|
+
if (!ret[localPackage.name] && _optionalChain([implicitDependencies, 'optionalAccess', _13 => _13.includes, 'call', _14 => _14(localPackage.name)])) {
|
|
164
|
+
ret[localPackage.name] = localPackage.version || "0.0.1";
|
|
165
|
+
}
|
|
166
|
+
return ret;
|
|
167
|
+
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
168
|
+
} else {
|
|
169
|
+
_chunkNG6GE2YZjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
170
|
+
}
|
|
171
|
+
return packageJson;
|
|
172
|
+
}, "addPackageDependencies");
|
|
173
|
+
var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
174
|
+
const workspaceRoot = config.workspaceRoot ? config.workspaceRoot : _chunk4JOIS7WWjs.findWorkspaceRoot.call(void 0, );
|
|
175
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, workspaceRoot, "package.json"), "utf8");
|
|
176
|
+
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
177
|
+
packageJson.type ??= "module";
|
|
178
|
+
packageJson.sideEffects ??= false;
|
|
179
|
+
if (includeSrc === true) {
|
|
180
|
+
let distSrc = sourceRoot.replace(projectRoot, "");
|
|
181
|
+
if (distSrc.startsWith("/")) {
|
|
182
|
+
distSrc = distSrc.substring(1);
|
|
183
|
+
}
|
|
184
|
+
packageJson.source ??= `${_chunkJTAXCQX6js.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
185
|
+
}
|
|
186
|
+
packageJson.files ??= [
|
|
187
|
+
"dist/**/*"
|
|
188
|
+
];
|
|
189
|
+
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
190
|
+
packageJson.files.push("src/**/*");
|
|
191
|
+
}
|
|
192
|
+
packageJson.publishConfig ??= {
|
|
193
|
+
access: "public"
|
|
194
|
+
};
|
|
195
|
+
packageJson.description ??= workspacePackageJson.description;
|
|
196
|
+
packageJson.homepage ??= workspacePackageJson.homepage;
|
|
197
|
+
packageJson.bugs ??= workspacePackageJson.bugs;
|
|
198
|
+
packageJson.license ??= workspacePackageJson.license;
|
|
199
|
+
packageJson.keywords ??= workspacePackageJson.keywords;
|
|
200
|
+
packageJson.funding ??= workspacePackageJson.funding;
|
|
201
|
+
packageJson.author ??= workspacePackageJson.author;
|
|
202
|
+
packageJson.maintainers ??= workspacePackageJson.maintainers;
|
|
203
|
+
if (!packageJson.maintainers && packageJson.author) {
|
|
204
|
+
packageJson.maintainers = [
|
|
205
|
+
packageJson.author
|
|
206
|
+
];
|
|
207
|
+
}
|
|
208
|
+
packageJson.contributors ??= workspacePackageJson.contributors;
|
|
209
|
+
if (!packageJson.contributors && packageJson.author) {
|
|
210
|
+
packageJson.contributors = [
|
|
211
|
+
packageJson.author
|
|
212
|
+
];
|
|
213
|
+
}
|
|
214
|
+
packageJson.repository ??= workspacePackageJson.repository;
|
|
215
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunkJTAXCQX6js.joinPaths.call(void 0, "packages", projectName);
|
|
216
|
+
return packageJson;
|
|
217
|
+
}, "addWorkspacePackageJsonFields");
|
|
36
218
|
|
|
37
219
|
// ../config-tools/src/utilities/run.ts
|
|
38
220
|
var _child_process = require('child_process');
|
|
@@ -53,6 +235,78 @@ var run = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (config, command,
|
|
|
53
235
|
});
|
|
54
236
|
}, "run");
|
|
55
237
|
|
|
238
|
+
// ../build-tools/src/utilities/get-entry-points.ts
|
|
239
|
+
|
|
240
|
+
var getEntryPoints = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (config, projectRoot, sourceRoot, entry, emitOnAll = false) => {
|
|
241
|
+
const workspaceRoot = config.workspaceRoot || _chunk4JOIS7WWjs.findWorkspaceRoot.call(void 0, );
|
|
242
|
+
const entryPoints = [];
|
|
243
|
+
if (entry) {
|
|
244
|
+
if (typeof entry === "string") {
|
|
245
|
+
entryPoints.push(entry);
|
|
246
|
+
} else if (Array.isArray(entry)) {
|
|
247
|
+
entryPoints.push(...entry);
|
|
248
|
+
} else {
|
|
249
|
+
entryPoints.push(...Object.values(entry));
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
if (emitOnAll) {
|
|
253
|
+
entryPoints.push(_chunkJTAXCQX6js.joinPaths.call(void 0, workspaceRoot, sourceRoot || projectRoot, "**/*.{ts,tsx}"));
|
|
254
|
+
}
|
|
255
|
+
const results = await Promise.all(entryPoints.map(async (entryPoint) => {
|
|
256
|
+
const paths = [];
|
|
257
|
+
if (entryPoint.includes("*")) {
|
|
258
|
+
const files = await _glob.glob.call(void 0, entryPoint, {
|
|
259
|
+
withFileTypes: true,
|
|
260
|
+
ignore: [
|
|
261
|
+
"**/node_modules/**"
|
|
262
|
+
]
|
|
263
|
+
});
|
|
264
|
+
paths.push(...files.reduce((ret, filePath) => {
|
|
265
|
+
const result = _chunkJTAXCQX6js.correctPaths.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, filePath.path, filePath.name).replaceAll(_chunkJTAXCQX6js.correctPaths.call(void 0, workspaceRoot), "").replaceAll(_chunkJTAXCQX6js.correctPaths.call(void 0, projectRoot), ""));
|
|
266
|
+
if (result) {
|
|
267
|
+
_chunkNG6GE2YZjs.writeDebug.call(void 0, `Trying to add entry point ${result} at "${_chunkJTAXCQX6js.joinPaths.call(void 0, filePath.path, filePath.name)}"`, config);
|
|
268
|
+
if (!paths.includes(result)) {
|
|
269
|
+
paths.push(result);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return ret;
|
|
273
|
+
}, []));
|
|
274
|
+
} else {
|
|
275
|
+
paths.push(entryPoint);
|
|
276
|
+
}
|
|
277
|
+
return paths;
|
|
278
|
+
}));
|
|
279
|
+
return results.filter(Boolean).reduce((ret, result) => {
|
|
280
|
+
result.forEach((res) => {
|
|
281
|
+
if (res && !ret.includes(res)) {
|
|
282
|
+
ret.push(res);
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
return ret;
|
|
286
|
+
}, []);
|
|
287
|
+
}, "getEntryPoints");
|
|
288
|
+
|
|
289
|
+
// ../build-tools/src/utilities/get-env.ts
|
|
290
|
+
var getEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (builder, options) => {
|
|
291
|
+
return {
|
|
292
|
+
STORM_BUILD: builder,
|
|
293
|
+
STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
|
|
294
|
+
STORM_NAME: options.name,
|
|
295
|
+
STORM_MODE: options.mode || DEFAULT_ENVIRONMENT,
|
|
296
|
+
STORM_PLATFORM: options.platform,
|
|
297
|
+
STORM_FORMAT: JSON.stringify(options.format),
|
|
298
|
+
STORM_TARGET: JSON.stringify(options.target),
|
|
299
|
+
...options.env
|
|
300
|
+
};
|
|
301
|
+
}, "getEnv");
|
|
302
|
+
|
|
303
|
+
// ../build-tools/src/utilities/read-nx-config.ts
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
// ../build-tools/src/utilities/task-graph.ts
|
|
308
|
+
var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
309
|
+
|
|
56
310
|
// ../esbuild/src/build.ts
|
|
57
311
|
var _chokidar = require('chokidar');
|
|
58
312
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
@@ -60,12 +314,12 @@ var _estoolkit = require('es-toolkit');
|
|
|
60
314
|
var _compat = require('es-toolkit/compat');
|
|
61
315
|
var _esbuild = require('esbuild'); var esbuild2 = _interopRequireWildcard(_esbuild); var esbuild = _interopRequireWildcard(_esbuild);
|
|
62
316
|
var _globby = require('globby');
|
|
63
|
-
|
|
64
|
-
|
|
317
|
+
|
|
318
|
+
|
|
65
319
|
var _findworkspaceroot = require('nx/src/utils/find-workspace-root');
|
|
66
320
|
|
|
67
321
|
// ../esbuild/src/base/renderer-engine.ts
|
|
68
|
-
|
|
322
|
+
|
|
69
323
|
var _sourcemap = require('source-map');
|
|
70
324
|
|
|
71
325
|
// ../esbuild/src/utilities/output-file.ts
|
|
@@ -82,8 +336,8 @@ var outputFile = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (fil
|
|
|
82
336
|
var parseSourceMap = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (map2) => {
|
|
83
337
|
return typeof map2 === "string" ? JSON.parse(map2) : map2;
|
|
84
338
|
}, "parseSourceMap");
|
|
85
|
-
var isJS = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (
|
|
86
|
-
var isCSS = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (
|
|
339
|
+
var isJS = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (path6) => /\.(js|mjs|cjs)$/.test(path6), "isJS");
|
|
340
|
+
var isCSS = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (path6) => /\.css$/.test(path6), "isCSS");
|
|
87
341
|
var getSourcemapComment = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (inline, map2, filepath, isCssFile) => {
|
|
88
342
|
if (!map2) return "";
|
|
89
343
|
const prefix = isCssFile ? "/*" : "//";
|
|
@@ -130,15 +384,15 @@ var RendererEngine = class {
|
|
|
130
384
|
if (!relativePath.startsWith("\\\\?\\")) {
|
|
131
385
|
relativePath = relativePath.replace(/\\/g, "/");
|
|
132
386
|
}
|
|
133
|
-
const meta = _optionalChain([metafile, 'optionalAccess',
|
|
387
|
+
const meta = _optionalChain([metafile, 'optionalAccess', _15 => _15.outputs, 'access', _16 => _16[relativePath]]);
|
|
134
388
|
return {
|
|
135
389
|
type: "chunk",
|
|
136
390
|
path: file.path,
|
|
137
391
|
code: file.text,
|
|
138
|
-
map: _optionalChain([outputFiles, 'access',
|
|
139
|
-
entryPoint: _optionalChain([meta, 'optionalAccess',
|
|
140
|
-
exports: _optionalChain([meta, 'optionalAccess',
|
|
141
|
-
imports: _optionalChain([meta, 'optionalAccess',
|
|
392
|
+
map: _optionalChain([outputFiles, 'access', _17 => _17.find, 'call', _18 => _18((f) => f.path === `${file.path}.map`), 'optionalAccess', _19 => _19.text]),
|
|
393
|
+
entryPoint: _optionalChain([meta, 'optionalAccess', _20 => _20.entryPoint]),
|
|
394
|
+
exports: _optionalChain([meta, 'optionalAccess', _21 => _21.exports]),
|
|
395
|
+
imports: _optionalChain([meta, 'optionalAccess', _22 => _22.imports])
|
|
142
396
|
};
|
|
143
397
|
} else {
|
|
144
398
|
return {
|
|
@@ -221,7 +475,7 @@ var esmSplitCodeToCjsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void
|
|
|
221
475
|
name: "storm:esm-split-code-to-cjs",
|
|
222
476
|
setup(build4) {
|
|
223
477
|
build4.onEnd(async (result) => {
|
|
224
|
-
const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access',
|
|
478
|
+
const outFiles = Object.keys(_nullishCoalesce(_optionalChain([result, 'access', _23 => _23.metafile, 'optionalAccess', _24 => _24.outputs]), () => ( {})));
|
|
225
479
|
const jsFiles = outFiles.filter((f) => f.endsWith("js"));
|
|
226
480
|
await esbuild.build({
|
|
227
481
|
outdir: resolvedOptions.outdir,
|
|
@@ -316,8 +570,8 @@ var nodeProtocolPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (o
|
|
|
316
570
|
setup({ onResolve }) {
|
|
317
571
|
onResolve({
|
|
318
572
|
filter: /^node:/
|
|
319
|
-
}, ({ path:
|
|
320
|
-
path:
|
|
573
|
+
}, ({ path: path6 }) => ({
|
|
574
|
+
path: path6.slice(nodeProtocol.length),
|
|
321
575
|
external: true
|
|
322
576
|
}));
|
|
323
577
|
}
|
|
@@ -343,7 +597,7 @@ ${result.errors.map((error) => error.text).join("\n")}
|
|
|
343
597
|
// ../esbuild/src/plugins/resolve-paths.ts
|
|
344
598
|
|
|
345
599
|
function resolvePathsConfig(options, cwd) {
|
|
346
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
600
|
+
if (_optionalChain([options, 'optionalAccess', _25 => _25.compilerOptions, 'optionalAccess', _26 => _26.paths])) {
|
|
347
601
|
const paths = Object.entries(options.compilerOptions.paths);
|
|
348
602
|
const resolvedPaths = paths.map(([key, paths2]) => {
|
|
349
603
|
return [
|
|
@@ -371,7 +625,7 @@ var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (o
|
|
|
371
625
|
build4.onResolve({
|
|
372
626
|
filter: packagesRegex
|
|
373
627
|
}, (args) => {
|
|
374
|
-
if (_optionalChain([build4, 'access',
|
|
628
|
+
if (_optionalChain([build4, 'access', _27 => _27.initialOptions, 'access', _28 => _28.external, 'optionalAccess', _29 => _29.includes, 'call', _30 => _30(args.path)])) {
|
|
375
629
|
return {
|
|
376
630
|
path: args.path,
|
|
377
631
|
external: true
|
|
@@ -480,7 +734,7 @@ var tscPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options, r
|
|
|
480
734
|
function getTypeDependencyPackageName(npmPackage) {
|
|
481
735
|
if (npmPackage.startsWith("@")) {
|
|
482
736
|
const [scope, name] = npmPackage.split("/");
|
|
483
|
-
return `@types/${_optionalChain([scope, 'optionalAccess',
|
|
737
|
+
return `@types/${_optionalChain([scope, 'optionalAccess', _31 => _31.slice, 'call', _32 => _32(1)])}__${name}`;
|
|
484
738
|
}
|
|
485
739
|
return `@types/${npmPackage}`;
|
|
486
740
|
}
|
|
@@ -545,11 +799,11 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
545
799
|
".woff": "file",
|
|
546
800
|
".woff2": "file"
|
|
547
801
|
},
|
|
548
|
-
banner:
|
|
802
|
+
banner: DEFAULT_COMPILED_BANNER
|
|
549
803
|
};
|
|
550
804
|
|
|
551
805
|
// ../esbuild/src/plugins/deps-check.ts
|
|
552
|
-
|
|
806
|
+
|
|
553
807
|
|
|
554
808
|
var unusedIgnore = [
|
|
555
809
|
// these are our dev dependencies
|
|
@@ -696,7 +950,7 @@ function pipeSync(fn, ...fns) {
|
|
|
696
950
|
return (...args) => {
|
|
697
951
|
let result = fn(...args);
|
|
698
952
|
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
699
|
-
result = _optionalChain([fns, 'access',
|
|
953
|
+
result = _optionalChain([fns, 'access', _33 => _33[i], 'optionalCall', _34 => _34(result)]);
|
|
700
954
|
}
|
|
701
955
|
return result;
|
|
702
956
|
};
|
|
@@ -706,7 +960,7 @@ function pipeAsync(fn, ...fns) {
|
|
|
706
960
|
return async (...args) => {
|
|
707
961
|
let result = await fn(...args);
|
|
708
962
|
for (let i = 0; result !== skip && i < fns.length; ++i) {
|
|
709
|
-
result = await _optionalChain([fns, 'access',
|
|
963
|
+
result = await _optionalChain([fns, 'access', _35 => _35[i], 'optionalCall', _36 => _36(result)]);
|
|
710
964
|
}
|
|
711
965
|
return result;
|
|
712
966
|
};
|
|
@@ -736,17 +990,17 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
736
990
|
const projectJson = JSON.parse(projectJsonFile);
|
|
737
991
|
const projectName = projectJson.name;
|
|
738
992
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
739
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
993
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _37 => _37.projects, 'optionalAccess', _38 => _38[projectName]])) {
|
|
740
994
|
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.");
|
|
741
995
|
}
|
|
742
996
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
743
997
|
options.name ??= `${projectName}-${options.format}`;
|
|
744
|
-
options.target ??=
|
|
998
|
+
options.target ??= DEFAULT_TARGET;
|
|
745
999
|
const packageJsonPath = _chunkJTAXCQX6js.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
|
|
746
1000
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
747
1001
|
throw new Error("Cannot find package.json configuration");
|
|
748
1002
|
}
|
|
749
|
-
const env =
|
|
1003
|
+
const env = getEnv("esbuild", options);
|
|
750
1004
|
const result = {
|
|
751
1005
|
...options,
|
|
752
1006
|
config,
|
|
@@ -761,7 +1015,7 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
761
1015
|
...userOptions,
|
|
762
1016
|
tsconfig: _chunkJTAXCQX6js.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
763
1017
|
format: options.format || "cjs",
|
|
764
|
-
entryPoints: await
|
|
1018
|
+
entryPoints: await getEntryPoints(config, projectRoot, projectJson.sourceRoot, _nullishCoalesce(userOptions.entry, () => ( "./src/index.ts")), userOptions.emitOnAll === true),
|
|
765
1019
|
outdir: userOptions.outputPath || _chunkJTAXCQX6js.joinPaths.call(void 0, "dist", projectRoot),
|
|
766
1020
|
distDir: userOptions.distDir || "dist",
|
|
767
1021
|
plugins: [],
|
|
@@ -784,8 +1038,8 @@ var resolveOptions = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async
|
|
|
784
1038
|
watch: userOptions.watch === true,
|
|
785
1039
|
footer: userOptions.footer,
|
|
786
1040
|
banner: {
|
|
787
|
-
js: options.banner ||
|
|
788
|
-
css: options.banner ||
|
|
1041
|
+
js: options.banner || DEFAULT_COMPILED_BANNER,
|
|
1042
|
+
css: options.banner || DEFAULT_COMPILED_BANNER
|
|
789
1043
|
},
|
|
790
1044
|
splitting: options.format === "iife" ? false : typeof options.splitting === "boolean" ? options.splitting : options.format === "esm",
|
|
791
1045
|
treeShaking: options.format === "esm",
|
|
@@ -831,8 +1085,8 @@ async function generatePackageJson(context2) {
|
|
|
831
1085
|
if (!packageJson) {
|
|
832
1086
|
throw new Error("Cannot find package.json configuration file");
|
|
833
1087
|
}
|
|
834
|
-
packageJson = await
|
|
835
|
-
packageJson = await
|
|
1088
|
+
packageJson = await addPackageDependencies(context2.options.config.workspaceRoot, context2.options.projectRoot, context2.options.projectName, packageJson);
|
|
1089
|
+
packageJson = await addWorkspacePackageJsonFields(context2.options.config, context2.options.projectRoot, context2.options.sourceRoot, context2.options.projectName, false, packageJson);
|
|
836
1090
|
packageJson.exports ??= {};
|
|
837
1091
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
838
1092
|
packageJson.exports["."] ??= `.${context2.options.distDir ? `/${context2.options.distDir}` : ""}/index.js`;
|
|
@@ -903,6 +1157,7 @@ async function executeEsBuild(context2) {
|
|
|
903
1157
|
const options = {
|
|
904
1158
|
...context2.options
|
|
905
1159
|
};
|
|
1160
|
+
options.outdir = _chunkJTAXCQX6js.joinPaths.call(void 0, context2.options.outdir, context2.options.distDir);
|
|
906
1161
|
delete options.env;
|
|
907
1162
|
delete options.name;
|
|
908
1163
|
delete options.assets;
|
|
@@ -935,17 +1190,17 @@ ${_chunkNG6GE2YZjs.formatLogMessage.call(void 0, options)}`, context2.options.co
|
|
|
935
1190
|
}
|
|
936
1191
|
_chunk3GQAWCBQjs.__name.call(void 0, executeEsBuild, "executeEsBuild");
|
|
937
1192
|
async function copyBuildAssets(context2) {
|
|
938
|
-
if (_optionalChain([context2, 'access',
|
|
1193
|
+
if (_optionalChain([context2, 'access', _39 => _39.result, 'optionalAccess', _40 => _40.errors, 'access', _41 => _41.length]) === 0) {
|
|
939
1194
|
_chunkNG6GE2YZjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context2.options.outdir}`, context2.options.config);
|
|
940
1195
|
const stopwatch = _chunkNG6GE2YZjs.getStopwatch.call(void 0, `${context2.options.name} asset copy`);
|
|
941
|
-
await
|
|
1196
|
+
await copyAssets(context2.options.config, _nullishCoalesce(context2.options.assets, () => ( [])), context2.options.outdir, context2.options.projectRoot, context2.options.sourceRoot, true, false);
|
|
942
1197
|
stopwatch();
|
|
943
1198
|
}
|
|
944
1199
|
return context2;
|
|
945
1200
|
}
|
|
946
1201
|
_chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
947
1202
|
async function reportResults(context2) {
|
|
948
|
-
if (_optionalChain([context2, 'access',
|
|
1203
|
+
if (_optionalChain([context2, 'access', _42 => _42.result, 'optionalAccess', _43 => _43.errors, 'access', _44 => _44.length]) === 0) {
|
|
949
1204
|
if (context2.result.warnings.length > 0) {
|
|
950
1205
|
_chunkNG6GE2YZjs.writeWarning.call(void 0, ` \u{1F6A7} The following warnings occurred during the build: ${context2.result.warnings.map((warning) => warning.text).join("\n")}`, context2.options.config);
|
|
951
1206
|
}
|
|
@@ -1046,14 +1301,14 @@ var watch = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context2, opti
|
|
|
1046
1301
|
// src/executors/esbuild/executor.ts
|
|
1047
1302
|
async function esbuildExecutorFn(options, context2, config) {
|
|
1048
1303
|
_chunkNG6GE2YZjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
1049
|
-
if (!_optionalChain([context2, 'access',
|
|
1304
|
+
if (!_optionalChain([context2, 'access', _45 => _45.projectsConfigurations, 'optionalAccess', _46 => _46.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName] || !_optionalChain([context2, 'access', _47 => _47.projectsConfigurations, 'access', _48 => _48.projects, 'access', _49 => _49[context2.projectName], 'optionalAccess', _50 => _50.root])) {
|
|
1050
1305
|
throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
|
|
1051
1306
|
}
|
|
1052
1307
|
await build3({
|
|
1053
1308
|
...options,
|
|
1054
|
-
projectRoot: _optionalChain([context2, 'access',
|
|
1309
|
+
projectRoot: _optionalChain([context2, 'access', _51 => _51.projectsConfigurations, 'access', _52 => _52.projects, 'optionalAccess', _53 => _53[context2.projectName], 'access', _54 => _54.root]),
|
|
1055
1310
|
projectName: context2.projectName,
|
|
1056
|
-
sourceRoot: _optionalChain([context2, 'access',
|
|
1311
|
+
sourceRoot: _optionalChain([context2, 'access', _55 => _55.projectsConfigurations, 'access', _56 => _56.projects, 'optionalAccess', _57 => _57[context2.projectName], 'optionalAccess', _58 => _58.sourceRoot]),
|
|
1057
1312
|
format: options.format,
|
|
1058
1313
|
platform: options.format
|
|
1059
1314
|
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getProjectPlatform
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XBRJIYCS.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ProjectTagConstants,
|
|
6
6
|
addProjectTag,
|
|
7
7
|
isEqualProjectTag,
|
|
8
8
|
setDefaultProjectTags
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HUVBVDJ7.mjs";
|
|
10
10
|
import {
|
|
11
11
|
__name
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2BPV2XV2.mjs";
|
|
13
13
|
|
|
14
14
|
// src/plugins/typescript/project-config.ts
|
|
15
15
|
import { existsSync } from "node:fs";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeOptions,
|
|
3
3
|
typeScriptLibraryGeneratorFn
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YZLAY7R4.mjs";
|
|
5
5
|
import {
|
|
6
6
|
withRunGenerator
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZPN57TH7.mjs";
|
|
8
8
|
import {
|
|
9
9
|
joinPaths
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ATIBREWM.mjs";
|
|
11
11
|
import {
|
|
12
12
|
__dirname,
|
|
13
13
|
__name
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2BPV2XV2.mjs";
|
|
15
15
|
|
|
16
16
|
// src/generators/browser-library/generator.ts
|
|
17
17
|
import { formatFiles, generateFiles, names, offsetFromRoot } from "@nx/devkit";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeOptions,
|
|
3
3
|
typeScriptLibraryGeneratorFn
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YZLAY7R4.mjs";
|
|
5
5
|
import {
|
|
6
6
|
typesNodeVersion
|
|
7
7
|
} from "./chunk-EK75QNMS.mjs";
|
|
8
8
|
import {
|
|
9
9
|
withRunGenerator
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZPN57TH7.mjs";
|
|
11
11
|
import {
|
|
12
12
|
joinPaths
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ATIBREWM.mjs";
|
|
14
14
|
import {
|
|
15
15
|
__dirname,
|
|
16
16
|
__name
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-2BPV2XV2.mjs";
|
|
18
18
|
|
|
19
19
|
// src/generators/node-library/generator.ts
|
|
20
20
|
import { formatFiles, generateFiles, names, offsetFromRoot } from "@nx/devkit";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cargoMetadata,
|
|
3
3
|
isExternal
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JIAGNEII.mjs";
|
|
5
5
|
import {
|
|
6
6
|
ProjectTagConstants,
|
|
7
7
|
addProjectTag,
|
|
8
8
|
setDefaultProjectTags
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HUVBVDJ7.mjs";
|
|
10
10
|
import {
|
|
11
11
|
__name
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2BPV2XV2.mjs";
|
|
13
13
|
|
|
14
14
|
// src/plugins/rust/cargo-toml.ts
|
|
15
15
|
import { createNodesFromFiles, joinPathFragments, readJsonFile, workspaceRoot } from "@nx/devkit";
|