@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.
- package/LICENSE-APACHE +201 -0
- package/LICENSE-MIT +21 -0
- package/README.md +47 -1
- package/executors.json +35 -0
- package/generators.json +19 -0
- package/package.json +17 -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
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.spread = void 0;
|
|
4
|
+
exports.otherSourcePlugins = otherSourcePlugins;
|
|
5
|
+
exports.laterPlugins = laterPlugins;
|
|
6
|
+
exports.byKey = byKey;
|
|
7
|
+
exports.isInferred = isInferred;
|
|
8
|
+
exports.isGlobPattern = isGlobPattern;
|
|
9
|
+
exports.rebuildLayers = rebuildLayers;
|
|
10
|
+
exports.rebuild = rebuild;
|
|
11
|
+
exports.pluginEntryNameIn = pluginEntryNameIn;
|
|
12
|
+
exports.pluginEntryName = pluginEntryName;
|
|
13
|
+
exports.optionOrigins = optionOrigins;
|
|
14
|
+
exports.loadTargetDefaultsInternals = loadTargetDefaultsInternals;
|
|
15
|
+
exports.appliedElements = appliedElements;
|
|
16
|
+
exports.appliedEntry = appliedEntry;
|
|
17
|
+
exports.includes = includes;
|
|
18
|
+
exports.canonical = canonical;
|
|
19
|
+
exports.isRecord = isRecord;
|
|
20
|
+
exports.compare = compare;
|
|
21
|
+
const tslib_1 = require("tslib");
|
|
22
|
+
const node_fs_1 = require("node:fs");
|
|
23
|
+
const node_path_1 = require("node:path");
|
|
24
|
+
const nx_bridge_1 = require("../compatibility/nx-bridge");
|
|
25
|
+
const plugin_package_1 = require("./plugin-package");
|
|
26
|
+
const projects_1 = require("./projects");
|
|
27
|
+
const targets_1 = require("./targets");
|
|
28
|
+
exports.spread = "...";
|
|
29
|
+
/** A source plugin that no `filter.plugin` of `targetDefaults` names. */
|
|
30
|
+
const unnamedSource = "\0another plugin";
|
|
31
|
+
/**
|
|
32
|
+
* The names of the plugins other than this one that may be the source of a
|
|
33
|
+
* target of this plugin, as Nx's synthesis of target defaults reads it for
|
|
34
|
+
* `filter.plugin`: the plugin whose node first gave the target the executor
|
|
35
|
+
* that it has, which keeps that source when this plugin gives the same
|
|
36
|
+
* executor (`getMergeValueResult` in Nx's
|
|
37
|
+
* `project-graph/utils/project-configuration/utils.js`). Graph creation
|
|
38
|
+
* cannot see which plugin that was. So where `nx.json` lists a plugin other
|
|
39
|
+
* than this one, each other plugin that an element's `filter.plugin` names
|
|
40
|
+
* may be it, and so may one that none names, which `unnamedSource` stands
|
|
41
|
+
* for; where `nx.json` lists none, this plugin is the source.
|
|
42
|
+
*/
|
|
43
|
+
function otherSourcePlugins(targetDefaults, plugin, nxJson, workspaceRoot) {
|
|
44
|
+
var _a;
|
|
45
|
+
const listsOther = ((_a = nxJson.plugins) !== null && _a !== void 0 ? _a : []).some((entry) => !isThisPlugin(typeof entry === "string" ? entry : entry.plugin, workspaceRoot));
|
|
46
|
+
if (!listsOther) {
|
|
47
|
+
return [];
|
|
48
|
+
}
|
|
49
|
+
const named = new Set();
|
|
50
|
+
for (const value of Object.values(targetDefaults)) {
|
|
51
|
+
for (const element of Array.isArray(value) ? value : [value]) {
|
|
52
|
+
const filter = isRecord(element) ? element.filter : undefined;
|
|
53
|
+
if (isRecord(filter) && typeof filter.plugin === "string" && filter.plugin !== plugin) {
|
|
54
|
+
named.add(filter.plugin);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return [...named, unnamedSource];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The plugins that `nx.json` lists after the first entry of this plugin, as
|
|
62
|
+
* it writes them, once each: the ones whose targets Nx merges over this
|
|
63
|
+
* plugin's, where they can replace its lists. A plugin listed before it
|
|
64
|
+
* cannot, since this plugin's lists replace its own.
|
|
65
|
+
*/
|
|
66
|
+
function laterPlugins(nxJson, workspaceRoot) {
|
|
67
|
+
var _a;
|
|
68
|
+
const names = ((_a = nxJson.plugins) !== null && _a !== void 0 ? _a : []).map((entry) => typeof entry === "string" ? entry : entry.plugin);
|
|
69
|
+
const first = names.findIndex((name) => isThisPlugin(name, workspaceRoot));
|
|
70
|
+
return [...new Set(names.slice(first + 1).filter((name) => !isThisPlugin(name, workspaceRoot)))];
|
|
71
|
+
}
|
|
72
|
+
// The entries given, one for each key, with the positions of its elements
|
|
73
|
+
// joined, in the order in which the keys first appear.
|
|
74
|
+
function byKey(entries) {
|
|
75
|
+
var _a;
|
|
76
|
+
const joined = [];
|
|
77
|
+
for (const entry of entries) {
|
|
78
|
+
const same = joined.find(({ key }) => key === entry.key);
|
|
79
|
+
if (same === undefined) {
|
|
80
|
+
joined.push(Object.assign(Object.assign({}, entry), (entry.indices === undefined ? {} : { indices: [...entry.indices] })));
|
|
81
|
+
}
|
|
82
|
+
else if (entry.indices !== undefined) {
|
|
83
|
+
same.indices = [...new Set([...((_a = same.indices) !== null && _a !== void 0 ? _a : []), ...entry.indices])].sort((a, b) => a - b);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return joined;
|
|
87
|
+
}
|
|
88
|
+
// Whether the plugin infers the target: an extra target that a target table
|
|
89
|
+
// of the Cargo metadata defines has no record of the plugin's own.
|
|
90
|
+
function isInferred(target) {
|
|
91
|
+
var _a;
|
|
92
|
+
return ((_a = target.metadata) === null || _a === void 0 ? void 0 : _a[targets_1.targetCargoMetadataKey]) !== undefined;
|
|
93
|
+
}
|
|
94
|
+
// Whether Nx reads a name as a glob pattern (`isGlobPattern` in `nx/src/utils/globs.js`).
|
|
95
|
+
function isGlobPattern(name) {
|
|
96
|
+
return /[*|{}()[]/.test(name);
|
|
97
|
+
}
|
|
98
|
+
// The three layers of the projects at `roots`, built with Nx's own code.
|
|
99
|
+
function rebuildLayers(nx, projects, plugin, context, roots, view) {
|
|
100
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
102
|
+
const nxJson = (_a = context.nxJsonConfiguration) !== null && _a !== void 0 ? _a : {};
|
|
103
|
+
const specified = {};
|
|
104
|
+
const sourceMaps = {};
|
|
105
|
+
const nodes = (0, projects_1.projectNodes)(projects);
|
|
106
|
+
for (const [index, [manifest, result]] of nodes.entries()) {
|
|
107
|
+
for (const [root, project] of Object.entries((_b = result.projects) !== null && _b !== void 0 ? _b : {})) {
|
|
108
|
+
const node = structuredClone(Object.assign(Object.assign({}, project), { root }));
|
|
109
|
+
const declared = view === null || view === void 0 ? void 0 : view.declared;
|
|
110
|
+
if (declared !== undefined && node.targets !== undefined) {
|
|
111
|
+
const owner = projects[index];
|
|
112
|
+
node.targets = Object.fromEntries(Object.entries(node.targets).map(([name, target]) => [name, declared(owner, target)]));
|
|
113
|
+
}
|
|
114
|
+
nx.mergeProject(specified, node, sourceMaps, [manifest, plugin !== null && plugin !== void 0 ? plugin : ""], false);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
const defaults = yield nx.defaultNodes(declarationFiles(roots, context.fileMap), nxJson, context.workspaceRoot);
|
|
118
|
+
// The default layer as Nx stages it for the synthesis.
|
|
119
|
+
const staged = {};
|
|
120
|
+
for (const { project } of defaults) {
|
|
121
|
+
nx.mergeProject(staged, structuredClone(project), undefined, undefined, true);
|
|
122
|
+
}
|
|
123
|
+
// The synthesis reads a project's name and tags from both layers; those
|
|
124
|
+
// that another plugin gave it are known only from the merged graph.
|
|
125
|
+
const seen = structuredClone(specified);
|
|
126
|
+
for (const [root, project] of Object.entries(seen)) {
|
|
127
|
+
const merged = (_c = view === null || view === void 0 ? void 0 : view.asMerged) === null || _c === void 0 ? void 0 : _c.get(root);
|
|
128
|
+
if (merged !== undefined) {
|
|
129
|
+
project.name = (_d = merged.name) !== null && _d !== void 0 ? _d : project.name;
|
|
130
|
+
project.tags = [...new Set([...((_e = project.tags) !== null && _e !== void 0 ? _e : []), ...((_f = merged.tags) !== null && _f !== void 0 ? _f : [])])];
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const synthesis = (source) => nx.createTargetDefaultsResults(structuredClone(seen), structuredClone(staged), nxJson, source === undefined ? sourceMaps : withSource(sourceMaps, plugin !== null && plugin !== void 0 ? plugin : "", source));
|
|
134
|
+
const targetDefaults = synthesis(undefined);
|
|
135
|
+
return {
|
|
136
|
+
specified,
|
|
137
|
+
targetDefaults,
|
|
138
|
+
mayApply: [targetDefaults, ...((_g = view === null || view === void 0 ? void 0 : view.otherSources) !== null && _g !== void 0 ? _g : []).map(synthesis)],
|
|
139
|
+
defaults,
|
|
140
|
+
};
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
// Source maps in which `source` instead of `plugin` gave the values.
|
|
144
|
+
function withSource(sourceMaps, plugin, source) {
|
|
145
|
+
return Object.fromEntries(Object.entries(sourceMaps).map(([root, keys]) => [
|
|
146
|
+
root,
|
|
147
|
+
Object.fromEntries(Object.entries(keys).map(([key, [file, from]]) => [
|
|
148
|
+
key,
|
|
149
|
+
[file, from === plugin ? source : from],
|
|
150
|
+
])),
|
|
151
|
+
]));
|
|
152
|
+
}
|
|
153
|
+
// The project at `root` as Nx merges its layers, with the elements of
|
|
154
|
+
// targetDefaults that one run of Nx's synthesis laid over it, or without any.
|
|
155
|
+
function rebuild(nx, layers, root, targetDefaults) {
|
|
156
|
+
var _a, _b;
|
|
157
|
+
const rootMap = {};
|
|
158
|
+
const merge = (project) => {
|
|
159
|
+
if (project !== undefined) {
|
|
160
|
+
nx.mergeProject(rootMap, structuredClone(Object.assign(Object.assign({}, project), { root })), undefined, undefined, false);
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
merge(layers.specified[root]);
|
|
164
|
+
for (const [, , result] of targetDefaults !== null && targetDefaults !== void 0 ? targetDefaults : []) {
|
|
165
|
+
merge((_a = result.projects) === null || _a === void 0 ? void 0 : _a[root]);
|
|
166
|
+
}
|
|
167
|
+
for (const { project } of layers.defaults) {
|
|
168
|
+
if (project.root === root) {
|
|
169
|
+
merge(project);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return (_b = rootMap[root]) !== null && _b !== void 0 ? _b : { root };
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* The name under which Nx knows the plugin's entry in `nx.json`, which
|
|
176
|
+
* `filter.plugin` of a `targetDefaults` entry compares with, as Nx 24
|
|
177
|
+
* derives it (`getPluginPathAndName` in `project-graph/plugins/resolve-plugin.js`):
|
|
178
|
+
* the entry's `plugin` itself where it names a `.js` or `.ts` file, and
|
|
179
|
+
* otherwise the name of the package it resolves to. The first entry that
|
|
180
|
+
* resolves to this plugin decides; the package's name where none does.
|
|
181
|
+
*/
|
|
182
|
+
function pluginEntryNameIn(nxJson, workspaceRoot) {
|
|
183
|
+
var _a;
|
|
184
|
+
for (const entry of (_a = nxJson === null || nxJson === void 0 ? void 0 : nxJson.plugins) !== null && _a !== void 0 ? _a : []) {
|
|
185
|
+
const plugin = typeof entry === "string" ? entry : entry.plugin;
|
|
186
|
+
if (plugin === plugin_package_1.pluginPackageName) {
|
|
187
|
+
return plugin;
|
|
188
|
+
}
|
|
189
|
+
if (isThisPlugin(plugin, workspaceRoot)) {
|
|
190
|
+
return [".js", ".ts"].includes((0, node_path_1.extname)(plugin)) ? plugin : plugin_package_1.pluginPackageName;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return plugin_package_1.pluginPackageName;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Whether an entry of `nx.json`'s `plugins` loads this plugin: it names its
|
|
197
|
+
* package, or it resolves to this module's entry point. An entry that does
|
|
198
|
+
* not resolve counts as another plugin.
|
|
199
|
+
*/
|
|
200
|
+
function isThisPlugin(plugin, workspaceRoot) {
|
|
201
|
+
if (plugin === plugin_package_1.pluginPackageName) {
|
|
202
|
+
return true;
|
|
203
|
+
}
|
|
204
|
+
try {
|
|
205
|
+
return ((0, node_fs_1.realpathSync)(require.resolve(plugin, { paths: [workspaceRoot] })) ===
|
|
206
|
+
(0, node_fs_1.realpathSync)((0, node_path_1.join)(__dirname, "..", `index${(0, node_path_1.extname)(__filename)}`)));
|
|
207
|
+
}
|
|
208
|
+
catch (_a) {
|
|
209
|
+
return false;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* The name under which Nx knows a plugin entry, from Nx's copy of the plugin
|
|
214
|
+
* for the entry, which `createDependencies` receives as `this`.
|
|
215
|
+
*/
|
|
216
|
+
function pluginEntryName(plugin) {
|
|
217
|
+
return isRecord(plugin) && typeof plugin.name === "string" ? plugin.name : undefined;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Where Nx took each value from, as far as the layers that
|
|
221
|
+
* `findTargetDefaultChanges` rebuilds with Nx's own code show it: the
|
|
222
|
+
* `project.json` or `package.json` in the project's folder whose node sets
|
|
223
|
+
* the option at that place, which Nx merges after `targetDefaults`, the
|
|
224
|
+
* later file winning; otherwise the element of `targetDefaults` that Nx
|
|
225
|
+
* lays over the target and that sets it, the later element winning; and
|
|
226
|
+
* `undefined` where none does, as where another plugin sets it.
|
|
227
|
+
*
|
|
228
|
+
* @param plugin The name under which Nx knows this plugin entry.
|
|
229
|
+
* @param internals Nx's internal parts ({@link loadTargetDefaultsInternals}).
|
|
230
|
+
*/
|
|
231
|
+
// @mara implements DES-PLUGIN-OPTIONS
|
|
232
|
+
function optionOrigins(places, context, plugin, internals) {
|
|
233
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
234
|
+
var _a;
|
|
235
|
+
if (places.length === 0) {
|
|
236
|
+
return [];
|
|
237
|
+
}
|
|
238
|
+
const projects = [...new Set(places.map(({ project }) => project))];
|
|
239
|
+
const layers = yield rebuildLayers(internals, projects, plugin, context, projects.map(({ root }) => root));
|
|
240
|
+
const targetDefaults = (_a = context.nxJsonConfiguration) === null || _a === void 0 ? void 0 : _a.targetDefaults;
|
|
241
|
+
return places.map((place) => {
|
|
242
|
+
const sets = (project) => {
|
|
243
|
+
var _a, _b;
|
|
244
|
+
const target = (_a = project === null || project === void 0 ? void 0 : project.targets) === null || _a === void 0 ? void 0 : _a[place.target];
|
|
245
|
+
const values = place.configuration === undefined
|
|
246
|
+
? target === null || target === void 0 ? void 0 : target.options
|
|
247
|
+
: (_b = target === null || target === void 0 ? void 0 : target.configurations) === null || _b === void 0 ? void 0 : _b[place.configuration];
|
|
248
|
+
return isRecord(values) && Object.prototype.hasOwnProperty.call(values, place.option);
|
|
249
|
+
};
|
|
250
|
+
const node = [...layers.defaults]
|
|
251
|
+
.reverse()
|
|
252
|
+
.find(({ project }) => project.root === place.project.root && sets(project));
|
|
253
|
+
if (node !== undefined) {
|
|
254
|
+
return { file: node.file };
|
|
255
|
+
}
|
|
256
|
+
const element = [...layers.targetDefaults]
|
|
257
|
+
.reverse()
|
|
258
|
+
.find(([, , result]) => { var _a; return sets((_a = result.projects) === null || _a === void 0 ? void 0 : _a[place.project.root]); });
|
|
259
|
+
return element === undefined
|
|
260
|
+
? undefined
|
|
261
|
+
: appliedEntry(element[1], isRecord(targetDefaults) ? targetDefaults : {});
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* The parts of the Nx installed in the repository, which is the Nx that
|
|
267
|
+
* creates the graph, that the check runs: from `nx/src/devkit-internals`,
|
|
268
|
+
* `createTargetDefaultsResults`, `findMatchingTargetNames`,
|
|
269
|
+
* `expandDependencyConfigSyntaxSugar` and `normalizeDependencyConfigProjects`;
|
|
270
|
+
* `mergeProjectConfigurationIntoRootMap`, Nx's merge of project nodes; and
|
|
271
|
+
* the `createNodes` of Nx's default plugins for `package.json` and
|
|
272
|
+
* `project.json`.
|
|
273
|
+
*
|
|
274
|
+
* @param load Loads a module by its resolved path; replaced in tests.
|
|
275
|
+
* @throws {Error} When that Nx lacks one of them, naming the Nx version.
|
|
276
|
+
*/
|
|
277
|
+
function loadTargetDefaultsInternals(workspaceRoot, load = require) {
|
|
278
|
+
try {
|
|
279
|
+
const devkit = (0, nx_bridge_1.loadDevkitInternals)(workspaceRoot, [
|
|
280
|
+
"createTargetDefaultsResults",
|
|
281
|
+
"findMatchingTargetNames",
|
|
282
|
+
"expandDependencyConfigSyntaxSugar",
|
|
283
|
+
"normalizeDependencyConfigProjects",
|
|
284
|
+
], { load });
|
|
285
|
+
const { mergeProjectConfigurationIntoRootMap: mergeIntoRootMap } = (0, nx_bridge_1.loadProjectNodesManager)(workspaceRoot, { load });
|
|
286
|
+
const { createNodes: packageJson } = (0, nx_bridge_1.loadPackageJsonPlugin)(workspaceRoot, { load });
|
|
287
|
+
const { createNodes: projectJson } = (0, nx_bridge_1.loadProjectJsonPlugin)(workspaceRoot, { load });
|
|
288
|
+
return {
|
|
289
|
+
createTargetDefaultsResults: devkit.createTargetDefaultsResults,
|
|
290
|
+
mergeProject(rootMap, project, sourceMaps, sourceInformation, deferSpreadsWithoutBase) {
|
|
291
|
+
mergeIntoRootMap(rootMap, project, sourceMaps, sourceInformation, undefined, deferSpreadsWithoutBase);
|
|
292
|
+
},
|
|
293
|
+
defaultNodes(files, nxJson, root) {
|
|
294
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
295
|
+
var _a;
|
|
296
|
+
const context = { nxJsonConfiguration: nxJson, workspaceRoot: root };
|
|
297
|
+
const nodes = [];
|
|
298
|
+
// In the order in which Nx runs its default plugins.
|
|
299
|
+
for (const [createNodes, given] of [
|
|
300
|
+
[packageJson, files],
|
|
301
|
+
[projectJson, files.filter((file) => file.endsWith("project.json"))],
|
|
302
|
+
]) {
|
|
303
|
+
if (given.length === 0) {
|
|
304
|
+
continue;
|
|
305
|
+
}
|
|
306
|
+
for (const [file, result] of yield createNodes(given, undefined, context)) {
|
|
307
|
+
for (const [projectRoot, project] of Object.entries((_a = result === null || result === void 0 ? void 0 : result.projects) !== null && _a !== void 0 ? _a : {})) {
|
|
308
|
+
nodes.push({ file, project: Object.assign(Object.assign({}, project), { root: projectRoot }) });
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
return nodes;
|
|
313
|
+
});
|
|
314
|
+
},
|
|
315
|
+
keyMayApply(key, targetName, executor) {
|
|
316
|
+
return (key === executor ||
|
|
317
|
+
key === targetName ||
|
|
318
|
+
devkit.findMatchingTargetNames(key, [targetName]).length > 0);
|
|
319
|
+
},
|
|
320
|
+
normaliseDependency(entry, project, graph) {
|
|
321
|
+
return devkit.normalizeDependencyConfigProjects(devkit.expandDependencyConfigSyntaxSugar(structuredClone(entry), graph, project), project, graph);
|
|
322
|
+
},
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
catch (error) {
|
|
326
|
+
if (error instanceof nx_bridge_1.NxBridgeError) {
|
|
327
|
+
const problem = error.failure.kind === "load"
|
|
328
|
+
? `${error.failure.module} could not be loaded (${error.failure.fullReason})`
|
|
329
|
+
: error.message;
|
|
330
|
+
unsupported(workspaceRoot, load, problem);
|
|
331
|
+
}
|
|
332
|
+
throw error;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
function unsupported(workspaceRoot, load, problem) {
|
|
336
|
+
const nx = (0, nx_bridge_1.readNxPackageVersion)(workspaceRoot, load);
|
|
337
|
+
throw new Error([
|
|
338
|
+
`nx-rust cannot check what the targetDefaults in nx.json do to Rust targets with ${nx === undefined ? "the installed Nx" : `the installed Nx ${nx}`}: ${problem}.`,
|
|
339
|
+
"nx-rust runs these parts of Nx, which are not public API, to learn what Nx applied to a target. This version of @convesoft/nx-rust supports Nx 24.",
|
|
340
|
+
"Use a supported Nx version, or a version of @convesoft/nx-rust that supports the installed one.",
|
|
341
|
+
].join("\n"));
|
|
342
|
+
}
|
|
343
|
+
// The package.json and project.json in each of `roots` that Nx sees, and
|
|
344
|
+
// the package.json at the repository root, which Nx hands its package.json
|
|
345
|
+
// plugin with the others: whether that plugin reads a package.json outside
|
|
346
|
+
// the package manager's workspaces can depend on it.
|
|
347
|
+
function declarationFiles(roots, fileMap) {
|
|
348
|
+
var _a, _b;
|
|
349
|
+
const seen = new Set();
|
|
350
|
+
for (const files of Object.values((_a = fileMap === null || fileMap === void 0 ? void 0 : fileMap.projectFileMap) !== null && _a !== void 0 ? _a : {})) {
|
|
351
|
+
for (const { file } of files) {
|
|
352
|
+
seen.add(file);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
for (const { file } of (_b = fileMap === null || fileMap === void 0 ? void 0 : fileMap.nonProjectFiles) !== null && _b !== void 0 ? _b : []) {
|
|
356
|
+
seen.add(file);
|
|
357
|
+
}
|
|
358
|
+
return [
|
|
359
|
+
...new Set([
|
|
360
|
+
...roots.flatMap((root) => ["package.json", "project.json"].map((name) => (root === "." ? name : `${root}/${name}`))),
|
|
361
|
+
"package.json",
|
|
362
|
+
]),
|
|
363
|
+
].filter((file) => seen.has(file));
|
|
364
|
+
}
|
|
365
|
+
// The key and elements of Nx's synthesis, by root and target. Each result's
|
|
366
|
+
// file names them: `nx.json#targetDefaults.<key>` or
|
|
367
|
+
// `nx.json#targetDefaults.<key>[<index>]`.
|
|
368
|
+
function appliedElements(results, targetDefaults) {
|
|
369
|
+
var _a, _b, _c, _d, _e;
|
|
370
|
+
const applied = new Map();
|
|
371
|
+
for (const [, file, result] of results) {
|
|
372
|
+
const element = appliedEntry(file, targetDefaults);
|
|
373
|
+
if (element === undefined) {
|
|
374
|
+
continue;
|
|
375
|
+
}
|
|
376
|
+
const { key, indices: [index] = [] } = element;
|
|
377
|
+
for (const [root, project] of Object.entries((_a = result.projects) !== null && _a !== void 0 ? _a : {})) {
|
|
378
|
+
const byTarget = (_b = applied.get(root)) !== null && _b !== void 0 ? _b : new Map();
|
|
379
|
+
applied.set(root, byTarget);
|
|
380
|
+
for (const name of Object.keys((_c = project.targets) !== null && _c !== void 0 ? _c : {})) {
|
|
381
|
+
const entry = (_d = byTarget.get(name)) !== null && _d !== void 0 ? _d : { key };
|
|
382
|
+
if (index !== undefined) {
|
|
383
|
+
entry.indices = [...((_e = entry.indices) !== null && _e !== void 0 ? _e : []), index];
|
|
384
|
+
}
|
|
385
|
+
byTarget.set(name, entry);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
return applied;
|
|
390
|
+
}
|
|
391
|
+
// The key, and the element where the key's value is a list, that the file
|
|
392
|
+
// of one result of Nx's synthesis names; undefined for another file.
|
|
393
|
+
function appliedEntry(file, targetDefaults) {
|
|
394
|
+
const prefix = "nx.json#targetDefaults.";
|
|
395
|
+
if (!file.startsWith(prefix)) {
|
|
396
|
+
return undefined;
|
|
397
|
+
}
|
|
398
|
+
const location = file.slice(prefix.length);
|
|
399
|
+
const indexed = /^(.*)\[(\d+)\]$/.exec(location);
|
|
400
|
+
return indexed !== null && Array.isArray(targetDefaults[indexed[1]])
|
|
401
|
+
? { key: indexed[1], indices: [Number(indexed[2])] }
|
|
402
|
+
: { key: location };
|
|
403
|
+
}
|
|
404
|
+
function includes(list, value) {
|
|
405
|
+
const wanted = canonical(value);
|
|
406
|
+
return (list !== null && list !== void 0 ? list : []).some((entry) => canonical(entry) === wanted);
|
|
407
|
+
}
|
|
408
|
+
// JSON with sorted object keys, so that equal values compare equal.
|
|
409
|
+
function canonical(value) {
|
|
410
|
+
return JSON.stringify(value, (_key, inner) => isRecord(inner)
|
|
411
|
+
? Object.fromEntries(Object.entries(inner).sort(([a], [b]) => compare(a, b)))
|
|
412
|
+
: inner);
|
|
413
|
+
}
|
|
414
|
+
function isRecord(value) {
|
|
415
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
416
|
+
}
|
|
417
|
+
function compare(a, b) {
|
|
418
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
419
|
+
}
|
|
420
|
+
//# sourceMappingURL=target-defaults-layers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"target-defaults-layers.js","sourceRoot":"","sources":["../../../../nx-rust/src/graph/target-defaults-layers.ts"],"names":[],"mappings":";;;AAyKA,gDAsBC;AAQD,oCAMC;AAID,sBAgBC;AAID,gCAEC;AAGD,sCAEC;AAGD,sCA2DC;AAmBD,0BAsBC;AAUD,8CAcC;AAyBD,0CAEC;AAeD,sCAwCC;AAcD,kEA6EC;AA+CD,0CAwBC;AAID,oCAaC;AAED,4BAGC;AAGD,8BAMC;AAED,4BAEC;AAED,0BAEC;;AAhoBD,qCAAuC;AACvC,yCAA0C;AAC1C,0DAOoC;AACpC,qDAAqD;AACrD,yCAA6D;AAC7D,uCAAmD;AAsItC,QAAA,MAAM,GAAG,KAAK,CAAC;AAE5B,yEAAyE;AACzE,MAAM,aAAa,GAAG,kBAAkB,CAAC;AAEzC;;;;;;;;;;;GAWG;AACH,SAAgB,kBAAkB,CAChC,cAAuC,EACvC,MAA0B,EAC1B,MAA2B,EAC3B,aAAqB;;IAErB,MAAM,UAAU,GAAG,CAAC,MAAA,MAAM,CAAC,OAAO,mCAAI,EAAE,CAAC,CAAC,IAAI,CAC5C,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,aAAa,CAAC,CAC1F,CAAC;IACF,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,KAAK,MAAM,KAAK,IAAI,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GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { NxJsonConfiguration, ProjectConfiguration, TargetConfiguration } from "@nx/devkit";
|
|
2
|
+
import type { CargoProject } from "./projects";
|
|
3
|
+
/** The lists among the checked target fields, whose meaning another layer must not narrow. */
|
|
4
|
+
export declare const listFields: readonly ["inputs", "outputs", "dependsOn"];
|
|
5
|
+
export type ListField = (typeof listFields)[number];
|
|
6
|
+
/**
|
|
7
|
+
* An inferred target whose `inputs`, `outputs` or `dependsOn` mean less
|
|
8
|
+
* than the plugin declared, by a lost entry, an added negated pattern or a
|
|
9
|
+
* named input defined anew, where neither a `targetDefaults` entry nor the
|
|
10
|
+
* `project.json` or `package.json` in the project's folder did it, as
|
|
11
|
+
* another plugin can (`DES-TARGET-DEFAULT-GUARD`, "Other layers").
|
|
12
|
+
*/
|
|
13
|
+
export interface OtherLayerLoss {
|
|
14
|
+
target: string;
|
|
15
|
+
project: string;
|
|
16
|
+
manifest: string;
|
|
17
|
+
/** The project's folder, relative to the repository root. */
|
|
18
|
+
root: string;
|
|
19
|
+
/** By field, the declared entries that the merged target lacks. */
|
|
20
|
+
lost: Partial<Record<ListField, unknown[]>>;
|
|
21
|
+
/** By field, the entries that another layer added and that leave files out, such as `!` patterns. */
|
|
22
|
+
leavesOut?: Partial<Record<"inputs" | "outputs", unknown[]>>;
|
|
23
|
+
/** The named inputs that the target reads and that another layer defines anew, so that they mean less. */
|
|
24
|
+
namedInputs?: RedefinedInput[];
|
|
25
|
+
}
|
|
26
|
+
/** A named input of a project that another layer defines anew, so that it means less. */
|
|
27
|
+
export interface RedefinedInput {
|
|
28
|
+
name: string;
|
|
29
|
+
/** Its definition in the merged project. */
|
|
30
|
+
definition: unknown;
|
|
31
|
+
/** What its expansion lacks against the definition that the plugin and the project's own files give. */
|
|
32
|
+
lost: unknown[];
|
|
33
|
+
/** The negated patterns that its expansion holds and that definition does not. */
|
|
34
|
+
leavesOut: unknown[];
|
|
35
|
+
}
|
|
36
|
+
/** A target with the named inputs of its project, as Nx's task hasher reads them. */
|
|
37
|
+
export interface TargetMeaning {
|
|
38
|
+
target: TargetConfiguration;
|
|
39
|
+
named: Record<string, unknown[]>;
|
|
40
|
+
}
|
|
41
|
+
/** What one list of a merged target lacks or leaves out against what is expected of it. */
|
|
42
|
+
export interface Weakening {
|
|
43
|
+
/** Entries of the expected list, `inputs` expanded, that the merged one lacks. */
|
|
44
|
+
lost: unknown[];
|
|
45
|
+
/** Negated patterns of the merged list, `inputs` expanded, that the expected one lacks. */
|
|
46
|
+
leavesOut: unknown[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* A project's named inputs as Nx's task hasher reads them (`getNamedInputs`
|
|
50
|
+
* in `nx/src/hasher/task-hasher.js`): Nx's built-in `default`, replaced by
|
|
51
|
+
* a definition in `nx.json`, replaced by the project's own.
|
|
52
|
+
*/
|
|
53
|
+
export declare function namedInputsOf(nxJson: NxJsonConfiguration, project: Record<string, unknown> | undefined): Record<string, unknown[]>;
|
|
54
|
+
/**
|
|
55
|
+
* What one list of the merged target means less than the expected one
|
|
56
|
+
* (`DES-TARGET-DEFAULT-GUARD`, "Other layers"): the entries of the expected
|
|
57
|
+
* list that the merged one lacks, and the negated patterns of the merged
|
|
58
|
+
* list that the expected one lacks, `inputs` compared after Nx's expansion
|
|
59
|
+
* with each side's named inputs. An added entry that is no negated pattern
|
|
60
|
+
* only widens: an input only adds to what the key hashes, an output to what
|
|
61
|
+
* Nx stores and restores, and a dependency to the tasks that run first.
|
|
62
|
+
*/
|
|
63
|
+
export declare function weakening(field: ListField, merged: TargetMeaning, expected: TargetMeaning): Weakening;
|
|
64
|
+
export declare function isEmptyWeakening({ lost, leavesOut }: Weakening): boolean;
|
|
65
|
+
export declare function weakeningSize({ lost, leavesOut }: Weakening): number;
|
|
66
|
+
/**
|
|
67
|
+
* Adds to `loss` how one list of the merged target means less than the
|
|
68
|
+
* expected one, in the terms in which the layers wrote it: the expected
|
|
69
|
+
* entries whose meaning the merged list lacks, the entries that the merged
|
|
70
|
+
* list adds and that leave files out, and, for `inputs`, the named inputs
|
|
71
|
+
* that the target reads and that the merged project defines so that they
|
|
72
|
+
* mean less. What none of these shows is added as Nx expands it.
|
|
73
|
+
*/
|
|
74
|
+
export declare function describeWeakening(field: ListField, merged: TargetMeaning, expected: TargetMeaning, loss: Omit<OtherLayerLoss, "target" | "project" | "manifest" | "root">): void;
|
|
75
|
+
/**
|
|
76
|
+
* The project references in the `dependsOn` and `inputs` of a target that
|
|
77
|
+
* the plugin declares, with the names that Nx's merge gives them where that
|
|
78
|
+
* is certain (`EVD-NX-24-PLUGIN-NODES`). Nx replaces each reference with
|
|
79
|
+
* the project that had its name when the plugin's projects were merged,
|
|
80
|
+
* and writes the final name of that project in its place once every layer
|
|
81
|
+
* is merged. A name that the plugin gave one of the projects of this entry
|
|
82
|
+
* had that project then, so it becomes the name under which the merged
|
|
83
|
+
* graph knows the project at that root. Only the forms that Nx renames are
|
|
84
|
+
* renamed: a `projects` string other than `*`, `self` and `dependencies`
|
|
85
|
+
* (`self` and `dependencies` in `inputs`), each element of a `projects`
|
|
86
|
+
* list that is no glob pattern, and a `<project>:<target>` string in
|
|
87
|
+
* `dependsOn` with exactly one colon, for which Nx can find no other
|
|
88
|
+
* reading: neither the string nor its first part names a target of the
|
|
89
|
+
* project itself, and the string names no project. Every other name stays
|
|
90
|
+
* as written, so that a reference that Nx renamed in a way that the plugin
|
|
91
|
+
* cannot prove remains a difference.
|
|
92
|
+
*
|
|
93
|
+
* @param merged The projects as Nx merged them, by name.
|
|
94
|
+
*/
|
|
95
|
+
export declare function nxNames(projects: readonly CargoProject[], merged: Record<string, ProjectConfiguration>): (project: CargoProject, target: TargetConfiguration) => TargetConfiguration;
|