mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-10-07 17:08:34 +08:00
51 lines
1.6 KiB
TypeScript
51 lines
1.6 KiB
TypeScript
// @vitest-environment node
|
|
import { readFileSync } from "node:fs";
|
|
import { resolve } from "node:path";
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
const packageJson = JSON.parse(
|
|
readFileSync(resolve(__dirname, "../package.json"), "utf8"),
|
|
) as {
|
|
name: string;
|
|
main: string;
|
|
module: string;
|
|
types: string;
|
|
exports: Record<string, unknown>;
|
|
};
|
|
|
|
describe("package library metadata", () => {
|
|
it("publishes the agent-server-gui package entrypoints", () => {
|
|
expect(packageJson.name).toBe("@openhands/agent-server-gui");
|
|
expect(packageJson.main).toBe("./dist/index.cjs");
|
|
expect(packageJson.module).toBe("./dist/index.js");
|
|
expect(packageJson.types).toBe("./dist/index.d.ts");
|
|
expect(packageJson.exports).toMatchObject({
|
|
".": {
|
|
types: "./dist/index.d.ts",
|
|
import: "./dist/index.js",
|
|
require: "./dist/index.cjs",
|
|
},
|
|
"./conversation": {
|
|
types: "./dist/components/conversation/index.d.ts",
|
|
import: "./dist/components/conversation/index.js",
|
|
require: "./dist/components/conversation/index.cjs",
|
|
},
|
|
"./settings": {
|
|
types: "./dist/components/settings/index.d.ts",
|
|
import: "./dist/components/settings/index.js",
|
|
require: "./dist/components/settings/index.cjs",
|
|
},
|
|
"./terminal": {
|
|
types: "./dist/components/terminal/index.d.ts",
|
|
import: "./dist/components/terminal/index.js",
|
|
require: "./dist/components/terminal/index.cjs",
|
|
},
|
|
"./i18n": {
|
|
types: "./dist/i18n/index.d.ts",
|
|
import: "./dist/i18n/index.js",
|
|
require: "./dist/i18n/index.cjs",
|
|
},
|
|
});
|
|
});
|
|
});
|