@storm-software/workspace-tools 1.267.19 → 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 +24 -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-VW3PZOJ4.mjs → chunk-2M22JVJQ.mjs} +307 -192
- package/dist/{chunk-5RJOBRYL.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-QSB5SLZS.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-B67R3JAF.mjs → chunk-5HUW3BTP.mjs} +37 -21
- package/dist/{chunk-GWYZDAH6.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-N7XIQOHR.mjs → chunk-7HWV6U3E.mjs} +33 -18
- package/dist/{chunk-GKL4BY2Y.js → chunk-A5CKB6IJ.js} +7 -8
- package/dist/{chunk-Y5WKYMQB.mjs → chunk-ABE7UOMX.mjs} +24 -21
- package/dist/{chunk-L3WQZ3LY.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-VGE6EHYW.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-5SVLMXLH.mjs → chunk-HMJTTE4A.mjs} +39 -30
- package/dist/{chunk-ZKMIASDR.mjs → chunk-HY3ZC5EZ.mjs} +10 -31
- package/dist/{chunk-OQPX75CG.js → chunk-I5MSPQMO.js} +31 -18
- package/dist/{chunk-L2DHGVS5.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-WMTEZ2PV.mjs → chunk-LSF4BHCI.mjs} +24 -14
- package/dist/chunk-M725BO42.mjs +32 -0
- package/dist/{chunk-7IAGL37F.mjs → chunk-MF6VZSIO.mjs} +30 -17
- package/dist/{chunk-7OOYI33U.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-62XRHQ44.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-CSHHIGIV.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-H72YBOLR.mjs → chunk-U65XVJ4Y.mjs} +1 -12
- package/dist/{chunk-AVJVDD4L.mjs → chunk-U7JFVMCK.mjs} +6 -12
- package/dist/chunk-UIPUSUAB.js +425 -0
- package/dist/{chunk-LSG534D5.mjs → chunk-UYSJG2E5.mjs} +56 -31
- package/dist/{chunk-EHXSPF7W.mjs → chunk-VLOTOQYE.mjs} +11 -8
- package/dist/{chunk-EULJEPPD.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-GY4AEA7P.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-HAXYCYZE.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-6JTXR7YX.mjs +0 -18
- package/dist/chunk-6RHWGD7G.mjs +0 -48
- package/dist/chunk-7AXFMX2T.js +0 -37
- package/dist/chunk-A77TLQ44.mjs +0 -32
- package/dist/chunk-B3DVFXXD.js +0 -32
- package/dist/chunk-BC7L3S46.mjs +0 -51
- package/dist/chunk-BNMJYJOZ.mjs +0 -446
- package/dist/chunk-CUWWZLK7.mjs +0 -37
- package/dist/chunk-HOXPAVCL.js +0 -32
- package/dist/chunk-ICPUM2HS.js +0 -50
- package/dist/chunk-JJ4PSTY4.mjs +0 -32
- package/dist/chunk-JMCJJNBJ.mjs +0 -102
- package/dist/chunk-KEBNU3P2.js +0 -446
- package/dist/chunk-KTRA4YQT.mjs +0 -32
- package/dist/chunk-M2VZ44W7.mjs +0 -13
- package/dist/chunk-NG7BO4BF.mjs +0 -468
- package/dist/chunk-NSCWEC2S.js +0 -32
- package/dist/chunk-OQTJDGUH.js +0 -468
- package/dist/chunk-ORWCIVMB.mjs +0 -30
- package/dist/chunk-RUKOOSWL.js +0 -31
- package/dist/chunk-T6VIUVAL.mjs +0 -43
- package/dist/chunk-TET4GF3D.js +0 -43
- package/dist/chunk-XITP2BX2.js +0 -13
- package/dist/chunk-YMGMEPP5.mjs +0 -86
- package/dist/chunk-YW4UN25U.js +0 -86
- package/dist/chunk-ZJZOACSR.mjs +0 -31
- package/dist/chunk-ZTVHEV5N.mjs +0 -50
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ProjectTagConstants,
|
|
3
|
+
isEqualProjectTag
|
|
4
|
+
} from "./chunk-F66XEAID.mjs";
|
|
5
|
+
import {
|
|
6
|
+
parseCargoToml
|
|
7
|
+
} from "./chunk-U65XVJ4Y.mjs";
|
|
8
|
+
|
|
9
|
+
// src/utils/package-helpers.ts
|
|
10
|
+
import {
|
|
11
|
+
joinPathFragments,
|
|
12
|
+
readJsonFile
|
|
13
|
+
} from "@nx/devkit";
|
|
14
|
+
import { existsSync } from "node:fs";
|
|
15
|
+
var PackageManagerTypes = {
|
|
16
|
+
PackageJson: "package.json",
|
|
17
|
+
CargoToml: "Cargo.toml"
|
|
18
|
+
};
|
|
19
|
+
var getPackageInfo = (project) => {
|
|
20
|
+
if (isEqualProjectTag(
|
|
21
|
+
project,
|
|
22
|
+
ProjectTagConstants.Language.TAG_ID,
|
|
23
|
+
ProjectTagConstants.Language.RUST
|
|
24
|
+
) && existsSync(joinPathFragments(project.root, "Cargo.toml"))) {
|
|
25
|
+
return {
|
|
26
|
+
type: "Cargo.toml",
|
|
27
|
+
content: parseCargoToml(joinPathFragments(project.root, "Cargo.toml"))
|
|
28
|
+
};
|
|
29
|
+
} else if (isEqualProjectTag(
|
|
30
|
+
project,
|
|
31
|
+
ProjectTagConstants.Language.TAG_ID,
|
|
32
|
+
ProjectTagConstants.Language.TYPESCRIPT
|
|
33
|
+
) && existsSync(joinPathFragments(project.root, "package.json"))) {
|
|
34
|
+
return {
|
|
35
|
+
type: "package.json",
|
|
36
|
+
content: readJsonFile(
|
|
37
|
+
joinPathFragments(project.root, "package.json")
|
|
38
|
+
)
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export {
|
|
45
|
+
PackageManagerTypes,
|
|
46
|
+
getPackageInfo
|
|
47
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunk4BECJRPPjs = require('./chunk-4BECJRPP.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkAJ3C2EDWjs = require('./chunk-AJ3C2EDW.js');
|
|
8
|
+
|
|
9
|
+
// src/executors/cargo-clippy/executor.ts
|
|
10
|
+
async function cargoClippyExecutor(options, context) {
|
|
11
|
+
const command = _chunk4BECJRPPjs.buildCargoCommand.call(void 0, "clippy", options, context);
|
|
12
|
+
return await _chunk4BECJRPPjs.cargoCommand.call(void 0, ...command);
|
|
13
|
+
}
|
|
14
|
+
var executor_default = _chunkAJ3C2EDWjs.withRunExecutor.call(void 0,
|
|
15
|
+
"Cargo Clippy",
|
|
16
|
+
cargoClippyExecutor,
|
|
17
|
+
{
|
|
18
|
+
skipReadingConfig: false,
|
|
19
|
+
hooks: {
|
|
20
|
+
applyDefaultOptions: (options) => {
|
|
21
|
+
options.toolchain ??= "stable";
|
|
22
|
+
options.fix ??= false;
|
|
23
|
+
return options;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
exports.cargoClippyExecutor = cargoClippyExecutor; exports.executor_default = executor_default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/generators/init/init.ts
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _devkit = require('@nx/devkit');
|
|
6
|
+
async function initGenerator(tree, schema) {
|
|
7
|
+
const task = _devkit.addDependenciesToPackageJson.call(void 0,
|
|
8
|
+
tree,
|
|
9
|
+
{
|
|
10
|
+
nx: "^19.6.2",
|
|
11
|
+
"@nx/workspace": "^19.6.2",
|
|
12
|
+
"@nx/js": "^19.6.2",
|
|
13
|
+
"@storm-software/eslint": "latest",
|
|
14
|
+
"@storm-software/prettier": "latest",
|
|
15
|
+
"@storm-software/config-tools": "latest",
|
|
16
|
+
"@storm-software/testing-tools": "latest",
|
|
17
|
+
"@storm-software/git-tools": "latest",
|
|
18
|
+
"@storm-software/linting-tools": "latest"
|
|
19
|
+
},
|
|
20
|
+
{}
|
|
21
|
+
);
|
|
22
|
+
if (!schema.skipFormat) {
|
|
23
|
+
await _devkit.formatFiles.call(void 0, tree);
|
|
24
|
+
}
|
|
25
|
+
return task;
|
|
26
|
+
}
|
|
27
|
+
var init_default = initGenerator;
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
exports.initGenerator = initGenerator; exports.init_default = init_default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
withRunExecutor
|
|
3
|
+
} from "./chunk-UYSJG2E5.mjs";
|
|
4
|
+
import {
|
|
5
|
+
writeInfo
|
|
6
|
+
} from "./chunk-2M22JVJQ.mjs";
|
|
7
|
+
|
|
8
|
+
// src/executors/typia/executor.ts
|
|
9
|
+
import { removeSync } from "fs-extra";
|
|
10
|
+
import { TypiaProgrammer } from "typia/lib/programmers/TypiaProgrammer.js";
|
|
11
|
+
async function typiaExecutorFn(options, _, config) {
|
|
12
|
+
if (options.clean !== false) {
|
|
13
|
+
writeInfo(`\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
14
|
+
removeSync(options.outputPath);
|
|
15
|
+
}
|
|
16
|
+
await Promise.all(
|
|
17
|
+
options.entry.map((entry) => {
|
|
18
|
+
writeInfo(`\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
19
|
+
return TypiaProgrammer.build({
|
|
20
|
+
input: entry,
|
|
21
|
+
output: options.outputPath,
|
|
22
|
+
project: options.tsconfig
|
|
23
|
+
});
|
|
24
|
+
})
|
|
25
|
+
);
|
|
26
|
+
return {
|
|
27
|
+
success: true
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
var executor_default = withRunExecutor(
|
|
31
|
+
"Typia runtime validation generator",
|
|
32
|
+
typiaExecutorFn,
|
|
33
|
+
{
|
|
34
|
+
skipReadingConfig: false,
|
|
35
|
+
hooks: {
|
|
36
|
+
applyDefaultOptions: (options) => {
|
|
37
|
+
options.entry ??= ["{sourceRoot}/index.ts"];
|
|
38
|
+
options.outputPath ??= "{sourceRoot}/__generated__/typia";
|
|
39
|
+
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
40
|
+
options.clean ??= true;
|
|
41
|
+
return options;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
export {
|
|
48
|
+
typiaExecutorFn,
|
|
49
|
+
executor_default
|
|
50
|
+
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__name
|
|
3
|
-
} from "./chunk-L2DHGVS5.mjs";
|
|
4
|
-
|
|
5
1
|
// src/utils/cargo.ts
|
|
6
2
|
import { joinPathFragments, workspaceRoot } from "@nx/devkit";
|
|
7
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
execSync,
|
|
5
|
+
spawn
|
|
6
|
+
} from "node:child_process";
|
|
8
7
|
import { relative } from "node:path";
|
|
9
8
|
var INVALID_CARGO_ARGS = [
|
|
10
9
|
"allFeatures",
|
|
@@ -15,7 +14,7 @@ var INVALID_CARGO_ARGS = [
|
|
|
15
14
|
"tsConfig"
|
|
16
15
|
];
|
|
17
16
|
var childProcess;
|
|
18
|
-
var buildCargoCommand =
|
|
17
|
+
var buildCargoCommand = (baseCommand, options, context) => {
|
|
19
18
|
const args = [];
|
|
20
19
|
if (options.toolchain && options.toolchain !== "stable") {
|
|
21
20
|
args.push(`+${options.toolchain}`);
|
|
@@ -53,54 +52,38 @@ var buildCargoCommand = /* @__PURE__ */ __name((baseCommand, options, context) =
|
|
|
53
52
|
args.push("--target-dir", options.outputPath);
|
|
54
53
|
}
|
|
55
54
|
return args;
|
|
56
|
-
}
|
|
55
|
+
};
|
|
57
56
|
async function cargoCommand(...args) {
|
|
58
57
|
console.log(`> cargo ${args.join(" ")}`);
|
|
59
58
|
args.push("--color", "always");
|
|
60
59
|
return await Promise.resolve(runProcess("cargo", ...args));
|
|
61
60
|
}
|
|
62
|
-
__name(cargoCommand, "cargoCommand");
|
|
63
61
|
function cargoRunCommand(...args) {
|
|
64
62
|
console.log(`> cargo ${args.join(" ")}`);
|
|
65
63
|
return new Promise((resolve, reject) => {
|
|
66
|
-
childProcess = spawn("cargo", [
|
|
67
|
-
...args,
|
|
68
|
-
"--color",
|
|
69
|
-
"always"
|
|
70
|
-
], {
|
|
64
|
+
childProcess = spawn("cargo", [...args, "--color", "always"], {
|
|
71
65
|
cwd: process.cwd(),
|
|
72
66
|
windowsHide: true,
|
|
73
67
|
detached: true,
|
|
74
68
|
shell: false,
|
|
75
|
-
stdio: [
|
|
76
|
-
"inherit",
|
|
77
|
-
"inherit",
|
|
78
|
-
"inherit"
|
|
79
|
-
]
|
|
69
|
+
stdio: ["inherit", "inherit", "inherit"]
|
|
80
70
|
});
|
|
81
71
|
process.on("exit", () => childProcess?.kill());
|
|
82
72
|
process.on("SIGTERM", () => childProcess?.kill());
|
|
83
73
|
process.on("SIGINT", () => childProcess?.kill());
|
|
84
74
|
childProcess.on("error", (_err) => {
|
|
85
|
-
reject({
|
|
86
|
-
success: false
|
|
87
|
-
});
|
|
75
|
+
reject({ success: false });
|
|
88
76
|
});
|
|
89
77
|
childProcess.on("exit", (code) => {
|
|
90
78
|
childProcess = null;
|
|
91
79
|
if (code === 0) {
|
|
92
|
-
resolve({
|
|
93
|
-
success: true
|
|
94
|
-
});
|
|
80
|
+
resolve({ success: true });
|
|
95
81
|
} else {
|
|
96
|
-
reject({
|
|
97
|
-
success: false
|
|
98
|
-
});
|
|
82
|
+
reject({ success: false });
|
|
99
83
|
}
|
|
100
84
|
});
|
|
101
85
|
});
|
|
102
86
|
}
|
|
103
|
-
__name(cargoRunCommand, "cargoRunCommand");
|
|
104
87
|
function cargoCommandSync(args = "", options) {
|
|
105
88
|
const normalizedOptions = {
|
|
106
89
|
stdio: options?.stdio ?? "inherit",
|
|
@@ -127,7 +110,6 @@ function cargoCommandSync(args = "", options) {
|
|
|
127
110
|
};
|
|
128
111
|
}
|
|
129
112
|
}
|
|
130
|
-
__name(cargoCommandSync, "cargoCommandSync");
|
|
131
113
|
function cargoMetadata() {
|
|
132
114
|
const output = cargoCommandSync("metadata --format-version=1", {
|
|
133
115
|
stdio: "pipe"
|
|
@@ -138,22 +120,18 @@ function cargoMetadata() {
|
|
|
138
120
|
}
|
|
139
121
|
return JSON.parse(output.output);
|
|
140
122
|
}
|
|
141
|
-
__name(cargoMetadata, "cargoMetadata");
|
|
142
123
|
function isExternal(packageOrDep, workspaceRoot2) {
|
|
143
124
|
const isRegistry = packageOrDep.source?.startsWith("registry+") ?? false;
|
|
144
125
|
const isGit = packageOrDep.source?.startsWith("git+") ?? false;
|
|
145
126
|
const isOutsideWorkspace = "path" in packageOrDep && relative(workspaceRoot2, packageOrDep.path).startsWith("..");
|
|
146
127
|
return isRegistry || isGit || isOutsideWorkspace;
|
|
147
128
|
}
|
|
148
|
-
__name(isExternal, "isExternal");
|
|
149
129
|
function runProcess(processCmd, ...args) {
|
|
150
130
|
const metadata = cargoMetadata();
|
|
151
131
|
const targetDir = metadata?.target_directory ?? joinPathFragments(workspaceRoot, "dist", "cargo");
|
|
152
132
|
return new Promise((resolve) => {
|
|
153
133
|
if (process.env.VERCEL) {
|
|
154
|
-
return resolve({
|
|
155
|
-
success: true
|
|
156
|
-
});
|
|
134
|
+
return resolve({ success: true });
|
|
157
135
|
}
|
|
158
136
|
execSync(`${processCmd} ${args.join(" ")}`, {
|
|
159
137
|
cwd: process.cwd(),
|
|
@@ -164,18 +142,11 @@ function runProcess(processCmd, ...args) {
|
|
|
164
142
|
CARGO_BUILD_TARGET_DIR: targetDir
|
|
165
143
|
},
|
|
166
144
|
windowsHide: true,
|
|
167
|
-
stdio: [
|
|
168
|
-
"inherit",
|
|
169
|
-
"inherit",
|
|
170
|
-
"inherit"
|
|
171
|
-
]
|
|
172
|
-
});
|
|
173
|
-
resolve({
|
|
174
|
-
success: true
|
|
145
|
+
stdio: ["inherit", "inherit", "inherit"]
|
|
175
146
|
});
|
|
147
|
+
resolve({ success: true });
|
|
176
148
|
});
|
|
177
149
|
}
|
|
178
|
-
__name(runProcess, "runProcess");
|
|
179
150
|
|
|
180
151
|
export {
|
|
181
152
|
INVALID_CARGO_ARGS,
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true})
|
|
2
|
-
|
|
3
|
-
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
4
|
-
|
|
5
|
-
// src/utils/create-cli-options.ts
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/utils/create-cli-options.ts
|
|
6
2
|
var _devkit = require('@nx/devkit');
|
|
7
3
|
function createCliOptions(obj) {
|
|
8
4
|
const args = [];
|
|
@@ -11,7 +7,9 @@ function createCliOptions(obj) {
|
|
|
11
7
|
if (value) {
|
|
12
8
|
const arg = _devkit.names.call(void 0, key).fileName;
|
|
13
9
|
if (Array.isArray(value)) {
|
|
14
|
-
args.push(
|
|
10
|
+
args.push(
|
|
11
|
+
`--${arg.toLowerCase()}=${value.map((v) => v.trim()).join(",")}`
|
|
12
|
+
);
|
|
15
13
|
} else {
|
|
16
14
|
args.push(`--${arg.toLowerCase()}=${value}`);
|
|
17
15
|
}
|
|
@@ -19,7 +17,6 @@ function createCliOptions(obj) {
|
|
|
19
17
|
}
|
|
20
18
|
return args;
|
|
21
19
|
}
|
|
22
|
-
_chunk3GQAWCBQjs.__name.call(void 0, createCliOptions, "createCliOptions");
|
|
23
20
|
|
|
24
21
|
|
|
25
22
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkJ2Z4WP3Ejs = require('./chunk-J2Z4WP3E.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
@@ -11,48 +11,58 @@ var _chunkUALZJZUKjs = require('./chunk-UALZJZUK.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkWE4HK4RNjs = require('./chunk-WE4HK4RN.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
17
|
+
var _chunk4WHSR4FKjs = require('./chunk-4WHSR4FK.js');
|
|
21
18
|
|
|
22
19
|
// src/base/base-generator.ts
|
|
23
|
-
var withRunGenerator =
|
|
20
|
+
var withRunGenerator = (name, generatorFn, generatorOptions = {
|
|
24
21
|
skipReadingConfig: false
|
|
25
22
|
}) => async (tree, _options) => {
|
|
26
|
-
const stopwatch =
|
|
23
|
+
const stopwatch = _chunkWE4HK4RNjs.getStopwatch.call(void 0, name);
|
|
27
24
|
let options = _options;
|
|
28
25
|
let config;
|
|
29
26
|
try {
|
|
30
|
-
|
|
27
|
+
_chunkWE4HK4RNjs.writeInfo.call(void 0, `\u26A1 Running the ${name} generator...
|
|
31
28
|
|
|
32
29
|
`, config);
|
|
33
|
-
const workspaceRoot =
|
|
30
|
+
const workspaceRoot = _chunk4WHSR4FKjs.findWorkspaceRoot.call(void 0, );
|
|
34
31
|
if (!generatorOptions.skipReadingConfig) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
_chunkWE4HK4RNjs.writeDebug.call(void 0,
|
|
33
|
+
`Loading the Storm Config from environment variables and storm.config.js file...
|
|
34
|
+
- workspaceRoot: ${workspaceRoot}`,
|
|
35
|
+
config
|
|
36
|
+
);
|
|
37
|
+
config = await _chunkWE4HK4RNjs.getConfig.call(void 0, workspaceRoot);
|
|
38
38
|
}
|
|
39
39
|
if (_optionalChain([generatorOptions, 'optionalAccess', _ => _.hooks, 'optionalAccess', _2 => _2.applyDefaultOptions])) {
|
|
40
|
-
|
|
41
|
-
options = await Promise.resolve(
|
|
42
|
-
|
|
40
|
+
_chunkWE4HK4RNjs.writeDebug.call(void 0, "Running the applyDefaultOptions hook...", config);
|
|
41
|
+
options = await Promise.resolve(
|
|
42
|
+
generatorOptions.hooks.applyDefaultOptions(options, config)
|
|
43
|
+
);
|
|
44
|
+
_chunkWE4HK4RNjs.writeDebug.call(void 0, "Completed the applyDefaultOptions hook", config);
|
|
43
45
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
workspaceRoot: tree.root,
|
|
46
|
+
_chunkWE4HK4RNjs.writeTrace.call(void 0,
|
|
47
|
+
`Generator schema options \u2699\uFE0F
|
|
48
|
+
${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${JSON.stringify(options[key])}`).join("\n")}`,
|
|
48
49
|
config
|
|
49
|
-
|
|
50
|
+
);
|
|
51
|
+
const tokenized = await _chunkJ2Z4WP3Ejs.applyWorkspaceTokens.call(void 0,
|
|
52
|
+
options,
|
|
53
|
+
{ workspaceRoot: tree.root, config },
|
|
54
|
+
_chunkJ2Z4WP3Ejs.applyWorkspaceBaseTokens
|
|
55
|
+
);
|
|
50
56
|
if (_optionalChain([generatorOptions, 'optionalAccess', _3 => _3.hooks, 'optionalAccess', _4 => _4.preProcess])) {
|
|
51
|
-
|
|
52
|
-
await Promise.resolve(
|
|
53
|
-
|
|
57
|
+
_chunkWE4HK4RNjs.writeDebug.call(void 0, "Running the preProcess hook...", config);
|
|
58
|
+
await Promise.resolve(
|
|
59
|
+
generatorOptions.hooks.preProcess(tokenized, config)
|
|
60
|
+
);
|
|
61
|
+
_chunkWE4HK4RNjs.writeDebug.call(void 0, "Completed the preProcess hook", config);
|
|
54
62
|
}
|
|
55
|
-
const result = await Promise.resolve(
|
|
63
|
+
const result = await Promise.resolve(
|
|
64
|
+
generatorFn(tree, tokenized, config)
|
|
65
|
+
);
|
|
56
66
|
if (result) {
|
|
57
67
|
if (result.success === false || result.error && _optionalChain([result, 'optionalAccess', _5 => _5.error, 'optionalAccess', _6 => _6.message]) && typeof _optionalChain([result, 'optionalAccess', _7 => _7.error, 'optionalAccess', _8 => _8.message]) === "string" && _optionalChain([result, 'optionalAccess', _9 => _9.error, 'optionalAccess', _10 => _10.name]) && typeof _optionalChain([result, 'optionalAccess', _11 => _11.error, 'optionalAccess', _12 => _12.name]) === "string") {
|
|
58
68
|
throw new Error(`The ${name} generator failed to run`, {
|
|
@@ -63,25 +73,31 @@ ${Object.keys(_nullishCoalesce(options, () => ( {}))).map((key) => ` - ${key}=${
|
|
|
63
73
|
}
|
|
64
74
|
}
|
|
65
75
|
if (_optionalChain([generatorOptions, 'optionalAccess', _14 => _14.hooks, 'optionalAccess', _15 => _15.postProcess])) {
|
|
66
|
-
|
|
76
|
+
_chunkWE4HK4RNjs.writeDebug.call(void 0, "Running the postProcess hook...", config);
|
|
67
77
|
await Promise.resolve(generatorOptions.hooks.postProcess(config));
|
|
68
|
-
|
|
78
|
+
_chunkWE4HK4RNjs.writeDebug.call(void 0, "Completed the postProcess hook", config);
|
|
69
79
|
}
|
|
70
80
|
return () => {
|
|
71
|
-
|
|
81
|
+
_chunkWE4HK4RNjs.writeSuccess.call(void 0, `Completed running the ${name} generator!
|
|
72
82
|
`, config);
|
|
73
83
|
};
|
|
74
84
|
} catch (error) {
|
|
75
85
|
return () => {
|
|
76
|
-
|
|
77
|
-
|
|
86
|
+
_chunkWE4HK4RNjs.writeFatal.call(void 0,
|
|
87
|
+
"A fatal error occurred while running the generator - the process was forced to terminate",
|
|
88
|
+
config
|
|
89
|
+
);
|
|
90
|
+
_chunkWE4HK4RNjs.writeError.call(void 0,
|
|
91
|
+
`An exception was thrown in the generator's process
|
|
78
92
|
- Details: ${error.message}
|
|
79
|
-
- Stacktrace: ${error.stack}`,
|
|
93
|
+
- Stacktrace: ${error.stack}`,
|
|
94
|
+
config
|
|
95
|
+
);
|
|
80
96
|
};
|
|
81
97
|
} finally {
|
|
82
98
|
stopwatch();
|
|
83
99
|
}
|
|
84
|
-
}
|
|
100
|
+
};
|
|
85
101
|
|
|
86
102
|
|
|
87
103
|
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
var _chunkRJRBED5Qjs = require('./chunk-RJRBED5Q.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkWE4HK4RNjs = require('./chunk-WE4HK4RN.js');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunk4WHSR4FKjs = require('./chunk-4WHSR4FK.js');
|
|
13
|
+
|
|
14
|
+
// src/generators/config-schema/generator.ts
|
|
15
|
+
var _devkit = require('@nx/devkit');
|
|
16
|
+
var _zodtojsonschema = require('zod-to-json-schema');
|
|
17
|
+
async function configSchemaGeneratorFn(tree, options, config) {
|
|
18
|
+
_chunkWE4HK4RNjs.writeInfo.call(void 0,
|
|
19
|
+
"\u{1F4E6} Running Storm Workspace Configuration JSON Schema generator",
|
|
20
|
+
config
|
|
21
|
+
);
|
|
22
|
+
_chunkWE4HK4RNjs.writeTrace.call(void 0,
|
|
23
|
+
`Determining the Storm Workspace Configuration JSON Schema...`,
|
|
24
|
+
config
|
|
25
|
+
);
|
|
26
|
+
const jsonSchema = _zodtojsonschema.zodToJsonSchema.call(void 0, _chunkWE4HK4RNjs.stormWorkspaceConfigSchema, {
|
|
27
|
+
name: "StormWorkspaceConfiguration"
|
|
28
|
+
});
|
|
29
|
+
_chunkWE4HK4RNjs.writeTrace.call(void 0, jsonSchema, config);
|
|
30
|
+
const outputPath = options.outputFile.replaceAll("{workspaceRoot}", "").replaceAll(
|
|
31
|
+
_nullishCoalesce(_optionalChain([config, 'optionalAccess', _ => _.workspaceRoot]), () => ( _chunk4WHSR4FKjs.findWorkspaceRoot.call(void 0, ))),
|
|
32
|
+
_optionalChain([options, 'access', _2 => _2.outputFile, 'optionalAccess', _3 => _3.startsWith, 'call', _4 => _4("./")]) ? "" : "./"
|
|
33
|
+
);
|
|
34
|
+
_chunkWE4HK4RNjs.writeTrace.call(void 0,
|
|
35
|
+
`\u{1F4DD} Writing Storm Configuration JSON Schema to "${outputPath}"`,
|
|
36
|
+
config
|
|
37
|
+
);
|
|
38
|
+
_devkit.writeJson.call(void 0, tree, outputPath, jsonSchema, { spaces: 2 });
|
|
39
|
+
await _devkit.formatFiles.call(void 0, tree);
|
|
40
|
+
_chunkWE4HK4RNjs.writeSuccess.call(void 0,
|
|
41
|
+
"\u{1F680} Storm Configuration JSON Schema creation has completed successfully!",
|
|
42
|
+
config
|
|
43
|
+
);
|
|
44
|
+
return {
|
|
45
|
+
success: true
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
var generator_default = _chunkRJRBED5Qjs.withRunGenerator.call(void 0,
|
|
49
|
+
"Configuration Schema Creator",
|
|
50
|
+
configSchemaGeneratorFn,
|
|
51
|
+
{
|
|
52
|
+
hooks: {
|
|
53
|
+
applyDefaultOptions: (options) => {
|
|
54
|
+
options.outputFile ??= "{workspaceRoot}/storm-workspace.schema.json";
|
|
55
|
+
return options;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
exports.configSchemaGeneratorFn = configSchemaGeneratorFn; exports.generator_default = generator_default;
|
|
@@ -4,14 +4,20 @@ import {
|
|
|
4
4
|
} from "./chunk-EK75QNMS.mjs";
|
|
5
5
|
import {
|
|
6
6
|
withRunGenerator
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5HUW3BTP.mjs";
|
|
8
8
|
import {
|
|
9
|
-
__dirname
|
|
10
|
-
|
|
11
|
-
} from "./chunk-L2DHGVS5.mjs";
|
|
9
|
+
__dirname
|
|
10
|
+
} from "./chunk-IEZKYJSF.mjs";
|
|
12
11
|
|
|
13
12
|
// src/generators/preset/generator.ts
|
|
14
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
addDependenciesToPackageJson,
|
|
15
|
+
addProjectConfiguration,
|
|
16
|
+
formatFiles,
|
|
17
|
+
generateFiles,
|
|
18
|
+
joinPathFragments,
|
|
19
|
+
updateJson
|
|
20
|
+
} from "@nx/devkit";
|
|
15
21
|
import * as path from "node:path";
|
|
16
22
|
async function presetGeneratorFn(tree, options) {
|
|
17
23
|
const projectRoot = ".";
|
|
@@ -226,11 +232,20 @@ async function presetGeneratorFn(tree, options) {
|
|
|
226
232
|
"nx-cloud": "latest"
|
|
227
233
|
};
|
|
228
234
|
}
|
|
229
|
-
await Promise.resolve(
|
|
235
|
+
await Promise.resolve(
|
|
236
|
+
addDependenciesToPackageJson(
|
|
237
|
+
tree,
|
|
238
|
+
dependencies,
|
|
239
|
+
{},
|
|
240
|
+
joinPathFragments(projectRoot, "package.json")
|
|
241
|
+
)
|
|
242
|
+
);
|
|
230
243
|
return null;
|
|
231
244
|
}
|
|
232
|
-
|
|
233
|
-
|
|
245
|
+
var generator_default = withRunGenerator(
|
|
246
|
+
"Storm Workspace Preset Generator",
|
|
247
|
+
presetGeneratorFn
|
|
248
|
+
);
|
|
234
249
|
|
|
235
250
|
export {
|
|
236
251
|
presetGeneratorFn,
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildCargoCommand,
|
|
3
|
+
cargoCommand
|
|
4
|
+
} from "./chunk-QFWQZOVG.mjs";
|
|
5
|
+
import {
|
|
6
|
+
withRunExecutor
|
|
7
|
+
} from "./chunk-UYSJG2E5.mjs";
|
|
8
|
+
|
|
9
|
+
// src/executors/cargo-doc/executor.ts
|
|
10
|
+
async function cargoDocExecutor(options, context) {
|
|
11
|
+
const opts = { ...options };
|
|
12
|
+
opts["no-deps"] = opts.noDeps;
|
|
13
|
+
delete opts.noDeps;
|
|
14
|
+
const command = buildCargoCommand("doc", options, context);
|
|
15
|
+
return await cargoCommand(...command);
|
|
16
|
+
}
|
|
17
|
+
var executor_default = withRunExecutor(
|
|
18
|
+
"Cargo Doc",
|
|
19
|
+
cargoDocExecutor,
|
|
20
|
+
{
|
|
21
|
+
skipReadingConfig: false,
|
|
22
|
+
hooks: {
|
|
23
|
+
applyDefaultOptions: (options) => {
|
|
24
|
+
options.outputPath ??= "dist/docs/{projectRoot}";
|
|
25
|
+
options.toolchain ??= "stable";
|
|
26
|
+
options.release ??= options.profile ? false : true;
|
|
27
|
+
options.allFeatures ??= true;
|
|
28
|
+
options.lib ??= true;
|
|
29
|
+
options.bins ??= true;
|
|
30
|
+
options.examples ??= true;
|
|
31
|
+
options.noDeps ??= false;
|
|
32
|
+
return options;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
cargoDocExecutor,
|
|
40
|
+
executor_default
|
|
41
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkAJ3C2EDWjs = require('./chunk-AJ3C2EDW.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkWE4HK4RNjs = require('./chunk-WE4HK4RN.js');
|
|
7
|
+
|
|
8
|
+
// src/executors/typia/executor.ts
|
|
9
|
+
var _fsextra = require('fs-extra');
|
|
10
|
+
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
11
|
+
async function typiaExecutorFn(options, _, config) {
|
|
12
|
+
if (options.clean !== false) {
|
|
13
|
+
_chunkWE4HK4RNjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
14
|
+
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
15
|
+
}
|
|
16
|
+
await Promise.all(
|
|
17
|
+
options.entry.map((entry) => {
|
|
18
|
+
_chunkWE4HK4RNjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
19
|
+
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
20
|
+
input: entry,
|
|
21
|
+
output: options.outputPath,
|
|
22
|
+
project: options.tsconfig
|
|
23
|
+
});
|
|
24
|
+
})
|
|
25
|
+
);
|
|
26
|
+
return {
|
|
27
|
+
success: true
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
var executor_default = _chunkAJ3C2EDWjs.withRunExecutor.call(void 0,
|
|
31
|
+
"Typia runtime validation generator",
|
|
32
|
+
typiaExecutorFn,
|
|
33
|
+
{
|
|
34
|
+
skipReadingConfig: false,
|
|
35
|
+
hooks: {
|
|
36
|
+
applyDefaultOptions: (options) => {
|
|
37
|
+
options.entry ??= ["{sourceRoot}/index.ts"];
|
|
38
|
+
options.outputPath ??= "{sourceRoot}/__generated__/typia";
|
|
39
|
+
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
40
|
+
options.clean ??= true;
|
|
41
|
+
return options;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
exports.typiaExecutorFn = typiaExecutorFn; exports.executor_default = executor_default;
|