new_pull
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { defineConfig } from "vitest/config";
|
||||
|
||||
export const workspaceSourcePaths = {
|
||||
aiIndex: fileURLToPath(new URL("./packages/ai/src/index.ts", import.meta.url)),
|
||||
aiCompat: fileURLToPath(new URL("./packages/ai/src/compat.ts", import.meta.url)),
|
||||
aiOAuth: fileURLToPath(new URL("./packages/ai/src/oauth.ts", import.meta.url)),
|
||||
aiProviders: fileURLToPath(new URL("./packages/ai/src/providers", import.meta.url)),
|
||||
agentIndex: fileURLToPath(new URL("./packages/agent/src/index.ts", import.meta.url)),
|
||||
codingAgentIndex: fileURLToPath(new URL("./packages/coding-agent/src/index.ts", import.meta.url)),
|
||||
tuiIndex: fileURLToPath(new URL("./packages/tui/src/index.ts", import.meta.url)),
|
||||
} as const;
|
||||
|
||||
export default defineConfig({
|
||||
resolve: {
|
||||
alias: [
|
||||
{ find: /^@earendil-works\/pi-ai$/, replacement: workspaceSourcePaths.aiIndex },
|
||||
{ find: /^@earendil-works\/pi-ai\/compat$/, replacement: workspaceSourcePaths.aiCompat },
|
||||
{ find: /^@earendil-works\/pi-ai\/oauth$/, replacement: workspaceSourcePaths.aiOAuth },
|
||||
{
|
||||
find: /^@earendil-works\/pi-ai\/providers\/(.+)$/,
|
||||
replacement: `${workspaceSourcePaths.aiProviders}/$1.ts`,
|
||||
},
|
||||
{ find: /^@earendil-works\/pi-agent-core$/, replacement: workspaceSourcePaths.agentIndex },
|
||||
{ find: /^@earendil-works\/pi-tui$/, replacement: workspaceSourcePaths.tuiIndex },
|
||||
],
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user