@storm-software/workspace-tools 1.267.20 → 1.267.21
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 +12 -0
- package/README.md +1 -1
- package/dist/chunk-22UY7NFX.js +41 -0
- package/dist/chunk-23BZQTB2.mjs +425 -0
- package/dist/{chunk-7O34DHUG.js → chunk-2AVWFUXP.js} +4 -19
- package/dist/{chunk-YAKIVJU6.mjs → chunk-2M22JVJQ.mjs} +307 -192
- package/dist/{chunk-GXIIWSRN.mjs → chunk-3EDSGFA5.mjs} +63 -54
- package/dist/chunk-3RG5ZIWI.js +10 -0
- package/dist/{chunk-AC5SI4YZ.js → chunk-3TYXXJKV.js} +11 -8
- package/dist/{chunk-7GXOAREP.mjs → chunk-3ZBMLG4D.mjs} +17 -14
- package/dist/chunk-437WGH2M.mjs +32 -0
- package/dist/{chunk-ULBTYC2B.js → chunk-4BECJRPP.js} +13 -42
- package/dist/chunk-4QRA66TH.mjs +379 -0
- package/dist/chunk-4S66IYQF.mjs +31 -0
- package/dist/{chunk-4JOIS7WW.js → chunk-4WHSR4FK.js} +24 -14
- package/dist/{chunk-JTAXCQX6.js → chunk-53DNHF7B.js} +7 -13
- package/dist/{chunk-GGGO542M.js → chunk-54FVHKCU.js} +36 -24
- package/dist/{chunk-23IRDNF3.mjs → chunk-5HUW3BTP.mjs} +37 -21
- package/dist/{chunk-7NN23VWS.mjs → chunk-5LB2F3L4.mjs} +80 -65
- package/dist/{chunk-UF6KFXG5.js → chunk-5VY5IBBQ.js} +20 -17
- package/dist/{chunk-6QO3KMZA.js → chunk-5ZFTWEKB.js} +2 -16
- package/dist/chunk-6EMYX25V.js +7 -0
- package/dist/chunk-6QZSAZZ3.mjs +64 -0
- package/dist/{chunk-2JA7WAH7.mjs → chunk-7AN4JMFC.mjs} +2 -16
- package/dist/{chunk-MXS2AKLY.mjs → chunk-7HWV6U3E.mjs} +33 -18
- package/dist/{chunk-GKL4BY2Y.js → chunk-A5CKB6IJ.js} +7 -8
- package/dist/{chunk-HSN5YXMG.mjs → chunk-ABE7UOMX.mjs} +24 -21
- package/dist/{chunk-6W2B4WA4.mjs → chunk-AHLKRK7D.mjs} +33 -18
- package/dist/{chunk-6CGAYKQL.js → chunk-AJ3C2EDW.js} +69 -44
- package/dist/chunk-AMW7VHFM.mjs +52 -0
- package/dist/chunk-AOFWKOAI.js +31 -0
- package/dist/{chunk-7YRW5HNX.js → chunk-AX3RSZT7.js} +42 -31
- package/dist/chunk-BFD7HHVZ.mjs +32 -0
- package/dist/{chunk-ZMFVKBRM.js → chunk-BWGJVRAS.js} +2 -13
- package/dist/{chunk-M6NHJNGU.js → chunk-CWBHZBTN.js} +277 -169
- package/dist/{chunk-BNYSKNEI.mjs → chunk-EKWR7TBP.mjs} +36 -24
- package/dist/chunk-EU6N7QT3.js +32 -0
- package/dist/chunk-EYXDS7SG.js +105 -0
- package/dist/chunk-F66XEAID.mjs +113 -0
- package/dist/chunk-FOFNKU5G.js +379 -0
- package/dist/{chunk-7NNHBZC5.js → chunk-GNOIETZR.js} +28 -17
- package/dist/chunk-GQQLBQPQ.mjs +32 -0
- package/dist/{chunk-7PRHEOCT.js → chunk-H5NKKUPV.js} +31 -18
- package/dist/{chunk-NM7WF6O5.mjs → chunk-HMJTTE4A.mjs} +39 -30
- package/dist/{chunk-ZCIEDGNG.mjs → chunk-HY3ZC5EZ.mjs} +10 -31
- package/dist/{chunk-OQPX75CG.js → chunk-I5MSPQMO.js} +31 -18
- package/dist/{chunk-WPRKDCZP.mjs → chunk-IEZKYJSF.mjs} +3 -6
- package/dist/{chunk-IWCQL3AQ.js → chunk-IL3R5ZVS.js} +10 -31
- package/dist/{chunk-P4OVFIT6.js → chunk-IZN2IVJ4.js} +19 -6
- package/dist/{chunk-UALZJZUK.js → chunk-J2Z4WP3E.js} +32 -16
- package/dist/{chunk-RBU35LQW.js → chunk-J4DYXH46.js} +70 -61
- package/dist/chunk-KP4RPOBI.mjs +105 -0
- package/dist/chunk-KR72GKIT.mjs +7 -0
- package/dist/chunk-L4NCVOB5.mjs +17 -0
- package/dist/{chunk-4Y6B6JDH.js → chunk-LBAVVYKU.js} +315 -136
- package/dist/{chunk-34WSVY5D.mjs → chunk-LSF4BHCI.mjs} +24 -14
- package/dist/chunk-M725BO42.mjs +32 -0
- package/dist/{chunk-SAWEMBTS.mjs → chunk-MF6VZSIO.mjs} +30 -17
- package/dist/{chunk-2I6S33ZD.mjs → chunk-MMBLGUC3.mjs} +311 -132
- package/dist/chunk-MZSZKV4N.mjs +47 -0
- package/dist/chunk-O6RRIC6I.js +32 -0
- package/dist/chunk-OKSECMVK.js +32 -0
- package/dist/chunk-Q2HYWACQ.mjs +50 -0
- package/dist/{chunk-LJFHW7ZR.mjs → chunk-QFWQZOVG.mjs} +14 -43
- package/dist/{chunk-DHGZTMND.js → chunk-QVYCDING.js} +4 -7
- package/dist/{chunk-Z4NKRWWJ.js → chunk-RJRBED5Q.js} +48 -32
- package/dist/chunk-S5Z4QGF3.js +64 -0
- package/dist/{chunk-KQL5XMNL.mjs → chunk-SITFTWPY.mjs} +23 -8
- package/dist/chunk-SNMXP6JV.mjs +41 -0
- package/dist/chunk-SPXJBMLY.js +50 -0
- package/dist/{chunk-7TLYMNLD.mjs → chunk-SW2E5MQJ.mjs} +4 -19
- package/dist/{chunk-OKW5O5P4.js → chunk-T7BALDKJ.js} +26 -22
- package/dist/chunk-TSYIV33W.js +32 -0
- package/dist/{chunk-S3IPRXVE.mjs → chunk-U65XVJ4Y.mjs} +1 -12
- package/dist/{chunk-D3U4WMSI.mjs → chunk-U7JFVMCK.mjs} +6 -12
- package/dist/chunk-UIPUSUAB.js +425 -0
- package/dist/{chunk-O5QR3B3Z.mjs → chunk-UYSJG2E5.mjs} +56 -31
- package/dist/{chunk-SJGDCFBH.mjs → chunk-VLOTOQYE.mjs} +11 -8
- package/dist/{chunk-ENE6R7BT.mjs → chunk-W2C5IGWW.mjs} +3 -6
- package/dist/{chunk-G4QFSE5B.js → chunk-WE4HK4RN.js} +327 -212
- package/dist/{chunk-SUQKASD7.js → chunk-X2VJXJEF.js} +82 -67
- package/dist/{chunk-RK3UDPDP.mjs → chunk-X6PHOMFB.mjs} +32 -16
- package/dist/{chunk-PK2SUBWI.js → chunk-XZSS3YAB.js} +19 -16
- package/dist/chunk-YXBFVZ3K.js +47 -0
- package/dist/{chunk-CUPARBOS.js → chunk-ZP76EMBE.js} +41 -32
- package/dist/{chunk-OBZTQWHM.mjs → chunk-ZT4IIRQF.mjs} +254 -146
- package/dist/executors.js +21 -21
- package/dist/executors.mjs +20 -20
- package/dist/generators.js +17 -17
- package/dist/generators.mjs +18 -18
- package/dist/index.js +41 -41
- package/dist/index.mjs +42 -42
- package/dist/src/base/base-executor.js +7 -7
- package/dist/src/base/base-executor.mjs +6 -6
- package/dist/src/base/base-executor.untyped.js +1 -1
- package/dist/src/base/base-executor.untyped.mjs +1 -1
- package/dist/src/base/base-generator.js +7 -7
- package/dist/src/base/base-generator.mjs +6 -6
- package/dist/src/base/base-generator.untyped.js +1 -1
- package/dist/src/base/base-generator.untyped.mjs +1 -1
- package/dist/src/base/cargo-base-executor.untyped.js +3 -3
- package/dist/src/base/cargo-base-executor.untyped.mjs +2 -2
- package/dist/src/base/index.js +13 -13
- package/dist/src/base/index.mjs +12 -12
- package/dist/src/base/typescript-build-executor.untyped.js +3 -3
- package/dist/src/base/typescript-build-executor.untyped.mjs +2 -2
- package/dist/src/base/typescript-library-generator.untyped.js +3 -3
- package/dist/src/base/typescript-library-generator.untyped.mjs +2 -2
- package/dist/src/executors/cargo-build/executor.js +9 -9
- package/dist/src/executors/cargo-build/executor.mjs +8 -8
- package/dist/src/executors/cargo-build/untyped.js +3 -3
- package/dist/src/executors/cargo-build/untyped.mjs +2 -2
- package/dist/src/executors/cargo-check/executor.js +9 -9
- package/dist/src/executors/cargo-check/executor.mjs +8 -8
- package/dist/src/executors/cargo-check/untyped.js +3 -3
- package/dist/src/executors/cargo-check/untyped.mjs +2 -2
- package/dist/src/executors/cargo-clippy/executor.js +9 -9
- package/dist/src/executors/cargo-clippy/executor.mjs +8 -8
- package/dist/src/executors/cargo-clippy/untyped.js +3 -3
- package/dist/src/executors/cargo-clippy/untyped.mjs +2 -2
- package/dist/src/executors/cargo-doc/executor.js +9 -9
- package/dist/src/executors/cargo-doc/executor.mjs +8 -8
- package/dist/src/executors/cargo-doc/untyped.js +3 -3
- package/dist/src/executors/cargo-doc/untyped.mjs +2 -2
- package/dist/src/executors/cargo-format/executor.js +9 -9
- package/dist/src/executors/cargo-format/executor.mjs +8 -8
- package/dist/src/executors/cargo-format/untyped.js +3 -3
- package/dist/src/executors/cargo-format/untyped.mjs +2 -2
- package/dist/src/executors/cargo-publish/executor.js +4 -4
- package/dist/src/executors/cargo-publish/executor.mjs +3 -3
- package/dist/src/executors/cargo-publish/untyped.js +3 -3
- package/dist/src/executors/cargo-publish/untyped.mjs +2 -2
- package/dist/src/executors/clean-package/executor.js +84 -62
- package/dist/src/executors/clean-package/executor.mjs +84 -62
- package/dist/src/executors/clean-package/untyped.js +2 -4
- package/dist/src/executors/clean-package/untyped.mjs +2 -4
- package/dist/src/executors/esbuild/executor.js +8 -8
- package/dist/src/executors/esbuild/executor.mjs +7 -7
- package/dist/src/executors/esbuild/untyped.js +4 -8
- package/dist/src/executors/esbuild/untyped.mjs +3 -7
- package/dist/src/executors/npm-publish/executor.js +5 -5
- package/dist/src/executors/npm-publish/executor.mjs +4 -4
- package/dist/src/executors/npm-publish/untyped.js +1 -1
- package/dist/src/executors/npm-publish/untyped.mjs +1 -1
- package/dist/src/executors/size-limit/executor.js +8 -8
- package/dist/src/executors/size-limit/executor.mjs +7 -7
- package/dist/src/executors/size-limit/untyped.js +1 -1
- package/dist/src/executors/size-limit/untyped.mjs +1 -1
- package/dist/src/executors/typia/executor.js +8 -8
- package/dist/src/executors/typia/executor.mjs +7 -7
- package/dist/src/executors/typia/untyped.js +4 -12
- package/dist/src/executors/typia/untyped.mjs +4 -12
- package/dist/src/executors/unbuild/executor.js +8 -8
- package/dist/src/executors/unbuild/executor.mjs +7 -7
- package/dist/src/executors/unbuild/untyped.js +6 -13
- package/dist/src/executors/unbuild/untyped.mjs +5 -12
- package/dist/src/generators/browser-library/generator.js +10 -10
- package/dist/src/generators/browser-library/generator.mjs +9 -9
- package/dist/src/generators/browser-library/untyped.js +5 -11
- package/dist/src/generators/browser-library/untyped.mjs +4 -10
- package/dist/src/generators/config-schema/generator.js +8 -8
- package/dist/src/generators/config-schema/generator.mjs +7 -7
- package/dist/src/generators/config-schema/untyped.js +1 -1
- package/dist/src/generators/config-schema/untyped.mjs +1 -1
- package/dist/src/generators/init/init.js +3 -3
- package/dist/src/generators/init/init.mjs +2 -2
- package/dist/src/generators/init/untyped.js +1 -1
- package/dist/src/generators/init/untyped.mjs +1 -1
- package/dist/src/generators/neutral-library/generator.js +10 -10
- package/dist/src/generators/neutral-library/generator.mjs +9 -9
- package/dist/src/generators/neutral-library/untyped.js +5 -10
- package/dist/src/generators/neutral-library/untyped.mjs +4 -9
- package/dist/src/generators/node-library/generator.js +10 -10
- package/dist/src/generators/node-library/generator.mjs +9 -9
- package/dist/src/generators/node-library/untyped.js +5 -11
- package/dist/src/generators/node-library/untyped.mjs +4 -10
- package/dist/src/generators/preset/generator.js +8 -8
- package/dist/src/generators/preset/generator.mjs +7 -7
- package/dist/src/generators/preset/untyped.js +3 -11
- package/dist/src/generators/preset/untyped.mjs +3 -11
- package/dist/src/generators/release-version/generator.js +7 -7
- package/dist/src/generators/release-version/generator.mjs +6 -6
- package/dist/src/generators/release-version/untyped.js +3 -14
- package/dist/src/generators/release-version/untyped.mjs +3 -14
- package/dist/src/plugins/rust/cargo-toml.js +5 -5
- package/dist/src/plugins/rust/cargo-toml.mjs +4 -4
- package/dist/src/plugins/rust/index.js +5 -5
- package/dist/src/plugins/rust/index.mjs +4 -4
- package/dist/src/plugins/typescript/index.js +5 -5
- package/dist/src/plugins/typescript/index.mjs +4 -4
- package/dist/src/plugins/typescript/project-config.js +5 -5
- package/dist/src/plugins/typescript/project-config.mjs +4 -4
- package/dist/src/plugins/typescript/tsup.js +114 -109
- package/dist/src/plugins/typescript/tsup.mjs +116 -111
- package/dist/src/plugins/typescript/untyped-schema.js +93 -77
- package/dist/src/plugins/typescript/untyped-schema.mjs +96 -80
- package/dist/src/types.js +1 -1
- package/dist/src/types.mjs +1 -1
- package/dist/src/utils/apply-workspace-tokens.js +5 -5
- package/dist/src/utils/apply-workspace-tokens.mjs +4 -4
- package/dist/src/utils/cargo.js +3 -3
- package/dist/src/utils/cargo.mjs +2 -2
- package/dist/src/utils/create-cli-options.js +3 -3
- package/dist/src/utils/create-cli-options.mjs +2 -2
- package/dist/src/utils/get-project-configurations.js +5 -5
- package/dist/src/utils/get-project-configurations.mjs +4 -4
- package/dist/src/utils/index.js +15 -15
- package/dist/src/utils/index.mjs +14 -14
- package/dist/src/utils/lock-file.js +3 -3
- package/dist/src/utils/lock-file.mjs +2 -2
- package/dist/src/utils/package-helpers.js +5 -5
- package/dist/src/utils/package-helpers.mjs +4 -4
- package/dist/src/utils/plugin-helpers.js +4 -4
- package/dist/src/utils/plugin-helpers.mjs +3 -3
- package/dist/src/utils/pnpm-deps-update.js +4 -4
- package/dist/src/utils/pnpm-deps-update.mjs +3 -3
- package/dist/src/utils/project-tags.js +3 -3
- package/dist/src/utils/project-tags.mjs +2 -2
- package/dist/src/utils/toml.js +3 -3
- package/dist/src/utils/toml.mjs +2 -2
- package/dist/src/utils/typia-transform.js +3 -3
- package/dist/src/utils/typia-transform.mjs +2 -2
- package/dist/src/utils/versions.js +1 -1
- package/dist/src/utils/versions.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-3GQAWCBQ.js +0 -13
- package/dist/chunk-3IZ3O4OK.js +0 -30
- package/dist/chunk-6JJB5AYA.js +0 -51
- package/dist/chunk-7AXFMX2T.js +0 -37
- package/dist/chunk-B3DVFXXD.js +0 -32
- package/dist/chunk-DHOPT66G.mjs +0 -32
- package/dist/chunk-ECGUA6DW.mjs +0 -48
- package/dist/chunk-FMDP5I2Q.mjs +0 -446
- package/dist/chunk-GFHXZA2W.mjs +0 -31
- package/dist/chunk-HIZQZGPN.mjs +0 -32
- package/dist/chunk-HOXPAVCL.js +0 -32
- package/dist/chunk-ICPUM2HS.js +0 -50
- package/dist/chunk-ID7QJZH6.mjs +0 -37
- package/dist/chunk-KCUI5EYN.mjs +0 -468
- package/dist/chunk-KEBNU3P2.js +0 -446
- package/dist/chunk-KVZPB73M.mjs +0 -86
- package/dist/chunk-NSCWEC2S.js +0 -32
- package/dist/chunk-NX7JRHF4.mjs +0 -50
- package/dist/chunk-OQTJDGUH.js +0 -468
- package/dist/chunk-QCF7H4NZ.mjs +0 -32
- package/dist/chunk-QKHODSAV.mjs +0 -13
- package/dist/chunk-QMD25JYH.mjs +0 -43
- package/dist/chunk-RUKOOSWL.js +0 -31
- package/dist/chunk-SBJV4LAX.mjs +0 -51
- package/dist/chunk-TET4GF3D.js +0 -43
- package/dist/chunk-XITP2BX2.js +0 -13
- package/dist/chunk-XJZ5TRTJ.mjs +0 -102
- package/dist/chunk-Y4TQKFAH.mjs +0 -18
- package/dist/chunk-YW4UN25U.js +0 -86
- package/dist/chunk-ZUNLUDAB.mjs +0 -30
|
@@ -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(); } } 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 _chunkAJ3C2EDWjs = require('./chunk-AJ3C2EDW.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -11,17 +11,16 @@ var _chunk6CGAYKQLjs = require('./chunk-6CGAYKQL.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkWE4HK4RNjs = require('./chunk-WE4HK4RN.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunk4WHSR4FKjs = require('./chunk-4WHSR4FK.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunk53DNHF7Bjs = require('./chunk-53DNHF7B.js');
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
23
|
+
var _chunk3RG5ZIWIjs = require('./chunk-3RG5ZIWI.js');
|
|
25
24
|
|
|
26
25
|
// ../esbuild/src/build.ts
|
|
27
26
|
var _esbuild = require('esbuild'); var esbuild = _interopRequireWildcard(_esbuild);
|
|
@@ -54,7 +53,7 @@ var _devkit = require('@nx/devkit');
|
|
|
54
53
|
var _copyassetshandler = require('@nx/js/src/utils/assets/copy-assets-handler');
|
|
55
54
|
var _glob = require('glob');
|
|
56
55
|
var _promises = require('fs/promises'); var _promises2 = _interopRequireDefault(_promises);
|
|
57
|
-
var copyAssets =
|
|
56
|
+
var copyAssets = async (config, assets, outputPath, projectRoot, sourceRoot, generatePackageJson2 = true, includeSrc = false, banner, footer) => {
|
|
58
57
|
const pendingAssets = Array.from(_nullishCoalesce(assets, () => ( [])));
|
|
59
58
|
pendingAssets.push({
|
|
60
59
|
input: projectRoot,
|
|
@@ -80,8 +79,11 @@ var copyAssets = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, async (con
|
|
|
80
79
|
output: "src/"
|
|
81
80
|
});
|
|
82
81
|
}
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
_chunkWE4HK4RNjs.writeTrace.call(void 0,
|
|
83
|
+
`\u{1F4DD} Copying the following assets to the output directory:
|
|
84
|
+
${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${pendingAsset} -> ${outputPath}` : ` - ${pendingAsset.input}/${pendingAsset.glob} -> ${_chunk53DNHF7Bjs.joinPaths.call(void 0, outputPath, pendingAsset.output)}`).join("\n")}`,
|
|
85
|
+
config
|
|
86
|
+
);
|
|
85
87
|
const assetHandler = new (0, _copyassetshandler.CopyAssetsHandler)({
|
|
86
88
|
projectDir: projectRoot,
|
|
87
89
|
rootDir: config.workspaceRoot,
|
|
@@ -90,28 +92,45 @@ ${pendingAssets.map((pendingAsset) => typeof pendingAsset === "string" ? ` - ${p
|
|
|
90
92
|
});
|
|
91
93
|
await assetHandler.processAllAssetsOnce();
|
|
92
94
|
if (includeSrc === true) {
|
|
93
|
-
|
|
95
|
+
_chunkWE4HK4RNjs.writeDebug.call(void 0,
|
|
96
|
+
`\u{1F4DD} Adding banner and writing source files: ${_chunk53DNHF7Bjs.joinPaths.call(void 0,
|
|
97
|
+
outputPath,
|
|
98
|
+
"src"
|
|
99
|
+
)}`,
|
|
100
|
+
config
|
|
101
|
+
);
|
|
94
102
|
const files = await _glob.glob.call(void 0, [
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
103
|
+
_chunk53DNHF7Bjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.ts"),
|
|
104
|
+
_chunk53DNHF7Bjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.tsx"),
|
|
105
|
+
_chunk53DNHF7Bjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.js"),
|
|
106
|
+
_chunk53DNHF7Bjs.joinPaths.call(void 0, config.workspaceRoot, outputPath, "src/**/*.jsx")
|
|
99
107
|
]);
|
|
100
|
-
await Promise.allSettled(
|
|
108
|
+
await Promise.allSettled(
|
|
109
|
+
files.map(
|
|
110
|
+
async (file) => _promises.writeFile.call(void 0,
|
|
111
|
+
file,
|
|
112
|
+
`${banner && typeof banner === "string" ? banner.startsWith("//") ? banner : `// ${banner}` : ""}
|
|
101
113
|
|
|
102
114
|
${await _promises.readFile.call(void 0, file, "utf8")}
|
|
103
115
|
|
|
104
|
-
${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`
|
|
116
|
+
${footer && typeof footer === "string" ? footer.startsWith("//") ? footer : `// ${footer}` : ""}`
|
|
117
|
+
)
|
|
118
|
+
)
|
|
119
|
+
);
|
|
105
120
|
}
|
|
106
|
-
}
|
|
121
|
+
};
|
|
107
122
|
|
|
108
123
|
// ../build-tools/src/utilities/generate-package-json.ts
|
|
109
124
|
var _buildablelibsutils = require('@nx/js/src/utils/buildable-libs-utils');
|
|
110
125
|
|
|
111
126
|
|
|
112
127
|
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
113
132
|
var _projectgraph = require('nx/src/project-graph/project-graph');
|
|
114
|
-
var addPackageDependencies =
|
|
133
|
+
var addPackageDependencies = async (workspaceRoot, projectRoot, projectName, packageJson) => {
|
|
115
134
|
let projectGraph;
|
|
116
135
|
try {
|
|
117
136
|
projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
@@ -120,16 +139,35 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
120
139
|
projectGraph = _projectgraph.readCachedProjectGraph.call(void 0, );
|
|
121
140
|
}
|
|
122
141
|
if (!projectGraph) {
|
|
123
|
-
throw new Error(
|
|
142
|
+
throw new Error(
|
|
143
|
+
"The Build process failed because the project graph is not available. Please run the build command again."
|
|
144
|
+
);
|
|
124
145
|
}
|
|
125
|
-
const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0,
|
|
146
|
+
const projectDependencies = _buildablelibsutils.calculateProjectBuildableDependencies.call(void 0,
|
|
147
|
+
void 0,
|
|
148
|
+
projectGraph,
|
|
149
|
+
workspaceRoot,
|
|
150
|
+
projectName,
|
|
151
|
+
process.env.NX_TASK_TARGET_TARGET || "build",
|
|
152
|
+
process.env.NX_TASK_TARGET_CONFIGURATION || "production",
|
|
153
|
+
true
|
|
154
|
+
);
|
|
126
155
|
const localPackages = [];
|
|
127
|
-
for (const project of projectDependencies.dependencies.filter(
|
|
156
|
+
for (const project of projectDependencies.dependencies.filter(
|
|
157
|
+
(dep) => dep.node.type === "lib" && _optionalChain([dep, 'access', _ => _.node, 'access', _2 => _2.data, 'optionalAccess', _3 => _3.root]) !== projectRoot && _optionalChain([dep, 'access', _4 => _4.node, 'access', _5 => _5.data, 'optionalAccess', _6 => _6.root]) !== workspaceRoot
|
|
158
|
+
)) {
|
|
128
159
|
const projectNode = project.node;
|
|
129
160
|
if (projectNode.data.root) {
|
|
130
|
-
const projectPackageJsonPath =
|
|
161
|
+
const projectPackageJsonPath = _chunk53DNHF7Bjs.joinPaths.call(void 0,
|
|
162
|
+
workspaceRoot,
|
|
163
|
+
projectNode.data.root,
|
|
164
|
+
"package.json"
|
|
165
|
+
);
|
|
131
166
|
if (_fs.existsSync.call(void 0, projectPackageJsonPath)) {
|
|
132
|
-
const projectPackageJsonContent = await _promises.readFile.call(void 0,
|
|
167
|
+
const projectPackageJsonContent = await _promises.readFile.call(void 0,
|
|
168
|
+
projectPackageJsonPath,
|
|
169
|
+
"utf8"
|
|
170
|
+
);
|
|
133
171
|
const projectPackageJson = JSON.parse(projectPackageJsonContent);
|
|
134
172
|
if (projectPackageJson.private !== true) {
|
|
135
173
|
localPackages.push(projectPackageJson);
|
|
@@ -138,19 +176,33 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
138
176
|
}
|
|
139
177
|
}
|
|
140
178
|
if (localPackages.length > 0) {
|
|
141
|
-
|
|
142
|
-
|
|
179
|
+
_chunkWE4HK4RNjs.writeTrace.call(void 0,
|
|
180
|
+
`\u{1F4E6} Adding local packages to package.json: ${localPackages.map((p) => p.name).join(", ")}`
|
|
181
|
+
);
|
|
182
|
+
const projectJsonFile = await _promises.readFile.call(void 0,
|
|
183
|
+
_chunk53DNHF7Bjs.joinPaths.call(void 0, projectRoot, "project.json"),
|
|
184
|
+
"utf8"
|
|
185
|
+
);
|
|
143
186
|
const projectJson = JSON.parse(projectJsonFile);
|
|
144
187
|
const projectName2 = projectJson.name;
|
|
145
188
|
const projectConfigurations = _projectgraph.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
146
189
|
if (!_optionalChain([projectConfigurations, 'optionalAccess', _7 => _7.projects, 'optionalAccess', _8 => _8[projectName2]])) {
|
|
147
|
-
throw new Error(
|
|
190
|
+
throw new Error(
|
|
191
|
+
"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."
|
|
192
|
+
);
|
|
148
193
|
}
|
|
149
194
|
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) => {
|
|
150
195
|
if (_optionalChain([projectConfigurations, 'access', _14 => _14.projects, 'optionalAccess', _15 => _15[dep]])) {
|
|
151
|
-
const depPackageJsonPath =
|
|
196
|
+
const depPackageJsonPath = _chunk53DNHF7Bjs.joinPaths.call(void 0,
|
|
197
|
+
workspaceRoot,
|
|
198
|
+
projectConfigurations.projects[dep].root,
|
|
199
|
+
"package.json"
|
|
200
|
+
);
|
|
152
201
|
if (_fs.existsSync.call(void 0, depPackageJsonPath)) {
|
|
153
|
-
const depPackageJsonContent = _fs.readFileSync.call(void 0,
|
|
202
|
+
const depPackageJsonContent = _fs.readFileSync.call(void 0,
|
|
203
|
+
depPackageJsonPath,
|
|
204
|
+
"utf8"
|
|
205
|
+
);
|
|
154
206
|
const depPackageJson = JSON.parse(depPackageJsonContent);
|
|
155
207
|
if (depPackageJson.private !== true && !ret.includes(depPackageJson.name)) {
|
|
156
208
|
ret.push(depPackageJson.name);
|
|
@@ -172,13 +224,16 @@ var addPackageDependencies = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0
|
|
|
172
224
|
return ret;
|
|
173
225
|
}, _nullishCoalesce(packageJson.devDependencies, () => ( {})));
|
|
174
226
|
} else {
|
|
175
|
-
|
|
227
|
+
_chunkWE4HK4RNjs.writeTrace.call(void 0, "\u{1F4E6} No local packages dependencies to add to package.json");
|
|
176
228
|
}
|
|
177
229
|
return packageJson;
|
|
178
|
-
}
|
|
179
|
-
var addWorkspacePackageJsonFields =
|
|
180
|
-
const workspaceRoot = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot :
|
|
181
|
-
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
230
|
+
};
|
|
231
|
+
var addWorkspacePackageJsonFields = async (workspaceConfig, projectRoot, sourceRoot, projectName, includeSrc = false, packageJson) => {
|
|
232
|
+
const workspaceRoot = workspaceConfig.workspaceRoot ? workspaceConfig.workspaceRoot : _chunk4WHSR4FKjs.findWorkspaceRoot.call(void 0, );
|
|
233
|
+
const workspacePackageJsonContent = await _promises.readFile.call(void 0,
|
|
234
|
+
_chunk53DNHF7Bjs.joinPaths.call(void 0, workspaceRoot, "package.json"),
|
|
235
|
+
"utf8"
|
|
236
|
+
);
|
|
182
237
|
const workspacePackageJson = JSON.parse(workspacePackageJsonContent);
|
|
183
238
|
packageJson.type ??= "module";
|
|
184
239
|
packageJson.sideEffects ??= false;
|
|
@@ -187,11 +242,9 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
|
|
|
187
242
|
if (distSrc.startsWith("/")) {
|
|
188
243
|
distSrc = distSrc.substring(1);
|
|
189
244
|
}
|
|
190
|
-
packageJson.source ??= `${
|
|
245
|
+
packageJson.source ??= `${_chunk53DNHF7Bjs.joinPaths.call(void 0, distSrc, "index.ts").replaceAll("\\", "/")}`;
|
|
191
246
|
}
|
|
192
|
-
packageJson.files ??= [
|
|
193
|
-
"dist/**/*"
|
|
194
|
-
];
|
|
247
|
+
packageJson.files ??= ["dist/**/*"];
|
|
195
248
|
if (includeSrc === true && !packageJson.files.includes("src")) {
|
|
196
249
|
packageJson.files.push("src/**/*");
|
|
197
250
|
}
|
|
@@ -207,26 +260,22 @@ var addWorkspacePackageJsonFields = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call
|
|
|
207
260
|
packageJson.author ??= workspacePackageJson.author;
|
|
208
261
|
packageJson.maintainers ??= workspacePackageJson.maintainers;
|
|
209
262
|
if (!packageJson.maintainers && packageJson.author) {
|
|
210
|
-
packageJson.maintainers = [
|
|
211
|
-
packageJson.author
|
|
212
|
-
];
|
|
263
|
+
packageJson.maintainers = [packageJson.author];
|
|
213
264
|
}
|
|
214
265
|
packageJson.contributors ??= workspacePackageJson.contributors;
|
|
215
266
|
if (!packageJson.contributors && packageJson.author) {
|
|
216
|
-
packageJson.contributors = [
|
|
217
|
-
packageJson.author
|
|
218
|
-
];
|
|
267
|
+
packageJson.contributors = [packageJson.author];
|
|
219
268
|
}
|
|
220
269
|
packageJson.repository ??= workspacePackageJson.repository;
|
|
221
|
-
packageJson.repository.directory ??= projectRoot ? projectRoot :
|
|
270
|
+
packageJson.repository.directory ??= projectRoot ? projectRoot : _chunk53DNHF7Bjs.joinPaths.call(void 0, "packages", projectName);
|
|
222
271
|
return packageJson;
|
|
223
|
-
}
|
|
272
|
+
};
|
|
224
273
|
|
|
225
274
|
// ../build-tools/src/utilities/get-entry-points.ts
|
|
226
275
|
|
|
227
276
|
|
|
228
277
|
// ../build-tools/src/utilities/get-env.ts
|
|
229
|
-
var getEnv =
|
|
278
|
+
var getEnv = (builder, options) => {
|
|
230
279
|
return {
|
|
231
280
|
STORM_BUILD: builder,
|
|
232
281
|
STORM_ORG: options.orgName || DEFAULT_ORGANIZATION,
|
|
@@ -237,39 +286,51 @@ var getEnv = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (builder, opti
|
|
|
237
286
|
STORM_TARGET: JSON.stringify(options.target),
|
|
238
287
|
...options.env
|
|
239
288
|
};
|
|
240
|
-
}
|
|
289
|
+
};
|
|
241
290
|
|
|
242
291
|
// ../build-tools/src/utilities/read-nx-config.ts
|
|
243
292
|
|
|
244
293
|
|
|
245
294
|
|
|
246
295
|
// ../build-tools/src/utilities/task-graph.ts
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
247
299
|
var _createtaskgraph = require('nx/src/tasks-runner/create-task-graph');
|
|
248
300
|
|
|
249
301
|
// ../esbuild/src/assets.ts
|
|
250
302
|
async function copyBuildAssets(context) {
|
|
251
303
|
if (_optionalChain([context, 'access', _24 => _24.result, 'optionalAccess', _25 => _25.errors, 'access', _26 => _26.length]) === 0) {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
304
|
+
_chunkWE4HK4RNjs.writeDebug.call(void 0,
|
|
305
|
+
` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`,
|
|
306
|
+
context.workspaceConfig
|
|
307
|
+
);
|
|
308
|
+
const stopwatch = _chunkWE4HK4RNjs.getStopwatch.call(void 0, `${context.options.name} asset copy`);
|
|
309
|
+
await copyAssets(
|
|
310
|
+
context.workspaceConfig,
|
|
311
|
+
_nullishCoalesce(context.options.assets, () => ( [])),
|
|
312
|
+
context.outputPath,
|
|
313
|
+
context.options.projectRoot,
|
|
314
|
+
context.sourceRoot,
|
|
315
|
+
true,
|
|
316
|
+
false
|
|
317
|
+
);
|
|
255
318
|
stopwatch();
|
|
256
319
|
}
|
|
257
320
|
return context;
|
|
258
321
|
}
|
|
259
|
-
_chunk3GQAWCBQjs.__name.call(void 0, copyBuildAssets, "copyBuildAssets");
|
|
260
322
|
|
|
261
323
|
// ../esbuild/src/clean.ts
|
|
262
324
|
|
|
263
325
|
async function cleanDirectories(directory) {
|
|
264
|
-
await _promises.rm.call(void 0, directory, {
|
|
265
|
-
recursive: true,
|
|
266
|
-
force: true
|
|
267
|
-
});
|
|
326
|
+
await _promises.rm.call(void 0, directory, { recursive: true, force: true });
|
|
268
327
|
}
|
|
269
|
-
_chunk3GQAWCBQjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
|
|
270
328
|
|
|
271
329
|
// ../esbuild/src/context.ts
|
|
272
330
|
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
273
334
|
var _defu = require('defu'); var _defu2 = _interopRequireDefault(_defu);
|
|
274
335
|
|
|
275
336
|
|
|
@@ -326,43 +387,46 @@ function resolvePathsConfig(options, cwd, projectRoot) {
|
|
|
326
387
|
if (_optionalChain([options, 'optionalAccess', _27 => _27.compilerOptions, 'optionalAccess', _28 => _28.paths])) {
|
|
327
388
|
const paths = Object.entries(options.compilerOptions.paths);
|
|
328
389
|
const resolvedPaths = paths.map(([key, paths2]) => {
|
|
329
|
-
return [
|
|
330
|
-
key,
|
|
331
|
-
paths2.map((v) => _path2.default.resolve(cwd, v))
|
|
332
|
-
];
|
|
390
|
+
return [key, paths2.map((v) => _path2.default.resolve(cwd, v))];
|
|
333
391
|
});
|
|
334
392
|
return Object.fromEntries(resolvedPaths);
|
|
335
393
|
}
|
|
336
394
|
if (options.extends) {
|
|
337
|
-
const extendsPath = _path2.default.resolve(
|
|
395
|
+
const extendsPath = _path2.default.resolve(
|
|
396
|
+
projectRoot ? _chunk53DNHF7Bjs.joinPaths.call(void 0, cwd, projectRoot, options.extends) : _chunk53DNHF7Bjs.joinPaths.call(void 0, cwd, options.extends)
|
|
397
|
+
);
|
|
338
398
|
const extendsDir = _path2.default.dirname(extendsPath);
|
|
339
|
-
const extendsConfig =
|
|
399
|
+
const extendsConfig = _chunk3RG5ZIWIjs.__require.call(void 0, extendsPath);
|
|
340
400
|
return resolvePathsConfig(extendsConfig, extendsDir);
|
|
341
401
|
}
|
|
342
402
|
return [];
|
|
343
403
|
}
|
|
344
|
-
|
|
345
|
-
var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context) => ({
|
|
404
|
+
var resolvePathsPlugin = (context) => ({
|
|
346
405
|
name: "storm:resolve-paths",
|
|
347
406
|
setup(build3) {
|
|
348
|
-
const parentTsConfig = build3.initialOptions.tsconfig ?
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
407
|
+
const parentTsConfig = build3.initialOptions.tsconfig ? _chunk3RG5ZIWIjs.__require.call(void 0, _chunk53DNHF7Bjs.joinPaths.call(void 0,
|
|
408
|
+
context.workspaceConfig.workspaceRoot,
|
|
409
|
+
build3.initialOptions.tsconfig.replace(
|
|
410
|
+
context.workspaceConfig.workspaceRoot,
|
|
411
|
+
""
|
|
412
|
+
)
|
|
413
|
+
)) : _chunk3RG5ZIWIjs.__require.call(void 0, _chunk53DNHF7Bjs.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, "tsconfig.json"));
|
|
414
|
+
const resolvedTsPaths = resolvePathsConfig(
|
|
415
|
+
parentTsConfig,
|
|
416
|
+
context.workspaceConfig.workspaceRoot,
|
|
417
|
+
context.options.projectRoot
|
|
418
|
+
);
|
|
419
|
+
const packagesRegex = new RegExp(
|
|
420
|
+
`^(${Object.keys(resolvedTsPaths).join("|")})$`
|
|
421
|
+
);
|
|
422
|
+
build3.onResolve({ filter: packagesRegex }, (args) => {
|
|
354
423
|
if (_optionalChain([build3, 'access', _29 => _29.initialOptions, 'access', _30 => _30.external, 'optionalAccess', _31 => _31.includes, 'call', _32 => _32(args.path)])) {
|
|
355
|
-
return {
|
|
356
|
-
path: args.path,
|
|
357
|
-
external: true
|
|
358
|
-
};
|
|
424
|
+
return { path: args.path, external: true };
|
|
359
425
|
}
|
|
360
|
-
return {
|
|
361
|
-
path: `${resolvedTsPaths[args.path][0]}/index.ts`
|
|
362
|
-
};
|
|
426
|
+
return { path: `${resolvedTsPaths[args.path][0]}/index.ts` };
|
|
363
427
|
});
|
|
364
428
|
}
|
|
365
|
-
})
|
|
429
|
+
});
|
|
366
430
|
|
|
367
431
|
// ../esbuild/src/context.ts
|
|
368
432
|
async function resolveContext(userOptions) {
|
|
@@ -371,15 +435,19 @@ async function resolveContext(userOptions) {
|
|
|
371
435
|
if (!workspaceRoot) {
|
|
372
436
|
throw new Error("Cannot find Nx workspace root");
|
|
373
437
|
}
|
|
374
|
-
const workspaceConfig = await
|
|
438
|
+
const workspaceConfig = await _chunkWE4HK4RNjs.getWorkspaceConfig.call(void 0, true, {
|
|
375
439
|
workspaceRoot: workspaceRoot.dir
|
|
376
440
|
});
|
|
377
|
-
|
|
378
|
-
const stopwatch =
|
|
441
|
+
_chunkWE4HK4RNjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
442
|
+
const stopwatch = _chunkWE4HK4RNjs.getStopwatch.call(void 0, "Build options resolution");
|
|
379
443
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
380
444
|
exitOnError: true
|
|
381
445
|
});
|
|
382
|
-
const projectJsonPath =
|
|
446
|
+
const projectJsonPath = _chunk53DNHF7Bjs.joinPaths.call(void 0,
|
|
447
|
+
workspaceRoot.dir,
|
|
448
|
+
projectRoot,
|
|
449
|
+
"project.json"
|
|
450
|
+
);
|
|
383
451
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
384
452
|
throw new Error("Cannot find project.json configuration");
|
|
385
453
|
}
|
|
@@ -388,18 +456,24 @@ async function resolveContext(userOptions) {
|
|
|
388
456
|
const projectName = projectJson.name || userOptions.name;
|
|
389
457
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
390
458
|
if (!_optionalChain([projectConfigurations, 'optionalAccess', _33 => _33.projects, 'optionalAccess', _34 => _34[projectName]])) {
|
|
391
|
-
throw new Error(
|
|
459
|
+
throw new Error(
|
|
460
|
+
"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."
|
|
461
|
+
);
|
|
392
462
|
}
|
|
393
463
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
394
464
|
options.name ??= projectName;
|
|
395
|
-
const packageJsonPath =
|
|
465
|
+
const packageJsonPath = _chunk53DNHF7Bjs.joinPaths.call(void 0,
|
|
466
|
+
workspaceRoot.dir,
|
|
467
|
+
options.projectRoot,
|
|
468
|
+
"package.json"
|
|
469
|
+
);
|
|
396
470
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
397
471
|
throw new Error("Cannot find package.json configuration");
|
|
398
472
|
}
|
|
399
473
|
const env = getEnv("esbuild", options);
|
|
400
474
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
401
475
|
const resolvedOptions = {
|
|
402
|
-
tsconfig:
|
|
476
|
+
tsconfig: _chunk53DNHF7Bjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "tsconfig.json"),
|
|
403
477
|
...options,
|
|
404
478
|
metafile: userOptions.mode === "development",
|
|
405
479
|
clean: false,
|
|
@@ -425,8 +499,12 @@ async function resolveContext(userOptions) {
|
|
|
425
499
|
projectConfigurations,
|
|
426
500
|
projectName,
|
|
427
501
|
projectGraph,
|
|
428
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot ||
|
|
429
|
-
outputPath: resolvedOptions.outputPath ||
|
|
502
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunk53DNHF7Bjs.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
503
|
+
outputPath: resolvedOptions.outputPath || _chunk53DNHF7Bjs.joinPaths.call(void 0,
|
|
504
|
+
workspaceConfig.workspaceRoot,
|
|
505
|
+
"dist",
|
|
506
|
+
resolvedOptions.projectRoot
|
|
507
|
+
),
|
|
430
508
|
minify: resolvedOptions.minify || resolvedOptions.mode === "production"
|
|
431
509
|
};
|
|
432
510
|
context.options.esbuildPlugins = [
|
|
@@ -435,27 +513,48 @@ async function resolveContext(userOptions) {
|
|
|
435
513
|
];
|
|
436
514
|
return context;
|
|
437
515
|
}
|
|
438
|
-
_chunk3GQAWCBQjs.__name.call(void 0, resolveContext, "resolveContext");
|
|
439
516
|
|
|
440
517
|
// ../esbuild/src/package-json.ts
|
|
441
518
|
|
|
442
519
|
|
|
443
520
|
|
|
444
521
|
async function generatePackageJson(context) {
|
|
445
|
-
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
446
|
-
|
|
447
|
-
const stopwatch =
|
|
448
|
-
const packageJsonPath =
|
|
522
|
+
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunk53DNHF7Bjs.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
523
|
+
_chunkWE4HK4RNjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
524
|
+
const stopwatch = _chunkWE4HK4RNjs.getStopwatch.call(void 0, "Write package.json file");
|
|
525
|
+
const packageJsonPath = _chunk53DNHF7Bjs.joinPaths.call(void 0,
|
|
526
|
+
context.options.projectRoot,
|
|
527
|
+
"project.json"
|
|
528
|
+
);
|
|
449
529
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
450
530
|
throw new Error("Cannot find package.json configuration");
|
|
451
531
|
}
|
|
452
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
532
|
+
const packageJsonFile = await _promises2.default.readFile(
|
|
533
|
+
_chunk53DNHF7Bjs.joinPaths.call(void 0,
|
|
534
|
+
context.workspaceConfig.workspaceRoot,
|
|
535
|
+
context.options.projectRoot,
|
|
536
|
+
"package.json"
|
|
537
|
+
),
|
|
538
|
+
"utf8"
|
|
539
|
+
);
|
|
453
540
|
let packageJson = JSON.parse(packageJsonFile);
|
|
454
541
|
if (!packageJson) {
|
|
455
542
|
throw new Error("Cannot find package.json configuration file");
|
|
456
543
|
}
|
|
457
|
-
packageJson = await addPackageDependencies(
|
|
458
|
-
|
|
544
|
+
packageJson = await addPackageDependencies(
|
|
545
|
+
context.workspaceConfig.workspaceRoot,
|
|
546
|
+
context.options.projectRoot,
|
|
547
|
+
context.projectName,
|
|
548
|
+
packageJson
|
|
549
|
+
);
|
|
550
|
+
packageJson = await addWorkspacePackageJsonFields(
|
|
551
|
+
context.workspaceConfig,
|
|
552
|
+
context.options.projectRoot,
|
|
553
|
+
context.sourceRoot,
|
|
554
|
+
context.projectName,
|
|
555
|
+
false,
|
|
556
|
+
packageJson
|
|
557
|
+
);
|
|
459
558
|
if (context.options.entry) {
|
|
460
559
|
packageJson.exports ??= {};
|
|
461
560
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
@@ -525,20 +624,25 @@ async function generatePackageJson(context) {
|
|
|
525
624
|
if (isDts) {
|
|
526
625
|
packageJson.types = `${defaultEntry}.d.${isEsm ? "mts" : isCjs ? "cts" : "ts"}`;
|
|
527
626
|
}
|
|
528
|
-
packageJson.exports = Object.keys(packageJson.exports).reduce(
|
|
529
|
-
|
|
530
|
-
ret[key.replace("/index", "")]
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
627
|
+
packageJson.exports = Object.keys(packageJson.exports).reduce(
|
|
628
|
+
(ret, key) => {
|
|
629
|
+
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
630
|
+
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
631
|
+
}
|
|
632
|
+
return ret;
|
|
633
|
+
},
|
|
634
|
+
packageJson.exports
|
|
635
|
+
);
|
|
534
636
|
}
|
|
535
637
|
}
|
|
536
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
638
|
+
await _devkit.writeJsonFile.call(void 0,
|
|
639
|
+
_chunk53DNHF7Bjs.joinPaths.call(void 0, context.outputPath, "package.json"),
|
|
640
|
+
packageJson
|
|
641
|
+
);
|
|
537
642
|
stopwatch();
|
|
538
643
|
}
|
|
539
644
|
return context;
|
|
540
645
|
}
|
|
541
|
-
_chunk3GQAWCBQjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
542
646
|
|
|
543
647
|
// ../esbuild/src/plugins/deps-check.ts
|
|
544
648
|
|
|
@@ -567,16 +671,12 @@ var unusedIgnore = [
|
|
|
567
671
|
// these are indirectly used by build
|
|
568
672
|
"buffer"
|
|
569
673
|
];
|
|
570
|
-
var missingIgnore = [
|
|
571
|
-
|
|
572
|
-
"@prisma/client",
|
|
573
|
-
"ts-toolbelt"
|
|
574
|
-
];
|
|
575
|
-
var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bundle) => ({
|
|
674
|
+
var missingIgnore = [".prisma", "@prisma/client", "ts-toolbelt"];
|
|
675
|
+
var depsCheckPlugin = (bundle) => ({
|
|
576
676
|
name: "storm:deps-check",
|
|
577
677
|
setup(build3) {
|
|
578
678
|
const pkgJsonPath = _path2.default.join(process.cwd(), "package.json");
|
|
579
|
-
const pkgContents =
|
|
679
|
+
const pkgContents = _chunk3RG5ZIWIjs.__require.call(void 0, pkgJsonPath);
|
|
580
680
|
const regDependencies = Object.keys(_nullishCoalesce(pkgContents["dependencies"], () => ( {})));
|
|
581
681
|
const devDependencies = Object.keys(_nullishCoalesce(pkgContents["devDependencies"], () => ( {})));
|
|
582
682
|
const peerDependencies = Object.keys(_nullishCoalesce(pkgContents["peerDependencies"], () => ( {})));
|
|
@@ -586,9 +686,7 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
586
686
|
];
|
|
587
687
|
const collectedDependencies = /* @__PURE__ */ new Set();
|
|
588
688
|
const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
|
|
589
|
-
build3.onResolve({
|
|
590
|
-
filter: onlyPackages
|
|
591
|
-
}, (args) => {
|
|
689
|
+
build3.onResolve({ filter: onlyPackages }, (args) => {
|
|
592
690
|
if (args.importer.includes(process.cwd())) {
|
|
593
691
|
if (args.path[0] === "@") {
|
|
594
692
|
const [org, pkg] = args.path.split("/");
|
|
@@ -598,19 +696,13 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
598
696
|
collectedDependencies.add(pkg);
|
|
599
697
|
}
|
|
600
698
|
}
|
|
601
|
-
return {
|
|
602
|
-
external: true
|
|
603
|
-
};
|
|
699
|
+
return { external: true };
|
|
604
700
|
});
|
|
605
701
|
build3.onEnd(() => {
|
|
606
|
-
const unusedDependencies = [
|
|
607
|
-
...dependencies
|
|
608
|
-
].filter((dep) => {
|
|
702
|
+
const unusedDependencies = [...dependencies].filter((dep) => {
|
|
609
703
|
return !collectedDependencies.has(dep) || _module.builtinModules.includes(dep);
|
|
610
704
|
});
|
|
611
|
-
const missingDependencies = [
|
|
612
|
-
...collectedDependencies
|
|
613
|
-
].filter((dep) => {
|
|
705
|
+
const missingDependencies = [...collectedDependencies].filter((dep) => {
|
|
614
706
|
return !dependencies.includes(dep) && !_module.builtinModules.includes(dep);
|
|
615
707
|
});
|
|
616
708
|
const filteredUnusedDeps = unusedDependencies.filter((dep) => {
|
|
@@ -619,8 +711,12 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
619
711
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
620
712
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
621
713
|
});
|
|
622
|
-
|
|
623
|
-
|
|
714
|
+
_chunkWE4HK4RNjs.writeWarning.call(void 0,
|
|
715
|
+
`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`
|
|
716
|
+
);
|
|
717
|
+
_chunkWE4HK4RNjs.writeError.call(void 0,
|
|
718
|
+
`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`
|
|
719
|
+
);
|
|
624
720
|
if (filteredMissingDeps.length > 0) {
|
|
625
721
|
throw new Error(`Missing dependencies detected - please install them:
|
|
626
722
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -628,36 +724,48 @@ ${JSON.stringify(filteredMissingDeps)}
|
|
|
628
724
|
}
|
|
629
725
|
});
|
|
630
726
|
}
|
|
631
|
-
})
|
|
727
|
+
});
|
|
632
728
|
|
|
633
729
|
// ../esbuild/src/tsup.ts
|
|
634
730
|
var _tsup = require('tsup');
|
|
635
731
|
async function executeTsup(context) {
|
|
636
|
-
|
|
637
|
-
|
|
732
|
+
_chunkWE4HK4RNjs.writeDebug.call(void 0,
|
|
733
|
+
` \u{1F680} Running ${context.options.name} build`,
|
|
734
|
+
context.workspaceConfig
|
|
735
|
+
);
|
|
736
|
+
const stopwatch = _chunkWE4HK4RNjs.getStopwatch.call(void 0, `${context.options.name} build`);
|
|
638
737
|
await _tsup.build.call(void 0, {
|
|
639
738
|
...context.options,
|
|
640
|
-
outDir: context.options.distDir ?
|
|
739
|
+
outDir: context.options.distDir ? _chunk53DNHF7Bjs.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
|
|
641
740
|
workspaceConfig: context.workspaceConfig
|
|
642
741
|
});
|
|
643
742
|
stopwatch();
|
|
644
743
|
return context;
|
|
645
744
|
}
|
|
646
|
-
_chunk3GQAWCBQjs.__name.call(void 0, executeTsup, "executeTsup");
|
|
647
745
|
|
|
648
746
|
// ../esbuild/src/build.ts
|
|
649
747
|
async function reportResults(context) {
|
|
650
748
|
if (_optionalChain([context, 'access', _35 => _35.result, 'optionalAccess', _36 => _36.errors, 'access', _37 => _37.length]) === 0) {
|
|
651
749
|
if (context.result.warnings.length > 0) {
|
|
652
|
-
|
|
750
|
+
_chunkWE4HK4RNjs.writeWarning.call(void 0,
|
|
751
|
+
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
752
|
+
context.workspaceConfig
|
|
753
|
+
);
|
|
653
754
|
}
|
|
654
|
-
|
|
755
|
+
_chunkWE4HK4RNjs.writeSuccess.call(void 0,
|
|
756
|
+
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
757
|
+
context.workspaceConfig
|
|
758
|
+
);
|
|
655
759
|
} else if (_optionalChain([context, 'access', _38 => _38.result, 'optionalAccess', _39 => _39.errors]) && _optionalChain([context, 'access', _40 => _40.result, 'optionalAccess', _41 => _41.errors, 'access', _42 => _42.length]) > 0) {
|
|
656
|
-
|
|
657
|
-
|
|
760
|
+
_chunkWE4HK4RNjs.writeError.call(void 0,
|
|
761
|
+
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
762
|
+
context.workspaceConfig
|
|
763
|
+
);
|
|
764
|
+
throw new Error(
|
|
765
|
+
`The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`
|
|
766
|
+
);
|
|
658
767
|
}
|
|
659
768
|
}
|
|
660
|
-
_chunk3GQAWCBQjs.__name.call(void 0, reportResults, "reportResults");
|
|
661
769
|
async function dependencyCheck(options) {
|
|
662
770
|
if (process.env.DEV === "true") {
|
|
663
771
|
return void 0;
|
|
@@ -668,43 +776,39 @@ async function dependencyCheck(options) {
|
|
|
668
776
|
const buildPromise = esbuild.build({
|
|
669
777
|
entryPoints: _globby.globbySync.call(void 0, "**/*.{j,t}s", {
|
|
670
778
|
// We don't check dependencies in ecosystem tests because tests are isolated from the build.
|
|
671
|
-
ignore: [
|
|
672
|
-
"./src/__tests__/**/*",
|
|
673
|
-
"./tests/e2e/**/*",
|
|
674
|
-
"./dist/**/*"
|
|
675
|
-
],
|
|
779
|
+
ignore: ["./src/__tests__/**/*", "./tests/e2e/**/*", "./dist/**/*"],
|
|
676
780
|
gitignore: true
|
|
677
781
|
}),
|
|
678
782
|
logLevel: "silent",
|
|
783
|
+
// there will be errors
|
|
679
784
|
bundle: true,
|
|
785
|
+
// we bundle to get everything
|
|
680
786
|
write: false,
|
|
787
|
+
// no need to write for analysis
|
|
681
788
|
outdir: "out",
|
|
682
|
-
plugins: [
|
|
683
|
-
depsCheckPlugin(options.bundle)
|
|
684
|
-
]
|
|
789
|
+
plugins: [depsCheckPlugin(options.bundle)]
|
|
685
790
|
});
|
|
686
791
|
await buildPromise.catch(() => {
|
|
687
792
|
});
|
|
688
793
|
return void 0;
|
|
689
794
|
}
|
|
690
|
-
_chunk3GQAWCBQjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
691
795
|
async function cleanOutputPath(context) {
|
|
692
796
|
if (context.clean !== false && context.outputPath) {
|
|
693
|
-
|
|
694
|
-
|
|
797
|
+
_chunkWE4HK4RNjs.writeDebug.call(void 0,
|
|
798
|
+
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
799
|
+
context.workspaceConfig
|
|
800
|
+
);
|
|
801
|
+
const stopwatch = _chunkWE4HK4RNjs.getStopwatch.call(void 0, `${context.options.name} output clean`);
|
|
695
802
|
await cleanDirectories(context.outputPath);
|
|
696
803
|
stopwatch();
|
|
697
804
|
}
|
|
698
805
|
return context;
|
|
699
806
|
}
|
|
700
|
-
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
701
807
|
async function build2(options) {
|
|
702
|
-
|
|
703
|
-
const stopwatch =
|
|
808
|
+
_chunkWE4HK4RNjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
809
|
+
const stopwatch = _chunkWE4HK4RNjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
704
810
|
try {
|
|
705
|
-
const opts = Array.isArray(options) ? options : [
|
|
706
|
-
options
|
|
707
|
-
];
|
|
811
|
+
const opts = Array.isArray(options) ? options : [options];
|
|
708
812
|
if (opts.length === 0) {
|
|
709
813
|
throw new Error("No build options were provided");
|
|
710
814
|
}
|
|
@@ -717,21 +821,24 @@ async function build2(options) {
|
|
|
717
821
|
executeTsup(context)
|
|
718
822
|
]);
|
|
719
823
|
await reportResults(context);
|
|
720
|
-
|
|
824
|
+
_chunkWE4HK4RNjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
721
825
|
} catch (error) {
|
|
722
|
-
|
|
826
|
+
_chunkWE4HK4RNjs.writeFatal.call(void 0,
|
|
827
|
+
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
828
|
+
);
|
|
723
829
|
throw error;
|
|
724
830
|
} finally {
|
|
725
831
|
stopwatch();
|
|
726
832
|
}
|
|
727
833
|
}
|
|
728
|
-
_chunk3GQAWCBQjs.__name.call(void 0, build2, "build");
|
|
729
834
|
|
|
730
835
|
// src/executors/esbuild/executor.ts
|
|
731
836
|
async function esbuildExecutorFn(options, context, config) {
|
|
732
|
-
|
|
837
|
+
_chunkWE4HK4RNjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
733
838
|
if (!_optionalChain([context, 'access', _43 => _43.projectsConfigurations, 'optionalAccess', _44 => _44.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _45 => _45.projectsConfigurations, 'access', _46 => _46.projects, 'access', _47 => _47[context.projectName], 'optionalAccess', _48 => _48.root])) {
|
|
734
|
-
throw new Error(
|
|
839
|
+
throw new Error(
|
|
840
|
+
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
841
|
+
);
|
|
735
842
|
}
|
|
736
843
|
await build2({
|
|
737
844
|
...options,
|
|
@@ -745,20 +852,21 @@ async function esbuildExecutorFn(options, context, config) {
|
|
|
745
852
|
success: true
|
|
746
853
|
};
|
|
747
854
|
}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
855
|
+
var executor_default = _chunkAJ3C2EDWjs.withRunExecutor.call(void 0,
|
|
856
|
+
"Storm ESBuild build",
|
|
857
|
+
esbuildExecutorFn,
|
|
858
|
+
{
|
|
859
|
+
skipReadingConfig: false,
|
|
860
|
+
hooks: {
|
|
861
|
+
applyDefaultOptions: async (options, config) => {
|
|
862
|
+
options.entry ??= ["src/index.ts"];
|
|
863
|
+
options.outputPath ??= "dist/{projectRoot}";
|
|
864
|
+
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
865
|
+
return options;
|
|
866
|
+
}
|
|
867
|
+
}
|
|
760
868
|
}
|
|
761
|
-
|
|
869
|
+
);
|
|
762
870
|
|
|
763
871
|
|
|
764
872
|
|