From e604085e78514ae13f295a7ae5870edaac23090b Mon Sep 17 00:00:00 2001 From: Juho Saarinen Date: Mon, 26 Sep 2022 13:34:36 +0300 Subject: [PATCH] fix: typo in username key --- API.md | 2 +- src/types.ts | 2 +- src/utils.ts | 2 +- test/index.test.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/API.md b/API.md index 7c65d08c..1630268e 100644 --- a/API.md +++ b/API.md @@ -153,7 +153,7 @@ Name | Type | Description -----|------|------------- **secret** | [aws_secretsmanager.ISecret](#aws-cdk-lib-aws-secretsmanager-isecret) | Reference to secret where credentials are stored. **passwordKey**? | string | Key containing password.
__*Optional*__ -**usenameKey**? | string | Key containing username.
__*Optional*__ +**usernameKey**? | string | Key containing username.
__*Optional*__ diff --git a/src/types.ts b/src/types.ts index 0b1ebc1c..401e2e61 100644 --- a/src/types.ts +++ b/src/types.ts @@ -126,7 +126,7 @@ export interface ISecret { /** * Key containing username */ - usenameKey?: string; + usernameKey?: string; /** * Key containing password */ diff --git a/src/utils.ts b/src/utils.ts index 667b4a2e..394f445c 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -4,6 +4,6 @@ import { ICredentials, LambdaCredentials } from './types'; export const formatCredentials = (creds?: ICredentials): LambdaCredentials => ({ plainText: creds?.plainText ? `${creds?.plainText?.userName}:${creds?.plainText?.password}` : undefined, secretArn: creds?.secretManager?.secret.secretArn, - usernameKey: creds?.secretManager?.usenameKey, + usernameKey: creds?.secretManager?.usernameKey, passwordKey: creds?.secretManager?.passwordKey, }); \ No newline at end of file diff --git a/test/index.test.ts b/test/index.test.ts index 4db58e60..2ff0f950 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -95,7 +95,7 @@ describe('stack with key-value secret', () => { src: new DockerImageName('javacs3/javacs3:latest', { secretManager: { secret: sm.Secret.fromSecretNameV2(stack, 'SrcSecret', 'key-value-secret'), - usenameKey: 'username', + usernameKey: 'username', passwordKey: 'password', }, }),