Replace split Assets JS with a built bundle and aligned C#/config so SwarmUI loads one script and patch apply stays consistent; drop legacy terse persona and memory seed. Co-authored-by: Cursor <cursoragent@cursor.com>
26 lines
652 B
JavaScript
26 lines
652 B
JavaScript
import * as esbuild from 'esbuild';
|
|
import { existsSync } from 'node:fs';
|
|
|
|
const watch = process.argv.includes('--watch');
|
|
const ctxOpts = {
|
|
entryPoints: ['src/main.js'],
|
|
outfile: 'Assets/assistent.bundle.js',
|
|
bundle: true,
|
|
format: 'iife',
|
|
target: ['es2020'],
|
|
sourcemap: false,
|
|
logLevel: 'info',
|
|
};
|
|
|
|
if (watch) {
|
|
const ctx = await esbuild.context(ctxOpts);
|
|
await ctx.watch();
|
|
console.log('watching src/ → Assets/assistent.bundle.js');
|
|
} else {
|
|
await esbuild.build(ctxOpts);
|
|
if (!existsSync('Assets/assistent.bundle.js')) {
|
|
process.exit(1);
|
|
}
|
|
console.log('built Assets/assistent.bundle.js');
|
|
}
|