quidproquo-deploy-awscdk 0.1.3 → 0.1.4

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 (423) hide show
  1. package/lib/commonjs/QPQApp.js +1 -0
  2. package/lib/commonjs/QPQApp.js.map +1 -0
  3. package/lib/commonjs/constants/BootstrapResource.js +1 -0
  4. package/lib/commonjs/constants/BootstrapResource.js.map +1 -0
  5. package/lib/commonjs/constants/index.js +1 -0
  6. package/lib/commonjs/constants/index.js.map +1 -0
  7. package/lib/commonjs/constants/logging.js +1 -0
  8. package/lib/commonjs/constants/logging.js.map +1 -0
  9. package/lib/commonjs/constructs/base/QpqConstructBlock.js +1 -0
  10. package/lib/commonjs/constructs/base/QpqConstructBlock.js.map +1 -0
  11. package/lib/commonjs/constructs/base/QpqResource.js +1 -0
  12. package/lib/commonjs/constructs/base/QpqResource.js.map +1 -0
  13. package/lib/commonjs/constructs/base/createDefaultResourceAlarm.js +1 -0
  14. package/lib/commonjs/constructs/base/createDefaultResourceAlarm.js.map +1 -0
  15. package/lib/commonjs/constructs/base/index.js +1 -0
  16. package/lib/commonjs/constructs/base/index.js.map +1 -0
  17. package/lib/commonjs/constructs/basic/BSQpqLambdaWarmerEventConstruct.js +1 -0
  18. package/lib/commonjs/constructs/basic/BSQpqLambdaWarmerEventConstruct.js.map +1 -0
  19. package/lib/commonjs/constructs/basic/DomainCertificateLookup.js +1 -0
  20. package/lib/commonjs/constructs/basic/DomainCertificateLookup.js.map +1 -0
  21. package/lib/commonjs/constructs/basic/Function.js +1 -0
  22. package/lib/commonjs/constructs/basic/Function.js.map +1 -0
  23. package/lib/commonjs/constructs/basic/LambdaLayers.js +1 -0
  24. package/lib/commonjs/constructs/basic/LambdaLayers.js.map +1 -0
  25. package/lib/commonjs/constructs/basic/SubdomainName.js +1 -0
  26. package/lib/commonjs/constructs/basic/SubdomainName.js.map +1 -0
  27. package/lib/commonjs/constructs/basic/WebserverRoll.js +2 -1
  28. package/lib/commonjs/constructs/basic/WebserverRoll.js.map +1 -0
  29. package/lib/commonjs/constructs/basic/index.js +1 -0
  30. package/lib/commonjs/constructs/basic/index.js.map +1 -0
  31. package/lib/commonjs/constructs/feature/account/QpqAccountBudgetConstruct.js +1 -0
  32. package/lib/commonjs/constructs/feature/account/QpqAccountBudgetConstruct.js.map +1 -0
  33. package/lib/commonjs/constructs/feature/account/QpqAccountCloudTrailConstruct.js +1 -0
  34. package/lib/commonjs/constructs/feature/account/QpqAccountCloudTrailConstruct.js.map +1 -0
  35. package/lib/commonjs/constructs/feature/account/QpqAccountSecurityServicesConstruct.js +1 -0
  36. package/lib/commonjs/constructs/feature/account/QpqAccountSecurityServicesConstruct.js.map +1 -0
  37. package/lib/commonjs/constructs/feature/account/index.js +1 -0
  38. package/lib/commonjs/constructs/feature/account/index.js.map +1 -0
  39. package/lib/commonjs/constructs/feature/config/alarm/QpqConfigAwsAlarm.js +1 -0
  40. package/lib/commonjs/constructs/feature/config/alarm/QpqConfigAwsAlarm.js.map +1 -0
  41. package/lib/commonjs/constructs/feature/config/alarm/index.js +1 -0
  42. package/lib/commonjs/constructs/feature/config/alarm/index.js.map +1 -0
  43. package/lib/commonjs/constructs/feature/config/dashboard/QpqConfigAwsDashboardConstruct.js +1 -0
  44. package/lib/commonjs/constructs/feature/config/dashboard/QpqConfigAwsDashboardConstruct.js.map +1 -0
  45. package/lib/commonjs/constructs/feature/config/dashboard/index.js +1 -0
  46. package/lib/commonjs/constructs/feature/config/dashboard/index.js.map +1 -0
  47. package/lib/commonjs/constructs/feature/config/index.js +1 -0
  48. package/lib/commonjs/constructs/feature/config/index.js.map +1 -0
  49. package/lib/commonjs/constructs/feature/config/organization/QpqBootstrapConfigAwsOrganization.js +1 -0
  50. package/lib/commonjs/constructs/feature/config/organization/QpqBootstrapConfigAwsOrganization.js.map +1 -0
  51. package/lib/commonjs/constructs/feature/config/organization/index.js +1 -0
  52. package/lib/commonjs/constructs/feature/config/organization/index.js.map +1 -0
  53. package/lib/commonjs/constructs/feature/config/waf/QpqBootstrapConfigWafConstruct.js +1 -0
  54. package/lib/commonjs/constructs/feature/config/waf/QpqBootstrapConfigWafConstruct.js.map +1 -0
  55. package/lib/commonjs/constructs/feature/config/waf/index.js +1 -0
  56. package/lib/commonjs/constructs/feature/config/waf/index.js.map +1 -0
  57. package/lib/commonjs/constructs/feature/config/waf/wafRules.js +1 -0
  58. package/lib/commonjs/constructs/feature/config/waf/wafRules.js.map +1 -0
  59. package/lib/commonjs/constructs/feature/core/ai/QpqCoreAiConstruct.js +1 -0
  60. package/lib/commonjs/constructs/feature/core/ai/QpqCoreAiConstruct.js.map +1 -0
  61. package/lib/commonjs/constructs/feature/core/ai/index.js +1 -0
  62. package/lib/commonjs/constructs/feature/core/ai/index.js.map +1 -0
  63. package/lib/commonjs/constructs/feature/core/auth/QpqInfCoreUserDirectoryConstruct.js +1 -0
  64. package/lib/commonjs/constructs/feature/core/auth/QpqInfCoreUserDirectoryConstruct.js.map +1 -0
  65. package/lib/commonjs/constructs/feature/core/auth/index.js +1 -0
  66. package/lib/commonjs/constructs/feature/core/auth/index.js.map +1 -0
  67. package/lib/commonjs/constructs/feature/core/deployEvents/QpqCoreDeployEventConstruct.js +1 -0
  68. package/lib/commonjs/constructs/feature/core/deployEvents/QpqCoreDeployEventConstruct.js.map +1 -0
  69. package/lib/commonjs/constructs/feature/core/deployEvents/index.js +1 -0
  70. package/lib/commonjs/constructs/feature/core/deployEvents/index.js.map +1 -0
  71. package/lib/commonjs/constructs/feature/core/eventBus/QpqCoreEventBusConstruct.js +14 -5
  72. package/lib/commonjs/constructs/feature/core/eventBus/QpqCoreEventBusConstruct.js.map +1 -0
  73. package/lib/commonjs/constructs/feature/core/eventBus/index.js +1 -0
  74. package/lib/commonjs/constructs/feature/core/eventBus/index.js.map +1 -0
  75. package/lib/commonjs/constructs/feature/core/graphDatabase/QpqCoreApiGraphDatabaseConstruct.js +1 -0
  76. package/lib/commonjs/constructs/feature/core/graphDatabase/QpqCoreApiGraphDatabaseConstruct.js.map +1 -0
  77. package/lib/commonjs/constructs/feature/core/graphDatabase/index.js +1 -0
  78. package/lib/commonjs/constructs/feature/core/graphDatabase/index.js.map +1 -0
  79. package/lib/commonjs/constructs/feature/core/index.js +1 -0
  80. package/lib/commonjs/constructs/feature/core/index.js.map +1 -0
  81. package/lib/commonjs/constructs/feature/core/keyValueStore/QpqCoreKeyValueStoreConstruct.js +1 -0
  82. package/lib/commonjs/constructs/feature/core/keyValueStore/QpqCoreKeyValueStoreConstruct.js.map +1 -0
  83. package/lib/commonjs/constructs/feature/core/keyValueStore/index.js +1 -0
  84. package/lib/commonjs/constructs/feature/core/keyValueStore/index.js.map +1 -0
  85. package/lib/commonjs/constructs/feature/core/notifyError/QpqCoreNotifyError.js +1 -0
  86. package/lib/commonjs/constructs/feature/core/notifyError/QpqCoreNotifyError.js.map +1 -0
  87. package/lib/commonjs/constructs/feature/core/notifyError/index.js +1 -0
  88. package/lib/commonjs/constructs/feature/core/notifyError/index.js.map +1 -0
  89. package/lib/commonjs/constructs/feature/core/parameter/QpqCoreParameterConstruct.js +1 -0
  90. package/lib/commonjs/constructs/feature/core/parameter/QpqCoreParameterConstruct.js.map +1 -0
  91. package/lib/commonjs/constructs/feature/core/parameter/index.js +1 -0
  92. package/lib/commonjs/constructs/feature/core/parameter/index.js.map +1 -0
  93. package/lib/commonjs/constructs/feature/core/queue/QpqApiCoreQueueConstruct.js +9 -6
  94. package/lib/commonjs/constructs/feature/core/queue/QpqApiCoreQueueConstruct.js.map +1 -0
  95. package/lib/commonjs/constructs/feature/core/queue/QpqCoreQueueConstruct.js +11 -3
  96. package/lib/commonjs/constructs/feature/core/queue/QpqCoreQueueConstruct.js.map +1 -0
  97. package/lib/commonjs/constructs/feature/core/queue/index.js +1 -0
  98. package/lib/commonjs/constructs/feature/core/queue/index.js.map +1 -0
  99. package/lib/commonjs/constructs/feature/core/schedule/QpqCoreRecurringScheduleConstruct.js +1 -0
  100. package/lib/commonjs/constructs/feature/core/schedule/QpqCoreRecurringScheduleConstruct.js.map +1 -0
  101. package/lib/commonjs/constructs/feature/core/schedule/index.js +1 -0
  102. package/lib/commonjs/constructs/feature/core/schedule/index.js.map +1 -0
  103. package/lib/commonjs/constructs/feature/core/secret/QpqCoreSecretConstruct.js +1 -0
  104. package/lib/commonjs/constructs/feature/core/secret/QpqCoreSecretConstruct.js.map +1 -0
  105. package/lib/commonjs/constructs/feature/core/secret/index.js +1 -0
  106. package/lib/commonjs/constructs/feature/core/secret/index.js.map +1 -0
  107. package/lib/commonjs/constructs/feature/core/storageDrive/QpqApiCoreStorageDriveConstruct.js +1 -0
  108. package/lib/commonjs/constructs/feature/core/storageDrive/QpqApiCoreStorageDriveConstruct.js.map +1 -0
  109. package/lib/commonjs/constructs/feature/core/storageDrive/QpqCoreStorageDriveConstruct.js +4 -4
  110. package/lib/commonjs/constructs/feature/core/storageDrive/QpqCoreStorageDriveConstruct.js.map +1 -0
  111. package/lib/commonjs/constructs/feature/core/storageDrive/index.js +1 -0
  112. package/lib/commonjs/constructs/feature/core/storageDrive/index.js.map +1 -0
  113. package/lib/commonjs/constructs/feature/core/virtualNetwork/BootstrapQpqCoreVirtualNetworkConstruct.js +1 -0
  114. package/lib/commonjs/constructs/feature/core/virtualNetwork/BootstrapQpqCoreVirtualNetworkConstruct.js.map +1 -0
  115. package/lib/commonjs/constructs/feature/core/virtualNetwork/index.js +1 -0
  116. package/lib/commonjs/constructs/feature/core/virtualNetwork/index.js.map +1 -0
  117. package/lib/commonjs/constructs/feature/index.js +1 -0
  118. package/lib/commonjs/constructs/feature/index.js.map +1 -0
  119. package/lib/commonjs/constructs/feature/webserver/api/ApiQpqWebserverApiConstruct.js +4 -0
  120. package/lib/commonjs/constructs/feature/webserver/api/ApiQpqWebserverApiConstruct.js.map +1 -0
  121. package/lib/commonjs/constructs/feature/webserver/api/DomainQpqWebserverApiConstruct.js +1 -0
  122. package/lib/commonjs/constructs/feature/webserver/api/DomainQpqWebserverApiConstruct.js.map +1 -0
  123. package/lib/commonjs/constructs/feature/webserver/api/index.js +1 -0
  124. package/lib/commonjs/constructs/feature/webserver/api/index.js.map +1 -0
  125. package/lib/commonjs/constructs/feature/webserver/apiKey/QpqWebserverApiKeyConstruct.js +1 -0
  126. package/lib/commonjs/constructs/feature/webserver/apiKey/QpqWebserverApiKeyConstruct.js.map +1 -0
  127. package/lib/commonjs/constructs/feature/webserver/apiKey/index.js +1 -0
  128. package/lib/commonjs/constructs/feature/webserver/apiKey/index.js.map +1 -0
  129. package/lib/commonjs/constructs/feature/webserver/cache/QpqWebServerCacheConstruct.js +1 -0
  130. package/lib/commonjs/constructs/feature/webserver/cache/QpqWebServerCacheConstruct.js.map +1 -0
  131. package/lib/commonjs/constructs/feature/webserver/certificate/QpqWebserverCertificateConstruct.js +1 -0
  132. package/lib/commonjs/constructs/feature/webserver/certificate/QpqWebserverCertificateConstruct.js.map +1 -0
  133. package/lib/commonjs/constructs/feature/webserver/certificate/index.js +1 -0
  134. package/lib/commonjs/constructs/feature/webserver/certificate/index.js.map +1 -0
  135. package/lib/commonjs/constructs/feature/webserver/domainProxy/WebQpqWebserverDomainProxyConstruct.js +1 -0
  136. package/lib/commonjs/constructs/feature/webserver/domainProxy/WebQpqWebserverDomainProxyConstruct.js.map +1 -0
  137. package/lib/commonjs/constructs/feature/webserver/domainProxy/index.js +1 -0
  138. package/lib/commonjs/constructs/feature/webserver/domainProxy/index.js.map +1 -0
  139. package/lib/commonjs/constructs/feature/webserver/index.js +1 -0
  140. package/lib/commonjs/constructs/feature/webserver/index.js.map +1 -0
  141. package/lib/commonjs/constructs/feature/webserver/redirect/QpqWebserverSubdomainRedirectConstruct.js +1 -0
  142. package/lib/commonjs/constructs/feature/webserver/redirect/QpqWebserverSubdomainRedirectConstruct.js.map +1 -0
  143. package/lib/commonjs/constructs/feature/webserver/redirect/index.js +1 -0
  144. package/lib/commonjs/constructs/feature/webserver/redirect/index.js.map +1 -0
  145. package/lib/commonjs/constructs/feature/webserver/serviceFunction/QpqWebserverServiceFunctionConstruct.js +1 -0
  146. package/lib/commonjs/constructs/feature/webserver/serviceFunction/QpqWebserverServiceFunctionConstruct.js.map +1 -0
  147. package/lib/commonjs/constructs/feature/webserver/serviceFunction/index.js +1 -0
  148. package/lib/commonjs/constructs/feature/webserver/serviceFunction/index.js.map +1 -0
  149. package/lib/commonjs/constructs/feature/webserver/webEntry/WebQpqWebserverWebEntryConstruct.js +1 -0
  150. package/lib/commonjs/constructs/feature/webserver/webEntry/WebQpqWebserverWebEntryConstruct.js.map +1 -0
  151. package/lib/commonjs/constructs/feature/webserver/webEntry/index.js +1 -0
  152. package/lib/commonjs/constructs/feature/webserver/webEntry/index.js.map +1 -0
  153. package/lib/commonjs/constructs/feature/webserver/webEntry/utils/securityHeaders.js +1 -0
  154. package/lib/commonjs/constructs/feature/webserver/webEntry/utils/securityHeaders.js.map +1 -0
  155. package/lib/commonjs/constructs/feature/webserver/websocket/QpqApiWebserverWebsocketConstruct.js +1 -0
  156. package/lib/commonjs/constructs/feature/webserver/websocket/QpqApiWebserverWebsocketConstruct.js.map +1 -0
  157. package/lib/commonjs/constructs/feature/webserver/websocket/QpqWebserverWebsocketConstruct.js +1 -0
  158. package/lib/commonjs/constructs/feature/webserver/websocket/QpqWebserverWebsocketConstruct.js.map +1 -0
  159. package/lib/commonjs/constructs/feature/webserver/websocket/index.js +1 -0
  160. package/lib/commonjs/constructs/feature/webserver/websocket/index.js.map +1 -0
  161. package/lib/commonjs/constructs/index.js +1 -0
  162. package/lib/commonjs/constructs/index.js.map +1 -0
  163. package/lib/commonjs/index.js +1 -0
  164. package/lib/commonjs/index.js.map +1 -0
  165. package/lib/commonjs/stacks/AccountQpqStack.js +1 -0
  166. package/lib/commonjs/stacks/AccountQpqStack.js.map +1 -0
  167. package/lib/commonjs/stacks/ApiQpqServiceStack.js +1 -0
  168. package/lib/commonjs/stacks/ApiQpqServiceStack.js.map +1 -0
  169. package/lib/commonjs/stacks/BootstrapQpqServiceStack.js +1 -0
  170. package/lib/commonjs/stacks/BootstrapQpqServiceStack.js.map +1 -0
  171. package/lib/commonjs/stacks/DomainCertificateStack.js +1 -0
  172. package/lib/commonjs/stacks/DomainCertificateStack.js.map +1 -0
  173. package/lib/commonjs/stacks/DomainQpqServiceStack.js +1 -0
  174. package/lib/commonjs/stacks/DomainQpqServiceStack.js.map +1 -0
  175. package/lib/commonjs/stacks/InfQpqServiceStack.js +1 -0
  176. package/lib/commonjs/stacks/InfQpqServiceStack.js.map +1 -0
  177. package/lib/commonjs/stacks/WafCloudFrontWebAclStack.js +1 -0
  178. package/lib/commonjs/stacks/WafCloudFrontWebAclStack.js.map +1 -0
  179. package/lib/commonjs/stacks/WebQpqServiceStack.js +1 -0
  180. package/lib/commonjs/stacks/WebQpqServiceStack.js.map +1 -0
  181. package/lib/commonjs/stacks/base/QpqServiceStack.js +1 -0
  182. package/lib/commonjs/stacks/base/QpqServiceStack.js.map +1 -0
  183. package/lib/commonjs/stacks/createDomainCertificateStacks.js +1 -0
  184. package/lib/commonjs/stacks/createDomainCertificateStacks.js.map +1 -0
  185. package/lib/commonjs/stacks/index.js +1 -0
  186. package/lib/commonjs/stacks/index.js.map +1 -0
  187. package/lib/commonjs/utils/index.js +1 -0
  188. package/lib/commonjs/utils/index.js.map +1 -0
  189. package/lib/commonjs/utils/javascriptRuntimeUtils.js +1 -0
  190. package/lib/commonjs/utils/javascriptRuntimeUtils.js.map +1 -0
  191. package/lib/commonjs/utils/logRetentionUtils.js +1 -0
  192. package/lib/commonjs/utils/logRetentionUtils.js.map +1 -0
  193. package/lib/commonjs/utils/path/getApiBuildPathFullPath.js +1 -0
  194. package/lib/commonjs/utils/path/getApiBuildPathFullPath.js.map +1 -0
  195. package/lib/commonjs/utils/path/getRedirectApiBuildFullPath.js +1 -0
  196. package/lib/commonjs/utils/path/getRedirectApiBuildFullPath.js.map +1 -0
  197. package/lib/commonjs/utils/path/getStorageDriveUploadFullPath.js +1 -0
  198. package/lib/commonjs/utils/path/getStorageDriveUploadFullPath.js.map +1 -0
  199. package/lib/commonjs/utils/path/getWebEntryFullPath.js +1 -0
  200. package/lib/commonjs/utils/path/getWebEntryFullPath.js.map +1 -0
  201. package/lib/commonjs/utils/path/index.js +1 -0
  202. package/lib/commonjs/utils/path/index.js.map +1 -0
  203. package/lib/commonjs/utils/path/qpqAwsCdkPathUtils.js +1 -0
  204. package/lib/commonjs/utils/path/qpqAwsCdkPathUtils.js.map +1 -0
  205. package/lib/commonjs/utils/qpqAwsCdkNamingUtils.js +1 -0
  206. package/lib/commonjs/utils/qpqAwsCdkNamingUtils.js.map +1 -0
  207. package/lib/commonjs/utils/qpqDeployAwsCdkUtils.js +1 -0
  208. package/lib/commonjs/utils/qpqDeployAwsCdkUtils.js.map +1 -0
  209. package/lib/esm/QPQApp.js +1 -0
  210. package/lib/esm/QPQApp.js.map +1 -0
  211. package/lib/esm/constants/BootstrapResource.js +1 -0
  212. package/lib/esm/constants/BootstrapResource.js.map +1 -0
  213. package/lib/esm/constants/index.js +1 -0
  214. package/lib/esm/constants/index.js.map +1 -0
  215. package/lib/esm/constants/logging.js +1 -0
  216. package/lib/esm/constants/logging.js.map +1 -0
  217. package/lib/esm/constructs/base/QpqConstructBlock.js +1 -0
  218. package/lib/esm/constructs/base/QpqConstructBlock.js.map +1 -0
  219. package/lib/esm/constructs/base/QpqResource.js +1 -0
  220. package/lib/esm/constructs/base/QpqResource.js.map +1 -0
  221. package/lib/esm/constructs/base/createDefaultResourceAlarm.js +1 -0
  222. package/lib/esm/constructs/base/createDefaultResourceAlarm.js.map +1 -0
  223. package/lib/esm/constructs/base/index.js +1 -0
  224. package/lib/esm/constructs/base/index.js.map +1 -0
  225. package/lib/esm/constructs/basic/BSQpqLambdaWarmerEventConstruct.js +1 -0
  226. package/lib/esm/constructs/basic/BSQpqLambdaWarmerEventConstruct.js.map +1 -0
  227. package/lib/esm/constructs/basic/DomainCertificateLookup.js +1 -0
  228. package/lib/esm/constructs/basic/DomainCertificateLookup.js.map +1 -0
  229. package/lib/esm/constructs/basic/Function.js +1 -0
  230. package/lib/esm/constructs/basic/Function.js.map +1 -0
  231. package/lib/esm/constructs/basic/LambdaLayers.js +1 -0
  232. package/lib/esm/constructs/basic/LambdaLayers.js.map +1 -0
  233. package/lib/esm/constructs/basic/SubdomainName.js +1 -0
  234. package/lib/esm/constructs/basic/SubdomainName.js.map +1 -0
  235. package/lib/esm/constructs/basic/WebserverRoll.js +2 -1
  236. package/lib/esm/constructs/basic/WebserverRoll.js.map +1 -0
  237. package/lib/esm/constructs/basic/index.js +1 -0
  238. package/lib/esm/constructs/basic/index.js.map +1 -0
  239. package/lib/esm/constructs/feature/account/QpqAccountBudgetConstruct.js +1 -0
  240. package/lib/esm/constructs/feature/account/QpqAccountBudgetConstruct.js.map +1 -0
  241. package/lib/esm/constructs/feature/account/QpqAccountCloudTrailConstruct.js +1 -0
  242. package/lib/esm/constructs/feature/account/QpqAccountCloudTrailConstruct.js.map +1 -0
  243. package/lib/esm/constructs/feature/account/QpqAccountSecurityServicesConstruct.js +1 -0
  244. package/lib/esm/constructs/feature/account/QpqAccountSecurityServicesConstruct.js.map +1 -0
  245. package/lib/esm/constructs/feature/account/index.js +1 -0
  246. package/lib/esm/constructs/feature/account/index.js.map +1 -0
  247. package/lib/esm/constructs/feature/config/alarm/QpqConfigAwsAlarm.js +1 -0
  248. package/lib/esm/constructs/feature/config/alarm/QpqConfigAwsAlarm.js.map +1 -0
  249. package/lib/esm/constructs/feature/config/alarm/index.js +1 -0
  250. package/lib/esm/constructs/feature/config/alarm/index.js.map +1 -0
  251. package/lib/esm/constructs/feature/config/dashboard/QpqConfigAwsDashboardConstruct.js +1 -0
  252. package/lib/esm/constructs/feature/config/dashboard/QpqConfigAwsDashboardConstruct.js.map +1 -0
  253. package/lib/esm/constructs/feature/config/dashboard/index.js +1 -0
  254. package/lib/esm/constructs/feature/config/dashboard/index.js.map +1 -0
  255. package/lib/esm/constructs/feature/config/index.js +1 -0
  256. package/lib/esm/constructs/feature/config/index.js.map +1 -0
  257. package/lib/esm/constructs/feature/config/organization/QpqBootstrapConfigAwsOrganization.js +1 -0
  258. package/lib/esm/constructs/feature/config/organization/QpqBootstrapConfigAwsOrganization.js.map +1 -0
  259. package/lib/esm/constructs/feature/config/organization/index.js +1 -0
  260. package/lib/esm/constructs/feature/config/organization/index.js.map +1 -0
  261. package/lib/esm/constructs/feature/config/waf/QpqBootstrapConfigWafConstruct.js +1 -0
  262. package/lib/esm/constructs/feature/config/waf/QpqBootstrapConfigWafConstruct.js.map +1 -0
  263. package/lib/esm/constructs/feature/config/waf/index.js +1 -0
  264. package/lib/esm/constructs/feature/config/waf/index.js.map +1 -0
  265. package/lib/esm/constructs/feature/config/waf/wafRules.js +1 -0
  266. package/lib/esm/constructs/feature/config/waf/wafRules.js.map +1 -0
  267. package/lib/esm/constructs/feature/core/ai/QpqCoreAiConstruct.js +1 -0
  268. package/lib/esm/constructs/feature/core/ai/QpqCoreAiConstruct.js.map +1 -0
  269. package/lib/esm/constructs/feature/core/ai/index.js +1 -0
  270. package/lib/esm/constructs/feature/core/ai/index.js.map +1 -0
  271. package/lib/esm/constructs/feature/core/auth/QpqInfCoreUserDirectoryConstruct.js +1 -0
  272. package/lib/esm/constructs/feature/core/auth/QpqInfCoreUserDirectoryConstruct.js.map +1 -0
  273. package/lib/esm/constructs/feature/core/auth/index.js +1 -0
  274. package/lib/esm/constructs/feature/core/auth/index.js.map +1 -0
  275. package/lib/esm/constructs/feature/core/deployEvents/QpqCoreDeployEventConstruct.js +1 -0
  276. package/lib/esm/constructs/feature/core/deployEvents/QpqCoreDeployEventConstruct.js.map +1 -0
  277. package/lib/esm/constructs/feature/core/deployEvents/index.js +1 -0
  278. package/lib/esm/constructs/feature/core/deployEvents/index.js.map +1 -0
  279. package/lib/esm/constructs/feature/core/eventBus/QpqCoreEventBusConstruct.js +14 -5
  280. package/lib/esm/constructs/feature/core/eventBus/QpqCoreEventBusConstruct.js.map +1 -0
  281. package/lib/esm/constructs/feature/core/eventBus/index.js +1 -0
  282. package/lib/esm/constructs/feature/core/eventBus/index.js.map +1 -0
  283. package/lib/esm/constructs/feature/core/graphDatabase/QpqCoreApiGraphDatabaseConstruct.js +1 -0
  284. package/lib/esm/constructs/feature/core/graphDatabase/QpqCoreApiGraphDatabaseConstruct.js.map +1 -0
  285. package/lib/esm/constructs/feature/core/graphDatabase/index.js +1 -0
  286. package/lib/esm/constructs/feature/core/graphDatabase/index.js.map +1 -0
  287. package/lib/esm/constructs/feature/core/index.js +1 -0
  288. package/lib/esm/constructs/feature/core/index.js.map +1 -0
  289. package/lib/esm/constructs/feature/core/keyValueStore/QpqCoreKeyValueStoreConstruct.js +1 -0
  290. package/lib/esm/constructs/feature/core/keyValueStore/QpqCoreKeyValueStoreConstruct.js.map +1 -0
  291. package/lib/esm/constructs/feature/core/keyValueStore/index.js +1 -0
  292. package/lib/esm/constructs/feature/core/keyValueStore/index.js.map +1 -0
  293. package/lib/esm/constructs/feature/core/notifyError/QpqCoreNotifyError.js +1 -0
  294. package/lib/esm/constructs/feature/core/notifyError/QpqCoreNotifyError.js.map +1 -0
  295. package/lib/esm/constructs/feature/core/notifyError/index.js +1 -0
  296. package/lib/esm/constructs/feature/core/notifyError/index.js.map +1 -0
  297. package/lib/esm/constructs/feature/core/parameter/QpqCoreParameterConstruct.js +1 -0
  298. package/lib/esm/constructs/feature/core/parameter/QpqCoreParameterConstruct.js.map +1 -0
  299. package/lib/esm/constructs/feature/core/parameter/index.js +1 -0
  300. package/lib/esm/constructs/feature/core/parameter/index.js.map +1 -0
  301. package/lib/esm/constructs/feature/core/queue/QpqApiCoreQueueConstruct.js +16 -6
  302. package/lib/esm/constructs/feature/core/queue/QpqApiCoreQueueConstruct.js.map +1 -0
  303. package/lib/esm/constructs/feature/core/queue/QpqCoreQueueConstruct.js +11 -3
  304. package/lib/esm/constructs/feature/core/queue/QpqCoreQueueConstruct.js.map +1 -0
  305. package/lib/esm/constructs/feature/core/queue/index.js +1 -0
  306. package/lib/esm/constructs/feature/core/queue/index.js.map +1 -0
  307. package/lib/esm/constructs/feature/core/schedule/QpqCoreRecurringScheduleConstruct.js +1 -0
  308. package/lib/esm/constructs/feature/core/schedule/QpqCoreRecurringScheduleConstruct.js.map +1 -0
  309. package/lib/esm/constructs/feature/core/schedule/index.js +1 -0
  310. package/lib/esm/constructs/feature/core/schedule/index.js.map +1 -0
  311. package/lib/esm/constructs/feature/core/secret/QpqCoreSecretConstruct.js +1 -0
  312. package/lib/esm/constructs/feature/core/secret/QpqCoreSecretConstruct.js.map +1 -0
  313. package/lib/esm/constructs/feature/core/secret/index.js +1 -0
  314. package/lib/esm/constructs/feature/core/secret/index.js.map +1 -0
  315. package/lib/esm/constructs/feature/core/storageDrive/QpqApiCoreStorageDriveConstruct.js +1 -0
  316. package/lib/esm/constructs/feature/core/storageDrive/QpqApiCoreStorageDriveConstruct.js.map +1 -0
  317. package/lib/esm/constructs/feature/core/storageDrive/QpqCoreStorageDriveConstruct.js +4 -4
  318. package/lib/esm/constructs/feature/core/storageDrive/QpqCoreStorageDriveConstruct.js.map +1 -0
  319. package/lib/esm/constructs/feature/core/storageDrive/index.js +1 -0
  320. package/lib/esm/constructs/feature/core/storageDrive/index.js.map +1 -0
  321. package/lib/esm/constructs/feature/core/virtualNetwork/BootstrapQpqCoreVirtualNetworkConstruct.js +1 -0
  322. package/lib/esm/constructs/feature/core/virtualNetwork/BootstrapQpqCoreVirtualNetworkConstruct.js.map +1 -0
  323. package/lib/esm/constructs/feature/core/virtualNetwork/index.js +1 -0
  324. package/lib/esm/constructs/feature/core/virtualNetwork/index.js.map +1 -0
  325. package/lib/esm/constructs/feature/index.js +1 -0
  326. package/lib/esm/constructs/feature/index.js.map +1 -0
  327. package/lib/esm/constructs/feature/webserver/api/ApiQpqWebserverApiConstruct.js +4 -0
  328. package/lib/esm/constructs/feature/webserver/api/ApiQpqWebserverApiConstruct.js.map +1 -0
  329. package/lib/esm/constructs/feature/webserver/api/DomainQpqWebserverApiConstruct.js +1 -0
  330. package/lib/esm/constructs/feature/webserver/api/DomainQpqWebserverApiConstruct.js.map +1 -0
  331. package/lib/esm/constructs/feature/webserver/api/index.js +1 -0
  332. package/lib/esm/constructs/feature/webserver/api/index.js.map +1 -0
  333. package/lib/esm/constructs/feature/webserver/apiKey/QpqWebserverApiKeyConstruct.js +1 -0
  334. package/lib/esm/constructs/feature/webserver/apiKey/QpqWebserverApiKeyConstruct.js.map +1 -0
  335. package/lib/esm/constructs/feature/webserver/apiKey/index.js +1 -0
  336. package/lib/esm/constructs/feature/webserver/apiKey/index.js.map +1 -0
  337. package/lib/esm/constructs/feature/webserver/cache/QpqWebServerCacheConstruct.js +1 -0
  338. package/lib/esm/constructs/feature/webserver/cache/QpqWebServerCacheConstruct.js.map +1 -0
  339. package/lib/esm/constructs/feature/webserver/certificate/QpqWebserverCertificateConstruct.js +1 -0
  340. package/lib/esm/constructs/feature/webserver/certificate/QpqWebserverCertificateConstruct.js.map +1 -0
  341. package/lib/esm/constructs/feature/webserver/certificate/index.js +1 -0
  342. package/lib/esm/constructs/feature/webserver/certificate/index.js.map +1 -0
  343. package/lib/esm/constructs/feature/webserver/domainProxy/WebQpqWebserverDomainProxyConstruct.js +1 -0
  344. package/lib/esm/constructs/feature/webserver/domainProxy/WebQpqWebserverDomainProxyConstruct.js.map +1 -0
  345. package/lib/esm/constructs/feature/webserver/domainProxy/index.js +1 -0
  346. package/lib/esm/constructs/feature/webserver/domainProxy/index.js.map +1 -0
  347. package/lib/esm/constructs/feature/webserver/index.js +1 -0
  348. package/lib/esm/constructs/feature/webserver/index.js.map +1 -0
  349. package/lib/esm/constructs/feature/webserver/redirect/QpqWebserverSubdomainRedirectConstruct.js +1 -0
  350. package/lib/esm/constructs/feature/webserver/redirect/QpqWebserverSubdomainRedirectConstruct.js.map +1 -0
  351. package/lib/esm/constructs/feature/webserver/redirect/index.js +1 -0
  352. package/lib/esm/constructs/feature/webserver/redirect/index.js.map +1 -0
  353. package/lib/esm/constructs/feature/webserver/serviceFunction/QpqWebserverServiceFunctionConstruct.js +1 -0
  354. package/lib/esm/constructs/feature/webserver/serviceFunction/QpqWebserverServiceFunctionConstruct.js.map +1 -0
  355. package/lib/esm/constructs/feature/webserver/serviceFunction/index.js +1 -0
  356. package/lib/esm/constructs/feature/webserver/serviceFunction/index.js.map +1 -0
  357. package/lib/esm/constructs/feature/webserver/webEntry/WebQpqWebserverWebEntryConstruct.js +1 -0
  358. package/lib/esm/constructs/feature/webserver/webEntry/WebQpqWebserverWebEntryConstruct.js.map +1 -0
  359. package/lib/esm/constructs/feature/webserver/webEntry/index.js +1 -0
  360. package/lib/esm/constructs/feature/webserver/webEntry/index.js.map +1 -0
  361. package/lib/esm/constructs/feature/webserver/webEntry/utils/securityHeaders.js +1 -0
  362. package/lib/esm/constructs/feature/webserver/webEntry/utils/securityHeaders.js.map +1 -0
  363. package/lib/esm/constructs/feature/webserver/websocket/QpqApiWebserverWebsocketConstruct.js +1 -0
  364. package/lib/esm/constructs/feature/webserver/websocket/QpqApiWebserverWebsocketConstruct.js.map +1 -0
  365. package/lib/esm/constructs/feature/webserver/websocket/QpqWebserverWebsocketConstruct.js +1 -0
  366. package/lib/esm/constructs/feature/webserver/websocket/QpqWebserverWebsocketConstruct.js.map +1 -0
  367. package/lib/esm/constructs/feature/webserver/websocket/index.js +1 -0
  368. package/lib/esm/constructs/feature/webserver/websocket/index.js.map +1 -0
  369. package/lib/esm/constructs/index.js +1 -0
  370. package/lib/esm/constructs/index.js.map +1 -0
  371. package/lib/esm/index.js +1 -0
  372. package/lib/esm/index.js.map +1 -0
  373. package/lib/esm/stacks/AccountQpqStack.js +1 -0
  374. package/lib/esm/stacks/AccountQpqStack.js.map +1 -0
  375. package/lib/esm/stacks/ApiQpqServiceStack.js +1 -0
  376. package/lib/esm/stacks/ApiQpqServiceStack.js.map +1 -0
  377. package/lib/esm/stacks/BootstrapQpqServiceStack.js +1 -0
  378. package/lib/esm/stacks/BootstrapQpqServiceStack.js.map +1 -0
  379. package/lib/esm/stacks/DomainCertificateStack.js +1 -0
  380. package/lib/esm/stacks/DomainCertificateStack.js.map +1 -0
  381. package/lib/esm/stacks/DomainQpqServiceStack.js +1 -0
  382. package/lib/esm/stacks/DomainQpqServiceStack.js.map +1 -0
  383. package/lib/esm/stacks/InfQpqServiceStack.js +1 -0
  384. package/lib/esm/stacks/InfQpqServiceStack.js.map +1 -0
  385. package/lib/esm/stacks/WafCloudFrontWebAclStack.js +1 -0
  386. package/lib/esm/stacks/WafCloudFrontWebAclStack.js.map +1 -0
  387. package/lib/esm/stacks/WebQpqServiceStack.js +1 -0
  388. package/lib/esm/stacks/WebQpqServiceStack.js.map +1 -0
  389. package/lib/esm/stacks/base/QpqServiceStack.js +1 -0
  390. package/lib/esm/stacks/base/QpqServiceStack.js.map +1 -0
  391. package/lib/esm/stacks/createDomainCertificateStacks.js +1 -0
  392. package/lib/esm/stacks/createDomainCertificateStacks.js.map +1 -0
  393. package/lib/esm/stacks/index.js +1 -0
  394. package/lib/esm/stacks/index.js.map +1 -0
  395. package/lib/esm/utils/index.js +1 -0
  396. package/lib/esm/utils/index.js.map +1 -0
  397. package/lib/esm/utils/javascriptRuntimeUtils.js +1 -0
  398. package/lib/esm/utils/javascriptRuntimeUtils.js.map +1 -0
  399. package/lib/esm/utils/logRetentionUtils.js +1 -0
  400. package/lib/esm/utils/logRetentionUtils.js.map +1 -0
  401. package/lib/esm/utils/path/getApiBuildPathFullPath.js +1 -0
  402. package/lib/esm/utils/path/getApiBuildPathFullPath.js.map +1 -0
  403. package/lib/esm/utils/path/getRedirectApiBuildFullPath.js +1 -0
  404. package/lib/esm/utils/path/getRedirectApiBuildFullPath.js.map +1 -0
  405. package/lib/esm/utils/path/getStorageDriveUploadFullPath.js +1 -0
  406. package/lib/esm/utils/path/getStorageDriveUploadFullPath.js.map +1 -0
  407. package/lib/esm/utils/path/getWebEntryFullPath.js +1 -0
  408. package/lib/esm/utils/path/getWebEntryFullPath.js.map +1 -0
  409. package/lib/esm/utils/path/index.js +1 -0
  410. package/lib/esm/utils/path/index.js.map +1 -0
  411. package/lib/esm/utils/path/qpqAwsCdkPathUtils.js +1 -0
  412. package/lib/esm/utils/path/qpqAwsCdkPathUtils.js.map +1 -0
  413. package/lib/esm/utils/qpqAwsCdkNamingUtils.js +1 -0
  414. package/lib/esm/utils/qpqAwsCdkNamingUtils.js.map +1 -0
  415. package/lib/esm/utils/qpqDeployAwsCdkUtils.js +1 -0
  416. package/lib/esm/utils/qpqDeployAwsCdkUtils.js.map +1 -0
  417. package/package.json +7 -7
  418. package/src/constructs/basic/WebserverRoll.ts +1 -0
  419. package/src/constructs/feature/core/eventBus/QpqCoreEventBusConstruct.ts +20 -4
  420. package/src/constructs/feature/core/queue/QpqApiCoreQueueConstruct.ts +15 -5
  421. package/src/constructs/feature/core/queue/QpqCoreQueueConstruct.ts +11 -3
  422. package/src/constructs/feature/core/storageDrive/QpqCoreStorageDriveConstruct.ts +3 -3
  423. package/src/constructs/feature/webserver/api/ApiQpqWebserverApiConstruct.ts +4 -0
