@convesoft/nx-rust 0.0.0 → 1.0.0-rc.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.
Files changed (391) hide show
  1. package/LICENSE-APACHE +201 -0
  2. package/LICENSE-MIT +21 -0
  3. package/README.md +47 -1
  4. package/executors.json +35 -0
  5. package/generators.json +19 -0
  6. package/package.json +17 -4
  7. package/src/cargo/build-settings.d.ts +54 -0
  8. package/src/cargo/build-settings.js +93 -0
  9. package/src/cargo/build-settings.js.map +1 -0
  10. package/src/cargo/configured-runner.d.ts +36 -0
  11. package/src/cargo/configured-runner.js +99 -0
  12. package/src/cargo/configured-runner.js.map +1 -0
  13. package/src/cargo/configured-tools.d.ts +35 -0
  14. package/src/cargo/configured-tools.js +46 -0
  15. package/src/cargo/configured-tools.js.map +1 -0
  16. package/src/cargo/dep-info-basedir.d.ts +18 -0
  17. package/src/cargo/dep-info-basedir.js +38 -0
  18. package/src/cargo/dep-info-basedir.js.map +1 -0
  19. package/src/cargo/directories.d.ts +40 -0
  20. package/src/cargo/directories.js +89 -0
  21. package/src/cargo/directories.js.map +1 -0
  22. package/src/cargo/host-triple.d.ts +7 -0
  23. package/src/cargo/host-triple.js +21 -0
  24. package/src/cargo/host-triple.js.map +1 -0
  25. package/src/cargo/lockfile.d.ts +63 -0
  26. package/src/cargo/lockfile.js +157 -0
  27. package/src/cargo/lockfile.js.map +1 -0
  28. package/src/cargo/metadata.d.ts +112 -0
  29. package/src/cargo/metadata.js +37 -0
  30. package/src/cargo/metadata.js.map +1 -0
  31. package/src/cargo/package-specs.d.ts +54 -0
  32. package/src/cargo/package-specs.js +109 -0
  33. package/src/cargo/package-specs.js.map +1 -0
  34. package/src/cargo/paths-crates.d.ts +27 -0
  35. package/src/cargo/paths-crates.js +69 -0
  36. package/src/cargo/paths-crates.js.map +1 -0
  37. package/src/cargo/print-artifact-folders.d.ts +1 -0
  38. package/src/cargo/print-artifact-folders.js +58 -0
  39. package/src/cargo/print-artifact-folders.js.map +1 -0
  40. package/src/cargo/redirections.d.ts +87 -0
  41. package/src/cargo/redirections.js +195 -0
  42. package/src/cargo/redirections.js.map +1 -0
  43. package/src/cargo/run-cargo.d.ts +31 -0
  44. package/src/cargo/run-cargo.js +75 -0
  45. package/src/cargo/run-cargo.js.map +1 -0
  46. package/src/cargo/target-triples.d.ts +98 -0
  47. package/src/cargo/target-triples.js +265 -0
  48. package/src/cargo/target-triples.js.map +1 -0
  49. package/src/cargo/version-req.d.ts +12 -0
  50. package/src/cargo/version-req.js +122 -0
  51. package/src/cargo/version-req.js.map +1 -0
  52. package/src/compatibility/cargo-version.d.ts +43 -0
  53. package/src/compatibility/cargo-version.js +83 -0
  54. package/src/compatibility/cargo-version.js.map +1 -0
  55. package/src/compatibility/nx-bridge.d.ts +312 -0
  56. package/src/compatibility/nx-bridge.js +407 -0
  57. package/src/compatibility/nx-bridge.js.map +1 -0
  58. package/src/compatibility/nx-version.d.ts +104 -0
  59. package/src/compatibility/nx-version.js +272 -0
  60. package/src/compatibility/nx-version.js.map +1 -0
  61. package/src/executors/affected-inputs.d.ts +29 -0
  62. package/src/executors/affected-inputs.js +259 -0
  63. package/src/executors/affected-inputs.js.map +1 -0
  64. package/src/executors/affected-run.d.ts +54 -0
  65. package/src/executors/affected-run.js +394 -0
  66. package/src/executors/affected-run.js.map +1 -0
  67. package/src/executors/affected.d.ts +239 -0
  68. package/src/executors/affected.js +589 -0
  69. package/src/executors/affected.js.map +1 -0
  70. package/src/executors/baseline-context.d.ts +85 -0
  71. package/src/executors/baseline-context.js +227 -0
  72. package/src/executors/baseline-context.js.map +1 -0
  73. package/src/executors/baseline.d.ts +123 -0
  74. package/src/executors/baseline.js +356 -0
  75. package/src/executors/baseline.js.map +1 -0
  76. package/src/executors/batch.d.ts +75 -0
  77. package/src/executors/batch.js +434 -0
  78. package/src/executors/batch.js.map +1 -0
  79. package/src/executors/build-records.d.ts +110 -0
  80. package/src/executors/build-records.js +267 -0
  81. package/src/executors/build-records.js.map +1 -0
  82. package/src/executors/cargo/executor.d.ts +28 -0
  83. package/src/executors/cargo/executor.js +58 -0
  84. package/src/executors/cargo/executor.js.map +1 -0
  85. package/src/executors/cargo/schema.json +54 -0
  86. package/src/executors/cargo-invocation.d.ts +81 -0
  87. package/src/executors/cargo-invocation.js +109 -0
  88. package/src/executors/cargo-invocation.js.map +1 -0
  89. package/src/executors/cargo-output.d.ts +212 -0
  90. package/src/executors/cargo-output.js +646 -0
  91. package/src/executors/cargo-output.js.map +1 -0
  92. package/src/executors/command.d.ts +318 -0
  93. package/src/executors/command.js +517 -0
  94. package/src/executors/command.js.map +1 -0
  95. package/src/executors/coverage-baseline.d.ts +23 -0
  96. package/src/executors/coverage-baseline.js +284 -0
  97. package/src/executors/coverage-baseline.js.map +1 -0
  98. package/src/executors/declared-options.d.ts +21 -0
  99. package/src/executors/declared-options.js +58 -0
  100. package/src/executors/declared-options.js.map +1 -0
  101. package/src/executors/digests.d.ts +94 -0
  102. package/src/executors/digests.js +190 -0
  103. package/src/executors/digests.js.map +1 -0
  104. package/src/executors/dotenv-check.d.ts +79 -0
  105. package/src/executors/dotenv-check.js +553 -0
  106. package/src/executors/dotenv-check.js.map +1 -0
  107. package/src/executors/group-invocations.d.ts +80 -0
  108. package/src/executors/group-invocations.js +253 -0
  109. package/src/executors/group-invocations.js.map +1 -0
  110. package/src/executors/group-run.d.ts +114 -0
  111. package/src/executors/group-run.js +591 -0
  112. package/src/executors/group-run.js.map +1 -0
  113. package/src/executors/groups.d.ts +113 -0
  114. package/src/executors/groups.js +285 -0
  115. package/src/executors/groups.js.map +1 -0
  116. package/src/executors/input-check.d.ts +52 -0
  117. package/src/executors/input-check.js +271 -0
  118. package/src/executors/input-check.js.map +1 -0
  119. package/src/executors/kept-files.d.ts +98 -0
  120. package/src/executors/kept-files.js +341 -0
  121. package/src/executors/kept-files.js.map +1 -0
  122. package/src/executors/lockfile/executor.d.ts +16 -0
  123. package/src/executors/lockfile/executor.js +37 -0
  124. package/src/executors/lockfile/executor.js.map +1 -0
  125. package/src/executors/lockfile/schema.json +50 -0
  126. package/src/executors/napi-build.d.ts +73 -0
  127. package/src/executors/napi-build.js +420 -0
  128. package/src/executors/napi-build.js.map +1 -0
  129. package/src/executors/nextest.d.ts +185 -0
  130. package/src/executors/nextest.js +498 -0
  131. package/src/executors/nextest.js.map +1 -0
  132. package/src/executors/nx-command.d.ts +95 -0
  133. package/src/executors/nx-command.js +205 -0
  134. package/src/executors/nx-command.js.map +1 -0
  135. package/src/executors/nx-task-files.d.ts +82 -0
  136. package/src/executors/nx-task-files.js +156 -0
  137. package/src/executors/nx-task-files.js.map +1 -0
  138. package/src/executors/print-test-mode.d.ts +1 -0
  139. package/src/executors/print-test-mode.js +25 -0
  140. package/src/executors/print-test-mode.js.map +1 -0
  141. package/src/executors/release-publish/executor.d.ts +24 -0
  142. package/src/executors/release-publish/executor.js +165 -0
  143. package/src/executors/release-publish/executor.js.map +1 -0
  144. package/src/executors/release-publish/schema.json +30 -0
  145. package/src/executors/run/executor.d.ts +12 -0
  146. package/src/executors/run/executor.js +27 -0
  147. package/src/executors/run/executor.js.map +1 -0
  148. package/src/executors/run/schema.json +45 -0
  149. package/src/executors/runner-script.d.ts +12 -0
  150. package/src/executors/runner-script.js +22 -0
  151. package/src/executors/runner-script.js.map +1 -0
  152. package/src/executors/runtime-input-check.d.ts +24 -0
  153. package/src/executors/runtime-input-check.js +87 -0
  154. package/src/executors/runtime-input-check.js.map +1 -0
  155. package/src/executors/shared-artifacts.d.ts +44 -0
  156. package/src/executors/shared-artifacts.js +132 -0
  157. package/src/executors/shared-artifacts.js.map +1 -0
  158. package/src/executors/split-words.d.ts +24 -0
  159. package/src/executors/split-words.js +111 -0
  160. package/src/executors/split-words.js.map +1 -0
  161. package/src/executors/stage.d.ts +163 -0
  162. package/src/executors/stage.js +526 -0
  163. package/src/executors/stage.js.map +1 -0
  164. package/src/executors/staged-run.d.ts +24 -0
  165. package/src/executors/staged-run.js +110 -0
  166. package/src/executors/staged-run.js.map +1 -0
  167. package/src/executors/task-env.d.ts +271 -0
  168. package/src/executors/task-env.js +494 -0
  169. package/src/executors/task-env.js.map +1 -0
  170. package/src/executors/task-execution.d.ts +61 -0
  171. package/src/executors/task-execution.js +122 -0
  172. package/src/executors/task-execution.js.map +1 -0
  173. package/src/executors/task-guards.d.ts +112 -0
  174. package/src/executors/task-guards.js +430 -0
  175. package/src/executors/task-guards.js.map +1 -0
  176. package/src/executors/task-options.d.ts +114 -0
  177. package/src/executors/task-options.js +258 -0
  178. package/src/executors/task-options.js.map +1 -0
  179. package/src/executors/task.d.ts +166 -0
  180. package/src/executors/task.js +520 -0
  181. package/src/executors/task.js.map +1 -0
  182. package/src/executors/test-mode.d.ts +182 -0
  183. package/src/executors/test-mode.js +391 -0
  184. package/src/executors/test-mode.js.map +1 -0
  185. package/src/executors/test-runner.d.ts +44 -0
  186. package/src/executors/test-runner.js +159 -0
  187. package/src/executors/test-runner.js.map +1 -0
  188. package/src/executors/test-steps.d.ts +109 -0
  189. package/src/executors/test-steps.js +535 -0
  190. package/src/executors/test-steps.js.map +1 -0
  191. package/src/executors/wasm-build.d.ts +56 -0
  192. package/src/executors/wasm-build.js +216 -0
  193. package/src/executors/wasm-build.js.map +1 -0
  194. package/src/generators/crate/binary.schema.json +28 -0
  195. package/src/generators/crate/crate.d.ts +24 -0
  196. package/src/generators/crate/crate.js +108 -0
  197. package/src/generators/crate/crate.js.map +1 -0
  198. package/src/generators/crate/enclosing-workspace.d.ts +25 -0
  199. package/src/generators/crate/enclosing-workspace.js +58 -0
  200. package/src/generators/crate/enclosing-workspace.js.map +1 -0
  201. package/src/generators/crate/library.schema.json +28 -0
  202. package/src/generators/init/graph-check.d.ts +81 -0
  203. package/src/generators/init/graph-check.js +299 -0
  204. package/src/generators/init/graph-check.js.map +1 -0
  205. package/src/generators/init/init.d.ts +23 -0
  206. package/src/generators/init/init.js +113 -0
  207. package/src/generators/init/init.js.map +1 -0
  208. package/src/generators/init/report.d.ts +19 -0
  209. package/src/generators/init/report.js +93 -0
  210. package/src/generators/init/report.js.map +1 -0
  211. package/src/generators/init/schema.json +9 -0
  212. package/src/graph/artifact-kinds.d.ts +29 -0
  213. package/src/graph/artifact-kinds.js +50 -0
  214. package/src/graph/artifact-kinds.js.map +1 -0
  215. package/src/graph/artifact-names.d.ts +97 -0
  216. package/src/graph/artifact-names.js +276 -0
  217. package/src/graph/artifact-names.js.map +1 -0
  218. package/src/graph/build-records.d.ts +74 -0
  219. package/src/graph/build-records.js +104 -0
  220. package/src/graph/build-records.js.map +1 -0
  221. package/src/graph/caching.d.ts +148 -0
  222. package/src/graph/caching.js +676 -0
  223. package/src/graph/caching.js.map +1 -0
  224. package/src/graph/collisions.d.ts +106 -0
  225. package/src/graph/collisions.js +156 -0
  226. package/src/graph/collisions.js.map +1 -0
  227. package/src/graph/computation-reports.d.ts +89 -0
  228. package/src/graph/computation-reports.js +216 -0
  229. package/src/graph/computation-reports.js.map +1 -0
  230. package/src/graph/declared-files.d.ts +190 -0
  231. package/src/graph/declared-files.js +600 -0
  232. package/src/graph/declared-files.js.map +1 -0
  233. package/src/graph/discovery.d.ts +175 -0
  234. package/src/graph/discovery.js +656 -0
  235. package/src/graph/discovery.js.map +1 -0
  236. package/src/graph/edges.d.ts +25 -0
  237. package/src/graph/edges.js +94 -0
  238. package/src/graph/edges.js.map +1 -0
  239. package/src/graph/entries.d.ts +83 -0
  240. package/src/graph/entries.js +259 -0
  241. package/src/graph/entries.js.map +1 -0
  242. package/src/graph/inputs.d.ts +420 -0
  243. package/src/graph/inputs.js +746 -0
  244. package/src/graph/inputs.js.map +1 -0
  245. package/src/graph/lockfile-task.d.ts +74 -0
  246. package/src/graph/lockfile-task.js +105 -0
  247. package/src/graph/lockfile-task.js.map +1 -0
  248. package/src/graph/names.d.ts +41 -0
  249. package/src/graph/names.js +34 -0
  250. package/src/graph/names.js.map +1 -0
  251. package/src/graph/napi.d.ts +107 -0
  252. package/src/graph/napi.js +206 -0
  253. package/src/graph/napi.js.map +1 -0
  254. package/src/graph/nx-glob.d.ts +36 -0
  255. package/src/graph/nx-glob.js +152 -0
  256. package/src/graph/nx-glob.js.map +1 -0
  257. package/src/graph/nx-internals.d.ts +57 -0
  258. package/src/graph/nx-internals.js +128 -0
  259. package/src/graph/nx-internals.js.map +1 -0
  260. package/src/graph/options.d.ts +32 -0
  261. package/src/graph/options.js +80 -0
  262. package/src/graph/options.js.map +1 -0
  263. package/src/graph/outputs.d.ts +75 -0
  264. package/src/graph/outputs.js +140 -0
  265. package/src/graph/outputs.js.map +1 -0
  266. package/src/graph/path-dependencies.d.ts +122 -0
  267. package/src/graph/path-dependencies.js +459 -0
  268. package/src/graph/path-dependencies.js.map +1 -0
  269. package/src/graph/plugin-package.d.ts +36 -0
  270. package/src/graph/plugin-package.js +132 -0
  271. package/src/graph/plugin-package.js.map +1 -0
  272. package/src/graph/plugin-version.d.ts +20 -0
  273. package/src/graph/plugin-version.js +153 -0
  274. package/src/graph/plugin-version.js.map +1 -0
  275. package/src/graph/projects.d.ts +141 -0
  276. package/src/graph/projects.js +182 -0
  277. package/src/graph/projects.js.map +1 -0
  278. package/src/graph/reached-projects.d.ts +46 -0
  279. package/src/graph/reached-projects.js +102 -0
  280. package/src/graph/reached-projects.js.map +1 -0
  281. package/src/graph/real-path.d.ts +47 -0
  282. package/src/graph/real-path.js +113 -0
  283. package/src/graph/real-path.js.map +1 -0
  284. package/src/graph/redirected-uses.d.ts +98 -0
  285. package/src/graph/redirected-uses.js +434 -0
  286. package/src/graph/redirected-uses.js.map +1 -0
  287. package/src/graph/registration.d.ts +121 -0
  288. package/src/graph/registration.js +233 -0
  289. package/src/graph/registration.js.map +1 -0
  290. package/src/graph/script-input.d.ts +46 -0
  291. package/src/graph/script-input.js +65 -0
  292. package/src/graph/script-input.js.map +1 -0
  293. package/src/graph/settings.d.ts +178 -0
  294. package/src/graph/settings.js +479 -0
  295. package/src/graph/settings.js.map +1 -0
  296. package/src/graph/target-defaults-causes.d.ts +33 -0
  297. package/src/graph/target-defaults-causes.js +202 -0
  298. package/src/graph/target-defaults-causes.js.map +1 -0
  299. package/src/graph/target-defaults-layers.d.ts +186 -0
  300. package/src/graph/target-defaults-layers.js +420 -0
  301. package/src/graph/target-defaults-layers.js.map +1 -0
  302. package/src/graph/target-defaults-meaning.d.ts +95 -0
  303. package/src/graph/target-defaults-meaning.js +292 -0
  304. package/src/graph/target-defaults-meaning.js.map +1 -0
  305. package/src/graph/target-defaults-report.d.ts +77 -0
  306. package/src/graph/target-defaults-report.js +242 -0
  307. package/src/graph/target-defaults-report.js.map +1 -0
  308. package/src/graph/target-defaults.d.ts +79 -0
  309. package/src/graph/target-defaults.js +425 -0
  310. package/src/graph/target-defaults.js.map +1 -0
  311. package/src/graph/target-fields.d.ts +16 -0
  312. package/src/graph/target-fields.js +134 -0
  313. package/src/graph/target-fields.js.map +1 -0
  314. package/src/graph/target-tables.d.ts +45 -0
  315. package/src/graph/target-tables.js +299 -0
  316. package/src/graph/target-tables.js.map +1 -0
  317. package/src/graph/targets.d.ts +367 -0
  318. package/src/graph/targets.js +404 -0
  319. package/src/graph/targets.js.map +1 -0
  320. package/src/graph/unification.d.ts +141 -0
  321. package/src/graph/unification.js +459 -0
  322. package/src/graph/unification.js.map +1 -0
  323. package/src/graph/unignored-directories.d.ts +25 -0
  324. package/src/graph/unignored-directories.js +89 -0
  325. package/src/graph/unignored-directories.js.map +1 -0
  326. package/src/graph/visibility.d.ts +17 -0
  327. package/src/graph/visibility.js +67 -0
  328. package/src/graph/visibility.js.map +1 -0
  329. package/src/graph/warnings.d.ts +38 -0
  330. package/src/graph/warnings.js +77 -0
  331. package/src/graph/warnings.js.map +1 -0
  332. package/src/graph/wasm.d.ts +56 -0
  333. package/src/graph/wasm.js +77 -0
  334. package/src/graph/wasm.js.map +1 -0
  335. package/src/index.d.ts +68 -0
  336. package/src/index.js +109 -0
  337. package/src/index.js.map +1 -0
  338. package/src/release/manifests.d.ts +95 -0
  339. package/src/release/manifests.js +164 -0
  340. package/src/release/manifests.js.map +1 -0
  341. package/src/release/places.d.ts +127 -0
  342. package/src/release/places.js +368 -0
  343. package/src/release/places.js.map +1 -0
  344. package/src/release/publish-cargo.d.ts +177 -0
  345. package/src/release/publish-cargo.js +351 -0
  346. package/src/release/publish-cargo.js.map +1 -0
  347. package/src/release/publish-crates.d.ts +124 -0
  348. package/src/release/publish-crates.js +242 -0
  349. package/src/release/publish-crates.js.map +1 -0
  350. package/src/release/publish-environments.d.ts +50 -0
  351. package/src/release/publish-environments.js +284 -0
  352. package/src/release/publish-environments.js.map +1 -0
  353. package/src/release/publish-messages.d.ts +66 -0
  354. package/src/release/publish-messages.js +273 -0
  355. package/src/release/publish-messages.js.map +1 -0
  356. package/src/release/publish-registry.d.ts +27 -0
  357. package/src/release/publish-registry.js +135 -0
  358. package/src/release/publish-registry.js.map +1 -0
  359. package/src/release/publish-settings.d.ts +26 -0
  360. package/src/release/publish-settings.js +56 -0
  361. package/src/release/publish-settings.js.map +1 -0
  362. package/src/release/publish.d.ts +59 -0
  363. package/src/release/publish.js +620 -0
  364. package/src/release/publish.js.map +1 -0
  365. package/src/release/repository.d.ts +73 -0
  366. package/src/release/repository.js +219 -0
  367. package/src/release/repository.js.map +1 -0
  368. package/src/release/requirements.d.ts +34 -0
  369. package/src/release/requirements.js +30 -0
  370. package/src/release/requirements.js.map +1 -0
  371. package/src/release/toml-edit.d.ts +67 -0
  372. package/src/release/toml-edit.js +453 -0
  373. package/src/release/toml-edit.js.map +1 -0
  374. package/src/release/version-actions.d.ts +133 -0
  375. package/src/release/version-actions.js +474 -0
  376. package/src/release/version-actions.js.map +1 -0
  377. package/src/release/version-checks.d.ts +21 -0
  378. package/src/release/version-checks.js +151 -0
  379. package/src/release/version-checks.js.map +1 -0
  380. package/src/release/version-lockfiles.d.ts +61 -0
  381. package/src/release/version-lockfiles.js +222 -0
  382. package/src/release/version-lockfiles.js.map +1 -0
  383. package/src/tools/napi-cli.d.ts +70 -0
  384. package/src/tools/napi-cli.js +63 -0
  385. package/src/tools/napi-cli.js.map +1 -0
  386. package/src/tools/optional-tools.d.ts +121 -0
  387. package/src/tools/optional-tools.js +303 -0
  388. package/src/tools/optional-tools.js.map +1 -0
  389. package/src/tools/print-napi-cli.d.ts +1 -0
  390. package/src/tools/print-napi-cli.js +24 -0
  391. package/src/tools/print-napi-cli.js.map +1 -0
