refactor(vsix): share interesting-member projection (#16280)

This commit is contained in:
Vincent Koc authored and GitHub committed 2026-12-03 08:03:40 +00:00
1 parent 7cc831fef9
commit 6f8fe529c2
1 file changed
+11 -21
+11 -21
View File
@@ -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;