feat(native): add prebuilt Node-API flock support

This commit is contained in:
imccyu
2026-09-08 20:49:10 +08:00
parent 7264906f99
commit d927cbff99
93 changed files with 1904 additions and 551 deletions
@@ -7,8 +7,8 @@
* `pnpm run build:native` would ship an EMPTY platform package — the
* binary's absence surfacing only at runtime as a failed probe on every
* consumer — and a binary copied across packages would advertise an
* architecture it cannot execute. The check is presence + ELF `e_machine`
* against the package's declared `cpu`. `verify-packed-install.mjs`
* architecture it cannot execute. Checks cover ELF/Mach-O format, architecture,
* declared payloads, and Node-API exports. `verify-packed-install.mjs`
* separately pins the installed tarball bytes to the workspace build.
*
* Runs from each platform package's `prepack` hook (pnpm sets the script
@@ -23,7 +23,7 @@ const packageDir = process.argv[2] ? path.resolve(root, process.argv[2]) : proce
try {
const { name, count } = verifyPlatformBinaries(packageDir);
console.log(`verify-launcher-binary: ${name}${count} binaries present with the right ELF architecture.`);
console.log(`verify-launcher-binary: ${name}${count} binaries present with the right native format and architecture.`);
} catch (error) {
console.error(`verify-launcher-binary: ${error instanceof Error ? error.message : error}`);
process.exit(1);