branding: default to clawdis paths and launchd label
This commit is contained in:
@@ -9,8 +9,9 @@ const HOME = path.join(realOs.tmpdir(), "warelay-home-redirect");
|
||||
const mockRequest = vi.fn();
|
||||
|
||||
vi.doMock("node:os", () => ({
|
||||
default: { homedir: () => HOME },
|
||||
default: { homedir: () => HOME, tmpdir: () => realOs.tmpdir() },
|
||||
homedir: () => HOME,
|
||||
tmpdir: () => realOs.tmpdir(),
|
||||
}));
|
||||
|
||||
vi.doMock("node:https", () => ({
|
||||
|
||||
@@ -7,8 +7,9 @@ const realOs = await vi.importActual<typeof import("node:os")>("node:os");
|
||||
const HOME = path.join(realOs.tmpdir(), "warelay-home-test");
|
||||
|
||||
vi.mock("node:os", () => ({
|
||||
default: { homedir: () => HOME },
|
||||
default: { homedir: () => HOME, tmpdir: () => realOs.tmpdir() },
|
||||
homedir: () => HOME,
|
||||
tmpdir: () => realOs.tmpdir(),
|
||||
}));
|
||||
|
||||
const store = await import("./store.js");
|
||||
|
||||
@@ -2,13 +2,13 @@ import crypto from "node:crypto";
|
||||
import { createWriteStream } from "node:fs";
|
||||
import fs from "node:fs/promises";
|
||||
import { request } from "node:https";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { pipeline } from "node:stream/promises";
|
||||
|
||||
import { detectMime, extensionForMime } from "./mime.js";
|
||||
import { CONFIG_DIR } from "../utils.js";
|
||||
|
||||
const MEDIA_DIR = path.join(os.homedir(), ".warelay", "media");
|
||||
const MEDIA_DIR = path.join(CONFIG_DIR, "media");
|
||||
const MAX_BYTES = 5 * 1024 * 1024; // 5MB
|
||||
const DEFAULT_TTL_MS = 2 * 60 * 1000; // 2 minutes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user