@@ -39,3 +39,4 @@ const createQPQApp = () => {
39
39
  return new cdk.App();
40
40
  };
41
41
  exports.createQPQApp = createQPQApp;
42
+ //# sourceMappingURL=QPQApp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QPQApp.js","sourceRoot":"","sources":["../../src/QPQApp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmC;AAE5B,MAAM,YAAY,GAAG,GAAY,EAAE;IACxC,OAAO,IAAI,GAAG,CAAC,GAAG,EAAE,CAAC;AACvB,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB","sourcesContent":["import * as cdk from 'aws-cdk-lib';\n\nexport const createQPQApp = (): cdk.App => {\n return new cdk.App();\n};\n"]}
@@ -5,3 +5,4 @@ var BootstrapResource;
5
5
  (function (BootstrapResource) {
6
6
  BootstrapResource["WarmLambdas"] = "WarmLambdas";
7
7
  })(BootstrapResource || (exports.BootstrapResource = BootstrapResource = {}));
8
+ //# sourceMappingURL=BootstrapResource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BootstrapResource.js","sourceRoot":"","sources":["../../../src/constants/BootstrapResource.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAEX;AAFD,WAAY,iBAAiB;IAC3B,gDAA2B,CAAA;AAC7B,CAAC,EAFW,iBAAiB,iCAAjB,iBAAiB,QAE5B","sourcesContent":["export enum BootstrapResource {\n WarmLambdas = 'WarmLambdas',\n}\n"]}
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./BootstrapResource"), exports);
18
18
  __exportStar(require("./logging"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,4CAA0B","sourcesContent":["export * from './BootstrapResource';\nexport * from './logging';\n"]}
@@ -2,3 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.QPQ_LOG_BUCKET_NAME = void 0;
4
4
  exports.QPQ_LOG_BUCKET_NAME = 'logs';
5
+ //# sourceMappingURL=logging.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logging.js","sourceRoot":"","sources":["../../../src/constants/logging.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG,MAAM,CAAC","sourcesContent":["export const QPQ_LOG_BUCKET_NAME = 'logs';\n"]}
@@ -37,3 +37,4 @@ class QpqConstructBlock extends constructs_1.Construct {
37
37
  }
38
38
  }
39
39
  exports.QpqConstructBlock = QpqConstructBlock;
40
+ //# sourceMappingURL=QpqConstructBlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QpqConstructBlock.js","sourceRoot":"","sources":["../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E,IAAI;aACd,CAAC,CAAC;QACL,CAAC;QAED,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;CACF;AA5CD,8CA4CC","sourcesContent":["import { awsNamingUtils } from 'quidproquo-actionprocessor-awslambda';\nimport { QPQConfig } from 'quidproquo-core';\n\nimport { aws_iam } from 'aws-cdk-lib';\nimport { IGrantable, IRole } from 'aws-cdk-lib/aws-iam';\nimport { Construct } from 'constructs';\n\nimport { QpqResource } from './QpqResource';\n\nexport interface QpqConstructBlockProps {\n qpqConfig: QPQConfig;\n}\n\nexport class QpqConstructBlock extends Construct implements QpqResource {\n qpqConfig: QPQConfig;\n serviceRole?: aws_iam.IRole;\n\n constructor(scope: Construct, id: string, props: QpqConstructBlockProps) {\n super(scope, id);\n\n this.qpqConfig = props.qpqConfig;\n }\n\n resourceName(name: string) {\n return awsNamingUtils.getConfigRuntimeResourceNameFromConfig(name, this.qpqConfig);\n }\n\n resourceNameWithModuleOveride(name: string, module?: string) {\n return awsNamingUtils.getConfigRuntimeResourceNameFromConfigWithServiceOverride(name, this.qpqConfig, module);\n }\n\n qpqResourceName(name: string, resourceType: string) {\n return awsNamingUtils.getQpqRuntimeResourceNameFromConfig(name, this.qpqConfig, resourceType);\n }\n\n qpqBootstrapResourceName(name: string) {\n return awsNamingUtils.getConfigRuntimeBootstrapResourceNameFromConfig(name, this.qpqConfig);\n }\n\n grantRead(grantee: IGrantable): void {}\n\n grantWrite(grantee: IGrantable): void {}\n\n grantAll(grantee: IGrantable): void {\n this.grantRead(grantee);\n this.grantWrite(grantee);\n }\n\n getServiceRole(): aws_iam.IRole {\n if (!this.serviceRole) {\n this.serviceRole = aws_iam.Role.fromRoleName(this, 'service-role', this.resourceName('service-role'), {\n mutable: true,\n });\n }\n\n return this.serviceRole;\n }\n}\n"]}
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=QpqResource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QpqResource.js","sourceRoot":"","sources":["../../../../src/constructs/base/QpqResource.ts"],"names":[],"mappings":"","sourcesContent":["import { aws_iam } from 'aws-cdk-lib';\n\nexport interface QpqResource {\n /**\n * Grants read permissions on this resource.\n *\n * @param grantee the role to be granted read-only access to the resource.\n */\n grantRead(grantee: aws_iam.IGrantable): void;\n\n /**\n * Grants write permissions on the resource.\n *\n * @param grantee the role to be granted write access to the resource.\n */\n grantWrite(grantee: aws_iam.IGrantable): void;\n\n /**\n * Grants read/write permissions on the resource.\n *\n * @param grantee the role to be granted read/write access to the resource.\n */\n grantAll(grantee: aws_iam.IGrantable): void;\n}\n"]}
@@ -41,3 +41,4 @@ const createDefaultResourceAlarm = (scope, qpqConfig, props) => {
41
41
  });
