@friggframework/devtools 2.0.0--canary.639.cf7e091.0 → 2.0.0--canary.705.9cfd819.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/frigg-cli/README.md +30 -77
- package/frigg-cli/__tests__/unit/commands/generate-iam.test.js +0 -18
- package/frigg-cli/__tests__/unit/commands/install.test.js +341 -594
- package/frigg-cli/generate-command/index.js +0 -1
- package/frigg-cli/generate-iam-command.js +0 -1
- package/frigg-cli/index.js +4 -9
- package/frigg-cli/init-command/backend-first-handler.js +554 -397
- package/frigg-cli/init-command/index.js +35 -82
- package/frigg-cli/install-command/commit-changes.js +8 -40
- package/frigg-cli/install-command/environment-variables.js +0 -15
- package/frigg-cli/install-command/index.js +21 -96
- package/frigg-cli/install-command/install-package.js +4 -77
- package/frigg-cli/install-command/integration-file.js +11 -20
- package/frigg-cli/install-command/template.js +75 -102
- package/frigg-cli/install-command/validate-package.js +4 -36
- package/frigg-cli/package.json +1 -1
- package/frigg-cli/test/init-command.test.js +2 -9
- package/infrastructure/docs/POSTGRES-CONFIGURATION.md +1 -21
- package/infrastructure/domains/database/aurora-builder.js +2 -13
- package/infrastructure/domains/database/aurora-builder.test.js +0 -22
- package/infrastructure/domains/security/iam-generator.js +5 -112
- package/infrastructure/domains/security/iam-generator.test.js +0 -94
- package/infrastructure/domains/shared/utilities/base-definition-factory.js +2 -7
- package/infrastructure/domains/shared/utilities/base-definition-factory.test.js +0 -21
- package/package.json +8 -10
- package/frigg-cli/__tests__/unit/commands/init.test.js +0 -688
- package/frigg-cli/init-command/deployment-modes.js +0 -7
- package/frigg-cli/init-command/safe-path.js +0 -58
- package/frigg-cli/init-command/scaffold-dependencies.js +0 -202
- package/frigg-cli/install-command/app-definition.js +0 -174
- package/frigg-cli/install-command/resolve-module.js +0 -69
- package/frigg-cli/templates/backend/README.md +0 -267
- package/frigg-cli/templates/backend/env.example +0 -20
- package/frigg-cli/templates/backend/gitignore +0 -10
- package/frigg-cli/templates/backend/index.js +0 -114
- package/frigg-cli/templates/backend/infrastructure.js +0 -20
- package/infrastructure/__tests__/scaffold-default-infrastructure.test.js +0 -148
|
@@ -383,18 +383,12 @@ function createBaseDefinition(
|
|
|
383
383
|
},
|
|
384
384
|
},
|
|
385
385
|
},
|
|
386
|
-
// The functions above use `httpApi` events, so osls creates
|
|
387
|
-
// an HTTP API (API Gateway v2, logical ID HttpApi) with only
|
|
388
|
-
// the `$default` stage. HTTP APIs publish `5xx`, not the REST
|
|
389
|
-
// API metric `5XXError`, and the ApiId dimension identifies
|
|
390
|
-
// this API (a Stage dimension would have to be `$default`).
|
|
391
|
-
// https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-metrics.html
|
|
392
386
|
ApiGatewayAlarm5xx: {
|
|
393
387
|
Type: 'AWS::CloudWatch::Alarm',
|
|
394
388
|
Properties: {
|
|
395
389
|
AlarmDescription: 'API Gateway 5xx Errors',
|
|
396
390
|
Namespace: 'AWS/ApiGateway',
|
|
397
|
-
MetricName: '
|
|
391
|
+
MetricName: '5XXError',
|
|
398
392
|
Statistic: 'Sum',
|
|
399
393
|
Threshold: 0,
|
|
400
394
|
ComparisonOperator: 'GreaterThanThreshold',
|
|
@@ -403,6 +397,7 @@ function createBaseDefinition(
|
|
|
403
397
|
AlarmActions: [{ Ref: 'InternalErrorBridgeTopic' }],
|
|
404
398
|
Dimensions: [
|
|
405
399
|
{ Name: 'ApiId', Value: { Ref: 'HttpApi' } },
|
|
400
|
+
{ Name: 'Stage', Value: '${self:provider.stage}' },
|
|
406
401
|
],
|
|
407
402
|
},
|
|
408
403
|
},
|
|
@@ -121,27 +121,6 @@ describe('Base Definition Factory', () => {
|
|
|
121
121
|
expect(result.resources.Resources.ApiGatewayAlarm5xx).toBeDefined();
|
|
122
122
|
});
|
|
123
123
|
|
|
124
|
-
it('alarms on the HTTP API 5xx metric of the API osls creates', () => {
|
|
125
|
-
// The Frigg functions use `httpApi` events, so osls creates an
|
|
126
|
-
// API Gateway v2 HTTP API (logical ID HttpApi) with only the
|
|
127
|
-
// `$default` stage. HTTP APIs publish `5xx` (REST APIs publish
|
|
128
|
-
// `5XXError`) with the ApiId dimension; a Stage dimension set to
|
|
129
|
-
// the deploy stage name would never match `$default`.
|
|
130
|
-
const result = createBaseDefinition({}, {}, {});
|
|
131
|
-
const usesHttpApi = Object.values(result.functions).some((fn) =>
|
|
132
|
-
(fn.events || []).some((event) => event.httpApi)
|
|
133
|
-
);
|
|
134
|
-
expect(usesHttpApi).toBe(true);
|
|
135
|
-
|
|
136
|
-
const alarm = result.resources.Resources.ApiGatewayAlarm5xx;
|
|
137
|
-
expect(alarm.Properties).toMatchObject({
|
|
138
|
-
Namespace: 'AWS/ApiGateway',
|
|
139
|
-
MetricName: '5xx',
|
|
140
|
-
Dimensions: [{ Name: 'ApiId', Value: { Ref: 'HttpApi' } }],
|
|
141
|
-
AlarmActions: [{ Ref: 'InternalErrorBridgeTopic' }],
|
|
142
|
-
});
|
|
143
|
-
});
|
|
144
|
-
|
|
145
124
|
it('should include base IAM permissions', () => {
|
|
146
125
|
const result = createBaseDefinition({}, {}, {});
|
|
147
126
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/devtools",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "2.0.0--canary.
|
|
4
|
+
"version": "2.0.0--canary.705.9cfd819.0",
|
|
5
5
|
"bin": {
|
|
6
6
|
"frigg": "./frigg-cli/index.js"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
9
|
"frigg-cli/",
|
|
10
|
-
"frigg-cli/templates/",
|
|
11
10
|
"infrastructure/",
|
|
12
11
|
"migrations/",
|
|
13
12
|
"management-ui/dist/",
|
|
@@ -19,7 +18,6 @@
|
|
|
19
18
|
"@aws-sdk/client-cloudformation": "^3.705.0",
|
|
20
19
|
"@aws-sdk/client-ec2": "^3.835.0",
|
|
21
20
|
"@aws-sdk/client-kms": "^3.835.0",
|
|
22
|
-
"@aws-sdk/client-lambda": "^3.714.0",
|
|
23
21
|
"@aws-sdk/client-rds": "^3.906.0",
|
|
24
22
|
"@aws-sdk/client-s3": "^3.917.0",
|
|
25
23
|
"@aws-sdk/client-secrets-manager": "^3.906.0",
|
|
@@ -28,9 +26,9 @@
|
|
|
28
26
|
"@babel/eslint-parser": "^7.18.9",
|
|
29
27
|
"@babel/parser": "^7.25.3",
|
|
30
28
|
"@babel/traverse": "^7.25.3",
|
|
31
|
-
"@friggframework/core": "2.0.0--canary.
|
|
32
|
-
"@friggframework/schemas": "2.0.0--canary.
|
|
33
|
-
"@friggframework/test": "2.0.0--canary.
|
|
29
|
+
"@friggframework/core": "2.0.0--canary.705.9cfd819.0",
|
|
30
|
+
"@friggframework/schemas": "2.0.0--canary.705.9cfd819.0",
|
|
31
|
+
"@friggframework/test": "2.0.0--canary.705.9cfd819.0",
|
|
34
32
|
"@hapi/boom": "^10.0.1",
|
|
35
33
|
"@inquirer/prompts": "^5.3.8",
|
|
36
34
|
"axios": "^1.18.0",
|
|
@@ -58,12 +56,12 @@
|
|
|
58
56
|
"validate-npm-package-name": "^5.0.0"
|
|
59
57
|
},
|
|
60
58
|
"devDependencies": {
|
|
61
|
-
"@friggframework/eslint-config": "2.0.0--canary.
|
|
62
|
-
"@friggframework/prettier-config": "2.0.0--canary.
|
|
59
|
+
"@friggframework/eslint-config": "2.0.0--canary.705.9cfd819.0",
|
|
60
|
+
"@friggframework/prettier-config": "2.0.0--canary.705.9cfd819.0",
|
|
63
61
|
"aws-sdk-client-mock": "^4.1.0",
|
|
64
62
|
"aws-sdk-client-mock-jest": "^4.1.0",
|
|
65
63
|
"jest": "^30.1.3",
|
|
66
|
-
"osls": "^3.
|
|
64
|
+
"osls": "^3.58.0",
|
|
67
65
|
"prettier": "^2.7.1",
|
|
68
66
|
"serverless-dotenv-plugin": "^6.0.0",
|
|
69
67
|
"serverless-esbuild": "^1.54.3",
|
|
@@ -91,5 +89,5 @@
|
|
|
91
89
|
"publishConfig": {
|
|
92
90
|
"access": "public"
|
|
93
91
|
},
|
|
94
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "9cfd819cc94f0c7dc1fd2710775cfb93aba3a424"
|
|
95
93
|
}
|