mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 04:50:44 +00:00
refactor: trim helper shape exports
This commit is contained in:
@@ -13,12 +13,12 @@ import { initializeMemoryWikiVault } from "./vault.js";
|
||||
|
||||
const MEMORY_WIKI_TEST_HOME = "/Users/tester";
|
||||
|
||||
export type MemoryWikiTestVault = {
|
||||
type MemoryWikiTestVault = {
|
||||
rootDir: string;
|
||||
config: ResolvedMemoryWikiConfig;
|
||||
};
|
||||
|
||||
export type MemoryWikiPluginApiHarness = {
|
||||
type MemoryWikiPluginApiHarness = {
|
||||
api: OpenClawPluginApi;
|
||||
registerCli: ReturnType<typeof vi.fn>;
|
||||
registerGatewayMethod: ReturnType<typeof vi.fn>;
|
||||
|
||||
@@ -6,7 +6,7 @@ import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/temp-path";
|
||||
|
||||
const tempRoots = new Set<string>();
|
||||
|
||||
export const logger = {
|
||||
const logger = {
|
||||
info() {},
|
||||
warn() {},
|
||||
error() {},
|
||||
|
||||
@@ -6,7 +6,7 @@ import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/temp-path";
|
||||
|
||||
const tempRoots = new Set<string>();
|
||||
|
||||
export const logger = {
|
||||
const logger = {
|
||||
info() {},
|
||||
warn() {},
|
||||
error() {},
|
||||
|
||||
@@ -3,7 +3,7 @@ import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "nod
|
||||
import { join } from "node:path";
|
||||
import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/sandbox";
|
||||
|
||||
export type TranscodeOutcome =
|
||||
type TranscodeOutcome =
|
||||
| { ok: true; buffer: Buffer }
|
||||
| {
|
||||
ok: false;
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { IncomingMessage, ServerResponse } from "node:http";
|
||||
import type { Mock } from "vitest";
|
||||
import { vi } from "vitest";
|
||||
|
||||
export type RegisteredRoute = {
|
||||
type RegisteredRoute = {
|
||||
path: string;
|
||||
accountId: string;
|
||||
handler: (req: IncomingMessage, res: ServerResponse) => Promise<void>;
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
type FixedWindowRateLimiter,
|
||||
} from "openclaw/plugin-sdk/webhook-ingress";
|
||||
|
||||
export type DmAuthorizationResult =
|
||||
type DmAuthorizationResult =
|
||||
| { allowed: true }
|
||||
| { allowed: false; reason: "disabled" | "allowlist-empty" | "not-allowlisted" };
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { EventEmitter } from "node:events";
|
||||
import type { IncomingMessage, ServerResponse } from "node:http";
|
||||
|
||||
export function makeBaseReq(
|
||||
function makeBaseReq(
|
||||
method: string,
|
||||
opts: { headers?: Record<string, string>; url?: string } = {},
|
||||
): IncomingMessage & { destroyed: boolean } {
|
||||
|
||||
@@ -30,7 +30,7 @@ const webhooksPluginConfigSchema = z
|
||||
|
||||
export type WebhookSecretInput = z.infer<typeof secretInputSchema>;
|
||||
|
||||
export type ConfiguredWebhookRouteConfig = {
|
||||
type ConfiguredWebhookRouteConfig = {
|
||||
routeId: string;
|
||||
path: string;
|
||||
sessionKey: string;
|
||||
|
||||
Reference in New Issue
Block a user