refactor: rename clawdbot to moltbot with legacy compat

This commit is contained in:
Peter Steinberger
2026-01-27 12:19:58 +00:00
parent 83460df96f
commit 6d16a658e5
1839 changed files with 11250 additions and 11199 deletions
+5 -5
View File
@@ -38,7 +38,7 @@ describe("withWhatsAppPrefix", () => {
describe("ensureDir", () => {
it("creates nested directory", async () => {
const tmp = await fs.promises.mkdtemp(path.join(os.tmpdir(), "clawdbot-test-"));
const tmp = await fs.promises.mkdtemp(path.join(os.tmpdir(), "moltbot-test-"));
const target = path.join(tmp, "nested", "dir");
await ensureDir(target);
expect(fs.existsSync(target)).toBe(true);
@@ -90,7 +90,7 @@ describe("jidToE164", () => {
});
it("maps @lid from authDir mapping files", () => {
const authDir = fs.mkdtempSync(path.join(os.tmpdir(), "clawdbot-auth-"));
const authDir = fs.mkdtempSync(path.join(os.tmpdir(), "moltbot-auth-"));
const mappingPath = path.join(authDir, "lid-mapping-456_reverse.json");
fs.writeFileSync(mappingPath, JSON.stringify("5559876"));
expect(jidToE164("456@lid", { authDir })).toBe("+5559876");
@@ -98,7 +98,7 @@ describe("jidToE164", () => {
});
it("maps @hosted.lid from authDir mapping files", () => {
const authDir = fs.mkdtempSync(path.join(os.tmpdir(), "clawdbot-auth-"));
const authDir = fs.mkdtempSync(path.join(os.tmpdir(), "moltbot-auth-"));
const mappingPath = path.join(authDir, "lid-mapping-789_reverse.json");
fs.writeFileSync(mappingPath, JSON.stringify(4440001));
expect(jidToE164("789@hosted.lid", { authDir })).toBe("+4440001");
@@ -110,8 +110,8 @@ describe("jidToE164", () => {
});
it("falls back through lidMappingDirs in order", () => {
const first = fs.mkdtempSync(path.join(os.tmpdir(), "clawdbot-lid-a-"));
const second = fs.mkdtempSync(path.join(os.tmpdir(), "clawdbot-lid-b-"));
const first = fs.mkdtempSync(path.join(os.tmpdir(), "moltbot-lid-a-"));
const second = fs.mkdtempSync(path.join(os.tmpdir(), "moltbot-lid-b-"));
const mappingPath = path.join(second, "lid-mapping-321_reverse.json");
fs.writeFileSync(mappingPath, JSON.stringify("123321"));
expect(jidToE164("321@lid", { lidMappingDirs: [first, second] })).toBe("+123321");