Files
ChatLab/apps/cli/tsup.config.ts
T
digua d3d2661882 fix(relationships): address galaxy review regressions
Bundle relationship worker entries for packaged builds.

Refresh and surface galaxy task failures, clean detached Pixi layers, cap focused neighborhoods, merge owner nodes across platforms, apply manual friend overrides, and track owner group activity.
2026-06-30 14:41:46 +08:00

35 lines
1.2 KiB
TypeScript

import { defineConfig } from 'tsup'
export default defineConfig({
entry: {
cli: 'src/cli.ts',
index: 'src/index.ts',
'semantic-index-worker': '../../packages/node-runtime/src/semantic-index/worker-thread-entry.ts',
'contacts-worker': '../../packages/node-runtime/src/services/contacts/worker-entry.ts',
'people-relationships-worker': '../../packages/node-runtime/src/services/people/relationships/worker-entry.ts',
},
format: ['esm'],
outDir: 'dist',
outExtension: () => ({ js: '.mjs' }),
splitting: true,
sourcemap: true,
clean: true,
target: 'node20',
platform: 'node',
define: {
'process.env.APTABASE_APP_KEY': JSON.stringify(process.env.APTABASE_APP_KEY || ''),
},
noExternal: [/^@openchatlab\//, 'chatlab-mcp', 'stream-json'],
external: ['better-sqlite3', '@node-rs/jieba'],
banner: {
js: [
"import { createRequire as __createRequire } from 'module';",
"import { dirname as __pathDirname } from 'path';",
"import { fileURLToPath as __fileURLToPath } from 'url';",
'const require = __createRequire(import.meta.url);',
'const __filename = __fileURLToPath(import.meta.url);',
'const __dirname = __pathDirname(__filename);',
].join('\n'),
},
})