@mavogel/awscdk-rootmail 0.0.290 → 0.0.291

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 (99) hide show
  1. package/.jsii +589 -84
  2. package/.prettierrc +0 -0
  3. package/API.md +49 -5
  4. package/CONTRIBUTING.md +13 -2
  5. package/README.md +8 -0
  6. package/integ-tests/functions/cleanup-handler.ts +2 -2
  7. package/integ-tests/functions/close-opsitem-handler.ts +5 -7
  8. package/integ-tests/functions/send-email-handler.ts +3 -5
  9. package/integ-tests/integ.rootmail-custom-santa.ts +2 -20
  10. package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/RootmailIntegTestStack.assets.json +15 -15
  11. package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/RootmailIntegTestStack.template.json +435 -65
  12. package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/SetupTestIntegStackDefaultTestDeployAssert6EB6FF77.assets.json +6 -6
  13. package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/SetupTestIntegStackDefaultTestDeployAssert6EB6FF77.template.json +137 -5
  14. package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.2819175352ad1ce0dae768e83fc328fb70fb5f10b4a8ff0ccbcb791f02b0716d/index.js +1 -0
  15. package/integ-tests/{integ.rootmail-filter-subject.ts.snapshot/asset.d2b520d86fd9d964c83dc0d5ce2e4456dbde5fa7ae0c791a71865cbdfe2fb855 → integ.rootmail-custom-santa.ts.snapshot/asset.2b86f8b255c50c6eba274c368849bab1c7a3747c30ef5df4c96f8dea8fffa21e}/index.js +3 -3
  16. package/integ-tests/{integ.rootmail-filter-subject.ts.snapshot/asset.9ac6d29f0cc4b20ec46e4c186d9a6f6448c7ea11b689e70a5dda69671a9d6848 → integ.rootmail-custom-santa.ts.snapshot/asset.b01091642674a865788c271ec84db9d88a8dfbe14d4d95583aca8814cfa848b9}/index.js +63 -60
  17. package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/cfn-response.js +1 -0
  18. package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/framework.js +3 -0
  19. package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/outbound.js +1 -0
  20. package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/util.js +1 -0
  21. package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/{asset.53e8368959effe94a6e51bef9c7c5bf0eaf5c4d64eece81632ca62aa34517978.bundle → asset.f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.bundle}/index.js +22701 -24111
  22. package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/integ.json +2 -2
  23. package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/manifest.json +35 -3
  24. package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/tree.json +782 -424
  25. package/integ-tests/integ.rootmail-filter-subject.ts +2 -20
  26. package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/RootmailIntegTestStack.assets.json +15 -15
  27. package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/RootmailIntegTestStack.template.json +435 -65
  28. package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/SetupTestIntegStackDefaultTestDeployAssert6EB6FF77.assets.json +6 -6
  29. package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/SetupTestIntegStackDefaultTestDeployAssert6EB6FF77.template.json +137 -5
  30. package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/asset.2819175352ad1ce0dae768e83fc328fb70fb5f10b4a8ff0ccbcb791f02b0716d/index.js +1 -0
  31. package/integ-tests/{integ.rootmail-custom-santa.ts.snapshot/asset.d2b520d86fd9d964c83dc0d5ce2e4456dbde5fa7ae0c791a71865cbdfe2fb855 → integ.rootmail-filter-subject.ts.snapshot/asset.2b86f8b255c50c6eba274c368849bab1c7a3747c30ef5df4c96f8dea8fffa21e}/index.js +3 -3
  32. package/integ-tests/{integ.rootmail-custom-santa.ts.snapshot/asset.9ac6d29f0cc4b20ec46e4c186d9a6f6448c7ea11b689e70a5dda69671a9d6848 → integ.rootmail-filter-subject.ts.snapshot/asset.b01091642674a865788c271ec84db9d88a8dfbe14d4d95583aca8814cfa848b9}/index.js +63 -60
  33. package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/cfn-response.js +1 -0
  34. package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/framework.js +3 -0
  35. package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/outbound.js +1 -0
  36. package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/util.js +1 -0
  37. package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/{asset.53e8368959effe94a6e51bef9c7c5bf0eaf5c4d64eece81632ca62aa34517978.bundle → asset.f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.bundle}/index.js +22701 -24111
  38. package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/integ.json +2 -2
  39. package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/manifest.json +35 -3
  40. package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/tree.json +782 -424
  41. package/integ-tests/integ.rootmail.ts +4 -30
  42. package/integ-tests/integ.rootmail.ts.snapshot/RootmailIntegTestStack.assets.json +18 -18
  43. package/integ-tests/integ.rootmail.ts.snapshot/RootmailIntegTestStack.template.json +437 -72
  44. package/integ-tests/integ.rootmail.ts.snapshot/SetupTestIntegStackDefaultTestDeployAssert6EB6FF77.assets.json +6 -6
  45. package/integ-tests/integ.rootmail.ts.snapshot/SetupTestIntegStackDefaultTestDeployAssert6EB6FF77.template.json +139 -7
  46. package/integ-tests/integ.rootmail.ts.snapshot/asset.2819175352ad1ce0dae768e83fc328fb70fb5f10b4a8ff0ccbcb791f02b0716d/index.js +1 -0
  47. package/integ-tests/integ.rootmail.ts.snapshot/{asset.d2b520d86fd9d964c83dc0d5ce2e4456dbde5fa7ae0c791a71865cbdfe2fb855 → asset.2b86f8b255c50c6eba274c368849bab1c7a3747c30ef5df4c96f8dea8fffa21e}/index.js +3 -3
  48. package/integ-tests/integ.rootmail.ts.snapshot/{asset.070f758ea9c89b8ceea9bb5141ea511633e1d72ab992b608da4efb3d6eeb2ba5 → asset.6ae1d1fcc0e69b0216c406dcb73136e88857dfc9a29784c57838e1fb0f9f7496}/index.js +5 -5
  49. package/integ-tests/integ.rootmail.ts.snapshot/{asset.adf960437fc6c552bee317e122c1e6839152590b199f7c44c0eee7bfbb744187 → asset.8621467f8f2410fb7445cc07fab37b2e996e541b6f7acb8549df9e88e1def73c}/index.js +63 -60
  50. package/integ-tests/integ.rootmail.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/cfn-response.js +1 -0
  51. package/integ-tests/integ.rootmail.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/framework.js +3 -0
  52. package/integ-tests/integ.rootmail.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/outbound.js +1 -0
  53. package/integ-tests/integ.rootmail.ts.snapshot/asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca/util.js +1 -0
  54. package/integ-tests/integ.rootmail.ts.snapshot/{asset.53e8368959effe94a6e51bef9c7c5bf0eaf5c4d64eece81632ca62aa34517978.bundle → asset.f692c9f68e4daba2abc99103efd3518bced1e9d7a2a89847b9b5d5473c64f1bd.bundle}/index.js +22701 -24111
  55. package/integ-tests/integ.rootmail.ts.snapshot/integ.json +2 -2
  56. package/integ-tests/integ.rootmail.ts.snapshot/manifest.json +35 -3
  57. package/integ-tests/integ.rootmail.ts.snapshot/tree.json +798 -445
  58. package/lib/hosted-zone-dkim-propagation.js +1 -11
  59. package/lib/hosted-zone-dkim-verification-records.js +1 -6
  60. package/lib/rootmail-autowire-dns.js +1 -11
  61. package/lib/rootmail.d.ts +15 -1
  62. package/lib/rootmail.js +5 -2
  63. package/lib/ses-receipt-ruleset-activation.js +1 -11
  64. package/lib/ses-receive.d.ts +12 -0
  65. package/lib/ses-receive.js +5 -7
  66. package/node_modules/cdk-nag/.jsii +2 -2
  67. package/node_modules/cdk-nag/lib/ignore-suppression-conditions.js +5 -5
  68. package/node_modules/cdk-nag/lib/nag-logger.js +2 -2
  69. package/node_modules/cdk-nag/lib/nag-pack.js +1 -1
  70. package/node_modules/cdk-nag/lib/nag-rules.js +1 -1
  71. package/node_modules/cdk-nag/lib/nag-suppressions.js +1 -1
  72. package/node_modules/cdk-nag/lib/packs/aws-solutions.js +1 -1
  73. package/node_modules/cdk-nag/lib/packs/hipaa-security.js +1 -1
  74. package/node_modules/cdk-nag/lib/packs/nist-800-53-r4.js +1 -1
  75. package/node_modules/cdk-nag/lib/packs/nist-800-53-r5.js +1 -1
  76. package/node_modules/cdk-nag/lib/packs/pci-dss-321.js +1 -1
  77. package/node_modules/cdk-nag/package.json +2 -2
  78. package/package.json +25 -21
  79. package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.5cc92ed0cea39e2b8de2dbc527dfb5980a3af9564bd1084d840b9787c7d0467e/index.d.ts +0 -14
  80. package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.5cc92ed0cea39e2b8de2dbc527dfb5980a3af9564bd1084d840b9787c7d0467e/index.js +0 -1
  81. package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf/cfn-response.js +0 -1
  82. package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf/framework.js +0 -3
  83. package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf/outbound.js +0 -1
  84. package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf/util.js +0 -1
  85. package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/asset.5cc92ed0cea39e2b8de2dbc527dfb5980a3af9564bd1084d840b9787c7d0467e/index.d.ts +0 -14
  86. package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/asset.5cc92ed0cea39e2b8de2dbc527dfb5980a3af9564bd1084d840b9787c7d0467e/index.js +0 -1
  87. package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf/cfn-response.js +0 -1
  88. package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf/framework.js +0 -3
  89. package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf/outbound.js +0 -1
  90. package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf/util.js +0 -1
  91. package/integ-tests/integ.rootmail.ts.snapshot/asset.5cc92ed0cea39e2b8de2dbc527dfb5980a3af9564bd1084d840b9787c7d0467e/index.d.ts +0 -14
  92. package/integ-tests/integ.rootmail.ts.snapshot/asset.5cc92ed0cea39e2b8de2dbc527dfb5980a3af9564bd1084d840b9787c7d0467e/index.js +0 -1
  93. package/integ-tests/integ.rootmail.ts.snapshot/asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf/cfn-response.js +0 -1
  94. package/integ-tests/integ.rootmail.ts.snapshot/asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf/framework.js +0 -3
  95. package/integ-tests/integ.rootmail.ts.snapshot/asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf/outbound.js +0 -1
  96. package/integ-tests/integ.rootmail.ts.snapshot/asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf/util.js +0 -1
  97. /package/integ-tests/integ.rootmail-custom-santa.ts.snapshot/{asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf → asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca}/consts.js +0 -0
  98. /package/integ-tests/integ.rootmail-filter-subject.ts.snapshot/{asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf → asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca}/consts.js +0 -0
  99. /package/integ-tests/integ.rootmail.ts.snapshot/{asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf → asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca}/consts.js +0 -0