42
42
  };
43
43
  exports.createDefaultResourceAlarm = createDefaultResourceAlarm;
44
+ //# sourceMappingURL=createDefaultResourceAlarm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createDefaultResourceAlarm.js","sourceRoot":"","sources":["../../../../src/constructs/base/createDefaultResourceAlarm.ts"],"names":[],"mappings":";;;AAAA,qDAA0D;AAE1D,6CAAqE;AAGrE,8EAA8E;AAC9E,iFAAiF;AACjF,4BAA4B;AAC5B,gGAA6F;AAa7F,sFAAsF;AAC/E,MAAM,2BAA2B,GAAG,CAAC,SAAoB,EAAY,EAAE;IAC5E,MAAM,KAAK,GAAG,8BAAY,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;IACxH,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AAC7B,CAAC,CAAC;AAHW,QAAA,2BAA2B,+BAGtC;AAEF;;;;;;;;GAQG;AACI,MAAM,0BAA0B,GAAG,CAAC,KAAgB,EAAE,SAAoB,EAAE,KAAgC,EAAQ,EAAE;;IAC3H,IAAI,8BAAY,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/D,OAAO;IACT,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,4BAAc,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE;QACtD,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,kBAAkB,EAAE,MAAA,KAAK,CAAC,kBAAkB,mCAAI,4BAAc,CAAC,kBAAkB,CAAC,kCAAkC;QACpH,iBAAiB,EAAE,MAAA,KAAK,CAAC,iBAAiB,mCAAI,CAAC;QAC/C,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;KAC3C,CAAC,CAAC;IAEH,IAAA,mCAA2B,EAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QACzD,MAAM,QAAQ,GAAG,mDAAwB,CAAC,cAAc,CAAC,KAAK,EAAE,GAAG,KAAK,CAAC,EAAE,QAAQ,OAAO,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;QAClH,KAAK,CAAC,cAAc,CAAC,IAAI,oCAAsB,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAlBW,QAAA,0BAA0B,8BAkBrC","sourcesContent":["import { QPQConfig, qpqCoreUtils } from 'quidproquo-core';\n\nimport { aws_cloudwatch, aws_cloudwatch_actions } from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\n\n// Imported by direct path (not the ../feature/core barrel) to avoid an import\n// cycle: resource constructs import this helper, and the barrel re-exports those\n// same resource constructs.\nimport { QpqCoreEventBusConstruct } from '../feature/core/eventBus/QpqCoreEventBusConstruct';\n\nexport interface DefaultResourceAlarmProps {\n /** Construct id (also seeds the per-event-bus action ids). */\n id: string;\n alarmName: string;\n metric: aws_cloudwatch.IMetric;\n threshold: number;\n comparisonOperator?: aws_cloudwatch.ComparisonOperator;\n evaluationPeriods?: number;\n datapointsToAlarm?: number;\n}\n\n/** Event buses that error/alarm notifications route to (from `defineNotifyError`). */\nexport const getNotifyErrorEventBusNames = (qpqConfig: QPQConfig): string[] => {\n const names = qpqCoreUtils.getNotifyErrorConfigs(qpqConfig).flatMap((config) => config.onAlarm.publishToEventBus || []);\n return [...new Set(names)];\n};\n\n/**\n * Create a sensible default alarm for a resource and route it to the service's\n * error-notification event bus(es).\n *\n * Opt-in: this is a no-op unless the service declares a `defineNotifyError`. We\n * reuse that config's target bus so default alarms land wherever errors already\n * do (no separate ops-routing concept). If a NotifyError exists but names no\n * bus, the alarm is still created (visible in console / dashboards) but unrouted.\n */\nexport const createDefaultResourceAlarm = (scope: Construct, qpqConfig: QPQConfig, props: DefaultResourceAlarmProps): void => {\n if (qpqCoreUtils.getNotifyErrorConfigs(qpqConfig).length === 0) {\n return;\n }\n\n const alarm = new aws_cloudwatch.Alarm(scope, props.id, {\n alarmName: props.alarmName,\n metric: props.metric,\n threshold: props.threshold,\n comparisonOperator: props.comparisonOperator ?? aws_cloudwatch.ComparisonOperator.GREATER_THAN_OR_EQUAL_TO_THRESHOLD,\n evaluationPeriods: props.evaluationPeriods ?? 1,\n datapointsToAlarm: props.datapointsToAlarm,\n });\n\n getNotifyErrorEventBusNames(qpqConfig).forEach((busName) => {\n const eventBus = QpqCoreEventBusConstruct.fromOtherStack(scope, `${props.id}-bus-${busName}`, qpqConfig, busName);\n alarm.addAlarmAction(new aws_cloudwatch_actions.SnsAction(eventBus.topic));\n });\n};\n"]}
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./QpqConstructBlock"), exports);
18
18
  __exportStar(require("./QpqResource"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/constructs/base/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,gDAA8B","sourcesContent":["export * from './QpqConstructBlock';\nexport * from './QpqResource';\n"]}
@@ -24,3 +24,4 @@ class BSQpqLambdaWarmerEventConstructConstruct extends QpqConstructBlock_1.QpqCo
24
24
  }
25
25
  }
26
26
  exports.BSQpqLambdaWarmerEventConstructConstruct = BSQpqLambdaWarmerEventConstructConstruct;
