@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.
Files changed (255) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +1 -1
  3. package/dist/chunk-22UY7NFX.js +41 -0
  4. package/dist/chunk-23BZQTB2.mjs +425 -0
  5. package/dist/{chunk-7O34DHUG.js → chunk-2AVWFUXP.js} +4 -19
  6. package/dist/{chunk-VW3PZOJ4.mjs → chunk-2M22JVJQ.mjs} +307 -192
  7. package/dist/{chunk-5RJOBRYL.mjs → chunk-3EDSGFA5.mjs} +63 -54
  8. package/dist/chunk-3RG5ZIWI.js +10 -0
  9. package/dist/{chunk-AC5SI4YZ.js → chunk-3TYXXJKV.js} +11 -8
  10. package/dist/{chunk-QSB5SLZS.mjs → chunk-3ZBMLG4D.mjs} +17 -14
  11. package/dist/chunk-437WGH2M.mjs +32 -0
  12. package/dist/{chunk-ULBTYC2B.js → chunk-4BECJRPP.js} +13 -42
  13. package/dist/chunk-4QRA66TH.mjs +379 -0
  14. package/dist/chunk-4S66IYQF.mjs +31 -0
  15. package/dist/{chunk-4JOIS7WW.js → chunk-4WHSR4FK.js} +24 -14
  16. package/dist/{chunk-JTAXCQX6.js → chunk-53DNHF7B.js} +7 -13
  17. package/dist/{chunk-GGGO542M.js → chunk-54FVHKCU.js} +36 -24
  18. package/dist/{chunk-B67R3JAF.mjs → chunk-5HUW3BTP.mjs} +37 -21
  19. package/dist/{chunk-GWYZDAH6.mjs → chunk-5LB2F3L4.mjs} +80 -65
  20. package/dist/{chunk-UF6KFXG5.js → chunk-5VY5IBBQ.js} +20 -17
  21. package/dist/{chunk-6QO3KMZA.js → chunk-5ZFTWEKB.js} +2 -16
  22. package/dist/chunk-6EMYX25V.js +7 -0
  23. package/dist/chunk-6QZSAZZ3.mjs +64 -0
  24. package/dist/{chunk-2JA7WAH7.mjs → chunk-7AN4JMFC.mjs} +2 -16
  25. package/dist/{chunk-N7XIQOHR.mjs → chunk-7HWV6U3E.mjs} +33 -18
  26. package/dist/{chunk-GKL4BY2Y.js → chunk-A5CKB6IJ.js} +7 -8
  27. package/dist/{chunk-Y5WKYMQB.mjs → chunk-ABE7UOMX.mjs} +24 -21
  28. package/dist/{chunk-L3WQZ3LY.mjs → chunk-AHLKRK7D.mjs} +33 -18
  29. package/dist/{chunk-6CGAYKQL.js → chunk-AJ3C2EDW.js} +69 -44
  30. package/dist/chunk-AMW7VHFM.mjs +52 -0
  31. package/dist/chunk-AOFWKOAI.js +31 -0
  32. package/dist/{chunk-7YRW5HNX.js → chunk-AX3RSZT7.js} +42 -31
  33. package/dist/chunk-BFD7HHVZ.mjs +32 -0
  34. package/dist/{chunk-ZMFVKBRM.js → chunk-BWGJVRAS.js} +2 -13
  35. package/dist/{chunk-M6NHJNGU.js → chunk-CWBHZBTN.js} +277 -169
  36. package/dist/{chunk-VGE6EHYW.mjs → chunk-EKWR7TBP.mjs} +36 -24
  37. package/dist/chunk-EU6N7QT3.js +32 -0
  38. package/dist/chunk-EYXDS7SG.js +105 -0
  39. package/dist/chunk-F66XEAID.mjs +113 -0
  40. package/dist/chunk-FOFNKU5G.js +379 -0
  41. package/dist/{chunk-7NNHBZC5.js → chunk-GNOIETZR.js} +28 -17
  42. package/dist/chunk-GQQLBQPQ.mjs +32 -0
  43. package/dist/{chunk-7PRHEOCT.js → chunk-H5NKKUPV.js} +31 -18
  44. package/dist/{chunk-5SVLMXLH.mjs → chunk-HMJTTE4A.mjs} +39 -30
  45. package/dist/{chunk-ZKMIASDR.mjs → chunk-HY3ZC5EZ.mjs} +10 -31
  46. package/dist/{chunk-OQPX75CG.js → chunk-I5MSPQMO.js} +31 -18
  47. package/dist/{chunk-L2DHGVS5.mjs → chunk-IEZKYJSF.mjs} +3 -6
  48. package/dist/{chunk-IWCQL3AQ.js → chunk-IL3R5ZVS.js} +10 -31
  49. package/dist/{chunk-P4OVFIT6.js → chunk-IZN2IVJ4.js} +19 -6
  50. package/dist/{chunk-UALZJZUK.js → chunk-J2Z4WP3E.js} +32 -16
  51. package/dist/{chunk-RBU35LQW.js → chunk-J4DYXH46.js} +70 -61
  52. package/dist/chunk-KP4RPOBI.mjs +105 -0
  53. package/dist/chunk-KR72GKIT.mjs +7 -0
  54. package/dist/chunk-L4NCVOB5.mjs +17 -0
  55. package/dist/{chunk-4Y6B6JDH.js → chunk-LBAVVYKU.js} +315 -136
  56. package/dist/{chunk-WMTEZ2PV.mjs → chunk-LSF4BHCI.mjs} +24 -14
  57. package/dist/chunk-M725BO42.mjs +32 -0
  58. package/dist/{chunk-7IAGL37F.mjs → chunk-MF6VZSIO.mjs} +30 -17
  59. package/dist/{chunk-7OOYI33U.mjs → chunk-MMBLGUC3.mjs} +311 -132
  60. package/dist/chunk-MZSZKV4N.mjs +47 -0
  61. package/dist/chunk-O6RRIC6I.js +32 -0
  62. package/dist/chunk-OKSECMVK.js +32 -0
  63. package/dist/chunk-Q2HYWACQ.mjs +50 -0
  64. package/dist/{chunk-62XRHQ44.mjs → chunk-QFWQZOVG.mjs} +14 -43
  65. package/dist/{chunk-DHGZTMND.js → chunk-QVYCDING.js} +4 -7
  66. package/dist/{chunk-Z4NKRWWJ.js → chunk-RJRBED5Q.js} +48 -32
  67. package/dist/chunk-S5Z4QGF3.js +64 -0
  68. package/dist/{chunk-CSHHIGIV.mjs → chunk-SITFTWPY.mjs} +23 -8
  69. package/dist/chunk-SNMXP6JV.mjs +41 -0
  70. package/dist/chunk-SPXJBMLY.js +50 -0
  71. package/dist/{chunk-7TLYMNLD.mjs → chunk-SW2E5MQJ.mjs} +4 -19
  72. package/dist/{chunk-OKW5O5P4.js → chunk-T7BALDKJ.js} +26 -22
  73. package/dist/chunk-TSYIV33W.js +32 -0
  74. package/dist/{chunk-H72YBOLR.mjs → chunk-U65XVJ4Y.mjs} +1 -12
  75. package/dist/{chunk-AVJVDD4L.mjs → chunk-U7JFVMCK.mjs} +6 -12
  76. package/dist/chunk-UIPUSUAB.js +425 -0
  77. package/dist/{chunk-LSG534D5.mjs → chunk-UYSJG2E5.mjs} +56 -31
  78. package/dist/{chunk-EHXSPF7W.mjs → chunk-VLOTOQYE.mjs} +11 -8
  79. package/dist/{chunk-EULJEPPD.mjs → chunk-W2C5IGWW.mjs} +3 -6
  80. package/dist/{chunk-G4QFSE5B.js → chunk-WE4HK4RN.js} +327 -212
  81. package/dist/{chunk-SUQKASD7.js → chunk-X2VJXJEF.js} +82 -67
  82. package/dist/{chunk-GY4AEA7P.mjs → chunk-X6PHOMFB.mjs} +32 -16
  83. package/dist/{chunk-PK2SUBWI.js → chunk-XZSS3YAB.js} +19 -16
  84. package/dist/chunk-YXBFVZ3K.js +47 -0
  85. package/dist/{chunk-CUPARBOS.js → chunk-ZP76EMBE.js} +41 -32
  86. package/dist/{chunk-HAXYCYZE.mjs → chunk-ZT4IIRQF.mjs} +254 -146
  87. package/dist/executors.js +21 -21
  88. package/dist/executors.mjs +20 -20
  89. package/dist/generators.js +17 -17
  90. package/dist/generators.mjs +18 -18
  91. package/dist/index.js +41 -41
  92. package/dist/index.mjs +42 -42
  93. package/dist/src/base/base-executor.js +7 -7
  94. package/dist/src/base/base-executor.mjs +6 -6
  95. package/dist/src/base/base-executor.untyped.js +1 -1
  96. package/dist/src/base/base-executor.untyped.mjs +1 -1
  97. package/dist/src/base/base-generator.js +7 -7
  98. package/dist/src/base/base-generator.mjs +6 -6
  99. package/dist/src/base/base-generator.untyped.js +1 -1
  100. package/dist/src/base/base-generator.untyped.mjs +1 -1
  101. package/dist/src/base/cargo-base-executor.untyped.js +3 -3
  102. package/dist/src/base/cargo-base-executor.untyped.mjs +2 -2
  103. package/dist/src/base/index.js +13 -13
  104. package/dist/src/base/index.mjs +12 -12
  105. package/dist/src/base/typescript-build-executor.untyped.js +3 -3
  106. package/dist/src/base/typescript-build-executor.untyped.mjs +2 -2
  107. package/dist/src/base/typescript-library-generator.untyped.js +3 -3
  108. package/dist/src/base/typescript-library-generator.untyped.mjs +2 -2
  109. package/dist/src/executors/cargo-build/executor.js +9 -9
  110. package/dist/src/executors/cargo-build/executor.mjs +8 -8
  111. package/dist/src/executors/cargo-build/untyped.js +3 -3
  112. package/dist/src/executors/cargo-build/untyped.mjs +2 -2
  113. package/dist/src/executors/cargo-check/executor.js +9 -9
  114. package/dist/src/executors/cargo-check/executor.mjs +8 -8
  115. package/dist/src/executors/cargo-check/untyped.js +3 -3
  116. package/dist/src/executors/cargo-check/untyped.mjs +2 -2
  117. package/dist/src/executors/cargo-clippy/executor.js +9 -9
  118. package/dist/src/executors/cargo-clippy/executor.mjs +8 -8
  119. package/dist/src/executors/cargo-clippy/untyped.js +3 -3
  120. package/dist/src/executors/cargo-clippy/untyped.mjs +2 -2
  121. package/dist/src/executors/cargo-doc/executor.js +9 -9
  122. package/dist/src/executors/cargo-doc/executor.mjs +8 -8
  123. package/dist/src/executors/cargo-doc/untyped.js +3 -3
  124. package/dist/src/executors/cargo-doc/untyped.mjs +2 -2
  125. package/dist/src/executors/cargo-format/executor.js +9 -9
  126. package/dist/src/executors/cargo-format/executor.mjs +8 -8
  127. package/dist/src/executors/cargo-format/untyped.js +3 -3
  128. package/dist/src/executors/cargo-format/untyped.mjs +2 -2
  129. package/dist/src/executors/cargo-publish/executor.js +4 -4
  130. package/dist/src/executors/cargo-publish/executor.mjs +3 -3
  131. package/dist/src/executors/cargo-publish/untyped.js +3 -3
  132. package/dist/src/executors/cargo-publish/untyped.mjs +2 -2
  133. package/dist/src/executors/clean-package/executor.js +84 -62
  134. package/dist/src/executors/clean-package/executor.mjs +84 -62
  135. package/dist/src/executors/clean-package/untyped.js +2 -4
  136. package/dist/src/executors/clean-package/untyped.mjs +2 -4
  137. package/dist/src/executors/esbuild/executor.js +8 -8
  138. package/dist/src/executors/esbuild/executor.mjs +7 -7
  139. package/dist/src/executors/esbuild/untyped.js +4 -8
  140. package/dist/src/executors/esbuild/untyped.mjs +3 -7
  141. package/dist/src/executors/npm-publish/executor.js +5 -5
  142. package/dist/src/executors/npm-publish/executor.mjs +4 -4
  143. package/dist/src/executors/npm-publish/untyped.js +1 -1
  144. package/dist/src/executors/npm-publish/untyped.mjs +1 -1
  145. package/dist/src/executors/size-limit/executor.js +8 -8
  146. package/dist/src/executors/size-limit/executor.mjs +7 -7
  147. package/dist/src/executors/size-limit/untyped.js +1 -1
  148. package/dist/src/executors/size-limit/untyped.mjs +1 -1
  149. package/dist/src/executors/typia/executor.js +8 -8
  150. package/dist/src/executors/typia/executor.mjs +7 -7
  151. package/dist/src/executors/typia/untyped.js +4 -12
  152. package/dist/src/executors/typia/untyped.mjs +4 -12
  153. package/dist/src/executors/unbuild/executor.js +8 -8
  154. package/dist/src/executors/unbuild/executor.mjs +7 -7
  155. package/dist/src/executors/unbuild/untyped.js +6 -13
  156. package/dist/src/executors/unbuild/untyped.mjs +5 -12
  157. package/dist/src/generators/browser-library/generator.js +10 -10
  158. package/dist/src/generators/browser-library/generator.mjs +9 -9
  159. package/dist/src/generators/browser-library/untyped.js +5 -11
  160. package/dist/src/generators/browser-library/untyped.mjs +4 -10
  161. package/dist/src/generators/config-schema/generator.js +8 -8
  162. package/dist/src/generators/config-schema/generator.mjs +7 -7
  163. package/dist/src/generators/config-schema/untyped.js +1 -1
  164. package/dist/src/generators/config-schema/untyped.mjs +1 -1
  165. package/dist/src/generators/init/init.js +3 -3
  166. package/dist/src/generators/init/init.mjs +2 -2
  167. package/dist/src/generators/init/untyped.js +1 -1
  168. package/dist/src/generators/init/untyped.mjs +1 -1
  169. package/dist/src/generators/neutral-library/generator.js +10 -10
  170. package/dist/src/generators/neutral-library/generator.mjs +9 -9
  171. package/dist/src/generators/neutral-library/untyped.js +5 -10
  172. package/dist/src/generators/neutral-library/untyped.mjs +4 -9
  173. package/dist/src/generators/node-library/generator.js +10 -10
  174. package/dist/src/generators/node-library/generator.mjs +9 -9
  175. package/dist/src/generators/node-library/untyped.js +5 -11
  176. package/dist/src/generators/node-library/untyped.mjs +4 -10
  177. package/dist/src/generators/preset/generator.js +8 -8
  178. package/dist/src/generators/preset/generator.mjs +7 -7
  179. package/dist/src/generators/preset/untyped.js +3 -11
  180. package/dist/src/generators/preset/untyped.mjs +3 -11
  181. package/dist/src/generators/release-version/generator.js +7 -7
  182. package/dist/src/generators/release-version/generator.mjs +6 -6
  183. package/dist/src/generators/release-version/untyped.js +3 -14
  184. package/dist/src/generators/release-version/untyped.mjs +3 -14
  185. package/dist/src/plugins/rust/cargo-toml.js +5 -5
  186. package/dist/src/plugins/rust/cargo-toml.mjs +4 -4
  187. package/dist/src/plugins/rust/index.js +5 -5
  188. package/dist/src/plugins/rust/index.mjs +4 -4
  189. package/dist/src/plugins/typescript/index.js +5 -5
  190. package/dist/src/plugins/typescript/index.mjs +4 -4
  191. package/dist/src/plugins/typescript/project-config.js +5 -5
  192. package/dist/src/plugins/typescript/project-config.mjs +4 -4
  193. package/dist/src/plugins/typescript/tsup.js +114 -109
  194. package/dist/src/plugins/typescript/tsup.mjs +116 -111
  195. package/dist/src/plugins/typescript/untyped-schema.js +93 -77
  196. package/dist/src/plugins/typescript/untyped-schema.mjs +96 -80
  197. package/dist/src/types.js +1 -1
  198. package/dist/src/types.mjs +1 -1
  199. package/dist/src/utils/apply-workspace-tokens.js +5 -5
  200. package/dist/src/utils/apply-workspace-tokens.mjs +4 -4
  201. package/dist/src/utils/cargo.js +3 -3
  202. package/dist/src/utils/cargo.mjs +2 -2
  203. package/dist/src/utils/create-cli-options.js +3 -3
  204. package/dist/src/utils/create-cli-options.mjs +2 -2
  205. package/dist/src/utils/get-project-configurations.js +5 -5
  206. package/dist/src/utils/get-project-configurations.mjs +4 -4
  207. package/dist/src/utils/index.js +15 -15
  208. package/dist/src/utils/index.mjs +14 -14
  209. package/dist/src/utils/lock-file.js +3 -3
  210. package/dist/src/utils/lock-file.mjs +2 -2
  211. package/dist/src/utils/package-helpers.js +5 -5
  212. package/dist/src/utils/package-helpers.mjs +4 -4
  213. package/dist/src/utils/plugin-helpers.js +4 -4
  214. package/dist/src/utils/plugin-helpers.mjs +3 -3
  215. package/dist/src/utils/pnpm-deps-update.js +4 -4
  216. package/dist/src/utils/pnpm-deps-update.mjs +3 -3
  217. package/dist/src/utils/project-tags.js +3 -3
  218. package/dist/src/utils/project-tags.mjs +2 -2
  219. package/dist/src/utils/toml.js +3 -3
  220. package/dist/src/utils/toml.mjs +2 -2
  221. package/dist/src/utils/typia-transform.js +3 -3
  222. package/dist/src/utils/typia-transform.mjs +2 -2
  223. package/dist/src/utils/versions.js +1 -1
  224. package/dist/src/utils/versions.mjs +1 -1
  225. package/package.json +1 -1
  226. package/dist/chunk-3GQAWCBQ.js +0 -13
  227. package/dist/chunk-3IZ3O4OK.js +0 -30
  228. package/dist/chunk-6JJB5AYA.js +0 -51
  229. package/dist/chunk-6JTXR7YX.mjs +0 -18
  230. package/dist/chunk-6RHWGD7G.mjs +0 -48
  231. package/dist/chunk-7AXFMX2T.js +0 -37
  232. package/dist/chunk-A77TLQ44.mjs +0 -32
  233. package/dist/chunk-B3DVFXXD.js +0 -32
  234. package/dist/chunk-BC7L3S46.mjs +0 -51
  235. package/dist/chunk-BNMJYJOZ.mjs +0 -446
  236. package/dist/chunk-CUWWZLK7.mjs +0 -37
  237. package/dist/chunk-HOXPAVCL.js +0 -32
  238. package/dist/chunk-ICPUM2HS.js +0 -50
  239. package/dist/chunk-JJ4PSTY4.mjs +0 -32
  240. package/dist/chunk-JMCJJNBJ.mjs +0 -102
  241. package/dist/chunk-KEBNU3P2.js +0 -446
  242. package/dist/chunk-KTRA4YQT.mjs +0 -32
  243. package/dist/chunk-M2VZ44W7.mjs +0 -13
  244. package/dist/chunk-NG7BO4BF.mjs +0 -468
  245. package/dist/chunk-NSCWEC2S.js +0 -32
  246. package/dist/chunk-OQTJDGUH.js +0 -468
  247. package/dist/chunk-ORWCIVMB.mjs +0 -30
  248. package/dist/chunk-RUKOOSWL.js +0 -31
  249. package/dist/chunk-T6VIUVAL.mjs +0 -43
  250. package/dist/chunk-TET4GF3D.js +0 -43
  251. package/dist/chunk-XITP2BX2.js +0 -13
  252. package/dist/chunk-YMGMEPP5.mjs +0 -86
  253. package/dist/chunk-YW4UN25U.js +0 -86
  254. package/dist/chunk-ZJZOACSR.mjs +0 -31
  255. package/dist/chunk-ZTVHEV5N.mjs +0 -50
