@storm-software/workspace-tools 1.267.20 → 1.267.22
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 +21 -0
- package/README.md +1 -2
- 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-DCPKZRRY.js} +259 -201
- 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-OBZTQWHM.mjs → chunk-J6OXY3KI.mjs} +233 -175
- 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/executors.js +21 -21
- package/dist/executors.mjs +23 -23
- package/dist/generators.js +17 -17
- package/dist/generators.mjs +16 -16
- package/dist/index.js +41 -41
- package/dist/index.mjs +43 -43
- 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
|
|
|
@@ -320,50 +381,6 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
320
381
|
}
|
|
321
382
|
};
|
|
322
383
|
|
|
323
|
-
// ../esbuild/src/plugins/resolve-paths.ts
|
|
324
|
-
|
|
325
|
-
function resolvePathsConfig(options, cwd, projectRoot) {
|
|
326
|
-
if (_optionalChain([options, 'optionalAccess', _27 => _27.compilerOptions, 'optionalAccess', _28 => _28.paths])) {
|
|
327
|
-
const paths = Object.entries(options.compilerOptions.paths);
|
|
328
|
-
const resolvedPaths = paths.map(([key, paths2]) => {
|
|
329
|
-
return [
|
|
330
|
-
key,
|
|
331
|
-
paths2.map((v) => _path2.default.resolve(cwd, v))
|
|
332
|
-
];
|
|
333
|
-
});
|
|
334
|
-
return Object.fromEntries(resolvedPaths);
|
|
335
|
-
}
|
|
336
|
-
if (options.extends) {
|
|
337
|
-
const extendsPath = _path2.default.resolve(projectRoot ? _chunkJTAXCQX6js.joinPaths.call(void 0, cwd, projectRoot, options.extends) : _chunkJTAXCQX6js.joinPaths.call(void 0, cwd, options.extends));
|
|
338
|
-
const extendsDir = _path2.default.dirname(extendsPath);
|
|
339
|
-
const extendsConfig = _chunk3GQAWCBQjs.__require.call(void 0, extendsPath);
|
|
340
|
-
return resolvePathsConfig(extendsConfig, extendsDir);
|
|
341
|
-
}
|
|
342
|
-
return [];
|
|
343
|
-
}
|
|
344
|
-
_chunk3GQAWCBQjs.__name.call(void 0, resolvePathsConfig, "resolvePathsConfig");
|
|
345
|
-
var resolvePathsPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (context) => ({
|
|
346
|
-
name: "storm:resolve-paths",
|
|
347
|
-
setup(build3) {
|
|
348
|
-
const parentTsConfig = build3.initialOptions.tsconfig ? _chunk3GQAWCBQjs.__require.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, build3.initialOptions.tsconfig.replace(context.workspaceConfig.workspaceRoot, ""))) : _chunk3GQAWCBQjs.__require.call(void 0, _chunkJTAXCQX6js.joinPaths.call(void 0, context.workspaceConfig.workspaceRoot, "tsconfig.json"));
|
|
349
|
-
const resolvedTsPaths = resolvePathsConfig(parentTsConfig, context.workspaceConfig.workspaceRoot, context.options.projectRoot);
|
|
350
|
-
const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
|
|
351
|
-
build3.onResolve({
|
|
352
|
-
filter: packagesRegex
|
|
353
|
-
}, (args) => {
|
|
354
|
-
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
|
-
};
|
|
359
|
-
}
|
|
360
|
-
return {
|
|
361
|
-
path: `${resolvedTsPaths[args.path][0]}/index.ts`
|
|
362
|
-
};
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
}), "resolvePathsPlugin");
|
|
366
|
-
|
|
367
384
|
// ../esbuild/src/context.ts
|
|
368
385
|
async function resolveContext(userOptions) {
|
|
369
386
|
const projectRoot = userOptions.projectRoot;
|
|
@@ -371,15 +388,19 @@ async function resolveContext(userOptions) {
|
|
|
371
388
|
if (!workspaceRoot) {
|
|
372
389
|
throw new Error("Cannot find Nx workspace root");
|
|
373
390
|
}
|
|
374
|
-
const workspaceConfig = await
|
|
391
|
+
const workspaceConfig = await _chunkWE4HK4RNjs.getWorkspaceConfig.call(void 0, true, {
|
|
375
392
|
workspaceRoot: workspaceRoot.dir
|
|
376
393
|
});
|
|
377
|
-
|
|
378
|
-
const stopwatch =
|
|
394
|
+
_chunkWE4HK4RNjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
395
|
+
const stopwatch = _chunkWE4HK4RNjs.getStopwatch.call(void 0, "Build options resolution");
|
|
379
396
|
const projectGraph = await _devkit.createProjectGraphAsync.call(void 0, {
|
|
380
397
|
exitOnError: true
|
|
381
398
|
});
|
|
382
|
-
const projectJsonPath =
|
|
399
|
+
const projectJsonPath = _chunk53DNHF7Bjs.joinPaths.call(void 0,
|
|
400
|
+
workspaceRoot.dir,
|
|
401
|
+
projectRoot,
|
|
402
|
+
"project.json"
|
|
403
|
+
);
|
|
383
404
|
if (!_fs.existsSync.call(void 0, projectJsonPath)) {
|
|
384
405
|
throw new Error("Cannot find project.json configuration");
|
|
385
406
|
}
|
|
@@ -387,19 +408,25 @@ async function resolveContext(userOptions) {
|
|
|
387
408
|
const projectJson = JSON.parse(projectJsonFile);
|
|
388
409
|
const projectName = projectJson.name || userOptions.name;
|
|
389
410
|
const projectConfigurations = _devkit.readProjectsConfigurationFromProjectGraph.call(void 0, projectGraph);
|
|
390
|
-
if (!_optionalChain([projectConfigurations, 'optionalAccess',
|
|
391
|
-
throw new Error(
|
|
411
|
+
if (!_optionalChain([projectConfigurations, 'optionalAccess', _27 => _27.projects, 'optionalAccess', _28 => _28[projectName]])) {
|
|
412
|
+
throw new Error(
|
|
413
|
+
"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."
|
|
414
|
+
);
|
|
392
415
|
}
|
|
393
416
|
const options = _defu2.default.call(void 0, userOptions, DEFAULT_BUILD_OPTIONS);
|
|
394
417
|
options.name ??= projectName;
|
|
395
|
-
const packageJsonPath =
|
|
418
|
+
const packageJsonPath = _chunk53DNHF7Bjs.joinPaths.call(void 0,
|
|
419
|
+
workspaceRoot.dir,
|
|
420
|
+
options.projectRoot,
|
|
421
|
+
"package.json"
|
|
422
|
+
);
|
|
396
423
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
397
424
|
throw new Error("Cannot find package.json configuration");
|
|
398
425
|
}
|
|
399
426
|
const env = getEnv("esbuild", options);
|
|
400
427
|
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
401
428
|
const resolvedOptions = {
|
|
402
|
-
tsconfig:
|
|
429
|
+
tsconfig: _chunk53DNHF7Bjs.joinPaths.call(void 0, workspaceRoot.dir, projectRoot, "tsconfig.json"),
|
|
403
430
|
...options,
|
|
404
431
|
metafile: userOptions.mode === "development",
|
|
405
432
|
clean: false,
|
|
@@ -425,37 +452,59 @@ async function resolveContext(userOptions) {
|
|
|
425
452
|
projectConfigurations,
|
|
426
453
|
projectName,
|
|
427
454
|
projectGraph,
|
|
428
|
-
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot ||
|
|
429
|
-
outputPath: resolvedOptions.outputPath ||
|
|
455
|
+
sourceRoot: resolvedOptions.sourceRoot || projectJson.sourceRoot || _chunk53DNHF7Bjs.joinPaths.call(void 0, resolvedOptions.projectRoot, "src"),
|
|
456
|
+
outputPath: resolvedOptions.outputPath || _chunk53DNHF7Bjs.joinPaths.call(void 0,
|
|
457
|
+
workspaceConfig.workspaceRoot,
|
|
458
|
+
"dist",
|
|
459
|
+
resolvedOptions.projectRoot
|
|
460
|
+
),
|
|
430
461
|
minify: resolvedOptions.minify || resolvedOptions.mode === "production"
|
|
431
462
|
};
|
|
432
|
-
context.options.esbuildPlugins = [
|
|
433
|
-
resolvePathsPlugin(context),
|
|
434
|
-
..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))
|
|
435
|
-
];
|
|
463
|
+
context.options.esbuildPlugins = [..._nullishCoalesce(context.options.esbuildPlugins, () => ( []))];
|
|
436
464
|
return context;
|
|
437
465
|
}
|
|
438
|
-
_chunk3GQAWCBQjs.__name.call(void 0, resolveContext, "resolveContext");
|
|
439
466
|
|
|
440
467
|
// ../esbuild/src/package-json.ts
|
|
441
468
|
|
|
442
469
|
|
|
443
470
|
|
|
444
471
|
async function generatePackageJson(context) {
|
|
445
|
-
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0,
|
|
446
|
-
|
|
447
|
-
const stopwatch =
|
|
448
|
-
const packageJsonPath =
|
|
472
|
+
if (context.options.generatePackageJson !== false && _fs.existsSync.call(void 0, _chunk53DNHF7Bjs.joinPaths.call(void 0, context.options.projectRoot, "package.json"))) {
|
|
473
|
+
_chunkWE4HK4RNjs.writeDebug.call(void 0, " \u270D\uFE0F Writing package.json file", context.workspaceConfig);
|
|
474
|
+
const stopwatch = _chunkWE4HK4RNjs.getStopwatch.call(void 0, "Write package.json file");
|
|
475
|
+
const packageJsonPath = _chunk53DNHF7Bjs.joinPaths.call(void 0,
|
|
476
|
+
context.options.projectRoot,
|
|
477
|
+
"project.json"
|
|
478
|
+
);
|
|
449
479
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
450
480
|
throw new Error("Cannot find package.json configuration");
|
|
451
481
|
}
|
|
452
|
-
const packageJsonFile = await _promises2.default.readFile(
|
|
482
|
+
const packageJsonFile = await _promises2.default.readFile(
|
|
483
|
+
_chunk53DNHF7Bjs.joinPaths.call(void 0,
|
|
484
|
+
context.workspaceConfig.workspaceRoot,
|
|
485
|
+
context.options.projectRoot,
|
|
486
|
+
"package.json"
|
|
487
|
+
),
|
|
488
|
+
"utf8"
|
|
489
|
+
);
|
|
453
490
|
let packageJson = JSON.parse(packageJsonFile);
|
|
454
491
|
if (!packageJson) {
|
|
455
492
|
throw new Error("Cannot find package.json configuration file");
|
|
456
493
|
}
|
|
457
|
-
packageJson = await addPackageDependencies(
|
|
458
|
-
|
|
494
|
+
packageJson = await addPackageDependencies(
|
|
495
|
+
context.workspaceConfig.workspaceRoot,
|
|
496
|
+
context.options.projectRoot,
|
|
497
|
+
context.projectName,
|
|
498
|
+
packageJson
|
|
499
|
+
);
|
|
500
|
+
packageJson = await addWorkspacePackageJsonFields(
|
|
501
|
+
context.workspaceConfig,
|
|
502
|
+
context.options.projectRoot,
|
|
503
|
+
context.sourceRoot,
|
|
504
|
+
context.projectName,
|
|
505
|
+
false,
|
|
506
|
+
packageJson
|
|
507
|
+
);
|
|
459
508
|
if (context.options.entry) {
|
|
460
509
|
packageJson.exports ??= {};
|
|
461
510
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
@@ -525,20 +574,25 @@ async function generatePackageJson(context) {
|
|
|
525
574
|
if (isDts) {
|
|
526
575
|
packageJson.types = `${defaultEntry}.d.${isEsm ? "mts" : isCjs ? "cts" : "ts"}`;
|
|
527
576
|
}
|
|
528
|
-
packageJson.exports = Object.keys(packageJson.exports).reduce(
|
|
529
|
-
|
|
530
|
-
ret[key.replace("/index", "")]
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
577
|
+
packageJson.exports = Object.keys(packageJson.exports).reduce(
|
|
578
|
+
(ret, key) => {
|
|
579
|
+
if (key.endsWith("/index") && !ret[key.replace("/index", "")]) {
|
|
580
|
+
ret[key.replace("/index", "")] = packageJson.exports[key];
|
|
581
|
+
}
|
|
582
|
+
return ret;
|
|
583
|
+
},
|
|
584
|
+
packageJson.exports
|
|
585
|
+
);
|
|
534
586
|
}
|
|
535
587
|
}
|
|
536
|
-
await _devkit.writeJsonFile.call(void 0,
|
|
588
|
+
await _devkit.writeJsonFile.call(void 0,
|
|
589
|
+
_chunk53DNHF7Bjs.joinPaths.call(void 0, context.outputPath, "package.json"),
|
|
590
|
+
packageJson
|
|
591
|
+
);
|
|
537
592
|
stopwatch();
|
|
538
593
|
}
|
|
539
594
|
return context;
|
|
540
595
|
}
|
|
541
|
-
_chunk3GQAWCBQjs.__name.call(void 0, generatePackageJson, "generatePackageJson");
|
|
542
596
|
|
|
543
597
|
// ../esbuild/src/plugins/deps-check.ts
|
|
544
598
|
|
|
@@ -567,16 +621,12 @@ var unusedIgnore = [
|
|
|
567
621
|
// these are indirectly used by build
|
|
568
622
|
"buffer"
|
|
569
623
|
];
|
|
570
|
-
var missingIgnore = [
|
|
571
|
-
|
|
572
|
-
"@prisma/client",
|
|
573
|
-
"ts-toolbelt"
|
|
574
|
-
];
|
|
575
|
-
var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bundle) => ({
|
|
624
|
+
var missingIgnore = [".prisma", "@prisma/client", "ts-toolbelt"];
|
|
625
|
+
var depsCheckPlugin = (bundle) => ({
|
|
576
626
|
name: "storm:deps-check",
|
|
577
627
|
setup(build3) {
|
|
578
628
|
const pkgJsonPath = _path2.default.join(process.cwd(), "package.json");
|
|
579
|
-
const pkgContents =
|
|
629
|
+
const pkgContents = _chunk3RG5ZIWIjs.__require.call(void 0, pkgJsonPath);
|
|
580
630
|
const regDependencies = Object.keys(_nullishCoalesce(pkgContents["dependencies"], () => ( {})));
|
|
581
631
|
const devDependencies = Object.keys(_nullishCoalesce(pkgContents["devDependencies"], () => ( {})));
|
|
582
632
|
const peerDependencies = Object.keys(_nullishCoalesce(pkgContents["peerDependencies"], () => ( {})));
|
|
@@ -586,9 +636,7 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
586
636
|
];
|
|
587
637
|
const collectedDependencies = /* @__PURE__ */ new Set();
|
|
588
638
|
const onlyPackages = /^[^./](?!:)|^\.[^./]|^\.\.[^/]/;
|
|
589
|
-
build3.onResolve({
|
|
590
|
-
filter: onlyPackages
|
|
591
|
-
}, (args) => {
|
|
639
|
+
build3.onResolve({ filter: onlyPackages }, (args) => {
|
|
592
640
|
if (args.importer.includes(process.cwd())) {
|
|
593
641
|
if (args.path[0] === "@") {
|
|
594
642
|
const [org, pkg] = args.path.split("/");
|
|
@@ -598,19 +646,13 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
598
646
|
collectedDependencies.add(pkg);
|
|
599
647
|
}
|
|
600
648
|
}
|
|
601
|
-
return {
|
|
602
|
-
external: true
|
|
603
|
-
};
|
|
649
|
+
return { external: true };
|
|
604
650
|
});
|
|
605
651
|
build3.onEnd(() => {
|
|
606
|
-
const unusedDependencies = [
|
|
607
|
-
...dependencies
|
|
608
|
-
].filter((dep) => {
|
|
652
|
+
const unusedDependencies = [...dependencies].filter((dep) => {
|
|
609
653
|
return !collectedDependencies.has(dep) || _module.builtinModules.includes(dep);
|
|
610
654
|
});
|
|
611
|
-
const missingDependencies = [
|
|
612
|
-
...collectedDependencies
|
|
613
|
-
].filter((dep) => {
|
|
655
|
+
const missingDependencies = [...collectedDependencies].filter((dep) => {
|
|
614
656
|
return !dependencies.includes(dep) && !_module.builtinModules.includes(dep);
|
|
615
657
|
});
|
|
616
658
|
const filteredUnusedDeps = unusedDependencies.filter((dep) => {
|
|
@@ -619,8 +661,12 @@ var depsCheckPlugin = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (bund
|
|
|
619
661
|
const filteredMissingDeps = missingDependencies.filter((dep) => {
|
|
620
662
|
return !missingIgnore.some((pattern) => dep.match(pattern)) && !peerDependencies.includes(dep);
|
|
621
663
|
});
|
|
622
|
-
|
|
623
|
-
|
|
664
|
+
_chunkWE4HK4RNjs.writeWarning.call(void 0,
|
|
665
|
+
`Unused Dependencies: ${JSON.stringify(filteredUnusedDeps)}`
|
|
666
|
+
);
|
|
667
|
+
_chunkWE4HK4RNjs.writeError.call(void 0,
|
|
668
|
+
`Missing Dependencies: ${JSON.stringify(filteredMissingDeps)}`
|
|
669
|
+
);
|
|
624
670
|
if (filteredMissingDeps.length > 0) {
|
|
625
671
|
throw new Error(`Missing dependencies detected - please install them:
|
|
626
672
|
${JSON.stringify(filteredMissingDeps)}
|
|
@@ -628,36 +674,48 @@ ${JSON.stringify(filteredMissingDeps)}
|
|
|
628
674
|
}
|
|
629
675
|
});
|
|
630
676
|
}
|
|
631
|
-
})
|
|
677
|
+
});
|
|
632
678
|
|
|
633
679
|
// ../esbuild/src/tsup.ts
|
|
634
680
|
var _tsup = require('tsup');
|
|
635
681
|
async function executeTsup(context) {
|
|
636
|
-
|
|
637
|
-
|
|
682
|
+
_chunkWE4HK4RNjs.writeDebug.call(void 0,
|
|
683
|
+
` \u{1F680} Running ${context.options.name} build`,
|
|
684
|
+
context.workspaceConfig
|
|
685
|
+
);
|
|
686
|
+
const stopwatch = _chunkWE4HK4RNjs.getStopwatch.call(void 0, `${context.options.name} build`);
|
|
638
687
|
await _tsup.build.call(void 0, {
|
|
639
688
|
...context.options,
|
|
640
|
-
outDir: context.options.distDir ?
|
|
689
|
+
outDir: context.options.distDir ? _chunk53DNHF7Bjs.joinPaths.call(void 0, context.outputPath, context.options.distDir) : context.outputPath,
|
|
641
690
|
workspaceConfig: context.workspaceConfig
|
|
642
691
|
});
|
|
643
692
|
stopwatch();
|
|
644
693
|
return context;
|
|
645
694
|
}
|
|
646
|
-
_chunk3GQAWCBQjs.__name.call(void 0, executeTsup, "executeTsup");
|
|
647
695
|
|
|
648
696
|
// ../esbuild/src/build.ts
|
|
649
697
|
async function reportResults(context) {
|
|
650
|
-
if (_optionalChain([context, 'access',
|
|
698
|
+
if (_optionalChain([context, 'access', _29 => _29.result, 'optionalAccess', _30 => _30.errors, 'access', _31 => _31.length]) === 0) {
|
|
651
699
|
if (context.result.warnings.length > 0) {
|
|
652
|
-
|
|
700
|
+
_chunkWE4HK4RNjs.writeWarning.call(void 0,
|
|
701
|
+
` \u{1F6A7} The following warnings occurred during the build: ${context.result.warnings.map((warning) => warning.text).join("\n")}`,
|
|
702
|
+
context.workspaceConfig
|
|
703
|
+
);
|
|
653
704
|
}
|
|
654
|
-
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
|
|
705
|
+
_chunkWE4HK4RNjs.writeSuccess.call(void 0,
|
|
706
|
+
` \u{1F4E6} The ${context.options.name} build completed successfully`,
|
|
707
|
+
context.workspaceConfig
|
|
708
|
+
);
|
|
709
|
+
} else if (_optionalChain([context, 'access', _32 => _32.result, 'optionalAccess', _33 => _33.errors]) && _optionalChain([context, 'access', _34 => _34.result, 'optionalAccess', _35 => _35.errors, 'access', _36 => _36.length]) > 0) {
|
|
710
|
+
_chunkWE4HK4RNjs.writeError.call(void 0,
|
|
711
|
+
` \u274C The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`,
|
|
712
|
+
context.workspaceConfig
|
|
713
|
+
);
|
|
714
|
+
throw new Error(
|
|
715
|
+
`The ${context.options.name} build failed with the following errors: ${context.result.errors.map((error) => error.text).join("\n")}`
|
|
716
|
+
);
|
|
658
717
|
}
|
|
659
718
|
}
|
|
660
|
-
_chunk3GQAWCBQjs.__name.call(void 0, reportResults, "reportResults");
|
|
661
719
|
async function dependencyCheck(options) {
|
|
662
720
|
if (process.env.DEV === "true") {
|
|
663
721
|
return void 0;
|
|
@@ -668,43 +726,39 @@ async function dependencyCheck(options) {
|
|
|
668
726
|
const buildPromise = esbuild.build({
|
|
669
727
|
entryPoints: _globby.globbySync.call(void 0, "**/*.{j,t}s", {
|
|
670
728
|
// 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
|
-
],
|
|
729
|
+
ignore: ["./src/__tests__/**/*", "./tests/e2e/**/*", "./dist/**/*"],
|
|
676
730
|
gitignore: true
|
|
677
731
|
}),
|
|
678
732
|
logLevel: "silent",
|
|
733
|
+
// there will be errors
|
|
679
734
|
bundle: true,
|
|
735
|
+
// we bundle to get everything
|
|
680
736
|
write: false,
|
|
737
|
+
// no need to write for analysis
|
|
681
738
|
outdir: "out",
|
|
682
|
-
plugins: [
|
|
683
|
-
depsCheckPlugin(options.bundle)
|
|
684
|
-
]
|
|
739
|
+
plugins: [depsCheckPlugin(options.bundle)]
|
|
685
740
|
});
|
|
686
741
|
await buildPromise.catch(() => {
|
|
687
742
|
});
|
|
688
743
|
return void 0;
|
|
689
744
|
}
|
|
690
|
-
_chunk3GQAWCBQjs.__name.call(void 0, dependencyCheck, "dependencyCheck");
|
|
691
745
|
async function cleanOutputPath(context) {
|
|
692
746
|
if (context.clean !== false && context.outputPath) {
|
|
693
|
-
|
|
694
|
-
|
|
747
|
+
_chunkWE4HK4RNjs.writeDebug.call(void 0,
|
|
748
|
+
` \u{1F9F9} Cleaning ${context.options.name} output path: ${context.outputPath}`,
|
|
749
|
+
context.workspaceConfig
|
|
750
|
+
);
|
|
751
|
+
const stopwatch = _chunkWE4HK4RNjs.getStopwatch.call(void 0, `${context.options.name} output clean`);
|
|
695
752
|
await cleanDirectories(context.outputPath);
|
|
696
753
|
stopwatch();
|
|
697
754
|
}
|
|
698
755
|
return context;
|
|
699
756
|
}
|
|
700
|
-
_chunk3GQAWCBQjs.__name.call(void 0, cleanOutputPath, "cleanOutputPath");
|
|
701
757
|
async function build2(options) {
|
|
702
|
-
|
|
703
|
-
const stopwatch =
|
|
758
|
+
_chunkWE4HK4RNjs.writeDebug.call(void 0, ` \u26A1 Executing Storm ESBuild pipeline`);
|
|
759
|
+
const stopwatch = _chunkWE4HK4RNjs.getStopwatch.call(void 0, "ESBuild pipeline");
|
|
704
760
|
try {
|
|
705
|
-
const opts = Array.isArray(options) ? options : [
|
|
706
|
-
options
|
|
707
|
-
];
|
|
761
|
+
const opts = Array.isArray(options) ? options : [options];
|
|
708
762
|
if (opts.length === 0) {
|
|
709
763
|
throw new Error("No build options were provided");
|
|
710
764
|
}
|
|
@@ -717,27 +771,30 @@ async function build2(options) {
|
|
|
717
771
|
executeTsup(context)
|
|
718
772
|
]);
|
|
719
773
|
await reportResults(context);
|
|
720
|
-
|
|
774
|
+
_chunkWE4HK4RNjs.writeSuccess.call(void 0, " \u{1F3C1} ESBuild pipeline build completed successfully");
|
|
721
775
|
} catch (error) {
|
|
722
|
-
|
|
776
|
+
_chunkWE4HK4RNjs.writeFatal.call(void 0,
|
|
777
|
+
"Fatal errors that the build process could not recover from have occured. The build process has been terminated."
|
|
778
|
+
);
|
|
723
779
|
throw error;
|
|
724
780
|
} finally {
|
|
725
781
|
stopwatch();
|
|
726
782
|
}
|
|
727
783
|
}
|
|
728
|
-
_chunk3GQAWCBQjs.__name.call(void 0, build2, "build");
|
|
729
784
|
|
|
730
785
|
// src/executors/esbuild/executor.ts
|
|
731
786
|
async function esbuildExecutorFn(options, context, config) {
|
|
732
|
-
|
|
733
|
-
if (!_optionalChain([context, 'access',
|
|
734
|
-
throw new Error(
|
|
787
|
+
_chunkWE4HK4RNjs.writeInfo.call(void 0, "\u{1F4E6} Running Storm ESBuild executor on the workspace", config);
|
|
788
|
+
if (!_optionalChain([context, 'access', _37 => _37.projectsConfigurations, 'optionalAccess', _38 => _38.projects]) || !context.projectName || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _39 => _39.projectsConfigurations, 'access', _40 => _40.projects, 'access', _41 => _41[context.projectName], 'optionalAccess', _42 => _42.root])) {
|
|
789
|
+
throw new Error(
|
|
790
|
+
"The Build process failed because the context is not valid. Please run this command from a workspace."
|
|
791
|
+
);
|
|
735
792
|
}
|
|
736
793
|
await build2({
|
|
737
794
|
...options,
|
|
738
|
-
projectRoot: _optionalChain([context, 'access',
|
|
795
|
+
projectRoot: _optionalChain([context, 'access', _43 => _43.projectsConfigurations, 'access', _44 => _44.projects, 'optionalAccess', _45 => _45[context.projectName], 'access', _46 => _46.root]),
|
|
739
796
|
name: context.projectName,
|
|
740
|
-
sourceRoot: _optionalChain([context, 'access',
|
|
797
|
+
sourceRoot: _optionalChain([context, 'access', _47 => _47.projectsConfigurations, 'access', _48 => _48.projects, 'optionalAccess', _49 => _49[context.projectName], 'optionalAccess', _50 => _50.sourceRoot]),
|
|
741
798
|
format: options.format,
|
|
742
799
|
platform: options.format
|
|
743
800
|
});
|
|
@@ -745,20 +802,21 @@ async function esbuildExecutorFn(options, context, config) {
|
|
|
745
802
|
success: true
|
|
746
803
|
};
|
|
747
804
|
}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
805
|
+
var executor_default = _chunkAJ3C2EDWjs.withRunExecutor.call(void 0,
|
|
806
|
+
"Storm ESBuild build",
|
|
807
|
+
esbuildExecutorFn,
|
|
808
|
+
{
|
|
809
|
+
skipReadingConfig: false,
|
|
810
|
+
hooks: {
|
|
811
|
+
applyDefaultOptions: async (options, config) => {
|
|
812
|
+
options.entry ??= ["src/index.ts"];
|
|
813
|
+
options.outputPath ??= "dist/{projectRoot}";
|
|
814
|
+
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
815
|
+
return options;
|
|
816
|
+
}
|
|
817
|
+
}
|
|
760
818
|
}
|
|
761
|
-
|
|
819
|
+
);
|
|
762
820
|
|
|
763
821
|
|
|
764
822
|
|