@friggframework/devtools 2.0.0--canary.461.61382d8.0 → 2.0.0--canary.461.3d6d8ad.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.
- package/infrastructure/domains/database/migration-builder.js +1 -0
- package/infrastructure/domains/database/migration-builder.test.js +3 -0
- package/infrastructure/domains/shared/resource-discovery.js +3 -3
- package/infrastructure/domains/shared/resource-discovery.test.js +2 -2
- package/package.json +6 -6
|
@@ -288,6 +288,7 @@ class MigrationBuilder extends InfrastructureBuilder {
|
|
|
288
288
|
// Note: Serverless will merge this with provider.environment
|
|
289
289
|
},
|
|
290
290
|
events: [
|
|
291
|
+
{ httpApi: { path: '/db-migrate/status', method: 'GET' } },
|
|
291
292
|
{ httpApi: { path: '/db-migrate', method: 'POST' } },
|
|
292
293
|
{ httpApi: { path: '/db-migrate/{processId}', method: 'GET' } },
|
|
293
294
|
],
|
|
@@ -164,6 +164,9 @@ describe('MigrationBuilder', () => {
|
|
|
164
164
|
'node_modules/@friggframework/core/handlers/routers/db-migration.handler'
|
|
165
165
|
);
|
|
166
166
|
expect(result.functions.dbMigrationRouter.timeout).toBe(30);
|
|
167
|
+
expect(result.functions.dbMigrationRouter.events).toContainEqual({
|
|
168
|
+
httpApi: { path: '/db-migrate/status', method: 'GET' },
|
|
169
|
+
});
|
|
167
170
|
expect(result.functions.dbMigrationRouter.events).toContainEqual({
|
|
168
171
|
httpApi: { path: '/db-migrate', method: 'POST' },
|
|
169
172
|
});
|
|
@@ -94,17 +94,17 @@ async function gatherDiscoveredResources(appDefinition) {
|
|
|
94
94
|
// But still discover KMS (encryption keys can be safely shared across stages)
|
|
95
95
|
if (appDefinition.managementMode === 'managed' && appDefinition.vpcIsolation === 'isolated') {
|
|
96
96
|
console.log(' ℹ Isolated mode: discovering KMS (shareable) but not VPC/Aurora (isolated)');
|
|
97
|
-
|
|
97
|
+
|
|
98
98
|
// Still run KMS discovery - encryption keys are safe to share
|
|
99
99
|
const kmsDiscovery = new KmsDiscovery(provider);
|
|
100
100
|
const kmsResult = await kmsDiscovery.discover();
|
|
101
|
-
|
|
101
|
+
|
|
102
102
|
if (kmsResult?.defaultKmsKeyId) {
|
|
103
103
|
console.log(' ✓ Found shared KMS key (can be reused across stages)');
|
|
104
104
|
console.log('✅ Cloud resource discovery completed successfully!');
|
|
105
105
|
return kmsResult;
|
|
106
106
|
}
|
|
107
|
-
|
|
107
|
+
|
|
108
108
|
console.log(' ℹ No existing resources found - will create fresh infrastructure');
|
|
109
109
|
console.log('✅ Cloud resource discovery completed successfully!');
|
|
110
110
|
return {};
|
|
@@ -427,7 +427,7 @@ describe('Resource Discovery', () => {
|
|
|
427
427
|
};
|
|
428
428
|
|
|
429
429
|
process.env.SLS_STAGE = 'dev';
|
|
430
|
-
|
|
430
|
+
|
|
431
431
|
// Mock KMS discovery returning a shared key
|
|
432
432
|
mockKmsDiscovery.discover.mockResolvedValue({
|
|
433
433
|
defaultKmsKeyId: 'shared-kms-key-123',
|
|
@@ -462,7 +462,7 @@ describe('Resource Discovery', () => {
|
|
|
462
462
|
};
|
|
463
463
|
|
|
464
464
|
process.env.SLS_STAGE = 'dev';
|
|
465
|
-
|
|
465
|
+
|
|
466
466
|
// Mock KMS discovery finding nothing
|
|
467
467
|
mockKmsDiscovery.discover.mockResolvedValue({});
|
|
468
468
|
|
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.
|
|
4
|
+
"version": "2.0.0--canary.461.3d6d8ad.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.
|
|
15
|
-
"@friggframework/test": "2.0.0--canary.461.
|
|
14
|
+
"@friggframework/schemas": "2.0.0--canary.461.3d6d8ad.0",
|
|
15
|
+
"@friggframework/test": "2.0.0--canary.461.3d6d8ad.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.
|
|
38
|
-
"@friggframework/prettier-config": "2.0.0--canary.461.
|
|
37
|
+
"@friggframework/eslint-config": "2.0.0--canary.461.3d6d8ad.0",
|
|
38
|
+
"@friggframework/prettier-config": "2.0.0--canary.461.3d6d8ad.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": "
|
|
73
|
+
"gitHead": "3d6d8ad065c2530fee34dcda5ee304979c718a65"
|
|
74
74
|
}
|