pi-mono/packages/coding-agent/test/package-distribution.test.ts
Mario Zechner 7472cda0d6 feat(coding-agent): remove the experimental server stack and the client, protocol, and server packages
Deletes packages/client, packages/protocol (CBOR codec), packages/server, coding-agent's
src/experimental (except source-resolver.ts, which source runs still preload), src/cli/experimental,
src/client, the example plugin, and their tests. coding-agent no longer depends on @earendil-works/chord.
The installer lock drops esbuild, so its platform-package sanity check goes too.
2026-10-12 10:41:59 +00:00

24 lines
798 B
TypeScript

import { readFileSync } from "node:fs";
import { describe, expect, test } from "vitest";
interface CodingAgentPackageJson {
bin: { pi: string };
main: string;
exports: {
".": { import: string; types: string };
"./rpc-entry": { import: string };
};
}
const packageJson = JSON.parse(
readFileSync(new URL("../package.json", import.meta.url), "utf8"),
) as CodingAgentPackageJson;
describe("package distribution entrypoints", () => {
test("uses the bundle for executables and modular output for libraries", () => {
expect(packageJson.bin.pi).toBe("dist/bundle/cli.js");
expect(packageJson.main).toBe("./dist/index.js");
expect(packageJson.exports["."].import).toBe("./dist/index.js");
expect(packageJson.exports["./rpc-entry"].import).toBe("./dist/bundle/rpc-entry.js");
});
});