@friggframework/devtools 2.0.0--canary.474.6ec870b.0 → 2.0.0--canary.474.d64c550.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.
Files changed (20) hide show
  1. package/infrastructure/domains/health/application/ports/IPropertyReconciler.js +164 -0
  2. package/infrastructure/domains/health/application/ports/IResourceDetector.js +129 -0
  3. package/infrastructure/domains/health/application/ports/IResourceImporter.js +142 -0
  4. package/infrastructure/domains/health/application/ports/IStackRepository.js +131 -0
  5. package/infrastructure/domains/health/application/ports/index.js +26 -0
  6. package/infrastructure/domains/health/domain/entities/issue.js +250 -0
  7. package/infrastructure/domains/health/domain/entities/issue.test.js +417 -0
  8. package/infrastructure/domains/health/domain/entities/property-mismatch.js +7 -4
  9. package/infrastructure/domains/health/domain/entities/property-mismatch.test.js +28 -4
  10. package/infrastructure/domains/health/domain/entities/resource.js +159 -0
  11. package/infrastructure/domains/health/domain/entities/resource.test.js +432 -0
  12. package/infrastructure/domains/health/domain/entities/stack-health-report.js +306 -0
  13. package/infrastructure/domains/health/domain/entities/stack-health-report.test.js +601 -0
  14. package/infrastructure/domains/health/domain/services/health-score-calculator.js +165 -0
  15. package/infrastructure/domains/health/domain/services/health-score-calculator.test.js +400 -0
  16. package/infrastructure/domains/health/domain/services/mismatch-analyzer.js +234 -0
  17. package/infrastructure/domains/health/domain/services/mismatch-analyzer.test.js +431 -0
  18. package/infrastructure/domains/health/domain/value-objects/stack-identifier.js +13 -0
  19. package/infrastructure/domains/health/domain/value-objects/stack-identifier.test.js +29 -0
  20. package/package.json +6 -6
@@ -195,6 +195,35 @@ describe('StackIdentifier', () => {
195
195
  });
196
196
  });
197
197
 
198
+ describe('toJSON', () => {
199
+ it('should serialize to JSON with account ID', () => {
200
+ const identifier = new StackIdentifier({
201
+ stackName: 'my-app-prod',
202
+ region: 'us-east-1',
203
+ accountId: '123456789012',
204
+ });
205
+
206
+ expect(identifier.toJSON()).toEqual({
207
+ stackName: 'my-app-prod',
208
+ region: 'us-east-1',
209
+ accountId: '123456789012',
210
+ });
211
+ });
212
+
213
+ it('should serialize to JSON without account ID', () => {
214
+ const identifier = new StackIdentifier({
215
+ stackName: 'my-app-prod',
216
+ region: 'us-east-1',
217
+ });
218
+
219
+ expect(identifier.toJSON()).toEqual({
220
+ stackName: 'my-app-prod',
221
+ region: 'us-east-1',
222
+ accountId: null,
223
+ });
224
+ });
225
+ });
226
+
198
227
  describe('immutability', () => {
199
228
  it('should not allow modification of stackName', () => {
200
229
  const identifier = new StackIdentifier({
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.474.6ec870b.0",
4
+ "version": "2.0.0--canary.474.d64c550.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.474.6ec870b.0",
15
- "@friggframework/test": "2.0.0--canary.474.6ec870b.0",
14
+ "@friggframework/schemas": "2.0.0--canary.474.d64c550.0",
15
+ "@friggframework/test": "2.0.0--canary.474.d64c550.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.474.6ec870b.0",
38
- "@friggframework/prettier-config": "2.0.0--canary.474.6ec870b.0",
37
+ "@friggframework/eslint-config": "2.0.0--canary.474.d64c550.0",
38
+ "@friggframework/prettier-config": "2.0.0--canary.474.d64c550.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": "6ec870b531e40de123ba0be2a4ccff3d00d154ae"
73
+ "gitHead": "d64c55085840ccaf0cf6666ba699eb20873d9a81"
74
74
  }