@l-v-yonsama/multi-platform-database-drivers 1.2.0 → 2.0.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 (315) hide show
  1. package/README.md +40 -0
  2. package/built/src/drivers/Auth0Driver.js +9 -9
  3. package/built/src/drivers/Auth0Driver.js.map +1 -1
  4. package/built/src/drivers/AwsDriver.d.ts +6 -0
  5. package/built/src/drivers/AwsDriver.js +87 -7
  6. package/built/src/drivers/AwsDriver.js.map +1 -1
  7. package/built/src/drivers/BaseDriver.d.ts +1 -1
  8. package/built/src/drivers/BaseDriver.js +4 -6
  9. package/built/src/drivers/BaseDriver.js.map +1 -1
  10. package/built/src/drivers/DBDriverResolver.js.map +1 -1
  11. package/built/src/drivers/DBError.js.map +1 -1
  12. package/built/src/drivers/KeycloakDriver.d.ts +2 -3
  13. package/built/src/drivers/KeycloakDriver.js +27 -262
  14. package/built/src/drivers/KeycloakDriver.js.map +1 -1
  15. package/built/src/drivers/MemcacheDriver.d.ts +0 -1
  16. package/built/src/drivers/MemcacheDriver.js +5 -5
  17. package/built/src/drivers/MemcacheDriver.js.map +1 -1
  18. package/built/src/drivers/MqttDriver.d.ts +0 -1
  19. package/built/src/drivers/MqttDriver.js +4 -4
  20. package/built/src/drivers/MqttDriver.js.map +1 -1
  21. package/built/src/drivers/MySQLDriver.js +12 -12
  22. package/built/src/drivers/MySQLDriver.js.map +1 -1
  23. package/built/src/drivers/OracleDriver.js +13 -13
  24. package/built/src/drivers/OracleDriver.js.map +1 -1
  25. package/built/src/drivers/PostgresDriver.js +22 -2
  26. package/built/src/drivers/PostgresDriver.js.map +1 -1
  27. package/built/src/drivers/RDSBaseDriver.d.ts +1 -1
  28. package/built/src/drivers/RDSBaseDriver.js +6 -6
  29. package/built/src/drivers/RDSBaseDriver.js.map +1 -1
  30. package/built/src/drivers/RedisDriver.js +2 -2
  31. package/built/src/drivers/RedisDriver.js.map +1 -1
  32. package/built/src/drivers/SQLServerDriver.js +7 -7
  33. package/built/src/drivers/SQLServerDriver.js.map +1 -1
  34. package/built/src/drivers/SQLiteDriver.d.ts +1 -1
  35. package/built/src/drivers/SQLiteDriver.js +7 -7
  36. package/built/src/drivers/SQLiteDriver.js.map +1 -1
  37. package/built/src/drivers/aws/AwsCloudFormationServiceClient.d.ts +35 -0
  38. package/built/src/drivers/aws/AwsCloudFormationServiceClient.js +197 -0
  39. package/built/src/drivers/aws/AwsCloudFormationServiceClient.js.map +1 -0
  40. package/built/src/drivers/aws/AwsCloudwatchServiceClient.js +4 -7
  41. package/built/src/drivers/aws/AwsCloudwatchServiceClient.js.map +1 -1
  42. package/built/src/drivers/aws/AwsDynamoServiceClient.js +8 -11
  43. package/built/src/drivers/aws/AwsDynamoServiceClient.js.map +1 -1
  44. package/built/src/drivers/aws/AwsS3ServiceClient.js +28 -30
  45. package/built/src/drivers/aws/AwsS3ServiceClient.js.map +1 -1
  46. package/built/src/drivers/aws/AwsSESServiceClient.js +23 -0
  47. package/built/src/drivers/aws/AwsSESServiceClient.js.map +1 -1
  48. package/built/src/drivers/aws/AwsSQSServiceClient.d.ts +1 -0
  49. package/built/src/drivers/aws/AwsSQSServiceClient.js +40 -8
  50. package/built/src/drivers/aws/AwsSQSServiceClient.js.map +1 -1
  51. package/built/src/drivers/aws/AwsSecretsManagerServiceClient.d.ts +19 -0
  52. package/built/src/drivers/aws/AwsSecretsManagerServiceClient.js +118 -0
  53. package/built/src/drivers/aws/AwsSecretsManagerServiceClient.js.map +1 -0
  54. package/built/src/drivers/aws/AwsServiceClient.d.ts +1 -0
  55. package/built/src/drivers/aws/AwsServiceClient.js +13 -2
  56. package/built/src/drivers/aws/AwsServiceClient.js.map +1 -1
  57. package/built/src/drivers/aws/AwsSsmServiceClient.d.ts +19 -0
  58. package/built/src/drivers/aws/AwsSsmServiceClient.js +116 -0
  59. package/built/src/drivers/aws/AwsSsmServiceClient.js.map +1 -0
  60. package/built/src/drivers/aws/index.d.ts +3 -0
  61. package/built/src/drivers/aws/index.js +3 -0
  62. package/built/src/drivers/aws/index.js.map +1 -1
  63. package/built/src/drivers/keycloak/resourceTreeBuilder.d.ts +5 -0
  64. package/built/src/drivers/keycloak/resourceTreeBuilder.js +37 -0
  65. package/built/src/drivers/keycloak/resourceTreeBuilder.js.map +1 -0
  66. package/built/src/drivers/keycloak/scanResultBuilder.d.ts +8 -0
  67. package/built/src/drivers/keycloak/scanResultBuilder.js +212 -0
  68. package/built/src/drivers/keycloak/scanResultBuilder.js.map +1 -0
  69. package/built/src/drivers/memcache/helper.d.ts +0 -1
  70. package/built/src/drivers/memcache/helper.js +13 -14
  71. package/built/src/drivers/memcache/helper.js.map +1 -1
  72. package/built/src/helpers/ProposalHelper.js +3 -3
  73. package/built/src/helpers/ProposalHelper.js.map +1 -1
  74. package/built/src/helpers/RdhRecordRuleHelper.js.map +1 -1
  75. package/built/src/helpers/RuleEngine.d.ts +5 -5
  76. package/built/src/helpers/RuleEngine.js +14 -14
  77. package/built/src/helpers/RuleEngine.js.map +1 -1
  78. package/built/src/helpers/SQLHelper.d.ts +8 -115
  79. package/built/src/helpers/SQLHelper.js +35 -1084
  80. package/built/src/helpers/SQLHelper.js.map +1 -1
  81. package/built/src/helpers/prompts/Auth0PromptHelper.js.map +1 -1
  82. package/built/src/helpers/prompts/AwsPromptHelper.js +93 -2
  83. package/built/src/helpers/prompts/AwsPromptHelper.js.map +1 -1
  84. package/built/src/helpers/prompts/KeycloakPromptHelper.js.map +1 -1
  85. package/built/src/helpers/prompts/MemcachePromptHelper.js.map +1 -1
  86. package/built/src/helpers/prompts/MqttPromptHelper.js.map +1 -1
  87. package/built/src/helpers/prompts/RdsPromptHelper.js +1 -1
  88. package/built/src/helpers/prompts/RdsPromptHelper.js.map +1 -1
  89. package/built/src/helpers/prompts/RedisPromptHelper.js.map +1 -1
  90. package/built/src/helpers/prompts/SchemaPromptHelper.js.map +1 -1
  91. package/built/src/helpers/sql/dynamoConversion.d.ts +2 -0
  92. package/built/src/helpers/sql/dynamoConversion.js +27 -0
  93. package/built/src/helpers/sql/dynamoConversion.js.map +1 -0
  94. package/built/src/helpers/sql/formatQuery.d.ts +6 -0
  95. package/built/src/helpers/sql/formatQuery.js +45 -0
  96. package/built/src/helpers/sql/formatQuery.js.map +1 -0
  97. package/built/src/helpers/sql/mutationQuery.d.ts +54 -0
  98. package/built/src/helpers/sql/mutationQuery.js +250 -0
  99. package/built/src/helpers/sql/mutationQuery.js.map +1 -0
  100. package/built/src/helpers/sql/parameterNormalizer.d.ts +16 -0
  101. package/built/src/helpers/sql/parameterNormalizer.js +166 -0
  102. package/built/src/helpers/sql/parameterNormalizer.js.map +1 -0
  103. package/built/src/helpers/sql/queryParser.d.ts +6 -0
  104. package/built/src/helpers/sql/queryParser.js +239 -0
  105. package/built/src/helpers/sql/queryParser.js.map +1 -0
  106. package/built/src/helpers/sql/quote.d.ts +17 -0
  107. package/built/src/helpers/sql/quote.js +140 -0
  108. package/built/src/helpers/sql/quote.js.map +1 -0
  109. package/built/src/helpers/sql/selectQuery.d.ts +24 -0
  110. package/built/src/helpers/sql/selectQuery.js +262 -0
  111. package/built/src/helpers/sql/selectQuery.js.map +1 -0
  112. package/built/src/resource/aws.d.ts +106 -0
  113. package/built/src/resource/aws.js +219 -0
  114. package/built/src/resource/aws.js.map +1 -0
  115. package/built/src/resource/base.d.ts +28 -0
  116. package/built/src/resource/base.js +76 -0
  117. package/built/src/resource/base.js.map +1 -0
  118. package/built/src/resource/connection.d.ts +35 -0
  119. package/built/src/resource/connection.js +52 -0
  120. package/built/src/resource/connection.js.map +1 -0
  121. package/built/src/resource/fromJson.d.ts +2 -0
  122. package/built/src/resource/fromJson.js +125 -0
  123. package/built/src/resource/fromJson.js.map +1 -0
  124. package/built/src/resource/iam.d.ts +70 -0
  125. package/built/src/resource/iam.js +175 -0
  126. package/built/src/resource/iam.js.map +1 -0
  127. package/built/src/resource/index.d.ts +8 -1
  128. package/built/src/resource/index.js +8 -1
  129. package/built/src/resource/index.js.map +1 -1
  130. package/built/src/resource/keyValue.d.ts +85 -0
  131. package/built/src/resource/keyValue.js +74 -0
  132. package/built/src/resource/keyValue.js.map +1 -0
  133. package/built/src/resource/rdb.d.ts +49 -0
  134. package/built/src/resource/rdb.js +155 -0
  135. package/built/src/resource/rdb.js.map +1 -0
  136. package/built/src/resource/types.d.ts +18 -0
  137. package/built/src/resource/types.js +3 -0
  138. package/built/src/resource/types.js.map +1 -0
  139. package/built/src/types/drivers/Keycloak.js +1 -1
  140. package/built/src/types/drivers/Keycloak.js.map +1 -1
  141. package/built/src/types/drivers/MemcachedParams.d.ts +0 -1
  142. package/built/src/types/drivers/ScanParams.d.ts +15 -1
  143. package/built/src/types/helpers/index.js +1 -1
  144. package/built/src/types/helpers/index.js.map +1 -1
  145. package/built/src/types/resource/AwsCfnStackAttributes.d.ts +164 -0
  146. package/built/src/types/resource/AwsCfnStackAttributes.js +56 -0
  147. package/built/src/types/resource/AwsCfnStackAttributes.js.map +1 -0
  148. package/built/src/types/resource/AwsSESIdentityAttributes.d.ts +17 -0
  149. package/built/src/types/resource/AwsSESIdentityAttributes.js +3 -0
  150. package/built/src/types/resource/AwsSESIdentityAttributes.js.map +1 -0
  151. package/built/src/types/resource/AwsSQSAttributes.d.ts +1 -0
  152. package/built/src/types/resource/AwsSecretAttributes.d.ts +6 -0
  153. package/built/src/types/resource/AwsSecretAttributes.js +3 -0
  154. package/built/src/types/resource/AwsSecretAttributes.js.map +1 -0
  155. package/built/src/types/resource/AwsServiceType.d.ts +4 -1
  156. package/built/src/types/resource/AwsServiceType.js +3 -0
  157. package/built/src/types/resource/AwsServiceType.js.map +1 -1
  158. package/built/src/types/resource/AwsSsmParameterAttributes.d.ts +12 -0
  159. package/built/src/types/resource/AwsSsmParameterAttributes.js +3 -0
  160. package/built/src/types/resource/AwsSsmParameterAttributes.js.map +1 -0
  161. package/built/src/types/resource/ConnectionSetting.d.ts +2 -2
  162. package/built/src/types/resource/ConnectionSetting.js.map +1 -1
  163. package/built/src/types/resource/MySQLColumnType.js +2 -2
  164. package/built/src/types/resource/MySQLColumnType.js.map +1 -1
  165. package/built/src/types/resource/OracleColumnType.js +2 -2
  166. package/built/src/types/resource/OracleColumnType.js.map +1 -1
  167. package/built/src/types/resource/PartiQLAttrType.js.map +1 -1
  168. package/built/src/types/resource/PostgresColumnType.js +2 -2
  169. package/built/src/types/resource/PostgresColumnType.js.map +1 -1
  170. package/built/src/types/resource/ResourceType.d.ts +5 -0
  171. package/built/src/types/resource/ResourceType.js +5 -0
  172. package/built/src/types/resource/ResourceType.js.map +1 -1
  173. package/built/src/types/resource/SQLServerColumnType.js +2 -2
  174. package/built/src/types/resource/SQLServerColumnType.js.map +1 -1
  175. package/built/src/types/resource/index.d.ts +4 -0
  176. package/built/src/types/resource/index.js +4 -0
  177. package/built/src/types/resource/index.js.map +1 -1
  178. package/built/src/types/utils/index.js +2 -2
  179. package/built/src/types/utils/index.js.map +1 -1
  180. package/built/src/utils/base.js +1 -1
  181. package/built/src/utils/base.js.map +1 -1
  182. package/built/src/utils/cfn/applicationDiagram.d.ts +2 -0
  183. package/built/src/utils/cfn/applicationDiagram.js +174 -0
  184. package/built/src/utils/cfn/applicationDiagram.js.map +1 -0
  185. package/built/src/utils/cfn/applicationRelations.d.ts +28 -0
  186. package/built/src/utils/cfn/applicationRelations.js +430 -0
  187. package/built/src/utils/cfn/applicationRelations.js.map +1 -0
  188. package/built/src/utils/cfn/cfnDependencyGraphDiagram.d.ts +2 -0
  189. package/built/src/utils/cfn/cfnDependencyGraphDiagram.js +198 -0
  190. package/built/src/utils/cfn/cfnDependencyGraphDiagram.js.map +1 -0
  191. package/built/src/utils/cfn/deploymentTopology.d.ts +132 -0
  192. package/built/src/utils/cfn/deploymentTopology.js +637 -0
  193. package/built/src/utils/cfn/deploymentTopology.js.map +1 -0
  194. package/built/src/utils/cfn/diagramFileModel.d.ts +2 -0
  195. package/built/src/utils/cfn/diagramFileModel.js +178 -0
  196. package/built/src/utils/cfn/diagramFileModel.js.map +1 -0
  197. package/built/src/utils/cfn/drawio/cfnDependencyGraphDiagram.d.ts +3 -0
  198. package/built/src/utils/cfn/drawio/cfnDependencyGraphDiagram.js +174 -0
  199. package/built/src/utils/cfn/drawio/cfnDependencyGraphDiagram.js.map +1 -0
  200. package/built/src/utils/cfn/drawio/commonCells.d.ts +22 -0
  201. package/built/src/utils/cfn/drawio/commonCells.js +83 -0
  202. package/built/src/utils/cfn/drawio/commonCells.js.map +1 -0
  203. package/built/src/utils/cfn/drawio/edgeRouting.d.ts +34 -0
  204. package/built/src/utils/cfn/drawio/edgeRouting.js +77 -0
  205. package/built/src/utils/cfn/drawio/edgeRouting.js.map +1 -0
  206. package/built/src/utils/cfn/drawio/multiAzInfrastructureDiagram.d.ts +3 -0
  207. package/built/src/utils/cfn/drawio/multiAzInfrastructureDiagram.js +812 -0
  208. package/built/src/utils/cfn/drawio/multiAzInfrastructureDiagram.js.map +1 -0
  209. package/built/src/utils/cfn/drawioApplicationDiagram.d.ts +3 -0
  210. package/built/src/utils/cfn/drawioApplicationDiagram.js +455 -0
  211. package/built/src/utils/cfn/drawioApplicationDiagram.js.map +1 -0
  212. package/built/src/utils/cfn/drawioInfrastructureDiagrams.d.ts +2 -0
  213. package/built/src/utils/cfn/drawioInfrastructureDiagrams.js +10 -0
  214. package/built/src/utils/cfn/drawioInfrastructureDiagrams.js.map +1 -0
  215. package/built/src/utils/cfn/drawioXml.d.ts +1 -0
  216. package/built/src/utils/cfn/drawioXml.js +11 -0
  217. package/built/src/utils/cfn/drawioXml.js.map +1 -0
  218. package/built/src/utils/cfn/generateDiagram.d.ts +2 -0
  219. package/built/src/utils/cfn/generateDiagram.js +22 -0
  220. package/built/src/utils/cfn/generateDiagram.js.map +1 -0
  221. package/built/src/utils/cfn/icons.d.ts +1 -0
  222. package/built/src/utils/cfn/icons.js +60 -0
  223. package/built/src/utils/cfn/icons.js.map +1 -0
  224. package/built/src/utils/cfn/index.d.ts +11 -0
  225. package/built/src/utils/cfn/index.js +34 -0
  226. package/built/src/utils/cfn/index.js.map +1 -0
  227. package/built/src/utils/cfn/intrinsics.d.ts +12 -0
  228. package/built/src/utils/cfn/intrinsics.js +158 -0
  229. package/built/src/utils/cfn/intrinsics.js.map +1 -0
  230. package/built/src/utils/cfn/mermaidFlowchart.d.ts +3 -0
  231. package/built/src/utils/cfn/mermaidFlowchart.js +14 -0
  232. package/built/src/utils/cfn/mermaidFlowchart.js.map +1 -0
  233. package/built/src/utils/cfn/multiAzDeploymentTrafficPathsAndProtection.d.ts +27 -0
  234. package/built/src/utils/cfn/multiAzDeploymentTrafficPathsAndProtection.js +409 -0
  235. package/built/src/utils/cfn/multiAzDeploymentTrafficPathsAndProtection.js.map +1 -0
  236. package/built/src/utils/cfn/multiAzDeploymentTrafficPathsAndProtectionDiagram.d.ts +2 -0
  237. package/built/src/utils/cfn/multiAzDeploymentTrafficPathsAndProtectionDiagram.js +286 -0
  238. package/built/src/utils/cfn/multiAzDeploymentTrafficPathsAndProtectionDiagram.js.map +1 -0
  239. package/built/src/utils/cfn/naming.d.ts +7 -0
  240. package/built/src/utils/cfn/naming.js +33 -0
  241. package/built/src/utils/cfn/naming.js.map +1 -0
  242. package/built/src/utils/cfn/resourceDependencies.d.ts +2 -0
  243. package/built/src/utils/cfn/resourceDependencies.js +33 -0
  244. package/built/src/utils/cfn/resourceDependencies.js.map +1 -0
  245. package/built/src/utils/cfn/templateParsing.d.ts +3 -0
  246. package/built/src/utils/cfn/templateParsing.js +58 -0
  247. package/built/src/utils/cfn/templateParsing.js.map +1 -0
  248. package/built/src/utils/cfn/viewpoints.d.ts +3 -0
  249. package/built/src/utils/cfn/viewpoints.js +122 -0
  250. package/built/src/utils/cfn/viewpoints.js.map +1 -0
  251. package/built/src/utils/csv.js.map +1 -1
  252. package/built/src/utils/dbType.js.map +1 -1
  253. package/built/src/utils/diagramLayout/elkLayoutEngine.d.ts +3 -0
  254. package/built/src/utils/diagramLayout/elkLayoutEngine.js +199 -0
  255. package/built/src/utils/diagramLayout/elkLayoutEngine.js.map +1 -0
  256. package/built/src/utils/diagramLayout/index.d.ts +4 -0
  257. package/built/src/utils/diagramLayout/index.js +13 -0
  258. package/built/src/utils/diagramLayout/index.js.map +1 -0
  259. package/built/src/utils/diagramLayout/normalizeLayout.d.ts +33 -0
  260. package/built/src/utils/diagramLayout/normalizeLayout.js +116 -0
  261. package/built/src/utils/diagramLayout/normalizeLayout.js.map +1 -0
  262. package/built/src/utils/diagramLayout/types.d.ts +64 -0
  263. package/built/src/utils/diagramLayout/types.js +3 -0
  264. package/built/src/utils/diagramLayout/types.js.map +1 -0
  265. package/built/src/utils/drawio/drawioXml.d.ts +24 -0
  266. package/built/src/utils/drawio/drawioXml.js +47 -0
  267. package/built/src/utils/drawio/drawioXml.js.map +1 -0
  268. package/built/src/utils/drawio/index.d.ts +2 -0
  269. package/built/src/utils/drawio/index.js +10 -0
  270. package/built/src/utils/drawio/index.js.map +1 -0
  271. package/built/src/utils/driverUtil.d.ts +1 -1
  272. package/built/src/utils/driverUtil.js.map +1 -1
  273. package/built/src/utils/er/erDiagramDrawioGenerator.d.ts +26 -0
  274. package/built/src/utils/er/erDiagramDrawioGenerator.js +99 -0
  275. package/built/src/utils/er/erDiagramDrawioGenerator.js.map +1 -0
  276. package/built/src/utils/er/erDiagramDrawioGeneratorAuto.d.ts +2 -0
  277. package/built/src/utils/er/erDiagramDrawioGeneratorAuto.js +103 -0
  278. package/built/src/utils/er/erDiagramDrawioGeneratorAuto.js.map +1 -0
  279. package/built/src/utils/er/erDiagramGenerator.d.ts +7 -0
  280. package/built/src/utils/er/erDiagramGenerator.js +321 -0
  281. package/built/src/utils/er/erDiagramGenerator.js.map +1 -0
  282. package/built/src/utils/er/index.d.ts +4 -0
  283. package/built/src/utils/er/index.js +13 -0
  284. package/built/src/utils/er/index.js.map +1 -0
  285. package/built/src/utils/er/types.d.ts +31 -0
  286. package/built/src/utils/er/types.js +3 -0
  287. package/built/src/utils/er/types.js.map +1 -0
  288. package/built/src/utils/index.d.ts +2 -0
  289. package/built/src/utils/index.js +2 -0
  290. package/built/src/utils/index.js.map +1 -1
  291. package/built/src/utils/log/LogParser.js.map +1 -1
  292. package/built/src/utils/log/buildSqlExecutions.js +3 -4
  293. package/built/src/utils/log/buildSqlExecutions.js.map +1 -1
  294. package/built/src/utils/log/classify/classifyEvent.js +2 -3
  295. package/built/src/utils/log/classify/classifyEvent.js.map +1 -1
  296. package/built/src/utils/log/detect/presetDetector.js +4 -5
  297. package/built/src/utils/log/detect/presetDetector.js.map +1 -1
  298. package/built/src/utils/log/extract/runExtractors.js +1 -2
  299. package/built/src/utils/log/extract/runExtractors.js.map +1 -1
  300. package/built/src/utils/log/logSummary.js +5 -5
  301. package/built/src/utils/log/logSummary.js.map +1 -1
  302. package/built/src/utils/log/pattern/logEventPattern.js +2 -3
  303. package/built/src/utils/log/pattern/logEventPattern.js.map +1 -1
  304. package/built/src/utils/log/rdh/convertExtractedSqlRdhResult.js +2 -3
  305. package/built/src/utils/log/rdh/convertExtractedSqlRdhResult.js.map +1 -1
  306. package/built/src/utils/log/split/splitLogEvents.js +1 -2
  307. package/built/src/utils/log/split/splitLogEvents.js.map +1 -1
  308. package/built/src/utils/log/sql/removeSqlComments.js +2 -3
  309. package/built/src/utils/log/sql/removeSqlComments.js.map +1 -1
  310. package/built/src/utils/log/validator.js +8 -5
  311. package/built/src/utils/log/validator.js.map +1 -1
  312. package/package.json +21 -9
  313. package/built/src/resource/DbResource.d.ts +0 -355
  314. package/built/src/resource/DbResource.js +0 -755
  315. package/built/src/resource/DbResource.js.map +0 -1