@@ -0,0 +1,379 @@
1
+ import {
2
+ cargoMetadata,
3
+ isExternal
4
+ } from "./chunk-QFWQZOVG.mjs";
5
+ import {
6
+ ProjectTagConstants,
7
+ addProjectTag,
8
+ setDefaultProjectTags
9
+ } from "./chunk-F66XEAID.mjs";
10
+
11
+ // src/plugins/rust/cargo-toml.ts
12
+ import {
13
+ createNodesFromFiles,
14
+ joinPathFragments,
15
+ readJsonFile,
16
+ workspaceRoot
17
+ } from "@nx/devkit";
18
+ import { existsSync } from "node:fs";
19
+ import { dirname } from "node:path";
20
+ import {
21
+ DependencyType
22
+ } from "nx/src/config/project-graph";
23
+ var name = "storm-software/rust";
24
+ var description = "Plugin for parsing Cargo.toml files";
25
+ var DefaultCargoPluginProfileMap = {
26
+ development: "dev",
27
+ production: "prod"
28
+ };
29
+ var DEFAULT_ERROR_MESSAGE = "An error occurred in the Storm Rust Nx plugin.";
30
+ var createNodesV2 = [
31
+ "*/**/Cargo.toml",
32
+ async (configFiles, options, context) => {
33
+ return await createNodesFromFiles(
34
+ (configFile, options2, context2) => {
35
+ try {
36
+ console.log(`Processing Cargo.toml file: ${configFile}`);
37
+ const profiles = options2?.profiles ?? {};
38
+ const includeApps = options2?.includeApps ?? true;
39
+ const toolchain = options2?.toolchain;
40
+ const skipDocs = options2?.skipDocs ?? false;
41
+ const metadata = cargoMetadata();
42
+ if (!metadata) {
43
+ return {};
44
+ }
45
+ const { packages: cargoPackages } = metadata;
46
+ const externalNodes = {};
47
+ const projects = {};
48
+ const profs = {
49
+ ...DefaultCargoPluginProfileMap,
50
+ ...profiles
51
+ };
52
+ const configurations = Object.keys(profs).reduce((ret, key) => {
53
+ ret[key] = {
54
+ profile: profs[key]
55
+ };
56
+ return ret;
57
+ }, {});
58
+ const cargoPackageMap = cargoPackages.reduce((acc, p) => {
59
+ if (!acc.has(p.name)) {
60
+ acc.set(p.name, p);
61
+ }
62
+ return acc;
63
+ }, /* @__PURE__ */ new Map());
64
+ for (const cargoPackage of cargoPackages) {
65
+ if (!isExternal(cargoPackage, context2.workspaceRoot)) {
66
+ const root = dirname(configFile);
67
+ const project = {
68
+ root,
69
+ name: cargoPackage.name
70
+ };
71
+ if (existsSync(joinPathFragments(root, "project.json"))) {
72
+ const projectJson = readJsonFile(
73
+ joinPathFragments(root, "project.json")
74
+ );
75
+ if (projectJson) {
76
+ Object.keys(projectJson).forEach((key) => {
77
+ if (!project[key]) {
78
+ project[key] = projectJson[key];
79
+ }
80
+ });
81
+ }
82
+ }
83
+ if (includeApps === false && project.projectType === "application") {
84
+ continue;
85
+ }
86
+ project.targets = {
87
+ "lint-markdown": {
88
+ cache: true,
89
+ outputs: ["{projectRoot}/**/*.md", "{projectRoot}/**/*.mdx"],
90
+ inputs: [
91
+ "linting",
92
+ "{projectRoot}/**/*.md",
93
+ "{projectRoot}/**/*.mdx"
94
+ ],
95
+ dependsOn: ["^lint-markdown"],
96
+ executor: "nx:run-commands",
97
+ options: {
98
+ command: 'pnpm exec markdownlint-cli2 "{projectRoot}/*.{md,mdx}" "{projectRoot}/**/*.{md,mdx}" --config "node_modules/@storm-software/markdownlint/config/base.markdownlint-cli2.jsonc" --fix'
99
+ }
100
+ },
101
+ "lint-ls": {
102
+ cache: true,
103
+ inputs: ["linting", "rust", "^production"],
104
+ dependsOn: ["^lint-ls"],
105
+ options: {
106
+ command: 'pnpm exec ls-lint --config="./node_modules/@storm-software/linting-tools/ls-lint/.ls-lint.yml" ',
107
+ color: true
108
+ }
109
+ },
110
+ lint: {
111
+ cache: true,
112
+ inputs: ["linting", "rust", "^production"],
113
+ dependsOn: ["lint-ls", "lint-markdown", "^lint"],
114
+ executor: "@storm-software/workspace-tools:cargo-clippy",
115
+ options: {
116
+ toolchain,
117
+ fix: false
118
+ },
119
+ defaultConfiguration: "development",
120
+ configurations
121
+ },
122
+ check: {
123
+ cache: true,
124
+ inputs: ["linting", "rust", "^production"],
125
+ dependsOn: ["lint", "^check"],
126
+ executor: "@storm-software/workspace-tools:cargo-check",
127
+ options: {
128
+ toolchain
129
+ },
130
+ defaultConfiguration: "development",
131
+ configurations
132
+ },
133
+ "format-readme": {
134
+ cache: true,
135
+ inputs: [
136
+ "linting",
137
+ "documentation",
138
+ "{projectRoot}/{README.md,package.json,Cargo.toml,executors.json,generators.json}"
139
+ ],
140
+ outputs: ["{projectRoot}/README.md"],
141
+ dependsOn: ["^format-readme"],
142
+ executor: "nx:run-commands",
143
+ options: {
144
+ command: 'pnpm exec storm-git readme --templates="tools/readme-templates" --project="{projectName}"'
145
+ }
146
+ },
147
+ "format-toml": {
148
+ cache: true,
149
+ inputs: ["linting", "{projectRoot}/**/*.toml"],
150
+ outputs: ["{projectRoot}/**/*.toml"],
151
+ dependsOn: ["^format-toml"],
152
+ executor: "nx:run-commands",
153
+ options: {
154
+ 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" '
155
+ }
156
+ },
157
+ "format-clippy": {
158
+ cache: true,
159
+ inputs: ["linting", "rust", "^production"],
160
+ dependsOn: ["^format-clippy"],
161
+ executor: "@storm-software/workspace-tools:cargo-clippy",
162
+ options: {
163
+ toolchain,
164
+ fix: true
165
+ },
166
+ defaultConfiguration: "development",
167
+ configurations
168
+ },
169
+ format: {
170
+ cache: true,
171
+ inputs: ["linting", "documentation", "rust", "^production"],
172
+ dependsOn: [
173
+ "format-readme",
174
+ "format-clippy",
175
+ "format-toml",
176
+ "^format"
177
+ ],
178
+ executor: "@storm-software/workspace-tools:cargo-format",
179
+ options: {
180
+ toolchain,
181
+ fix: true
182
+ },
183
+ defaultConfiguration: "development",
184
+ configurations
185
+ },
186
+ clean: {
187
+ cache: true,
188
+ inputs: ["rust", "^production"],
189
+ outputs: [`{workspaceRoot}/dist/target/{projectRoot}`],
190
+ executor: "nx:run-commands",
191
+ options: {
192
+ command: `pnpm exec rimraf dist/target/crates/${cargoPackage.name}`,
193
+ color: true,
194
+ cwd: "{workspaceRoot}"
195
+ }
196
+ },
197
+ build: {
198
+ cache: true,
199
+ inputs: ["rust", "^production"],
200
+ dependsOn: ["build-base", "^build"],
201
+ executor: "@storm-software/workspace-tools:cargo-build",
202
+ outputs: [`{workspaceRoot}/dist/target/{projectRoot}`],
203
+ options: {
204
+ toolchain
205
+ },
206
+ defaultConfiguration: "development",
207
+ configurations
208
+ },
209
+ rebuild: {
210
+ cache: false,
211
+ inputs: ["rust", "^production"],
212
+ dependsOn: ["clean", "^build"],
213
+ executor: "@storm-software/workspace-tools:cargo-build",
214
+ outputs: [`{workspaceRoot}/dist/target/{projectRoot}`],
215
+ options: {
216
+ toolchain
217
+ },
218
+ defaultConfiguration: "development",
219
+ configurations
220
+ },
221
+ test: {
222
+ cache: true,
223
+ inputs: ["testing", "rust", "^production"],
224
+ dependsOn: ["build", "^test"],
225
+ executor: "@monodon/rust:test",
226
+ outputs: ["{options.target-dir}"],
227
+ options: {
228
+ "target-dir": `{workspaceRoot}/dist/target/{projectRoot}`
229
+ },
230
+ defaultConfiguration: "development",
231
+ configurations
232
+ }
233
+ };
234
+ if (skipDocs != true) {
235
+ project.targets.docs = {
236
+ cache: true,
237
+ inputs: [
238
+ "linting",
239
+ "documentation",
240
+ "default",
241
+ "^production"
242
+ ],
243
+ dependsOn: ["format-readme", "lint-docs", "^docs"],
244
+ outputs: [`{workspaceRoot}/dist/docs/{projectRoot}`],
245
+ executor: "@storm-software/workspace-tools:cargo-doc",
246
+ options: {
247
+ toolchain
248
+ },
249
+ defaultConfiguration: "production",
250
+ configurations
251
+ };
252
+ }
253
+ if (cargoPackage.publish === null || cargoPackage.publish === void 0 || cargoPackage.publish === true || Array.isArray(cargoPackage.publish) && cargoPackage.publish.length > 0) {
254
+ addProjectTag(
255
+ project,
256
+ ProjectTagConstants.Registry.TAG_ID,
257
+ ProjectTagConstants.Registry.CARGO,
258
+ { overwrite: true }
259
+ );
260
+ project.targets["nx-release-publish"] = {
261
+ cache: true,
262
+ inputs: [
263
+ "linting",
264
+ "testing",
265
+ "documentation",
266
+ "rust",
267
+ "^production"
268
+ ],
269
+ dependsOn: ["build", "^nx-release-publish"],
270
+ executor: "@storm-software/workspace-tools:cargo-publish",
271
+ options: {
272
+ packageRoot: root
273
+ },
274
+ defaultConfiguration: "production",
275
+ configurations
276
+ };
277
+ }
278
+ addProjectTag(
279
+ project,
280
+ ProjectTagConstants.Language.TAG_ID,
281
+ ProjectTagConstants.Language.RUST,
282
+ { overwrite: true }
283
+ );
284
+ setDefaultProjectTags(project, name);
285
+ projects[root] = {
286
+ ...project,
287
+ release: {
288
+ ...project.release,
289
+ version: {
290
+ ...project.release?.version,
291
+ generator: "@storm-software/workspace-tools:release-version"
292
+ }
293
+ }
294
+ };
295
+ }
296
+ for (const dep of cargoPackage.dependencies) {
297
+ if (isExternal(dep, context2.workspaceRoot)) {
298
+ const externalDepName = `cargo:${dep.name}`;
299
+ if (!externalNodes?.[externalDepName]) {
300
+ externalNodes[externalDepName] = {
301
+ type: "cargo",
302
+ name: externalDepName,
303
+ data: {
304
+ packageName: dep.name,
305
+ version: cargoPackageMap.get(dep.name)?.version ?? "0.0.0"
306
+ }
307
+ };
308
+ }
309
+ }
310
+ }
311
+ }
312
+ return {
313
+ projects,
314
+ externalNodes
315
+ };
316
+ } catch (e) {
317
+ console.error(DEFAULT_ERROR_MESSAGE);
318
+ console.error(e);
319
+ throw new Error(DEFAULT_ERROR_MESSAGE, { cause: e });
320
+ }
321
+ },
322
+ configFiles,
323
+ options,
324
+ context
325
+ );
326
+ }
327
+ ];
328
+ var createDependencies = (_, context) => {
329
+ const metadata = cargoMetadata();
330
+ if (!metadata) {
331
+ return [];
332
+ }
333
+ const { packages: cargoPackages } = metadata;
334
+ const dependencies = [];
335
+ for (const pkg of cargoPackages) {
336
+ if (context.projects[pkg.name]) {
337
+ console.debug(`Local Cargo package found: ${pkg.name}`);
338
+ for (const deps of pkg.dependencies) {
339
+ if (!cargoPackages.find((p) => p.name === deps.name)) {
340
+ console.debug(
341
+ `Dependency ${deps.name} not found in the cargo metadata.`
342
+ );
343
+ continue;
344
+ }
345
+ if (context.projects[deps.name]) {
346
+ dependencies.push(
347
+ createDependency(pkg, deps.name, DependencyType.static)
348
+ );
349
+ } else {
350
+ const externalDepName = `cargo:${deps.name}`;
351
+ if (externalDepName in (context.externalNodes ?? {})) {
352
+ dependencies.push(
353
+ createDependency(pkg, externalDepName, DependencyType.static)
354
+ );
355
+ }
356
+ }
357
+ }
358
+ }
359
+ }
360
+ return dependencies;
361
+ };
362
+ function createDependency(pkg, depName, type) {
363
+ const target = pkg.manifest_path.replace(/\\/g, "/");
364
+ return {
365
+ type,
366
+ source: pkg.name,
367
+ target: depName,
368
+ sourceFile: target.replace(`${workspaceRoot.replace(/\\/g, "/")}/`, "")
369
+ };
370
+ }
371
+
372
+ export {
373
+ name,
374
+ description,
375
+ DefaultCargoPluginProfileMap,
376
+ DEFAULT_ERROR_MESSAGE,
377
+ createNodesV2,
378
+ createDependencies
379
+ };
@@ -0,0 +1,31 @@
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-check/executor.ts
10
+ async function cargoCheckExecutor(options, context) {
11
+ const command = buildCargoCommand("check", options, context);
12
+ return await cargoCommand(...command);
13
+ }
14
+ var executor_default = withRunExecutor(
15
+ "Cargo Check",
16
+ cargoCheckExecutor,
17
+ {
18
+ skipReadingConfig: false,
19
+ hooks: {
20
+ applyDefaultOptions: (options) => {
21
+ options.toolchain ??= "stable";
22
+ return options;
23
+ }
24
+ }
25
+ }
26
+ );
27
+
28
+ export {
29
+ cargoCheckExecutor,
30
+ executor_default
31
+ };
@@ -1,9 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunkJTAXCQX6js = require('./chunk-JTAXCQX6.js');
4
-
5
-
6
- var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
3
+ var _chunk53DNHF7Bjs = require('./chunk-53DNHF7B.js');
7
4
 
