feat(natives): added embedded addon tarball extraction in natives
- Added embedded addon tarball output in `embed-native.ts` using `embedded-addons.<platform>.tar.gz` artifacts. - Added metadata-rich addon types with `size`, `filePath`, and optional `archive` fields. - Updated extraction to prioritize archive unpacking and skip cached `.node` files when sizes match. - Added `extractEmbeddedAddonArchive()` with archive parsing and safe validation of archive entry names and kinds. - Adjusted release profile to disable line-table generation and strip symbols in `Cargo.toml`. - Added CI-only ELF validation for forbidden sections and regression coverage for issue-823 archive extraction.
This commit is contained in:
+15
@@ -1,6 +1,13 @@
|
||||
export interface EmbeddedAddonFile {
|
||||
variant: "modern" | "baseline" | "default";
|
||||
filename: string;
|
||||
size?: number;
|
||||
filePath?: string;
|
||||
}
|
||||
|
||||
export interface EmbeddedAddonArchive {
|
||||
format: "tar.gz";
|
||||
filename: string;
|
||||
filePath: string;
|
||||
}
|
||||
|
||||
@@ -8,6 +15,7 @@ export interface EmbeddedAddon {
|
||||
platformTag: string;
|
||||
version: string;
|
||||
files: EmbeddedAddonFile[];
|
||||
archive?: EmbeddedAddonArchive;
|
||||
}
|
||||
|
||||
export interface DetectCompiledBinaryInput {
|
||||
@@ -46,4 +54,11 @@ export interface ResolveLoaderCandidatesInput {
|
||||
|
||||
export function resolveLoaderCandidates(input: ResolveLoaderCandidatesInput): string[];
|
||||
|
||||
export interface ExtractEmbeddedAddonArchiveInput {
|
||||
archivePath: string;
|
||||
files: EmbeddedAddonFile[];
|
||||
targetDir: string;
|
||||
}
|
||||
|
||||
export function extractEmbeddedAddonArchive(input: ExtractEmbeddedAddonArchiveInput): string[];
|
||||
export function loadNative(): Record<string, unknown>;
|
||||
|
||||
Reference in New Issue
Block a user