27
+ //# sourceMappingURL=BSQpqLambdaWarmerEventConstruct.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BSQpqLambdaWarmerEventConstruct.js","sourceRoot":"","sources":["../../../../src/constructs/basic/BSQpqLambdaWarmerEventConstruct.ts"],"names":[],"mappings":";;;AAAA,6CAAsE;AAGtE,+CAAoD;AACpD,iEAAsF;AAItF,MAAa,wCAAyC,SAAQ,qCAAiB;IAC7E,YAAY,KAAgB,EAAE,EAAU,EAAE,KAAoD;QAC5F,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;QAExB,MAAM,IAAI,GAAG,IAAI,wBAAU,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,EAAE;YACvD,QAAQ,EAAE,IAAI,CAAC,wBAAwB,CAAC,6BAAiB,CAAC,WAAW,CAAC;YACtE,mEAAmE;YACnE,QAAQ,EAAE,wBAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC;SAC5D,CAAC,CAAC;QAEH,MAAM,KAAK,GAAG,IAAI,qBAAO,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE;YAC/C,SAAS,EAAE,IAAI,CAAC,wBAAwB,CAAC,6BAAiB,CAAC,WAAW,CAAC;YACvE,WAAW,EAAE,cAAc;SAC5B,CAAC,CAAC;QAEH,IAAI,CAAC,SAAS,CACZ,IAAI,gCAAkB,CAAC,QAAQ,CAAC,KAAK,EAAE;YACrC,OAAO,EAAE,wBAAU,CAAC,eAAe,CAAC,UAAU,CAAC;gBAC7C,IAAI,EAAE,sBAAsB;aAC7B,CAAC;SACH,CAAC,CACH,CAAC;IACJ,CAAC;CACF;AAvBD,4FAuBC","sourcesContent":["import { aws_events, aws_events_targets, aws_sns } from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\n\nimport { BootstrapResource } from '../../constants';\nimport { QpqConstructBlock, QpqConstructBlockProps } from '../base/QpqConstructBlock';\n\nexport interface BSQpqLambdaWarmerEventConstructConstructProps extends QpqConstructBlockProps {}\n\nexport class BSQpqLambdaWarmerEventConstructConstruct extends QpqConstructBlock {\n constructor(scope: Construct, id: string, props: BSQpqLambdaWarmerEventConstructConstructProps) {\n super(scope, id, props);\n\n const rule = new aws_events.Rule(this, 'WarmLambdaRule', {\n ruleName: this.qpqBootstrapResourceName(BootstrapResource.WarmLambdas),\n // Create an EventBridge rule to trigger the Lambda every X minutes\n schedule: aws_events.Schedule.expression('rate(5 minutes)'),\n });\n\n const topic = new aws_sns.Topic(this, 'MyTopic', {\n topicName: this.qpqBootstrapResourceName(BootstrapResource.WarmLambdas),\n displayName: 'Warm Lambdas',\n });\n\n rule.addTarget(\n new aws_events_targets.SnsTopic(topic, {\n message: aws_events.RuleTargetInput.fromObject({\n type: 'QpqLambdaWarmerEvent',\n }),\n }),\n );\n }\n}\n"]}
@@ -22,3 +22,4 @@ const lookupDomainCertificate = (scope, certRegion, rootDomain, idSuffix) => {
22
22
  return aws_cdk_lib_1.aws_certificatemanager.Certificate.fromCertificateArn(scope, `domain-cert-${idSuffix}`, certArn);
23
23
  };
24
24
  exports.lookupDomainCertificate = lookupDomainCertificate;
25
+ //# sourceMappingURL=DomainCertificateLookup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DomainCertificateLookup.js","sourceRoot":"","sources":["../../../../src/constructs/basic/DomainCertificateLookup.ts"],"names":[],"mappings":";;;AAAA,iEAA0D;AAE1D,6CAA8D;AAG9D;;;;;;;;;;;;GAYG;AACI,MAAM,uBAAuB,GAAG,CACrC,KAAgB,EAChB,UAAkB,EAClB,UAAkB,EAClB,QAAgB,EACqB,EAAE;IACvC,MAAM,SAAS,GAAG,yCAAiB,CAAC,uCAAuC,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACpG,MAAM,OAAO,GAAG,qBAAO,CAAC,eAAe,CAAC,uBAAuB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAClF,OAAO,oCAAsB,CAAC,WAAW,CAAC,kBAAkB,CAAC,KAAK,EAAE,eAAe,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;AAC1G,CAAC,CAAC;AATW,QAAA,uBAAuB,2BASlC","sourcesContent":["import { qpqConfigAwsUtils } from 'quidproquo-config-aws';\n\nimport { aws_certificatemanager, aws_ssm } from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\n\n/**\n * Service-side helper to import an ACM certificate previously created by a DomainCertificateStack.\n *\n * The domain phase writes the cert ARN into an SSM parameter in the deploy region, keyed by region.\n * This helper reads that parameter as a deploy-time CloudFormation token and imports the cert by ARN.\n * Resolution is deferred to CloudFormation at deploy time (via valueForStringParameter), so synth does\n * not require the domain stack to have been deployed yet.\n *\n * @param scope CDK construct scope (typically the service stack/construct)\n * @param certRegion 'us-east-1' for CloudFront, deploy region for regional resources\n * @param rootDomain The same un-prefixed apex passed to the matching defineDomainCertificate entry\n * @param idSuffix Unique suffix for the CDK construct id (scope-local)\n */\nexport const lookupDomainCertificate = (\n scope: Construct,\n certRegion: string,\n rootDomain: string,\n idSuffix: string,\n): aws_certificatemanager.ICertificate => {\n const paramName = qpqConfigAwsUtils.getDomainCertificateArnSsmParameterName(certRegion, rootDomain);\n const certArn = aws_ssm.StringParameter.valueForStringParameter(scope, paramName);\n return aws_certificatemanager.Certificate.fromCertificateArn(scope, `domain-cert-${idSuffix}`, certArn);\n};\n"]}
@@ -109,3 +109,4 @@ class Function extends QpqConstructBlock_1.QpqConstructBlock {
109
109
  }
110
110
  }
111
111
  exports.Function = Function;
112
+ //# sourceMappingURL=Function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Function.js","sourceRoot":"","sources":["../../../../src/constructs/basic/Function.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+FAAsE;AACtE,iEAAuE;AACvE,iEAA0D;AAC1D,qDAA0D;AAE1D,6CAAqG;AACrG,iDAAmC;AAEnC,iCAA6B;AAE7B,+CAAoD;AACpD,uCAA0F;AAC1F,uFAAyE;AACzE,iEAAsF;AA4BtF,kFAAkF;AAClF,kFAAkF;AAClF,sFAAsF;AACtF,qFAAqF;AACrF,yEAAyE;AACzE,MAAM,wBAAwB,GAAG,CAAC,SAAoB,EAA0B,EAAE;;IAChF,MAAM,cAAc,GAAG,8BAAY,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;IACvE,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,YAAY,GAAG,8BAAY,CAAC,qBAAqB,CAAC,cAAc,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IAChG,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CACb,wDAAwD,cAAc,CAAC,YAAY,4DAA4D,CAChJ,CAAC;IACJ,CAAC;IAED,MAAM,UAAU,GAAG,qDAAc,CAAC,0CAA0C,CAC1E,CAAA,MAAA,YAAY,CAAC,KAAK,0CAAE,oBAAoB,KAAI,YAAY,CAAC,YAAY,EACrE,SAAS,EACT,YAAY,CAAC,KAAK,CACnB,CAAC;IACF,MAAM,WAAW,GAAG,8BAAY,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC;IAErE,uBACE,qBAAqB,EAAE,QAAQ,UAAU,IAAI,WAAW,EAAE,IACvD,CAAC,cAAc,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,2BAA2B,EAAE,GAAG,cAAc,CA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YACnF,MAAM,SAAS,GAAG,yCAAiB,CAAC,mCAAmC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;YAEzF,MAAM,SAAS,GAAG,IAAI,CAAC,wBAAwB,CAAC,6BAAiB,CAAC,WAAW,CAAC,CAAC;YAC/E,MAAM,QAAQ,GAAG,eAAe,MAAM,IAAI,SAAS,IAAI,SAAS,EAAE,CAAC;YACnE,MAAM,KAAK,GAAG,qBAAO,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,eAAe,EAAE,QAAQ,CAAC,CAAC;YAE1E,KAAK,CAAC,eAAe,CAAC,IAAI,mCAAqB,CAAC,kBAAkB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;QAC3F,CAAC;IACH,CAAC;CACF;AApED,4BAoEC","sourcesContent":["import { awsNamingUtils } from 'quidproquo-actionprocessor-awslambda';\nimport { getAwsServiceAccountInfoConfig } from 'quidproquo-config-aws';\nimport { qpqConfigAwsUtils } from 'quidproquo-config-aws';\nimport { QPQConfig, qpqCoreUtils } from 'quidproquo-core';\n\nimport { aws_ec2, aws_iam, aws_lambda, aws_logs, aws_sns, aws_sns_subscriptions } from 'aws-cdk-lib';\nimport * as cdk from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\nimport { join } from 'upath';\n\nimport { BootstrapResource } from '../../constants';\nimport { getLambdaArchitecture, getLambdaRuntime, qpqAwsCdkPathUtils } from '../../utils';\nimport * as qpqDeployAwsCdkUtils from '../../utils/qpqDeployAwsCdkUtils';\nimport { QpqConstructBlock, QpqConstructBlockProps } from '../base/QpqConstructBlock';\n\nexport interface FunctionProps extends QpqConstructBlockProps {\n functionName?: string;\n\n srcFilename?: string;\n functionType: string; // TODO: Rename this to subFolder / folder or something\n executorName: string; // TODO: Rename this to handlerName or something maybe?\n\n timeoutInSeconds?: number;\n memoryInBytes?: number;\n\n environment?: {\n [key: string]: string;\n };\n\n apiLayerVersions?: aws_lambda.ILayerVersion[];\n\n reservedConcurrentExecutions?: number;\n\n role?: aws_iam.IRole;\n\n reacreateOnFunctionNameChange?: boolean;\n\n vpc?: aws_ec2.IVpc;\n securityGroups?: aws_ec2.ISecurityGroup[];\n}\n\n// Resolves the federated code store location for this service, if it opted in via\n// defineFederatedModuleStore. Points the lambda at the referenced storage drive's\n// bucket, namespaced by service (s3://<bucket>/<service>), so many services can share\n// one bucket. Read access comes from the storage drive's own grants. Returns {} when\n// federation isn't configured, so the lambda runs only its bundled code.\nconst getFederatedCodeStoreEnv = (qpqConfig: QPQConfig): Record<string, string> => {\n const federatedStore = qpqCoreUtils.getFederatedModuleStore(qpqConfig);\n if (!federatedStore) {\n return {};\n }\n\n const storageDrive = qpqCoreUtils.getStorageDriveByName(federatedStore.storageDrive, qpqConfig);\n if (!storageDrive) {\n throw new Error(\n `defineFederatedModuleStore references storage drive [${federatedStore.storageDrive}] which is not defined - add a matching defineStorageDrive`,\n );\n }\n\n const bucketName = awsNamingUtils.resolveConfigRuntimeResourceNameFromConfig(\n storageDrive.owner?.resourceNameOverride || storageDrive.storageDrive,\n qpqConfig,\n storageDrive.owner,\n );\n const serviceName = qpqCoreUtils.getApplicationModuleName(qpqConfig);\n\n return {\n federatedCodeStoreUrl: `s3://${bucketName}/${serviceName}`,\n ...(federatedStore.recheckMs !== undefined ? { federatedCodeStoreRecheckMs: `${federatedStore.recheckMs}` } : {}),\n };\n};\n\nexport class Function extends QpqConstructBlock {\n public readonly lambdaFunction: aws_lambda.Function;\n\n constructor(scope: Construct, id: string, props: FunctionProps) {\n super(scope, id, props);\n\n console.log(`Function: [${props.functionName || ''}]::${props.functionName?.length}`);\n\n const handlerFile = props.srcFilename || 'index';\n\n const serviceInfo = getAwsServiceAccountInfoConfig(props.qpqConfig);\n\n const functionId = props.reacreateOnFunctionNameChange && props.functionName ? props.functionName : 'function';\n\n this.lambdaFunction = new aws_lambda.Function(this, functionId, {\n functionName: props.functionName,\n timeout: cdk.Duration.seconds(props.timeoutInSeconds || 25),\n\n runtime: getLambdaRuntime(props.qpqConfig),\n architecture: getLambdaArchitecture(props.qpqConfig),\n memorySize: props.memoryInBytes || serviceInfo.lambdaMaxMemoryInMiB || 1024,\n layers: props.apiLayerVersions,\n\n code: aws_lambda.Code.fromAsset(join(qpqAwsCdkPathUtils.getApiBuildPathFullPath(props.qpqConfig), props.functionType)),\n handler: `${handlerFile}.${props.executorName}`,\n\n environment: {\n AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1',\n // Federated code store (only when the service opted in via\n // defineFederatedModuleStore); the loader falls back to bundled modules\n // while the store has nothing published for this service\n ...getFederatedCodeStoreEnv(props.qpqConfig),\n ...(props.environment || {}),\n },\n\n reservedConcurrentExecutions: qpqConfigAwsUtils.isReservedConcurrencyDisabled(props.qpqConfig) ? undefined : props.reservedConcurrentExecutions,\n\n tracing: qpqConfigAwsUtils.isTracingDisabled(props.qpqConfig) ? aws_lambda.Tracing.DISABLED : aws_lambda.Tracing.ACTIVE,\n\n logGroup: new aws_logs.LogGroup(this, 'LogGroup', {\n retention: aws_logs.RetentionDays.ONE_YEAR,\n removalPolicy: cdk.RemovalPolicy.DESTROY,\n }),\n\n role: props.role,\n\n vpc: props.vpc,\n vpcSubnets: props.vpc\n ? {\n subnetType: aws_ec2.SubnetType.PRIVATE_WITH_EGRESS,\n }\n : undefined,\n securityGroups: props.securityGroups,\n });\n\n qpqDeployAwsCdkUtils.applyEnvironmentTags(this.lambdaFunction, props.qpqConfig);\n\n if (!qpqConfigAwsUtils.isLambdaWarmingDisabled(props.qpqConfig)) {\n const region = qpqConfigAwsUtils.getApplicationModuleDeployRegion(props.qpqConfig);\n const accountId = qpqConfigAwsUtils.getApplicationModuleDeployAccountId(props.qpqConfig);\n\n const topicName = this.qpqBootstrapResourceName(BootstrapResource.WarmLambdas);\n const topicArn = `arn:aws:sns:${region}:${accountId}:${topicName}`;\n const topic = aws_sns.Topic.fromTopicArn(this, 'ImportedTopic', topicArn);\n\n topic.addSubscription(new aws_sns_subscriptions.LambdaSubscription(this.lambdaFunction));\n }\n }\n}\n"]}
@@ -45,3 +45,4 @@ class LambdaLayers extends QpqConstructBlock_1.QpqConstructBlock {
45
45
  }
46
46
  }
47
47
  exports.LambdaLayers = LambdaLayers;
48
+ //# sourceMappingURL=LambdaLayers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LambdaLayers.js","sourceRoot":"","sources":["../../../../src/constructs/basic/LambdaLayers.ts"],"names":[],"mappings":";;;;;;AAAA,+FAAgG;AAChG,iEAAiF;AACjF,qDAA0D;AAE1D,6CAAyC;AAEzC,gDAAwB;AAExB,uCAA+C;AAC/C,iEAAsF;AAE/E,MAAM,4BAA4B,GAAG,CAAC,SAAoB,EAAc,EAAE;IAC/E,MAAM,2BAA2B,GAAG,IAAA,sDAA8B,EAAC,SAAS,CAAC,CAAC;IAE9E,OAAO,2BAA2B,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,KAAe,EAAE,EAAE,CAAC,CAAC;QACrE,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,cAAI,CAAC,IAAI,CAAC,8BAAY,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;QAC1G,QAAQ,EAAE,KAAK,CAAC,QAAQ;KACzB,CAAC,CAAC,CAAC;AACN,CAAC,CAAC;AARW,QAAA,4BAA4B,gCAQvC;AAIF,MAAa,YAAa,SAAQ,qCAAiB;IAGjD,YAAY,KAAgB,EAAE,EAAU,EAAE,KAAwB;QAChE,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;QAExB,MAAM,SAAS,GAAG,IAAA,oCAA4B,EAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAChE,MAAM,aAAa,GAAG,IAAA,wBAAgB,EAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAExD,MAAM,UAAU,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YACzC,OAAO,KAAK,CAAC,SAAS;gBACpB,CAAC,CAAC,IAAI,wBAAU,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,IAAI,QAAQ,EAAE;oBACvD,gBAAgB,EAAE,qDAAc,CAAC,mCAAmC,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;oBACjG,IAAI,EAAE,IAAI,wBAAU,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC;oBAC/C,kBAAkB,EAAE,CAAC,aAAa,CAAC;iBACpC,CAAC;gBACJ,CAAC,CAAC,wBAAU,CAAC,YAAY,CAAC,mBAAmB,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,IAAI,YAAY,EAAE,KAAK,CAAC,QAAS,CAAC,CAAC;QACpG,CAAC,CAAC,CAAC;QAEH,6EAA6E;QAC7E,kEAAkE;QAClE,MAAM,iBAAiB,GAAG,IAAI,wBAAU,CAAC,YAAY,CAAC,IAAI,EAAE,yBAAyB,EAAE;YACrF,gBAAgB,EAAE,qDAAc,CAAC,mCAAmC,CAAC,mBAAmB,EAAE,KAAK,CAAC,SAAS,CAAC;YAC1G,IAAI,EAAE,IAAI,wBAAU,CAAC,SAAS,CAAC,IAAA,+DAAwB,GAAE,CAAC;YAC1D,kBAAkB,EAAE,CAAC,aAAa,CAAC;SACpC,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,UAAU,EAAE,iBAAiB,CAAC,CAAC;IACnD,CAAC;CACF;AA7BD,oCA6BC","sourcesContent":["import { awsNamingUtils, getLogExtensionLayerPath } from 'quidproquo-actionprocessor-awslambda';\nimport { ApiLayer, getAwsServiceAccountInfoConfig } from 'quidproquo-config-aws';\nimport { QPQConfig, qpqCoreUtils } from 'quidproquo-core';\n\nimport { aws_lambda } from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\nimport path from 'path';\n\nimport { getLambdaRuntime } from '../../utils';\nimport { QpqConstructBlock, QpqConstructBlockProps } from '../base/QpqConstructBlock';\n\nexport const getLambdaLayersWithFullPaths = (qpqConfig: QPQConfig): ApiLayer[] => {\n const awsServiceAccountInfoConfig = getAwsServiceAccountInfoConfig(qpqConfig);\n\n return awsServiceAccountInfoConfig.apiLayers.map((layer: ApiLayer) => ({\n name: layer.name,\n buildPath: layer.buildPath ? path.join(qpqCoreUtils.getConfigRoot(qpqConfig), layer.buildPath) : undefined,\n layerArn: layer.layerArn,\n }));\n};\n\nexport interface LambdaLayersProps extends QpqConstructBlockProps {}\n\nexport class LambdaLayers extends QpqConstructBlock {\n public readonly layers: aws_lambda.ILayerVersion[];\n\n constructor(scope: Construct, id: string, props: LambdaLayersProps) {\n super(scope, id, props);\n\n const apiLayers = getLambdaLayersWithFullPaths(props.qpqConfig);\n const lambdaRuntime = getLambdaRuntime(props.qpqConfig);\n\n const userLayers = apiLayers.map((layer) => {\n return layer.buildPath\n ? new aws_lambda.LayerVersion(this, `${layer.name}-layer`, {\n layerVersionName: awsNamingUtils.getQpqRuntimeResourceNameFromConfig(layer.name, props.qpqConfig),\n code: new aws_lambda.AssetCode(layer.buildPath),\n compatibleRuntimes: [lambdaRuntime],\n })\n : aws_lambda.LayerVersion.fromLayerVersionArn(this, `${layer.name}-layer-ref`, layer.layerArn!);\n });\n\n // Always-on: the qpq-log-extension ships story logs to S3 off the function's\n // response path. Attached to every function via apiLayerVersions.\n const logExtensionLayer = new aws_lambda.LayerVersion(this, 'qpq-log-extension-layer', {\n layerVersionName: awsNamingUtils.getQpqRuntimeResourceNameFromConfig('qpq-log-extension', props.qpqConfig),\n code: new aws_lambda.AssetCode(getLogExtensionLayerPath()),\n compatibleRuntimes: [lambdaRuntime],\n });\n\n this.layers = [...userLayers, logExtensionLayer];\n }\n}\n"]}
@@ -41,3 +41,4 @@ class SubdomainName extends QpqConstructBlock_1.QpqConstructBlock {
41
41
  }
