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:
fengmk2
2025-06-16 16:34:23 +08:00
committed by GitHub
parent 4f75111055
commit c0c813edfd
9 changed files with 282 additions and 1 deletions
@@ -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;
}