mirror of
https://github.com/morluto/rea.git
synced 2026-11-06 23:06:18 +00:00
1 parent
47900f99c5
commit
992e930b86
4 files changed
+38
No files matched your search
@@ -155,6 +155,8 @@ export interface ArtifactTraversalOmission {
|
||||
export interface ArtifactReaderTraversal {
|
||||
readonly status: ArtifactInventoryCoverage["status"];
|
||||
readonly limitations: readonly string[];
|
||||
/** Number of directory entries examined, including names omitted before decoding. */
|
||||
readonly examinedEntries?: number;
|
||||
}
|
||||
|
||||
/** Per-iterator observation sink; adapters report intentional omissions without shared state. */
|
||||
|
||||
@@ -271,6 +271,12 @@ const scanDirectory = async (
|
||||
kind: omission.kind,
|
||||
});
|
||||
},
|
||||
onCoverage: (coverage) => {
|
||||
if (coverage.examinedEntries !== undefined)
|
||||
entries = coverage.examinedEntries;
|
||||
if (coverage.status !== "complete") partial = true;
|
||||
limitations.push(...coverage.limitations);
|
||||
},
|
||||
})) {
|
||||
entries++;
|
||||
abortIfNeeded(signal);
|
||||
|
||||
@@ -132,6 +132,7 @@ export class DirectoryArtifactReader implements ArtifactReader {
|
||||
if (unrepresentableNameCount > 0)
|
||||
options?.onCoverage?.({
|
||||
status: "unknown",
|
||||
examinedEntries: examined,
|
||||
limitations: [
|
||||
`Directory contains ${String(unrepresentableNameCount)} entry name(s) that are not valid UTF-8; no filesystem operations were performed for them. First raw basename bytes: ${firstUnrepresentableNameHex ?? "unknown"}.`,
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user