feat: 助手配置与服务命令扩展及依赖更新

This commit is contained in:
2025-04-27 03:26:50 +08:00
parent f2abfbf17c
commit 75d181ef43
25 changed files with 296 additions and 64 deletions

View File

@@ -0,0 +1,28 @@
// @ts-check
// https://bun.sh/docs/bundler
import path from 'node:path';
import pkg from './package.json';
import fs from 'node:fs';
// bun run src/index.ts --
import { fileURLToPath } from 'node:url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
/**
*
* @param {string} p
* @returns
*/
export const w = (p) => path.join(__dirname, p);
await Bun.build({
target: 'node',
format: 'esm',
entrypoints: [w('./mod.ts')],
outdir: w('.'),
naming: {
entry: 'mod.mjs',
},
external: ['pm2'],
define: {
ENVISION_VERSION: JSON.stringify(pkg.version),
},
env: 'ENVISION_*',
});