8
5
  // ../config-tools/src/utilities/find-up.ts
9
6
  var _fs = require('fs');
@@ -12,10 +9,14 @@ var MAX_PATH_SEARCH_DEPTH = 30;
12
9
  var depth = 0;
13
10
  function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
14
11
  const _startPath = _nullishCoalesce(startPath, () => ( process.cwd()));
15
- if (endDirectoryNames.some((endDirName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endDirName)))) {
12
+ if (endDirectoryNames.some(
13
+ (endDirName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endDirName))
14
+ )) {
16
15
  return _startPath;
17
16
  }
18
- if (endFileNames.some((endFileName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endFileName)))) {
17
+ if (endFileNames.some(
18
+ (endFileName) => _fs.existsSync.call(void 0, _path.join.call(void 0, _startPath, endFileName))
19
+ )) {
19
20
  return _startPath;
20
21
  }
21
22
  if (_startPath !== "/" && depth++ < MAX_PATH_SEARCH_DEPTH) {
@@ -24,7 +25,6 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
24
25
  }
25
26
  return void 0;
26
27
  }
27
- _chunk3GQAWCBQjs.__name.call(void 0, findFolderUp, "findFolderUp");
28
28
 
29
29
  // ../config-tools/src/utilities/find-workspace-root.ts
