mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 04:40:43 +00:00
refactor(plugins): decouple bundled plugin runtime loading
This commit is contained in:
@@ -2,6 +2,10 @@ import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { channelTestPrefixes } from "../../vitest.channel-paths.mjs";
|
||||
import { isUnitConfigTestFile } from "../../vitest.unit-paths.mjs";
|
||||
import {
|
||||
BUNDLED_PLUGIN_PATH_PREFIX,
|
||||
BUNDLED_PLUGIN_ROOT_DIR,
|
||||
} from "../lib/bundled-plugin-paths.mjs";
|
||||
import { dedupeFilesPreserveOrder, loadTestRunnerBehavior } from "../test-runner-manifest.mjs";
|
||||
|
||||
const baseConfigPrefixes = ["src/agents/", "src/auto-reply/", "src/commands/", "test/", "ui/"];
|
||||
@@ -55,7 +59,7 @@ export function loadTestCatalog() {
|
||||
const allKnownTestFiles = [
|
||||
...new Set([
|
||||
...walkTestFiles("src"),
|
||||
...walkTestFiles("extensions"),
|
||||
...walkTestFiles(BUNDLED_PLUGIN_ROOT_DIR),
|
||||
...walkTestFiles("packages"),
|
||||
...walkTestFiles("test"),
|
||||
...walkTestFiles(path.join("ui", "src", "ui")),
|
||||
@@ -105,7 +109,7 @@ export function loadTestCatalog() {
|
||||
surface = "e2e";
|
||||
} else if (channelTestPrefixes.some((prefix) => normalizedFile.startsWith(prefix))) {
|
||||
surface = "channels";
|
||||
} else if (normalizedFile.startsWith("extensions/")) {
|
||||
} else if (normalizedFile.startsWith(BUNDLED_PLUGIN_PATH_PREFIX)) {
|
||||
surface = "extensions";
|
||||
} else if (normalizedFile.startsWith("src/gateway/")) {
|
||||
surface = "gateway";
|
||||
|
||||
Reference in New Issue
Block a user