mirror of
https://github.com/Heretek-AI/openclaw.git
synced 2026-07-01 01:37:55 -04:00
a9ae1a6778
Matrix Protocol: - docker-compose.matrix.yml: Dendrite homeserver + PostgreSQL + Nginx TLS - src/channels/plugins/matrix-channel.ts: OpenClaw plugin implementation - docs/matrix-triad-setup.md: Setup guide with auth scheme (@tm1-4:triad.local) MCP Server Integration: - docs/mcp-triad-integration.md: SearXNG, Playwright, GitHub MCP configs - docs/mcp-curiosity-mapping.md: Gap-to-capability mapping Node Sync Architecture: - src/services/node-sync-service.ts: WebSocket peer sync + presence detection - src/services/node-sync-service.test.ts: Unit tests - docs/node-sync-architecture.md: Architecture docs Triad Resilience: - scripts/triad-corruption-check.mjs: SQLite + log + config + git integrity - docs/triad-resilience.md: Recovery procedures - .secure/deployment-logs/README.md: Schema v2 - skills/triad-heartbeat/SKILL.md: Corruption check integration NPM Publish Workflow: - scripts/npm-publish.mjs: version, changelog, validate, publish, rollback - .github/workflows/npm-publish.yml: GitHub Actions with provenance - docs/npm-publish-guide.md: Complete documentation All deliverables tested in Docker before production.
39 lines
1.4 KiB
TypeScript
Executable File
39 lines
1.4 KiB
TypeScript
Executable File
import fs from "node:fs";
|
|
import { channelTestExclude } from "./vitest.channel-paths.mjs";
|
|
import { createScopedVitestConfig } from "./vitest.scoped-config.ts";
|
|
|
|
function loadPatternListFile(filePath: string, label: string): string[] {
|
|
const parsed = JSON.parse(fs.readFileSync(filePath, "utf8")) as unknown;
|
|
if (!Array.isArray(parsed)) {
|
|
throw new TypeError(`${label} must point to a JSON array: ${filePath}`);
|
|
}
|
|
return parsed.filter((value): value is string => typeof value === "string" && value.length > 0);
|
|
}
|
|
|
|
export function loadIncludePatternsFromEnv(
|
|
env: Record<string, string | undefined> = process.env,
|
|
): string[] | null {
|
|
const includeFile = env.OPENCLAW_VITEST_INCLUDE_FILE?.trim();
|
|
if (!includeFile) {
|
|
return null;
|
|
}
|
|
return loadPatternListFile(includeFile, "OPENCLAW_VITEST_INCLUDE_FILE");
|
|
}
|
|
|
|
export function createExtensionsVitestConfig(
|
|
env: Record<string, string | undefined> = process.env,
|
|
) {
|
|
return createScopedVitestConfig(loadIncludePatternsFromEnv(env) ?? ["extensions/**/*.test.ts"], {
|
|
dir: "extensions",
|
|
env,
|
|
pool: "threads",
|
|
passWithNoTests: true,
|
|
// Channel implementations live under extensions/ but are tested by
|
|
// vitest.channels.config.ts (pnpm test:channels) which provides
|
|
// the heavier mock scaffolding they need.
|
|
exclude: channelTestExclude.filter((pattern) => pattern.startsWith("extensions/")),
|
|
});
|
|
}
|
|
|
|
export default createExtensionsVitestConfig();
|