@smoothbricks/nx-plugin 0.6.2 → 0.7.0
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 +417 -171
- package/dist/.build-inputs.json +39 -28
- package/dist/bin/smoo-nx-go-test-build.d.ts +3 -0
- package/dist/bin/smoo-nx-go-test-build.d.ts.map +1 -0
- package/dist/bin/smoo-nx-go-test-build.js +79 -0
- package/dist/bin/smoo-nx-go-test-run.d.ts +3 -0
- package/dist/bin/smoo-nx-go-test-run.d.ts.map +1 -0
- package/dist/bin/smoo-nx-go-test-run.js +129 -0
- package/dist/bin/smoo-nx-publish.d.ts +3 -0
- package/dist/bin/smoo-nx-publish.d.ts.map +1 -0
- package/dist/bin/smoo-nx-publish.js +3 -0
- package/dist/bounded-test-policy.d.ts +1 -1
- package/dist/bounded-test-policy.d.ts.map +1 -1
- package/dist/bounded-test-policy.js +9 -8
- package/dist/cargo-retention-hook.d.ts +6 -2
- package/dist/cargo-retention-hook.d.ts.map +1 -1
- package/dist/cargo-retention-hook.js +13 -7
- package/dist/cargo-workspace.d.ts +10 -20
- package/dist/cargo-workspace.d.ts.map +1 -1
- package/dist/cargo-workspace.js +12 -22
- package/dist/cross-check-policy.d.ts +2 -2
- package/dist/cross-check-policy.js +2 -2
- package/dist/deploy-policy.d.ts +6 -0
- package/dist/deploy-policy.d.ts.map +1 -1
- package/dist/deploy-policy.js +11 -0
- package/dist/eslint-file-set.d.ts +4 -1
- package/dist/eslint-file-set.d.ts.map +1 -1
- package/dist/eslint-sources.d.ts +25 -0
- package/dist/eslint-sources.d.ts.map +1 -0
- package/dist/eslint-sources.js +99 -0
- package/dist/executors/all-verdicts/executor.d.ts +2 -1
- package/dist/executors/all-verdicts/executor.d.ts.map +1 -1
- package/dist/executors/all-verdicts/executor.js +48 -2
- package/dist/executors/all-verdicts/schema.d.ts +13 -0
- package/dist/executors/all-verdicts/schema.d.ts.map +1 -1
- package/dist/executors/all-verdicts/schema.js +7 -0
- package/dist/executors/bounded-exec/bounds.d.ts +57 -8
- package/dist/executors/bounded-exec/bounds.d.ts.map +1 -1
- package/dist/executors/bounded-exec/bounds.js +100 -11
- package/dist/executors/bounded-exec/executor.d.ts +2 -1
- package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
- package/dist/executors/bounded-exec/executor.js +289 -34
- package/dist/executors/bounded-exec/hang-diagnostics.d.ts +2 -0
- package/dist/executors/bounded-exec/hang-diagnostics.d.ts.map +1 -1
- package/dist/executors/bounded-exec/hang-diagnostics.js +2 -2
- package/dist/executors/bounded-exec/mbx-pool.d.ts +56 -10
- package/dist/executors/bounded-exec/mbx-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/mbx-pool.js +145 -11
- package/dist/executors/bounded-exec/mbx-queue.d.ts +30 -0
- package/dist/executors/bounded-exec/mbx-queue.d.ts.map +1 -0
- package/dist/executors/bounded-exec/mbx-queue.js +229 -0
- package/dist/executors/bounded-exec/progress.d.ts +9 -2
- package/dist/executors/bounded-exec/progress.d.ts.map +1 -1
- package/dist/executors/bounded-exec/progress.js +151 -25
- package/dist/executors/bounded-exec/runner-sizing.d.ts +40 -2
- package/dist/executors/bounded-exec/runner-sizing.d.ts.map +1 -1
- package/dist/executors/bounded-exec/runner-sizing.js +55 -4
- package/dist/executors/bounded-exec/runtime-pin.js +1 -1
- package/dist/executors/bounded-exec/test-result-writer.d.ts +30 -0
- package/dist/executors/bounded-exec/test-result-writer.d.ts.map +1 -0
- package/dist/executors/bounded-exec/test-result-writer.js +126 -0
- package/dist/executors/bounded-exec/test-results.d.ts +33 -0
- package/dist/executors/bounded-exec/test-results.d.ts.map +1 -0
- package/dist/executors/bounded-exec/test-results.js +33 -0
- package/dist/executors/bounded-exec/verdict.d.ts +26 -2
- package/dist/executors/bounded-exec/verdict.d.ts.map +1 -1
- package/dist/executors/bounded-exec/verdict.js +108 -4
- package/dist/executors/wrangler-deploy/deploy-hash.d.ts +10 -0
- package/dist/executors/wrangler-deploy/deploy-hash.d.ts.map +1 -0
- package/dist/executors/wrangler-deploy/deploy-hash.js +14 -0
- package/dist/executors/wrangler-deploy/executor.d.ts +24 -0
- package/dist/executors/wrangler-deploy/executor.d.ts.map +1 -0
- package/dist/executors/wrangler-deploy/executor.js +43 -0
- package/dist/executors/wrangler-deploy/hasher.d.ts +27 -0
- package/dist/executors/wrangler-deploy/hasher.d.ts.map +1 -0
- package/dist/executors/wrangler-deploy/hasher.js +90 -0
- package/dist/executors/wrangler-deploy/schema.d.ts +5 -0
- package/dist/executors/wrangler-deploy/schema.d.ts.map +1 -0
- package/dist/go-tests.d.ts +30 -0
- package/dist/go-tests.d.ts.map +1 -0
- package/dist/go-tests.js +43 -0
- package/dist/index.d.ts +12 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +338 -295
- package/dist/managed-files/files.d.ts.map +1 -1
- package/dist/managed-files/files.js +5 -0
- package/dist/nx-publish.d.ts +24 -0
- package/dist/nx-publish.d.ts.map +1 -0
- package/dist/nx-publish.js +150 -0
- package/dist/process-group.js +2 -2
- package/dist/runtime-input-policy.d.ts +17 -3
- package/dist/runtime-input-policy.d.ts.map +1 -1
- package/dist/runtime-input-policy.js +4 -4
- package/dist/test-timings.d.ts +23 -4
- package/dist/test-timings.d.ts.map +1 -1
- package/dist/test-timings.js +72 -12
- package/dist/tool-bins.d.ts +6 -8
- package/dist/tool-bins.d.ts.map +1 -1
- package/dist/tool-bins.js +7 -5
- package/dist/version-actions.cjs +10 -11
- package/dist/version-actions.d.cts.map +1 -1
- package/dist/workspace-config-policy.d.ts.map +1 -1
- package/dist/workspace-config-policy.js +17 -22
- package/dist/workspace-index.d.ts +7 -0
- package/dist/workspace-index.d.ts.map +1 -1
- package/dist/workspace-index.js +11 -0
- package/dist/workspace-manifest.js +3 -3
- package/executors.json +7 -6
- package/managed/raw/patches/nx@23.2.1.patch +118 -24
- package/managed/raw/patches/ttsc@0.34.1.patch +139 -0
- package/managed/raw/tooling/devenv +1 -2
- package/managed/raw/tooling/direnv/developer-links.ts +124 -51
- package/managed/raw/tooling/direnv/devenv.smoo.nix +34 -15
- package/managed/raw/tooling/direnv/github-actions-bootstrap.sh +20 -10
- package/managed/raw/tooling/direnv/installed-bun-links.ts +7 -6
- package/managed/raw/tooling/direnv/setup-environment.ts +49 -24
- package/managed/raw/tooling/direnv/ttsc-env.sh +8 -6
- package/managed/raw/tooling/git-hooks/pinned-revisions-served.ts +252 -0
- package/managed/raw/tooling/git-hooks/pre-push.sh +34 -32
- package/managed/templates/github/actions/cache-node-modules/action.yml +1 -1
- package/managed/templates/github/actions/cache-ttsc-plugins/action.yml +12 -11
- package/package.json +277 -11
- package/runtime/nx-publish/.build-inputs.json +11 -0
- package/runtime/nx-publish/cache_adapter.js +45 -0
- package/runtime/nx-publish/nx_publish.js +60 -0
- package/runtime-input.sh +62 -26
- package/src/bin/smoo-nx-go-test-build.ts +83 -0
- package/src/bin/smoo-nx-go-test-run.ts +140 -0
- package/src/bin/smoo-nx-publish.ts +4 -0
- package/src/bounded-test-policy.ts +9 -8
- package/src/cargo-retention-hook.ts +16 -10
- package/src/cargo-workspace.ts +12 -24
- package/src/cross-check-policy.ts +2 -2
- package/src/deploy-policy.ts +11 -0
- package/src/eslint-file-set.ts +4 -1
- package/src/eslint-sources.ts +134 -0
- package/src/executors/all-verdicts/executor.ts +58 -3
- package/src/executors/all-verdicts/schema.json +4 -0
- package/src/executors/all-verdicts/schema.ts +14 -0
- package/src/executors/bounded-exec/bounds.ts +132 -15
- package/src/executors/bounded-exec/executor.ts +329 -34
- package/src/executors/bounded-exec/hang-diagnostics.ts +3 -2
- package/src/executors/bounded-exec/mbx-pool.ts +158 -17
- package/src/executors/bounded-exec/mbx-queue.ts +170 -0
- package/src/executors/bounded-exec/progress.ts +171 -18
- package/src/executors/bounded-exec/runner-sizing.ts +73 -7
- package/src/executors/bounded-exec/runtime-pin.ts +1 -1
- package/src/executors/bounded-exec/test-result-writer.ts +152 -0
- package/src/executors/bounded-exec/test-results.ts +39 -0
- package/src/executors/bounded-exec/verdict.ts +115 -5
- package/src/executors/wrangler-deploy/deploy-hash.ts +15 -0
- package/src/executors/wrangler-deploy/executor.ts +63 -0
- package/src/executors/wrangler-deploy/hasher.ts +111 -0
- package/src/executors/wrangler-deploy/schema.json +16 -0
- package/src/executors/wrangler-deploy/schema.ts +4 -0
- package/src/go-tests.ts +67 -0
- package/src/index.ts +368 -323
- package/src/managed-files/files.ts +5 -0
- package/src/nx-publish.ts +157 -0
- package/src/process-group.ts +2 -2
- package/src/runtime-input-policy.ts +4 -4
- package/src/test-timings.ts +72 -14
- package/src/tool-bins.ts +13 -9
- package/src/version-actions.cts +10 -11
- package/src/workspace-config-policy.ts +20 -29
- package/src/workspace-index.ts +12 -0
- package/src/workspace-manifest.ts +3 -3
- package/test-timings.json +131 -125
- package/dist/executors/clean-outputs/executor.d.ts +0 -26
- package/dist/executors/clean-outputs/executor.d.ts.map +0 -1
- package/dist/executors/clean-outputs/executor.js +0 -83
- package/dist/executors/clean-outputs/schema.d.ts +0 -4
- package/dist/executors/clean-outputs/schema.d.ts.map +0 -1
- package/src/executors/clean-outputs/executor.ts +0 -131
- package/src/executors/clean-outputs/schema.json +0 -15
- package/src/executors/clean-outputs/schema.ts +0 -3
- /package/dist/executors/{clean-outputs → wrangler-deploy}/schema.js +0 -0
package/test-timings.json
CHANGED
|
@@ -2,132 +2,138 @@
|
|
|
2
2
|
"version": 1,
|
|
3
3
|
"files": {
|
|
4
4
|
"src/executors/bounded-exec/go-progress-host.test.ts": 113358,
|
|
5
|
-
"src/ensure-built.test.ts":
|
|
6
|
-
"src/
|
|
7
|
-
"src/nx-daemon-validity.test.ts": 50650,
|
|
5
|
+
"src/ensure-built.test.ts": 50158,
|
|
6
|
+
"src/nx-daemon-validity.test.ts": 43752,
|
|
8
7
|
"src/executors/bounded-exec/cargo-progress-host.test.ts": 38973,
|
|
9
|
-
"src/
|
|
10
|
-
"src/executors/bounded-exec/executor.test.ts":
|
|
11
|
-
"src/
|
|
12
|
-
"src/
|
|
13
|
-
"src/
|
|
14
|
-
"src/cargo-
|
|
15
|
-
"src/cargo-source-hash.test.ts":
|
|
16
|
-
"src/
|
|
17
|
-
"src/
|
|
18
|
-
"src/
|
|
19
|
-
"src/nx-daemon-claim.test.ts":
|
|
20
|
-
"src/
|
|
21
|
-
"src/executors/
|
|
22
|
-
"src/
|
|
23
|
-
"src/
|
|
24
|
-
"src/
|
|
25
|
-
"src/
|
|
26
|
-
"src/
|
|
27
|
-
"src/nx-daemon-
|
|
28
|
-
"src/
|
|
29
|
-
"src/
|
|
30
|
-
"src/
|
|
31
|
-
"src/
|
|
32
|
-
"src/cargo-
|
|
33
|
-
"src/
|
|
34
|
-
"src/nx-
|
|
35
|
-
"src/nx-
|
|
36
|
-
"src/nx-
|
|
37
|
-
"src/
|
|
38
|
-
"src/
|
|
39
|
-
"src/
|
|
40
|
-
"src/
|
|
41
|
-
"src/nx-
|
|
42
|
-
"src/
|
|
43
|
-
"src/nx-
|
|
44
|
-
"src/
|
|
45
|
-
"src/nx-
|
|
46
|
-
"src/
|
|
47
|
-
"src/nx-
|
|
48
|
-
"src/
|
|
49
|
-
"src/
|
|
50
|
-
"src/
|
|
51
|
-
"src/managed-files/
|
|
52
|
-
"src/
|
|
53
|
-
"src/
|
|
54
|
-
"src/
|
|
55
|
-
"src/
|
|
56
|
-
"src/
|
|
57
|
-
"src/
|
|
58
|
-
"src/
|
|
59
|
-
"src/
|
|
60
|
-
"src/
|
|
61
|
-
"src/
|
|
62
|
-
"src/
|
|
63
|
-
"src/
|
|
64
|
-
"src/
|
|
65
|
-
"src/
|
|
66
|
-
"src/
|
|
67
|
-
"src/
|
|
68
|
-
"src/nx-store-resolution.test.ts":
|
|
69
|
-
"src/
|
|
70
|
-
"src/
|
|
71
|
-
"src/
|
|
72
|
-
"src/
|
|
73
|
-
"src/
|
|
74
|
-
"src/
|
|
75
|
-
"src/
|
|
76
|
-
"src/
|
|
77
|
-
"src/
|
|
78
|
-
"src/
|
|
79
|
-
"src/
|
|
80
|
-
"src/executors/bounded-exec/
|
|
81
|
-
"src/
|
|
82
|
-
"src/executors/
|
|
83
|
-
"src/
|
|
84
|
-
"src/
|
|
85
|
-
"src/
|
|
86
|
-
"src/managed-files/
|
|
87
|
-
"src/
|
|
88
|
-
"src/
|
|
89
|
-
"src/managed-files/setup-devenv-free-disk.test.ts":
|
|
90
|
-
"src/
|
|
91
|
-
"src/
|
|
92
|
-
"src/cargo-closure-filesets.test.ts":
|
|
93
|
-
"src/
|
|
94
|
-
"src/
|
|
95
|
-
"src/
|
|
96
|
-
"src/
|
|
97
|
-
"src/
|
|
98
|
-
"src/
|
|
99
|
-
"src/
|
|
100
|
-
"src/executors/
|
|
101
|
-
"src/
|
|
8
|
+
"src/nextest-partitions.test.ts": 35261,
|
|
9
|
+
"src/executors/bounded-exec/executor.test.ts": 28863,
|
|
10
|
+
"src/cargo-retention.test.ts": 24111,
|
|
11
|
+
"src/owned-installation.test.ts": 23722,
|
|
12
|
+
"src/ensure-built-receipt.test.ts": 20391,
|
|
13
|
+
"src/cargo-resolve-cache.test.ts": 20246,
|
|
14
|
+
"src/cargo-source-hash.test.ts": 16053,
|
|
15
|
+
"src/linked-snapshots.nx.test.ts": 11920,
|
|
16
|
+
"src/index.test.ts": 8528,
|
|
17
|
+
"src/cargo-closure-input.test.ts": 8157,
|
|
18
|
+
"src/nx-daemon-claim.test.ts": 7678,
|
|
19
|
+
"src/executors/typescript-emit/executor.test.ts": 7126,
|
|
20
|
+
"src/executors/bounded-exec/ram-temp.test.ts": 5801,
|
|
21
|
+
"src/process-group.test.ts": 5461,
|
|
22
|
+
"src/bounded-test-policy.test.ts": 5361,
|
|
23
|
+
"src/task-history-namespace.test.ts": 5246,
|
|
24
|
+
"src/executors/bounded-exec/run-cpu-pool.test.ts": 5185,
|
|
25
|
+
"src/task-results.test.ts": 4915,
|
|
26
|
+
"src/nx-daemon-start-never.test.ts": 4590,
|
|
27
|
+
"src/serial-group-wiring.test.ts": 4153,
|
|
28
|
+
"src/nx-daemon-ignore-files.test.ts": 4149,
|
|
29
|
+
"src/nx-dot-input-policy.test.ts": 3577,
|
|
30
|
+
"src/cargo-workspace.test.ts": 3534,
|
|
31
|
+
"src/cargo-build-script-env.test.ts": 3401,
|
|
32
|
+
"src/executors/bounded-exec/hang-diagnostics.test.ts": 3348,
|
|
33
|
+
"src/nx-files-archive-racy.test.ts": 3119,
|
|
34
|
+
"src/nx-daemon-idle-policy.test.ts": 3069,
|
|
35
|
+
"src/nx-remote-cache-outage.test.ts": 2542,
|
|
36
|
+
"src/cross-check-policy.test.ts": 2486,
|
|
37
|
+
"src/cargo-closure-key.test.ts": 2374,
|
|
38
|
+
"src/managed-files/repo-path.test.ts": 2244,
|
|
39
|
+
"src/testing.test.ts": 2140,
|
|
40
|
+
"src/nx-daemon-watch-filter.test.ts": 2120,
|
|
41
|
+
"src/nx-daemon-env-identity.test.ts": 2075,
|
|
42
|
+
"src/nx-task-output-lease.test.ts": 1926,
|
|
43
|
+
"src/runtime-input.test.ts": 1781,
|
|
44
|
+
"src/nx-skipped-task-exit.test.ts": 1767,
|
|
45
|
+
"src/executors/bounded-exec/verdict.test.ts": 1643,
|
|
46
|
+
"src/nx-project-graph-errors.test.ts": 1591,
|
|
47
|
+
"src/managed-files/forgejo-artifact.test.ts": 1556,
|
|
48
|
+
"src/nx-cache-restore-mtime.test.ts": 1453,
|
|
49
|
+
"src/graph-input-contract.test.ts": 1308,
|
|
50
|
+
"src/managed-files/generator.test.ts": 1168,
|
|
51
|
+
"src/nx-foreign-workspace-env.test.ts": 1151,
|
|
52
|
+
"src/nx-cache-kept-outputs.test.ts": 1095,
|
|
53
|
+
"src/nx-use-local.test.ts": 1064,
|
|
54
|
+
"src/bin/smoo-nx-bound-failures.test.ts": 1049,
|
|
55
|
+
"src/managed-files/managed-format-json.test.ts": 1041,
|
|
56
|
+
"src/typecheck-test-policy.test.ts": 1019,
|
|
57
|
+
"src/executors/all-verdicts/executor.test.ts": 972,
|
|
58
|
+
"src/nextest-code-bound.test.ts": 896,
|
|
59
|
+
"src/nx-plugin-load-errors.test.ts": 860,
|
|
60
|
+
"src/executors/bounded-exec/test-results-run.test.ts": 838,
|
|
61
|
+
"src/nx-resident-graph-workers.test.ts": 836,
|
|
62
|
+
"src/cargo-child-kill.test.ts": 745,
|
|
63
|
+
"src/test-walk-policy.test.ts": 633,
|
|
64
|
+
"src/typescript-resolution.test.ts": 562,
|
|
65
|
+
"src/executors/bounded-exec/runner-hook.test.ts": 543,
|
|
66
|
+
"src/task-graph-policy.nx.test.ts": 512,
|
|
67
|
+
"src/nx-store-resolution.test.ts": 485,
|
|
68
|
+
"src/nx-failure-life-cycles.test.ts": 450,
|
|
69
|
+
"src/bun-bootstrap.test.ts": 414,
|
|
70
|
+
"src/nx-daemon-root-normalization.test.ts": 407,
|
|
71
|
+
"src/managed-files/github-host-cache-isolation.test.ts": 356,
|
|
72
|
+
"src/nx-incomplete-run-summary.test.ts": 346,
|
|
73
|
+
"src/nx-critical-path-schedule.test.ts": 315,
|
|
74
|
+
"src/nx-raw-inputs.test.ts": 275,
|
|
75
|
+
"src/nx-cache-bound.test.ts": 248,
|
|
76
|
+
"src/ensure-built-witness.test.ts": 237,
|
|
77
|
+
"src/test-clock-policy.test.ts": 230,
|
|
78
|
+
"src/managed-files/unserved-workspace-hooks.test.ts": 215,
|
|
79
|
+
"src/executors/bounded-exec/cpu-pool.test.ts": 212,
|
|
80
|
+
"src/package-target-policy.test.ts": 211,
|
|
81
|
+
"src/executors/cargo-zigbuild/executor.test.ts": 194,
|
|
82
|
+
"src/lock-scope.test.ts": 135,
|
|
83
|
+
"src/managed-files/cache-ttsc-plugins.test.ts": 116,
|
|
84
|
+
"src/forbidden-spelling-policy.test.ts": 115,
|
|
85
|
+
"src/managed-files/devenv-wrapper.test.ts": 103,
|
|
86
|
+
"src/executors/bounded-exec/runtime-pin.test.ts": 99,
|
|
87
|
+
"src/nx-state-location.test.ts": 88,
|
|
88
|
+
"src/managed-files/setup-devenv-free-disk.test.ts": 86,
|
|
89
|
+
"src/generators/make-public/generator.test.ts": 85,
|
|
90
|
+
"src/test-timings.test.ts": 85,
|
|
91
|
+
"src/cargo-closure-filesets.test.ts": 83,
|
|
92
|
+
"src/executors/scriptc-native/executor.test.ts": 80,
|
|
93
|
+
"src/executors/wrangler-deploy/executor.test.ts": 70,
|
|
94
|
+
"src/producer-receipts.test.ts": 60,
|
|
95
|
+
"src/release-config-policy.test.ts": 56,
|
|
96
|
+
"src/version-actions.test.ts": 53,
|
|
97
|
+
"src/manifest-hash.test.ts": 49,
|
|
98
|
+
"src/workspace-config-policy.test.ts": 47,
|
|
99
|
+
"src/executors/wrangler-deploy/hasher.test.ts": 39,
|
|
100
|
+
"src/generators/create-package/generator.test.ts": 33,
|
|
101
|
+
"src/cargo-toolchain-paths.test.ts": 31,
|
|
102
|
+
"src/eslint-sources.test.ts": 31,
|
|
103
|
+
"src/executors/bounded-exec/test-results.test.ts": 30,
|
|
104
|
+
"src/managed-files/trace-db-artifact.test.ts": 30,
|
|
102
105
|
"src/executors/nextest-group/executor.test.ts": 28,
|
|
103
|
-
"src/executors/bounded-exec/
|
|
104
|
-
"src/
|
|
105
|
-
"src/executors/
|
|
106
|
-
"src/
|
|
107
|
-
"src/generators/bun-test-tracing/generator.test.ts":
|
|
108
|
-
"src/
|
|
109
|
-
"src/
|
|
110
|
-
"src/
|
|
111
|
-
"src/
|
|
112
|
-
"src/
|
|
113
|
-
"src/
|
|
114
|
-
"src/
|
|
115
|
-
"src/executors/bounded-exec/
|
|
116
|
-
"src/managed-files/
|
|
117
|
-
"src/
|
|
118
|
-
"src/
|
|
119
|
-
"src/
|
|
120
|
-
"src/managed-files/
|
|
121
|
-
"src/
|
|
122
|
-
"src/
|
|
123
|
-
"src/
|
|
124
|
-
"src/
|
|
125
|
-
"src/
|
|
126
|
-
"src/
|
|
127
|
-
"src/
|
|
128
|
-
"src/
|
|
129
|
-
"src/
|
|
130
|
-
"src/
|
|
131
|
-
"src/
|
|
106
|
+
"src/executors/bounded-exec/disk-lease.test.ts": 27,
|
|
107
|
+
"src/executors/bounded-exec/ram-provenance.test.ts": 27,
|
|
108
|
+
"src/executors/bounded-exec/progress.test.ts": 26,
|
|
109
|
+
"src/executors/bounded-exec/ram-detach.test.ts": 25,
|
|
110
|
+
"src/generators/bun-test-tracing/generator.test.ts": 25,
|
|
111
|
+
"src/executors/bounded-exec/mbx-queue.test.ts": 24,
|
|
112
|
+
"src/build-state-output-policy.test.ts": 21,
|
|
113
|
+
"src/generators/bounded-test-targets/generator.test.ts": 21,
|
|
114
|
+
"src/executors/bounded-exec/bounds.test.ts": 20,
|
|
115
|
+
"src/executors/bounded-exec/runner-sizing.test.ts": 19,
|
|
116
|
+
"src/executors/bounded-exec/lock-wait.test.ts": 17,
|
|
117
|
+
"src/executors/bounded-exec/ram-temp-held.test.ts": 17,
|
|
118
|
+
"src/executors/bounded-exec/runner-lifecycle.test.ts": 17,
|
|
119
|
+
"src/managed-files/json-edit.test.ts": 17,
|
|
120
|
+
"src/executors/bounded-exec/mbx-pool.test.ts": 15,
|
|
121
|
+
"src/executors/bounded-exec/ram-fixture.test.ts": 14,
|
|
122
|
+
"src/managed-files/tree-permissions.test.ts": 12,
|
|
123
|
+
"src/managed-files/tree.test.ts": 12,
|
|
124
|
+
"src/wait-why-policy.test.ts": 12,
|
|
125
|
+
"src/executors/bounded-exec/owned-subtree.test.ts": 11,
|
|
126
|
+
"src/cargo-closure-input.property.test.ts": 10,
|
|
127
|
+
"src/managed-files/managed-content.test.ts": 10,
|
|
128
|
+
"src/nx-daemon-idle-cpu.test.ts": 10,
|
|
129
|
+
"src/task-graph-policy.test.ts": 10,
|
|
130
|
+
"src/disk-command-policy.test.ts": 9,
|
|
131
|
+
"src/test-program.test.ts": 9,
|
|
132
|
+
"src/bun-file-packages.test.ts": 8,
|
|
133
|
+
"src/cargo-retention-hook.test.ts": 8,
|
|
134
|
+
"src/host-controller-wiring.test.ts": 8,
|
|
135
|
+
"src/nx-project-resolution-cache.test.ts": 8,
|
|
136
|
+
"src/nx-task-graph-cycles.test.ts": 7,
|
|
137
|
+
"src/nx-run-information.test.ts": 6
|
|
132
138
|
}
|
|
133
139
|
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { CleanOutputsOptions } from './schema.js';
|
|
2
|
-
interface CleanOutputsContext {
|
|
3
|
-
root: string;
|
|
4
|
-
projectName?: string;
|
|
5
|
-
projectsConfigurations?: {
|
|
6
|
-
projects: Record<string, NxProject>;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
interface CleanOutputsResult {
|
|
10
|
-
success: boolean;
|
|
11
|
-
}
|
|
12
|
-
interface NxProject {
|
|
13
|
-
root?: string;
|
|
14
|
-
targets?: Record<string, {
|
|
15
|
-
outputs?: string[];
|
|
16
|
-
}>;
|
|
17
|
-
}
|
|
18
|
-
export default function cleanOutputsExecutor(options: CleanOutputsOptions, context: CleanOutputsContext): Promise<CleanOutputsResult>;
|
|
19
|
-
export declare function resolveOutputDirs(options: {
|
|
20
|
-
outputs: string[];
|
|
21
|
-
projectName: string;
|
|
22
|
-
projectRoot: string;
|
|
23
|
-
workspaceRoot: string;
|
|
24
|
-
}): string[];
|
|
25
|
-
export {};
|
|
26
|
-
//# sourceMappingURL=executor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/executors/clean-outputs/executor.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,UAAU,mBAAmB;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB,CAAC,EAAE;QACvB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;KACrC,CAAC;CACH;AAED,UAAU,kBAAkB;IAC1B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,UAAU,SAAS;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;CAClD;AAED,wBAA8B,oBAAoB,CAChD,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,kBAAkB,CAAC,CA8B7B;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE;IACzC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB,GAAG,MAAM,EAAE,CAOX"}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { spawnSync } from 'node:child_process';
|
|
2
|
-
import { rm } from 'node:fs/promises';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
export default async function cleanOutputsExecutor(options, context) {
|
|
5
|
-
const projectName = context.projectName;
|
|
6
|
-
if (!projectName) {
|
|
7
|
-
throw new Error('@smoothbricks/nx-plugin:clean-outputs requires a project context.');
|
|
8
|
-
}
|
|
9
|
-
const workspaceRoot = context.root;
|
|
10
|
-
const project = context.projectsConfigurations?.projects[projectName];
|
|
11
|
-
if (!project) {
|
|
12
|
-
throw new Error(`Project ${projectName} was not found in the Nx project graph.`);
|
|
13
|
-
}
|
|
14
|
-
const outputDirs = resolveOutputDirs({
|
|
15
|
-
outputs: options.outputs ?? project.targets?.build?.outputs ?? ['{projectRoot}/dist'],
|
|
16
|
-
projectName,
|
|
17
|
-
projectRoot: project.root ?? '.',
|
|
18
|
-
workspaceRoot,
|
|
19
|
-
});
|
|
20
|
-
for (const outputDir of outputDirs) {
|
|
21
|
-
assertSafeOutputDir(outputDir, project.root ?? '.', workspaceRoot);
|
|
22
|
-
if (containsTrackedFiles(outputDir, workspaceRoot)) {
|
|
23
|
-
console.log(`skipped ${path.relative(workspaceRoot, outputDir)} (contains tracked files)`);
|
|
24
|
-
continue;
|
|
25
|
-
}
|
|
26
|
-
await rm(outputDir, { force: true, recursive: true });
|
|
27
|
-
console.log(`removed ${path.relative(workspaceRoot, outputDir)}`);
|
|
28
|
-
}
|
|
29
|
-
return { success: true };
|
|
30
|
-
}
|
|
31
|
-
export function resolveOutputDirs(options) {
|
|
32
|
-
const concreteOutputDirs = options.outputs.map((output) => outputDir(output, options));
|
|
33
|
-
const dedupedOutputDirs = [...new Set(concreteOutputDirs)].sort((a, b) => a.length - b.length);
|
|
34
|
-
return dedupedOutputDirs.filter((candidate, index) => !dedupedOutputDirs.some((other, otherIndex) => otherIndex < index && isWithin(candidate, other)));
|
|
35
|
-
}
|
|
36
|
-
function outputDir(output, options) {
|
|
37
|
-
const interpolated = output
|
|
38
|
-
.replaceAll('{workspaceRoot}', '.')
|
|
39
|
-
.replaceAll('{projectRoot}', options.projectRoot)
|
|
40
|
-
.replaceAll('{projectName}', options.projectName);
|
|
41
|
-
const segments = interpolated.split(/[\\/]/);
|
|
42
|
-
const globIndex = segments.findIndex((segment) => segment.includes('*'));
|
|
43
|
-
const dirSegments = globIndex === -1 ? segments : segments.slice(0, globIndex);
|
|
44
|
-
const outputPath = dirSegments.join(path.sep);
|
|
45
|
-
return path.resolve(options.workspaceRoot, outputPath);
|
|
46
|
-
}
|
|
47
|
-
function assertSafeOutputDir(outputDir, projectRoot, workspaceRoot) {
|
|
48
|
-
const absoluteWorkspaceRoot = path.resolve(workspaceRoot);
|
|
49
|
-
const absoluteProjectRoot = path.resolve(workspaceRoot, projectRoot);
|
|
50
|
-
if (!isWithin(outputDir, absoluteWorkspaceRoot)) {
|
|
51
|
-
throw new Error(`Refusing to remove output outside workspace: ${outputDir}`);
|
|
52
|
-
}
|
|
53
|
-
if (outputDir === absoluteWorkspaceRoot || outputDir === absoluteProjectRoot) {
|
|
54
|
-
throw new Error(`Refusing to remove unsafe output directory: ${path.relative(workspaceRoot, outputDir) || '.'}`);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
function isWithin(candidate, parent) {
|
|
58
|
-
const relative = path.relative(parent, candidate);
|
|
59
|
-
return relative === '' || (!relative.startsWith('..') && !path.isAbsolute(relative));
|
|
60
|
-
}
|
|
61
|
-
function containsTrackedFiles(outputDir, workspaceRoot) {
|
|
62
|
-
const relativeOutputDir = path.relative(workspaceRoot, outputDir);
|
|
63
|
-
// eslint-disable-next-line deadline/no-unbounded-wait -- WHY unbounded: a local git file listing whose length is its own read of this repository: it asks no remote, and a held index.lock fails it at once rather than waiting, so only the operator's interrupt ends a hung one
|
|
64
|
-
const result = spawnSync('git', ['ls-files', '--', relativeOutputDir], {
|
|
65
|
-
cwd: workspaceRoot,
|
|
66
|
-
encoding: 'utf8',
|
|
67
|
-
});
|
|
68
|
-
const command = `git ls-files -- ${relativeOutputDir}`;
|
|
69
|
-
if (typeof result.stdout === 'string' && result.stdout.length > 0) {
|
|
70
|
-
process.stdout.write(result.stdout);
|
|
71
|
-
}
|
|
72
|
-
if (typeof result.stderr === 'string' && result.stderr.length > 0) {
|
|
73
|
-
process.stderr.write(result.stderr);
|
|
74
|
-
}
|
|
75
|
-
if (result.error) {
|
|
76
|
-
console.error(result.error.message);
|
|
77
|
-
throw new Error(`${command} failed with exit code ${result.status ?? 1}`, { cause: result.error });
|
|
78
|
-
}
|
|
79
|
-
if (result.status !== 0) {
|
|
80
|
-
throw new Error(`${command} failed with exit code ${result.status ?? 1}`);
|
|
81
|
-
}
|
|
82
|
-
return result.stdout.trim().length > 0;
|
|
83
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/executors/clean-outputs/schema.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB"}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { spawnSync } from 'node:child_process';
|
|
2
|
-
import { rm } from 'node:fs/promises';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
|
|
5
|
-
import type { CleanOutputsOptions } from './schema.js';
|
|
6
|
-
|
|
7
|
-
interface CleanOutputsContext {
|
|
8
|
-
root: string;
|
|
9
|
-
projectName?: string;
|
|
10
|
-
projectsConfigurations?: {
|
|
11
|
-
projects: Record<string, NxProject>;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
interface CleanOutputsResult {
|
|
16
|
-
success: boolean;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface NxProject {
|
|
20
|
-
root?: string;
|
|
21
|
-
targets?: Record<string, { outputs?: string[] }>;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default async function cleanOutputsExecutor(
|
|
25
|
-
options: CleanOutputsOptions,
|
|
26
|
-
context: CleanOutputsContext,
|
|
27
|
-
): Promise<CleanOutputsResult> {
|
|
28
|
-
const projectName = context.projectName;
|
|
29
|
-
if (!projectName) {
|
|
30
|
-
throw new Error('@smoothbricks/nx-plugin:clean-outputs requires a project context.');
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const workspaceRoot = context.root;
|
|
34
|
-
const project = context.projectsConfigurations?.projects[projectName];
|
|
35
|
-
if (!project) {
|
|
36
|
-
throw new Error(`Project ${projectName} was not found in the Nx project graph.`);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const outputDirs = resolveOutputDirs({
|
|
40
|
-
outputs: options.outputs ?? project.targets?.build?.outputs ?? ['{projectRoot}/dist'],
|
|
41
|
-
projectName,
|
|
42
|
-
projectRoot: project.root ?? '.',
|
|
43
|
-
workspaceRoot,
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
for (const outputDir of outputDirs) {
|
|
47
|
-
assertSafeOutputDir(outputDir, project.root ?? '.', workspaceRoot);
|
|
48
|
-
if (containsTrackedFiles(outputDir, workspaceRoot)) {
|
|
49
|
-
console.log(`skipped ${path.relative(workspaceRoot, outputDir)} (contains tracked files)`);
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
await rm(outputDir, { force: true, recursive: true });
|
|
53
|
-
console.log(`removed ${path.relative(workspaceRoot, outputDir)}`);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return { success: true };
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export function resolveOutputDirs(options: {
|
|
60
|
-
outputs: string[];
|
|
61
|
-
projectName: string;
|
|
62
|
-
projectRoot: string;
|
|
63
|
-
workspaceRoot: string;
|
|
64
|
-
}): string[] {
|
|
65
|
-
const concreteOutputDirs = options.outputs.map((output) => outputDir(output, options));
|
|
66
|
-
const dedupedOutputDirs = [...new Set(concreteOutputDirs)].sort((a, b) => a.length - b.length);
|
|
67
|
-
return dedupedOutputDirs.filter(
|
|
68
|
-
(candidate, index) =>
|
|
69
|
-
!dedupedOutputDirs.some((other, otherIndex) => otherIndex < index && isWithin(candidate, other)),
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function outputDir(
|
|
74
|
-
output: string,
|
|
75
|
-
options: { projectName: string; projectRoot: string; workspaceRoot: string },
|
|
76
|
-
): string {
|
|
77
|
-
const interpolated = output
|
|
78
|
-
.replaceAll('{workspaceRoot}', '.')
|
|
79
|
-
.replaceAll('{projectRoot}', options.projectRoot)
|
|
80
|
-
.replaceAll('{projectName}', options.projectName);
|
|
81
|
-
|
|
82
|
-
const segments = interpolated.split(/[\\/]/);
|
|
83
|
-
const globIndex = segments.findIndex((segment) => segment.includes('*'));
|
|
84
|
-
const dirSegments = globIndex === -1 ? segments : segments.slice(0, globIndex);
|
|
85
|
-
const outputPath = dirSegments.join(path.sep);
|
|
86
|
-
|
|
87
|
-
return path.resolve(options.workspaceRoot, outputPath);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function assertSafeOutputDir(outputDir: string, projectRoot: string, workspaceRoot: string): void {
|
|
91
|
-
const absoluteWorkspaceRoot = path.resolve(workspaceRoot);
|
|
92
|
-
const absoluteProjectRoot = path.resolve(workspaceRoot, projectRoot);
|
|
93
|
-
|
|
94
|
-
if (!isWithin(outputDir, absoluteWorkspaceRoot)) {
|
|
95
|
-
throw new Error(`Refusing to remove output outside workspace: ${outputDir}`);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
if (outputDir === absoluteWorkspaceRoot || outputDir === absoluteProjectRoot) {
|
|
99
|
-
throw new Error(`Refusing to remove unsafe output directory: ${path.relative(workspaceRoot, outputDir) || '.'}`);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function isWithin(candidate: string, parent: string): boolean {
|
|
104
|
-
const relative = path.relative(parent, candidate);
|
|
105
|
-
return relative === '' || (!relative.startsWith('..') && !path.isAbsolute(relative));
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function containsTrackedFiles(outputDir: string, workspaceRoot: string): boolean {
|
|
109
|
-
const relativeOutputDir = path.relative(workspaceRoot, outputDir);
|
|
110
|
-
// eslint-disable-next-line deadline/no-unbounded-wait -- WHY unbounded: a local git file listing whose length is its own read of this repository: it asks no remote, and a held index.lock fails it at once rather than waiting, so only the operator's interrupt ends a hung one
|
|
111
|
-
const result = spawnSync('git', ['ls-files', '--', relativeOutputDir], {
|
|
112
|
-
cwd: workspaceRoot,
|
|
113
|
-
encoding: 'utf8',
|
|
114
|
-
});
|
|
115
|
-
const command = `git ls-files -- ${relativeOutputDir}`;
|
|
116
|
-
if (typeof result.stdout === 'string' && result.stdout.length > 0) {
|
|
117
|
-
process.stdout.write(result.stdout);
|
|
118
|
-
}
|
|
119
|
-
if (typeof result.stderr === 'string' && result.stderr.length > 0) {
|
|
120
|
-
process.stderr.write(result.stderr);
|
|
121
|
-
}
|
|
122
|
-
if (result.error) {
|
|
123
|
-
console.error(result.error.message);
|
|
124
|
-
throw new Error(`${command} failed with exit code ${result.status ?? 1}`, { cause: result.error });
|
|
125
|
-
}
|
|
126
|
-
if (result.status !== 0) {
|
|
127
|
-
throw new Error(`${command} failed with exit code ${result.status ?? 1}`);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return result.stdout.trim().length > 0;
|
|
131
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/schema",
|
|
3
|
-
"version": 2,
|
|
4
|
-
"title": "Clean Outputs Executor",
|
|
5
|
-
"description": "Remove declared build output directories unless they contain tracked files.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"outputs": {
|
|
9
|
-
"type": "array",
|
|
10
|
-
"items": { "type": "string" },
|
|
11
|
-
"description": "Optional output patterns. Defaults to the project's build outputs, then {projectRoot}/dist."
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"additionalProperties": false
|
|
15
|
-
}
|
|
File without changes
|