@gate-forge/cli 0.7.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -704
- package/dist/adapter-audit.d.ts +208 -0
- package/dist/adapter-audit.d.ts.map +1 -0
- package/dist/adapter-audit.js +579 -0
- package/dist/adapter-audit.js.map +1 -0
- package/dist/adapter-scaffold.d.ts +91 -0
- package/dist/adapter-scaffold.d.ts.map +1 -0
- package/dist/adapter-scaffold.js +474 -0
- package/dist/adapter-scaffold.js.map +1 -0
- package/dist/adopted-baseline.d.ts +10 -0
- package/dist/adopted-baseline.d.ts.map +1 -1
- package/dist/adopted-baseline.js +18 -1
- package/dist/adopted-baseline.js.map +1 -1
- package/dist/args.d.ts +15 -0
- package/dist/args.d.ts.map +1 -1
- package/dist/args.js +61 -2
- package/dist/args.js.map +1 -1
- package/dist/behavior-setup.d.ts +239 -0
- package/dist/behavior-setup.d.ts.map +1 -0
- package/dist/behavior-setup.js +751 -0
- package/dist/behavior-setup.js.map +1 -0
- package/dist/broker.d.ts.map +1 -1
- package/dist/broker.js +28 -2
- package/dist/broker.js.map +1 -1
- package/dist/cache-exclusions.d.ts +45 -0
- package/dist/cache-exclusions.d.ts.map +1 -0
- package/dist/cache-exclusions.js +205 -0
- package/dist/cache-exclusions.js.map +1 -0
- package/dist/candidate-tree.d.ts +86 -14
- package/dist/candidate-tree.d.ts.map +1 -1
- package/dist/candidate-tree.js +236 -62
- package/dist/candidate-tree.js.map +1 -1
- package/dist/ci-witnessed-template.d.ts +43 -0
- package/dist/ci-witnessed-template.d.ts.map +1 -0
- package/dist/ci-witnessed-template.js +283 -0
- package/dist/ci-witnessed-template.js.map +1 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +31 -4
- package/dist/cli.js.map +1 -1
- package/dist/commands/adapters.d.ts +15 -0
- package/dist/commands/adapters.d.ts.map +1 -0
- package/dist/commands/adapters.js +355 -0
- package/dist/commands/adapters.js.map +1 -0
- package/dist/commands/adopt.d.ts +7 -0
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +44 -2
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/baseline.d.ts.map +1 -1
- package/dist/commands/baseline.js +42 -1
- package/dist/commands/baseline.js.map +1 -1
- package/dist/commands/blocking.d.ts +105 -2
- package/dist/commands/blocking.d.ts.map +1 -1
- package/dist/commands/blocking.js +395 -53
- package/dist/commands/blocking.js.map +1 -1
- package/dist/commands/check.d.ts +36 -0
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +1068 -64
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/classify.d.ts +2 -1
- package/dist/commands/classify.d.ts.map +1 -1
- package/dist/commands/classify.js +188 -5
- package/dist/commands/classify.js.map +1 -1
- package/dist/commands/enforce.d.ts +4 -4
- package/dist/commands/enforce.d.ts.map +1 -1
- package/dist/commands/enforce.js +41 -9
- package/dist/commands/enforce.js.map +1 -1
- package/dist/commands/enforcement.d.ts +13 -1
- package/dist/commands/enforcement.d.ts.map +1 -1
- package/dist/commands/enforcement.js +880 -33
- package/dist/commands/enforcement.js.map +1 -1
- package/dist/commands/explain.d.ts +1 -1
- package/dist/commands/explain.d.ts.map +1 -1
- package/dist/commands/explain.js +162 -3
- package/dist/commands/explain.js.map +1 -1
- package/dist/commands/history.d.ts +12 -0
- package/dist/commands/history.d.ts.map +1 -0
- package/dist/commands/history.js +45 -0
- package/dist/commands/history.js.map +1 -0
- package/dist/commands/init-presets.d.ts +155 -0
- package/dist/commands/init-presets.d.ts.map +1 -0
- package/dist/commands/init-presets.js +203 -0
- package/dist/commands/init-presets.js.map +1 -0
- package/dist/commands/init.d.ts +7 -12
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +987 -99
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/keys.d.ts.map +1 -1
- package/dist/commands/keys.js +29 -13
- package/dist/commands/keys.js.map +1 -1
- package/dist/commands/next.d.ts.map +1 -1
- package/dist/commands/next.js +846 -19
- package/dist/commands/next.js.map +1 -1
- package/dist/commands/pre-commit.d.ts +25 -0
- package/dist/commands/pre-commit.d.ts.map +1 -1
- package/dist/commands/pre-commit.js +91 -6
- package/dist/commands/pre-commit.js.map +1 -1
- package/dist/commands/quarantine.d.ts +16 -0
- package/dist/commands/quarantine.d.ts.map +1 -0
- package/dist/commands/quarantine.js +213 -0
- package/dist/commands/quarantine.js.map +1 -0
- package/dist/commands/run.d.ts +39 -0
- package/dist/commands/run.d.ts.map +1 -0
- package/dist/commands/run.js +196 -0
- package/dist/commands/run.js.map +1 -0
- package/dist/commands/test-gates.d.ts +284 -2
- package/dist/commands/test-gates.d.ts.map +1 -1
- package/dist/commands/test-gates.js +3620 -187
- package/dist/commands/test-gates.js.map +1 -1
- package/dist/commands/tests.d.ts +1 -1
- package/dist/commands/tests.d.ts.map +1 -1
- package/dist/commands/tests.js +264 -29
- package/dist/commands/tests.js.map +1 -1
- package/dist/docs-exclusions.d.ts.map +1 -1
- package/dist/docs-exclusions.js +18 -3
- package/dist/docs-exclusions.js.map +1 -1
- package/dist/endpoint-compiler.d.ts.map +1 -1
- package/dist/endpoint-compiler.js +78 -9
- package/dist/endpoint-compiler.js.map +1 -1
- package/dist/engine-browser.d.ts +183 -0
- package/dist/engine-browser.d.ts.map +1 -0
- package/dist/engine-browser.js +381 -0
- package/dist/engine-browser.js.map +1 -0
- package/dist/engine-identity.d.ts +100 -0
- package/dist/engine-identity.d.ts.map +1 -0
- package/dist/engine-identity.js +182 -0
- package/dist/engine-identity.js.map +1 -0
- package/dist/evaluate.d.ts +105 -1
- package/dist/evaluate.d.ts.map +1 -1
- package/dist/evaluate.js +149 -18
- package/dist/evaluate.js.map +1 -1
- package/dist/execution.d.ts +253 -9
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +309 -12
- package/dist/execution.js.map +1 -1
- package/dist/gateforge-owned.d.ts +78 -0
- package/dist/gateforge-owned.d.ts.map +1 -0
- package/dist/gateforge-owned.js +254 -0
- package/dist/gateforge-owned.js.map +1 -0
- package/dist/git-hooks.d.ts +35 -0
- package/dist/git-hooks.d.ts.map +1 -1
- package/dist/git-hooks.js +140 -1
- package/dist/git-hooks.js.map +1 -1
- package/dist/git-ignored.d.ts +27 -0
- package/dist/git-ignored.d.ts.map +1 -0
- package/dist/git-ignored.js +102 -0
- package/dist/git-ignored.js.map +1 -0
- package/dist/git-objects.d.ts +60 -0
- package/dist/git-objects.d.ts.map +1 -0
- package/dist/git-objects.js +152 -0
- package/dist/git-objects.js.map +1 -0
- package/dist/glob.d.ts +33 -14
- package/dist/glob.d.ts.map +1 -1
- package/dist/glob.js +96 -5
- package/dist/glob.js.map +1 -1
- package/dist/history.d.ts +52 -0
- package/dist/history.d.ts.map +1 -0
- package/dist/history.js +116 -0
- package/dist/history.js.map +1 -0
- package/dist/host-load.d.ts +49 -0
- package/dist/host-load.d.ts.map +1 -0
- package/dist/host-load.js +78 -0
- package/dist/host-load.js.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/input-snapshot.d.ts +63 -9
- package/dist/input-snapshot.d.ts.map +1 -1
- package/dist/input-snapshot.js +195 -17
- package/dist/input-snapshot.js.map +1 -1
- package/dist/io.d.ts +49 -0
- package/dist/io.d.ts.map +1 -1
- package/dist/io.js +22 -0
- package/dist/io.js.map +1 -1
- package/dist/mapping.d.ts +84 -1
- package/dist/mapping.d.ts.map +1 -1
- package/dist/mapping.js +276 -5
- package/dist/mapping.js.map +1 -1
- package/dist/native-freeze.d.ts +217 -0
- package/dist/native-freeze.d.ts.map +1 -0
- package/dist/native-freeze.js +332 -0
- package/dist/native-freeze.js.map +1 -0
- package/dist/pipeline.d.ts +67 -1
- package/dist/pipeline.d.ts.map +1 -1
- package/dist/pipeline.js +164 -6
- package/dist/pipeline.js.map +1 -1
- package/dist/planes-inference.d.ts +12 -5
- package/dist/planes-inference.d.ts.map +1 -1
- package/dist/planes-inference.js +13 -15
- package/dist/planes-inference.js.map +1 -1
- package/dist/playwright-browsers.d.ts +210 -0
- package/dist/playwright-browsers.d.ts.map +1 -0
- package/dist/playwright-browsers.js +364 -0
- package/dist/playwright-browsers.js.map +1 -0
- package/dist/plugins.d.ts +15 -5
- package/dist/plugins.d.ts.map +1 -1
- package/dist/plugins.js +59 -9
- package/dist/plugins.js.map +1 -1
- package/dist/progress.d.ts +148 -0
- package/dist/progress.d.ts.map +1 -0
- package/dist/progress.js +263 -0
- package/dist/progress.js.map +1 -0
- package/dist/providers.d.ts +26 -1
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +39 -0
- package/dist/providers.js.map +1 -1
- package/dist/receipts.d.ts +1 -0
- package/dist/receipts.d.ts.map +1 -1
- package/dist/receipts.js +35 -7
- package/dist/receipts.js.map +1 -1
- package/dist/repo-scan.d.ts +15 -1
- package/dist/repo-scan.d.ts.map +1 -1
- package/dist/repo-scan.js +329 -34
- package/dist/repo-scan.js.map +1 -1
- package/dist/reseal-chain.d.ts +184 -0
- package/dist/reseal-chain.d.ts.map +1 -0
- package/dist/reseal-chain.js +735 -0
- package/dist/reseal-chain.js.map +1 -0
- package/dist/reseal-evidence.d.ts +241 -0
- package/dist/reseal-evidence.d.ts.map +1 -0
- package/dist/reseal-evidence.js +319 -0
- package/dist/reseal-evidence.js.map +1 -0
- package/dist/reseal.d.ts +181 -0
- package/dist/reseal.d.ts.map +1 -0
- package/dist/reseal.js +1620 -0
- package/dist/reseal.js.map +1 -0
- package/dist/response-field-guidance.d.ts +82 -0
- package/dist/response-field-guidance.d.ts.map +1 -0
- package/dist/response-field-guidance.js +184 -0
- package/dist/response-field-guidance.js.map +1 -0
- package/dist/route-plane-proposals.d.ts +100 -0
- package/dist/route-plane-proposals.d.ts.map +1 -0
- package/dist/route-plane-proposals.js +213 -0
- package/dist/route-plane-proposals.js.map +1 -0
- package/dist/run-cache.d.ts +260 -0
- package/dist/run-cache.d.ts.map +1 -0
- package/dist/run-cache.js +771 -0
- package/dist/run-cache.js.map +1 -0
- package/dist/run-preflight.d.ts +77 -0
- package/dist/run-preflight.d.ts.map +1 -0
- package/dist/run-preflight.js +774 -0
- package/dist/run-preflight.js.map +1 -0
- package/dist/run-recipe.d.ts +107 -0
- package/dist/run-recipe.d.ts.map +1 -0
- package/dist/run-recipe.js +295 -0
- package/dist/run-recipe.js.map +1 -0
- package/dist/run-reliability.d.ts +126 -0
- package/dist/run-reliability.d.ts.map +1 -0
- package/dist/run-reliability.js +221 -0
- package/dist/run-reliability.js.map +1 -0
- package/dist/runtime.d.ts +15 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +11 -1
- package/dist/runtime.js.map +1 -1
- package/dist/scope.d.ts +20 -0
- package/dist/scope.d.ts.map +1 -1
- package/dist/scope.js +26 -5
- package/dist/scope.js.map +1 -1
- package/dist/secret-guard.d.ts +36 -0
- package/dist/secret-guard.d.ts.map +1 -0
- package/dist/secret-guard.js +63 -0
- package/dist/secret-guard.js.map +1 -0
- package/dist/singleton-guidance.d.ts +82 -0
- package/dist/singleton-guidance.d.ts.map +1 -0
- package/dist/singleton-guidance.js +138 -0
- package/dist/singleton-guidance.js.map +1 -0
- package/dist/staged-candidate.d.ts +17 -0
- package/dist/staged-candidate.d.ts.map +1 -1
- package/dist/staged-candidate.js +50 -0
- package/dist/staged-candidate.js.map +1 -1
- package/dist/state-artifacts.d.ts +70 -0
- package/dist/state-artifacts.d.ts.map +1 -0
- package/dist/state-artifacts.js +215 -0
- package/dist/state-artifacts.js.map +1 -0
- package/dist/state.d.ts +170 -2
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +248 -8
- package/dist/state.js.map +1 -1
- package/dist/unmatched-routes.d.ts +60 -0
- package/dist/unmatched-routes.d.ts.map +1 -0
- package/dist/unmatched-routes.js +131 -0
- package/dist/unmatched-routes.js.map +1 -0
- package/dist/verifier-keys.d.ts +33 -2
- package/dist/verifier-keys.d.ts.map +1 -1
- package/dist/verifier-keys.js +95 -9
- package/dist/verifier-keys.js.map +1 -1
- package/guides/CONNECT-YOUR-PROJECT.md +425 -0
- package/guides/QUICKSTART.md +306 -26
- package/guides/REFERENCE.md +1710 -0
- package/guides/RUNNER-NEUTRAL-EVIDENCE.md +199 -0
- package/guides/TEST-ENVIRONMENT.md +1044 -6
- package/guides/UPGRADE-0.6-to-0.7.md +3 -3
- package/guides/UPGRADE-0.7-to-0.8.md +114 -0
- package/guides/UPGRADE-0.8-to-0.9.md +104 -0
- package/package.json +10 -9
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git-ignore awareness for the DETECTOR-INPUT walk (owner decision D5,
|
|
3
|
+
* release 0.9.0).
|
|
4
|
+
*
|
|
5
|
+
* A consumer working copy holds whole gitignored trees the repository
|
|
6
|
+
* never owns as source: the minified trace-viewer bundles a Playwright
|
|
7
|
+
* run writes into `playwright-report/`, build output, local caches. The
|
|
8
|
+
* scan walked them exactly like committed code, so every minified call
|
|
9
|
+
* in them became detector evidence — hundreds of
|
|
10
|
+
* `FRONTEND_CALL_TARGET_UNRESOLVED` entries the owner then had to
|
|
11
|
+
* `adopt` away. A clean clone of the same commit scanned none of it.
|
|
12
|
+
* The set Git already knows is the one honest answer to "what is source
|
|
13
|
+
* here", so the scan asks Git once and skips exactly that.
|
|
14
|
+
*
|
|
15
|
+
* Properties this module guarantees:
|
|
16
|
+
*
|
|
17
|
+
* - **Deterministic across machines.** `core.excludesFile` is
|
|
18
|
+
* overridden to empty on the command line, so the user's global
|
|
19
|
+
* excludes file cannot change which files one repository's scan sees.
|
|
20
|
+
* `.gitignore` at any depth and `.git/info/exclude` still count —
|
|
21
|
+
* they are repository state, not machine state.
|
|
22
|
+
* - **Tracked files are never skipped.** `ls-files --others` reports
|
|
23
|
+
* UNTRACKED paths only, so a committed file that matches an ignore
|
|
24
|
+
* pattern stays in the scan (git's own semantics, and the same rule
|
|
25
|
+
* the static test scanner in `@gate-forge/pack-playwright` follows).
|
|
26
|
+
* - **Absence of an answer is not an answer.** Outside a work tree, or
|
|
27
|
+
* when git is missing, unreadable, or too slow, the scope reports
|
|
28
|
+
* `known: false` and both predicates are false — the caller keeps
|
|
29
|
+
* exactly today's behaviour and skips nothing. Nothing is printed: a
|
|
30
|
+
* repository without usable Git inventory is already surfaced by the
|
|
31
|
+
* input snapshot's `snapshot-unavailable` diagnostic, and the scan
|
|
32
|
+
* must not invent a second warning channel for it.
|
|
33
|
+
* - **Whole ignored directories arrive collapsed.** `--directory` makes
|
|
34
|
+
* Git report an entirely-ignored directory as one `dir/` entry, so the
|
|
35
|
+
* walk skips the subtree without descending into it. A directory
|
|
36
|
+
* holding a TRACKED file is never collapsed — Git reports the ignored
|
|
37
|
+
* files inside it individually — so collapsing can never hide a
|
|
38
|
+
* committed byte.
|
|
39
|
+
*/
|
|
40
|
+
import { spawnSync } from 'node:child_process';
|
|
41
|
+
/** Hard cap on the ignore query's output buffer. */
|
|
42
|
+
const MAX_IGNORE_OUTPUT_BYTES = 64 * 1024 * 1024;
|
|
43
|
+
/** The ignore query's deadline; a slower git answers nothing (today's behaviour). */
|
|
44
|
+
const IGNORE_QUERY_TIMEOUT_MS = 20_000;
|
|
45
|
+
/**
|
|
46
|
+
* Asks Git which UNTRACKED paths this repository ignores. Callers
|
|
47
|
+
* compute this ONCE per run and hand it to every enumeration that must
|
|
48
|
+
* agree on the scan scope.
|
|
49
|
+
*
|
|
50
|
+
* Args:
|
|
51
|
+
* root: absolute repository root (the directory the walk starts at).
|
|
52
|
+
*
|
|
53
|
+
* Returns:
|
|
54
|
+
* GitIgnoredScope: the skip rules when Git answered; a `known: false`
|
|
55
|
+
* scope that skips nothing when there was no usable work tree.
|
|
56
|
+
*/
|
|
57
|
+
export function gitIgnoredPaths(root) {
|
|
58
|
+
const result = spawnSync('git', [
|
|
59
|
+
'-c',
|
|
60
|
+
'core.excludesFile=',
|
|
61
|
+
'ls-files',
|
|
62
|
+
'--others',
|
|
63
|
+
'--ignored',
|
|
64
|
+
'--exclude-standard',
|
|
65
|
+
'--directory',
|
|
66
|
+
'-z',
|
|
67
|
+
], {
|
|
68
|
+
cwd: root,
|
|
69
|
+
encoding: 'utf8',
|
|
70
|
+
maxBuffer: MAX_IGNORE_OUTPUT_BYTES,
|
|
71
|
+
timeout: IGNORE_QUERY_TIMEOUT_MS,
|
|
72
|
+
});
|
|
73
|
+
if (result.error !== undefined) {
|
|
74
|
+
return { known: false, skipsDirectory: () => false, skipsFile: () => false };
|
|
75
|
+
}
|
|
76
|
+
// Non-zero is "not a repository" (128) or an unreadable work tree —
|
|
77
|
+
// both mean no answer, and an unanswered query skips nothing.
|
|
78
|
+
if (result.status !== 0) {
|
|
79
|
+
return { known: false, skipsDirectory: () => false, skipsFile: () => false };
|
|
80
|
+
}
|
|
81
|
+
const files = new Set();
|
|
82
|
+
const directories = new Set();
|
|
83
|
+
for (const entry of (result.stdout ?? '').split('\0')) {
|
|
84
|
+
if (entry.length === 0)
|
|
85
|
+
continue;
|
|
86
|
+
if (entry.endsWith('/')) {
|
|
87
|
+
directories.add(entry.slice(0, -1));
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
files.add(entry);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (files.size === 0 && directories.size === 0) {
|
|
94
|
+
return { known: true, skipsDirectory: () => false, skipsFile: () => false };
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
known: true,
|
|
98
|
+
skipsDirectory: (relativeDirectory) => directories.has(relativeDirectory),
|
|
99
|
+
skipsFile: (relativeFile) => files.has(relativeFile),
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=git-ignored.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-ignored.js","sourceRoot":"","sources":["../src/git-ignored.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;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AS;QACjC,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACtC,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IACD,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,WAAW,CAAC,IAAI,KAAK,CAAC,EAAE,CAAC;QAC/C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC;IAC9E,CAAC;IACD,OAAO;QACL,KAAK,EAAE,IAAI;QACX,cAAc,EAAE,CAAC,iBAAiB,EAAE,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,iBAAiB,CAAC;QACzE,SAAS,EAAE,CAAC,YAAY,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC;KACrD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/** Git object kinds this module writes. */
|
|
2
|
+
type GitObjectType = 'blob' | 'tree';
|
|
3
|
+
/**
|
|
4
|
+
* Serializes one tree object payload exactly as Git stores it:
|
|
5
|
+
* `<mode> <name>\0<20 raw id bytes>` per entry, already in Git's tree
|
|
6
|
+
* order (see {@link sortTreeEntries}).
|
|
7
|
+
*
|
|
8
|
+
* Args:
|
|
9
|
+
* entries: tree entries with a Git mode, a directory name, and the
|
|
10
|
+
* 40-hex object id of the entry.
|
|
11
|
+
*
|
|
12
|
+
* Returns:
|
|
13
|
+
* Buffer: the raw tree payload (no header).
|
|
14
|
+
*/
|
|
15
|
+
export declare function serializeTreePayload(entries: readonly {
|
|
16
|
+
mode: string;
|
|
17
|
+
name: string;
|
|
18
|
+
sha: string;
|
|
19
|
+
}[]): Buffer;
|
|
20
|
+
/**
|
|
21
|
+
* Sorts tree entries into Git's canonical tree order.
|
|
22
|
+
*
|
|
23
|
+
* Args:
|
|
24
|
+
* entries: tree entries with a Git mode and a directory name.
|
|
25
|
+
*
|
|
26
|
+
* Returns:
|
|
27
|
+
* T[]: the same entries in Git's tree order.
|
|
28
|
+
*/
|
|
29
|
+
export declare function sortTreeEntries<T extends {
|
|
30
|
+
mode: string;
|
|
31
|
+
name: string;
|
|
32
|
+
}>(entries: readonly T[]): T[];
|
|
33
|
+
/**
|
|
34
|
+
* Writes loose objects into one object directory, skipping ids that are
|
|
35
|
+
* already present. Every write is atomic (temp file + rename) and
|
|
36
|
+
* content-addressed, so a repeated write of the same id is a no-op.
|
|
37
|
+
*/
|
|
38
|
+
export declare class LooseObjectWriter {
|
|
39
|
+
private readonly objectsDir;
|
|
40
|
+
/** Ids this writer already wrote (per process, never persisted). */
|
|
41
|
+
private readonly written;
|
|
42
|
+
/**
|
|
43
|
+
* Args:
|
|
44
|
+
* objectsDir: absolute path of the repository's `objects` directory.
|
|
45
|
+
*/
|
|
46
|
+
constructor(objectsDir: string);
|
|
47
|
+
/**
|
|
48
|
+
* Hashes `payload` and stores it as a loose object.
|
|
49
|
+
*
|
|
50
|
+
* Args:
|
|
51
|
+
* type: object kind (`blob` or `tree`).
|
|
52
|
+
* payload: raw object content.
|
|
53
|
+
*
|
|
54
|
+
* Returns:
|
|
55
|
+
* string: the 40-hex object id.
|
|
56
|
+
*/
|
|
57
|
+
write(type: GitObjectType, payload: Buffer): string;
|
|
58
|
+
}
|
|
59
|
+
export {};
|
|
60
|
+
//# sourceMappingURL=git-objects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-objects.d.ts","sourceRoot":"","sources":["../src/git-objects.ts"],"names":[],"mappings":"AAqBA,2CAA2C;AAC3C,KAAK,aAAa,GAAG,MAAM,GAAG,MAAM,CAAC;AAuBrC;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,MAAM,CAO5G;AAqBD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,GAAG,CAAC,EAAE,CAEpG;AAED;;;;GAIG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IAEpC,oEAAoE;IACpE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAE7C;;;OAGG;gBACS,UAAU,EAAE,MAAM;IAI9B;;;;;;;;;OASG;IACH,KAAK,CAAC,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM;CAiCpD"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-process Git object id computation and loose-object writing.
|
|
3
|
+
*
|
|
4
|
+
* Why: candidate-tree ingestion used to spawn one `git hash-object` per
|
|
5
|
+
* file and one `git mktree` per directory level. On a consumer checkout
|
|
6
|
+
* (~67k files) that is hundreds of process spawns per computation and
|
|
7
|
+
* minutes of wall clock for work that is a SHA-1 and a zlib stream.
|
|
8
|
+
* This module produces the identical object ids and the identical
|
|
9
|
+
* on-disk loose objects without spawning anything: Git's object format
|
|
10
|
+
* is a documented byte layout, so the same bytes in, the same id out.
|
|
11
|
+
*
|
|
12
|
+
* The objects it writes are ordinary loose objects in the same object
|
|
13
|
+
* directory `git hash-object -w --git-dir=<dir>` would have written to,
|
|
14
|
+
* so every downstream `git cat-file`/`git diff-tree` on the candidate
|
|
15
|
+
* tree keeps working unchanged.
|
|
16
|
+
*/
|
|
17
|
+
import { createHash, randomBytes } from 'node:crypto';
|
|
18
|
+
import { chmodSync, existsSync, mkdirSync, renameSync, unlinkSync, writeFileSync } from 'node:fs';
|
|
19
|
+
import { join } from 'node:path';
|
|
20
|
+
import { deflateSync } from 'node:zlib';
|
|
21
|
+
/** Git's mode string for a subtree entry (`git mktree` accepts `040000`, git stores `40000`). */
|
|
22
|
+
const TREE_MODE = '40000';
|
|
23
|
+
/** Git's mode string for an entry parsed as a subtree. */
|
|
24
|
+
const TREE_MODE_PADDED = '040000';
|
|
25
|
+
/**
|
|
26
|
+
* Computes the Git object id of `payload` without touching the object store.
|
|
27
|
+
*
|
|
28
|
+
* Args:
|
|
29
|
+
* type: object kind written into the id header (`blob` or `tree`).
|
|
30
|
+
* payload: raw object content (the bytes a `git cat-file -p` would show).
|
|
31
|
+
*
|
|
32
|
+
* Returns:
|
|
33
|
+
* string: 40-char lowercase sha1 hex, byte-identical to `git hash-object`.
|
|
34
|
+
*/
|
|
35
|
+
function hashGitObject(type, payload) {
|
|
36
|
+
const header = Buffer.from(`${type} ${payload.length}\0`, 'utf8');
|
|
37
|
+
return createHash('sha1').update(header).update(payload).digest('hex');
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Serializes one tree object payload exactly as Git stores it:
|
|
41
|
+
* `<mode> <name>\0<20 raw id bytes>` per entry, already in Git's tree
|
|
42
|
+
* order (see {@link sortTreeEntries}).
|
|
43
|
+
*
|
|
44
|
+
* Args:
|
|
45
|
+
* entries: tree entries with a Git mode, a directory name, and the
|
|
46
|
+
* 40-hex object id of the entry.
|
|
47
|
+
*
|
|
48
|
+
* Returns:
|
|
49
|
+
* Buffer: the raw tree payload (no header).
|
|
50
|
+
*/
|
|
51
|
+
export function serializeTreePayload(entries) {
|
|
52
|
+
const parts = [];
|
|
53
|
+
for (const entry of entries) {
|
|
54
|
+
parts.push(Buffer.from(`${entry.mode === TREE_MODE_PADDED ? TREE_MODE : entry.mode} ${entry.name}\0`, 'utf8'));
|
|
55
|
+
parts.push(Buffer.from(entry.sha, 'hex'));
|
|
56
|
+
}
|
|
57
|
+
return Buffer.concat(parts);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Compares two tree entries the way Git does: by name bytes, with a
|
|
61
|
+
* directory name compared as if it ended in `/`. That is why the blob
|
|
62
|
+
* `a!` sorts before the directory `a` (`!` < `/`) even though a plain
|
|
63
|
+
* name sort puts them the other way round.
|
|
64
|
+
*
|
|
65
|
+
* Args:
|
|
66
|
+
* a: first entry (its mode decides whether the name gets a `/`).
|
|
67
|
+
* b: second entry.
|
|
68
|
+
*
|
|
69
|
+
* Returns:
|
|
70
|
+
* number: negative, zero, or positive like a comparator.
|
|
71
|
+
*/
|
|
72
|
+
function compareTreeEntries(a, b) {
|
|
73
|
+
const left = Buffer.from(a.mode === TREE_MODE_PADDED ? `${a.name}/` : a.name, 'utf8');
|
|
74
|
+
const right = Buffer.from(b.mode === TREE_MODE_PADDED ? `${b.name}/` : b.name, 'utf8');
|
|
75
|
+
return Buffer.compare(left, right);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Sorts tree entries into Git's canonical tree order.
|
|
79
|
+
*
|
|
80
|
+
* Args:
|
|
81
|
+
* entries: tree entries with a Git mode and a directory name.
|
|
82
|
+
*
|
|
83
|
+
* Returns:
|
|
84
|
+
* T[]: the same entries in Git's tree order.
|
|
85
|
+
*/
|
|
86
|
+
export function sortTreeEntries(entries) {
|
|
87
|
+
return [...entries].sort(compareTreeEntries);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Writes loose objects into one object directory, skipping ids that are
|
|
91
|
+
* already present. Every write is atomic (temp file + rename) and
|
|
92
|
+
* content-addressed, so a repeated write of the same id is a no-op.
|
|
93
|
+
*/
|
|
94
|
+
export class LooseObjectWriter {
|
|
95
|
+
objectsDir;
|
|
96
|
+
/** Ids this writer already wrote (per process, never persisted). */
|
|
97
|
+
written = new Set();
|
|
98
|
+
/**
|
|
99
|
+
* Args:
|
|
100
|
+
* objectsDir: absolute path of the repository's `objects` directory.
|
|
101
|
+
*/
|
|
102
|
+
constructor(objectsDir) {
|
|
103
|
+
this.objectsDir = objectsDir;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Hashes `payload` and stores it as a loose object.
|
|
107
|
+
*
|
|
108
|
+
* Args:
|
|
109
|
+
* type: object kind (`blob` or `tree`).
|
|
110
|
+
* payload: raw object content.
|
|
111
|
+
*
|
|
112
|
+
* Returns:
|
|
113
|
+
* string: the 40-hex object id.
|
|
114
|
+
*/
|
|
115
|
+
write(type, payload) {
|
|
116
|
+
const id = hashGitObject(type, payload);
|
|
117
|
+
if (this.written.has(id))
|
|
118
|
+
return id;
|
|
119
|
+
const fanout = join(this.objectsDir, id.slice(0, 2));
|
|
120
|
+
const target = join(fanout, id.slice(2));
|
|
121
|
+
if (existsSync(target)) {
|
|
122
|
+
this.written.add(id);
|
|
123
|
+
return id;
|
|
124
|
+
}
|
|
125
|
+
// Loose object files hold `<type> <size>\0<payload>`; the id itself
|
|
126
|
+
// is the file name and never part of the stored bytes.
|
|
127
|
+
const framed = Buffer.concat([Buffer.from(`${type} ${payload.length}\0`, 'utf8'), payload]);
|
|
128
|
+
// Level 1 is Git's default loose-object compression
|
|
129
|
+
// (core.loosecompression); the level never changes the object id,
|
|
130
|
+
// only the stored bytes.
|
|
131
|
+
const compressed = deflateSync(framed, { level: 1 });
|
|
132
|
+
const temp = join(this.objectsDir, `tmp_obj_${process.pid}_${randomBytes(8).toString('hex')}`);
|
|
133
|
+
try {
|
|
134
|
+
mkdirSync(fanout, { recursive: true, mode: 0o777 });
|
|
135
|
+
writeFileSync(temp, compressed);
|
|
136
|
+
chmodSync(temp, 0o444);
|
|
137
|
+
renameSync(temp, target);
|
|
138
|
+
}
|
|
139
|
+
catch (error) {
|
|
140
|
+
try {
|
|
141
|
+
unlinkSync(temp);
|
|
142
|
+
}
|
|
143
|
+
catch {
|
|
144
|
+
// The temp file is already gone; the original error is the useful one.
|
|
145
|
+
}
|
|
146
|
+
throw error;
|
|
147
|
+
}
|
|
148
|
+
this.written.add(id);
|
|
149
|
+
return id;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=git-objects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-objects.js","sourceRoot":"","sources":["../src/git-objects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClG,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAKxC,iGAAiG;AACjG,MAAM,SAAS,GAAG,OAAO,CAAC;AAE1B,0DAA0D;AAC1D,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAElC;;;;;;;;;GASG;AACH,SAAS,aAAa,CAAC,IAAmB,EAAE,OAAe;IACzD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,OAAO,CAAC,MAAM,IAAI,EAAE,MAAM,CAAC,CAAC;IAClE,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACzE,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAA+D;IAClG,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,KAAK,gBAAgB,CAAC,CAAC,CAAC,SAAS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,CAAC,CAAC;QAC3B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC;gBACH,UAAU,CAAC,IAAI,CAAC,CAAC;YACnB,CAAC;YAAC,MAAM,CAAC;gBACP,uEAAuE;YACzE,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACrB,OAAO,EAAE,CAAC;IACZ,CAAC;CACF"}
|
package/dist/glob.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { GitIgnoredScope } from './git-ignored.js';
|
|
1
2
|
/** One filesystem failure encountered while expanding the scan. */
|
|
2
3
|
export interface ExpandError {
|
|
3
4
|
/** The repo-root-relative path that could not be read. */
|
|
@@ -6,22 +7,40 @@ export interface ExpandError {
|
|
|
6
7
|
detail: string;
|
|
7
8
|
}
|
|
8
9
|
/**
|
|
9
|
-
* Expands
|
|
10
|
-
*
|
|
10
|
+
* Expands the configured include/exclude globs into the DETECTOR-INPUT
|
|
11
|
+
* scope: every match minus the paths this run's Git-ignore scope
|
|
12
|
+
* excludes. This is the list handed to every plugin's `discover`
|
|
13
|
+
* request, and the classifier's coverage check compares its requested
|
|
14
|
+
* paths against what detectors actually scanned — so an ignored tree
|
|
15
|
+
* must leave BOTH sides, or the closed-world check would compare sets
|
|
16
|
+
* the walk never intended to describe.
|
|
17
|
+
*
|
|
18
|
+
* The caller computes the scope ONCE per run (`gitIgnoredPaths` in
|
|
19
|
+
* `./git-ignored.ts`) and passes the same object here every time, so
|
|
20
|
+
* every enumeration of the scan scope agrees on one answer.
|
|
21
|
+
*
|
|
22
|
+
* Args:
|
|
23
|
+
* include: include globs (at least one, schema-enforced).
|
|
24
|
+
* exclude: exclude globs (possibly empty).
|
|
25
|
+
* root: absolute repo root to walk.
|
|
26
|
+
* gitIgnored: the run's Git-ignore scope; a `known: false` scope skips
|
|
27
|
+
* nothing, which is exactly today's behaviour outside a work tree.
|
|
28
|
+
* errors: out-array collecting every unreadable path.
|
|
11
29
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
30
|
+
* Returns:
|
|
31
|
+
* string[]: deduplicated, codepoint-sorted posix paths.
|
|
32
|
+
*/
|
|
33
|
+
export declare function expandScanPaths(include: readonly string[], exclude: readonly string[], root: string, gitIgnored: GitIgnoredScope, errors?: ExpandError[]): string[];
|
|
34
|
+
/**
|
|
35
|
+
* Expands include globs minus exclude globs into concrete repo-root-
|
|
36
|
+
* relative file paths, consulting no ignore rules: the IDENTITY scope.
|
|
37
|
+
* Every glob match is returned, gitignored or not.
|
|
17
38
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* Unlike unreadable directories, a skipped symlink can never conceal a
|
|
24
|
-
* repository file — so no error is reported and none is needed.
|
|
39
|
+
* `collectDeclaredInputs` (input snapshot) calls this and must keep
|
|
40
|
+
* hashing a superset of the scan — a gitignored configured input still
|
|
41
|
+
* moves the receipt digest, which is the conservative direction and the
|
|
42
|
+
* behaviour `assertOutputDisjoint` relies on when it refuses an `--out`
|
|
43
|
+
* that would hide a declared input.
|
|
25
44
|
*
|
|
26
45
|
* Args:
|
|
27
46
|
* include: include globs (at least one, schema-enforced).
|
package/dist/glob.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../src/glob.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../src/glob.ts"],"names":[],"mappings":"AAwCA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAiBxD,mEAAmE;AACnE,MAAM,WAAW,WAAW;IAC1B,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,MAAM,EAAE,MAAM,CAAC;CAChB;AA4GD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,eAAe,EAC3B,MAAM,CAAC,EAAE,WAAW,EAAE,GACrB,MAAM,EAAE,CAEV;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,WAAW,EAAE,GACrB,MAAM,EAAE,CAEV"}
|
package/dist/glob.js
CHANGED
|
@@ -14,6 +14,24 @@
|
|
|
14
14
|
* The result is the exact path list handed to every plugin's `discover`
|
|
15
15
|
* request, so include/exclude edits change what detectors see — and
|
|
16
16
|
* nothing else.
|
|
17
|
+
*
|
|
18
|
+
* TWO SCOPES, deliberately not one:
|
|
19
|
+
*
|
|
20
|
+
* - {@link expandScanPaths} is the SCAN scope. It additionally skips
|
|
21
|
+
* the untracked-and-ignored paths Git reports (owner decision D5,
|
|
22
|
+
* release 0.9.0): a minified `playwright-report/` bundle in a
|
|
23
|
+
* consumer working copy is not source, and scanning it produced
|
|
24
|
+
* hundreds of bogus `FRONTEND_CALL_TARGET_UNRESOLVED` entries that
|
|
25
|
+
* the owner then had to adopt away. A TRACKED file matching an ignore
|
|
26
|
+
* pattern is still scanned — Git never reports tracked paths as
|
|
27
|
+
* `--others`, so git semantics give that for free.
|
|
28
|
+
* - {@link expandIncludePaths} is the IDENTITY scope and stays exactly
|
|
29
|
+
* as it was: every glob match, gitignored or not. The input snapshot
|
|
30
|
+
* hashes a deliberate SUPERSET of what the scan reads (its own
|
|
31
|
+
* documented invariant, and the same list `assertOutputDisjoint`
|
|
32
|
+
* refuses an `--out` overlap against), so it must never learn to skip
|
|
33
|
+
* anything. Two names over one implementation, so no caller can
|
|
34
|
+
* narrow the identity scope by accident.
|
|
17
35
|
*/
|
|
18
36
|
import { lstatSync, readdirSync } from 'node:fs';
|
|
19
37
|
import { join } from 'node:path';
|
|
@@ -21,13 +39,18 @@ import { compareStrings } from '@gate-forge/core';
|
|
|
21
39
|
import picomatch from 'picomatch';
|
|
22
40
|
/** Directories that are never scanned, whatever the globs say. */
|
|
23
41
|
const ALWAYS_SKIP = new Set(['.git', 'node_modules']);
|
|
42
|
+
/** The scope that excludes nothing — the identity walk's ignore rules. */
|
|
43
|
+
const NOTHING_IGNORED = {
|
|
44
|
+
known: false,
|
|
45
|
+
skipsDirectory: () => false,
|
|
46
|
+
skipsFile: () => false,
|
|
47
|
+
};
|
|
24
48
|
/** True when at least one compiled pattern matches the path. */
|
|
25
49
|
function matchesAny(path, matchers) {
|
|
26
50
|
return matchers.some((matcher) => matcher(path));
|
|
27
51
|
}
|
|
28
52
|
/**
|
|
29
|
-
*
|
|
30
|
-
* relative file paths.
|
|
53
|
+
* The one walk behind both exported scopes.
|
|
31
54
|
*
|
|
32
55
|
* FAIL-CLOSED (red-team F3): filesystem failures are never silent. An
|
|
33
56
|
* unreadable directory or a failed stat means files MAY exist that the
|
|
@@ -41,19 +64,22 @@ function matchesAny(path, matchers) {
|
|
|
41
64
|
* attribute foreign content to the repo and invalidate closed-world
|
|
42
65
|
* proofs; a dangling link hides nothing (no target content exists).
|
|
43
66
|
* Unlike unreadable directories, a skipped symlink can never conceal a
|
|
44
|
-
* repository file — so no error is reported and none is needed.
|
|
67
|
+
* repository file — so no error is reported and none is needed. The
|
|
68
|
+
* same argument covers a Git-IGNORED path: it is out of scope by the
|
|
69
|
+
* owner's own declaration, not a hole the scan failed to see.
|
|
45
70
|
*
|
|
46
71
|
* Args:
|
|
47
72
|
* include: include globs (at least one, schema-enforced).
|
|
48
73
|
* exclude: exclude globs (possibly empty).
|
|
49
74
|
* root: absolute repo root to walk.
|
|
75
|
+
* gitIgnored: the run's Git-ignore scope (see `./git-ignored.ts`).
|
|
50
76
|
* errors: out-array collecting every unreadable path.
|
|
51
77
|
*
|
|
52
78
|
* Returns:
|
|
53
79
|
* string[]: deduplicated, codepoint-sorted posix paths. Empty when no
|
|
54
80
|
* included file exists.
|
|
55
81
|
*/
|
|
56
|
-
|
|
82
|
+
function expand(include, exclude, root, gitIgnored, errors) {
|
|
57
83
|
const includeMatchers = include.map((pattern) => picomatch(pattern, { dot: true }));
|
|
58
84
|
const excludeMatchers = exclude.map((pattern) => picomatch(pattern, { dot: true }));
|
|
59
85
|
const files = [];
|
|
@@ -77,6 +103,13 @@ export function expandIncludePaths(include, exclude, root, errors) {
|
|
|
77
103
|
continue;
|
|
78
104
|
const absolute = join(dir, entry);
|
|
79
105
|
const relative = [...segments, entry].join('/');
|
|
106
|
+
if (gitIgnored.skipsDirectory(relative)) {
|
|
107
|
+
// Git reports a wholly-ignored directory as one collapsed entry,
|
|
108
|
+
// so the whole subtree leaves the scan without being walked. A
|
|
109
|
+
// directory holding a TRACKED file is never collapsed, so this
|
|
110
|
+
// can never skip a committed byte.
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
80
113
|
let stat;
|
|
81
114
|
try {
|
|
82
115
|
// lstat (NOT stat): the entry itself is inspected without
|
|
@@ -103,8 +136,15 @@ export function expandIncludePaths(include, exclude, root, errors) {
|
|
|
103
136
|
}
|
|
104
137
|
if (stat.isDirectory()) {
|
|
105
138
|
walk(absolute, [...segments, entry]);
|
|
139
|
+
continue;
|
|
106
140
|
}
|
|
107
|
-
|
|
141
|
+
// An ignored file is out of scope by the owner's declaration, and a
|
|
142
|
+
// TRACKED file is never reported by `ls-files --others`, so it can
|
|
143
|
+
// never land here. Neither conceals anything, so neither collects
|
|
144
|
+
// an ExpandError.
|
|
145
|
+
if (!stat.isFile() || gitIgnored.skipsFile(relative))
|
|
146
|
+
continue;
|
|
147
|
+
if (matchesAny(relative, includeMatchers) && !matchesAny(relative, excludeMatchers)) {
|
|
108
148
|
files.push(relative);
|
|
109
149
|
}
|
|
110
150
|
}
|
|
@@ -112,4 +152,55 @@ export function expandIncludePaths(include, exclude, root, errors) {
|
|
|
112
152
|
walk(root, []);
|
|
113
153
|
return files;
|
|
114
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Expands the configured include/exclude globs into the DETECTOR-INPUT
|
|
157
|
+
* scope: every match minus the paths this run's Git-ignore scope
|
|
158
|
+
* excludes. This is the list handed to every plugin's `discover`
|
|
159
|
+
* request, and the classifier's coverage check compares its requested
|
|
160
|
+
* paths against what detectors actually scanned — so an ignored tree
|
|
161
|
+
* must leave BOTH sides, or the closed-world check would compare sets
|
|
162
|
+
* the walk never intended to describe.
|
|
163
|
+
*
|
|
164
|
+
* The caller computes the scope ONCE per run (`gitIgnoredPaths` in
|
|
165
|
+
* `./git-ignored.ts`) and passes the same object here every time, so
|
|
166
|
+
* every enumeration of the scan scope agrees on one answer.
|
|
167
|
+
*
|
|
168
|
+
* Args:
|
|
169
|
+
* include: include globs (at least one, schema-enforced).
|
|
170
|
+
* exclude: exclude globs (possibly empty).
|
|
171
|
+
* root: absolute repo root to walk.
|
|
172
|
+
* gitIgnored: the run's Git-ignore scope; a `known: false` scope skips
|
|
173
|
+
* nothing, which is exactly today's behaviour outside a work tree.
|
|
174
|
+
* errors: out-array collecting every unreadable path.
|
|
175
|
+
*
|
|
176
|
+
* Returns:
|
|
177
|
+
* string[]: deduplicated, codepoint-sorted posix paths.
|
|
178
|
+
*/
|
|
179
|
+
export function expandScanPaths(include, exclude, root, gitIgnored, errors) {
|
|
180
|
+
return expand(include, exclude, root, gitIgnored, errors);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Expands include globs minus exclude globs into concrete repo-root-
|
|
184
|
+
* relative file paths, consulting no ignore rules: the IDENTITY scope.
|
|
185
|
+
* Every glob match is returned, gitignored or not.
|
|
186
|
+
*
|
|
187
|
+
* `collectDeclaredInputs` (input snapshot) calls this and must keep
|
|
188
|
+
* hashing a superset of the scan — a gitignored configured input still
|
|
189
|
+
* moves the receipt digest, which is the conservative direction and the
|
|
190
|
+
* behaviour `assertOutputDisjoint` relies on when it refuses an `--out`
|
|
191
|
+
* that would hide a declared input.
|
|
192
|
+
*
|
|
193
|
+
* Args:
|
|
194
|
+
* include: include globs (at least one, schema-enforced).
|
|
195
|
+
* exclude: exclude globs (possibly empty).
|
|
196
|
+
* root: absolute repo root to walk.
|
|
197
|
+
* errors: out-array collecting every unreadable path.
|
|
198
|
+
*
|
|
199
|
+
* Returns:
|
|
200
|
+
* string[]: deduplicated, codepoint-sorted posix paths. Empty when no
|
|
201
|
+
* included file exists.
|
|
202
|
+
*/
|
|
203
|
+
export function expandIncludePaths(include, exclude, root, errors) {
|
|
204
|
+
return expand(include, exclude, root, NOTHING_IGNORED, errors);
|
|
205
|
+
}
|
|
115
206
|
//# sourceMappingURL=glob.js.map
|
package/dist/glob.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glob.js","sourceRoot":"","sources":["../src/glob.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"glob.js","sourceRoot":"","sources":["../src/glob.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,SAAS,MAAM,WAAW,CAAC;AAIlC,kEAAkE;AAClE,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;AAEtD,0EAA0E;AAC1E,MAAM,eAAe,GAAoB;IACvC,KAAK,EAAE,KAAK;IACZ,cAAc,EAAE,GAAG,EAAE,CAAC,KAAK;IAC3B,SAAS,EAAE,GAAG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,IAAI,CAAC,MAAM,EAAE,IAAI,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC;gBAAE,SAAS;YAC/D,IAAI,UAAU,CAAC,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,eAAe,CAAC,EAAE,CAAC;gBACpF,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACvB,CAAC;QACH,CAAC;IACH,CAAC,CAAC;IACF,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACf,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,eAAe,CAC7B,OAA0B,EAC1B,OAA0B,EAC1B,IAAY,EACZ,UAA2B,EAC3B,MAAsB;IAEtB,OAAO,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;AAC5D,CAAC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAA0B,EAC1B,OAA0B,EAC1B,IAAY,EACZ,MAAsB;IAEtB,OAAO,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,CAAC,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export interface HistoryRun {
|
|
2
|
+
runId: string;
|
|
3
|
+
finishedAt: string;
|
|
4
|
+
status: string;
|
|
5
|
+
testCount: number;
|
|
6
|
+
failedCount: number;
|
|
7
|
+
}
|
|
8
|
+
export interface HistoryTestStatus {
|
|
9
|
+
runId: string;
|
|
10
|
+
logicalKey: string;
|
|
11
|
+
status: string;
|
|
12
|
+
finishedAt: string;
|
|
13
|
+
}
|
|
14
|
+
/** Prunes expired JSONL records and per-run history artifacts using a supplied clock.
|
|
15
|
+
*
|
|
16
|
+
* Args:
|
|
17
|
+
* historyDir: history directory under the ignored run-state root.
|
|
18
|
+
* retentionDays: number of days to retain, or 'off' to disable pruning/storage.
|
|
19
|
+
* nowMs: injected current time for deterministic pruning.
|
|
20
|
+
*
|
|
21
|
+
* Returns:
|
|
22
|
+
* void: expired records and run directories are removed in place.
|
|
23
|
+
*/
|
|
24
|
+
export declare function pruneRunHistory(historyDir: string, retentionDays: number | 'off' | undefined, nowMs?: number): void;
|
|
25
|
+
/** Appends one run summary and only changed per-test statuses to run history.
|
|
26
|
+
*
|
|
27
|
+
* Args:
|
|
28
|
+
* stateDir: authoritative test-gates state directory.
|
|
29
|
+
* retentionDays: history policy, absent or 'off' disables recording.
|
|
30
|
+
* run: run-level summary row.
|
|
31
|
+
* tests: current per-test statuses.
|
|
32
|
+
* nowMs: injected current time for deterministic retention boundaries.
|
|
33
|
+
*
|
|
34
|
+
* Returns:
|
|
35
|
+
* void: history records and the run summary artifact are written when enabled.
|
|
36
|
+
*/
|
|
37
|
+
export declare function recordRunHistory(stateDir: string, retentionDays: number | 'off' | undefined, run: HistoryRun, tests: readonly Omit<HistoryTestStatus, 'runId' | 'finishedAt'>[], nowMs?: number): void;
|
|
38
|
+
/** Queries retained run summaries with optional test, failure, and date filters.
|
|
39
|
+
*
|
|
40
|
+
* Args:
|
|
41
|
+
* historyDir: history directory under the ignored run-state root.
|
|
42
|
+
* filters: optional test substring, failed-only selector, and lower date bound.
|
|
43
|
+
*
|
|
44
|
+
* Returns:
|
|
45
|
+
* HistoryRun[]: matching run summaries in chronological order.
|
|
46
|
+
*/
|
|
47
|
+
export declare function queryRunHistory(historyDir: string, filters?: {
|
|
48
|
+
test?: string;
|
|
49
|
+
failed?: boolean;
|
|
50
|
+
since?: string;
|
|
51
|
+
}): HistoryRun[];
|
|
52
|
+
//# sourceMappingURL=history.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../src/history.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,EACzC,KAAK,SAAa,GACjB,IAAI,CA2BN;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,EACzC,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,SAAS,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,YAAY,CAAC,EAAE,EACjE,KAAK,SAAa,GACjB,IAAI,CA2BN;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GAChE,UAAU,EAAE,CAiBd"}
|