@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,110 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runTargetGroup = runTargetGroup;
4
+ exports.stageMessage = stageMessage;
5
+ const tslib_1 = require("tslib");
6
+ const directories_1 = require("../cargo/directories");
7
+ const real_path_1 = require("../graph/real-path");
8
+ const group_run_1 = require("./group-run");
9
+ const napi_build_1 = require("./napi-build");
10
+ const stage_1 = require("./stage");
11
+ const wasm_build_1 = require("./wasm-build");
12
+ /**
13
+ * Runs a group of tasks with the runner of its target, in a batch or as a
14
+ * task run on its own: `runNapiGroup` for `napi-build`, `runWasmGroup` for
15
+ * `wasm-build` and `runGroup` for every other target (`DES-NAPI`,
16
+ * `DES-WASM`). A whole-workspace `build` and every compile of `napi-build`
17
+ * and `wasm-build` build in a stage of their own (`DES-BATCH`, "Staged
18
+ * builds"): a `build` moves its own crates' final artifacts and records out
19
+ * of it right after cargo, before the checks that read them, and a
20
+ * `napi-build` or `wasm-build` post-processes and checks from the stage. The
21
+ * stage is removed once the group is done, whatever happened. Where the
22
+ * stage cannot be made, every task fails before cargo; where a file of a
23
+ * task's crate cannot be moved, the task fails.
24
+ *
25
+ * @returns One result per member, in order.
26
+ */
27
+ // @mara implements DES-BATCH
28
+ function runTargetGroup(members_1, selection_1, verbose_1) {
29
+ return tslib_1.__awaiter(this, arguments, void 0, function* (members, selection, verbose, live = "none") {
30
+ var _a, _b, _c;
31
+ const [first] = members;
32
+ const target = first === null || first === void 0 ? void 0 : first.prepared.target;
33
+ if (first === undefined || !(0, stage_1.stagesCommand)(target, selection)) {
34
+ return runner(target)(members, verbose, live);
35
+ }
36
+ let stage;
37
+ try {
38
+ stage = (0, stage_1.createStage)((_c = (_b = (_a = first.invocation.inputCheck) === null || _a === void 0 ? void 0 : _a.directories) !== null && _b !== void 0 ? _b : first.invocation.directories) !== null && _c !== void 0 ? _c : physicalDirectories(first.invocation.cwd, first.prepared.env));
39
+ }
40
+ catch (error) {
41
+ if (!(error instanceof stage_1.StageError) && !(error instanceof directories_1.DirectoryReportError)) {
42
+ throw error;
43
+ }
44
+ return members.map((member) => ({
45
+ success: false,
46
+ output: stageMessage(member.prepared.task, [error.message]),
47
+ }));
48
+ }
49
+ const staged = members.map((member) => (Object.assign(Object.assign({}, member), { invocation: (0, stage_1.withStage)(member.invocation, stage, target !== "build") })));
50
+ // A `build` moves its own crates' files right after cargo, inside the
51
+ // step, so that the checks after cargo read them where they belong.
52
+ const moveProblems = new Map();
53
+ const packageIds = new Set(staged.flatMap((member) => member.invocation.package === undefined ? [] : [member.invocation.package.id]));
54
+ const observe = target !== "build"
55
+ ? undefined
56
+ : (_step, output) => {
57
+ var _a;
58
+ for (const [id, problems] of (0, stage_1.moveStagedFiles)(stage, (0, stage_1.stagedFinalFiles)(output, stage, packageIds))) {
59
+ moveProblems.set(id, [...((_a = moveProblems.get(id)) !== null && _a !== void 0 ? _a : []), ...problems]);
60
+ }
61
+ };
62
+ let results;
63
+ let removal;
64
+ try {
65
+ results =
66
+ target === "build"
67
+ ? yield (0, group_run_1.runGroup)(staged, verbose, live, observe)
68
+ : yield runner(target)(staged, verbose, live);
69
+ }
70
+ finally {
71
+ removal = (0, stage_1.removeStage)(stage);
72
+ }
73
+ return staged.map((member, index) => {
74
+ var _a, _b, _c;
75
+ const { success, output } = results[index];
76
+ const problems = (_c = moveProblems.get((_b = (_a = member.invocation.package) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : "")) !== null && _c !== void 0 ? _c : [];
77
+ return {
78
+ success: success && problems.length === 0,
79
+ output: [
80
+ ...(output === "" ? [] : [output]),
81
+ ...(problems.length > 0 ? [stageMessage(member.prepared.task, problems)] : []),
82
+ ...(removal === undefined ? [] : [`${member.prepared.task}: warning: ${removal}.`]),
83
+ ].join("\n"),
84
+ };
85
+ });
86
+ });
87
+ }
88
+ function runner(target) {
89
+ return target === "napi-build"
90
+ ? napi_build_1.runNapiGroup
91
+ : target === "wasm-build"
92
+ ? wasm_build_1.runWasmGroup
93
+ : (members, verbose, live) => (0, group_run_1.runGroup)(members, verbose, live);
94
+ }
95
+ /**
96
+ * The message of a task whose staged group could not make its stage, get
97
+ * Cargo's directories for it, or move a file of the task's crate out of it
98
+ * (`DES-BATCH`, "Staged builds"; `DES-DIAGNOSTICS`).
99
+ */
100
+ // @mara implements DES-DIAGNOSTICS
101
+ function stageMessage(task, problems) {
102
+ return `${task}: @convesoft/nx-rust builds this task's cargo command in a stage of its own, in the artifact directory, and moves only the task's own files out of it, so that it replaces no file of another crate's build; ${problems.join("; ")}. The task fails, so that Nx stores no result for it. Check that the artifact directory can be written to and has space, and run the command again.`;
103
+ }
104
+ // Cargo's directories in the workspace root with the group's environment,
105
+ // as physical paths, for a staged group whose command had no report of them.
106
+ function physicalDirectories(cwd, env) {
107
+ const reported = (0, directories_1.reportedDirectories)(cwd, env);
108
+ return { artifact: (0, real_path_1.physicalPath)(reported.artifact), build: (0, real_path_1.physicalPath)(reported.build) };
109
+ }
110
+ //# sourceMappingURL=staged-run.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"staged-run.js","sourceRoot":"","sources":["../../../../nx-rust/src/executors/staged-run.ts"],"names":[],"mappings":";;AAqCA,wCAwEC;AAsBD,oCAEC;;AArID,sDAI8B;AAC9B,kDAAkD;AAClD,2CAA6F;AAE7F,6CAA4C;AAC5C,mCASiB;AACjB,6CAA4C;AAE5C;;;;;;;;;;;;;;GAcG;AACH,6BAA6B;AAC7B,SAAsB,cAAc;iEAClC,OAA+B,EAC/B,SAAyB,EACzB,OAAgB,EAChB,OAAmB,MAAM;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EAAE,QAA2B;IACpE,OAAO,GAAG,IAAI,gNAAgN,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,qJAAqJ,CAAC;AACzY,CAAC;AAED,0EAA0E;AAC1E,6EAA6E;AAC7E,SAAS,mBAAmB,CAAC,GAAW,EAAE,GAAsB;IAC9D,MAAM,QAAQ,GAAG,IAAA,iCAAmB,EAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC/C,OAAO,EAAE,QAAQ,EAAE,IAAA,wBAAY,EAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAA,wBAAY,EAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;AAC5F,CAAC"}
@@ -0,0 +1,271 @@
1
+ import type { ProjectGraph, Task } from "@nx/devkit";
2
+ import { NxBridgeError, type NxTaskEnv } from "../compatibility/nx-bridge";
3
+ /**
4
+ * Why the batch cannot rebuild a task's environment: the installed Nx lacks,
5
+ * or has changed, a part through which it does. Its message is the reason
6
+ * alone.
7
+ */
8
+ export declare class TaskEnvironmentError extends Error {
9
+ constructor(message: string);
10
+ }
11
+ /** Converts a bridge failure into a {@link TaskEnvironmentError} with its diagnostic wording. */
12
+ export declare function toTaskEnvironmentError(error: NxBridgeError): TaskEnvironmentError;
13
+ /**
14
+ * The variables by which Nx 24 tells a task how it runs and records the
15
+ * task, not what the task is, and whose value in the task's process depends
16
+ * on the way the task runs: alone or in a batch, with which output style, in
17
+ * a pseudo-terminal or the terminal UI, with `--verbose` or with analytics on
18
+ * (`EVD-NX-24-BATCHES`, "Task environment"). The task's key, `NX_TASK_HASH`,
19
+ * which Nx does not hand a batch; where Nx writes the task's terminal output,
20
+ * whether it captures standard error into it, streams it or prefixes it,
21
+ * which follow the output style and the task's key; `FORCE_COLOR`, which Nx
22
+ * removes from a task whose output it writes to a file and sets for one whose
23
+ * output it pipes; the variables of Nx's pseudo-terminal, which a task run
24
+ * on its own in a terminal has and a task of a batch has not, one of them
25
+ * empty where Nx's own process has no `execArgv`; and those that the `nx`
26
+ * process sets from the command's options, the terminal UI's
27
+ * `NX_TUI_AUTO_EXIT`, `--verbose`'s `NX_VERBOSE_LOGGING`, and the session of
28
+ * Nx's analytics. Also the variables that Nx removes from every task, and
29
+ * that Nx's pseudo-terminal, which lays the task's environment over the
30
+ * `nx` process's own, gives back to a task run on its own in a terminal:
31
+ * `NX_SET_CLI`, `NX_ORIGINAL_FORCE_COLOR` and the ready signal's socket and
32
+ * task. The plugin leaves them out of every environment it runs cargo with,
33
+ * for a task run on its own as in a batch, so that no cargo command, build
34
+ * script or test sees them and no result can depend on them (`DES-BATCH`).
35
+ */
36
+ export declare const nxRunVariables: readonly ["NX_TASK_HASH", "NX_TERMINAL_OUTPUT_PATH", "NX_TERMINAL_CAPTURE_STDERR", "NX_STREAM_OUTPUT", "NX_PREFIX_OUTPUT", "FORCE_COLOR", "NX_PSEUDO_TERMINAL_EXEC_ARGV", "NX_PSEUDO_IPC_PATH", "NX_PSEUDO_IPC_FORK_ID", "NX_TUI_AUTO_EXIT", "NX_VERBOSE_LOGGING", "NX_ANALYTICS_SESSION_ID", "NX_SET_CLI", "NX_ORIGINAL_FORCE_COLOR", "NX_READY_SIGNAL_SOCKET", "NX_READY_SIGNAL_TASK"];
37
+ /**
38
+ * The variables by which Nx names a task's project, which differ between the
39
+ * tasks of any two crates of one target, so that tasks that share a cargo
40
+ * command could not share an environment with them (`DES-BATCH`): Nx's
41
+ * `NX_TASK_TARGET_PROJECT` and `LERNA_PACKAGE_NAME`. The maintainer decided
42
+ * on 15 November 2026 that cargo never gets them, whether a task runs alone
43
+ * or in a batch (`ADR-TASK-NAME-VARIABLES`); a build script or test that
44
+ * needs its crate reads `CARGO_PKG_NAME`. The task's target and
45
+ * configuration, which the tasks of a group share, stay.
46
+ */
47
+ export declare const taskNameVariables: readonly ["NX_TASK_TARGET_PROJECT", "LERNA_PACKAGE_NAME"];
48
+ /**
49
+ * What Nx sets for the process of a task run on its own after the task's
50
+ * dotenv files and its own variables (`EVD-NX-24-BATCHES`, "Task
51
+ * environment"): the fork's `NX_FORKED_TASK_EXECUTOR`
52
+ * (`forked-process-task-runner.js`) and then `NX_CLI_SET`, which the task's
53
+ * process sets when it starts (`bin/run-executor.js`). A batch process has
54
+ * both from its start, before the batch lays each task's dotenv files over
55
+ * them, so the batch sets them again after its task's own variables, in the
56
+ * same order ({@link batchTaskEnvironment}), and a dotenv file that defines
57
+ * one changes the value for neither.
58
+ */
59
+ export declare const afterTaskLayer: Readonly<Record<string, string>>;
60
+ /** What the plugin knows of a task for {@link cargoTaskEnvironment}. */
61
+ export interface TaskShape {
62
+ /** The task's configuration, as Nx gives it to the task's own variables. */
63
+ configuration: string | undefined;
64
+ /**
65
+ * Whether the task waits for a continuous task that reports ready by
66
+ * signal, for which Nx sets `NX_READY_URL` ({@link readyUrlProducers}).
67
+ */
68
+ readyUrlDependency: boolean;
69
+ }
70
+ /** The parts of Nx's task graph that {@link readyUrlProducers} reads. */
71
+ interface ReadinessTaskGraph {
72
+ tasks: Record<string, {
73
+ continuous?: boolean;
74
+ target: {
75
+ project: string;
76
+ target: string;
77
+ };
78
+ }>;
79
+ continuousDependencies?: Record<string, unknown[]>;
80
+ }
81
+ /** The parts of Nx's project graph that {@link readyUrlProducers} reads. */
82
+ interface ReadinessProjectGraph {
83
+ nodes: Record<string, {
84
+ data?: {
85
+ targets?: Record<string, {
86
+ readyWhen?: unknown;
87
+ }>;
88
+ };
89
+ }>;
90
+ }
91
+ /**
92
+ * The continuous tasks from which Nx 24 gives the task `taskId`, run on its
93
+ * own, `NX_READY_URL`: those that an edge with `waitFor: "ready"` leads to
94
+ * and whose `readyWhen` reports ready by `signal`, the only check of Nx 24
95
+ * that reports a URL (`getReadyUrlEnv` in `task-orchestrator.js` and
96
+ * `mayReportReadyUrl` in `readiness/ready-when.js`, `EVD-NX-24-BATCHES`,
97
+ * "Continuous tasks"). Every other continuous dependency, with another check
98
+ * or none, gives the task nothing that a batch lacks (`DES-BATCH`).
99
+ */
100
+ export declare function readyUrlProducers(taskId: string, taskGraph: ReadinessTaskGraph, projectGraph: ReadinessProjectGraph): string[];
101
+ /**
102
+ * Why the value of each variable that Nx 24 sets, changes or removes on the
103
+ * way from the `nx` command to the process of a task or of a batch depends
104
+ * on how the task runs, in the process where Nx expands a task's dotenv
105
+ * files or where the plugin checks them (`EVD-NX-24-BATCHES`, "Task
106
+ * environment"). Nx expands the dotenv files of a task run on its own in the
107
+ * `nx` process, before it adds the task's own variables, and a batch expands
108
+ * them in its own process, which Nx gives variables of its own; the plugin
109
+ * checks them in the task's process or in the batch's. A task whose dotenv
110
+ * files make Nx look one of them up fails, alone as in a batch
111
+ * ({@link dotenvProblem}, `DES-BATCH`).
112
+ *
113
+ * Each of them is also left out of cargo's environment
114
+ * ({@link nxRunVariables}), set or removed by Nx after the dotenv files for
115
+ * every task, set by the batch after them as Nx sets it after them for a
116
+ * task run on its own ({@link afterTaskLayer}), or made the same for every
117
+ * way of running by {@link cargoTaskEnvironment}: so a dotenv file that only
118
+ * defines one changes nothing that cargo sees.
119
+ */
120
+ export declare const runDependentVariables: Readonly<Record<string, string>>;
121
+ /**
122
+ * A task's environment as the plugin runs cargo with it, and asks cargo for
123
+ * reports with it, as a new object: `env` without {@link nxRunVariables}
124
+ * and {@link taskNameVariables}, and with the variables that Nx gives the task in its own layer as that
125
+ * layer gives them in every way of running the task. Nx's pseudo-terminal
126
+ * lays the environment that Nx built for a task run on its own over the
127
+ * `nx` process's own, so that a variable which that layer leaves without a
128
+ * value comes back with the `nx` process's value in a terminal
129
+ * (`EVD-NX-24-BATCHES`, "Task environment"): `NX_SKIP_NX_CACHE` is `true`
130
+ * for a run that skips the cache and absent otherwise, and
131
+ * `NX_TASK_TARGET_CONFIGURATION` names the task's configuration or is
132
+ * absent. `NX_READY_URL`, which Nx sets only for a task that waits for a
133
+ * continuous task that reports ready by signal ({@link readyUrlProducers}),
134
+ * can otherwise only be the value of a task that runs the `nx` command, and
135
+ * is left out.
136
+ */
137
+ export declare function cargoTaskEnvironment(env: NodeJS.ProcessEnv, task: TaskShape): NodeJS.ProcessEnv;
138
+ /**
139
+ * The root dotenv files that the `nx` process loads when it starts and that
140
+ * Nx's `getTaskSpecificEnv` removes again from every task's environment,
141
+ * each on its own, in this order (`unloadDotEnvFiles` in
142
+ * `tasks-runner/task-env.js`; `EVD-NX-24-BATCHES`, "Dotenv expansion").
143
+ */
144
+ export declare const rootDotenvFiles: readonly [".env", ".local.env", ".env.local"];
145
+ /**
146
+ * `env` as the plugin gives it to cargo where Nx loads no dotenv files for
147
+ * the task, its `NX_LOAD_DOT_ENV_FILES` not being `true` (`DES-BATCH`,
148
+ * "Dotenv files"). Nx's `getTaskSpecificEnv` then still removes each variable
149
+ * whose value the root `.env`, `.local.env` or `.env.local` gives, without
150
+ * loading any file back, while Nx's pseudo-terminal gives a task run on its
151
+ * own in a terminal the `nx` process's values back (`EVD-NX-24-BATCHES`,
152
+ * "Task environment"). So the plugin removes them again, with Nx's own
153
+ * `unloadDotEnvFile`, from every variable apart from those that Nx sets
154
+ * after the dotenv layer: a task run on its own without a terminal and a
155
+ * task of a batch lack them already, and a task in a terminal loses what the
156
+ * pseudo-terminal gave back. Where Nx loads the files, `env` comes back as
157
+ * it is.
158
+ *
159
+ * @throws {TaskEnvironmentError} When the installed Nx lacks `unloadDotEnvFile`.
160
+ */
161
+ export declare function withoutUnloadedRootValues(env: NodeJS.ProcessEnv, root: string): NodeJS.ProcessEnv;
162
+ /**
163
+ * The environment that the plugin gives cargo for a task of a batch, from
164
+ * the task's dotenv layer as Nx's `getTaskSpecificEnv` builds it in the batch
165
+ * process (`DES-BATCH`): Nx's `getEnvVariablesForTask` over it, as Nx calls it
166
+ * for a task whose output it does not write to a file;
167
+ * `NX_INVOCATION_ANCESTOR_PIDS` with the value that Nx gave the batch process,
168
+ * which it gives a task run on its own too, where computed in the batch
169
+ * process it would name that process as well; then {@link afterTaskLayer}, as
170
+ * the fork and the task's process set them for a task run on its own; and
171
+ * {@link cargoTaskEnvironment}. A task of a batch waits for no continuous
172
+ * task that reports ready by signal ({@link refuseReadyUrl} in `batch.ts`).
173
+ *
174
+ * @param processEnv The batch process's environment.
175
+ */
176
+ export declare function batchTaskEnvironment(base: NodeJS.ProcessEnv, task: Task, taskLayer: EnvVariablesForTask, processEnv: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
177
+ /** `getEnvVariablesForTask` of Nx 24, which lays the per-task layer over it. */
178
+ export type EnvVariablesForTask = NxTaskEnv["getEnvVariablesForTask"];
179
+ /**
180
+ * The environment of each task of a batch, as Nx builds it for the task run
181
+ * on its own (`DES-BATCH`; `EVD-NX-24-BATCHES`, "Task environment"), with
182
+ * the functions that Nx uses for that, from `nx/src/tasks-runner/task-env`,
183
+ * which are no public API (`RISK-UPSTREAM-CHANGES`):
184
+ *
185
+ * 1. {@link taskDotenvLayer}: the dotenv layer of Nx's `getTaskSpecificEnv`,
186
+ * the environment of the `nx` command without the values that the
187
+ * repository's root `.env`, `.local.env` and `.env.local` gave it, with
188
+ * the task's dotenv files loaded in the order Nx reads them, those in the
189
+ * project's folder and those at the repository root named for the target
190
+ * or a configuration, with the root files last. Nx hands a batch process
191
+ * the command's environment, so the batch builds this layer from its own,
192
+ * which Nx made for its child processes as it makes a task's: with
193
+ * `NX_WORKSPACE_ROOT`, `NX_SKIP_NX_CACHE`, `NX_INVOCATION_ANCESTOR_PIDS`
194
+ * and `NX_FORKED_TASK_EXECUTOR`, and with `NX_CLI_SET`, which the process
195
+ * of a task run on its own sets too.
196
+ * 2. {@link batchTaskEnvironment}: Nx's `getEnvVariablesForTask` with the
197
+ * task's own variables, `NX_TASK_TARGET_PROJECT`, `NX_TASK_TARGET_TARGET`,
198
+ * `NX_TASK_TARGET_CONFIGURATION`, `LERNA_PACKAGE_NAME` and `NX_TUI=false`,
199
+ * and the removal of the variables that Nx keeps from every task; then
200
+ * what Nx sets after that layer for a task run on its own
201
+ * ({@link afterTaskLayer}); then {@link cargoTaskEnvironment} and
202
+ * {@link withoutUnloadedRootValues}, as for a task run on its own. What a
203
+ * task run on its own and a task of a batch give cargo is the same.
204
+ *
205
+ * Neither step writes to the batch process's environment; dotenv itself
206
+ * does where a vault lies beside a task's files ({@link taskDotenvLayer}).
207
+ *
208
+ * @param root The repository root, from where the installed Nx is loaded.
209
+ * @param shielded The variables of {@link runDependentVariables} that the
210
+ * task's dotenv files define ({@link shieldValue}).
211
+ * @returns A function that gives a task's environment, as a new object.
212
+ * @throws {TaskEnvironmentError} When the installed Nx lacks a function.
213
+ */
214
+ export declare function taskEnvironments(root: string, graph: ProjectGraph, shielded?: (task: Task) => readonly string[]): (task: Task) => NodeJS.ProcessEnv;
215
+ /** The functions of `nx/src/tasks-runner/task-env` with which {@link taskDotenvLayer} builds a layer. */
216
+ export type DotenvParts = Pick<NxTaskEnv, "getEnvFilesForTask" | "loadAndExpandDotEnvFile" | "unloadDotEnvFile">;
217
+ /**
218
+ * A task's dotenv layer, as Nx 24's `getTaskSpecificEnv` builds it from the
219
+ * process's environment, built instead on a copy of `processEnv`, so that
220
+ * the plugin writes nothing to the batch process's own environment
221
+ * (`DES-BATCH`, "Dotenv files"): Nx's `unloadDotEnvFile` removes from the copy each value that a
222
+ * root dotenv file ({@link rootDotenvFiles}) gives, and, where `processEnv`
223
+ * has `NX_LOAD_DOT_ENV_FILES=true`, Nx's `loadAndExpandDotEnvFile` loads and
224
+ * expands into it the files that Nx's `getEnvFilesForTask` names for the
225
+ * task, under `root`, which is Nx's workspace root in a batch. Which files,
226
+ * in which order, and how their expansion sees the copy's values is Nx's
227
+ * own code. The plugin repeats three facts of Nx's wrapper: the root files,
228
+ * the order of the calls, and the load switch. A test compares the result
229
+ * with `getTaskSpecificEnv` itself on the installed Nx, and another fails
230
+ * where the source of the wrapper changes (`VER-BATCHING`).
231
+ *
232
+ * With `DOTENV_KEY` set and a vault beside the files, dotenv 16.4.7 parses
233
+ * the vault into the live `process.env` before it decrypts it, so Nx's
234
+ * loader sets the vault's `DOTENV_VAULT_<ENVIRONMENT>` there, as it does in
235
+ * the `nx` process for a task run on its own; the dotenv check refuses such
236
+ * a task (`DES-BATCH`, nxr-gcknzm).
237
+ *
238
+ * Each name of `shielded` has {@link shieldValue} in the copy before Nx's
239
+ * functions see it.
240
+ *
241
+ * @param processEnv The batch process's environment; the plugin does not change it.
242
+ * @returns The layer, as a new object.
243
+ * @throws {TaskEnvironmentError} When `getEnvFilesForTask` fails or gives no
244
+ * list of files.
245
+ */
246
+ export declare function taskDotenvLayer(parts: DotenvParts, root: string, task: Task, graph: ProjectGraph, processEnv: NodeJS.ProcessEnv, shielded: readonly string[]): NodeJS.ProcessEnv;
247
+ /**
248
+ * The value that the batch gives, in the copy on which it builds a task's
249
+ * dotenv layer ({@link taskDotenvLayer}), to each variable of
250
+ * {@link runDependentVariables} that the task's dotenv files define
251
+ * (`DES-BATCH`, "Dotenv files"). dotenv-expand then takes this value, which
252
+ * no file gives, instead of expanding the file's, as it takes the `nx`
253
+ * process's own value where that process has one: so a definition whose
254
+ * expansion would not end, as `NX_ORIGINAL_FORCE_COLOR=${CMD}z` with
255
+ * `CMD=x${CMD}` in the command, which the `nx` process does not expand where
256
+ * the command has `FORCE_COLOR=0`, cannot exhaust the batch process's memory
257
+ * either. The value never reaches cargo: each of those variables is left out
258
+ * of cargo's environment or set after the dotenv layer in both paths.
259
+ */
260
+ export declare const shieldValue = "\u0001@convesoft/nx-rust";
261
+ /**
262
+ * The configuration with which Nx 24 would run `target` of `project` for a
263
+ * command that passes `configuration`, by the installed Nx's own rule
264
+ * (`ProcessTasks.resolveConfiguration` in `create-task-graph.js`): the
265
+ * configuration passed where the target declares it, otherwise the target's
266
+ * `defaultConfiguration`, and none where that is empty.
267
+ *
268
+ * @throws {TaskEnvironmentError} When the installed Nx lacks the rule.
269
+ */
270
+ export declare function nxTaskConfiguration(root: string, graph: ProjectGraph, project: string, target: string, configuration: string | undefined): string | undefined;
271
+ export {};