Files
qinglong/scripts/build-bundle-installer.cjs
T
whyour 9bd9306455 feat: ship verified platform bundles for online and offline upgrades
Build complete tar.gz packages with production dependencies for 13 Linux
architecture/libc targets, including ARMv6 hard-float glibc 2.31. Retain the
existing Node runtime and share payload validation between panel downloads,
manual offline upgrades, and clean offline installs.

Verify immutable archive hashes, every payload file/link/mode, lockfiles and
native dependencies before publishing readiness. Apply on explicit restart,
verify the running build, and restore prior files/services on failure. Keep
ARMv6 archive workers interpreted and allow slow worker/startup readiness.

Synchronize prepared jobs when Bash or the operational CLI applies them;
verify the target build before committing and preserve recovery semantics.
Keep old self-contained Bash reloads working without panel job dependencies.

Validation: 770 backend/frontend tests passed (8 platform skips), 293 CLI
tests passed (5 platform skips), targeted reload/rollback regressions,
backend/CLI type checks, and standalone installer build.
2026-10-18 11:43:21 +08:00

23 lines
727 B
JavaScript

const path = require('node:path');
require('../cli/node_modules/esbuild').buildSync({
entryPoints: [path.resolve(__dirname, '../shell/install-bundle.cjs')],
outfile: path.resolve(process.argv[2] || 'output/upgrade/install-bundle.cjs'),
bundle: true,
platform: 'node',
format: 'cjs',
target: 'node20',
minify: true,
legalComments: 'inline',
});
const { spawnSync } = require('node:child_process');
const result = spawnSync(
process.execPath,
[path.resolve(process.argv[2] || 'output/upgrade/install-bundle.cjs')],
{ encoding: 'utf8' },
);
if (
result.status !== 1 ||
!result.stderr.includes('Usage: node install-bundle.cjs')
)
throw new Error('Standalone offline installer did not start correctly');