@@ -0,0 +1,85 @@
1
+ import { MqttQoS, RedisKeyType } from '../types';
2
+ import { DbResource } from './base';
3
+ export declare class RedisDatabase extends DbResource<DbKey> {
4
+ numOfKeys: number;
5
+ constructor(name: string, numOfKeys: number);
6
+ getDBIndex(): number;
7
+ getProperties(): {
8
+ [key: string]: any;
9
+ };
10
+ }
11
+ export declare class MemcacheDatabase extends DbResource<DbKey> {
12
+ servers: string;
13
+ hot: number;
14
+ warm: number;
15
+ cold: number;
16
+ constructor(name: string);
17
+ getProperties(): {
18
+ [key: string]: any;
19
+ };
20
+ }
21
+ export declare class MqttDatabase extends DbResource<DbSubscription> {
22
+ constructor(name: string);
23
+ getProperties(): {
24
+ [key: string]: any;
25
+ };
26
+ }
27
+ export declare class DbSubscription extends DbResource {
28
+ readonly qos: MqttQoS;
29
+ isSubscribed: boolean;
30
+ readonly nl?: boolean;
31
+ readonly rap?: boolean;
32
+ readonly rh?: number;
33
+ constructor(name: string, qos: MqttQoS, options?: {
34
+ nl?: boolean;
35
+ rap?: boolean;
36
+ rh?: number;
37
+ });
38
+ getProperties(): {
39
+ [key: string]: any;
40
+ };
41
+ }
42
+ export declare class DbKey<T extends RedisKeyParams | MemcacheKeyParams | S3KeyParams | SQSMessageParams | LogMessageParams = any> extends DbResource {
43
+ readonly params: T;
44
+ constructor(name: string, params: T);
45
+ getProperties(): {
46
+ [key: string]: any;
47
+ };
48
+ }
49
+ export type RedisKeyParams = {
50
+ type: RedisKeyType;
51
+ ttl: number;
52
+ val?: any;
53
+ base64?: string;
54
+ };
55
+ export type MemcacheKeyParams = {
56
+ slabId: number;
57
+ val?: any;
58
+ base64?: string;
59
+ };
60
+ export type S3KeyParams = {
61
+ downloadUrl?: string;
62
+ outputFilePath?: string;
63
+ lastModified: Date;
64
+ etag: string;
65
+ size: number;
66
+ storageClass: string;
67
+ stringValue?: string;
68
+ encodedBase64?: boolean;
69
+ deleteMarker?: boolean;
70
+ versionId?: string;
71
+ cacheControl?: string;
72
+ contentDisposition?: string;
73
+ contentEncoding?: string;
74
+ contentType?: string;
75
+ };
76
+ export type SQSMessageParams = {
77
+ body: string;
78
+ receiptHandle: string;
79
+ md5OfBody: string;
80
+ sentTimestamp: Date;
81
+ approximateFirstReceiveTimestamp: Date;
82
+ };
83
+ export type LogMessageParams = {
84
+ message: string;
85
+ };
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DbKey = exports.DbSubscription = exports.MqttDatabase = exports.MemcacheDatabase = exports.RedisDatabase = void 0;
4
+ const types_1 = require("../types");
5
+ const base_1 = require("./base");
6
+ class RedisDatabase extends base_1.DbResource {
7
+ constructor(name, numOfKeys) {
8
+ super(types_1.ResourceType.RedisDatabase, name);
9
+ this.numOfKeys = numOfKeys;
10
+ }
11
+ getDBIndex() {
12
+ return parseInt(this.name, 10);
13
+ }
14
+ getProperties() {
15
+ return Object.assign(Object.assign({}, super.getProperties()), { 'number of keys': this.numOfKeys });
16
+ }
17
+ }
18
+ exports.RedisDatabase = RedisDatabase;
19
+ class MemcacheDatabase extends base_1.DbResource {
20
+ constructor(name) {
21
+ super(types_1.ResourceType.MemcacheDatabase, name);
22
+ }
23
+ getProperties() {
24
+ return Object.assign(Object.assign({}, super.getProperties()), { servers: this.servers, hot: this.hot, warm: this.warm, cold: this.cold });
25
+ }
26
+ }
27
+ exports.MemcacheDatabase = MemcacheDatabase;
28
+ class MqttDatabase extends base_1.DbResource {
29
+ constructor(name) {
30
+ super(types_1.ResourceType.MqttDatabase, name);
31
+ }
32
+ getProperties() {
33
+ return Object.assign({}, super.getProperties());
34
+ }
35
+ }
36
+ exports.MqttDatabase = MqttDatabase;
37
+ class DbSubscription extends base_1.DbResource {
38
+ constructor(name, qos, options) {
39
+ super(types_1.ResourceType.Subscription, name);
40
+ this.qos = qos;
41
+ this.isSubscribed = false;
42
+ this.comment = '';
43
+ if (options) {
44
+ this.nl = options.nl;
45
+ this.rap = options.rap;
46
+ this.rh = options.rh;
47
+ }
48
+ }
49
+ getProperties() {
50
+ const prop = Object.assign(Object.assign({}, super.getProperties()), { isSubscribed: this.isSubscribed, QoS: this.qos });
51
+ if (this.nl !== undefined) {
52
+ prop['No Local'] = this.nl;
53
+ }
54
+ if (this.rap !== undefined) {
55
+ prop['Retain As Published'] = this.rap;
56
+ }
57
+ if (this.rh !== undefined) {
58
+ prop['Retain Handling'] = this.rh;
59
+ }
60
+ return prop;
61
+ }
62
+ }
63
+ exports.DbSubscription = DbSubscription;
64
+ class DbKey extends base_1.DbResource {
65
+ constructor(name, params) {
66
+ super(types_1.ResourceType.Key, name);
67
+ this.params = params;
68
+ }
69
+ getProperties() {
70
+ return Object.assign(Object.assign({ 'id or key': this.id }, super.getProperties()), this.params);
71
+ }
72
+ }
73
+ exports.DbKey = DbKey;
74
+ //# sourceMappingURL=keyValue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyValue.js","sourceRoot":"","sources":["../../../src/resource/keyValue.ts"],"names":[],"mappings":";;;AAAA,oCAA+D;AAC/D,iCAAoC;AAEpC,MAAa,aAAc,SAAQ,iBAAiB;IAClD,YAAY,IAAY,EAAS,SAAiB;QAChD,KAAK,CAAC,oBAAY,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QADT,cAAS,GAAT,SAAS,CAAQ;IAElD,CAAC;IAEM,UAAU;QACf,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACjC,CAAC;IAED,aAAa;QACX,uCACK,KAAK,CAAC,aAAa,EAAE,KACxB,gBAAgB,EAAE,IAAI,CAAC,SAAS,IAChC;IACJ,CAAC;CACF;AAfD,sCAeC;AAED,MAAa,gBAAiB,SAAQ,iBAAiB;IAKrD,YAAY,IAAY;QACtB,KAAK,CAAC,oBAAY,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;IAC7C,CAAC;IAED,aAAa;QACX,uCACK,KAAK,CAAC,aAAa,EAAE,KACxB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,IACf;IACJ,CAAC;CACF;AAlBD,4CAkBC;AAED,MAAa,YAAa,SAAQ,iBAA0B;IAC1D,YAAY,IAAY;QACtB,KAAK,CAAC,oBAAY,CAAC,YAA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,CAAC,oBAAY,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,aAAa;QACX,qCACE,WAAW,EAAE,IAAI,CAAC,EAAE,IACjB,KAAK,CAAC,aAAa,EAAE,GACrB,IAAI,CAAC,MAAM,EACd;IACJ,CAAC;CACF;AAtBD,sBAsBC"}
@@ -0,0 +1,49 @@
1
+ import { CompareKey, GeneralColumnType } from '@l-v-yonsama/rdh';
2
+ import { ForeignKeyConstraint, UniqueKeyConstraint } from '../types';
3
+ import { DbResource } from './base';
4
+ import type { ITableComparable } from './types';
5
+ export declare class RdsDatabase extends DbResource<DbSchema> {
6
+ version?: number;
7
+ constructor(name: string);
8
+ getProperties(): {
9
+ [key: string]: any;
10
+ };
11
+ getSchema(option: {
12
+ name?: string;
13
+ isDefault?: boolean;
14
+ }): DbSchema;
15
+ }
16
+ export declare class DbSchema extends DbResource<DbTable> {
17
+ isDefault: boolean;
18
+ constructor(name: string);
19
+ getUniqColumnNameWithComments(): {
20
+ name: string;
21
+ comment?: string;
22
+ }[];
23
+ }
24
+ export declare class DbTable extends DbResource<DbColumn> implements ITableComparable {
25
+ tableType: any;
26
+ foreignKeys?: ForeignKeyConstraint;
27
+ uniqueKeys?: UniqueKeyConstraint[];
28
+ constructor(name: string, tableType: any, comment?: string);
29
+ getCompareKeys(availableColumnNames?: string[]): CompareKey[];
30
+ getPrimaryColumnNames(): string[];
31
+ getUniqColumnNames(): string[];
32
+ toString(): string;
33
+ getProperties(): {
34
+ [key: string]: any;
35
+ };
36
+ }
37
+ export declare class DbColumn extends DbResource {
38
+ readonly colType: GeneralColumnType;
39
+ readonly nullable: boolean;
40
+ readonly primaryKey: boolean;
41
+ readonly uniqKey: boolean;
42
+ readonly default: any;
43
+ readonly extra: any;
44
+ constructor(name: string, colType: GeneralColumnType, params: any, comment?: string);
45
+ toString(): string;
46
+ getProperties(): {
47
+ [key: string]: any;
48
+ };
49
+ }
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DbColumn = exports.DbTable = exports.DbSchema = exports.RdsDatabase = void 0;
4
+ const rdh_1 = require("@l-v-yonsama/rdh");
5
+ const types_1 = require("../types");
6
+ const base_1 = require("./base");
7
+ class RdsDatabase extends base_1.DbResource {
8
+ constructor(name) {
9
+ super(types_1.ResourceType.RdsDatabase, name);
10
+ }
11
+ getProperties() {
12
+ return Object.assign(Object.assign({}, super.getProperties()), { version: this.version });
13
+ }
14
+ getSchema(option) {
15
+ const { name, isDefault } = option;
16
+ for (const child of this.children) {
17
+ if (child.resourceType !== types_1.ResourceType.Schema) {
18
+ continue;
19
+ }
20
+ const currentSchema = child;
21
+ if (name && name === child.name) {
22
+ return currentSchema;
23
+ }
24
+ if (isDefault && currentSchema.isDefault) {
25
+ return currentSchema;
26
+ }
27
+ }
28
+ return null;
29
+ }
30
+ }
31
+ exports.RdsDatabase = RdsDatabase;
32
+ class DbSchema extends base_1.DbResource {
33
+ constructor(name) {
34
+ super(types_1.ResourceType.Schema, name);
35
+ this.isDefault = false;
36
+ }
37
+ getUniqColumnNameWithComments() {
38
+ const ret = [];
39
+ this.children.forEach((table) => {
40
+ table.children.forEach((column) => {
41
+ const c = ret.find((it) => it.name === column.name);
42
+ if (c) {
43
+ if (c.comment === undefined) {
44
+ c.comment = column.comment;
45
+ }
46
+ }
47
+ else {
48
+ ret.push({
49
+ name: column.name,
50
+ comment: column.comment,
51
+ });
52
+ }
53
+ });
54
+ });
55
+ return ret.sort((a, b) => {
56
+ const nameA = a.name.toUpperCase();
57
+ const nameB = b.name.toUpperCase();
58
+ if (nameA < nameB) {
59
+ return -1;
60
+ }
61
+ if (nameA > nameB) {
62
+ return 1;
63
+ }
64
+ return 0;
65
+ });
66
+ }
67
+ }
68
+ exports.DbSchema = DbSchema;
69
+ class DbTable extends base_1.DbResource {
70
+ constructor(name, tableType, comment) {
71
+ super(types_1.ResourceType.Table, name);
72
+ this.foreignKeys = {};
73
+ this.tableType = tableType;
74
+ this.comment = comment;
75
+ this.isInProgress = false;
76
+ }
77
+ getCompareKeys(availableColumnNames) {
78
+ var _a;
79
+ const ret = [];
80
+ const pks = this.getPrimaryColumnNames();
81
+ if (pks.length) {
82
+ if (availableColumnNames) {
83
+ if (pks.every((pk) => availableColumnNames.some((ac) => (0, rdh_1.equalsIgnoreCase)(ac, pk)))) {
84
+ ret.push({
85
+ kind: 'primary',
86
+ names: pks.map((pk) => availableColumnNames.find((ac) => (0, rdh_1.equalsIgnoreCase)(ac, pk))),
87
+ });
88
+ }
89
+ }
90
+ else {
91
+ ret.push({
92
+ kind: 'primary',
93
+ names: pks,
94
+ });
95
+ }
96
+ }
97
+ (_a = this.uniqueKeys) === null || _a === void 0 ? void 0 : _a.forEach((it) => {
98
+ if (availableColumnNames) {
99
+ if (it.columns.every((uk) => availableColumnNames.some((ac) => (0, rdh_1.equalsIgnoreCase)(ac, uk)))) {
100
+ ret.push({
101
+ kind: 'uniq',
102
+ names: it.columns.map((uk) => availableColumnNames.find((ac) => (0, rdh_1.equalsIgnoreCase)(ac, uk))),
103
+ });
104
+ }
105
+ }
106
+ else {
107
+ ret.push({
108
+ kind: 'uniq',
109
+ names: it.columns,
110
+ });
111
+ }
112
+ });
113
+ return ret;
114
+ }
115
+ getPrimaryColumnNames() {
116
+ var _a;
117
+ return ((_a = this.children.filter((it) => it.primaryKey).map((it) => it.name)) !== null && _a !== void 0 ? _a : []);
118
+ }
119
+ getUniqColumnNames() {
120
+ var _a;
121
+ return (_a = this.children.filter((it) => it.uniqKey).map((it) => it.name)) !== null && _a !== void 0 ? _a : [];
122
+ }
123
+ toString() {
124
+ return `[${super.toString()}]: Type[${this.tableType}]`;
125
+ }
126
+ getProperties() {
127
+ return Object.assign(Object.assign({}, super.getProperties()), { 'table type': this.tableType });
128
+ }
129
+ }
130
+ exports.DbTable = DbTable;
131
+ class DbColumn extends base_1.DbResource {
132
+ constructor(name, colType, params, comment) {
133
+ super(types_1.ResourceType.Column, name);
134
+ this.colType = colType;
135
+ this.comment = comment;
136
+ if (params) {
137
+ this.nullable = params.nullable || false;
138
+ this.primaryKey = params.key === 'PRI';
139
+ this.uniqKey = params.key === 'UNI' || params.key === 'MUL';
140
+ this.default = params.default;
141
+ this.extra = params.extra;
142
+ }
143
+ else {
144
+ this.nullable = true;
145
+ }
146
+ }
147
+ toString() {
148
+ return `[${super.toString()}]: Nullable[${this.nullable}]]`;
149
+ }
150
+ getProperties() {
151
+ return Object.assign(Object.assign({}, super.getProperties()), { 'column type': (0, rdh_1.displayGeneralColumnType)(this.colType), nullable: this.nullable, primaryKey: this.primaryKey, uniqKey: this.uniqKey, default: this.default });
152
+ }
153
+ }
154
+ exports.DbColumn = DbColumn;
155
+ //# sourceMappingURL=rdb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rdb.js","sourceRoot":"","sources":["../../../src/resource/rdb.ts"],"names":[],"mappings":";;;AAAA,0CAK0B;AAC1B,oCAIkB;AAClB,iCAAoC;AAGpC,MAAa,WAAY,SAAQ,iBAAoB;IAEnD,YAAY,IAAY;QACtB,KAAK,CAAC,oBAAY,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;IACxC,CAAC;IAED,aAAa;QACX,uCACK,KAAK,CAAC,aAAa,EAAE,KACxB,OAAO,EAAE,IAAI,CAAC,OAAO,IACrB;IACJ,CAAC;IAEM,SAAS,CAAC,MAA8C;QAC7D,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QACnC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClC,IAAI,KAAK,CAAC,YAAY,KAAK,oBAAY,CAAC,MAAM,EAAE,CAAC;gBAC/C,SAAS;YACX,CAAC;YACD,MAAM,aAAa,GAAG,KAAiB,CAAC;YACxC,IAAI,IAAI,IAAI,IAAI,KAAK,KAAK,CAAC,IAAI,EAAE,CAAC;gBAChC,OAA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Aa,EAAE,IAAA,8BAAwB,EAAC,IAAI,CAAC,OAAO,CAAC,EACrD,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,OAAO,EAAE,IAAI,CAAC,OAAO,IACrB;IACJ,CAAC;CACF;AAzCD,4BAyCC"}
@@ -0,0 +1,18 @@
1
+ import type { CompareKey } from '@l-v-yonsama/rdh';
2
+ import type { AwsDatabase, DbCfnStack, DbDynamoTable, DbDynamoTableColumn, DbLogGroup, DbLogStream, DbResourceGroup, DbS3Bucket, DbS3Owner, DbSecretsManagerSecret, DbSESIdentity, DbSQSQueue, DbSsmParameter } from './aws';
3
+ import type { Auth0Database, IamClient, IamGroup, IamOrganization, IamRealm, IamRole, IamUser, KeycloakDatabase } from './iam';
4
+ import type { DbKey, DbSubscription, MemcacheDatabase, MqttDatabase, RedisDatabase } from './keyValue';
5
+ import type { DbColumn, DbSchema, DbTable, RdsDatabase } from './rdb';
6
+ export interface SchemaAndTableName {
7
+ schema?: string;
8
+ table: string;
9
+ }
10
+ export interface SchemaAndTableHints {
11
+ list: SchemaAndTableName[];
12
+ }
13
+ export type DbDatabase = RdsDatabase | AwsDatabase | RedisDatabase | MemcacheDatabase | Auth0Database | KeycloakDatabase | MqttDatabase;
14
+ export type AllSubDbResource = DbDatabase | DbSchema | DbTable | DbKey | DbColumn | DbS3Bucket | DbSQSQueue | DbLogGroup | DbLogStream | DbS3Owner | DbDynamoTable | DbDynamoTableColumn | DbSESIdentity | DbSsmParameter | DbSecretsManagerSecret | DbCfnStack | DbResourceGroup | DbSubscription | IamRealm | IamClient | IamOrganization | IamUser | IamGroup | IamRole;
15
+ export type IamResourceType = 'users' | 'groups' | 'roles';
16
+ export interface ITableComparable {
17
+ getCompareKeys(availableColumnNames?: string[]): CompareKey[];
18
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/resource/types.ts"],"names":[],"mappings":""}
@@ -8,5 +8,5 @@ var RequiredActionAlias;
8
8
  RequiredActionAlias["CONFIGURE_TOTP"] = "CONFIGURE_TOTP";
9
9
  RequiredActionAlias["UPDATE_PASSWORD"] = "UPDATE_PASSWORD";
10
10
  RequiredActionAlias["TERMS_AND_CONDITIONS"] = "TERMS_AND_CONDITIONS";
11
- })(RequiredActionAlias = exports.RequiredActionAlias || (exports.RequiredActionAlias = {}));
11
+ })(RequiredActionAlias || (exports.RequiredActionAlias = RequiredActionAlias = {}));
12
12
  //# sourceMappingURL=Keycloak.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Keycloak.js","sourceRoot":"","sources":["../../../../src/types/drivers/Keycloak.ts"],"names":[],"mappings":";;;AAuHA,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,oDAA6B,CAAA;IAC7B,wDAAiC,CAAA;IACjC,wDAAiC,CAAA;IACjC,0DAAmC,CAAA;IACnC,oEAA6C,CAAA;AAC/C,CAAC,EANW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAM9B"}
