@storm-software/workspace-tools 1.90.1 → 1.105.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +134 -8
- package/README.md +1 -1
- package/config/nx.json +235 -94
- package/index.js +2638 -2012
- package/meta.json +1 -1
- package/package.json +2 -1
- package/packages/config/src/define-config.d.ts +7 -6
- package/packages/config/src/schema.d.ts +13 -10
- package/packages/config-tools/src/config-file/get-config-file.d.ts +1 -1
- package/packages/workspace-tools/src/executors/npm-publish/executor.d.ts +4 -1
- package/packages/workspace-tools/src/plugins/rust/cargo-toml.d.ts +1 -1
- package/src/base/index.js +2628 -2004
- package/src/executors/npm-publish/executor.js +66 -38
- package/src/executors/rolldown/executor.js +880 -787
- package/src/executors/tsup/executor.js +880 -787
- package/src/executors/tsup-browser/executor.js +880 -787
- package/src/executors/tsup-neutral/executor.js +880 -787
- package/src/executors/tsup-node/executor.js +880 -787
- package/src/executors/typia/executor.js +882 -789
- package/src/executors/unbuild/executor.js +880 -787
- package/src/generators/browser-library/generator.js +2625 -2003
- package/src/generators/config-schema/generator.js +877 -786
- package/src/generators/neutral-library/generator.js +2625 -2003
- package/src/generators/node-library/generator.js +2625 -2003
- package/src/generators/preset/generator.js +877 -786
- package/src/generators/release-version/generator.js +885 -794
- package/src/plugins/rust/index.js +47 -15
- package/src/plugins/typescript/index.js +71 -8
- package/src/utils/index.js +879 -788
|
@@ -26,9 +26,9 @@ __export(rust_exports, {
|
|
|
26
26
|
module.exports = __toCommonJS(rust_exports);
|
|
27
27
|
|
|
28
28
|
// packages/workspace-tools/src/plugins/rust/cargo-toml.ts
|
|
29
|
-
var import_devkit2 = require("@nx/devkit");
|
|
30
|
-
var import_project_graph = require("nx/src/config/project-graph");
|
|
31
29
|
var import_node_path2 = require("node:path");
|
|
30
|
+
var import_project_graph = require("nx/src/config/project-graph");
|
|
31
|
+
var import_devkit2 = require("@nx/devkit");
|
|
32
32
|
|
|
33
33
|
// packages/workspace-tools/src/utils/cargo.ts
|
|
34
34
|
var import_node_path = require("node:path");
|
|
@@ -98,34 +98,67 @@ var createNodes = [
|
|
|
98
98
|
if (!isExternal(cargoPackage, ctx.workspaceRoot)) {
|
|
99
99
|
const root = (0, import_node_path2.dirname)(cargoFile);
|
|
100
100
|
const targets = {
|
|
101
|
+
"lint-ls": {
|
|
102
|
+
cache: true,
|
|
103
|
+
inputs: ["config_linting", "rust", "^production"],
|
|
104
|
+
dependsOn: ["^lint-ls"]
|
|
105
|
+
},
|
|
101
106
|
lint: {
|
|
102
107
|
cache: true,
|
|
103
|
-
inputs: ["
|
|
104
|
-
dependsOn: ["^lint"],
|
|
108
|
+
inputs: ["config_linting", "rust", "^production"],
|
|
109
|
+
dependsOn: ["lint-ls", "^lint"],
|
|
105
110
|
executor: "@monodon/rust:lint",
|
|
106
|
-
outputs: ["{options.target-dir}"],
|
|
107
111
|
options: {
|
|
108
|
-
"target-dir": `dist/target/${cargoPackage.name}`
|
|
112
|
+
"target-dir": `{workspaceRoot}/dist/target/${cargoPackage.name}`
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"format-readme": {
|
|
116
|
+
cache: true,
|
|
117
|
+
dependsOn: ["^format-readme"]
|
|
118
|
+
},
|
|
119
|
+
"format-toml": {
|
|
120
|
+
cache: true,
|
|
121
|
+
dependsOn: ["^format-toml"]
|
|
122
|
+
},
|
|
123
|
+
format: {
|
|
124
|
+
cache: true,
|
|
125
|
+
inputs: ["config_linting", "rust", "^production"],
|
|
126
|
+
dependsOn: ["format-readme", "format-toml", "^format"],
|
|
127
|
+
executor: "nx:run-commands",
|
|
128
|
+
options: {
|
|
129
|
+
command: `echo 'Formatting the project files in "{projectRoot}"' `,
|
|
130
|
+
color: true
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
clean: {
|
|
134
|
+
cache: true,
|
|
135
|
+
inputs: ["rust", "^production"],
|
|
136
|
+
outputs: [`{workspaceRoot}/dist/target/${cargoPackage.name}`],
|
|
137
|
+
executor: "nx:run-commands",
|
|
138
|
+
options: {
|
|
139
|
+
command: `pnpm exec rimraf dist/target/${cargoPackage.name}`,
|
|
140
|
+
color: true,
|
|
141
|
+
cwd: "{workspaceRoot}"
|
|
109
142
|
}
|
|
110
143
|
},
|
|
111
144
|
build: {
|
|
112
145
|
cache: true,
|
|
113
|
-
inputs: ["
|
|
114
|
-
dependsOn: ["
|
|
146
|
+
inputs: ["rust", "^production"],
|
|
147
|
+
dependsOn: ["format", "clean", "^build"],
|
|
115
148
|
executor: "@monodon/rust:check",
|
|
116
149
|
outputs: ["{options.target-dir}"],
|
|
117
150
|
options: {
|
|
118
|
-
"target-dir": `dist/target/${cargoPackage.name}`
|
|
151
|
+
"target-dir": `{workspaceRoot}/dist/target/${cargoPackage.name}`
|
|
119
152
|
}
|
|
120
153
|
},
|
|
121
154
|
test: {
|
|
122
155
|
cache: true,
|
|
123
|
-
inputs: ["
|
|
124
|
-
dependsOn: ["
|
|
156
|
+
inputs: ["config_testing", "source_testing", "rust", "^production"],
|
|
157
|
+
dependsOn: ["build", "^test"],
|
|
125
158
|
executor: "@monodon/rust:test",
|
|
126
159
|
outputs: ["{options.target-dir}"],
|
|
127
160
|
options: {
|
|
128
|
-
"target-dir": `dist/target/${cargoPackage.name}`
|
|
161
|
+
"target-dir": `{workspaceRoot}/dist/target/${cargoPackage.name}`
|
|
129
162
|
},
|
|
130
163
|
configurations: {
|
|
131
164
|
production: {
|
|
@@ -138,8 +171,7 @@ var createNodes = [
|
|
|
138
171
|
if (!isPrivate) {
|
|
139
172
|
targets["nx-release-publish"] = {
|
|
140
173
|
cache: false,
|
|
141
|
-
inputs: ["
|
|
142
|
-
dependsOn: ["test", "build", "^nx-release-publish"],
|
|
174
|
+
inputs: ["rust", "^production"],
|
|
143
175
|
executor: "@storm-software/workspace-tools:cargo-publish",
|
|
144
176
|
options: {
|
|
145
177
|
packageRoot: root
|
|
@@ -155,7 +187,7 @@ var createNodes = [
|
|
|
155
187
|
generator: "@storm-software/workspace-tools:release-version"
|
|
156
188
|
}
|
|
157
189
|
},
|
|
158
|
-
tags: ["
|
|
190
|
+
tags: ["language:rust"]
|
|
159
191
|
};
|
|
160
192
|
}
|
|
161
193
|
for (const dep of cargoPackage.dependencies) {
|
|
@@ -42,13 +42,24 @@ var createNodes = [
|
|
|
42
42
|
packageJson
|
|
43
43
|
);
|
|
44
44
|
const targets = (0, import_package_json.readTargetsFromPackageJson)(packageJson);
|
|
45
|
+
if (!targets["lint-ls"]) {
|
|
46
|
+
targets["lint-ls"] = {
|
|
47
|
+
cache: true,
|
|
48
|
+
inputs: ["config_linting", "typescript", "^production"],
|
|
49
|
+
dependsOn: ["^lint-ls"],
|
|
50
|
+
executor: "nx:run-commands",
|
|
51
|
+
options: {
|
|
52
|
+
command: 'pnpm exec ls-lint --config="@storm-software/linting-tools/ls-lint/ls-lint.yml" ',
|
|
53
|
+
color: true
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}
|
|
45
57
|
if (!targets.lint) {
|
|
46
58
|
targets.lint = {
|
|
47
59
|
cache: true,
|
|
48
|
-
inputs: ["
|
|
49
|
-
dependsOn: ["^lint"],
|
|
60
|
+
inputs: ["config_linting", "typescript", "^production"],
|
|
61
|
+
dependsOn: ["lint-ls", "^lint"],
|
|
50
62
|
executor: "@nx/eslint:lint",
|
|
51
|
-
outputs: ["{options.outputFile}"],
|
|
52
63
|
options: {
|
|
53
64
|
format: "stylish",
|
|
54
65
|
fix: true,
|
|
@@ -58,12 +69,65 @@ var createNodes = [
|
|
|
58
69
|
}
|
|
59
70
|
};
|
|
60
71
|
}
|
|
72
|
+
if (!targets["format-readme"]) {
|
|
73
|
+
targets["format-readme"] = {
|
|
74
|
+
cache: true,
|
|
75
|
+
dependsOn: ["^format-readme"]
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
if (!targets["format-toml"]) {
|
|
79
|
+
targets["format-toml"] = {
|
|
80
|
+
cache: true,
|
|
81
|
+
dependsOn: ["^format-toml"]
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
if (!targets["format-prettier"]) {
|
|
85
|
+
targets["format-prettier"] = {
|
|
86
|
+
cache: true,
|
|
87
|
+
inputs: ["config_linting", "typescript", "^production"],
|
|
88
|
+
dependsOn: ["^format-prettier"]
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
if (!targets.format) {
|
|
92
|
+
targets.format = {
|
|
93
|
+
cache: true,
|
|
94
|
+
inputs: ["config_linting", "typescript", "^production"],
|
|
95
|
+
dependsOn: [
|
|
96
|
+
"format-readme",
|
|
97
|
+
"format-toml",
|
|
98
|
+
"format-prettier",
|
|
99
|
+
"^format"
|
|
100
|
+
],
|
|
101
|
+
executor: "nx:run-commands",
|
|
102
|
+
options: {
|
|
103
|
+
command: `echo 'Formatting the project files in "{projectRoot}"' `,
|
|
104
|
+
color: true
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
if (!targets.clean) {
|
|
109
|
+
targets.clean = {
|
|
110
|
+
cache: true,
|
|
111
|
+
executor: "nx:run-commands",
|
|
112
|
+
inputs: ["typescript", "^production"],
|
|
113
|
+
outputs: ["{workspaceRoot}/dist/{projectRoot}"],
|
|
114
|
+
options: {
|
|
115
|
+
command: "pnpm exec rimraf dist/{projectRoot}",
|
|
116
|
+
color: true,
|
|
117
|
+
cwd: "{workspaceRoot}"
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
}
|
|
61
121
|
if (!targets.test) {
|
|
62
122
|
targets.test = {
|
|
63
123
|
cache: true,
|
|
64
|
-
inputs: ["default", "^production"],
|
|
65
|
-
dependsOn: ["build", "^test"],
|
|
66
124
|
executor: "@nx/jest:jest",
|
|
125
|
+
inputs: [
|
|
126
|
+
"config_testing",
|
|
127
|
+
"source_testing",
|
|
128
|
+
"typescript",
|
|
129
|
+
"^production"
|
|
130
|
+
],
|
|
67
131
|
outputs: ["{workspaceRoot}/coverage/{projectRoot}"],
|
|
68
132
|
defaultConfiguration: "local",
|
|
69
133
|
options: {
|
|
@@ -86,8 +150,7 @@ var createNodes = [
|
|
|
86
150
|
if (!isPrivate) {
|
|
87
151
|
targets["nx-release-publish"] = {
|
|
88
152
|
cache: false,
|
|
89
|
-
inputs: ["
|
|
90
|
-
dependsOn: ["build", "^nx-release-publish"],
|
|
153
|
+
inputs: ["typescript", "^production"],
|
|
91
154
|
executor: "@storm-software/workspace-tools:npm-publish",
|
|
92
155
|
options: {}
|
|
93
156
|
};
|
|
@@ -95,7 +158,7 @@ var createNodes = [
|
|
|
95
158
|
return project?.name ? {
|
|
96
159
|
projects: {
|
|
97
160
|
[project.name]: {
|
|
98
|
-
tags: ["
|
|
161
|
+
tags: ["language:typescript"],
|
|
99
162
|
...project,
|
|
100
163
|
targets,
|
|
101
164
|
release: {
|