From df76fa3c266f7f9b22d2bfaf98ad5accebcabd35 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sat, 26 Jul 2025 21:07:36 -0700 Subject: Fixes type inference for Either.joinRightAsync. Regarding ansible-docker. Will it ever be okay to trust docs?!! --- worker/secret.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'worker/secret.ts') diff --git a/worker/secret.ts b/worker/secret.ts index 11daf06..071b539 100644 --- a/worker/secret.ts +++ b/worker/secret.ts @@ -39,12 +39,12 @@ export interface IVault { // -- -- type TClient = ITraceable; -type TKey = { +export type BitwardenKey = { BW_SESSION: string; BITWARDENCLI_APPDATA_DIR: string; }; type TItemId = string; -export class Bitwarden implements IVault { +export class Bitwarden implements IVault { constructor(private readonly config: BitwardenConfig) {} public unlock(client: TClient) { @@ -52,7 +52,7 @@ export class Bitwarden implements IVault { .move(this.config) .flatMap(TraceUtil.withMetricTrace(Bitwarden.loginMetric)) .map((tConfig) => - Either.fromFailable }>( + Either.fromFailable }>( () => { const sessionPath = path.join(this.config.sessionBaseDirectory, randomUUID()); mkdirSync(sessionPath, { recursive: true }); @@ -78,7 +78,7 @@ export class Bitwarden implements IVault { .get(); } - public fetchSecret(client: TClient, key: TKey, item: string): Promise> { + public fetchSecret(client: TClient, key: BitwardenKey, item: string): Promise> { return client .move(key) .flatMap(TraceUtil.withMetricTrace(Bitwarden.fetchSecretMetric)) @@ -104,7 +104,7 @@ export class Bitwarden implements IVault { .get(); } - public lock(client: TClient, key: TKey) { + public lock(client: TClient, key: BitwardenKey) { return client .move(key) .flatMap(TraceUtil.withMetricTrace(Bitwarden.lockVaultMetric)) -- cgit v1.2.3-70-g09d2