@@ -0,0 +1,190 @@
1
+ import type { CreateDependenciesContext } from "@nx/devkit";
2
+ import { CargoDiscovery, CargoWorkspace } from "./discovery";
3
+ import type { InputDefinition } from "./inputs";
4
+ import { SegmentMatcher } from "./nx-glob";
5
+ import type { FileInput } from "./settings";
6
+ /** What a project's `fileInputs` give: the filesets for its key, or why graph creation stops. */
7
+ export interface DeclaredFiles {
8
+ /**
9
+ * The filesets for the patterns, with `includeIgnored`, in the order of
10
+ * the patterns and of the alternatives of their braces: for each, those of
11
+ * the links it passes, the one for its real path, with the one for
12
+ * everything below it where it names a folder, and those for the folders
13
+ * of the plugin's projects below where it starts.
14
+ */
15
+ filesets: InputDefinition[];
16
+ /** The problems of `DES-DIAGNOSTICS` that the patterns have; graph creation stops on any. */
17
+ problems: string[];
18
+ /** The patterns that gave filesets, as resolved, for {@link failOnUncoveredProjectFolders}. */
19
+ patterns: DeclaredPattern[];
20
+ }
21
+ /**
22
+ * One alternative of a `fileInputs` pattern as graph creation resolved it,
23
+ * kept for the check that `createDependencies` makes with the projects of
24
+ * every plugin ({@link failOnUncoveredProjectFolders}).
25
+ */
26
+ export interface DeclaredPattern {
27
+ /** The pattern as written, with its manifest. */
28
+ input: FileInput;
29
+ /** The alternative of the pattern's braces, the pattern itself where it has none. */
30
+ alternative: string;
31
+ /** The real name of the crate whose key the pattern goes into. */
32
+ crate: string;
33
+ /** The real path of the folder of the manifest, relative to the repository root. */
34
+ manifestFolder: string;
35
+ /**
36
+ * The folder that Nx reads the alternative from, relative to the
37
+ * repository root, `""` for the root itself: the real path of its fixed
38
+ * part, with the segments after it that Nx reads as names.
39
+ */
40
+ folder: string;
41
+ /** The rest of the alternative after {@link folder}, `""` where it has none. */
42
+ glob: string;
43
+ /** Whether it names folders, and thereby everything below them ({@link namesFolders}). */
44
+ namesFolders: boolean;
45
+ /** Whether the plugin cannot read it, so that it takes it to name everything below its folder. */
46
+ unread: boolean;
47
+ /** Every fileset that the crate's patterns give, this one's among them. */
48
+ crateFilesets: readonly string[];
49
+ }
50
+ /** Who a crate's patterns are for, and which projects the plugin creates. */
51
+ export interface DeclaredScope {
52
+ /** The real name of the crate whose key the patterns go into. */
53
+ crate: string;
54
+ /**
55
+ * The folders of the projects that this entry of the plugin creates,
56
+ * relative to the repository root ({@link pluginProjectRoots}).
57
+ */
58
+ projectRoots: readonly string[];
59
+ /**
60
+ * The build and artifact directories of the workspaces that the plugin
61
+ * knows, inside the repository ({@link knownCargoDirectories}); by default
62
+ * those of the crate's workspace.
63
+ */
64
+ cargoDirectories?: readonly string[];
65
+ /**
66
+ * How a segment of a pattern is matched against a folder's name; by
67
+ * default as Nx matches it ({@link nxSegmentMatcher}).
68
+ */
69
+ matches?: SegmentMatcher;
70
+ }
71
+ /**
72
+ * Turns the `fileInputs` patterns of a crate's tables into the filesets of
73
+ * `DES-INPUTS` ("Declared files"): each pattern resolved against the folder
74
+ * of the manifest that holds it, as `{workspaceRoot}/<path>` with
75
+ * `includeIgnored`, so that Nx hashes a declared file that Git ignores.
76
+ *
77
+ * Nx fails the hash of every task whose `includeIgnored` fileset has a `.`
78
+ * or `..` segment, so the pattern's fixed part, its segments before the
79
+ * first one with a glob character, is resolved here as the system resolves
80
+ * it, the symbolic links in it included. Nx keeps the hash of a link to a
81
+ * file until the link itself changes, and matches changed files by their
82
+ * own paths (`EVD-NX-24-FILE-INPUTS`). The pattern therefore gives a
83
+ * fileset for each link that its fixed part passes, at the path where the
84
+ * link itself lies, so that a change to the link is seen, and one for the
85
+ * real path with the rest of the pattern, so that a change to what the
86
+ * links lead to is seen. A link that only the glob part reaches stays as it
87
+ * is.
88
+ *
89
+ * Each alternative of the pattern's braces counts as a pattern of its own
90
+ * from here on, as Nx reads a fileset whose braces hold names, also for the
91
+ * braces that Nx leaves to its glob: each gets its own fixed part, links and
92
+ * filesets (`DES-INPUTS`, "Patterns over project folders"). A pattern that
93
+ * names folders counts everything below them ({@link namesFolders}): Nx does
94
+ * so for a path without a glob, and for a glob the pattern also gives the
95
+ * fileset with `/**` after it.
96
+ *
97
+ * Nx matches an `includeIgnored` fileset only against the files of the
98
+ * deepest project whose folder holds the folder it is read from, and not
99
+ * against those of a project in a folder below it; one that no project's
100
+ * folder holds, other than the repository root's, against every file
101
+ * (`EVD-NX-24-FILESET-SCOPE`). For each folder of a project of `scope` below
102
+ * that folder, the pattern therefore also gives a fileset that starts in
103
+ * that folder and names the files below it that the pattern names, matched
104
+ * as Nx matches them ({@link patternsBelow}), so that Nx counts them for the
105
+ * project that holds them. Projects of other plugins and entries are checked
106
+ * in `createDependencies` ({@link failOnUncoveredProjectFolders}). None of
107
+ * this depends on which files exist.
108
+ *
109
+ * Each of these is a problem that names the manifest and the pattern
110
+ * (`REQ-FILE-INPUTS-HASHABLE`): a `..` after a glob character, which could
111
+ * lead anywhere and fails Nx's hash; a real path outside the repository, or
112
+ * a link outside it that the fixed part passes; and a real path in the
113
+ * build or artifact directory of the crate's workspace. Nx hashes no file
114
+ * that a fileset names by a path that leaves the repository, and
115
+ * `nx affected` sees no change to a file outside it, so the message for
116
+ * such a pattern points to `runtimeInputs`.
117
+ *
118
+ * @param fileInputs The patterns of both tables, each with its manifest relative to the repository root.
119
+ * @param workspace The crate's workspace, whose Cargo directories no pattern may point into.
120
+ * @param repositoryRoot The absolute path of the repository root.
121
+ * @param scope The crate and the folders of the projects of the plugin's entry.
122
+ */
123
+ export declare function declaredFiles(fileInputs: readonly FileInput[], workspace: Pick<CargoWorkspace, "root" | "report">, repositoryRoot: string, scope: DeclaredScope): DeclaredFiles;
124
+ /**
125
+ * The build and artifact directories of every workspace that `discovery`
126
+ * reports, those of the crates without a project included, that lie inside
127
+ * the repository, as real paths relative to its root.
128
+ */
129
+ export declare function knownCargoDirectories(discovery: Pick<CargoDiscovery, "workspaceRoot" | "workspaces" | "pathDependencyReports">): string[];
130
+ /**
131
+ * Whether a pattern names folders, so that it counts everything below them:
132
+ * where it ends in `/`, or its last segment is a name, which may be a
133
+ * folder's as well as a file's. A pattern whose last segment is a glob, such
134
+ * as `*` or `*.proto`, names files only, as Nx reads it.
135
+ */
136
+ export declare function namesFolders(pattern: string): boolean;
137
+ /**
138
+ * The folders of the projects that the plugin's entry creates for the
139
+ * workspaces of `discovery`, relative to the repository root, without the
140
+ * root itself: each member's folder, and the folder of each root manifest
141
+ * that Nx hands to the plugin (`inferProjects` in `projects.ts`).
142
+ */
143
+ export declare function pluginProjectRoots(discovery: Pick<CargoDiscovery, "workspaceRoot" | "workspaces">): string[];
144
+ /**
145
+ * Fails when a `fileInputs` pattern names files in the folder of a project
146
+ * that none of its crate's filesets covers, once Nx has merged the projects
147
+ * of every plugin and entry.
148
+ *
149
+ * Nx matches an `includeIgnored` fileset only against the files of the
150
+ * deepest project whose folder holds the folder that the fileset is read
151
+ * from, and leaves out the projects in folders below it
152
+ * (`EVD-NX-24-FILESET-SCOPE`). `declaredFiles` adds a fileset for each folder
153
+ * of the entry's own projects there, but projects that other plugins or
154
+ * entries create are known only here. For each project in a folder below
155
+ * the fixed part of a pattern that a project's folder holds, the files that
156
+ * the pattern names there count only where the crate's filesets hold the
157
+ * fileset that `declaredFiles` would give that folder, or one for the whole
158
+ * folder, as a pattern that the repository adds does. Otherwise the message
159
+ * gives that fileset as a pattern relative to the manifest. Each alternative
160
+ * of a pattern's braces is checked on its own, and its segments are matched
161
+ * against the folders' names as Nx matches them, so that a folder that the
162
+ * pattern does not reach fails nothing.
163
+ *
164
+ * @param patterns The patterns of the entry's projects and of the crates
165
+ * whose folders their inputs name ({@link DeclaredFiles.patterns}).
166
+ * @param projects The merged projects that `createDependencies` receives.
167
+ * @param matches How a segment is matched against a folder's name ({@link nxSegmentMatcher}).
168
+ * @throws {Error} Naming the manifest, the pattern, its crates and the
169
+ * project for each folder, with the patterns that would cover it.
170
+ */
171
+ export declare function failOnUncoveredProjectFolders(patterns: readonly DeclaredPattern[], projects: CreateDependenciesContext["projects"], matches: SegmentMatcher): void;
172
+ /**
173
+ * The patterns, relative to a folder below the one that a pattern starts in,
174
+ * for the files below that folder that the rest of the pattern names: `**`
175
+ * where the pattern names everything below it, as a pattern without a glob,
176
+ * or one that names folders and names that folder or one above it, does;
177
+ * none where it names nothing there.
178
+ *
179
+ * The rest has no braces left ({@link braceAlternatives}). Its segments are
180
+ * matched against the names of the folders in between with `matches`, a
181
+ * `**` standing for any number of them.
182
+ *
183
+ * @param glob The rest of the pattern after the folder it starts in, `""` for none.
184
+ * @param names The names of the folders from that folder down to the folder below it.
185
+ * @param options Whether the pattern names folders ({@link namesFolders}), and how a segment is matched.
186
+ */
187
+ export declare function patternsBelow(glob: string, names: readonly string[], options: {
188
+ folders: boolean;
189
+ matches: SegmentMatcher;
190
+ }): string[];