@friggframework/devtools 2.0.0--canary.490.29d0c40.0 → 2.0.0--canary.490.0276a54.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;
|
|
@@ -28,6 +28,9 @@ class CloudFormationDiscovery {
|
|
|
28
28
|
*/
|
|
29
29
|
async discoverFromStack(stackName) {
|
|
30
30
|
try {
|
|
31
|
+
// Store stack name for use in helper methods
|
|
32
|
+
this.currentStackName = stackName;
|
|
33
|
+
|
|
31
34
|
// Try to get the stack
|
|
32
35
|
const stack = await this.provider.describeStack(stackName);
|
|
33
36
|
|
|
@@ -118,11 +121,10 @@ class CloudFormationDiscovery {
|
|
|
118
121
|
* We query EC2 to get the actual VPC ID, NAT Gateway ID, and subnet IDs from the route table.
|
|
119
122
|
*
|
|
120
123
|
* @private
|
|
121
|
-
* @param {string} stackName - Stack name
|
|
122
124
|
* @param {Array} resources - CloudFormation stack resources
|
|
123
125
|
* @param {Object} discovered - Object to populate with discovered resources
|
|
124
126
|
*/
|
|
125
|
-
async _extractExternalReferencesFromStackResources(
|
|
127
|
+
async _extractExternalReferencesFromStackResources(resources, discovered) {
|
|
126
128
|
if (!this.provider || !this.provider.getEC2Client) {
|
|
127
129
|
console.log(' ℹ Skipping external reference extraction (EC2 client not available)');
|
|
128
130
|
return;
|
|
@@ -394,6 +396,8 @@ class CloudFormationDiscovery {
|
|
|
394
396
|
// Lambda Security Group (if created in stack)
|
|
395
397
|
if (LogicalResourceId === 'FriggLambdaSecurityGroup' && ResourceType === 'AWS::EC2::SecurityGroup') {
|
|
396
398
|
discovered.lambdaSecurityGroupId = PhysicalResourceId;
|
|
399
|
+
// Also set as defaultSecurityGroupId so converter recognizes it
|
|
400
|
+
discovered.defaultSecurityGroupId = PhysicalResourceId;
|
|
397
401
|
console.log(` ✓ Found Lambda security group in stack: ${PhysicalResourceId}`);
|
|
398
402
|
}
|
|
399
403
|
|
|
@@ -442,7 +446,7 @@ class CloudFormationDiscovery {
|
|
|
442
446
|
|
|
443
447
|
// Extract VPC ID and other external references from routing resource properties
|
|
444
448
|
// This handles the pattern where VPC is external but routing is in the stack
|
|
445
|
-
await this._extractExternalReferencesFromStackResources(
|
|
449
|
+
await this._extractExternalReferencesFromStackResources(resources, discovered);
|
|
446
450
|
|
|
447
451
|
// If we have a VPC ID but no subnet IDs, query EC2 for Frigg-managed subnets
|
|
448
452
|
if (discovered.defaultVpcId && this.provider &&
|
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.0276a54.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.0276a54.0",
|
|
20
|
+
"@friggframework/schemas": "2.0.0--canary.490.0276a54.0",
|
|
21
|
+
"@friggframework/test": "2.0.0--canary.490.0276a54.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.0276a54.0",
|
|
50
|
+
"@friggframework/prettier-config": "2.0.0--canary.490.0276a54.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": "0276a5410ec0dfe27d1c33a04ffad76c92a22876"
|
|
83
83
|
}
|