@smoothbricks/nx-plugin 0.7.17 → 0.7.19
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 +315 -114
- package/dist/.build-inputs.json +47 -38
- package/dist/built-output-packages.js +1 -1
- package/dist/bun-lock-scope.d.ts +128 -20
- package/dist/bun-lock-scope.d.ts.map +1 -1
- package/dist/bun-lock-scope.js +267 -44
- package/dist/cargo-closure-input.d.ts +8 -6
- package/dist/cargo-closure-input.d.ts.map +1 -1
- package/dist/cargo-closure-input.js +15 -12
- package/dist/cargo-source-hash.d.ts +26 -25
- package/dist/cargo-source-hash.d.ts.map +1 -1
- package/dist/cargo-source-hash.js +84 -105
- package/dist/cargo-toolchain-paths.d.ts +2 -2
- package/dist/cargo-toolchain-paths.js +2 -2
- package/dist/cargo-workspace.d.ts +20 -2
- package/dist/cargo-workspace.d.ts.map +1 -1
- package/dist/cargo-workspace.js +43 -22
- package/dist/ensure-built-receipt.d.ts +3 -2
- package/dist/ensure-built-receipt.d.ts.map +1 -1
- package/dist/ensure-built-receipt.js +3 -2
- package/dist/eslint-config-closure.d.ts +8 -3
- package/dist/eslint-config-closure.d.ts.map +1 -1
- package/dist/eslint-config-closure.js +24 -5
- package/dist/executors/bounded-exec/admission-queue.d.ts +3 -1
- package/dist/executors/bounded-exec/admission-queue.d.ts.map +1 -1
- package/dist/executors/bounded-exec/admission-queue.js +9 -10
- package/dist/executors/bounded-exec/awake-clock.d.ts +5 -0
- package/dist/executors/bounded-exec/awake-clock.d.ts.map +1 -0
- package/dist/executors/bounded-exec/awake-clock.js +22 -0
- package/dist/executors/bounded-exec/bounds.d.ts +19 -6
- package/dist/executors/bounded-exec/bounds.d.ts.map +1 -1
- package/dist/executors/bounded-exec/bounds.js +22 -15
- package/dist/executors/bounded-exec/case-gate.d.ts +114 -0
- package/dist/executors/bounded-exec/case-gate.d.ts.map +1 -0
- package/dist/executors/bounded-exec/case-gate.js +342 -0
- package/dist/executors/bounded-exec/cpu-pool-thread.d.ts +1 -0
- package/dist/executors/bounded-exec/cpu-pool-thread.d.ts.map +1 -1
- package/dist/executors/bounded-exec/cpu-pool-thread.js +2 -2
- package/dist/executors/bounded-exec/cpu-pool.d.ts +28 -1
- package/dist/executors/bounded-exec/cpu-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/cpu-pool.js +102 -16
- package/dist/executors/bounded-exec/cpu-rise.d.ts +73 -0
- package/dist/executors/bounded-exec/cpu-rise.d.ts.map +1 -0
- package/dist/executors/bounded-exec/cpu-rise.js +111 -0
- package/dist/executors/bounded-exec/endpoint-life.d.ts +146 -0
- package/dist/executors/bounded-exec/endpoint-life.d.ts.map +1 -0
- package/dist/executors/bounded-exec/endpoint-life.js +228 -0
- package/dist/executors/bounded-exec/executor.d.ts +1 -1
- package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
- package/dist/executors/bounded-exec/executor.js +256 -86
- package/dist/executors/bounded-exec/gateway-lease.d.ts +1 -1
- package/dist/executors/bounded-exec/gateway-lease.d.ts.map +1 -1
- package/dist/executors/bounded-exec/gateway-lease.js +8 -1
- package/dist/executors/bounded-exec/go-run-summary.d.ts +51 -0
- package/dist/executors/bounded-exec/go-run-summary.d.ts.map +1 -0
- package/dist/executors/bounded-exec/go-run-summary.js +98 -0
- package/dist/executors/bounded-exec/hang-diagnostics.d.ts +11 -3
- package/dist/executors/bounded-exec/hang-diagnostics.d.ts.map +1 -1
- package/dist/executors/bounded-exec/hang-diagnostics.js +125 -47
- package/dist/executors/bounded-exec/lease-wait.d.ts +1 -0
- package/dist/executors/bounded-exec/lease-wait.d.ts.map +1 -1
- package/dist/executors/bounded-exec/lease-wait.js +1 -0
- package/dist/executors/bounded-exec/mbx-pool.d.ts +42 -7
- package/dist/executors/bounded-exec/mbx-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/mbx-pool.js +45 -8
- package/dist/executors/bounded-exec/mbx-reservations.d.ts +12 -6
- package/dist/executors/bounded-exec/mbx-reservations.d.ts.map +1 -1
- package/dist/executors/bounded-exec/mbx-reservations.js +190 -284
- package/dist/executors/bounded-exec/parent-grant.d.ts +2 -0
- package/dist/executors/bounded-exec/parent-grant.d.ts.map +1 -1
- package/dist/executors/bounded-exec/parent-grant.js +1 -0
- package/dist/executors/bounded-exec/pool-admission.d.ts +29 -3
- package/dist/executors/bounded-exec/pool-admission.d.ts.map +1 -1
- package/dist/executors/bounded-exec/pool-admission.js +47 -1
- package/dist/executors/bounded-exec/progress-channel.d.ts +38 -0
- package/dist/executors/bounded-exec/progress-channel.d.ts.map +1 -0
- package/dist/executors/bounded-exec/progress-channel.js +113 -0
- package/dist/executors/bounded-exec/progress.d.ts +5 -1
- package/dist/executors/bounded-exec/progress.d.ts.map +1 -1
- package/dist/executors/bounded-exec/progress.js +31 -1
- package/dist/executors/bounded-exec/ram-temp.d.ts +24 -1
- package/dist/executors/bounded-exec/ram-temp.d.ts.map +1 -1
- package/dist/executors/bounded-exec/ram-temp.js +123 -16
- package/dist/executors/bounded-exec/reservation-connection.d.ts +90 -0
- package/dist/executors/bounded-exec/reservation-connection.d.ts.map +1 -0
- package/dist/executors/bounded-exec/reservation-connection.js +248 -0
- package/dist/executors/bounded-exec/run-cpu-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/run-cpu-pool.js +3 -0
- package/dist/executors/bounded-exec/runner-sizing.d.ts +9 -5
- package/dist/executors/bounded-exec/runner-sizing.d.ts.map +1 -1
- package/dist/executors/bounded-exec/runner-sizing.js +13 -9
- package/dist/executors/bounded-exec/schema.d.ts +7 -2
- package/dist/executors/bounded-exec/schema.d.ts.map +1 -1
- package/dist/executors/bounded-exec/schema.js +17 -1
- package/dist/executors/bounded-exec/suite-minimum.d.ts +21 -0
- package/dist/executors/bounded-exec/suite-minimum.d.ts.map +1 -0
- package/dist/executors/bounded-exec/suite-minimum.js +85 -0
- package/dist/executors/bounded-exec/test-result-writer.d.ts +2 -0
- package/dist/executors/bounded-exec/test-result-writer.d.ts.map +1 -1
- package/dist/executors/bounded-exec/test-result-writer.js +1 -0
- package/dist/executors/bounded-exec/test-results.d.ts +5 -0
- package/dist/executors/bounded-exec/test-results.d.ts.map +1 -1
- package/dist/executors/bounded-exec/test-results.js +2 -2
- package/dist/executors/bounded-exec/verdict.d.ts +39 -10
- package/dist/executors/bounded-exec/verdict.d.ts.map +1 -1
- package/dist/executors/bounded-exec/verdict.js +60 -14
- package/dist/executors/cargo-zigbuild/executor.d.ts +10 -8
- package/dist/executors/cargo-zigbuild/executor.d.ts.map +1 -1
- package/dist/executors/cargo-zigbuild/executor.js +32 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +294 -152
- package/dist/managed-files/ci-workflow.d.ts +4 -1
- package/dist/managed-files/ci-workflow.d.ts.map +1 -1
- package/dist/managed-files/ci-workflow.js +9 -14
- package/dist/managed-files/files.d.ts +3 -3
- package/dist/managed-files/files.js +3 -3
- package/dist/managed-files/generator.d.ts +5 -1
- package/dist/managed-files/generator.d.ts.map +1 -1
- package/dist/managed-files/generator.js +22 -7
- package/dist/managed-files/render-memo.d.ts +13 -0
- package/dist/managed-files/render-memo.d.ts.map +1 -0
- package/dist/managed-files/render-memo.js +94 -0
- package/dist/task-results.js +2 -1
- package/dist/test-program.d.ts +11 -6
- package/dist/test-program.d.ts.map +1 -1
- package/dist/test-program.js +39 -35
- package/dist/tool-bins.d.ts +12 -0
- package/dist/tool-bins.d.ts.map +1 -1
- package/dist/tool-bins.js +31 -6
- package/dist/typecheck-test-policy.d.ts +10 -1
- package/dist/typecheck-test-policy.d.ts.map +1 -1
- package/dist/typecheck-test-policy.js +40 -24
- package/dist/workspace-config-policy.d.ts.map +1 -1
- package/dist/workspace-config-policy.js +135 -42
- package/dist/workspace-index.d.ts +14 -1
- package/dist/workspace-index.d.ts.map +1 -1
- package/dist/workspace-index.js +36 -4
- package/executors.json +2 -0
- package/managed/raw/envrc +24 -0
- package/managed/raw/patches/nx@24.0.3.patch +1851 -221
- package/managed/raw/patches/ttsc@0.37.1.patch +1055 -0
- package/managed/raw/tooling/direnv/developer-links.ts +122 -14
- package/managed/raw/tooling/direnv/devenv.smoo.nix +20 -19
- package/managed/templates/github/actions/save-nix-devenv/action.yml +19 -1
- package/managed/templates/github/actions/setup-devenv/action.yml +2 -0
- package/package.json +68 -11
- package/runtime/nx-publish/.build-inputs.json +2 -2
- package/runtime/nx-publish/cache_adapter.js +293 -3
- package/runtime/nx-publish/nx_publish.js +36 -14
- package/src/built-output-packages.ts +1 -1
- package/src/bun-lock-scope.ts +293 -40
- package/src/cargo-closure-input.ts +20 -12
- package/src/cargo-source-hash.ts +119 -145
- package/src/cargo-toolchain-paths.ts +2 -2
- package/src/cargo-workspace.ts +59 -21
- package/src/ensure-built-receipt.ts +3 -2
- package/src/eslint-config-closure.ts +27 -6
- package/src/executors/bounded-exec/admission-queue.ts +11 -10
- package/src/executors/bounded-exec/awake-clock.ts +20 -0
- package/src/executors/bounded-exec/bounds.ts +41 -19
- package/src/executors/bounded-exec/case-gate.ts +365 -0
- package/src/executors/bounded-exec/cpu-pool-thread.ts +3 -3
- package/src/executors/bounded-exec/cpu-pool.ts +139 -12
- package/src/executors/bounded-exec/cpu-rise.ts +156 -0
- package/src/executors/bounded-exec/endpoint-life.ts +279 -0
- package/src/executors/bounded-exec/executor.ts +341 -123
- package/src/executors/bounded-exec/gateway-lease.ts +6 -0
- package/src/executors/bounded-exec/go-run-summary.ts +137 -0
- package/src/executors/bounded-exec/hang-diagnostics.ts +150 -50
- package/src/executors/bounded-exec/lease-wait.ts +1 -0
- package/src/executors/bounded-exec/mbx-pool.ts +57 -9
- package/src/executors/bounded-exec/mbx-reservations.ts +216 -183
- package/src/executors/bounded-exec/parent-grant.ts +3 -0
- package/src/executors/bounded-exec/pool-admission.ts +59 -2
- package/src/executors/bounded-exec/progress-channel.ts +129 -0
- package/src/executors/bounded-exec/progress.ts +39 -3
- package/src/executors/bounded-exec/ram-temp.ts +137 -17
- package/src/executors/bounded-exec/reservation-connection.ts +221 -0
- package/src/executors/bounded-exec/run-cpu-pool.ts +2 -0
- package/src/executors/bounded-exec/runner-sizing.ts +13 -8
- package/src/executors/bounded-exec/schema.json +1 -1
- package/src/executors/bounded-exec/schema.ts +21 -2
- package/src/executors/bounded-exec/suite-minimum.ts +81 -0
- package/src/executors/bounded-exec/test-result-writer.ts +3 -0
- package/src/executors/bounded-exec/test-results.ts +5 -0
- package/src/executors/bounded-exec/verdict.ts +83 -22
- package/src/executors/cargo-zigbuild/executor.ts +30 -19
- package/src/index.ts +357 -166
- package/src/managed-files/ci-workflow.ts +13 -17
- package/src/managed-files/files.ts +3 -3
- package/src/managed-files/generator.ts +21 -6
- package/src/managed-files/render-memo.ts +135 -0
- package/src/test-program.ts +36 -41
- package/src/tool-bins.ts +35 -6
- package/src/typecheck-test-policy.ts +49 -24
- package/src/workspace-config-policy.ts +161 -43
- package/src/workspace-index.ts +40 -5
- package/test-timings.json +157 -141
- package/managed/raw/patches/ttsc@0.36.3.patch +0 -1660
|
@@ -64,7 +64,10 @@ export interface CiWorkflowDefinitionOptions extends DeployStepSecretConfig {
|
|
|
64
64
|
deploy: boolean;
|
|
65
65
|
browserTests: boolean;
|
|
66
66
|
e2eDeployment: boolean;
|
|
67
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* The first entry is the branch whose pushes queue behind a running CI run instead of canceling it, and, with
|
|
69
|
+
* deploy, deploy the staging stage.
|
|
70
|
+
*/
|
|
68
71
|
pushBranches: NonEmptyArray<string>;
|
|
69
72
|
/** Default ubuntu-latest when omitted. */
|
|
70
73
|
runsOn?: string | string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-workflow.d.ts","sourceRoot":"","sources":["../../src/managed-files/ci-workflow.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAEV,aAAa,EACb,6BAA6B,EAE7B,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,6BAA6B,EAC7B,2BAA2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6B,GAAG,SAAS,GAAG,MAAM,CASpG;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,6BAA6B,GAAG,MAAM,EAAE,CAyG9G;AAqCD,6EAA6E;AAC7E,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,6BAA6B,GAAG,6BAA6B,CAkC9G;AAqGD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,UAIjC,CAAC;AAgCF,sFAAsF;AACtF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAEhE;AAQD;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,sBAAsB,GAAG,MAAM,EAAE,CAGjF;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAAG,MAAM,EAAE,CAMxG;AAmRD;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,6CAA6C,CAAC;AAEjF,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,EAC9C,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,QAAQ,GAAG,UAAU,EAC3B,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,SAAS,SAAc,GACtB,MAAM,EAAE,CAkBV"}
|
|
@@ -129,20 +129,12 @@ permissions:
|
|
|
129
129
|
${options.deploy ? ' deployments: write\n' : ''} statuses: write
|
|
130
130
|
|
|
131
131
|
concurrency:
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
#
|
|
135
|
-
#
|
|
136
|
-
# other branches keep canceling superseded runs.
|
|
132
|
+
# One in-flight run per pull request, and per ref for pushes. Pushes to the first
|
|
133
|
+
# push branch queue behind a running workflow instead of canceling it, so every
|
|
134
|
+
# push there ends in a finished run and a newer push never cancels a deploy job
|
|
135
|
+
# mid-flight. Pull requests and other branches keep canceling superseded runs.
|
|
137
136
|
group: ${CI_CONCURRENCY_GROUP}
|
|
138
|
-
cancel-in-progress: \${{ github.ref != ${stagingRefLiteral(options)} }}
|
|
139
|
-
: ` # This workflow validates and never deploys, so there is no in-flight
|
|
140
|
-
# deployment for a newer push to protect: every pull request, and every ref
|
|
141
|
-
# for pushes, cancels its superseded runs. Queuing them instead serializes
|
|
142
|
-
# the staging branch, and a burst of pushes then reports the newest commit
|
|
143
|
-
# one full run per queued push late.
|
|
144
|
-
group: ${CI_CONCURRENCY_GROUP}
|
|
145
|
-
cancel-in-progress: true`}
|
|
137
|
+
cancel-in-progress: \${{ github.ref != ${stagingRefLiteral(options)} }}
|
|
146
138
|
|
|
147
139
|
defaults:
|
|
148
140
|
run:
|
|
@@ -919,7 +911,10 @@ export const SAME_REPO_GATE_FOLDED = [
|
|
|
919
911
|
" ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository",
|
|
920
912
|
' }}',
|
|
921
913
|
];
|
|
922
|
-
/**
|
|
914
|
+
/**
|
|
915
|
+
* The first push branch is the one whose pushes queue behind a running CI run, and, with deploy, deploy the staging
|
|
916
|
+
* stage.
|
|
917
|
+
*/
|
|
923
918
|
function stagingPushBranch(options) {
|
|
924
919
|
return options.pushBranches[0];
|
|
925
920
|
}
|
|
@@ -44,9 +44,9 @@ export interface ManagedFileContext {
|
|
|
44
44
|
}
|
|
45
45
|
/** Temporary upstream compiler repairs distributed to smoo-managed Bun workspaces. */
|
|
46
46
|
export declare const managedTtscPatch: {
|
|
47
|
-
readonly version: '0.
|
|
48
|
-
readonly key: 'ttsc@0.
|
|
49
|
-
readonly path: 'patches/ttsc@0.
|
|
47
|
+
readonly version: '0.37.1';
|
|
48
|
+
readonly key: 'ttsc@0.37.1';
|
|
49
|
+
readonly path: 'patches/ttsc@0.37.1.patch';
|
|
50
50
|
};
|
|
51
51
|
/** Maintained Nx 24.0.3 repairs, applied as an ordinary Bun patchedDependency over the registry release. */
|
|
52
52
|
export declare const managedNxPatch: {
|
|
@@ -7,9 +7,9 @@ import { renderPrPreviewCleanupWorkflowYaml, renderPrStageSweepWorkflowYaml } fr
|
|
|
7
7
|
import { renderPublishWorkflowYaml } from './publish-workflow.js';
|
|
8
8
|
/** Temporary upstream compiler repairs distributed to smoo-managed Bun workspaces. */
|
|
9
9
|
export const managedTtscPatch = {
|
|
10
|
-
version: '0.
|
|
11
|
-
key: 'ttsc@0.
|
|
12
|
-
path: 'patches/ttsc@0.
|
|
10
|
+
version: '0.37.1',
|
|
11
|
+
key: 'ttsc@0.37.1',
|
|
12
|
+
path: 'patches/ttsc@0.37.1.patch',
|
|
13
13
|
};
|
|
14
14
|
/** Maintained Nx 24.0.3 repairs, applied as an ordinary Bun patchedDependency over the registry release. */
|
|
15
15
|
export const managedNxPatch = {
|
|
@@ -9,7 +9,11 @@ import { type FileResult, type ManagedPathInfo } from './tree.js';
|
|
|
9
9
|
* installs dependencies or resolves secrets.
|
|
10
10
|
*/
|
|
11
11
|
export declare function generateManagedFiles(tree: Tree, projects: WorkspaceProjects, pathInfo?: ReadonlyMap<string, ManagedPathInfo>): Promise<FileResult[]>;
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Shared rendering boundary; stage only after every consumer formatter has succeeded. The render is a function of the
|
|
14
|
+
* context, the workspace's source listing and what it reads through the Tree, so it runs again only when one of those
|
|
15
|
+
* changed (`renderedOnChange`); staging always compares against the Tree as it is.
|
|
16
|
+
*/
|
|
13
17
|
export declare function generateManagedFilesForContext(tree: Tree, context: ManagedFileContext, pathInfo?: ReadonlyMap<string, ManagedPathInfo>): Promise<FileResult[]>;
|
|
14
18
|
/** Native Nx generate/sync entry point. CLI calls the same transformation with its already-loaded graph. */
|
|
15
19
|
export default function generator(tree: Tree): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/managed-files/generator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/managed-files/generator.ts"],"names":[],"mappings":"AACA,OAAO,EAAqE,KAAK,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAGxH,OAAO,EAA4B,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,KAAK,kBAAkB,EAAsB,MAAM,YAAY,CAAC;AAIzE,OAAO,EAA4B,KAAK,UAAU,EAAE,KAAK,eAAe,EAAqB,MAAM,WAAW,CAAC;AAE/G;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,iBAAiB,EAC3B,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,GAC9C,OAAO,CAAC,UAAU,EAAE,CAAC,CAcvB;AAED;;;;GAIG;AACH,wBAAsB,8BAA8B,CAClD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,GAC9C,OAAO,CAAC,UAAU,EAAE,CAAC,CAqBvB;AAED,4GAA4G;AAC5G,wBAA8B,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAIjE"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
1
2
|
import { createProjectGraphAsync, getProjects, joinPathFragments, readJson } from 'nx/src/devkit-exports.js';
|
|
2
|
-
import { renderTypecheckTestFiles } from '../typecheck-test-policy.js';
|
|
3
|
+
import { renderTypecheckTestFiles, treeSourceListing } from '../typecheck-test-policy.js';
|
|
3
4
|
import { deriveManagedFileContext } from './context.js';
|
|
4
5
|
import { renderManagedFiles } from './files.js';
|
|
5
6
|
import { formatManagedContent } from './managed-format.js';
|
|
6
7
|
import { inspectManagedPaths } from './paths.js';
|
|
8
|
+
import { renderedOnChange } from './render-memo.js';
|
|
7
9
|
import { assertNoManagedConflicts, stageManagedFiles } from './tree.js';
|
|
8
10
|
/**
|
|
9
11
|
* All workspace content comes from Tree. The supplied graph is Nx's resolved
|
|
@@ -22,13 +24,26 @@ export async function generateManagedFiles(tree, projects, pathInfo) {
|
|
|
22
24
|
});
|
|
23
25
|
return generateManagedFilesForContext(tree, deriveManagedFileContext(manifest, packages, projects, tree.exists('bun.lock'), tree.read('.npmrc', 'utf8') ?? ''), pathInfo);
|
|
24
26
|
}
|
|
25
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Shared rendering boundary; stage only after every consumer formatter has succeeded. The render is a function of the
|
|
29
|
+
* context, the workspace's source listing and what it reads through the Tree, so it runs again only when one of those
|
|
30
|
+
* changed (`renderedOnChange`); staging always compares against the Tree as it is.
|
|
31
|
+
*/
|
|
26
32
|
export async function generateManagedFilesForContext(tree, context, pathInfo) {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
const listing = treeSourceListing(tree);
|
|
34
|
+
const key = createHash('sha256')
|
|
35
|
+
.update(JSON.stringify(context))
|
|
36
|
+
.update('\0')
|
|
37
|
+
.update(listing.join('\0'))
|
|
38
|
+
.digest('hex');
|
|
39
|
+
const files = await renderedOnChange(tree, key, async (reading) => {
|
|
40
|
+
const rendered = [...renderManagedFiles(context), ...renderTypecheckTestFiles(reading, listing)];
|
|
41
|
+
for (const file of rendered) {
|
|
42
|
+
if (file.content !== null)
|
|
43
|
+
file.content = await formatManagedContent(reading.root, file.target, file.content);
|
|
44
|
+
}
|
|
45
|
+
return rendered;
|
|
46
|
+
});
|
|
32
47
|
const paths = pathInfo ??
|
|
33
48
|
inspectManagedPaths(tree.root, files.filter((file) => file.content !== null).map((file) => file.target));
|
|
34
49
|
return stageManagedFiles(tree, files, paths);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Tree } from 'nx/src/devkit-exports.js';
|
|
2
|
+
import type { ManagedFile } from './tree.js';
|
|
3
|
+
/**
|
|
4
|
+
* The files `render` gives for `tree`, rendered again only when one of its inputs changed: `key`, which names what the
|
|
5
|
+
* render reads beside the Tree (the context, the source listing), or an answer the Tree gave it. Checking the answers
|
|
6
|
+
* reads each file the last render read, once; the render itself (policy, JSON edits, formatter runs) is skipped.
|
|
7
|
+
*
|
|
8
|
+
* A Tree with pending edits is rendered and nothing is kept: no later Tree shows those edits as they are here.
|
|
9
|
+
* The formatters' own configuration is not an answer: Prettier and Biome read it from disk, and Prettier keeps it for
|
|
10
|
+
* the life of the process, so a daemon already formats with what it first read.
|
|
11
|
+
*/
|
|
12
|
+
export declare function renderedOnChange(tree: Tree, key: string, render: (tree: Tree) => Promise<ManagedFile[]>): Promise<readonly ManagedFile[]>;
|
|
13
|
+
//# sourceMappingURL=render-memo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-memo.d.ts","sourceRoot":"","sources":["../../src/managed-files/render-memo.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAc,IAAI,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAyG7C;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,WAAW,EAAE,CAAC,GAC7C,OAAO,CAAC,SAAS,WAAW,EAAE,CAAC,CAcjC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
/** The last render of each workspace root. Replaced by the next render of that root; never expired by time. */
|
|
3
|
+
const renders = new Map();
|
|
4
|
+
function readValue(bytes) {
|
|
5
|
+
return bytes === null ? 'absent' : createHash('sha256').update(bytes).digest('base64');
|
|
6
|
+
}
|
|
7
|
+
function answerOf(tree, question, path) {
|
|
8
|
+
switch (question) {
|
|
9
|
+
case 'read':
|
|
10
|
+
return readValue(tree.read(path));
|
|
11
|
+
case 'exists':
|
|
12
|
+
return String(tree.exists(path));
|
|
13
|
+
case 'isFile':
|
|
14
|
+
return String(tree.isFile(path));
|
|
15
|
+
case 'children':
|
|
16
|
+
return JSON.stringify(tree.children(path));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A Tree that answers from another and keeps every answer it gave. A render that reads the workspace only through
|
|
21
|
+
* it is a function of those answers and of what its caller keys it on. It refuses every write: a render reads the
|
|
22
|
+
* Tree, and staging alone writes it.
|
|
23
|
+
*/
|
|
24
|
+
class AnsweringTree {
|
|
25
|
+
tree;
|
|
26
|
+
answers = new Map();
|
|
27
|
+
constructor(tree) {
|
|
28
|
+
this.tree = tree;
|
|
29
|
+
}
|
|
30
|
+
get root() {
|
|
31
|
+
return this.tree.root;
|
|
32
|
+
}
|
|
33
|
+
read(filePath, encoding) {
|
|
34
|
+
const bytes = this.tree.read(filePath);
|
|
35
|
+
this.keep('read', filePath, readValue(bytes));
|
|
36
|
+
return bytes === null || encoding === undefined ? bytes : bytes.toString(encoding);
|
|
37
|
+
}
|
|
38
|
+
exists(filePath) {
|
|
39
|
+
return this.keep('exists', filePath, String(this.tree.exists(filePath))) === 'true';
|
|
40
|
+
}
|
|
41
|
+
isFile(filePath) {
|
|
42
|
+
return this.keep('isFile', filePath, String(this.tree.isFile(filePath))) === 'true';
|
|
43
|
+
}
|
|
44
|
+
children(dirPath) {
|
|
45
|
+
const children = this.tree.children(dirPath);
|
|
46
|
+
this.keep('children', dirPath, JSON.stringify(children));
|
|
47
|
+
return children;
|
|
48
|
+
}
|
|
49
|
+
listChanges() {
|
|
50
|
+
return this.tree.listChanges();
|
|
51
|
+
}
|
|
52
|
+
write(filePath) {
|
|
53
|
+
throw readOnly(filePath);
|
|
54
|
+
}
|
|
55
|
+
delete(filePath) {
|
|
56
|
+
throw readOnly(filePath);
|
|
57
|
+
}
|
|
58
|
+
rename(from) {
|
|
59
|
+
throw readOnly(from);
|
|
60
|
+
}
|
|
61
|
+
changePermissions(filePath) {
|
|
62
|
+
throw readOnly(filePath);
|
|
63
|
+
}
|
|
64
|
+
keep(question, path, value) {
|
|
65
|
+
this.answers.set(`${question}\0${path}`, { question, path, value });
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function readOnly(path) {
|
|
70
|
+
return new Error(`${path}: a managed-files render reads the Tree; only staging writes it`);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The files `render` gives for `tree`, rendered again only when one of its inputs changed: `key`, which names what the
|
|
74
|
+
* render reads beside the Tree (the context, the source listing), or an answer the Tree gave it. Checking the answers
|
|
75
|
+
* reads each file the last render read, once; the render itself (policy, JSON edits, formatter runs) is skipped.
|
|
76
|
+
*
|
|
77
|
+
* A Tree with pending edits is rendered and nothing is kept: no later Tree shows those edits as they are here.
|
|
78
|
+
* The formatters' own configuration is not an answer: Prettier and Biome read it from disk, and Prettier keeps it for
|
|
79
|
+
* the life of the process, so a daemon already formats with what it first read.
|
|
80
|
+
*/
|
|
81
|
+
export async function renderedOnChange(tree, key, render) {
|
|
82
|
+
if (tree.listChanges().length > 0)
|
|
83
|
+
return render(tree);
|
|
84
|
+
const last = renders.get(tree.root);
|
|
85
|
+
if (last !== undefined &&
|
|
86
|
+
last.key === key &&
|
|
87
|
+
last.answers.every(({ question, path, value }) => answerOf(tree, question, path) === value)) {
|
|
88
|
+
return last.files;
|
|
89
|
+
}
|
|
90
|
+
const answering = new AnsweringTree(tree);
|
|
91
|
+
const files = await render(answering);
|
|
92
|
+
renders.set(tree.root, { key, answers: [...answering.answers.values()], files });
|
|
93
|
+
return files;
|
|
94
|
+
}
|
package/dist/task-results.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
var __typia_transform_pattern_1;
|
|
1
2
|
import { createHash } from 'node:crypto';
|
|
2
3
|
import { mkdir, rename, writeFile } from 'node:fs/promises';
|
|
3
4
|
import { join } from 'node:path';
|
|
@@ -6,7 +7,7 @@ import typia from 'typia';
|
|
|
6
7
|
/** A controller-selected hint namespace, not publication authority or a backend credential. */
|
|
7
8
|
export const NX_TASK_RECEIPT_ENV = 'COWSHED_NX_TASK_RECEIPT_ID';
|
|
8
9
|
const isRequestId = (() => {
|
|
9
|
-
return input => "string" === typeof input && RegExp("^[0-9a-f]{32}$").test(input);
|
|
10
|
+
return input => "string" === typeof input && (__typia_transform_pattern_1 ??= RegExp("^[0-9a-f]{32}$")).test(input);
|
|
10
11
|
})();
|
|
11
12
|
const WRITTEN = { ok: true };
|
|
12
13
|
function requestId() {
|
package/dist/test-program.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Tree } from 'nx/src/devkit-exports.js';
|
|
2
1
|
/**
|
|
3
2
|
* Everything the test typecheck needs to know about one project's files.
|
|
4
3
|
*
|
|
@@ -16,8 +15,6 @@ export interface TestProgram {
|
|
|
16
15
|
/** A tsconfig by workspace-relative path; null when the file is absent. */
|
|
17
16
|
readonly readConfig: (path: string) => Record<string, unknown> | null;
|
|
18
17
|
}
|
|
19
|
-
/** A directory listing the walker can use: an Nx `Tree`, or the disk behind a small adapter. */
|
|
20
|
-
export type ProjectTree = Pick<Tree, 'children' | 'isFile'>;
|
|
21
18
|
/** Why a test program typechecks none of what it exists to typecheck. */
|
|
22
19
|
export type TestProgramFault = {
|
|
23
20
|
readonly kind: 'no-tests';
|
|
@@ -26,15 +23,23 @@ export type TestProgramFault = {
|
|
|
26
23
|
readonly tests: readonly string[];
|
|
27
24
|
};
|
|
28
25
|
/**
|
|
29
|
-
* The TypeScript sources
|
|
26
|
+
* The files {@link typeScriptSourcesByProject} lists from: the TypeScript sources, and the manifests that make a
|
|
27
|
+
* directory a project of its own.
|
|
28
|
+
*/
|
|
29
|
+
export declare const SOURCE_LISTING_GLOBS: string[];
|
|
30
|
+
/**
|
|
31
|
+
* The TypeScript sources of each of `projectRoots`, project-relative and sorted, from one listing of the workspace's
|
|
32
|
+
* files (workspace-relative; a file that is neither a source nor a manifest is passed over). One pass over the listing
|
|
33
|
+
* answers every project: no directory is listed and no file is probed.
|
|
30
34
|
*
|
|
31
35
|
* A directory below the project that is a project of its own (its own manifest or Nx project file) is not part of
|
|
32
36
|
* this one: its files are its own tests, found by its own policy pass, and folding them in would count them twice.
|
|
33
37
|
* A directory that merely carries a tsconfig is not that: in a monorepo of Bun programs such a file routes the
|
|
34
38
|
* directory's files to the parent's program (a `tests/tsconfig.json` extending `../tsconfig.test.json`), and
|
|
35
|
-
* nothing typechecks the directory but that program.
|
|
39
|
+
* nothing typechecks the directory but that program. Nothing beneath a build-output or dot directory is a source
|
|
40
|
+
* ({@link isNonSourceDirectory}).
|
|
36
41
|
*/
|
|
37
|
-
export declare function
|
|
42
|
+
export declare function typeScriptSourcesByProject(files: Iterable<string>, projectRoots: Iterable<string>): ReadonlyMap<string, readonly string[]>;
|
|
38
43
|
/**
|
|
39
44
|
* The globs a test program's `include` must carry, given the `include` it has.
|
|
40
45
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-program.d.ts","sourceRoot":"","sources":["../src/test-program.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test-program.d.ts","sourceRoot":"","sources":["../src/test-program.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAW;IAC1B,yEAAyE;IACzE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,4FAA4F;IAC5F,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,2EAA2E;IAC3E,QAAQ,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CACvE;AAED,yEAAyE;AACzE,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAA;CAAE,GAC7B;IAAE,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC;AAsB7E;;;GAGG;AACH,eAAO,MAAM,oBAAoB,UAAyD,CAAC;AAE3F;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,EACvB,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,GAC7B,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAiBxC;AAwDD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAS/G;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,gBAAgB,GAAG,IAAI,CAO/G"}
|
package/dist/test-program.js
CHANGED
|
@@ -20,48 +20,52 @@ const FIXTURE_DIRECTORY = 'fixtures';
|
|
|
20
20
|
const PACKAGE_CONVENTION_ROOT = 'src';
|
|
21
21
|
const TESTS_DIRECTORY = '__tests__';
|
|
22
22
|
/**
|
|
23
|
-
* The TypeScript sources
|
|
23
|
+
* The files {@link typeScriptSourcesByProject} lists from: the TypeScript sources, and the manifests that make a
|
|
24
|
+
* directory a project of its own.
|
|
25
|
+
*/
|
|
26
|
+
export const SOURCE_LISTING_GLOBS = ['**/*.{ts,tsx,mts,cts}', '**/{package,project}.json'];
|
|
27
|
+
/**
|
|
28
|
+
* The TypeScript sources of each of `projectRoots`, project-relative and sorted, from one listing of the workspace's
|
|
29
|
+
* files (workspace-relative; a file that is neither a source nor a manifest is passed over). One pass over the listing
|
|
30
|
+
* answers every project: no directory is listed and no file is probed.
|
|
24
31
|
*
|
|
25
32
|
* A directory below the project that is a project of its own (its own manifest or Nx project file) is not part of
|
|
26
33
|
* this one: its files are its own tests, found by its own policy pass, and folding them in would count them twice.
|
|
27
34
|
* A directory that merely carries a tsconfig is not that: in a monorepo of Bun programs such a file routes the
|
|
28
35
|
* directory's files to the parent's program (a `tests/tsconfig.json` extending `../tsconfig.test.json`), and
|
|
29
|
-
* nothing typechecks the directory but that program.
|
|
36
|
+
* nothing typechecks the directory but that program. Nothing beneath a build-output or dot directory is a source
|
|
37
|
+
* ({@link isNonSourceDirectory}).
|
|
30
38
|
*/
|
|
31
|
-
export function
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
walk(projectRoot);
|
|
46
|
-
return files.sort();
|
|
47
|
-
}
|
|
48
|
-
/** A directory with its own manifest or Nx project file is a project, and its files are that project's. */
|
|
49
|
-
function isNestedProject(tree, directory) {
|
|
50
|
-
return childrenOf(tree, directory).some((name) => PROJECT_FILE.test(name) && tree.isFile(posix.join(directory, name)));
|
|
51
|
-
}
|
|
52
|
-
/** A dangling link (a collected build out-link) is neither a file nor a directory; anything else is a real fault. */
|
|
53
|
-
function childrenOf(tree, directory) {
|
|
54
|
-
try {
|
|
55
|
-
return tree.children(directory);
|
|
39
|
+
export function typeScriptSourcesByProject(files, projectRoots) {
|
|
40
|
+
const sources = new Map();
|
|
41
|
+
for (const root of projectRoots)
|
|
42
|
+
sources.set(root === '' ? '.' : root, []);
|
|
43
|
+
const owners = new Set(sources.keys());
|
|
44
|
+
const listed = [];
|
|
45
|
+
for (const file of files) {
|
|
46
|
+
const name = posix.basename(file);
|
|
47
|
+
if (PROJECT_FILE.test(name))
|
|
48
|
+
owners.add(posix.dirname(file));
|
|
49
|
+
if (TYPESCRIPT_SOURCE.test(name))
|
|
50
|
+
listed.push(file);
|
|
56
51
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if (
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
52
|
+
for (const file of listed) {
|
|
53
|
+
const owner = ownerOf(file, owners);
|
|
54
|
+
if (owner === null)
|
|
55
|
+
continue;
|
|
56
|
+
sources.get(owner)?.push(owner === '.' ? file : file.slice(owner.length + 1));
|
|
57
|
+
}
|
|
58
|
+
for (const list of sources.values())
|
|
59
|
+
list.sort();
|
|
60
|
+
return sources;
|
|
61
|
+
}
|
|
62
|
+
/** The nearest directory holding a file that is a project, or null when a build-output or dot directory comes first. */
|
|
63
|
+
function ownerOf(file, owners) {
|
|
64
|
+
for (let directory = posix.dirname(file);; directory = posix.dirname(directory)) {
|
|
65
|
+
if (owners.has(directory))
|
|
66
|
+
return directory;
|
|
67
|
+
if (directory === '.' || isNonSourceDirectory(posix.basename(directory)))
|
|
68
|
+
return null;
|
|
65
69
|
}
|
|
66
70
|
}
|
|
67
71
|
function isTestSource(file) {
|
package/dist/tool-bins.d.ts
CHANGED
|
@@ -14,6 +14,11 @@ export interface NativeTools {
|
|
|
14
14
|
readonly target: string;
|
|
15
15
|
/** Each tool package that is a project of this workspace, to its project name. */
|
|
16
16
|
readonly projects: ReadonlyMap<NativeToolPackage, string>;
|
|
17
|
+
/**
|
|
18
|
+
* The Nx project of the plugin itself, when this workspace owns it: the executors it ships are files its own
|
|
19
|
+
* build writes. An installed plugin ships them built, so a consumer has none.
|
|
20
|
+
*/
|
|
21
|
+
readonly plugin: string | undefined;
|
|
17
22
|
}
|
|
18
23
|
/**
|
|
19
24
|
* The tools of the workspace at `workspaceRoot`, whose project manifests are `projectManifests` (workspace-relative):
|
|
@@ -27,5 +32,12 @@ export declare function resolveNativeTools(workspaceRoot: string, projectManifes
|
|
|
27
32
|
export declare function nativeToolCommand(tools: Pick<NativeTools, 'platform'> | null, cwd: string, tool: NativeToolPackage, bin: string): string;
|
|
28
33
|
/** The task producing a tool artifact, only when this workspace owns its package. */
|
|
29
34
|
export declare function nativeToolDependsOn(tools: NativeTools | null, tool: NativeToolPackage, target?: string): TargetDependency[];
|
|
35
|
+
/**
|
|
36
|
+
* The task that leaves the plugin's executors built, for a target whose `executor` is one of them, only when this
|
|
37
|
+
* workspace owns the plugin's package (an installed plugin ships its executors built). The executor is a file the
|
|
38
|
+
* plugin's own build writes, so a target that starts before that build ends loads the dist a previous build left, which
|
|
39
|
+
* lacks an executor the plugin gained since, or none at all.
|
|
40
|
+
*/
|
|
41
|
+
export declare function pluginBuildDependsOn(tools: NativeTools | null, executor: unknown): TargetDependency[];
|
|
30
42
|
export {};
|
|
31
43
|
//# sourceMappingURL=tool-bins.d.ts.map
|
package/dist/tool-bins.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-bins.d.ts","sourceRoot":"","sources":["../src/tool-bins.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAsBpE,0EAA0E;AAC1E,QAAA,MAAM,oBAAoB,YAAI,cAAc,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,CAAU,CAAC;AAErG,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,KAAK,gBAAgB,GAAG,WAAW,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9E;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,8DAA8D;IAC9D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,6EAA6E;IAC7E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,kFAAkF;IAClF,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC,iBAAiB,EAAE,MAAM,CAA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,iBAAiB,EACvB,MAAM,CAAC,EAAE,MAAM,GACd,gBAAgB,EAAE,CAKpB;AAQD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,gBAAgB,EAAE,CAIrG"}
|
package/dist/tool-bins.js
CHANGED
|
@@ -26,6 +26,7 @@ const NATIVE_TOOL_PACKAGES = ['build-inputs', 'cargo-retain', 'nextest-extract',
|
|
|
26
26
|
*/
|
|
27
27
|
export async function resolveNativeTools(workspaceRoot, projectManifests, platform, target) {
|
|
28
28
|
const projects = new Map();
|
|
29
|
+
let pluginProject;
|
|
29
30
|
const plugin = await realpath(join(workspaceRoot, PLUGIN_LINK)).catch((error) => {
|
|
30
31
|
// A workspace whose install has not linked the plugin yet has no tool package of its own either.
|
|
31
32
|
if (error instanceof Error && 'code' in error && error.code === 'ENOENT')
|
|
@@ -34,18 +35,24 @@ export async function resolveNativeTools(workspaceRoot, projectManifests, platfo
|
|
|
34
35
|
});
|
|
35
36
|
if (plugin !== null) {
|
|
36
37
|
const root = await realpath(workspaceRoot);
|
|
37
|
-
|
|
38
|
-
const manifest = relative(root, join(
|
|
38
|
+
const owned = async (directory, package_) => {
|
|
39
|
+
const manifest = relative(root, join(directory, 'package.json')).replaceAll('\\', '/');
|
|
39
40
|
if (!projectManifests.includes(manifest))
|
|
40
|
-
|
|
41
|
+
return undefined;
|
|
41
42
|
const parsed = JSON.parse(await readFile(join(root, manifest), 'utf8'));
|
|
42
43
|
const name = projectName(parsed);
|
|
43
44
|
if (name === undefined)
|
|
44
|
-
throw new Error(`${manifest}:
|
|
45
|
-
|
|
45
|
+
throw new Error(`${manifest}: ${package_} names its Nx project in name or nx.name`);
|
|
46
|
+
return name;
|
|
47
|
+
};
|
|
48
|
+
pluginProject = await owned(plugin, 'the plugin package');
|
|
49
|
+
for (const tool of NATIVE_TOOL_PACKAGES) {
|
|
50
|
+
const name = await owned(join(dirname(plugin), tool), 'a tool package');
|
|
51
|
+
if (name !== undefined)
|
|
52
|
+
projects.set(tool, name);
|
|
46
53
|
}
|
|
47
54
|
}
|
|
48
|
-
return { platform, target, projects };
|
|
55
|
+
return { platform, target, projects, plugin: pluginProject };
|
|
49
56
|
}
|
|
50
57
|
function projectName(manifest) {
|
|
51
58
|
if (typeof manifest !== 'object' || manifest === null)
|
|
@@ -72,3 +79,21 @@ export function nativeToolDependsOn(tools, tool, target) {
|
|
|
72
79
|
? []
|
|
73
80
|
: [{ projects: [project], target: target ?? (tool === 'cowshed' ? 'napi-native' : tools.target) }];
|
|
74
81
|
}
|
|
82
|
+
/** The plugin executors its own build runs: they load from a dist an earlier build left, so none can wait for it. */
|
|
83
|
+
const BOOTSTRAP_EXECUTORS = new Set([
|
|
84
|
+
'@smoothbricks/nx-plugin:typescript-emit',
|
|
85
|
+
'@smoothbricks/nx-plugin:scriptc-native',
|
|
86
|
+
]);
|
|
87
|
+
/**
|
|
88
|
+
* The task that leaves the plugin's executors built, for a target whose `executor` is one of them, only when this
|
|
89
|
+
* workspace owns the plugin's package (an installed plugin ships its executors built). The executor is a file the
|
|
90
|
+
* plugin's own build writes, so a target that starts before that build ends loads the dist a previous build left, which
|
|
91
|
+
* lacks an executor the plugin gained since, or none at all.
|
|
92
|
+
*/
|
|
93
|
+
export function pluginBuildDependsOn(tools, executor) {
|
|
94
|
+
if (tools?.plugin === undefined || typeof executor !== 'string')
|
|
95
|
+
return [];
|
|
96
|
+
if (!executor.startsWith('@smoothbricks/nx-plugin:') || BOOTSTRAP_EXECUTORS.has(executor))
|
|
97
|
+
return [];
|
|
98
|
+
return [{ projects: [tools.plugin], target: 'build' }];
|
|
99
|
+
}
|
|
@@ -43,8 +43,17 @@ export declare function checkTypecheckTestPolicyTree(tree: Tree): NxPolicyIssue[
|
|
|
43
43
|
/**
|
|
44
44
|
* Render test typechecking policy from the caller's Tree. The managed generator
|
|
45
45
|
* owns staging, permission checks, and flushing together with its other files.
|
|
46
|
+
* `listing` is {@link treeSourceListing} of the same Tree: the caller holds it, as the render's memo is keyed on it.
|
|
46
47
|
*/
|
|
47
|
-
export declare function renderTypecheckTestFiles(tree: Tree): ManagedFile[];
|
|
48
|
+
export declare function renderTypecheckTestFiles(tree: Tree, listing: readonly string[]): ManagedFile[];
|
|
49
|
+
/**
|
|
50
|
+
* The files a Tree's source listing reads, workspace-relative and sorted: Nx's workspace file index for the Tree's
|
|
51
|
+
* root, with the Tree's pending edits over it, as devkit's own `getProjects` lists project files. The index applies
|
|
52
|
+
* .gitignore and .nxignore, so the listing is what the commit holds, the same in every checkout, and never build
|
|
53
|
+
* output one disk happens to carry; it is read from memory, so no directory is listed and no file probed. A path a
|
|
54
|
+
* pending edit writes is listed whatever its name: the listing passes over what is neither a source nor a manifest.
|
|
55
|
+
*/
|
|
56
|
+
export declare function treeSourceListing(tree: Tree): string[];
|
|
48
57
|
/**
|
|
49
58
|
* Check all workspace packages for typecheck test policy compliance.
|
|
50
59
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typecheck-test-policy.d.ts","sourceRoot":"","sources":["../src/typecheck-test-policy.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"typecheck-test-policy.d.ts","sourceRoot":"","sources":["../src/typecheck-test-policy.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAMrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAGL,KAAK,WAAW,EAIjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAIlE,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,QAAQ,CAAC;AAI1C;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,MAAM,CAAC,MAAM,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