mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-24 07:01:49 +00:00
build: update deps except carbon
This commit is contained in:
@@ -77,21 +77,12 @@ describe("memory search async sync", () => {
|
||||
|
||||
it("waits for in-flight search sync during close", async () => {
|
||||
const cfg = buildConfig();
|
||||
let releaseSync = () => {};
|
||||
const syncGate = new Promise<void>((resolve) => {
|
||||
releaseSync = () => resolve();
|
||||
});
|
||||
embedBatch.mockImplementation(async (input: string[]) => {
|
||||
await syncGate;
|
||||
return input.map(() => [0.3, 0.2, 0.1]);
|
||||
});
|
||||
|
||||
manager = await createMemoryManagerOrThrow(cfg);
|
||||
(manager as unknown as { dirty: boolean }).dirty = true;
|
||||
await manager.search("hello");
|
||||
await vi.waitFor(() => {
|
||||
expect((manager as unknown as { syncing: Promise<void> | null }).syncing).toBeTruthy();
|
||||
let releaseSync = () => {};
|
||||
const pendingSync = new Promise<void>((resolve) => {
|
||||
releaseSync = resolve;
|
||||
});
|
||||
(manager as unknown as { syncing: Promise<void> | null }).syncing = pendingSync;
|
||||
|
||||
let closed = false;
|
||||
const closePromise = manager.close().then(() => {
|
||||
|
||||
@@ -137,6 +137,12 @@ const LOCAL_EXTENSION_API_BARREL_GUARDS = [
|
||||
"voice-call",
|
||||
] as const;
|
||||
|
||||
const LOCAL_EXTENSION_API_BARREL_EXCEPTIONS = [
|
||||
// Direct import avoids a circular init path:
|
||||
// accounts.ts -> runtime-api.ts -> openclaw/plugin-sdk/matrix -> extensions/matrix/api.ts -> accounts.ts
|
||||
"extensions/matrix/src/matrix/accounts.ts",
|
||||
] as const;
|
||||
|
||||
function readSource(path: string): string {
|
||||
return readFileSync(resolve(ROOT_DIR, "..", path), "utf8");
|
||||
}
|
||||
@@ -377,6 +383,7 @@ describe("channel import guardrails", () => {
|
||||
for (const file of collectExtensionFiles(extensionId)) {
|
||||
const normalized = file.replaceAll("\\", "/");
|
||||
if (
|
||||
LOCAL_EXTENSION_API_BARREL_EXCEPTIONS.some((suffix) => normalized.endsWith(suffix)) ||
|
||||
normalized.endsWith("/api.ts") ||
|
||||
normalized.includes(".test.") ||
|
||||
normalized.includes(".spec.") ||
|
||||
|
||||
Reference in New Issue
Block a user