@friggframework/devtools 2.0.0--canary.710.9045bbc.0 → 2.0.0--canary.711.f8b6445.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 (24) hide show
  1. package/frigg-cli/__tests__/unit/commands/deploy.test.js +24 -30
  2. package/frigg-cli/__tests__/unit/commands/doctor.test.js +6 -10
  3. package/frigg-cli/__tests__/unit/commands/install.test.js +0 -7
  4. package/frigg-cli/__tests__/unit/commands/ui.test.js +30 -31
  5. package/frigg-cli/__tests__/unit/dependencies.test.js +2 -6
  6. package/frigg-cli/index.test.js +158 -0
  7. package/infrastructure/__tests__/postgres-config.test.js +835 -241
  8. package/infrastructure/__tests__/template-generation.test.js +8 -36
  9. package/infrastructure/domains/health/application/use-cases/__tests__/mismatch-analyzer-method-name.test.js +8 -12
  10. package/infrastructure/domains/health/application/use-cases/__tests__/repair-via-import-use-case.test.js +7 -19
  11. package/infrastructure/domains/health/application/use-cases/run-health-check-use-case.test.js +8 -12
  12. package/infrastructure/domains/health/domain/services/__tests__/import-progress-monitor.test.js +18 -17
  13. package/infrastructure/domains/health/domain/services/__tests__/update-progress-monitor.test.js +2 -12
  14. package/infrastructure/domains/health/infrastructure/adapters/__tests__/orphan-detection-relationship-analysis.test.js +1 -8
  15. package/infrastructure/domains/health/infrastructure/adapters/aws-property-reconciler.test.js +2 -4
  16. package/infrastructure/domains/health/infrastructure/adapters/aws-resource-detector.test.js +0 -10
  17. package/infrastructure/domains/networking/vpc-builder.js +8 -18
  18. package/infrastructure/domains/networking/vpc-builder.test.js +13 -32
  19. package/infrastructure/domains/shared/cloudformation-discovery.test.js +6 -36
  20. package/infrastructure/infrastructure-composer.test.js +794 -268
  21. package/infrastructure/integration.test.js +381 -0
  22. package/infrastructure/scripts/build-prisma-layer.test.js +7 -28
  23. package/infrastructure/scripts/build-time-discovery.test.js +3 -18
  24. package/package.json +7 -7
@@ -164,7 +164,7 @@ describe('CloudFormationDiscovery', () => {
164
164
  expect(result.routeTableId).toBe('rtb-123');
165
165
  expect(result.vpcEndpointSecurityGroupId).toBe('sg-vpce-123');
166
166
  expect(result.s3VpcEndpointId).toBe('vpce-s3-123');
167
- expect(result.dynamodbVpcEndpointId).toBe('vpce-ddb-123');
167
+ expect(result.dynamoDbVpcEndpointId).toBe('vpce-ddb-123');
168
168
  expect(result.kmsVpcEndpointId).toBe('vpce-kms-123');
169
169
  expect(result.secretsManagerVpcEndpointId).toBe('vpce-sm-123');
170
170
  });