package/.prettierrc ADDED
File without changes
package/API.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  ### Rootmail <a name="Rootmail" id="@mavogel/awscdk-rootmail.Rootmail"></a>
6
6
 
7
+ Rootmail construct.
8
+
7
9
  #### Initializers <a name="Initializers" id="@mavogel/awscdk-rootmail.Rootmail.Initializer"></a>
8
10
 
9
11
  ```typescript
@@ -62,7 +64,7 @@ Returns a string representation of this construct.
62
64
 
63
65
  ---
64
66
 
65
- ##### ~~`isConstruct`~~ <a name="isConstruct" id="@mavogel/awscdk-rootmail.Rootmail.isConstruct"></a>
67
+ ##### `isConstruct` <a name="isConstruct" id="@mavogel/awscdk-rootmail.Rootmail.isConstruct"></a>
66
68
 
67
69
  ```typescript
68
70
  import { Rootmail } from '@mavogel/awscdk-rootmail'
@@ -72,6 +74,20 @@ Rootmail.isConstruct(x: any)
72
74
 
73
75
  Checks if `x` is a construct.
74
76
 
77
+ Use this method instead of `instanceof` to properly detect `Construct`
78
+ instances, even when the construct library is symlinked.
79
+
80
+ Explanation: in JavaScript, multiple copies of the `constructs` library on
81
+ disk are seen as independent, completely different libraries. As a
82
+ consequence, the class `Construct` in each copy of the `constructs` library
83
+ is seen as a different class, and an instance of one class will not test as
84
+ `instanceof` the other class. `npm install` will not create installations
85
+ like this, but users may manually symlink construct libraries together or
86
+ use a monorepo tool: in those cases, multiple copies of the `constructs`
87
+ library can be accidentally installed, and `instanceof` will behave
88
+ unpredictably. It is safest to avoid using `instanceof`, and using
89
+ this type-testing method instead.
90
+
75
91
  ###### `x`<sup>Required</sup> <a name="x" id="@mavogel/awscdk-rootmail.Rootmail.isConstruct.parameter.x"></a>
