Skip to content

Commit

Permalink
fix(rules): add Aws.lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Aug 21, 2023
1 parent 8723b90 commit ad09ac5
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 1 deletion.
18 changes: 18 additions & 0 deletions src/rules/hosting/aws.lambda.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { register } from '../../register.js';

register({
tech: 'aws.lambda',
name: 'Lambda',
type: 'hosting',
dependencies: [
{ type: 'npm', name: '@aws-sdk/client-lambda' },
{
type: 'docker',
name: /^amazon\/aws-lambda/,
example: 'amazon/aws-lambda-python',
},
{ type: 'rust', name: 'aws-sdk-lambda' },
{ type: 'rust', name: 'lambda_runtime' },
{ type: 'ruby', name: 'aws-sdk-lambda' },
],
});
3 changes: 2 additions & 1 deletion src/rules/hosting/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import './alibabacloud.js';
import './aws.js';
import './aws.ec2.js';
import './aws.js';
import './aws.lambda.js';
import './aws.s3.js';
import './azure.js';
import './elasticstack.js';
Expand Down
6 changes: 6 additions & 0 deletions src/rules/spec/docker/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ exports[`docker > should match everything 1`] = `
[
"aws",
"aws.dynamodb",
"aws.lambda",
"caddy",
"cassandra",
"couchbase",
Expand Down Expand Up @@ -45,6 +46,11 @@ exports[`docker > should match everything 2`] = `
"amazon/aws-cli",
"0.0.0",
],
[
"docker",
"amazon/aws-lambda-python",
"latest",
],
[
"docker",
"amazon/dynamodb-local",
Expand Down
6 changes: 6 additions & 0 deletions src/rules/spec/nodejs/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ exports[`npm > should match everything 1`] = `
"aws",
"aws.dynamodb",
"aws.ec2",
"aws.lambda",
"aws.rds",
"aws.s3",
"bootstrap",
Expand Down Expand Up @@ -122,6 +123,11 @@ exports[`npm > should match everything 2`] = `
"@aws-sdk/client-ec2",
"0.0.0",
],
[
"npm",
"@aws-sdk/client-lambda",
"0.0.0",
],
[
"npm",
"@aws-sdk/client-rds",
Expand Down
6 changes: 6 additions & 0 deletions src/rules/spec/ruby/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ exports[`ruby (component) > should match everything 1`] = `
"aws",
"aws.dynamodb",
"aws.ec2",
"aws.lambda",
"aws.rds",
"aws.s3",
"azure",
Expand Down Expand Up @@ -99,6 +100,11 @@ exports[`ruby (component) > should match everything 2`] = `
"aws-sdk-elasticsearchservice",
"1.0.0",
],
[
"ruby",
"aws-sdk-lambda",
"1.0.0",
],
[
"ruby",
"aws-sdk-rds",
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 @@ -7,6 +7,7 @@ exports[`rust (component) > should match everything 1`] = `
"aws",
"aws.dynamodb",
"aws.ec2",
"aws.lambda",
"aws.rds",
"aws.s3",
"azure",
Expand Down Expand Up @@ -76,6 +77,11 @@ exports[`rust (component) > should match everything 2`] = `
"aws-sdk-elasticsearch",
"1.0.0",
],
[
"rust",
"aws-sdk-lambda",
"1.0.0",
],
[
"rust",
"aws-sdk-rds",
Expand Down Expand Up @@ -176,6 +182,11 @@ exports[`rust (component) > should match everything 2`] = `
"k8s-openapi",
"1.0.0",
],
[
"rust",
"lambda_runtime",
"1.0.0",
],
[
"rust",
"libsqlite3-sys",
Expand Down
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export type AllowedKeys =
| 'auth0'
| 'aws.dynamodb'
| 'aws.ec2'
| 'aws.lambda'
| 'aws.rds'
| 'aws.s3'
| 'aws'
Expand Down

0 comments on commit ad09ac5

Please sign in to comment.