@friggframework/devtools 2.0.0-next.53 → 2.0.0-next.55

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 (32) hide show
  1. package/frigg-cli/README.md +13 -14
  2. package/frigg-cli/__tests__/unit/commands/db-setup.test.js +267 -166
  3. package/frigg-cli/__tests__/unit/utils/database-validator.test.js +45 -14
  4. package/frigg-cli/__tests__/unit/utils/error-messages.test.js +44 -3
  5. package/frigg-cli/db-setup-command/index.js +75 -22
  6. package/frigg-cli/deploy-command/index.js +6 -3
  7. package/frigg-cli/utils/database-validator.js +18 -5
  8. package/frigg-cli/utils/error-messages.js +84 -12
  9. package/infrastructure/README.md +28 -0
  10. package/infrastructure/domains/database/migration-builder.js +26 -20
  11. package/infrastructure/domains/database/migration-builder.test.js +27 -0
  12. package/infrastructure/domains/integration/integration-builder.js +17 -13
  13. package/infrastructure/domains/integration/integration-builder.test.js +23 -0
  14. package/infrastructure/domains/networking/vpc-builder.js +240 -18
  15. package/infrastructure/domains/networking/vpc-builder.test.js +711 -13
  16. package/infrastructure/domains/networking/vpc-resolver.js +221 -40
  17. package/infrastructure/domains/networking/vpc-resolver.test.js +318 -18
  18. package/infrastructure/domains/security/kms-builder.js +55 -6
  19. package/infrastructure/domains/security/kms-builder.test.js +19 -1
  20. package/infrastructure/domains/shared/cloudformation-discovery.js +310 -13
  21. package/infrastructure/domains/shared/cloudformation-discovery.test.js +395 -0
  22. package/infrastructure/domains/shared/providers/aws-provider-adapter.js +41 -6
  23. package/infrastructure/domains/shared/providers/aws-provider-adapter.test.js +39 -0
  24. package/infrastructure/domains/shared/resource-discovery.js +17 -5
  25. package/infrastructure/domains/shared/resource-discovery.test.js +36 -0
  26. package/infrastructure/domains/shared/utilities/base-definition-factory.js +30 -20
  27. package/infrastructure/domains/shared/utilities/base-definition-factory.test.js +43 -0
  28. package/infrastructure/infrastructure-composer.js +11 -3
  29. package/infrastructure/scripts/build-prisma-layer.js +153 -78
  30. package/infrastructure/scripts/build-prisma-layer.test.js +27 -11
  31. package/layers/prisma/.build-complete +3 -0
  32. package/package.json +7 -7
@@ -3,11 +3,11 @@
3
3
  * Validates database client selection logic
4
4
  */
5
5
 
