mirror of
https://github.com/morluto/rea.git
synced 2026-12-03 21:46:01 +00:00
refactor(vsix): share interesting-member projection (#16280)
This commit is contained in:
1 parent
7cc831fef9
commit
6f8fe529c2
1 file changed
+11
-21
@@ -1062,30 +1062,20 @@ export const parseVsixPackage = async (
|
||||
kind = resolved.kind;
|
||||
classification = resolved.classification;
|
||||
contents[index] = { ...contents[index]!, kind };
|
||||
if (isVsixInterestingMemberKind(kind))
|
||||
interestingMembers.push({
|
||||
path: file.path,
|
||||
kind,
|
||||
bytes: hashed.length,
|
||||
sha256: sha256Hex(hashed),
|
||||
classification,
|
||||
});
|
||||
} else {
|
||||
} else if (modeExecutable) {
|
||||
// Unread members keep the executable kind their Unix mode implies,
|
||||
// so oversize, encrypted, or traversing helpers stay inventoried.
|
||||
if (modeExecutable) {
|
||||
kind = "executable";
|
||||
contents[index] = { ...contents[index]!, kind };
|
||||
}
|
||||
if (isVsixInterestingMemberKind(kind))
|
||||
interestingMembers.push({
|
||||
path: file.path,
|
||||
kind,
|
||||
bytes: zipMemberSize(file.entry.uncompressedSize),
|
||||
sha256: null,
|
||||
classification: "inferred",
|
||||
});
|
||||
kind = "executable";
|
||||
contents[index] = { ...contents[index]!, kind };
|
||||
}
|
||||
if (isVsixInterestingMemberKind(kind))
|
||||
interestingMembers.push({
|
||||
path: file.path,
|
||||
kind,
|
||||
bytes: hashed?.length ?? zipMemberSize(file.entry.uncompressedSize),
|
||||
sha256: hashed === undefined ? null : sha256Hex(hashed),
|
||||
classification,
|
||||
});
|
||||
kindCounts[kind] += 1;
|
||||
}
|
||||
const vsixIdentity = vsixParsed?.identity ?? null;
|
||||
|
||||
Reference in new issue
Block a user