1
+ {"version":3,"file":"Keycloak.js","sourceRoot":"","sources":["../../../../src/types/drivers/Keycloak.ts"],"names":[],"mappings":";;;AAuHA,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,oDAA6B,CAAA;IAC7B,wDAAiC,CAAA;IACjC,wDAAiC,CAAA;IACjC,0DAAmC,CAAA;IACnC,oEAA6C,CAAA;AAC/C,CAAC,EANW,mBAAmB,mCAAnB,mBAAmB,QAM9B"}
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  export type MemcachedValue = string | Buffer | null;
3
2
  export type ListOption = {
4
3
  limit?: number;
@@ -41,6 +41,20 @@ export type AwsSQSScanParams = ScanParamsBase & {
41
41
  queueUrl: string;
42
42
  bodyOrMessageIdContains?: string;
43
43
  };
44
+ export type AwsSsmScanParams = ScanParamsBase & {
45
+ kind: 'aws-ssm';
46
+ pathPrefix?: string;
47
+ nameContains?: string;
48
+ };
49
+ export type AwsSecretsManagerScanParams = ScanParamsBase & {
50
+ kind: 'aws-secretsmanager';
51
+ nameContains?: string;
52
+ };
53
+ export type AwsCloudFormationScanParams = ScanParamsBase & {
54
+ kind: 'aws-cloudformation';
55
+ statusFilter?: 'active' | 'inProgress' | 'completed' | 'deleted' | 'failed';
56
+ nameContains?: string;
57
+ };
44
58
  export type AwsCloudWatchLogGroupScanParams = ScanParamsBase & {
45
59
  kind: 'aws-cloudwatch-loggroup';
46
60
  logGroupName: string;
@@ -69,5 +83,5 @@ export type Auth0ScanParams = ScanParamsBase & {
69
83
  searchQuery?: string;
70
84
  jsonExpansion?: boolean;
71
85
  };
72
- export type ScanParams = RedisScanParams | MemcacheScanParams | MqttScanParams | AwsS3ScanParams | AwsSQSScanParams | AwsCloudWatchLogGroupScanParams | AwsCloudWatchLogStreamScanParams | KeycloakScanParams | Auth0ScanParams;
86
+ export type ScanParams = RedisScanParams | MemcacheScanParams | MqttScanParams | AwsS3ScanParams | AwsSQSScanParams | AwsSsmScanParams | AwsSecretsManagerScanParams | AwsCloudFormationScanParams | AwsCloudWatchLogGroupScanParams | AwsCloudWatchLogStreamScanParams | KeycloakScanParams | Auth0ScanParams;
73
87
  export {};
@@ -8,6 +8,6 @@ var ProposalKind;
8
8
  ProposalKind[ProposalKind["Table"] = 1] = "Table";
9
9
  ProposalKind[ProposalKind["Column"] = 2] = "Column";
10
10
  ProposalKind[ProposalKind["ReservedWord"] = 3] = "ReservedWord";
11
- })(ProposalKind = exports.ProposalKind || (exports.ProposalKind = {}));
11
+ })(ProposalKind || (exports.ProposalKind = ProposalKind = {}));
12
12
  exports.FORMATTER_SQL_LANGUAGES = sql_formatter_1.supportedDialects;