@@ -190,9 +190,6 @@ describe('CloudFormationDiscovery', () => {
190
190
 
191
191
  expect(result).toEqual({
192
192
  fromCloudFormationStack: true,
193
- // _extractFromResources() initialises the structured endpoint map whenever
194
- // the stack has resources (37a354e8)
195
- vpcEndpoints: {},
196
193
  stackName: 'test-stack',
197
194
  auroraClusterId: 'test-cluster',
198
195
  existingLogicalIds: ['FriggAuroraCluster'],
@@ -260,9 +257,6 @@ describe('CloudFormationDiscovery', () => {
260
257
 
261
258
  expect(result).toEqual({
262
259
  fromCloudFormationStack: true,
263
- // _extractFromResources() initialises the structured endpoint map whenever
264
- // the stack has resources (37a354e8)
265
- vpcEndpoints: {},
266
260
  stackName: 'test-stack',
267
261
  migrationStatusBucket: 'test-migration-bucket',
268
262
  existingLogicalIds: ['FriggMigrationStatusBucket'],
@@ -291,9 +285,6 @@ describe('CloudFormationDiscovery', () => {
291
285
 
292
286
  expect(result).toEqual({
293
287
  fromCloudFormationStack: true,
294
- // _extractFromResources() initialises the structured endpoint map whenever
295
- // the stack has resources (37a354e8)
296
- vpcEndpoints: {},
297
288
  stackName: 'test-stack',
298
289
  migrationQueueUrl:
299
290
  'https://sqs.us-east-1.amazonaws.com/123456789/test-queue',
@@ -322,9 +313,6 @@ describe('CloudFormationDiscovery', () => {
322
313
 
323
314
  expect(result).toEqual({
324
315
  fromCloudFormationStack: true,
325
- // _extractFromResources() initialises the structured endpoint map whenever
326
- // the stack has resources (37a354e8)
327
- vpcEndpoints: {},
328
316
  stackName: 'test-stack',
329
317
  natGatewayId: 'nat-0123456789',
330
318
  existingLogicalIds: ['FriggNatGateway'],
@@ -352,9 +340,6 @@ describe('CloudFormationDiscovery', () => {
352
340
 
353
341
  expect(result).toEqual({
354
342
  fromCloudFormationStack: true,
355
- // _extractFromResources() initialises the structured endpoint map whenever
356
- // the stack has resources (37a354e8)
357
- vpcEndpoints: {},
358
343
  stackName: 'test-stack',
359
344
  defaultVpcId: 'vpc-037ec55fe87aec1e7',
360
345
  existingLogicalIds: ['FriggVPC'],
@@ -393,9 +378,6 @@ describe('CloudFormationDiscovery', () => {
393
378
 
394
379
  expect(result).toEqual({
395
380
  fromCloudFormationStack: true,
396
- // _extractFromResources() initialises the structured endpoint map whenever
397
- // the stack has resources (37a354e8)
398
- vpcEndpoints: {},
399
381
  stackName: 'test-stack',
400
382
  defaultVpcId: 'vpc-123', // VpcBuilder expects 'defaultVpcId'
401
383
  defaultKmsKeyId: 'arn:aws:kms:us-east-1:123456789:key/abc',
@@ -424,9 +406,6 @@ describe('CloudFormationDiscovery', () => {
424
406
 
425
407
  expect(result).toEqual({
426
408
  fromCloudFormationStack: true,
427
- // _extractFromResources() initialises the structured endpoint map whenever
428
- // the stack has resources (37a354e8)
429
- vpcEndpoints: {},
430
409
  stackName: 'test-stack',
431
410
  });
432
411
  });
@@ -460,11 +439,6 @@ describe('CloudFormationDiscovery', () => {
460
439
  SecurityGroups: [{ VpcId: 'vpc-123' }],
461
440
  });
462
441
 
463
- // Mock the VPC's default security group lookup (added in 37a354e8)
464
- mockEC2Client.send.mockResolvedValueOnce({
465
- SecurityGroups: [{ GroupId: 'sg-default-123' }],
466
- });
467
-
468
442
  // Mock subnet query
469
443
  mockEC2Client.send.mockResolvedValueOnce({
470
444
  Subnets: [
@@ -495,11 +469,9 @@ describe('CloudFormationDiscovery', () => {
495
469
 
496
470
  const result = await cfDiscovery.discoverFromStack('test-stack');
497
471
 
498
- expect(result.defaultVpcId).toBe('vpc-123');
499
- expect(result.defaultSecurityGroupId).toBe('sg-default-123');
500
472
  expect(result.privateSubnetId1).toBe('subnet-private-1');
501
473
  expect(result.privateSubnetId2).toBe('subnet-private-2');
502
- expect(mockEC2Client.send).toHaveBeenCalledTimes(3);
474
+ expect(mockEC2Client.send).toHaveBeenCalledTimes(2);
503
475
  });
504
476
 
505
477
  it('should handle EC2 subnet query errors gracefully', async () => {
@@ -767,7 +739,7 @@ describe('CloudFormationDiscovery', () => {
767
739
  expect(result.vpcEndpoints.s3).toBe('vpce-0352ceac2124c14be');
768
740
  expect(result.vpcEndpoints.dynamodb).toBe('vpce-0b06c4f631199ea68');
769
741
  expect(result.s3VpcEndpointId).toBe('vpce-0352ceac2124c14be');
770
- expect(result.dynamodbVpcEndpointId).toBe('vpce-0b06c4f631199ea68');
742
+ expect(result.dynamoDbVpcEndpointId).toBe('vpce-0b06c4f631199ea68');
771
743
 
772
744
  // Verify NO VPC/KMS resources (they're external)
773
745
  expect(result.defaultVpcId).toBeUndefined();
@@ -804,7 +776,7 @@ describe('CloudFormationDiscovery', () => {
804
776
  expect(result.vpcEndpoints.s3).toBe('vpce-legacy-s3');
805
777
  expect(result.vpcEndpoints.dynamodb).toBe('vpce-legacy-ddb');
806
778
  expect(result.s3VpcEndpointId).toBe('vpce-legacy-s3');
807
- expect(result.dynamodbVpcEndpointId).toBe('vpce-legacy-ddb');
779
+ expect(result.dynamoDbVpcEndpointId).toBe('vpce-legacy-ddb');
808
780
  });
809
781
 
810
782
  it('should extract FriggLambdaSecurityGroup from stack', async () => {
@@ -835,9 +807,7 @@ describe('CloudFormationDiscovery', () => {
835
807
 
836
808
  // Lambda security group should be extracted
837
809
  expect(result.lambdaSecurityGroupId).toBe('sg-01002240c6a446202');
838
- // The Lambda SG must not masquerade as the VPC's default SG
839
- // (defaultSecurityGroupId is only ever the VPC default; see 37a354e8).
840
- expect(result.defaultSecurityGroupId).toBeUndefined();
810
+ expect(result.defaultSecurityGroupId).toBe('sg-01002240c6a446202');
841
811
  expect(result.existingLogicalIds).toContain(
842
812
  'FriggLambdaSecurityGroup'
843
813
  );
@@ -929,7 +899,7 @@ describe('CloudFormationDiscovery', () => {
929
899
 
930
900
  describe('existingLogicalIds tracking', () => {
931
901
  it('should track OLD VPC endpoint logical IDs (VPCEndpointS3 pattern) for backwards compatibility', async () => {
932
- // CRITICAL: Older production stacks use the OLD naming convention
902
+ // CRITICAL: Frontify production uses OLD naming convention
933
903
  const mockStack = {
934
904
  StackName: 'create-frigg-app-production',
935
905
  Outputs: [],