6
- const {
6
+ const {
7
7
  getGeneratedClientPackages,
8
8
  getMigrationsPackages,
9
9
  getMigrationSourcePath,
10
- getMigrationDestinationPath
10
+ getMigrationDestinationPath,
11
11
  } = require('./build-prisma-layer');
12
12
 
13
13
  // Mock the log function
@@ -109,12 +109,18 @@ describe('getGeneratedClientPackages()', () => {
109
109
 
110
110
  describe('getMigrationsPackages()', () => {
111
111
  it('should extract database types from client packages', () => {
112
- const clientPackages = ['generated/prisma-postgresql', 'generated/prisma-mongodb'];
112
+ const clientPackages = [
113
+ 'generated/prisma-postgresql',
114
+ 'generated/prisma-mongodb',
115
+ ];
113
116
  const migrations = getMigrationsPackages(clientPackages);
114
117
 
115
118
  expect(migrations).toEqual([
116
- { dbType: 'postgresql', clientPackage: 'generated/prisma-postgresql' },
117
- { dbType: 'mongodb', clientPackage: 'generated/prisma-mongodb' }
119
+ {
120
+ dbType: 'postgresql',
121
+ clientPackage: 'generated/prisma-postgresql',
122
+ },
123
+ { dbType: 'mongodb', clientPackage: 'generated/prisma-mongodb' },
118
124
  ]);
119
125
  });
120
126
 
@@ -123,7 +129,10 @@ describe('getMigrationsPackages()', () => {
123
129
  const migrations = getMigrationsPackages(clientPackages);
124
130
 
125
131
  expect(migrations).toEqual([
126
- { dbType: 'postgresql', clientPackage: 'generated/prisma-postgresql' }
132
+ {
133
+ dbType: 'postgresql',
134
+ clientPackage: 'generated/prisma-postgresql',
135
+ },
127
136
  ]);
128
137
  });
129
138
 
@@ -137,9 +146,11 @@ describe('getMigrationSourcePath()', () => {
137
146
  it('should return correct source path for database type', () => {
138
147
  const searchPaths = ['/workspace/packages/core'];
139
148
  const dbType = 'postgresql';
140
-
149
+
141
150
  const sourcePath = getMigrationSourcePath(searchPaths, dbType);
142
- expect(sourcePath).toBe('/workspace/packages/core/prisma-postgresql/migrations');
151
+ expect(sourcePath).toBe(
152
+ '/workspace/packages/core/prisma-postgresql/migrations'
153
+ );
143
154
  });
144
155
  });
145
156
 
@@ -147,8 +158,13 @@ describe('getMigrationDestinationPath()', () => {
147
158
  it('should return correct destination path for client package', () => {
148
159
  const layerNodeModules = '/layers/prisma/nodejs/node_modules';
149
160
  const clientPackage = 'generated/prisma-postgresql';
150
-
151
- const destPath = getMigrationDestinationPath(layerNodeModules, clientPackage);
152
- expect(destPath).toBe('/layers/prisma/nodejs/node_modules/generated/prisma-postgresql/migrations');
161
+
162
+ const destPath = getMigrationDestinationPath(
163
+ layerNodeModules,
164
+ clientPackage
165
+ );
166
+ expect(destPath).toBe(
167
+ '/layers/prisma/nodejs/node_modules/generated/prisma-postgresql/migrations'
168
+ );
153
169
  });
154
170
  });
@@ -0,0 +1,3 @@
1
+ Build completed: 2025-11-17T22:06:29.204Z
2
+ Node: v20.12.1
3
+ Platform: darwin
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-next.53",
4
+ "version": "2.0.0-next.55",
5
5
  "bin": {
6
6
  "frigg": "./frigg-cli/index.js"
7
7
  },
@@ -16,9 +16,9 @@
16
16
  "@babel/eslint-parser": "^7.18.9",
17
17
  "@babel/parser": "^7.25.3",
18
18
  "@babel/traverse": "^7.25.3",
19
- "@friggframework/core": "2.0.0-next.53",
20
- "@friggframework/schemas": "2.0.0-next.53",
21
- "@friggframework/test": "2.0.0-next.53",
19
+ "@friggframework/core": "2.0.0-next.55",
20
+ "@friggframework/schemas": "2.0.0-next.55",
21
+ "@friggframework/test": "2.0.0-next.55",
22
22
  "@hapi/boom": "^10.0.1",
23
23
  "@inquirer/prompts": "^5.3.8",
24
24
  "axios": "^1.7.2",
@@ -46,8 +46,8 @@
46
46
  "validate-npm-package-name": "^5.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@friggframework/eslint-config": "2.0.0-next.53",
50
- "@friggframework/prettier-config": "2.0.0-next.53",
49
+ "@friggframework/eslint-config": "2.0.0-next.55",
50
+ "@friggframework/prettier-config": "2.0.0-next.55",
51
51
  "aws-sdk-client-mock": "^4.1.0",
52
52
  "aws-sdk-client-mock-jest": "^4.1.0",
53
53
  "jest": "^30.1.3",
@@ -79,5 +79,5 @@
79
79
  "publishConfig": {
80
80
  "access": "public"
81
81
  },
82
- "gitHead": "a2b844487df9cddad8ccb30c7091b7d1ebd909e3"
82
+ "gitHead": "7f86d4b5faaab4de74e6e3676948b62d1e1a5bb1"
83
83
  }