Skip to content

typings: add missing sea binding properties - #65815

Open
hyemimi wants to merge 1 commit into
nodejs:mainfrom
hyemimi:typings-sea-binding
Open

typings: add missing sea binding properties#65815
hyemimi wants to merge 1 commit into
nodejs:mainfrom
hyemimi:typings-sea-binding

Conversation

@hyemimi

@hyemimi hyemimi commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

This updates the sea internal binding declarations to include properties that are already exposed by the native binding.

src/node_sea.cc registers getAssetKeys() and isVfsEnabled() on internalBinding('sea'):

SetMethod(context, target, "isVfsEnabled", IsVfsEnabled);
SetMethod(context, target, "getAssetKeys", GetAssetKeys);

It also conditionally exposes mainCodePath when running as a SEA with VFS enabled:

if (IsSingleExecutable()) {
  SeaResource sea_resource = FindSingleExecutableResource();
  if (static_cast<bool>(sea_resource.flags & SeaFlags::kEnableVfs)) {
    target
        ->Set(context,
              FIXED_ONE_BYTE_STRING(isolate, "mainCodePath"),
              code_path_str)
        .Check();
  }
}

These properties are used by existing internal JavaScript consumers, including lib/internal/vfs/sea.js, lib/internal/vfs/providers/sea.js, and lib/internal/main/embedding.js.

Adding the declarations keeps typings/internalBinding/sea.d.ts aligned with the native binding.

@nodejs-github-bot nodejs-github-bot added the typings Issues and PRs related to internal TypeScript declarations. label Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

typings Issues and PRs related to internal TypeScript declarations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants