@resistdesign/voltra 0.0.0-alpha.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/.releaserc +3 -0
  2. package/README.md +4 -51
  3. package/api/ORM/CriteriaUtils/CriteriaUtils.d.ts +7 -0
  4. package/api/ORM/CriteriaUtils/CriteriaUtils.js +140 -0
  5. package/api/ORM/CriteriaUtils/CriterionDriverResolutionTools.d.ts +4 -0
  6. package/api/ORM/CriteriaUtils/CriterionDriverResolutionTools.js +23 -0
  7. package/api/ORM/CriteriaUtils/index.d.ts +2 -0
  8. package/api/ORM/CriteriaUtils/index.js +18 -0
  9. package/api/ORM/DataContextService.d.ts +68 -0
  10. package/api/ORM/DataContextService.js +352 -0
  11. package/api/ORM/SearchCriteriaTypes.d.ts +83 -0
  12. package/api/ORM/SearchCriteriaTypes.js +47 -0
  13. package/api/ORM/ServiceTypes/DBServiceTypes.d.ts +30 -0
  14. package/api/ORM/ServiceTypes/FileServiceTypes.d.ts +25 -0
  15. package/api/ORM/ServiceTypes/index.d.ts +2 -0
  16. package/api/ORM/ServiceTypes/index.js +18 -0
  17. package/api/ORM/TypeStructureUtils.d.ts +17 -0
  18. package/api/ORM/TypeStructureUtils.js +120 -0
  19. package/api/ORM/drivers/db/DynamoDBServiceItem.d.ts +19 -0
  20. package/api/ORM/drivers/db/DynamoDBServiceItem.js +206 -0
  21. package/api/ORM/drivers/db/S3DBServiceItem.d.ts +17 -0
  22. package/api/ORM/drivers/db/S3DBServiceItem.js +118 -0
  23. package/api/ORM/drivers/db/index.d.ts +2 -0
  24. package/{src/api/ORM/drivers/common → api/ORM/drivers/db}/index.js +2 -2
  25. package/api/ORM/drivers/file/S3.d.ts +15 -0
  26. package/api/ORM/drivers/file/S3.js +97 -0
  27. package/api/ORM/drivers/file/index.d.ts +1 -0
  28. package/{src/common/TypeInfoORM → api/ORM/drivers/file}/index.js +1 -1
  29. package/api/ORM/drivers/index.d.ts +2 -0
  30. package/{src/common/ItemRelationships → api/ORM/drivers}/index.js +2 -1
  31. package/api/ORM/index.d.ts +6 -0
  32. package/api/ORM/index.js +32 -0
  33. package/{src/api → api}/Router/AWS.js +2 -8
  34. package/{src/api → api}/Router/CORS.d.ts +1 -1
  35. package/{src/api → api}/Router/CORS.js +10 -10
  36. package/{src/api → api}/Router/Types.d.ts +1 -1
  37. package/{src/api → api}/Router/index.js +18 -22
  38. package/api/index.d.ts +2 -0
  39. package/{src/api → api}/index.js +8 -19
  40. package/app/components/BaseForm.d.ts +9 -0
  41. package/app/components/BaseForm.js +37 -0
  42. package/app/components/FormGen/Application.d.ts +10 -0
  43. package/app/components/FormGen/Application.js +58 -0
  44. package/app/components/FormGen/Display.d.ts +13 -0
  45. package/app/components/FormGen/Display.js +69 -0
  46. package/app/components/FormGen/Editor.d.ts +12 -0
  47. package/app/components/FormGen/Editor.js +46 -0
  48. package/app/components/FormGen/Form.d.ts +5 -0
  49. package/app/components/FormGen/Form.js +25 -0
  50. package/app/components/FormGen/HelperTypes.d.ts +41 -0
  51. package/app/components/FormGen/HelperTypes.js +27 -0
  52. package/app/components/FormGen/IdUtils.d.ts +3 -0
  53. package/app/components/FormGen/IdUtils.js +22 -0
  54. package/app/components/FormGen/Input.d.ts +13 -0
  55. package/app/components/FormGen/Input.js +82 -0
  56. package/app/components/FormGen/Layout.d.ts +20 -0
  57. package/app/components/FormGen/Layout.js +107 -0
  58. package/app/components/FormGen/List.d.ts +12 -0
  59. package/app/components/FormGen/List.js +134 -0
  60. package/app/components/FormGen/Navigation.d.ts +27 -0
  61. package/app/components/FormGen/Navigation.js +82 -0
  62. package/app/components/FormGen/Storage/LocalJSON.d.ts +8 -0
  63. package/app/components/FormGen/Storage/LocalJSON.js +35 -0
  64. package/app/components/FormGen/Storage/index.d.ts +1 -0
  65. package/{src/common/Logging → app/components/FormGen/Storage}/index.js +1 -1
  66. package/app/components/FormGen/TypeStructureComponent.d.ts +20 -0
  67. package/app/components/FormGen/TypeStructureComponent.js +223 -0
  68. package/app/components/FormGen/ValueProcessing/HashMatrix.d.ts +50 -0
  69. package/app/components/FormGen/ValueProcessing/HashMatrix.js +268 -0
  70. package/app/components/FormGen/ValueProcessing/index.d.ts +1 -0
  71. package/{src/common/IdGeneration → app/components/FormGen/ValueProcessing}/index.js +1 -1
  72. package/app/components/FormGen/index.d.ts +13 -0
  73. package/app/components/FormGen/index.js +42 -0
  74. package/app/components/MaterialSymbol.d.ts +8 -0
  75. package/app/components/MaterialSymbol.js +22 -0
  76. package/app/components/Tabs.d.ts +9 -0
  77. package/app/components/Tabs.js +26 -0
  78. package/app/components/index.d.ts +4 -0
  79. package/{src/api/ORM → app/components}/index.js +12 -22
  80. package/app/index.d.ts +2 -0
  81. package/{src/app → app}/index.js +9 -18
  82. package/{src/app → app}/utils/ApplicationState.d.ts +1 -1
  83. package/{src/app → app}/utils/ApplicationState.js +3 -9
  84. package/{src/app → app}/utils/ApplicationStateLoader.js +13 -4
  85. package/{src/app → app}/utils/Controller.js +1 -4
  86. package/{src/app → app}/utils/Debug.d.ts +0 -3
  87. package/{src/app → app}/utils/Debug.js +1 -4
  88. package/{src/app → app}/utils/EasyLayout.d.ts +1 -1
  89. package/{src/app → app}/utils/EasyLayout.js +2 -5
  90. package/{src/app → app}/utils/Route.d.ts +1 -1
  91. package/{src/app → app}/utils/Route.js +4 -8
  92. package/{src/app → app}/utils/Service.js +14 -5
  93. package/{src/app → app}/utils/index.d.ts +0 -1
  94. package/{src/app → app}/utils/index.js +0 -1
  95. package/common/Routing.d.ts +20 -0
  96. package/{src/common → common}/Routing.js +10 -32
  97. package/common/TypeParsing/TypeParsing.d.ts +5 -0
  98. package/common/TypeParsing/TypeParsing.js +283 -0
  99. package/common/TypeParsing/TypeUtils.d.ts +86 -0
  100. package/common/TypeParsing/TypeUtils.js +281 -0
  101. package/common/TypeParsing/index.d.ts +2 -0
  102. package/{src/common/Testing → common/TypeParsing}/index.js +2 -2
  103. package/common/index.d.ts +2 -0
  104. package/common/index.js +28 -0
  105. package/{src/iac → iac}/SimpleCFT.d.ts +1 -21
  106. package/iac/SimpleCFT.js +67 -0
  107. package/{src/iac → iac}/index.js +7 -17
  108. package/iac/packs/abstract/user-management/UserPoolAliasTargetCustomResourceCode.d.ts +2 -0
  109. package/iac/packs/abstract/user-management/UserPoolAliasTargetCustomResourceCode.js +86 -0
  110. package/{src/iac/packs/auth → iac/packs/abstract}/user-management.js +88 -16
  111. package/{src/iac → iac}/packs/auth.js +1 -1
  112. package/{src/iac → iac}/packs/build/utils.d.ts +1 -1
  113. package/{src/iac → iac}/packs/build.d.ts +2 -7
  114. package/{src/iac → iac}/packs/cloud-function.d.ts +1 -2
  115. package/{src/iac → iac}/packs/cloud-function.js +1 -1
  116. package/iac/packs/database.d.ts +10 -0
  117. package/{src/iac → iac}/packs/database.js +1 -2
  118. package/iac/packs/dns.d.ts +11 -0
  119. package/iac/packs/dns.js +60 -0
  120. package/{src/iac → iac}/packs/gateway.d.ts +1 -2
  121. package/{src/iac → iac}/packs/gateway.js +8 -20
  122. package/{src/iac → iac}/types/CloudFormationResourceSpecification.d.ts +1 -1
  123. package/iac/types/CloudFormationResourceSpecification.js +196438 -0
  124. package/{src/iac → iac}/types/Renderers.js +1 -1
  125. package/{src/iac → iac}/types/Utils.js +2 -7
  126. package/{src/iac → iac}/types/generate.js +15 -5
  127. package/{src/iac → iac}/utils/index.d.ts +1 -4
  128. package/{src/iac → iac}/utils/index.js +10 -27
  129. package/{src/iac → iac}/utils/patch-utils.js +2 -8
  130. package/{src/index.d.ts → index.d.ts} +5 -5
  131. package/{src/index.js → index.js} +12 -22
  132. package/package.json +11 -69
  133. package/src/api/DataAccessControl.d.ts +0 -85
  134. package/src/api/DataAccessControl.js +0 -159
  135. package/src/api/ORM/DACUtils.d.ts +0 -60
  136. package/src/api/ORM/DACUtils.js +0 -197
  137. package/src/api/ORM/ListItemUtils.d.ts +0 -7
  138. package/src/api/ORM/ListItemUtils.js +0 -22
  139. package/src/api/ORM/ORMRouteMap.d.ts +0 -19
  140. package/src/api/ORM/ORMRouteMap.js +0 -82
  141. package/src/api/ORM/TypeInfoORMService.d.ts +0 -103
  142. package/src/api/ORM/TypeInfoORMService.js +0 -581
  143. package/src/api/ORM/drivers/DynamoDBDataItemDBDriver/ConfigTypes.d.ts +0 -63
  144. package/src/api/ORM/drivers/DynamoDBDataItemDBDriver.d.ts +0 -36
  145. package/src/api/ORM/drivers/DynamoDBDataItemDBDriver.js +0 -282
  146. package/src/api/ORM/drivers/S3FileItemDBDriver/ConfigTypes.d.ts +0 -90
  147. package/src/api/ORM/drivers/S3FileItemDBDriver/S3FileDriver.d.ts +0 -45
  148. package/src/api/ORM/drivers/S3FileItemDBDriver/S3FileDriver.js +0 -127
  149. package/src/api/ORM/drivers/S3FileItemDBDriver.d.ts +0 -44
  150. package/src/api/ORM/drivers/S3FileItemDBDriver.js +0 -182
  151. package/src/api/ORM/drivers/common/SupportedTypeInfoORMDBDrivers.d.ts +0 -12
  152. package/src/api/ORM/drivers/common/SupportedTypeInfoORMDBDrivers.js +0 -20
  153. package/src/api/ORM/drivers/common/Types.d.ts +0 -77
  154. package/src/api/ORM/drivers/common/Types.js +0 -14
  155. package/src/api/ORM/drivers/common/index.d.ts +0 -2
  156. package/src/api/ORM/drivers/index.d.ts +0 -3
  157. package/src/api/ORM/drivers/index.js +0 -19
  158. package/src/api/ORM/index.d.ts +0 -4
  159. package/src/api/index.d.ts +0 -3
  160. package/src/app/index.d.ts +0 -1
  161. package/src/app/utils/TypeInfoORMAPIUtils.d.ts +0 -20
  162. package/src/app/utils/TypeInfoORMAPIUtils.js +0 -62
  163. package/src/app/utils/TypeInfoORMClient.d.ts +0 -24
  164. package/src/app/utils/TypeInfoORMClient.js +0 -69
  165. package/src/common/CommandLine/collectRequiredEnvironmentVariables.d.ts +0 -1
  166. package/src/common/CommandLine/collectRequiredEnvironmentVariables.js +0 -16
  167. package/src/common/HelperTypes.d.ts +0 -3
  168. package/src/common/HelperTypes.js +0 -2
  169. package/src/common/IdGeneration/getSimpleId.d.ts +0 -4
  170. package/src/common/IdGeneration/getSimpleId.js +0 -16
  171. package/src/common/IdGeneration/index.d.ts +0 -1
  172. package/src/common/ItemRelationshipInfoTypes.d.ts +0 -46
  173. package/src/common/ItemRelationshipInfoTypes.js +0 -20
  174. package/src/common/ItemRelationships/ItemRelationshipValidation.d.ts +0 -10
  175. package/src/common/ItemRelationships/ItemRelationshipValidation.js +0 -43
  176. package/src/common/ItemRelationships/index.d.ts +0 -1
  177. package/src/common/Logging/Utils.d.ts +0 -10
  178. package/src/common/Logging/Utils.js +0 -33
  179. package/src/common/Logging/index.d.ts +0 -1
  180. package/src/common/Routing.d.ts +0 -25
  181. package/src/common/SearchTypes.d.ts +0 -98
  182. package/src/common/SearchTypes.js +0 -39
  183. package/src/common/SearchUtils.d.ts +0 -22
  184. package/src/common/SearchUtils.js +0 -134
  185. package/src/common/SearchValidation.d.ts +0 -17
  186. package/src/common/SearchValidation.js +0 -90
  187. package/src/common/Storyboarding/Types.d.ts +0 -25
  188. package/src/common/StringTransformers.d.ts +0 -17
  189. package/src/common/StringTransformers.js +0 -36
  190. package/src/common/Testing/CLI.d.ts +0 -2
  191. package/src/common/Testing/CLI.js +0 -56
  192. package/src/common/Testing/Types.d.ts +0 -117
  193. package/src/common/Testing/Types.js +0 -19
  194. package/src/common/Testing/Utils.d.ts +0 -48
  195. package/src/common/Testing/Utils.js +0 -334
  196. package/src/common/Testing/index.d.ts +0 -2
  197. package/src/common/TypeInfoDataItemUtils.d.ts +0 -10
  198. package/src/common/TypeInfoDataItemUtils.js +0 -55
  199. package/src/common/TypeInfoORM/Types.d.ts +0 -76
  200. package/src/common/TypeInfoORM/Types.js +0 -55
  201. package/src/common/TypeInfoORM/index.d.ts +0 -1
  202. package/src/common/TypeParsing/Constants.d.ts +0 -1
  203. package/src/common/TypeParsing/Constants.js +0 -4
  204. package/src/common/TypeParsing/ParsingUtils/Constants.d.ts +0 -5
  205. package/src/common/TypeParsing/ParsingUtils/Constants.js +0 -8
  206. package/src/common/TypeParsing/ParsingUtils/checkType.d.ts +0 -8
  207. package/src/common/TypeParsing/ParsingUtils/checkType.js +0 -46
  208. package/src/common/TypeParsing/ParsingUtils/checkUnionType.d.ts +0 -6
  209. package/src/common/TypeParsing/ParsingUtils/checkUnionType.js +0 -15
  210. package/src/common/TypeParsing/ParsingUtils/extractCommentTags.d.ts +0 -2
  211. package/src/common/TypeParsing/ParsingUtils/extractCommentTags.js +0 -105
  212. package/src/common/TypeParsing/ParsingUtils/extractLiteralValues.d.ts +0 -6
  213. package/src/common/TypeParsing/ParsingUtils/extractLiteralValues.js +0 -42
  214. package/src/common/TypeParsing/ParsingUtils/extractTypeDetails.d.ts +0 -8
  215. package/src/common/TypeParsing/ParsingUtils/extractTypeDetails.js +0 -14
  216. package/src/common/TypeParsing/ParsingUtils/getPrimaryFieldForTypeInfo.d.ts +0 -5
  217. package/src/common/TypeParsing/ParsingUtils/getPrimaryFieldForTypeInfo.js +0 -27
  218. package/src/common/TypeParsing/ParsingUtils/getTypeInfo.d.ts +0 -3
  219. package/src/common/TypeParsing/ParsingUtils/getTypeInfo.js +0 -27
  220. package/src/common/TypeParsing/ParsingUtils/getTypeInfoField.d.ts +0 -3
  221. package/src/common/TypeParsing/ParsingUtils/getTypeInfoField.js +0 -44
  222. package/src/common/TypeParsing/ParsingUtils/getTypeInfoFromAliasType.d.ts +0 -4
  223. package/src/common/TypeParsing/ParsingUtils/getTypeInfoFromAliasType.js +0 -28
  224. package/src/common/TypeParsing/ParsingUtils/getTypeInfoFromFieldFilter.d.ts +0 -4
  225. package/src/common/TypeParsing/ParsingUtils/getTypeInfoFromFieldFilter.js +0 -105
  226. package/src/common/TypeParsing/ParsingUtils/getTypeInfoFromTypeAlias.d.ts +0 -4
  227. package/src/common/TypeParsing/ParsingUtils/getTypeInfoFromTypeAlias.js +0 -20
  228. package/src/common/TypeParsing/ParsingUtils/getTypeKeyword.d.ts +0 -3
  229. package/src/common/TypeParsing/ParsingUtils/getTypeKeyword.js +0 -17
  230. package/src/common/TypeParsing/ParsingUtils/getUnionOrIntersectionTypeInfo.d.ts +0 -4
  231. package/src/common/TypeParsing/ParsingUtils/getUnionOrIntersectionTypeInfo.js +0 -49
  232. package/src/common/TypeParsing/ParsingUtils/getUnionOrLiteralStringValues.d.ts +0 -2
  233. package/src/common/TypeParsing/ParsingUtils/getUnionOrLiteralStringValues.js +0 -24
  234. package/src/common/TypeParsing/TypeInfo.d.ts +0 -142
  235. package/src/common/TypeParsing/TypeInfo.js +0 -13
  236. package/src/common/TypeParsing/TypeMapping.d.ts +0 -9
  237. package/src/common/TypeParsing/TypeMapping.js +0 -32
  238. package/src/common/TypeParsing/TypeParsing.d.ts +0 -5
  239. package/src/common/TypeParsing/TypeParsing.js +0 -39
  240. package/src/common/TypeParsing/Utils.d.ts +0 -21
  241. package/src/common/TypeParsing/Utils.js +0 -94
  242. package/src/common/TypeParsing/Validation.d.ts +0 -92
  243. package/src/common/TypeParsing/Validation.js +0 -340
  244. package/src/common/TypeParsing/index.d.ts +0 -5
  245. package/src/common/TypeParsing/index.js +0 -44
  246. package/src/common/index.d.ts +0 -11
  247. package/src/common/index.js +0 -47
  248. package/src/iac/SimpleCFT.js +0 -82
  249. package/src/iac/packs/database.d.ts +0 -29
  250. package/src/iac/packs/dns.d.ts +0 -13
  251. package/src/iac/packs/dns.js +0 -26
  252. package/src/iac/types/IaCTypes.d.ts +0 -234994
  253. package/src/iac/types/IaCTypes.js +0 -14
  254. package/src/iac/types/Types.js +0 -2
  255. /package/{src/api/ORM/drivers/DynamoDBDataItemDBDriver/ConfigTypes.js → api/ORM/ServiceTypes/DBServiceTypes.js} +0 -0
  256. /package/{src/api/ORM/drivers/S3FileItemDBDriver/ConfigTypes.js → api/ORM/ServiceTypes/FileServiceTypes.js} +0 -0
  257. /package/{src/api → api}/Router/AWS.d.ts +0 -0
  258. /package/{src/api → api}/Router/Auth.d.ts +0 -0
  259. /package/{src/api → api}/Router/Auth.js +0 -0
  260. /package/{src/api → api}/Router/Types.js +0 -0
  261. /package/{src/api → api}/Router/index.d.ts +0 -0
  262. /package/{src/app → app}/utils/ApplicationStateLoader.d.ts +0 -0
  263. /package/{src/app → app}/utils/Controller.d.ts +0 -0
  264. /package/{src/app → app}/utils/Service.d.ts +0 -0
  265. /package/{src/iac → iac}/index.d.ts +0 -0
  266. /package/{src/iac/packs/auth → iac/packs/abstract}/user-management.d.ts +0 -0
  267. /package/{src/iac → iac}/packs/auth.d.ts +0 -0
  268. /package/{src/iac → iac}/packs/build/utils.js +0 -0
  269. /package/{src/iac → iac}/packs/build.js +0 -0
  270. /package/{src/iac → iac}/packs/cdn.d.ts +0 -0
  271. /package/{src/iac → iac}/packs/cdn.js +0 -0
  272. /package/{src/iac → iac}/packs/file-storage.d.ts +0 -0
  273. /package/{src/iac → iac}/packs/file-storage.js +0 -0
  274. /package/{src/iac → iac}/packs/index.d.ts +0 -0
  275. /package/{src/iac → iac}/packs/index.js +0 -0
  276. /package/{src/iac → iac}/packs/repo.d.ts +0 -0
  277. /package/{src/iac → iac}/packs/repo.js +0 -0
  278. /package/{src/iac → iac}/packs/ssl-certificate.d.ts +0 -0
  279. /package/{src/iac → iac}/packs/ssl-certificate.js +0 -0
  280. /package/{src/iac → iac}/types/Constants.d.ts +0 -0
  281. /package/{src/iac → iac}/types/Constants.js +0 -0
  282. /package/{src/iac → iac}/types/Renderers.d.ts +0 -0
  283. /package/{src/iac → iac}/types/Types.d.ts +0 -0
  284. /package/{src/common/Storyboarding → iac/types}/Types.js +0 -0
  285. /package/{src/iac → iac}/types/Utils.d.ts +0 -0
  286. /package/{src/iac → iac}/types/generate.d.ts +0 -0
  287. /package/{src/iac → iac}/utils/patch-utils.d.ts +0 -0
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.Routing = exports.TypeParsing = void 0;
27
+ exports.TypeParsing = __importStar(require("./TypeParsing"));
28
+ exports.Routing = __importStar(require("./Routing"));
@@ -1,9 +1,5 @@
1
- import { CloudFormationTemplate } from "./types/IaCTypes";
1
+ import { CloudFormationTemplate } from "./types/StandardIncludes";
2
2
  import { ParameterGroup, ParameterInfo, ResourcePackApplier } from "./utils";
