@resistdesign/voltra 3.0.0-alpha.3 → 3.0.0-alpha.31

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 (393) hide show
  1. package/README.md +330 -7
  2. package/api/DBX/DBXAsserts.d.ts +95 -0
  3. package/api/DBX/DBXRequest.d.ts +5 -0
  4. package/api/DBX/DBXRuntime.d.ts +5 -0
  5. package/api/DBX/DBXScenarioConfig.d.ts +9 -0
  6. package/api/DBX/DBXSeed.d.ts +124 -0
  7. package/api/DBX/DBXTypes.d.ts +176 -0
  8. package/api/DBX/index.d.ts +8 -0
  9. package/api/DataAccessControl.d.ts +220 -0
  10. package/api/Indexing/API.d.ts +224 -0
  11. package/api/Indexing/Cursor.d.ts +101 -0
  12. package/api/Indexing/Handler/Config.d.ts +39 -0
  13. package/api/Indexing/Handler.d.ts +166 -0
  14. package/api/Indexing/Trace.d.ts +54 -0
  15. package/api/Indexing/Types.d.ts +204 -0
  16. package/api/Indexing/ddb/AwsSdkV3Adapter.d.ts +8 -0
  17. package/api/Indexing/ddb/Types.d.ts +169 -0
  18. package/api/Indexing/docId.d.ts +27 -0
  19. package/api/Indexing/exact/ExactDdb.d.ts +58 -0
  20. package/api/Indexing/exact/ExactIndex.d.ts +90 -0
  21. package/api/Indexing/exact/ExactS3.d.ts +41 -0
  22. package/api/Indexing/fieldQualification.d.ts +12 -0
  23. package/api/Indexing/fulltext/FullTextDdbBackend.d.ts +210 -0
  24. package/api/Indexing/fulltext/FullTextMemoryBackend.d.ts +93 -0
  25. package/api/Indexing/fulltext/Schema.d.ts +164 -0
  26. package/api/Indexing/hashUniversal.d.ts +13 -0
  27. package/api/Indexing/index.d.ts +45 -0
  28. package/api/Indexing/lossy/LossyDdb.d.ts +43 -0
  29. package/api/Indexing/lossy/LossyIndex.d.ts +72 -0
  30. package/api/Indexing/lossy/LossyS3.d.ts +40 -0
  31. package/api/Indexing/rel/Cursor.d.ts +25 -0
  32. package/api/Indexing/rel/Handlers.d.ts +143 -0
  33. package/api/Indexing/rel/RelationalDdb.d.ts +169 -0
  34. package/api/Indexing/rel/RelationalInMemoryBackend.d.ts +38 -0
  35. package/api/Indexing/rel/Types.d.ts +69 -0
  36. package/api/Indexing/structured/Cursor.d.ts +26 -0
  37. package/api/Indexing/structured/Handlers.d.ts +128 -0
  38. package/api/Indexing/structured/SearchStructured.d.ts +44 -0
  39. package/api/Indexing/structured/StructuredDdb.d.ts +166 -0
  40. package/api/Indexing/structured/StructuredDdbBackend.d.ts +109 -0
  41. package/api/Indexing/structured/StructuredInMemoryBackend.d.ts +34 -0
  42. package/api/Indexing/structured/StructuredInMemoryIndex.d.ts +58 -0
  43. package/api/Indexing/structured/StructuredStringLike.d.ts +25 -0
  44. package/api/Indexing/structured/StructuredWriter.d.ts +61 -0
  45. package/api/Indexing/structured/Types.d.ts +126 -0
  46. package/api/Indexing/structured/index.d.ts +9 -0
  47. package/api/Indexing/tokenize.d.ts +31 -0
  48. package/api/ORM/DACUtils.d.ts +270 -0
  49. package/api/ORM/ListItemUtils.d.ts +40 -0
  50. package/api/ORM/ORMRouteMap.d.ts +55 -0
  51. package/api/ORM/TypeInfoORMService.d.ts +555 -0
  52. package/api/ORM/drivers/DynamoDBDataItemDBDriver/ConfigTypes.d.ts +229 -0
  53. package/api/ORM/drivers/DynamoDBDataItemDBDriver.d.ts +89 -0
  54. package/api/ORM/drivers/InMemoryDataItemDBDriver/ConfigTypes.d.ts +4 -0
  55. package/api/ORM/drivers/InMemoryDataItemDBDriver.d.ts +55 -0
  56. package/api/ORM/drivers/InMemoryFileItemDBDriver/ConfigTypes.d.ts +13 -0
  57. package/api/ORM/drivers/InMemoryFileItemDBDriver.d.ts +98 -0
  58. package/api/ORM/drivers/InMemoryItemRelationshipDBDriver.d.ts +16 -0
  59. package/api/ORM/drivers/IndexingRelationshipDriver.d.ts +123 -0
  60. package/api/ORM/drivers/S3FileItemDBDriver/ConfigTypes.d.ts +322 -0
  61. package/api/ORM/drivers/S3FileItemDBDriver/S3FileDriver.d.ts +118 -0
  62. package/{src/api → api}/ORM/drivers/S3FileItemDBDriver.d.ts +27 -0
  63. package/api/ORM/drivers/common/SupportedTypeInfoORMDBDrivers.d.ts +36 -0
  64. package/{src/api → api}/ORM/drivers/common/Types.d.ts +120 -0
  65. package/api/ORM/drivers/common/index.d.ts +12 -0
  66. package/api/ORM/drivers/index.d.ts +22 -0
  67. package/api/ORM/index.d.ts +33 -0
  68. package/api/ORM/indexing/criteriaToStructuredWhere.d.ts +17 -0
  69. package/api/Router/AWS.d.ts +80 -0
  70. package/api/Router/Auth.d.ts +14 -0
  71. package/api/Router/CORS.d.ts +66 -0
  72. package/api/Router/Types.d.ts +138 -0
  73. package/api/Router/index.d.ts +89 -0
  74. package/api/index.d.ts +72 -0
  75. package/api/index.js +8827 -0
  76. package/app/forms/Engine.d.ts +20 -0
  77. package/app/forms/UI.d.ts +73 -0
  78. package/app/forms/core/createAutoField.d.ts +35 -0
  79. package/app/forms/core/createFormRenderer.d.ts +24 -0
  80. package/app/forms/core/getFieldKind.d.ts +14 -0
  81. package/app/forms/core/index.d.ts +16 -0
  82. package/app/forms/core/mergeSuites.d.ts +22 -0
  83. package/app/forms/core/resolveSuite.d.ts +14 -0
  84. package/app/forms/core/types.d.ts +169 -0
  85. package/app/forms/index.d.ts +15 -0
  86. package/app/forms/types.d.ts +156 -0
  87. package/app/helpers/styled.d.ts +3 -0
  88. package/app/index.d.ts +102 -0
  89. package/app/index.js +560 -0
  90. package/{src/app → app}/utils/ApplicationState.d.ts +115 -0
  91. package/{src/app → app}/utils/ApplicationStateLoader.d.ts +40 -0
  92. package/app/utils/Controller.d.ts +10 -0
  93. package/app/utils/Debug.d.ts +14 -0
  94. package/app/utils/EasyLayout.d.ts +89 -0
  95. package/app/utils/History.d.ts +165 -0
  96. package/app/utils/Route.d.ts +158 -0
  97. package/app/utils/RouteHistory.d.ts +26 -0
  98. package/app/utils/Service.d.ts +45 -0
  99. package/app/utils/TypeInfoORMAPIUtils.d.ts +94 -0
  100. package/app/utils/TypeInfoORMClient.d.ts +103 -0
  101. package/app/utils/UniversalRouteAdapter.d.ts +73 -0
  102. package/app/utils/easy-layout/computeAreaBounds.d.ts +5 -0
  103. package/app/utils/easy-layout/computeTracks.d.ts +16 -0
  104. package/app/utils/easy-layout/index.d.ts +5 -0
  105. package/app/utils/easy-layout/parseTemplate.d.ts +12 -0
  106. package/app/utils/easy-layout/types.d.ts +52 -0
  107. package/app/utils/easy-layout/validateAreas.d.ts +5 -0
  108. package/app/utils/index.d.ts +39 -0
  109. package/{src/common/TypeParsing → build}/TypeMapping.d.ts +8 -0
  110. package/build/TypeParsing.d.ts +10 -0
  111. package/build/index.d.ts +15 -0
  112. package/build/index.js +569 -0
  113. package/chunk-ATO2455Q.js +258 -0
  114. package/chunk-FQMZMCXU.js +71 -0
  115. package/chunk-G5CLUK4Y.js +621 -0
  116. package/chunk-GYWRAW3Y.js +78 -0
  117. package/chunk-HVY7POTD.js +22 -0
  118. package/chunk-I2KLQ2HA.js +19 -0
  119. package/chunk-IWRHGGGH.js +10 -0
  120. package/chunk-LGM75I6P.js +353 -0
  121. package/chunk-MUCSL3UR.js +1 -0
  122. package/chunk-WELZGQDJ.js +456 -0
  123. package/common/CommandLine/collectRequiredEnvironmentVariables.d.ts +9 -0
  124. package/common/CommandLine/index.d.ts +6 -0
  125. package/common/HelperTypes.d.ts +9 -0
  126. package/common/IdGeneration/getSimpleId.d.ts +8 -0
  127. package/{src/common → common}/ItemRelationshipInfoTypes.d.ts +19 -1
  128. package/common/ItemRelationships/ItemRelationshipValidation.d.ts +21 -0
  129. package/common/ItemRelationships/index.d.ts +6 -0
  130. package/common/Logging/Utils.d.ts +19 -0
  131. package/common/Routing.d.ts +67 -0
  132. package/common/SearchTypes.d.ts +248 -0
  133. package/common/SearchUtils.d.ts +55 -0
  134. package/{src/common → common}/SearchValidation.d.ts +10 -0
  135. package/{src/common → common}/StringTransformers.d.ts +11 -0
  136. package/common/Testing/CLI.d.ts +6 -0
  137. package/common/Testing/CLI.js +432 -0
  138. package/{src/common → common}/Testing/Types.d.ts +103 -4
  139. package/{src/common → common}/Testing/Utils.d.ts +65 -1
  140. package/common/Testing/index.d.ts +8 -0
  141. package/common/TypeInfoDataItemUtils.d.ts +39 -0
  142. package/common/TypeInfoORM/Types.d.ts +342 -0
  143. package/common/TypeInfoORM/index.d.ts +11 -0
  144. package/common/TypeParsing/Constants.d.ts +4 -0
  145. package/{src/common → common}/TypeParsing/ParsingUtils/Constants.d.ts +3 -0
  146. package/{src/common → common}/TypeParsing/ParsingUtils/checkType.d.ts +6 -0
  147. package/{src/common → common}/TypeParsing/ParsingUtils/checkUnionType.d.ts +6 -0
  148. package/common/TypeParsing/ParsingUtils/extractCommentTags.d.ts +8 -0
  149. package/common/TypeParsing/ParsingUtils/extractLiteralValues.d.ts +12 -0
  150. package/common/TypeParsing/ParsingUtils/extractTypeDetails.d.ts +14 -0
  151. package/common/TypeParsing/ParsingUtils/getPrimaryFieldForTypeInfo.d.ts +18 -0
  152. package/common/TypeParsing/ParsingUtils/getTypeInfo.d.ts +9 -0
  153. package/{src/common → common}/TypeParsing/ParsingUtils/getTypeInfoField.d.ts +6 -0
  154. package/common/TypeParsing/ParsingUtils/getTypeInfoFromAliasType.d.ts +11 -0
  155. package/common/TypeParsing/ParsingUtils/getTypeInfoFromFieldFilter.d.ts +12 -0
  156. package/common/TypeParsing/ParsingUtils/getTypeInfoFromTypeAlias.d.ts +11 -0
  157. package/common/TypeParsing/ParsingUtils/getTypeKeyword.d.ts +9 -0
  158. package/common/TypeParsing/ParsingUtils/getUnionOrIntersectionTypeInfo.d.ts +11 -0
  159. package/common/TypeParsing/ParsingUtils/getUnionOrLiteralStringValues.d.ts +8 -0
  160. package/{src/common → common}/TypeParsing/TypeInfo.d.ts +61 -1
  161. package/{src/common → common}/TypeParsing/Utils.d.ts +26 -0
  162. package/{src/common → common}/TypeParsing/Validation.d.ts +105 -0
  163. package/common/TypeParsing/index.d.ts +8 -0
  164. package/common/index.d.ts +50 -0
  165. package/common/index.js +36 -0
  166. package/{src/iac → iac}/SimpleCFT.d.ts +46 -2
  167. package/iac/index.d.ts +40 -0
  168. package/iac/index.js +2 -0
  169. package/iac/packs/auth/user-management.d.ts +106 -0
  170. package/iac/packs/auth.d.ts +124 -0
  171. package/iac/packs/build/utils.d.ts +289 -0
  172. package/iac/packs/build.d.ts +92 -0
  173. package/iac/packs/cdn.d.ts +33 -0
  174. package/iac/packs/cloud-function.d.ts +67 -0
  175. package/{src/iac → iac}/packs/database.d.ts +4 -1
  176. package/{src/iac → iac}/packs/dns.d.ts +22 -1
  177. package/iac/packs/file-storage.d.ts +46 -0
  178. package/iac/packs/gateway.d.ts +79 -0
  179. package/iac/packs/index.d.ts +60 -0
  180. package/iac/packs/index.js +1378 -0
  181. package/iac/packs/repo.d.ts +28 -0
  182. package/iac/packs/ssl-certificate.d.ts +28 -0
  183. package/{src/iac → iac}/types/Constants.d.ts +15 -0
  184. package/iac/types/Renderers.d.ts +96 -0
  185. package/iac/types/Types.d.ts +131 -0
  186. package/iac/types/Utils.d.ts +9 -0
  187. package/{src/iac → iac}/utils/index.d.ts +56 -5
  188. package/iac/utils/patch-utils.d.ts +66 -0
  189. package/iac-packs/index.d.ts +6 -0
  190. package/native/forms/UI.d.ts +67 -0
  191. package/native/forms/createNativeFormRenderer.d.ts +21 -0
  192. package/native/forms/index.d.ts +9 -0
  193. package/native/forms/primitives/index.d.ts +38 -0
  194. package/native/forms/suite.d.ts +15 -0
  195. package/native/index.d.ts +19 -0
  196. package/native/index.js +717 -0
  197. package/native/testing/react-native.d.ts +28 -0
  198. package/native/utils/EasyLayout.d.ts +88 -0
  199. package/native/utils/History.d.ts +102 -0
  200. package/native/utils/Route.d.ts +83 -0
  201. package/native/utils/index.d.ts +9 -0
  202. package/package.json +76 -44
  203. package/web/forms/UI.d.ts +68 -0
  204. package/web/forms/createWebFormRenderer.d.ts +21 -0
  205. package/web/forms/index.d.ts +9 -0
  206. package/web/forms/primitives/index.d.ts +21 -0
  207. package/web/forms/suite.d.ts +15 -0
  208. package/web/index.d.ts +15 -0
  209. package/web/index.js +547 -0
  210. package/web/utils/EasyLayout.d.ts +47 -0
  211. package/web/utils/Route.d.ts +14 -0
  212. package/web/utils/index.d.ts +6 -0
  213. package/src/api/DataAccessControl.d.ts +0 -85
  214. package/src/api/DataAccessControl.js +0 -159
  215. package/src/api/ORM/DACUtils.d.ts +0 -60
  216. package/src/api/ORM/DACUtils.js +0 -197
  217. package/src/api/ORM/ListItemUtils.d.ts +0 -7
  218. package/src/api/ORM/ListItemUtils.js +0 -22
  219. package/src/api/ORM/ORMRouteMap.d.ts +0 -19
  220. package/src/api/ORM/ORMRouteMap.js +0 -82
  221. package/src/api/ORM/TypeInfoORMService.d.ts +0 -103
  222. package/src/api/ORM/TypeInfoORMService.js +0 -581
  223. package/src/api/ORM/drivers/DynamoDBDataItemDBDriver/ConfigTypes.d.ts +0 -63
  224. package/src/api/ORM/drivers/DynamoDBDataItemDBDriver/ConfigTypes.js +0 -2
  225. package/src/api/ORM/drivers/DynamoDBDataItemDBDriver.d.ts +0 -36
  226. package/src/api/ORM/drivers/DynamoDBDataItemDBDriver.js +0 -282
  227. package/src/api/ORM/drivers/S3FileItemDBDriver/ConfigTypes.d.ts +0 -90
  228. package/src/api/ORM/drivers/S3FileItemDBDriver/ConfigTypes.js +0 -2
  229. package/src/api/ORM/drivers/S3FileItemDBDriver/S3FileDriver.d.ts +0 -45
  230. package/src/api/ORM/drivers/S3FileItemDBDriver/S3FileDriver.js +0 -127
  231. package/src/api/ORM/drivers/S3FileItemDBDriver.js +0 -182
  232. package/src/api/ORM/drivers/common/SupportedTypeInfoORMDBDrivers.d.ts +0 -12
  233. package/src/api/ORM/drivers/common/SupportedTypeInfoORMDBDrivers.js +0 -20
  234. package/src/api/ORM/drivers/common/Types.js +0 -14
  235. package/src/api/ORM/drivers/common/index.d.ts +0 -2
  236. package/src/api/ORM/drivers/common/index.js +0 -18
  237. package/src/api/ORM/drivers/index.d.ts +0 -3
  238. package/src/api/ORM/drivers/index.js +0 -19
  239. package/src/api/ORM/index.d.ts +0 -4
  240. package/src/api/ORM/index.js +0 -43
  241. package/src/api/Router/AWS.d.ts +0 -26
  242. package/src/api/Router/AWS.js +0 -76
  243. package/src/api/Router/Auth.d.ts +0 -2
  244. package/src/api/Router/Auth.js +0 -9
  245. package/src/api/Router/CORS.d.ts +0 -6
  246. package/src/api/Router/CORS.js +0 -27
  247. package/src/api/Router/Types.d.ts +0 -71
  248. package/src/api/Router/Types.js +0 -2
  249. package/src/api/Router/index.d.ts +0 -18
  250. package/src/api/Router/index.js +0 -145
  251. package/src/api/index.d.ts +0 -3
  252. package/src/api/index.js +0 -39
  253. package/src/app/index.d.ts +0 -1
  254. package/src/app/index.js +0 -37
  255. package/src/app/utils/ApplicationState.js +0 -86
  256. package/src/app/utils/ApplicationStateLoader.js +0 -57
  257. package/src/app/utils/Controller.d.ts +0 -4
  258. package/src/app/utils/Controller.js +0 -47
  259. package/src/app/utils/Debug.d.ts +0 -4
  260. package/src/app/utils/Debug.js +0 -30
  261. package/src/app/utils/EasyLayout.d.ts +0 -49
  262. package/src/app/utils/EasyLayout.js +0 -122
  263. package/src/app/utils/Route.d.ts +0 -28
  264. package/src/app/utils/Route.js +0 -102
  265. package/src/app/utils/Service.d.ts +0 -12
  266. package/src/app/utils/Service.js +0 -34
  267. package/src/app/utils/TypeInfoORMAPIUtils.d.ts +0 -20
  268. package/src/app/utils/TypeInfoORMAPIUtils.js +0 -62
  269. package/src/app/utils/TypeInfoORMClient.d.ts +0 -24
  270. package/src/app/utils/TypeInfoORMClient.js +0 -69
  271. package/src/app/utils/index.d.ts +0 -8
  272. package/src/app/utils/index.js +0 -24
  273. package/src/common/CommandLine/collectRequiredEnvironmentVariables.d.ts +0 -1
  274. package/src/common/CommandLine/collectRequiredEnvironmentVariables.js +0 -16
  275. package/src/common/HelperTypes.d.ts +0 -3
  276. package/src/common/HelperTypes.js +0 -2
  277. package/src/common/IdGeneration/getSimpleId.d.ts +0 -4
  278. package/src/common/IdGeneration/getSimpleId.js +0 -16
  279. package/src/common/IdGeneration/index.js +0 -17
  280. package/src/common/ItemRelationshipInfoTypes.js +0 -20
  281. package/src/common/ItemRelationships/ItemRelationshipValidation.d.ts +0 -10
  282. package/src/common/ItemRelationships/ItemRelationshipValidation.js +0 -43
  283. package/src/common/ItemRelationships/index.d.ts +0 -1
  284. package/src/common/ItemRelationships/index.js +0 -17
  285. package/src/common/Logging/Utils.d.ts +0 -10
  286. package/src/common/Logging/Utils.js +0 -33
  287. package/src/common/Logging/index.js +0 -17
  288. package/src/common/Routing.d.ts +0 -25
  289. package/src/common/Routing.js +0 -102
  290. package/src/common/SearchTypes.d.ts +0 -98
  291. package/src/common/SearchTypes.js +0 -39
  292. package/src/common/SearchUtils.d.ts +0 -22
  293. package/src/common/SearchUtils.js +0 -134
  294. package/src/common/SearchValidation.js +0 -90
  295. package/src/common/Storyboarding/Types.d.ts +0 -25
  296. package/src/common/Storyboarding/Types.js +0 -2
  297. package/src/common/StringTransformers.js +0 -36
  298. package/src/common/Testing/CLI.d.ts +0 -2
  299. package/src/common/Testing/CLI.js +0 -56
  300. package/src/common/Testing/Types.js +0 -19
  301. package/src/common/Testing/Utils.js +0 -334
  302. package/src/common/Testing/index.d.ts +0 -2
  303. package/src/common/Testing/index.js +0 -18
  304. package/src/common/TypeInfoDataItemUtils.d.ts +0 -10
  305. package/src/common/TypeInfoDataItemUtils.js +0 -55
  306. package/src/common/TypeInfoORM/Types.d.ts +0 -76
  307. package/src/common/TypeInfoORM/Types.js +0 -55
  308. package/src/common/TypeInfoORM/index.d.ts +0 -1
  309. package/src/common/TypeInfoORM/index.js +0 -17
  310. package/src/common/TypeParsing/Constants.d.ts +0 -1
  311. package/src/common/TypeParsing/Constants.js +0 -4
  312. package/src/common/TypeParsing/ParsingUtils/Constants.js +0 -8
  313. package/src/common/TypeParsing/ParsingUtils/checkType.js +0 -46
  314. package/src/common/TypeParsing/ParsingUtils/checkUnionType.js +0 -15
  315. package/src/common/TypeParsing/ParsingUtils/extractCommentTags.d.ts +0 -2
  316. package/src/common/TypeParsing/ParsingUtils/extractCommentTags.js +0 -105
  317. package/src/common/TypeParsing/ParsingUtils/extractLiteralValues.d.ts +0 -6
  318. package/src/common/TypeParsing/ParsingUtils/extractLiteralValues.js +0 -42
  319. package/src/common/TypeParsing/ParsingUtils/extractTypeDetails.d.ts +0 -8
  320. package/src/common/TypeParsing/ParsingUtils/extractTypeDetails.js +0 -14
  321. package/src/common/TypeParsing/ParsingUtils/getPrimaryFieldForTypeInfo.d.ts +0 -5
  322. package/src/common/TypeParsing/ParsingUtils/getPrimaryFieldForTypeInfo.js +0 -27
  323. package/src/common/TypeParsing/ParsingUtils/getTypeInfo.d.ts +0 -3
  324. package/src/common/TypeParsing/ParsingUtils/getTypeInfo.js +0 -27
  325. package/src/common/TypeParsing/ParsingUtils/getTypeInfoField.js +0 -44
  326. package/src/common/TypeParsing/ParsingUtils/getTypeInfoFromAliasType.d.ts +0 -4
  327. package/src/common/TypeParsing/ParsingUtils/getTypeInfoFromAliasType.js +0 -28
  328. package/src/common/TypeParsing/ParsingUtils/getTypeInfoFromFieldFilter.d.ts +0 -4
  329. package/src/common/TypeParsing/ParsingUtils/getTypeInfoFromFieldFilter.js +0 -105
  330. package/src/common/TypeParsing/ParsingUtils/getTypeInfoFromTypeAlias.d.ts +0 -4
  331. package/src/common/TypeParsing/ParsingUtils/getTypeInfoFromTypeAlias.js +0 -20
  332. package/src/common/TypeParsing/ParsingUtils/getTypeKeyword.d.ts +0 -3
  333. package/src/common/TypeParsing/ParsingUtils/getTypeKeyword.js +0 -17
  334. package/src/common/TypeParsing/ParsingUtils/getUnionOrIntersectionTypeInfo.d.ts +0 -4
  335. package/src/common/TypeParsing/ParsingUtils/getUnionOrIntersectionTypeInfo.js +0 -49
  336. package/src/common/TypeParsing/ParsingUtils/getUnionOrLiteralStringValues.d.ts +0 -2
  337. package/src/common/TypeParsing/ParsingUtils/getUnionOrLiteralStringValues.js +0 -24
  338. package/src/common/TypeParsing/TypeInfo.js +0 -13
  339. package/src/common/TypeParsing/TypeMapping.js +0 -32
  340. package/src/common/TypeParsing/TypeParsing.d.ts +0 -5
  341. package/src/common/TypeParsing/TypeParsing.js +0 -39
  342. package/src/common/TypeParsing/Utils.js +0 -94
  343. package/src/common/TypeParsing/Validation.js +0 -340
  344. package/src/common/TypeParsing/index.d.ts +0 -5
  345. package/src/common/TypeParsing/index.js +0 -44
  346. package/src/common/index.d.ts +0 -11
  347. package/src/common/index.js +0 -47
  348. package/src/iac/SimpleCFT.js +0 -82
  349. package/src/iac/index.d.ts +0 -9
  350. package/src/iac/index.js +0 -48
  351. package/src/iac/packs/auth/user-management.d.ts +0 -14
  352. package/src/iac/packs/auth/user-management.js +0 -302
  353. package/src/iac/packs/auth.d.ts +0 -19
  354. package/src/iac/packs/auth.js +0 -47
  355. package/src/iac/packs/build/utils.d.ts +0 -100
  356. package/src/iac/packs/build/utils.js +0 -23
  357. package/src/iac/packs/build.d.ts +0 -29
  358. package/src/iac/packs/build.js +0 -217
  359. package/src/iac/packs/cdn.d.ts +0 -12
  360. package/src/iac/packs/cdn.js +0 -126
  361. package/src/iac/packs/cloud-function.d.ts +0 -17
  362. package/src/iac/packs/cloud-function.js +0 -69
  363. package/src/iac/packs/database.js +0 -27
  364. package/src/iac/packs/dns.js +0 -26
  365. package/src/iac/packs/file-storage.d.ts +0 -14
  366. package/src/iac/packs/file-storage.js +0 -71
  367. package/src/iac/packs/gateway.d.ts +0 -27
  368. package/src/iac/packs/gateway.js +0 -342
  369. package/src/iac/packs/index.d.ts +0 -11
  370. package/src/iac/packs/index.js +0 -27
  371. package/src/iac/packs/repo.d.ts +0 -10
  372. package/src/iac/packs/repo.js +0 -34
  373. package/src/iac/packs/ssl-certificate.d.ts +0 -10
  374. package/src/iac/packs/ssl-certificate.js +0 -36
  375. package/src/iac/types/CloudFormationResourceSpecification.d.ts +0 -2
  376. package/src/iac/types/Constants.js +0 -20
  377. package/src/iac/types/IaCTypes.js +0 -14
  378. package/src/iac/types/Renderers.d.ts +0 -12
  379. package/src/iac/types/Renderers.js +0 -112
  380. package/src/iac/types/Types.d.ts +0 -37
  381. package/src/iac/types/Types.js +0 -2
  382. package/src/iac/types/Utils.d.ts +0 -2
  383. package/src/iac/types/Utils.js +0 -60
  384. package/src/iac/types/generate.js +0 -31
  385. package/src/iac/utils/index.js +0 -105
  386. package/src/iac/utils/patch-utils.d.ts +0 -15
  387. package/src/iac/utils/patch-utils.js +0 -62
  388. package/src/index.d.ts +0 -178
  389. package/src/index.js +0 -214
  390. /package/{src/common → common}/IdGeneration/index.d.ts +0 -0
  391. /package/{src/common → common}/Logging/index.d.ts +0 -0
  392. /package/{src/iac → iac}/types/IaCTypes.d.ts +0 -0
  393. /package/{src/iac → iac}/types/generate.d.ts +0 -0
