Use configured CultMesh publication handles in RTS readers
This commit is contained in:
parent
d20d8d684a
commit
3981c7be9e
3 changed files with 12 additions and 5 deletions
|
|
@ -40,7 +40,10 @@ export class AetheriaLocalPublicationReader {
|
|||
schemaId: string,
|
||||
documentId: string,
|
||||
): Promise<unknown> {
|
||||
return CultMesh.documentFromSingleFile(path, schemaId, {
|
||||
return CultMesh.documentFromPublication({
|
||||
kind: "single-file",
|
||||
path,
|
||||
}, schemaId, documentId, {
|
||||
documentId,
|
||||
sourceId: documentId,
|
||||
}).latest();
|
||||
|
|
|
|||
|
|
@ -46,8 +46,12 @@ export class AetheriaRemotePublicationReader {
|
|||
}
|
||||
|
||||
private async readSingleDocument(schemaId: string, recordKey: string): Promise<unknown> {
|
||||
return CultMesh.documentFromPeerSnapshot(
|
||||
() => this.peer(),
|
||||
return CultMesh.documentFromPublication(
|
||||
{
|
||||
kind: "peer-snapshot",
|
||||
peer: () => this.peer(),
|
||||
endpoint: this.endpoint,
|
||||
},
|
||||
schemaId,
|
||||
recordKey,
|
||||
{
|
||||
|
|
|
|||
|
|
@ -491,9 +491,9 @@ foreach ($symbol in $requiredProjectionSymbols) {
|
|||
}
|
||||
}
|
||||
|
||||
& rg -q 'CultMesh.documentFromSingleFile' Electron/aetheria-local-publication-reader.ts
|
||||
& rg -q 'CultMesh.documentFromPublication' Electron/aetheria-local-publication-reader.ts
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Stage 7B verifier failed: local publications should be read through CultMesh document handles."
|
||||
Write-Error "Stage 7B verifier failed: local publications should be read through configured CultMesh document handles."
|
||||
}
|
||||
|
||||
$forbiddenLocalPublicationReaderPlumbing = & rg -n 'SingleFileMessagePackBackingStore|decode\(|pullAll\(' Electron/aetheria-local-publication-reader.ts 2>$null
|
||||
|
|
|
|||
Loading…
Reference in a new issue