@friggframework/core 2.0.0--canary.461.dc1758e.0 → 2.0.0--canary.461.efcd1bf.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.
@@ -1,6 +1,8 @@
1
1
  const { Router } = require('express');
2
- const { moduleFactory, integrationFactory } = require('./../backend-utils');
3
2
  const { createAppHandler } = require('./../app-handler-helpers');
3
+ const { loadAppDefinition } = require('./../app-definition-loader');
4
+ const { ModuleFactory } = require('../../modules/module-factory');
5
+ const { IntegrationFactory } = require('../../integrations/integration-factory');
4
6
  const {
5
7
  createHealthCheckRepository,
6
8
  } = require('../../database/repositories/health-check-repository-factory');
@@ -22,6 +24,35 @@ const {
22
24
 
23
25
  const router = Router();
24
26
  const healthCheckRepository = createHealthCheckRepository();
27
+
28
+ // Load app definition to get integration classes for factory creation
29
+ let moduleFactory, integrationFactory;
30
+ try {
31
+ const { integrations: integrationClasses } = loadAppDefinition();
32
+ const {
33
+ createModuleRepository,
34
+ } = require('../../modules/repositories/module-repository-factory');
35
+ const {
36
+ createIntegrationRepository,
37
+ } = require('../../integrations/repositories/integration-repository-factory');
38
+
39
+ const moduleRepository = createModuleRepository();
40
+ const integrationRepository = createIntegrationRepository();
41
+
42
+ moduleFactory = new ModuleFactory({
43
+ moduleRepository,
44
+ integrationClasses,
45
+ });
46
+
47
+ integrationFactory = new IntegrationFactory({
48
+ integrationRepository,
49
+ integrationClasses,
50
+ });
51
+ } catch (error) {
52
+ console.warn('Could not initialize module/integration factories for health check:', error.message);
53
+ // Factories will be undefined, health check will handle gracefully
54
+ }
55
+
25
56
  const testEncryptionUseCase = new TestEncryptionUseCase({
26
57
  healthCheckRepository,
27
58
  });
@@ -142,10 +173,10 @@ const detectVpcConfiguration = async () => {
142
173
  }
143
174
 
144
175
  // Check if Lambda is in VPC using VPC_ENABLED env var set by infrastructure
145
- results.isInVpc = process.env.VPC_ENABLED === 'true' ||
146
- (!results.hasInternetAccess && results.canResolvePublicDns) ||
176
+ results.isInVpc = process.env.VPC_ENABLED === 'true' ||
177
+ (!results.hasInternetAccess && results.canResolvePublicDns) ||
147
178
  results.vpcEndpoints.length > 0;
148
-
179
+
149
180
  results.canConnectToAws =
150
181
  results.hasInternetAccess || results.vpcEndpoints.length > 0;
151
182
  } catch (error) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@friggframework/core",
3
3
  "prettier": "@friggframework/prettier-config",
4
- "version": "2.0.0--canary.461.dc1758e.0",
4
+ "version": "2.0.0--canary.461.efcd1bf.0",
5
5
  "dependencies": {
6
6
  "@aws-sdk/client-apigatewaymanagementapi": "^3.588.0",
7
7
  "@aws-sdk/client-kms": "^3.588.0",
@@ -37,9 +37,9 @@
37
37
  }
38
38
  },
39
39
  "devDependencies": {
40
- "@friggframework/eslint-config": "2.0.0--canary.461.dc1758e.0",
41
- "@friggframework/prettier-config": "2.0.0--canary.461.dc1758e.0",
42
- "@friggframework/test": "2.0.0--canary.461.dc1758e.0",
40
+ "@friggframework/eslint-config": "2.0.0--canary.461.efcd1bf.0",
41
+ "@friggframework/prettier-config": "2.0.0--canary.461.efcd1bf.0",
42
+ "@friggframework/test": "2.0.0--canary.461.efcd1bf.0",
43
43
  "@prisma/client": "^6.17.0",
44
44
  "@types/lodash": "4.17.15",
45
45
  "@typescript-eslint/eslint-plugin": "^8.0.0",
@@ -79,5 +79,5 @@
79
79
  "publishConfig": {
80
80
  "access": "public"
81
81
  },
82
- "gitHead": "dc1758e91e27ea006df8936d372f468f029ec646"
82
+ "gitHead": "efcd1bfb036c4bb846bed987625891a4c48324f1"
83
83
  }