You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if Node.js provided a Javascript API for generating SEA blobs. This would eliminate extra file creation and streamline the SEA creation process. I propose adding a function to the node:sea module/API (Typescript used for clarity):
/** * Configuration options for generating a SEA blob * @see https://nodejs.org/api/single-executable-applications.html#generating-single-executable-preparation-blobs */interfaceBlobConfiguration{main: string;disableExperimentalSEAWarning?: boolean;useSnapshot?: boolean;useCodeCache?: boolean;assets?: Record<string,string>;}/** * Generates a SEA blob to be injected into an executable * @param config configuration options for the blob * @returns The blob contents in a buffer */functiongenerateBlob(config: BlobConfiguration): Buffer;
This new function in the SEA API would allow for more streamlined and readable code:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Currently, CLI commands and many files are involved in generating a SEA using Javascript.
For example:
It would be nice if Node.js provided a Javascript API for generating SEA blobs. This would eliminate extra file creation and streamline the SEA creation process. I propose adding a function to the
node:sea
module/API (Typescript used for clarity):This new function in the SEA API would allow for more streamlined and readable code:
Which could even be inlined:
Beta Was this translation helpful? Give feedback.
All reactions