@webiny/api-sync-system 0.0.0-unstable.a4637c5ce6 → 0.0.0-unstable.a4f3e4ea8b

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 (321) hide show
  1. package/README.md +6 -108
  2. package/constants.js +2 -7
  3. package/constants.js.map +1 -1
  4. package/index.js +3 -40
  5. package/package.json +29 -26
  6. package/resolver/app/RecordHandler.d.ts +6 -6
  7. package/resolver/app/RecordHandler.js +84 -114
  8. package/resolver/app/RecordHandler.js.map +1 -1
  9. package/resolver/app/RecordsValidation.js +13 -24
  10. package/resolver/app/RecordsValidation.js.map +1 -1
  11. package/resolver/app/ResolverApplication.d.ts +1 -1
  12. package/resolver/app/ResolverApplication.js +27 -42
  13. package/resolver/app/ResolverApplication.js.map +1 -1
  14. package/resolver/app/abstractions/RecordHandler.d.ts +1 -1
  15. package/resolver/app/abstractions/RecordHandler.js +0 -7
  16. package/resolver/app/abstractions/RecordsValidation.d.ts +2 -2
  17. package/resolver/app/abstractions/RecordsValidation.js +0 -7
  18. package/resolver/app/abstractions/ResolverApplication.js +0 -7
  19. package/resolver/app/abstractions/ResolverRecord.d.ts +1 -1
  20. package/resolver/app/abstractions/ResolverRecord.js +0 -7
  21. package/resolver/app/bundler/BaseBundle.d.ts +6 -6
  22. package/resolver/app/bundler/BaseBundle.js +16 -22
  23. package/resolver/app/bundler/BaseBundle.js.map +1 -1
  24. package/resolver/app/bundler/Bundler.d.ts +1 -1
  25. package/resolver/app/bundler/Bundler.js +12 -25
  26. package/resolver/app/bundler/Bundler.js.map +1 -1
  27. package/resolver/app/bundler/Bundles.d.ts +2 -2
  28. package/resolver/app/bundler/Bundles.js +20 -33
  29. package/resolver/app/bundler/Bundles.js.map +1 -1
  30. package/resolver/app/bundler/CommandBundle.d.ts +1 -1
  31. package/resolver/app/bundler/CommandBundle.js +8 -25
  32. package/resolver/app/bundler/CommandBundle.js.map +1 -1
  33. package/resolver/app/bundler/TableBundle.d.ts +1 -1
  34. package/resolver/app/bundler/TableBundle.js +7 -22
  35. package/resolver/app/bundler/TableBundle.js.map +1 -1
  36. package/resolver/app/bundler/types.d.ts +2 -2
  37. package/resolver/app/bundler/types.js +0 -7
  38. package/resolver/app/commandHandler/DeleteCommandHandler.d.ts +3 -3
  39. package/resolver/app/commandHandler/DeleteCommandHandler.js +21 -35
  40. package/resolver/app/commandHandler/DeleteCommandHandler.js.map +1 -1
  41. package/resolver/app/commandHandler/PutCommandHandler.d.ts +4 -4
  42. package/resolver/app/commandHandler/PutCommandHandler.js +15 -28
  43. package/resolver/app/commandHandler/PutCommandHandler.js.map +1 -1
  44. package/resolver/app/commandHandler/delete.d.ts +1 -1
  45. package/resolver/app/commandHandler/delete.js +13 -21
  46. package/resolver/app/commandHandler/delete.js.map +1 -1
  47. package/resolver/app/commandHandler/put.d.ts +1 -1
  48. package/resolver/app/commandHandler/put.js +13 -21
  49. package/resolver/app/commandHandler/put.js.map +1 -1
  50. package/resolver/app/data/SourceDataContainer.d.ts +3 -3
  51. package/resolver/app/data/SourceDataContainer.js +27 -36
  52. package/resolver/app/data/SourceDataContainer.js.map +1 -1
  53. package/resolver/app/data/types.d.ts +2 -2
  54. package/resolver/app/data/types.js +0 -7
  55. package/resolver/app/fetcher/Fetcher.d.ts +3 -3
  56. package/resolver/app/fetcher/Fetcher.js +87 -121
  57. package/resolver/app/fetcher/Fetcher.js.map +1 -1
  58. package/resolver/app/fetcher/types.d.ts +2 -2
  59. package/resolver/app/fetcher/types.js +0 -7
  60. package/resolver/app/ingestor/Ingestor.d.ts +1 -1
  61. package/resolver/app/ingestor/Ingestor.js +26 -39
  62. package/resolver/app/ingestor/Ingestor.js.map +1 -1
  63. package/resolver/app/ingestor/IngestorResult.js +27 -39
  64. package/resolver/app/ingestor/IngestorResult.js.map +1 -1
  65. package/resolver/app/ingestor/types.d.ts +2 -2
  66. package/resolver/app/ingestor/types.js +0 -7
  67. package/resolver/app/storer/Storer.d.ts +3 -3
  68. package/resolver/app/storer/Storer.js +73 -95
  69. package/resolver/app/storer/Storer.js.map +1 -1
  70. package/resolver/app/storer/types.d.ts +2 -2
  71. package/resolver/app/storer/types.js +0 -7
  72. package/resolver/app/transform/TransformHandler.d.ts +4 -4
  73. package/resolver/app/transform/TransformHandler.js +46 -64
  74. package/resolver/app/transform/TransformHandler.js.map +1 -1
  75. package/resolver/app/transform/middleware.d.ts +1 -1
  76. package/resolver/app/transform/middleware.js +12 -25
  77. package/resolver/app/transform/middleware.js.map +1 -1
  78. package/resolver/app/utils/Retry.js +21 -32
  79. package/resolver/app/utils/Retry.js.map +1 -1
  80. package/resolver/app/utils/sleep.js +4 -12
  81. package/resolver/app/utils/sleep.js.map +1 -1
  82. package/resolver/app/validation/body.d.ts +25 -124
  83. package/resolver/app/validation/body.js +31 -44
  84. package/resolver/app/validation/body.js.map +1 -1
  85. package/resolver/app/validation/createJsonTransform.d.ts +1 -1
  86. package/resolver/app/validation/createJsonTransform.js +13 -22
  87. package/resolver/app/validation/createJsonTransform.js.map +1 -1
  88. package/resolver/app/validation/detail.d.ts +19 -72
  89. package/resolver/app/validation/detail.js +33 -46
  90. package/resolver/app/validation/detail.js.map +1 -1
  91. package/resolver/app/validation/event.d.ts +29 -188
  92. package/resolver/app/validation/event.js +21 -30
  93. package/resolver/app/validation/event.js.map +1 -1
  94. package/resolver/app/validation/numericString.d.ts +1 -1
  95. package/resolver/app/validation/numericString.js +9 -20
  96. package/resolver/app/validation/numericString.js.map +1 -1
  97. package/resolver/app/validation/system.d.ts +2 -14
  98. package/resolver/app/validation/system.js +9 -18
  99. package/resolver/app/validation/system.js.map +1 -1
  100. package/resolver/createEventHandlerPlugin.d.ts +2 -1
  101. package/resolver/createEventHandlerPlugin.js +85 -121
  102. package/resolver/createEventHandlerPlugin.js.map +1 -1
  103. package/resolver/createResolverHandler.d.ts +1 -1
  104. package/resolver/createResolverHandler.js +60 -75
  105. package/resolver/createResolverHandler.js.map +1 -1
  106. package/resolver/deployment/Deployment.d.ts +2 -3
  107. package/resolver/deployment/Deployment.js +27 -44
  108. package/resolver/deployment/Deployment.js.map +1 -1
  109. package/resolver/deployment/Deployments.js +19 -30
  110. package/resolver/deployment/Deployments.js.map +1 -1
  111. package/resolver/deployment/DeploymentsFetcher.js +82 -102
  112. package/resolver/deployment/DeploymentsFetcher.js.map +1 -1
  113. package/resolver/deployment/types.d.ts +4 -6
  114. package/resolver/deployment/types.js +0 -7
  115. package/resolver/lambda/LambdaTrigger.js +25 -34
  116. package/resolver/lambda/LambdaTrigger.js.map +1 -1
  117. package/resolver/plugins/CommandHandlerPlugin.d.ts +3 -3
  118. package/resolver/plugins/CommandHandlerPlugin.js +17 -24
  119. package/resolver/plugins/CommandHandlerPlugin.js.map +1 -1
  120. package/resolver/plugins/StorerAfterEachPlugin.d.ts +2 -2
  121. package/resolver/plugins/StorerAfterEachPlugin.js +21 -29
  122. package/resolver/plugins/StorerAfterEachPlugin.js.map +1 -1
  123. package/resolver/plugins/TransformRecordPlugin.d.ts +3 -3
  124. package/resolver/plugins/TransformRecordPlugin.js +20 -27
  125. package/resolver/plugins/TransformRecordPlugin.js.map +1 -1
  126. package/resolver/recordTypes/fileManager/CopyFile.js +44 -74
  127. package/resolver/recordTypes/fileManager/CopyFile.js.map +1 -1
  128. package/resolver/recordTypes/fileManager/DeleteFile.d.ts +1 -1
  129. package/resolver/recordTypes/fileManager/DeleteFile.js +40 -65
  130. package/resolver/recordTypes/fileManager/DeleteFile.js.map +1 -1
  131. package/resolver/recordTypes/fileManager/fileManager.d.ts +1 -1
  132. package/resolver/recordTypes/fileManager/fileManager.js +7 -12
  133. package/resolver/recordTypes/fileManager/fileManager.js.map +1 -1
  134. package/resolver/recordTypes/fileManager/fileManagerOnDelete.d.ts +1 -1
  135. package/resolver/recordTypes/fileManager/fileManagerOnDelete.js +27 -45
  136. package/resolver/recordTypes/fileManager/fileManagerOnDelete.js.map +1 -1
  137. package/resolver/recordTypes/fileManager/fileManagerOnPut.d.ts +1 -1
  138. package/resolver/recordTypes/fileManager/fileManagerOnPut.js +27 -45
  139. package/resolver/recordTypes/fileManager/fileManagerOnPut.js.map +1 -1
  140. package/resolver/recordTypes/fileManager/shouldBeHandled.d.ts +1 -1
  141. package/resolver/recordTypes/fileManager/shouldBeHandled.js +10 -34
  142. package/resolver/recordTypes/fileManager/shouldBeHandled.js.map +1 -1
  143. package/resolver/recordTypes/fileManager/types.d.ts +2 -2
  144. package/resolver/recordTypes/fileManager/types.js +0 -7
  145. package/resolver/recordTypes/users/CopyUser.d.ts +2 -2
  146. package/resolver/recordTypes/users/CopyUser.js +44 -61
  147. package/resolver/recordTypes/users/CopyUser.js.map +1 -1
  148. package/resolver/recordTypes/users/DeleteUser.d.ts +2 -2
  149. package/resolver/recordTypes/users/DeleteUser.js +40 -58
  150. package/resolver/recordTypes/users/DeleteUser.js.map +1 -1
  151. package/resolver/recordTypes/users/shouldBeHandled.d.ts +1 -1
  152. package/resolver/recordTypes/users/shouldBeHandled.js +10 -33
  153. package/resolver/recordTypes/users/shouldBeHandled.js.map +1 -1
  154. package/resolver/recordTypes/users/types.d.ts +1 -1
  155. package/resolver/recordTypes/users/types.js +0 -7
  156. package/resolver/recordTypes/users/users.js +7 -12
  157. package/resolver/recordTypes/users/users.js.map +1 -1
  158. package/resolver/recordTypes/users/usersOnDelete.d.ts +2 -2
  159. package/resolver/recordTypes/users/usersOnDelete.js +26 -44
  160. package/resolver/recordTypes/users/usersOnDelete.js.map +1 -1
  161. package/resolver/recordTypes/users/usersOnPut.d.ts +2 -2
  162. package/resolver/recordTypes/users/usersOnPut.js +27 -45
  163. package/resolver/recordTypes/users/usersOnPut.js.map +1 -1
  164. package/sync/FilterOutRecord.d.ts +2 -2
  165. package/sync/FilterOutRecord.js +8 -24
  166. package/sync/FilterOutRecord.js.map +1 -1
  167. package/sync/attachToDynamoDbDocument.d.ts +1 -1
  168. package/sync/attachToDynamoDbDocument.js +48 -75
  169. package/sync/attachToDynamoDbDocument.js.map +1 -1
  170. package/sync/createHandler.js +44 -60
  171. package/sync/createHandler.js.map +1 -1
  172. package/sync/createSendDataToEventBridgeOnRequestEnd.js +34 -46
  173. package/sync/createSendDataToEventBridgeOnRequestEnd.js.map +1 -1
  174. package/sync/createSyncSystem.d.ts +1 -1
  175. package/sync/createSyncSystem.js +27 -36
  176. package/sync/createSyncSystem.js.map +1 -1
  177. package/sync/filter/createDefaultFilterOutRecordPlugins.d.ts +1 -1
  178. package/sync/filter/createDefaultFilterOutRecordPlugins.js +37 -86
  179. package/sync/filter/createDefaultFilterOutRecordPlugins.js.map +1 -1
  180. package/sync/handler/Handler.d.ts +2 -2
  181. package/sync/handler/Handler.js +66 -86
  182. package/sync/handler/Handler.js.map +1 -1
  183. package/sync/handler/HandlerConverter.js +20 -36
  184. package/sync/handler/HandlerConverter.js.map +1 -1
  185. package/sync/handler/converter/BatchGetCommandConverter.js +13 -20
  186. package/sync/handler/converter/BatchGetCommandConverter.js.map +1 -1
  187. package/sync/handler/converter/BatchWriteCommandConverter.js +13 -20
  188. package/sync/handler/converter/BatchWriteCommandConverter.js.map +1 -1
  189. package/sync/handler/converter/DeleteCommandConverter.js +13 -20
  190. package/sync/handler/converter/DeleteCommandConverter.js.map +1 -1
  191. package/sync/handler/converter/GetCommandConverter.js +13 -20
  192. package/sync/handler/converter/GetCommandConverter.js.map +1 -1
  193. package/sync/handler/converter/PutCommandConverter.js +13 -20
  194. package/sync/handler/converter/PutCommandConverter.js.map +1 -1
  195. package/sync/handler/converter/QueryCommandConverter.js +13 -20
  196. package/sync/handler/converter/QueryCommandConverter.js.map +1 -1
  197. package/sync/handler/converter/ScanCommandConverter.js +13 -20
  198. package/sync/handler/converter/ScanCommandConverter.js.map +1 -1
  199. package/sync/handler/converter/UpdateCommandConverter.js +13 -20
  200. package/sync/handler/converter/UpdateCommandConverter.js.map +1 -1
  201. package/sync/handler/converter/commands/BatchWriteCommandValue.d.ts +2 -2
  202. package/sync/handler/converter/commands/BatchWriteCommandValue.js +34 -44
  203. package/sync/handler/converter/commands/BatchWriteCommandValue.js.map +1 -1
  204. package/sync/handler/converter/commands/DeleteCommandValue.d.ts +2 -2
  205. package/sync/handler/converter/commands/DeleteCommandValue.js +19 -23
  206. package/sync/handler/converter/commands/DeleteCommandValue.js.map +1 -1
  207. package/sync/handler/converter/commands/NullCommandValue.d.ts +1 -1
  208. package/sync/handler/converter/commands/NullCommandValue.js +7 -14
  209. package/sync/handler/converter/commands/NullCommandValue.js.map +1 -1
  210. package/sync/handler/converter/commands/PutCommandValue.d.ts +2 -2
  211. package/sync/handler/converter/commands/PutCommandValue.js +19 -23
  212. package/sync/handler/converter/commands/PutCommandValue.js.map +1 -1
  213. package/sync/handler/converter/commands/UpdateCommandValue.d.ts +2 -2
  214. package/sync/handler/converter/commands/UpdateCommandValue.js +19 -23
  215. package/sync/handler/converter/commands/UpdateCommandValue.js.map +1 -1
  216. package/sync/handler/types.d.ts +3 -3
  217. package/sync/handler/types.js +0 -7
  218. package/sync/plugins/FilterOutRecordPlugin.d.ts +1 -1
  219. package/sync/plugins/FilterOutRecordPlugin.js +18 -28
  220. package/sync/plugins/FilterOutRecordPlugin.js.map +1 -1
  221. package/sync/requestPlugin.d.ts +1 -1
  222. package/sync/requestPlugin.js +39 -55
  223. package/sync/requestPlugin.js.map +1 -1
  224. package/sync/types.js +0 -7
  225. package/sync/utils/getTableType.js +11 -19
  226. package/sync/utils/getTableType.js.map +1 -1
  227. package/sync/utils/manifest.d.ts +3 -7
  228. package/sync/utils/manifest.js +30 -47
  229. package/sync/utils/manifest.js.map +1 -1
  230. package/sync/utils/validateSystemInput.d.ts +1 -1
  231. package/sync/utils/validateSystemInput.js +22 -37
  232. package/sync/utils/validateSystemInput.js.map +1 -1
  233. package/types.d.ts +3 -5
  234. package/types.js +6 -12
  235. package/types.js.map +1 -1
  236. package/utils/createSystemName.js +5 -10
  237. package/utils/createSystemName.js.map +1 -1
  238. package/worker/actions/copyFile/CopyFile.js +185 -268
  239. package/worker/actions/copyFile/CopyFile.js.map +1 -1
  240. package/worker/actions/copyFile/copyFileAction.d.ts +1 -1
  241. package/worker/actions/copyFile/copyFileAction.js +30 -45
  242. package/worker/actions/copyFile/copyFileAction.js.map +1 -1
  243. package/worker/actions/copyFile/copyFileSchema.d.ts +6 -38
  244. package/worker/actions/copyFile/copyFileSchema.js +14 -23
  245. package/worker/actions/copyFile/copyFileSchema.js.map +1 -1
  246. package/worker/actions/copyFile/types.js +0 -7
  247. package/worker/actions/createUser/CreateUser.d.ts +1 -1
  248. package/worker/actions/createUser/CreateUser.js +53 -83
  249. package/worker/actions/createUser/CreateUser.js.map +1 -1
  250. package/worker/actions/createUser/createUserAction.d.ts +2 -2
  251. package/worker/actions/createUser/createUserAction.js +28 -39
  252. package/worker/actions/createUser/createUserAction.js.map +1 -1
  253. package/worker/actions/createUser/createUserSchema.d.ts +6 -38
  254. package/worker/actions/createUser/createUserSchema.js +14 -23
  255. package/worker/actions/createUser/createUserSchema.js.map +1 -1
  256. package/worker/actions/createUser/types.js +0 -7
  257. package/worker/actions/deleteFile/DeleteFile.js +52 -74
  258. package/worker/actions/deleteFile/DeleteFile.js.map +1 -1
  259. package/worker/actions/deleteFile/deleteFileAction.d.ts +1 -1
  260. package/worker/actions/deleteFile/deleteFileAction.js +25 -40
  261. package/worker/actions/deleteFile/deleteFileAction.js.map +1 -1
  262. package/worker/actions/deleteFile/deleteFileSchema.d.ts +6 -38
  263. package/worker/actions/deleteFile/deleteFileSchema.js +14 -23
  264. package/worker/actions/deleteFile/deleteFileSchema.js.map +1 -1
  265. package/worker/actions/deleteFile/types.js +0 -7
  266. package/worker/actions/deleteUser/DeleteUser.d.ts +2 -2
  267. package/worker/actions/deleteUser/DeleteUser.js +39 -60
  268. package/worker/actions/deleteUser/DeleteUser.js.map +1 -1
  269. package/worker/actions/deleteUser/deleteUserAction.d.ts +1 -1
  270. package/worker/actions/deleteUser/deleteUserAction.js +26 -37
  271. package/worker/actions/deleteUser/deleteUserAction.js.map +1 -1
  272. package/worker/actions/deleteUser/deleteUserSchema.d.ts +5 -23
  273. package/worker/actions/deleteUser/deleteUserSchema.js +13 -22
  274. package/worker/actions/deleteUser/deleteUserSchema.js.map +1 -1
  275. package/worker/actions/deleteUser/types.js +0 -7
  276. package/worker/actions/logValidationError.js +6 -14
  277. package/worker/actions/logValidationError.js.map +1 -1
  278. package/worker/actions/removeCognitoUserAttributes.js +9 -22
  279. package/worker/actions/removeCognitoUserAttributes.js.map +1 -1
  280. package/worker/actions/updateUser/UpdateUser.d.ts +1 -1
  281. package/worker/actions/updateUser/UpdateUser.js +50 -74
  282. package/worker/actions/updateUser/UpdateUser.js.map +1 -1
  283. package/worker/actions/updateUser/types.js +0 -7
  284. package/worker/actions/updateUser/updateUserAction.d.ts +2 -2
  285. package/worker/actions/updateUser/updateUserAction.js +28 -39
  286. package/worker/actions/updateUser/updateUserAction.js.map +1 -1
  287. package/worker/actions/updateUser/updateUserSchema.d.ts +6 -38
  288. package/worker/actions/updateUser/updateUserSchema.js +14 -23
  289. package/worker/actions/updateUser/updateUserSchema.js.map +1 -1
  290. package/worker/createWorkerHandler.js +32 -45
  291. package/worker/createWorkerHandler.js.map +1 -1
  292. package/worker/handler/WorkerActionHandler.d.ts +2 -2
  293. package/worker/handler/WorkerActionHandler.js +19 -28
  294. package/worker/handler/WorkerActionHandler.js.map +1 -1
  295. package/worker/handler/eventHandler.js +18 -27
  296. package/worker/handler/eventHandler.js.map +1 -1
  297. package/worker/plugins/WorkerActionPlugin.d.ts +1 -1
  298. package/worker/plugins/WorkerActionPlugin.js +18 -25
  299. package/worker/plugins/WorkerActionPlugin.js.map +1 -1
  300. package/worker/types.js +0 -7
  301. package/index.js.map +0 -1
  302. package/resolver/app/abstractions/RecordHandler.js.map +0 -1
  303. package/resolver/app/abstractions/RecordsValidation.js.map +0 -1
  304. package/resolver/app/abstractions/ResolverApplication.js.map +0 -1
  305. package/resolver/app/abstractions/ResolverRecord.js.map +0 -1
  306. package/resolver/app/bundler/types.js.map +0 -1
  307. package/resolver/app/data/types.js.map +0 -1
  308. package/resolver/app/fetcher/types.js.map +0 -1
  309. package/resolver/app/ingestor/types.js.map +0 -1
  310. package/resolver/app/storer/types.js.map +0 -1
  311. package/resolver/deployment/types.js.map +0 -1
  312. package/resolver/recordTypes/fileManager/types.js.map +0 -1
  313. package/resolver/recordTypes/users/types.js.map +0 -1
  314. package/sync/handler/types.js.map +0 -1
  315. package/sync/types.js.map +0 -1
  316. package/worker/actions/copyFile/types.js.map +0 -1
  317. package/worker/actions/createUser/types.js.map +0 -1
  318. package/worker/actions/deleteFile/types.js.map +0 -1
  319. package/worker/actions/deleteUser/types.js.map +0 -1
  320. package/worker/actions/updateUser/types.js.map +0 -1
  321. package/worker/types.js.map +0 -1
