This commit is contained in:
2026-01-20 15:39:46 +08:00
parent 9f20e149a0
commit 89470346be
20 changed files with 330 additions and 195 deletions

View File

@@ -40,6 +40,28 @@ await Bun.build({
},
external,
});
await Bun.build({
target: 'node',
format: 'esm',
entrypoints: [w('./src/main.ts')],
outdir: w('./dist'),
naming: {
entry: 'assistant-opencode.js',
},
define: {
ENVISION_VERSION: JSON.stringify(pkg.version),
},
external,
});
const dts = 'dts -i src/main.ts -o assistant-opencode.d.ts';
Bun.spawnSync({
cmd: ['sh', '-c', dts],
cwd: __dirname,
stdout: 'inherit',
stderr: 'inherit',
});
// const copyDist = ['dist', 'bin'];
const copyDist = ['dist'];
export const copyFileToEnvision = async () => {