mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 10:20:21 +00:00
chore: rename project to clawdbot
This commit is contained in:
@@ -36,7 +36,7 @@ export async function ensureMediaHosted(
|
||||
if (needsServerStart && !opts.startServer) {
|
||||
await fs.rm(saved.path).catch(() => {});
|
||||
throw new Error(
|
||||
"Media hosting requires the webhook/Funnel server. Start `clawdis webhook`/`clawdis up` or re-run with --serve-media.",
|
||||
"Media hosting requires the webhook/Funnel server. Start `clawdbot webhook`/`clawdbot up` or re-run with --serve-media.",
|
||||
);
|
||||
}
|
||||
if (needsServerStart && opts.startServer) {
|
||||
|
||||
@@ -17,8 +17,8 @@ function isBun(): boolean {
|
||||
|
||||
function prefersSips(): boolean {
|
||||
return (
|
||||
process.env.CLAWDIS_IMAGE_BACKEND === "sips" ||
|
||||
(process.env.CLAWDIS_IMAGE_BACKEND !== "sharp" &&
|
||||
process.env.CLAWDBOT_IMAGE_BACKEND === "sips" ||
|
||||
(process.env.CLAWDBOT_IMAGE_BACKEND !== "sharp" &&
|
||||
isBun() &&
|
||||
process.platform === "darwin")
|
||||
);
|
||||
@@ -31,7 +31,7 @@ async function loadSharp(): Promise<(buffer: Buffer) => ReturnType<Sharp>> {
|
||||
}
|
||||
|
||||
async function withTempDir<T>(fn: (dir: string) => Promise<T>): Promise<T> {
|
||||
const dir = await fs.mkdtemp(path.join(os.tmpdir(), "clawdis-img-"));
|
||||
const dir = await fs.mkdtemp(path.join(os.tmpdir(), "clawdbot-img-"));
|
||||
try {
|
||||
return await fn(dir);
|
||||
} finally {
|
||||
|
||||
@@ -3,7 +3,7 @@ import path from "node:path";
|
||||
import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const realOs = await vi.importActual<typeof import("node:os")>("node:os");
|
||||
const HOME = path.join(realOs.tmpdir(), "clawdis-home-header-ext-test");
|
||||
const HOME = path.join(realOs.tmpdir(), "clawdbot-home-header-ext-test");
|
||||
|
||||
vi.mock("node:os", () => ({
|
||||
default: { homedir: () => HOME, tmpdir: () => realOs.tmpdir() },
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
} from "vitest";
|
||||
|
||||
const realOs = await vi.importActual<typeof import("node:os")>("node:os");
|
||||
const HOME = path.join(realOs.tmpdir(), "clawdis-home-redirect");
|
||||
const HOME = path.join(realOs.tmpdir(), "clawdbot-home-redirect");
|
||||
const mockRequest = vi.fn();
|
||||
|
||||
vi.doMock("node:os", () => ({
|
||||
|
||||
@@ -5,7 +5,7 @@ import sharp from "sharp";
|
||||
import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const realOs = await vi.importActual<typeof import("node:os")>("node:os");
|
||||
const HOME = path.join(realOs.tmpdir(), "clawdis-home-test");
|
||||
const HOME = path.join(realOs.tmpdir(), "clawdbot-home-test");
|
||||
|
||||
vi.mock("node:os", () => ({
|
||||
default: { homedir: () => HOME, tmpdir: () => realOs.tmpdir() },
|
||||
@@ -26,7 +26,7 @@ describe("media store", () => {
|
||||
|
||||
it("creates and returns media directory", async () => {
|
||||
const dir = await store.ensureMediaDir();
|
||||
expect(dir).toContain("clawdis-home-test");
|
||||
expect(dir).toContain("clawdbot-home-test");
|
||||
const stat = await fs.stat(dir);
|
||||
expect(stat.isDirectory()).toBe(true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user