@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
package/dist/chunk-BNMJYJOZ.mjs
DELETED
|
@@ -1,446 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
cargoMetadata,
|
|
3
|
-
isExternal
|
|
4
|
-
} from "./chunk-62XRHQ44.mjs";
|
|
5
|
-
import {
|
|
6
|
-
ProjectTagConstants,
|
|
7
|
-
addProjectTag,
|
|
8
|
-
setDefaultProjectTags
|
|
9
|
-
} from "./chunk-JMCJJNBJ.mjs";
|
|
10
|
-
import {
|
|
11
|
-
__name
|
|
12
|
-
} from "./chunk-L2DHGVS5.mjs";
|
|
13
|
-
|
|
14
|
-
// src/plugins/rust/cargo-toml.ts
|
|
15
|
-
import { createNodesFromFiles, joinPathFragments, readJsonFile, workspaceRoot } from "@nx/devkit";
|
|
16
|
-
import { existsSync } from "node:fs";
|
|
17
|
-
import { dirname } from "node:path";
|
|
18
|
-
import { DependencyType } from "nx/src/config/project-graph";
|
|
19
|
-
var name = "storm-software/rust";
|
|
20
|
-
var description = "Plugin for parsing Cargo.toml files";
|
|
21
|
-
var DefaultCargoPluginProfileMap = {
|
|
22
|
-
development: "dev",
|
|
23
|
-
production: "prod"
|
|
24
|
-
};
|
|
25
|
-
var DEFAULT_ERROR_MESSAGE = "An error occurred in the Storm Rust Nx plugin.";
|
|
26
|
-
var createNodesV2 = [
|
|
27
|
-
"*/**/Cargo.toml",
|
|
28
|
-
async (configFiles, options, context) => {
|
|
29
|
-
return await createNodesFromFiles((configFile, options2, context2) => {
|
|
30
|
-
try {
|
|
31
|
-
console.log(`Processing Cargo.toml file: ${configFile}`);
|
|
32
|
-
const profiles = options2?.profiles ?? {};
|
|
33
|
-
const includeApps = options2?.includeApps ?? true;
|
|
34
|
-
const toolchain = options2?.toolchain;
|
|
35
|
-
const skipDocs = options2?.skipDocs ?? false;
|
|
36
|
-
const metadata = cargoMetadata();
|
|
37
|
-
if (!metadata) {
|
|
38
|
-
return {};
|
|
39
|
-
}
|
|
40
|
-
const { packages: cargoPackages } = metadata;
|
|
41
|
-
const externalNodes = {};
|
|
42
|
-
const projects = {};
|
|
43
|
-
const profs = {
|
|
44
|
-
...DefaultCargoPluginProfileMap,
|
|
45
|
-
...profiles
|
|
46
|
-
};
|
|
47
|
-
const configurations = Object.keys(profs).reduce((ret, key) => {
|
|
48
|
-
ret[key] = {
|
|
49
|
-
profile: profs[key]
|
|
50
|
-
};
|
|
51
|
-
return ret;
|
|
52
|
-
}, {});
|
|
53
|
-
const cargoPackageMap = cargoPackages.reduce((acc, p) => {
|
|
54
|
-
if (!acc.has(p.name)) {
|
|
55
|
-
acc.set(p.name, p);
|
|
56
|
-
}
|
|
57
|
-
return acc;
|
|
58
|
-
}, /* @__PURE__ */ new Map());
|
|
59
|
-
for (const cargoPackage of cargoPackages) {
|
|
60
|
-
if (!isExternal(cargoPackage, context2.workspaceRoot)) {
|
|
61
|
-
const root = dirname(configFile);
|
|
62
|
-
const project = {
|
|
63
|
-
root,
|
|
64
|
-
name: cargoPackage.name
|
|
65
|
-
};
|
|
66
|
-
if (existsSync(joinPathFragments(root, "project.json"))) {
|
|
67
|
-
const projectJson = readJsonFile(joinPathFragments(root, "project.json"));
|
|
68
|
-
if (projectJson) {
|
|
69
|
-
Object.keys(projectJson).forEach((key) => {
|
|
70
|
-
if (!project[key]) {
|
|
71
|
-
project[key] = projectJson[key];
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
if (includeApps === false && project.projectType === "application") {
|
|
77
|
-
continue;
|
|
78
|
-
}
|
|
79
|
-
project.targets = {
|
|
80
|
-
"lint-markdown": {
|
|
81
|
-
cache: true,
|
|
82
|
-
outputs: [
|
|
83
|
-
"{projectRoot}/**/*.md",
|
|
84
|
-
"{projectRoot}/**/*.mdx"
|
|
85
|
-
],
|
|
86
|
-
inputs: [
|
|
87
|
-
"linting",
|
|
88
|
-
"{projectRoot}/**/*.md",
|
|
89
|
-
"{projectRoot}/**/*.mdx"
|
|
90
|
-
],
|
|
91
|
-
dependsOn: [
|
|
92
|
-
"^lint-markdown"
|
|
93
|
-
],
|
|
94
|
-
executor: "nx:run-commands",
|
|
95
|
-
options: {
|
|
96
|
-
command: 'pnpm exec markdownlint-cli2 "{projectRoot}/*.{md,mdx}" "{projectRoot}/**/*.{md,mdx}" --config "node_modules/@storm-software/markdownlint/config/base.markdownlint-cli2.jsonc" --fix'
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
"lint-ls": {
|
|
100
|
-
cache: true,
|
|
101
|
-
inputs: [
|
|
102
|
-
"linting",
|
|
103
|
-
"rust",
|
|
104
|
-
"^production"
|
|
105
|
-
],
|
|
106
|
-
dependsOn: [
|
|
107
|
-
"^lint-ls"
|
|
108
|
-
],
|
|
109
|
-
options: {
|
|
110
|
-
command: 'pnpm exec ls-lint --config="./node_modules/@storm-software/linting-tools/ls-lint/.ls-lint.yml" ',
|
|
111
|
-
color: true
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
lint: {
|
|
115
|
-
cache: true,
|
|
116
|
-
inputs: [
|
|
117
|
-
"linting",
|
|
118
|
-
"rust",
|
|
119
|
-
"^production"
|
|
120
|
-
],
|
|
121
|
-
dependsOn: [
|
|
122
|
-
"lint-ls",
|
|
123
|
-
"lint-markdown",
|
|
124
|
-
"^lint"
|
|
125
|
-
],
|
|
126
|
-
executor: "@storm-software/workspace-tools:cargo-clippy",
|
|
127
|
-
options: {
|
|
128
|
-
toolchain,
|
|
129
|
-
fix: false
|
|
130
|
-
},
|
|
131
|
-
defaultConfiguration: "development",
|
|
132
|
-
configurations
|
|
133
|
-
},
|
|
134
|
-
check: {
|
|
135
|
-
cache: true,
|
|
136
|
-
inputs: [
|
|
137
|
-
"linting",
|
|
138
|
-
"rust",
|
|
139
|
-
"^production"
|
|
140
|
-
],
|
|
141
|
-
dependsOn: [
|
|
142
|
-
"lint",
|
|
143
|
-
"^check"
|
|
144
|
-
],
|
|
145
|
-
executor: "@storm-software/workspace-tools:cargo-check",
|
|
146
|
-
options: {
|
|
147
|
-
toolchain
|
|
148
|
-
},
|
|
149
|
-
defaultConfiguration: "development",
|
|
150
|
-
configurations
|
|
151
|
-
},
|
|
152
|
-
"format-readme": {
|
|
153
|
-
cache: true,
|
|
154
|
-
inputs: [
|
|
155
|
-
"linting",
|
|
156
|
-
"documentation",
|
|
157
|
-
"{projectRoot}/{README.md,package.json,Cargo.toml,executors.json,generators.json}"
|
|
158
|
-
],
|
|
159
|
-
outputs: [
|
|
160
|
-
"{projectRoot}/README.md"
|
|
161
|
-
],
|
|
162
|
-
dependsOn: [
|
|
163
|
-
"^format-readme"
|
|
164
|
-
],
|
|
165
|
-
executor: "nx:run-commands",
|
|
166
|
-
options: {
|
|
167
|
-
command: 'pnpm exec storm-git readme --templates="tools/readme-templates" --project="{projectName}"'
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
"format-toml": {
|
|
171
|
-
cache: true,
|
|
172
|
-
inputs: [
|
|
173
|
-
"linting",
|
|
174
|
-
"{projectRoot}/**/*.toml"
|
|
175
|
-
],
|
|
176
|
-
outputs: [
|
|
177
|
-
"{projectRoot}/**/*.toml"
|
|
178
|
-
],
|
|
179
|
-
dependsOn: [
|
|
180
|
-
"^format-toml"
|
|
181
|
-
],
|
|
182
|
-
executor: "nx:run-commands",
|
|
183
|
-
options: {
|
|
184
|
-
command: 'pnpm exec taplo format --config="node_modules/@storm-software/linting-tools/taplo/config.toml" --cache-path="node_modules/.cache/taplo/{projectRoot}" --colors="always" "{projectRoot}/*.toml" "{projectRoot}/**/*.toml" '
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
"format-clippy": {
|
|
188
|
-
cache: true,
|
|
189
|
-
inputs: [
|
|
190
|
-
"linting",
|
|
191
|
-
"rust",
|
|
192
|
-
"^production"
|
|
193
|
-
],
|
|
194
|
-
dependsOn: [
|
|
195
|
-
"^format-clippy"
|
|
196
|
-
],
|
|
197
|
-
executor: "@storm-software/workspace-tools:cargo-clippy",
|
|
198
|
-
options: {
|
|
199
|
-
toolchain,
|
|
200
|
-
fix: true
|
|
201
|
-
},
|
|
202
|
-
defaultConfiguration: "development",
|
|
203
|
-
configurations
|
|
204
|
-
},
|
|
205
|
-
format: {
|
|
206
|
-
cache: true,
|
|
207
|
-
inputs: [
|
|
208
|
-
"linting",
|
|
209
|
-
"documentation",
|
|
210
|
-
"rust",
|
|
211
|
-
"^production"
|
|
212
|
-
],
|
|
213
|
-
dependsOn: [
|
|
214
|
-
"format-readme",
|
|
215
|
-
"format-clippy",
|
|
216
|
-
"format-toml",
|
|
217
|
-
"^format"
|
|
218
|
-
],
|
|
219
|
-
executor: "@storm-software/workspace-tools:cargo-format",
|
|
220
|
-
options: {
|
|
221
|
-
toolchain,
|
|
222
|
-
fix: true
|
|
223
|
-
},
|
|
224
|
-
defaultConfiguration: "development",
|
|
225
|
-
configurations
|
|
226
|
-
},
|
|
227
|
-
clean: {
|
|
228
|
-
cache: true,
|
|
229
|
-
inputs: [
|
|
230
|
-
"rust",
|
|
231
|
-
"^production"
|
|
232
|
-
],
|
|
233
|
-
outputs: [
|
|
234
|
-
`{workspaceRoot}/dist/target/{projectRoot}`
|
|
235
|
-
],
|
|
236
|
-
executor: "nx:run-commands",
|
|
237
|
-
options: {
|
|
238
|
-
command: `pnpm exec rimraf dist/target/crates/${cargoPackage.name}`,
|
|
239
|
-
color: true,
|
|
240
|
-
cwd: "{workspaceRoot}"
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
build: {
|
|
244
|
-
cache: true,
|
|
245
|
-
inputs: [
|
|
246
|
-
"rust",
|
|
247
|
-
"^production"
|
|
248
|
-
],
|
|
249
|
-
dependsOn: [
|
|
250
|
-
"build-base",
|
|
251
|
-
"^build"
|
|
252
|
-
],
|
|
253
|
-
executor: "@storm-software/workspace-tools:cargo-build",
|
|
254
|
-
outputs: [
|
|
255
|
-
`{workspaceRoot}/dist/target/{projectRoot}`
|
|
256
|
-
],
|
|
257
|
-
options: {
|
|
258
|
-
toolchain
|
|
259
|
-
},
|
|
260
|
-
defaultConfiguration: "development",
|
|
261
|
-
configurations
|
|
262
|
-
},
|
|
263
|
-
rebuild: {
|
|
264
|
-
cache: false,
|
|
265
|
-
inputs: [
|
|
266
|
-
"rust",
|
|
267
|
-
"^production"
|
|
268
|
-
],
|
|
269
|
-
dependsOn: [
|
|
270
|
-
"clean",
|
|
271
|
-
"^build"
|
|
272
|
-
],
|
|
273
|
-
executor: "@storm-software/workspace-tools:cargo-build",
|
|
274
|
-
outputs: [
|
|
275
|
-
`{workspaceRoot}/dist/target/{projectRoot}`
|
|
276
|
-
],
|
|
277
|
-
options: {
|
|
278
|
-
toolchain
|
|
279
|
-
},
|
|
280
|
-
defaultConfiguration: "development",
|
|
281
|
-
configurations
|
|
282
|
-
},
|
|
283
|
-
test: {
|
|
284
|
-
cache: true,
|
|
285
|
-
inputs: [
|
|
286
|
-
"testing",
|
|
287
|
-
"rust",
|
|
288
|
-
"^production"
|
|
289
|
-
],
|
|
290
|
-
dependsOn: [
|
|
291
|
-
"build",
|
|
292
|
-
"^test"
|
|
293
|
-
],
|
|
294
|
-
executor: "@monodon/rust:test",
|
|
295
|
-
outputs: [
|
|
296
|
-
"{options.target-dir}"
|
|
297
|
-
],
|
|
298
|
-
options: {
|
|
299
|
-
"target-dir": `{workspaceRoot}/dist/target/{projectRoot}`
|
|
300
|
-
},
|
|
301
|
-
defaultConfiguration: "development",
|
|
302
|
-
configurations
|
|
303
|
-
}
|
|
304
|
-
};
|
|
305
|
-
if (skipDocs != true) {
|
|
306
|
-
project.targets.docs = {
|
|
307
|
-
cache: true,
|
|
308
|
-
inputs: [
|
|
309
|
-
"linting",
|
|
310
|
-
"documentation",
|
|
311
|
-
"default",
|
|
312
|
-
"^production"
|
|
313
|
-
],
|
|
314
|
-
dependsOn: [
|
|
315
|
-
"format-readme",
|
|
316
|
-
"lint-docs",
|
|
317
|
-
"^docs"
|
|
318
|
-
],
|
|
319
|
-
outputs: [
|
|
320
|
-
`{workspaceRoot}/dist/docs/{projectRoot}`
|
|
321
|
-
],
|
|
322
|
-
executor: "@storm-software/workspace-tools:cargo-doc",
|
|
323
|
-
options: {
|
|
324
|
-
toolchain
|
|
325
|
-
},
|
|
326
|
-
defaultConfiguration: "production",
|
|
327
|
-
configurations
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
if (cargoPackage.publish === null || cargoPackage.publish === void 0 || cargoPackage.publish === true || Array.isArray(cargoPackage.publish) && cargoPackage.publish.length > 0) {
|
|
331
|
-
addProjectTag(project, ProjectTagConstants.Registry.TAG_ID, ProjectTagConstants.Registry.CARGO, {
|
|
332
|
-
overwrite: true
|
|
333
|
-
});
|
|
334
|
-
project.targets["nx-release-publish"] = {
|
|
335
|
-
cache: true,
|
|
336
|
-
inputs: [
|
|
337
|
-
"linting",
|
|
338
|
-
"testing",
|
|
339
|
-
"documentation",
|
|
340
|
-
"rust",
|
|
341
|
-
"^production"
|
|
342
|
-
],
|
|
343
|
-
dependsOn: [
|
|
344
|
-
"build",
|
|
345
|
-
"^nx-release-publish"
|
|
346
|
-
],
|
|
347
|
-
executor: "@storm-software/workspace-tools:cargo-publish",
|
|
348
|
-
options: {
|
|
349
|
-
packageRoot: root
|
|
350
|
-
},
|
|
351
|
-
defaultConfiguration: "production",
|
|
352
|
-
configurations
|
|
353
|
-
};
|
|
354
|
-
}
|
|
355
|
-
addProjectTag(project, ProjectTagConstants.Language.TAG_ID, ProjectTagConstants.Language.RUST, {
|
|
356
|
-
overwrite: true
|
|
357
|
-
});
|
|
358
|
-
setDefaultProjectTags(project, name);
|
|
359
|
-
projects[root] = {
|
|
360
|
-
...project,
|
|
361
|
-
release: {
|
|
362
|
-
...project.release,
|
|
363
|
-
version: {
|
|
364
|
-
...project.release?.version,
|
|
365
|
-
generator: "@storm-software/workspace-tools:release-version"
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
};
|
|
369
|
-
}
|
|
370
|
-
for (const dep of cargoPackage.dependencies) {
|
|
371
|
-
if (isExternal(dep, context2.workspaceRoot)) {
|
|
372
|
-
const externalDepName = `cargo:${dep.name}`;
|
|
373
|
-
if (!externalNodes?.[externalDepName]) {
|
|
374
|
-
externalNodes[externalDepName] = {
|
|
375
|
-
type: "cargo",
|
|
376
|
-
name: externalDepName,
|
|
377
|
-
data: {
|
|
378
|
-
packageName: dep.name,
|
|
379
|
-
version: cargoPackageMap.get(dep.name)?.version ?? "0.0.0"
|
|
380
|
-
}
|
|
381
|
-
};
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
return {
|
|
387
|
-
projects,
|
|
388
|
-
externalNodes
|
|
389
|
-
};
|
|
390
|
-
} catch (e) {
|
|
391
|
-
console.error(DEFAULT_ERROR_MESSAGE);
|
|
392
|
-
console.error(e);
|
|
393
|
-
throw new Error(DEFAULT_ERROR_MESSAGE, {
|
|
394
|
-
cause: e
|
|
395
|
-
});
|
|
396
|
-
}
|
|
397
|
-
}, configFiles, options, context);
|
|
398
|
-
}
|
|
399
|
-
];
|
|
400
|
-
var createDependencies = /* @__PURE__ */ __name((_, context) => {
|
|
401
|
-
const metadata = cargoMetadata();
|
|
402
|
-
if (!metadata) {
|
|
403
|
-
return [];
|
|
404
|
-
}
|
|
405
|
-
const { packages: cargoPackages } = metadata;
|
|
406
|
-
const dependencies = [];
|
|
407
|
-
for (const pkg of cargoPackages) {
|
|
408
|
-
if (context.projects[pkg.name]) {
|
|
409
|
-
console.debug(`Local Cargo package found: ${pkg.name}`);
|
|
410
|
-
for (const deps of pkg.dependencies) {
|
|
411
|
-
if (!cargoPackages.find((p) => p.name === deps.name)) {
|
|
412
|
-
console.debug(`Dependency ${deps.name} not found in the cargo metadata.`);
|
|
413
|
-
continue;
|
|
414
|
-
}
|
|
415
|
-
if (context.projects[deps.name]) {
|
|
416
|
-
dependencies.push(createDependency(pkg, deps.name, DependencyType.static));
|
|
417
|
-
} else {
|
|
418
|
-
const externalDepName = `cargo:${deps.name}`;
|
|
419
|
-
if (externalDepName in (context.externalNodes ?? {})) {
|
|
420
|
-
dependencies.push(createDependency(pkg, externalDepName, DependencyType.static));
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
return dependencies;
|
|
427
|
-
}, "createDependencies");
|
|
428
|
-
function createDependency(pkg, depName, type) {
|
|
429
|
-
const target = pkg.manifest_path.replace(/\\/g, "/");
|
|
430
|
-
return {
|
|
431
|
-
type,
|
|
432
|
-
source: pkg.name,
|
|
433
|
-
target: depName,
|
|
434
|
-
sourceFile: target.replace(`${workspaceRoot.replace(/\\/g, "/")}/`, "")
|
|
435
|
-
};
|
|
436
|
-
}
|
|
437
|
-
__name(createDependency, "createDependency");
|
|
438
|
-
|
|
439
|
-
export {
|
|
440
|
-
name,
|
|
441
|
-
description,
|
|
442
|
-
DefaultCargoPluginProfileMap,
|
|
443
|
-
DEFAULT_ERROR_MESSAGE,
|
|
444
|
-
createNodesV2,
|
|
445
|
-
createDependencies
|
|
446
|
-
};
|
package/dist/chunk-CUWWZLK7.mjs
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ProjectTagConstants,
|
|
3
|
-
isEqualProjectTag
|
|
4
|
-
} from "./chunk-JMCJJNBJ.mjs";
|
|
5
|
-
import {
|
|
6
|
-
parseCargoToml
|
|
7
|
-
} from "./chunk-H72YBOLR.mjs";
|
|
8
|
-
import {
|
|
9
|
-
__name
|
|
10
|
-
} from "./chunk-L2DHGVS5.mjs";
|
|
11
|
-
|
|
12
|
-
// src/utils/package-helpers.ts
|
|
13
|
-
import { joinPathFragments, readJsonFile } from "@nx/devkit";
|
|
14
|
-
import { existsSync } from "node:fs";
|
|
15
|
-
var PackageManagerTypes = {
|
|
16
|
-
PackageJson: "package.json",
|
|
17
|
-
CargoToml: "Cargo.toml"
|
|
18
|
-
};
|
|
19
|
-
var getPackageInfo = /* @__PURE__ */ __name((project) => {
|
|
20
|
-
if (isEqualProjectTag(project, ProjectTagConstants.Language.TAG_ID, ProjectTagConstants.Language.RUST) && existsSync(joinPathFragments(project.root, "Cargo.toml"))) {
|
|
21
|
-
return {
|
|
22
|
-
type: "Cargo.toml",
|
|
23
|
-
content: parseCargoToml(joinPathFragments(project.root, "Cargo.toml"))
|
|
24
|
-
};
|
|
25
|
-
} else if (isEqualProjectTag(project, ProjectTagConstants.Language.TAG_ID, ProjectTagConstants.Language.TYPESCRIPT) && existsSync(joinPathFragments(project.root, "package.json"))) {
|
|
26
|
-
return {
|
|
27
|
-
type: "package.json",
|
|
28
|
-
content: readJsonFile(joinPathFragments(project.root, "package.json"))
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
return null;
|
|
32
|
-
}, "getPackageInfo");
|
|
33
|
-
|
|
34
|
-
export {
|
|
35
|
-
PackageManagerTypes,
|
|
36
|
-
getPackageInfo
|
|
37
|
-
};
|
package/dist/chunk-HOXPAVCL.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunkULBTYC2Bjs = require('./chunk-ULBTYC2B.js');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _chunk6CGAYKQLjs = require('./chunk-6CGAYKQL.js');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
11
|
-
|
|
12
|
-
// src/executors/cargo-format/executor.ts
|
|
13
|
-
async function cargoFormatExecutor(options, context) {
|
|
14
|
-
const command = _chunkULBTYC2Bjs.buildCargoCommand.call(void 0, "fmt", options, context);
|
|
15
|
-
return await _chunkULBTYC2Bjs.cargoCommand.call(void 0, ...command);
|
|
16
|
-
}
|
|
17
|
-
_chunk3GQAWCBQjs.__name.call(void 0, cargoFormatExecutor, "cargoFormatExecutor");
|
|
18
|
-
var executor_default = _chunk6CGAYKQLjs.withRunExecutor.call(void 0, "Cargo Format", cargoFormatExecutor, {
|
|
19
|
-
skipReadingConfig: false,
|
|
20
|
-
hooks: {
|
|
21
|
-
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
22
|
-
options.outputPath ??= "dist/target/{projectRoot}";
|
|
23
|
-
options.toolchain ??= "stable";
|
|
24
|
-
return options;
|
|
25
|
-
}, "applyDefaultOptions")
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
exports.cargoFormatExecutor = cargoFormatExecutor; exports.executor_default = executor_default;
|
package/dist/chunk-ICPUM2HS.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunk6CGAYKQLjs = require('./chunk-6CGAYKQL.js');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _chunkG4QFSE5Bjs = require('./chunk-G4QFSE5B.js');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
|
|
10
|
-
|
|
11
|
-
// src/executors/typia/executor.ts
|
|
12
|
-
var _fsextra = require('fs-extra');
|
|
13
|
-
var _TypiaProgrammerjs = require('typia/lib/programmers/TypiaProgrammer.js');
|
|
14
|
-
async function typiaExecutorFn(options, _, config) {
|
|
15
|
-
if (options.clean !== false) {
|
|
16
|
-
_chunkG4QFSE5Bjs.writeInfo.call(void 0, `\u{1F9F9} Cleaning output path: ${options.outputPath}`, config);
|
|
17
|
-
_fsextra.removeSync.call(void 0, options.outputPath);
|
|
18
|
-
}
|
|
19
|
-
await Promise.all(options.entry.map((entry) => {
|
|
20
|
-
_chunkG4QFSE5Bjs.writeInfo.call(void 0, `\u{1F680} Running Typia on entry: ${entry}`, config);
|
|
21
|
-
return _TypiaProgrammerjs.TypiaProgrammer.build({
|
|
22
|
-
input: entry,
|
|
23
|
-
output: options.outputPath,
|
|
24
|
-
project: options.tsconfig
|
|
25
|
-
});
|
|
26
|
-
}));
|
|
27
|
-
return {
|
|
28
|
-
success: true
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
_chunk3GQAWCBQjs.__name.call(void 0, typiaExecutorFn, "typiaExecutorFn");
|
|
32
|
-
var executor_default = _chunk6CGAYKQLjs.withRunExecutor.call(void 0, "Typia runtime validation generator", typiaExecutorFn, {
|
|
33
|
-
skipReadingConfig: false,
|
|
34
|
-
hooks: {
|
|
35
|
-
applyDefaultOptions: /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (options) => {
|
|
36
|
-
options.entry ??= [
|
|
37
|
-
"{sourceRoot}/index.ts"
|
|
38
|
-
];
|
|
39
|
-
options.outputPath ??= "{sourceRoot}/__generated__/typia";
|
|
40
|
-
options.tsconfig ??= "{projectRoot}/tsconfig.json";
|
|
41
|
-
options.clean ??= true;
|
|
42
|
-
return options;
|
|
43
|
-
}, "applyDefaultOptions")
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
exports.typiaExecutorFn = typiaExecutorFn; exports.executor_default = executor_default;
|
package/dist/chunk-JJ4PSTY4.mjs
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
buildCargoCommand,
|
|
3
|
-
cargoCommand
|
|
4
|
-
} from "./chunk-62XRHQ44.mjs";
|
|
5
|
-
import {
|
|
6
|
-
withRunExecutor
|
|
7
|
-
} from "./chunk-LSG534D5.mjs";
|
|
8
|
-
import {
|
|
9
|
-
__name
|
|
10
|
-
} from "./chunk-L2DHGVS5.mjs";
|
|
11
|
-
|
|
12
|
-
// src/executors/cargo-clippy/executor.ts
|
|
13
|
-
async function cargoClippyExecutor(options, context) {
|
|
14
|
-
const command = buildCargoCommand("clippy", options, context);
|
|
15
|
-
return await cargoCommand(...command);
|
|
16
|
-
}
|
|
17
|
-
__name(cargoClippyExecutor, "cargoClippyExecutor");
|
|
18
|
-
var executor_default = withRunExecutor("Cargo Clippy", cargoClippyExecutor, {
|
|
19
|
-
skipReadingConfig: false,
|
|
20
|
-
hooks: {
|
|
21
|
-
applyDefaultOptions: /* @__PURE__ */ __name((options) => {
|
|
22
|
-
options.toolchain ??= "stable";
|
|
23
|
-
options.fix ??= false;
|
|
24
|
-
return options;
|
|
25
|
-
}, "applyDefaultOptions")
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
export {
|
|
30
|
-
cargoClippyExecutor,
|
|
31
|
-
executor_default
|
|
32
|
-
};
|
package/dist/chunk-JMCJJNBJ.mjs
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__name
|
|
3
|
-
} from "./chunk-L2DHGVS5.mjs";
|
|
4
|
-
|
|
5
|
-
// src/utils/project-tags.ts
|
|
6
|
-
var ProjectTagConstants = {
|
|
7
|
-
Language: {
|
|
8
|
-
TAG_ID: "language",
|
|
9
|
-
TYPESCRIPT: "typescript",
|
|
10
|
-
RUST: "rust"
|
|
11
|
-
},
|
|
12
|
-
ProjectType: {
|
|
13
|
-
TAG_ID: "type",
|
|
14
|
-
LIBRARY: "library",
|
|
15
|
-
APPLICATION: "application"
|
|
16
|
-
},
|
|
17
|
-
DistStyle: {
|
|
18
|
-
TAG_ID: "dist-style",
|
|
19
|
-
NORMAL: "normal",
|
|
20
|
-
CLEAN: "clean"
|
|
21
|
-
},
|
|
22
|
-
Provider: {
|
|
23
|
-
TAG_ID: "provider"
|
|
24
|
-
},
|
|
25
|
-
Platform: {
|
|
26
|
-
TAG_ID: "platform",
|
|
27
|
-
NODE: "node",
|
|
28
|
-
BROWSER: "browser",
|
|
29
|
-
NEUTRAL: "neutral",
|
|
30
|
-
WORKER: "worker"
|
|
31
|
-
},
|
|
32
|
-
Registry: {
|
|
33
|
-
TAG_ID: "registry",
|
|
34
|
-
CARGO: "cargo",
|
|
35
|
-
NPM: "npm",
|
|
36
|
-
CONTAINER: "container",
|
|
37
|
-
CYCLONE: "cyclone"
|
|
38
|
-
},
|
|
39
|
-
Plugin: {
|
|
40
|
-
TAG_ID: "plugin"
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
var formatProjectTag = /* @__PURE__ */ __name((variant, value) => {
|
|
44
|
-
return `${variant}:${value}`;
|
|
45
|
-
}, "formatProjectTag");
|
|
46
|
-
var hasProjectTag = /* @__PURE__ */ __name((project, variant) => {
|
|
47
|
-
project.tags = project.tags ?? [];
|
|
48
|
-
const prefix = formatProjectTag(variant, "");
|
|
49
|
-
return project.tags.some((tag) => tag.startsWith(prefix) && tag.length > prefix.length);
|
|
50
|
-
}, "hasProjectTag");
|
|
51
|
-
var getProjectTag = /* @__PURE__ */ __name((project, variant) => {
|
|
52
|
-
if (!hasProjectTag(project, variant)) {
|
|
53
|
-
return void 0;
|
|
54
|
-
}
|
|
55
|
-
project.tags = project.tags ?? [];
|
|
56
|
-
const prefix = formatProjectTag(variant, "");
|
|
57
|
-
const tag = project.tags.find((tag2) => tag2.startsWith(prefix));
|
|
58
|
-
return tag?.replace(prefix, "");
|
|
59
|
-
}, "getProjectTag");
|
|
60
|
-
var isEqualProjectTag = /* @__PURE__ */ __name((project, variant, value) => {
|
|
61
|
-
const tag = getProjectTag(project, variant);
|
|
62
|
-
return !!(tag && tag?.toUpperCase() === value.toUpperCase());
|
|
63
|
-
}, "isEqualProjectTag");
|
|
64
|
-
var addProjectTag = /* @__PURE__ */ __name((project, variant, value, options = {
|
|
65
|
-
overwrite: false
|
|
66
|
-
}) => {
|
|
67
|
-
project.tags = project.tags ?? [];
|
|
68
|
-
if (options.overwrite || !hasProjectTag(project, variant)) {
|
|
69
|
-
project.tags = project.tags.filter((tag) => !tag.startsWith(formatProjectTag(variant, "")));
|
|
70
|
-
project.tags.push(formatProjectTag(variant, value));
|
|
71
|
-
}
|
|
72
|
-
}, "addProjectTag");
|
|
73
|
-
var addPluginProjectTag = /* @__PURE__ */ __name((project, plugin) => {
|
|
74
|
-
project.tags = project.tags ?? [];
|
|
75
|
-
project.tags.push(formatProjectTag(ProjectTagConstants.Plugin.TAG_ID, plugin));
|
|
76
|
-
}, "addPluginProjectTag");
|
|
77
|
-
var setDefaultProjectTags = /* @__PURE__ */ __name((project, plugin) => {
|
|
78
|
-
project.tags = project.tags ?? [];
|
|
79
|
-
addProjectTag(project, ProjectTagConstants.ProjectType.TAG_ID, project.projectType === "application" ? ProjectTagConstants.ProjectType.APPLICATION : ProjectTagConstants.ProjectType.LIBRARY, {
|
|
80
|
-
overwrite: true
|
|
81
|
-
});
|
|
82
|
-
addProjectTag(project, ProjectTagConstants.DistStyle.TAG_ID, project.targets && Object.keys(project.targets).includes("clean-package") ? ProjectTagConstants.DistStyle.CLEAN : ProjectTagConstants.DistStyle.NORMAL, {
|
|
83
|
-
overwrite: true
|
|
84
|
-
});
|
|
85
|
-
addProjectTag(project, ProjectTagConstants.Platform.TAG_ID, project.targets?.build?.options.platform === "node" ? ProjectTagConstants.Platform.NODE : project.targets?.build?.options.platform === "worker" ? ProjectTagConstants.Platform.WORKER : project.targets?.build?.options.platform === "browser" ? ProjectTagConstants.Platform.BROWSER : ProjectTagConstants.Platform.NEUTRAL, {
|
|
86
|
-
overwrite: false
|
|
87
|
-
});
|
|
88
|
-
if (plugin) {
|
|
89
|
-
addPluginProjectTag(project, plugin);
|
|
90
|
-
}
|
|
91
|
-
}, "setDefaultProjectTags");
|
|
92
|
-
|
|
93
|
-
export {
|
|
94
|
-
ProjectTagConstants,
|
|
95
|
-
formatProjectTag,
|
|
96
|
-
hasProjectTag,
|
|
97
|
-
getProjectTag,
|
|
98
|
-
isEqualProjectTag,
|
|
99
|
-
addProjectTag,
|
|
100
|
-
addPluginProjectTag,
|
|
101
|
-
setDefaultProjectTags
|
|
102
|
-
};
|