mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 19:16:29 +08:00
feat(server): search blob names from indexer (#12822)
#### PR Dependency Tree * **PR #12822** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added the ability to search for blob names by their IDs within a workspace. - **Tests** - Introduced new test cases and snapshot tests to validate searching blob names and reading filenames from document snapshots. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Binary file not shown.
@@ -12,6 +12,7 @@ export type MockDocSnapshotInput = {
|
||||
docId?: string;
|
||||
blob?: Uint8Array;
|
||||
updatedAt?: Date;
|
||||
snapshotFile?: string;
|
||||
};
|
||||
|
||||
export type MockedDocSnapshot = Snapshot;
|
||||
@@ -23,7 +24,10 @@ export class MockDocSnapshot extends Mocker<
|
||||
override async create(input: MockDocSnapshotInput) {
|
||||
if (!input.blob) {
|
||||
const snapshot = await readFile(
|
||||
path.join(import.meta.dirname, '../__fixtures__/test-doc.snapshot.bin')
|
||||
path.join(
|
||||
import.meta.dirname,
|
||||
`../__fixtures__/${input.snapshotFile ?? 'test-doc.snapshot.bin'}`
|
||||
)
|
||||
);
|
||||
input.blob = snapshot;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user