Skip to content

Commit

Permalink
chore: working on fixing read: 0 error
Browse files Browse the repository at this point in the history
  • Loading branch information
aryanjassal committed Aug 9, 2024
1 parent 1a1dc55 commit 5e9b16e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/client/handlers/VaultsSecretsList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ class VaultsSecretsGetFileTree extends RawHandler<{
});

const filesData = vaultManager.withVaultsG([vaultId], (vault) => {
return vault.readG(async function* (fs): AsyncGenerator<
TreeNode | ContentNode | Uint8Array
> {
return vault.readG(async function* (fs): AsyncGenerator<Uint8Array> {
const fileTreeGen = fileTree.globWalk({
fs: fs,
basePath: '.',
Expand All @@ -59,11 +57,14 @@ class VaultsSecretsGetFileTree extends RawHandler<{
yieldParents: params.yieldParents as boolean,
yieldDirectories: params.yieldDirectories as boolean,
});
return fileTree.serializerStreamFactory(
const serializedStream = fileTree.serializerStreamFactory(
fs,
fileTreeGen,
params.yieldContents as boolean,
);
for await (const res of serializedStream) {
yield res;
}
});
});

Expand Down

0 comments on commit 5e9b16e

Please sign in to comment.