@gradientedge/cdk-utils 4.6.2 → 4.6.6

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 (267) hide show
  1. package/app/api-destined-function/layers/nodejs/node_modules/.yarn-integrity +109 -0
  2. package/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/LICENSE +21 -0
  3. package/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/README.md +16 -0
  4. package/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/index.d.mts +10 -0
  5. package/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/index.d.ts +80 -0
  6. package/app/api-destined-function/layers/nodejs/node_modules/@types/uuid/package.json +54 -0
  7. package/app/api-destined-function/layers/nodejs/node_modules/uuid/LICENSE.md +9 -0
  8. package/app/api-destined-function/layers/nodejs/node_modules/uuid/README.md +505 -0
  9. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/bin/uuid +2 -0
  10. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/index.js +9 -0
  11. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/md5.js +215 -0
  12. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/nil.js +1 -0
  13. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/parse.js +35 -0
  14. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/regex.js +1 -0
  15. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/rng.js +19 -0
  16. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
  17. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/stringify.js +30 -0
  18. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v1.js +95 -0
  19. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v3.js +4 -0
  20. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v35.js +64 -0
  21. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v4.js +24 -0
  22. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/v5.js +4 -0
  23. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/validate.js +7 -0
  24. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-browser/version.js +11 -0
  25. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/index.js +9 -0
  26. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/md5.js +13 -0
  27. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/nil.js +1 -0
  28. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/parse.js +35 -0
  29. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/regex.js +1 -0
  30. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/rng.js +12 -0
  31. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/sha1.js +13 -0
  32. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/stringify.js +29 -0
  33. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v1.js +95 -0
  34. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v3.js +4 -0
  35. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v35.js +64 -0
  36. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v4.js +24 -0
  37. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/v5.js +4 -0
  38. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/validate.js +7 -0
  39. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/esm-node/version.js +11 -0
  40. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/index.js +79 -0
  41. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/md5-browser.js +223 -0
  42. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/md5.js +23 -0
  43. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/nil.js +8 -0
  44. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/parse.js +45 -0
  45. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/regex.js +8 -0
  46. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/rng-browser.js +26 -0
  47. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/rng.js +24 -0
  48. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/sha1-browser.js +104 -0
  49. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/sha1.js +23 -0
  50. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/stringify.js +39 -0
  51. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuid.min.js +1 -0
  52. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidNIL.min.js +1 -0
  53. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidParse.min.js +1 -0
  54. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidStringify.min.js +1 -0
  55. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidValidate.min.js +1 -0
  56. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidVersion.min.js +1 -0
  57. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv1.min.js +1 -0
  58. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv3.min.js +1 -0
  59. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv4.min.js +1 -0
  60. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/umd/uuidv5.min.js +1 -0
  61. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/uuid-bin.js +85 -0
  62. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v1.js +107 -0
  63. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v3.js +16 -0
  64. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v35.js +78 -0
  65. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v4.js +37 -0
  66. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/v5.js +16 -0
  67. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/validate.js +17 -0
  68. package/app/api-destined-function/layers/nodejs/node_modules/uuid/dist/version.js +21 -0
  69. package/app/api-destined-function/layers/nodejs/node_modules/uuid/package.json +135 -0
  70. package/app/api-destined-function/layers/nodejs/node_modules/uuid/wrapper.mjs +10 -0
  71. package/app/api-destined-function/layers/nodejs/package.json +29 -0
  72. package/dist/app/api-destined-function/src/lib/lambda.d.ts +0 -1
  73. package/dist/app/api-destined-function/src/lib/lambda.js +0 -1
  74. package/dist/index.d.ts +0 -1
  75. package/dist/index.js +0 -1
  76. package/dist/src/lib/common/construct.d.ts +0 -1
  77. package/dist/src/lib/common/construct.js +0 -1
  78. package/dist/src/lib/common/index.d.ts +0 -1
  79. package/dist/src/lib/common/index.js +0 -1
  80. package/dist/src/lib/common/stack.d.ts +0 -1
  81. package/dist/src/lib/common/stack.js +0 -1
  82. package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.d.ts +0 -1
  83. package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.js +0 -1
  84. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.d.ts +0 -1
  85. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.js +0 -1
  86. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.d.ts +0 -1
  87. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.js +0 -1
  88. package/dist/src/lib/construct/api-to-eventbridge-target/index.d.ts +0 -1
  89. package/dist/src/lib/construct/api-to-eventbridge-target/index.js +0 -1
  90. package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts +0 -1
  91. package/dist/src/lib/construct/api-to-eventbridge-target/main.js +51 -12
  92. package/dist/src/lib/construct/graphql-api-lambda/index.d.ts +0 -1
  93. package/dist/src/lib/construct/graphql-api-lambda/index.js +0 -1
  94. package/dist/src/lib/construct/graphql-api-lambda/main.d.ts +0 -1
  95. package/dist/src/lib/construct/graphql-api-lambda/main.js +0 -1
  96. package/dist/src/lib/construct/graphql-api-lambda-with-cache/index.d.ts +0 -1
  97. package/dist/src/lib/construct/graphql-api-lambda-with-cache/index.js +0 -1
  98. package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.d.ts +0 -1
  99. package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.js +0 -1
  100. package/dist/src/lib/construct/index.d.ts +0 -1
  101. package/dist/src/lib/construct/index.js +0 -1
  102. package/dist/src/lib/construct/site-with-ecs-backend/index.d.ts +0 -1
  103. package/dist/src/lib/construct/site-with-ecs-backend/index.js +0 -1
  104. package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts +0 -1
  105. package/dist/src/lib/construct/site-with-ecs-backend/main.js +0 -1
  106. package/dist/src/lib/construct/static-site/index.d.ts +0 -1
  107. package/dist/src/lib/construct/static-site/index.js +0 -1
  108. package/dist/src/lib/construct/static-site/main.d.ts +0 -1
  109. package/dist/src/lib/construct/static-site/main.js +0 -1
  110. package/dist/src/lib/manager/aws/acm-manager.d.ts +0 -1
  111. package/dist/src/lib/manager/aws/acm-manager.js +0 -1
  112. package/dist/src/lib/manager/aws/api-manager.d.ts +0 -1
  113. package/dist/src/lib/manager/aws/api-manager.js +0 -1
  114. package/dist/src/lib/manager/aws/app-config-manager.d.ts +0 -1
  115. package/dist/src/lib/manager/aws/app-config-manager.js +0 -1
  116. package/dist/src/lib/manager/aws/cloudfront-manager.d.ts +0 -1
  117. package/dist/src/lib/manager/aws/cloudfront-manager.js +0 -1
  118. package/dist/src/lib/manager/aws/cloudtrail-manager.d.ts +0 -1
  119. package/dist/src/lib/manager/aws/cloudtrail-manager.js +0 -1
  120. package/dist/src/lib/manager/aws/cloudwatch-manager.d.ts +0 -1
  121. package/dist/src/lib/manager/aws/cloudwatch-manager.js +0 -1
  122. package/dist/src/lib/manager/aws/codebuild-manager.d.ts +0 -1
  123. package/dist/src/lib/manager/aws/codebuild-manager.js +0 -1
  124. package/dist/src/lib/manager/aws/dynamodb-manager.d.ts +0 -1
  125. package/dist/src/lib/manager/aws/dynamodb-manager.js +0 -1
  126. package/dist/src/lib/manager/aws/ecr-manager.d.ts +0 -1
  127. package/dist/src/lib/manager/aws/ecr-manager.js +0 -1
  128. package/dist/src/lib/manager/aws/ecs-manager.d.ts +0 -1
  129. package/dist/src/lib/manager/aws/ecs-manager.js +0 -1
  130. package/dist/src/lib/manager/aws/eks-manager.d.ts +0 -1
  131. package/dist/src/lib/manager/aws/eks-manager.js +0 -1
  132. package/dist/src/lib/manager/aws/elasticache-manager.d.ts +0 -1
  133. package/dist/src/lib/manager/aws/elasticache-manager.js +0 -1
  134. package/dist/src/lib/manager/aws/event-manager.d.ts +0 -1
  135. package/dist/src/lib/manager/aws/event-manager.js +0 -1
  136. package/dist/src/lib/manager/aws/iam-manager.d.ts +0 -1
  137. package/dist/src/lib/manager/aws/iam-manager.js +0 -1
  138. package/dist/src/lib/manager/aws/index.d.ts +0 -1
  139. package/dist/src/lib/manager/aws/index.js +0 -1
  140. package/dist/src/lib/manager/aws/lambda-manager.d.ts +0 -1
  141. package/dist/src/lib/manager/aws/lambda-manager.js +0 -1
  142. package/dist/src/lib/manager/aws/log-manager.d.ts +0 -1
  143. package/dist/src/lib/manager/aws/log-manager.js +0 -1
  144. package/dist/src/lib/manager/aws/route53-manager.d.ts +0 -1
  145. package/dist/src/lib/manager/aws/route53-manager.js +0 -1
  146. package/dist/src/lib/manager/aws/s3-manager.d.ts +0 -1
  147. package/dist/src/lib/manager/aws/s3-manager.js +0 -1
  148. package/dist/src/lib/manager/aws/secrets-manager.d.ts +0 -1
  149. package/dist/src/lib/manager/aws/secrets-manager.js +0 -1
  150. package/dist/src/lib/manager/aws/sns-manager.d.ts +0 -1
  151. package/dist/src/lib/manager/aws/sns-manager.js +0 -1
  152. package/dist/src/lib/manager/aws/ssm-manager.d.ts +0 -1
  153. package/dist/src/lib/manager/aws/ssm-manager.js +0 -1
  154. package/dist/src/lib/manager/aws/vpc-manager.d.ts +0 -1
  155. package/dist/src/lib/manager/aws/vpc-manager.js +0 -1
  156. package/dist/src/lib/manager/aws/waf-manager.d.ts +0 -1
  157. package/dist/src/lib/manager/aws/waf-manager.js +0 -1
  158. package/dist/src/lib/manager/index.d.ts +0 -1
  159. package/dist/src/lib/manager/index.js +0 -1
  160. package/dist/src/lib/types/aws/index.d.ts +4 -4
  161. package/dist/src/lib/types/aws/index.js +0 -1
  162. package/dist/src/lib/types/index.d.ts +0 -1
  163. package/dist/src/lib/types/index.js +0 -1
  164. package/dist/src/lib/utils/aws/index.d.ts +0 -1
  165. package/dist/src/lib/utils/aws/index.js +0 -1
  166. package/dist/src/lib/utils/index.d.ts +0 -1
  167. package/dist/src/lib/utils/index.js +0 -1
  168. package/package.json +2 -1
  169. package/src/lib/construct/api-to-eventbridge-target/main.ts +57 -27
  170. package/src/lib/types/aws/index.ts +4 -3
  171. package/tsconfig.prd.json +8 -0
  172. package/dist/app/api-destined-function/src/lib/lambda.d.ts.map +0 -1
  173. package/dist/app/api-destined-function/src/lib/lambda.js.map +0 -1
  174. package/dist/index.d.ts.map +0 -1
  175. package/dist/index.js.map +0 -1
  176. package/dist/src/lib/common/construct.d.ts.map +0 -1
  177. package/dist/src/lib/common/construct.js.map +0 -1
  178. package/dist/src/lib/common/index.d.ts.map +0 -1
  179. package/dist/src/lib/common/index.js.map +0 -1
  180. package/dist/src/lib/common/stack.d.ts.map +0 -1
  181. package/dist/src/lib/common/stack.js.map +0 -1
  182. package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.d.ts.map +0 -1
  183. package/dist/src/lib/construct/api-to-eventbridge-target/api-destination-event.js.map +0 -1
  184. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.d.ts.map +0 -1
  185. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-lambda.js.map +0 -1
  186. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.d.ts.map +0 -1
  187. package/dist/src/lib/construct/api-to-eventbridge-target/api-destined-rest-api.js.map +0 -1
  188. package/dist/src/lib/construct/api-to-eventbridge-target/index.d.ts.map +0 -1
  189. package/dist/src/lib/construct/api-to-eventbridge-target/index.js.map +0 -1
  190. package/dist/src/lib/construct/api-to-eventbridge-target/main.d.ts.map +0 -1
  191. package/dist/src/lib/construct/api-to-eventbridge-target/main.js.map +0 -1
  192. package/dist/src/lib/construct/graphql-api-lambda/index.d.ts.map +0 -1
  193. package/dist/src/lib/construct/graphql-api-lambda/index.js.map +0 -1
  194. package/dist/src/lib/construct/graphql-api-lambda/main.d.ts.map +0 -1
  195. package/dist/src/lib/construct/graphql-api-lambda/main.js.map +0 -1
  196. package/dist/src/lib/construct/graphql-api-lambda-with-cache/index.d.ts.map +0 -1
  197. package/dist/src/lib/construct/graphql-api-lambda-with-cache/index.js.map +0 -1
  198. package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.d.ts.map +0 -1
  199. package/dist/src/lib/construct/graphql-api-lambda-with-cache/main.js.map +0 -1
  200. package/dist/src/lib/construct/index.d.ts.map +0 -1
  201. package/dist/src/lib/construct/index.js.map +0 -1
  202. package/dist/src/lib/construct/site-with-ecs-backend/index.d.ts.map +0 -1
  203. package/dist/src/lib/construct/site-with-ecs-backend/index.js.map +0 -1
  204. package/dist/src/lib/construct/site-with-ecs-backend/main.d.ts.map +0 -1
  205. package/dist/src/lib/construct/site-with-ecs-backend/main.js.map +0 -1
  206. package/dist/src/lib/construct/static-site/index.d.ts.map +0 -1
  207. package/dist/src/lib/construct/static-site/index.js.map +0 -1
  208. package/dist/src/lib/construct/static-site/main.d.ts.map +0 -1
  209. package/dist/src/lib/construct/static-site/main.js.map +0 -1
  210. package/dist/src/lib/manager/aws/acm-manager.d.ts.map +0 -1
  211. package/dist/src/lib/manager/aws/acm-manager.js.map +0 -1
  212. package/dist/src/lib/manager/aws/api-manager.d.ts.map +0 -1
  213. package/dist/src/lib/manager/aws/api-manager.js.map +0 -1
  214. package/dist/src/lib/manager/aws/app-config-manager.d.ts.map +0 -1
  215. package/dist/src/lib/manager/aws/app-config-manager.js.map +0 -1
  216. package/dist/src/lib/manager/aws/cloudfront-manager.d.ts.map +0 -1
  217. package/dist/src/lib/manager/aws/cloudfront-manager.js.map +0 -1
  218. package/dist/src/lib/manager/aws/cloudtrail-manager.d.ts.map +0 -1
  219. package/dist/src/lib/manager/aws/cloudtrail-manager.js.map +0 -1
  220. package/dist/src/lib/manager/aws/cloudwatch-manager.d.ts.map +0 -1
  221. package/dist/src/lib/manager/aws/cloudwatch-manager.js.map +0 -1
  222. package/dist/src/lib/manager/aws/codebuild-manager.d.ts.map +0 -1
  223. package/dist/src/lib/manager/aws/codebuild-manager.js.map +0 -1
  224. package/dist/src/lib/manager/aws/dynamodb-manager.d.ts.map +0 -1
  225. package/dist/src/lib/manager/aws/dynamodb-manager.js.map +0 -1
  226. package/dist/src/lib/manager/aws/ecr-manager.d.ts.map +0 -1
  227. package/dist/src/lib/manager/aws/ecr-manager.js.map +0 -1
  228. package/dist/src/lib/manager/aws/ecs-manager.d.ts.map +0 -1
  229. package/dist/src/lib/manager/aws/ecs-manager.js.map +0 -1
  230. package/dist/src/lib/manager/aws/eks-manager.d.ts.map +0 -1
  231. package/dist/src/lib/manager/aws/eks-manager.js.map +0 -1
  232. package/dist/src/lib/manager/aws/elasticache-manager.d.ts.map +0 -1
  233. package/dist/src/lib/manager/aws/elasticache-manager.js.map +0 -1
  234. package/dist/src/lib/manager/aws/event-manager.d.ts.map +0 -1
  235. package/dist/src/lib/manager/aws/event-manager.js.map +0 -1
  236. package/dist/src/lib/manager/aws/iam-manager.d.ts.map +0 -1
  237. package/dist/src/lib/manager/aws/iam-manager.js.map +0 -1
  238. package/dist/src/lib/manager/aws/index.d.ts.map +0 -1
  239. package/dist/src/lib/manager/aws/index.js.map +0 -1
  240. package/dist/src/lib/manager/aws/lambda-manager.d.ts.map +0 -1
  241. package/dist/src/lib/manager/aws/lambda-manager.js.map +0 -1
  242. package/dist/src/lib/manager/aws/log-manager.d.ts.map +0 -1
  243. package/dist/src/lib/manager/aws/log-manager.js.map +0 -1
  244. package/dist/src/lib/manager/aws/route53-manager.d.ts.map +0 -1
  245. package/dist/src/lib/manager/aws/route53-manager.js.map +0 -1
  246. package/dist/src/lib/manager/aws/s3-manager.d.ts.map +0 -1
  247. package/dist/src/lib/manager/aws/s3-manager.js.map +0 -1
  248. package/dist/src/lib/manager/aws/secrets-manager.d.ts.map +0 -1
  249. package/dist/src/lib/manager/aws/secrets-manager.js.map +0 -1
  250. package/dist/src/lib/manager/aws/sns-manager.d.ts.map +0 -1
  251. package/dist/src/lib/manager/aws/sns-manager.js.map +0 -1
  252. package/dist/src/lib/manager/aws/ssm-manager.d.ts.map +0 -1
  253. package/dist/src/lib/manager/aws/ssm-manager.js.map +0 -1
  254. package/dist/src/lib/manager/aws/vpc-manager.d.ts.map +0 -1
  255. package/dist/src/lib/manager/aws/vpc-manager.js.map +0 -1
  256. package/dist/src/lib/manager/aws/waf-manager.d.ts.map +0 -1
  257. package/dist/src/lib/manager/aws/waf-manager.js.map +0 -1
  258. package/dist/src/lib/manager/index.d.ts.map +0 -1
  259. package/dist/src/lib/manager/index.js.map +0 -1
  260. package/dist/src/lib/types/aws/index.d.ts.map +0 -1
  261. package/dist/src/lib/types/aws/index.js.map +0 -1
  262. package/dist/src/lib/types/index.d.ts.map +0 -1
  263. package/dist/src/lib/types/index.js.map +0 -1
  264. package/dist/src/lib/utils/aws/index.d.ts.map +0 -1
  265. package/dist/src/lib/utils/aws/index.js.map +0 -1
  266. package/dist/src/lib/utils/index.d.ts.map +0 -1
  267. package/dist/src/lib/utils/index.js.map +0 -1
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _rng = _interopRequireDefault(require("./rng.js"));
9
+
10
+ var _stringify = _interopRequireDefault(require("./stringify.js"));
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+
14
+ function v4(options, buf, offset) {
15
+ options = options || {};
16
+
17
+ const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
18
+
19
+
20
+ rnds[6] = rnds[6] & 0x0f | 0x40;
21
+ rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
22
+
23
+ if (buf) {
24
+ offset = offset || 0;
25
+
26
+ for (let i = 0; i < 16; ++i) {
27
+ buf[offset + i] = rnds[i];
28
+ }
29
+
30
+ return buf;
31
+ }
32
+
33
+ return (0, _stringify.default)(rnds);
34
+ }
35
+
36
+ var _default = v4;
37
+ exports.default = _default;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _v = _interopRequireDefault(require("./v35.js"));
9
+
10
+ var _sha = _interopRequireDefault(require("./sha1.js"));
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+
14
+ const v5 = (0, _v.default)('v5', 0x50, _sha.default);
15
+ var _default = v5;
16
+ exports.default = _default;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _regex = _interopRequireDefault(require("./regex.js"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ function validate(uuid) {
13
+ return typeof uuid === 'string' && _regex.default.test(uuid);
14
+ }
15
+
16
+ var _default = validate;
17
+ exports.default = _default;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _validate = _interopRequireDefault(require("./validate.js"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ function version(uuid) {
13
+ if (!(0, _validate.default)(uuid)) {
14
+ throw TypeError('Invalid UUID');
15
+ }
16
+
17
+ return parseInt(uuid.substr(14, 1), 16);
18
+ }
19
+
20
+ var _default = version;
21
+ exports.default = _default;
@@ -0,0 +1,135 @@
1
+ {
2
+ "name": "uuid",
3
+ "version": "8.3.2",
4
+ "description": "RFC4122 (v1, v4, and v5) UUIDs",
5
+ "commitlint": {
6
+ "extends": [
7
+ "@commitlint/config-conventional"
8
+ ]
9
+ },
10
+ "keywords": [
11
+ "uuid",
12
+ "guid",
13
+ "rfc4122"
14
+ ],
15
+ "license": "MIT",
16
+ "bin": {
17
+ "uuid": "./dist/bin/uuid"
18
+ },
19
+ "sideEffects": false,
20
+ "main": "./dist/index.js",
21
+ "exports": {
22
+ ".": {
23
+ "node": {
24
+ "module": "./dist/esm-node/index.js",
25
+ "require": "./dist/index.js",
26
+ "import": "./wrapper.mjs"
27
+ },
28
+ "default": "./dist/esm-browser/index.js"
29
+ },
30
+ "./package.json": "./package.json"
31
+ },
32
+ "module": "./dist/esm-node/index.js",
33
+ "browser": {
34
+ "./dist/md5.js": "./dist/md5-browser.js",
35
+ "./dist/rng.js": "./dist/rng-browser.js",
36
+ "./dist/sha1.js": "./dist/sha1-browser.js",
37
+ "./dist/esm-node/index.js": "./dist/esm-browser/index.js"
38
+ },
39
+ "files": [
40
+ "CHANGELOG.md",
41
+ "CONTRIBUTING.md",
42
+ "LICENSE.md",
43
+ "README.md",
44
+ "dist",
45
+ "wrapper.mjs"
46
+ ],
47
+ "devDependencies": {
48
+ "@babel/cli": "7.11.6",
49
+ "@babel/core": "7.11.6",
50
+ "@babel/preset-env": "7.11.5",
51
+ "@commitlint/cli": "11.0.0",
52
+ "@commitlint/config-conventional": "11.0.0",
53
+ "@rollup/plugin-node-resolve": "9.0.0",
54
+ "babel-eslint": "10.1.0",
55
+ "bundlewatch": "0.3.1",
56
+ "eslint": "7.10.0",
57
+ "eslint-config-prettier": "6.12.0",
58
+ "eslint-config-standard": "14.1.1",
59
+ "eslint-plugin-import": "2.22.1",
60
+ "eslint-plugin-node": "11.1.0",
61
+ "eslint-plugin-prettier": "3.1.4",
62
+ "eslint-plugin-promise": "4.2.1",
63
+ "eslint-plugin-standard": "4.0.1",
64
+ "husky": "4.3.0",
65
+ "jest": "25.5.4",
66
+ "lint-staged": "10.4.0",
67
+ "npm-run-all": "4.1.5",
68
+ "optional-dev-dependency": "2.0.1",
69
+ "prettier": "2.1.2",
70
+ "random-seed": "0.3.0",
71
+ "rollup": "2.28.2",
72
+ "rollup-plugin-terser": "7.0.2",
73
+ "runmd": "1.3.2",
74
+ "standard-version": "9.0.0"
75
+ },
76
+ "optionalDevDependencies": {
77
+ "@wdio/browserstack-service": "6.4.0",
78
+ "@wdio/cli": "6.4.0",
79
+ "@wdio/jasmine-framework": "6.4.0",
80
+ "@wdio/local-runner": "6.4.0",
81
+ "@wdio/spec-reporter": "6.4.0",
82
+ "@wdio/static-server-service": "6.4.0",
83
+ "@wdio/sync": "6.4.0"
84
+ },
85
+ "scripts": {
86
+ "examples:browser:webpack:build": "cd examples/browser-webpack && npm install && npm run build",
87
+ "examples:browser:rollup:build": "cd examples/browser-rollup && npm install && npm run build",
88
+ "examples:node:commonjs:test": "cd examples/node-commonjs && npm install && npm test",
89
+ "examples:node:esmodules:test": "cd examples/node-esmodules && npm install && npm test",
90
+ "lint": "npm run eslint:check && npm run prettier:check",
91
+ "eslint:check": "eslint src/ test/ examples/ *.js",
92
+ "eslint:fix": "eslint --fix src/ test/ examples/ *.js",
93
+ "pretest": "[ -n $CI ] || npm run build",
94
+ "test": "BABEL_ENV=commonjs node --throw-deprecation node_modules/.bin/jest test/unit/",
95
+ "pretest:browser": "optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**",
96
+ "test:browser": "wdio run ./wdio.conf.js",
97
+ "pretest:node": "npm run build",
98
+ "test:node": "npm-run-all --parallel examples:node:**",
99
+ "test:pack": "./scripts/testpack.sh",
100
+ "pretest:benchmark": "npm run build",
101
+ "test:benchmark": "cd examples/benchmark && npm install && npm test",
102
+ "prettier:check": "prettier --ignore-path .prettierignore --check '**/*.{js,jsx,json,md}'",
103
+ "prettier:fix": "prettier --ignore-path .prettierignore --write '**/*.{js,jsx,json,md}'",
104
+ "bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json",
105
+ "md": "runmd --watch --output=README.md README_js.md",
106
+ "docs": "( node --version | grep -q 'v12' ) && ( npm run build && runmd --output=README.md README_js.md )",
107
+ "docs:diff": "npm run docs && git diff --quiet README.md",
108
+ "build": "./scripts/build.sh",
109
+ "prepack": "npm run build",
110
+ "release": "standard-version --no-verify"
111
+ },
112
+ "repository": {
113
+ "type": "git",
114
+ "url": "https://github.com/uuidjs/uuid.git"
115
+ },
116
+ "husky": {
117
+ "hooks": {
118
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
119
+ "pre-commit": "lint-staged"
120
+ }
121
+ },
122
+ "lint-staged": {
123
+ "*.{js,jsx,json,md}": [
124
+ "prettier --write"
125
+ ],
126
+ "*.{js,jsx}": [
127
+ "eslint --fix"
128
+ ]
129
+ },
130
+ "standard-version": {
131
+ "scripts": {
132
+ "postchangelog": "prettier --write CHANGELOG.md"
133
+ }
134
+ }
135
+ }
@@ -0,0 +1,10 @@
1
+ import uuid from './dist/index.js';
2
+ export const v1 = uuid.v1;
3
+ export const v3 = uuid.v3;
4
+ export const v4 = uuid.v4;
5
+ export const v5 = uuid.v5;
6
+ export const NIL = uuid.NIL;
7
+ export const version = uuid.version;
8
+ export const validate = uuid.validate;
9
+ export const stringify = uuid.stringify;
10
+ export const parse = uuid.parse;
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@gradientedge/cdk-utils-api-destined-function",
3
+ "version": "0.0.0-SNAPSHOT",
4
+ "description": "Application for API Destined Function",
5
+ "main": "dist/index.js",
6
+ "license": "UNLICENSED",
7
+ "engines": {
8
+ "node": ">=14.16.0 <15"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/gradientedge/cdk-utils.git"
13
+ },
14
+ "scripts": {
15
+ "build": "yarn package:function",
16
+ "init": "yarn install",
17
+ "package:function": "mkdirp layers/nodejs && cp -R package.json layers/nodejs && cd layers/nodejs && yarn install --production --no-lockfile",
18
+ "start": "node dist/index",
19
+ "test": "npx jest --ci --runInBand --passWithNoTests"
20
+ },
21
+ "dependencies": {
22
+ "@types/uuid": "^8.3.4",
23
+ "uuid": "^8.3.2"
24
+ },
25
+ "devDependencies": {
26
+ "mkdirp": "^1.0.4",
27
+ "rimraf": "^3.0.2"
28
+ }
29
+ }
@@ -14,4 +14,3 @@ export declare const processEvent: (event: any) => {
14
14
  resource: any;
15
15
  success: boolean;
16
16
  };
17
- //# sourceMappingURL=lambda.d.ts.map
@@ -29,4 +29,3 @@ exports.handler = async (event, context, callback) => {
29
29
  console.log('Event Records:', JSON.stringify(event.Records));
30
30
  return callback(null, (0, exports.processEvent)(event));
31
31
  };
32
- //# sourceMappingURL=lambda.js.map
package/dist/index.d.ts CHANGED
@@ -3,4 +3,3 @@ export * from './src/lib/construct';
3
3
  export * from './src/lib/manager';
4
4
  export * from './src/lib/types';
5
5
  export * from './src/lib/utils';
6
- //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -15,4 +15,3 @@ __exportStar(require("./src/lib/construct"), exports);
15
15
  __exportStar(require("./src/lib/manager"), exports);
16
16
  __exportStar(require("./src/lib/types"), exports);
17
17
  __exportStar(require("./src/lib/utils"), exports);
18
- //# sourceMappingURL=index.js.map
@@ -78,4 +78,3 @@ export declare class CommonConstruct extends Construct {
78
78
  */
79
79
  isProductionStage: () => boolean;
80
80
  }
81
- //# sourceMappingURL=construct.d.ts.map
@@ -133,4 +133,3 @@ class CommonConstruct extends constructs_1.Construct {
133
133
  isProductionStage = () => utils.isPrdStage(this.props.stage);
134
134
  }
135
135
  exports.CommonConstruct = CommonConstruct;
136
- //# sourceMappingURL=construct.js.map
@@ -1,3 +1,2 @@
1
1
  export * from './construct';
2
2
  export * from './stack';
3
- //# sourceMappingURL=index.d.ts.map
@@ -12,4 +12,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./construct"), exports);
14
14
  __exportStar(require("./stack"), exports);
15
- //# sourceMappingURL=index.js.map
@@ -52,4 +52,3 @@ export declare class CommonStack extends cdk.Stack {
52
52
  */
53
53
  protected fullyQualifiedDomain(): any;
54
54
  }
55
- //# sourceMappingURL=stack.d.ts.map
@@ -145,4 +145,3 @@ class CommonStack extends cdk.Stack {
145
145
  }
146
146
  }
147
147
  exports.CommonStack = CommonStack;
148
- //# sourceMappingURL=stack.js.map
@@ -14,4 +14,3 @@ export declare class ApiDestinationEvent implements types.ApiDestinationEventTyp
14
14
  ruleFailure: events.Rule;
15
15
  ruleSuccess: events.Rule;
16
16
  }
17
- //# sourceMappingURL=api-destination-event.d.ts.map
@@ -15,4 +15,3 @@ class ApiDestinationEvent {
15
15
  ruleSuccess;
16
16
  }
17
17
  exports.ApiDestinationEvent = ApiDestinationEvent;
18
- //# sourceMappingURL=api-destination-event.js.map
@@ -17,4 +17,3 @@ export declare class ApiDestinedLambda implements types.ApiDestinedLambdaType {
17
17
  policy: iam.PolicyDocument;
18
18
  role: iam.Role;
19
19
  }
20
- //# sourceMappingURL=api-destined-lambda.d.ts.map
@@ -17,4 +17,3 @@ class ApiDestinedLambda {
17
17
  role;
18
18
  }
19
19
  exports.ApiDestinedLambda = ApiDestinedLambda;
20
- //# sourceMappingURL=api-destined-lambda.js.map
@@ -33,4 +33,3 @@ export declare class ApiDestinedRestApi implements types.ApiDestinedRestApiType
33
33
  topic: sns.Topic;
34
34
  topicRole: iam.Role;
35
35
  }