42
42
  }
43
43
  exports.SubdomainName = SubdomainName;
44
+ //# sourceMappingURL=SubdomainName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubdomainName.js","sourceRoot":"","sources":["../../../../src/constructs/basic/SubdomainName.ts"],"names":[],"mappings":";;;AAAA,iEAA0D;AAC1D,+DAAyD;AAEzD,6CAAuG;AAGvG,iEAAsF;AACtF,uEAAoE;AAQpE,MAAa,aAAc,SAAQ,qCAAiB;IAMlD,YAAY,KAAgB,EAAE,EAAU,EAAE,KAAyB;QACjE,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;QAExB,IAAI,CAAC,YAAY,GAAG,GAAG,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;QAE7D,+EAA+E;QAC/E,sEAAsE;QACtE,kFAAkF;QAClF,MAAM,gBAAgB,GAAG,wCAAiB,CAAC,iBAAiB,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QAChG,MAAM,cAAc,GAAG,yBAAW,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,EAAE,aAAa,EAAE;YAC5E,UAAU,EAAE,gBAAgB;SAC7B,CAAC,CAAC;QAEH,wEAAwE;QACxE,+FAA+F;QAC/F,MAAM,YAAY,GAAG,yCAAiB,CAAC,gCAAgC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACzF,IAAI,CAAC,WAAW,GAAG,IAAA,iDAAuB,EAAC,IAAI,EAAE,YAAY,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QAElG,IAAI,CAAC,UAAU,GAAG,IAAI,4BAAc,CAAC,UAAU,CAAC,IAAI,EAAE,aAAa,EAAE;YACnE,UAAU,EAAE,IAAI,CAAC,YAAY;YAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,cAAc,EAAE,4BAAc,CAAC,cAAc,CAAC,OAAO;YACrD,YAAY,EAAE,4BAAc,CAAC,YAAY,CAAC,QAAQ;SACnD,CAAC,CAAC;QAEH,IAAI,CAAC,aAAa,GAAG,yBAAW,CAAC,YAAY,CAAC,SAAS,CAAC,IAAI,iCAAmB,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QAEnH,IAAI,yBAAW,CAAC,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE;YACxC,IAAI,EAAE,cAAc;YACpB,UAAU,EAAE,IAAI,CAAC,YAAY;YAC7B,MAAM,EAAE,IAAI,CAAC,aAAa;SAC3B,CAAC,CAAC;QAEH,kDAAkD;QAClD,4CAA4C;QAC5C,wCAAwC;QACxC,oDAAoD;QACpD,MAAM;IACR,CAAC;CACF;AA7CD,sCA6CC","sourcesContent":["import { qpqConfigAwsUtils } from 'quidproquo-config-aws';\nimport { qpqWebServerUtils } from 'quidproquo-webserver';\n\nimport { aws_apigateway, aws_certificatemanager, aws_route53, aws_route53_targets } from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\n\nimport { QpqConstructBlock, QpqConstructBlockProps } from '../base/QpqConstructBlock';\nimport { lookupDomainCertificate } from './DomainCertificateLookup';\n\nexport interface SubdomainNameProps extends QpqConstructBlockProps {\n subdomain: string;\n apexDomain: string;\n rootDomain: string;\n}\n\nexport class SubdomainName extends QpqConstructBlock {\n public readonly domainName: aws_apigateway.DomainName;\n public readonly certificate: aws_certificatemanager.ICertificate;\n public readonly targetARecord: aws_route53.RecordTarget;\n public readonly deployDomain: string;\n\n constructor(scope: Construct, id: string, props: SubdomainNameProps) {\n super(scope, id, props);\n\n this.deployDomain = `${props.subdomain}.${props.apexDomain}`;\n\n // Always look up the root hosted zone (e.g. development.quidproquojs.com), not\n // a per-service sub-zone. The FQDN may include the service name (e.g.\n // ws.shell.development.quidproquojs.com) but the A record lives in the root zone.\n const hostedZoneDomain = qpqWebServerUtils.resolveDomainRoot(props.rootDomain, props.qpqConfig);\n const apexHostedZone = aws_route53.HostedZone.fromLookup(this, 'hosted-zone', {\n domainName: hostedZoneDomain,\n });\n\n // Regional API Gateway custom domains need a cert in the deploy region.\n // Look it up from SSM, written by the matching DomainCertificateStack during the domain phase.\n const deployRegion = qpqConfigAwsUtils.getApplicationModuleDeployRegion(props.qpqConfig);\n this.certificate = lookupDomainCertificate(this, deployRegion, props.rootDomain, props.subdomain);\n\n this.domainName = new aws_apigateway.DomainName(this, 'domain-name', {\n domainName: this.deployDomain,\n certificate: this.certificate,\n securityPolicy: aws_apigateway.SecurityPolicy.TLS_1_2,\n endpointType: aws_apigateway.EndpointType.REGIONAL,\n });\n\n this.targetARecord = aws_route53.RecordTarget.fromAlias(new aws_route53_targets.ApiGatewayDomain(this.domainName));\n\n new aws_route53.ARecord(this, 'a-record', {\n zone: apexHostedZone,\n recordName: this.deployDomain,\n target: this.targetARecord,\n });\n\n // // Export the names so we can import them later\n // new cdk.CfnOutput(this, 'HostedZoneID', {\n // value: apexHostedZone.hostedZoneId,\n // exportName: `${apexHostedZone}-hosted-zone-id`,\n // });\n }\n}\n"]}
@@ -61,7 +61,7 @@ class WebserverRoll extends QpqConstructBlock_1.QpqConstructBlock {
61
61
  // the same owner-fallback derivation the runtime send processor uses to build the ARN.
62
62
  const eventBusTopicArns = quidproquo_core_1.qpqCoreUtils.getAllEventBusConfigs(props.qpqConfig).map((eventBusConfig) => {
63
63
  var _a, _b, _c, _d, _e;
64
- return quidproquo_actionprocessor_awslambda_1.awsNamingUtils.getEventBusSnsTopicArn(((_a = eventBusConfig.owner) === null || _a === void 0 ? void 0 : _a.resourceNameOverride) || eventBusConfig.name, props.qpqConfig, ((_b = eventBusConfig.owner) === null || _b === void 0 ? void 0 : _b.module) || quidproquo_core_1.qpqCoreUtils.getApplicationModuleName(props.qpqConfig), ((_c = eventBusConfig.owner) === null || _c === void 0 ? void 0 : _c.environment) || quidproquo_core_1.qpqCoreUtils.getApplicationModuleEnvironment(props.qpqConfig), ((_d = eventBusConfig.owner) === null || _d === void 0 ? void 0 : _d.application) || quidproquo_core_1.qpqCoreUtils.getApplicationName(props.qpqConfig), ((_e = eventBusConfig.owner) === null || _e === void 0 ? void 0 : _e.feature) || quidproquo_core_1.qpqCoreUtils.getApplicationModuleFeature(props.qpqConfig));
64
+ return quidproquo_actionprocessor_awslambda_1.awsNamingUtils.getEventBusSnsTopicArn(((_a = eventBusConfig.owner) === null || _a === void 0 ? void 0 : _a.resourceNameOverride) || eventBusConfig.name, props.qpqConfig, ((_b = eventBusConfig.owner) === null || _b === void 0 ? void 0 : _b.module) || quidproquo_core_1.qpqCoreUtils.getApplicationModuleName(props.qpqConfig), ((_c = eventBusConfig.owner) === null || _c === void 0 ? void 0 : _c.environment) || quidproquo_core_1.qpqCoreUtils.getApplicationModuleEnvironment(props.qpqConfig), ((_d = eventBusConfig.owner) === null || _d === void 0 ? void 0 : _d.application) || quidproquo_core_1.qpqCoreUtils.getApplicationName(props.qpqConfig), ((_e = eventBusConfig.owner) === null || _e === void 0 ? void 0 : _e.feature) || quidproquo_core_1.qpqCoreUtils.getApplicationModuleFeature(props.qpqConfig), eventBusConfig.isFifo);
65
65
  });
66
66
  const policies = [
67
67
  // Resolve cross-stack resource names at runtime via CloudFormation exports.
@@ -145,3 +145,4 @@ class WebserverRoll extends QpqConstructBlock_1.QpqConstructBlock {
145
145
  }
146
146
  }
147
147
  exports.WebserverRoll = WebserverRoll;
148
+ //# sourceMappingURL=WebserverRoll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebserverRoll.js","sourceRoot":"","sources":["../../../../src/constructs/basic/WebserverRoll.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+FAAsE;AACtE,iEAA0D;AAC1D,qDAA+C;AAE/C,6CAAsC;AAGtC,uFAAyE;AACzE,iEAAsF;AAItF,MAAa,aAAc,SAAQ,qCAAiB;IAGlD,YAAY,KAAgB,EAAE,EAAU,EAAE,KAAyB;QACjE,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;QAExB,MAAM,IAAI,G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AC;CACF;AAxID,sCAwIC","sourcesContent":["import { awsNamingUtils } from 'quidproquo-actionprocessor-awslambda';\nimport { qpqConfigAwsUtils } from 'quidproquo-config-aws';\nimport { qpqCoreUtils } from 'quidproquo-core';\n\nimport { aws_iam } from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\n\nimport * as qpqDeployAwsCdkUtils from '../../utils/qpqDeployAwsCdkUtils';\nimport { QpqConstructBlock, QpqConstructBlockProps } from '../base/QpqConstructBlock';\n\nexport interface WebserverRollProps extends QpqConstructBlockProps {}\n\nexport class WebserverRoll extends QpqConstructBlock {\n role: aws_iam.IRole;\n\n constructor(scope: Construct, id: string, props: WebserverRollProps) {\n super(scope, id, props);\n\n const role = new aws_iam.Role(this, 'role', {\n roleName: this.resourceName('service-role'),\n assumedBy: new aws_iam.CompositePrincipal(\n new aws_iam.ServicePrincipal('lambda.amazonaws.com'),\n new aws_iam.ServicePrincipal('transfer.amazonaws.com'),\n new aws_iam.ServicePrincipal('edgelambda.amazonaws.com'),\n // new aws_iam.ServicePrincipal('neptune.amazonaws.com'),\n ),\n });\n\n qpqDeployAwsCdkUtils.applyEnvironmentTags(role, props.qpqConfig);\n\n const region = qpqConfigAwsUtils.getApplicationModuleDeployRegion(props.qpqConfig);\n const accountId = qpqConfigAwsUtils.getApplicationModuleDeployAccountId(props.qpqConfig);\n const applicationName = qpqCoreUtils.getApplicationName(props.qpqConfig);\n const environment = qpqCoreUtils.getApplicationModuleEnvironment(props.qpqConfig);\n const feature = qpqCoreUtils.getApplicationModuleFeature(props.qpqConfig);\n\n // This deployment's identity tags, as applied to every qpq resource by applyEnvironmentTags.\n // Used for tag-based conditions where the target resource's id is unknowable at synth\n // (later deploy phase / AWS-generated) but the resource is still owned by this deployment.\n const applicationResourceTagConditions = {\n 'aws:ResourceTag/application': qpqCoreUtils.getApplicationName(props.qpqConfig),\n 'aws:ResourceTag/environment': qpqCoreUtils.getApplicationModuleEnvironment(props.qpqConfig),\n ...(feature ? { 'aws:ResourceTag/feature': feature } : {}),\n };\n\n // Every event-bus topic this service can publish to (owned + referenced cross-module) -\n // the same owner-fallback derivation the runtime send processor uses to build the ARN.\n const eventBusTopicArns = qpqCoreUtils.getAllEventBusConfigs(props.qpqConfig).map((eventBusConfig) =>\n awsNamingUtils.getEventBusSnsTopicArn(\n eventBusConfig.owner?.resourceNameOverride || eventBusConfig.name,\n props.qpqConfig,\n\n eventBusConfig.owner?.module || qpqCoreUtils.getApplicationModuleName(props.qpqConfig),\n eventBusConfig.owner?.environment || qpqCoreUtils.getApplicationModuleEnvironment(props.qpqConfig),\n eventBusConfig.owner?.application || qpqCoreUtils.getApplicationName(props.qpqConfig),\n eventBusConfig.owner?.feature || qpqCoreUtils.getApplicationModuleFeature(props.qpqConfig),\n eventBusConfig.isFifo,\n ),\n );\n\n const policies: aws_iam.PolicyStatementProps[] = [\n // Resolve cross-stack resource names at runtime via CloudFormation exports.\n {\n sid: 'CloudFormationListExports',\n actions: ['cloudformation:ListExports'],\n resources: ['*'],\n },\n\n // Read api-key values at runtime for api-key validation - keys are fetched individually\n // by id (never listed), so the grant is per-key, pinned to this application's tags.\n // Module is deliberately NOT pinned: routes may reference another service's key\n // (ApiKeyReference.serviceName) within the same application + environment.\n {\n sid: 'APIGatewayGetOperations',\n actions: ['apigateway:GET'],\n resources: [`arn:aws:apigateway:${region}::/apikeys/*`],\n conditions: {\n StringEquals: applicationResourceTagConditions,\n },\n },\n\n // Publish to event-bus SNS topics (the framework's pub/sub layer), scoped to the\n // buses this service declares. Omitted entirely when no event buses are configured.\n ...(eventBusTopicArns.length > 0\n ? [\n {\n sid: 'SNSPublishMessages',\n actions: ['sns:Publish'],\n resources: eventBusTopicArns,\n },\n ]\n : []),\n\n // Invoke QPQ service functions from other lambdas. The runtime derives target names\n // with getConfigRuntimeResourceName from its own app/env/feature (only the target\n // service varies), so the same helper builds this pattern with the function and\n // service segments wildcarded - cross-app/env invocation is not possible.\n {\n sid: 'LambdaInvokeFunction',\n actions: ['lambda:InvokeFunction'],\n resources: [\n `arn:aws:lambda:${region}:${accountId}:function:${awsNamingUtils.getConfigRuntimeResourceName('*-sfunc', applicationName, '*', environment, feature)}`,\n ],\n },\n\n // Look up ACM certs when wiring up custom domains at runtime.\n {\n sid: 'ACMCertificateOperations',\n actions: ['acm:DescribeCertificate', 'acm:ListCertificates'],\n resources: ['*'],\n },\n\n // Standard Lambda logging + log retrieval for the `askGetLogs` flow. Account-pinned;\n // region is left open because edge lambdas write logs in their execution region.\n {\n sid: 'CloudWatchLogsManagement',\n actions: [\n 'logs:CreateLogGroup',\n 'logs:CreateLogStream',\n 'logs:DescribeLogGroups',\n 'logs:DescribeLogStreams',\n 'logs:PutLogEvents',\n 'logs:GetLogEvents',\n 'logs:FilterLogEvents',\n ],\n resources: [`arn:aws:logs:*:${accountId}:log-group:*`],\n },\n\n // Required for VPC-attached Lambdas to manage their ENIs.\n {\n sid: 'EC2NetworkInterfacePermissions',\n actions: [\n 'ec2:CreateNetworkInterface',\n 'ec2:DescribeNetworkInterfaces',\n 'ec2:DeleteNetworkInterface',\n 'ec2:AssignPrivateIpAddresses',\n 'ec2:UnassignPrivateIpAddresses',\n ],\n resources: ['*'],\n },\n ];\n\n policies.forEach((policy) => {\n role.addToPolicy(new aws_iam.PolicyStatement(policy));\n });\n\n this.role = role;\n }\n}\n"]}
@@ -18,3 +18,4 @@ __exportStar(require("./DomainCertificateLookup"), exports);
18
18
  __exportStar(require("./Function"), exports);
19
19
  __exportStar(require("./LambdaLayers"), exports);
20
20
  __exportStar(require("./SubdomainName"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/constructs/basic/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,6CAA2B;AAC3B,iDAA+B;AAC/B,kDAAgC","sourcesContent":["export * from './DomainCertificateLookup';\nexport * from './Function';\nexport * from './LambdaLayers';\nexport * from './SubdomainName';\n"]}
@@ -69,3 +69,4 @@ class QpqAccountBudgetConstruct extends QpqConstructBlock_1.QpqConstructBlock {
69
69
  }
70
70
  }
71
71
  exports.QpqAccountBudgetConstruct = QpqAccountBudgetConstruct;
72
+ //# sourceMappingURL=QpqAccountBudgetConstruct.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QpqAccountBudgetConstruct.js","sourceRoot":"","sources":["../../../../../src/constructs/feature/account/QpqAccountBudgetConstruct.ts"],"names":[],"mappings":";;;AAAA,iEAA+H;AAE/H,6CAAkD;AAGlD,oEAAyF;AAMzF,MAAM,iBAAiB,GAAsB;IAC3C,EAAE,gBAAgB,EAAE,EAAE,EAAE,IAAI,EAAE,2CAAmB,CAAC,MAAM,EAAE;IAC1D,EAAE,gBAAgB,EAAE,GAAG,EAAE,IAAI,EAAE,2CAAmB,CAAC,UAAU,EAAE;IAC/D,EAAE,gBAAgB,EAAE,GAAG,EAAE,IAAI,EAAE,2CAAmB,CAAC,MAAM,EAAE;IAC3D,EAAE,gBAAgB,EAAE,GAAG,EAAE,IAAI,EAAE,2CAAmB,CAAC,MAAM,EAAE;CAC5D,CAAC;AAEF,MAAa,yBAA0B,SAAQ,qCAAiB;IAC9D,YAAY,KAAgB,EAAE,EAAU,EAAE,KAAqC;;QAC7E,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;QAExB,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,GAAG,iBAAiB,EAAE,gBAAgB,EAAE,GAAG,KAAK,CAAC,YAAY,CAAC;QAEzH,MAAM,SAAS,GAAG,yCAAiB,CAAC,mCAAmC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAEzF,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACxD,gBAAgB,EAAE,OAAO;YACzB,OAAO,EAAE,KAAK;SACf,CAAC,CAAC,CAAC;QA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AAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;oBAC5C,IAAI,EAAE,OAAO;oBACb,OAAO,EAAE,KAAK;iBACf,CAAC,CAAC;gBACH,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC;oBAClC,UAAU,EAAE;wBACV,GAAG,EAAE,+BAA+B;wBACpC,YAAY,EAAE,CAAC,uBAAuB,CAAC;wBACvC,MAAM,EAAE,CAAC,GAAG,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,gBAAgB,mCAAI,EAAE,EAAE,CAAC;qBACxD;iBACF,CAAC;aACH,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF;AA9DD,8DA8DC","sourcesContent":["import { AccountBudgetQPQConfigSetting, BudgetThreshold, BudgetThresholdType, qpqConfigAwsUtils } from 'quidproquo-config-aws';\n\nimport { aws_budgets, aws_ce } from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\n\nimport { QpqConstructBlock, QpqConstructBlockProps } from '../../base/QpqConstructBlock';\n\nexport interface QpqAccountBudgetConstructProps extends QpqConstructBlockProps {\n budgetConfig: AccountBudgetQPQConfigSetting;\n}\n\nconst defaultThresholds: BudgetThreshold[] = [\n { thresholdPercent: 80, type: BudgetThresholdType.actual },\n { thresholdPercent: 100, type: BudgetThresholdType.forecasted },\n { thresholdPercent: 100, type: BudgetThresholdType.actual },\n { thresholdPercent: 150, type: BudgetThresholdType.actual },\n];\n\nexport class QpqAccountBudgetConstruct extends QpqConstructBlock {\n constructor(scope: Construct, id: string, props: QpqAccountBudgetConstructProps) {\n super(scope, id, props);\n\n const { name, monthlyLimitUsd, subscriberEmails, thresholds = defaultThresholds, anomalyDetection } = props.budgetConfig;\n\n const accountId = qpqConfigAwsUtils.getApplicationModuleDeployAccountId(props.qpqConfig);\n\n const emailSubscribers = subscriberEmails.map((email) => ({\n subscriptionType: 'EMAIL',\n address: email,\n }));\n\n new aws_budgets.CfnBudget(this, 'budget', {\n budget: {\n budgetName: `qpq-budget-${accountId}-${name}`,\n budgetType: 'COST',\n timeUnit: 'MONTHLY',\n budgetLimit: {\n amount: monthlyLimitUsd,\n unit: 'USD',\n },\n },\n notificationsWithSubscribers: thresholds.map((threshold) => ({\n notification: {\n notificationType: threshold.type === BudgetThresholdType.forecasted ? 'FORECASTED' : 'ACTUAL',\n comparisonOperator: 'GREATER_THAN',\n threshold: threshold.thresholdPercent,\n thresholdType: 'PERCENTAGE',\n },\n subscribers: emailSubscribers,\n })),\n });\n\n if (!anomalyDetection?.disabled) {\n // AWS allows only one DIMENSIONAL(SERVICE) anomaly monitor per account - declare a\n // single defineAccountBudget per account (or disable anomalyDetection on extras)\n const anomalyMonitor = new aws_ce.CfnAnomalyMonitor(this, 'anomaly-monitor', {\n monitorName: `qpq-anomaly-monitor-${accountId}-${name}`,\n monitorType: 'DIMENSIONAL',\n monitorDimension: 'SERVICE',\n });\n\n new aws_ce.CfnAnomalySubscription(this, 'anomaly-subscription', {\n subscriptionName: `qpq-anomaly-subscription-${accountId}-${name}`,\n monitorArnList: [anomalyMonitor.attrMonitorArn],\n // DAILY is required for EMAIL subscribers (IMMEDIATE is SNS-only)\n frequency: 'DAILY',\n subscribers: subscriberEmails.map((email) => ({\n type: 'EMAIL',\n address: email,\n })),\n thresholdExpression: JSON.stringify({\n Dimensions: {\n Key: 'ANOMALY_TOTAL_IMPACT_ABSOLUTE',\n MatchOptions: ['GREATER_THAN_OR_EQUAL'],\n Values: [`${anomalyDetection?.minimumImpactUsd ?? 10}`],\n },\n }),\n });\n }\n }\n}\n"]}
@@ -72,3 +72,4 @@ class QpqAccountCloudTrailConstruct extends QpqConstructBlock_1.QpqConstructBloc
72
72
  }
73
73
  }
