@friggframework/devtools 2.0.0--canary.490.df708d7.0 → 2.0.0--canary.490.b61914a.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.
|
@@ -302,21 +302,14 @@ class VpcResourceResolver extends BaseResourceResolver {
|
|
|
302
302
|
|
|
303
303
|
// DynamoDB endpoint only needed if using DynamoDB (not MongoDB or PostgreSQL)
|
|
304
304
|
// Currently framework only supports MongoDB (via Prisma) and PostgreSQL (via Aurora)
|
|
305
|
-
//
|
|
305
|
+
// If not using DynamoDB, skip the endpoint (CloudFormation will delete if it exists)
|
|
306
306
|
const usesDynamoDB = appDefinition.database?.dynamodb?.enable === true;
|
|
307
|
-
|
|
308
|
-
// Special case: If DynamoDB endpoint exists in stack but not needed, preserve it
|
|
309
|
-
// to avoid deletion (user may have enabled it previously)
|
|
310
|
-
const dynamoDbInStack = this.isInStack('FriggDynamoDBVPCEndpoint', discovery);
|
|
311
|
-
const shouldPreserveDynamoDB = !usesDynamoDB && dynamoDbInStack;
|
|
312
307
|
|
|
313
308
|
const endpoints = {
|
|
314
309
|
s3: this._resolveEndpoint('FriggS3VPCEndpoint', 's3', userIntent, appDefinition, discovery),
|
|
315
310
|
dynamodb: usesDynamoDB
|
|
316
311
|
? this._resolveEndpoint('FriggDynamoDBVPCEndpoint', 'dynamodb', userIntent, appDefinition, discovery)
|
|
317
|
-
:
|
|
318
|
-
? this._resolveEndpoint('FriggDynamoDBVPCEndpoint', 'dynamodb', userIntent, appDefinition, discovery)
|
|
319
|
-
: { ownership: null, reason: 'DynamoDB endpoint not needed (application uses MongoDB/PostgreSQL, not DynamoDB)' },
|
|
312
|
+
: { ownership: null, reason: 'DynamoDB endpoint not needed (application uses MongoDB/PostgreSQL, not DynamoDB)' },
|
|
320
313
|
kms: needsKms
|
|
321
314
|
? this._resolveEndpoint('FriggKMSVPCEndpoint', 'kms', userIntent, appDefinition, discovery)
|
|
322
315
|
: { ownership: null, reason: 'KMS endpoint not needed (encryption method is not KMS)' },
|
|
@@ -355,7 +355,7 @@ describe('VpcResourceResolver', () => {
|
|
|
355
355
|
expect(decisions.dynamodb.ownership).toBe('stack'); // DynamoDB needed
|
|
356
356
|
});
|
|
357
357
|
|
|
358
|
-
it('should
|
|
358
|
+
it('should allow deletion of DynamoDB endpoint when not needed', () => {
|
|
359
359
|
const appDefinition = {
|
|
360
360
|
vpc: { ownership: { vpcEndpoints: 'auto' } },
|
|
361
361
|
database: { mongoDB: { enable: true } }, // Using MongoDB (DynamoDB not needed)
|
|
@@ -370,9 +370,9 @@ describe('VpcResourceResolver', () => {
|
|
|
370
370
|
|
|
371
371
|
const decisions = resolver.resolveVpcEndpoints(appDefinition, discovery);
|
|
372
372
|
|
|
373
|
-
// Should
|
|
374
|
-
expect(decisions.dynamodb.ownership).
|
|
375
|
-
expect(decisions.dynamodb.
|
|
373
|
+
// Should return null (allow CloudFormation to delete it since not needed)
|
|
374
|
+
expect(decisions.dynamodb.ownership).toBeNull();
|
|
375
|
+
expect(decisions.dynamodb.reason).toContain('MongoDB/PostgreSQL');
|
|
376
376
|
});
|
|
377
377
|
|
|
378
378
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/devtools",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "2.0.0--canary.490.
|
|
4
|
+
"version": "2.0.0--canary.490.b61914a.0",
|
|
5
5
|
"bin": {
|
|
6
6
|
"frigg": "./frigg-cli/index.js"
|
|
7
7
|
},
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"@babel/eslint-parser": "^7.18.9",
|
|
17
17
|
"@babel/parser": "^7.25.3",
|
|
18
18
|
"@babel/traverse": "^7.25.3",
|
|
19
|
-
"@friggframework/core": "2.0.0--canary.490.
|
|
20
|
-
"@friggframework/schemas": "2.0.0--canary.490.
|
|
21
|
-
"@friggframework/test": "2.0.0--canary.490.
|
|
19
|
+
"@friggframework/core": "2.0.0--canary.490.b61914a.0",
|
|
20
|
+
"@friggframework/schemas": "2.0.0--canary.490.b61914a.0",
|
|
21
|
+
"@friggframework/test": "2.0.0--canary.490.b61914a.0",
|
|
22
22
|
"@hapi/boom": "^10.0.1",
|
|
23
23
|
"@inquirer/prompts": "^5.3.8",
|
|
24
24
|
"axios": "^1.7.2",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"validate-npm-package-name": "^5.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@friggframework/eslint-config": "2.0.0--canary.490.
|
|
50
|
-
"@friggframework/prettier-config": "2.0.0--canary.490.
|
|
49
|
+
"@friggframework/eslint-config": "2.0.0--canary.490.b61914a.0",
|
|
50
|
+
"@friggframework/prettier-config": "2.0.0--canary.490.b61914a.0",
|
|
51
51
|
"aws-sdk-client-mock": "^4.1.0",
|
|
52
52
|
"aws-sdk-client-mock-jest": "^4.1.0",
|
|
53
53
|
"jest": "^30.1.3",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "b61914aa96566c50e35642e1384a60c5b09800c9"
|
|
83
83
|
}
|