76
92
 
77
93
  - *Type:* any
@@ -85,8 +101,8 @@ Any object.
85
101
  | **Name** | **Type** | **Description** |
86
102
  | --- | --- | --- |
87
103
  | <code><a href="#@mavogel/awscdk-rootmail.Rootmail.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
88
- | <code><a href="#@mavogel/awscdk-rootmail.Rootmail.property.emailBucket">emailBucket</a></code> | <code>aws-cdk-lib.aws_s3.Bucket</code> | *No description.* |
89
- | <code><a href="#@mavogel/awscdk-rootmail.Rootmail.property.hostedZoneParameterName">hostedZoneParameterName</a></code> | <code>string</code> | *No description.* |
104
+ | <code><a href="#@mavogel/awscdk-rootmail.Rootmail.property.emailBucket">emailBucket</a></code> | <code>aws-cdk-lib.aws_s3.Bucket</code> | S3 bucket to store the root mails in. |
105
+ | <code><a href="#@mavogel/awscdk-rootmail.Rootmail.property.hostedZoneParameterName">hostedZoneParameterName</a></code> | <code>string</code> | The name parameter in SSM to store the domain name server. |
90
106
 
91
107
  ---
92
108
 
@@ -110,6 +126,8 @@ public readonly emailBucket: Bucket;
110
126
 
