@smoothbricks/nx-plugin 0.4.28 → 0.4.30
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 +277 -89
- package/dist/bin/smoo-nx-test-clocks.d.ts +3 -0
- package/dist/bin/smoo-nx-test-clocks.d.ts.map +1 -0
- package/dist/bin/smoo-nx-test-clocks.js +28 -0
- package/dist/bounded-test-policy.d.ts +8 -8
- package/dist/bounded-test-policy.d.ts.map +1 -1
- package/dist/bounded-test-policy.js +18 -30
- package/dist/cargo-closure-input.d.ts +23 -0
- package/dist/cargo-closure-input.d.ts.map +1 -1
- package/dist/cargo-closure-input.js +41 -9
- package/dist/cargo-source-hash.d.ts.map +1 -1
- package/dist/cargo-source-hash.js +42 -19
- package/dist/ensure-built-receipt.d.ts +40 -6
- package/dist/ensure-built-receipt.d.ts.map +1 -1
- package/dist/ensure-built-receipt.js +297 -159
- package/dist/ensure-built-witness.d.ts +65 -4
- package/dist/ensure-built-witness.d.ts.map +1 -1
- package/dist/ensure-built-witness.js +2237 -23
- package/dist/ensure-built.d.ts +99 -1
- package/dist/ensure-built.d.ts.map +1 -1
- package/dist/ensure-built.js +45 -56
- package/dist/executors/bounded-exec/cpu-pool.d.ts +22 -7
- package/dist/executors/bounded-exec/cpu-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/cpu-pool.js +51 -22
- package/dist/executors/bounded-exec/executor.d.ts +12 -3
- package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
- package/dist/executors/bounded-exec/executor.js +174 -51
- package/dist/executors/bounded-exec/no-space.d.ts +8 -0
- package/dist/executors/bounded-exec/no-space.d.ts.map +1 -0
- package/dist/executors/bounded-exec/no-space.js +31 -0
- package/dist/executors/bounded-exec/ram-temp.d.ts +20 -11
- package/dist/executors/bounded-exec/ram-temp.d.ts.map +1 -1
- package/dist/executors/bounded-exec/ram-temp.js +42 -17
- package/dist/executors/bounded-exec/verdict.d.ts +34 -4
- package/dist/executors/bounded-exec/verdict.d.ts.map +1 -1
- package/dist/executors/bounded-exec/verdict.js +54 -3
- package/dist/generators/bun-test-tracing/generator.js +2 -2
- package/dist/graph-input-contract.d.ts +102 -0
- package/dist/graph-input-contract.d.ts.map +1 -0
- package/dist/graph-input-contract.js +637 -0
- package/dist/index.d.ts +12 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -3
- package/dist/managed-files/ci-workflow.d.ts.map +1 -1
- package/dist/managed-files/ci-workflow.js +5 -2
- package/dist/managed-files/publish-workflow.d.ts +11 -1
- package/dist/managed-files/publish-workflow.d.ts.map +1 -1
- package/dist/owned-installation.d.ts +14 -0
- package/dist/owned-installation.d.ts.map +1 -0
- package/dist/owned-installation.js +324 -0
- package/dist/producer-receipts.d.ts +19 -0
- package/dist/producer-receipts.d.ts.map +1 -0
- package/dist/producer-receipts.js +926 -0
- package/dist/test-backstop.d.ts +9 -0
- package/dist/test-backstop.d.ts.map +1 -0
- package/dist/test-backstop.js +10 -0
- package/dist/test-clock-policy.d.ts +30 -0
- package/dist/test-clock-policy.d.ts.map +1 -0
- package/dist/test-clock-policy.js +686 -0
- package/dist/testing.d.ts +8 -0
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +66 -1
- package/managed/raw/patches/nx@23.2.1.patch +328 -50
- package/managed/raw/tooling/direnv/developer-links.ts +148 -29
- package/managed/raw/tooling/direnv/devenv.smoo.nix +7 -7
- package/managed/raw/tooling/direnv/github-actions-bootstrap.sh +14 -5
- package/managed/raw/tooling/direnv/linked-snapshots.ts +206 -40
- package/managed/raw/tooling/direnv/repo-path +15 -2
- package/managed/raw/tooling/direnv/setup-environment.ts +179 -115
- package/managed/templates/github/actions/cache-node-modules/action.yml +9 -0
- package/managed/templates/github/actions/setup-devenv/action.yml +63 -7
- package/nextest.toml +1 -1
- package/package.json +25 -9
- package/src/__tests__/cargo-closure-fixture.ts +113 -0
- package/src/__tests__/counted-cargo.ts +8 -25
- package/src/__tests__/directory-change.ts +27 -0
- package/src/__tests__/fixture-nx-env.ts +7 -0
- package/src/__tests__/owned-installation.ts +14 -0
- package/src/__tests__/past-tick.ts +12 -0
- package/src/bin/smoo-nx-bound-failures.test.ts +1 -1
- package/src/bin/smoo-nx-test-clocks.ts +29 -0
- package/src/bounded-test-policy.test.ts +36 -22
- package/src/bounded-test-policy.ts +18 -32
- package/src/bun-bootstrap.test.ts +1 -1
- package/src/cargo-closure-input.property.test.ts +50 -0
- package/src/cargo-closure-input.test.ts +73 -121
- package/src/cargo-closure-input.ts +47 -8
- package/src/cargo-closure-key.test.ts +239 -0
- package/src/cargo-resolve-cache.test.ts +168 -31
- package/src/cargo-source-hash.test.ts +78 -3
- package/src/cargo-source-hash.ts +48 -30
- package/src/cross-check-policy.test.ts +2 -2
- package/src/ensure-built-receipt.test.ts +111 -16
- package/src/ensure-built-receipt.ts +294 -149
- package/src/ensure-built-witness.test.ts +306 -13
- package/src/ensure-built-witness.ts +255 -24
- package/src/ensure-built.test.ts +228 -102
- package/src/ensure-built.ts +127 -66
- package/src/executors/bounded-exec/cpu-pool.test.ts +134 -32
- package/src/executors/bounded-exec/cpu-pool.ts +64 -20
- package/src/executors/bounded-exec/cpu-tokens.test.ts +2 -2
- package/src/executors/bounded-exec/disk-lease.test.ts +47 -13
- package/src/executors/bounded-exec/executor-host.test.ts +74 -52
- package/src/executors/bounded-exec/executor.test.ts +343 -97
- package/src/executors/bounded-exec/executor.ts +192 -56
- package/src/executors/bounded-exec/hang-diagnostics.test.ts +14 -8
- package/src/executors/bounded-exec/no-space.ts +40 -0
- package/src/executors/bounded-exec/progress.test.ts +1 -1
- package/src/executors/bounded-exec/ram-temp-host.test.ts +51 -21
- package/src/executors/bounded-exec/ram-temp.test.ts +92 -16
- package/src/executors/bounded-exec/ram-temp.ts +49 -20
- package/src/executors/bounded-exec/verdict.test.ts +127 -22
- package/src/executors/bounded-exec/verdict.ts +78 -3
- package/src/generators/bounded-test-targets/generator.test.ts +1 -3
- package/src/generators/bun-test-tracing/generator.test.ts +2 -2
- package/src/generators/bun-test-tracing/generator.ts +2 -2
- package/src/graph-input-contract.test.ts +379 -0
- package/src/graph-input-contract.ts +627 -0
- package/src/index.test.ts +3 -3
- package/src/index.ts +24 -3
- package/src/linked-snapshots.nx.test.ts +112 -30
- package/src/managed-files/ci-workflow.ts +5 -2
- package/src/managed-files/publish-workflow.ts +12 -1
- package/src/managed-files/repo-path.test.ts +44 -1
- package/src/managed-files/setup-devenv-free-disk.test.ts +95 -0
- package/src/nextest-code-bound.test.ts +23 -17
- package/src/nextest-extraction.test.ts +114 -4
- package/src/nextest-partitions.test.ts +7 -1
- package/src/nx-cache-restore-mtime.test.ts +2 -2
- package/src/nx-daemon-claim.test.ts +10 -8
- package/src/nx-daemon-idle-cpu.test.ts +0 -1
- package/src/nx-daemon-idle-policy.test.ts +61 -1
- package/src/nx-daemon-ignore-files.test.ts +2 -2
- package/src/nx-daemon-validity.test.ts +36 -22
- package/src/nx-dot-input-policy.test.ts +5 -5
- package/src/nx-files-archive-racy.test.ts +1 -1
- package/src/nx-incomplete-run-summary.test.ts +1 -1
- package/src/nx-plugin-load-errors.test.ts +2 -2
- package/src/nx-project-graph-errors.test.ts +70 -0
- package/src/nx-skipped-task-exit.test.ts +2 -2
- package/src/nx-store-resolution.test.ts +7 -25
- package/src/nx-task-output-lease.test.ts +3 -3
- package/src/nx-use-local.test.ts +7 -5
- package/src/owned-installation.ts +174 -0
- package/src/producer-receipts.test.ts +164 -0
- package/src/producer-receipts.ts +636 -0
- package/src/runtime-input.test.ts +1 -1
- package/src/serial-group-wiring.test.ts +4 -4
- package/src/task-results.test.ts +18 -16
- package/src/test-backstop.ts +11 -0
- package/src/test-clock-policy.test.ts +338 -0
- package/src/test-clock-policy.ts +708 -0
- package/src/test-timings.test.ts +2 -2
- package/src/testing.test.ts +5 -5
- package/src/testing.ts +67 -1
- package/src/typecheck-test-policy.test.ts +1 -1
- package/src/typescript-resolution.test.ts +76 -0
- package/test-timings.json +8 -0
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { spawnSync } from 'node:child_process';
|
|
2
2
|
import { createHash } from 'node:crypto';
|
|
3
|
-
import { closeSync, lstatSync, openSync, readdirSync, readlinkSync, readSync, realpathSync } from 'node:fs';
|
|
3
|
+
import { closeSync, lstatSync, openSync, readdirSync, readFileSync, readlinkSync, readSync, realpathSync, } from 'node:fs';
|
|
4
4
|
import { isAbsolute, join, relative } from 'node:path';
|
|
5
5
|
import { CARGO_TOOLCHAIN_PIN_INPUTS, cargoRuntimeInput } from './cargo-toolchain-policy.js';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
import { censusStart, movedNodes, recordedStamp } from './ensure-built-witness.js';
|
|
7
|
+
/**
|
|
8
|
+
* Git as receipts read it: the checkout and nothing of the operator's home. The producer hooks run in whichever process
|
|
9
|
+
* Nx runs plugins in, a workspace's sandboxed daemon included, which adopts a host client's HOME; git with that HOME
|
|
10
|
+
* reads the operator's global configuration, the sandbox denies it, and git dies (specs/cowshed/04_sandbox.md, the
|
|
11
|
+
* runtime-input contract). A receipt's tree, HEAD and tracked-file status are read under the repository's own
|
|
12
|
+
* configuration alone, so a host run and a sandboxed run agree on them.
|
|
13
|
+
*/
|
|
14
|
+
export function receiptGit(root, args) {
|
|
15
|
+
const env = { ...process.env, GIT_CONFIG_GLOBAL: '/dev/null', GIT_CONFIG_NOSYSTEM: '1' };
|
|
12
16
|
for (const key of [
|
|
13
17
|
'GIT_DIR',
|
|
14
18
|
'GIT_COMMON_DIR',
|
|
@@ -27,7 +31,7 @@ function git(root, args) {
|
|
|
27
31
|
detail: `git ${args.join(' ')}: ${child.error?.message ?? child.stderr.trim()} (exit ${child.status}, signal ${child.signal})`,
|
|
28
32
|
};
|
|
29
33
|
}
|
|
30
|
-
/** NUL-delimited
|
|
34
|
+
/** NUL-delimited paths preserve whitespace, rename sources and index-only changes. */
|
|
31
35
|
export function dirtyProviderPaths(status) {
|
|
32
36
|
const entries = status.split('\0');
|
|
33
37
|
const paths = [];
|
|
@@ -44,8 +48,230 @@ export function dirtyProviderPaths(status) {
|
|
|
44
48
|
}
|
|
45
49
|
return paths;
|
|
46
50
|
}
|
|
47
|
-
|
|
48
|
-
const
|
|
51
|
+
function graphConfiguration(path) {
|
|
52
|
+
const name = path.slice(path.lastIndexOf('/') + 1);
|
|
53
|
+
return [
|
|
54
|
+
'nx.json',
|
|
55
|
+
'project.json',
|
|
56
|
+
'package.json',
|
|
57
|
+
'bun.lock',
|
|
58
|
+
'bun.lockb',
|
|
59
|
+
'package-lock.json',
|
|
60
|
+
'pnpm-lock.yaml',
|
|
61
|
+
'yarn.lock',
|
|
62
|
+
].includes(name);
|
|
63
|
+
}
|
|
64
|
+
let readBuffer;
|
|
65
|
+
function fileReadBuffer() {
|
|
66
|
+
if (readBuffer === undefined)
|
|
67
|
+
readBuffer = Buffer.allocUnsafe(1 << 20);
|
|
68
|
+
return readBuffer;
|
|
69
|
+
}
|
|
70
|
+
function hashFile(path, size, algorithms, blob) {
|
|
71
|
+
const hashes = algorithms.map((algorithm) => createHash(algorithm));
|
|
72
|
+
if (blob)
|
|
73
|
+
for (const hash of hashes)
|
|
74
|
+
hash.update(`blob ${size}\0`);
|
|
75
|
+
const buffer = fileReadBuffer();
|
|
76
|
+
const descriptor = openSync(path, 'r');
|
|
77
|
+
try {
|
|
78
|
+
for (let offset = 0; offset < size; offset += buffer.length) {
|
|
79
|
+
const length = Math.min(buffer.length, size - offset);
|
|
80
|
+
if (readSync(descriptor, buffer, 0, length, offset) !== length)
|
|
81
|
+
throw new Error(`File moved while reading ${path}`);
|
|
82
|
+
for (const hash of hashes)
|
|
83
|
+
hash.update(buffer.subarray(0, length));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
finally {
|
|
87
|
+
closeSync(descriptor);
|
|
88
|
+
}
|
|
89
|
+
return hashes.map((hash) => hash.digest('hex'));
|
|
90
|
+
}
|
|
91
|
+
function sourceFileDigests(path, size, algorithm) {
|
|
92
|
+
const blob = createHash(algorithm).update(`blob ${size}\0`);
|
|
93
|
+
const raw = createHash('sha256');
|
|
94
|
+
const buffer = fileReadBuffer();
|
|
95
|
+
const descriptor = openSync(path, 'r');
|
|
96
|
+
try {
|
|
97
|
+
for (let offset = 0; offset < size; offset += buffer.length) {
|
|
98
|
+
const length = Math.min(buffer.length, size - offset);
|
|
99
|
+
if (readSync(descriptor, buffer, 0, length, offset) !== length)
|
|
100
|
+
throw new Error(`Source moved while reading ${path}`);
|
|
101
|
+
const bytes = buffer.subarray(0, length);
|
|
102
|
+
blob.update(bytes);
|
|
103
|
+
raw.update(bytes);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
finally {
|
|
107
|
+
closeSync(descriptor);
|
|
108
|
+
}
|
|
109
|
+
return { gitBlob: blob.digest('hex'), sha256: raw.digest('hex') };
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* One independently read node; absolute paths also serve tool/package closures. A census records the node's stamp as
|
|
113
|
+
* of its `start` (recordedStamp); a re-read against a record records none.
|
|
114
|
+
*/
|
|
115
|
+
export function receiptNode(path, name, census) {
|
|
116
|
+
const stats = lstatSync(path, { bigint: true });
|
|
117
|
+
census?.observed.push({ path, stamp: recordedStamp(stats, census.start) });
|
|
118
|
+
const mode = Number(stats.mode & 4095n);
|
|
119
|
+
if (stats.isFile())
|
|
120
|
+
return { path: name, type: 'file', mode, sha256: hashFile(path, Number(stats.size), ['sha256'], false)[0] };
|
|
121
|
+
if (stats.isSymbolicLink())
|
|
122
|
+
return { path: name, type: 'symlink', mode, linkText: readlinkSync(path) };
|
|
123
|
+
if (stats.isDirectory()) {
|
|
124
|
+
const entries = readdirSync(path).sort();
|
|
125
|
+
return {
|
|
126
|
+
path: name,
|
|
127
|
+
type: 'directory',
|
|
128
|
+
mode,
|
|
129
|
+
entries,
|
|
130
|
+
sha256: createHash('sha256').update(JSON.stringify(entries)).digest('hex'),
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
throw new Error(`Unsupported receipt node ${path}`);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Whether a tracked source node whose stamp does not prove it (its ctime alone moved, or it was read in the tick it
|
|
137
|
+
* changed in) still holds the bytes or link text `files` recorded for it.
|
|
138
|
+
*/
|
|
139
|
+
function recordedSource(root, files) {
|
|
140
|
+
const recorded = new Map(files.map((file) => [join(root, file.path), file.sha256]));
|
|
141
|
+
return (path) => recorded.get(path) ===
|
|
142
|
+
createHash('sha256')
|
|
143
|
+
.update(lstatSync(path).isSymbolicLink() ? readlinkSync(path) : readFileSync(path))
|
|
144
|
+
.digest('hex');
|
|
145
|
+
}
|
|
146
|
+
/** Capture every tracked source byte at pre. Unrelated untracked files are not source basis. */
|
|
147
|
+
export function captureProducerSource(root, outputs) {
|
|
148
|
+
try {
|
|
149
|
+
const revision = receiptGit(root, ['rev-parse', '--verify', 'HEAD']);
|
|
150
|
+
if (!revision.ok)
|
|
151
|
+
return revision;
|
|
152
|
+
const head = revision.value.trim();
|
|
153
|
+
const tree = receiptGit(root, ['rev-parse', '--verify', `${head}^{tree}`]);
|
|
154
|
+
if (!tree.ok)
|
|
155
|
+
return tree;
|
|
156
|
+
const listed = receiptGit(root, ['ls-tree', '-r', '-z', '--full-tree', head]);
|
|
157
|
+
if (!listed.ok)
|
|
158
|
+
return listed;
|
|
159
|
+
const format = receiptGit(root, ['rev-parse', '--show-object-format']);
|
|
160
|
+
if (!format.ok)
|
|
161
|
+
return format;
|
|
162
|
+
const algorithm = format.value.trim();
|
|
163
|
+
if (algorithm !== 'sha1' && algorithm !== 'sha256')
|
|
164
|
+
return { ok: false, detail: `Unproved Git object format ${algorithm}` };
|
|
165
|
+
const excluded = new Set(outputs.filter((path) => !graphConfiguration(path)));
|
|
166
|
+
const nodes = [];
|
|
167
|
+
const files = [];
|
|
168
|
+
const start = censusStart();
|
|
169
|
+
for (const entry of listed.value.split('\0')) {
|
|
170
|
+
if (entry === '')
|
|
171
|
+
continue;
|
|
172
|
+
const tab = entry.indexOf('\t');
|
|
173
|
+
const [mode, kind, oid] = entry.slice(0, tab).split(' ');
|
|
174
|
+
if (tab < 0 || oid === undefined || mode === undefined)
|
|
175
|
+
return { ok: false, detail: `Unproved HEAD tree entry ${entry}` };
|
|
176
|
+
if (kind !== 'blob')
|
|
177
|
+
return { ok: false, detail: `Unbound tracked source namespace ${entry}` };
|
|
178
|
+
const file = entry.slice(tab + 1);
|
|
179
|
+
if (excluded.has(file))
|
|
180
|
+
continue;
|
|
181
|
+
const path = join(root, file);
|
|
182
|
+
const stats = lstatSync(path, { bigint: true });
|
|
183
|
+
nodes.push({ path, stamp: recordedStamp(stats, start) });
|
|
184
|
+
const actualMode = stats.isSymbolicLink() ? '120000' : (stats.mode & 73n) !== 0n ? '100755' : '100644';
|
|
185
|
+
if (actualMode !== mode)
|
|
186
|
+
return { ok: false, detail: `Tracked source mode differs from HEAD: ${file}` };
|
|
187
|
+
let gitBlob;
|
|
188
|
+
let sha256;
|
|
189
|
+
if (stats.isFile()) {
|
|
190
|
+
const digests = sourceFileDigests(path, Number(stats.size), algorithm);
|
|
191
|
+
gitBlob = digests.gitBlob;
|
|
192
|
+
sha256 = digests.sha256;
|
|
193
|
+
}
|
|
194
|
+
else if (stats.isSymbolicLink()) {
|
|
195
|
+
const text = readlinkSync(path);
|
|
196
|
+
gitBlob = createHash(algorithm)
|
|
197
|
+
.update(`blob ${Buffer.byteLength(text)}\0`)
|
|
198
|
+
.update(text)
|
|
199
|
+
.digest('hex');
|
|
200
|
+
sha256 = createHash('sha256').update(text).digest('hex');
|
|
201
|
+
}
|
|
202
|
+
else
|
|
203
|
+
return { ok: false, detail: `Unbound tracked source node: ${file}` };
|
|
204
|
+
if (gitBlob !== oid)
|
|
205
|
+
return { ok: false, detail: `Tracked source bytes differ from HEAD: ${file}` };
|
|
206
|
+
files.push({ path: file, mode: Number(stats.mode & 4095n), gitBlob, sha256 });
|
|
207
|
+
}
|
|
208
|
+
const status = receiptGit(root, ['status', '--porcelain=v1', '-z', '--untracked-files=no']);
|
|
209
|
+
if (!status.ok)
|
|
210
|
+
return status;
|
|
211
|
+
const dirty = dirtyProviderPaths(status.value).filter((path) => !excluded.has(path));
|
|
212
|
+
if (dirty.length !== 0)
|
|
213
|
+
return { ok: false, detail: `Tracked source/index differs from ${head}: ${dirty.join(', ')}` };
|
|
214
|
+
const moved = movedNodes(nodes, recordedSource(root, files));
|
|
215
|
+
if (moved !== null)
|
|
216
|
+
return { ok: false, detail: `Tracked source moved during producer pre capture: ${moved}` };
|
|
217
|
+
return { ok: true, value: { head, headTree: tree.value.trim(), files, nodes, outputs } };
|
|
218
|
+
}
|
|
219
|
+
catch (error) {
|
|
220
|
+
if (error instanceof Error)
|
|
221
|
+
return { ok: false, detail: `Cannot prove tracked producer tree: ${error.message}` };
|
|
222
|
+
throw error;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
export function producerSourceUnchanged(root, before) {
|
|
226
|
+
const revision = receiptGit(root, ['rev-parse', '--verify', 'HEAD']);
|
|
227
|
+
if (!revision.ok)
|
|
228
|
+
return revision;
|
|
229
|
+
const status = receiptGit(root, ['status', '--porcelain=v1', '-z', '--untracked-files=no']);
|
|
230
|
+
if (!status.ok)
|
|
231
|
+
return status;
|
|
232
|
+
const outputs = new Set(before.outputs.filter((path) => !graphConfiguration(path)));
|
|
233
|
+
const tree = receiptGit(root, ['rev-parse', '--verify', `${revision.value.trim()}^{tree}`]);
|
|
234
|
+
if (!tree.ok)
|
|
235
|
+
return tree;
|
|
236
|
+
const changed = 'Producer HEAD/tracked source nodes changed across actual task execution';
|
|
237
|
+
if (tree.value.trim() !== before.headTree)
|
|
238
|
+
return { ok: false, detail: `${changed}: HEAD's tree is ${tree.value.trim()}, not ${before.headTree}` };
|
|
239
|
+
const dirty = dirtyProviderPaths(status.value).filter((path) => !outputs.has(path));
|
|
240
|
+
if (dirty.length !== 0)
|
|
241
|
+
return { ok: false, detail: `${changed}: ${dirty.join(', ')} differ from HEAD` };
|
|
242
|
+
const moved = movedNodes(before.nodes, recordedSource(root, before.files));
|
|
243
|
+
if (moved !== null)
|
|
244
|
+
return { ok: false, detail: `${changed}: ${moved}` };
|
|
245
|
+
return { ok: true, value: true };
|
|
246
|
+
}
|
|
247
|
+
/** Enumerate exact public nodes; never exempt a broad directory of tracked source. */
|
|
248
|
+
export function producerOutputPaths(root, tasks, expand) {
|
|
249
|
+
const paths = new Set();
|
|
250
|
+
function visit(path) {
|
|
251
|
+
if (isAbsolute(path) || path.split('/').includes('..'))
|
|
252
|
+
throw new Error(`Output escapes provider: ${path}`);
|
|
253
|
+
if (paths.has(path))
|
|
254
|
+
return;
|
|
255
|
+
paths.add(path);
|
|
256
|
+
let stats;
|
|
257
|
+
try {
|
|
258
|
+
stats = lstatSync(join(root, path));
|
|
259
|
+
}
|
|
260
|
+
catch (error) {
|
|
261
|
+
if (error instanceof Error && 'code' in error && error.code === 'ENOENT')
|
|
262
|
+
return;
|
|
263
|
+
throw error;
|
|
264
|
+
}
|
|
265
|
+
if (stats.isDirectory())
|
|
266
|
+
for (const name of readdirSync(join(root, path)))
|
|
267
|
+
visit(join(path, name));
|
|
268
|
+
}
|
|
269
|
+
for (const task of tasks)
|
|
270
|
+
for (const path of expand(root, task.outputs))
|
|
271
|
+
visit(path);
|
|
272
|
+
return [...paths].sort();
|
|
273
|
+
}
|
|
274
|
+
export function providerReceipt(root, taskId, tasks, proof, expand, source, producer) {
|
|
49
275
|
const failed = (detail) => ({
|
|
50
276
|
disposition: 'failed',
|
|
51
277
|
reason: { kind: 'provider-proof', taskId, workspaceRoot: root, detail },
|
|
@@ -54,191 +280,103 @@ export function providerReceipt(workspaceRoot, taskId, tasks, proof, expand) {
|
|
|
54
280
|
});
|
|
55
281
|
if (proof.runtimeSource.kind === 'opaque')
|
|
56
282
|
return failed(proof.runtimeSource.detail);
|
|
57
|
-
const
|
|
58
|
-
if (!
|
|
59
|
-
return failed(
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const listed = git(root, ['ls-tree', '-r', '-z', '--full-tree', head]);
|
|
68
|
-
if (!listed.ok)
|
|
69
|
-
return failed(listed.detail);
|
|
70
|
-
const format = git(root, ['rev-parse', '--show-object-format']);
|
|
71
|
-
if (!format.ok)
|
|
72
|
-
return failed(format.detail);
|
|
73
|
-
const algorithm = format.value.trim();
|
|
74
|
-
if (algorithm !== 'sha1' && algorithm !== 'sha256')
|
|
75
|
-
return failed(`Unproved Git object format ${algorithm}`);
|
|
76
|
-
const tracked = new Map();
|
|
77
|
-
for (const entry of listed.value.split('\0')) {
|
|
78
|
-
if (entry === '')
|
|
79
|
-
continue;
|
|
80
|
-
const tab = entry.indexOf('\t');
|
|
81
|
-
const [mode, kind, oid] = entry.slice(0, tab).split(' ');
|
|
82
|
-
if (tab < 0 || oid === undefined)
|
|
83
|
-
return failed(`Unproved HEAD tree entry ${entry}`);
|
|
84
|
-
if (kind !== 'blob')
|
|
85
|
-
continue;
|
|
86
|
-
tracked.set(entry.slice(tab + 1), { mode, oid });
|
|
283
|
+
const stable = producerSourceUnchanged(root, source);
|
|
284
|
+
if (!stable.ok)
|
|
285
|
+
return failed(stable.detail);
|
|
286
|
+
const sourceFiles = new Map(source.files.map((file) => [file.path, file]));
|
|
287
|
+
for (const file of proof.files) {
|
|
288
|
+
const record = sourceFiles.get(file);
|
|
289
|
+
if (record === undefined)
|
|
290
|
+
return failed(`Actual Nx FILE input is not bound to provider HEAD: ${file}`);
|
|
291
|
+
if (!lstatSync(join(root, file)).isFile())
|
|
292
|
+
return failed(`Unbound linked/non-file Nx source: ${file}`);
|
|
87
293
|
}
|
|
88
294
|
const observed = [];
|
|
89
|
-
const
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
const stats = lstatSync(path, { bigint: true });
|
|
93
|
-
observed.push({ path, stamp: nodeStamp(stats) });
|
|
94
|
-
return stats;
|
|
95
|
-
}
|
|
96
|
-
function fileDigest(path, size, algorithm, gitBlob) {
|
|
97
|
-
const hash = createHash(algorithm);
|
|
98
|
-
if (gitBlob)
|
|
99
|
-
hash.update(`blob ${size}\0`);
|
|
100
|
-
const fd = openSync(path, 'r');
|
|
101
|
-
try {
|
|
102
|
-
for (let offset = 0; offset < size; offset += buffer.length) {
|
|
103
|
-
const count = Math.min(buffer.length, size - offset);
|
|
104
|
-
if (readSync(fd, buffer, 0, count, offset) !== count)
|
|
105
|
-
throw new Error(`File moved while reading ${path}`);
|
|
106
|
-
hash.update(buffer.subarray(0, count));
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
finally {
|
|
110
|
-
closeSync(fd);
|
|
111
|
-
}
|
|
112
|
-
return hash.digest('hex');
|
|
113
|
-
}
|
|
295
|
+
const census = { start: censusStart(), observed };
|
|
296
|
+
const parents = new Set();
|
|
297
|
+
const outputs = new Map();
|
|
114
298
|
function visit(path) {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
if (
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
if (stats.isFile()) {
|
|
125
|
-
node = { path: rel, type: 'file', mode, sha256: fileDigest(path, Number(stats.size), 'sha256', false) };
|
|
126
|
-
}
|
|
127
|
-
else if (stats.isSymbolicLink()) {
|
|
128
|
-
node = { path: rel, type: 'symlink', mode, linkText: readlinkSync(path) };
|
|
129
|
-
}
|
|
130
|
-
else if (stats.isDirectory()) {
|
|
131
|
-
const children = readdirSync(path)
|
|
132
|
-
.sort()
|
|
133
|
-
.map((name) => visit(join(path, name)));
|
|
134
|
-
const entries = children.map(({ path: child }) => relative(rel, child));
|
|
135
|
-
node = {
|
|
136
|
-
path: rel,
|
|
137
|
-
type: 'directory',
|
|
138
|
-
mode,
|
|
139
|
-
entries,
|
|
140
|
-
sha256: createHash('sha256').update(JSON.stringify(children)).digest('hex'),
|
|
141
|
-
};
|
|
299
|
+
if (outputs.has(path))
|
|
300
|
+
return;
|
|
301
|
+
const absolute = join(root, path);
|
|
302
|
+
let node = receiptNode(absolute, path, census);
|
|
303
|
+
if (node.type === 'directory') {
|
|
304
|
+
for (const entry of node.entries)
|
|
305
|
+
visit(join(path, entry));
|
|
306
|
+
const children = node.entries.map((entry) => outputs.get(join(path, entry)));
|
|
307
|
+
node = { ...node, sha256: createHash('sha256').update(JSON.stringify(children)).digest('hex') };
|
|
142
308
|
}
|
|
143
|
-
|
|
144
|
-
throw new Error(`Unsupported public output node ${path}`);
|
|
145
|
-
}
|
|
146
|
-
outputNodes.set(rel, node);
|
|
147
|
-
return node;
|
|
309
|
+
outputs.set(path, node);
|
|
148
310
|
}
|
|
149
311
|
try {
|
|
150
312
|
const receipts = [];
|
|
151
313
|
for (const task of tasks) {
|
|
152
314
|
if (task.hash === undefined)
|
|
153
|
-
return failed(`
|
|
315
|
+
return failed(`Actual completion supplied no hash for ${task.id}`);
|
|
154
316
|
const entries = task.outputs.length === 0 ? [] : expand(root, task.outputs);
|
|
155
|
-
if (task.outputs.length
|
|
317
|
+
if (task.outputs.length !== 0 && entries.length === 0)
|
|
156
318
|
return failed(`No public outputs for ${task.id}`);
|
|
157
|
-
const selected = new Set();
|
|
158
319
|
for (const entry of entries) {
|
|
159
320
|
if (isAbsolute(entry) || entry.split('/').includes('..'))
|
|
160
|
-
return failed(`
|
|
161
|
-
// Root-to-entry parent directories must be real; do not follow a
|
|
162
|
-
// parent link into an unrelated tree and sign its bytes.
|
|
321
|
+
return failed(`Output escapes provider: ${entry}`);
|
|
163
322
|
let parent = root;
|
|
164
323
|
for (const segment of entry.split('/').slice(0, -1)) {
|
|
165
324
|
parent = join(parent, segment);
|
|
166
|
-
|
|
325
|
+
const stats = lstatSync(parent, { bigint: true });
|
|
326
|
+
observed.push({ path: parent, stamp: recordedStamp(stats, census.start) });
|
|
327
|
+
parents.add(parent);
|
|
328
|
+
if (!stats.isDirectory())
|
|
167
329
|
return failed(`Symlinked public output parent ${parent}`);
|
|
168
330
|
}
|
|
169
|
-
visit(
|
|
170
|
-
for (const path of outputNodes.keys()) {
|
|
171
|
-
if (path === entry || path.startsWith(`${entry}/`))
|
|
172
|
-
selected.add(path);
|
|
173
|
-
}
|
|
331
|
+
visit(entry);
|
|
174
332
|
}
|
|
175
333
|
receipts.push({
|
|
176
334
|
id: task.id,
|
|
177
335
|
hash: task.hash,
|
|
178
|
-
outputs: [...
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
return node;
|
|
183
|
-
}),
|
|
336
|
+
outputs: [...outputs]
|
|
337
|
+
.filter(([path]) => entries.some((entry) => path === entry || path.startsWith(`${entry}/`)))
|
|
338
|
+
.sort(([left], [right]) => left.localeCompare(right))
|
|
339
|
+
.map(([, node]) => node),
|
|
184
340
|
});
|
|
185
341
|
}
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
const
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
if (!stats.isFile())
|
|
205
|
-
return failed(`Unproved linked or non-file input source closure: ${file}`);
|
|
206
|
-
const oid = fileDigest(path, Number(stats.size), algorithm, true);
|
|
207
|
-
if (oid !== expected.oid)
|
|
208
|
-
return failed(`Nx file input bytes differ from provider HEAD: ${file}`);
|
|
209
|
-
}
|
|
210
|
-
const finalHead = git(root, ['rev-parse', '--verify', 'HEAD']);
|
|
211
|
-
const finalStatus = git(root, ['status', '--porcelain=v1', '-z', '--untracked-files=all']);
|
|
212
|
-
if (!finalHead.ok)
|
|
213
|
-
return failed(finalHead.detail);
|
|
214
|
-
if (!finalStatus.ok)
|
|
215
|
-
return failed(finalStatus.detail);
|
|
216
|
-
const newlyDirty = dirtyProviderPaths(finalStatus.value).some((path) => (!outputNodes.has(path) || fileInputs.has(path)) &&
|
|
217
|
-
(effectiveKind === 'conservative-provider-source' || fileInputs.has(path)));
|
|
218
|
-
if (finalHead.value.trim() !== head || newlyDirty || !nodesUnchanged(observed)) {
|
|
219
|
-
return failed('Provider source, revision or public output nodes moved during receipt capture');
|
|
220
|
-
}
|
|
342
|
+
const final = producerSourceUnchanged(root, source);
|
|
343
|
+
if (!final.ok)
|
|
344
|
+
return failed(final.detail);
|
|
345
|
+
// An output whose stamp does not prove it (its ctime alone moved, or it was read in the tick it changed in, as a
|
|
346
|
+
// task's last writes are) is re-read against its record. A parent directory binds only the real directory the path
|
|
347
|
+
// runs through, which the device, inode and mode its kept stamp still show.
|
|
348
|
+
const moved = movedNodes(observed, (path) => {
|
|
349
|
+
const record = outputs.get(relative(root, path));
|
|
350
|
+
if (record === undefined)
|
|
351
|
+
return parents.has(path);
|
|
352
|
+
const now = receiptNode(path, record.path);
|
|
353
|
+
return record.type === 'directory' && now.type === 'directory'
|
|
354
|
+
? record.mode === now.mode && JSON.stringify(record.entries) === JSON.stringify(now.entries)
|
|
355
|
+
: JSON.stringify(record) === JSON.stringify(now);
|
|
356
|
+
});
|
|
357
|
+
if (moved !== null)
|
|
358
|
+
return failed(`Public outputs changed during independent census: ${moved}`);
|
|
359
|
+
const outputSha256 = createHash('sha256').update(JSON.stringify(receipts)).digest('hex');
|
|
221
360
|
return {
|
|
222
361
|
disposition: 'hit',
|
|
223
362
|
receipt: {
|
|
224
|
-
workspaceRoot: root,
|
|
225
|
-
head,
|
|
226
|
-
headTree:
|
|
227
|
-
|
|
228
|
-
fileInputProvenance: effectiveKind,
|
|
363
|
+
workspaceRoot: realpathSync(root),
|
|
364
|
+
head: source.head,
|
|
365
|
+
headTree: source.headTree,
|
|
366
|
+
fileInputProvenance: proof.kind,
|
|
229
367
|
runtimeEnvironmentProvenance: 'nx-task-hash-only',
|
|
368
|
+
producer: { ...producer, outputSha256 },
|
|
369
|
+
tasks: receipts,
|
|
230
370
|
},
|
|
231
371
|
};
|
|
232
372
|
}
|
|
233
373
|
catch (error) {
|
|
234
374
|
if (error instanceof Error)
|
|
235
|
-
return failed(`Cannot prove
|
|
375
|
+
return failed(`Cannot prove public product census: ${error.message}`);
|
|
236
376
|
throw error;
|
|
237
377
|
}
|
|
238
378
|
}
|
|
239
|
-
/** Admit only recipes emitted by the
|
|
240
|
-
* No shell parsing or keyword approximation confers file-source provenance.
|
|
241
|
-
*/
|
|
379
|
+
/** Admit only version recipes emitted by the owning generator and declared toolchain pins. */
|
|
242
380
|
export function boundedReceiptRuntimes(inputs, directories, files, installationProved) {
|
|
243
381
|
const runtimes = Object.values(inputs).flatMap((input) => input.runtime);
|
|
244
382
|
if (runtimes.length === 0)
|
|
@@ -1,10 +1,45 @@
|
|
|
1
1
|
import type { BigIntStats } from 'node:fs';
|
|
2
2
|
import type { NxJsonConfiguration } from 'nx/src/config/nx-json';
|
|
3
3
|
import type { ProjectGraph } from 'nx/src/config/project-graph';
|
|
4
|
-
import type { FileData, WorkspaceContext } from 'nx/src/native';
|
|
4
|
+
import type { expandOutputs, FileData, WorkspaceContext } from 'nx/src/native';
|
|
5
5
|
import type { readModulePackageJsonWithoutFallbacks } from 'nx/src/utils/package-json';
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import type { GraphInputContractProof } from './graph-input-contract.js';
|
|
7
|
+
/** The stat fields a node's identity is read from. */
|
|
8
|
+
export type StampFields = Pick<BigIntStats, 'dev' | 'ino' | 'mode' | 'size' | 'mtimeNs' | 'ctimeNs'>;
|
|
9
|
+
/** The stamp a node reads as now: device, inode, mode, size, mtime and ctime. What a recorded stamp is compared with. */
|
|
10
|
+
export declare function nodeStamp(stats: StampFields): string;
|
|
11
|
+
/**
|
|
12
|
+
* How an observed stamp compares with the recorded one: `same`; `ctime` when device, inode, mode, size and mtime are
|
|
13
|
+
* kept and only the ctime moved (a same-mode chmod, which Bun's bin linking does to a shared store file on any
|
|
14
|
+
* checkout's install) or was recorded `unproven` ({@link recordedStamp}); otherwise `moved`. A function of the two
|
|
15
|
+
* stamps alone, so no filesystem or clock decides it.
|
|
16
|
+
*/
|
|
17
|
+
export declare function stampMove(recorded: string, observed: string): 'same' | 'ctime' | 'moved';
|
|
18
|
+
/**
|
|
19
|
+
* How long after a node's last change a stamp read of it proves nothing about the next change: git's racily clean
|
|
20
|
+
* rule (git's Documentation/technical/racy-git.txt), which the Nx archive repair already applies to Nx's own file
|
|
21
|
+
* hashes (patches/README.md). A filesystem dates a change by the kernel's clock. On Linux, on a filesystem without
|
|
22
|
+
* fine-grained timestamps such as ZFS, that is the coarse clock, which moves once a jiffy: 1 ms at CONFIG_HZ=1000, as
|
|
23
|
+
* on CI's runner, and 10 ms at CONFIG_HZ=100, the slowest. A same-size rewrite in the tick a stamp was read in leaves
|
|
24
|
+
* every field of it as it was. Node can read neither the jiffy nor a filesystem's granularity, and a shorter window
|
|
25
|
+
* reopens the gap on a slower kernel, so this is the slowest tick, and no option.
|
|
26
|
+
*/
|
|
27
|
+
export declare const SAME_TICK_NS = 10000000n;
|
|
28
|
+
/** The time a census starts, read before its first stat: what {@link unproven} judges each node's change by. */
|
|
29
|
+
export declare function censusStart(): bigint;
|
|
30
|
+
/**
|
|
31
|
+
* Whether a census that started at `start` read a node within {@link SAME_TICK_NS} of its last change (the later of
|
|
32
|
+
* its ctime and mtime, so a node dated ahead counts). Its stamp is then unproven, not unchanged: a rewrite in the same
|
|
33
|
+
* tick could leave it as it is.
|
|
34
|
+
*/
|
|
35
|
+
export declare function unproven(stats: StampFields, start: bigint): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The stamp a census that started at `start` records for a later reader: its {@link nodeStamp}, or, when that is
|
|
38
|
+
* {@link unproven}, the same with its ctime recorded as `unproven`. No stamp read later equals that, so the reader
|
|
39
|
+
* re-reads the node rather than trust the stamp, as it does a node whose ctime alone moved ({@link stampMove}), or
|
|
40
|
+
* counts it moved when it holds nothing to re-read it against. Only such a node costs a re-read.
|
|
41
|
+
*/
|
|
42
|
+
export declare function recordedStamp(stats: StampFields, start: bigint): string;
|
|
8
43
|
export interface NodeWitness {
|
|
9
44
|
readonly path: string;
|
|
10
45
|
readonly stamp: string;
|
|
@@ -29,14 +64,35 @@ export declare function writeWitness(path: string, value: GraphWitness | Artifac
|
|
|
29
64
|
* Nx's Unix archive uses whole-second mtimes, so allFileData alone cannot
|
|
30
65
|
* prove an immediate same-second rewrite. An unbound archive hash is never
|
|
31
66
|
* admitted: on the first capture every file is rehashed through Nx itself.
|
|
67
|
+
* The nodes are recorded for later captures and readers (recordedStamp), so a
|
|
68
|
+
* node this capture read in the tick it changed in is rehashed by the next.
|
|
32
69
|
*/
|
|
33
70
|
export declare function workspaceSnapshot(workspaceRoot: string, context: WorkspaceContext, previous: WorkspaceSnapshot | undefined): WorkspaceSnapshot;
|
|
34
71
|
export declare function nodesUnchanged(nodes: readonly NodeWitness[]): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* The witnessed nodes whose stamp is no longer the one read, named for a refusal (the first eight in witness order, a
|
|
74
|
+
* gone one with its error code, and how many more), or null when none moved. A node whose device, inode, mode, size
|
|
75
|
+
* and mtime are unchanged and only its ctime moved (a same-mode chmod, which Bun's bin linking does to a shared store
|
|
76
|
+
* file on any checkout's install), or whose ctime was recorded unproven ({@link recordedStamp}), asks for a comparison,
|
|
77
|
+
* not a verdict: `same` re-reads it, and one it finds as recorded has not changed. Without `same` every move counts.
|
|
78
|
+
*/
|
|
79
|
+
export declare function movedNodes(nodes: readonly NodeWitness[], same?: (path: string) => boolean): string | null;
|
|
35
80
|
/** Membership and content are exact. Outputs do not exempt manifests or
|
|
36
81
|
* newly created/deleted files; this graph witness has no output exclusions.
|
|
37
82
|
*/
|
|
38
83
|
export declare function snapshotsEqual(left: WorkspaceSnapshot, right: WorkspaceSnapshot): boolean;
|
|
39
84
|
export declare function reusableGraph(witness: GraphWitness | null, workspaceRoot: string, environment: string, installation: string | null, snapshot: WorkspaceSnapshot): ProjectGraph | null;
|
|
85
|
+
/** What {@link graphInstallationIdentity} binds: resolution edges `[from, name, physical manifest]`, node stamps and
|
|
86
|
+
* file hashes, read once.
|
|
87
|
+
*/
|
|
88
|
+
export interface GraphInstallationCensus {
|
|
89
|
+
readonly resolutions: readonly (readonly [string, string, string | null])[];
|
|
90
|
+
readonly nodes: readonly NodeWitness[];
|
|
91
|
+
readonly files: readonly {
|
|
92
|
+
readonly path: string;
|
|
93
|
+
readonly sha256: string;
|
|
94
|
+
}[];
|
|
95
|
+
}
|
|
40
96
|
/** Plugins with opaque external graph inputs cannot borrow this proof.
|
|
41
97
|
* For the repository plugin and Nx, bind the entire owned module/file tree
|
|
42
98
|
* and its dependency/optional/peer resolution closure, including each alias,
|
|
@@ -44,7 +100,12 @@ export declare function reusableGraph(witness: GraphWitness | null, workspaceRoo
|
|
|
44
100
|
* bytes, including manifest metadata; pre/post node stamps still reject a
|
|
45
101
|
* tree that moved while reading. A missing optional dependency is recorded too.
|
|
46
102
|
*/
|
|
47
|
-
export declare function graphInstallationIdentity(workspaceRoot: string, nxJson: NxJsonConfiguration, resolvePackage: typeof readModulePackageJsonWithoutFallbacks): string | null;
|
|
103
|
+
export declare function graphInstallationIdentity(workspaceRoot: string, nxJson: NxJsonConfiguration, resolvePackage: typeof readModulePackageJsonWithoutFallbacks, expand: typeof expandOutputs, localInputs: GraphInputContractProof | null, onUnproved?: (detail: string) => void): string | null;
|
|
104
|
+
/** One read of the installation closure {@link graphInstallationIdentity} binds, without its final check that no node
|
|
105
|
+
* moved while it was read: what a caller that needs the closure, not a proof of it, reads. `null`, with `onUnproved`
|
|
106
|
+
* told why, for a closure that cannot be read.
|
|
107
|
+
*/
|
|
108
|
+
export declare function graphInstallationCensus(workspaceRoot: string, nxJson: NxJsonConfiguration, resolvePackage: typeof readModulePackageJsonWithoutFallbacks, expand: typeof expandOutputs, localInputs: GraphInputContractProof | null, onUnproved?: (detail: string) => void): GraphInstallationCensus | null;
|
|
48
109
|
export interface ArtifactWitness {
|
|
49
110
|
readonly version: 1;
|
|
50
111
|
readonly workspaceRoot: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ensure-built-witness.d.ts","sourceRoot":"","sources":["../src/ensure-built-witness.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ensure-built-witness.d.ts","sourceRoot":"","sources":["../src/ensure-built-witness.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAe3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,KAAK,EAAe,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AAEpG,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAOzE,sDAAsD;AACtD,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC,CAAC;AAErG,yHAAyH;AACzH,wBAAgB,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAKxF;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,YAAc,CAAC;AAExC,gHAAgH;AAChH,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,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