@friggframework/devtools 2.0.0--canary.461.322ea57.0 → 2.0.0--canary.461.2d5ab00.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.
@@ -62,6 +62,8 @@ class MigrationBuilder extends InfrastructureBuilder {
62
62
  // Create S3 bucket for migration status tracking
63
63
  result.resources.FriggMigrationStatusBucket = {
64
64
  Type: 'AWS::S3::Bucket',
65
+ DeletionPolicy: 'Retain', // Protect migration history during stack rollbacks/deletions
66
+ UpdateReplacePolicy: 'Retain', // Protect during stack updates that require replacement
65
67
  Properties: {
66
68
  BucketName: '${self:service}-${self:provider.stage}-migration-status',
67
69
  VersioningConfiguration: {
@@ -78,14 +78,24 @@ async function gatherDiscoveredResources(appDefinition) {
78
78
  const cfDiscovery = new CloudFormationDiscovery(provider);
79
79
  const stackResources = await cfDiscovery.discoverFromStack(stackName);
80
80
 
81
- if (stackResources) {
81
+ // Validate CF discovery results - only use if contains useful data
82
+ const hasVpcData = stackResources?.defaultVpcId;
83
+ const hasKmsData = stackResources?.defaultKmsKeyId;
84
+ const hasAuroraData = stackResources?.auroraClusterId;
85
+ const hasSomeUsefulData = hasVpcData || hasKmsData || hasAuroraData;
86
+
87
+ if (stackResources && hasSomeUsefulData) {
82
88
  console.log(' ✓ Discovered resources from existing CloudFormation stack');
83
89
  console.log('✅ Cloud resource discovery completed successfully!');
84
90
  return stackResources;
85
91
  }
86
92
 
87
- // Fallback to AWS API discovery (fresh deployment or stack not found)
88
- console.log(' ℹ No stack found - running AWS API discovery...');
93
+ // Fallback to AWS API discovery (fresh deployment, stack not found, or stack has no useful data)
94
+ if (stackResources && !hasSomeUsefulData) {
95
+ console.log(' ℹ Stack found but contains no usable resources - running AWS API discovery...');
96
+ } else {
97
+ console.log(' ℹ No stack found - running AWS API discovery...');
98
+ }
89
99
 
90
100
  // Create domain discovery services with provider
91
101
  const vpcDiscovery = new VpcDiscovery(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.461.322ea57.0",
4
+ "version": "2.0.0--canary.461.2d5ab00.0",
5
5
  "dependencies": {
6
6
  "@aws-sdk/client-ec2": "^3.835.0",
7
7
  "@aws-sdk/client-kms": "^3.835.0",
@@ -11,8 +11,8 @@
11
11
  "@babel/eslint-parser": "^7.18.9",
12
12
  "@babel/parser": "^7.25.3",
13
13
  "@babel/traverse": "^7.25.3",
14
- "@friggframework/schemas": "2.0.0--canary.461.322ea57.0",
15
- "@friggframework/test": "2.0.0--canary.461.322ea57.0",
14
+ "@friggframework/schemas": "2.0.0--canary.461.2d5ab00.0",
15
+ "@friggframework/test": "2.0.0--canary.461.2d5ab00.0",
16
16
  "@hapi/boom": "^10.0.1",
17
17
  "@inquirer/prompts": "^5.3.8",
18
18
  "axios": "^1.7.2",
@@ -34,8 +34,8 @@
34
34
  "serverless-http": "^2.7.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@friggframework/eslint-config": "2.0.0--canary.461.322ea57.0",
38
- "@friggframework/prettier-config": "2.0.0--canary.461.322ea57.0",
37
+ "@friggframework/eslint-config": "2.0.0--canary.461.2d5ab00.0",
38
+ "@friggframework/prettier-config": "2.0.0--canary.461.2d5ab00.0",
39
39
  "aws-sdk-client-mock": "^4.1.0",
40
40
  "aws-sdk-client-mock-jest": "^4.1.0",
41
41
  "jest": "^30.1.3",
@@ -70,5 +70,5 @@
70
70
  "publishConfig": {
71
71
  "access": "public"
72
72
  },
73
- "gitHead": "322ea5711e264c07e301f58169414bc67deab2d3"
73
+ "gitHead": "2d5ab0050ff82c5337c813367541b12f8489d427"
74
74
  }