feat(packages): Add selective pi-ai base entrypoints (#5348)
This commit is contained in:
@@ -2,8 +2,11 @@ import { fileURLToPath } from "node:url";
|
||||
import { defineConfig } from "vitest/config";
|
||||
|
||||
const aiSrcIndex = fileURLToPath(new URL("../ai/src/index.ts", import.meta.url));
|
||||
const aiSrcBase = fileURLToPath(new URL("../ai/src/base.ts", import.meta.url));
|
||||
const aiSrcOAuth = fileURLToPath(new URL("../ai/src/oauth.ts", import.meta.url));
|
||||
const aiOpenRouterImages = fileURLToPath(new URL("../ai/src/providers/images/openrouter.ts", import.meta.url));
|
||||
const agentSrcIndex = fileURLToPath(new URL("../agent/src/index.ts", import.meta.url));
|
||||
const agentSrcBase = fileURLToPath(new URL("../agent/src/base.ts", import.meta.url));
|
||||
const tuiSrcIndex = fileURLToPath(new URL("../tui/src/index.ts", import.meta.url));
|
||||
|
||||
export default defineConfig({
|
||||
@@ -20,12 +23,18 @@ export default defineConfig({
|
||||
resolve: {
|
||||
alias: [
|
||||
{ find: /^@earendil-works\/pi-ai$/, replacement: aiSrcIndex },
|
||||
{ find: /^@earendil-works\/pi-ai\/base$/, replacement: aiSrcBase },
|
||||
{ find: /^@earendil-works\/pi-ai\/oauth$/, replacement: aiSrcOAuth },
|
||||
{ find: /^@earendil-works\/pi-ai\/openrouter-images$/, replacement: aiOpenRouterImages },
|
||||
{ find: /^@earendil-works\/pi-agent-core$/, replacement: agentSrcIndex },
|
||||
{ find: /^@earendil-works\/pi-agent-core\/base$/, replacement: agentSrcBase },
|
||||
{ find: /^@earendil-works\/pi-tui$/, replacement: tuiSrcIndex },
|
||||
{ find: /^@mariozechner\/pi-ai$/, replacement: aiSrcIndex },
|
||||
{ find: /^@mariozechner\/pi-ai\/base$/, replacement: aiSrcBase },
|
||||
{ find: /^@mariozechner\/pi-ai\/oauth$/, replacement: aiSrcOAuth },
|
||||
{ find: /^@mariozechner\/pi-ai\/openrouter-images$/, replacement: aiOpenRouterImages },
|
||||
{ find: /^@mariozechner\/pi-agent-core$/, replacement: agentSrcIndex },
|
||||
{ find: /^@mariozechner\/pi-agent-core\/base$/, replacement: agentSrcBase },
|
||||
{ find: /^@mariozechner\/pi-tui$/, replacement: tuiSrcIndex },
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user