Skip to content

Commit d39ac8d

Browse files
committed
fix(rules): add AWS CloudFront
1 parent 7ea5513 commit d39ac8d

File tree

11 files changed

+67
-0
lines changed

11 files changed

+67
-0
lines changed

src/rules/__snapshots__/index.test.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ exports[`all > should match everything 1`] = `
2424
"auth0",
2525
"aws",
2626
"aws.amplify_hosting",
27+
"aws.cloudfront",
2728
"aws.codebuild",
2829
"aws.dynamodb",
2930
"aws.ec2",

src/rules/spec/githubActions/__snapshots__/component.test.ts.snap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ exports[`docker > should match all dependencies 1`] = `
55
"algolia",
66
"alibabacloud",
77
"aws",
8+
"aws.cloudfront",
89
"aws.ec2",
910
"aws.fargate",
1011
"aws.lambda",
@@ -243,6 +244,11 @@ exports[`docker > should match all dependencies 2`] = `
243244
"bitovi/github-actions-deploy-docker-to-ec2",
244245
"1",
245246
],
247+
[
248+
"githubAction",
249+
"chetan/invalidate-cloudfront-action",
250+
"1",
251+
],
246252
[
247253
"githubAction",
248254
"cloudflare/pages-action",

src/rules/spec/golang/__snapshots__/lockfile.test.ts.snap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
exports[`golang (lockfile) > should match everything 1`] = `
44
[
55
"aws",
6+
"aws.cloudfront",
67
"aws.dynamodb",
78
"aws.ec2",
89
"aws.ecs",
@@ -205,6 +206,11 @@ exports[`golang (lockfile) > should match everything 2`] = `
205206
"github.com/aws/aws-sdk-go-v2",
206207
"v1.0.0",
207208
],
209+
[
210+
"golang",
211+
"github.com/aws/aws-sdk-go-v2/service/cloudfront",
212+
"v1.0.0",
213+
],
208214
[
209215
"golang",
210216
"github.com/aws/aws-sdk-go-v2/service/codebuild",

src/rules/spec/nodejs/__snapshots__/component.test.ts.snap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ exports[`npm > should match everything 1`] = `
1010
"auth0",
1111
"aws",
1212
"aws.amplify_hosting",
13+
"aws.cloudfront",
1314
"aws.codebuild",
1415
"aws.dynamodb",
1516
"aws.ec2",
@@ -200,6 +201,11 @@ exports[`npm > should match everything 2`] = `
200201
"@aws-amplify/ui-react",
201202
"0.0.0",
202203
],
204+
[
205+
"npm",
206+
"@aws-sdk/aws-cloudfront",
207+
"0.0.0",
208+
],
203209
[
204210
"npm",
205211
"@aws-sdk/client-codebuild",

src/rules/spec/php/__snapshots__/component.test.ts.snap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ exports[`php > should match everything 1`] = `
1010
"apache_kafka",
1111
"auth0",
1212
"aws",
13+
"aws.cloudfront",
1314
"aws.dynamodb",
1415
"aws.elasticache",
1516
"aws.lambda",
@@ -298,6 +299,11 @@ exports[`php > should match everything 2`] = `
298299
"docusign/esign-client",
299300
"0.0.0",
300301
],
302+
[
303+
"php",
304+
"dreamonkey/laravel-cloudfront-url-signer",
305+
"0.0.0",
306+
],
301307
[
302308
"php",
303309
"drewm/mailchimp-api",

src/rules/spec/ruby/__snapshots__/lockfile.test.ts.snap

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ exports[`ruby (component) > should match everything 1`] = `
55
"algolia",
66
"auth0",
77
"aws",
8+
"aws.cloudfront",
89
"aws.dynamodb",
910
"aws.ec2",
1011
"aws.ecs",
@@ -121,6 +122,11 @@ exports[`ruby (component) > should match everything 2`] = `
121122
"auth0",
122123
"1.0.0",
123124
],
125+
[
126+
"ruby",
127+
"aws-sdk-cloudfront",
128+
"1.0.0",
129+
],
124130
[
125131
"ruby",
126132
"aws-sdk-codebuild",
@@ -211,6 +217,11 @@ exports[`ruby (component) > should match everything 2`] = `
211217
"cloudflare-rails",
212218
"1.0.0",
213219
],
220+
[
221+
"ruby",
222+
"cloudfront-signer",
223+
"1.0.0",
224+
],
214225
[
215226
"ruby",
216227
"couchbase",

src/rules/spec/rust/__snapshots__/component.test.ts.snap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ exports[`rust (component) > should match everything 1`] = `
66
"apache_cassandra",
77
"auth0",
88
"aws",
9+
"aws.cloudfront",
910
"aws.codebuild",
1011
"aws.dynamodb",
1112
"aws.ec2",
@@ -66,6 +67,11 @@ exports[`rust (component) > should match everything 2`] = `
6667
"auth0",
6768
"1.0.0",
6869
],
70+
[
71+
"rust",
72+
"aws-sdk-cloudfront",
73+
"1.0.0",
74+
],
6975
[
7076
"rust",
7177
"aws-sdk-codebuild",

src/rules/spec/terraform/__snapshots__/resource.test.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ exports[`terraform (resource) > should match everything 1`] = `
44
[
55
"aws",
66
"aws.amplify_hosting",
7+
"aws.cloudfront",
78
"aws.codebuild",
89
"aws.dynamodb",
910
"aws.ec2",

src/rules/storage/aws.cloudfront.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { register } from '../../register.js';
2+
3+
register({
4+
tech: 'aws.cloudfront',
5+
name: 'AWS CloudFront',
6+
type: 'storage',
7+
dependencies: [
8+
{ type: 'npm', name: '@aws-sdk/aws-cloudfront' },
9+
{ type: 'rust', name: 'aws-sdk-cloudfront' },
10+
{ type: 'ruby', name: 'aws-sdk-cloudfront' },
11+
{ type: 'ruby', name: 'cloudfront-signer' },
12+
{ type: 'golang', name: 'github.com/aws/aws-sdk-go-v2/service/cloudfront' },
13+
{
14+
type: 'terraform.resource',
15+
name: /^aws_cloudfront_/,
16+
example: 'aws_cloudfront_function',
17+
},
18+
{ type: 'php', name: 'dreamonkey/laravel-cloudfront-url-signer' },
19+
{ type: 'githubAction', name: 'chetan/invalidate-cloudfront-action' },
20+
{ type: 'githubAction', name: 'chetan/invalidate-cloudfront-action' },
21+
],
22+
});

src/rules/storage/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import './aws.glacier.js';
2+
import './aws.cloudfront.js';
23
import './aws.s3.js';
34
import './gcp.gcs.js';
45
import './supabase.storage.js';

0 commit comments

Comments
 (0)