revert: Switch back to tsc for compiling.

This commit is contained in:
cpojer
2026-01-31 18:31:49 +09:00
parent e25fedf932
commit 76361ae3ab
36 changed files with 527 additions and 843 deletions

View File

@@ -102,11 +102,11 @@ describe("installPluginFromArchive", () => {
JSON.stringify({
name: "@openclaw/voice-call",
version: "0.0.1",
openclaw: { extensions: ["./dist/index.mjs"] },
openclaw: { extensions: ["./dist/index.js"] },
}),
"utf-8",
);
fs.writeFileSync(path.join(pkgDir, "dist", "index.mjs"), "export {};", "utf-8");
fs.writeFileSync(path.join(pkgDir, "dist", "index.js"), "export {};", "utf-8");
const archivePath = packToArchive({
pkgDir,
@@ -127,7 +127,7 @@ describe("installPluginFromArchive", () => {
expect(result.pluginId).toBe("voice-call");
expect(result.targetDir).toBe(path.join(stateDir, "extensions", "voice-call"));
expect(fs.existsSync(path.join(result.targetDir, "package.json"))).toBe(true);
expect(fs.existsSync(path.join(result.targetDir, "dist", "index.mjs"))).toBe(true);
expect(fs.existsSync(path.join(result.targetDir, "dist", "index.js"))).toBe(true);
});
it("rejects installing when plugin already exists", async () => {
@@ -140,7 +140,7 @@ describe("installPluginFromArchive", () => {
JSON.stringify({
name: "@openclaw/voice-call",
version: "0.0.1",
openclaw: { extensions: ["./dist/index.mjs"] },
openclaw: { extensions: ["./dist/index.js"] },
}),
"utf-8",
);
@@ -182,10 +182,10 @@ describe("installPluginFromArchive", () => {
JSON.stringify({
name: "@openclaw/zipper",
version: "0.0.1",
openclaw: { extensions: ["./dist/index.mjs"] },
openclaw: { extensions: ["./dist/index.js"] },
}),
);
zip.file("package/dist/index.mjs", "export {};");
zip.file("package/dist/index.js", "export {};");
const buffer = await zip.generateAsync({ type: "nodebuffer" });
fs.writeFileSync(archivePath, buffer);
@@ -203,7 +203,7 @@ describe("installPluginFromArchive", () => {
expect(result.pluginId).toBe("zipper");
expect(result.targetDir).toBe(path.join(stateDir, "extensions", "zipper"));
expect(fs.existsSync(path.join(result.targetDir, "package.json"))).toBe(true);
expect(fs.existsSync(path.join(result.targetDir, "dist", "index.mjs"))).toBe(true);
expect(fs.existsSync(path.join(result.targetDir, "dist", "index.js"))).toBe(true);
});
it("allows updates when mode is update", async () => {
@@ -216,7 +216,7 @@ describe("installPluginFromArchive", () => {
JSON.stringify({
name: "@openclaw/voice-call",
version: "0.0.1",
openclaw: { extensions: ["./dist/index.mjs"] },
openclaw: { extensions: ["./dist/index.js"] },
}),
"utf-8",
);
@@ -234,7 +234,7 @@ describe("installPluginFromArchive", () => {
JSON.stringify({
name: "@openclaw/voice-call",
version: "0.0.2",
openclaw: { extensions: ["./dist/index.mjs"] },
openclaw: { extensions: ["./dist/index.js"] },
}),
"utf-8",
);