@friggframework/devtools 2.0.0--canary.704.79d9a63.0 → 2.0.0--canary.686.e94de4d.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/README.md +0 -14
- package/frigg-cli/README.md +0 -6
- package/frigg-cli/__tests__/unit/commands/provider-dispatch.test.js +140 -0
- package/frigg-cli/__tests__/unit/dependencies.test.js +5 -3
- package/frigg-cli/build-command/index.js +32 -1
- package/frigg-cli/deploy-command/index.js +50 -2
- package/frigg-cli/doctor-command/index.js +7 -0
- package/frigg-cli/generate-iam-command.js +7 -0
- package/frigg-cli/index.js +0 -3
- package/frigg-cli/package.json +3 -3
- package/frigg-cli/repair-command/index.js +7 -0
- package/frigg-cli/start-command/index.js +58 -0
- package/frigg-cli/utils/provider-helper.js +80 -0
- package/infrastructure/README.md +4 -22
- package/infrastructure/__tests__/create-frigg-infrastructure-provider.test.js +64 -0
- package/infrastructure/__tests__/management-api-gateway-routes.test.js +335 -0
- package/infrastructure/__tests__/template-generation.test.js +7 -0
- package/infrastructure/create-frigg-infrastructure.js +14 -0
- package/infrastructure/domains/admin-scripts/admin-script-builder.js +48 -56
- package/infrastructure/domains/admin-scripts/admin-script-builder.test.js +7 -76
- package/infrastructure/domains/database/migration-builder.js +175 -182
- package/infrastructure/domains/database/migration-builder.test.js +5 -36
- package/infrastructure/domains/integration/integration-builder.js +61 -65
- package/infrastructure/domains/integration/integration-builder.test.js +8 -73
- package/infrastructure/domains/parameters/offload-utils.js +1 -0
- package/infrastructure/domains/shared/environment-builder.js +12 -1
- package/infrastructure/domains/shared/environment-builder.test.js +20 -0
- package/infrastructure/domains/shared/types/app-definition.js +15 -1
- package/infrastructure/domains/shared/utilities/base-definition-factory.js +150 -86
- package/infrastructure/domains/shared/utilities/base-definition-factory.test.js +111 -96
- package/infrastructure/domains/shared/utilities/logging-config.js +4 -3
- package/infrastructure/domains/shared/utilities/logging-config.test.js +2 -1
- package/infrastructure/infrastructure-composer.test.js +10 -3
- package/infrastructure/provider-build.js +119 -0
- package/infrastructure/scripts/build-prisma-layer.js +32 -5
- package/infrastructure/scripts/build-prisma-layer.test.js +35 -0
- package/package.json +8 -11
- package/test/npm-install-guard.js +104 -0
- package/test/npm-install-guard.test.js +53 -0
- package/frigg-cli/__tests__/unit/utils/node-version.test.js +0 -66
- package/frigg-cli/utils/node-version.js +0 -51
- package/infrastructure/__tests__/package-patterns-composition.test.js +0 -153
- package/infrastructure/domains/shared/utilities/framework-version.js +0 -14
- package/infrastructure/domains/shared/utilities/framework-version.test.js +0 -27
- package/infrastructure/domains/shared/utilities/package-patterns.js +0 -35
- package/infrastructure/domains/shared/utilities/package-patterns.test.js +0 -112
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
const { InfrastructureBuilder, ValidationResult } = require('../shared/base-builder');
|
|
17
17
|
const { isScopedEnvironmentActive } = require('../shared/function-environments');
|
|
18
18
|
const { nestedNodeModulesExcludes } = require('../shared/utilities/nested-node-modules');
|
|
19
|
-
const { toPackagePatterns } = require('../shared/utilities/package-patterns');
|
|
20
19
|
const { MigrationResourceResolver } = require('./migration-resolver');
|
|
21
20
|
const { createEmptyDiscoveryResult, ResourceOwnership } = require('../shared/types');
|
|
22
21
|
|
|
@@ -243,192 +242,186 @@ class MigrationBuilder extends InfrastructureBuilder {
|
|
|
243
242
|
// Migration WORKER package config (needs Prisma CLI WASM files)
|
|
244
243
|
const migrationWorkerPackageConfig = {
|
|
245
244
|
individually: true,
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
'**/.swarm/**',
|
|
332
|
-
],
|
|
333
|
-
}),
|
|
245
|
+
exclude: [
|
|
246
|
+
// Exclude Prisma runtime client when using Lambda Layer (but keep CLI folder)
|
|
247
|
+
...(usePrismaLayer ? [
|
|
248
|
+
'node_modules/@prisma/client/**',
|
|
249
|
+
'node_modules/.prisma/**',
|
|
250
|
+
'node_modules/@friggframework/core/generated/**',
|
|
251
|
+
] : []),
|
|
252
|
+
// But KEEP node_modules/prisma/** (the CLI with WASM)
|
|
253
|
+
|
|
254
|
+
...nestedNodeModulesExcludes(appDefinition, usePrismaLayer),
|
|
255
|
+
|
|
256
|
+
// Exclude AWS SDK (provided by Lambda runtime)
|
|
257
|
+
'node_modules/aws-sdk/**',
|
|
258
|
+
'node_modules/@aws-sdk/**',
|
|
259
|
+
|
|
260
|
+
// Exclude build tools
|
|
261
|
+
'node_modules/esbuild/**',
|
|
262
|
+
'node_modules/@esbuild/**',
|
|
263
|
+
'node_modules/typescript/**',
|
|
264
|
+
'node_modules/webpack/**',
|
|
265
|
+
'node_modules/osls/**',
|
|
266
|
+
'node_modules/serverless-esbuild/**',
|
|
267
|
+
'node_modules/serverless-jetpack/**',
|
|
268
|
+
'node_modules/serverless-offline/**',
|
|
269
|
+
'node_modules/serverless-offline-sqs/**',
|
|
270
|
+
'node_modules/serverless-dotenv-plugin/**',
|
|
271
|
+
'node_modules/serverless-kms-grants/**',
|
|
272
|
+
|
|
273
|
+
// Exclude dev dependencies
|
|
274
|
+
'node_modules/@friggframework/test/**',
|
|
275
|
+
'node_modules/@friggframework/eslint-config/**',
|
|
276
|
+
'node_modules/@friggframework/prettier-config/**',
|
|
277
|
+
'node_modules/@friggframework/devtools/**',
|
|
278
|
+
'node_modules/@friggframework/serverless-plugin/**',
|
|
279
|
+
'node_modules/jest/**',
|
|
280
|
+
'node_modules/prettier/**',
|
|
281
|
+
'node_modules/eslint/**',
|
|
282
|
+
|
|
283
|
+
// Exclude non-essential Frigg core modules
|
|
284
|
+
'node_modules/@friggframework/core/generated/prisma-mongodb/**',
|
|
285
|
+
'node_modules/@friggframework/core/integrations/**',
|
|
286
|
+
'node_modules/@friggframework/core/user/**',
|
|
287
|
+
|
|
288
|
+
// Exclude other handlers we don't need (keep db-migration worker)
|
|
289
|
+
'node_modules/@friggframework/core/handlers/routers/auth.js',
|
|
290
|
+
'node_modules/@friggframework/core/handlers/routers/health.js',
|
|
291
|
+
'node_modules/@friggframework/core/handlers/routers/user.js',
|
|
292
|
+
'node_modules/@friggframework/core/handlers/routers/websocket.js',
|
|
293
|
+
'node_modules/@friggframework/core/handlers/routers/integration-*.js',
|
|
294
|
+
'node_modules/@friggframework/core/handlers/workers/integration-*.js',
|
|
295
|
+
|
|
296
|
+
// Exclude wrong OS binaries
|
|
297
|
+
'**/query-engine-darwin*',
|
|
298
|
+
'**/schema-engine-darwin*',
|
|
299
|
+
'**/libquery_engine-darwin*',
|
|
300
|
+
'**/*-darwin-arm64*',
|
|
301
|
+
'**/*-darwin*',
|
|
302
|
+
|
|
303
|
+
// Migration worker DOES need Prisma CLI WASM files (for migrate deploy)
|
|
304
|
+
// Only exclude runtime engine WASM (query engine internals)
|
|
305
|
+
'**/runtime/*.wasm',
|
|
306
|
+
|
|
307
|
+
// Additional size optimizations
|
|
308
|
+
'**/*.map',
|
|
309
|
+
'**/*.md',
|
|
310
|
+
'**/LICENSE*',
|
|
311
|
+
'**/*.d.ts',
|
|
312
|
+
'**/*.d.mts',
|
|
313
|
+
'**/examples/**',
|
|
314
|
+
'**/docs/**',
|
|
315
|
+
'src/**',
|
|
316
|
+
'test/**',
|
|
317
|
+
'layers/**',
|
|
318
|
+
'coverage/**',
|
|
319
|
+
'deploy.log',
|
|
320
|
+
'.env.backup',
|
|
321
|
+
'docker-compose.yml',
|
|
322
|
+
'jest.config.js',
|
|
323
|
+
'jest.unit.config.js',
|
|
324
|
+
'package-lock.json',
|
|
325
|
+
'**/*.test.js',
|
|
326
|
+
'**/*.spec.js',
|
|
327
|
+
'**/.claude-flow/**',
|
|
328
|
+
'**/.swarm/**',
|
|
329
|
+
],
|
|
334
330
|
};
|
|
335
331
|
|
|
336
332
|
// Migration ROUTER package config (lighter, no Prisma CLI needed)
|
|
337
333
|
const migrationRouterPackageConfig = {
|
|
338
334
|
individually: true,
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
'**/.swarm/**',
|
|
430
|
-
],
|
|
431
|
-
}),
|
|
335
|
+
exclude: [
|
|
336
|
+
// Exclude Prisma runtime client when using Lambda Layer
|
|
337
|
+
...(usePrismaLayer ? [
|
|
338
|
+
'node_modules/@prisma/client/**',
|
|
339
|
+
'node_modules/.prisma/**',
|
|
340
|
+
'node_modules/@friggframework/core/generated/**',
|
|
341
|
+
] : []),
|
|
342
|
+
|
|
343
|
+
// Router only skips Prisma CLI if Lambda Layer is enabled
|
|
344
|
+
...(usePrismaLayer ? ['node_modules/prisma/**'] : []),
|
|
345
|
+
|
|
346
|
+
...nestedNodeModulesExcludes(appDefinition, usePrismaLayer),
|
|
347
|
+
|
|
348
|
+
// Exclude AWS SDK (provided by Lambda runtime)
|
|
349
|
+
'node_modules/aws-sdk/**',
|
|
350
|
+
'node_modules/@aws-sdk/**',
|
|
351
|
+
|
|
352
|
+
// Exclude build tools
|
|
353
|
+
'node_modules/esbuild/**',
|
|
354
|
+
'node_modules/@esbuild/**',
|
|
355
|
+
'node_modules/typescript/**',
|
|
356
|
+
'node_modules/webpack/**',
|
|
357
|
+
'node_modules/osls/**',
|
|
358
|
+
'node_modules/serverless-esbuild/**',
|
|
359
|
+
'node_modules/serverless-jetpack/**',
|
|
360
|
+
'node_modules/serverless-offline/**',
|
|
361
|
+
'node_modules/serverless-offline-sqs/**',
|
|
362
|
+
'node_modules/serverless-dotenv-plugin/**',
|
|
363
|
+
'node_modules/serverless-kms-grants/**',
|
|
364
|
+
|
|
365
|
+
// Exclude dev dependencies
|
|
366
|
+
'node_modules/@friggframework/test/**',
|
|
367
|
+
'node_modules/@friggframework/eslint-config/**',
|
|
368
|
+
'node_modules/@friggframework/prettier-config/**',
|
|
369
|
+
'node_modules/@friggframework/devtools/**',
|
|
370
|
+
'node_modules/@friggframework/serverless-plugin/**',
|
|
371
|
+
'node_modules/jest/**',
|
|
372
|
+
'node_modules/prettier/**',
|
|
373
|
+
'node_modules/eslint/**',
|
|
374
|
+
|
|
375
|
+
// Exclude non-essential Frigg core modules
|
|
376
|
+
'node_modules/@friggframework/core/generated/prisma-mongodb/**',
|
|
377
|
+
'node_modules/@friggframework/core/integrations/**',
|
|
378
|
+
'node_modules/@friggframework/core/user/**',
|
|
379
|
+
|
|
380
|
+
// Exclude other handlers we don't need (keep db-migration router)
|
|
381
|
+
'node_modules/@friggframework/core/handlers/routers/auth.js',
|
|
382
|
+
'node_modules/@friggframework/core/handlers/routers/health.js',
|
|
383
|
+
'node_modules/@friggframework/core/handlers/routers/user.js',
|
|
384
|
+
'node_modules/@friggframework/core/handlers/routers/websocket.js',
|
|
385
|
+
'node_modules/@friggframework/core/handlers/routers/integration-*.js',
|
|
386
|
+
'node_modules/@friggframework/core/handlers/workers/**',
|
|
387
|
+
|
|
388
|
+
// Exclude wrong OS binaries
|
|
389
|
+
'**/query-engine-darwin*',
|
|
390
|
+
'**/schema-engine-darwin*',
|
|
391
|
+
'**/libquery_engine-darwin*',
|
|
392
|
+
'**/*-darwin-arm64*',
|
|
393
|
+
'**/*-darwin*',
|
|
394
|
+
|
|
395
|
+
// Router doesn't run migrations - exclude ALL WASM files
|
|
396
|
+
'**/runtime/*.wasm',
|
|
397
|
+
'**/*.wasm*',
|
|
398
|
+
|
|
399
|
+
// Additional size optimizations
|
|
400
|
+
'**/*.map',
|
|
401
|
+
'**/*.md',
|
|
402
|
+
'**/LICENSE*',
|
|
403
|
+
'**/*.d.ts',
|
|
404
|
+
'**/*.d.mts',
|
|
405
|
+
'**/test/**',
|
|
406
|
+
'**/tests/**',
|
|
407
|
+
'**/__tests__/**',
|
|
408
|
+
'**/examples/**',
|
|
409
|
+
'**/docs/**',
|
|
410
|
+
'src/**',
|
|
411
|
+
'test/**',
|
|
412
|
+
'layers/**',
|
|
413
|
+
'coverage/**',
|
|
414
|
+
'deploy.log',
|
|
415
|
+
'.env.backup',
|
|
416
|
+
'docker-compose.yml',
|
|
417
|
+
'jest.config.js',
|
|
418
|
+
'jest.unit.config.js',
|
|
419
|
+
'package-lock.json',
|
|
420
|
+
'**/*.test.js',
|
|
421
|
+
'**/*.spec.js',
|
|
422
|
+
'**/.claude-flow/**',
|
|
423
|
+
'**/.swarm/**',
|
|
424
|
+
],
|
|
432
425
|
};
|
|
433
426
|
|
|
434
427
|
// Create migration worker Lambda (triggered by SQS)
|
|
@@ -316,8 +316,8 @@ describe('MigrationBuilder', () => {
|
|
|
316
316
|
it('bundles Prisma runtime when layer disabled', async () => {
|
|
317
317
|
const appDef = { ...baseAppDefinition, usePrismaLambdaLayer: false };
|
|
318
318
|
const result = await builder.build(appDef, {});
|
|
319
|
-
expect(result.functions.dbMigrationWorker.package.
|
|
320
|
-
expect.arrayContaining(['
|
|
319
|
+
expect(result.functions.dbMigrationWorker.package.exclude).not.toEqual(
|
|
320
|
+
expect.arrayContaining(['node_modules/@prisma/client/**'])
|
|
321
321
|
);
|
|
322
322
|
});
|
|
323
323
|
});
|
|
@@ -436,7 +436,7 @@ describe('MigrationBuilder nested node_modules (lambda.keepNestedNodeModules)',
|
|
|
436
436
|
const result = await new MigrationBuilder().build(baseAppDefinition, {});
|
|
437
437
|
|
|
438
438
|
for (const fn of workerAndRouter(result)) {
|
|
439
|
-
expect(fn.package.
|
|
439
|
+
expect(fn.package.exclude).toContain('node_modules/**/node_modules/**');
|
|
440
440
|
}
|
|
441
441
|
});
|
|
442
442
|
|
|
@@ -447,39 +447,8 @@ describe('MigrationBuilder nested node_modules (lambda.keepNestedNodeModules)',
|
|
|
447
447
|
);
|
|
448
448
|
|
|
449
449
|
for (const fn of workerAndRouter(result)) {
|
|
450
|
-
expect(fn.package.
|
|
451
|
-
expect(fn.package.
|
|
450
|
+
expect(fn.package.exclude).not.toContain('node_modules/**/node_modules/**');
|
|
451
|
+
expect(fn.package.exclude).toContain('node_modules/**/node_modules/@friggframework/**');
|
|
452
452
|
}
|
|
453
453
|
});
|
|
454
454
|
});
|
|
455
|
-
|
|
456
|
-
describe('MigrationBuilder function package patterns (ADR-050)', () => {
|
|
457
|
-
it('emits package.patterns and individually, never include/exclude', async () => {
|
|
458
|
-
const result = await new MigrationBuilder().build(
|
|
459
|
-
{ database: { postgres: { enable: true } } },
|
|
460
|
-
{}
|
|
461
|
-
);
|
|
462
|
-
|
|
463
|
-
for (const name of ['dbMigrationWorker', 'dbMigrationRouter']) {
|
|
464
|
-
const pkg = result.functions[name].package;
|
|
465
|
-
expect(pkg.individually).toBe(true);
|
|
466
|
-
expect(pkg).not.toHaveProperty('include');
|
|
467
|
-
expect(pkg).not.toHaveProperty('exclude');
|
|
468
|
-
expect(pkg.patterns.every((p) => p.startsWith('!'))).toBe(true);
|
|
469
|
-
expect(pkg.patterns).toEqual(
|
|
470
|
-
expect.arrayContaining([
|
|
471
|
-
'!node_modules/@prisma/client/**',
|
|
472
|
-
'!node_modules/aws-sdk/**',
|
|
473
|
-
])
|
|
474
|
-
);
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
// The worker keeps the Prisma CLI (WASM); only the router drops it.
|
|
478
|
-
expect(result.functions.dbMigrationWorker.package.patterns).not.toContain(
|
|
479
|
-
'!node_modules/prisma/**'
|
|
480
|
-
);
|
|
481
|
-
expect(result.functions.dbMigrationRouter.package.patterns).toContain(
|
|
482
|
-
'!node_modules/prisma/**'
|
|
483
|
-
);
|
|
484
|
-
});
|
|
485
|
-
});
|
|
@@ -20,7 +20,6 @@ const {
|
|
|
20
20
|
ValidationResult,
|
|
21
21
|
} = require('../shared/base-builder');
|
|
22
22
|
const IntegrationResourceResolver = require('./integration-resolver');
|
|
23
|
-
const { toPackagePatterns } = require('../shared/utilities/package-patterns');
|
|
24
23
|
const {
|
|
25
24
|
createEmptyDiscoveryResult,
|
|
26
25
|
ResourceOwnership,
|
|
@@ -255,70 +254,67 @@ class IntegrationBuilder extends InfrastructureBuilder {
|
|
|
255
254
|
*/
|
|
256
255
|
createFunctionPackageConfig(usePrismaLayer = true, appDefinition = {}) {
|
|
257
256
|
return {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
'**/.swarm/**',
|
|
320
|
-
],
|
|
321
|
-
}),
|
|
257
|
+
exclude: [
|
|
258
|
+
// Exclude AWS SDK (provided by Lambda runtime)
|
|
259
|
+
'node_modules/aws-sdk/**',
|
|
260
|
+
'node_modules/@aws-sdk/**',
|
|
261
|
+
|
|
262
|
+
// Exclude Prisma (provided via Lambda Layer)
|
|
263
|
+
...(usePrismaLayer
|
|
264
|
+
? [
|
|
265
|
+
'node_modules/@prisma/**',
|
|
266
|
+
'node_modules/.prisma/**',
|
|
267
|
+
'node_modules/prisma/**',
|
|
268
|
+
'node_modules/@friggframework/core/generated/**',
|
|
269
|
+
]
|
|
270
|
+
: []),
|
|
271
|
+
|
|
272
|
+
...nestedNodeModulesExcludes(appDefinition, usePrismaLayer),
|
|
273
|
+
|
|
274
|
+
// Exclude build tools (not needed at runtime)
|
|
275
|
+
'node_modules/esbuild/**',
|
|
276
|
+
'node_modules/@esbuild/**',
|
|
277
|
+
'node_modules/typescript/**',
|
|
278
|
+
'node_modules/webpack/**',
|
|
279
|
+
'node_modules/osls/**',
|
|
280
|
+
'node_modules/serverless-esbuild/**',
|
|
281
|
+
'node_modules/serverless-jetpack/**',
|
|
282
|
+
'node_modules/serverless-offline/**',
|
|
283
|
+
'node_modules/serverless-offline-sqs/**',
|
|
284
|
+
'node_modules/serverless-dotenv-plugin/**',
|
|
285
|
+
'node_modules/serverless-kms-grants/**',
|
|
286
|
+
// Note: DO NOT exclude serverless-http - it's a runtime dependency!
|
|
287
|
+
|
|
288
|
+
// Exclude dev/test dependencies
|
|
289
|
+
'node_modules/@friggframework/test/**',
|
|
290
|
+
'node_modules/@friggframework/eslint-config/**',
|
|
291
|
+
'node_modules/@friggframework/prettier-config/**',
|
|
292
|
+
'node_modules/jest/**',
|
|
293
|
+
'node_modules/prettier/**',
|
|
294
|
+
'node_modules/eslint/**',
|
|
295
|
+
|
|
296
|
+
// Exclude local dev files
|
|
297
|
+
'deploy.log',
|
|
298
|
+
'.env.backup',
|
|
299
|
+
'docker-compose.yml',
|
|
300
|
+
'jest.config.js',
|
|
301
|
+
'jest.unit.config.js',
|
|
302
|
+
'.eslintrc.json',
|
|
303
|
+
'.prettierrc',
|
|
304
|
+
'.prettierignore',
|
|
305
|
+
'.markdownlintignore',
|
|
306
|
+
'package-lock.json',
|
|
307
|
+
|
|
308
|
+
// Exclude development/test files (keep src/ - needed for integrations and api-modules)
|
|
309
|
+
'coverage/**',
|
|
310
|
+
'test/**',
|
|
311
|
+
'layers/**',
|
|
312
|
+
// Note: DO NOT exclude src/** - handlers need src/integrations and src/api-modules at runtime
|
|
313
|
+
'**/*.test.js',
|
|
314
|
+
'**/*.spec.js',
|
|
315
|
+
'**/.claude-flow/**',
|
|
316
|
+
'**/.swarm/**',
|
|
317
|
+
],
|
|
322
318
|
};
|
|
323
319
|
}
|
|
324
320
|
|