74
74
  exports.QpqAccountCloudTrailConstruct = QpqAccountCloudTrailConstruct;
75
+ //# sourceMappingURL=QpqAccountCloudTrailConstruct.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QpqAccountCloudTrailConstruct.js","sourceRoot":"","sources":["../../../../../src/constructs/feature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,IAAI,EAAE;gBACvC,SAAS,EAAE,IAAA,2BAAmB,EAAC,cAAc,CAAC,aAAa,CAAC;gBAC5D,aAAa,EAAE,GAAG,CAAC,aAAa,CAAC,OAAO;aACzC,CAAC;YACJ,CAAC,CAAC,SAAS,CAAC;QAEd,IAAI,4BAAc,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE;YACtC,SAAS,EAAE,GAAG,IAAI,QAAQ;YAC1B,MAAM;YACN,oBAAoB,EAAE,uBAAuB;YAC7C,kBAAkB,EAAE,WAAW;YAC/B,0BAA0B;YAC1B,oBAAoB,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ;YACrC,kBAAkB,EAAE,IAAI,CAAC,QAAQ;SAClC,CAAC,CAAC;IACL,CAAC;CACF;AA/CD,sEA+CC","sourcesContent":["import { AccountCloudTrailQPQConfigSetting, qpqConfigAwsUtils } from 'quidproquo-config-aws';\n\nimport * as cdk from 'aws-cdk-lib';\nimport { aws_cloudtrail, aws_logs, aws_s3 } from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\n\nimport { resolveLogRetention } from '../../../utils';\nimport { QpqConstructBlock, QpqConstructBlockProps } from '../../base/QpqConstructBlock';\n\nexport interface QpqAccountCloudTrailConstructProps extends QpqConstructBlockProps {\n cloudTrailConfig: AccountCloudTrailQPQConfigSetting;\n}\n\nexport class QpqAccountCloudTrailConstruct extends QpqConstructBlock {\n // Only set when the config enables cloudWatchLogs - consumed by the security services\n // construct for the cognito auth-failure metric filter\n public readonly logGroup?: aws_logs.LogGroup;\n\n constructor(scope: Construct, id: string, props: QpqAccountCloudTrailConstructProps) {\n super(scope, id, props);\n\n const {\n name,\n retentionDays = 365,\n enableLogFileValidation = true,\n multiRegion = true,\n includeGlobalServiceEvents = true,\n cloudWatchLogs,\n } = props.cloudTrailConfig;\n\n const accountId = qpqConfigAwsUtils.getApplicationModuleDeployAccountId(props.qpqConfig);\n const region = qpqConfigAwsUtils.getApplicationModuleDeployRegion(props.qpqConfig);\n\n const bucket = new aws_s3.Bucket(this, 'logs', {\n bucketName: `qpq-cloudtrail-${accountId}-${region}-${name}`,\n blockPublicAccess: aws_s3.BlockPublicAccess.BLOCK_ALL,\n encryption: aws_s3.BucketEncryption.S3_MANAGED,\n enforceSSL: true,\n removalPolicy: cdk.RemovalPolicy.RETAIN,\n lifecycleRules: [{ expiration: cdk.Duration.days(retentionDays) }],\n });\n\n this.logGroup = cloudWatchLogs\n ? new aws_logs.LogGroup(this, 'log-group', {\n logGroupName: `/qpq/cloudtrail/${name}`,\n retention: resolveLogRetention(cloudWatchLogs.retentionDays),\n removalPolicy: cdk.RemovalPolicy.DESTROY,\n })\n : undefined;\n\n new aws_cloudtrail.Trail(this, 'trail', {\n trailName: `${name}-trail`,\n bucket,\n enableFileValidation: enableLogFileValidation,\n isMultiRegionTrail: multiRegion,\n includeGlobalServiceEvents,\n sendToCloudWatchLogs: !!this.logGroup,\n cloudWatchLogGroup: this.logGroup,\n });\n }\n}\n"]}
@@ -59,3 +59,4 @@ class QpqAccountSecurityServicesConstruct extends QpqConstructBlock_1.QpqConstru
59
59
  }
60
60
  }
61
61
  exports.QpqAccountSecurityServicesConstruct = QpqAccountSecurityServicesConstruct;
62
+ //# sourceMappingURL=QpqAccountSecurityServicesConstruct.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QpqAccountSecurityServicesConstruct.js","sourceRoot":"","sources":["../../../../../src/constructs/feature/account/QpqAccountSecurityServicesConstruct.ts"],"names":[],"mappings":";;;AAEA,6CASqB;AAGrB,oEAAyF;AASzF,yFAAyF;AACzF,uFAAuF;AACvF,wDAAwD;AACxD,MAAa,mCAAoC,SAAQ,qCAAiB;IACxE,YAAY,KAAgB,EAAE,EAAU,EAAE,KAA+C;;QACvF,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;QAExB,IAAI,KAAK,CAAC,sBAAsB,CAAC,eAAe,EAAE,CAAC;YACjD,IAAI,2BAAa,CAAC,WAAW,CA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AK,CAAC,CAAC,CAAC;YACjF,CAAC,CAAC,CAAC;YAEH,MAAM,KAAK,GAAG,IAAI,4BAAc,CAAC,KAAK,CAAC,IAAI,EAAE,4BAA4B,EAAE;gBACzE,SAAS,EAAE,mCAAmC;gBAC9C,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC;oBAC1B,SAAS,EAAE,KAAK;oBAChB,MAAM,EAAE,sBAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;iBAC5B,CAAC;gBACF,SAAS,EAAE,MAAA,uBAAuB,CAAC,oBAAoB,mCAAI,EAAE;gBAC7D,kBAAkB,EAAE,4BAAc,CAAC,kBAAkB,CAAC,kCAAkC;gBACxF,iBAAiB,EAAE,CAAC;gBACpB,mEAAmE;gBACnE,gBAAgB,EAAE,4BAAc,CAAC,gBAAgB,CAAC,aAAa;aAChE,CAAC,CAAC;YACH,KAAK,CAAC,cAAc,CAAC,IAAI,oCAAsB,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;CACF;AA3DD,kFA2DC","sourcesContent":["import { AccountSecurityServicesQPQConfigSetting } from 'quidproquo-config-aws';\n\nimport {\n aws_cloudwatch,\n aws_cloudwatch_actions,\n aws_guardduty,\n aws_logs,\n aws_securityhub,\n aws_sns,\n aws_sns_subscriptions,\n Duration,\n} from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\n\nimport { QpqConstructBlock, QpqConstructBlockProps } from '../../base/QpqConstructBlock';\n\nexport interface QpqAccountSecurityServicesConstructProps extends QpqConstructBlockProps {\n securityServicesConfig: AccountSecurityServicesQPQConfigSetting;\n\n /** The account CloudTrail's CloudWatch log group - required for cognitoAuthFailureAlert. */\n cloudTrailLogGroup?: aws_logs.ILogGroup;\n}\n\n// GuardDuty detectors and Security Hub hubs are one-per-account+region, which is exactly\n// why they live in the account stack rather than any app's bootstrap - an app teardown\n// must not take the account's threat detection with it.\nexport class QpqAccountSecurityServicesConstruct extends QpqConstructBlock {\n constructor(scope: Construct, id: string, props: QpqAccountSecurityServicesConstructProps) {\n super(scope, id, props);\n\n if (props.securityServicesConfig.enableGuardDuty) {\n new aws_guardduty.CfnDetector(this, 'guardduty-detector', {\n enable: true,\n });\n }\n\n if (props.securityServicesConfig.enableSecurityHub) {\n // Security Hub's compliance standards require AWS Config recording, which bills per\n // configuration item recorded - enabling this is a deliberate cost decision\n new aws_securityhub.CfnHub(this, 'security-hub');\n }\n\n // Credential stuffing hitting Cognito directly (bypassing the apis) shows up as\n // cognito-idp NotAuthorizedException events in CloudTrail - alert by email when the\n // failure rate spikes. (Failed logins through qpq routes are covered separately by\n // the per-api 401-rate alarms.)\n const cognitoAuthFailureAlert = props.securityServicesConfig.cognitoAuthFailureAlert;\n if (cognitoAuthFailureAlert) {\n if (!props.cloudTrailLogGroup) {\n throw new Error('cognitoAuthFailureAlert requires a defineAccountCloudTrail with cloudWatchLogs enabled');\n }\n\n const metricFilter = new aws_logs.MetricFilter(this, 'cognito-auth-failure-filter', {\n logGroup: props.cloudTrailLogGroup,\n filterPattern: aws_logs.FilterPattern.all(\n aws_logs.FilterPattern.stringValue('$.eventSource', '=', 'cognito-idp.amazonaws.com'),\n aws_logs.FilterPattern.stringValue('$.errorCode', '=', 'NotAuthorizedException'),\n ),\n metricNamespace: 'qpq/security',\n metricName: 'cognito-auth-failures',\n metricValue: '1',\n });\n\n const alertTopic = new aws_sns.Topic(this, 'security-alerts-topic', {\n topicName: 'qpq-account-security-alerts',\n });\n cognitoAuthFailureAlert.emails.forEach((email) => {\n alertTopic.addSubscription(new aws_sns_subscriptions.EmailSubscription(email));\n });\n\n const alarm = new aws_cloudwatch.Alarm(this, 'cognito-auth-failure-alarm', {\n alarmName: 'qpq-account-cognito-auth-failures',\n metric: metricFilter.metric({\n statistic: 'Sum',\n period: Duration.minutes(5),\n }),\n threshold: cognitoAuthFailureAlert.thresholdPer5Minutes ?? 10,\n comparisonOperator: aws_cloudwatch.ComparisonOperator.GREATER_THAN_OR_EQUAL_TO_THRESHOLD,\n evaluationPeriods: 1,\n // No sign-in attempts = no datapoints - that is not an alarm state\n treatMissingData: aws_cloudwatch.TreatMissingData.NOT_BREACHING,\n });\n alarm.addAlarmAction(new aws_cloudwatch_actions.SnsAction(alertTopic));\n }\n }\n}\n"]}
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./QpqAccountBudgetConstruct"), exports);
18
18
  __exportStar(require("./QpqAccountCloudTrailConstruct"), exports);
