@friggframework/devtools 2.0.0--canary.461.b8d8dfd.0 → 2.0.0--canary.461.91e9228.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.
|
@@ -104,11 +104,72 @@ class MigrationBuilder extends InfrastructureBuilder {
|
|
|
104
104
|
|
|
105
105
|
console.log(' ✓ Created DbMigrationQueue resource');
|
|
106
106
|
|
|
107
|
-
// Package configuration for migration
|
|
108
|
-
const
|
|
107
|
+
// Package configuration for migration WORKER (needs Prisma CLI with WASM)
|
|
108
|
+
const migrationWorkerPackageConfig = {
|
|
109
109
|
individually: true,
|
|
110
110
|
exclude: [
|
|
111
|
-
// Exclude
|
|
111
|
+
// Exclude Prisma runtime client - it's in the Lambda Layer
|
|
112
|
+
'node_modules/@prisma/client/**',
|
|
113
|
+
'node_modules/.prisma/**',
|
|
114
|
+
'node_modules/@friggframework/core/generated/**',
|
|
115
|
+
// But KEEP node_modules/prisma/** (the CLI with WASM)
|
|
116
|
+
|
|
117
|
+
// Same base exclusions as router
|
|
118
|
+
'node_modules/**/node_modules/**',
|
|
119
|
+
'node_modules/aws-sdk/**',
|
|
120
|
+
'node_modules/@aws-sdk/**',
|
|
121
|
+
'node_modules/esbuild/**',
|
|
122
|
+
'node_modules/@esbuild/**',
|
|
123
|
+
'node_modules/typescript/**',
|
|
124
|
+
'node_modules/webpack/**',
|
|
125
|
+
'node_modules/osls/**',
|
|
126
|
+
'node_modules/serverless-esbuild/**',
|
|
127
|
+
'node_modules/serverless-jetpack/**',
|
|
128
|
+
'node_modules/serverless-offline/**',
|
|
129
|
+
'node_modules/serverless-offline-sqs/**',
|
|
130
|
+
'node_modules/serverless-dotenv-plugin/**',
|
|
131
|
+
'node_modules/serverless-kms-grants/**',
|
|
132
|
+
'node_modules/@friggframework/test/**',
|
|
133
|
+
'node_modules/@friggframework/eslint-config/**',
|
|
134
|
+
'node_modules/@friggframework/prettier-config/**',
|
|
135
|
+
'node_modules/@friggframework/devtools/**',
|
|
136
|
+
'node_modules/@friggframework/serverless-plugin/**',
|
|
137
|
+
'node_modules/jest/**',
|
|
138
|
+
'node_modules/prettier/**',
|
|
139
|
+
'node_modules/eslint/**',
|
|
140
|
+
'node_modules/@friggframework/core/generated/prisma-mongodb/**',
|
|
141
|
+
'node_modules/@friggframework/core/integrations/**',
|
|
142
|
+
'node_modules/@friggframework/core/user/**',
|
|
143
|
+
'**/query-engine-darwin*',
|
|
144
|
+
'**/schema-engine-darwin*',
|
|
145
|
+
'**/libquery_engine-darwin*',
|
|
146
|
+
'**/*-darwin-arm64*',
|
|
147
|
+
'**/*-darwin*',
|
|
148
|
+
// Note: Migration worker DOES need Prisma CLI WASM files (for migrate deploy)
|
|
149
|
+
// Only exclude runtime engine WASM (query engine internals)
|
|
150
|
+
'**/runtime/*.wasm',
|
|
151
|
+
'src/**',
|
|
152
|
+
'test/**',
|
|
153
|
+
'layers/**',
|
|
154
|
+
'coverage/**',
|
|
155
|
+
'deploy.log',
|
|
156
|
+
'.env.backup',
|
|
157
|
+
'docker-compose.yml',
|
|
158
|
+
'jest.config.js',
|
|
159
|
+
'jest.unit.config.js',
|
|
160
|
+
'package-lock.json',
|
|
161
|
+
'**/*.test.js',
|
|
162
|
+
'**/*.spec.js',
|
|
163
|
+
'**/.claude-flow/**',
|
|
164
|
+
'**/.swarm/**',
|
|
165
|
+
],
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
// Package configuration for migration ROUTER (doesn't need Prisma CLI)
|
|
169
|
+
const migrationRouterPackageConfig = {
|
|
170
|
+
individually: true,
|
|
171
|
+
exclude: [
|
|
172
|
+
// Same base exclusions but EXCLUDE all WASM (router doesn't run migrations)
|
|
112
173
|
'node_modules/**/node_modules/**',
|
|
113
174
|
'node_modules/aws-sdk/**',
|
|
114
175
|
'node_modules/@aws-sdk/**',
|
|
@@ -140,10 +201,9 @@ class MigrationBuilder extends InfrastructureBuilder {
|
|
|
140
201
|
'**/libquery_engine-darwin*',
|
|
141
202
|
'**/*-darwin-arm64*',
|
|
142
203
|
'**/*-darwin*',
|
|
143
|
-
//
|
|
144
|
-
// Only dbMigrate function needs Prisma CLI WASM files
|
|
204
|
+
// Router doesn't run migrations - exclude ALL WASM files
|
|
145
205
|
'**/runtime/*.wasm',
|
|
146
|
-
'**/*.wasm*',
|
|
206
|
+
'**/*.wasm*', // Exclude all WASM (Prisma CLI + query engine)
|
|
147
207
|
'src/**',
|
|
148
208
|
'test/**',
|
|
149
209
|
'layers/**',
|
|
@@ -164,13 +224,13 @@ class MigrationBuilder extends InfrastructureBuilder {
|
|
|
164
224
|
// Create migration worker Lambda (triggered by SQS)
|
|
165
225
|
result.functions.dbMigrationWorker = {
|
|
166
226
|
handler: 'node_modules/@friggframework/core/handlers/workers/db-migration.handler',
|
|
167
|
-
layers: [{ Ref: 'PrismaLambdaLayer' }],
|
|
227
|
+
layers: [{ Ref: 'PrismaLambdaLayer' }], // Use layer for Prisma client runtime
|
|
168
228
|
skipEsbuild: true,
|
|
169
229
|
timeout: 900, // 15 minutes for long migrations
|
|
170
230
|
memorySize: 1024, // Extra memory for Prisma operations
|
|
171
231
|
reservedConcurrency: 1, // Process one migration at a time (critical for safety)
|
|
172
232
|
description: 'Database migration worker (triggered by SQS queue)',
|
|
173
|
-
package:
|
|
233
|
+
package: migrationWorkerPackageConfig,
|
|
174
234
|
environment: {
|
|
175
235
|
// Ensure migration functions get DATABASE_URL from provider.environment
|
|
176
236
|
// Note: Serverless will merge this with provider.environment
|
|
@@ -195,7 +255,7 @@ class MigrationBuilder extends InfrastructureBuilder {
|
|
|
195
255
|
timeout: 30, // Router just queues jobs, doesn't run migrations
|
|
196
256
|
memorySize: 512,
|
|
197
257
|
description: 'Database migration HTTP API (POST to trigger, GET to check status)',
|
|
198
|
-
package:
|
|
258
|
+
package: migrationRouterPackageConfig,
|
|
199
259
|
environment: {
|
|
200
260
|
// Ensure migration functions get DATABASE_URL from provider.environment
|
|
201
261
|
// Note: Serverless will merge this with provider.environment
|
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.91e9228.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.91e9228.0",
|
|
15
|
+
"@friggframework/test": "2.0.0--canary.461.91e9228.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.91e9228.0",
|
|
38
|
+
"@friggframework/prettier-config": "2.0.0--canary.461.91e9228.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": "91e92285c31087cb3bfed8d7979f9962670dfc57"
|
|
74
74
|
}
|