@storm-software/workspace-tools 1.90.1 → 1.105.1

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.
@@ -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: ["default", "^production"],
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: ["default", "^production"],
114
- dependsOn: ["lint", "^build"],
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: ["defaultTesting", "^production"],
124
- dependsOn: ["test", "^build"],
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: ["default", "^production"],
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: ["lang:rust"]
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: ["default"],
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: ["default", "^production"],
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: ["lang:typescript"],
161
+ tags: ["language:typescript"],
99
162
  ...project,
100
163
  targets,
101
164
  release: {