19
19
  __exportStar(require("./QpqAccountSecurityServicesConstruct"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/constructs/feature/account/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,kEAAgD;AAChD,wEAAsD","sourcesContent":["export * from './QpqAccountBudgetConstruct';\nexport * from './QpqAccountCloudTrailConstruct';\nexport * from './QpqAccountSecurityServicesConstruct';\n"]}
@@ -82,3 +82,4 @@ class QpqConfigAwsAlarmConstruct extends QpqConstructBlock_1.QpqConstructBlock {
82
82
  }
83
83
  }
84
84
  exports.QpqConfigAwsAlarmConstruct = QpqConfigAwsAlarmConstruct;
85
+ //# sourceMappingURL=QpqConfigAwsAlarm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QpqConfigAwsAlarm.js","sourceRoot":"","sources":["../../../../../../src/constructs/feature/config/alarm/QpqConfigAwsAlarm.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAmF;AAEnF,6CAAqE;AACrE,iDAAmC;AAGnC,uEAA4F;AAC5F,qCAAsD;AAMtD,SAAS,oCAAoC,CAAC,QAA0B;IACtE,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,wCAAgB,CAAC,oBAAoB;YACxC,OAAO,4BAAc,CAAC,kBAAkB,CAAC,sBAAsB,CAAC;QAClE,KAAK,wC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;QAEH,MAAA,aAAa,CAAC,OAAO,CAAC,iBAAiB,0CAAE,OAAO,CAAC,CAAC,YAAY,EAAE,EAAE;YAChE,MAAM,QAAQ,GAAG,+BAAwB,CAAC,cAAc,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;YAE3G,KAAK,CAAC,cAAc,CAAC,IAAI,oCAAsB,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7E,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AA9BD,gEA8BC","sourcesContent":["import { AwsAlarmOperator, AwsAlarmQPQConfigSetting } from 'quidproquo-config-aws';\n\nimport { aws_cloudwatch, aws_cloudwatch_actions } from 'aws-cdk-lib';\nimport * as cdk from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\n\nimport { QpqConstructBlock, QpqConstructBlockProps } from '../../../base/QpqConstructBlock';\nimport { QpqCoreEventBusConstruct } from '../../core';\n\nexport interface QpqConfigAwsAlarmConstructProps extends QpqConstructBlockProps {\n alarmConfig: AwsAlarmQPQConfigSetting;\n}\n\nfunction AwsAlarmOperatorToComparisonOperator(operator: AwsAlarmOperator): aws_cloudwatch.ComparisonOperator {\n switch (operator) {\n case AwsAlarmOperator.GreaterThanThreshold:\n return aws_cloudwatch.ComparisonOperator.GREATER_THAN_THRESHOLD;\n case AwsAlarmOperator.GreaterThanOrEqualToThreshold:\n return aws_cloudwatch.ComparisonOperator.GREATER_THAN_OR_EQUAL_TO_THRESHOLD;\n case AwsAlarmOperator.LessThanThreshold:\n return aws_cloudwatch.ComparisonOperator.LESS_THAN_THRESHOLD;\n case AwsAlarmOperator.LessThanOrEqualToThreshold:\n return aws_cloudwatch.ComparisonOperator.LESS_THAN_OR_EQUAL_TO_THRESHOLD;\n default:\n throw new Error('Invalid AwsAlarmOperator value');\n }\n}\n\nexport class QpqConfigAwsAlarmConstruct extends QpqConstructBlock {\n constructor(scope: Construct, id: string, props: QpqConfigAwsAlarmConstructProps) {\n super(scope, id, props);\n\n // The alarm is built entirely from the shared BaseAwsAlarmQPQConfigSetting\n // fields, so it is namespace-agnostic — Lambda, ApiGateway, DynamoDb and Sqs\n // (and any future namespace) are all supported via the config's namespace +\n // metricName pair, no per-namespace branching required.\n const alarmSettings = props.alarmConfig.alarmSettings;\n\n const alarm = new aws_cloudwatch.Alarm(this, props.alarmConfig.uniqueKey, {\n alarmName: this.resourceName(props.alarmConfig.name),\n metric: new aws_cloudwatch.Metric({\n namespace: alarmSettings.namespace,\n metricName: alarmSettings.metricName,\n statistic: alarmSettings.statistic,\n period: cdk.Duration.seconds(alarmSettings.period),\n }),\n threshold: alarmSettings.threshold,\n comparisonOperator: AwsAlarmOperatorToComparisonOperator(alarmSettings.operator),\n datapointsToAlarm: alarmSettings.datapointsToAlarm,\n evaluationPeriods: alarmSettings.evaluationPeriodsToAlarm,\n });\n\n alarmSettings.onAlarm.publishToEventBus?.forEach((eventBusName) => {\n const eventBus = QpqCoreEventBusConstruct.fromOtherStack(scope, 'eventBus', props.qpqConfig, eventBusName);\n\n alarm.addAlarmAction(new aws_cloudwatch_actions.SnsAction(eventBus.topic));\n });\n }\n}\n"]}
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./QpqConfigAwsAlarm"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/constructs/feature/config/alarm/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC","sourcesContent":["export * from './QpqConfigAwsAlarm';\n"]}
@@ -216,3 +216,4 @@ class QpqConfigAwsDashboardConstruct extends QpqConstructBlock_1.QpqConstructBlo
216
216
  }
217
217
  }
218
218
  exports.QpqConfigAwsDashboardConstruct = QpqConfigAwsDashboardConstruct;
219
+ //# sourceMappingURL=QpqConfigAwsDashboardConstruct.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QpqConfigAwsDashboardConstruct.js","sourceRoot":"","sources":["../../../../../../src/constructs/feature/config/dashboard/QpqConfigAwsDashboardConstruct.ts"],"names":[],"mappings":";;;AAAA,+FAAsE;AACtE,iEAA+F;AAC/F,qDAA0D;AAC1D,+DAAyD;AAEzD,6CAAuD;AAGvD,+EAA+E;AAC/E,6BAA6B;AAC7B,yFAAuF;AACvF,uEAA4F;AAC5F,2FAAwF;AAMxF,MAAM,YAAY,GAAG,sBAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAEzC,yFAAyF;AACzF,yFAAyF;AACzF,qFAAqF;AACrF,iFAAiF;AACjF,MAAM,6BAA6B,GAAG,CAAC,SAAoB,EAAY,EAAE;IACvE,MAAM,SAAS,GAAG;QAChB,GAAG,wCAAiB,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,OAAO,QAAQ,CAAC;QAClF,GAAG,wCAAiB,CAAC,wBAAwB,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,eAAe,EAAE,EAAE,CAAC,GAAG,eAAe,CAAC,YAAY,QAAQ,CAAC;QAC1H,GAAG,8BAAY,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,SAAS,QAAQ,CAAC;QAC/E,GAAG,8BAAY,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,GAAG,QAAQ,CAAC,SAAS,KAAK,CAAC;QAC/F,GAAG,wCAAiB,CAAC,yBAAyB,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,GAAG,SAAS,CAAC,OAAO,KAAK,CAAC;KACxG,CAAC;IAE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AAC,MAAM,CAAC;gBACxB,SAAS,EAAE,WAAW;gBACtB,UAAU;gBACV,aAAa,EAAE;oBACb,MAAM,EAAE,oBAAoB,8BAAY,CAAC,kBAAkB,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,8BAAY,CAAC,+BAA+B,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;oBAC/I,MAAM,EAAE,yCAAiB,CAAC,gCAAgC,CAAC,KAAK,CAAC,SAAS,CAAC;oBAC3E,IAAI,EAAE,KAAK;iBACZ;gBACD,SAAS,EAAE,KAAK;gBAChB,MAAM,EAAE,YAAY;gBACpB,KAAK,EAAE,UAAU;aAClB,CAAC,CAAC;YAEL,SAAS,CAAC,UAAU,CAClB,IAAI,4BAAc,CAAC,WAAW,CAAC;gBAC7B,KAAK,EAAE,0BAA0B;gBACjC,KAAK,EAAE,EAAE;gBACT,IAAI,EAAE,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;aACnE,CAAC,CACH,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AAnND,wEAmNC","sourcesContent":["import { awsNamingUtils } from 'quidproquo-actionprocessor-awslambda';\nimport { AwsServiceDashboardQPQConfigSetting, qpqConfigAwsUtils } from 'quidproquo-config-aws';\nimport { QPQConfig, qpqCoreUtils } from 'quidproquo-core';\nimport { qpqWebServerUtils } from 'quidproquo-webserver';\n\nimport { aws_cloudwatch, Duration } from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\n\n// Imported by direct path (not the barrel) for the same import-cycle reason as\n// createDefaultResourceAlarm\nimport { getNotifyErrorEventBusNames } from '../../../base/createDefaultResourceAlarm';\nimport { QpqConstructBlock, QpqConstructBlockProps } from '../../../base/QpqConstructBlock';\nimport { QpqCoreEventBusConstruct } from '../../core/eventBus/QpqCoreEventBusConstruct';\n\nexport interface QpqConfigAwsDashboardConstructProps extends QpqConstructBlockProps {\n dashboardConfig: AwsServiceDashboardQPQConfigSetting;\n}\n\nconst FIVE_MINUTES = Duration.minutes(5);\n\n// The service lambdas worth watching operationally (api routes, service functions, queue\n// consumers, schedules, websocket handlers). Infra lambdas (deploy events, storage-drive\n// triggers, user-directory triggers, SEO/edge) are deliberately excluded to keep the\n// dashboard focused. All names are config-derived - no construct handles needed.\nconst getServiceLambdaFunctionNames = (qpqConfig: QPQConfig): string[] => {\n const baseNames = [\n ...qpqWebServerUtils.getApiConfigs(qpqConfig).map((api) => `${api.apiName}-route`),\n ...qpqWebServerUtils.getOwnedServiceFunctions(qpqConfig).map((serviceFunction) => `${serviceFunction.functionName}-sfunc`),\n ...qpqCoreUtils.getQueues(qpqConfig).map((queue) => `${queue.uniqueKey}-queue`),\n ...qpqCoreUtils.getOwnedScheduleEvents(qpqConfig).map((schedule) => `${schedule.uniqueKey}-SE`),\n ...qpqWebServerUtils.getOwnedWebsocketSettings(qpqConfig).map((websocket) => `${websocket.apiName}-ws`),\n ];\n\n return baseNames.map((name) => awsNamingUtils.getConfigRuntimeResourceNameFromConfig(name, qpqConfig));\n};\n\nconst lambdaMetric = (metricName: string, functionName: string, statistic: string): aws_cloudwatch.Metric =>\n new aws_cloudwatch.Metric({\n namespace: 'AWS/Lambda',\n metricName,\n dimensionsMap: { FunctionName: functionName },\n statistic,\n period: FIVE_MINUTES,\n label: functionName,\n });\n\n// A per-service operational dashboard built purely from config-derived resource names,\n// plus anomaly detection: detector models (free) on api latency and lambda duration power\n// the band widgets, and api latency anomaly alarms route via defineNotifyError (same\n// opt-in + targets as createDefaultResourceAlarm). Websocket apis are absent - their\n// metrics dimension on the AWS-generated ApiId, which is unknowable from config.\nexport class QpqConfigAwsDashboardConstruct extends QpqConstructBlock {\n constructor(scope: Construct, id: string, props: QpqConfigAwsDashboardConstructProps) {\n super(scope, id, props);\n\n const anomalyDetectionEnabled = !props.dashboardConfig.disableAnomalyDetection;\n\n const dashboard = new aws_cloudwatch.Dashboard(this, 'dashboard', {\n dashboardName: this.resourceName('dashboard'),\n });\n\n // Api row\n qpqWebServerUtils.getApiConfigs(props.qpqConfig).forEach((apiConfig) => {\n const apiName = this.resourceName(`${apiConfig.apiName}-rest-api`);\n\n const apiMetric = (metricName: string, statistic: string, label?: string): aws_cloudwatch.Metric =>\n new aws_cloudwatch.Metric({\n namespace: 'AWS/ApiGateway',\n metricName,\n dimensionsMap: { ApiName: apiName },\n statistic,\n period: FIVE_MINUTES,\n label: label || metricName,\n });\n\n const averageLatency = apiMetric('Latency', 'Average', 'Latency (avg)');\n\n dashboard.addWidgets(\n new aws_cloudwatch.GraphWidget({\n title: `${apiConfig.apiName} api - requests and errors`,\n width: 12,\n left: [apiMetric('Count', 'Sum'), apiMetric('4XXError', 'Sum'), apiMetric('5XXError', 'Sum')],\n }),\n new aws_cloudwatch.GraphWidget({\n title: `${apiConfig.apiName} api - latency`,\n width: 12,\n left: [\n apiMetric('Latency', 'p50', 'Latency p50'),\n apiMetric('Latency', 'p95', 'Latency p95'),\n apiMetric('Latency', 'p99', 'Latency p99'),\n ...(anomalyDetectionEnabled\n ? [\n new aws_cloudwatch.MathExpression({\n expression: 'ANOMALY_DETECTION_BAND(latencyAvg, 2)',\n usingMetrics: { latencyAvg: averageLatency },\n label: 'Latency expected band',\n period: FIVE_MINUTES,\n }),\n ]\n : []),\n ],\n }),\n );\n\n if (anomalyDetectionEnabled) {\n new aws_cloudwatch.CfnAnomalyDetector(this, `latency-anomaly-detector-${apiConfig.apiName}`, {\n namespace: 'AWS/ApiGateway',\n metricName: 'Latency',\n stat: 'Average',\n dimensions: [{ name: 'ApiName', value: apiName }],\n });\n\n // Anomaly alarm needs the L1 (the L2 Alarm has no thresholdMetricId). Gated and\n // routed like createDefaultResourceAlarm: no-op without a defineNotifyError.\n if (qpqCoreUtils.getNotifyErrorConfigs(props.qpqConfig).length > 0) {\n const alarmActionTopicArns = getNotifyErrorEventBusNames(props.qpqConfig).map(\n (busName) =>\n QpqCoreEventBusConstruct.fromOtherStack(this, `latency-anomaly-bus-${apiConfig.apiName}-${busName}`, props.qpqConfig, busName).topic\n .topicArn,\n );\n\n new aws_cloudwatch.CfnAlarm(this, `latency-anomaly-alarm-${apiConfig.apiName}`, {\n alarmName: this.resourceName(`${apiConfig.apiName}-latency-anomaly`),\n comparisonOperator: 'GreaterThanUpperThreshold',\n thresholdMetricId: 'ad1',\n evaluationPeriods: 3,\n datapointsToAlarm: 3,\n metrics: [\n {\n id: 'm1',\n metricStat: {\n metric: {\n namespace: 'AWS/ApiGateway',\n metricName: 'Latency',\n dimensions: [{ name: 'ApiName', value: apiName }],\n },\n period: 300,\n stat: 'Average',\n },\n returnData: true,\n },\n {\n id: 'ad1',\n expression: 'ANOMALY_DETECTION_BAND(m1, 2)',\n returnData: true,\n },\n ],\n alarmActions: alarmActionTopicArns,\n });\n }\n }\n });\n\n // Lambda row\n const functionNames = getServiceLambdaFunctionNames(props.qpqConfig);\n if (functionNames.length > 0) {\n dashboard.addWidgets(\n new aws_cloudwatch.GraphWidget({\n title: 'lambda - invocations',\n width: 6,\n left: functionNames.map((name) => lambdaMetric('Invocations', name, 'Sum')),\n }),\n new aws_cloudwatch.GraphWidget({\n title: 'lambda - errors',\n width: 6,\n left: functionNames.map((name) => lambdaMetric('Errors', name, 'Sum')),\n }),\n new aws_cloudwatch.GraphWidget({\n title: 'lambda - duration (avg)',\n width: 6,\n left: functionNames.map((name) => lambdaMetric('Duration', name, 'Average')),\n }),\n new aws_cloudwatch.GraphWidget({\n title: 'lambda - concurrent executions',\n width: 6,\n left: functionNames.map((name) => lambdaMetric('ConcurrentExecutions', name, 'Maximum')),\n }),\n );\n\n if (anomalyDetectionEnabled) {\n // Detector models are free - they power expected-value bands on the duration metrics\n functionNames.forEach((functionName, index) => {\n new aws_cloudwatch.CfnAnomalyDetector(this, `duration-anomaly-detector-${index}`, {\n namespace: 'AWS/Lambda',\n metricName: 'Duration',\n stat: 'Average',\n dimensions: [{ name: 'FunctionName', value: functionName }],\n });\n });\n }\n }\n\n // Data row\n const tableWidgets = qpqCoreUtils.getOwnedKeyValueStores(props.qpqConfig).map((kvsConfig) => {\n const tableName = this.qpqResourceName(kvsConfig.keyValueStoreName, 'kvs');\n\n const tableMetric = (metricName: string, label: string): aws_cloudwatch.Metric =>\n new aws_cloudwatch.Metric({\n namespace: 'AWS/DynamoDB',\n metricName,\n dimensionsMap: { TableName: tableName },\n statistic: 'Sum',\n period: FIVE_MINUTES,\n label,\n });\n\n return new aws_cloudwatch.GraphWidget({\n title: `${kvsConfig.keyValueStoreName} table`,\n width: 6,\n left: [tableMetric('ReadThrottleEvents', 'read throttles'), tableMetric('WriteThrottleEvents', 'write throttles')],\n right: [tableMetric('ConsumedReadCapacityUnits', 'read capacity'), tableMetric('ConsumedWriteCapacityUnits', 'write capacity')],\n });\n });\n\n const queueWidgets = qpqCoreUtils.getQueues(props.qpqConfig).map((queueConfig) => {\n const queueMetric = (queueName: string, metricName: string, label: string): aws_cloudwatch.Metric =>\n new aws_cloudwatch.Metric({\n namespace: 'AWS/SQS',\n metricName,\n dimensionsMap: { QueueName: this.resourceName(queueName) },\n statistic: 'Maximum',\n period: FIVE_MINUTES,\n label,\n });\n\n return new aws_cloudwatch.GraphWidget({\n title: `${queueConfig.name} queue`,\n width: 6,\n left: [queueMetric(queueConfig.name, 'ApproximateAgeOfOldestMessage', 'oldest message age (s)')],\n right: [queueMetric(`${queueConfig.name}-dead`, 'ApproximateNumberOfMessagesVisible', 'dead letter messages')],\n });\n });\n\n if (tableWidgets.length > 0 || queueWidgets.length > 0) {\n dashboard.addWidgets(...tableWidgets, ...queueWidgets);\n }\n\n // Waf row (regional acl protecting the apis - shared per app+environment)\n if (qpqConfigAwsUtils.isWafProtectionEnabled(props.qpqConfig)) {\n const wafMetric = (metricName: string): aws_cloudwatch.Metric =>\n new aws_cloudwatch.Metric({\n namespace: 'AWS/WAFV2',\n metricName,\n dimensionsMap: {\n WebACL: `qpq-waf-regional-${qpqCoreUtils.getApplicationName(props.qpqConfig)}-${qpqCoreUtils.getApplicationModuleEnvironment(props.qpqConfig)}`,\n Region: qpqConfigAwsUtils.getApplicationModuleDeployRegion(props.qpqConfig),\n Rule: 'ALL',\n },\n statistic: 'Sum',\n period: FIVE_MINUTES,\n label: metricName,\n });\n\n dashboard.addWidgets(\n new aws_cloudwatch.GraphWidget({\n title: 'waf - allowed vs blocked',\n width: 12,\n left: [wafMetric('AllowedRequests'), wafMetric('BlockedRequests')],\n }),\n );\n }\n }\n}\n"]}
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./QpqConfigAwsDashboardConstruct"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/constructs/feature/config/dashboard/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mEAAiD","sourcesContent":["export * from './QpqConfigAwsDashboardConstruct';\n"]}
@@ -18,3 +18,4 @@ __exportStar(require("./alarm"), exports);
18
18
  __exportStar(require("./dashboard"), exports);
