@friggframework/devtools 2.0.0--canary.463.e30794c.0 → 2.0.0--canary.464.f9d3fc0.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.
@@ -68,8 +68,7 @@ const getAppEnvironmentVars = (AppDefinition) => {
68
68
  }
69
69
  if (skippedKeys.length > 0) {
70
70
  console.log(
71
- ` ⚠️ Skipped ${
72
- skippedKeys.length
71
+ ` ⚠️ Skipped ${skippedKeys.length
73
72
  } reserved AWS Lambda variables: ${skippedKeys.join(', ')}`
74
73
  );
75
74
  }
@@ -675,7 +674,8 @@ const createBaseDefinition = (
675
674
  },
676
675
  },
677
676
  plugins: [
678
- 'serverless-jetpack',
677
+ // Temporarily disabled Jetpack - it ignores package.patterns in dependency mode
678
+ // 'serverless-jetpack',
679
679
  'serverless-dotenv-plugin',
680
680
  'serverless-offline-sqs',
681
681
  'serverless-offline',
@@ -696,9 +696,10 @@ const createBaseDefinition = (
696
696
  secretAccessKey: 'root',
697
697
  skipCacheInvalidation: false,
698
698
  },
699
- jetpack: {
700
- base: '..',
701
- },
699
+ // Jetpack config removed - testing with standard Serverless packaging
700
+ // jetpack: {
701
+ // base: '..',
702
+ // },
702
703
  },
703
704
  functions: {
704
705
  auth: {
@@ -850,7 +851,7 @@ const applyKmsConfiguration = (
850
851
  if (AppDefinition.encryption?.createResourceIfNoneFound !== true) {
851
852
  throw new Error(
852
853
  'KMS field-level encryption is enabled but no KMS key was found. ' +
853
- 'Either provide an existing KMS key or set encryption.createResourceIfNoneFound to true to create a new key.'
854
+ 'Either provide an existing KMS key or set encryption.createResourceIfNoneFound to true to create a new key.'
854
855
  );
855
856
  }
856
857
 
@@ -889,9 +890,8 @@ const applyKmsConfiguration = (
889
890
  Resource: '*',
890
891
  Condition: {
891
892
  StringEquals: {
892
- 'kms:ViaService': `lambda.${
893
- process.env.AWS_REGION || 'us-east-1'
894
- }.amazonaws.com`,
893
+ 'kms:ViaService': `lambda.${process.env.AWS_REGION || 'us-east-1'
894
+ }.amazonaws.com`,
895
895
  },
896
896
  },
897
897
  },
@@ -1293,13 +1293,13 @@ const configureVpc = (definition, AppDefinition, discoveredResources) => {
1293
1293
  };
1294
1294
 
1295
1295
  definition.resources.Resources.FriggPublicSubnetRouteTableAssociation =
1296
- {
1297
- Type: 'AWS::EC2::SubnetRouteTableAssociation',
1298
- Properties: {
1299
- SubnetId: { Ref: 'FriggPublicSubnet' },
1300
- RouteTableId: { Ref: 'FriggPublicRouteTable' },
1301
- },
1302
- };
1296
+ {
1297
+ Type: 'AWS::EC2::SubnetRouteTableAssociation',
1298
+ Properties: {
1299
+ SubnetId: { Ref: 'FriggPublicSubnet' },
1300
+ RouteTableId: { Ref: 'FriggPublicRouteTable' },
1301
+ },
1302
+ };
1303
1303
 
1304
1304
  definition.resources.Resources.FriggLambdaRouteTable = {
1305
1305
  Type: 'AWS::EC2::RouteTable',
@@ -1316,22 +1316,22 @@ const configureVpc = (definition, AppDefinition, discoveredResources) => {
1316
1316
  };
1317
1317
 
1318
1318
  definition.resources.Resources.FriggPrivateSubnet1RouteTableAssociation =
1319
- {
1320
- Type: 'AWS::EC2::SubnetRouteTableAssociation',
1321
- Properties: {
1322
- SubnetId: { Ref: 'FriggPrivateSubnet1' },
1323
- RouteTableId: { Ref: 'FriggLambdaRouteTable' },
1324
- },
1325
- };
1319
+ {
1320
+ Type: 'AWS::EC2::SubnetRouteTableAssociation',
1321
+ Properties: {
1322
+ SubnetId: { Ref: 'FriggPrivateSubnet1' },
1323
+ RouteTableId: { Ref: 'FriggLambdaRouteTable' },
1324
+ },
1325
+ };
1326
1326
 
1327
1327
  definition.resources.Resources.FriggPrivateSubnet2RouteTableAssociation =
1328
- {
1329
- Type: 'AWS::EC2::SubnetRouteTableAssociation',
1330
- Properties: {
1331
- SubnetId: { Ref: 'FriggPrivateSubnet2' },
1332
- RouteTableId: { Ref: 'FriggLambdaRouteTable' },
1333
- },
1334
- };
1328
+ {
1329
+ Type: 'AWS::EC2::SubnetRouteTableAssociation',
1330
+ Properties: {
1331
+ SubnetId: { Ref: 'FriggPrivateSubnet2' },
1332
+ RouteTableId: { Ref: 'FriggLambdaRouteTable' },
1333
+ },
1334
+ };
1335
1335
  }
1336
1336
  } else if (subnetManagement === 'use-existing') {
1337
1337
  if (
@@ -1348,12 +1348,12 @@ const configureVpc = (definition, AppDefinition, discoveredResources) => {
1348
1348
  AppDefinition.vpc.subnets?.ids?.length > 0
1349
1349
  ? AppDefinition.vpc.subnets.ids
1350
1350
  : discoveredResources.privateSubnetId1 &&
1351
- discoveredResources.privateSubnetId2
1352
- ? [
1353
- discoveredResources.privateSubnetId1,
1354
- discoveredResources.privateSubnetId2,
1355
- ]
1356
- : [];
1351
+ discoveredResources.privateSubnetId2
1352
+ ? [
1353
+ discoveredResources.privateSubnetId1,
1354
+ discoveredResources.privateSubnetId2,
1355
+ ]
1356
+ : [];
1357
1357
 
1358
1358
  if (vpcConfig.subnetIds.length < 2) {
1359
1359
  if (AppDefinition.vpc.selfHeal) {
@@ -1560,13 +1560,13 @@ const configureVpc = (definition, AppDefinition, discoveredResources) => {
1560
1560
  };
1561
1561
 
1562
1562
  definition.resources.Resources.FriggPublicSubnetRouteTableAssociation =
1563
- {
1564
- Type: 'AWS::EC2::SubnetRouteTableAssociation',
1565
- Properties: {
1566
- SubnetId: { Ref: 'FriggPublicSubnet' },
1567
- RouteTableId: { Ref: 'FriggPublicRouteTable' },
1568
- },
1569
- };
1563
+ {
1564
+ Type: 'AWS::EC2::SubnetRouteTableAssociation',
1565
+ Properties: {
1566
+ SubnetId: { Ref: 'FriggPublicSubnet' },
1567
+ RouteTableId: { Ref: 'FriggPublicRouteTable' },
1568
+ },
1569
+ };
1570
1570
  }
1571
1571
 
1572
1572
  definition.resources.Resources.FriggNATGateway = {
@@ -1577,11 +1577,11 @@ const configureVpc = (definition, AppDefinition, discoveredResources) => {
1577
1577
  AllocationId: useExistingEip
1578
1578
  ? discoveredResources.existingElasticIpAllocationId
1579
1579
  : {
1580
- 'Fn::GetAtt': [
1581
- 'FriggNATGatewayEIP',
1582
- 'AllocationId',
1583
- ],
1584
- },
1580
+ 'Fn::GetAtt': [
1581
+ 'FriggNATGatewayEIP',
1582
+ 'AllocationId',
1583
+ ],
1584
+ },
1585
1585
  SubnetId: discoveredResources.publicSubnetId || {
1586
1586
  Ref: 'FriggPublicSubnet',
1587
1587
  },
@@ -1955,11 +1955,34 @@ const attachIntegrations = (definition, AppDefinition) => {
1955
1955
  }
1956
1956
 
1957
1957
  const integrationName = integration.Definition.name;
1958
- const queueReference = `${
1959
- integrationName.charAt(0).toUpperCase() + integrationName.slice(1)
1960
- }Queue`;
1958
+ const queueReference = `${integrationName.charAt(0).toUpperCase() + integrationName.slice(1)
1959
+ }Queue`;
1961
1960
  const queueName = `\${self:service}--\${self:provider.stage}-${queueReference}`;
1962
1961
 
1962
+ // Add webhook handler if enabled (BEFORE catch-all proxy route)
1963
+ const webhookConfig = integration.Definition.webhooks;
1964
+ if (webhookConfig && (webhookConfig === true || webhookConfig.enabled === true)) {
1965
+ const webhookFunctionName = `${integrationName}Webhook`;
1966
+
1967
+ definition.functions[webhookFunctionName] = {
1968
+ handler: `node_modules/@friggframework/core/handlers/routers/integration-webhook-routers.handlers.${integrationName}Webhook.handler`,
1969
+ events: [
1970
+ {
1971
+ httpApi: {
1972
+ path: `/api/${integrationName}-integration/webhooks`,
1973
+ method: 'POST',
1974
+ },
1975
+ },
1976
+ {
1977
+ httpApi: {
1978
+ path: `/api/${integrationName}-integration/webhooks/{integrationId}`,
1979
+ method: 'POST',
1980
+ },
1981
+ },
1982
+ ],
1983
+ };
1984
+ }
1985
+
1963
1986
  definition.functions[integrationName] = {
1964
1987
  handler: `node_modules/@friggframework/core/handlers/routers/integration-defined-routers.handlers.${integrationName}.handler`,
1965
1988
  events: [
@@ -2010,33 +2033,6 @@ const attachIntegrations = (definition, AppDefinition) => {
2010
2033
  };
2011
2034
 
2012
2035
  definition.custom[queueReference] = queueName;
2013
-
2014
- // Add webhook handler if enabled
2015
- const webhookConfig = integration.Definition.webhooks;
2016
- if (
2017
- webhookConfig &&
2018
- (webhookConfig === true || webhookConfig.enabled === true)
2019
- ) {
2020
- const webhookFunctionName = `${integrationName}Webhook`;
2021
-
2022
- definition.functions[webhookFunctionName] = {
2023
- handler: `node_modules/@friggframework/core/handlers/routers/integration-webhook-routers.handlers.${integrationName}Webhook.handler`,
2024
- events: [
2025
- {
2026
- httpApi: {
2027
- path: `/api/${integrationName}-integration/webhooks`,
2028
- method: 'POST',
2029
- },
2030
- },
2031
- {
2032
- httpApi: {
2033
- path: `/api/${integrationName}-integration/webhooks/{integrationId}`,
2034
- method: 'POST',
2035
- },
2036
- },
2037
- ],
2038
- };
2039
- }
2040
2036
  }
2041
2037
  };
2042
2038
 
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.463.e30794c.0",
4
+ "version": "2.0.0--canary.464.f9d3fc0.0",
5
5
  "dependencies": {
6
6
  "@aws-sdk/client-ec2": "^3.835.0",
7
7
  "@aws-sdk/client-kms": "^3.835.0",
@@ -9,8 +9,8 @@
9
9
  "@babel/eslint-parser": "^7.18.9",
10
10
  "@babel/parser": "^7.25.3",
11
11
  "@babel/traverse": "^7.25.3",
12
- "@friggframework/schemas": "2.0.0--canary.463.e30794c.0",
13
- "@friggframework/test": "2.0.0--canary.463.e30794c.0",
12
+ "@friggframework/schemas": "2.0.0--canary.464.f9d3fc0.0",
13
+ "@friggframework/test": "2.0.0--canary.464.f9d3fc0.0",
14
14
  "@hapi/boom": "^10.0.1",
15
15
  "@inquirer/prompts": "^5.3.8",
16
16
  "axios": "^1.7.2",
@@ -32,8 +32,8 @@
32
32
  "serverless-http": "^2.7.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@friggframework/eslint-config": "2.0.0--canary.463.e30794c.0",
36
- "@friggframework/prettier-config": "2.0.0--canary.463.e30794c.0",
35
+ "@friggframework/eslint-config": "2.0.0--canary.464.f9d3fc0.0",
36
+ "@friggframework/prettier-config": "2.0.0--canary.464.f9d3fc0.0",
37
37
  "aws-sdk-client-mock": "^4.1.0",
38
38
  "aws-sdk-client-mock-jest": "^4.1.0",
39
39
  "jest": "^30.1.3",
@@ -68,5 +68,5 @@
68
68
  "publishConfig": {
69
69
  "access": "public"
70
70
  },
71
- "gitHead": "e30794cb481bbedf7cf57ef3356ae276e2988320"
71
+ "gitHead": "f9d3fc0e7c7135c87a6b6b1befc7d7912966f86a"
72
72
  }