@storm-software/workspace-tools 1.271.2 → 1.272.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +440 -61
  3. package/config/base.json +2 -4
  4. package/dist/{chunk-GQQLBQPQ.mjs → chunk-4K5FV2MH.mjs} +3 -3
  5. package/dist/{chunk-QFWQZOVG.mjs → chunk-6LP3KKXE.mjs} +1 -1
  6. package/dist/{chunk-AOFWKOAI.js → chunk-7CA3TDXD.js} +4 -4
  7. package/dist/{chunk-FOFNKU5G.js → chunk-7IYOBX35.js} +24 -17
  8. package/dist/{chunk-EU6N7QT3.js → chunk-7RVW57VK.js} +5 -5
  9. package/dist/{chunk-UIPUSUAB.js → chunk-C6YYTK6Q.js} +9 -5
  10. package/dist/{chunk-SNMXP6JV.mjs → chunk-EXYV2BKT.mjs} +3 -3
  11. package/dist/{chunk-BFD7HHVZ.mjs → chunk-EZPQKO5C.mjs} +3 -3
  12. package/dist/{chunk-23BZQTB2.mjs → chunk-GMG4M2RZ.mjs} +10 -6
  13. package/dist/{chunk-4S66IYQF.mjs → chunk-I2GT7ECM.mjs} +2 -2
  14. package/dist/{chunk-O6RRIC6I.js → chunk-KQBEYBS7.js} +4 -4
  15. package/dist/{chunk-4BECJRPP.js → chunk-LJDV7HFT.js} +1 -1
  16. package/dist/{chunk-M725BO42.mjs → chunk-PCVYQGOH.mjs} +2 -2
  17. package/dist/{chunk-TSYIV33W.js → chunk-WGDJV4SH.js} +5 -5
  18. package/dist/{chunk-4QRA66TH.mjs → chunk-X2L5HFRH.mjs} +18 -11
  19. package/dist/{chunk-22UY7NFX.js → chunk-X5VIC7HP.js} +5 -5
  20. package/dist/executors.js +7 -7
  21. package/dist/executors.mjs +6 -6
  22. package/dist/index.js +7 -7
  23. package/dist/index.mjs +6 -6
  24. package/dist/src/executors/cargo-build/executor.js +3 -3
  25. package/dist/src/executors/cargo-build/executor.mjs +2 -2
  26. package/dist/src/executors/cargo-check/executor.js +3 -3
  27. package/dist/src/executors/cargo-check/executor.mjs +2 -2
  28. package/dist/src/executors/cargo-clippy/executor.js +3 -3
  29. package/dist/src/executors/cargo-clippy/executor.mjs +2 -2
  30. package/dist/src/executors/cargo-doc/executor.js +3 -3
  31. package/dist/src/executors/cargo-doc/executor.mjs +2 -2
  32. package/dist/src/executors/cargo-format/executor.js +3 -3
  33. package/dist/src/executors/cargo-format/executor.mjs +2 -2
  34. package/dist/src/plugins/rust/cargo-toml.js +3 -3
  35. package/dist/src/plugins/rust/cargo-toml.mjs +2 -2
  36. package/dist/src/plugins/rust/index.js +3 -3
  37. package/dist/src/plugins/rust/index.mjs +2 -2
  38. package/dist/src/plugins/typescript/index.js +2 -2
  39. package/dist/src/plugins/typescript/index.mjs +1 -1
  40. package/dist/src/plugins/typescript/project-config.js +2 -2
  41. package/dist/src/plugins/typescript/project-config.mjs +1 -1
  42. package/dist/src/plugins/typescript/tsup.js +9 -3
  43. package/dist/src/plugins/typescript/tsup.mjs +9 -3
  44. package/dist/src/plugins/typescript/untyped-schema.d.mts +1 -2
  45. package/dist/src/plugins/typescript/untyped-schema.d.ts +1 -2
  46. package/dist/src/plugins/typescript/untyped-schema.js +10 -4
  47. package/dist/src/plugins/typescript/untyped-schema.mjs +10 -4
  48. package/dist/src/plugins/typescript/untyped-schema.ts +31 -25
  49. package/dist/src/utils/cargo.js +2 -2
  50. package/dist/src/utils/cargo.mjs +1 -1
  51. package/dist/src/utils/index.js +2 -2
  52. package/dist/src/utils/index.mjs +1 -1
  53. package/package.json +7 -7
package/config/base.json CHANGED
@@ -454,11 +454,9 @@
454
454
  "plugins": [
455
455
  "@storm-software/workspace-tools/plugins/typescript",
456
456
  "@storm-software/workspace-tools/plugins/typescript/tsup",
457
- "@storm-software/workspace-tools/plugins/typescript/untyped"
457
+ "@storm-software/workspace-tools/plugins/typescript/untyped",
458
+ "@storm-software/workspace-tools/plugins/rust"
458
459
  ],
