tx-webbr-automation

raw JSON →
0.1.20 verified Fri May 01 auth: no javascript

A build pipeline tool for packaging Node.js applications into single executable binaries using Node.js Single Executable Applications (SEA). Version 0.1.20 compiles TypeScript with tsc, bundles with esbuild, generates a SEA blob, injects it into the Node.js binary, and optionally signs the resulting executable for distribution. Key differentiators: integrates TypeScript compilation, bundling, and SEA injection into one pipeline; supports code signing on Windows. Caution: SEA is experimental and Node-version-dependent; not recommended for production without controlling the Node runtime version.

error ERR_REQUIRE_ESM: require() of ES Module
cause Package is ESM-only; CommonJS require is not supported.
fix
Change to import { ... } from 'tx-webbr-automation' or use dynamic import().
error ENOENT: no such file or directory, open '.../sea.blob'
cause The seaConfig.output path does not exist or is incorrectly specified.
fix
Ensure the directory for the blob output exists, or use an absolute path.
error SEA blob injection failed: Invalid argument
cause The Node.js executable path is incorrect or the binary is not a valid Node executable.
fix
Provide the correct path to the Node.js binary (node.exe on Windows).
gotcha SEA blobs are tied to the exact Node.js binary version used. Using a different Node version at runtime may crash or fail silently.
fix Ensure the Node.js executable used for injection matches the target runtime version exactly.
gotcha SEA failures may not produce error messages. Set NODE_DEBUG=sea environment variable to see debug output.
fix Run with NODE_DEBUG=sea to get detailed SEA logs.
gotcha Windows may show 'The signature seems corrupted!' if the executable is not signed. Code signing is separate from SEA.
fix Use signtool on Windows to sign the executable.
gotcha The package is ESM-only. Using require() will throw an error.
fix Use import syntax or dynamic import() instead.
npm install tx-webbr-automation
yarn add tx-webbr-automation
pnpm add tx-webbr-automation

Creates an SEA executable from a bundled JavaScript file, using a custom Node binary.

import { build } from 'tx-webbr-automation';

build({
  input: './dist/index.js',
  output: './myapp.exe',
  nodeExecutable: './node.exe',
  seaConfig: {
    main: './sea-main.js',
    output: './sea.blob',
  },
  sign: false,
}).then(() => {
  console.log('SEA executable created');
}).catch(err => {
  console.error('Build failed:', err);
});