30
30
  var rootFiles = [
@@ -71,21 +71,31 @@ var rootDirectories = [
71
71
  ];
72
72
  function findWorkspaceRootSafe(pathInsideMonorepo) {
73
73
  if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
74
- return _chunkJTAXCQX6js.correctPaths.call(void 0, _nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH)));
74
+ return _chunk53DNHF7Bjs.correctPaths.call(void 0,
75
+ _nullishCoalesce(process.env.STORM_WORKSPACE_ROOT, () => ( process.env.NX_WORKSPACE_ROOT_PATH))
76
+ );
75
77
  }
76
- return _chunkJTAXCQX6js.correctPaths.call(void 0, findFolderUp(_nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())), rootFiles, rootDirectories));
78
+ return _chunk53DNHF7Bjs.correctPaths.call(void 0,
79
+ findFolderUp(
80
+ _nullishCoalesce(pathInsideMonorepo, () => ( process.cwd())),
81
+ rootFiles,
82
+ rootDirectories
83
+ )
84
+ );
77
85
  }
78
- _chunk3GQAWCBQjs.__name.call(void 0, findWorkspaceRootSafe, "findWorkspaceRootSafe");
79
86
  function findWorkspaceRoot(pathInsideMonorepo) {
80
87
  const result = findWorkspaceRootSafe(pathInsideMonorepo);
81
88
  if (!result) {
82
- throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
83
- ${rootFiles.join("\n")}
84
- Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
89
+ throw new Error(
90
+ `Cannot find workspace root upwards from known path. Files search list includes:
91
+ ${rootFiles.join(
92
+ "\n"
93
+ )}
94
+ Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`
95
+ );
85
96
  }
86
97
  return result;
87
98
  }
