@convesoft/nx-rust 0.0.0 → 1.0.0-rc.2
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/PLUGIN.md +106 -0
- package/README.md +51 -1
- package/docs/artifacts.mara.md +374 -0
- package/docs/caching.mara.md +999 -0
- package/docs/ci.mara.md +308 -0
- package/docs/configuration.mara.md +508 -0
- package/docs/decisions.mara.md +3267 -0
- package/docs/execution.mara.md +533 -0
- package/docs/index.mara.md +51 -0
- package/docs/product.mara.md +366 -0
- package/docs/release.mara.md +493 -0
- package/docs/setup.mara.md +486 -0
- package/docs/targets.mara.md +704 -0
- package/docs/testing.mara.md +431 -0
- package/docs/verification.mara.md +465 -0
- package/docs/workspaces.mara.md +445 -0
- package/executors.json +35 -0
- package/generators.json +19 -0
- package/package.json +17 -4
- package/src/cargo/build-settings.d.ts +61 -0
- package/src/cargo/build-settings.js +103 -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 +114 -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 +90 -0
- package/src/cargo/redirections.js +200 -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/cargo/warnings-setting.d.ts +24 -0
- package/src/cargo/warnings-setting.js +81 -0
- package/src/cargo/warnings-setting.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 +58 -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 +218 -0
- package/src/executors/cargo-output.js +660 -0
- package/src/executors/cargo-output.js.map +1 -0
- package/src/executors/command.d.ts +331 -0
- package/src/executors/command.js +547 -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/denied-warnings.d.ts +99 -0
- package/src/executors/denied-warnings.js +188 -0
- package/src/executors/denied-warnings.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 +601 -0
- package/src/executors/group-run.js.map +1 -0
- package/src/executors/groups.d.ts +118 -0
- package/src/executors/groups.js +304 -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 +189 -0
- package/src/executors/nextest.js +504 -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 +435 -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 +527 -0
- package/src/executors/task.js.map +1 -0
- package/src/executors/test-mode.d.ts +185 -0
- package/src/executors/test-mode.js +397 -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 +121 -0
- package/src/executors/test-steps.js +566 -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 +681 -0
- package/src/graph/caching.js.map +1 -0
- package/src/graph/clippy-input.d.ts +53 -0
- package/src/graph/clippy-input.js +107 -0
- package/src/graph/clippy-input.js.map +1 -0
- package/src/graph/collisions.d.ts +113 -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 +190 -0
- package/src/graph/discovery.js +661 -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 +422 -0
- package/src/graph/inputs.js +756 -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 +193 -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/rustfmt-config.d.ts +42 -0
- package/src/graph/rustfmt-config.js +173 -0
- package/src/graph/rustfmt-config.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 +371 -0
- package/src/graph/targets.js +408 -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,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AAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED,sEAAsE;AACtE,uEAAuE;AACvE,0BAA0B;AAC1B,SAAS,MAAM,CAAC,CAAS,EAAE,CAAS;IAClC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,+BAAc,EAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAC9E,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC7F,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Why a string cannot be split into words. */
|
|
2
|
+
export type SplitProblem = "unterminated-quote" | "trailing-backslash";
|
|
3
|
+
/** A string that cannot be split into words. */
|
|
4
|
+
export declare class SplitError extends Error {
|
|
5
|
+
readonly problem: SplitProblem;
|
|
6
|
+
constructor(problem: SplitProblem);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Splits `value` into words as a POSIX shell splits a command line, without
|
|
10
|
+
* expanding anything (`DES-TARGET-COMMANDS`, paragraph "run").
|
|
11
|
+
*
|
|
12
|
+
* Words are separated by blanks outside quotes. Single quotes keep every
|
|
13
|
+
* character up to the next single quote. Double quotes keep every character
|
|
14
|
+
* up to the next unescaped double quote; a backslash in them escapes `$`,
|
|
15
|
+
* `` ` ``, `"`, `\` and a line break and stands for itself before anything
|
|
16
|
+
* else. Outside quotes a backslash escapes the next character. A backslash
|
|
17
|
+
* before a line break joins the lines, as in a shell. An empty pair of quotes
|
|
18
|
+
* is an empty word. `|`, `;`, `>`, `&&`, `$`, `*` and `#` are ordinary
|
|
19
|
+
* characters.
|
|
20
|
+
*
|
|
21
|
+
* @throws {SplitError} When a quote is not closed, or when `value` ends in a
|
|
22
|
+
* backslash that escapes nothing.
|
|
23
|
+
*/
|
|
24
|
+
export declare function splitWords(value: string): string[];
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SplitError = void 0;
|
|
4
|
+
exports.splitWords = splitWords;
|
|
5
|
+
/** A string that cannot be split into words. */
|
|
6
|
+
class SplitError extends Error {
|
|
7
|
+
constructor(problem) {
|
|
8
|
+
super(problem === "unterminated-quote" ? "a quote is not closed" : "it ends in a backslash");
|
|
9
|
+
this.problem = problem;
|
|
10
|
+
this.name = "SplitError";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.SplitError = SplitError;
|
|
14
|
+
// The blanks that separate words outside quotes.
|
|
15
|
+
const blanks = new Set([" ", "\t", "\n"]);
|
|
16
|
+
// The characters that a backslash escapes inside double quotes, as in a POSIX
|
|
17
|
+
// shell; before any other character it stands for itself.
|
|
18
|
+
const escapedInDoubleQuotes = new Set(["$", "`", '"', "\\", "\n"]);
|
|
19
|
+
/**
|
|
20
|
+
* Splits `value` into words as a POSIX shell splits a command line, without
|
|
21
|
+
* expanding anything (`DES-TARGET-COMMANDS`, paragraph "run").
|
|
22
|
+
*
|
|
23
|
+
* Words are separated by blanks outside quotes. Single quotes keep every
|
|
24
|
+
* character up to the next single quote. Double quotes keep every character
|
|
25
|
+
* up to the next unescaped double quote; a backslash in them escapes `$`,
|
|
26
|
+
* `` ` ``, `"`, `\` and a line break and stands for itself before anything
|
|
27
|
+
* else. Outside quotes a backslash escapes the next character. A backslash
|
|
28
|
+
* before a line break joins the lines, as in a shell. An empty pair of quotes
|
|
29
|
+
* is an empty word. `|`, `;`, `>`, `&&`, `$`, `*` and `#` are ordinary
|
|
30
|
+
* characters.
|
|
31
|
+
*
|
|
32
|
+
* @throws {SplitError} When a quote is not closed, or when `value` ends in a
|
|
33
|
+
* backslash that escapes nothing.
|
|
34
|
+
*/
|
|
35
|
+
// @mara implements DES-TARGET-COMMANDS
|
|
36
|
+
function splitWords(value) {
|
|
37
|
+
const words = [];
|
|
38
|
+
let word = "";
|
|
39
|
+
// Whether a word has begun, which an empty pair of quotes also does.
|
|
40
|
+
let inWord = false;
|
|
41
|
+
let index = 0;
|
|
42
|
+
while (index < value.length) {
|
|
43
|
+
const character = value[index];
|
|
44
|
+
if (blanks.has(character)) {
|
|
45
|
+
if (inWord) {
|
|
46
|
+
words.push(word);
|
|
47
|
+
word = "";
|
|
48
|
+
inWord = false;
|
|
49
|
+
}
|
|
50
|
+
index++;
|
|
51
|
+
}
|
|
52
|
+
else if (character === "\\") {
|
|
53
|
+
if (index + 1 >= value.length) {
|
|
54
|
+
throw new SplitError("trailing-backslash");
|
|
55
|
+
}
|
|
56
|
+
const next = value[index + 1];
|
|
57
|
+
if (next !== "\n") {
|
|
58
|
+
word += next;
|
|
59
|
+
inWord = true;
|
|
60
|
+
}
|
|
61
|
+
index += 2;
|
|
62
|
+
}
|
|
63
|
+
else if (character === "'") {
|
|
64
|
+
const end = value.indexOf("'", index + 1);
|
|
65
|
+
if (end === -1) {
|
|
66
|
+
throw new SplitError("unterminated-quote");
|
|
67
|
+
}
|
|
68
|
+
word += value.slice(index + 1, end);
|
|
69
|
+
inWord = true;
|
|
70
|
+
index = end + 1;
|
|
71
|
+
}
|
|
72
|
+
else if (character === '"') {
|
|
73
|
+
index++;
|
|
74
|
+
let closed = false;
|
|
75
|
+
while (index < value.length) {
|
|
76
|
+
const inner = value[index];
|
|
77
|
+
if (inner === '"') {
|
|
78
|
+
closed = true;
|
|
79
|
+
index++;
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
if (inner === "\\" &&
|
|
83
|
+
index + 1 < value.length &&
|
|
84
|
+
escapedInDoubleQuotes.has(value[index + 1])) {
|
|
85
|
+
if (value[index + 1] !== "\n") {
|
|
86
|
+
word += value[index + 1];
|
|
87
|
+
}
|
|
88
|
+
index += 2;
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
word += inner;
|
|
92
|
+
index++;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (!closed) {
|
|
96
|
+
throw new SplitError("unterminated-quote");
|
|
97
|
+
}
|
|
98
|
+
inWord = true;
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
word += character;
|
|
102
|
+
inWord = true;
|
|
103
|
+
index++;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
if (inWord) {
|
|
107
|
+
words.push(word);
|
|
108
|
+
}
|
|
109
|
+
return words;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=split-words.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"split-words.js","sourceRoot":"","sources":["../../../../nx-rust/src/executors/split-words.ts"],"names":[],"mappings":";;;AAmCA,gCAuEC;AAvGD,gDAAgD;AAChD,MAAa,UAAW,SAAQ,KAAK;IACnC,YAAqB,OAAqB;QACxC,KAAK,CAAC,OAAO,KAAK,oBAAoB,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC;QAD1E,YAAO,GAAP,OAAO,CAAc;QAExC,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC3B,CAAC;CACF;AALD,gCAKC;AAED,iDAAiD;AACjD,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAE1C,8EAA8E;AAC9E,0DAA0D;AAC1D,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAEnE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ACX,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import type { ExecutorContext } from "@nx/devkit";
|
|
2
|
+
import type { CargoDirectories } from "../cargo/directories";
|
|
3
|
+
import type { GroupSelection } from "./groups";
|
|
4
|
+
import type { GroupInvocation } from "./task";
|
|
5
|
+
/**
|
|
6
|
+
* The folder in the artifact directory that holds the stages of staged
|
|
7
|
+
* commands (`DES-BATCH`, "Staged builds"): on the file system of the files
|
|
8
|
+
* that a stage's files replace, among Cargo's directories, and removed by
|
|
9
|
+
* `cargo clean`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const stageFolderName = ".nx-rust-stage";
|
|
12
|
+
/**
|
|
13
|
+
* Where a staged command links its final artifacts, and the directories it
|
|
14
|
+
* moves them to; or where a `test` or `bench` group keeps the files of the
|
|
15
|
+
* command's builds while its commands run (`DES-BATCH`, "Files that a test
|
|
16
|
+
* batch puts back").
|
|
17
|
+
*/
|
|
18
|
+
export interface Stage {
|
|
19
|
+
/** The stage, `<artifact directory>/.nx-rust-stage/<process id>-<counter>`. */
|
|
20
|
+
path: string;
|
|
21
|
+
/** Cargo's directories for the command, as cargo reports them for its workspace root and environment. */
|
|
22
|
+
directories: CargoDirectories;
|
|
23
|
+
}
|
|
24
|
+
/** A process as a stage's marker records it, to tell a reused process id from its owner. */
|
|
25
|
+
export interface StageOwner {
|
|
26
|
+
pid: number;
|
|
27
|
+
/** When the process started, as the system reports it; `undefined` where the system tells nothing. */
|
|
28
|
+
start: string | undefined;
|
|
29
|
+
}
|
|
30
|
+
/** A stage could not be made. */
|
|
31
|
+
export declare class StageError extends Error {
|
|
32
|
+
constructor(message: string);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The flags that make a cargo command build into `stage` (`DES-INVOCATION`):
|
|
36
|
+
* `--target-dir` with the stage, and `build.build-dir` with the build
|
|
37
|
+
* directory that cargo would use anyway, so that it builds and reuses
|
|
38
|
+
* exactly what it would without the stage (`EVD-STAGED-BUILDS`).
|
|
39
|
+
*/
|
|
40
|
+
export declare function stageFlags(stage: Stage): string[];
|
|
41
|
+
/** `value` as a TOML basic string, which `--config` reads. */
|
|
42
|
+
export declare function tomlString(value: string): string;
|
|
43
|
+
/**
|
|
44
|
+
* Makes a new, empty stage in the artifact directory of `directories` for
|
|
45
|
+
* this process (`DES-BATCH`, "Staged builds", and "Files that a test batch
|
|
46
|
+
* puts back" for a test group's kept files), after removing the stages
|
|
47
|
+
* that processes which no longer run left there ({@link removeStaleStages}).
|
|
48
|
+
* A folder of this process's id that this process did not make is the
|
|
49
|
+
* leftover of an earlier process with the same id, and is removed too.
|
|
50
|
+
*
|
|
51
|
+
* @throws {StageError} Where the folder cannot be made or marked.
|
|
52
|
+
*/
|
|
53
|
+
export declare function createStage(directories: CargoDirectories, owner?: StageOwner, liveness?: (pid: number) => StageOwner | "dead"): Stage;
|
|
54
|
+
/**
|
|
55
|
+
* Removes a stage and everything in it, where `stage.path` is a stage of
|
|
56
|
+
* its artifact directory: a folder named `<process id>-<counter>` in its
|
|
57
|
+
* `.nx-rust-stage` folder, and nothing else.
|
|
58
|
+
*
|
|
59
|
+
* @returns The problem where the folder could not be removed.
|
|
60
|
+
*/
|
|
61
|
+
export declare function removeStage(stage: Stage): string | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Removes the stages in `artifactDirectory` that processes which no longer
|
|
64
|
+
* run left there, such as an interrupted command's. A stage belongs to a
|
|
65
|
+
* running process where the process of its id runs and, where both are
|
|
66
|
+
* known, started when the stage's marker says, so that a process that got
|
|
67
|
+
* a dead owner's id does not keep the dead owner's stage. A stage whose
|
|
68
|
+
* marker is missing or unreadable belongs to the process of its id while
|
|
69
|
+
* that runs, which covers the moment between making the folder and
|
|
70
|
+
* marking it. Stages of this process are left alone.
|
|
71
|
+
*/
|
|
72
|
+
export declare function removeStaleStages(artifactDirectory: string, owner?: StageOwner, liveness?: (pid: number) => StageOwner | "dead"): void;
|
|
73
|
+
/** A file of a staged command to move into the artifact directory. */
|
|
74
|
+
export interface StagedFile {
|
|
75
|
+
/** The file in the stage. */
|
|
76
|
+
from: string;
|
|
77
|
+
/** The same path relative to the artifact directory. */
|
|
78
|
+
to: string;
|
|
79
|
+
/** The package whose target it is, as cargo's messages name it. */
|
|
80
|
+
packageId: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The final artifacts of the packages `packageIds` that a staged `build`
|
|
84
|
+
* command linked into `stage` (`DES-BATCH`, "Staged builds"; `DES-OUTPUTS`):
|
|
85
|
+
* from cargo's `compiler-artifact` messages in `output`, the files of each
|
|
86
|
+
* `bin`, `cdylib` and `staticlib` target that lie in the stage, the
|
|
87
|
+
* split-debuginfo files among them, and never an `rlib`, `rmeta` or the
|
|
88
|
+
* file of a `dylib` or proc macro; and the dependency record that cargo
|
|
89
|
+
* wrote beside a file of any target of the packages, where there is one,
|
|
90
|
+
* which the build input check reads, also a library's that is only an
|
|
91
|
+
* `rlib` (`DES-BUILD-INPUT-CHECK`). A file that a message names outside the
|
|
92
|
+
* stage, such as a library's `rmeta` in the build directory, is not the
|
|
93
|
+
* command's to move.
|
|
94
|
+
*/
|
|
95
|
+
export declare function stagedFinalFiles(output: string, stage: Stage, packageIds: ReadonlySet<string>): StagedFile[];
|
|
96
|
+
/**
|
|
97
|
+
* Moves each staged file to its place in the artifact directory, a staged
|
|
98
|
+
* build's file or a test group's kept one (`DES-BATCH`), by rename,
|
|
99
|
+
* which replaces a file there in one step, or, where the two lie on
|
|
100
|
+
* different file systems, by a copy beside the place that is then renamed
|
|
101
|
+
* onto it. Nothing outside the stage is taken and nothing outside the
|
|
102
|
+
* artifact directory is written.
|
|
103
|
+
*
|
|
104
|
+
* @returns A problem for each file that could not be moved, by the package
|
|
105
|
+
* whose target it is.
|
|
106
|
+
*/
|
|
107
|
+
export declare function moveStagedFiles(stage: Stage, files: readonly StagedFile[]): Map<string, string[]>;
|
|
108
|
+
/** This process, as a stage's marker records it. */
|
|
109
|
+
export declare function currentOwner(): StageOwner;
|
|
110
|
+
/**
|
|
111
|
+
* Whether the process `pid` runs, and when it started: `"dead"` where the
|
|
112
|
+
* system has no such process; where it has one that another user owns, it
|
|
113
|
+
* runs.
|
|
114
|
+
*/
|
|
115
|
+
export declare function processState(pid: number): StageOwner | "dead";
|
|
116
|
+
/**
|
|
117
|
+
* When the process `pid` started, as the system tells it, so that two
|
|
118
|
+
* readings of one process agree and a process that got another's id
|
|
119
|
+
* differs: on Linux, field 22 of `/proc/<pid>/stat`, in clock ticks since
|
|
120
|
+
* boot; elsewhere, `ps -o lstart=`. `undefined` where neither tells it.
|
|
121
|
+
*/
|
|
122
|
+
export declare function processStart(pid: number): string | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* Where `file`, a path inside the stage's artifact directory, lies in the
|
|
125
|
+
* stage: at the same path relative to the artifact directory, as a staged
|
|
126
|
+
* command's files lie relative to the stage. `undefined` for a file
|
|
127
|
+
* outside the artifact directory, or in its folder of stages.
|
|
128
|
+
*/
|
|
129
|
+
export declare function pathInStage(stage: Stage, file: string): string | undefined;
|
|
130
|
+
/** Whether `path` is a stage of `artifactDirectory`. */
|
|
131
|
+
export declare function isStagePath(path: string, artifactDirectory: string): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Whether a group's cargo command builds in a stage (`DES-BATCH`, "Staged
|
|
134
|
+
* builds"): a `build` that selects the whole workspace, which would link
|
|
135
|
+
* every member's final artifacts, and every compile of `napi-build` and
|
|
136
|
+
* `wasm-build`, which moves none. A `build` that selects its crates with
|
|
137
|
+
* `-p` writes only theirs, and `test`, `bench`, `check`, `lint` and `doc`
|
|
138
|
+
* are never staged: `cargo test` would fix the stage's path into
|
|
139
|
+
* `CARGO_BIN_EXE_<name>` (`EVD-STAGED-BUILDS`).
|
|
140
|
+
*/
|
|
141
|
+
export declare function stagesCommand(target: string | undefined, selection: GroupSelection): boolean;
|
|
142
|
+
/**
|
|
143
|
+
* The group's command with the flags of `stage` after the target's own
|
|
144
|
+
* arguments of every step, and, where `recordsInStage`, as for a
|
|
145
|
+
* `napi-build` or `wasm-build` compile, which moves nothing out of the
|
|
146
|
+
* stage, the build input check reading the records there.
|
|
147
|
+
*/
|
|
148
|
+
export declare function withStage(invocation: GroupInvocation, stage: Stage, recordsInStage?: boolean): GroupInvocation;
|
|
149
|
+
/**
|
|
150
|
+
* The `build` tasks of `ids` that share a folder of the artifact directory
|
|
151
|
+
* with another `build` task of the same project in the command, each with
|
|
152
|
+
* its message (`DES-BATCH`, "Files that a batch stores"). The folder is
|
|
153
|
+
* judged by what Nx itself resolved: the outputs of the tasks in the
|
|
154
|
+
* command's task graph, for the task and its peers alike, which name the
|
|
155
|
+
* artifact directory, the triple folder and the profile folder
|
|
156
|
+
* (`DES-OUTPUTS`). Two tasks collide where an output of one is an output of
|
|
157
|
+
* the other or lies inside it, so that each would store what the other's
|
|
158
|
+
* cargo command wrote, which no stage keeps apart. A task whose outputs name
|
|
159
|
+
* nothing, such as an uncached `build`, is not judged: Nx stores nothing for
|
|
160
|
+
* it. The maintainer decided on 20 November 2026 that such tasks fail with
|
|
161
|
+
* guidance instead of sharing a command.
|
|
162
|
+
*/
|
|
163
|
+
export declare function sharedBuildFolders(ids: readonly string[], context: ExecutorContext): Map<string, string>;
|