@friggframework/devtools 2.0.0--canary.425.29ee443.0 → 2.0.0--canary.425.1dfec23.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.
@@ -1001,7 +1001,11 @@ const composeServerlessDefinition = async (AppDefinition) => {
1001
1001
  // Always set KMS_KEY_ARN from custom.kmsGrants for consistency
1002
1002
  // This translates AWS_DISCOVERY_KMS_KEY_ID to the runtime variable KMS_KEY_ARN
1003
1003
  if (!definition.provider.environment.KMS_KEY_ARN) {
1004
- definition.provider.environment.KMS_KEY_ARN = '${self:custom.kmsGrants.kmsKeyId}';
1004
+ // Use the discovered value directly when available (from in-process discovery)
1005
+ // Otherwise fall back to environment variable (from separate discovery process)
1006
+ definition.provider.environment.KMS_KEY_ARN =
1007
+ discoveredResources.defaultKmsKeyId ||
1008
+ '${env:AWS_DISCOVERY_KMS_KEY_ID}';
1005
1009
  }
1006
1010
  }
1007
1011
 
@@ -291,8 +291,9 @@ describe('composeServerlessDefinition', () => {
291
291
  expect(result.plugins).toContain('serverless-kms-grants');
292
292
 
293
293
  // Check custom configuration
294
+ // When creating a new key, it should reference the CloudFormation resource
294
295
  expect(result.custom.kmsGrants).toEqual({
295
- kmsKeyId: '${env:AWS_DISCOVERY_KMS_KEY_ID}'
296
+ kmsKeyId: { 'Fn::GetAtt': ['FriggKMSKey', 'Arn'] }
296
297
  });
297
298
  });
298
299
 
@@ -545,7 +546,7 @@ describe('composeServerlessDefinition', () => {
545
546
 
546
547
  // VPC
547
548
  expect(result.provider.vpc).toBeDefined();
548
- expect(result.custom.vpc).toBeDefined();
549
+ // custom.vpc doesn't exist in the serverless template
549
550
  expect(result.resources.Resources.VPCEndpointS3).toBeDefined();
550
551
 
551
552
  // KMS
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.425.29ee443.0",
4
+ "version": "2.0.0--canary.425.1dfec23.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.425.29ee443.0",
13
- "@friggframework/test": "2.0.0--canary.425.29ee443.0",
12
+ "@friggframework/schemas": "2.0.0--canary.425.1dfec23.0",
13
+ "@friggframework/test": "2.0.0--canary.425.1dfec23.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.425.29ee443.0",
36
- "@friggframework/prettier-config": "2.0.0--canary.425.29ee443.0",
35
+ "@friggframework/eslint-config": "2.0.0--canary.425.1dfec23.0",
36
+ "@friggframework/prettier-config": "2.0.0--canary.425.1dfec23.0",
37
37
  "jest": "^30.1.3",
38
38
  "prettier": "^2.7.1",
39
39
  "serverless": "3.39.0",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "29ee443b5bd48e5b110352428c097e6f0c27941f"
69
+ "gitHead": "1dfec23b99101cc38c651a6e2dff99c67b346b72"
70
70
  }