feat: add deploy for ai-provider

This commit is contained in:
2025-04-26 03:28:55 +08:00
parent a225bd4f16
commit ac207ff374
4 changed files with 348 additions and 1841 deletions

28
bun.config.mjs Normal file
View File

@@ -0,0 +1,28 @@
// @ts-check
// https://bun.sh/docs/bundler
// @ts-ignore
import pkg from './package.json';
import { rollup } from 'rollup';
import rollupConfig from './rollup.config.mjs';
// bun run src/index.ts --
await Bun.build({
target: 'node',
format: 'esm',
entrypoints: ['./src/provider/index.ts'],
outdir: './dist',
naming: {
entry: 'ai-provider.mjs',
},
define: {
ENVISION_VERSION: JSON.stringify(pkg.version),
},
env: 'ENVISION_*',
});
// Rollup build for the CLI
const rollupBundle = await rollup(rollupConfig);
rollupBundle.write({
file: 'dist/ai-provider.d.ts',
});