36
- //# sourceMappingURL=api-destined-rest-api.d.ts.map
@@ -27,4 +27,3 @@ class ApiDestinedRestApi {
27
27
  topicRole;
28
28
  }
29
29
  exports.ApiDestinedRestApi = ApiDestinedRestApi;
30
- //# sourceMappingURL=api-destined-rest-api.js.map
@@ -2,4 +2,3 @@ export * from './api-destination-event';
2
2
  export * from './api-destined-lambda';
3
3
  export * from './api-destined-rest-api';
4
4
  export * from './main';
5
- //# sourceMappingURL=index.d.ts.map
@@ -14,4 +14,3 @@ __exportStar(require("./api-destination-event"), exports);
14
14
  __exportStar(require("./api-destined-lambda"), exports);
15
15
  __exportStar(require("./api-destined-rest-api"), exports);
16
16
  __exportStar(require("./main"), exports);
17
- //# sourceMappingURL=index.js.map
@@ -129,4 +129,3 @@ export declare class ApiToEventBridgeTarget extends CommonConstruct {
129
129
  */
130
130
  protected createApiRouteAssets(): void;
131
131
  }
132
- //# sourceMappingURL=main.d.ts.map
@@ -20,10 +20,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
20
20
  };
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
22
  exports.ApiToEventBridgeTarget = void 0;
