Skip to content

Commit

Permalink
chore: updated caller for VaultsSecretsList
Browse files Browse the repository at this point in the history
  • Loading branch information
aryanjassal committed Aug 6, 2024
1 parent 1813a10 commit 34102e2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/client/callers/vaultsSecretsList.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { HandlerTypes } from '@matrixai/rpc';
import type VaultsSecretsList from '../handlers/VaultsSecretsList';
import { ServerCaller } from '@matrixai/rpc';
import { UnaryCaller } from '@matrixai/rpc';

type CallerTypes = HandlerTypes<VaultsSecretsList>;

const vaultsSecretsList = new ServerCaller<
const vaultsSecretsList = new UnaryCaller<
CallerTypes['input'],
CallerTypes['output']
>();
Expand Down
6 changes: 3 additions & 3 deletions src/client/handlers/VaultsSecretsList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import type {
SecretPatternMessage,
} from '../types';
import type VaultManager from '../../vaults/VaultManager';
import type { ContentNode, TreeNode } from '../../vaults/types';
import { UnaryHandler } from '@matrixai/rpc';
import * as vaultsUtils from '../../vaults/utils';
import * as vaultsErrors from '../../vaults/errors';
import type { ContentNode, TreeNode } from '../../vaults/types';
import { fileTree } from '../../vaults';

class VaultsSecretsList extends UnaryHandler<
Expand Down Expand Up @@ -40,7 +40,7 @@ class VaultsSecretsList extends UnaryHandler<
const data = await vault.readF(async (fs) => {
const fileTreeGen = fileTree.globWalk({
fs,
basePath: vault.vaultDataDir, // NOTE: check if this is correct
basePath: vault.vaultDataDir, // NOTE: check if this is correct
pattern: input.pattern,
yieldStats: true,
yieldRoot: false,
Expand All @@ -58,7 +58,7 @@ class VaultsSecretsList extends UnaryHandler<
const outputStream = serializedStream.pipeThrough(parserTransform);
for await (const output of outputStream) {
data.push(output);
};
}
return data;
});

Expand Down
4 changes: 2 additions & 2 deletions src/client/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,11 @@ type VaultsLatestVersionMessage = {

type SecretFilesList = {
secretFilesList: Array<string>;
}
};

type SecretPatternMessage = VaultIdentifierMessage & {
pattern: string;
}
};

// NOTE: we used to use SecretNameMessage before. do we need to keep it? look into this.

Expand Down

0 comments on commit 34102e2

Please sign in to comment.