111
127
  - *Type:* aws-cdk-lib.aws_s3.Bucket
112
128
 
129
+ S3 bucket to store the root mails in.
130
+
113
131
  ---
114
132
 
115
133
  ##### `hostedZoneParameterName`<sup>Required</sup> <a name="hostedZoneParameterName" id="@mavogel/awscdk-rootmail.Rootmail.property.hostedZoneParameterName"></a>
@@ -120,11 +138,15 @@ public readonly hostedZoneParameterName: string;
120
138
 
121
139
  - *Type:* string
122
140
 
141
+ The name parameter in SSM to store the domain name server.
142
+
123
143
  ---
124
144
 
125
145
 
126
146
  ### SESReceive <a name="SESReceive" id="@mavogel/awscdk-rootmail.SESReceive"></a>
127
147
 
148
+ SES Receive construct.
149
+
128
150
  #### Initializers <a name="Initializers" id="@mavogel/awscdk-rootmail.SESReceive.Initializer"></a>
129
151
 
130
152
  ```typescript
@@ -183,7 +205,7 @@ Returns a string representation of this construct.
183
205
 
184
206
  ---
185
207
 
186
- ##### ~~`isConstruct`~~ <a name="isConstruct" id="@mavogel/awscdk-rootmail.SESReceive.isConstruct"></a>
208
+ ##### `isConstruct` <a name="isConstruct" id="@mavogel/awscdk-rootmail.SESReceive.isConstruct"></a>
187
209
 
188
210
  ```typescript
189
211
  import { SESReceive } from '@mavogel/awscdk-rootmail'
@@ -193,6 +215,20 @@ SESReceive.isConstruct(x: any)
193
215
 
194
216
  Checks if `x` is a construct.
195
217
 