@@ -1,27 +1,23 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.PutCommandValue = void 0;
7
- var _getTableType = require("../../../utils/getTableType.js");
1
+ import { getTableType } from "../../../utils/getTableType.js";
8
2
  class PutCommandValue {
9
- command = "put";
10
- constructor(input) {
11
- const tableName = input.input.TableName;
12
- this.item = {
13
- command: this.command,
14
- PK: input.input.Item.PK,
15
- SK: input.input.Item.SK,
16
- tableName,
17
- tableType: (0, _getTableType.getTableType)(tableName),
18
- input
19
- };
20
- }
21
- getItems() {
22
- return [this.item];
23
- }
3
+ constructor(input){
4
+ this.command = "put";
5
+ const tableName = input.input.TableName;
6
+ this.item = {
7
+ command: this.command,
8
+ PK: input.input.Item.PK,
9
+ SK: input.input.Item.SK,
10
+ tableName,
11
+ tableType: getTableType(tableName),
12
+ input
13
+ };
14
+ }
15
+ getItems() {
16
+ return [
17
+ this.item
18
+ ];
19
+ }
24
20
  }
25
- exports.PutCommandValue = PutCommandValue;
21
+ export { PutCommandValue };
26
22
 
27
23
  //# sourceMappingURL=PutCommandValue.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_getTableType","require","PutCommandValue","command","constructor","input","tableName","TableName","item","PK","Item","SK","tableType","getTableType","getItems","exports"],"sources":["PutCommandValue.ts"],"sourcesContent":["import type { PutCommand } from \"@webiny/aws-sdk/client-dynamodb\";\nimport type { ICommandValue, ICommandValueItemExtended } from \"~/sync/types.js\";\nimport type { NonEmptyArray } from \"@webiny/api/types.js\";\nimport { getTableType } from \"~/sync/utils/getTableType.js\";\n\nexport class PutCommandValue implements ICommandValue {\n public readonly command = \"put\";\n public readonly item: ICommandValueItemExtended;\n\n public constructor(input: PutCommand) {\n const tableName = input.input.TableName as string;\n this.item = {\n command: this.command,\n PK: input.input.Item!.PK,\n SK: input.input.Item!.SK,\n tableName,\n tableType: getTableType(tableName),\n input\n };\n }\n\n public getItems(): NonEmptyArray<ICommandValueItemExtended> {\n return [this.item];\n }\n}\n"],"mappings":";;;;;;AAGA,IAAAA,aAAA,GAAAC,OAAA;AAEO,MAAMC,eAAe,CAA0B;EAClCC,OAAO,GAAG,KAAK;EAGxBC,WAAWA,CAACC,KAAiB,EAAE;IAClC,MAAMC,SAAS,GAAGD,KAAK,CAACA,KAAK,CAACE,SAAmB;IACjD,IAAI,CAACC,IAAI,GAAG;MACRL,OAAO,EAAE,IAAI,CAACA,OAAO;MACrBM,EAAE,EAAEJ,KAAK,CAACA,KAAK,CAACK,IAAI,CAAED,EAAE;MACxBE,EAAE,EAAEN,KAAK,CAACA,KAAK,CAACK,IAAI,CAAEC,EAAE;MACxBL,SAAS;MACTM,SAAS,EAAE,IAAAC,0BAAY,EAACP,SAAS,CAAC;MAClCD;IACJ,CAAC;EACL;EAEOS,QAAQA,CAAA,EAA6C;IACxD,OAAO,CAAC,IAAI,CAACN,IAAI,CAAC;EACtB;AACJ;AAACO,OAAA,CAAAb,eAAA,GAAAA,eAAA","ignoreList":[]}
