Skip to content

Commit

Permalink
fix(rules): add AWS Kinesis
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Sep 18, 2023
1 parent 6d07d57 commit 0529af2
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/rules/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ exports[`all > should match everything 1`] = `
"aws.elasticache",
"aws.fargate",
"aws.glacier",
"aws.kinesis",
"aws.lambda",
"aws.lightsail",
"aws.memorydb",
Expand Down
24 changes: 24 additions & 0 deletions src/rules/api/aws.kinesis.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { register } from '../../register.js';

register({
tech: 'aws.kinesis',
name: 'AWS Kinesis',
type: 'db',
dependencies: [
{ type: 'npm', name: '@aws-sdk/client-kinesis' },
{ type: 'npm', name: '@aws-sdk/client-firehose' },
{ type: 'npm', name: '@aws-cdk/aws-kinesis' },
{ type: 'npm', name: '@aws-cdk/aws-firehose' },
{ type: 'rust', name: 'aws-sdk-kinesis' },
{ type: 'rust', name: 'aws-sdk-firehose' },
{ type: 'ruby', name: 'aws-sdk-kinesis' },
{ type: 'ruby', name: 'aws-sdk-firehose' },
{ type: 'golang', name: 'github.com/aws/aws-sdk-go-v2/service/kinesis' },
{ type: 'golang', name: 'github.com/aws/aws-sdk-go-v2/service/firehose' },
{
type: 'terraform.resource',
name: /^aws_kinesis_/,
example: 'aws_kinesis_stream',
},
],
});
1 change: 1 addition & 0 deletions src/rules/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import './aws.kinesis.js';
import './aws.sagemaker.js';
import './gcp.aiplatform.js';
import './gcp.dialogflow.js';
Expand Down
11 changes: 11 additions & 0 deletions src/rules/spec/golang/__snapshots__/lockfile.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ exports[`golang (lockfile) > should match everything 1`] = `
"aws.eks",
"aws.elasticache",
"aws.glacier",
"aws.kinesis",
"aws.lambda",
"aws.lightsail",
"aws.memorydb",
Expand Down Expand Up @@ -287,11 +288,21 @@ exports[`golang (lockfile) > should match everything 2`] = `
"github.com/aws/aws-sdk-go-v2/service/elasticache",
"v1.0.0",
],
[
"golang",
"github.com/aws/aws-sdk-go-v2/service/firehose",
"v1.0.0",
],
[
"golang",
"github.com/aws/aws-sdk-go-v2/service/glacier",
"v1.0.0",
],
[
"golang",
"github.com/aws/aws-sdk-go-v2/service/kinesis",
"v1.0.0",
],
[
"golang",
"github.com/aws/aws-sdk-go-v2/service/lambda",
Expand Down
21 changes: 21 additions & 0 deletions src/rules/spec/nodejs/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ exports[`npm > should match everything 1`] = `
"aws.eks",
"aws.elasticache",
"aws.glacier",
"aws.kinesis",
"aws.lambda",
"aws.lightsail",
"aws.memorydb",
Expand Down Expand Up @@ -278,6 +279,16 @@ exports[`npm > should match everything 2`] = `
"@aws-cdk/aws-elasticache",
"0.0.0",
],
[
"npm",
"@aws-cdk/aws-firehose",
"0.0.0",
],
[
"npm",
"@aws-cdk/aws-kinesis",
"0.0.0",
],
[
"npm",
"@aws-cdk/aws-lambda",
Expand Down Expand Up @@ -413,11 +424,21 @@ exports[`npm > should match everything 2`] = `
"@aws-sdk/client-elasticache",
"0.0.0",
],
[
"npm",
"@aws-sdk/client-firehose",
"0.0.0",
],
[
"npm",
"@aws-sdk/client-glacier",
"0.0.0",
],
[
"npm",
"@aws-sdk/client-kinesis",
"0.0.0",
],
[
"npm",
"@aws-sdk/client-lambda",
Expand Down
11 changes: 11 additions & 0 deletions src/rules/spec/ruby/__snapshots__/lockfile.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ exports[`ruby (component) > should match everything 1`] = `
"aws.eks",
"aws.elasticache",
"aws.glacier",
"aws.kinesis",
"aws.lambda",
"aws.lightsail",
"aws.memorydb",
Expand Down Expand Up @@ -214,11 +215,21 @@ exports[`ruby (component) > should match everything 2`] = `
"aws-sdk-elasticsearchservice",
"1.0.0",
],
[
"ruby",
"aws-sdk-firehose",
"1.0.0",
],
[
"ruby",
"aws-sdk-glacier",
"1.0.0",
],
[
"ruby",
"aws-sdk-kinesis",
"1.0.0",
],
[
"ruby",
"aws-sdk-lambda",
Expand Down
11 changes: 11 additions & 0 deletions src/rules/spec/rust/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ exports[`rust (component) > should match everything 1`] = `
"aws.eks",
"aws.elasticache",
"aws.glacier",
"aws.kinesis",
"aws.lambda",
"aws.lightsail",
"aws.memorydb",
Expand Down Expand Up @@ -158,11 +159,21 @@ exports[`rust (component) > should match everything 2`] = `
"aws-sdk-elasticsearch",
"1.0.0",
],
[
"rust",
"aws-sdk-firehose",
"1.0.0",
],
[
"rust",
"aws-sdk-glacier",
"1.0.0",
],
[
"rust",
"aws-sdk-kinesis",
"1.0.0",
],
[
"rust",
"aws-sdk-lambda",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ exports[`terraform (resource) > should match everything 1`] = `
"aws.eks",
"aws.elasticache",
"aws.glacier",
"aws.kinesis",
"aws.lambda",
"aws.lightsail",
"aws.memorydb",
Expand Down
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export type AllowedKeys =
| 'aws.elasticache'
| 'aws.fargate'
| 'aws.glacier'
| 'aws.kinesis'
| 'aws.lambda'
| 'aws.lightsail'
| 'aws.memorydb'
Expand Down

0 comments on commit 0529af2

Please sign in to comment.