3
- /**
4
- * A function used to apply a modification to a SimpleCFT instance.
5
- * */
6
- export type SimpleCFTModification = (simpleCFT: SimpleCFT) => void;
7
3
  /**
8
4
  * The basis for your stack template.
9
5
  * Apply packs, patches, parameters and parameter groups.
@@ -29,20 +25,4 @@ export declare class SimpleCFT {
29
25
  * Add a group of stack parameters including their descriptive info and an optional parameter group.
30
26
  * */
31
27
  addParameterGroup: ({ Label: Group, Parameters }: ParameterGroup) => this;
32
- /**
33
- * Use a modification to dynamically apply various changes at once.
34
- * */
35
- modify: (modification: SimpleCFTModification) => this;
36
- /**
37
- * Convert the stack template to a string.
38
- * */
39
- toString: () => string;
40
- /**
41
- * Convert the stack template to a JSON object.
42
- * */
43
- toJSON: () => CloudFormationTemplate;
44
- /**
45
- * Convert the stack template to a YAML string.
46
- * */
47
- toYAML: () => string;
48
28
  }
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.SimpleCFT = void 0;
15
+ const utils_1 = require("./utils");
16
+ /**
17
+ * The basis for your stack template.
18
+ * Apply packs, patches, parameters and parameter groups.
19
+ * Access the `template` property for the resulting CloudFormation template.
20
+ * */
21
+ class SimpleCFT {
22
+ constructor(template = {
23
+ AWSTemplateFormatVersion: "2010-09-09",
24
+ }) {
25
+ this.template = template;
26
+ /**
27
+ * Apply a pack with configuration to the stack template.
28
+ * @see {@link IaC} for an example.
29
+ * */
30
+ this.applyPack = (pack, params) => {
31
+ this.template = pack(params, this.template);
32
+ return this;
33
+ };
34
+ /**
35
+ * Apply a patch to the stack template.
36
+ * */
37
+ this.patch = (patch) => {
38
+ this.template = (0, utils_1.patchTemplate)(patch, this.template);
39
+ return this;
40
+ };
41
+ /**
42
+ * Add a stack parameter including its descriptive info and an optional parameter group.
43
+ * */
44
+ this.addParameter = (parameter) => {
45
+ this.template = (0, utils_1.addParameter)(parameter, this.template);
46
+ return this;
47
+ };
48
+ /**
49
+ * Add a group of stack parameters including their descriptive info and an optional parameter group.
50
+ * */
51
+ this.addParameterGroup = ({ Label: Group, Parameters }) => {
52
+ const parameterIds = Object.keys(Parameters);
53
+ const parameterList = parameterIds.map((ParameterId) => {
54
+ const _a = Parameters[ParameterId], { Label } = _a, Parameter = __rest(_a, ["Label"]);
55
+ return {
56
+ Group,
57
+ ParameterId,
58
+ Label,
59
+ Parameter,
60
+ };
61
+ });
62
+ this.template = (0, utils_1.addParameters)(parameterList, this.template);
63
+ return this;
64
+ };
65
+ }
66
+ }
67
+ exports.SimpleCFT = SimpleCFT;
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
35
25
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
27
  };