218
+ Use this method instead of `instanceof` to properly detect `Construct`
219
+ instances, even when the construct library is symlinked.
220
+
221
+ Explanation: in JavaScript, multiple copies of the `constructs` library on
222
+ disk are seen as independent, completely different libraries. As a
223
+ consequence, the class `Construct` in each copy of the `constructs` library
224
+ is seen as a different class, and an instance of one class will not test as
225
+ `instanceof` the other class. `npm install` will not create installations
226
+ like this, but users may manually symlink construct libraries together or
227
+ use a monorepo tool: in those cases, multiple copies of the `constructs`
228
+ library can be accidentally installed, and `instanceof` will behave
229
+ unpredictably. It is safest to avoid using `instanceof`, and using
230
+ this type-testing method instead.
231
+
196
232
  ###### `x`<sup>Required</sup> <a name="x" id="@mavogel/awscdk-rootmail.SESReceive.isConstruct.parameter.x"></a>
197
233
 
198
234
  - *Type:* any
@@ -226,6 +262,8 @@ The tree node.
226
262
 
227
263
  ### RootmailProps <a name="RootmailProps" id="@mavogel/awscdk-rootmail.RootmailProps"></a>
228
264
 
265
+ Properties for the construct.
266
+
229
267
  #### Initializer <a name="Initializer" id="@mavogel/awscdk-rootmail.RootmailProps.Initializer"></a>
230
268
 
231
269
  ```typescript
@@ -268,6 +306,7 @@ public readonly customSesReceiveFunction: Function;
268
306
  ```
269
307
 
270
308
  - *Type:* aws-cdk-lib.aws_lambda.Function
309
+ - *Default:* the provided functions within the construct
271
310
 
272
311
  The custom SES receive function to use.
273
312
 
@@ -349,7 +388,7 @@ public readonly wireDNSToHostedZoneID: string;
349
388
  ```
350
389
 
351
390
  - *Type:* string
352
- - *Default:* undefined
391
+ - *Default:* emtpy string
353
392
 
354
393
  The hosted zone ID of the domain that is registered Route53 AND in the same AWS account to enable autowiring of the DNS records.
355
394
 
@@ -357,6 +396,8 @@ The hosted zone ID of the domain that is registered Route53 AND in the same AWS
357
396
 
358
397
  ### SESReceiveProps <a name="SESReceiveProps" id="@mavogel/awscdk-rootmail.SESReceiveProps"></a>
359
398
 
399
+ Properties for the SESReceive construct.
400
+
360
401
  #### Initializer <a name="Initializer" id="@mavogel/awscdk-rootmail.SESReceiveProps.Initializer"></a>
361
402
 
362
403
  ```typescript
@@ -421,6 +462,7 @@ public readonly customSesReceiveFunction: Function;
421
462
  ```
422
463
 
423
464
  - *Type:* aws-cdk-lib.aws_lambda.Function
465
+ - *Default:* the provided functions within the construct
424
466
 
425
467
  The custom SES receive function to use.
426
468
 
@@ -433,6 +475,7 @@ public readonly filteredEmailSubjects: string[];
433
475
  ```
434
476
 
435
477
  - *Type:* string[]
478
+ - *Default:* 2 subjects: 'Your AWS Account is Ready - Get Started Now' and 'Welcome to Amazon Web Services'
436
479
 
437
480
  Filtered email subjects.
438
481
 
