@mapbox/cloudfriend 9.1.1 → 9.2.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.
Files changed (47) hide show
  1. package/.nyc_output/2b544c0b-2830-4ad0-97cd-8e661710b0bb.json +1 -0
  2. package/.nyc_output/65e58b48-bf1c-412d-8dd4-d7b564b12d76.json +1 -0
  3. package/.nyc_output/processinfo/2b544c0b-2830-4ad0-97cd-8e661710b0bb.json +1 -0
  4. package/.nyc_output/processinfo/65e58b48-bf1c-412d-8dd4-d7b564b12d76.json +1 -0
  5. package/.nyc_output/processinfo/index.json +1 -1
  6. package/changelog.md +4 -0
  7. package/lib/shortcuts/api.md +1 -0
  8. package/lib/shortcuts/lambda.js +4 -2
  9. package/package.json +1 -1
  10. package/test/fixtures/shortcuts/event-lambda-custom-eventbus.json +1 -1
  11. package/test/fixtures/shortcuts/event-lambda-defaults.json +4 -2
  12. package/test/fixtures/shortcuts/event-lambda-full.json +4 -2
  13. package/test/fixtures/shortcuts/hookshot-github-compatible-legacy-node-runtimes.json +2 -2
  14. package/test/fixtures/shortcuts/hookshot-github-secret-ref.json +9 -5
  15. package/test/fixtures/shortcuts/hookshot-github-secret-string.json +9 -5
  16. package/test/fixtures/shortcuts/hookshot-github.json +9 -5
  17. package/test/fixtures/shortcuts/hookshot-passthrough-access-log-format.json +9 -5
  18. package/test/fixtures/shortcuts/hookshot-passthrough-alarms.json +9 -5
  19. package/test/fixtures/shortcuts/hookshot-passthrough-compatible-legacy-node-runtimes.json +2 -2
  20. package/test/fixtures/shortcuts/hookshot-passthrough-enhanced-logging.json +9 -5
  21. package/test/fixtures/shortcuts/hookshot-passthrough-full-blown-logging.json +9 -5
  22. package/test/fixtures/shortcuts/hookshot-passthrough-logging.json +9 -5
  23. package/test/fixtures/shortcuts/hookshot-passthrough.json +9 -5
  24. package/test/fixtures/shortcuts/lambda-defaults.json +4 -2
  25. package/test/fixtures/shortcuts/lambda-docker.json +4 -2
  26. package/test/fixtures/shortcuts/lambda-full.json +4 -2
  27. package/test/fixtures/shortcuts/lambda-provided-role.json +4 -2
  28. package/test/fixtures/shortcuts/lambda-zipfile.json +4 -2
  29. package/test/fixtures/shortcuts/log-subscription-lambda-defaults.json +4 -2
  30. package/test/fixtures/shortcuts/log-subscription-lambda-no-defaults.json +4 -2
  31. package/test/fixtures/shortcuts/queue-lambda-zero.json +4 -2
  32. package/test/fixtures/shortcuts/queue-lambda.json +4 -2
  33. package/test/fixtures/shortcuts/scheduled-lambda-defaults.json +4 -2
  34. package/test/fixtures/shortcuts/scheduled-lambda-full.json +4 -2
  35. package/test/fixtures/shortcuts/stream-lambda-defaults.json +4 -2
  36. package/test/fixtures/shortcuts/stream-lambda-no-defaults.json +4 -2
  37. package/test/shortcuts.test.js +16 -0
  38. package/.idea/cloudfriend.iml +0 -9
  39. package/.idea/copilot.data.migration.ask2agent.xml +0 -6
  40. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  41. package/.idea/misc.xml +0 -6
  42. package/.idea/modules.xml +0 -8
  43. package/.idea/vcs.xml +0 -6
  44. package/.nyc_output/b6e4581b-e7fc-423e-9c50-3d23e5008df1.json +0 -1
  45. package/.nyc_output/f18b3f27-0357-4d4c-873b-fe236737f0d0.json +0 -1
  46. package/.nyc_output/processinfo/b6e4581b-e7fc-423e-9c50-3d23e5008df1.json +0 -1
  47. package/.nyc_output/processinfo/f18b3f27-0357-4d4c-873b-fe236737f0d0.json +0 -1
@@ -89,7 +89,9 @@
89
89
  "DependsOn": "MyLambdaRole",
90
90
  "DeletionPolicy": "Delete",
