@friggframework/devtools 2.0.0--canary.490.9c3f667.0 → 2.0.0--canary.490.5a16b80.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.
|
@@ -149,7 +149,7 @@ class VpcBuilder extends InfrastructureBuilder {
|
|
|
149
149
|
physicalId = flatDiscovery.defaultVpcId;
|
|
150
150
|
} else if (logicalId === 'FriggLambdaSecurityGroup') {
|
|
151
151
|
resourceType = 'AWS::EC2::SecurityGroup';
|
|
152
|
-
physicalId = flatDiscovery.defaultSecurityGroupId || flatDiscovery.securityGroupId;
|
|
152
|
+
physicalId = flatDiscovery.lambdaSecurityGroupId || flatDiscovery.defaultSecurityGroupId || flatDiscovery.securityGroupId;
|
|
153
153
|
} else if (logicalId === 'FriggPrivateSubnet1') {
|
|
154
154
|
resourceType = 'AWS::EC2::Subnet';
|
|
155
155
|
physicalId = flatDiscovery.privateSubnetId1;
|
|
@@ -99,8 +99,18 @@ class VpcResourceResolver extends BaseResourceResolver {
|
|
|
99
99
|
);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
//
|
|
102
|
+
// Also check flat discovery for lambdaSecurityGroupId (from CloudFormation extraction)
|
|
103
103
|
const structured = discovery._structured || discovery;
|
|
104
|
+
const lambdaSgId = structured.lambdaSecurityGroupId || discovery.lambdaSecurityGroupId;
|
|
105
|
+
|
|
106
|
+
if (lambdaSgId) {
|
|
107
|
+
return this.createStackDecision(
|
|
108
|
+
lambdaSgId,
|
|
109
|
+
'Found FriggLambdaSecurityGroup in CloudFormation stack - must keep in template'
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Check for discovered default security group (from external VPC pattern)
|
|
104
114
|
const defaultSgId = structured.defaultSecurityGroupId || discovery.defaultSecurityGroupId;
|
|
105
115
|
|
|
106
116
|
if (defaultSgId) {
|
|
@@ -311,18 +311,21 @@ class CloudFormationDiscovery {
|
|
|
311
311
|
console.log(` ✓ Found route table in stack: ${PhysicalResourceId}`);
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
-
// NAT Route (proves NAT configuration exists)
|
|
315
|
-
if (LogicalResourceId === 'FriggNATRoute'
|
|
314
|
+
// NAT Route (proves NAT configuration exists) - support both naming patterns
|
|
315
|
+
if ((LogicalResourceId === 'FriggNATRoute' || LogicalResourceId === 'FriggPrivateRoute') &&
|
|
316
|
+
ResourceType === 'AWS::EC2::Route') {
|
|
316
317
|
discovered.natRoute = PhysicalResourceId;
|
|
317
|
-
console.log(` ✓ Found NAT route in stack`);
|
|
318
|
+
console.log(` ✓ Found NAT route in stack: ${LogicalResourceId}`);
|
|
318
319
|
}
|
|
319
320
|
|
|
320
321
|
// Route Table Associations (links subnets to route table)
|
|
321
|
-
if (LogicalResourceId.includes('RouteAssociation') &&
|
|
322
|
+
if (LogicalResourceId.includes('RouteAssociation') &&
|
|
323
|
+
ResourceType === 'AWS::EC2::SubnetRouteTableAssociation') {
|
|
322
324
|
if (!discovered.routeTableAssociations) {
|
|
323
325
|
discovered.routeTableAssociations = [];
|
|
324
326
|
}
|
|
325
327
|
discovered.routeTableAssociations.push(PhysicalResourceId);
|
|
328
|
+
console.log(` ✓ Found route table association: ${LogicalResourceId}`);
|
|
326
329
|
}
|
|
327
330
|
|
|
328
331
|
// VPC - direct extraction (primary method)
|
|
@@ -385,6 +388,15 @@ class CloudFormationDiscovery {
|
|
|
385
388
|
// VPC Endpoint Security Group
|
|
386
389
|
if (LogicalResourceId === 'FriggVPCEndpointSecurityGroup' && ResourceType === 'AWS::EC2::SecurityGroup') {
|
|
387
390
|
discovered.vpcEndpointSecurityGroupId = PhysicalResourceId;
|
|
391
|
+
console.log(` ✓ Found VPC endpoint security group in stack: ${PhysicalResourceId}`);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// Lambda Security Group (if created in stack)
|
|
395
|
+
if (LogicalResourceId === 'FriggLambdaSecurityGroup' && ResourceType === 'AWS::EC2::SecurityGroup') {
|
|
396
|
+
discovered.lambdaSecurityGroupId = PhysicalResourceId;
|
|
397
|
+
// Also set as defaultSecurityGroupId so converter recognizes it
|
|
398
|
+
discovered.defaultSecurityGroupId = PhysicalResourceId;
|
|
399
|
+
console.log(` ✓ Found Lambda security group in stack: ${PhysicalResourceId}`);
|
|
388
400
|
}
|
|
389
401
|
|
|
390
402
|
// VPC Endpoints - support both old and new naming conventions
|
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.5a16b80.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.5a16b80.0",
|
|
20
|
+
"@friggframework/schemas": "2.0.0--canary.490.5a16b80.0",
|
|
21
|
+
"@friggframework/test": "2.0.0--canary.490.5a16b80.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.5a16b80.0",
|
|
50
|
+
"@friggframework/prettier-config": "2.0.0--canary.490.5a16b80.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": "5a16b8073706ae42c15a9b983a9cee83968af058"
|
|
83
83
|
}
|