@@ -0,0 +1,1378 @@
1
+ import { createResourcePack, SimpleCFT } from '../../chunk-ATO2455Q.js';
2
+ import '../../chunk-I2KLQ2HA.js';
3
+ import YAML from 'yaml';
4
+
5
+ // src/iac/packs/auth/user-management.ts
6
+ var addUserManagement = createResourcePack(
7
+ (config) => {
8
+ const {
9
+ id,
10
+ authRoleName,
11
+ unauthRoleName,
12
+ callbackUrls,
13
+ logoutUrls,
14
+ apiGatewayRESTAPIId,
15
+ apiStageName
16
+ } = config;
17
+ const isUserPoolDomainEnabled = config.enableUserPoolDomain !== false;
18
+ const supportedIdentityProviders = isUserPoolDomainEnabled && "supportedIdentityProviders" in config && config.supportedIdentityProviders && config.supportedIdentityProviders.length > 0 ? config.supportedIdentityProviders : ["COGNITO"];
19
+ const apiRoleConfig = apiGatewayRESTAPIId && apiStageName ? {
20
+ [`${id}IdentityPoolRoles`]: {
21
+ Type: "AWS::Cognito::IdentityPoolRoleAttachment",
22
+ Properties: {
23
+ IdentityPoolId: {
24
+ Ref: `${id}IdentityPool`
25
+ },
26
+ Roles: {
27
+ authenticated: {
28
+ "Fn::GetAtt": [`${id}AuthRole`, "Arn"]
29
+ },
30
+ unauthenticated: {
31
+ "Fn::GetAtt": [`${id}UnauthRole`, "Arn"]
32
+ }
33
+ }
34
+ }
35
+ },
36
+ [`${id}AuthRole`]: {
37
+ Type: "AWS::IAM::Role",
38
+ Properties: {
39
+ RoleName: authRoleName,
40
+ Path: "/",
41
+ AssumeRolePolicyDocument: {
42
+ Version: "2012-10-17",
43
+ Statement: [
44
+ {
45
+ Effect: "Allow",
46
+ Principal: {
47
+ Federated: "cognito-identity.amazonaws.com"
48
+ },
49
+ Action: ["sts:AssumeRoleWithWebIdentity"],
50
+ Condition: {
51
+ StringEquals: {
52
+ "cognito-identity.amazonaws.com:aud": {
53
+ Ref: `${id}IdentityPool`
54
+ }
55
+ },
56
+ "ForAnyValue:StringLike": {
57
+ "cognito-identity.amazonaws.com:amr": "authenticated"
58
+ }
59
+ }
60
+ }
61
+ ]
62
+ },
63
+ Policies: [
64
+ {
65
+ PolicyName: "CognitoAuthorizedPolicy",
66
+ PolicyDocument: {
67
+ Version: "2012-10-17",
68
+ Statement: [
69
+ {
70
+ Effect: "Allow",
71
+ Action: [
72
+ "mobileanalytics:PutEvents",
73
+ "cognito-sync:*",
74
+ "cognito-identity:*"
75
+ ],
76
+ Resource: "*"
77
+ },
78
+ {
79
+ Effect: "Allow",
80
+ Action: ["execute-api:Invoke"],
81
+ Resource: {
82
+ "Fn::Sub": [
83
+ "arn:aws:execute-api:${Region}:${AccountId}:${APIID}/${StageName}/${HTTPVerb}/api/*",
84
+ {
85
+ Region: {
86
+ Ref: "AWS::Region"
87
+ },
88
+ AccountId: {
89
+ Ref: "AWS::AccountId"
90
+ },
91
+ APIID: apiGatewayRESTAPIId,
92
+ StageName: apiStageName,
93
+ HTTPVerb: "*"
94
+ }
95
+ ]
96
+ }
97
+ }
98
+ ]
99
+ }
100
+ }
101
+ ]
102
+ }
103
+ },
104
+ [`${id}UnauthRole`]: {
105
+ Type: "AWS::IAM::Role",
106
+ Properties: {
107
+ RoleName: unauthRoleName,
108
+ Path: "/",
109
+ AssumeRolePolicyDocument: {
110
+ Version: "2012-10-17",
111
+ Statement: [
112
+ {
113
+ Effect: "Allow",
114
+ Principal: {
115
+ Federated: "cognito-identity.amazonaws.com"
116
+ },
117
+ Action: ["sts:AssumeRoleWithWebIdentity"],
118
+ Condition: {
119
+ StringEquals: {
120
+ "cognito-identity.amazonaws.com:aud": {
121
+ Ref: `${id}IdentityPool`
122
+ }
123
+ },
124
+ "ForAnyValue:StringLike": {
125
+ "cognito-identity.amazonaws.com:amr": "unauthenticated"
126
+ }
127
+ }
128
+ }
129
+ ]
130
+ },
131
+ Policies: [
132
+ {
133
+ PolicyName: "CognitoUnauthorizedPolicy",
134
+ PolicyDocument: {
135
+ Version: "2012-10-17",
136
+ Statement: [
137
+ {
138
+ Effect: "Allow",
139
+ Action: [
140
+ "mobileanalytics:PutEvents",
141
+ "cognito-sync:*",
142
+ "cognito-identity:*"
143
+ ],
144
+ Resource: "*"
145
+ }
146
+ ]
147
+ }
148
+ }
149
+ ]
150
+ }
151
+ }
152
+ } : {};
153
+ const userPoolDomainConfig = config.enableUserPoolDomain === false ? {} : {
154
+ [`${id}BaseDomainRecord`]: !!config.baseDomainRecordAliasTargetDNSName ? {
155
+ Type: "AWS::Route53::RecordSet",
156
+ DeletionPolicy: "Delete",
157
+ Properties: {
158
+ HostedZoneId: config.hostedZoneId,
159
+ Type: "A",
160
+ Name: config.domainName,
161
+ AliasTarget: {
162
+ HostedZoneId: "Z2FDTNDATAQYW2",
163
+ DNSName: config.baseDomainRecordAliasTargetDNSName
164
+ }
165
+ }
166
+ } : void 0,
167
+ [`${id}DomainRecord`]: {
168
+ Type: "AWS::Route53::RecordSet",
169
+ DeletionPolicy: "Delete",
170
+ Properties: {
171
+ HostedZoneId: config.hostedZoneId,
172
+ Type: "A",
173
+ Name: {
174
+ "Fn::Sub": [
175
+ "auth.${BaseDomainName}",
176
+ {
177
+ BaseDomainName: config.domainName
178
+ }
179
+ ]
180
+ },
181
+ AliasTarget: {
182
+ HostedZoneId: "Z2FDTNDATAQYW2",
183
+ DNSName: {
184
+ "Fn::GetAtt": [`${id}Domain`, "CloudFrontDistribution"]
185
+ }
186
+ }
187
+ }
188
+ },
189
+ [`${id}Domain`]: {
190
+ Type: "AWS::Cognito::UserPoolDomain",
191
+ DependsOn: !!config.baseDomainRecordAliasTargetDNSName ? `${id}BaseDomainRecord` : void 0,
192
+ Properties: {
193
+ Domain: {
194
+ "Fn::Sub": [
195
+ "auth.${BaseDomainName}",
196
+ {
197
+ BaseDomainName: config.domainName
198
+ }
199
+ ]
200
+ },
201
+ UserPoolId: {
202
+ Ref: id
203
+ },
204
+ CustomDomainConfig: {
205
+ CertificateArn: config.sslCertificateArn
206
+ }
207
+ }
208
+ }
209
+ };
210
+ return {
211
+ Resources: {
212
+ [id]: {
213
+ Type: "AWS::Cognito::UserPool",
214
+ Properties: {
215
+ UserPoolName: {
216
+ "Fn::Sub": [`\${AWS::StackName}${id}`, {}]
217
+ },
218
+ AccountRecoverySetting: {
219
+ RecoveryMechanisms: [
220
+ {
221
+ Name: "verified_email",
222
+ Priority: 1
223
+ }
224
+ ]
225
+ },
226
+ AdminCreateUserConfig: {
227
+ AllowAdminCreateUserOnly: false,
228
+ UnusedAccountValidityDays: 365
229
+ },
230
+ AutoVerifiedAttributes: ["email"],
231
+ AliasAttributes: ["phone_number", "email", "preferred_username"],
232
+ Schema: [
233
+ {
234
+ Name: "email",
235
+ Required: true,
236
+ Mutable: true
237
+ },
238
+ {
239
+ Name: "given_name",
240
+ Required: true,
241
+ Mutable: true
242
+ },
243
+ {
244
+ Name: "family_name",
245
+ Required: true,
246
+ Mutable: true
247
+ },
248
+ {
249
+ Name: "phone_number",
250
+ Required: true,
251
+ Mutable: true
252
+ }
253
+ ],
254
+ DeviceConfiguration: {
255
+ ChallengeRequiredOnNewDevice: true,
256
+ DeviceOnlyRememberedOnUserPrompt: false
257
+ },
258
+ UsernameConfiguration: {
259
+ CaseSensitive: false
260
+ }
261
+ }
262
+ },
263
+ [`${id}Client`]: {
264
+ Type: "AWS::Cognito::UserPoolClient",
265
+ Properties: {
266
+ ClientName: {
267
+ "Fn::Sub": [`\${AWS::StackName}${id}Client`, {}]
268
+ },
269
+ UserPoolId: {
270
+ Ref: id
271
+ },
272
+ ...isUserPoolDomainEnabled ? {
273
+ AllowedOAuthFlowsUserPoolClient: true,
274
+ AllowedOAuthFlows: ["code", "implicit"],
275
+ AllowedOAuthScopes: [
276
+ "openid",
277
+ "email",
278
+ "phone",
279
+ "profile",
280
+ "aws.cognito.signin.user.admin"
281
+ ],
282
+ SupportedIdentityProviders: supportedIdentityProviders
283
+ } : {
284
+ AllowedOAuthFlowsUserPoolClient: false
285
+ },
286
+ EnableTokenRevocation: true,
287
+ PreventUserExistenceErrors: "ENABLED",
288
+ ...callbackUrls && callbackUrls.length > 0 ? { CallbackURLs: callbackUrls } : {},
289
+ ...logoutUrls && logoutUrls.length > 0 ? { LogoutURLs: logoutUrls } : {}
290
+ }
291
+ },
292
+ [`${id}IdentityPool`]: {
293
+ Type: "AWS::Cognito::IdentityPool",
294
+ Properties: {
295
+ IdentityPoolName: {
296
+ "Fn::Sub": [`\${AWS::StackName}${id}IdentityPool`, {}]
297
+ },
298
+ AllowUnauthenticatedIdentities: false,
299
+ CognitoIdentityProviders: [
300
+ {
301
+ ClientId: {
302
+ Ref: `${id}Client`
303
+ },
304
+ ProviderName: {
305
+ "Fn::GetAtt": [id, "ProviderName"]
306
+ },
307
+ ServerSideTokenCheck: true
308
+ }
309
+ ]
310
+ }
311
+ },
312
+ ...userPoolDomainConfig,
313
+ ...apiRoleConfig
314
+ }
315
+ };
316
+ }
317
+ );
318
+
319
+ // src/iac/packs/auth.ts
320
+ var addAuth = createResourcePack((config) => {
321
+ const {
322
+ userManagementId,
323
+ authRoleName,
324
+ unauthRoleName,
325
+ callbackUrls,
326
+ logoutUrls,
327
+ supportedIdentityProviders,
328
+ apiCloudFunctionGatewayId,
329
+ apiStageName,
330
+ adminGroupId,
331
+ userManagementAdminGroupName
332
+ } = config;
333
+ return new SimpleCFT().applyPack(addUserManagement, {
334
+ id: userManagementId,
335
+ authRoleName,
336
+ unauthRoleName,
337
+ apiGatewayRESTAPIId: {
338
+ Ref: apiCloudFunctionGatewayId
339
+ },
340
+ apiStageName,
341
+ ...config.enableUserPoolDomain === false ? {
342
+ enableUserPoolDomain: false
343
+ } : {
344
+ enableUserPoolDomain: true,
345
+ domainName: {
346
+ Ref: config.domainNameParameterName
347
+ },
348
+ hostedZoneId: {
349
+ Ref: config.hostedZoneIdParameterName
350
+ },
351
+ sslCertificateArn: {
352
+ Ref: config.sslCertificateId
353
+ },
354
+ baseDomainRecordAliasTargetDNSName: {
355
+ "Fn::GetAtt": [config.mainCDNCloudFrontId, "DomainName"]
356
+ },
357
+ callbackUrls,
358
+ logoutUrls,
359
+ supportedIdentityProviders
360
+ }
361
+ }).patch({
362
+ Resources: {
363
+ [adminGroupId]: {
364
+ Type: "AWS::Cognito::UserPoolGroup",
365
+ Properties: {
366
+ GroupName: userManagementAdminGroupName,
367
+ UserPoolId: {
368
+ Ref: userManagementId
369
+ },
370
+ Description: "Application admin group."
371
+ }
372
+ }
373
+ }
374
+ }).template;
375
+ });
376
+
377
+ // src/iac/packs/build.ts
378
+ var DEFAULT_BUILD_PIPELINE_REPO_PROVIDER = "GitHub";
379
+ var addBuildPipeline = createResourcePack(
380
+ ({
381
+ id,
382
+ buildSpec,
383
+ dependsOn,
384
+ environmentVariables,
385
+ timeoutInMinutes = 10,
386
+ environmentType = "LINUX_CONTAINER",
387
+ environmentComputeType = "BUILD_GENERAL1_SMALL",
388
+ environmentImage = "aws/codebuild/nodejs:10.14.1",
389
+ repoConfig: {
390
+ provider = DEFAULT_BUILD_PIPELINE_REPO_PROVIDER,
391
+ owner,
392
+ repo,
393
+ branch,
394
+ oauthToken
395
+ }
396
+ }) => ({
397
+ Resources: {
398
+ [`${id}CodeBuildRole`]: {
399
+ Type: "AWS::IAM::Role",
400
+ Properties: {
401
+ AssumeRolePolicyDocument: {
402
+ Statement: [
403
+ {
404
+ Effect: "Allow",
405
+ Principal: {
406
+ Service: ["codebuild.amazonaws.com"]
407
+ },
408
+ Action: ["sts:AssumeRole"]
409
+ }
410
+ ]
411
+ },
412
+ Path: "/",
413
+ Policies: [
414
+ {
415
+ PolicyName: "codebuild-service",
416
+ PolicyDocument: {
417
+ Statement: [
418
+ {
419
+ Effect: "Allow",
420
+ Action: "*",
421
+ Resource: "*"
422
+ }
423
+ ],
424
+ Version: "2012-10-17"
425
+ }
426
+ }
427
+ ]
428
+ }
429
+ },
430
+ [`${id}CodePipelineRole`]: {
431
+ Type: "AWS::IAM::Role",
432
+ Properties: {
433
+ AssumeRolePolicyDocument: {
434
+ Statement: [
435
+ {
436
+ Effect: "Allow",
437
+ Principal: {
438
+ Service: ["codepipeline.amazonaws.com"]
439
+ },
440
+ Action: ["sts:AssumeRole"]
441
+ }
442
+ ]
443
+ },
444
+ Path: "/",
445
+ Policies: [
446
+ {
447
+ PolicyName: "codepipeline-service",
448
+ PolicyDocument: {
449
+ Statement: [
450
+ {
451
+ Action: ["codebuild:*"],
452
+ Resource: "*",
453
+ Effect: "Allow"
454
+ },
455
+ {
456
+ Action: [
457
+ "s3:GetObject",
458
+ "s3:GetObjectVersion",
459
+ "s3:GetBucketVersioning"
460
+ ],
461
+ Resource: "*",
462
+ Effect: "Allow"
463
+ },
464
+ {
465
+ Action: ["s3:PutObject"],
466
+ Resource: ["arn:aws:s3:::codepipeline*"],
467
+ Effect: "Allow"
468
+ },
469
+ {
470
+ Action: ["s3:*", "cloudformation:*", "iam:PassRole"],
471
+ Resource: "*",
472
+ Effect: "Allow"
473
+ }
474
+ ],
475
+ Version: "2012-10-17"
476
+ }
477
+ }
478
+ ]
479
+ }
480
+ },
481
+ [`${id}PipelineBucket`]: {
482
+ Type: "AWS::S3::Bucket",
483
+ DeletionPolicy: "Delete",
484
+ Properties: {
485
+ BucketEncryption: {
486
+ ServerSideEncryptionConfiguration: [
487
+ {
488
+ ServerSideEncryptionByDefault: {
489
+ SSEAlgorithm: "AES256"
490
+ }
491
+ }
492
+ ]
493
+ },
494
+ PublicAccessBlockConfiguration: {
495
+ BlockPublicAcls: true,
496
+ BlockPublicPolicy: true,
497
+ IgnorePublicAcls: true,
498
+ RestrictPublicBuckets: true
499
+ }
500
+ }
501
+ },
502
+ [`${id}CodeBuildAndDeploy`]: {
503
+ Type: "AWS::CodeBuild::Project",
504
+ DependsOn: dependsOn,
505
+ Properties: {
506
+ Name: {
507
+ "Fn::Sub": `\${AWS::StackName}-${id}CodeBuildAndDeploy`
508
+ },
509
+ Description: "Deploy site to S3",
510
+ ServiceRole: {
511
+ "Fn::GetAtt": [`${id}CodeBuildRole`, "Arn"]
512
+ },
513
+ Artifacts: {
514
+ Type: "CODEPIPELINE"
515
+ },
516
+ Environment: {
517
+ Type: environmentType,
518
+ ComputeType: environmentComputeType,
519
+ Image: environmentImage,
520
+ EnvironmentVariables: environmentVariables
521
+ },
522
+ Source: {
523
+ Type: "CODEPIPELINE",
524
+ BuildSpec: buildSpec
525
+ },
526
+ TimeoutInMinutes: timeoutInMinutes
527
+ }
528
+ },
529
+ [`${id}Pipeline`]: {
530
+ Type: "AWS::CodePipeline::Pipeline",
531
+ DependsOn: `${id}CodeBuildAndDeploy`,
532
+ Properties: {
533
+ RoleArn: {
534
+ "Fn::GetAtt": [`${id}CodePipelineRole`, "Arn"]
535
+ },
536
+ Stages: [
537
+ {
538
+ Name: "Acquire-Source",
539
+ Actions: [
540
+ {
541
+ InputArtifacts: [],
542
+ Name: "Source",
543
+ ActionTypeId: {
544
+ Category: "Source",
545
+ Owner: "ThirdParty",
546
+ Version: "1",
547
+ Provider: provider
548
+ },
549
+ OutputArtifacts: [
550
+ {
551
+ Name: "SourceOutput"
552
+ }
553
+ ],
554
+ Configuration: {
555
+ Owner: owner,
556
+ Repo: repo,
557
+ Branch: branch,
558
+ OAuthToken: oauthToken
559
+ },
560
+ RunOrder: 1
561
+ }
562
+ ]
563
+ },
564
+ {
565
+ Name: "Build-And-Deploy",
566
+ Actions: [
567
+ {
568
+ Name: "Artifact",
569
+ ActionTypeId: {
570
+ Category: "Build",
571
+ Owner: "AWS",
572
+ Version: "1",
573
+ Provider: "CodeBuild"
574
+ },
575
+ InputArtifacts: [
576
+ {
577
+ Name: "SourceOutput"
578
+ }
579
+ ],
580
+ OutputArtifacts: [
581
+ {
582
+ Name: "DeployOutput"
583
+ }
584
+ ],
585
+ Configuration: {
586
+ ProjectName: {
587
+ Ref: `${id}CodeBuildAndDeploy`
588
+ }
589
+ },
590
+ RunOrder: 1
591
+ }
592
+ ]
593
+ }
594
+ ],
595
+ ArtifactStore: {
596
+ Type: "S3",
597
+ Location: {
598
+ Ref: `${id}PipelineBucket`
599
+ }
600
+ }
601
+ }
602
+ }
603
+ }
604
+ })
605
+ );
606
+ var COMMAND_HELPERS = {
607
+ updateFunction: ({
608
+ cloudFunctionArn,
609
+ codeZipFilePath
610
+ }) => `aws lambda update-function-code --function-name "${cloudFunctionArn}" --zip-file "fileb://${codeZipFilePath}"`,
611
+ copyDirectoryToS3: ({
612
+ s3Domain,
613
+ directoryPath
614
+ }) => `aws s3 cp --recursive --acl public-read ${directoryPath} s3://${s3Domain}/`,
615
+ cloudFrontInvalidation: ({
616
+ cloudFrontDistributionId,
617
+ pathsToInvalidate = ["/*"]
618
+ }) => `aws cloudfront create-invalidation --distribution-id "${cloudFrontDistributionId}" --paths "${pathsToInvalidate.join('" "')}"`,
619
+ addNPMTokenWithNPMRC: ({ npmToken }) => `echo '//registry.npmjs.org/:_authToken=${npmToken}' > .npmrc`
620
+ };
621
+ var createBuildSpec = ({ version = 0.2, phases }) => YAML.stringify(
622
+ // TRICKY: Removed all keys with a value of `undefined`.
623
+ JSON.parse(
624
+ JSON.stringify({
625
+ version,
626
+ phases
627
+ })
628
+ )
629
+ );
630
+
631
+ // src/iac/packs/cdn.ts
632
+ var addCDN = createResourcePack(
633
+ ({
634
+ id,
635
+ hostedZoneId,
636
+ domainName,
637
+ certificateArn,
638
+ fileStorageId
639
+ }) => {
640
+ const oacId = `${id}OriginAccessControl`;
641
+ return {
642
+ Resources: {
643
+ [oacId]: {
644
+ Type: "AWS::CloudFront::OriginAccessControl",
645
+ Properties: {
646
+ OriginAccessControlConfig: {
647
+ Name: oacId,
648
+ OriginAccessControlOriginType: "s3",
649
+ SigningBehavior: "always",
650
+ SigningProtocol: "sigv4"
651
+ }
652
+ }
653
+ },
654
+ [id]: {
655
+ Type: "AWS::CloudFront::Distribution",
656
+ DependsOn: fileStorageId,
657
+ Properties: {
658
+ DistributionConfig: {
659
+ Aliases: [domainName],
660
+ ViewerCertificate: {
661
+ AcmCertificateArn: certificateArn,
662
+ SslSupportMethod: "sni-only",
663
+ MinimumProtocolVersion: "TLSv1.1_2016"
664
+ },
665
+ DefaultCacheBehavior: {
666
+ ForwardedValues: {
667
+ QueryString: false
668
+ },
669
+ TargetOriginId: {
670
+ "Fn::Sub": [
671
+ "S3-${S3BucketName}",
672
+ {
673
+ S3BucketName: domainName
674
+ }
675
+ ]
676
+ },
677
+ ViewerProtocolPolicy: "redirect-to-https"
678
+ },
679
+ DefaultRootObject: "index.html",
680
+ Enabled: true,
681
+ IPV6Enabled: false,
682
+ HttpVersion: "http2",
683
+ Origins: [
684
+ {
685
+ DomainName: {
686
+ "Fn::Sub": [
687
+ "${S3BucketName}.s3.amazonaws.com",
688
+ {
689
+ S3BucketName: domainName
690
+ }
691
+ ]
692
+ },
693
+ Id: {
694
+ "Fn::Sub": [
695
+ "S3-${S3BucketName}",
696
+ {
697
+ S3BucketName: domainName
698
+ }
699
+ ]
700
+ },
701
+ OriginAccessControlId: { Ref: oacId },
702
+ S3OriginConfig: {
703
+ OriginAccessIdentity: ""
704
+ }
705
+ }
706
+ ],
707
+ CustomErrorResponses: [
708
+ {
709
+ ErrorCachingMinTTL: 300,
710
+ ErrorCode: 404,
711
+ ResponseCode: 200,
712
+ ResponsePagePath: "/index.html"
713
+ },
714
+ {
715
+ ErrorCachingMinTTL: 300,
716
+ ErrorCode: 403,
717
+ ResponseCode: 200,
718
+ ResponsePagePath: "/index.html"
719
+ }
720
+ ],
721
+ PriceClass: "PriceClass_All"
722
+ }
723
+ }
724
+ },
725
+ [`${id}Route53Record`]: {
726
+ Type: "AWS::Route53::RecordSet",
727
+ DependsOn: [id],
728
+ Properties: {
729
+ HostedZoneId: hostedZoneId,
730
+ Type: "A",
731
+ Name: {
732
+ "Fn::Sub": [
733
+ "${DomainName}.",
734
+ {
735
+ DomainName: domainName
736
+ }
737
+ ]
738
+ },
739
+ AliasTarget: {
740
+ HostedZoneId: "Z2FDTNDATAQYW2",
741
+ DNSName: {
742
+ "Fn::Sub": [
743
+ "${DomainName}.",
744
+ {
745
+ DomainName: {
746
+ "Fn::GetAtt": [id, "DomainName"]
747
+ }
748
+ }
749
+ ]
750
+ }
751
+ }
752
+ }
753
+ }
754
+ }
755
+ };
756
+ }
757
+ );
758
+
759
+ // src/iac/packs/cloud-function.ts
760
+ var PLACEHOLDER_FUNCTION_CODE = {
761
+ ZipFile: `module.exports = {handler: async () => ({
762
+ statusCode: 200,
763
+ headers: {'Content-Type': 'application/json'},
764
+ body: '"You did it!"'
765
+ })};
766
+ `
767
+ };
768
+ var addCloudFunction = createResourcePack(
769
+ ({
770
+ id,
771
+ code = PLACEHOLDER_FUNCTION_CODE,
772
+ environment = {
773
+ Variables: {
774
+ NODE_ENV: "production"
775
+ }
776
+ },
777
+ handler = "index.handler",
778
+ runtime = "nodejs26.x",
779
+ timeout = 30,
780
+ policies = [
781
+ {
782
+ PolicyName: "lambda-parameter-store",
783
+ PolicyDocument: {
784
+ Version: "2012-10-17",
785
+ Statement: [
786
+ {
787
+ Effect: "Allow",
788
+ Action: ["*"],
789
+ Resource: "*"
790
+ }
791
+ ]
792
+ }
793
+ }
794
+ ],
795
+ memorySize = 128
796
+ }) => {
797
+ return {
798
+ Resources: {
799
+ [`${id}Role`]: {
800
+ Type: "AWS::IAM::Role",
801
+ Properties: {
802
+ ManagedPolicyArns: [
803
+ "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
804
+ ],
805
+ AssumeRolePolicyDocument: {
806
+ Version: "2012-10-17",
807
+ Statement: [
808
+ {
809
+ Action: ["sts:AssumeRole"],
810
+ Effect: "Allow",
811
+ Principal: {
812
+ Service: ["lambda.amazonaws.com"]
813
+ }
814
+ }
815
+ ]
816
+ },
817
+ Policies: policies
818
+ }
819
+ },
820
+ [id]: {
821
+ Type: "AWS::Lambda::Function",
822
+ Properties: {
823
+ Timeout: timeout,
824
+ Code: code,
825
+ Environment: environment,
826
+ Handler: handler,
827
+ Role: {
828
+ "Fn::GetAtt": [`${id}Role`, "Arn"]
829
+ },
830
+ Runtime: runtime,
831
+ MemorySize: memorySize
832
+ }
833
+ }
834
+ }
835
+ };
836
+ }
837
+ );
838
+
839
+ // src/iac/packs/database.ts
840
+ var addDatabase = createResourcePack(
841
+ ({
842
+ tableId,
843
+ tableName,
844
+ keys,
845
+ attributes,
846
+ billingMode = "PAY_PER_REQUEST"
847
+ }) => new SimpleCFT().patch({
848
+ Resources: {
849
+ [tableId]: {
850
+ Type: "AWS::DynamoDB::Table",
851
+ Properties: {
852
+ TableName: tableName,
853
+ AttributeDefinitions: Object.keys(attributes).map(
854
+ (attributeName) => ({
855
+ AttributeName: attributeName,
856
+ AttributeType: attributes[attributeName]
857
+ })
858
+ ),
859
+ KeySchema: Object.keys(keys).map((keyName) => ({
860
+ AttributeName: keyName,
861
+ KeyType: keys[keyName]
862
+ })),
863
+ BillingMode: billingMode
864
+ }
865
+ }
866
+ }
867
+ }).template
868
+ );
869
+
870
+ // src/iac/packs/dns.ts
871
+ var addDNS = createResourcePack(
872
+ ({
873
+ id,
874
+ hostedZoneId,
875
+ domainName,
876
+ resourceRecords,
877
+ recordType = "A"
878
+ }) => {
879
+ let cft = new SimpleCFT().patch({
880
+ Resources: {
881
+ [id]: {
882
+ Type: "AWS::Route53::RecordSet",
883
+ Properties: {
884
+ HostedZoneId: hostedZoneId,
885
+ Type: recordType,
886
+ Name: domainName,
887
+ ResourceRecords: resourceRecords,
888
+ TTL: "300"
889
+ }
890
+ }
891
+ }
892
+ });
893
+ return cft.template;
894
+ }
895
+ );
896
+
897
+ // src/iac/packs/file-storage.ts
898
+ var addSecureFileStorage = createResourcePack(
899
+ ({
900
+ id,
901
+ bucketName,
902
+ shouldDelete = true,
903
+ blockPublicAccess = true,
904
+ cors = false,
905
+ accessControl = void 0,
906
+ allowACLs = false
907
+ }) => {
908
+ return {
909
+ Resources: {
910
+ [id]: {
911
+ Type: "AWS::S3::Bucket",
912
+ DeletionPolicy: shouldDelete ? "Delete" : "Retain",
913
+ Properties: {
914
+ BucketName: bucketName,
915
+ AccessControl: accessControl,
916
+ OwnershipControls: allowACLs ? {
917
+ Rules: [
918
+ {
919
+ ObjectOwnership: "ObjectWriter"
920
+ }
921
+ ]
922
+ } : void 0,
923
+ CorsConfiguration: typeof cors === "object" ? cors : cors === true ? {
924
+ CorsRules: [
925
+ {
926
+ AllowedHeaders: ["*"],
927
+ AllowedMethods: [
928
+ "GET",
929
+ "PUT",
930
+ "POST",
931
+ "DELETE",
932
+ "HEAD"
933
+ ],
934
+ AllowedOrigins: ["*"]
935
+ }
936
+ ]
937
+ } : void 0,
938
+ BucketEncryption: {
939
+ ServerSideEncryptionConfiguration: [
940
+ {
941
+ ServerSideEncryptionByDefault: {
942
+ SSEAlgorithm: "AES256"
943
+ }
944
+ }
945
+ ]
946
+ },
947
+ PublicAccessBlockConfiguration: blockPublicAccess ? {
948
+ BlockPublicAcls: true,
949
+ BlockPublicPolicy: true,
950
+ IgnorePublicAcls: true,
951
+ RestrictPublicBuckets: true
952
+ } : {
953
+ BlockPublicAcls: false,
954
+ BlockPublicPolicy: false,
955
+ IgnorePublicAcls: false,
956
+ RestrictPublicBuckets: false
957
+ }
958
+ }
959
+ }
960
+ }
961
+ };
962
+ }
963
+ );
964
+
965
+ // src/iac/packs/gateway.ts
966
+ var DEFAULT_AUTH_TYPE = "COGNITO_USER_POOLS";
967
+ var addGateway = createResourcePack(
968
+ ({
969
+ id,
970
+ hostedZoneId,
971
+ domainName,
972
+ certificateArn,
973
+ cloudFunction: {
974
+ id: cloudFunctionId,
975
+ region: cloudFunctionRegion = "${AWS::Region}"
976
+ },
977
+ stageName = "production",
978
+ authorizer,
979
+ deploymentSuffix = ""
980
+ }) => {
981
+ const cloudFunctionUri = {
982
+ "Fn::Sub": `arn:aws:apigateway:${cloudFunctionRegion}:lambda:path/2015-03-31/functions/\${${cloudFunctionId}.Arn}/invocations`
983
+ };
984
+ const {
985
+ scopes: authScopes = ["phone", "email", "openid", "profile"],
986
+ type: authType = "COGNITO_USER_POOLS",
987
+ providerARNs,
988
+ identitySource = "method.request.header.authorization"
989
+ } = !!authorizer && typeof authorizer === "object" ? authorizer : {};
990
+ const authorizerId = `${id}CustomAuthorizer`;
991
+ const authProps = !!authorizer ? {
992
+ AuthorizationScopes: authScopes,
993
+ AuthorizationType: authType === DEFAULT_AUTH_TYPE ? DEFAULT_AUTH_TYPE : "CUSTOM",
994
+ AuthorizerId: {
995
+ Ref: authorizerId
996
+ }
997
+ } : {
998
+ AuthorizationType: "NONE"
999
+ };
1000
+ const fullDeploymentId = `${id}GatewayRESTAPIDeployment${deploymentSuffix}`;
1001
+ return new SimpleCFT().patch({
1002
+ Resources: {
1003
+ // REST API
1004
+ [id]: {
1005
+ Type: "AWS::ApiGateway::RestApi",
1006
+ Properties: {
1007
+ Name: {
1008
+ "Fn::Sub": `\${AWS::StackName}-${id}GatewayRESTAPI`
1009
+ },
1010
+ EndpointConfiguration: {
1011
+ Types: ["EDGE"]
1012
+ }
1013
+ }
1014
+ },
1015
+ [`${id}GatewayRESTAPIResource`]: {
1016
+ Type: "AWS::ApiGateway::Resource",
1017
+ DependsOn: id,
1018
+ Properties: {
1019
+ ParentId: {
1020
+ "Fn::GetAtt": [id, "RootResourceId"]
1021
+ },
1022
+ PathPart: "{proxy+}",
1023
+ RestApiId: {
1024
+ Ref: id
1025
+ }
1026
+ }
1027
+ },
1028
+ [`${id}GatewayRESTAPIMethod`]: {
1029
+ Type: "AWS::ApiGateway::Method",
1030
+ DependsOn: `${id}GatewayRESTAPIResource`,
1031
+ Properties: {
1032
+ ...authProps,
1033
+ HttpMethod: "ANY",
1034
+ ResourceId: {
1035
+ Ref: `${id}GatewayRESTAPIResource`
1036
+ },
1037
+ RestApiId: {
1038
+ Ref: id
1039
+ },
1040
+ Integration: {
1041
+ Type: "AWS_PROXY",
1042
+ IntegrationHttpMethod: "POST",
1043
+ Uri: cloudFunctionUri
1044
+ }
1045
+ }
1046
+ },
1047
+ [`${id}GatewayRESTAPIRootMethod`]: {
1048
+ Type: "AWS::ApiGateway::Method",
1049
+ DependsOn: `${id}GatewayRESTAPIResource`,
1050
+ Properties: {
1051
+ ...authProps,
1052
+ HttpMethod: "ANY",
1053
+ ResourceId: {
1054
+ "Fn::GetAtt": [id, "RootResourceId"]
1055
+ },
1056
+ RestApiId: {
1057
+ Ref: id
1058
+ },
1059
+ Integration: {
1060
+ Type: "AWS_PROXY",
1061
+ IntegrationHttpMethod: "POST",
1062
+ Uri: cloudFunctionUri
1063
+ }
1064
+ }
1065
+ }
1066
+ }
1067
+ }).patch({
1068
+ Resources: {
1069
+ // CORS
1070
+ [`${id}GatewayRESTAPIOPTIONSMethod`]: {
1071
+ Type: "AWS::ApiGateway::Method",
1072
+ DependsOn: `${id}GatewayRESTAPIResource`,
1073
+ Properties: {
1074
+ AuthorizationType: "NONE",
1075
+ HttpMethod: "OPTIONS",
1076
+ ResourceId: {
1077
+ Ref: `${id}GatewayRESTAPIResource`
1078
+ },
1079
+ RestApiId: {
1080
+ Ref: id
1081
+ },
1082
+ Integration: {
1083
+ Type: "AWS_PROXY",
1084
+ IntegrationHttpMethod: "POST",
1085
+ Uri: cloudFunctionUri
1086
+ }
1087
+ }
1088
+ },
1089
+ [`${id}GatewayRESTAPIRootOPTIONSMethod`]: {
1090
+ Type: "AWS::ApiGateway::Method",
1091
+ DependsOn: `${id}GatewayRESTAPIResource`,
1092
+ Properties: {
1093
+ AuthorizationType: "NONE",
1094
+ HttpMethod: "OPTIONS",
1095
+ ResourceId: {
1096
+ "Fn::GetAtt": [id, "RootResourceId"]
1097
+ },
1098
+ RestApiId: {
1099
+ Ref: id
1100
+ },
1101
+ Integration: {
1102
+ Type: "AWS_PROXY",
1103
+ IntegrationHttpMethod: "POST",
1104
+ Uri: cloudFunctionUri
1105
+ }
1106
+ }
1107
+ },
1108
+ [`${id}GatewayResponseDefault4XX`]: {
1109
+ Type: "AWS::ApiGateway::GatewayResponse",
1110
+ Properties: {
1111
+ ResponseParameters: {
1112
+ // Not authorized, so just allow the current origin by mapping it into the header.
1113
+ "gatewayresponse.header.Access-Control-Allow-Origin": "method.request.header.origin",
1114
+ "gatewayresponse.header.Access-Control-Allow-Credentials": "'true'",
1115
+ "gatewayresponse.header.Access-Control-Allow-Headers": "'*'"
1116
+ },
1117
+ ResponseType: "DEFAULT_4XX",
1118
+ RestApiId: {
1119
+ Ref: id
1120
+ }
1121
+ }
1122
+ }
1123
+ }
1124
+ }).patch({
1125
+ Resources: {
1126
+ // SUPPORTING RESOURCES
1127
+ [fullDeploymentId]: {
1128
+ Type: "AWS::ApiGateway::Deployment",
1129
+ DependsOn: [
1130
+ `${id}GatewayRESTAPIResource`,
1131
+ `${id}GatewayRESTAPIMethod`,
1132
+ `${id}GatewayRESTAPIRootMethod`,
1133
+ id,
1134
+ cloudFunctionId
1135
+ ],
1136
+ Properties: {
1137
+ RestApiId: {
1138
+ Ref: id
1139
+ }
1140
+ }
1141
+ },
1142
+ [`${id}CloudWatch`]: {
1143
+ Type: "AWS::Logs::LogGroup",
1144
+ Properties: {
1145
+ LogGroupName: {
1146
+ "Fn::Sub": `\${AWS::StackName}-${id}GatewayLogs`
1147
+ }
1148
+ }
1149
+ },
1150
+ [`${id}CloudWatchRole`]: {
1151
+ Type: "AWS::IAM::Role",
1152
+ Properties: {
1153
+ AssumeRolePolicyDocument: {
1154
+ Version: "2012-10-17",
1155
+ Statement: [
1156
+ {
1157
+ Effect: "Allow",
1158
+ Principal: {
1159
+ Service: ["apigateway.amazonaws.com"]
1160
+ },
1161
+ Action: "sts:AssumeRole"
1162
+ }
1163
+ ]
1164
+ },
1165
+ Path: "/",
1166
+ ManagedPolicyArns: [
1167
+ "arn:aws:iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs"
1168
+ ]
1169
+ }
1170
+ },
1171
+ [`${id}CloudWatchAccount`]: {
1172
+ Type: "AWS::ApiGateway::Account",
1173
+ Properties: {
1174
+ CloudWatchRoleArn: {
1175
+ "Fn::GetAtt": [`${id}CloudWatchRole`, "Arn"]
1176
+ }
1177
+ }
1178
+ },
1179
+ [`${id}GatewayRESTAPIEnvironment`]: {
1180
+ Type: "AWS::ApiGateway::Stage",
1181
+ DependsOn: [`${id}CloudWatchAccount`, fullDeploymentId],
1182
+ Properties: {
1183
+ AccessLogSetting: {
1184
+ DestinationArn: {
1185
+ "Fn::GetAtt": [`${id}CloudWatch`, "Arn"]
1186
+ },
1187
+ Format: '{"requestId":"$context.requestId","ip":"$context.identity.sourceIp","caller":"$context.identity.caller","user":"$context.identity.user","requestTime":"$context.requestTime","httpMethod":"$context.httpMethod","resourcePath":"$context.resourcePath","status":"$context.status","protocol":"$context.protocol","responseLength":"$context.responseLength","apiGatewayErrorMessage":"$context.error.message"}'
1188
+ },
1189
+ DeploymentId: {
1190
+ Ref: fullDeploymentId
1191
+ },
1192
+ RestApiId: {
1193
+ Ref: id
1194
+ },
1195
+ StageName: stageName
1196
+ }
1197
+ }
1198
+ }
1199
+ }).patch({
1200
+ Resources: {
1201
+ // DNS
1202
+ [`${id}DomainName`]: {
1203
+ Type: "AWS::ApiGateway::DomainName",
1204
+ Properties: {
1205
+ CertificateArn: certificateArn,
1206
+ DomainName: domainName,
1207
+ EndpointConfiguration: {
1208
+ Types: ["EDGE"]
1209
+ }
1210
+ }
1211
+ },
1212
+ [`${id}DomainNameBasePathMapping`]: {
1213
+ Type: "AWS::ApiGateway::BasePathMapping",
1214
+ DependsOn: [
1215
+ id,
1216
+ `${id}GatewayRESTAPIEnvironment`,
1217
+ `${id}DomainName`
1218
+ ],
1219
+ Properties: {
1220
+ DomainName: domainName,
1221
+ RestApiId: {
1222
+ Ref: id
1223
+ },
1224
+ Stage: stageName
1225
+ }
1226
+ },
1227
+ [`${id}Route53Record`]: {
1228
+ Type: "AWS::Route53::RecordSet",
1229
+ DependsOn: `${id}DomainName`,
1230
+ Properties: {
1231
+ HostedZoneId: hostedZoneId,
1232
+ Type: "A",
1233
+ Name: {
1234
+ "Fn::Sub": [
1235
+ "${DomainName}.",
1236
+ {
1237
+ DomainName: domainName
1238
+ }
1239
+ ]
1240
+ },
1241
+ AliasTarget: {
1242
+ HostedZoneId: "Z2FDTNDATAQYW2",
1243
+ DNSName: {
1244
+ "Fn::Sub": [
1245
+ "${DomainName}.",
1246
+ {
1247
+ DomainName: {
1248
+ "Fn::GetAtt": [
1249
+ `${id}DomainName`,
1250
+ "DistributionDomainName"
1251
+ ]
1252
+ }
1253
+ }
1254
+ ]
1255
+ }
1256
+ }
1257
+ }
1258
+ }
1259
+ }
1260
+ }).patch({
1261
+ Resources: {
1262
+ // PERMISSIONS
1263
+ [`${id}CloudFunctionANYResourcePermission`]: {
1264
+ Type: "AWS::Lambda::Permission",
1265
+ Properties: {
1266
+ Action: "lambda:InvokeFunction",
1267
+ Principal: "apigateway.amazonaws.com",
1268
+ FunctionName: {
1269
+ "Fn::GetAtt": [cloudFunctionId, "Arn"]
1270
+ },
1271
+ SourceArn: {
1272
+ "Fn::Sub": [
1273
+ "arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${__ApiId__}/${__Stage__}/*/*",
1274
+ {
1275
+ __Stage__: stageName,
1276
+ __ApiId__: {
1277
+ Ref: id
1278
+ }
1279
+ }
1280
+ ]
1281
+ }
1282
+ }
1283
+ }
1284
+ }
1285
+ }).patch(
1286
+ !!authorizer ? {
1287
+ Resources: {
1288
+ // AUTHORIZER
1289
+ [`${id}CustomAuthorizer`]: {
1290
+ Type: "AWS::ApiGateway::Authorizer",
1291
+ Properties: {
1292
+ IdentitySource: identitySource,
1293
+ Name: `${id}CustomAuthorizer`,
1294
+ ProviderARNs: providerARNs,
1295
+ RestApiId: {
1296
+ Ref: id
1297
+ },
1298
+ Type: "COGNITO_USER_POOLS"
1299
+ }
1300
+ }
1301
+ }
1302
+ } : {}
1303
+ ).template;
1304
+ }
1305
+ );
1306
+
1307
+ // src/iac/packs/repo.ts
1308
+ var addRepo = createResourcePack(
1309
+ ({
1310
+ repoOwnerParameterName,
1311
+ repoNameParameterName,
1312
+ repoBranchParameterName,
1313
+ repoTokenParameterName
1314
+ }) => new SimpleCFT().addParameterGroup({
1315
+ Label: "Repository",
1316
+ Parameters: {
1317
+ [repoOwnerParameterName]: {
1318
+ Label: "RepoOwner",
1319
+ Type: "String",
1320
+ Description: "The owner of the repository"
1321
+ },
1322
+ [repoNameParameterName]: {
1323
+ Label: "RepoName",
1324
+ Type: "String",
1325
+ Description: "The name of the repository"
1326
+ },
1327
+ [repoBranchParameterName]: {
1328
+ Label: "RepoBranch",
1329
+ Type: "String",
1330
+ Description: "The branch of the repository"
1331
+ },
1332
+ [repoTokenParameterName]: {
1333
+ Label: "RepoToken",
1334
+ Type: "String",
1335
+ Description: "The token of the repository",
1336
+ NoEcho: true
1337
+ }
1338
+ }
1339
+ }).template
1340
+ );
1341
+
1342
+ // src/iac/packs/ssl-certificate.ts
1343
+ var addSSLCertificate = createResourcePack(
1344
+ ({
1345
+ id,
1346
+ domainName,
1347
+ hostedZoneId,
1348
+ includeWildCard = true
1349
+ }) => ({
1350
+ Resources: {
1351
+ [id]: {
1352
+ Type: "AWS::CertificateManager::Certificate",
1353
+ Properties: {
1354
+ DomainName: domainName,
1355
+ ValidationMethod: "DNS",
1356
+ DomainValidationOptions: [
1357
+ {
1358
+ DomainName: domainName,
1359
+ HostedZoneId: hostedZoneId
1360
+ }
1361
+ ],
1362
+ SubjectAlternativeNames: includeWildCard ? [
1363
+ {
1364
+ "Fn::Sub": [
1365
+ "*.${BaseDomainName}",
1366
+ {
1367
+ BaseDomainName: domainName
1368
+ }
1369
+ ]
1370
+ }
1371
+ ] : void 0
1372
+ }
1373
+ }
1374
+ }
1375
+ })
1376
+ );
1377
+
1378
+ export { COMMAND_HELPERS, DEFAULT_AUTH_TYPE, DEFAULT_BUILD_PIPELINE_REPO_PROVIDER, PLACEHOLDER_FUNCTION_CODE, addAuth, addBuildPipeline, addCDN, addCloudFunction, addDNS, addDatabase, addGateway, addRepo, addSSLCertificate, addSecureFileStorage, createBuildSpec };