88
- _chunk3GQAWCBQjs.__name.call(void 0, findWorkspaceRoot, "findWorkspaceRoot");
89
99
 
90
100
 
91
101
 
@@ -1,8 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
4
-
5
- // ../config-tools/src/utilities/correct-paths.ts
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// ../config-tools/src/utilities/correct-paths.ts
6
2
  var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
7
3
  function normalizeWindowsPath(input = "") {
8
4
  if (!input) {
@@ -10,11 +6,10 @@ function normalizeWindowsPath(input = "") {
10
6
  }
11
7
  return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
12
8
  }
13
- _chunk3GQAWCBQjs.__name.call(void 0, normalizeWindowsPath, "normalizeWindowsPath");
14
9
  var _UNC_REGEX = /^[/\\]{2}/;
15
10
  var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
16
11
  var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
17
- var correctPaths = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, function(path) {
12
+ var correctPaths = function(path) {
18
13
  if (!path || path.length === 0) {
19
14
  return ".";
20
15
  }
@@ -42,8 +37,8 @@ var correctPaths = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, function
42
37
  return `//${path}`;
43
38
  }
44
39
  return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
45
- }, "correctPaths");
46
- var joinPaths = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, function(...segments) {
40
+ };
41
+ var joinPaths = function(...segments) {
47
42
  let path = "";
48
43
  for (const seg of segments) {
49
44
  if (!seg) {
@@ -63,7 +58,7 @@ var joinPaths = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, function(..
63
58
  }
64
59
  }
65
60
  return correctPaths(path);
66
- }, "joinPaths");
61
+ };
67
62
  function normalizeString(path, allowAboveRoot) {
68
63
  let res = "";
69
64
  let lastSegmentLength = 0;
@@ -124,10 +119,9 @@ function normalizeString(path, allowAboveRoot) {
124
119
  }
125
120
  return res;
126
121
  }
