Files
waggle-os/packages/launcher/tsup.config.ts
shumeiko.it 3a426a5423 feat(launcher): install the server from a prebuilt archive (P1.3c)
The launcher is now a self-contained installer with install, run, update,
doctor and uninstall. Install downloads waggle-server-<version>-<target>
.tar.gz, checks its SHA-256, unpacks it into a per-user program directory
and writes a waggle-server command that runs the tool on the archive's own
Node. Nothing is built on the user's machine and the data directory stays
WAGGLE_DATA_DIR or ~/.waggle.

scripts/build-server-archive.mjs packs the staged desktop sidecar payload
with the built web UI and a manifest. The download location waits for the
repository decision; until then install takes --from or
WAGGLE_RELEASE_BASE_URL (ADR-0009).

Removes install.sh, scripts/waggle-server.sh and their CI job, which the
installer replaces, and the bin name clash with @waggle/cli.
2026-11-01 01:35:54 +01:00

23 lines
595 B
TypeScript

import fs from 'node:fs';
import { defineConfig } from 'tsup';
const { version } = JSON.parse(fs.readFileSync(new URL('./package.json', import.meta.url), 'utf8')) as {
version: string;
};
export default defineConfig({
entry: ['src/cli.ts'],
format: ['esm'],
target: 'node20',
clean: true,
// One self-contained file: install copies it next to the payload, where no
// node_modules exist. The tool only uses Node's built-in modules.
noExternal: [/.*/],
define: {
__WAGGLE_SERVER_VERSION__: JSON.stringify(version),
},
banner: {
js: '#!/usr/bin/env node',
},
});