@smoothbricks/nx-plugin 0.7.16 → 0.7.18
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 +210 -64
- package/dist/.build-inputs.json +28 -23
- 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 +14 -11
- package/dist/cargo-source-hash.d.ts +23 -4
- package/dist/cargo-source-hash.d.ts.map +1 -1
- package/dist/cargo-source-hash.js +80 -14
- package/dist/cargo-workspace.d.ts +20 -2
- package/dist/cargo-workspace.d.ts.map +1 -1
- package/dist/cargo-workspace.js +42 -22
- package/dist/compile-environment.d.ts +8 -0
- package/dist/compile-environment.d.ts.map +1 -0
- package/dist/compile-environment.js +80 -0
- package/dist/dependency-manifests.d.ts +13 -0
- package/dist/dependency-manifests.d.ts.map +1 -0
- package/dist/dependency-manifests.js +20 -0
- 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/bounds.d.ts +12 -1
- package/dist/executors/bounded-exec/bounds.d.ts.map +1 -1
- package/dist/executors/bounded-exec/bounds.js +8 -4
- 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/executor.d.ts +1 -1
- package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
- package/dist/executors/bounded-exec/executor.js +54 -22
- package/dist/executors/bounded-exec/hang-diagnostics.d.ts +8 -0
- package/dist/executors/bounded-exec/hang-diagnostics.d.ts.map +1 -1
- package/dist/executors/bounded-exec/hang-diagnostics.js +66 -6
- package/dist/executors/bounded-exec/mbx-pool.d.ts +16 -2
- package/dist/executors/bounded-exec/mbx-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/mbx-pool.js +18 -2
- package/dist/executors/bounded-exec/mbx-reservations.d.ts +5 -2
- package/dist/executors/bounded-exec/mbx-reservations.d.ts.map +1 -1
- package/dist/executors/bounded-exec/mbx-reservations.js +5 -3
- 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 +2 -1
- package/dist/executors/bounded-exec/progress.d.ts.map +1 -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/schema.d.ts +5 -0
- 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/verdict.d.ts +13 -6
- package/dist/executors/bounded-exec/verdict.d.ts.map +1 -1
- package/dist/executors/bounded-exec/verdict.js +34 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +216 -97
- 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/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-route.d.ts +3 -4
- package/dist/typecheck-route.d.ts.map +1 -1
- package/dist/typecheck-route.js +4 -15
- 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-index.d.ts +14 -1
- package/dist/workspace-index.d.ts.map +1 -1
- package/dist/workspace-index.js +36 -4
- package/managed/raw/patches/nx@24.0.3.patch +703 -119
- package/managed/raw/patches/{ttsc@0.34.1.patch → ttsc@0.36.3.patch} +728 -71
- package/managed/raw/tooling/direnv/developer-links.ts +17 -3
- package/managed/raw/tooling/direnv/devenv.smoo.nix +1 -1
- 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 +5 -4
- package/src/bun-lock-scope.ts +293 -40
- package/src/cargo-closure-input.ts +19 -11
- package/src/cargo-source-hash.ts +103 -13
- package/src/cargo-workspace.ts +59 -20
- package/src/compile-environment.ts +35 -0
- package/src/dependency-manifests.ts +30 -0
- package/src/ensure-built-receipt.ts +3 -2
- package/src/eslint-config-closure.ts +27 -6
- package/src/executors/bounded-exec/bounds.ts +13 -4
- package/src/executors/bounded-exec/cpu-rise.ts +156 -0
- package/src/executors/bounded-exec/executor.ts +65 -21
- package/src/executors/bounded-exec/hang-diagnostics.ts +88 -6
- package/src/executors/bounded-exec/mbx-pool.ts +24 -3
- package/src/executors/bounded-exec/mbx-reservations.ts +7 -5
- package/src/executors/bounded-exec/progress-channel.ts +129 -0
- package/src/executors/bounded-exec/progress.ts +2 -1
- package/src/executors/bounded-exec/ram-temp.ts +137 -17
- package/src/executors/bounded-exec/schema.ts +19 -0
- package/src/executors/bounded-exec/verdict.ts +44 -16
- package/src/index.ts +272 -106
- 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-route.ts +5 -14
- package/src/typecheck-test-policy.ts +49 -24
- package/src/workspace-index.ts +40 -5
- package/test-timings.json +6 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type FileData } from 'nx/src/native/index.js';
|
|
1
2
|
/**
|
|
2
3
|
* The files of Nx's workspace file index that match `globs`, workspace-relative:
|
|
3
4
|
* .gitignore and .nxignore applied, `node_modules` never entered. These are
|
|
@@ -6,7 +7,10 @@
|
|
|
6
7
|
* output happens to be on disk.
|
|
7
8
|
*
|
|
8
9
|
* The daemon serves only its own workspace's index. Any other root, such as a
|
|
9
|
-
* test fixture or a foreign checkout, is
|
|
10
|
+
* test fixture or a foreign checkout, is read from the filesystem now
|
|
11
|
+
* ({@link freshIndexedFiles}), under that root's own data directory: Nx's
|
|
12
|
+
* process context for it would resolve the inherited NX_WORKSPACE_DATA_DIRECTORY,
|
|
13
|
+
* this workspace's, and take its files lock and archive.
|
|
10
14
|
*/
|
|
11
15
|
export declare function globIndexedFiles(workspaceRoot: string, globs: string[]): Promise<string[]>;
|
|
12
16
|
/**
|
|
@@ -16,4 +20,13 @@ export declare function globIndexedFiles(workspaceRoot: string, globs: string[])
|
|
|
16
20
|
* runs on the files as they are asks here; what describes a graph asks {@link globIndexedFiles}.
|
|
17
21
|
*/
|
|
18
22
|
export declare function freshIndexedFiles(workspaceRoot: string, globs: string[]): string[];
|
|
23
|
+
/**
|
|
24
|
+
* Every file of Nx's workspace file index with Nx's content hash of it, workspace-relative: the hashes Nx's task
|
|
25
|
+
* hasher keys every fileset on, kept current by its watcher, so a caller can tell an unchanged file without reading
|
|
26
|
+
* it. The daemon serves its own workspace; any other root, such as a test fixture, is read from the filesystem now
|
|
27
|
+
* ({@link freshIndexedFileData}), since the daemon's answer would be about another tree.
|
|
28
|
+
*/
|
|
29
|
+
export declare function indexedFileData(workspaceRoot: string): Promise<FileData[]>;
|
|
30
|
+
/** Like {@link indexedFileData}, read from the filesystem now, as {@link freshIndexedFiles} lists it. */
|
|
31
|
+
export declare function freshIndexedFileData(workspaceRoot: string): FileData[];
|
|
19
32
|
//# sourceMappingURL=workspace-index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-index.d.ts","sourceRoot":"","sources":["../src/workspace-index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workspace-index.d.ts","sourceRoot":"","sources":["../src/workspace-index.ts"],"names":[],"mappings":"AACA,OAAe,EAAE,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAK/D;;;;;;;;;;;;GAYG;AACH,wBAAsB,gBAAgB,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAIhG;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAElF;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAIhF;AAED,yGAAyG;AACzG,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,MAAM,GAAG,QAAQ,EAAE,CAEtE"}
|
package/dist/workspace-index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { join } from 'node:path';
|
|
1
2
|
import native from 'nx/src/native/index.js';
|
|
2
3
|
import { workspaceDataDirectoryForWorkspace } from 'nx/src/utils/cache-directory.js';
|
|
3
|
-
import {
|
|
4
|
+
import { getAllFileDataInContext, globWithWorkspaceContext } from 'nx/src/utils/workspace-context.js';
|
|
4
5
|
import { workspaceRoot as daemonWorkspaceRoot } from 'nx/src/utils/workspace-root.js';
|
|
5
6
|
/**
|
|
6
7
|
* The files of Nx's workspace file index that match `globs`, workspace-relative:
|
|
@@ -10,12 +11,15 @@ import { workspaceRoot as daemonWorkspaceRoot } from 'nx/src/utils/workspace-roo
|
|
|
10
11
|
* output happens to be on disk.
|
|
11
12
|
*
|
|
12
13
|
* The daemon serves only its own workspace's index. Any other root, such as a
|
|
13
|
-
* test fixture or a foreign checkout, is
|
|
14
|
+
* test fixture or a foreign checkout, is read from the filesystem now
|
|
15
|
+
* ({@link freshIndexedFiles}), under that root's own data directory: Nx's
|
|
16
|
+
* process context for it would resolve the inherited NX_WORKSPACE_DATA_DIRECTORY,
|
|
17
|
+
* this workspace's, and take its files lock and archive.
|
|
14
18
|
*/
|
|
15
19
|
export async function globIndexedFiles(workspaceRoot, globs) {
|
|
16
20
|
return workspaceRoot === daemonWorkspaceRoot
|
|
17
21
|
? globWithWorkspaceContext(workspaceRoot, globs)
|
|
18
|
-
:
|
|
22
|
+
: freshIndexedFiles(workspaceRoot, globs);
|
|
19
23
|
}
|
|
20
24
|
/**
|
|
21
25
|
* Like {@link globIndexedFiles}, read from the filesystem now: a new native context, the same walk and the same ignore
|
|
@@ -24,5 +28,33 @@ export async function globIndexedFiles(workspaceRoot, globs) {
|
|
|
24
28
|
* runs on the files as they are asks here; what describes a graph asks {@link globIndexedFiles}.
|
|
25
29
|
*/
|
|
26
30
|
export function freshIndexedFiles(workspaceRoot, globs) {
|
|
27
|
-
return new native.WorkspaceContext(workspaceRoot,
|
|
31
|
+
return new native.WorkspaceContext(workspaceRoot, indexDataDirectory(workspaceRoot)).glob(globs);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Every file of Nx's workspace file index with Nx's content hash of it, workspace-relative: the hashes Nx's task
|
|
35
|
+
* hasher keys every fileset on, kept current by its watcher, so a caller can tell an unchanged file without reading
|
|
36
|
+
* it. The daemon serves its own workspace; any other root, such as a test fixture, is read from the filesystem now
|
|
37
|
+
* ({@link freshIndexedFileData}), since the daemon's answer would be about another tree.
|
|
38
|
+
*/
|
|
39
|
+
export async function indexedFileData(workspaceRoot) {
|
|
40
|
+
return workspaceRoot === daemonWorkspaceRoot
|
|
41
|
+
? getAllFileDataInContext(workspaceRoot)
|
|
42
|
+
: freshIndexedFileData(workspaceRoot);
|
|
43
|
+
}
|
|
44
|
+
/** Like {@link indexedFileData}, read from the filesystem now, as {@link freshIndexedFiles} lists it. */
|
|
45
|
+
export function freshIndexedFileData(workspaceRoot) {
|
|
46
|
+
return new native.WorkspaceContext(workspaceRoot, indexDataDirectory(workspaceRoot)).allFileData();
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Where a fresh native context of `workspaceRoot` keeps its files lock and archive. Nx's
|
|
50
|
+
* `workspaceDataDirectoryForWorkspace` answers `NX_WORKSPACE_DATA_DIRECTORY` for every root, and that variable names
|
|
51
|
+
* this process's workspace's data (CI points it at a shared directory outside the checkout). A walk of another root
|
|
52
|
+
* there takes this workspace's files lock, and when another process holds it, loads the archive that process writes,
|
|
53
|
+
* this workspace's files, as the other root's (CI's Lint, run 42738719423: the compiled-in fixtures found no crate).
|
|
54
|
+
* Any other root walks under Nx's default for it, inside itself.
|
|
55
|
+
*/
|
|
56
|
+
function indexDataDirectory(workspaceRoot) {
|
|
57
|
+
return workspaceRoot === daemonWorkspaceRoot
|
|
58
|
+
? workspaceDataDirectoryForWorkspace(workspaceRoot)
|
|
59
|
+
: join(workspaceRoot, '.nx', 'workspace-data');
|
|
28
60
|
}
|