@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,420 @@
|
|
|
1
|
+
import type { TargetConfiguration } from "@nx/devkit";
|
|
2
|
+
import { ConfiguredTools } from "../cargo/configured-tools";
|
|
3
|
+
import type { CargoPackage } from "../cargo/metadata";
|
|
4
|
+
import type { CargoWorkspace } from "./discovery";
|
|
5
|
+
import type { ArtifactKind } from "./settings";
|
|
6
|
+
import type { InferredTargetName } from "./targets";
|
|
7
|
+
/**
|
|
8
|
+
* The name of the crate's own named input: the files that decide what the
|
|
9
|
+
* crate is when another crate builds it, the folders of the crates without a
|
|
10
|
+
* project that it reaches, what the repository adds to its key, and the
|
|
11
|
+
* repository's own `default` apart from its patterns under the project's
|
|
12
|
+
* folder (`DES-INPUTS`). Dependents hash it through `^default`.
|
|
13
|
+
*
|
|
14
|
+
* It is `default` because a `^` input fails the hash of a task when a project
|
|
15
|
+
* that the task's project depends on has no named input of that name
|
|
16
|
+
* (`EVD-NX-24-INPUTS-OUTPUTS`), and a crate can depend on a project of another
|
|
17
|
+
* plugin, such as a JS project. Every project has a `default`: Nx's own,
|
|
18
|
+
* `{projectRoot}/**\/*`, or the one in `nx.json`.
|
|
19
|
+
*/
|
|
20
|
+
export declare const crateInputName = "default";
|
|
21
|
+
/** An input as a target or a named input lists it. */
|
|
22
|
+
export type Input = NonNullable<TargetConfiguration["inputs"]>[number];
|
|
23
|
+
/** An input that is not a named input or a file pattern written as a string. */
|
|
24
|
+
export type InputDefinition = Exclude<Input, string>;
|
|
25
|
+
/** The feature-unification strategies of `DES-UNIFICATION`. */
|
|
26
|
+
export type FeatureUnification = "hakari" | "cargo" | "workspace-build";
|
|
27
|
+
/** The test runners of `DES-TEST-RUN`. */
|
|
28
|
+
export type TestRunner = "cargo" | "nextest";
|
|
29
|
+
/**
|
|
30
|
+
* The settings of `DES-PLUGIN-OPTIONS` that change a crate's inputs, from the
|
|
31
|
+
* plugin options and the metadata tables, with the strategy that the
|
|
32
|
+
* workspace uses (`workspaceStrategy` in `unification.ts`).
|
|
33
|
+
*/
|
|
34
|
+
export interface InputSettings {
|
|
35
|
+
/** The strategy that the workspace uses, after the checks of `DES-UNIFICATION`. */
|
|
36
|
+
featureUnification: FeatureUnification;
|
|
37
|
+
/**
|
|
38
|
+
* Under `hakari`, the files that stand in for the other members' manifests
|
|
39
|
+
* (`DES-INPUTS`, "Hack crate"), relative to the repository root: the
|
|
40
|
+
* configuration file of cargo-hakari and the hack crate's manifest.
|
|
41
|
+
*/
|
|
42
|
+
hakari?: {
|
|
43
|
+
configFile: string;
|
|
44
|
+
hackManifest: string;
|
|
45
|
+
};
|
|
46
|
+
/** The workspace's test runner. */
|
|
47
|
+
testRunner: TestRunner;
|
|
48
|
+
/**
|
|
49
|
+
* Whether the workspace uses the selection of affected tests
|
|
50
|
+
* (`affectedTests`), which gives its `test` the test mode input
|
|
51
|
+
* (`DES-TEST-MODE`). Absent means it does not.
|
|
52
|
+
*/
|
|
53
|
+
affectedTests?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* What the repository adds to the crate's key with `envInputs`,
|
|
56
|
+
* `runtimeInputs` and `fileInputs`, at every level that sets them
|
|
57
|
+
* (`DES-PLUGIN-OPTIONS`, "Added inputs"). They go into the crate's own
|
|
58
|
+
* named input, so that its dependents hash them too.
|
|
59
|
+
*/
|
|
60
|
+
added: AddedInputs;
|
|
61
|
+
}
|
|
62
|
+
/** What the repository adds to a crate's key. */
|
|
63
|
+
export interface AddedInputs {
|
|
64
|
+
/** Names of environment variables. */
|
|
65
|
+
envInputs: readonly string[];
|
|
66
|
+
/** Commands whose output joins the key. */
|
|
67
|
+
runtimeInputs: readonly string[];
|
|
68
|
+
/**
|
|
69
|
+
* Filesets for the patterns of `fileInputs`, already resolved against the
|
|
70
|
+
* folder of the manifest that holds them, with `includeIgnored`
|
|
71
|
+
* (`declaredFiles` in `declared-files.ts`).
|
|
72
|
+
*/
|
|
73
|
+
fileInputs: readonly InputDefinition[];
|
|
74
|
+
}
|
|
75
|
+
/** The settings of a workspace that sets none of them. */
|
|
76
|
+
export declare const defaultInputSettings: InputSettings;
|
|
77
|
+
/**
|
|
78
|
+
* How the plugin's own version reaches the key (`DES-INPUTS`, "Plugin"):
|
|
79
|
+
* through the npm node that Nx has for its package, or through the target
|
|
80
|
+
* option `pluginVersion`.
|
|
81
|
+
*/
|
|
82
|
+
export type PluginInput = {
|
|
83
|
+
kind: "node";
|
|
84
|
+
packageName: string;
|
|
85
|
+
} | {
|
|
86
|
+
kind: "option";
|
|
87
|
+
version: string;
|
|
88
|
+
};
|
|
89
|
+
/** What the inputs of a project's targets need to know about the project. */
|
|
90
|
+
export interface InputSubject {
|
|
91
|
+
/** The project's folder, relative to the repository root: `.` for the root itself. */
|
|
92
|
+
root: string;
|
|
93
|
+
/** The workspace the project belongs to. */
|
|
94
|
+
workspace: CargoWorkspace;
|
|
95
|
+
/** The crate; absent for a workspace project without a crate. */
|
|
96
|
+
pkg?: CargoPackage;
|
|
97
|
+
/** Whether the project hosts the workspace's own targets. */
|
|
98
|
+
isWorkspaceProject: boolean;
|
|
99
|
+
/** The project's settings, of which the crate's `artifacts` replace the inference of artifact targets. */
|
|
100
|
+
settings?: {
|
|
101
|
+
artifacts?: readonly ArtifactKind[];
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
/** What the inputs of every project share. */
|
|
105
|
+
export interface InputContext {
|
|
106
|
+
/** The absolute path of the repository root. */
|
|
107
|
+
repositoryRoot: string;
|
|
108
|
+
/** How the plugin's version reaches the keys. */
|
|
109
|
+
plugin: PluginInput;
|
|
110
|
+
/**
|
|
111
|
+
* The entries of the repository's `default` named input that the crate's
|
|
112
|
+
* own keeps ({@link repositoryDefaultInputs}).
|
|
113
|
+
*/
|
|
114
|
+
repositoryDefault: readonly Input[];
|
|
115
|
+
/**
|
|
116
|
+
* The inputs for the crates without a project that each crate reaches, by
|
|
117
|
+
* the crate's manifest path: each one's folder, the root manifest of its
|
|
118
|
+
* workspace, its declared files and the variables and commands it adds
|
|
119
|
+
* (`findCrateFolders` in `path-dependencies.ts`).
|
|
120
|
+
*/
|
|
121
|
+
pathDependencyInputs: ReadonlyMap<string, readonly Input[]>;
|
|
122
|
+
/**
|
|
123
|
+
* The inputs for the redirected crates with a project that each crate may
|
|
124
|
+
* use but has no edge to, by the crate's manifest path: the same for each
|
|
125
|
+
* one and for the crates that cargo builds with it
|
|
126
|
+
* (`RedirectedUse.brings`).
|
|
127
|
+
*/
|
|
128
|
+
redirectedInputs: ReadonlyMap<string, readonly Input[]>;
|
|
129
|
+
/**
|
|
130
|
+
* The inputs for the path crates outside a crate's workspace that any
|
|
131
|
+
* member of the workspace reaches, which a build of the whole workspace
|
|
132
|
+
* compiles with it (`DES-INPUTS`, "Crates outside the workspace"), by the
|
|
133
|
+
* key of {@link wholeWorkspaceKey}: each one's folder, the root manifest
|
|
134
|
+
* of its workspace, its declared files and the variables and commands it
|
|
135
|
+
* adds, as for a path dependency without a project, without the crates
|
|
136
|
+
* whose folders the crate's inputs hold already (`findCrateFolders` in
|
|
137
|
+
* `path-dependencies.ts`). A crate's own manifest decides the features it
|
|
138
|
+
* asks of a member, and a variable or command it adds can stand for files
|
|
139
|
+
* that Nx cannot see, such as that manifest.
|
|
140
|
+
*/
|
|
141
|
+
outsideCrateInputs?: ReadonlyMap<string, readonly Input[]>;
|
|
142
|
+
/**
|
|
143
|
+
* The manifests inside the repository of the path packages that each
|
|
144
|
+
* workspace's members reach, by the workspace's root folder relative to
|
|
145
|
+
* the repository root, as `{workspaceRoot}` paths: the crates of path
|
|
146
|
+
* dependencies, with a project or without, and those of the workspace's
|
|
147
|
+
* `[patch]` and `[replace]` entries, with the path packages behind them.
|
|
148
|
+
* The lockfile task reads them as inputs (`DES-WORKSPACE-TARGETS`).
|
|
149
|
+
*/
|
|
150
|
+
pathPackageManifests?: ReadonlyMap<string, readonly string[]>;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* The environment variables of `DES-INPUTS` that every cached target hashes,
|
|
154
|
+
* apart from those for a triple and those for some targets only.
|
|
155
|
+
*/
|
|
156
|
+
export declare const environmentVariables: readonly ["RUSTFLAGS", "CARGO_ENCODED_RUSTFLAGS", "RUSTDOCFLAGS", "CARGO_ENCODED_RUSTDOCFLAGS", "RUSTC", "RUSTC_WRAPPER", "RUSTC_WORKSPACE_WRAPPER", "RUSTDOC", "RUSTC_BOOTSTRAP", "CARGO_BUILD_TARGET", "CARGO_BUILD_RUSTFLAGS", "CARGO_BUILD_RUSTDOCFLAGS", "CARGO_BUILD_RUSTC", "CARGO_BUILD_RUSTC_WRAPPER", "CARGO_BUILD_RUSTC_WORKSPACE_WRAPPER", "CARGO_BUILD_RUSTDOC", "CC", "CXX", "AR", "CFLAGS", "CXXFLAGS", "PKG_CONFIG_PATH", "MACOSX_DEPLOYMENT_TARGET", "OPENSSL_DIR", "OPENSSL_LIB_DIR", "OPENSSL_INCLUDE_DIR", "OPENSSL_STATIC", "OPENSSL_NO_VENDOR"];
|
|
157
|
+
/**
|
|
158
|
+
* The targets that get the inputs of `DES-INPUTS`: the cached targets of
|
|
159
|
+
* `DES-TARGETS`, and `fmt`, `bench` and `run`, which are not cached but
|
|
160
|
+
* whose inputs make `nx affected` select them.
|
|
161
|
+
*/
|
|
162
|
+
export declare const crateInputTargets: ReadonlySet<InferredTargetName>;
|
|
163
|
+
/**
|
|
164
|
+
* The project's named inputs: {@link crateInputName}, which its targets and
|
|
165
|
+
* those of its dependents hash.
|
|
166
|
+
*
|
|
167
|
+
* It holds every file of the project's folder that belongs to no nested
|
|
168
|
+
* project, except the files that `napi-build` writes there
|
|
169
|
+
* ({@link napiOutputFiles}), the package folder that `wasm-build` writes
|
|
170
|
+
* there ({@link wasmPackageFolder}) and the workspace's `Cargo.lock` where the
|
|
171
|
+
* folder is the workspace root, which reaches the keys of the crate and of those that
|
|
172
|
+
* depend on it only through the digests of the lockfile task
|
|
173
|
+
* ({@link externalDependencyInputs}); the root manifest of the crate's
|
|
174
|
+
* workspace, whose fields the crate can inherit, also when another
|
|
175
|
+
* workspace builds it (`EVD-CARGO-DEPENDENCY-SIDE`); the folder and
|
|
176
|
+
* workspace manifest of every crate without a project that the crate
|
|
177
|
+
* reaches, with what each of them declares and adds; what the repository
|
|
178
|
+
* adds; and the repository's own `default` without its patterns under the
|
|
179
|
+
* project's folder. A variable or command that a crate without a project
|
|
180
|
+
* adds appears once, and not where the crate's own additions or the
|
|
181
|
+
* repository's `default` hold it ({@link withoutRepeatedAdditions}). A
|
|
182
|
+
* pattern that the repository negates in a target's own `inputs` takes
|
|
183
|
+
* files out of it, on the repository's responsibility.
|
|
184
|
+
*/
|
|
185
|
+
export declare function namedInputs(subject: InputSubject, context: InputContext, settings?: InputSettings): Record<string, Input[]>;
|
|
186
|
+
/**
|
|
187
|
+
* The entries of the repository's `default` named input, from `nx.json`,
|
|
188
|
+
* that a crate's own `default` keeps: every entry but a file set under
|
|
189
|
+
* `{projectRoot}`, negated or not, and a reference to `default` itself.
|
|
190
|
+
* Named inputs such as `sharedGlobals`, `env`, `runtime` and
|
|
191
|
+
* `externalDependencies` entries and file sets under `{workspaceRoot}` thus
|
|
192
|
+
* still reach a crate's key, while what the crate hashes of its own folder
|
|
193
|
+
* is the plugin's to say (`DES-INPUTS`). Nx's own `default`, where `nx.json`
|
|
194
|
+
* has none, holds nothing else.
|
|
195
|
+
*/
|
|
196
|
+
export declare function repositoryDefaultInputs(namedInputs: unknown): Input[];
|
|
197
|
+
/**
|
|
198
|
+
* The inputs of one of the project's targets, in the order of the table in
|
|
199
|
+
* `DES-INPUTS`: the crate's files and those of its dependencies, the
|
|
200
|
+
* workspace files, the redirected crates that the crate may use without an
|
|
201
|
+
* edge, the members' manifests, the path crates outside the workspace that
|
|
202
|
+
* any member reaches, the tool's configuration, the external dependencies,
|
|
203
|
+
* the environment, the toolchain with Cargo's profile and target
|
|
204
|
+
* variables, and the plugin. A variable or command that a redirected crate
|
|
205
|
+
* without an edge or a crate outside the workspace adds appears once, and
|
|
206
|
+
* not where the crate's named input or another entry of the target holds
|
|
207
|
+
* it.
|
|
208
|
+
*
|
|
209
|
+
* Under the `cargo` and `workspace-build` strategies, a target that reads
|
|
210
|
+
* digests holds what a build of the whole workspace compiles the crate
|
|
211
|
+
* with: the digests of every member ({@link holdsEveryDigest}) and the
|
|
212
|
+
* crates outside the workspace that any member reaches
|
|
213
|
+
* ({@link InputContext.outsideCrateInputs}), beside every member's manifest
|
|
214
|
+
* (`DES-INPUTS`, "Whole-workspace builds").
|
|
215
|
+
*
|
|
216
|
+
* @param readsDigest Whether the target depends on the workspace's lockfile
|
|
217
|
+
* task and hashes digests of it: a cached target other than `fmt-check`
|
|
218
|
+
* (`DES-LOCKFILE-HASHING`).
|
|
219
|
+
* @returns `undefined` for a target that `DES-INPUTS` gives no such inputs:
|
|
220
|
+
* `lockfile`, `audit`, `deny` and `update` keep theirs from
|
|
221
|
+
* `DES-WORKSPACE-TARGETS`.
|
|
222
|
+
*/
|
|
223
|
+
export declare function targetInputs(target: InferredTargetName, subject: InputSubject, context: InputContext, settings?: InputSettings, readsDigest?: boolean): Input[] | undefined;
|
|
224
|
+
/**
|
|
225
|
+
* The key under which {@link InputContext.outsideCrateInputs} holds a
|
|
226
|
+
* project's inputs: the manifest of its crate, or for a workspace project
|
|
227
|
+
* without one, the root manifest of its workspace, whose `doc` builds every
|
|
228
|
+
* member.
|
|
229
|
+
*/
|
|
230
|
+
export declare function wholeWorkspaceKey(subject: Pick<InputSubject, "pkg" | "workspace">): string;
|
|
231
|
+
/**
|
|
232
|
+
* Whether a target that depends on the lockfile task holds the digests of
|
|
233
|
+
* every member of its workspace rather than its crate's own
|
|
234
|
+
* (`DES-LOCKFILE-HASHING`, "Crate targets"): `doc`, which builds every
|
|
235
|
+
* member, a workspace project without a crate, and every such target under
|
|
236
|
+
* the `cargo` and `workspace-build` strategies, which build each crate with
|
|
237
|
+
* the features of the whole workspace (`DES-INPUTS`, "External
|
|
238
|
+
* dependencies"). Under `hakari`, the others hold their crate's own.
|
|
239
|
+
*/
|
|
240
|
+
export declare function holdsEveryDigest(target: InferredTargetName, subject: Pick<InputSubject, "pkg">, settings: Pick<InputSettings, "featureUnification">): boolean;
|
|
241
|
+
/**
|
|
242
|
+
* The manifests of the workspace's members as `{workspaceRoot}` paths, those
|
|
243
|
+
* inside the repository only, because Nx hashes no file outside it; sorted,
|
|
244
|
+
* and without `except`.
|
|
245
|
+
*/
|
|
246
|
+
export declare function memberManifests(workspace: CargoWorkspace, repositoryRoot: string, except?: string): string[];
|
|
247
|
+
/**
|
|
248
|
+
* The external dependencies of the crate (`DES-INPUTS`, "External
|
|
249
|
+
* dependencies"). A target that depends on the workspace's lockfile task
|
|
250
|
+
* hashes digests among that task's outputs: those of every member where
|
|
251
|
+
* {@link holdsEveryDigest} says so, otherwise the crate's own, through a
|
|
252
|
+
* `dependentTasksOutputFiles` input, with an `env` input for
|
|
253
|
+
* `NX_RUST_RUN_ID`, which a run that excludes task dependencies sets to a
|
|
254
|
+
* new value (`DES-LOCKFILE-HASHING`). It has no
|
|
255
|
+
* `Cargo.lock` as a file input: Nx hashes such an input before the run
|
|
256
|
+
* starts, before the lockfile task can update the file
|
|
257
|
+
* (`EVD-NX-24-LOCKFILE-UPDATE`).
|
|
258
|
+
*
|
|
259
|
+
* A target that is not cached, `bench` and `run`, or `build` and `doc`
|
|
260
|
+
* where the plugin leaves them uncached, does not depend on the lockfile
|
|
261
|
+
* task. Its inputs only decide what `nx affected` selects, so it names the
|
|
262
|
+
* workspace's `Cargo.lock`, read also where Git ignores it, as `audit` and
|
|
263
|
+
* `update` do (`DES-INPUTS`, "Uncached targets").
|
|
264
|
+
*
|
|
265
|
+
* `fmt` and `fmt-check` have neither: `cargo fmt` reads no lockfile.
|
|
266
|
+
*/
|
|
267
|
+
export declare function externalDependencyInputs(target: InferredTargetName, subject: InputSubject, workspaceRoot: string, readsDigest: boolean, settings?: Pick<InputSettings, "featureUnification">): InputDefinition[];
|
|
268
|
+
/**
|
|
269
|
+
* The inputs of the lockfile task (`DES-WORKSPACE-TARGETS`), which only
|
|
270
|
+
* decide what `nx affected` selects, since the task is not cached: the
|
|
271
|
+
* workspace's `Cargo.lock`, read also where Git ignores it, its root
|
|
272
|
+
* manifest, the manifests of its members and of the path packages they
|
|
273
|
+
* reach inside the repository, the workspace files that apply in the
|
|
274
|
+
* workspace root, where the task's cargo runs, and the plugin's input
|
|
275
|
+
* ({@link pluginVersionInput}). The files are named from the repository
|
|
276
|
+
* root, because a pattern under the workspace project's root misses the
|
|
277
|
+
* files of the crate projects nested in it (`EVD-NX-24-LOCKFILE-UPDATE`).
|
|
278
|
+
*/
|
|
279
|
+
export declare function lockfileInputs(subject: InputSubject, context: InputContext): Input[];
|
|
280
|
+
/**
|
|
281
|
+
* One `env` input per variable of `DES-INPUTS` that applies to the target:
|
|
282
|
+
* the fixed list, `CARGO_BUILD_WARNINGS` on the targets that compile, and
|
|
283
|
+
* `CLIPPY_CONF_DIR` on `lint`. The variables whose names start with
|
|
284
|
+
* `CARGO_PROFILE_` or `CARGO_TARGET_` are in the toolchain command instead
|
|
285
|
+
* ({@link toolchainCommand}).
|
|
286
|
+
*/
|
|
287
|
+
export declare function environmentInputs(target: InferredTargetName): InputDefinition[];
|
|
288
|
+
/**
|
|
289
|
+
* The command of the toolchain input, one shell per task's key (`DES-INPUTS`,
|
|
290
|
+
* `REQ-TOOLCHAIN-KEY`). In the workspace root, where the plugin's cargo
|
|
291
|
+
* commands run, it prints:
|
|
292
|
+
*
|
|
293
|
+
* - what `rustc -Vv` writes, as rustup or `PATH` resolve it there with the
|
|
294
|
+
* task's environment: the toolchain of the task's cargo, and the compiler
|
|
295
|
+
* that cargo runs where no setting names another;
|
|
296
|
+
* - where a setting names another compiler, what that compiler's `-Vv`
|
|
297
|
+
* writes: the one that `RUSTC` in the task's environment names, else
|
|
298
|
+
* `CARGO_BUILD_RUSTC`, else `build.rustc` of Cargo's configuration as
|
|
299
|
+
* graph creation read it, which may name two (`configuredTools`);
|
|
300
|
+
* - with `rustdoc`, for the targets that run it, the same for the rustdoc
|
|
301
|
+
* that `RUSTDOC`, `CARGO_BUILD_RUSTDOC` or `build.rustdoc` names;
|
|
302
|
+
* - every variable of the task's environment whose name starts with
|
|
303
|
+
* `CARGO_PROFILE_` or `CARGO_TARGET_`, with its value, sorted, apart from
|
|
304
|
+
* `CARGO_TARGET_DIR`, which says where the artifacts go and not what they
|
|
305
|
+
* are (`REQ-ENV-ALLOWLIST`). Those two families are open ended, with a
|
|
306
|
+
* profile's or a triple's name in each variable, so no list of `env`
|
|
307
|
+
* inputs can name them;
|
|
308
|
+
* - on a `test` that nextest runs, what `cargo nextest --version` writes in
|
|
309
|
+
* the workspace root, as cargo finds nextest there with the task's
|
|
310
|
+
* environment, or `cargo-nextest: not found` where it fails, so that
|
|
311
|
+
* another version of nextest, or none, changes the key, and every
|
|
312
|
+
* variable whose name starts with `NEXTEST_`, with its value, sorted in
|
|
313
|
+
* with the others: they choose nextest's profile or change what its run
|
|
314
|
+
* does, and no list names them all either.
|
|
315
|
+
*
|
|
316
|
+
* A named program runs as cargo runs it: a path with a `/` from the
|
|
317
|
+
* workspace root, which is also cargo's folder, and a bare name through
|
|
318
|
+
* `PATH`. Where nothing names a compiler or a rustdoc, the command prints
|
|
319
|
+
* what it printed before these settings counted, so those keys stay the
|
|
320
|
+
* same: Nx keys a runtime input on what it prints, not on its text
|
|
321
|
+
* (`EVD-CARGO-COMPILER-SELECTION`). Nx runs the command through `sh -c` in
|
|
322
|
+
* the repository root, with the task's dotenv files loaded
|
|
323
|
+
* (`EVD-NX-24-INPUT-SEMANTICS`).
|
|
324
|
+
*
|
|
325
|
+
* rustup may not install a toolchain for it (`ADR-GRAPH-NO-TOOLCHAIN-INSTALL`).
|
|
326
|
+
* When a version query fails, as for a pinned toolchain that is not
|
|
327
|
+
* installed, for a named compiler that does not exist or for an empty
|
|
328
|
+
* `RUSTC`, on which cargo fails too, or when the folder is missing, the
|
|
329
|
+
* command prints a random value in its place, new at each evaluation, so
|
|
330
|
+
* that no result stored under the key is ever restored and the task runs
|
|
331
|
+
* as plain cargo would (`EVD-RUSTUP-MISSING-TOOLCHAIN`). The command always
|
|
332
|
+
* ends with status 0; Nx keys a task on what a runtime input prints
|
|
333
|
+
* whatever its status.
|
|
334
|
+
*
|
|
335
|
+
* @param workspaceRoot The workspace's root folder, relative to the repository root.
|
|
336
|
+
* @param tools What `build.rustc` and `build.rustdoc` name in the workspace root.
|
|
337
|
+
* @param rustdoc Whether the target's cargo command runs rustdoc.
|
|
338
|
+
* @param nextest Whether nextest runs the target's tests; without it the
|
|
339
|
+
* command is the one it has always been, so that no other key changes.
|
|
340
|
+
*/
|
|
341
|
+
export declare function toolchainCommand(workspaceRoot: string, tools?: ConfiguredTools, rustdoc?: boolean, nextest?: boolean): string;
|
|
342
|
+
/**
|
|
343
|
+
* Shell text that prints each variable of the environment whose name
|
|
344
|
+
* matches the extended regular expression `pattern`, apart from
|
|
345
|
+
* `CARGO_TARGET_DIR`, as one line `NAME=value`, sorted bytewise
|
|
346
|
+
* (`DES-INPUTS`, "Variables"). It reads the variables with POSIX awk's
|
|
347
|
+
* `ENVIRON`, so that a value holds whatever it holds: a line of `env`'s
|
|
348
|
+
* output cannot tell the continuation of a multi-line value from another
|
|
349
|
+
* variable, which let the end of such a value leave the key and a variable
|
|
350
|
+
* of another name enter it. In a name or value that holds a backslash or a
|
|
351
|
+
* line break, a backslash becomes `\\` and a line break `\n`, so that each
|
|
352
|
+
* variable keeps one line and two environments never print the same text;
|
|
353
|
+
* any other line is what `env` printed, so that those keys stay the same.
|
|
354
|
+
* After the last variable it prints the line {@link variablesEnd}, since
|
|
355
|
+
* Nx trims the whitespace at the end of what a runtime input prints, which
|
|
356
|
+
* would otherwise take a trailing space off the last value
|
|
357
|
+
* (`EVD-RUNTIME-INPUT-SCRIPTS`). Where awk fails, the text prints a value
|
|
358
|
+
* that no other evaluation prints ({@link unrepeatableValue}), as the
|
|
359
|
+
* toolchain's versions do.
|
|
360
|
+
*/
|
|
361
|
+
/** The line after the variables of the toolchain command ({@link variablesCommand}). */
|
|
362
|
+
export declare const variablesEnd = "end of variables";
|
|
363
|
+
/**
|
|
364
|
+
* The command of the artifact input of a cached `build` and `doc`, one per
|
|
365
|
+
* workspace (`DES-INPUTS`, `DES-OUTPUTS`): the plugin's own script prints
|
|
366
|
+
* the triples that cargo will build for in the workspace root without
|
|
367
|
+
* `--target`, read with the function that graph creation uses, and the
|
|
368
|
+
* artifact directory that cargo reports there, as the outputs name it,
|
|
369
|
+
* both with the task's environment. The key thereby follows the folders
|
|
370
|
+
* that the task's cargo will write to, also where the graph that the Nx
|
|
371
|
+
* daemon keeps is older than a change to a configuration file that Nx does
|
|
372
|
+
* not watch, such as the Cargo home's, and where a dotenv file that Nx loads
|
|
373
|
+
* only for the task moves the artifact directory; the outputs still name
|
|
374
|
+
* the graph's folders, and the executor then fails the task before cargo
|
|
375
|
+
* runs (`taskInvocation` in `task.ts`).
|
|
376
|
+
*
|
|
377
|
+
* The command names Node, the script and the workspace root, relative to
|
|
378
|
+
* the repository root where Nx runs it, by paths that reach no key: Nx keys
|
|
379
|
+
* a task on what a runtime input prints and not on its command, and the
|
|
380
|
+
* script prints no path of the checkout, so checkouts in other folders
|
|
381
|
+
* share the keys (`EVD-CARGO-TRIPLE-FOLDERS`). Where the script cannot run,
|
|
382
|
+
* as for a plugin that Nx loads from its TypeScript source, or cargo fails,
|
|
383
|
+
* as for a pinned toolchain that is not installed, the command prints a
|
|
384
|
+
* line that says so and a random value, new at each evaluation, so that no
|
|
385
|
+
* result stored under the key is ever restored ({@link scriptInputCommand}),
|
|
386
|
+
* and the executor says why when the task runs. It always ends with status
|
|
387
|
+
* 0, like {@link toolchainCommand}.
|
|
388
|
+
*
|
|
389
|
+
* @param workspaceRoot The workspace's root folder, relative to the repository root.
|
|
390
|
+
*/
|
|
391
|
+
export declare function artifactFoldersCommand(workspaceRoot: string, script?: string): string;
|
|
392
|
+
/**
|
|
393
|
+
* The command of the test mode input of a `test` in a workspace that uses
|
|
394
|
+
* selection (`DES-TEST-MODE`, `REQ-TEST-MODE-KEY`): the plugin's own script
|
|
395
|
+
* prints `full`, `affected:<baseline commits>`, or a line that names an
|
|
396
|
+
* invalid `NX_RUST_TEST_MODE`, from the task's environment and
|
|
397
|
+
* cargo-affected's database in the workspace root, read without writing to
|
|
398
|
+
* it and without starting cargo-affected. Nx runs it in the repository
|
|
399
|
+
* root with the task's environment, afresh for every task of every run
|
|
400
|
+
* (`EVD-NX-24-INPUT-SEMANTICS`), and the test executor decides the mode by
|
|
401
|
+
* the same rule. Like {@link artifactFoldersCommand}, it names Node, the
|
|
402
|
+
* script and the workspace root by paths that reach no key, and where the
|
|
403
|
+
* script cannot run, as for a plugin that Nx loads from its TypeScript
|
|
404
|
+
* source, it prints a line that says so and a random value, new at each
|
|
405
|
+
* evaluation, so that no stored result is restored
|
|
406
|
+
* ({@link scriptInputCommand}). It always ends with status 0.
|
|
407
|
+
*
|
|
408
|
+
* @param workspaceRoot The workspace's root folder, relative to the repository root.
|
|
409
|
+
*/
|
|
410
|
+
export declare function testModeCommand(workspaceRoot: string, script?: string): string;
|
|
411
|
+
/**
|
|
412
|
+
* The input that carries the plugin's own version into the key
|
|
413
|
+
* (`DES-INPUTS`, "Plugin"): the plugin's package, where Nx has an npm node
|
|
414
|
+
* for it, and no external node otherwise. Every inferred target has it. On
|
|
415
|
+
* an uncached target it only decides what `nx affected` selects: an upgrade
|
|
416
|
+
* of the plugin selects the target, and a change to the JS lockfile outside
|
|
417
|
+
* the plugin's package does not, as it would without an
|
|
418
|
+
* `externalDependencies` input (`EVD-NX-24-EXTERNAL-NODES`).
|
|
419
|
+
*/
|
|
420
|
+
export declare function pluginVersionInput(plugin: PluginInput): InputDefinition;
|