13
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/helpers/index.ts"],"names":[],"mappings":";;;AAiBA,iDAA+D;AAuD/D,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,mDAAU,CAAA;IACV,iDAAS,CAAA;IACT,mDAAU,CAAA;IACV,+DAAgB,CAAA;AAClB,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB;AA8FY,QAAA,uBAAuB,GAClC,iCAAkC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/helpers/index.ts"],"names":[],"mappings":";;;AAiBA,iDAA+D;AAuD/D,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,mDAAU,CAAA;IACV,iDAAS,CAAA;IACT,mDAAU,CAAA;IACV,+DAAgB,CAAA;AAClB,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AA8FY,QAAA,uBAAuB,GAClC,iCAAkC,CAAC"}
@@ -0,0 +1,164 @@
1
+ import { StackStatus } from '@aws-sdk/client-cloudformation';
2
+ export type AwsCfnStackResourceDependency = {
3
+ logicalId: string;
4
+ via: 'Ref' | 'GetAtt' | 'DependsOn' | 'ImportValue';
5
+ };
6
+ export type AwsCfnStackResource = {
7
+ logicalId: string;
8
+ physicalId?: string;
9
+ resourceType: string;
10
+ dependsOn?: AwsCfnStackResourceDependency[];
11
+ };
12
+ export type AwsCfnStackAttributes = {
13
+ stackStatus: string;
14
+ creationTime?: Date;
15
+ resources: AwsCfnStackResource[];
16
+ };
17
+ export declare const ACTIVE_STATUSES: StackStatus[];
18
+ export declare const IN_PROGRESS_STATUSES: StackStatus[];
19
+ export declare const COMPLETED_STATUSES: StackStatus[];
20
+ export declare const DELETED_STATUSES: StackStatus[];
21
+ export declare const FAILED_STATUSES: StackStatus[];
22
+ export type Refable<T = any> = T | {
23
+ Ref: string;
24
+ } | {
25
+ '!Ref': string;
26
+ } | {
27
+ 'Fn::GetAtt': [string, string];
28
+ } | {
29
+ '!GetAtt': [string, string];
30
+ } | {
31
+ 'Fn::Sub': string | [string, Record<string, any>];
32
+ } | {
33
+ '!Sub': string | [string, Record<string, any>];
34
+ } | {
35
+ 'Fn::Join': [string, Refable[]];
36
+ } | {
37
+ '!Join': [string, Refable[]];
38
+ } | {
39
+ 'Fn::If': [string, Refable, Refable];
40
+ } | {
41
+ '!If': [string, Refable, Refable];
42
+ } | {
43
+ 'Fn::ImportValue': Refable;
44
+ } | {
45
+ '!ImportValue': Refable;
46
+ } | {
47
+ 'Fn::Select': [number | string, Refable];
48
+ } | {
49
+ '!Select': [number | string, Refable];
50
+ } | {
51
+ 'Fn::Split': [string, Refable];
52
+ } | {
53
+ '!Split': [string, Refable];
54
+ } | {
55
+ 'Fn::Base64': Refable;
56
+ } | {
57
+ '!Base64': Refable;
58
+ } | {
59
+ 'Fn::FindInMap': [string, string, string];
60
+ } | {
61
+ 'Fn::Equals': [Refable, Refable];
62
+ } | {
63
+ 'Fn::And': Refable[];
64
+ } | {
65
+ 'Fn::Or': Refable[];
66
+ } | {
67
+ 'Fn::Not': [Refable];
68
+ };
69
+ export interface TemplateParameter {
70
+ Type: string;
71
+ Default?: any;
72
+ Description?: string;
73
+ AllowedValues?: any[];
74
+ AllowedPattern?: string;
75
+ MinLength?: number;
76
+ MaxLength?: number;
77
+ MinValue?: number;
78
+ MaxValue?: number;
79
+ ConstraintDescription?: string;
80
+ NoEcho?: boolean;
81
+ }
82
+ export interface TemplateResource {
83
+ Type: string;
84
+ Properties?: Record<string, Refable>;
85
+ DependsOn?: string | string[];
86
+ Condition?: string;
87
+ Metadata?: Record<string, any>;
88
+ }
89
+ export interface TemplateOutput {
90
+ Description?: string;
91
+ Value: Refable;
92
+ Export?: {
93
+ Name: Refable;
94
+ };
95
+ Condition?: string;
96
+ }
97
+ export interface CloudFormationTemplate {
98
+ AWSTemplateFormatVersion?: string;
99
+ Description?: string;
100
+ Parameters?: Record<string, TemplateParameter>;
101
+ Mappings?: Record<string, Record<string, Record<string, string>>>;
102
+ Conditions?: Record<string, any>;
103
+ Resources: Record<string, TemplateResource>;
104
+ Outputs?: Record<string, TemplateOutput>;
105
+ Transform?: string | string[];
106
+ Metadata?: Record<string, any>;
107
+ }
108
+ export type RefValue = {
109
+ type: 'plain' | 'Ref' | 'GetAtt' | 'ImportValue';
110
+ value: string;
111
+ rawValue: Refable;
112
+ };
113
+ export type DiagramDependencyTo = {
114
+ kind: 'Resources' | 'Parameters' | 'Outputs';
115
+ logicalId: string;
116
+ fileIndex?: number;
117
+ via?: 'Ref' | 'GetAtt' | 'DependsOn' | 'ImportValue';
118
+ };
119
+ export type DiagramOutput = {
120
+ id: string;
121
+ value: {
122
+ logicalId: string;
123
+ };
124
+ export: {
125
+ name: string;
126
+ rawName: string;
127
+ };
128
+ };
129
+ export type DiagramFile = {
130
+ fileIndex: number;
131
+ fileName: string;
132
+ templateSource?: string;
133
+ parameterValues?: Record<string, string>;
134
+ pseudoParameterValues?: Record<string, string>;
135
+ groupName: string;
136
+ groupId: string;
137
+ resouces: string[];
138
+ parameters: string[];
139
+ cfnTemplate: CloudFormationTemplate;
140
+ dependencies: {
141
+ from: string;
142
+ to: DiagramDependencyTo;
143
+ }[];
144
+ outputs: DiagramOutput[];
145
+ };
146
+ export type DiagramViewpoint = 'ApplicationView' | 'InfrastructureView' | 'SecurityView' | 'DBView' | 'OperationsView' | 'CloudFormationView';
147
+ export type AuxiliaryResourceTreatment = 'MergeIntoLabel' | 'SeparateGroup' | 'Omit';
148
+ export type GenerateDiagramParams = {
149
+ list: {
150
+ fileName: string;
151
+ templateJSONString: string;
152
+ templateSource?: string;
153
+ parameterValues?: Record<string, string>;
154
+ pseudoParameterValues?: Record<string, string>;
155
+ }[];
156
+ mode: 'ApplicationDiagram' | 'CfnDependencyGraph' | 'MultiAzDeploymentTrafficPathsAndProtection';
157
+ viewpoint?: DiagramViewpoint;
158
+ auxiliaryTreatment?: AuxiliaryResourceTreatment;
159
+ options?: {
160
+ includeParameters?: boolean;
161
+ includeOutputs?: boolean;
162
+ includeLegend?: boolean;
163
+ };
164
+ };