91
91
  "Properties": {
92
- "PolicyName": "MyLambda-lambda-log-access",
92
+ "PolicyName": {
93
+ "Fn::Sub": "${AWS::StackName}-MyLambda-lambda-log-access"
94
+ },
93
95
  "Roles": [
94
96
  {
95
97
  "Ref": "MyLambdaRole"
@@ -172,4 +174,4 @@
172
174
  }
173
175
  },
174
176
  "Outputs": {}
175
- }
177
+ }
@@ -88,7 +88,9 @@
88
88
  "DependsOn": "MyLambdaRole",
89
89
  "DeletionPolicy": "Delete",
90
90
  "Properties": {
91
- "PolicyName": "MyLambda-lambda-log-access",
91
+ "PolicyName": {
92
+ "Fn::Sub": "${AWS::StackName}-MyLambda-lambda-log-access"
93
+ },
92
94
  "Roles": [
93
95
  {
94
96
  "Ref": "MyLambdaRole"
@@ -206,4 +208,4 @@
206
208
  }
207
209
  },
208
210
  "Outputs": {}
209
- }
211
+ }
@@ -88,7 +88,9 @@
88
88
  "DependsOn": "MyLambdaRole",
89
89
  "DeletionPolicy": "Delete",
90
90
  "Properties": {
91
- "PolicyName": "MyLambda-lambda-log-access",
91
+ "PolicyName": {
92
+ "Fn::Sub": "${AWS::StackName}-MyLambda-lambda-log-access"
93
+ },
92
94
  "Roles": [
93
95
  {
94
96
  "Ref": "MyLambdaRole"
@@ -164,4 +166,4 @@
164
166
  }
165
167
  },
166
168
  "Outputs": {}
167
- }
169
+ }
@@ -88,7 +88,9 @@
88
88
  "DependsOn": "MyLambdaRole",
89
89
  "DeletionPolicy": "Delete",
90
90
  "Properties": {
91
- "PolicyName": "MyLambda-lambda-log-access",
91
+ "PolicyName": {
92
+ "Fn::Sub": "${AWS::StackName}-MyLambda-lambda-log-access"
93
+ },
92
94
  "Roles": [
93
95
  {
94
96
  "Ref": "MyLambdaRole"
@@ -177,4 +179,4 @@
177
179
  }
178
180
  },
179
181
  "Outputs": {}
180
- }
182
+ }
@@ -88,7 +88,9 @@
88
88
  "DependsOn": "MyLambdaRole",
89
89
  "DeletionPolicy": "Delete",
90
90
  "Properties": {
91
- "PolicyName": "MyLambda-lambda-log-access",
91
+ "PolicyName": {
92
+ "Fn::Sub": "${AWS::StackName}-MyLambda-lambda-log-access"
93
+ },
92
94
  "Roles": [
93
95
  {
94
96
  "Ref": "MyLambdaRole"
@@ -185,4 +187,4 @@
185
187
  }
186
188
  },
187
189
  "Outputs": {}
188
- }
190
+ }
@@ -218,6 +218,22 @@ test('[shortcuts] lambda', (assert) => {
218
218
  'expected resources generated using no default values'
219
219
  );
220
220
 
221
+ lambda = new cf.shortcuts.Lambda({
222
+ LogicalName: 'MyLambda',
223
+ Code: {
224
+ S3Bucket: 'my-code-bucket',
225
+ S3Key: 'path/to/code.zip'
226
+ },
227
+ LogPolicyName: 'CustomLogPolicyName'
228
+ });
229
+
230
+ template = cf.merge(lambda);
231
+ assert.equal(
232
+ template.Resources.MyLambdaLogPolicy.Properties.PolicyName,
233
+ 'CustomLogPolicyName',
234
+ 'LogPolicyName parameter correctly overrides the default policy name'
235
+ );
236
+
221
237
  assert.end();
222
238
  });
223
239
 
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" inherit-compiler-output="true">
4
- <exclude-output />
5
- <content url="file://$MODULE_DIR$" />
6
- <orderEntry type="inheritedJdk" />
7
- <orderEntry type="sourceFolder" forTests="false" />
8
- </component>
9
- </module>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="Ask2AgentMigrationStateService">
4
- <option name="migrationStatus" value="COMPLETED" />
5
- </component>
6
- </project>
@@ -1,6 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0">
3
- <option name="myName" value="Project Default" />
4
- <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
- </profile>
6
- </component>
package/.idea/misc.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectRootManager" version="2" languageLevel="JDK_23" default="true" project-jdk-name="openjdk-23" project-jdk-type="JavaSDK">
4
- <output url="file://$PROJECT_DIR$/out" />
5
- </component>
6
- </project>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/cloudfriend.iml" filepath="$PROJECT_DIR$/.idea/cloudfriend.iml" />
6
- </modules>
7
- </component>
8
- </project>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="" vcs="Git" />
5
- </component>
6
- </project>