23
+ const cdk = __importStar(require("aws-cdk-lib"));
23
24
  const apig = __importStar(require("aws-cdk-lib/aws-apigateway"));
24
25
  const eventstargets = __importStar(require("aws-cdk-lib/aws-events-targets"));
25
26
  const iam = __importStar(require("aws-cdk-lib/aws-iam"));
26
27
  const destinations = __importStar(require("aws-cdk-lib/aws-lambda-destinations"));
28
+ const sns = __importStar(require("aws-cdk-lib/aws-sns"));
27
29
  const common_1 = require("../../common");
28
30
  const api_destination_event_1 = require("./api-destination-event");
29
31
  const api_destined_lambda_1 = require("./api-destined-lambda");
@@ -131,6 +133,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
131
133
  * @protected
132
134
  */
133
135
  resolveCertificate() {
136
+ if (this.props.api.useExisting)
137
+ return;
134
138
  if (this.props.api.certificate.useExistingCertificate &&
135
139
  this.props.api.certificate.certificateSsmName &&
136
140
  this.props.api.certificate.certificateRegion) {
@@ -143,6 +147,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
143
147
  * @protected
144
148
  */
145
149
  createApiDestinedLambdaPolicy() {
150
+ if (this.props.api.useExisting)
151
+ return;
146
152
  this.apiDestinedLambda.policy = new iam.PolicyDocument({
147
153
  statements: [this.iamManager.statementForReadSecrets(this), this.iamManager.statementForPutEvents()],
148
154
  });
@@ -152,6 +158,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
152
158
  * @protected
153
159
  */
154
160
  createApiDestinedLambdaRole() {
161
+ if (this.props.api.useExisting)
162
+ return;
155
163
  this.apiDestinedLambda.role = this.iamManager.createRoleForLambda(`${this.id}-lambda-destined-role`, this, this.apiDestinedLambda.policy);
156
164
  }
157
165
  /**
@@ -159,6 +167,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
159
167
  * @protected
160
168
  */
161
169
  createApiDestinedLambdaEnvironment() {
170
+ if (this.props.api.useExisting)
171
+ return;
162
172
  this.apiDestinedLambda.environment = {
163
173
  NODE_ENV: this.props.nodeEnv,
164
174
  LOG_LEVEL: this.props.logLevel,
@@ -171,6 +181,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
171
181
  * @protected
172
182
  */
173
183
  createApiDestinedLambdaLayers() {
184
+ if (this.props.api.useExisting)
185
+ return;
174
186
  const layers = [];
175
187
  if (this.props.lambda.layerSource) {
176
188
  layers.push(this.lambdaManager.createLambdaLayer(`${this.id}-lambda-destined-layer`, this, this.props.lambda.layerSource));
@@ -182,6 +194,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
182
194
  * @protected
183
195
  */
184
196
  createApiDestinedLambdaDestinations() {
197
+ if (this.props.api.useExisting)
198
+ return;
185
199
  this.apiDestinedLambda.destinationSuccess = new destinations.EventBridgeDestination(this.apiEvent.eventBus);
186
200
  this.apiDestinedLambda.destinationFailure = new destinations.EventBridgeDestination(this.apiEvent.eventBus);
187
201
  }
@@ -190,6 +204,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
190
204
  * @protected
191
205
  */
192
206
  createApiDestinedLambdaFunction() {
207
+ if (this.props.api.useExisting)
208
+ return;
193
209
  if (!this.props.lambda.source)
194
210
  throw 'Api Destined Lambda props undefined';
195
211
  this.apiDestinedLambda.function = this.lambdaManager.createLambdaFunction(`${this.id}-lambda-destined`, this, {
@@ -201,11 +217,15 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
201
217
  }, this.apiDestinedLambda.role, this.apiDestinedLambda.layers, this.props.lambda.source, this.props.lambda.handler ?? 'lambda.handler', this.apiDestinedLambda.environment);
202
218
  }
203
219
  createApiDestinedEventBus() {
220
+ if (this.props.api.useExisting)
221
+ return;
204
222
  this.apiEvent.eventBus = this.eventManager.createEventBus(`${this.id}-destined-event-bus`, this, {
205
223
  eventBusName: `${this.props.event.eventBusName}`,
206
224
  });
207
225
  }
208
226
  createApiDestinationLogGroupSuccess() {
227
+ if (this.props.api.useExisting)
228
+ return;
209
229
  this.apiEvent.logGroupSuccess = this.logManager.createLogGroup(`${this.id}-destination-success-log`, this, {
210
230
  ...{
211
231
  logGroupName: `/${this.id}/events/api-destination-success`,
@@ -218,6 +238,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
218
238
  * @protected
219
239
  */
220
240
  createApiDestinationRuleSuccess() {
241
+ if (this.props.api.useExisting)
242
+ return;
221
243
  this.props.event.ruleSuccess = {
222
244
  ...{
223
245
  ruleName: `${this.id}-api-destination-success`,
@@ -238,6 +260,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
238
260
  this.apiEvent.ruleSuccess = this.eventManager.createRule(`${this.id}-api-destination-rule-success`, this, this.props.event.ruleSuccess, this.apiEvent.eventBus, [new eventstargets.CloudWatchLogGroup(this.apiEvent.logGroupSuccess)]);
239
261
  }
240
262
  createApiDestinationLogGroupFailure() {
263
+ if (this.props.api.useExisting)
264
+ return;
241
265
  this.apiEvent.logGroupFailure = this.logManager.createLogGroup(`${this.id}-destination-failure-log`, this, {
242
266
  ...{
243
267
  logGroupName: `/${this.id}/events/api-destination-failure`,
@@ -250,6 +274,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
250
274
  * @protected
251
275
  */
252
276
  createApiDestinationRuleFailure() {
277
+ if (this.props.api.useExisting)
278
+ return;
253
279
  this.props.event.ruleFailure = {
254
280
  ...{
255
281
  ruleName: `${this.id}-api-destination-failure`,
@@ -266,11 +292,16 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
266
292
  this.apiEvent.ruleFailure = this.eventManager.createRule(`${this.id}-api-destination-rule-failure`, this, this.props.event.ruleFailure, this.apiEvent.eventBus, [new eventstargets.CloudWatchLogGroup(this.apiEvent.logGroupFailure)]);
267
293
  }
268
294
  createApiDestinedTopicRole() {
295
+ if (this.props.api.useExisting)
296
+ return;
269
297
  this.apiDestinedRestApi.topicRole = new iam.Role(this, `${this.id}-sns-rest-api-role`, {
270
298
  assumedBy: new iam.ServicePrincipal('apigateway.amazonaws.com'),
271
299
  });
272
300
  }
273
301
  createApiDestinedTopic() {
302
+ if (this.props.api.useExisting) {
303
+ this.apiDestinedRestApi.topic = sns.Topic.fromTopicArn(this, `${this.id}-destined-topic`, `arn:aws:sns:${this.props.region}:${cdk.Stack.of(this).account}:${this.id}-destined-topic-${this.props.stage}`);
304
+ }
274
305
  this.apiDestinedRestApi.topic = this.snsManager.createLambdaNotificationService(`${this.id}-destined-topic`, this, {
275
306
  topicName: `${this.id}-destined-topic`,
276
307
  }, this.apiDestinedLambda.function);
@@ -281,6 +312,9 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
281
312
  * @protected
282
313
  */
283
314
  createApiDestinedRestApi() {
315
+ if (this.props.api.useExisting) {
316
+ this.apiDestinedRestApi.api = apig.RestApi.fromRestApiId(this, `${this.id}-sns-rest-api`, cdk.Fn.importValue('importedRestApiRef'));
317
+ }
284
318
  this.apiDestinedRestApi.api = new apig.RestApi(this, `${this.id}-sns-rest-api`, {
285
319
  ...{
286
320
  deployOptions: {
@@ -302,8 +336,11 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
302
336
  },
303
337
  ...this.props.api,
304
338
  });
339
+ this.addCfnOutput(`${this.id}-restApiId`, this.apiDestinedRestApi.api.restApiId);
305
340
  }
306
341
  createApiDestinedResponseModel() {
342
+ if (this.props.api.useExisting)
343
+ return;
307
344
  this.apiDestinedRestApi.responseModel = this.apiDestinedRestApi.api.addModel(`${this.id}-response-model`, {
308
345
  ...{
309
346
  contentType: 'application/json',
@@ -319,6 +356,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
319
356
  });
320
357
  }
321
358
  createApiDestinedErrorResponseModel() {
359
+ if (this.props.api.useExisting)
360
+ return;
322
361
  this.apiDestinedRestApi.errorResponseModel = this.apiDestinedRestApi.api.addModel(`${this.id}-error-response-model`, {
323
362
  ...{
324
363
  contentType: 'application/json',
@@ -465,6 +504,8 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
465
504
  * @protected
466
505
  */
467
506
  createApiDomain() {
507
+ if (this.props.api.useExisting)
508
+ return;
468
509
  this.apiDestinedRestApi.domain = this.apiManager.createApiDomain(`${this.id}-api-domain`, this, this.isProductionStage()
469
510
  ? `${this.props.apiSubDomain}.${this.fullyQualifiedDomainName}`
470
511
  : `${this.props.apiSubDomain}-${this.props.stage}.${this.fullyQualifiedDomainName}`, this.apiDestinedRestApi.certificate);
@@ -474,25 +515,23 @@ class ApiToEventBridgeTarget extends common_1.CommonConstruct {
474
515
  * @protected
475
516
  */
476
517
  createApiBasePathMapping() {
477
- const apiRootPaths = this.props.apiRootPaths;
478
- if (apiRootPaths && apiRootPaths.length > 0) {
479
- apiRootPaths.forEach((apiRootPath) => {
480
- this.apiDestinedBasePathMappings.push(new apig.BasePathMapping(this, `${this.id}-base-bath-mapping-${apiRootPath}`, {
481
- basePath: this.props.api.resource,
482
- domainName: this.apiDestinedRestApi.domain,
483
- restApi: this.apiDestinedRestApi.api,
484
- stage: this.apiDestinedRestApi.api.deploymentStage,
485
- }));
486
- });
487
- }
518
+ if (this.props.api.useExisting)
519
+ return;
520
+ new apig.BasePathMapping(this, `${this.id}-base-bath-mapping`, {
521
+ basePath: '',
522
+ domainName: this.apiDestinedRestApi.domain,
523
+ restApi: this.apiDestinedRestApi.api,
524
+ stage: this.apiDestinedRestApi.api.deploymentStage,
525
+ });
488
526
  }
489
527
  /**
490
528
  * @summary Method to create route53 records for Api API
491
529
  * @protected
492
530
  */
493
531
  createApiRouteAssets() {
532
+ if (this.props.api.useExisting)
533
+ return;
494
534
  this.route53Manager.createApiGatewayARecord(`${this.id}-custom-domain-a-record`, this, this.props.apiSubDomain, this.apiDestinedRestApi.domain, this.apiDestinedRestApi.hostedZone);
495
535
  }
496
536
  }
497
537
  exports.ApiToEventBridgeTarget = ApiToEventBridgeTarget;
498
- //# sourceMappingURL=main.js.map
@@ -1,2 +1 @@
1
1
  export * from './main';
2
- //# sourceMappingURL=index.d.ts.map
@@ -11,4 +11,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./main"), exports);
14
- //# sourceMappingURL=index.js.map
@@ -110,4 +110,3 @@ export declare class GraphQLApiLambda extends CommonConstruct {
110
110
  */
111
111
  protected createApiRouteAssets(): void;
112
112
  }
113
- //# sourceMappingURL=main.d.ts.map
@@ -199,4 +199,3 @@ class GraphQLApiLambda extends common_1.CommonConstruct {
199
199
  }
200
200
  }
201
201
  exports.GraphQLApiLambda = GraphQLApiLambda;
202
- //# sourceMappingURL=main.js.map
@@ -1,2 +1 @@
1
1
  export * from './main';
2
- //# sourceMappingURL=index.d.ts.map
@@ -11,4 +11,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./main"), exports);
14
- //# sourceMappingURL=index.js.map
@@ -62,4 +62,3 @@ export declare class GraphQLApiLambdaWithCache extends GraphQLApiLambda {
62
62
  protected createLambdaEnvironment(): void;
63
63
  protected createLambdaFunction(): void;
64
64
  }
65
- //# sourceMappingURL=main.d.ts.map
@@ -130,4 +130,3 @@ class GraphQLApiLambdaWithCache extends __1.GraphQLApiLambda {
130
130
  }
131
131
  }
132
132
  exports.GraphQLApiLambdaWithCache = GraphQLApiLambdaWithCache;
133
- //# sourceMappingURL=main.js.map
@@ -3,4 +3,3 @@ export * from './graphql-api-lambda';
3
3
  export * from './graphql-api-lambda-with-cache';
4
4
  export * from './site-with-ecs-backend';
5
5
  export * from './static-site';
6
- //# sourceMappingURL=index.d.ts.map