-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support a mix of locator and creation configs for SNS (#210)
Co-authored-by: Igor Savin <[email protected]> Co-authored-by: Kamil Wylegała <[email protected]>
- Loading branch information
1 parent
08b0764
commit f6e73e7
Showing
34 changed files
with
452 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { defineConfig } from 'vitest/config' | ||
|
||
export default defineConfig({ | ||
test: { | ||
globals: true, | ||
poolOptions: { | ||
threads: { | ||
singleThread: true, | ||
}, | ||
}, | ||
pool: 'threads', | ||
watch: false, | ||
environment: 'node', | ||
reporters: ['default'], | ||
coverage: { | ||
provider: 'v8', | ||
include: ['lib/**/*.ts'], | ||
exclude: [ | ||
'lib/**/*.spec.ts', | ||
'lib/**/*.test.ts', | ||
'test/**/*.*', | ||
'lib/types/**/*.*', | ||
'lib/sns/fakes', | ||
], | ||
reporter: ['text'], | ||
all: true, | ||
thresholds: { | ||
lines: 8, | ||
functions: 71, | ||
branches: 70, | ||
statements: 8, | ||
}, | ||
}, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type { CreateTopicCommandInput } from '@aws-sdk/client-sns' | ||
import type { SNSTopicLocatorType } from '../sns/AbstractSnsService' | ||
|
||
export type TopicResolutionOptions = CreateTopicCommandInput | SNSTopicLocatorType | ||
|
||
export function isCreateTopicCommand(value: unknown): value is CreateTopicCommandInput { | ||
return !!value && !!(value as CreateTopicCommandInput).Name | ||
} | ||
|
||
export function isSNSTopicLocatorType(value: unknown): value is SNSTopicLocatorType { | ||
return ( | ||
!!value && | ||
(!!(value as SNSTopicLocatorType).topicArn || !!(value as SNSTopicLocatorType).topicName) | ||
) | ||
} |
Oops, something went wrong.