@@ -447,6 +490,7 @@ public readonly setDestroyPolicyToAllResources: boolean;
447
490
  ```
448
491
 
449
492
  - *Type:* boolean
493
+ - *Default:* false
450
494
 
451
495
  Whether to set all removal policies to DESTROY.
452
496
 
package/CONTRIBUTING.md CHANGED
@@ -31,9 +31,20 @@ To send us a pull request, please:
31
31
 
32
32
  1. Fork the repository.
33
33
  2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
34
- 3. Ensure local tests pass -> `yarn run test`
34
+ 3. Ensure local tests pass -> `npm test`
35
35
  4. The integ tests will run separately in the AWS account of the owner of the project.
36
- 5. Build the project -> `yarn run build` to also update the `API.md` file.
36
+ 5. Build the project -> `npm build` to also update the `API.md` file.
37
+ ```bash
38
+ # do this within the container as we build jsii for multiple targets
39
+ docker run -it --rm -v $(pwd):/source -w /source --user 0:0 public.ecr.aws/jsii/superchain:1-bookworm-slim-node22 bash
40
+ # clean node_modules for fresh dependencies for the OS within the container
41
+ rm -rf node_modules
42
+ npm ci
43
+ # now build it
44
+ npx projen build
45
+ # also check for awscdk linting, which checks the API.md
46
+ npm run awslint
47
+ ```
37
48
  6. Commit to your fork using clear commit messages.
38
49
  7. Send us a pull request, answering any default questions in the pull request interface.
39
50
  8. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
package/README.md CHANGED
@@ -1,3 +1,11 @@
1
+ ![Source](https://img.shields.io/github/stars/MV-Consulting/awscdk-rootmail?logo=github&label=GitHub%20Stars)
2
+ [![Build Status](https://github.com/MV-Consulting/awscdk-rootmail/actions/workflows/build.yml/badge.svg)](https://github.com/MV-Consulting/awscdk-rootmail/actions/workflows/build.yml)
3
+ [![ESLint Code Formatting](https://img.shields.io/badge/code_style-eslint-brightgreen.svg)](https://eslint.org)
4
+ [![Latest release](https://img.shields.io/github/release/MV-Consulting/awscdk-rootmail.svg)](https://github.com/MV-Consulting/awscdk-rootmail/releases)
5
+ ![GitHub](https://img.shields.io/github/license/MV-Consulting/awscdk-rootmail)
6
+ [![npm](https://img.shields.io/npm/dt/@mavogel/awscdk-rootmail?label=npm&color=orange)](https://www.npmjs.com/package/@mavogel/awscdk-rootmail)
7
+ [![typescript](https://img.shields.io/badge/jsii-typescript-blueviolet.svg)](https://www.npmjs.com/package/@mavogel/cdk-vscode-server)
8
+
1
9
  # awscdk-rootmail
2
10
 
3
11
  A single email box for all your root user emails in all AWS accounts of the organization.
@@ -24,10 +24,10 @@ export const handler = async (event: any) => {
24
24
  try {
25
25
  await emptyS3Bucket(s3, emailBucketName || '');
26
26
  // await deleteLogGroups(cwl, logGroupNamePrefixes);
27
- return { success: 200 };
27
+ return 'OK';
28
28
  } catch (err) {
29
29
  console.log(`Error cleaning up: ${err}`);
30
- return { success: 500, err: err };
30
+ return 'NOK';
31
31
  }
32
32
  };
33
33
 
@@ -89,7 +89,7 @@ export const handler = async (event: any) => {
89
89
  log({
90
90
  message: 'opsItem undefined',
91
91
  });
92
- return { closeStatusCode: 500 };
92
+ return 'NOK';
93
93
  }
94
94
  log({
95
95
  message: 'Got opsItem',
@@ -114,7 +114,7 @@ export const handler = async (event: any) => {
114
114
  expected: `title: '${title}', source: '${source}', description: '${description}'`,
115
115
  got: `title: '${opsItemTitle}', source: '${opsItemSource}', description: '${opsItemDescription}'`,
116
116
  });
117
- return { closeStatusCode: 500 };
117
+ return 'NOK';
118
118
  }
119
119
 
120
120
  // 2 close opsItem
@@ -130,7 +130,7 @@ export const handler = async (event: any) => {
130
130
  err: `httpStatusCode: ${resUpdate.$metadata.httpStatusCode}`,
131
131
  });
132
132
 
133
- return { closeStatusCode: 500, err: resUpdate.$metadata.httpStatusCode };
133
+ return 'NOK';
134
134
  }
135
135
 
136
136
  log({
@@ -140,15 +140,13 @@ export const handler = async (event: any) => {
140
140
  res: resUpdate,
141
141
  });
142
142
 
143
- // return { statusCode: res.$response.httpResponse.statusCode };
144
- return { closeStatusCode: 200 };
143
+ return 'OK';
145
144
  } catch (err) {
146
145
  log({
147
146
  message: 'Error (catch) getting and closing opsItem',
148
147
  err: err,
149
148
  });
150
- // return { statusCode: err.statusCode, err: err };
151
- return { closeStatusCode: 500, err: err };
149
+ return 'NOK';
152
150
  }
153
151
  };
154
152
 
@@ -41,7 +41,7 @@ export const handler = async (event: any) => {
41
41
  err: `httpStatusCode: ${res.$metadata.httpStatusCode}`,
42
42
  });
43
43
 
44
- return { sendStatusCode: 500, err: res.$metadata.httpStatusCode };
44
+ return 'NOK';
45
45
  }
46
46
  log({
47
47
  message: 'Email sent',
@@ -49,15 +49,13 @@ export const handler = async (event: any) => {
49
49
  res: res,
50
50
  });
51
51
 
52
- // return { statusCode: res.$response.httpResponse.statusCode };
53
- return { sendStatusCode: 200 };
52
+ return 'OK';
54
53
  } catch (err) {
55
54
  log({
56
55
  message: 'Error (catch) sending email',
57
56
  err: err,
58
57
  });
59
- // return { statusCode: err.statusCode, err: err };
60
- return { sendStatusCode: 500, err: err };
58
+ return 'NOK';
61
59
  }
62
60
  };
63
61
 
@@ -30,11 +30,6 @@ const customSesReceiveFunction = new NodejsFunction(stackUnderTest, 'custom-ses-
30
30
  runtime: lambda.Runtime.NODEJS_18_X,
31
31
  logRetention: 1,
32
32
  timeout: Duration.seconds(30),
33
- bundling: {
34
- esbuildArgs: {
35
- "--packages": "bundle",
36
- },
37
- },
38
33
  });
39
34
 
40
35
  customSesReceiveFunction.addToRolePolicy(new iam.PolicyStatement({
@@ -92,11 +87,6 @@ const sendEmailHandler = new NodejsFunction(stackUnderTest, 'send-email-handler'
92
87
  resources: ['*'],
93
88
  }),
94
89
  ],
95
- bundling: {
96
- esbuildArgs: {
97
- "--packages": "bundle",
98
- },
99
- },
100
90
  });
101
91
 
102
92
  /**
@@ -110,22 +100,14 @@ const sendTestEmailAssertion = integ.assertions
110
100
  .invokeFunction({
111
101
  functionName: sendEmailHandler.functionName,
112
102
  logType: LogType.TAIL,
113
- invocationType: InvocationType.REQUEST_RESPONE, // to run it synchronously
103
+ invocationType: InvocationType.REQUEST_RESPONSE, // to run it synchronously
114
104
  payload: JSON.stringify({
115
105
  id: id,
116
106
  text: message,
117
107
  sourceMail: `test@${fullDomain}`,
118
108
  toMail: `root+${id}@${fullDomain}`,
119
109
  }),
120
- }).expect(ExpectedResult.objectLike(
121
- // as the object 'return { sendStatusCode: 200 };' is wrapped in a Payload object with other properties
122
- {
123
- Payload: {
124
- sendStatusCode: 200,
125
- },
126
- },
127
- ),
128
- );
110
+ }).expect(ExpectedResult.objectLike({ Payload: '"OK"' }));
129
111
 
130
112
  const getHostedZoneParametersAssertion = integ.assertions
131
113
  /**
@@ -1,28 +1,28 @@
1
1
  {
2
- "version": "33.0.0",
2
+ "version": "39.0.0",
3
3
  "files": {
4
- "9ac6d29f0cc4b20ec46e4c186d9a6f6448c7ea11b689e70a5dda69671a9d6848": {
4
+ "b01091642674a865788c271ec84db9d88a8dfbe14d4d95583aca8814cfa848b9": {
5
5
  "source": {
6
- "path": "asset.9ac6d29f0cc4b20ec46e4c186d9a6f6448c7ea11b689e70a5dda69671a9d6848",
6
+ "path": "asset.b01091642674a865788c271ec84db9d88a8dfbe14d4d95583aca8814cfa848b9",
7
7
  "packaging": "zip"
8
8
  },
9
9
  "destinations": {
10
10
  "current_account-current_region": {
11
11
  "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12
- "objectKey": "9ac6d29f0cc4b20ec46e4c186d9a6f6448c7ea11b689e70a5dda69671a9d6848.zip",
12
+ "objectKey": "b01091642674a865788c271ec84db9d88a8dfbe14d4d95583aca8814cfa848b9.zip",
13
13
  "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
14
14
  }
15
15
  }
16
16
  },
17
- "5cc92ed0cea39e2b8de2dbc527dfb5980a3af9564bd1084d840b9787c7d0467e": {
17
+ "2819175352ad1ce0dae768e83fc328fb70fb5f10b4a8ff0ccbcb791f02b0716d": {
18
18
  "source": {
19
- "path": "asset.5cc92ed0cea39e2b8de2dbc527dfb5980a3af9564bd1084d840b9787c7d0467e",
19
+ "path": "asset.2819175352ad1ce0dae768e83fc328fb70fb5f10b4a8ff0ccbcb791f02b0716d",
20
20
  "packaging": "zip"
21
21
  },
22
22
  "destinations": {
23
23
  "current_account-current_region": {
24
24
  "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
25
- "objectKey": "5cc92ed0cea39e2b8de2dbc527dfb5980a3af9564bd1084d840b9787c7d0467e.zip",
25
+ "objectKey": "2819175352ad1ce0dae768e83fc328fb70fb5f10b4a8ff0ccbcb791f02b0716d.zip",
26
26
  "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
27
27
  }
28
28
  }
@@ -40,15 +40,15 @@
40
40
  }
41
41
  }
42
42
  },
43
- "f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf": {
43
+ "bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca": {
44
44
  "source": {
45
- "path": "asset.f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf",
45
+ "path": "asset.bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca",
46
46
  "packaging": "zip"
47
47
  },
48
48
  "destinations": {
49
49
  "current_account-current_region": {
50
50
  "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
51
- "objectKey": "f2d30cfc360482320a52a4fcde8a70f3569df79ab30be24650fda58eb60052cf.zip",
51
+ "objectKey": "bdc104ed9cab1b5b6421713c8155f0b753380595356f710400609664d3635eca.zip",
52
52
  "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
53
53
  }
54
54
  }
@@ -131,20 +131,20 @@
131
131
  }
132
132
  }
133
133
  },
134
- "d2b520d86fd9d964c83dc0d5ce2e4456dbde5fa7ae0c791a71865cbdfe2fb855": {
134
+ "2b86f8b255c50c6eba274c368849bab1c7a3747c30ef5df4c96f8dea8fffa21e": {
135
135
  "source": {
136
- "path": "asset.d2b520d86fd9d964c83dc0d5ce2e4456dbde5fa7ae0c791a71865cbdfe2fb855",
136
+ "path": "asset.2b86f8b255c50c6eba274c368849bab1c7a3747c30ef5df4c96f8dea8fffa21e",
137
137
  "packaging": "zip"
138
138
  },
139
139
  "destinations": {
140
140
  "current_account-current_region": {
141
141
  "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
142
- "objectKey": "d2b520d86fd9d964c83dc0d5ce2e4456dbde5fa7ae0c791a71865cbdfe2fb855.zip",
142
+ "objectKey": "2b86f8b255c50c6eba274c368849bab1c7a3747c30ef5df4c96f8dea8fffa21e.zip",
143
143
  "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
144
144
  }
145
145
  }
146
146
  },
147
- "43f46a8a4352e5d8823b3dc3e2f367cf50c48a4b4d1da8ed6e0d1463299d34ba": {
147
+ "e89edaf4c95d4ec233759458c98b6c1e94ba575875cd992043e5a57f36a99f65": {
148
148
  "source": {
149
149
  "path": "RootmailIntegTestStack.template.json",
150
150
  "packaging": "file"
@@ -152,7 +152,7 @@
152
152
  "destinations": {
153
153
  "current_account-current_region": {
154
154
  "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
155
- "objectKey": "43f46a8a4352e5d8823b3dc3e2f367cf50c48a4b4d1da8ed6e0d1463299d34ba.json",
155
+ "objectKey": "e89edaf4c95d4ec233759458c98b6c1e94ba575875cd992043e5a57f36a99f65.json",
156
156
  "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
157
157
  }
158
158
  }