Squashed 'third_party/pi/' content from commit d981de122
git-subtree-dir: third_party/pi git-subtree-split: d981de1229ef899957bbe968bc8dcda02a21f477
This commit is contained in:
28
packages/server/vitest.config.ts
Normal file
28
packages/server/vitest.config.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { defineConfig } from "vitest/config";
|
||||
|
||||
const src = (path: string): string => fileURLToPath(new URL(path, import.meta.url));
|
||||
|
||||
/**
|
||||
* Exact matches for bare specifiers, plus one rule per package for subpath exports such as
|
||||
* `@earendil-works/pi-ai/utils/uuid`. A prefix alias would rewrite those onto `index.ts/utils/uuid`.
|
||||
*/
|
||||
export default defineConfig({
|
||||
test: {
|
||||
globals: true,
|
||||
environment: "node",
|
||||
reporters: process.env.GITHUB_ACTIONS ? ["dot", "github-actions"] : ["dot"],
|
||||
},
|
||||
resolve: {
|
||||
conditions: ["source"],
|
||||
alias: [
|
||||
{ find: /^@earendil-works\/pi-agent-core$/, replacement: src("../agent/src/index.ts") },
|
||||
{ find: /^@earendil-works\/pi-agent-core\/(.+)$/, replacement: `${src("../agent/src/")}$1.ts` },
|
||||
{ find: /^@earendil-works\/pi-ai$/, replacement: src("../ai/src/index.ts") },
|
||||
{ find: /^@earendil-works\/pi-ai\/(.+)$/, replacement: `${src("../ai/src/")}$1.ts` },
|
||||
{ find: /^@earendil-works\/pi-telemetry$/, replacement: src("../telemetry/src/index.ts") },
|
||||
{ find: /^@earendil-works\/pi-protocol$/, replacement: src("../protocol/src/index.ts") },
|
||||
],
|
||||
},
|
||||
ssr: { resolve: { conditions: ["source"] } },
|
||||
});
|
||||
Reference in New Issue
Block a user