459
- "cli": {
460
- "packageManager": "pnpm"
461
- },
462
460
  "parallel": 3,
463
461
  "defaultBase": "main",
464
462
  "useDaemonProcess": true,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildCargoCommand,
3
3
  cargoCommand
4
- } from "./chunk-QFWQZOVG.mjs";
4
+ } from "./chunk-6LP3KKXE.mjs";
5
5
  import {
6
6
  withRunExecutor
7
7
  } from "./chunk-UYSJG2E5.mjs";
@@ -12,13 +12,13 @@ async function cargoFormatExecutor(options, context) {
12
12
  return await cargoCommand(...command);
13
13
  }
14
14
  var executor_default = withRunExecutor(
15
- "Cargo Format",
15
+ "Cargo - Format",
16
16
  cargoFormatExecutor,
17
17
  {
18
18
  skipReadingConfig: false,
19
19
  hooks: {
20
20
  applyDefaultOptions: (options) => {
21
- options.outputPath ??= "dist/target/{projectRoot}";
21
+ options.outputPath ??= "dist/{projectRoot}/target";
22
22
  options.toolchain ??= "stable";
23
23
  return options;
24
24
  }
@@ -128,7 +128,7 @@ function isExternal(packageOrDep, workspaceRoot2) {
128
128
  }
129
129
  function runProcess(processCmd, ...args) {
130
130
  const metadata = cargoMetadata();
131
- const targetDir = metadata?.target_directory ?? joinPathFragments(workspaceRoot, "dist", "cargo");
131
+ const targetDir = metadata?.target_directory ?? joinPathFragments(workspaceRoot, "dist");
132
132
  return new Promise((resolve) => {
133
133
  if (process.env.VERCEL) {
134
134
  return resolve({ success: true });
@@ -1,18 +1,18 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunk4BECJRPPjs = require('./chunk-4BECJRPP.js');
4
+ var _chunkLJDV7HFTjs = require('./chunk-LJDV7HFT.js');
5
5
 
6
6
 
7
7
  var _chunkAJ3C2EDWjs = require('./chunk-AJ3C2EDW.js');
8
8
 
9
9
  // src/executors/cargo-check/executor.ts
10
10
  async function cargoCheckExecutor(options, context) {
11
- const command = _chunk4BECJRPPjs.buildCargoCommand.call(void 0, "check", options, context);
12
- return await _chunk4BECJRPPjs.cargoCommand.call(void 0, ...command);
11
+ const command = _chunkLJDV7HFTjs.buildCargoCommand.call(void 0, "check", options, context);
12
+ return await _chunkLJDV7HFTjs.cargoCommand.call(void 0, ...command);
13
13
  }
14
14
  var executor_default = _chunkAJ3C2EDWjs.withRunExecutor.call(void 0,
15
- "Cargo Check",
15
+ "Cargo - Check",
16
16
  cargoCheckExecutor,
17
17
  {
18
18
  skipReadingConfig: false,
@@ -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 _chunk4BECJRPPjs = require('./chunk-4BECJRPP.js');
4
+ var _chunkLJDV7HFTjs = require('./chunk-LJDV7HFT.js');
5
5
 
6
6
 
7
7
 
@@ -33,12 +33,14 @@ var createNodesV2 = [
33
33
  return await _devkit.createNodesFromFiles.call(void 0,
34
34
  (configFile, options2, context2) => {
35
35
  try {
36
- console.log(`Processing Cargo.toml file: ${configFile}`);
36
+ console.log(
37
+ `[storm-software/rust]: Processing Cargo.toml file: ${configFile}`
38
+ );
37
39
  const profiles = _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _2 => _2.profiles]), () => ( {}));
38
40
  const includeApps = _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _3 => _3.includeApps]), () => ( true));
39
41
  const toolchain = _optionalChain([options2, 'optionalAccess', _4 => _4.toolchain]);
40
42
  const skipDocs = _nullishCoalesce(_optionalChain([options2, 'optionalAccess', _5 => _5.skipDocs]), () => ( false));
41
- const metadata = _chunk4BECJRPPjs.cargoMetadata.call(void 0, );
43
+ const metadata = _chunkLJDV7HFTjs.cargoMetadata.call(void 0, );
42
44
  if (!metadata) {
43
45
  return {};
44
46
  }
@@ -62,7 +64,7 @@ var createNodesV2 = [
62
64
  return acc;
63
65
  }, /* @__PURE__ */ new Map());
64
66
  for (const cargoPackage of cargoPackages) {
65
- if (!_chunk4BECJRPPjs.isExternal.call(void 0, cargoPackage, context2.workspaceRoot)) {
67
+ if (!_chunkLJDV7HFTjs.isExternal.call(void 0, cargoPackage, context2.workspaceRoot)) {
66
68
  const root = _path.dirname.call(void 0, configFile);
67
69
  const project = {
68
70
  root,
@@ -186,10 +188,10 @@ var createNodesV2 = [
186
188
  clean: {
187
189
  cache: true,
188
190
  inputs: ["rust", "^production"],
189
- outputs: [`{workspaceRoot}/dist/target/{projectRoot}`],
191
+ outputs: [`{workspaceRoot}/dist/{projectRoot}/target`],
190
192
  executor: "nx:run-commands",
191
193
  options: {
192
- command: `pnpm exec rimraf dist/target/crates/${cargoPackage.name}`,
194
+ command: `pnpm exec rimraf dist/{projectRoot}/target`,
193
195
  color: true,
194
196
  cwd: "{workspaceRoot}"
195
197
  }
@@ -199,7 +201,7 @@ var createNodesV2 = [
199
201
  inputs: ["rust", "^production"],
200
202
  dependsOn: ["build-base", "^build"],
201
203
  executor: "@storm-software/workspace-tools:cargo-build",
202
- outputs: [`{workspaceRoot}/dist/target/{projectRoot}`],
204
+ outputs: [`{workspaceRoot}/dist/{projectRoot}/target`],
203
205
  options: {
204
206
  toolchain
205
207
  },
@@ -209,9 +211,9 @@ var createNodesV2 = [
209
211
  rebuild: {
210
212
  cache: false,
211
213
  inputs: ["rust", "^production"],
212
- dependsOn: ["clean", "^build"],
214
+ dependsOn: ["clean", "build-base", "^build"],
213
215
  executor: "@storm-software/workspace-tools:cargo-build",
214
- outputs: [`{workspaceRoot}/dist/target/{projectRoot}`],
216
+ outputs: [`{workspaceRoot}/dist/{projectRoot}/target`],
215
217
  options: {
216
218
  toolchain
217
219
  },
@@ -225,7 +227,7 @@ var createNodesV2 = [
225
227
  executor: "@monodon/rust:test",
226
228
  outputs: ["{options.target-dir}"],
227
229
  options: {
228
- "target-dir": `{workspaceRoot}/dist/target/{projectRoot}`
230
+ "target-dir": `{workspaceRoot}/dist/{projectRoot}/target`
229
231
  },
230
232
  defaultConfiguration: "development",
231
233
  configurations
@@ -241,7 +243,7 @@ var createNodesV2 = [
241
243
  "^production"
242
244
  ],
243
245
  dependsOn: ["format-readme", "lint-docs", "^docs"],
244
- outputs: [`{workspaceRoot}/dist/docs/{projectRoot}`],
246
+ outputs: [`{workspaceRoot}/dist/{projectRoot}/docs`],
245
247
  executor: "@storm-software/workspace-tools:cargo-doc",
246
248
  options: {
247
249
  toolchain
@@ -292,17 +294,20 @@ var createNodesV2 = [
292
294
  }
293
295
  }
294
296
  };
297
+ console.log(
298
+ `[storm-software/rust]: Inferred Nx configuration for ${_nullishCoalesce(_optionalChain([project, 'optionalAccess', _8 => _8.name]), () => ( "missing name"))}`
299
+ );
295
300
  }
296
301
  for (const dep of cargoPackage.dependencies) {
297
- if (_chunk4BECJRPPjs.isExternal.call(void 0, dep, context2.workspaceRoot)) {
302
+ if (_chunkLJDV7HFTjs.isExternal.call(void 0, dep, context2.workspaceRoot)) {
298
303
  const externalDepName = `cargo:${dep.name}`;
299
- if (!_optionalChain([externalNodes, 'optionalAccess', _8 => _8[externalDepName]])) {
304
+ if (!_optionalChain([externalNodes, 'optionalAccess', _9 => _9[externalDepName]])) {
300
305
  externalNodes[externalDepName] = {
301
306
  type: "cargo",
302
307
  name: externalDepName,
303
308
  data: {
304
309
  packageName: dep.name,
305
- version: _nullishCoalesce(_optionalChain([cargoPackageMap, 'access', _9 => _9.get, 'call', _10 => _10(dep.name), 'optionalAccess', _11 => _11.version]), () => ( "0.0.0"))
310
+ version: _nullishCoalesce(_optionalChain([cargoPackageMap, 'access', _10 => _10.get, 'call', _11 => _11(dep.name), 'optionalAccess', _12 => _12.version]), () => ( "0.0.0"))
306
311
  }
307
312
  };
308
313
  }
@@ -326,7 +331,7 @@ var createNodesV2 = [
326
331
  }
327
332
  ];
328
333
  var createDependencies = (_, context) => {
329
- const metadata = _chunk4BECJRPPjs.cargoMetadata.call(void 0, );
334
+ const metadata = _chunkLJDV7HFTjs.cargoMetadata.call(void 0, );
330
335
  if (!metadata) {
331
336
  return [];
332
337
  }
@@ -334,11 +339,10 @@ var createDependencies = (_, context) => {
334
339
  const dependencies = [];
335
340
  for (const pkg of cargoPackages) {
336
341
  if (context.projects[pkg.name]) {
337
- console.debug(`Local Cargo package found: ${pkg.name}`);
338
342
  for (const deps of pkg.dependencies) {
339
343
  if (!cargoPackages.find((p) => p.name === deps.name)) {
340
344
  console.debug(
341
- `Dependency ${deps.name} not found in the cargo metadata.`
345
+ `[storm-software/rust]: Dependency ${deps.name} not found in the cargo metadata.`
342
346
  );
343
347
  continue;
344
348
  }
@@ -357,6 +361,9 @@ var createDependencies = (_, context) => {
357
361
  }
358
362
  }
359
363
  }
364
+ console.log(
365
+ `[storm-software/rust]: Total workspace Cargo dependencies found: ${dependencies.length}`
366
+ );
360
367
  return dependencies;
361
368
  };
362
369
  function createDependency(pkg, depName, type) {
@@ -1,24 +1,24 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunk4BECJRPPjs = require('./chunk-4BECJRPP.js');
4
+ var _chunkLJDV7HFTjs = require('./chunk-LJDV7HFT.js');
5
5
 
6
6
 
7
7
  var _chunkAJ3C2EDWjs = require('./chunk-AJ3C2EDW.js');
8
8
 
9
9
  // src/executors/cargo-format/executor.ts
10
10
  async function cargoFormatExecutor(options, context) {
11
- const command = _chunk4BECJRPPjs.buildCargoCommand.call(void 0, "fmt", options, context);
12
- return await _chunk4BECJRPPjs.cargoCommand.call(void 0, ...command);
11
+ const command = _chunkLJDV7HFTjs.buildCargoCommand.call(void 0, "fmt", options, context);
12
+ return await _chunkLJDV7HFTjs.cargoCommand.call(void 0, ...command);
13
13
  }
14
14
  var executor_default = _chunkAJ3C2EDWjs.withRunExecutor.call(void 0,
15
- "Cargo Format",
15
+ "Cargo - Format",
16
16
  cargoFormatExecutor,
17
17
  {
18
18
  skipReadingConfig: false,
19
19
  hooks: {
20
20
  applyDefaultOptions: (options) => {
21
- options.outputPath ??= "dist/target/{projectRoot}";
21
+ options.outputPath ??= "dist/{projectRoot}/target";
22
22
  options.toolchain ??= "stable";
23
23
  return options;
24
24
  }
@@ -16,8 +16,6 @@ var _fs = require('fs');
16
16
  var _path = require('path');
17
17
  var _nxjsonjs = require('nx/src/config/nx-json.js');
18
18
  var _fileutils = require('nx/src/utils/fileutils');
19
-
20
-
21
19
  var _packagejson = require('nx/src/utils/package-json');
22
20
  var _pkgtypes = require('pkg-types');
23
21
  var name = "storm-software/typescript";
@@ -49,7 +47,12 @@ var createNodesV2 = [
49
47
  const enableMarkdownlint = _optionalChain([options2, 'optionalAccess', _2 => _2.enableMarkdownlint]) !== false;
50
48
  const enableEslint = _optionalChain([options2, 'optionalAccess', _3 => _3.enableEslint]) !== false;
51
49
  const nxJson = _nxjsonjs.readNxJson.call(void 0, context2.workspaceRoot);
52
- const targets = _packagejson.readTargetsFromPackageJson.call(void 0, packageJson, nxJson);
50
+ const targets = _packagejson.readTargetsFromPackageJson.call(void 0,
51
+ packageJson,
52
+ nxJson,
53
+ project.root,
54
+ context2.workspaceRoot
55
+ );
53
56
  if (_path.join.call(void 0, context2.workspaceRoot, project.root).startsWith(
54
57
  _path.join.call(void 0, context2.workspaceRoot, "tools")
55
58
  ) && _optionalChain([options2, 'optionalAccess', _4 => _4.lintInternalTools]) !== true) {
@@ -318,8 +321,9 @@ var createNodesV2 = [
318
321
  }
319
322
  }
320
323
  } : {};
321
- console.log(`Writing Results for ${_nullishCoalesce(_optionalChain([project, 'optionalAccess', _17 => _17.name]), () => ( "missing name"))}`);
322
- console.log(result);
324
+ console.log(
325
+ `[storm-software/typescript]: Inferred Nx configuration for ${_nullishCoalesce(_optionalChain([project, 'optionalAccess', _17 => _17.name]), () => ( "missing name"))}`
326
+ );
323
327
  return result;
324
328
  } catch (e) {
325
329
  console.error(e);
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildCargoCommand,
3
3
  cargoCommand
4
- } from "./chunk-QFWQZOVG.mjs";
4
+ } from "./chunk-6LP3KKXE.mjs";
5
5
  import {
6
6
  withRunExecutor
7
7
  } from "./chunk-UYSJG2E5.mjs";
@@ -15,13 +15,13 @@ async function cargoDocExecutor(options, context) {
15
15
  return await cargoCommand(...command);
16
16
  }
17
17
  var executor_default = withRunExecutor(
18
- "Cargo Doc",
18
+ "Cargo - Doc",
19
19
  cargoDocExecutor,
20
20
  {
21
21
  skipReadingConfig: false,
22
22
  hooks: {
23
23
  applyDefaultOptions: (options) => {
24
- options.outputPath ??= "dist/docs/{projectRoot}";
24
+ options.outputPath ??= "dist/{projectRoot}/docs";
25
25
  options.toolchain ??= "stable";
26
26
  options.release ??= options.profile ? false : true;
27
27
  options.allFeatures ??= true;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildCargoCommand,
3
3
  cargoCommand
4
- } from "./chunk-QFWQZOVG.mjs";
4
+ } from "./chunk-6LP3KKXE.mjs";
5
5
  import {
6
6
  withRunExecutor
7
7
  } from "./chunk-UYSJG2E5.mjs";
@@ -12,13 +12,13 @@ async function cargoBuildExecutor(options, context) {
12
12
  return await cargoCommand(...command);
13
13
  }
14
14
  var executor_default = withRunExecutor(
15
- "Cargo Build",
15
+ "Cargo - Build",
16
16
  cargoBuildExecutor,
17
17
  {
18
18
  skipReadingConfig: false,
19
19
  hooks: {
20
20
  applyDefaultOptions: (options) => {
21
- options.outputPath ??= "dist/target/{projectRoot}";
21
+ options.outputPath ??= "dist/{projectRoot}/target";
22
22
  options.toolchain ??= "stable";
23
23
  return options;
24
24
  }
@@ -16,9 +16,7 @@ import { existsSync } from "node:fs";
16
16
  import { dirname, join } from "node:path";
17
17
  import { readNxJson } from "nx/src/config/nx-json.js";
18
18
  import { readJsonFile } from "nx/src/utils/fileutils";
19
- import {
20
- readTargetsFromPackageJson
21
- } from "nx/src/utils/package-json";
19
+ import { readTargetsFromPackageJson } from "nx/src/utils/package-json";
22
20
  import { readTSConfig } from "pkg-types";
23
21
  var name = "storm-software/typescript";
24
22
  var createNodesV2 = [
@@ -49,7 +47,12 @@ var createNodesV2 = [
49
47
  const enableMarkdownlint = options2?.enableMarkdownlint !== false;
50
48
  const enableEslint = options2?.enableEslint !== false;
51
49
  const nxJson = readNxJson(context2.workspaceRoot);
52
- const targets = readTargetsFromPackageJson(packageJson, nxJson);
50
+ const targets = readTargetsFromPackageJson(
51
+ packageJson,
52
+ nxJson,
53
+ project.root,
54
+ context2.workspaceRoot
55
+ );
53
56
  if (join(context2.workspaceRoot, project.root).startsWith(
54
57
  join(context2.workspaceRoot, "tools")
55
58
  ) && options2?.lintInternalTools !== true) {
@@ -318,8 +321,9 @@ var createNodesV2 = [
318
321
  }
319
322
  }
320
323
  } : {};
321
- console.log(`Writing Results for ${project?.name ?? "missing name"}`);
322
- console.log(result);
324
+ console.log(
325
+ `[storm-software/typescript]: Inferred Nx configuration for ${project?.name ?? "missing name"}`
326
+ );
323
327
  return result;
324
328
  } catch (e) {
325
329
  console.error(e);
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildCargoCommand,
3
3
  cargoCommand
4
- } from "./chunk-QFWQZOVG.mjs";
4
+ } from "./chunk-6LP3KKXE.mjs";
5
5
  import {
6
6
  withRunExecutor
7
7
  } from "./chunk-UYSJG2E5.mjs";
@@ -12,7 +12,7 @@ async function cargoCheckExecutor(options, context) {
12
12
  return await cargoCommand(...command);
13
13
  }
14
14
  var executor_default = withRunExecutor(
15
- "Cargo Check",
15
+ "Cargo - Check",
16
16
  cargoCheckExecutor,
17
17
  {
18
18
  skipReadingConfig: false,
@@ -1,18 +1,18 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunk4BECJRPPjs = require('./chunk-4BECJRPP.js');
4
+ var _chunkLJDV7HFTjs = require('./chunk-LJDV7HFT.js');
5
5
 
6
6
 
7
7
  var _chunkAJ3C2EDWjs = require('./chunk-AJ3C2EDW.js');
8
8
 
9
9
  // src/executors/cargo-clippy/executor.ts
10
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);
11
+ const command = _chunkLJDV7HFTjs.buildCargoCommand.call(void 0, "clippy", options, context);
12
+ return await _chunkLJDV7HFTjs.cargoCommand.call(void 0, ...command);
13
13
  }
14
14
  var executor_default = _chunkAJ3C2EDWjs.withRunExecutor.call(void 0,
15
- "Cargo Clippy",
15
+ "Cargo - Clippy",
16
16
  cargoClippyExecutor,
17
17
  {
18
18
  skipReadingConfig: false,
@@ -128,7 +128,7 @@ function isExternal(packageOrDep, workspaceRoot2) {
128
128
  }
129
129
  function runProcess(processCmd, ...args) {
130
130
  const metadata = cargoMetadata();
131
- const targetDir = _nullishCoalesce(_optionalChain([metadata, 'optionalAccess', _15 => _15.target_directory]), () => ( _devkit.joinPathFragments.call(void 0, _devkit.workspaceRoot, "dist", "cargo")));
131
+ const targetDir = _nullishCoalesce(_optionalChain([metadata, 'optionalAccess', _15 => _15.target_directory]), () => ( _devkit.joinPathFragments.call(void 0, _devkit.workspaceRoot, "dist")));
132
132
  return new Promise((resolve) => {
133
133
  if (process.env.VERCEL) {
134
134
  return resolve({ success: true });
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildCargoCommand,
3
3
  cargoCommand
4
- } from "./chunk-QFWQZOVG.mjs";
4
+ } from "./chunk-6LP3KKXE.mjs";
5
5
  import {
6
6
  withRunExecutor
7
7
  } from "./chunk-UYSJG2E5.mjs";
@@ -12,7 +12,7 @@ async function cargoClippyExecutor(options, context) {
12
12
  return await cargoCommand(...command);
13
13
  }
14
14
  var executor_default = withRunExecutor(
15
- "Cargo Clippy",
15
+ "Cargo - Clippy",
16
16
  cargoClippyExecutor,
17
17
  {
18
18
  skipReadingConfig: false,
@@ -1,24 +1,24 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunk4BECJRPPjs = require('./chunk-4BECJRPP.js');
4
+ var _chunkLJDV7HFTjs = require('./chunk-LJDV7HFT.js');
5
5
 
6
6
 
7
7
  var _chunkAJ3C2EDWjs = require('./chunk-AJ3C2EDW.js');
8
8
 
9
9
  // src/executors/cargo-build/executor.ts
10
10
  async function cargoBuildExecutor(options, context) {
11
- const command = _chunk4BECJRPPjs.buildCargoCommand.call(void 0, "build", options, context);
12
- return await _chunk4BECJRPPjs.cargoCommand.call(void 0, ...command);
11
+ const command = _chunkLJDV7HFTjs.buildCargoCommand.call(void 0, "build", options, context);
12
+ return await _chunkLJDV7HFTjs.cargoCommand.call(void 0, ...command);
13
13
  }
14
14
  var executor_default = _chunkAJ3C2EDWjs.withRunExecutor.call(void 0,
15
- "Cargo Build",
15
+ "Cargo - Build",
16
16
  cargoBuildExecutor,
17
17
  {
18
18
  skipReadingConfig: false,
19
19
  hooks: {
20
20
  applyDefaultOptions: (options) => {
21
- options.outputPath ??= "dist/target/{projectRoot}";
21
+ options.outputPath ??= "dist/{projectRoot}/target";
22
22
  options.toolchain ??= "stable";
23
23
  return options;
24
24
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  cargoMetadata,
3
3
  isExternal
4
- } from "./chunk-QFWQZOVG.mjs";
4
+ } from "./chunk-6LP3KKXE.mjs";
5
5
  import {
6
6
  ProjectTagConstants,
7
7
  addProjectTag,
@@ -33,7 +33,9 @@ var createNodesV2 = [
33
33
  return await createNodesFromFiles(
34
34
  (configFile, options2, context2) => {
35
35
  try {
36
- console.log(`Processing Cargo.toml file: ${configFile}`);
36
+ console.log(
37
+ `[storm-software/rust]: Processing Cargo.toml file: ${configFile}`
38
+ );
37
39
  const profiles = options2?.profiles ?? {};
38
40
  const includeApps = options2?.includeApps ?? true;
39
41
  const toolchain = options2?.toolchain;
@@ -186,10 +188,10 @@ var createNodesV2 = [
186
188
  clean: {
187
189
  cache: true,
188
190
  inputs: ["rust", "^production"],
189
- outputs: [`{workspaceRoot}/dist/target/{projectRoot}`],
191
+ outputs: [`{workspaceRoot}/dist/{projectRoot}/target`],
190
192
  executor: "nx:run-commands",
191
193
  options: {
192
- command: `pnpm exec rimraf dist/target/crates/${cargoPackage.name}`,
194
+ command: `pnpm exec rimraf dist/{projectRoot}/target`,
193
195
  color: true,
194
196
  cwd: "{workspaceRoot}"
195
197
  }
@@ -199,7 +201,7 @@ var createNodesV2 = [
199
201
  inputs: ["rust", "^production"],
200
202
  dependsOn: ["build-base", "^build"],
201
203
  executor: "@storm-software/workspace-tools:cargo-build",
202
- outputs: [`{workspaceRoot}/dist/target/{projectRoot}`],
204
+ outputs: [`{workspaceRoot}/dist/{projectRoot}/target`],
203
205
  options: {
204
206
  toolchain
205
207
  },
@@ -209,9 +211,9 @@ var createNodesV2 = [
209
211
  rebuild: {
210
212
  cache: false,
211
213
  inputs: ["rust", "^production"],
212
- dependsOn: ["clean", "^build"],
214
+ dependsOn: ["clean", "build-base", "^build"],
213
215
  executor: "@storm-software/workspace-tools:cargo-build",
214
- outputs: [`{workspaceRoot}/dist/target/{projectRoot}`],
216
+ outputs: [`{workspaceRoot}/dist/{projectRoot}/target`],
215
217
  options: {
216
218
  toolchain
217
219
  },
@@ -225,7 +227,7 @@ var createNodesV2 = [
225
227
  executor: "@monodon/rust:test",
226
228
  outputs: ["{options.target-dir}"],
227
229
  options: {
228
- "target-dir": `{workspaceRoot}/dist/target/{projectRoot}`
230
+ "target-dir": `{workspaceRoot}/dist/{projectRoot}/target`
229
231
  },
230
232
  defaultConfiguration: "development",
231
233
  configurations
@@ -241,7 +243,7 @@ var createNodesV2 = [
241
243
  "^production"
242
244
  ],
243
245
  dependsOn: ["format-readme", "lint-docs", "^docs"],
244
- outputs: [`{workspaceRoot}/dist/docs/{projectRoot}`],
246
+ outputs: [`{workspaceRoot}/dist/{projectRoot}/docs`],
245
247
  executor: "@storm-software/workspace-tools:cargo-doc",
246
248
  options: {
247
249
  toolchain
@@ -292,6 +294,9 @@ var createNodesV2 = [
292
294
  }
293
295
  }
294
296
  };
297
+ console.log(
298
+ `[storm-software/rust]: Inferred Nx configuration for ${project?.name ?? "missing name"}`
299
+ );
295
300
  }
296
301
  for (const dep of cargoPackage.dependencies) {
297
302
  if (isExternal(dep, context2.workspaceRoot)) {
@@ -334,11 +339,10 @@ var createDependencies = (_, context) => {
334
339
  const dependencies = [];
335
340
  for (const pkg of cargoPackages) {
336
341
  if (context.projects[pkg.name]) {
337
- console.debug(`Local Cargo package found: ${pkg.name}`);
338
342
  for (const deps of pkg.dependencies) {
339
343
  if (!cargoPackages.find((p) => p.name === deps.name)) {
340
344
  console.debug(
341
- `Dependency ${deps.name} not found in the cargo metadata.`
345
+ `[storm-software/rust]: Dependency ${deps.name} not found in the cargo metadata.`
342
346
  );
343
347
  continue;
344
348
  }
@@ -357,6 +361,9 @@ var createDependencies = (_, context) => {
357
361
  }
358
362
  }
359
363
  }
364
+ console.log(
365
+ `[storm-software/rust]: Total workspace Cargo dependencies found: ${dependencies.length}`
366
+ );
360
367
  return dependencies;
361
368
  };
362
369
  function createDependency(pkg, depName, type) {
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunk4BECJRPPjs = require('./chunk-4BECJRPP.js');
4
+ var _chunkLJDV7HFTjs = require('./chunk-LJDV7HFT.js');
5
5
 
6
6
 
7
7
  var _chunkAJ3C2EDWjs = require('./chunk-AJ3C2EDW.js');
@@ -11,17 +11,17 @@ async function cargoDocExecutor(options, context) {
11
11
  const opts = { ...options };
12
12
  opts["no-deps"] = opts.noDeps;
13
13
  delete opts.noDeps;
14
- const command = _chunk4BECJRPPjs.buildCargoCommand.call(void 0, "doc", options, context);
15
- return await _chunk4BECJRPPjs.cargoCommand.call(void 0, ...command);
14
+ const command = _chunkLJDV7HFTjs.buildCargoCommand.call(void 0, "doc", options, context);
15
+ return await _chunkLJDV7HFTjs.cargoCommand.call(void 0, ...command);
16
16
  }
17
17
  var executor_default = _chunkAJ3C2EDWjs.withRunExecutor.call(void 0,
18
- "Cargo Doc",
18
+ "Cargo - Doc",
19
19
  cargoDocExecutor,
20
20
  {
21
21
  skipReadingConfig: false,
22
22
  hooks: {
23
23
  applyDefaultOptions: (options) => {
24
- options.outputPath ??= "dist/docs/{projectRoot}";
24
+ options.outputPath ??= "dist/{projectRoot}/docs";
25
25
  options.toolchain ??= "stable";
26
26
  options.release ??= options.profile ? false : true;
27
27
  options.allFeatures ??= true;
package/dist/executors.js CHANGED
@@ -13,7 +13,7 @@ var _chunkSPXJBMLYjs = require('./chunk-SPXJBMLY.js');
13
13
  var _chunkEYXDS7SGjs = require('./chunk-EYXDS7SG.js');
14
14
 
15
15
 
16
- var _chunkEU6N7QT3js = require('./chunk-EU6N7QT3.js');
16
+ var _chunk7RVW57VKjs = require('./chunk-7RVW57VK.js');
17
17
 
18
18
 
19
19
  var _chunk54FVHKCUjs = require('./chunk-54FVHKCU.js');
@@ -22,18 +22,18 @@ var _chunk54FVHKCUjs = require('./chunk-54FVHKCU.js');
22
22
  var _chunkDCPKZRRYjs = require('./chunk-DCPKZRRY.js');
23
23
 
24
24
 
25
- var _chunkTSYIV33Wjs = require('./chunk-TSYIV33W.js');
25
+ var _chunkWGDJV4SHjs = require('./chunk-WGDJV4SH.js');
26
26
 
27
27
 
28
- var _chunkAOFWKOAIjs = require('./chunk-AOFWKOAI.js');
28
+ var _chunk7CA3TDXDjs = require('./chunk-7CA3TDXD.js');
29
29
 
30
30
 
31
- var _chunkO6RRIC6Ijs = require('./chunk-O6RRIC6I.js');
31
+ var _chunkKQBEYBS7js = require('./chunk-KQBEYBS7.js');
32
32
 
33
33
 
34
- var _chunk22UY7NFXjs = require('./chunk-22UY7NFX.js');
34
+ var _chunkX5VIC7HPjs = require('./chunk-X5VIC7HP.js');
35
35
  require('./chunk-FYXWAGK3.js');
36
- require('./chunk-4BECJRPP.js');
36
+ require('./chunk-LJDV7HFT.js');
37
37
  require('./chunk-BWGJVRAS.js');
38
38
  require('./chunk-AJ3C2EDW.js');
39
39
  require('./chunk-J2Z4WP3E.js');
@@ -53,4 +53,4 @@ require('./chunk-3RG5ZIWI.js');
53
53
 
54
54
 
55
55
 
56
- exports.LARGE_BUFFER = _chunkRZVF4LHTjs.LARGE_BUFFER; exports.cargoBuildExecutor = _chunkTSYIV33Wjs.cargoBuildExecutor; exports.cargoCheckExecutor = _chunkAOFWKOAIjs.cargoCheckExecutor; exports.cargoClippyExecutor = _chunkO6RRIC6Ijs.cargoClippyExecutor; exports.cargoDocExecutor = _chunk22UY7NFXjs.cargoDocExecutor; exports.cargoFormatExecutor = _chunkEU6N7QT3js.cargoFormatExecutor; exports.esbuildExecutorFn = _chunkDCPKZRRYjs.esbuildExecutorFn; exports.getRegistryVersion = _chunk54FVHKCUjs.getRegistryVersion; exports.sizeLimitExecutorFn = _chunkT7BALDKJjs.sizeLimitExecutorFn; exports.typiaExecutorFn = _chunkSPXJBMLYjs.typiaExecutorFn; exports.unbuildExecutorFn = _chunkEYXDS7SGjs.unbuildExecutorFn;
56
+ exports.LARGE_BUFFER = _chunkRZVF4LHTjs.LARGE_BUFFER; exports.cargoBuildExecutor = _chunkWGDJV4SHjs.cargoBuildExecutor; exports.cargoCheckExecutor = _chunk7CA3TDXDjs.cargoCheckExecutor; exports.cargoClippyExecutor = _chunkKQBEYBS7js.cargoClippyExecutor; exports.cargoDocExecutor = _chunkX5VIC7HPjs.cargoDocExecutor; exports.cargoFormatExecutor = _chunk7RVW57VKjs.cargoFormatExecutor; exports.esbuildExecutorFn = _chunkDCPKZRRYjs.esbuildExecutorFn; exports.getRegistryVersion = _chunk54FVHKCUjs.getRegistryVersion; exports.sizeLimitExecutorFn = _chunkT7BALDKJjs.sizeLimitExecutorFn; exports.typiaExecutorFn = _chunkSPXJBMLYjs.typiaExecutorFn; exports.unbuildExecutorFn = _chunkEYXDS7SGjs.unbuildExecutorFn;