add install base

This commit is contained in:
2025-05-17 03:32:38 +08:00
parent 717e434ce0
commit 035ddc248c
28 changed files with 667 additions and 260 deletions

View File

@@ -18,7 +18,7 @@ await Bun.build({
entrypoints: [w('./src/index.ts')],
outdir: w('./dist'),
naming: {
entry: 'assistant.mjs',
entry: 'assistant.js',
},
external: ['pm2'],
define: {
@@ -33,7 +33,7 @@ await Bun.build({
entrypoints: [w('./src/server.ts')],
outdir: w('./dist'),
naming: {
entry: 'assistant-server.mjs',
entry: 'assistant-server.js',
},
define: {
ENVISION_VERSION: JSON.stringify(pkg.version),
@@ -41,9 +41,10 @@ await Bun.build({
external: ['pm2'],
env: 'ENVISION_*',
});
// const copyDist = ['dist', 'bin'];
const copyDist = ['dist'];
export const copyFileToEnvision = async () => {
const src = ['dist', 'bin'].map((dir) => {
const src = copyDist.map((dir) => {
return { absolute: path.join(__dirname, dir), name: dir };
});
const dest = path.join(__dirname, '..');