mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
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.
24 lines
798 B
TypeScript
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");
|
|
});
|
|
});
|