@@ -0,0 +1,2 @@
1
+ import { CloudFormationCustomResourceHandler } from "aws-lambda";
2
+ export declare const handler: CloudFormationCustomResourceHandler;
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.handler = void 0;
16
+ const aws_sdk_1 = __importDefault(require("aws-sdk"));
17
+ const cfn_response_1 = __importDefault(require("cfn-response"));
18
+ const handler = (event, context) => __awaiter(void 0, void 0, void 0, function* () {
19
+ const { RequestType } = event;
20
+ let status = cfn_response_1.default.FAILED, data = {};
21
+ if (RequestType === "Delete") {
22
+ status = cfn_response_1.default.SUCCESS;
23
+ }
24
+ else {
25
+ try {
26
+ const { ResourceProperties: { UserPoolDomain }, } = event;
27
+ const cognito = new aws_sdk_1.default.CognitoIdentityServiceProvider();
28
+ const { DomainDescription: { CloudFrontDistribution }, } = (yield cognito
29
+ .describeUserPoolDomain({ Domain: UserPoolDomain })
30
+ .promise());
31
+ status = cfn_response_1.default.SUCCESS;
32
+ data = {
33
+ AliasTarget: CloudFrontDistribution,
34
+ };
35
+ }
36
+ catch (error) {
37
+ data = error;
38
+ }
39
+ }
40
+ return (yield sendResponse(event, context, status, data));
41
+ });
42
+ exports.handler = handler;
43
+ function sendResponse(event, context, responseStatus, responseData) {
44
+ return __awaiter(this, void 0, void 0, function* () {
45
+ let responsePromise = new Promise((resolve, reject) => {
46
+ const responseBody = JSON.stringify({
47
+ Status: responseStatus,
48
+ Reason: "CloudWatch Log Stream: " + context.logStreamName,
49
+ PhysicalResourceId: context.logStreamName,
50
+ StackId: event.StackId,
51
+ RequestId: event.RequestId,
52
+ LogicalResourceId: event.LogicalResourceId,
53
+ Data: responseData,
54
+ });
55
+ console.log("RESPONSE BODY:\n", responseBody);
56
+ const https = require("https");
57
+ const url = require("url");
58
+ const parsedUrl = url.parse(event.ResponseURL);
59
+ const options = {
60
+ hostname: parsedUrl.hostname,
61
+ port: 443,
62
+ path: parsedUrl.path,
63
+ method: "PUT",
64
+ headers: {
65
+ "content-type": "",
66
+ "content-length": responseBody.length,
67
+ },
68
+ };
69
+ console.log("SENDING RESPONSE...\n");
70
+ const request = https.request(options, function (response) {
71
+ console.log("STATUS: " + response.statusCode);
72
+ console.log("HEADERS: " + JSON.stringify(response.headers));
73
+ resolve(JSON.parse(responseBody));
74
+ context.done();
75
+ });
76
+ request.on("error", function (error) {
77
+ console.log("sendResponse Error:" + error);
78
+ reject(error);
79
+ context.done();
80
+ });
81
+ request.write(responseBody);
82
+ request.end();
83
+ });
84
+ return yield responsePromise;
85
+ });
86
+ }
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.addUserManagement = void 0;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const path_1 = __importDefault(require("path"));
4
9
  const utils_1 = require("../../utils");
