Skip to content

Commit

Permalink
fix(rules): add AWS CloudFront
Browse files Browse the repository at this point in the history
  • Loading branch information
bodinsamuel committed Sep 17, 2023
1 parent 7ea5513 commit d39ac8d
Show file tree
Hide file tree
Showing 11 changed files with 67 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 @@ -24,6 +24,7 @@ exports[`all > should match everything 1`] = `
"auth0",
"aws",
"aws.amplify_hosting",
"aws.cloudfront",
"aws.codebuild",
"aws.dynamodb",
"aws.ec2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ exports[`docker > should match all dependencies 1`] = `
"algolia",
"alibabacloud",
"aws",
"aws.cloudfront",
"aws.ec2",
"aws.fargate",
"aws.lambda",
Expand Down Expand Up @@ -243,6 +244,11 @@ exports[`docker > should match all dependencies 2`] = `
"bitovi/github-actions-deploy-docker-to-ec2",
"1",
],
[
"githubAction",
"chetan/invalidate-cloudfront-action",
"1",
],
[
"githubAction",
"cloudflare/pages-action",
Expand Down
6 changes: 6 additions & 0 deletions src/rules/spec/golang/__snapshots__/lockfile.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
exports[`golang (lockfile) > should match everything 1`] = `
[
"aws",
"aws.cloudfront",
"aws.dynamodb",
"aws.ec2",
"aws.ecs",
Expand Down Expand Up @@ -205,6 +206,11 @@ exports[`golang (lockfile) > should match everything 2`] = `
"github.com/aws/aws-sdk-go-v2",
"v1.0.0",
],
[
"golang",
"github.com/aws/aws-sdk-go-v2/service/cloudfront",
"v1.0.0",
],
[
"golang",
"github.com/aws/aws-sdk-go-v2/service/codebuild",
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 @@ -10,6 +10,7 @@ exports[`npm > should match everything 1`] = `
"auth0",
"aws",
"aws.amplify_hosting",
"aws.cloudfront",
"aws.codebuild",
"aws.dynamodb",
"aws.ec2",
Expand Down Expand Up @@ -200,6 +201,11 @@ exports[`npm > should match everything 2`] = `
"@aws-amplify/ui-react",
"0.0.0",
],
[
"npm",
"@aws-sdk/aws-cloudfront",
"0.0.0",
],
[
"npm",
"@aws-sdk/client-codebuild",
Expand Down
6 changes: 6 additions & 0 deletions src/rules/spec/php/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ exports[`php > should match everything 1`] = `
"apache_kafka",
"auth0",
"aws",
"aws.cloudfront",
"aws.dynamodb",
"aws.elasticache",
"aws.lambda",
Expand Down Expand Up @@ -298,6 +299,11 @@ exports[`php > should match everything 2`] = `
"docusign/esign-client",
"0.0.0",
],
[
"php",
"dreamonkey/laravel-cloudfront-url-signer",
"0.0.0",
],
[
"php",
"drewm/mailchimp-api",
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 @@ -5,6 +5,7 @@ exports[`ruby (component) > should match everything 1`] = `
"algolia",
"auth0",
"aws",
"aws.cloudfront",
"aws.dynamodb",
"aws.ec2",
"aws.ecs",
Expand Down Expand Up @@ -121,6 +122,11 @@ exports[`ruby (component) > should match everything 2`] = `
"auth0",
"1.0.0",
],
[
"ruby",
"aws-sdk-cloudfront",
"1.0.0",
],
[
"ruby",
"aws-sdk-codebuild",
Expand Down Expand Up @@ -211,6 +217,11 @@ exports[`ruby (component) > should match everything 2`] = `
"cloudflare-rails",
"1.0.0",
],
[
"ruby",
"cloudfront-signer",
"1.0.0",
],
[
"ruby",
"couchbase",
Expand Down
6 changes: 6 additions & 0 deletions src/rules/spec/rust/__snapshots__/component.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ exports[`rust (component) > should match everything 1`] = `
"apache_cassandra",
"auth0",
"aws",
"aws.cloudfront",
"aws.codebuild",
"aws.dynamodb",
"aws.ec2",
Expand Down Expand Up @@ -66,6 +67,11 @@ exports[`rust (component) > should match everything 2`] = `
"auth0",
"1.0.0",
],
[
"rust",
"aws-sdk-cloudfront",
"1.0.0",
],
[
"rust",
"aws-sdk-codebuild",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ exports[`terraform (resource) > should match everything 1`] = `
[
"aws",
"aws.amplify_hosting",
"aws.cloudfront",
"aws.codebuild",
"aws.dynamodb",
"aws.ec2",
Expand Down
22 changes: 22 additions & 0 deletions src/rules/storage/aws.cloudfront.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { register } from '../../register.js';

register({
tech: 'aws.cloudfront',
name: 'AWS CloudFront',
type: 'storage',
dependencies: [
{ type: 'npm', name: '@aws-sdk/aws-cloudfront' },
{ type: 'rust', name: 'aws-sdk-cloudfront' },
{ type: 'ruby', name: 'aws-sdk-cloudfront' },
{ type: 'ruby', name: 'cloudfront-signer' },
{ type: 'golang', name: 'github.com/aws/aws-sdk-go-v2/service/cloudfront' },
{
type: 'terraform.resource',
name: /^aws_cloudfront_/,
example: 'aws_cloudfront_function',
},
{ type: 'php', name: 'dreamonkey/laravel-cloudfront-url-signer' },
{ type: 'githubAction', name: 'chetan/invalidate-cloudfront-action' },
{ type: 'githubAction', name: 'chetan/invalidate-cloudfront-action' },
],
});
1 change: 1 addition & 0 deletions src/rules/storage/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import './aws.glacier.js';
import './aws.cloudfront.js';
import './aws.s3.js';
import './gcp.gcs.js';
import './supabase.storage.js';
1 change: 1 addition & 0 deletions src/types/techs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export type AllowedKeys =
| 'atlassian'
| 'auth0'
| 'aws.amplify_hosting'
| 'aws.cloudfront'
| 'aws.codebuild'
| 'aws.dynamodb'
| 'aws.ec2'
Expand Down

0 comments on commit d39ac8d

Please sign in to comment.