feat(native): native reader for indexer (#14055)

This commit is contained in:
DarkSky
2025-12-07 16:22:11 +08:00
committed by GitHub
parent 69cdeedc4e
commit cf4e37c584
28 changed files with 1376 additions and 569 deletions
@@ -1,3 +1,5 @@
import type { CrawlResult } from '@affine/nbstore';
export interface Blob {
key: string;
// base64 encoded data
@@ -149,4 +151,8 @@ export interface NbStorePlugin {
uploadedAt: number | null;
}) => Promise<void>;
clearClocks: (options: { id: string }) => Promise<void>;
crawlDocData: (options: {
id: string;
docId: string;
}) => Promise<CrawlResult>;
}
@@ -336,4 +336,7 @@ export const NbStoreNativeDBApis: NativeDBApis = {
uploadedAt: uploadedAt ? uploadedAt.getTime() : null,
});
},
crawlDocData: async function (id: string, docId: string) {
return NbStore.crawlDocData({ id, docId });
},
};