5
10
  exports.addUserManagement = (0, utils_1.createResourcePack)(({ id, authRoleName, unauthRoleName, domainName, hostedZoneId, sslCertificateArn, callbackUrls, logoutUrls, baseDomainRecordAliasTargetDNSName, apiGatewayRESTAPIId, apiStageName, }) => {
6
11
  const apiRoleConfig = apiGatewayRESTAPIId && apiStageName
@@ -140,8 +145,7 @@ exports.addUserManagement = (0, utils_1.createResourcePack)(({ id, authRoleName,
140
145
  }
141
146
  : {};
142
147
  return {
143
- Resources: {
144
- [`${id}UserPool`]: {
148
+ Resources: Object.assign({ [`${id}UserPool`]: {
145
149
  Type: "AWS::Cognito::UserPool",
146
150
  Properties: {
147
151
  UserPoolName: {
@@ -191,8 +195,82 @@ exports.addUserManagement = (0, utils_1.createResourcePack)(({ id, authRoleName,
191
195
  CaseSensitive: false,
192
196
  },
193
197
  },
194
- },
195
- [`${id}BaseDomainRecord`]: !!baseDomainRecordAliasTargetDNSName
198
+ }, [`${id}UserPoolAliasTargetLambdaExecutionRole`]: {
199
+ Type: "AWS::IAM::Role",
200
+ Properties: {
201
+ AssumeRolePolicyDocument: {
202
+ Version: "2012-10-17",
203
+ Statement: [
204
+ {
205
+ Effect: "Allow",
206
+ Principal: {
207
+ Service: ["lambda.amazonaws.com"],
208
+ },
209
+ Action: ["sts:AssumeRole"],
210
+ },
211
+ ],
212
+ },
213
+ Path: "/",
214
+ Policies: [
215
+ {
216
+ PolicyName: "root",
217
+ PolicyDocument: {
218
+ Version: "2012-10-17",
219
+ Statement: [
220
+ {
221
+ Effect: "Allow",
222
+ Action: [
223
+ "logs:CreateLogGroup",
224
+ "logs:CreateLogStream",
225
+ "logs:PutLogEvents",
226
+ ],
227
+ Resource: "arn:aws:logs:*:*:*",
228
+ },
229
+ {
230
+ Effect: "Allow",
231
+ Action: ["cognito-idp:DescribeUserPoolDomain"],
232
+ Resource: "*",
233
+ },
234
+ ],
235
+ },
236
+ },
237
+ ],
238
+ },
239
+ }, [`${id}GetUserPoolClientCFDistribution`]: {
240
+ Type: "AWS::Lambda::Function",
241
+ Properties: {
242
+ Description: `Look up CloudFrontDistribution of ${id}UserPoolDomain`,
243
+ Handler: "index.handler",
244
+ MemorySize: 128,
245
+ Role: {
246
+ "Fn::GetAtt": [
247
+ `${id}UserPoolAliasTargetLambdaExecutionRole`,
248
+ "Arn",
249
+ ],
250
+ },
251
+ Runtime: "nodejs16.x",
252
+ Timeout: 30,
253
+ Code: {
254
+ ZipFile: fs_1.default.readFileSync(path_1.default.join(__dirname, "user-management", "UserPoolAliasTargetCustomResourceCode.js"), { encoding: "utf8" }),
255
+ },
256
+ },
257
+ }, [`${id}UPDomain`]: {
258
+ Type: `Custom::${id}UserPoolCloudFrontDistribution`,
259
+ DependsOn: `${id}UserPoolDomain`,
260
+ Properties: {
261
+ ServiceToken: {
262
+ "Fn::GetAtt": [`${id}GetUserPoolClientCFDistribution`, "Arn"],
263
+ },
264
+ UserPoolDomain: {
265
+ "Fn::Sub": [
266
+ "auth.${BaseDomainName}",
267
+ {
268
+ BaseDomainName: domainName,
269
+ },
270
+ ],
271
+ },
272
+ },
273
+ }, [`${id}BaseDomainRecord`]: !!baseDomainRecordAliasTargetDNSName
196
274
  ? {
197
275
  Type: "AWS::Route53::RecordSet",
198
276
  DeletionPolicy: "Delete",
@@ -206,8 +284,7 @@ exports.addUserManagement = (0, utils_1.createResourcePack)(({ id, authRoleName,
206
284
  },
207
285
  },
208
286
  }
209
- : undefined,
210
- [`${id}UserPoolDomainRecord`]: {
287
+ : undefined, [`${id}UserPoolDomainRecord`]: {
211
288
  Type: "AWS::Route53::RecordSet",
212
289
  DeletionPolicy: "Delete",
213
290
  Properties: {
@@ -224,12 +301,11 @@ exports.addUserManagement = (0, utils_1.createResourcePack)(({ id, authRoleName,
224
301
  AliasTarget: {
225
302
  HostedZoneId: "Z2FDTNDATAQYW2",
226
303
  DNSName: {
227
- "Fn::GetAtt": [`${id}UserPoolDomain`, "CloudFrontDistribution"],
304
+ "Fn::GetAtt": [`${id}UPDomain`, "AliasTarget"],
228
305
  },
229
306
  },
230
307
  },
231
- },
232
- [`${id}UserPoolDomain`]: {
308
+ }, [`${id}UserPoolDomain`]: {
233
309
  Type: "AWS::Cognito::UserPoolDomain",
234
310
  DependsOn: !!baseDomainRecordAliasTargetDNSName
235
311
  ? `${id}BaseDomainRecord`
@@ -250,8 +326,7 @@ exports.addUserManagement = (0, utils_1.createResourcePack)(({ id, authRoleName,
250
326
  CertificateArn: sslCertificateArn,
251
327
  },
252
328
  },
253
- },
254
- [`${id}UserPoolClient`]: {
329
+ }, [`${id}UserPoolClient`]: {
255
330
  Type: "AWS::Cognito::UserPoolClient",
256
331
  Properties: {
257
332
  ClientName: {
@@ -275,8 +350,7 @@ exports.addUserManagement = (0, utils_1.createResourcePack)(({ id, authRoleName,
275
350
  PreventUserExistenceErrors: "ENABLED",
276
351
  SupportedIdentityProviders: ["COGNITO"],
277
352
  },
278
- },
279
- [`${id}IdentityPool`]: {
353
+ }, [`${id}IdentityPool`]: {
280
354
  Type: "AWS::Cognito::IdentityPool",
281
355
  Properties: {
282
356
  IdentityPoolName: {
@@ -295,8 +369,6 @@ exports.addUserManagement = (0, utils_1.createResourcePack)(({ id, authRoleName,
295
369
  },
296
370
  ],
297
371
  },
298
- },
299
- ...apiRoleConfig,
300
- },
372
+ } }, apiRoleConfig),
301
373
  };
302
374
  });
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addAuth = void 0;
4
- const user_management_1 = require("./auth/user-management");
4
+ const user_management_1 = require("./abstract/user-management");
5
5
  const utils_1 = require("../utils");
6
6
  const SimpleCFT_1 = require("../SimpleCFT");
7
7
  /**
@@ -12,7 +12,7 @@ export declare const COMMAND_HELPERS: {
12
12
  }) => string;
13
13
  cloudFrontInvalidation: ({ cloudFrontDistributionId, pathsToInvalidate, }: {
14
14
  cloudFrontDistributionId: string;
15
- pathsToInvalidate?: string[];
15
+ pathsToInvalidate?: string[] | undefined;
16
16
  }) => string;
17
17
  addNPMTokenWithNPMRC: ({ npmToken }: {
18
18
  npmToken: string;
@@ -7,19 +7,14 @@ export type BuildPipelineRepoConfig = {
7
7
  branch: any;
8
8
  oauthToken: any;
9
9
  };
10
- export type CustomCodeBuildString<T extends string> = T & {
11
- __custom?: never;
12
- };
13
- export type CodeBuildEnvironmentType = "ARM_CONTAINER" | "LINUX_CONTAINER" | "LINUX_GPU_CONTAINER" | "WINDOWS_SERVER_2019_CONTAINER" | "WINDOWS_SERVER_2022_CONTAINER" | "LINUX_EC2" | "ARM_EC2" | "WINDOWS_EC2" | "MAC_ARM" | CustomCodeBuildString<string>;
14
- export type CodeBuildComputeType = "BUILD_GENERAL1_SMALL" | "BUILD_GENERAL1_MEDIUM" | "BUILD_GENERAL1_LARGE" | "BUILD_GENERAL1_2XLARGE" | "BUILD_GENERAL1_XLARGE" | CustomCodeBuildString<string>;
15
10
  export type AddBuildPipelineConfig = {
16
11
  id: string;
17
12
  buildSpec: any;
18
13
  dependsOn?: string | string[];
19
14
  environmentVariables?: AWS.CodeBuild.Project.EnvironmentVariable[];
20
15
  timeoutInMinutes?: number;
21
- environmentType?: CodeBuildEnvironmentType;
22
- environmentComputeType?: CodeBuildComputeType;
16
+ environmentType?: "ARM_CONTAINER" | "LINUX_CONTAINER" | "LINUX_GPU_CONTAINER" | "WINDOWS_SERVER_2019_CONTAINER" | string;
17
+ environmentComputeType?: "BUILD_GENERAL1_LARGE" | "BUILD_GENERAL1_SMALL" | "BUILD_GENERAL1_MEDIUM" | "BUILD_GENERAL1_2XLARGE" | string;
23
18
  environmentImage?: string;
24
19
  repoConfig: BuildPipelineRepoConfig;
25
20
  };
@@ -1,12 +1,11 @@
1
1
  import { AWS } from "../types/IaCTypes";
2
2
  export declare const PLACEHOLDER_FUNCTION_CODE: AWS.Lambda.Function.Code;
3
- export type CloudFunctionRuntime = "nodejs14.x" | "nodejs16.x" | "nodejs18.x" | "nodejs20.x" | "nodejs22.x" | "nodejs24.x" | "nodejs26.x" | "python3.8" | "python3.9" | "python3.10" | "python3.11" | "python3.12" | "python3.13" | "python3.14" | "python3.15" | "java11" | "java17" | "java21" | "java25" | "dotnet6" | "dotnet8" | "dotnet10" | "go1.x" | "ruby2.7" | "ruby3.2" | "ruby3.3" | "ruby3.4" | "ruby3.5" | "provided" | "provided.al2" | "provided.al2023";
4
3
  export type AddCloudFunctionConfig = {
5
4
  id: string;
6
5
  code?: AWS.Lambda.Function.Code;
7
6
  environment?: AWS.Lambda.Function.Environment;
8
7
  handler?: any;
9
- runtime?: CloudFunctionRuntime;
8
+ runtime?: "dotnetcore1.0" | "dotnetcore2.0" | "dotnetcore2.1" | "dotnetcore3.1" | "go1.x" | "java11" | "java8" | "java8.al2" | "nodejs" | "nodejs10.x" | "nodejs12.x" | "nodejs14.x" | "nodejs4.3" | "nodejs4.3-edge" | "nodejs6.10" | "nodejs8.10" | "provided" | "provided.al2" | "python2.7" | "python3.6" | "python3.7" | "python3.8" | "python3.9" | "ruby2.5" | "ruby2.7";
10
9
  timeout?: any;
11
10
  policies?: AWS.IAM.Role.Policy[];
12
11
  };
@@ -13,7 +13,7 @@ exports.addCloudFunction = (0, utils_1.createResourcePack)(({ id, code = exports
13
13
  Variables: {
14
14
  NODE_ENV: "production",
15
15
  },
16
- }, handler = "index.handler", runtime = "nodejs26.x", timeout = 30, policies = [
16
+ }, handler = "index.handler", runtime = "nodejs12.x", timeout = 30, policies = [
17
17
  {
18
18
  PolicyName: "lambda-parameter-store",
19
19
  PolicyDocument: {
@@ -0,0 +1,10 @@
1
+ export type AddDatabaseConfig = {
2
+ tableId: string;
3
+ attributes: Record<string, string>;
4
+ keys: Record<string, string>;
5
+ billingMode?: "PAY_PER_REQUEST" | "PROVISIONED";
6
+ };
7
+ /**
8
+ * Add a highly available key-value database with global scale performance.
9
+ * */
10
+ export declare const addDatabase: import("../utils").ResourcePackApplier<AddDatabaseConfig>;
@@ -6,12 +6,11 @@ const SimpleCFT_1 = require("../SimpleCFT");
6
6
  /**
7
7
  * Add a highly available key-value database with global scale performance.
8
8
  * */
9
- exports.addDatabase = (0, utils_1.createResourcePack)(({ tableId, tableName, keys, attributes, billingMode = "PAY_PER_REQUEST", }) => new SimpleCFT_1.SimpleCFT().patch({
9
+ exports.addDatabase = (0, utils_1.createResourcePack)(({ tableId, attributes, keys, billingMode = "PAY_PER_REQUEST", }) => new SimpleCFT_1.SimpleCFT().patch({
10
10
  Resources: {
11
11
  [tableId]: {
12
12
  Type: "AWS::DynamoDB::Table",
13
13
  Properties: {
14
- TableName: tableName,
15
14
  AttributeDefinitions: Object.keys(attributes).map((attributeName) => ({
16
15
  AttributeName: attributeName,
17
16
  AttributeType: attributes[attributeName],
@@ -0,0 +1,11 @@
1
+ export type AddDNSConfig = {
2
+ hostedZoneIdParameterName: string;
3
+ domainNameParameterName: string;
4
+ localUIDevelopmentDomainName?: string;
5
+ localUIDevelopmentIPAddress?: string;
6
+ };
7
+ /**
8
+ * Add DNS parameters for reference in other resources.
9
+ * Optionally includes a front-end live development subdomain.
10
+ * */
11
+ export declare const addDNS: import("../utils").ResourcePackApplier<AddDNSConfig>;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addDNS = void 0;
4
+ const utils_1 = require("../utils");
5
+ const SimpleCFT_1 = require("../SimpleCFT");
6
+ /**
7
+ * Add DNS parameters for reference in other resources.
8
+ * Optionally includes a front-end live development subdomain.
9
+ * */
10
+ exports.addDNS = (0, utils_1.createResourcePack)(({ hostedZoneIdParameterName, domainNameParameterName, localUIDevelopmentDomainName, localUIDevelopmentIPAddress, }) => {
11
+ let cft = new SimpleCFT_1.SimpleCFT().addParameterGroup({
12
+ Label: "DNS",
13
+ Parameters: {
14
+ [hostedZoneIdParameterName]: {
15
+ Label: "Hosted Zone ID",
16
+ Type: "AWS::Route53::HostedZone::Id",
17
+ Description: "Hosted Zone ID",
18
+ },
19
+ [domainNameParameterName]: {
20
+ Label: "Domain Name",
21
+ Type: "String",
22
+ Description: "Domain name for the hosted zone",
23
+ Default: "example.com",
24
+ },
25
+ },
26
+ });
27
+ if (localUIDevelopmentDomainName) {
28
+ cft = cft.patch({
29
+ Resources: {
30
+ [localUIDevelopmentDomainName]: {
31
+ Type: "AWS::Route53::RecordSet",
32
+ DeletionPolicy: "Delete",
33
+ Properties: {
34
+ HostedZoneId: {
35
+ Ref: hostedZoneIdParameterName,
36
+ },
37
+ Type: "A",
38
+ Name: {
39
+ "Fn::Sub": [
40
+ "app-local.${BaseDomainName}",
41
+ {
42
+ BaseDomainName: {
43
+ Ref: domainNameParameterName,
44
+ },
45
+ },
46
+ ],
47
+ },
48
+ ResourceRecords: [
49
+ localUIDevelopmentIPAddress
50
+ ? localUIDevelopmentIPAddress
51
+ : "127.0.0.1",
52
+ ],
53
+ TTL: "300",
54
+ },
55
+ },
56
+ },
57
+ });
58
+ }
59
+ return cft.template;
60
+ });
@@ -1,4 +1,3 @@
1
- import { CloudFormationPrimitiveValue } from "../types/IaCTypes";
2
1
  export declare const DEFAULT_AUTH_TYPE = "COGNITO_USER_POOLS";
3
2
  export type AddGatewayAuthorizerConfig = {
4
3
  providerARNs?: string[];
@@ -10,7 +9,7 @@ export type AddGatewayConfig = {
10
9
  id: string;
11
10
  hostedZoneId: any;
12
11
  domainName: any;
13
- certificateArn: CloudFormationPrimitiveValue<string>;
12
+ certificateArn: any;
14
13
  cloudFunction: {
15
14
  id: string;
16
15
  region?: string;
@@ -61,40 +61,28 @@ exports.addGateway = (0, utils_1.createResourcePack)(({ id, hostedZoneId, domain
61
61
  [`${id}GatewayRESTAPIMethod`]: {
62
62
  Type: "AWS::ApiGateway::Method",
63
63
  DependsOn: `${id}GatewayRESTAPIResource`,
64
- Properties: {
65
- ...authProps,
66
- HttpMethod: "ANY",
67
- ResourceId: {
64
+ Properties: Object.assign(Object.assign({}, authProps), { HttpMethod: "ANY", ResourceId: {
68
65
  Ref: `${id}GatewayRESTAPIResource`,
69
- },
70
- RestApiId: {
66
+ }, RestApiId: {
71
67
  Ref: id,
72
- },
73
- Integration: {
68
+ }, Integration: {
74
69
  Type: "AWS_PROXY",
75
70
  IntegrationHttpMethod: "POST",
76
71
  Uri: cloudFunctionUri,
77
- },
78
- },
72
+ } }),
79
73
  },
80
74
  [`${id}GatewayRESTAPIRootMethod`]: {
81
75
  Type: "AWS::ApiGateway::Method",
82
76
  DependsOn: `${id}GatewayRESTAPIResource`,
83
- Properties: {
84
- ...authProps,
85
- HttpMethod: "ANY",
86
- ResourceId: {
77
+ Properties: Object.assign(Object.assign({}, authProps), { HttpMethod: "ANY", ResourceId: {
87
78
  "Fn::GetAtt": [id, "RootResourceId"],
88
- },
89
- RestApiId: {
79
+ }, RestApiId: {
90
80
  Ref: id,
91
- },
92
- Integration: {
81
+ }, Integration: {
93
82
  Type: "AWS_PROXY",
94
83
  IntegrationHttpMethod: "POST",
95
84
  Uri: cloudFunctionUri,
96
- },
97
- },
85
+ } }),
98
86
  },
99
87
  },
100
88
  })
@@ -1,2 +1,2 @@
1
- import { CloudFormationResourceSpecification } from "./Types";
1
+ import { CloudFormationResourceSpecification } from './Types';
2
2
  export declare const CloudFormationResourceSpecificationData: CloudFormationResourceSpecification;