127
- _chunk3GQAWCBQjs.__name.call(void 0, normalizeString, "normalizeString");
128
- var isAbsolute = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, function(p) {
122
+ var isAbsolute = function(p) {
129
123
  return _IS_ABSOLUTE_RE.test(p);
130
- }, "isAbsolute");
124
+ };
131
125
 
132
126
 
133
127
 
@@ -1,9 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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
- var _chunkZMFVKBRMjs = require('./chunk-ZMFVKBRM.js');
4
-
5
-
6
- var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
3
+ var _chunkBWGJVRASjs = require('./chunk-BWGJVRAS.js');
7
4
 
8
5
  // src/executors/cargo-publish/executor.ts
9
6
  var _devkit = require('@nx/devkit');
@@ -16,18 +13,31 @@ async function runExecutor(options, context) {
16
13
  if (!context.projectName) {
17
14
  throw new Error("The executor requires a projectName.");
18
15
  }
19
- console.info(`\u{1F680} Running Storm Cargo Publish executor on the ${context.projectName} crate`);
16
+ console.info(
17
+ `\u{1F680} Running Storm Cargo Publish executor on the ${context.projectName} crate`
18
+ );
20
19
  if (!context.projectName || !_optionalChain([context, 'access', _2 => _2.projectsConfigurations, 'optionalAccess', _3 => _3.projects]) || !context.projectsConfigurations.projects[context.projectName] || !_optionalChain([context, 'access', _4 => _4.projectsConfigurations, 'access', _5 => _5.projects, 'access', _6 => _6[context.projectName], 'optionalAccess', _7 => _7.root])) {
21
20
  throw new Error("The executor requires projectsConfigurations.");
22
21
  }
23
22
  const registry = options.registry ? options.registry : process.env.STORM_REGISTRY_CARGO ? process.env.STORM_REGISTRY_CARGO : "https://crates.io";
24
23
  const root = _optionalChain([context, 'access', _8 => _8.projectsConfigurations, 'access', _9 => _9.projects, 'access', _10 => _10[context.projectName], 'optionalAccess', _11 => _11.root]);
25
- const packageRoot = _devkit.joinPathFragments.call(void 0, context.root, options.packageRoot ? options.packageRoot : root);
26
- const cargoToml = _chunkZMFVKBRMjs.parseCargoToml.call(void 0, _fs.readFileSync.call(void 0, _devkit.joinPathFragments.call(void 0, packageRoot, "Cargo.toml"), "utf-8"));
24
+ const packageRoot = _devkit.joinPathFragments.call(void 0,
25
+ context.root,
26
+ options.packageRoot ? options.packageRoot : root
27
+ );
28
+ const cargoToml = _chunkBWGJVRASjs.parseCargoToml.call(void 0,
29
+ _fs.readFileSync.call(void 0, _devkit.joinPathFragments.call(void 0, packageRoot, "Cargo.toml"), "utf-8")
30
+ );
27
31
  try {
28
- const result = await getRegistryVersion(cargoToml.package.name, cargoToml.package.version, registry);
32
+ const result = await getRegistryVersion(
33
+ cargoToml.package.name,
34
+ cargoToml.package.version,
35
+ registry
36
+ );
29
37
  if (result) {
30
- console.warn(`Skipped package "${cargoToml.package.name}" from project "${context.projectName}" because v${cargoToml.package.version} already exists in ${registry} with tag "latest"`);
38
+ console.warn(
39
+ `Skipped package "${cargoToml.package.name}" from project "${context.projectName}" because v${cargoToml.package.version} already exists in ${registry} with tag "latest"`
40
+ );
31
41
  return {
32
42
  success: true
33
43
  };
@@ -52,11 +62,7 @@ async function runExecutor(options, context) {
52
62
  FORCE_COLOR: "true"
53
63
  },
54
64
  cwd: packageRoot,
55
- stdio: [
56
- "ignore",
57
- "pipe",
58
- "pipe"
59
- ]
65
+ stdio: ["ignore", "pipe", "pipe"]
60
66
  });
61
67
  console.log("");
62
68
  if (isDryRun) {
@@ -76,16 +82,22 @@ async function runExecutor(options, context) {
76
82
  };
77
83
  }
78
84
  }
79
- _chunk3GQAWCBQjs.__name.call(void 0, runExecutor, "runExecutor");
80
- var getRegistryVersion = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (name, version, registry) => {
81
- return new Promise((resolve) => _https2.default.get(`${registry}/api/v1/crates/${encodeURIComponent(name)}/${encodeURIComponent(version)}`, (res) => {
82
- res.on("data", (d) => {
83
- resolve(d);
84
- });
85
- }).on("error", (e) => {
86
- throw e;
87
- }));
88
- }, "getRegistryVersion");
85
+ var getRegistryVersion = (name, version, registry) => {
86
+ return new Promise(
87
+ (resolve) => _https2.default.get(
88
+ `${registry}/api/v1/crates/${encodeURIComponent(name)}/${encodeURIComponent(
89
+ version
90
+ )}`,
91
+ (res) => {
92
+ res.on("data", (d) => {
93
+ resolve(d);
94
+ });
95
+ }
96
+ ).on("error", (e) => {
97
+ throw e;
98
+ })
99
+ );
100
+ };
89
101
 
90
102
 
91
103