mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-17 04:50:51 +00:00
* refactor: remove channel shim directories, point all imports to extensions
Delete the 6 backward-compat shim directories (src/telegram, src/discord,
src/slack, src/signal, src/imessage, src/web) that were re-exporting from
extensions. Update all 112+ source files to import directly from
extensions/{channel}/src/ instead of through the shims.
Also:
- Move src/channels/telegram/ (allow-from, api) to extensions/telegram/src/
- Fix outbound adapters to use resolveOutboundSendDep (fixes 5 pre-existing TS errors)
- Update cross-extension imports (src/web/media.js → extensions/whatsapp/src/media.js)
- Update vitest, tsdown, knip, labeler, and script configs for new paths
- Update guard test allowlists for extension paths
After this, src/ has zero channel-specific implementation code — only the
generic plugin framework remains.
* fix: update raw-fetch guard allowlist line numbers after shim removal
* refactor: document direct extension channel imports
* test: mock transcript module in delivery helpers
31 lines
861 B
TypeScript
31 lines
861 B
TypeScript
import { defineConfig } from "vitest/config";
|
|
import baseConfig from "./vitest.config.ts";
|
|
|
|
const base = baseConfig as unknown as Record<string, unknown>;
|
|
const baseTest = (baseConfig as { test?: { include?: string[]; exclude?: string[] } }).test ?? {};
|
|
const include = (
|
|
baseTest.include ?? ["src/**/*.test.ts", "extensions/**/*.test.ts", "test/format-error.test.ts"]
|
|
).filter((pattern) => !pattern.includes("extensions/"));
|
|
const exclude = baseTest.exclude ?? [];
|
|
|
|
export default defineConfig({
|
|
...base,
|
|
test: {
|
|
...baseTest,
|
|
include,
|
|
exclude: [
|
|
...exclude,
|
|
"src/gateway/**",
|
|
"extensions/**",
|
|
"extensions/telegram/**",
|
|
"extensions/discord/**",
|
|
"extensions/whatsapp/**",
|
|
"src/browser/**",
|
|
"src/line/**",
|
|
"src/agents/**",
|
|
"src/auto-reply/**",
|
|
"src/commands/**",
|
|
],
|
|
},
|
|
});
|