1
+ {"version":3,"file":"sync/handler/converter/commands/PutCommandValue.js","sources":["../../../../../src/sync/handler/converter/commands/PutCommandValue.ts"],"sourcesContent":["import type { PutCommand } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport type { ICommandValue, ICommandValueItemExtended } from \"~/sync/types.js\";\nimport type { NonEmptyArray } from \"@webiny/api/types.js\";\nimport { getTableType } from \"~/sync/utils/getTableType.js\";\n\nexport class PutCommandValue implements ICommandValue {\n public readonly command = \"put\";\n public readonly item: ICommandValueItemExtended;\n\n public constructor(input: PutCommand) {\n const tableName = input.input.TableName as string;\n this.item = {\n command: this.command,\n PK: input.input.Item!.PK,\n SK: input.input.Item!.SK,\n tableName,\n tableType: getTableType(tableName),\n input\n };\n }\n\n public getItems(): NonEmptyArray<ICommandValueItemExtended> {\n return [this.item];\n }\n}\n"],"names":["PutCommandValue","input","tableName","getTableType"],"mappings":";AAKO,MAAMA;IAIT,YAAmBC,KAAiB,CAAE;aAHtB,OAAO,GAAG;QAItB,MAAMC,YAAYD,MAAM,KAAK,CAAC,SAAS;QACvC,IAAI,CAAC,IAAI,GAAG;YACR,SAAS,IAAI,CAAC,OAAO;YACrB,IAAIA,MAAM,KAAK,CAAC,IAAI,CAAE,EAAE;YACxB,IAAIA,MAAM,KAAK,CAAC,IAAI,CAAE,EAAE;YACxBC;YACA,WAAWC,aAAaD;YACxBD;QACJ;IACJ;IAEO,WAAqD;QACxD,OAAO;YAAC,IAAI,CAAC,IAAI;SAAC;IACtB;AACJ"}
@@ -1,5 +1,5 @@
1
- import type { UpdateCommand } from "@webiny/aws-sdk/client-dynamodb";
2
- import type { ICommandValue, ICommandValueItemExtended } from "../../../types.js";
1
+ import type { UpdateCommand } from "@webiny/aws-sdk/client-dynamodb/index.js";
2
+ import type { ICommandValue, ICommandValueItemExtended } from "../../../../sync/types.js";
3
3
  import type { NonEmptyArray } from "@webiny/api/types.js";
