@convesoft/nx-rust 0.0.0-stage → 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.
- package/LICENSE-APACHE +201 -0
- package/LICENSE-MIT +21 -0
- package/README.md +48 -2
- package/executors.json +35 -0
- package/generators.json +19 -0
- package/package.json +26 -4
- package/src/cargo/build-settings.d.ts +54 -0
- package/src/cargo/build-settings.js +93 -0
- package/src/cargo/build-settings.js.map +1 -0
- package/src/cargo/configured-runner.d.ts +36 -0
- package/src/cargo/configured-runner.js +99 -0
- package/src/cargo/configured-runner.js.map +1 -0
- package/src/cargo/configured-tools.d.ts +35 -0
- package/src/cargo/configured-tools.js +46 -0
- package/src/cargo/configured-tools.js.map +1 -0
- package/src/cargo/dep-info-basedir.d.ts +18 -0
- package/src/cargo/dep-info-basedir.js +38 -0
- package/src/cargo/dep-info-basedir.js.map +1 -0
- package/src/cargo/directories.d.ts +40 -0
- package/src/cargo/directories.js +89 -0
- package/src/cargo/directories.js.map +1 -0
- package/src/cargo/host-triple.d.ts +7 -0
- package/src/cargo/host-triple.js +21 -0
- package/src/cargo/host-triple.js.map +1 -0
- package/src/cargo/lockfile.d.ts +63 -0
- package/src/cargo/lockfile.js +157 -0
- package/src/cargo/lockfile.js.map +1 -0
- package/src/cargo/metadata.d.ts +112 -0
- package/src/cargo/metadata.js +37 -0
- package/src/cargo/metadata.js.map +1 -0
- package/src/cargo/package-specs.d.ts +54 -0
- package/src/cargo/package-specs.js +109 -0
- package/src/cargo/package-specs.js.map +1 -0
- package/src/cargo/paths-crates.d.ts +27 -0
- package/src/cargo/paths-crates.js +69 -0
- package/src/cargo/paths-crates.js.map +1 -0
- package/src/cargo/print-artifact-folders.d.ts +1 -0
- package/src/cargo/print-artifact-folders.js +58 -0
- package/src/cargo/print-artifact-folders.js.map +1 -0
- package/src/cargo/redirections.d.ts +87 -0
- package/src/cargo/redirections.js +195 -0
- package/src/cargo/redirections.js.map +1 -0
- package/src/cargo/run-cargo.d.ts +31 -0
- package/src/cargo/run-cargo.js +75 -0
- package/src/cargo/run-cargo.js.map +1 -0
- package/src/cargo/target-triples.d.ts +98 -0
- package/src/cargo/target-triples.js +265 -0
- package/src/cargo/target-triples.js.map +1 -0
- package/src/cargo/version-req.d.ts +12 -0
- package/src/cargo/version-req.js +122 -0
- package/src/cargo/version-req.js.map +1 -0
- package/src/compatibility/cargo-version.d.ts +43 -0
- package/src/compatibility/cargo-version.js +83 -0
- package/src/compatibility/cargo-version.js.map +1 -0
- package/src/compatibility/nx-bridge.d.ts +312 -0
- package/src/compatibility/nx-bridge.js +407 -0
- package/src/compatibility/nx-bridge.js.map +1 -0
- package/src/compatibility/nx-version.d.ts +104 -0
- package/src/compatibility/nx-version.js +272 -0
- package/src/compatibility/nx-version.js.map +1 -0
- package/src/executors/affected-inputs.d.ts +29 -0
- package/src/executors/affected-inputs.js +259 -0
- package/src/executors/affected-inputs.js.map +1 -0
- package/src/executors/affected-run.d.ts +54 -0
- package/src/executors/affected-run.js +394 -0
- package/src/executors/affected-run.js.map +1 -0
- package/src/executors/affected.d.ts +239 -0
- package/src/executors/affected.js +589 -0
- package/src/executors/affected.js.map +1 -0
- package/src/executors/baseline-context.d.ts +85 -0
- package/src/executors/baseline-context.js +227 -0
- package/src/executors/baseline-context.js.map +1 -0
- package/src/executors/baseline.d.ts +123 -0
- package/src/executors/baseline.js +356 -0
- package/src/executors/baseline.js.map +1 -0
- package/src/executors/batch.d.ts +75 -0
- package/src/executors/batch.js +434 -0
- package/src/executors/batch.js.map +1 -0
- package/src/executors/build-records.d.ts +110 -0
- package/src/executors/build-records.js +267 -0
- package/src/executors/build-records.js.map +1 -0
- package/src/executors/cargo/executor.d.ts +28 -0
- package/src/executors/cargo/executor.js +58 -0
- package/src/executors/cargo/executor.js.map +1 -0
- package/src/executors/cargo/schema.json +54 -0
- package/src/executors/cargo-invocation.d.ts +81 -0
- package/src/executors/cargo-invocation.js +109 -0
- package/src/executors/cargo-invocation.js.map +1 -0
- package/src/executors/cargo-output.d.ts +212 -0
- package/src/executors/cargo-output.js +646 -0
- package/src/executors/cargo-output.js.map +1 -0
- package/src/executors/command.d.ts +318 -0
- package/src/executors/command.js +517 -0
- package/src/executors/command.js.map +1 -0
- package/src/executors/coverage-baseline.d.ts +23 -0
- package/src/executors/coverage-baseline.js +284 -0
- package/src/executors/coverage-baseline.js.map +1 -0
- package/src/executors/declared-options.d.ts +21 -0
- package/src/executors/declared-options.js +58 -0
- package/src/executors/declared-options.js.map +1 -0
- package/src/executors/digests.d.ts +94 -0
- package/src/executors/digests.js +190 -0
- package/src/executors/digests.js.map +1 -0
- package/src/executors/dotenv-check.d.ts +79 -0
- package/src/executors/dotenv-check.js +553 -0
- package/src/executors/dotenv-check.js.map +1 -0
- package/src/executors/group-invocations.d.ts +80 -0
- package/src/executors/group-invocations.js +253 -0
- package/src/executors/group-invocations.js.map +1 -0
- package/src/executors/group-run.d.ts +114 -0
- package/src/executors/group-run.js +591 -0
- package/src/executors/group-run.js.map +1 -0
- package/src/executors/groups.d.ts +113 -0
- package/src/executors/groups.js +285 -0
- package/src/executors/groups.js.map +1 -0
- package/src/executors/input-check.d.ts +52 -0
- package/src/executors/input-check.js +271 -0
- package/src/executors/input-check.js.map +1 -0
- package/src/executors/kept-files.d.ts +98 -0
- package/src/executors/kept-files.js +341 -0
- package/src/executors/kept-files.js.map +1 -0
- package/src/executors/lockfile/executor.d.ts +16 -0
- package/src/executors/lockfile/executor.js +37 -0
- package/src/executors/lockfile/executor.js.map +1 -0
- package/src/executors/lockfile/schema.json +50 -0
- package/src/executors/napi-build.d.ts +73 -0
- package/src/executors/napi-build.js +420 -0
- package/src/executors/napi-build.js.map +1 -0
- package/src/executors/nextest.d.ts +185 -0
- package/src/executors/nextest.js +498 -0
- package/src/executors/nextest.js.map +1 -0
- package/src/executors/nx-command.d.ts +95 -0
- package/src/executors/nx-command.js +205 -0
- package/src/executors/nx-command.js.map +1 -0
- package/src/executors/nx-task-files.d.ts +82 -0
- package/src/executors/nx-task-files.js +156 -0
- package/src/executors/nx-task-files.js.map +1 -0
- package/src/executors/print-test-mode.d.ts +1 -0
- package/src/executors/print-test-mode.js +25 -0
- package/src/executors/print-test-mode.js.map +1 -0
- package/src/executors/release-publish/executor.d.ts +24 -0
- package/src/executors/release-publish/executor.js +165 -0
- package/src/executors/release-publish/executor.js.map +1 -0
- package/src/executors/release-publish/schema.json +30 -0
- package/src/executors/run/executor.d.ts +12 -0
- package/src/executors/run/executor.js +27 -0
- package/src/executors/run/executor.js.map +1 -0
- package/src/executors/run/schema.json +45 -0
- package/src/executors/runner-script.d.ts +12 -0
- package/src/executors/runner-script.js +22 -0
- package/src/executors/runner-script.js.map +1 -0
- package/src/executors/runtime-input-check.d.ts +24 -0
- package/src/executors/runtime-input-check.js +87 -0
- package/src/executors/runtime-input-check.js.map +1 -0
- package/src/executors/shared-artifacts.d.ts +44 -0
- package/src/executors/shared-artifacts.js +132 -0
- package/src/executors/shared-artifacts.js.map +1 -0
- package/src/executors/split-words.d.ts +24 -0
- package/src/executors/split-words.js +111 -0
- package/src/executors/split-words.js.map +1 -0
- package/src/executors/stage.d.ts +163 -0
- package/src/executors/stage.js +526 -0
- package/src/executors/stage.js.map +1 -0
- package/src/executors/staged-run.d.ts +24 -0
- package/src/executors/staged-run.js +110 -0
- package/src/executors/staged-run.js.map +1 -0
- package/src/executors/task-env.d.ts +271 -0
- package/src/executors/task-env.js +494 -0
- package/src/executors/task-env.js.map +1 -0
- package/src/executors/task-execution.d.ts +61 -0
- package/src/executors/task-execution.js +122 -0
- package/src/executors/task-execution.js.map +1 -0
- package/src/executors/task-guards.d.ts +112 -0
- package/src/executors/task-guards.js +430 -0
- package/src/executors/task-guards.js.map +1 -0
- package/src/executors/task-options.d.ts +114 -0
- package/src/executors/task-options.js +258 -0
- package/src/executors/task-options.js.map +1 -0
- package/src/executors/task.d.ts +166 -0
- package/src/executors/task.js +520 -0
- package/src/executors/task.js.map +1 -0
- package/src/executors/test-mode.d.ts +182 -0
- package/src/executors/test-mode.js +391 -0
- package/src/executors/test-mode.js.map +1 -0
- package/src/executors/test-runner.d.ts +44 -0
- package/src/executors/test-runner.js +159 -0
- package/src/executors/test-runner.js.map +1 -0
- package/src/executors/test-steps.d.ts +109 -0
- package/src/executors/test-steps.js +535 -0
- package/src/executors/test-steps.js.map +1 -0
- package/src/executors/wasm-build.d.ts +56 -0
- package/src/executors/wasm-build.js +216 -0
- package/src/executors/wasm-build.js.map +1 -0
- package/src/generators/crate/binary.schema.json +28 -0
- package/src/generators/crate/crate.d.ts +24 -0
- package/src/generators/crate/crate.js +108 -0
- package/src/generators/crate/crate.js.map +1 -0
- package/src/generators/crate/enclosing-workspace.d.ts +25 -0
- package/src/generators/crate/enclosing-workspace.js +58 -0
- package/src/generators/crate/enclosing-workspace.js.map +1 -0
- package/src/generators/crate/library.schema.json +28 -0
- package/src/generators/init/graph-check.d.ts +81 -0
- package/src/generators/init/graph-check.js +299 -0
- package/src/generators/init/graph-check.js.map +1 -0
- package/src/generators/init/init.d.ts +23 -0
- package/src/generators/init/init.js +113 -0
- package/src/generators/init/init.js.map +1 -0
- package/src/generators/init/report.d.ts +19 -0
- package/src/generators/init/report.js +93 -0
- package/src/generators/init/report.js.map +1 -0
- package/src/generators/init/schema.json +9 -0
- package/src/graph/artifact-kinds.d.ts +29 -0
- package/src/graph/artifact-kinds.js +50 -0
- package/src/graph/artifact-kinds.js.map +1 -0
- package/src/graph/artifact-names.d.ts +97 -0
- package/src/graph/artifact-names.js +276 -0
- package/src/graph/artifact-names.js.map +1 -0
- package/src/graph/build-records.d.ts +74 -0
- package/src/graph/build-records.js +104 -0
- package/src/graph/build-records.js.map +1 -0
- package/src/graph/caching.d.ts +148 -0
- package/src/graph/caching.js +676 -0
- package/src/graph/caching.js.map +1 -0
- package/src/graph/collisions.d.ts +106 -0
- package/src/graph/collisions.js +156 -0
- package/src/graph/collisions.js.map +1 -0
- package/src/graph/computation-reports.d.ts +89 -0
- package/src/graph/computation-reports.js +216 -0
- package/src/graph/computation-reports.js.map +1 -0
- package/src/graph/declared-files.d.ts +190 -0
- package/src/graph/declared-files.js +600 -0
- package/src/graph/declared-files.js.map +1 -0
- package/src/graph/discovery.d.ts +175 -0
- package/src/graph/discovery.js +656 -0
- package/src/graph/discovery.js.map +1 -0
- package/src/graph/edges.d.ts +25 -0
- package/src/graph/edges.js +94 -0
- package/src/graph/edges.js.map +1 -0
- package/src/graph/entries.d.ts +83 -0
- package/src/graph/entries.js +259 -0
- package/src/graph/entries.js.map +1 -0
- package/src/graph/inputs.d.ts +420 -0
- package/src/graph/inputs.js +746 -0
- package/src/graph/inputs.js.map +1 -0
- package/src/graph/lockfile-task.d.ts +74 -0
- package/src/graph/lockfile-task.js +105 -0
- package/src/graph/lockfile-task.js.map +1 -0
- package/src/graph/names.d.ts +41 -0
- package/src/graph/names.js +34 -0
- package/src/graph/names.js.map +1 -0
- package/src/graph/napi.d.ts +107 -0
- package/src/graph/napi.js +206 -0
- package/src/graph/napi.js.map +1 -0
- package/src/graph/nx-glob.d.ts +36 -0
- package/src/graph/nx-glob.js +152 -0
- package/src/graph/nx-glob.js.map +1 -0
- package/src/graph/nx-internals.d.ts +57 -0
- package/src/graph/nx-internals.js +128 -0
- package/src/graph/nx-internals.js.map +1 -0
- package/src/graph/options.d.ts +32 -0
- package/src/graph/options.js +80 -0
- package/src/graph/options.js.map +1 -0
- package/src/graph/outputs.d.ts +75 -0
- package/src/graph/outputs.js +140 -0
- package/src/graph/outputs.js.map +1 -0
- package/src/graph/path-dependencies.d.ts +122 -0
- package/src/graph/path-dependencies.js +459 -0
- package/src/graph/path-dependencies.js.map +1 -0
- package/src/graph/plugin-package.d.ts +36 -0
- package/src/graph/plugin-package.js +132 -0
- package/src/graph/plugin-package.js.map +1 -0
- package/src/graph/plugin-version.d.ts +20 -0
- package/src/graph/plugin-version.js +153 -0
- package/src/graph/plugin-version.js.map +1 -0
- package/src/graph/projects.d.ts +141 -0
- package/src/graph/projects.js +182 -0
- package/src/graph/projects.js.map +1 -0
- package/src/graph/reached-projects.d.ts +46 -0
- package/src/graph/reached-projects.js +102 -0
- package/src/graph/reached-projects.js.map +1 -0
- package/src/graph/real-path.d.ts +47 -0
- package/src/graph/real-path.js +113 -0
- package/src/graph/real-path.js.map +1 -0
- package/src/graph/redirected-uses.d.ts +98 -0
- package/src/graph/redirected-uses.js +434 -0
- package/src/graph/redirected-uses.js.map +1 -0
- package/src/graph/registration.d.ts +121 -0
- package/src/graph/registration.js +233 -0
- package/src/graph/registration.js.map +1 -0
- package/src/graph/script-input.d.ts +46 -0
- package/src/graph/script-input.js +65 -0
- package/src/graph/script-input.js.map +1 -0
- package/src/graph/settings.d.ts +178 -0
- package/src/graph/settings.js +479 -0
- package/src/graph/settings.js.map +1 -0
- package/src/graph/target-defaults-causes.d.ts +33 -0
- package/src/graph/target-defaults-causes.js +202 -0
- package/src/graph/target-defaults-causes.js.map +1 -0
- package/src/graph/target-defaults-layers.d.ts +186 -0
- package/src/graph/target-defaults-layers.js +420 -0
- package/src/graph/target-defaults-layers.js.map +1 -0
- package/src/graph/target-defaults-meaning.d.ts +95 -0
- package/src/graph/target-defaults-meaning.js +292 -0
- package/src/graph/target-defaults-meaning.js.map +1 -0
- package/src/graph/target-defaults-report.d.ts +77 -0
- package/src/graph/target-defaults-report.js +242 -0
- package/src/graph/target-defaults-report.js.map +1 -0
- package/src/graph/target-defaults.d.ts +79 -0
- package/src/graph/target-defaults.js +425 -0
- package/src/graph/target-defaults.js.map +1 -0
- package/src/graph/target-fields.d.ts +16 -0
- package/src/graph/target-fields.js +134 -0
- package/src/graph/target-fields.js.map +1 -0
- package/src/graph/target-tables.d.ts +45 -0
- package/src/graph/target-tables.js +299 -0
- package/src/graph/target-tables.js.map +1 -0
- package/src/graph/targets.d.ts +367 -0
- package/src/graph/targets.js +404 -0
- package/src/graph/targets.js.map +1 -0
- package/src/graph/unification.d.ts +141 -0
- package/src/graph/unification.js +459 -0
- package/src/graph/unification.js.map +1 -0
- package/src/graph/unignored-directories.d.ts +25 -0
- package/src/graph/unignored-directories.js +89 -0
- package/src/graph/unignored-directories.js.map +1 -0
- package/src/graph/visibility.d.ts +17 -0
- package/src/graph/visibility.js +67 -0
- package/src/graph/visibility.js.map +1 -0
- package/src/graph/warnings.d.ts +38 -0
- package/src/graph/warnings.js +77 -0
- package/src/graph/warnings.js.map +1 -0
- package/src/graph/wasm.d.ts +56 -0
- package/src/graph/wasm.js +77 -0
- package/src/graph/wasm.js.map +1 -0
- package/src/index.d.ts +68 -0
- package/src/index.js +109 -0
- package/src/index.js.map +1 -0
- package/src/release/manifests.d.ts +95 -0
- package/src/release/manifests.js +164 -0
- package/src/release/manifests.js.map +1 -0
- package/src/release/places.d.ts +127 -0
- package/src/release/places.js +368 -0
- package/src/release/places.js.map +1 -0
- package/src/release/publish-cargo.d.ts +177 -0
- package/src/release/publish-cargo.js +351 -0
- package/src/release/publish-cargo.js.map +1 -0
- package/src/release/publish-crates.d.ts +124 -0
- package/src/release/publish-crates.js +242 -0
- package/src/release/publish-crates.js.map +1 -0
- package/src/release/publish-environments.d.ts +50 -0
- package/src/release/publish-environments.js +284 -0
- package/src/release/publish-environments.js.map +1 -0
- package/src/release/publish-messages.d.ts +66 -0
- package/src/release/publish-messages.js +273 -0
- package/src/release/publish-messages.js.map +1 -0
- package/src/release/publish-registry.d.ts +27 -0
- package/src/release/publish-registry.js +135 -0
- package/src/release/publish-registry.js.map +1 -0
- package/src/release/publish-settings.d.ts +26 -0
- package/src/release/publish-settings.js +56 -0
- package/src/release/publish-settings.js.map +1 -0
- package/src/release/publish.d.ts +59 -0
- package/src/release/publish.js +620 -0
- package/src/release/publish.js.map +1 -0
- package/src/release/repository.d.ts +73 -0
- package/src/release/repository.js +219 -0
- package/src/release/repository.js.map +1 -0
- package/src/release/requirements.d.ts +34 -0
- package/src/release/requirements.js +30 -0
- package/src/release/requirements.js.map +1 -0
- package/src/release/toml-edit.d.ts +67 -0
- package/src/release/toml-edit.js +453 -0
- package/src/release/toml-edit.js.map +1 -0
- package/src/release/version-actions.d.ts +133 -0
- package/src/release/version-actions.js +474 -0
- package/src/release/version-actions.js.map +1 -0
- package/src/release/version-checks.d.ts +21 -0
- package/src/release/version-checks.js +151 -0
- package/src/release/version-checks.js.map +1 -0
- package/src/release/version-lockfiles.d.ts +61 -0
- package/src/release/version-lockfiles.js +222 -0
- package/src/release/version-lockfiles.js.map +1 -0
- package/src/tools/napi-cli.d.ts +70 -0
- package/src/tools/napi-cli.js +63 -0
- package/src/tools/napi-cli.js.map +1 -0
- package/src/tools/optional-tools.d.ts +121 -0
- package/src/tools/optional-tools.js +303 -0
- package/src/tools/optional-tools.js.map +1 -0
- package/src/tools/print-napi-cli.d.ts +1 -0
- package/src/tools/print-napi-cli.js +24 -0
- package/src/tools/print-napi-cli.js.map +1 -0
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import type { NamedArtifact } from "./artifact-names";
|
|
2
|
+
import type { TargetConfiguration } from "@nx/devkit";
|
|
3
|
+
import type { PackageVersion } from "../cargo/lockfile";
|
|
4
|
+
import type { CargoPackage } from "../cargo/metadata";
|
|
5
|
+
import type { BuildRecordSource } from "./build-records";
|
|
6
|
+
import { CacheContext, CacheOptions } from "./caching";
|
|
7
|
+
import type { CargoWorkspace } from "./discovery";
|
|
8
|
+
import type { TargetNames } from "./options";
|
|
9
|
+
import type { ArtifactKind, FeatureUnification } from "./settings";
|
|
10
|
+
/**
|
|
11
|
+
* The plugin's cargo executor, which runs every inferred target but `build`
|
|
12
|
+
* and `doc`, `run` and `lockfile`. It has a batch implementation (`DES-BATCH`).
|
|
13
|
+
*/
|
|
14
|
+
export declare const cargoExecutor = "@convesoft/nx-rust:cargo";
|
|
15
|
+
/**
|
|
16
|
+
* The executor of `build` and `doc`, the targets whose files Nx stores: the
|
|
17
|
+
* cargo executor under a name of its own, with the same implementation,
|
|
18
|
+
* batch implementation and schema, so that Nx batches and stores these
|
|
19
|
+
* tasks apart from the tasks that wait for them (`DES-BATCH`, "Two batch
|
|
20
|
+
* executors"; `ADR-TEST-AFTER-BUILD`).
|
|
21
|
+
*/
|
|
22
|
+
export declare const cargoOutputsExecutor = "@convesoft/nx-rust:cargo-outputs";
|
|
23
|
+
/**
|
|
24
|
+
* The inferred targets, by their default names, that run
|
|
25
|
+
* {@link cargoOutputsExecutor} in place of {@link cargoExecutor}.
|
|
26
|
+
*/
|
|
27
|
+
export declare const outputsTargets: ReadonlySet<InferredTargetName>;
|
|
28
|
+
/**
|
|
29
|
+
* The executor of the lockfile task, of `hakari-check` and of the coverage
|
|
30
|
+
* baseline target, which has no batch implementation, so that none of these
|
|
31
|
+
* tasks ever joins a batch (`DES-LOCKFILE-HASHING`, `DES-UNIFICATION`,
|
|
32
|
+
* "Drift", `DES-BASELINE`).
|
|
33
|
+
*/
|
|
34
|
+
export declare const lockfileExecutor = "@convesoft/nx-rust:lockfile";
|
|
35
|
+
/**
|
|
36
|
+
* The executor of `run`, which has no batch implementation: `cargo run`
|
|
37
|
+
* takes one package only (`DES-TARGET-COMMANDS`).
|
|
38
|
+
*/
|
|
39
|
+
export declare const runExecutor = "@convesoft/nx-rust:run";
|
|
40
|
+
/**
|
|
41
|
+
* The executor of `nx-release-publish`, with a batch implementation of its
|
|
42
|
+
* own that publishes the crates of each Cargo workspace and registry with
|
|
43
|
+
* one `cargo publish` (`DES-RELEASE`, `ADR-BATCHED-PUBLISH`).
|
|
44
|
+
*/
|
|
45
|
+
export declare const releasePublishExecutor = "@convesoft/nx-rust:release-publish";
|
|
46
|
+
/**
|
|
47
|
+
* The commits that the oldest collection of a baseline may lie behind `HEAD`
|
|
48
|
+
* before the coverage baseline target collects everything in place of
|
|
49
|
+
* `collect --diff`, where the option `fullCollectThreshold` sets none
|
|
50
|
+
* (`DES-BASELINE`).
|
|
51
|
+
*/
|
|
52
|
+
export declare const defaultFullCollectThreshold = 100;
|
|
53
|
+
/**
|
|
54
|
+
* The name of the publish target, which Nx release runs under this name
|
|
55
|
+
* only, so that `targetNames` cannot rename it (`DES-RELEASE`, "Publish
|
|
56
|
+
* target"; `DES-PLUGIN-OPTIONS`, "Target names").
|
|
57
|
+
*/
|
|
58
|
+
export declare const releasePublishTarget = "nx-release-publish";
|
|
59
|
+
/**
|
|
60
|
+
* The inferred targets by their default names, in the order of the table in
|
|
61
|
+
* `DES-TARGETS`: first those of a crate, then those of the workspace project.
|
|
62
|
+
* They are also the keys that `targetNames` accepts (`readTargetNames` in
|
|
63
|
+
* `options.ts`), apart from {@link releasePublishTarget}, which keeps its
|
|
64
|
+
* name.
|
|
65
|
+
*/
|
|
66
|
+
export declare const inferredTargetNames: readonly ["build", "check", "lint", "test", "fmt-check", "fmt", "bench", "run", "napi-build", "wasm-build", "nx-release-publish", "doc", "lockfile", "hakari-check", "audit", "deny", "update", "coverage-baseline"];
|
|
67
|
+
/** The default name of an inferred target, which identifies it whatever `targetNames` calls it. */
|
|
68
|
+
export type InferredTargetName = (typeof inferredTargetNames)[number];
|
|
69
|
+
/**
|
|
70
|
+
* The inferred targets that compile, which take the feature and profile
|
|
71
|
+
* options (`DES-PLUGIN-OPTIONS`) and get the configuration for all features
|
|
72
|
+
* ({@link allFeaturesConfiguration}).
|
|
73
|
+
*/
|
|
74
|
+
export declare const compilingTargets: readonly InferredTargetName[];
|
|
75
|
+
/**
|
|
76
|
+
* The configuration that every compiling target of every crate and
|
|
77
|
+
* workspace gets, the feature set of all features, beside the default
|
|
78
|
+
* features of its options (`DES-FEATURE-SETS`): `nx run-many -t test -c
|
|
79
|
+
* all-features`. A target table can lay its own configuration of that name
|
|
80
|
+
* over it.
|
|
81
|
+
*/
|
|
82
|
+
export declare const allFeaturesConfiguration = "all-features";
|
|
83
|
+
/** The key of {@link TargetCargoMetadata} in the metadata of each inferred target. */
|
|
84
|
+
export declare const targetCargoMetadataKey = "cargo";
|
|
85
|
+
/**
|
|
86
|
+
* What each inferred target carries in its Nx metadata, under
|
|
87
|
+
* {@link targetCargoMetadataKey}. The executor reads it to know which
|
|
88
|
+
* command a task runs, because `targetNames` can give the target another
|
|
89
|
+
* name. Nx keeps a target's metadata out of task hashes
|
|
90
|
+
* (`EVD-NX-OPTION-VALIDATION`), but the name of the task's target and
|
|
91
|
+
* `nx.json`, where `targetNames` is set, are part of each hash, so a change
|
|
92
|
+
* of what a target runs always changes the key.
|
|
93
|
+
*/
|
|
94
|
+
export interface TargetCargoMetadata {
|
|
95
|
+
/** The target's default name in `DES-TARGETS`. */
|
|
96
|
+
target: InferredTargetName;
|
|
97
|
+
/**
|
|
98
|
+
* The `locked` option of the plugin entry that created the project, which
|
|
99
|
+
* `NX_RUST_LOCKED` replaces for one run (`DES-INVOCATION`). It is no input
|
|
100
|
+
* of a task's key; `nx.json`, where it is set, is part of every key anyway.
|
|
101
|
+
*/
|
|
102
|
+
locked: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Why the plugin leaves the target uncached in this project
|
|
105
|
+
* (`configureCaching` in `caching.ts`, or a target table that sets
|
|
106
|
+
* `cache = false`, `applyTargetTables` in `target-tables.ts`); absent
|
|
107
|
+
* where it caches it. The executor fails a task whose configuration
|
|
108
|
+
* caches the target anyway.
|
|
109
|
+
*/
|
|
110
|
+
uncached?: string;
|
|
111
|
+
/**
|
|
112
|
+
* On `build` and `doc`, the target triples that Cargo's configuration and
|
|
113
|
+
* the graph's environment pick, whose folders the outputs name where a run
|
|
114
|
+
* names no triple; absent where they pick none. The executor fails a
|
|
115
|
+
* cached task whose environment and configuration pick other triples when
|
|
116
|
+
* it starts (`DES-OUTPUTS`).
|
|
117
|
+
*/
|
|
118
|
+
triples?: string[];
|
|
119
|
+
/**
|
|
120
|
+
* On `build` and `doc`, what picks a triple whose folder the plugin cannot
|
|
121
|
+
* name, and why. The executor fails a cached task of the target whose run
|
|
122
|
+
* names no triple (`DES-OUTPUTS`).
|
|
123
|
+
*/
|
|
124
|
+
tripleProblem?: string;
|
|
125
|
+
/**
|
|
126
|
+
* On `build` and `doc`, the triples that Cargo's configuration alone
|
|
127
|
+
* picked when the graph was created, without `CARGO_BUILD_TARGET`, as
|
|
128
|
+
* `pickText` in `target-triples.ts` writes them; absent where it picked
|
|
129
|
+
* none. The executor tells by it
|
|
130
|
+
* whether a cached task's triples differ because the configuration
|
|
131
|
+
* changed after graph creation or because of the task's environment
|
|
132
|
+
* (`DES-OUTPUTS`).
|
|
133
|
+
*/
|
|
134
|
+
configuredPick?: string;
|
|
135
|
+
/**
|
|
136
|
+
* On `build` and `doc`, the workspace's artifact directory whose folders
|
|
137
|
+
* the outputs name, relative to the repository's real path; absent where
|
|
138
|
+
* it lies outside the repository. The executor fails a cached task for
|
|
139
|
+
* which cargo reports another directory when it starts (`DES-OUTPUTS`).
|
|
140
|
+
*/
|
|
141
|
+
artifactDirectory?: string;
|
|
142
|
+
/**
|
|
143
|
+
* On `build` and `doc`, the variables of graph creation's environment that
|
|
144
|
+
* move the artifact directory, `CARGO_TARGET_DIR`, `CARGO_BUILD_TARGET_DIR`
|
|
145
|
+
* and `CARGO_HOME`, with their values; absent where none is set. The
|
|
146
|
+
* executor tells by them whether a cached task's artifact directory
|
|
147
|
+
* differs because Cargo's configuration changed after graph creation or
|
|
148
|
+
* because of the task's environment (`DES-OUTPUTS`).
|
|
149
|
+
*/
|
|
150
|
+
directoryVariables?: Record<string, string>;
|
|
151
|
+
/**
|
|
152
|
+
* On the lockfile task: the workspace's members, whose digests it writes
|
|
153
|
+
* (`DES-LOCKFILE-HASHING`).
|
|
154
|
+
*/
|
|
155
|
+
members?: PackageVersion[];
|
|
156
|
+
/**
|
|
157
|
+
* On a cached target that depends on the lockfile task: the crate's own
|
|
158
|
+
* member, whose digest its key holds, or nothing for a workspace project
|
|
159
|
+
* without a crate. The executor computes the digests again after cargo's
|
|
160
|
+
* call, the crate's own first (`DES-LOCKFILE-HASHING`, "Post-check").
|
|
161
|
+
*/
|
|
162
|
+
digests?: PackageVersion[];
|
|
163
|
+
/**
|
|
164
|
+
* On such a target whose key holds the digests of every member of its
|
|
165
|
+
* workspace (`holdsEveryDigest` in `inputs.ts`): the executor compares
|
|
166
|
+
* those of the other members as well, which it takes from the
|
|
167
|
+
* {@link TargetCargoMetadata.members} of the lockfile task that the task
|
|
168
|
+
* depends on. Naming them once per workspace, on the lockfile task, keeps
|
|
169
|
+
* the graph from carrying every member on every target.
|
|
170
|
+
*/
|
|
171
|
+
everyDigest?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* On a crate's `build`: what the executor names the dependency files of
|
|
174
|
+
* the crate's library and binaries from, which it compares with the
|
|
175
|
+
* task's inputs after cargo's call (`DES-BUILD-INPUT-CHECK`).
|
|
176
|
+
*/
|
|
177
|
+
records?: BuildRecordSource;
|
|
178
|
+
/**
|
|
179
|
+
* On a crate's `test`: `true` where `cargo test` replaces the executables
|
|
180
|
+
* that the crate's `build` declares ({@link testReplacesExecutables}), so
|
|
181
|
+
* that the target depends on that `build` (`DES-TARGETS`).
|
|
182
|
+
*/
|
|
183
|
+
waitsForBuild?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* On a crate's `test`: the roots, relative to the repository root, of the
|
|
186
|
+
* crates whose `build` the target depends on because the test's cargo
|
|
187
|
+
* commands replace the executables that it declares ({@link testBuilds}),
|
|
188
|
+
* the crate's own among them where it has such executables. The executor
|
|
189
|
+
* fails a task whose run holds one of those `build` tasks without an order
|
|
190
|
+
* between the two (`DES-TARGETS`, "Guard").
|
|
191
|
+
*/
|
|
192
|
+
waitsForBuilds?: string[];
|
|
193
|
+
/**
|
|
194
|
+
* On a crate's `build`, cached or not: the files that the crate's targets
|
|
195
|
+
* put into the folders of its artifact directory, with whether they are
|
|
196
|
+
* executables and whether `build` declares them (`namedArtifacts` in
|
|
197
|
+
* `artifact-names.ts`). The executor compares them with those of other
|
|
198
|
+
* projects when a cached task starts (`DES-OUTPUTS`, "Files of one name").
|
|
199
|
+
*/
|
|
200
|
+
artifactFiles?: NamedArtifact[];
|
|
201
|
+
/**
|
|
202
|
+
* On `napi-build`: the addon's file in the crate's folder, which the
|
|
203
|
+
* outputs name, and the host triple whose name it holds; absent where
|
|
204
|
+
* graph creation could not name it. The executor fails a cached task
|
|
205
|
+
* whose installed napi CLI names the addon otherwise (`DES-NAPI`).
|
|
206
|
+
*/
|
|
207
|
+
napiAddon?: string;
|
|
208
|
+
/** On `napi-build`: the host triple that {@link TargetCargoMetadata.napiAddon} comes from. */
|
|
209
|
+
napiHost?: string;
|
|
210
|
+
/**
|
|
211
|
+
* On `napi-build`: the `dtsHeaderFile` of the crate's napi settings,
|
|
212
|
+
* relative to the repository root, where the target's inputs hold it, or
|
|
213
|
+
* absolute outside the repository, where the executor fails the cached
|
|
214
|
+
* task before cargo (`DES-NAPI`).
|
|
215
|
+
*/
|
|
216
|
+
napiHeaderFile?: string;
|
|
217
|
+
/**
|
|
218
|
+
* On `napi-build` and `wasm-build`: why the crate's library has the file
|
|
219
|
+
* name of another crate's file, so that cargo builds one file for both;
|
|
220
|
+
* the executor fails the task before cargo runs (`DES-NAPI`, "Library
|
|
221
|
+
* names"; `DES-WASM`).
|
|
222
|
+
*/
|
|
223
|
+
sharedLibrary?: string;
|
|
224
|
+
/**
|
|
225
|
+
* On a crate's `test`: `nextest` where the workspace's settings choose the
|
|
226
|
+
* nextest runner (`REQ-TEST-RUNNER`); absent for the `cargo` runner. Like
|
|
227
|
+
* `locked`, it is no input of a key: the setting lies in `nx.json` or in
|
|
228
|
+
* the workspace's root `Cargo.toml`, both of which every key of the
|
|
229
|
+
* crate's `test` holds, and the nextest runner gives the target inputs of
|
|
230
|
+
* its own, the variables that start with `NEXTEST_` and the workspace's
|
|
231
|
+
* `.config/nextest.toml` (`DES-INPUTS`).
|
|
232
|
+
*/
|
|
233
|
+
testRunner?: "nextest";
|
|
234
|
+
/**
|
|
235
|
+
* On a crate's `test`: `true` where the workspace uses the selection of
|
|
236
|
+
* affected tests (`affectedTests`), so that the executor decides the test
|
|
237
|
+
* mode as the target's mode input does (`DES-TEST-MODE`); absent
|
|
238
|
+
* otherwise. Like `testRunner`, it is no input of a key: the setting lies
|
|
239
|
+
* in a file that every key of the crate's `test` holds, and it gives the
|
|
240
|
+
* target the mode input.
|
|
241
|
+
*/
|
|
242
|
+
affectedTests?: true;
|
|
243
|
+
/**
|
|
244
|
+
* On a crate's `test` where the workspace uses the selection of affected
|
|
245
|
+
* tests: the filesets of the crate's `fileInputs` patterns
|
|
246
|
+
* (`DES-PLUGIN-OPTIONS`), which coverage never narrows (`DES-TEST-RUN`,
|
|
247
|
+
* step 2); absent where it declares none.
|
|
248
|
+
*/
|
|
249
|
+
declaredFiles?: string[];
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Whether `cargo test` for the crate replaces the executables in the
|
|
253
|
+
* artifact directory that its `build` declares as outputs (`DES-OUTPUTS`),
|
|
254
|
+
* read from the crate's report: the crate has a target of kind `bin`, and a
|
|
255
|
+
* target of kind `test` or `bench` whose `test` flag is on. Cargo builds the
|
|
256
|
+
* crate's binaries for such a target, with what dev-dependencies turn on and
|
|
257
|
+
* with the `test` profile, and replaces the uplifted files even when their
|
|
258
|
+
* units are fresh (`EVD-CARGO-ARTIFACT-WRITERS`). The `required-features` of
|
|
259
|
+
* either target do not count: whether cargo builds them depends on the
|
|
260
|
+
* features of the run, and a crate counted without need only orders two
|
|
261
|
+
* tasks. A flag that the report lacks counts as on. Examples, unit tests,
|
|
262
|
+
* doctests and `cdylib` and `staticlib` files never make cargo replace them.
|
|
263
|
+
*/
|
|
264
|
+
export declare function testReplacesExecutables(pkg: CargoPackage): boolean;
|
|
265
|
+
/**
|
|
266
|
+
* The inferred targets that the plugin caches, as `DES-TARGETS` and
|
|
267
|
+
* `DES-OUTPUTS` give them, with the inputs of `DES-INPUTS` and the outputs
|
|
268
|
+
* of `DES-OUTPUTS` (`configureCaching` in `caching.ts`). `build` and `doc`
|
|
269
|
+
* are left uncached for a project where the plugin cannot name or store
|
|
270
|
+
* their artifacts, and `build` and `test` for a crate whose artifacts share
|
|
271
|
+
* a file name with another crate's in its artifact directory
|
|
272
|
+
* (`sharedArtifactNames` in `artifact-names.ts`), with the reason in
|
|
273
|
+
* `metadata.cargo.uncached`. Graph
|
|
274
|
+
* creation fails for a `targetDefaults` entry in `nx.json` that turns caching
|
|
275
|
+
* on for a target that the plugin leaves uncached in a project
|
|
276
|
+
* (`DES-TARGET-DEFAULT-GUARD`, which compares with the `cache` that
|
|
277
|
+
* {@link inferTargets} sets), and the executor fails a task of such a target
|
|
278
|
+
* that its configuration caches after all, so that Nx stores no result for it.
|
|
279
|
+
*/
|
|
280
|
+
export declare const cachedTargets: ReadonlySet<InferredTargetName>;
|
|
281
|
+
/** What the inference of a project's targets needs to know about the project. */
|
|
282
|
+
export interface TargetSubject {
|
|
283
|
+
/** The project's folder, relative to the repository root: `.` for the root itself. */
|
|
284
|
+
root: string;
|
|
285
|
+
/** The workspace the project belongs to. */
|
|
286
|
+
workspace: CargoWorkspace;
|
|
287
|
+
/** The crate; absent for a workspace project without a crate. */
|
|
288
|
+
pkg?: CargoPackage;
|
|
289
|
+
/** Whether the project hosts the workspace's own targets. */
|
|
290
|
+
isWorkspaceProject: boolean;
|
|
291
|
+
/** The project's settings, of which the crate's `artifacts` replace the inference of artifact targets. */
|
|
292
|
+
settings?: {
|
|
293
|
+
artifacts?: readonly ArtifactKind[];
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* The targets that the plugin infers for a project, by their default names,
|
|
298
|
+
* in the order of {@link inferredTargetNames}.
|
|
299
|
+
*
|
|
300
|
+
* A crate gets `build`, `check`, `lint`, `test`, `fmt-check` and `fmt`, `run`
|
|
301
|
+
* when it has a binary target, `bench` when it has a bench target, and
|
|
302
|
+
* `nx-release-publish` unless its manifest sets `publish = false`, which the
|
|
303
|
+
* report gives as an empty `publish` list, or it is the hack crate that the
|
|
304
|
+
* workspace's cargo-hakari configuration names (`DES-RELEASE`, "Publish
|
|
305
|
+
* target", "Hack crate"), `napi-build` where it produces a Node addon and
|
|
306
|
+
* `wasm-build` where it produces a wasm package, with the wasm target of
|
|
307
|
+
* `wasm-bindgen`'s own default in its options (`DES-ARTIFACT-STEPS`,
|
|
308
|
+
* `DES-WASM`). The
|
|
309
|
+
* workspace project gets `doc`, `lockfile`, `audit` and `update`, `deny`
|
|
310
|
+
* where a cargo-deny configuration file is in the workspace root, and
|
|
311
|
+
* `hakari-check` where the workspace uses the `hakari` strategy
|
|
312
|
+
* (`DES-UNIFICATION`, "Drift"), and `coverage-baseline` where it uses the
|
|
313
|
+
* selection of affected tests (`affectedTests`, `DES-BASELINE`); a root
|
|
314
|
+
* manifest's crate gets both sets. Whether a tool is installed decides
|
|
315
|
+
* nothing.
|
|
316
|
+
*
|
|
317
|
+
* Only the targets in {@link cachedTargets} are cached; their inputs and
|
|
318
|
+
* outputs, the exceptions for the artifact directory, and the dependency of
|
|
319
|
+
* every cached target but `fmt-check` on the lockfile task of its workspace,
|
|
320
|
+
* the one task dependency of a crate's target on another project
|
|
321
|
+
* (`REQ-NO-RUST-TASK-DEPS`), come from `configureCaching` in `caching.ts`.
|
|
322
|
+
* Where `cargo test` replaces the executables of the crate's `build`
|
|
323
|
+
* ({@link testReplacesExecutables}), `test` also depends on that `build`,
|
|
324
|
+
* cached or not, so that the two never run at the same time (`DES-TARGETS`).
|
|
325
|
+
*
|
|
326
|
+
* @param context What the caching of the graph's projects shares.
|
|
327
|
+
* @param caching What the project's settings change in its caching.
|
|
328
|
+
* @param locked The `locked` option of the plugin entry, which each target
|
|
329
|
+
* carries in its metadata for the executor ({@link TargetCargoMetadata}).
|
|
330
|
+
* @param targetNames The names that the plugin options give the inferred
|
|
331
|
+
* targets, under which `test` names the `build` it depends on.
|
|
332
|
+
*/
|
|
333
|
+
export declare function inferTargets(subject: TargetSubject, context: CacheContext, locked?: boolean, caching?: CacheOptions, targetNames?: TargetNames): Map<InferredTargetName, TargetConfiguration>;
|
|
334
|
+
/**
|
|
335
|
+
* The roots, relative to the repository root and sorted, of the crates whose
|
|
336
|
+
* `build` a crate's `test` waits for (`DES-TARGETS`, `ADR-WORKSPACE-TEST-EXECUTABLES`):
|
|
337
|
+
* every member of its workspace that has a project and for which `cargo
|
|
338
|
+
* test` replaces the executables that its `build` declares
|
|
339
|
+
* ({@link testReplacesExecutables}), the crate itself among them where it is
|
|
340
|
+
* one. Under `workspace-build`, every step of a `test` group selects the
|
|
341
|
+
* whole workspace, and such a command replaces those executables of every
|
|
342
|
+
* such member, of no other crate, and no `cdylib` or `staticlib` file, on
|
|
343
|
+
* Cargo 1.91.0 and 1.100.0 (`EVD-CARGO-ARTIFACT-WRITERS`, "Commands that
|
|
344
|
+
* select the whole workspace"); the rule counts a crate whatever the
|
|
345
|
+
* `required-features` of its targets, so that the set is a superset of the
|
|
346
|
+
* crates whose files cargo replaces. Under `hakari` and `cargo`, whose
|
|
347
|
+
* commands select their crates with `-p`, a `cargo test` replaces the
|
|
348
|
+
* executables of the crates it selects only, and a group selects those of
|
|
349
|
+
* its own tasks, each of which waits for its own crate's `build`: the crate
|
|
350
|
+
* itself, where it is one.
|
|
351
|
+
*/
|
|
352
|
+
export declare function testBuilds(subject: TargetSubject, repositoryRoot: string, strategy?: FeatureUnification): string[];
|
|
353
|
+
/**
|
|
354
|
+
* Gives each project's inferred targets the names that `targetNames` asks
|
|
355
|
+
* for, a target without an entry keeping its default name.
|
|
356
|
+
*
|
|
357
|
+
* @returns Each project's targets by name, in the order of `projects`.
|
|
358
|
+
* @throws {Error} When two inferred targets of one project would get one
|
|
359
|
+
* name, naming every such project, its targets and the name.
|
|
360
|
+
*/
|
|
361
|
+
export declare function nameTargets<P extends {
|
|
362
|
+
name: string;
|
|
363
|
+
manifest: string;
|
|
364
|
+
}>(projects: readonly {
|
|
365
|
+
project: P;
|
|
366
|
+
targets: Map<InferredTargetName, TargetConfiguration>;
|
|
367
|
+
}[], targetNames: TargetNames): Record<string, TargetConfiguration>[];
|