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

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.
@@ -263,6 +263,7 @@ class IntegrationBuilder extends InfrastructureBuilder {
263
263
  handler: `node_modules/@friggframework/core/handlers/routers/integration-webhook-routers.handlers.${integrationName}Webhook.handler`,
264
264
  skipEsbuild: true, // Nested exports in node_modules - skip esbuild bundling
265
265
  package: functionPackageConfig,
266
+ layers: [{ Ref: 'PrismaLambdaLayer' }], // Webhook handlers need Prisma for credential lookups
266
267
  events: [
267
268
  {
268
269
  httpApi: {
@@ -286,6 +287,7 @@ class IntegrationBuilder extends InfrastructureBuilder {
286
287
  handler: `node_modules/@friggframework/core/handlers/routers/integration-defined-routers.handlers.${integrationName}.handler`,
287
288
  skipEsbuild: true, // Nested exports in node_modules - skip esbuild bundling
288
289
  package: functionPackageConfig,
290
+ layers: [{ Ref: 'PrismaLambdaLayer' }], // HTTP handlers need Prisma for integration queries
289
291
  events: [
290
292
  {
291
293
  httpApi: {
@@ -303,6 +305,7 @@ class IntegrationBuilder extends InfrastructureBuilder {
303
305
  handler: `node_modules/@friggframework/core/handlers/workers/integration-defined-workers.handlers.${integrationName}.queueWorker`,
304
306
  skipEsbuild: true, // Nested exports in node_modules - skip esbuild bundling
305
307
  package: functionPackageConfig,
308
+ layers: [{ Ref: 'PrismaLambdaLayer' }], // Queue workers need Prisma for database operations
306
309
  reservedConcurrency: 5,
307
310
  events: [
308
311
  {
@@ -589,5 +589,79 @@ describe('IntegrationBuilder', () => {
589
589
  expect(result.functions.testWebhook.package.exclude).toContain('node_modules/@prisma/**');
590
590
  });
591
591
  });
592
+
593
+ describe('Prisma Layer Configuration', () => {
594
+ it('should attach Prisma Lambda layer to queue worker functions', async () => {
595
+ const appDefinition = {
596
+ integrations: [
597
+ { Definition: { name: 'hubspot' } },
598
+ ],
599
+ };
600
+
601
+ const result = await integrationBuilder.build(appDefinition, {});
602
+
603
+ // Queue workers need Prisma layer for database operations
604
+ expect(result.functions.hubspotQueueWorker.layers).toEqual([
605
+ { Ref: 'PrismaLambdaLayer' }
606
+ ]);
607
+ });
608
+
609
+ it('should attach Prisma layer to multiple queue workers', async () => {
610
+ const appDefinition = {
611
+ integrations: [
612
+ { Definition: { name: 'hubspot' } },
613
+ { Definition: { name: 'salesforce' } },
614
+ { Definition: { name: 'slack' } },
615
+ ],
616
+ };
617
+
618
+ const result = await integrationBuilder.build(appDefinition, {});
619
+
620
+ expect(result.functions.hubspotQueueWorker.layers).toEqual([
621
+ { Ref: 'PrismaLambdaLayer' }
622
+ ]);
623
+ expect(result.functions.salesforceQueueWorker.layers).toEqual([
624
+ { Ref: 'PrismaLambdaLayer' }
625
+ ]);
626
+ expect(result.functions.slackQueueWorker.layers).toEqual([
627
+ { Ref: 'PrismaLambdaLayer' }
628
+ ]);
629
+ });
630
+
631
+ it('should attach Prisma layer to HTTP handlers for database access', async () => {
632
+ const appDefinition = {
633
+ integrations: [
634
+ { Definition: { name: 'stripe' } },
635
+ ],
636
+ };
637
+
638
+ const result = await integrationBuilder.build(appDefinition, {});
639
+
640
+ // HTTP handlers also need Prisma for integration queries
641
+ expect(result.functions.stripe.layers).toEqual([
642
+ { Ref: 'PrismaLambdaLayer' }
643
+ ]);
644
+ });
645
+
646
+ it('should attach Prisma layer to webhook handlers', async () => {
647
+ const appDefinition = {
648
+ integrations: [
649
+ {
650
+ Definition: {
651
+ name: 'hubspot',
652
+ webhooks: true,
653
+ }
654
+ },
655
+ ],
656
+ };
657
+
658
+ const result = await integrationBuilder.build(appDefinition, {});
659
+
660
+ // Webhook handlers need Prisma for credential lookups
661
+ expect(result.functions.hubspotWebhook.layers).toEqual([
662
+ { Ref: 'PrismaLambdaLayer' }
663
+ ]);
664
+ });
665
+ });
592
666
  });
593
667
 
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.52",
4
+ "version": "2.0.0-next.53",
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.52",
20
- "@friggframework/schemas": "2.0.0-next.52",
21
- "@friggframework/test": "2.0.0-next.52",
19
+ "@friggframework/core": "2.0.0-next.53",
20
+ "@friggframework/schemas": "2.0.0-next.53",
21
+ "@friggframework/test": "2.0.0-next.53",
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.52",
50
- "@friggframework/prettier-config": "2.0.0-next.52",
49
+ "@friggframework/eslint-config": "2.0.0-next.53",
50
+ "@friggframework/prettier-config": "2.0.0-next.53",
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": "424fabff6ef8fabf31e2d75b2b1e5600e6e1edb8"
82
+ "gitHead": "a2b844487df9cddad8ccb30c7091b7d1ebd909e3"
83
83
  }
@@ -1,3 +0,0 @@
1
- Build completed: 2025-10-31T04:18:27.501Z
2
- Node: v23.5.0
3
- Platform: darwin