4
4
  export declare class UpdateCommandValue implements ICommandValue {
5
5
  readonly command = "update";
@@ -1,27 +1,23 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.UpdateCommandValue = void 0;
7
- var _getTableType = require("../../../utils/getTableType.js");
1
+ import { getTableType } from "../../../utils/getTableType.js";
8
2
  class UpdateCommandValue {
9
- command = "update";
10
- constructor(input) {
11
- const tableName = input.input.TableName;
12
- this.item = {
13
- command: this.command,
14
- PK: input.input.Key.PK,
15
- SK: input.input.Key.SK,
16
- tableName,
17
- tableType: (0, _getTableType.getTableType)(tableName),
18
- input
19
- };
20
- }
21
- getItems() {
22
- return [this.item];
23
- }
3
+ constructor(input){
4
+ this.command = "update";
5
+ const tableName = input.input.TableName;
6
+ this.item = {
7
+ command: this.command,
8
+ PK: input.input.Key.PK,
9
+ SK: input.input.Key.SK,
10
+ tableName,
11
+ tableType: getTableType(tableName),
12
+ input
13
+ };
14
+ }
15
+ getItems() {
16
+ return [
17
+ this.item
18
+ ];
19
+ }
24
20
  }
25
- exports.UpdateCommandValue = UpdateCommandValue;
21
+ export { UpdateCommandValue };
26
22
 
27
23
  //# sourceMappingURL=UpdateCommandValue.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_getTableType","require","UpdateCommandValue","command","constructor","input","tableName","TableName","item","PK","Key","SK","tableType","getTableType","getItems","exports"],"sources":["UpdateCommandValue.ts"],"sourcesContent":["import type { UpdateCommand } from \"@webiny/aws-sdk/client-dynamodb\";\nimport type { ICommandValue, ICommandValueItemExtended } from \"~/sync/types.js\";\nimport type { NonEmptyArray } from \"@webiny/api/types.js\";\nimport { getTableType } from \"~/sync/utils/getTableType.js\";\n\nexport class UpdateCommandValue implements ICommandValue {\n public readonly command = \"update\";\n public readonly item: ICommandValueItemExtended;\n\n public constructor(input: UpdateCommand) {\n const tableName = input.input.TableName as string;\n this.item = {\n command: this.command,\n PK: input.input.Key!.PK,\n SK: input.input.Key!.SK,\n tableName,\n tableType: getTableType(tableName),\n input\n };\n }\n\n public getItems(): NonEmptyArray<ICommandValueItemExtended> {\n return [this.item];\n }\n}\n"],"mappings":";;;;;;AAGA,IAAAA,aAAA,GAAAC,OAAA;AAEO,MAAMC,kBAAkB,CAA0B;EACrCC,OAAO,GAAG,QAAQ;EAG3BC,WAAWA,CAACC,KAAoB,EAAE;IACrC,MAAMC,SAAS,GAAGD,KAAK,CAACA,KAAK,CAACE,SAAmB;IACjD,IAAI,CAACC,IAAI,GAAG;MACRL,OAAO,EAAE,IAAI,CAACA,OAAO;MACrBM,EAAE,EAAEJ,KAAK,CAACA,KAAK,CAACK,GAAG,CAAED,EAAE;MACvBE,EAAE,EAAEN,KAAK,CAACA,KAAK,CAACK,GAAG,CAAEC,EAAE;MACvBL,SAAS;MACTM,SAAS,EAAE,IAAAC,0BAAY,EAACP,SAAS,CAAC;MAClCD;IACJ,CAAC;EACL;EAEOS,QAAQA,CAAA,EAA6C;IACxD,OAAO,CAAC,IAAI,CAACN,IAAI,CAAC;EACtB;AACJ;AAACO,OAAA,CAAAb,kBAAA,GAAAA,kBAAA","ignoreList":[]}
1
+ {"version":3,"file":"sync/handler/converter/commands/UpdateCommandValue.js","sources":["../../../../../src/sync/handler/converter/commands/UpdateCommandValue.ts"],"sourcesContent":["import type { UpdateCommand } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport type { ICommandValue, ICommandValueItemExtended } from \"~/sync/types.js\";\nimport type { NonEmptyArray } from \"@webiny/api/types.js\";\nimport { getTableType } from \"~/sync/utils/getTableType.js\";\n\nexport class UpdateCommandValue implements ICommandValue {\n public readonly command = \"update\";\n public readonly item: ICommandValueItemExtended;\n\n public constructor(input: UpdateCommand) {\n const tableName = input.input.TableName as string;\n this.item = {\n command: this.command,\n PK: input.input.Key!.PK,\n SK: input.input.Key!.SK,\n tableName,\n tableType: getTableType(tableName),\n input\n };\n }\n\n public getItems(): NonEmptyArray<ICommandValueItemExtended> {\n return [this.item];\n }\n}\n"],"names":["UpdateCommandValue","input","tableName","getTableType"],"mappings":";AAKO,MAAMA;IAIT,YAAmBC,KAAoB,CAAE;aAHzB,OAAO,GAAG;QAItB,MAAMC,YAAYD,MAAM,KAAK,CAAC,SAAS;QACvC,IAAI,CAAC,IAAI,GAAG;YACR,SAAS,IAAI,CAAC,OAAO;YACrB,IAAIA,MAAM,KAAK,CAAC,GAAG,CAAE,EAAE;YACvB,IAAIA,MAAM,KAAK,CAAC,GAAG,CAAE,EAAE;YACvBC;YACA,WAAWC,aAAaD;YACxBD;QACJ;IACJ;IAEO,WAAqD;QACxD,OAAO;YAAC,IAAI,CAAC,IAAI;SAAC;IACtB;AACJ"}
@@ -1,12 +1,12 @@
1
- import type { NonEmptyArray } from "@webiny/api/types";
1
+ import type { NonEmptyArray } from "@webiny/api/types.js";
2
2
  import type { DynamoDBTableType, ExtendedCommandType } from "../../types.js";
3
- import type { ISystem } from "../types";
3
+ import type { ISystem } from "../types.js";
4
4
  export interface IDetailItem {
5
5
  PK: string;
6
6
  SK: string;
7
7
  command: ExtendedCommandType;
8
8
  /**
9
- * There will be multiple tables that will get populated through the system (regular table and elasticsearch for start).
9
+ * There will be multiple tables that will get populated through the system (regular table and opensearch for start).
10
10
  */
11
11
  tableName: string;
12
12
  tableType: DynamoDBTableType;
@@ -1,7 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- //# sourceMappingURL=types.js.map
@@ -1,5 +1,5 @@
1
1
  import { Plugin } from "@webiny/plugins/Plugin.js";
2
- import type { ICommandValueItemExtended } from "../types.js";
2
+ import type { ICommandValueItemExtended } from "../../sync/types.js";
3
3
  export interface IFilterOutRecordPluginCallable {
4
4
  (record: ICommandValueItemExtended): boolean;
5
5
  }
@@ -1,31 +1,21 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createFilterOutRecordPlugin = exports.FilterOutRecordPlugin = void 0;
7
- var _Plugin = require("@webiny/plugins/Plugin.js");
8
- class FilterOutRecordPlugin extends _Plugin.Plugin {
9
- static type = "sync.filterOut.record";
10
- constructor(params) {
11
- super();
12
- this.name = params.name;
13
- this.cb = params.filterOut;
14
- }
15
- /**
16
- * If method returns `true`, the record will be filtered out.
17
- */
18
- execute(item) {
19
- return this.cb(item);
20
- }
21
- static createName(name) {
22
- return `${FilterOutRecordPlugin.type}.${name}`;
23
- }
1
+ import { Plugin } from "@webiny/plugins/Plugin.js";
2
+ class FilterOutRecordPlugin extends Plugin {
3
+ static{
4
+ this.type = "sync.filterOut.record";
5
+ }
6
+ constructor(params){
7
+ super();
8
+ this.name = params.name;
9
+ this.cb = params.filterOut;
10
+ }
11
+ execute(item) {
12
+ return this.cb(item);
13
+ }
14
+ static createName(name) {
15
+ return `${FilterOutRecordPlugin.type}.${name}`;
16
+ }
24
17
  }
25
- exports.FilterOutRecordPlugin = FilterOutRecordPlugin;
26
- const createFilterOutRecordPlugin = params => {
27
- return new FilterOutRecordPlugin(params);
28
- };
29
- exports.createFilterOutRecordPlugin = createFilterOutRecordPlugin;
18
+ const createFilterOutRecordPlugin = (params)=>new FilterOutRecordPlugin(params);
19
+ export { FilterOutRecordPlugin, createFilterOutRecordPlugin };
30
20
 
31
21
  //# sourceMappingURL=FilterOutRecordPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_Plugin","require","FilterOutRecordPlugin","Plugin","type","constructor","params","name","cb","filterOut","execute","item","createName","exports","createFilterOutRecordPlugin"],"sources":["FilterOutRecordPlugin.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins/Plugin.js\";\nimport type { ICommandValueItemExtended } from \"~/sync/types.js\";\n\nexport interface IFilterOutRecordPluginCallable {\n (record: ICommandValueItemExtended): boolean;\n}\n\nexport interface IFilterOutRecordPluginParams {\n /**\n * Filter out returns true if the record should be filtered out.\n */\n filterOut: IFilterOutRecordPluginCallable;\n name: string;\n}\n\nexport class FilterOutRecordPlugin extends Plugin {\n public static override readonly type: string = \"sync.filterOut.record\";\n\n private readonly cb: IFilterOutRecordPluginCallable;\n\n public constructor(params: IFilterOutRecordPluginParams) {\n super();\n this.name = params.name;\n this.cb = params.filterOut;\n }\n /**\n * If method returns `true`, the record will be filtered out.\n */\n public execute(item: ICommandValueItemExtended): boolean {\n return this.cb(item);\n }\n\n public static createName(name: string): string {\n return `${FilterOutRecordPlugin.type}.${name}`;\n }\n}\n\nexport const createFilterOutRecordPlugin = (\n params: IFilterOutRecordPluginParams\n): FilterOutRecordPlugin => {\n return new FilterOutRecordPlugin(params);\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAeO,MAAMC,qBAAqB,SAASC,cAAM,CAAC;EAC9C,OAAgCC,IAAI,GAAW,uBAAuB;EAI/DC,WAAWA,CAACC,MAAoC,EAAE;IACrD,KAAK,CAAC,CAAC;IACP,IAAI,CAACC,IAAI,GAAGD,MAAM,CAACC,IAAI;IACvB,IAAI,CAACC,EAAE,GAAGF,MAAM,CAACG,SAAS;EAC9B;EACA;AACJ;AACA;EACWC,OAAOA,CAACC,IAA+B,EAAW;IACrD,OAAO,IAAI,CAACH,EAAE,CAACG,IAAI,CAAC;EACxB;EAEA,OAAcC,UAAUA,CAACL,IAAY,EAAU;IAC3C,OAAO,GAAGL,qBAAqB,CAACE,IAAI,IAAIG,IAAI,EAAE;EAClD;AACJ;AAACM,OAAA,CAAAX,qBAAA,GAAAA,qBAAA;AAEM,MAAMY,2BAA2B,GACpCR,MAAoC,IACZ;EACxB,OAAO,IAAIJ,qBAAqB,CAACI,MAAM,CAAC;AAC5C,CAAC;AAACO,OAAA,CAAAC,2BAAA,GAAAA,2BAAA","ignoreList":[]}
1
+ {"version":3,"file":"sync/plugins/FilterOutRecordPlugin.js","sources":["../../../src/sync/plugins/FilterOutRecordPlugin.ts"],"sourcesContent":["import { Plugin } from \"@webiny/plugins/Plugin.js\";\nimport type { ICommandValueItemExtended } from \"~/sync/types.js\";\n\nexport interface IFilterOutRecordPluginCallable {\n (record: ICommandValueItemExtended): boolean;\n}\n\nexport interface IFilterOutRecordPluginParams {\n /**\n * Filter out returns true if the record should be filtered out.\n */\n filterOut: IFilterOutRecordPluginCallable;\n name: string;\n}\n\nexport class FilterOutRecordPlugin extends Plugin {\n public static override readonly type: string = \"sync.filterOut.record\";\n\n private readonly cb: IFilterOutRecordPluginCallable;\n\n public constructor(params: IFilterOutRecordPluginParams) {\n super();\n this.name = params.name;\n this.cb = params.filterOut;\n }\n /**\n * If method returns `true`, the record will be filtered out.\n */\n public execute(item: ICommandValueItemExtended): boolean {\n return this.cb(item);\n }\n\n public static createName(name: string): string {\n return `${FilterOutRecordPlugin.type}.${name}`;\n }\n}\n\nexport const createFilterOutRecordPlugin = (\n params: IFilterOutRecordPluginParams\n): FilterOutRecordPlugin => {\n return new FilterOutRecordPlugin(params);\n};\n"],"names":["FilterOutRecordPlugin","Plugin","params","item","name","createFilterOutRecordPlugin"],"mappings":";AAeO,MAAMA,8BAA8BC;;aACP,IAAI,GAAW;;IAI/C,YAAmBC,MAAoC,CAAE;QACrD,KAAK;QACL,IAAI,CAAC,IAAI,GAAGA,OAAO,IAAI;QACvB,IAAI,CAAC,EAAE,GAAGA,OAAO,SAAS;IAC9B;IAIO,QAAQC,IAA+B,EAAW;QACrD,OAAO,IAAI,CAAC,EAAE,CAACA;IACnB;IAEA,OAAc,WAAWC,IAAY,EAAU;QAC3C,OAAO,GAAGJ,sBAAsB,IAAI,CAAC,CAAC,EAAEI,MAAM;IAClD;AACJ;AAEO,MAAMC,8BAA8B,CACvCH,SAEO,IAAIF,sBAAsBE"}
@@ -1,5 +1,5 @@
1
1
  import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb/index.js";
2
- import type { ICommandConverter, IGetEventBridgeCallable, ISystem } from "./types.js";
2
+ import type { ICommandConverter, IGetEventBridgeCallable, ISystem } from "../sync/types.js";
3
3
  export interface ICreateSyncSystemHandlerOnRequestPluginParams {
4
4
  getDocumentClient(): Pick<DynamoDBDocument, "send">;
5
5
  getEventBridgeClient: IGetEventBridgeCallable;
@@ -1,59 +1,43 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createSyncSystemHandlerOnRequestPlugin = void 0;
7
- var _handler = require("@webiny/handler");
8
- var _manifest = require("./utils/manifest.js");
9
- var _attachToDynamoDbDocument = require("./attachToDynamoDbDocument.js");
10
- var _createSendDataToEventBridgeOnRequestEnd = require("./createSendDataToEventBridgeOnRequestEnd.js");
11
- var _createHandler = require("./createHandler.js");
12
- var _exception = require("@webiny/utils/exception.js");
13
- const createSyncSystemHandlerOnRequestPlugin = params => {
14
- return (0, _handler.createHandlerOnRequest)(async (_, __, context) => {
15
- const {
16
- data: manifest,
17
- error
18
- } = await (0, _manifest.getManifest)(params);
19
- if (error) {
20
- console.error("Error happened when fetching manifest.");
21
- console.log(JSON.stringify({
22
- error: (0, _exception.convertException)(error)
23
- }));
24
- return;
25
- } else if (!manifest?.sync?.region) {
26
- console.error("There is no manifest.");
27
- console.log(JSON.stringify({
28
- manifest
29
- }));
30
- return;
31
- }
32
- const {
33
- handler
34
- } = (0, _createHandler.createHandler)({
35
- getEventBridgeClient: () => {
36
- return params.getEventBridgeClient({
37
- region: manifest.sync.region
1
+ import { createHandlerOnRequest } from "@webiny/handler";
2
+ import { getManifest } from "./utils/manifest.js";
3
+ import { attachToDynamoDbDocument } from "./attachToDynamoDbDocument.js";
4
+ import { createSendDataToEventBridgeOnRequestEnd } from "./createSendDataToEventBridgeOnRequestEnd.js";
5
+ import { createHandler } from "./createHandler.js";
6
+ import { convertException } from "@webiny/utils/exception.js";
7
+ const createSyncSystemHandlerOnRequestPlugin = (params)=>createHandlerOnRequest(async (_, __, context)=>{
8
+ const { data: manifest, error } = await getManifest();
9
+ if (error) {
10
+ if ("true" !== process.env.DEBUG) return;
11
+ console.error("Error happened when fetching manifest.");
12
+ console.log(JSON.stringify({
13
+ error: convertException(error)
14
+ }));
15
+ return;
16
+ }
17
+ if (!manifest?.sync?.region) {
18
+ if ("true" !== process.env.DEBUG) return;
19
+ console.error("There is no manifest.");
20
+ console.log(JSON.stringify({
21
+ manifest
22
+ }));
23
+ return;
24
+ }
25
+ const { handler } = createHandler({
26
+ getEventBridgeClient: ()=>params.getEventBridgeClient({
27
+ region: manifest.sync.region
28
+ }),
29
+ system: params.system,
30
+ manifest,
31
+ commandConverters: params.commandConverters,
32
+ getPlugins: ()=>context.plugins
38
33
  });
39
- },
40
- system: params.system,
41
- manifest,
42
- commandConverters: params.commandConverters,
43
- getPlugins: () => {
44
- return context.plugins;
45
- }
46
- });
47
- (0, _attachToDynamoDbDocument.attachToDynamoDbDocument)({
48
- handler
34
+ attachToDynamoDbDocument({
35
+ handler
36
+ });
37
+ context.plugins.register([
38
+ createSendDataToEventBridgeOnRequestEnd(handler)
39
+ ]);
49
40
  });
50
- context.plugins.register([
51
- /**
52
- * When request ends, send the data to the EventBridge.
53
- */
54
- (0, _createSendDataToEventBridgeOnRequestEnd.createSendDataToEventBridgeOnRequestEnd)(handler)]);
55
- });
56
- };
57
- exports.createSyncSystemHandlerOnRequestPlugin = createSyncSystemHandlerOnRequestPlugin;
41
+ export { createSyncSystemHandlerOnRequestPlugin };
58
42
 
59
43
  //# sourceMappingURL=requestPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_handler","require","_manifest","_attachToDynamoDbDocument","_createSendDataToEventBridgeOnRequestEnd","_createHandler","_exception","createSyncSystemHandlerOnRequestPlugin","params","createHandlerOnRequest","_","__","context","data","manifest","error","getManifest","console","log","JSON","stringify","convertException","sync","region","handler","createHandler","getEventBridgeClient","system","commandConverters","getPlugins","plugins","attachToDynamoDbDocument","register","createSendDataToEventBridgeOnRequestEnd","exports"],"sources":["requestPlugin.ts"],"sourcesContent":["import type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport type { ICommandConverter, IGetEventBridgeCallable, ISystem } from \"~/sync/types.js\";\nimport { createHandlerOnRequest } from \"@webiny/handler\";\nimport { getManifest } from \"~/sync/utils/manifest.js\";\nimport { attachToDynamoDbDocument } from \"~/sync/attachToDynamoDbDocument.js\";\nimport { createSendDataToEventBridgeOnRequestEnd } from \"~/sync/createSendDataToEventBridgeOnRequestEnd.js\";\nimport { createHandler } from \"./createHandler.js\";\nimport { convertException } from \"@webiny/utils/exception.js\";\n\nexport interface ICreateSyncSystemHandlerOnRequestPluginParams {\n getDocumentClient(): Pick<DynamoDBDocument, \"send\">;\n getEventBridgeClient: IGetEventBridgeCallable;\n system: ISystem;\n commandConverters?: ICommandConverter[];\n}\n\nexport const createSyncSystemHandlerOnRequestPlugin = (\n params: ICreateSyncSystemHandlerOnRequestPluginParams\n) => {\n return createHandlerOnRequest(async (_, __, context) => {\n const { data: manifest, error } = await getManifest(params);\n if (error) {\n console.error(\"Error happened when fetching manifest.\");\n console.log(\n JSON.stringify({\n error: convertException(error)\n })\n );\n return;\n } else if (!manifest?.sync?.region) {\n console.error(\"There is no manifest.\");\n console.log(\n JSON.stringify({\n manifest\n })\n );\n return;\n }\n\n const { handler } = createHandler({\n getEventBridgeClient: () => {\n return params.getEventBridgeClient({\n region: manifest.sync.region\n });\n },\n system: params.system,\n manifest,\n commandConverters: params.commandConverters,\n getPlugins: () => {\n return context.plugins;\n }\n });\n\n attachToDynamoDbDocument({\n handler\n });\n context.plugins.register([\n /**\n * When request ends, send the data to the EventBridge.\n */\n createSendDataToEventBridgeOnRequestEnd(handler)\n ]);\n });\n};\n"],"mappings":";;;;;;AAEA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,yBAAA,GAAAF,OAAA;AACA,IAAAG,wCAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AASO,MAAMM,sCAAsC,GAC/CC,MAAqD,IACpD;EACD,OAAO,IAAAC,+BAAsB,EAAC,OAAOC,CAAC,EAAEC,EAAE,EAAEC,OAAO,KAAK;IACpD,MAAM;MAAEC,IAAI,EAAEC,QAAQ;MAAEC;IAAM,CAAC,GAAG,MAAM,IAAAC,qBAAW,EAACR,MAAM,CAAC;IAC3D,IAAIO,KAAK,EAAE;MACPE,OAAO,CAACF,KAAK,CAAC,wCAAwC,CAAC;MACvDE,OAAO,CAACC,GAAG,CACPC,IAAI,CAACC,SAAS,CAAC;QACXL,KAAK,EAAE,IAAAM,2BAAgB,EAACN,KAAK;MACjC,CAAC,CACL,CAAC;MACD;IACJ,CAAC,MAAM,IAAI,CAACD,QAAQ,EAAEQ,IAAI,EAAEC,MAAM,EAAE;MAChCN,OAAO,CAACF,KAAK,CAAC,uBAAuB,CAAC;MACtCE,OAAO,CAACC,GAAG,CACPC,IAAI,CAACC,SAAS,CAAC;QACXN;MACJ,CAAC,CACL,CAAC;MACD;IACJ;IAEA,MAAM;MAAEU;IAAQ,CAAC,GAAG,IAAAC,4BAAa,EAAC;MAC9BC,oBAAoB,EAAEA,CAAA,KAAM;QACxB,OAAOlB,MAAM,CAACkB,oBAAoB,CAAC;UAC/BH,MAAM,EAAET,QAAQ,CAACQ,IAAI,CAACC;QAC1B,CAAC,CAAC;MACN,CAAC;MACDI,MAAM,EAAEnB,MAAM,CAACmB,MAAM;MACrBb,QAAQ;MACRc,iBAAiB,EAAEpB,MAAM,CAACoB,iBAAiB;MAC3CC,UAAU,EAAEA,CAAA,KAAM;QACd,OAAOjB,OAAO,CAACkB,OAAO;MAC1B;IACJ,CAAC,CAAC;IAEF,IAAAC,kDAAwB,EAAC;MACrBP;IACJ,CAAC,CAAC;IACFZ,OAAO,CAACkB,OAAO,CAACE,QAAQ,CAAC;IACrB;AACZ;AACA;IACY,IAAAC,gFAAuC,EAACT,OAAO,CAAC,CACnD,CAAC;EACN,CAAC,CAAC;AACN,CAAC;AAACU,OAAA,CAAA3B,sCAAA,GAAAA,sCAAA","ignoreList":[]}
1
+ {"version":3,"file":"sync/requestPlugin.js","sources":["../../src/sync/requestPlugin.ts"],"sourcesContent":["import type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb/index.js\";\nimport type { ICommandConverter, IGetEventBridgeCallable, ISystem } from \"~/sync/types.js\";\nimport { createHandlerOnRequest } from \"@webiny/handler\";\nimport { getManifest } from \"~/sync/utils/manifest.js\";\nimport { attachToDynamoDbDocument } from \"~/sync/attachToDynamoDbDocument.js\";\nimport { createSendDataToEventBridgeOnRequestEnd } from \"~/sync/createSendDataToEventBridgeOnRequestEnd.js\";\nimport { createHandler } from \"./createHandler.js\";\nimport { convertException } from \"@webiny/utils/exception.js\";\n\nexport interface ICreateSyncSystemHandlerOnRequestPluginParams {\n getDocumentClient(): Pick<DynamoDBDocument, \"send\">;\n getEventBridgeClient: IGetEventBridgeCallable;\n system: ISystem;\n commandConverters?: ICommandConverter[];\n}\n\nexport const createSyncSystemHandlerOnRequestPlugin = (\n params: ICreateSyncSystemHandlerOnRequestPluginParams\n) => {\n return createHandlerOnRequest(async (_, __, context) => {\n const { data: manifest, error } = await getManifest();\n if (error) {\n if (process.env.DEBUG !== \"true\") {\n return;\n }\n console.error(\"Error happened when fetching manifest.\");\n console.log(\n JSON.stringify({\n error: convertException(error)\n })\n );\n return;\n } else if (!manifest?.sync?.region) {\n if (process.env.DEBUG !== \"true\") {\n return;\n }\n console.error(\"There is no manifest.\");\n console.log(\n JSON.stringify({\n manifest\n })\n );\n return;\n }\n\n const { handler } = createHandler({\n getEventBridgeClient: () => {\n return params.getEventBridgeClient({\n region: manifest.sync.region\n });\n },\n system: params.system,\n manifest,\n commandConverters: params.commandConverters,\n getPlugins: () => {\n return context.plugins;\n }\n });\n\n attachToDynamoDbDocument({\n handler\n });\n context.plugins.register([\n /**\n * When request ends, send the data to the EventBridge.\n */\n createSendDataToEventBridgeOnRequestEnd(handler)\n ]);\n });\n};\n"],"names":["createSyncSystemHandlerOnRequestPlugin","params","createHandlerOnRequest","_","__","context","manifest","error","getManifest","process","console","JSON","convertException","handler","createHandler","attachToDynamoDbDocument","createSendDataToEventBridgeOnRequestEnd"],"mappings":";;;;;;AAgBO,MAAMA,yCAAyC,CAClDC,SAEOC,uBAAuB,OAAOC,GAAGC,IAAIC;QACxC,MAAM,EAAE,MAAMC,QAAQ,EAAEC,KAAK,EAAE,GAAG,MAAMC;QACxC,IAAID,OAAO;YACP,IAAIE,AAAsB,WAAtBA,QAAQ,GAAG,CAAC,KAAK,EACjB;YAEJC,QAAQ,KAAK,CAAC;YACdA,QAAQ,GAAG,CACPC,KAAK,SAAS,CAAC;gBACX,OAAOC,iBAAiBL;YAC5B;YAEJ;QACJ;QAAO,IAAI,CAACD,UAAU,MAAM,QAAQ;YAChC,IAAIG,AAAsB,WAAtBA,QAAQ,GAAG,CAAC,KAAK,EACjB;YAEJC,QAAQ,KAAK,CAAC;YACdA,QAAQ,GAAG,CACPC,KAAK,SAAS,CAAC;gBACXL;YACJ;YAEJ;QACJ;QAEA,MAAM,EAAEO,OAAO,EAAE,GAAGC,cAAc;YAC9B,sBAAsB,IACXb,OAAO,oBAAoB,CAAC;oBAC/B,QAAQK,SAAS,IAAI,CAAC,MAAM;gBAChC;YAEJ,QAAQL,OAAO,MAAM;YACrBK;YACA,mBAAmBL,OAAO,iBAAiB;YAC3C,YAAY,IACDI,QAAQ,OAAO;QAE9B;QAEAU,yBAAyB;YACrBF;QACJ;QACAR,QAAQ,OAAO,CAAC,QAAQ,CAAC;YAIrBW,wCAAwCH;SAC3C;IACL"}
package/sync/types.js CHANGED
@@ -1,7 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- //# sourceMappingURL=types.js.map
@@ -1,22 +1,14 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getTableType = void 0;
7
- var _types = require("../../types.js");
8
- const getTableType = tableName => {
9
- switch (tableName) {
10
- case process.env.DB_TABLE:
11
- return _types.DynamoDBTableType.REGULAR;
12
- case process.env.DB_TABLE_ELASTICSEARCH:
13
- return _types.DynamoDBTableType.ELASTICSEARCH;
14
- case process.env.DB_TABLE_LOG:
15
- return _types.DynamoDBTableType.LOG;
16
- default:
17
- return _types.DynamoDBTableType.UNKNOWN;
18
- }
1
+ import { DynamoDBTableType } from "../../types.js";
2
+ const getTableType = (tableName)=>{
3
+ switch(tableName){
4
+ case process.env.DB_TABLE:
5
+ return DynamoDBTableType.REGULAR;
6
+ case process.env.DB_TABLE_OPENSEARCH:
7
+ return DynamoDBTableType.OPENSEARCH;
8
+ default:
9
+ return DynamoDBTableType.UNKNOWN;
10
+ }
19
11
  };
20
- exports.getTableType = getTableType;
12
+ export { getTableType };
21
13
 
22
14
  //# sourceMappingURL=getTableType.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_types","require","getTableType","tableName","process","env","DB_TABLE","DynamoDBTableType","REGULAR","DB_TABLE_ELASTICSEARCH","ELASTICSEARCH","DB_TABLE_LOG","LOG","UNKNOWN","exports"],"sources":["getTableType.ts"],"sourcesContent":["import { DynamoDBTableType } from \"~/types.js\";\n\nexport const getTableType = (tableName: string): DynamoDBTableType => {\n switch (tableName) {\n case process.env.DB_TABLE:\n return DynamoDBTableType.REGULAR;\n case process.env.DB_TABLE_ELASTICSEARCH:\n return DynamoDBTableType.ELASTICSEARCH;\n case process.env.DB_TABLE_LOG:\n return DynamoDBTableType.LOG;\n default:\n return DynamoDBTableType.UNKNOWN;\n }\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,YAAY,GAAIC,SAAiB,IAAwB;EAClE,QAAQA,SAAS;IACb,KAAKC,OAAO,CAACC,GAAG,CAACC,QAAQ;MACrB,OAAOC,wBAAiB,CAACC,OAAO;IACpC,KAAKJ,OAAO,CAACC,GAAG,CAACI,sBAAsB;MACnC,OAAOF,wBAAiB,CAACG,aAAa;IAC1C,KAAKN,OAAO,CAACC,GAAG,CAACM,YAAY;MACzB,OAAOJ,wBAAiB,CAACK,GAAG;IAChC;MACI,OAAOL,wBAAiB,CAACM,OAAO;EACxC;AACJ,CAAC;AAACC,OAAA,CAAAZ,YAAA,GAAAA,YAAA","ignoreList":[]}
1
+ {"version":3,"file":"sync/utils/getTableType.js","sources":["../../../src/sync/utils/getTableType.ts"],"sourcesContent":["import { DynamoDBTableType } from \"~/types.js\";\n\nexport const getTableType = (tableName: string): DynamoDBTableType => {\n switch (tableName) {\n case process.env.DB_TABLE:\n return DynamoDBTableType.REGULAR;\n case process.env.DB_TABLE_OPENSEARCH:\n return DynamoDBTableType.OPENSEARCH;\n default:\n return DynamoDBTableType.UNKNOWN;\n }\n};\n"],"names":["getTableType","tableName","process","DynamoDBTableType"],"mappings":";AAEO,MAAMA,eAAe,CAACC;IACzB,OAAQA;QACJ,KAAKC,QAAQ,GAAG,CAAC,QAAQ;YACrB,OAAOC,kBAAkB,OAAO;QACpC,KAAKD,QAAQ,GAAG,CAAC,mBAAmB;YAChC,OAAOC,kBAAkB,UAAU;QACvC;YACI,OAAOA,kBAAkB,OAAO;IACxC;AACJ"}
@@ -1,17 +1,13 @@
1
- import type { DynamoDBDocument } from "@webiny/aws-sdk/client-dynamodb";
2
- export interface IGetManifestParams {
3
- getDocumentClient(): Pick<DynamoDBDocument, "send">;
4
- }
5
- export declare const getManifest: (params: IGetManifestParams) => Promise<{
1
+ export declare const getManifest: () => Promise<{
6
2
  data: {
7
3
  sync: {
8
- region: string;
9
4
  eventBusArn: string;
10
5
  eventBusName: string;
6
+ region: string;
11
7
  };
12
8
  };
13
9
  error?: undefined;
14
10
  } | {
15
- error: any;
16
11
  data?: undefined;
12
+ error: any;
17
13
  }>;
@@ -1,52 +1,35 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.getManifest = void 0;
8
- var _api = require("@webiny/api");
9
- var _zod = _interopRequireDefault(require("zod"));
10
- var _utils = require("@webiny/utils");
11
- const validateManifest = _zod.default.object({
12
- sync: _zod.default.object({
13
- eventBusArn: _zod.default.string(),
14
- eventBusName: _zod.default.string(),
15
- region: _zod.default.string()
16
- })
1
+ import { ServiceDiscovery } from "@webiny/api-core/features/serviceDiscovery/index.js";
2
+ import zod from "zod";
3
+ import { createZodError } from "@webiny/utils";
4
+ const validateManifest = zod.object({
5
+ sync: zod.object({
6
+ eventBusArn: zod.string(),
7
+ eventBusName: zod.string(),
8
+ region: zod.string()
9
+ })
17
10
  });
18
- const getManifest = async params => {
19
- const documentClient = params.getDocumentClient();
20
- try {
21
- _api.ServiceDiscovery.setDocumentClient(documentClient);
22
- const manifest = await _api.ServiceDiscovery.load();
23
- if (!manifest?.sync) {
24
- return {
25
- /**
26
- * This error will be silent. We do not want to log or throw at this point.
27
- */
28
- error: new Error("Sync System Manifest not found. Probably Sync System is not turned on.")
29
- };
30
- }
31
- const {
32
- data,
33
- error
34
- } = validateManifest.safeParse(manifest);
35
- if (error) {
36
- const err = (0, _utils.createZodError)(error);
37
- return {
38
- error: err
39
- };
11
+ const getManifest = async ()=>{
12
+ try {
13
+ const manifest = await ServiceDiscovery.load();
14
+ if (!manifest?.sync) return {
15
+ error: new Error("Sync System Manifest not found. Probably Sync System is not turned on.")
16
+ };
17
+ const { data, error } = validateManifest.safeParse(manifest);
18
+ if (error) {
19
+ const err = createZodError(error);
20
+ return {
21
+ error: err
22
+ };
23
+ }
24
+ return {
25
+ data
26
+ };
27
+ } catch (ex) {
28
+ return {
29
+ error: ex
30
+ };
40
31
  }
41
- return {
42
- data
43
- };
44
- } catch (ex) {
45
- return {
46
- error: ex
47
- };
48
- }
49
32
  };
50
- exports.getManifest = getManifest;
33
+ export { getManifest };
51
34
 
52
35
  //# sourceMappingURL=manifest.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_api","require","_zod","_interopRequireDefault","_utils","validateManifest","zod","object","sync","eventBusArn","string","eventBusName","region","getManifest","params","documentClient","getDocumentClient","ServiceDiscovery","setDocumentClient","manifest","load","error","Error","data","safeParse","err","createZodError","ex","exports"],"sources":["manifest.ts"],"sourcesContent":["import { ServiceDiscovery } from \"@webiny/api\";\nimport zod from \"zod\";\nimport { createZodError } from \"@webiny/utils\";\nimport type { DynamoDBDocument } from \"@webiny/aws-sdk/client-dynamodb\";\n\nconst validateManifest = zod.object({\n sync: zod.object({\n eventBusArn: zod.string(),\n eventBusName: zod.string(),\n region: zod.string()\n })\n});\n\nexport interface IGetManifestParams {\n getDocumentClient(): Pick<DynamoDBDocument, \"send\">;\n}\n\nexport const getManifest = async (params: IGetManifestParams) => {\n const documentClient = params.getDocumentClient();\n try {\n ServiceDiscovery.setDocumentClient(documentClient);\n const manifest = await ServiceDiscovery.load();\n if (!manifest?.sync) {\n return {\n /**\n * This error will be silent. We do not want to log or throw at this point.\n */\n error: new Error(\n \"Sync System Manifest not found. Probably Sync System is not turned on.\"\n )\n };\n }\n const { data, error } = validateManifest.safeParse(manifest);\n if (error) {\n const err = createZodError(error);\n return {\n error: err\n };\n }\n return {\n data\n };\n } catch (ex) {\n return {\n error: ex\n };\n }\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAGA,MAAMI,gBAAgB,GAAGC,YAAG,CAACC,MAAM,CAAC;EAChCC,IAAI,EAAEF,YAAG,CAACC,MAAM,CAAC;IACbE,WAAW,EAAEH,YAAG,CAACI,MAAM,CAAC,CAAC;IACzBC,YAAY,EAAEL,YAAG,CAACI,MAAM,CAAC,CAAC;IAC1BE,MAAM,EAAEN,YAAG,CAACI,MAAM,CAAC;EACvB,CAAC;AACL,CAAC,CAAC;AAMK,MAAMG,WAAW,GAAG,MAAOC,MAA0B,IAAK;EAC7D,MAAMC,cAAc,GAAGD,MAAM,CAACE,iBAAiB,CAAC,CAAC;EACjD,IAAI;IACAC,qBAAgB,CAACC,iBAAiB,CAACH,cAAc,CAAC;IAClD,MAAMI,QAAQ,GAAG,MAAMF,qBAAgB,CAACG,IAAI,CAAC,CAAC;IAC9C,IAAI,CAACD,QAAQ,EAAEX,IAAI,EAAE;MACjB,OAAO;QACH;AAChB;AACA;QACgBa,KAAK,EAAE,IAAIC,KAAK,CACZ,wEACJ;MACJ,CAAC;IACL;IACA,MAAM;MAAEC,IAAI;MAAEF;IAAM,CAAC,GAAGhB,gBAAgB,CAACmB,SAAS,CAACL,QAAQ,CAAC;IAC5D,IAAIE,KAAK,EAAE;MACP,MAAMI,GAAG,GAAG,IAAAC,qBAAc,EAACL,KAAK,CAAC;MACjC,OAAO;QACHA,KAAK,EAAEI;MACX,CAAC;IACL;IACA,OAAO;MACHF;IACJ,CAAC;EACL,CAAC,CAAC,OAAOI,EAAE,EAAE;IACT,OAAO;MACHN,KAAK,EAAEM;IACX,CAAC;EACL;AACJ,CAAC;AAACC,OAAA,CAAAf,WAAA,GAAAA,WAAA","ignoreList":[]}
1
+ {"version":3,"file":"sync/utils/manifest.js","sources":["../../../src/sync/utils/manifest.ts"],"sourcesContent":["import { ServiceDiscovery } from \"@webiny/api-core/features/serviceDiscovery/index.js\";\nimport zod from \"zod\";\nimport { createZodError } from \"@webiny/utils\";\n\nconst validateManifest = zod.object({\n sync: zod.object({\n eventBusArn: zod.string(),\n eventBusName: zod.string(),\n region: zod.string()\n })\n});\n\nexport const getManifest = async () => {\n try {\n const manifest = await ServiceDiscovery.load();\n if (!manifest?.sync) {\n return {\n /*\n * This error will be silent. We do not want to log or throw at this point.\n */\n error: new Error(\n \"Sync System Manifest not found. Probably Sync System is not turned on.\"\n )\n };\n }\n const { data, error } = validateManifest.safeParse(manifest);\n if (error) {\n const err = createZodError(error);\n return {\n error: err\n };\n }\n return {\n data\n };\n } catch (ex) {\n return {\n error: ex\n };\n }\n};\n"],"names":["validateManifest","zod","getManifest","manifest","ServiceDiscovery","Error","data","error","err","createZodError","ex"],"mappings":";;;AAIA,MAAMA,mBAAmBC,IAAI,MAAM,CAAC;IAChC,MAAMA,IAAI,MAAM,CAAC;QACb,aAAaA,IAAI,MAAM;QACvB,cAAcA,IAAI,MAAM;QACxB,QAAQA,IAAI,MAAM;IACtB;AACJ;AAEO,MAAMC,cAAc;IACvB,IAAI;QACA,MAAMC,WAAW,MAAMC,iBAAiB,IAAI;QAC5C,IAAI,CAACD,UAAU,MACX,OAAO;YAIH,OAAO,IAAIE,MACP;QAER;QAEJ,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGP,iBAAiB,SAAS,CAACG;QACnD,IAAII,OAAO;YACP,MAAMC,MAAMC,eAAeF;YAC3B,OAAO;gBACH,OAAOC;YACX;QACJ;QACA,OAAO;YACHF;QACJ;IACJ,EAAE,OAAOI,IAAI;QACT,OAAO;YACH,OAAOA;QACX;IACJ;AACJ"}
@@ -1,4 +1,4 @@
1
- import type { ISystem } from "../types.js";
1
+ import type { ISystem } from "../../sync/types.js";
2
2
  export interface IValidResponse {
3
3
  system: ISystem;
4
4
  error?: never;
@@ -1,44 +1,29 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.validateSystemInput = void 0;
7
- var _createSystemName = require("../../utils/createSystemName.js");
8
- const validateSystemInput = input => {
9
- const {
10
- env,
11
- region,
12
- variant,
13
- version
14
- } = input;
15
- if (!env) {
16
- return {
17
- error: "Sync System: No environment variable provided. Sync System will not be attached."
1
+ import { createSystemName } from "../../utils/createSystemName.js";
2
+ const validateSystemInput = (input)=>{
3
+ const { env, region, variant, version } = input;
4
+ if (!env) return {
5
+ error: "Sync System: No environment variable provided. Sync System will not be attached."
18
6
  };
19
- } else if (!region) {
20
- return {
21
- error: "Sync System: No region variable provided. Sync System will not be attached."
7
+ if (!region) return {
8
+ error: "Sync System: No region variable provided. Sync System will not be attached."
9
+ };
10
+ if (!version) return {
11
+ error: "Sync System: No version variable provided. Sync System will not be attached."
22
12
  };
23
- } else if (!version) {
13
+ const name = createSystemName({
14
+ env,
15
+ variant
16
+ });
24
17
  return {
25
- error: "Sync System: No version variable provided. Sync System will not be attached."
18
+ system: {
19
+ env,
20
+ name,
21
+ region,
22
+ variant,
23
+ version
24
+ }
26
25
  };
27
- }
28
- const name = (0, _createSystemName.createSystemName)({
29
- env,
30
- variant
31
- });
32
- return {
33
- system: {
34
- env,
35
- name,
36
- region,
37
- variant,
38
- version
39
- }
40
- };
41
26
  };
42
- exports.validateSystemInput = validateSystemInput;
27
+ export { validateSystemInput };
43
28
 
44
29
  //# sourceMappingURL=validateSystemInput.js.map