19
19
  __exportStar(require("./organization"), exports);
20
20
  __exportStar(require("./waf"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/constructs/feature/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,8CAA4B;AAC5B,iDAA+B;AAC/B,wCAAsB","sourcesContent":["export * from './alarm';\nexport * from './dashboard';\nexport * from './organization';\nexport * from './waf';\n"]}
@@ -38,3 +38,4 @@ class QpqBootstrapConfigAwsOrganizationConstruct extends QpqConstructBlock_1.Qpq
38
38
  }
39
39
  }
40
40
  exports.QpqBootstrapConfigAwsOrganizationConstruct = QpqBootstrapConfigAwsOrganizationConstruct;
41
+ //# sourceMappingURL=QpqBootstrapConfigAwsOrganization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QpqBootstrapConfigAwsOrganization.js","sourceRoot":"","sources":["../../../../../../src/constructs/feature/config/organization/QpqBootstrapConfigAwsOrganization.ts"],"names":[],"mappings":";;;AAGA,6CAAkE;AAGlE,uEAA4F;AAM5F,SAAS,kBAAkB,CAAC,gBAAwB,EAAE,OAAe,EAAE,WAAmB;IACxF,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC,GAAG,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7D,MAAM,CAAC,eAAe,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE/C,OAAO,GAAG,eAAe,IAAI,OAAO,IAAI,WAAW,IAAI,WAAW,EAAE,CAAC;AACvE,CAAC;AAED,MAAa,0CAA2C,SAAQ,qCAAiB;IAC/E,YAAY,KAAgB,EAAE,EAAU,EAAE,KAAsD;QAC9F,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;QAExB,MAAM,EAAE,gBAAgB,EAAE,YAAY,EAAE,gBAAgB,EAAE,GAAG,KAAK,CAAC,qBAAqB,CAAC;QAEzF,4DAA4D;QAC5D,MAAM,kBAAkB,GAAG,IAAI,+BAAiB,CAAC,qBAAqB,CAAC,IAAI,EAAE,oBAAoB,EAAE;YACjG,IAAI,EAAE,gBAAgB;YACtB,QAAQ,EAAE,KAAK,CAAC,qBAAqB,CAAC,2BAA2B;SAClE,CAAC,CAAC;QAEH,qEAAqE;QACrE,MAAM,QAAQ,GAAqD,EAAE,CAAC;QACtE,YAAY,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;YACnC,QAAQ,CAAC,WAAW,CAAC,GAAG,IAAI,+BAAiB,CAAC,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE;gBAC1E,WAAW,EAAE,GAAG,gBAAgB,IAAI,WAAW,EAAE;gBACjD,KAAK,EAAE,kBAAkB,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,WAAW,CAAC;gBAC1E,QAAQ,EAAE,WAAW,WAAW,aAAa;gBAC7C,SAAS,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAAC;aACvC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,kCAAkC;QAClC,0FAA0F;QAC1F,yBAAyB;QACzB,gDAAgD;QAChD,mGAAmG;QACnG,sEAAsE;QACtE,8BAA8B;QAC9B,MAAM;IACR,CAAC;CACF;AAhCD,gGAgCC","sourcesContent":["import { AwsOrganizationQPQConfigSetting } from 'quidproquo-config-aws';\n\nimport * as cdk from 'aws-cdk-lib';\nimport { aws_iam, aws_organizations, aws_sso } from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\n\nimport { QpqConstructBlock, QpqConstructBlockProps } from '../../../base/QpqConstructBlock';\n\nexport interface QpqBootstrapConfigAwsOrganizationConstructProps extends QpqConstructBlockProps {\n awsOrganizationConfig: AwsOrganizationQPQConfigSetting;\n}\n\nfunction getEmailForAccount(baseEmailAddress: string, orgName: string, accountName: string): string {\n const [mainEmail, domainEmail] = baseEmailAddress.split('@');\n const [mainEmailNoPlus] = mainEmail.split('@');\n\n return `${mainEmailNoPlus}+${orgName}-${accountName}@${domainEmail}`;\n}\n\nexport class QpqBootstrapConfigAwsOrganizationConstruct extends QpqConstructBlock {\n constructor(scope: Construct, id: string, props: QpqBootstrapConfigAwsOrganizationConstructProps) {\n super(scope, id, props);\n\n const { organizationName, accountNames, baseEmailAddress } = props.awsOrganizationConfig;\n\n // Create an Organizational Unit (OU) under the Organization\n const organizationalUnit = new aws_organizations.CfnOrganizationalUnit(this, 'OrganizationalUnit', {\n name: organizationName,\n parentId: props.awsOrganizationConfig.rootAwsOrganizationalUnitId,\n });\n\n // Create AWS accounts and place them in the Organizational Unit (OU)\n const accounts: { [name: string]: aws_organizations.CfnAccount } = {};\n accountNames.forEach((accountName) => {\n accounts[accountName] = new aws_organizations.CfnAccount(this, accountName, {\n accountName: `${organizationName}-${accountName}`,\n email: getEmailForAccount(baseEmailAddress, organizationName, accountName),\n roleName: `account-${accountName}-AccessRole`,\n parentIds: [organizationalUnit.attrId],\n });\n });\n\n // // Create the admin permissions\n // const adminPermissionSet = new aws_sso.CfnPermissionSet(this, 'admin-permission-set', {\n // name: 'AdminAccess',\n // description: 'Admin access permission set',\n // instanceArn: `arn:aws:sso:::instance/${props.awsOrganizationConfig.identityCenterInstanceId}`,\n // managedPolicies: ['arn:aws:iam::aws:policy/AdministratorAccess'],\n // sessionDuration: 'PT12H',\n // });\n }\n}\n"]}
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./QpqBootstrapConfigAwsOrganization"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/constructs/feature/config/organization/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sEAAoD","sourcesContent":["export * from './QpqBootstrapConfigAwsOrganization';\n"]}
@@ -33,3 +33,4 @@ class QpqBootstrapConfigWafConstruct extends QpqConstructBlock_1.QpqConstructBlo
33
33
  }
34
34
  }
35
35
  exports.QpqBootstrapConfigWafConstruct = QpqBootstrapConfigWafConstruct;
36
+ //# sourceMappingURL=QpqBootstrapConfigWafConstruct.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QpqBootstrapConfigWafConstruct.js","sourceRoot":"","sources":["../../../../../../src/constructs/feature/config/waf/QpqBootstrapConfigWafConstruct.ts"],"names":[],"mappings":";;;AAAA,iEAAwF;AACxF,qDAA+C;AAE/C,6CAAiD;AAGjD,uEAA4F;AAC5F,yCAA8C;AAM9C,wFAAwF;AACxF,0FAA0F;AAC1F,sFAAsF;AACtF,wCAAwC;AACxC,MAAa,8BAA+B,SAAQ,qCAAiB;IACnE,YAAY,KAAgB,EAAE,EAAU,EAAE,KAA0C;QAClF,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;QAExB,MAAM,WAAW,GAAG,8BAAY,CAAC,kBAAkB,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACrE,MAAM,WAAW,GAAG,8BAAY,CAAC,+BAA+B,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAElF,MAAM,MAAM,GAAG,IAAI,uBAAS,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE;YACtD,IAAI,EAAE,oBAAoB,WAAW,IAAI,WAAW,EAAE;YACtD,KAAK,EAAE,UAAU;YACjB,aAAa,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;YAC5B,KAAK,EAAE,IAAA,2BAAgB,EAAC,KAAK,CAAC,SAAS,CAAC;YACxC,gBAAgB,EAAE;gBAChB,wBAAwB,EAAE,IAAI;gBAC9B,UAAU,EAAE,oBAAoB,WAAW,IAAI,WAAW,EAAE;gBAC5D,sBAAsB,EAAE,IAAI;aAC7B;SACF,CAAC,CAAC;QAEH,IAAI,qBAAO,CAAC,eAAe,CAAC,IAAI,EAAE,mBAAmB,EAAE;YACrD,aAAa,EAAE,yCAAiB,CAAC,+BAA+B,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;YAC7F,WAAW,EAAE,MAAM,CAAC,OAAO;SAC5B,CAAC,CAAC;IACL,CAAC;CACF;AAxBD,wEAwBC","sourcesContent":["import { BootstrapWafQPQConfigSetting, qpqConfigAwsUtils } from 'quidproquo-config-aws';\nimport { qpqCoreUtils } from 'quidproquo-core';\n\nimport { aws_ssm, aws_wafv2 } from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\n\nimport { QpqConstructBlock, QpqConstructBlockProps } from '../../../base/QpqConstructBlock';\nimport { buildWebAclRules } from './wafRules';\n\nexport interface QpqBootstrapConfigWafConstructProps extends QpqConstructBlockProps {\n wafConfig: BootstrapWafQPQConfigSetting;\n}\n\n// The REGIONAL web acl protecting api gateway stages. Each service's api stack attaches\n// itself via a WebACLAssociation, resolving the arn from the SSM parameter published here\n// (bootstrap always deploys before the api phase). The CLOUDFRONT-scope twin lives in\n// WafCloudFrontWebAclStack (us-east-1).\nexport class QpqBootstrapConfigWafConstruct extends QpqConstructBlock {\n constructor(scope: Construct, id: string, props: QpqBootstrapConfigWafConstructProps) {\n super(scope, id, props);\n\n const application = qpqCoreUtils.getApplicationName(props.qpqConfig);\n const environment = qpqCoreUtils.getApplicationModuleEnvironment(props.qpqConfig);\n\n const webAcl = new aws_wafv2.CfnWebACL(this, 'web-acl', {\n name: `qpq-waf-regional-${application}-${environment}`,\n scope: 'REGIONAL',\n defaultAction: { allow: {} },\n rules: buildWebAclRules(props.wafConfig),\n visibilityConfig: {\n cloudWatchMetricsEnabled: true,\n metricName: `qpq-waf-regional-${application}-${environment}`,\n sampledRequestsEnabled: true,\n },\n });\n\n new aws_ssm.StringParameter(this, 'web-acl-arn-param', {\n parameterName: qpqConfigAwsUtils.getWafWebAclArnSsmParameterName('regional', props.qpqConfig),\n stringValue: webAcl.attrArn,\n });\n }\n}\n"]}
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./QpqBootstrapConfigWafConstruct"), exports);
18
18
  __exportStar(require("./wafRules"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/constructs/feature/config/waf/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mEAAiD;AACjD,6CAA2B","sourcesContent":["export * from './QpqBootstrapConfigWafConstruct';\nexport * from './wafRules';\n"]}
@@ -62,3 +62,4 @@ const buildWebAclRules = (wafConfig) => {
62
62
  return [...rateLimitRules, ...managedRules];
63
63
  };
64
64
  exports.buildWebAclRules = buildWebAclRules;
65
+ //# sourceMappingURL=wafRules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wafRules.js","sourceRoot":"","sources":["../../../../../../src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AC;oBACE,kBAAkB,EAAE;wBAClB,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;wBAC7B,oBAAoB,EAAE,aAAa;wBACnC,YAAY,EAAE,SAAS,CAAC,iBAAiB;wBACzC,mBAAmB,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qBACrD;iBACF;gBACH,CAAC,CAAC,SAAS;SACd;KACF;IACD,gBAAgB,EAAE;QAChB,wBAAwB,EAAE,IAAI;QAC9B,UAAU,EAAE,cAAc,SAAS,CAAC,IAAI,EAAE;QAC1C,sBAAsB,EAAE,IAAI;KAC7B;CACF,CAAC,CAAC;AAEH,mFAAmF;AACnF,wEAAwE;AACjE,MAAM,gBAAgB,GAAG,CAAC,SAAuC,EAAsC,EAAE;IAC9G,MAAM,cAAc,GAAG,CAAC,SAAS,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,kBAAkB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;IAEpH,MAAM,YAAY,GAAG,CAAC,SAAS,CAAC,iBAAiB,IAAI,wBAAwB,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CACtG,yBAAyB,CAAC,SAAS,EAAE,cAAc,CAAC,MAAM,GAAG,KAAK,CAAC,CACpE,CAAC;IAEF,OAAO,CAAC,GAAG,cAAc,EAAE,GAAG,YAAY,CAAC,CAAC;AAC9C,CAAC,CAAC;AARW,QAAA,gBAAgB,oBAQ3B","sourcesContent":["import { BootstrapWafQPQConfigSetting, WafManagedRuleGroup, WafRateLimit } from 'quidproquo-config-aws';\n\nimport { aws_wafv2 } from 'aws-cdk-lib';\n\nconst managedRuleGroupVendorNames: Record<WafManagedRuleGroup, string> = {\n [WafManagedRuleGroup.common]: 'AWSManagedRulesCommonRuleSet',\n [WafManagedRuleGroup.knownBadInputs]: 'AWSManagedRulesKnownBadInputsRuleSet',\n [WafManagedRuleGroup.sqli]: 'AWSManagedRulesSQLiRuleSet',\n [WafManagedRuleGroup.ipReputation]: 'AWSManagedRulesAmazonIpReputationList',\n};\n\nconst defaultManagedRuleGroups: WafManagedRuleGroup[] = [WafManagedRuleGroup.common, WafManagedRuleGroup.knownBadInputs, WafManagedRuleGroup.sqli];\n\nconst buildManagedRuleGroupRule = (ruleGroup: WafManagedRuleGroup, priority: number): aws_wafv2.CfnWebACL.RuleProperty => {\n const vendorName = managedRuleGroupVendorNames[ruleGroup];\n\n return {\n name: vendorName,\n priority,\n overrideAction: { none: {} },\n statement: {\n managedRuleGroupStatement: {\n vendorName: 'AWS',\n name: vendorName,\n },\n },\n visibilityConfig: {\n cloudWatchMetricsEnabled: true,\n metricName: vendorName,\n sampledRequestsEnabled: true,\n },\n };\n};\n\nconst buildRateLimitRule = (rateLimit: WafRateLimit, priority: number): aws_wafv2.CfnWebACL.RuleProperty => ({\n name: `rate-limit-${rateLimit.name}`,\n priority,\n action: { block: {} },\n statement: {\n rateBasedStatement: {\n limit: rateLimit.limit,\n aggregateKeyType: 'IP',\n scopeDownStatement: rateLimit.uriPathStartsWith\n ? {\n byteMatchStatement: {\n fieldToMatch: { uriPath: {} },\n positionalConstraint: 'STARTS_WITH',\n searchString: rateLimit.uriPathStartsWith,\n textTransformations: [{ priority: 0, type: 'NONE' }],\n },\n }\n : undefined,\n },\n },\n visibilityConfig: {\n cloudWatchMetricsEnabled: true,\n metricName: `rate-limit-${rateLimit.name}`,\n sampledRequestsEnabled: true,\n },\n});\n\n// Shared by the REGIONAL and CLOUDFRONT web acls so both evaluate identical rules.\n// Rate limits run first (cheap counters), then the managed rule groups.\nexport const buildWebAclRules = (wafConfig: BootstrapWafQPQConfigSetting): aws_wafv2.CfnWebACL.RuleProperty[] => {\n const rateLimitRules = (wafConfig.rateLimits || []).map((rateLimit, index) => buildRateLimitRule(rateLimit, index));\n\n const managedRules = (wafConfig.managedRuleGroups || defaultManagedRuleGroups).map((ruleGroup, index) =>\n buildManagedRuleGroupRule(ruleGroup, rateLimitRules.length + index),\n );\n\n return [...rateLimitRules, ...managedRules];\n};\n"]}
@@ -15,3 +15,4 @@ class QpqCoreAiConstruct {
15
15
  }
16
16
  }
17
17
  exports.QpqCoreAiConstruct = QpqCoreAiConstruct;
18
+ //# sourceMappingURL=QpqCoreAiConstruct.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QpqCoreAiConstruct.js","sourceRoot":"","sources":["../../../../../../src/constructs/feature/core/ai/QpqCoreAiConstruct.ts"],"names":[],"mappings":";;;AAEA,6CAAsC;AAEtC,MAAa,kBAAkB;IACtB,MAAM,CAAC,uBAAuB,CAAC,IAAmB,EAAE,SAA+B;QACxF,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO;QACT,CAAC;QAED,IAAI,CAAC,oBAAoB,CACvB,IAAI,qBAAO,CAAC,eAAe,CAAC;YAC1B,MAAM,EAAE,qBAAO,CAAC,MAAM,CAAC,KAAK;YAC5B,OAAO,EAAE,CAAC,qBAAqB,EAAE,uCAAuC,CAAC;YACzE,SAAS,EAAE,CAAC,GAAG,CAAC;SACjB,CAAC,CACH,CAAC;IACJ,CAAC;CACF;AAdD,gDAcC","sourcesContent":["import { AiQPQConfigSetting } from 'quidproquo-core';\n\nimport { aws_iam } from 'aws-cdk-lib';\n\nexport class QpqCoreAiConstruct {\n public static authorizeActionsForRole(role: aws_iam.IRole, aiConfigs: AiQPQConfigSetting[]) {\n if (aiConfigs.length === 0) {\n return;\n }\n\n role.addToPrincipalPolicy(\n new aws_iam.PolicyStatement({\n effect: aws_iam.Effect.ALLOW,\n actions: ['bedrock:InvokeModel', 'bedrock:InvokeModelWithResponseStream'],\n resources: ['*'],\n }),\n );\n }\n}\n"]}
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./QpqCoreAiConstruct"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/constructs/feature/core/ai/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC","sourcesContent":["export * from './QpqCoreAiConstruct';\n"]}
@@ -239,3 +239,4 @@ class QpqInfCoreUserDirectoryConstruct extends QpqConstructBlock_1.QpqConstructB
239
239
  }
240
240
  }
241
241
  exports.QpqInfCoreUserDirectoryConstruct = QpqInfCoreUserDirectoryConstruct;
242
+ //# sourceMappingURL=QpqInfCoreUserDirectoryConstruct.js.map