@storm-software/build-tools 0.135.6 → 0.136.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/README.md +1 -1
- package/dist/{chunk-OZZ4PV5Q.mjs → chunk-4CEXR3WS.mjs} +1 -1
- package/dist/{chunk-OOTITTRD.mjs → chunk-4QSSCZ4Z.mjs} +1 -1
- package/dist/{chunk-DIPQPQCV.js → chunk-6LPGL3E4.js} +2 -2
- package/dist/{chunk-OWHNR6AR.mjs → chunk-AMQI4RIK.mjs} +11 -37
- package/dist/{chunk-F4IA5EOZ.js → chunk-BIVPMVHQ.js} +42 -42
- package/dist/{chunk-NSSZFPK3.js → chunk-DNAOERFD.js} +52 -57
- package/dist/{chunk-YZWFPYXZ.js → chunk-DZ22WFPY.js} +8 -8
- package/dist/{chunk-RLC4K7JE.mjs → chunk-E6JPW774.mjs} +51 -56
- package/dist/{chunk-SX4QCTRO.js → chunk-FJUDK5FI.js} +5 -5
- package/dist/{chunk-IZFBLO57.mjs → chunk-KJY2LZUC.mjs} +1 -1
- package/dist/{chunk-IOSCJN6Z.mjs → chunk-QE75GUF6.mjs} +1 -1
- package/dist/{chunk-GZBLAV5N.mjs → chunk-ULC227WD.mjs} +1 -1
- package/dist/chunk-VKRZOCAB.js +67 -0
- package/dist/{chunk-4P3AQZVE.js → chunk-YHNGJ2PU.js} +8 -8
- package/dist/index.js +9 -9
- package/dist/index.mjs +9 -9
- package/dist/plugins/analyze.js +3 -3
- package/dist/plugins/analyze.mjs +2 -2
- package/dist/plugins/index.js +4 -4
- package/dist/plugins/index.mjs +3 -3
- package/dist/plugins/ts-resolve.js +3 -3
- package/dist/plugins/ts-resolve.mjs +2 -2
- package/dist/utilities/copy-assets.d.mts +1 -1
- package/dist/utilities/copy-assets.d.ts +1 -1
- package/dist/utilities/copy-assets.js +3 -4
- package/dist/utilities/copy-assets.mjs +2 -3
- package/dist/utilities/generate-package-json.js +3 -3
- package/dist/utilities/generate-package-json.mjs +2 -2
- package/dist/utilities/get-entry-points.js +3 -3
- package/dist/utilities/get-entry-points.mjs +2 -2
- package/dist/utilities/index.js +7 -7
- package/dist/utilities/index.mjs +7 -7
- package/dist/utilities/read-nx-config.js +3 -3
- package/dist/utilities/read-nx-config.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-H37GZ5HC.js +0 -93
package/dist/chunk-H37GZ5HC.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
-
|
|
3
|
-
var _chunkF4IA5EOZjs = require('./chunk-F4IA5EOZ.js');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _chunkNSSZFPK3js = require('./chunk-NSSZFPK3.js');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _chunkSHUYVCIDjs = require('./chunk-SHUYVCID.js');
|
|
13
|
-
|
|
14
|
-
// src/utilities/copy-assets.ts
|
|
15
|
-
var _devkit = require('@nx/devkit');
|
|
16
|
-
var _js = require('@nx/js');
|
|
17
|
-
var _glob = require('glob');
|
|
18
|
-
var _promises = require('fs/promises');
|
|
19
|
-
var copyAssets = /* @__PURE__ */ _chunkSHUYVCIDjs.__name.call(void 0, async (config, assets, outputPath, projectRoot, projectName, sourceRoot, generatePackageJson = true, includeSrc = false, banner, footer) => {
|
|
20
|
-
const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
|
|
21
|
-
pendingAssets.push({
|
|
22
|
-
input: _chunkNSSZFPK3js.joinPaths.call(void 0, config.workspaceRoot, projectRoot),
|
|
23
|
-
glob: "*.md",
|
|
24
|
-
output: "."
|
|
25
|
-
});
|
|
26
|
-
pendingAssets.push({
|
|
27
|
-
input: config.workspaceRoot,
|
|
28
|
-
glob: "LICENSE",
|
|
29
|
-
output: "."
|
|
30
|
-
});
|
|
31
|
-
if (generatePackageJson === false) {
|
|
32
|
-
pendingAssets.push({
|
|
33
|
-
input: projectRoot,
|
|
34
|
-
glob: "package.json",
|
|
35
|
-
output: "."
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
if (includeSrc === true) {
|
|
39
|
-
pendingAssets.push({
|
|
40
|
-
input: sourceRoot,
|
|
41
|
-
glob: "**/{*.ts,*.tsx,*.js,*.jsx}",
|
|
42
|
-
output: "src/"
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
const nxJson = _chunkF4IA5EOZjs.readNxConfig.call(void 0, config.workspaceRoot);
|
|
46
|
-
const projectGraph = _devkit.readCachedProjectGraph.call(void 0, );
|
|
47
|
-
const projectsConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
48
|
-
if (!_optionalChain([projectsConfigurations, 'optionalAccess', _ => _.projects, 'optionalAccess', _2 => _2[projectName]])) {
|
|
49
|
-
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.");
|
|
50
|
-
}
|
|
51
|
-
const buildTarget = _optionalChain([projectsConfigurations, 'access', _3 => _3.projects, 'access', _4 => _4[projectName], 'access', _5 => _5.targets, 'optionalAccess', _6 => _6.build]);
|
|
52
|
-
if (!buildTarget) {
|
|
53
|
-
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 ${_chunkNSSZFPK3js.joinPaths.call(void 0, projectRoot, "project.json")}`);
|
|
54
|
-
}
|
|
55
|
-
_chunkNSSZFPK3js.writeTrace.call(void 0, `\u{1F4DD} Copying the following assets to the output directory:
|
|
56
|
-
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunkNSSZFPK3js.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`, config);
|
|
57
|
-
const result = await _js.copyAssets.call(void 0, {
|
|
58
|
-
assets: pendingAssets,
|
|
59
|
-
watch: false,
|
|
60
|
-
outputPath
|
|
61
|
-
}, {
|
|
62
|
-
root: config.workspaceRoot,
|
|
63
|
-
targetName: "build",
|
|
64
|
-
target: buildTarget,
|
|
65
|
-
projectName,
|
|
66
|
-
projectGraph,
|
|
67
|
-
projectsConfigurations,
|
|
68
|
-
nxJsonConfiguration: nxJson,
|
|
69
|
-
cwd: config.workspaceRoot,
|
|
70
|
-
isVerbose: _chunkNSSZFPK3js.isVerbose.call(void 0, config.logLevel)
|
|
71
|
-
});
|
|
72
|
-
if (!result.success) {
|
|
73
|
-
throw new Error("The Build process failed trying to copy assets");
|
|
74
|
-
}
|
|
75
|
-
if (includeSrc === true) {
|
|
76
|
-
_chunkNSSZFPK3js.writeDebug.call(void 0, `\u{1F4DD} Adding banner and writing source files: ${_chunkNSSZFPK3js.joinPaths.call(void 0, outputPath, "src")}`, config);
|
|
77
|
-
const files = await _glob.glob.call(void 0, [
|
|
78
|
-
_chunkNSSZFPK3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
79
|
-
_chunkNSSZFPK3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
80
|
-
_chunkNSSZFPK3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
81
|
-
_chunkNSSZFPK3js.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
82
|
-
]);
|
|
83
|
-
await Promise.allSettled(files.map(async (file) => _promises.writeFile.call(void 0, file, `${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
84
|
-
|
|
85
|
-
${await _promises.readFile.call(void 0, file, "utf8")}
|
|
86
|
-
|
|
87
|
-
${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`)));
|
|
88
|
-
}
|
|
89
|
-
}, "copyAssets");
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
exports.copyAssets = copyAssets;
|