@smoothbricks/nx-plugin 0.4.25 → 0.4.27
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/README.md +1078 -98
- package/dist/bin/smoo-nx-bound-failures.d.ts +3 -0
- package/dist/bin/smoo-nx-bound-failures.d.ts.map +1 -0
- package/dist/bin/smoo-nx-bound-failures.js +31 -0
- package/dist/bin/smoo-nx-cargo-hash.js +28 -3
- package/dist/bin/smoo-nx-exec.js +16 -85
- package/dist/bin/smoo-nx-failures.d.ts +3 -0
- package/dist/bin/smoo-nx-failures.d.ts.map +1 -0
- package/dist/bin/smoo-nx-failures.js +3 -0
- package/dist/bin/smoo-nx-nextest-extract.js +3 -2
- package/dist/bin/smoo-nx-test-walks.d.ts +3 -0
- package/dist/bin/smoo-nx-test-walks.d.ts.map +1 -0
- package/dist/bin/smoo-nx-test-walks.js +34 -0
- package/dist/bounded-test-policy.d.ts +7 -1
- package/dist/bounded-test-policy.d.ts.map +1 -1
- package/dist/bounded-test-policy.js +101 -40
- package/dist/build-state-output-policy.d.ts +25 -0
- package/dist/build-state-output-policy.d.ts.map +1 -0
- package/dist/build-state-output-policy.js +64 -0
- package/dist/cargo-closure-input.d.ts +16 -17
- package/dist/cargo-closure-input.d.ts.map +1 -1
- package/dist/cargo-closure-input.js +37 -44
- package/dist/cargo-dev-profile.d.ts +37 -0
- package/dist/cargo-dev-profile.d.ts.map +1 -0
- package/dist/cargo-dev-profile.js +108 -0
- package/dist/cargo-source-hash.d.ts +50 -8
- package/dist/cargo-source-hash.d.ts.map +1 -1
- package/dist/cargo-source-hash.js +691 -71
- package/dist/cargo-toolchain-policy.d.ts +4 -0
- package/dist/cargo-toolchain-policy.d.ts.map +1 -1
- package/dist/cargo-toolchain-policy.js +5 -0
- package/dist/cargo-workspace.d.ts +108 -12
- package/dist/cargo-workspace.d.ts.map +1 -1
- package/dist/cargo-workspace.js +299 -18
- package/dist/cross-check-policy.d.ts +21 -3
- package/dist/cross-check-policy.d.ts.map +1 -1
- package/dist/cross-check-policy.js +24 -6
- package/dist/disk-command-policy.d.ts +7 -0
- package/dist/disk-command-policy.d.ts.map +1 -0
- package/dist/disk-command-policy.js +98 -0
- package/dist/ensure-built-receipt.d.ts +25 -0
- package/dist/ensure-built-receipt.d.ts.map +1 -0
- package/dist/ensure-built-receipt.js +261 -0
- package/dist/ensure-built-witness.d.ts +57 -0
- package/dist/ensure-built-witness.d.ts.map +1 -0
- package/dist/ensure-built-witness.js +412 -0
- package/dist/ensure-built.d.ts +213 -12
- package/dist/ensure-built.d.ts.map +1 -1
- package/dist/ensure-built.js +624 -177
- package/dist/eslint-file-set.d.ts +7 -0
- package/dist/eslint-file-set.d.ts.map +1 -0
- package/dist/eslint-file-set.js +12 -0
- package/dist/executors/bounded-exec/cpu-pool.d.ts +63 -0
- package/dist/executors/bounded-exec/cpu-pool.d.ts.map +1 -0
- package/dist/executors/bounded-exec/cpu-pool.js +379 -0
- package/dist/executors/bounded-exec/cpu-tokens.d.ts +82 -0
- package/dist/executors/bounded-exec/cpu-tokens.d.ts.map +1 -0
- package/dist/executors/bounded-exec/cpu-tokens.js +114 -0
- package/dist/executors/bounded-exec/disk-lease.d.ts +61 -0
- package/dist/executors/bounded-exec/disk-lease.d.ts.map +1 -0
- package/dist/executors/bounded-exec/disk-lease.js +91 -0
- package/dist/executors/bounded-exec/executor.d.ts +45 -2
- package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
- package/dist/executors/bounded-exec/executor.js +447 -52
- package/dist/executors/bounded-exec/gateway-lease.d.ts +52 -0
- package/dist/executors/bounded-exec/gateway-lease.d.ts.map +1 -0
- package/dist/executors/bounded-exec/gateway-lease.js +143 -0
- package/dist/executors/bounded-exec/hang-diagnostics.d.ts +35 -0
- package/dist/executors/bounded-exec/hang-diagnostics.d.ts.map +1 -0
- package/dist/executors/bounded-exec/hang-diagnostics.js +231 -0
- package/dist/executors/bounded-exec/progress.d.ts +35 -0
- package/dist/executors/bounded-exec/progress.d.ts.map +1 -0
- package/dist/executors/bounded-exec/progress.js +79 -0
- package/dist/executors/bounded-exec/ram-temp-fixtures.d.ts +3 -0
- package/dist/executors/bounded-exec/ram-temp-fixtures.d.ts.map +1 -0
- package/dist/executors/bounded-exec/ram-temp-fixtures.js +12 -0
- package/dist/executors/bounded-exec/ram-temp-held.d.ts +91 -0
- package/dist/executors/bounded-exec/ram-temp-held.d.ts.map +1 -0
- package/dist/executors/bounded-exec/ram-temp-held.js +152 -0
- package/dist/executors/bounded-exec/ram-temp.d.ts +223 -0
- package/dist/executors/bounded-exec/ram-temp.d.ts.map +1 -0
- package/dist/executors/bounded-exec/ram-temp.js +1528 -0
- package/dist/executors/bounded-exec/schema.d.ts +29 -11
- package/dist/executors/bounded-exec/schema.d.ts.map +1 -1
- package/dist/executors/bounded-exec/verdict.d.ts +162 -0
- package/dist/executors/bounded-exec/verdict.d.ts.map +1 -0
- package/dist/executors/bounded-exec/verdict.js +318 -0
- package/dist/executors/shard-timings/executor.d.ts +14 -0
- package/dist/executors/shard-timings/executor.d.ts.map +1 -0
- package/dist/executors/shard-timings/executor.js +25 -0
- package/dist/executors/shard-timings/schema.d.ts +4 -0
- package/dist/executors/shard-timings/schema.d.ts.map +1 -0
- package/dist/executors/shard-timings/schema.js +1 -0
- package/dist/failure-summary.d.ts +5 -0
- package/dist/failure-summary.d.ts.map +1 -0
- package/dist/failure-summary.js +118 -0
- package/dist/generators/create-package/generator.d.ts.map +1 -1
- package/dist/generators/create-package/generator.js +6 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +435 -230
- package/dist/managed-assets.d.ts +6 -0
- package/dist/managed-assets.d.ts.map +1 -1
- package/dist/managed-files/ci-workflow.d.ts +13 -0
- package/dist/managed-files/ci-workflow.d.ts.map +1 -1
- package/dist/managed-files/ci-workflow.js +44 -13
- package/dist/managed-files/files.d.ts +7 -1
- package/dist/managed-files/files.d.ts.map +1 -1
- package/dist/managed-files/files.js +62 -8
- package/dist/managed-files/json-edit.d.ts +21 -0
- package/dist/managed-files/json-edit.d.ts.map +1 -0
- package/dist/managed-files/json-edit.js +295 -0
- package/dist/managed-files/managed-format.d.ts +33 -1
- package/dist/managed-files/managed-format.d.ts.map +1 -1
- package/dist/managed-files/managed-format.js +82 -2
- package/dist/managed-files/pr-preview-cleanup-workflow.d.ts +7 -0
- package/dist/managed-files/pr-preview-cleanup-workflow.d.ts.map +1 -1
- package/dist/managed-files/pr-preview-cleanup-workflow.js +68 -4
- package/dist/managed-files/publish-workflow.d.ts.map +1 -1
- package/dist/managed-files/publish-workflow.js +231 -48
- package/dist/managed-files/tree.d.ts +5 -0
- package/dist/managed-files/tree.d.ts.map +1 -1
- package/dist/managed-files/tree.js +5 -3
- package/dist/manifest-hash.js +3 -2
- package/dist/nextest-code-bound.d.ts +62 -0
- package/dist/nextest-code-bound.d.ts.map +1 -0
- package/dist/nextest-code-bound.js +154 -0
- package/dist/nextest-extraction.d.ts +24 -8
- package/dist/nextest-extraction.d.ts.map +1 -1
- package/dist/nextest-extraction.js +42 -7
- package/dist/package-target-policy.d.ts.map +1 -1
- package/dist/package-target-policy.js +3 -5
- package/dist/release-config-policy.d.ts.map +1 -1
- package/dist/release-config-policy.js +3 -5
- package/dist/runtime-input.d.ts +14 -0
- package/dist/runtime-input.d.ts.map +1 -0
- package/dist/runtime-input.js +15 -0
- package/dist/rust-tokens.d.ts +11 -0
- package/dist/rust-tokens.d.ts.map +1 -0
- package/dist/rust-tokens.js +81 -0
- package/dist/task-results.d.ts +6 -0
- package/dist/task-results.d.ts.map +1 -0
- package/dist/task-results.js +61 -0
- package/dist/test-program.d.ts +54 -0
- package/dist/test-program.d.ts.map +1 -0
- package/dist/test-program.js +292 -0
- package/dist/test-timings.d.ts +71 -0
- package/dist/test-timings.d.ts.map +1 -0
- package/dist/test-timings.js +393 -0
- package/dist/test-walk-policy.d.ts +103 -0
- package/dist/test-walk-policy.d.ts.map +1 -0
- package/dist/test-walk-policy.js +657 -0
- package/dist/testing.d.ts +177 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +824 -0
- package/dist/type-guards.d.ts +3 -0
- package/dist/type-guards.d.ts.map +1 -0
- package/dist/type-guards.js +4 -0
- package/dist/typecheck-test-policy.d.ts +8 -5
- package/dist/typecheck-test-policy.d.ts.map +1 -1
- package/dist/typecheck-test-policy.js +113 -100
- package/dist/workspace-config-policy.d.ts +8 -0
- package/dist/workspace-config-policy.d.ts.map +1 -1
- package/dist/workspace-config-policy.js +175 -63
- package/dist/workspace-index.d.ts +12 -0
- package/dist/workspace-index.d.ts.map +1 -0
- package/dist/workspace-index.js +17 -0
- package/dist/workspace-manifest.d.ts +37 -1
- package/dist/workspace-manifest.d.ts.map +1 -1
- package/executors.json +5 -0
- package/loader.js +13 -11
- package/managed/raw/envrc +33 -62
- package/managed/raw/git-format-staged.yml +30 -35
- package/managed/raw/patches/nx@23.2.1.patch +3484 -0
- package/managed/raw/tooling/direnv/apple-developer.sh +83 -0
- package/managed/raw/tooling/direnv/developer-links.ts +607 -17
- package/managed/raw/tooling/direnv/devenv.smoo.nix +314 -92
- package/managed/raw/tooling/direnv/github-actions-bootstrap.sh +20 -11
- package/managed/raw/tooling/direnv/linked-snapshots.ts +845 -0
- package/managed/raw/tooling/direnv/nx-socket-dir.sh +82 -0
- package/managed/raw/tooling/direnv/repo-path +14 -2
- package/managed/raw/tooling/direnv/setup-environment.ts +1009 -118
- package/managed/raw/tooling/direnv/toolchain-stamp.ts +45 -3
- package/managed/raw/tooling/direnv/ttsc-env.sh +39 -0
- package/managed/raw/tooling/git-hooks/commit-msg.sh +5 -6
- package/managed/raw/tooling/git-hooks/pre-commit.sh +7 -6
- package/managed/raw/tooling/git-hooks/pre-push.sh +20 -15
- package/managed/templates/github/actions/cache-nix-devenv/action.yml +6 -6
- package/managed/templates/github/actions/cache-node-modules/action.yml +6 -4
- package/managed/templates/github/actions/cache-nx/action.yml +1 -1
- package/managed/templates/github/actions/cache-ttsc-plugins/action.yml +1 -1
- package/managed/templates/github/actions/forgejo-artifact.cjs +99 -0
- package/managed/templates/github/actions/forgejo-download-artifact/action.yml +49 -0
- package/managed/templates/github/actions/forgejo-download-artifact/index.cjs +7 -0
- package/managed/templates/github/actions/forgejo-upload-artifact/action.yml +65 -0
- package/managed/templates/github/actions/forgejo-upload-artifact/index.cjs +7 -0
- package/managed/templates/github/actions/setup-devenv/action.yml +21 -3
- package/managed/templates/github/workflows/managed-files.yml +1 -2
- package/nextest.toml +8 -75
- package/package.json +75 -13
- package/runtime-input.sh +81 -0
- package/src/__tests__/counted-cargo-process.ts +286 -0
- package/src/__tests__/counted-cargo.ts +730 -0
- package/src/__tests__/fixture-cargo-home.ts +36 -0
- package/src/__tests__/fixture-nx-env.ts +157 -2
- package/src/__tests__/progress-clock.ts +43 -0
- package/src/__tests__/runtime-input.ts +23 -0
- package/src/bin/smoo-nx-bound-failures.test.ts +127 -0
- package/src/bin/smoo-nx-bound-failures.ts +33 -0
- package/src/bin/smoo-nx-cargo-hash.ts +28 -3
- package/src/bin/smoo-nx-exec.ts +17 -86
- package/src/bin/smoo-nx-failures.ts +4 -0
- package/src/bin/smoo-nx-nextest-extract.ts +3 -2
- package/src/bin/smoo-nx-test-walks.ts +42 -0
- package/src/bounded-test-policy.test.ts +268 -22
- package/src/bounded-test-policy.ts +114 -42
- package/src/build-state-output-policy.test.ts +115 -0
- package/src/build-state-output-policy.ts +90 -0
- package/src/bun-bootstrap.test.ts +57 -3
- package/src/bun-file-packages.test.ts +47 -0
- package/src/cargo-closure-input.test.ts +432 -62
- package/src/cargo-closure-input.ts +51 -57
- package/src/cargo-dev-profile.ts +137 -0
- package/src/cargo-resolve-cache.test.ts +1044 -0
- package/src/cargo-source-hash.test.ts +203 -93
- package/src/cargo-source-hash.ts +762 -75
- package/src/cargo-toolchain-policy.ts +6 -0
- package/src/cargo-workspace.test.ts +320 -0
- package/src/cargo-workspace.ts +344 -18
- package/src/cross-check-policy.test.ts +59 -1
- package/src/cross-check-policy.ts +25 -6
- package/src/disk-command-policy.test.ts +61 -0
- package/src/disk-command-policy.ts +107 -0
- package/src/ensure-built-receipt.test.ts +184 -0
- package/src/ensure-built-receipt.ts +263 -0
- package/src/ensure-built-witness.test.ts +344 -0
- package/src/ensure-built-witness.ts +252 -0
- package/src/ensure-built.test.ts +1043 -483
- package/src/ensure-built.ts +870 -197
- package/src/eslint-file-set.ts +9 -0
- package/src/executors/bounded-exec/cpu-pool.test.ts +454 -0
- package/src/executors/bounded-exec/cpu-pool.ts +417 -0
- package/src/executors/bounded-exec/cpu-tokens.test.ts +269 -0
- package/src/executors/bounded-exec/cpu-tokens.ts +177 -0
- package/src/executors/bounded-exec/disk-lease.test.ts +185 -0
- package/src/executors/bounded-exec/disk-lease.ts +139 -0
- package/src/executors/bounded-exec/executor-host.test.ts +778 -0
- package/src/executors/bounded-exec/executor.test.ts +1116 -63
- package/src/executors/bounded-exec/executor.ts +565 -67
- package/src/executors/bounded-exec/gateway-lease.ts +176 -0
- package/src/executors/bounded-exec/hang-diagnostics.test.ts +285 -0
- package/src/executors/bounded-exec/hang-diagnostics.ts +283 -0
- package/src/executors/bounded-exec/progress.test.ts +79 -0
- package/src/executors/bounded-exec/progress.ts +118 -0
- package/src/executors/bounded-exec/ram-temp-fixtures.ts +12 -0
- package/src/executors/bounded-exec/ram-temp-held.test.ts +264 -0
- package/src/executors/bounded-exec/ram-temp-held.ts +242 -0
- package/src/executors/bounded-exec/ram-temp-host.test.ts +605 -0
- package/src/executors/bounded-exec/ram-temp.test.ts +674 -0
- package/src/executors/bounded-exec/ram-temp.ts +1918 -0
- package/src/executors/bounded-exec/schema.json +11 -5
- package/src/executors/bounded-exec/schema.ts +27 -11
- package/src/executors/bounded-exec/verdict.test.ts +440 -0
- package/src/executors/bounded-exec/verdict.ts +433 -0
- package/src/executors/shard-timings/executor.ts +36 -0
- package/src/executors/shard-timings/schema.json +21 -0
- package/src/executors/shard-timings/schema.ts +4 -0
- package/src/failure-summary.ts +119 -0
- package/src/generators/bounded-test-targets/generator.test.ts +4 -4
- package/src/generators/bun-test-tracing/generator.test.ts +2 -2
- package/src/generators/create-package/generator.test.ts +6 -0
- package/src/generators/create-package/generator.ts +6 -2
- package/src/host-controller-wiring.test.ts +31 -0
- package/src/index.test.ts +1070 -360
- package/src/index.ts +524 -255
- package/src/linked-snapshots.nx.test.ts +172 -0
- package/src/managed-assets.ts +12 -0
- package/src/managed-files/ci-workflow.ts +54 -13
- package/src/managed-files/files.ts +65 -9
- package/src/managed-files/forgejo-artifact.test.ts +395 -0
- package/src/managed-files/generator.test.ts +60 -1
- package/src/managed-files/json-edit.test.ts +216 -0
- package/src/managed-files/json-edit.ts +290 -0
- package/src/managed-files/managed-format-json.test.ts +308 -0
- package/src/managed-files/managed-format.ts +90 -2
- package/src/managed-files/pr-preview-cleanup-workflow.ts +69 -3
- package/src/managed-files/publish-workflow.ts +285 -67
- package/src/managed-files/repo-path.test.ts +129 -0
- package/src/managed-files/trace-db-artifact.test.ts +7 -0
- package/src/managed-files/tree.ts +11 -3
- package/src/manifest-hash.ts +3 -2
- package/src/nextest-code-bound.test.ts +155 -0
- package/src/nextest-code-bound.ts +195 -0
- package/src/nextest-extraction.test.ts +37 -5
- package/src/nextest-extraction.ts +51 -9
- package/src/nextest-partitions.test.ts +495 -0
- package/src/nx-cache-bound.test.ts +109 -0
- package/src/nx-cache-restore-mtime.test.ts +170 -0
- package/src/nx-daemon-claim.test.ts +277 -0
- package/src/nx-daemon-idle-cpu.test.ts +81 -0
- package/src/nx-daemon-idle-policy.test.ts +51 -0
- package/src/nx-daemon-ignore-files.test.ts +210 -0
- package/src/nx-daemon-root-normalization.test.ts +105 -0
- package/src/nx-daemon-validity.test.ts +925 -0
- package/src/nx-dot-input-policy.test.ts +353 -0
- package/src/nx-failure-life-cycles.test.ts +207 -0
- package/src/nx-files-archive-racy.test.ts +97 -0
- package/src/nx-foreign-workspace-env.test.ts +329 -0
- package/src/nx-incomplete-run-summary.test.ts +70 -0
- package/src/nx-plugin-load-errors.test.ts +120 -0
- package/src/nx-project-resolution-cache.test.ts +176 -0
- package/src/nx-raw-inputs.test.ts +166 -0
- package/src/nx-resident-graph-workers.test.ts +112 -0
- package/src/nx-run-information.test.ts +118 -0
- package/src/nx-skipped-task-exit.test.ts +180 -0
- package/src/nx-state-location.test.ts +63 -0
- package/src/nx-store-resolution.test.ts +99 -0
- package/src/nx-task-graph-cycles.test.ts +148 -0
- package/src/nx-task-output-lease.test.ts +414 -0
- package/src/nx-use-local.test.ts +103 -0
- package/src/package-target-policy.ts +3 -6
- package/src/release-config-policy.ts +3 -6
- package/src/runtime-input.test.ts +215 -0
- package/src/runtime-input.ts +17 -0
- package/src/rust-tokens.ts +78 -0
- package/src/serial-group-wiring.test.ts +326 -0
- package/src/task-history-namespace.test.ts +181 -0
- package/src/task-results.test.ts +226 -0
- package/src/task-results.ts +75 -0
- package/src/test-program.test.ts +303 -0
- package/src/test-program.ts +341 -0
- package/src/test-timings.test.ts +240 -0
- package/src/test-timings.ts +311 -0
- package/src/test-walk-policy.test.ts +585 -0
- package/src/test-walk-policy.ts +731 -0
- package/src/testing.test.ts +509 -0
- package/src/testing.ts +922 -0
- package/src/type-guards.ts +4 -0
- package/src/typecheck-test-policy.test.ts +496 -11
- package/src/typecheck-test-policy.ts +137 -103
- package/src/workspace-config-policy.test.ts +212 -13
- package/src/workspace-config-policy.ts +101 -73
- package/src/workspace-index.ts +18 -0
- package/src/workspace-manifest.ts +41 -1
- package/test-timings.json +85 -28
- package/managed/raw/tooling/direnv/inherited-devenv.ts +0 -615
- package/managed/raw/tooling/direnv/shared-caches.sh +0 -53
- package/src/__tests__/in-process-nx-index.ts +0 -9
|
@@ -1,8 +1,91 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as _validateReport_1 from "typia/lib/internal/_validateReport";
|
|
2
|
+
import * as _createStandardSchema_1 from "typia/lib/internal/_createStandardSchema";
|
|
3
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
2
4
|
import { join } from 'node:path';
|
|
3
|
-
import { readJson,
|
|
5
|
+
import { readJson, writeJson } from 'nx/src/devkit-exports.js';
|
|
6
|
+
import typia from 'typia';
|
|
4
7
|
import { CARGO_TEST_TARGET } from './cargo-workspace.js';
|
|
8
|
+
import { writeJsonFile } from './managed-files/managed-format.js';
|
|
5
9
|
export const MANAGED_FILES_SYNC_GENERATOR = '@smoothbricks/nx-plugin:managed-files';
|
|
10
|
+
const validatePlugins = (() => {
|
|
11
|
+
const _io0 = input => "string" === typeof input.plugin && true && (undefined === input.include || Array.isArray(input.include) && input.include.every(elem => "string" === typeof elem)) && (undefined === input.exclude || Array.isArray(input.exclude) && input.exclude.every(elem => "string" === typeof elem));
|
|
12
|
+
const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.plugin || _report(_exceptionable, {
|
|
13
|
+
path: _path + ".plugin",
|
|
14
|
+
expected: "string",
|
|
15
|
+
value: input.plugin
|
|
16
|
+
}), true, undefined === input.include || (Array.isArray(input.include) || _report(_exceptionable, {
|
|
17
|
+
path: _path + ".include",
|
|
18
|
+
expected: "(Array<string> | undefined)",
|
|
19
|
+
value: input.include
|
|
20
|
+
})) && input.include.map((elem, _index5) => "string" === typeof elem || _report(_exceptionable, {
|
|
21
|
+
path: _path + ".include[" + _index5 + "]",
|
|
22
|
+
expected: "string",
|
|
23
|
+
value: elem
|
|
24
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
25
|
+
path: _path + ".include",
|
|
26
|
+
expected: "(Array<string> | undefined)",
|
|
27
|
+
value: input.include
|
|
28
|
+
}), undefined === input.exclude || (Array.isArray(input.exclude) || _report(_exceptionable, {
|
|
29
|
+
path: _path + ".exclude",
|
|
30
|
+
expected: "(Array<string> | undefined)",
|
|
31
|
+
value: input.exclude
|
|
32
|
+
})) && input.exclude.map((elem, _index6) => "string" === typeof elem || _report(_exceptionable, {
|
|
33
|
+
path: _path + ".exclude[" + _index6 + "]",
|
|
34
|
+
expected: "string",
|
|
35
|
+
value: elem
|
|
36
|
+
})).every(flag => flag) || _report(_exceptionable, {
|
|
37
|
+
path: _path + ".exclude",
|
|
38
|
+
expected: "(Array<string> | undefined)",
|
|
39
|
+
value: input.exclude
|
|
40
|
+
})].every(flag => flag);
|
|
41
|
+
const __is = input => Array.isArray(input) && input.every(elem => null !== elem && undefined !== elem && ("string" === typeof elem || "object" === typeof elem && null !== elem && _io0(elem)));
|
|
42
|
+
let errors;
|
|
43
|
+
let _report;
|
|
44
|
+
return _createStandardSchema_1._createStandardSchema(input => {
|
|
45
|
+
if (false === __is(input)) {
|
|
46
|
+
errors = [];
|
|
47
|
+
_report = _validateReport_1._validateReport(errors);
|
|
48
|
+
((input, _path, _exceptionable = true) => (Array.isArray(input) || _report(true, {
|
|
49
|
+
path: _path + "",
|
|
50
|
+
expected: "Array<PluginConfiguration>",
|
|
51
|
+
value: input
|
|
52
|
+
})) && input.map((elem, _index4) => (null !== elem || _report(true, {
|
|
53
|
+
path: _path + "[" + _index4 + "]",
|
|
54
|
+
expected: "(ExpandedPluginConfiguration<unknown> | string)",
|
|
55
|
+
value: elem
|
|
56
|
+
})) && (undefined !== elem || _report(true, {
|
|
57
|
+
path: _path + "[" + _index4 + "]",
|
|
58
|
+
expected: "(ExpandedPluginConfiguration<unknown> | string)",
|
|
59
|
+
value: elem
|
|
60
|
+
})) && ("string" === typeof elem || ("object" === typeof elem && null !== elem || _report(true, {
|
|
61
|
+
path: _path + "[" + _index4 + "]",
|
|
62
|
+
expected: "(ExpandedPluginConfiguration<unknown> | string)",
|
|
63
|
+
value: elem
|
|
64
|
+
})) && _vo0(elem, _path + "[" + _index4 + "]", true) || _report(true, {
|
|
65
|
+
path: _path + "[" + _index4 + "]",
|
|
66
|
+
expected: "(ExpandedPluginConfiguration<unknown> | string)",
|
|
67
|
+
value: elem
|
|
68
|
+
}))).every(flag => flag) || _report(true, {
|
|
69
|
+
path: _path + "",
|
|
70
|
+
expected: "Array<PluginConfiguration>",
|
|
71
|
+
value: input
|
|
72
|
+
}))(input, "$input", true);
|
|
73
|
+
const success = 0 === errors.length;
|
|
74
|
+
return success ? {
|
|
75
|
+
success,
|
|
76
|
+
data: input
|
|
77
|
+
} : {
|
|
78
|
+
success,
|
|
79
|
+
errors,
|
|
80
|
+
data: input
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
success: true,
|
|
85
|
+
data: input
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
})();
|
|
6
89
|
export const BUILD_OUTPUT_DEPENDENCIES = [
|
|
7
90
|
'*-js',
|
|
8
91
|
'*-web',
|
|
@@ -44,16 +127,31 @@ export function isTestRunnerTargetName(name) {
|
|
|
44
127
|
const nxJsTypescriptPlugin = '@nx/js/typescript';
|
|
45
128
|
const smoothBricksNxPlugin = '@smoothbricks/nx-plugin';
|
|
46
129
|
const cleanOutputsExecutor = '@smoothbricks/nx-plugin:clean-outputs';
|
|
47
|
-
const
|
|
130
|
+
const ciWorkflowNamedInput = ['{workspaceRoot}/.github/workflows/ci.yml'];
|
|
48
131
|
const inferredTestTypecheckTarget = 'typecheck-tests';
|
|
132
|
+
/**
|
|
133
|
+
* Markdown is documentation: no inferred task reads it, so a README or spec edit must not re-key every task of the
|
|
134
|
+
* project and, through `^default`/`^production`, of every project depending on it. A target that does read Markdown
|
|
135
|
+
* (a docs site build, a binary that `include_str!`s a shipped skill) names those files in its own inputs.
|
|
136
|
+
*/
|
|
137
|
+
const MARKDOWN_EXCLUSION = '!{projectRoot}/**/*.md';
|
|
49
138
|
const defaultProductionNamedInput = [
|
|
50
139
|
'{projectRoot}/src/**/*',
|
|
51
140
|
'{projectRoot}/package.json',
|
|
52
141
|
'!{projectRoot}/**/__tests__/**',
|
|
53
142
|
'!{projectRoot}/**/*.test.*',
|
|
54
143
|
'!{projectRoot}/**/*.spec.*',
|
|
144
|
+
MARKDOWN_EXCLUSION,
|
|
55
145
|
];
|
|
56
146
|
const impreciseProductionInputs = new Set(['default', '{projectRoot}/**/*', '{projectRoot}/**']);
|
|
147
|
+
/**
|
|
148
|
+
* Every checkout keeps its Nx state in its own `.nx` (specs/cowshed/16_build_volumes.md, "Every checkout has exactly
|
|
149
|
+
* one Nx state"). With no `NX_*_DIRECTORY` set, as in a host shell, the pinned Nx 23.2.1 otherwise moves the task cache
|
|
150
|
+
* and its database to a per-user `~/.nx/<id>` keyed by the repository's remote (`utils/cache-directory.js`,
|
|
151
|
+
* `computeSharedDataLocation`), shared by every checkout of the repository. A configured `cacheDirectory` keeps both
|
|
152
|
+
* local: the cache here, the task database in Nx's default `.nx/workspace-data`. nx.json has no key for the latter.
|
|
153
|
+
*/
|
|
154
|
+
export const CHECKOUT_NX_CACHE_DIRECTORY = '.nx/cache';
|
|
57
155
|
/**
|
|
58
156
|
* Check workspace config policy on an in-memory nx.json object.
|
|
59
157
|
*/
|
|
@@ -88,22 +186,37 @@ export function checkWorkspaceConfig(nxJson) {
|
|
|
88
186
|
validateCleanTargetDefault(nxJson, 'nx.json', issues);
|
|
89
187
|
// Named input defaults
|
|
90
188
|
validateNamedInputDefaults(nxJson, 'nx.json', issues);
|
|
91
|
-
|
|
92
|
-
const plugins = Array.isArray(nxJson.plugins) ? nxJson.plugins : [];
|
|
93
|
-
if (plugins.some(isNxJsTypescriptPlugin)) {
|
|
189
|
+
if (nxJson.cacheDirectory !== CHECKOUT_NX_CACHE_DIRECTORY) {
|
|
94
190
|
issues.push({
|
|
95
191
|
path: 'nx.json',
|
|
96
|
-
message: `
|
|
97
|
-
|
|
192
|
+
message: `cacheDirectory must be "${CHECKOUT_NX_CACHE_DIRECTORY}". ` +
|
|
193
|
+
"Without it Nx keeps the task cache and its database in a per-user ~/.nx/<id> shared by every checkout, not in the checkout's own .nx.",
|
|
98
194
|
});
|
|
99
195
|
}
|
|
100
|
-
|
|
196
|
+
// Plugin configuration
|
|
197
|
+
const plugins = validatePlugins(nxJson.plugins === undefined ? [] : nxJson.plugins);
|
|
198
|
+
if (!plugins.success) {
|
|
101
199
|
issues.push({
|
|
102
200
|
path: 'nx.json',
|
|
103
|
-
message: `plugins
|
|
104
|
-
'Smoo relies on this plugin to infer convention targets that official Nx does not provide, including typecheck-tests, non-TypeScript build-tool targets, and aggregate build/lint targets.',
|
|
201
|
+
message: `plugins is malformed: ${plugins.errors.map(({ path, expected }) => `${path}: expected ${expected}`).join('; ')}`,
|
|
105
202
|
});
|
|
106
203
|
}
|
|
204
|
+
else {
|
|
205
|
+
if (plugins.data.some((plugin) => nxPluginName(plugin) === nxJsTypescriptPlugin)) {
|
|
206
|
+
issues.push({
|
|
207
|
+
path: 'nx.json',
|
|
208
|
+
message: `plugins must not configure ${nxJsTypescriptPlugin}. ` +
|
|
209
|
+
'Smoo owns transformer-aware TypeScript targets; Nx native inference only supports tsc/tsgo.',
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
if (!plugins.data.some((plugin) => nxPluginName(plugin) === smoothBricksNxPlugin)) {
|
|
213
|
+
issues.push({
|
|
214
|
+
path: 'nx.json',
|
|
215
|
+
message: `plugins must include ${smoothBricksNxPlugin}. ` +
|
|
216
|
+
'Smoo relies on this plugin to infer convention targets that official Nx does not provide, including typecheck-tests, non-TypeScript build-tool targets, and aggregate build/lint targets.',
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
}
|
|
107
220
|
return issues;
|
|
108
221
|
}
|
|
109
222
|
/**
|
|
@@ -111,18 +224,23 @@ export function checkWorkspaceConfig(nxJson) {
|
|
|
111
224
|
* Mutates in place, returns whether anything changed.
|
|
112
225
|
*/
|
|
113
226
|
export function applyWorkspaceConfig(nxJson) {
|
|
114
|
-
let changed =
|
|
227
|
+
let changed = setStringProperty(nxJson, 'cacheDirectory', CHECKOUT_NX_CACHE_DIRECTORY);
|
|
228
|
+
changed = removeDisallowedTargetDefaults(nxJson) || changed;
|
|
115
229
|
changed = applyBuildTargetDefault(nxJson) || changed;
|
|
116
230
|
changed = applyTestTargetDefault(nxJson) || changed;
|
|
117
231
|
changed = applyLintTargetDefault(nxJson) || changed;
|
|
118
232
|
changed = applyCleanTargetDefault(nxJson) || changed;
|
|
119
233
|
changed = applyNamedInputDefaults(nxJson) || changed;
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
234
|
+
const plugins = validatePlugins(nxJson.plugins === undefined ? [] : nxJson.plugins);
|
|
235
|
+
if (plugins.success) {
|
|
236
|
+
const nextPlugins = plugins.data.filter((plugin) => nxPluginName(plugin) !== nxJsTypescriptPlugin);
|
|
237
|
+
if (!nextPlugins.some((plugin) => nxPluginName(plugin) === smoothBricksNxPlugin)) {
|
|
238
|
+
nextPlugins.push(smoothBricksNxPlugin);
|
|
239
|
+
}
|
|
240
|
+
if (JSON.stringify(plugins.data) !== JSON.stringify(nextPlugins)) {
|
|
241
|
+
nxJson.plugins = nextPlugins;
|
|
242
|
+
changed = true;
|
|
243
|
+
}
|
|
126
244
|
}
|
|
127
245
|
const sync = recordProperty(nxJson, 'sync') ?? {};
|
|
128
246
|
const generators = Array.isArray(sync.globalGenerators) ? sync.globalGenerators : [];
|
|
@@ -149,11 +267,10 @@ export function applyWorkspaceConfigTree(tree) {
|
|
|
149
267
|
if (!tree.exists('nx.json')) {
|
|
150
268
|
return false;
|
|
151
269
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
});
|
|
270
|
+
const nxJson = readJson(tree, 'nx.json');
|
|
271
|
+
const changed = applyWorkspaceConfig(nxJson);
|
|
272
|
+
if (changed)
|
|
273
|
+
writeJson(tree, 'nx.json', nxJson);
|
|
157
274
|
return changed;
|
|
158
275
|
}
|
|
159
276
|
/**
|
|
@@ -183,7 +300,7 @@ export function applyWorkspaceConfigPolicy(root) {
|
|
|
183
300
|
}
|
|
184
301
|
const changed = applyWorkspaceConfig(nxJson);
|
|
185
302
|
if (changed) {
|
|
186
|
-
|
|
303
|
+
writeJsonFile(nxJsonPath, nxJson);
|
|
187
304
|
}
|
|
188
305
|
return changed;
|
|
189
306
|
}
|
|
@@ -247,10 +364,15 @@ function validateNamedInputDefaults(nxJson, nxJsonPath, issues) {
|
|
|
247
364
|
message: 'namedInputs.default must be an array; smoo allows it to remain broad for non-production tasks.',
|
|
248
365
|
});
|
|
249
366
|
}
|
|
250
|
-
if (!
|
|
367
|
+
else if (!namedInputs.default.includes(MARKDOWN_EXCLUSION)) {
|
|
368
|
+
issues.push({ path: nxJsonPath, message: markdownExclusionMessage('default') });
|
|
369
|
+
}
|
|
370
|
+
if (Array.isArray(namedInputs.default) &&
|
|
371
|
+
namedInputs.default.includes('sharedGlobals') &&
|
|
372
|
+
stringArrayEquals(namedInputs.sharedGlobals, ciWorkflowNamedInput)) {
|
|
251
373
|
issues.push({
|
|
252
374
|
path: nxJsonPath,
|
|
253
|
-
message: 'namedInputs.
|
|
375
|
+
message: 'namedInputs.default must not include CI-only sharedGlobals; workflow targets may name their CI inputs explicitly.',
|
|
254
376
|
});
|
|
255
377
|
}
|
|
256
378
|
const production = namedInputs.production;
|
|
@@ -267,6 +389,12 @@ function validateNamedInputDefaults(nxJson, nxJsonPath, issues) {
|
|
|
267
389
|
message: 'namedInputs.production must enumerate precise production inputs. Do not include default or broad {projectRoot}/** globs; use language/tool-specific paths such as {projectRoot}/src/**/*, {projectRoot}/Cargo.toml, or {projectRoot}/pyproject.toml.',
|
|
268
390
|
});
|
|
269
391
|
}
|
|
392
|
+
else if (!production.includes(MARKDOWN_EXCLUSION)) {
|
|
393
|
+
issues.push({ path: nxJsonPath, message: markdownExclusionMessage('production') });
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
function markdownExclusionMessage(name) {
|
|
397
|
+
return `namedInputs.${name} must exclude ${MARKDOWN_EXCLUSION.slice(1)}: Markdown is no task's input unless a target names it.`;
|
|
270
398
|
}
|
|
271
399
|
function applyBuildTargetDefault(nxJson) {
|
|
272
400
|
const targetDefaults = getOrCreateRecord(nxJson, 'targetDefaults');
|
|
@@ -303,11 +431,14 @@ function applyTestTargetDefault(nxJson) {
|
|
|
303
431
|
return true;
|
|
304
432
|
}
|
|
305
433
|
const inferredLintProperties = ['executor', 'options', 'dependsOn', 'outputs', 'inputs'];
|
|
434
|
+
function preservesInferredLintInputs(inputs) {
|
|
435
|
+
return Array.isArray(inputs) && inputs.includes('...') && inputs.includes('^production');
|
|
436
|
+
}
|
|
306
437
|
function validateLintTargetDefault(nxJson, nxJsonPath, issues) {
|
|
307
438
|
const defaults = recordProperty(nxJson, 'targetDefaults');
|
|
308
439
|
const lint = defaults ? recordProperty(defaults, 'lint') : null;
|
|
309
440
|
for (const property of inferredLintProperties) {
|
|
310
|
-
if (lint !== null && property in lint) {
|
|
441
|
+
if (lint !== null && property in lint && !(property === 'inputs' && preservesInferredLintInputs(lint.inputs))) {
|
|
311
442
|
issues.push({
|
|
312
443
|
path: nxJsonPath,
|
|
313
444
|
message: `targetDefaults.lint.${property} must not be set; @smoothbricks/nx-plugin infers lint from project sources`,
|
|
@@ -322,7 +453,7 @@ function applyLintTargetDefault(nxJson) {
|
|
|
322
453
|
return false;
|
|
323
454
|
let changed = false;
|
|
324
455
|
for (const property of inferredLintProperties) {
|
|
325
|
-
if (property in lint) {
|
|
456
|
+
if (property in lint && !(property === 'inputs' && preservesInferredLintInputs(lint.inputs))) {
|
|
326
457
|
delete lint[property];
|
|
327
458
|
changed = true;
|
|
328
459
|
}
|
|
@@ -339,16 +470,27 @@ function applyCleanTargetDefault(nxJson) {
|
|
|
339
470
|
function applyNamedInputDefaults(nxJson) {
|
|
340
471
|
const namedInputs = getOrCreateRecord(nxJson, 'namedInputs');
|
|
341
472
|
let changed = false;
|
|
342
|
-
|
|
343
|
-
|
|
473
|
+
const defaults = namedInputs.default;
|
|
474
|
+
if (!Array.isArray(defaults)) {
|
|
475
|
+
namedInputs.default = ['{projectRoot}/**/*', MARKDOWN_EXCLUSION];
|
|
476
|
+
changed = true;
|
|
477
|
+
}
|
|
478
|
+
else if (defaults.includes('sharedGlobals') && stringArrayEquals(namedInputs.sharedGlobals, ciWorkflowNamedInput)) {
|
|
479
|
+
namedInputs.default = defaults.filter((input) => input !== 'sharedGlobals');
|
|
344
480
|
changed = true;
|
|
345
481
|
}
|
|
346
|
-
changed = setStringArrayProperty(namedInputs, 'sharedGlobals', expectedSharedGlobalsNamedInput) || changed;
|
|
347
482
|
const production = namedInputs.production;
|
|
348
483
|
if (!Array.isArray(production) || !isPreciseProductionNamedInput(production)) {
|
|
349
484
|
namedInputs.production = defaultProductionNamedInput;
|
|
350
485
|
changed = true;
|
|
351
486
|
}
|
|
487
|
+
for (const name of ['default', 'production']) {
|
|
488
|
+
const inputs = namedInputs[name];
|
|
489
|
+
if (Array.isArray(inputs) && !inputs.includes(MARKDOWN_EXCLUSION)) {
|
|
490
|
+
namedInputs[name] = [...inputs, MARKDOWN_EXCLUSION];
|
|
491
|
+
changed = true;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
352
494
|
return changed;
|
|
353
495
|
}
|
|
354
496
|
function removeDisallowedTargetDefaults(nxJson) {
|
|
@@ -381,23 +523,8 @@ function isPreciseProductionNamedInput(production) {
|
|
|
381
523
|
}
|
|
382
524
|
return hasPositiveProjectInput;
|
|
383
525
|
}
|
|
384
|
-
function
|
|
385
|
-
|
|
386
|
-
const next = plugins.filter((entry) => nxPluginName(entry) !== pluginName);
|
|
387
|
-
next.push(plugin);
|
|
388
|
-
return next;
|
|
389
|
-
}
|
|
390
|
-
function nxPluginName(value) {
|
|
391
|
-
if (typeof value === 'string') {
|
|
392
|
-
return value;
|
|
393
|
-
}
|
|
394
|
-
return isRecord(value) ? stringProperty(value, 'plugin') : null;
|
|
395
|
-
}
|
|
396
|
-
function isNxJsTypescriptPlugin(value) {
|
|
397
|
-
return (value === nxJsTypescriptPlugin || (isRecord(value) && stringProperty(value, 'plugin') === nxJsTypescriptPlugin));
|
|
398
|
-
}
|
|
399
|
-
function isSmoothBricksNxPluginRecord(value) {
|
|
400
|
-
return isRecord(value) && stringProperty(value, 'plugin') === smoothBricksNxPlugin;
|
|
526
|
+
function nxPluginName(plugin) {
|
|
527
|
+
return typeof plugin === 'string' ? plugin : plugin.plugin;
|
|
401
528
|
}
|
|
402
529
|
function readJsonObject(path) {
|
|
403
530
|
if (!existsSync(path)) {
|
|
@@ -411,16 +538,9 @@ function readJsonObject(path) {
|
|
|
411
538
|
return null;
|
|
412
539
|
}
|
|
413
540
|
}
|
|
414
|
-
function writeJsonObject(path, value) {
|
|
415
|
-
writeFileSync(path, `${JSON.stringify(value, null, 2)}\n`);
|
|
416
|
-
}
|
|
417
541
|
function isRecord(value) {
|
|
418
542
|
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
419
543
|
}
|
|
420
|
-
function stringProperty(record, key) {
|
|
421
|
-
const value = record[key];
|
|
422
|
-
return typeof value === 'string' && value.length > 0 ? value : null;
|
|
423
|
-
}
|
|
424
544
|
function recordProperty(record, key) {
|
|
425
545
|
const value = record[key];
|
|
426
546
|
return isRecord(value) ? value : null;
|
|
@@ -448,14 +568,6 @@ function setStringProperty(record, key, value) {
|
|
|
448
568
|
record[key] = value;
|
|
449
569
|
return true;
|
|
450
570
|
}
|
|
451
|
-
function setStringArrayProperty(record, key, value) {
|
|
452
|
-
const current = record[key];
|
|
453
|
-
if (stringArrayEquals(current, value)) {
|
|
454
|
-
return false;
|
|
455
|
-
}
|
|
456
|
-
record[key] = value;
|
|
457
|
-
return true;
|
|
458
|
-
}
|
|
459
571
|
function stringArrayEquals(value, expected) {
|
|
460
572
|
return (Array.isArray(value) && value.length === expected.length && value.every((entry, index) => entry === expected[index]));
|
|
461
573
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The files of Nx's workspace file index that match `globs`, workspace-relative:
|
|
3
|
+
* .gitignore and .nxignore applied, `node_modules` never entered. These are
|
|
4
|
+
* exactly the files Nx's hasher can read, so a value inference derives from
|
|
5
|
+
* them is the same in every checkout of one tree, whatever ignored build
|
|
6
|
+
* output happens to be on disk.
|
|
7
|
+
*
|
|
8
|
+
* The daemon serves only its own workspace's index. Any other root, such as a
|
|
9
|
+
* test fixture or a foreign checkout, is indexed by this process's context.
|
|
10
|
+
*/
|
|
11
|
+
export declare function globIndexedFiles(workspaceRoot: string, globs: string[]): Promise<string[]>;
|
|
12
|
+
//# sourceMappingURL=workspace-index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-index.d.ts","sourceRoot":"","sources":["../src/workspace-index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAIhG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { globWithWorkspaceContext, globWithWorkspaceContextSync } from 'nx/src/utils/workspace-context.js';
|
|
2
|
+
import { workspaceRoot as daemonWorkspaceRoot } from 'nx/src/utils/workspace-root.js';
|
|
3
|
+
/**
|
|
4
|
+
* The files of Nx's workspace file index that match `globs`, workspace-relative:
|
|
5
|
+
* .gitignore and .nxignore applied, `node_modules` never entered. These are
|
|
6
|
+
* exactly the files Nx's hasher can read, so a value inference derives from
|
|
7
|
+
* them is the same in every checkout of one tree, whatever ignored build
|
|
8
|
+
* output happens to be on disk.
|
|
9
|
+
*
|
|
10
|
+
* The daemon serves only its own workspace's index. Any other root, such as a
|
|
11
|
+
* test fixture or a foreign checkout, is indexed by this process's context.
|
|
12
|
+
*/
|
|
13
|
+
export async function globIndexedFiles(workspaceRoot, globs) {
|
|
14
|
+
return workspaceRoot === daemonWorkspaceRoot
|
|
15
|
+
? globWithWorkspaceContext(workspaceRoot, globs)
|
|
16
|
+
: globWithWorkspaceContextSync(workspaceRoot, globs);
|
|
17
|
+
}
|
|
@@ -214,6 +214,30 @@ export interface PackageSecretCommand {
|
|
|
214
214
|
/** Overrides the derived group; absent derives one from this manifest and `.npmrc`. */
|
|
215
215
|
group?: SecretGroupName;
|
|
216
216
|
}
|
|
217
|
+
/**
|
|
218
|
+
* A directory relative to this checkout's root. Project-contained paths select that path in
|
|
219
|
+
* the current checkout, rejecting physical symlink escapes; inherited sibling links keep their
|
|
220
|
+
* absolute targets.
|
|
221
|
+
*/
|
|
222
|
+
export type DeveloperLinkDirectory = string & typia.tags.MinLength<1> & typia.tags.Pattern<'^[^/]'>;
|
|
223
|
+
/** An Nx task of the provider workspace: `project:target`, optionally `:configuration`. */
|
|
224
|
+
export type DeveloperLinkTarget = string & typia.tags.Pattern<'^[^:\\s]+:[^:\\s]+(?::[^:\\s]+)?$'>;
|
|
225
|
+
/**
|
|
226
|
+
* Binds a declared package's aliases to a sealed snapshot of its checkout
|
|
227
|
+
* (tooling/direnv/linked-snapshots.ts): `targets` are the provider Nx targets
|
|
228
|
+
* whose recorded outputs the snapshot publishes, and `artifactModules` the
|
|
229
|
+
* package's modules exporting `nativeArtifactPath()`, its own resolution of a
|
|
230
|
+
* native library the snapshot carries.
|
|
231
|
+
*/
|
|
232
|
+
export interface DeveloperLinkSnapshot {
|
|
233
|
+
targets: DeveloperLinkTarget[] & typia.tags.MinItems<1>;
|
|
234
|
+
artifactModules: string[];
|
|
235
|
+
}
|
|
236
|
+
/** A declared checkout whose aliases bind a snapshot of it instead of the live directory. */
|
|
237
|
+
export interface DeveloperLinkSnapshotDeclaration {
|
|
238
|
+
directory: DeveloperLinkDirectory;
|
|
239
|
+
snapshot: DeveloperLinkSnapshot;
|
|
240
|
+
}
|
|
217
241
|
export interface PackageSmooConfig {
|
|
218
242
|
github?: PackageSmooGithub;
|
|
219
243
|
privateNpm?: PackagePrivateNpmConfig;
|
|
@@ -221,6 +245,19 @@ export interface PackageSmooConfig {
|
|
|
221
245
|
remoteCache?: PackageRemoteCacheConfig;
|
|
222
246
|
/** Provider-neutral local secret commands. CI supplies these variables externally. */
|
|
223
247
|
secrets?: Record<string, PackageSecretCommand>;
|
|
248
|
+
/**
|
|
249
|
+
* Packages a developer machine runs from local checkouts (`name` or
|
|
250
|
+
* `@scope/name` → its checkout directory) instead of the published
|
|
251
|
+
* version the lockfile names: what `bun link` does by hand, declared once so
|
|
252
|
+
* every checkout gets it. Shell entry links each tree that installed the
|
|
253
|
+
* package, a directory the machine lacks keeps the installed version, and CI
|
|
254
|
+
* links nothing (tooling/direnv/developer-links.ts, which validates the same
|
|
255
|
+
* shape at runtime). A `{ directory, snapshot }` declaration binds a sealed,
|
|
256
|
+
* Nx-attested snapshot of that checkout instead, so the provider's own builds
|
|
257
|
+
* never change a file a running consumer task resolves. Nx is
|
|
258
|
+
* lockfile/patch-owned and cannot be declared here.
|
|
259
|
+
*/
|
|
260
|
+
developerLinks?: Record<string, DeveloperLinkDirectory | DeveloperLinkSnapshotDeclaration>;
|
|
224
261
|
}
|
|
225
262
|
export interface PackageWorkspacesObject {
|
|
226
263
|
packages?: string[];
|
|
@@ -278,7 +315,6 @@ export interface NxTargetConfig {
|
|
|
278
315
|
configurations?: Record<string, NxTargetConfig>;
|
|
279
316
|
cache?: boolean;
|
|
280
317
|
command?: string;
|
|
281
|
-
parallelism?: boolean;
|
|
282
318
|
}
|
|
283
319
|
export interface NxProjectJson {
|
|
284
320
|
name?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-manifest.d.ts","sourceRoot":"","sources":["../src/workspace-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,sDAAsD;AACtD,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/C,2DAA2D;AAC3D,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;AAE3C,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,KAAK,IAAI,aAAa,CAAC,CAAC,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QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAChD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,MAAM;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;CAChF;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,iBAAiB,GAAG,SAAS,GAAG,aAAa,CAAC,MAAM,CAAC,CAE3F"}
|
package/executors.json
CHANGED
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
"implementation": "./dist/executors/napi-cross-toolchain/executor.js",
|
|
20
20
|
"schema": "./src/executors/napi-cross-toolchain/schema.json",
|
|
21
21
|
"description": "Extract the pinned @napi-rs cross toolchain so --use-napi-cross never downloads it"
|
|
22
|
+
},
|
|
23
|
+
"shard-timings": {
|
|
24
|
+
"implementation": "./dist/executors/shard-timings/executor.js",
|
|
25
|
+
"schema": "./src/executors/shard-timings/schema.json",
|
|
26
|
+
"description": "Fail when a timings-sharded bun test suite runs a file its --timings manifest does not name"
|
|
22
27
|
}
|
|
23
28
|
}
|
|
24
29
|
}
|
package/loader.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
2
3
|
|
|
3
4
|
const realPluginPath = new URL('./dist/index.js', import.meta.url);
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const plugin = await import(realPluginPath.href);
|
|
12
|
-
return plugin.createNodesV2[1](...args);
|
|
13
|
-
},
|
|
14
|
-
];
|
|
6
|
+
if (!existsSync(realPluginPath)) {
|
|
7
|
+
throw new Error(
|
|
8
|
+
`The Nx plugin bootstrap product is missing: ${realPluginPath.pathname}. ` +
|
|
9
|
+
'Enter the managed shell or run `ttsc -p packages/nx-plugin/tsconfig.lib.json --emit` before Nx.',
|
|
10
|
+
);
|
|
11
|
+
}
|
|
15
12
|
|
|
16
|
-
|
|
13
|
+
// Nx's real loader uses require(), so this boundary must stay synchronous in Node and Bun.
|
|
14
|
+
const plugin = createRequire(import.meta.url)('./dist/index.js');
|
|
15
|
+
export const createNodesV2 = plugin.createNodesV2;
|
|
16
|
+
export const preTasksExecution = plugin.preTasksExecution;
|
|
17
|
+
export const postTasksExecution = plugin.postTasksExecution;
|
|
18
|
+
export default plugin.default;
|
package/managed/raw/envrc
CHANGED
|
@@ -1,67 +1,38 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
|
|
5
|
-
*/.jcode-worktrees/*)
|
|
6
|
-
;;
|
|
7
|
-
*)
|
|
8
|
-
source_up_if_exists
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
1
|
+
# Managed by smoo. This shell is built from this checkout's inputs alone: no
|
|
2
|
+
# parent directory's .envrc is sourced, so the same commit enters the same shell
|
|
3
|
+
# wherever it is checked out. Project additions belong in .envrc-local
|
|
4
|
+
# (gitignored); shell logic belongs in tooling/direnv/devenv.nix.
|
|
11
5
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
# public and fixed, so it is recorded before devenv starts; an existing file is
|
|
20
|
-
# devenv's and stays as it is.
|
|
21
|
-
devenv_keys="${DEVENV_HOME:-${XDG_DATA_HOME:-$HOME/.local/share}/devenv}/cachix_trusted_keys.json"
|
|
22
|
-
if [ ! -e "$devenv_keys" ]; then
|
|
23
|
-
mkdir -p "$(dirname "$devenv_keys")"
|
|
24
|
-
printf '{\n "devenv": "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="\n}\n' >"$devenv_keys.$$"
|
|
25
|
-
mv -f "$devenv_keys.$$" "$devenv_keys"
|
|
6
|
+
# devenv lives in tooling/direnv. It is the one tool this file needs from the
|
|
7
|
+
# host; everything else comes from the shell it evaluates. The directory stack,
|
|
8
|
+
# not `cd ../..`, brings this file back: the export `use devenv` replays leaves
|
|
9
|
+
# the shell wherever the devenv shell hook last changed directory.
|
|
10
|
+
if ! has devenv; then
|
|
11
|
+
log_error "devenv is not on PATH: install it (https://devenv.sh/getting-started/), then run direnv reload"
|
|
12
|
+
exit 1
|
|
26
13
|
fi
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
# leaves us there and a bare relative path would resolve under tooling/direnv.
|
|
32
|
-
project_root="$PWD"
|
|
33
|
-
local_override="$project_root/.envrc-local"
|
|
34
|
-
# The origin checkout publishes a credential-free evaluated shell inside its
|
|
35
|
-
# private .devenv; cowshed clones inherit it copy-on-write. No sibling-owned
|
|
36
|
-
# writable cache can provide shell code. Changed inputs evaluate in place.
|
|
37
|
-
watch_file tooling/direnv/inherited-devenv.ts
|
|
38
|
-
smoo_inherited_devenv() {
|
|
39
|
-
bun "$project_root/tooling/direnv/inherited-devenv.ts" "$project_root" "$@"
|
|
40
|
-
}
|
|
41
|
-
DEVENV_BIN=smoo_inherited_devenv
|
|
42
|
-
cd tooling/direnv
|
|
43
|
-
. envrc.sh
|
|
44
|
-
unset -f smoo_inherited_devenv
|
|
45
|
-
unset DEVENV_BIN
|
|
14
|
+
pushd tooling/direnv >/dev/null
|
|
15
|
+
eval "$(devenv direnvrc)"
|
|
16
|
+
use devenv
|
|
17
|
+
popd >/dev/null
|
|
46
18
|
|
|
47
|
-
# Re-enter
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
# direnv keeps loaded, or a pool of them gated on direnv's watches, then
|
|
52
|
-
# reinstalls after a pull or a manifest edit and stays put otherwise.
|
|
53
|
-
install_inputs=()
|
|
54
|
-
if [ -f "${DEVENV_STATE:-}/install-inputs" ]; then
|
|
55
|
-
while IFS= read -r install_input; do
|
|
56
|
-
install_inputs+=("$install_input")
|
|
57
|
-
done <"$DEVENV_STATE/install-inputs"
|
|
58
|
-
fi
|
|
19
|
+
# Re-enter after a pull or a dependency edit; devenv's smoo:install and
|
|
20
|
+
# smoo:cargo-fetch tasks then decide whether anything installs. The scripts
|
|
21
|
+
# shell entry runs are not inputs devenv evaluates, so a change to one
|
|
22
|
+
# re-enters through this watch too.
|
|
59
23
|
watch_file \
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
24
|
+
package.json bun.lock uv.lock Cargo.lock \
|
|
25
|
+
tooling/direnv/nixpkgs-overlay/flake.nix \
|
|
26
|
+
tooling/direnv/nixpkgs-overlay/_sources/generated.nix \
|
|
27
|
+
tooling/direnv/repo-path \
|
|
28
|
+
tooling/direnv/nx-socket-dir.sh \
|
|
29
|
+
tooling/direnv/ttsc-env.sh \
|
|
30
|
+
tooling/direnv/apple-developer.sh \
|
|
31
|
+
tooling/direnv/setup-environment.ts \
|
|
32
|
+
tooling/direnv/secret-references.ts \
|
|
33
|
+
tooling/direnv/toolchain-stamp.ts
|
|
66
34
|
|
|
67
|
-
|
|
35
|
+
# A cowshed workspace's environment, for interactive shells inside one; an
|
|
36
|
+
# absent file is skipped.
|
|
37
|
+
source_env_if_exists .cowshed/env
|
|
38
|
+
source_env_if_exists .envrc-local
|