@powfix/core-js 0.14.5 → 0.15.0-beta-2

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 (323) hide show
  1. package/dist/client/constants/COORDINATE.js +6 -0
  2. package/dist/client/constants/CRUD.js +19 -0
  3. package/dist/client/constants/DATE.js +22 -0
  4. package/dist/client/constants/DISTANCE.js +14 -0
  5. package/dist/client/constants/DURATION.js +17 -0
  6. package/dist/client/constants/NOT_NULL.js +1 -0
  7. package/dist/client/constants/index.browser.d.ts +6 -0
  8. package/dist/client/constants/index.browser.js +6 -0
  9. package/dist/client/index.browser.d.ts +7 -0
  10. package/dist/client/index.browser.js +7 -0
  11. package/dist/client/interfaces/Coordinate.js +1 -0
  12. package/dist/client/interfaces/Point2.js +1 -0
  13. package/dist/{src → client}/interfaces/Point3.d.ts +1 -1
  14. package/dist/client/interfaces/Point3.js +1 -0
  15. package/dist/client/interfaces/StorageProvider.js +1 -0
  16. package/dist/client/interfaces/index.browser.d.ts +4 -0
  17. package/dist/client/interfaces/index.browser.js +4 -0
  18. package/dist/{src → client}/managers/SessionManager.d.ts +2 -2
  19. package/dist/client/managers/SessionManager.js +127 -0
  20. package/dist/{src → client}/managers/SessionManager.type.d.ts +1 -1
  21. package/dist/client/managers/SessionManager.type.js +1 -0
  22. package/dist/client/managers/index.browser.d.ts +2 -0
  23. package/dist/client/managers/index.browser.js +2 -0
  24. package/dist/client/scripts/base64Polyfill.js +10 -0
  25. package/dist/client/scripts/index.browser.d.ts +1 -0
  26. package/dist/client/scripts/index.browser.js +1 -0
  27. package/dist/client/services/index.browser.d.ts +1 -0
  28. package/dist/client/services/index.browser.js +1 -0
  29. package/dist/{src → client}/services/time/TimeService.d.ts +1 -1
  30. package/dist/client/services/time/TimeService.js +173 -0
  31. package/dist/client/services/time/TimeService.type.js +1 -0
  32. package/dist/client/services/time/index.d.ts +2 -0
  33. package/dist/client/services/time/index.js +2 -0
  34. package/dist/client/types/IntRage.js +1 -0
  35. package/dist/client/types/PartialExcept.js +1 -0
  36. package/dist/client/types/index.browser.d.ts +2 -0
  37. package/dist/client/types/index.browser.js +2 -0
  38. package/dist/client/utils/ArrayUtils.js +26 -0
  39. package/dist/client/utils/AxiosUtils.js +49 -0
  40. package/dist/client/utils/BooleanUtils.js +5 -0
  41. package/dist/client/utils/Calc.js +23 -0
  42. package/dist/{src → client}/utils/CoordinateUtils.d.ts +1 -1
  43. package/dist/client/utils/CoordinateUtils.js +38 -0
  44. package/dist/{src → client}/utils/DateUtils.d.ts +1 -1
  45. package/dist/client/utils/DateUtils.js +303 -0
  46. package/dist/client/utils/JuminNumberUtils.js +46 -0
  47. package/dist/client/utils/NumberUtils.js +21 -0
  48. package/dist/client/utils/ObjectIdUtils.js +20 -0
  49. package/dist/{src → client}/utils/Point3Utils.d.ts +1 -1
  50. package/dist/client/utils/Point3Utils.js +8 -0
  51. package/dist/client/utils/RandomUtils.js +60 -0
  52. package/dist/client/utils/Sequencer.js +141 -0
  53. package/dist/client/utils/StringUtils.js +33 -0
  54. package/dist/{src → client}/utils/UuidUtils.js +2 -6
  55. package/dist/client/utils/Validator.js +114 -0
  56. package/dist/client/utils/global/between.js +3 -0
  57. package/dist/client/utils/global/castArray.js +3 -0
  58. package/dist/client/utils/global/circularDistance.js +11 -0
  59. package/dist/client/utils/global/fallbackIfEqual.js +6 -0
  60. package/dist/client/utils/global/fallbackIfNull.js +4 -0
  61. package/dist/client/utils/global/fallbackIfUndefined.js +4 -0
  62. package/dist/client/utils/global/firstNonNullish.js +10 -0
  63. package/dist/client/utils/global/flat.js +113 -0
  64. package/dist/client/utils/global/index.d.ts +11 -0
  65. package/dist/client/utils/global/index.js +11 -0
  66. package/dist/client/utils/global/processFirstNonNullish.js +8 -0
  67. package/dist/client/utils/global/pureEnum.js +9 -0
  68. package/dist/client/utils/global/sleep.js +1 -0
  69. package/dist/client/utils/index.browser.d.ts +17 -0
  70. package/dist/client/utils/index.browser.js +17 -0
  71. package/dist/client/utils/try-catch/TryCatch.js +74 -0
  72. package/dist/client/utils/try-catch/index.d.ts +1 -0
  73. package/dist/client/utils/try-catch/index.js +1 -0
  74. package/dist/server/constants/COORDINATE.d.ts +7 -0
  75. package/dist/server/constants/CRUD.d.ts +9 -0
  76. package/dist/server/constants/DATE.d.ts +13 -0
  77. package/dist/server/constants/DISTANCE.d.ts +13 -0
  78. package/dist/server/constants/DURATION.d.ts +16 -0
  79. package/dist/server/constants/NOT_NULL.d.ts +1 -0
  80. package/dist/server/constants/index.browser.d.ts +6 -0
  81. package/dist/{src → server}/constants/index.browser.js +6 -6
  82. package/dist/server/constants/index.d.ts +2 -0
  83. package/dist/{src/interfaces → server/constants}/index.js +2 -2
  84. package/dist/server/constants/nodejs/index.d.ts +2 -0
  85. package/dist/{src → server}/constants/nodejs/index.js +2 -2
  86. package/dist/server/index.browser.d.ts +7 -0
  87. package/dist/{src → server}/index.browser.js +7 -7
  88. package/dist/server/index.d.ts +8 -0
  89. package/dist/{src → server}/index.js +8 -8
  90. package/dist/server/interfaces/Coordinate.d.ts +8 -0
  91. package/dist/server/interfaces/Point2.d.ts +4 -0
  92. package/dist/server/interfaces/Point3.d.ts +4 -0
  93. package/dist/server/interfaces/StorageProvider.d.ts +7 -0
  94. package/dist/server/interfaces/index.browser.d.ts +4 -0
  95. package/dist/{src → server}/interfaces/index.browser.js +4 -4
  96. package/dist/server/interfaces/index.d.ts +2 -0
  97. package/dist/{index.js → server/interfaces/index.js} +2 -1
  98. package/dist/server/interfaces/nodejs/db/index.d.ts +1 -0
  99. package/dist/{src/interfaces/nodejs → server/interfaces/nodejs/db}/index.js +1 -1
  100. package/dist/{src → server}/interfaces/nodejs/db/sequelize/Hook.d.ts +2 -2
  101. package/dist/{src → server}/interfaces/nodejs/db/sequelize/HookFn.d.ts +1 -1
  102. package/dist/server/interfaces/nodejs/db/sequelize/UpsertOptions.d.ts +4 -0
  103. package/dist/server/interfaces/nodejs/db/sequelize/index.d.ts +6 -0
  104. package/dist/server/interfaces/nodejs/db/sequelize/index.js +22 -0
  105. package/dist/server/interfaces/nodejs/index.d.ts +1 -0
  106. package/dist/{src/interfaces/nodejs/db → server/interfaces/nodejs}/index.js +1 -1
  107. package/dist/server/managers/SessionManager.d.ts +15 -0
  108. package/dist/server/managers/SessionManager.type.d.ts +9 -0
  109. package/dist/{src → server}/managers/TransactionManager.d.ts +2 -2
  110. package/dist/{src → server}/managers/TransactionManager.js +13 -13
  111. package/dist/{src → server}/managers/TransactionManager.types.d.ts +1 -1
  112. package/dist/server/managers/index.browser.d.ts +2 -0
  113. package/dist/{src → server}/managers/index.browser.js +2 -2
  114. package/dist/server/managers/index.d.ts +2 -0
  115. package/dist/server/managers/index.js +18 -0
  116. package/dist/server/scripts/base64Polyfill.d.ts +1 -0
  117. package/dist/server/scripts/index.browser.d.ts +1 -0
  118. package/dist/{src → server}/scripts/index.browser.js +1 -1
  119. package/dist/server/scripts/index.d.ts +1 -0
  120. package/dist/{src → server}/scripts/index.js +1 -1
  121. package/dist/server/services/index.browser.d.ts +1 -0
  122. package/dist/{src → server}/services/index.browser.js +1 -1
  123. package/dist/server/services/index.d.ts +2 -0
  124. package/dist/{src/constants → server/services}/index.js +2 -2
  125. package/dist/{src → server}/services/redis/RedisPublisher.d.ts +1 -1
  126. package/dist/{src → server}/services/redis/RedisPublisher.js +2 -2
  127. package/dist/{src → server}/services/redis/RedisSubscriber.d.ts +2 -2
  128. package/dist/{src → server}/services/redis/RedisSubscriber.js +5 -5
  129. package/dist/server/services/redis/index.d.ts +3 -0
  130. package/dist/{src → server}/services/redis/index.js +3 -3
  131. package/dist/server/services/time/TimeService.d.ts +31 -0
  132. package/dist/server/services/time/TimeService.type.d.ts +21 -0
  133. package/dist/server/services/time/index.d.ts +2 -0
  134. package/dist/server/services/time/index.js +18 -0
  135. package/dist/server/types/IntRage.d.ts +3 -0
  136. package/dist/server/types/PartialExcept.d.ts +1 -0
  137. package/dist/server/types/index.browser.d.ts +2 -0
  138. package/dist/{index.browser.js → server/types/index.browser.js} +2 -1
  139. package/dist/server/types/index.d.ts +2 -0
  140. package/dist/server/types/index.js +18 -0
  141. package/dist/server/utils/ArrayUtils.d.ts +12 -0
  142. package/dist/{src → server}/utils/ArrayUtils.js +2 -2
  143. package/dist/server/utils/AxiosUtils.d.ts +5 -0
  144. package/dist/server/utils/BooleanUtils.d.ts +1 -0
  145. package/dist/server/utils/Calc.d.ts +4 -0
  146. package/dist/server/utils/CoordinateUtils.d.ts +8 -0
  147. package/dist/server/utils/DateUtils.d.ts +24 -0
  148. package/dist/{src → server}/utils/DateUtils.js +17 -17
  149. package/dist/server/utils/JuminNumberUtils.d.ts +4 -0
  150. package/dist/{src → server}/utils/JuminNumberUtils.js +2 -2
  151. package/dist/server/utils/NumberUtils.d.ts +4 -0
  152. package/dist/server/utils/ObjectIdUtils.d.ts +4 -0
  153. package/dist/{src → server}/utils/ObjectIdUtils.js +3 -3
  154. package/dist/server/utils/Point3Utils.d.ts +4 -0
  155. package/dist/server/utils/RandomUtils.d.ts +8 -0
  156. package/dist/server/utils/Sequencer.d.ts +38 -0
  157. package/dist/{src → server}/utils/Sequencer.js +2 -2
  158. package/dist/server/utils/StringUtils.d.ts +5 -0
  159. package/dist/server/utils/UuidUtils.d.ts +14 -0
  160. package/dist/server/utils/UuidUtils.js +79 -0
  161. package/dist/server/utils/Validator.d.ts +48 -0
  162. package/dist/server/utils/global/between.d.ts +1 -0
  163. package/dist/server/utils/global/castArray.d.ts +1 -0
  164. package/dist/server/utils/global/circularDistance.d.ts +1 -0
  165. package/dist/server/utils/global/fallbackIfEqual.d.ts +1 -0
  166. package/dist/server/utils/global/fallbackIfNull.d.ts +1 -0
  167. package/dist/{src → server}/utils/global/fallbackIfNull.js +2 -2
  168. package/dist/server/utils/global/fallbackIfUndefined.d.ts +1 -0
  169. package/dist/{src → server}/utils/global/fallbackIfUndefined.js +2 -2
  170. package/dist/server/utils/global/firstNonNullish.d.ts +1 -0
  171. package/dist/server/utils/global/flat.d.ts +14 -0
  172. package/dist/server/utils/global/index.d.ts +11 -0
  173. package/dist/server/utils/global/index.js +27 -0
  174. package/dist/server/utils/global/processFirstNonNullish.d.ts +1 -0
  175. package/dist/{src → server}/utils/global/processFirstNonNullish.js +2 -2
  176. package/dist/server/utils/global/pureEnum.d.ts +8 -0
  177. package/dist/server/utils/global/sleep.d.ts +1 -0
  178. package/dist/server/utils/index.browser.d.ts +17 -0
  179. package/dist/server/utils/index.browser.js +33 -0
  180. package/dist/server/utils/index.d.ts +2 -0
  181. package/dist/server/utils/index.js +18 -0
  182. package/dist/{src → server}/utils/nodejs/HookUtils.d.ts +1 -1
  183. package/dist/server/utils/nodejs/index.d.ts +2 -0
  184. package/dist/{src → server}/utils/nodejs/index.js +3 -3
  185. package/dist/{src → server}/utils/nodejs/sequelize-utils/SequelizeUtils.d.ts +1 -1
  186. package/dist/{src → server}/utils/nodejs/sequelize-utils/SequelizeUtils.js +8 -8
  187. package/dist/server/utils/nodejs/sequelize-utils/index.d.ts +1 -0
  188. package/dist/{src → server}/utils/nodejs/sequelize-utils/index.js +2 -2
  189. package/dist/server/utils/try-catch/TryCatch.d.ts +24 -0
  190. package/dist/server/utils/try-catch/index.d.ts +1 -0
  191. package/dist/{src → server}/utils/try-catch/index.js +1 -1
  192. package/package.json +56 -52
  193. package/dist/index.browser.d.ts +0 -1
  194. package/dist/index.d.ts +0 -1
  195. package/dist/src/constants/index.browser.d.ts +0 -6
  196. package/dist/src/constants/index.d.ts +0 -2
  197. package/dist/src/constants/nodejs/index.d.ts +0 -2
  198. package/dist/src/index.browser.d.ts +0 -7
  199. package/dist/src/index.d.ts +0 -8
  200. package/dist/src/interfaces/index.browser.d.ts +0 -4
  201. package/dist/src/interfaces/index.d.ts +0 -2
  202. package/dist/src/interfaces/nodejs/db/index.d.ts +0 -1
  203. package/dist/src/interfaces/nodejs/db/sequelize/UpsertOptions.d.ts +0 -4
  204. package/dist/src/interfaces/nodejs/db/sequelize/index.d.ts +0 -6
  205. package/dist/src/interfaces/nodejs/db/sequelize/index.js +0 -22
  206. package/dist/src/interfaces/nodejs/index.d.ts +0 -1
  207. package/dist/src/managers/index.browser.d.ts +0 -2
  208. package/dist/src/managers/index.d.ts +0 -2
  209. package/dist/src/managers/index.js +0 -18
  210. package/dist/src/scripts/index.browser.d.ts +0 -1
  211. package/dist/src/scripts/index.d.ts +0 -1
  212. package/dist/src/services/index.browser.d.ts +0 -1
  213. package/dist/src/services/index.d.ts +0 -2
  214. package/dist/src/services/index.js +0 -18
  215. package/dist/src/services/redis/index.d.ts +0 -3
  216. package/dist/src/services/time/index.d.ts +0 -2
  217. package/dist/src/services/time/index.js +0 -18
  218. package/dist/src/types/index.browser.d.ts +0 -2
  219. package/dist/src/types/index.browser.js +0 -18
  220. package/dist/src/types/index.d.ts +0 -2
  221. package/dist/src/types/index.js +0 -18
  222. package/dist/src/utils/global/index.d.ts +0 -11
  223. package/dist/src/utils/global/index.js +0 -27
  224. package/dist/src/utils/index.browser.d.ts +0 -17
  225. package/dist/src/utils/index.browser.js +0 -33
  226. package/dist/src/utils/index.d.ts +0 -2
  227. package/dist/src/utils/index.js +0 -18
  228. package/dist/src/utils/nodejs/index.d.ts +0 -2
  229. package/dist/src/utils/nodejs/sequelize-utils/index.d.ts +0 -1
  230. package/dist/src/utils/try-catch/index.d.ts +0 -1
  231. /package/dist/{src → client}/constants/COORDINATE.d.ts +0 -0
  232. /package/dist/{src → client}/constants/CRUD.d.ts +0 -0
  233. /package/dist/{src → client}/constants/DATE.d.ts +0 -0
  234. /package/dist/{src → client}/constants/DISTANCE.d.ts +0 -0
  235. /package/dist/{src → client}/constants/DURATION.d.ts +0 -0
  236. /package/dist/{src → client}/constants/NOT_NULL.d.ts +0 -0
  237. /package/dist/{src → client}/interfaces/Coordinate.d.ts +0 -0
  238. /package/dist/{src → client}/interfaces/Point2.d.ts +0 -0
  239. /package/dist/{src → client}/interfaces/StorageProvider.d.ts +0 -0
  240. /package/dist/{src → client}/scripts/base64Polyfill.d.ts +0 -0
  241. /package/dist/{src → client}/services/time/TimeService.type.d.ts +0 -0
  242. /package/dist/{src → client}/types/IntRage.d.ts +0 -0
  243. /package/dist/{src → client}/types/PartialExcept.d.ts +0 -0
  244. /package/dist/{src → client}/utils/ArrayUtils.d.ts +0 -0
  245. /package/dist/{src → client}/utils/AxiosUtils.d.ts +0 -0
  246. /package/dist/{src → client}/utils/BooleanUtils.d.ts +0 -0
  247. /package/dist/{src → client}/utils/Calc.d.ts +0 -0
  248. /package/dist/{src → client}/utils/JuminNumberUtils.d.ts +0 -0
  249. /package/dist/{src → client}/utils/NumberUtils.d.ts +0 -0
  250. /package/dist/{src → client}/utils/ObjectIdUtils.d.ts +0 -0
  251. /package/dist/{src → client}/utils/RandomUtils.d.ts +0 -0
  252. /package/dist/{src → client}/utils/Sequencer.d.ts +0 -0
  253. /package/dist/{src → client}/utils/StringUtils.d.ts +0 -0
  254. /package/dist/{src → client}/utils/UuidUtils.d.ts +0 -0
  255. /package/dist/{src → client}/utils/Validator.d.ts +0 -0
  256. /package/dist/{src → client}/utils/global/between.d.ts +0 -0
  257. /package/dist/{src → client}/utils/global/castArray.d.ts +0 -0
  258. /package/dist/{src → client}/utils/global/circularDistance.d.ts +0 -0
  259. /package/dist/{src → client}/utils/global/fallbackIfEqual.d.ts +0 -0
  260. /package/dist/{src → client}/utils/global/fallbackIfNull.d.ts +0 -0
  261. /package/dist/{src → client}/utils/global/fallbackIfUndefined.d.ts +0 -0
  262. /package/dist/{src → client}/utils/global/firstNonNullish.d.ts +0 -0
  263. /package/dist/{src → client}/utils/global/flat.d.ts +0 -0
  264. /package/dist/{src → client}/utils/global/processFirstNonNullish.d.ts +0 -0
  265. /package/dist/{src → client}/utils/global/pureEnum.d.ts +0 -0
  266. /package/dist/{src → client}/utils/global/sleep.d.ts +0 -0
  267. /package/dist/{src → client}/utils/try-catch/TryCatch.d.ts +0 -0
  268. /package/dist/{src → server}/constants/COORDINATE.js +0 -0
  269. /package/dist/{src → server}/constants/CRUD.js +0 -0
  270. /package/dist/{src → server}/constants/DATE.js +0 -0
  271. /package/dist/{src → server}/constants/DISTANCE.js +0 -0
  272. /package/dist/{src → server}/constants/DURATION.js +0 -0
  273. /package/dist/{src → server}/constants/NOT_NULL.js +0 -0
  274. /package/dist/{src → server}/constants/nodejs/TransactionManagerLogLevel.d.ts +0 -0
  275. /package/dist/{src → server}/constants/nodejs/TransactionManagerLogLevel.js +0 -0
  276. /package/dist/{src → server}/constants/nodejs/TransactionManagerTimeoutAction.d.ts +0 -0
  277. /package/dist/{src → server}/constants/nodejs/TransactionManagerTimeoutAction.js +0 -0
  278. /package/dist/{src → server}/interfaces/Coordinate.js +0 -0
  279. /package/dist/{src → server}/interfaces/Point2.js +0 -0
  280. /package/dist/{src → server}/interfaces/Point3.js +0 -0
  281. /package/dist/{src → server}/interfaces/StorageProvider.js +0 -0
  282. /package/dist/{src → server}/interfaces/nodejs/db/sequelize/Hook.js +0 -0
  283. /package/dist/{src → server}/interfaces/nodejs/db/sequelize/HookFn.js +0 -0
  284. /package/dist/{src → server}/interfaces/nodejs/db/sequelize/HookType.d.ts +0 -0
  285. /package/dist/{src → server}/interfaces/nodejs/db/sequelize/HookType.js +0 -0
  286. /package/dist/{src → server}/interfaces/nodejs/db/sequelize/ReloadOption.d.ts +0 -0
  287. /package/dist/{src → server}/interfaces/nodejs/db/sequelize/ReloadOption.js +0 -0
  288. /package/dist/{src → server}/interfaces/nodejs/db/sequelize/TransactionOption.d.ts +0 -0
  289. /package/dist/{src → server}/interfaces/nodejs/db/sequelize/TransactionOption.js +0 -0
  290. /package/dist/{src → server}/interfaces/nodejs/db/sequelize/UpsertOptions.js +0 -0
  291. /package/dist/{src → server}/managers/SessionManager.js +0 -0
  292. /package/dist/{src → server}/managers/SessionManager.type.js +0 -0
  293. /package/dist/{src → server}/managers/TransactionManager.types.js +0 -0
  294. /package/dist/{src → server}/scripts/base64Polyfill.js +0 -0
  295. /package/dist/{src → server}/services/redis/RedisClient.d.ts +0 -0
  296. /package/dist/{src → server}/services/redis/RedisClient.js +0 -0
  297. /package/dist/{src → server}/services/time/TimeService.js +0 -0
  298. /package/dist/{src → server}/services/time/TimeService.type.js +0 -0
  299. /package/dist/{src → server}/types/IntRage.js +0 -0
  300. /package/dist/{src → server}/types/PartialExcept.js +0 -0
  301. /package/dist/{src → server}/types/UpsertResult.d.ts +0 -0
  302. /package/dist/{src → server}/types/UpsertResult.js +0 -0
  303. /package/dist/{src → server}/utils/AxiosUtils.js +0 -0
  304. /package/dist/{src → server}/utils/BooleanUtils.js +0 -0
  305. /package/dist/{src → server}/utils/Calc.js +0 -0
  306. /package/dist/{src → server}/utils/CoordinateUtils.js +0 -0
  307. /package/dist/{src → server}/utils/NumberUtils.js +0 -0
  308. /package/dist/{src → server}/utils/Point3Utils.js +0 -0
  309. /package/dist/{src → server}/utils/RandomUtils.js +0 -0
  310. /package/dist/{src → server}/utils/StringUtils.js +0 -0
  311. /package/dist/{src → server}/utils/Validator.js +0 -0
  312. /package/dist/{src → server}/utils/global/between.js +0 -0
  313. /package/dist/{src → server}/utils/global/castArray.js +0 -0
  314. /package/dist/{src → server}/utils/global/circularDistance.js +0 -0
  315. /package/dist/{src → server}/utils/global/fallbackIfEqual.js +0 -0
  316. /package/dist/{src → server}/utils/global/firstNonNullish.js +0 -0
  317. /package/dist/{src → server}/utils/global/flat.js +0 -0
  318. /package/dist/{src → server}/utils/global/pureEnum.js +0 -0
  319. /package/dist/{src → server}/utils/global/sleep.js +0 -0
  320. /package/dist/{src → server}/utils/nodejs/HookUtils.js +0 -0
  321. /package/dist/{src → server}/utils/nodejs/sequelize-utils/types.d.ts +0 -0
  322. /package/dist/{src → server}/utils/nodejs/sequelize-utils/types.js +0 -0
  323. /package/dist/{src → server}/utils/try-catch/TryCatch.js +0 -0
@@ -0,0 +1,8 @@
1
+ export * from './index.browser.js';
2
+ export * from './constants/index.js';
3
+ export * from './interfaces/index.js';
4
+ export * from './managers/index.js';
5
+ export * from './scripts/index.js';
6
+ export * from './services/index.js';
7
+ export * from './types/index.js';
8
+ export * from './utils/index.js';
@@ -14,11 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./index.browser"), exports);
18
- __exportStar(require("./constants"), exports);
19
- __exportStar(require("./interfaces"), exports);
20
- __exportStar(require("./managers"), exports);
21
- __exportStar(require("./scripts"), exports);
22
- __exportStar(require("./services"), exports);
23
- __exportStar(require("./types"), exports);
24
- __exportStar(require("./utils"), exports);
17
+ __exportStar(require("./index.browser.js"), exports);
18
+ __exportStar(require("./constants/index.js"), exports);
19
+ __exportStar(require("./interfaces/index.js"), exports);
20
+ __exportStar(require("./managers/index.js"), exports);
21
+ __exportStar(require("./scripts/index.js"), exports);
22
+ __exportStar(require("./services/index.js"), exports);
23
+ __exportStar(require("./types/index.js"), exports);
24
+ __exportStar(require("./utils/index.js"), exports);
@@ -0,0 +1,8 @@
1
+ export interface Coordinate {
2
+ latitude: number;
3
+ longitude: number;
4
+ }
5
+ export interface CoordinateM {
6
+ lat: number;
7
+ lon: number;
8
+ }
@@ -0,0 +1,4 @@
1
+ export interface Point2 {
2
+ x: number;
3
+ y: number;
4
+ }
@@ -0,0 +1,4 @@
1
+ import { Point2 } from "./Point2.js";
2
+ export interface Point3 extends Point2 {
3
+ z: number;
4
+ }
@@ -0,0 +1,7 @@
1
+ export interface StorageProvider {
2
+ key?: () => string;
3
+ set: (key: string, value: string) => Promise<void> | void;
4
+ get: (key: string) => Promise<string | null> | (string | null);
5
+ remove: (key: string) => Promise<void> | void;
6
+ clear?: () => Promise<void> | void;
7
+ }
@@ -0,0 +1,4 @@
1
+ export * from './Coordinate.js';
2
+ export * from './Point2.js';
3
+ export * from './Point3.js';
4
+ export * from './StorageProvider.js';
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./Coordinate"), exports);
18
- __exportStar(require("./Point2"), exports);
19
- __exportStar(require("./Point3"), exports);
20
- __exportStar(require("./StorageProvider"), exports);
17
+ __exportStar(require("./Coordinate.js"), exports);
18
+ __exportStar(require("./Point2.js"), exports);
19
+ __exportStar(require("./Point3.js"), exports);
20
+ __exportStar(require("./StorageProvider.js"), exports);
@@ -0,0 +1,2 @@
1
+ export * from './index.browser.js';
2
+ export * from './nodejs/index.js';
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src/index"), exports);
17
+ __exportStar(require("./index.browser.js"), exports);
18
+ __exportStar(require("./nodejs/index.js"), exports);
@@ -0,0 +1 @@
1
+ export * from './sequelize/index.js';
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./db"), exports);
17
+ __exportStar(require("./sequelize/index.js"), exports);
@@ -1,6 +1,6 @@
1
1
  import { ModelCtor } from "sequelize-typescript";
2
- import { HookType } from "./HookType";
3
- import { HookFn } from "./HookFn";
2
+ import { HookType } from "./HookType.js";
3
+ import { HookFn } from "./HookFn.js";
4
4
  export interface Hook {
5
5
  model: ModelCtor;
6
6
  hookType: HookType;
@@ -1,4 +1,4 @@
1
1
  import { Hooks, SequelizeHooks } from "sequelize/types/hooks";
2
2
  import { Attributes, CreationAttributes } from "sequelize/types/model";
3
- import { HookType } from "./HookType";
3
+ import { HookType } from "./HookType.js";
4
4
  export type HookFn = SequelizeHooks<Hooks['_model'], Attributes<Hooks>, CreationAttributes<Hooks>>[HookType];
@@ -0,0 +1,4 @@
1
+ import { ReloadOption } from "./ReloadOption.js";
2
+ import { TransactionOption } from "./TransactionOption.js";
3
+ export interface UpsertOptions extends ReloadOption, TransactionOption {
4
+ }
@@ -0,0 +1,6 @@
1
+ export * from './Hook.js';
2
+ export * from './HookFn.js';
3
+ export * from './HookType.js';
4
+ export * from './ReloadOption.js';
5
+ export * from './TransactionOption.js';
6
+ export * from './UpsertOptions.js';
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Hook.js"), exports);
18
+ __exportStar(require("./HookFn.js"), exports);
19
+ __exportStar(require("./HookType.js"), exports);
20
+ __exportStar(require("./ReloadOption.js"), exports);
21
+ __exportStar(require("./TransactionOption.js"), exports);
22
+ __exportStar(require("./UpsertOptions.js"), exports);
@@ -0,0 +1 @@
1
+ export * from './db/index.js';
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./sequelize"), exports);
17
+ __exportStar(require("./db/index.js"), exports);
@@ -0,0 +1,15 @@
1
+ import { AxiosInstance } from "axios";
2
+ import { StorageProvider } from "../interfaces/StorageProvider.js";
3
+ import EventEmitter from 'eventemitter3';
4
+ import { SessionManagerEvent, SessionManagerOptions } from "./SessionManager.type.js";
5
+ export declare class SessionManager extends EventEmitter<SessionManagerEvent> {
6
+ private static readonly DEFAULT_AUTHORIZATION_STORAGE_KEY;
7
+ protected api: AxiosInstance;
8
+ protected storageProvider: StorageProvider;
9
+ constructor(options: SessionManagerOptions);
10
+ private get key();
11
+ hasAuthorization(): Promise<boolean>;
12
+ getAuthorization(): Promise<string | null>;
13
+ setAuthorization(authorization?: string | null): Promise<string | null>;
14
+ removeAuthorization(): Promise<void>;
15
+ }
@@ -0,0 +1,9 @@
1
+ import { AxiosInstance } from "axios";
2
+ import { StorageProvider } from "../interfaces/StorageProvider.js";
3
+ export interface SessionManagerOptions {
4
+ api: AxiosInstance;
5
+ storageProvider: StorageProvider;
6
+ }
7
+ export type SessionManagerEvent = {
8
+ AUTHORIZATION_CHANGED: (authorization: string | null) => void;
9
+ };
@@ -1,7 +1,7 @@
1
1
  import { Transaction } from "sequelize";
2
2
  import EventEmitter from 'eventemitter3';
3
- import { TransactionManagerLogLevel, TransactionManagerTimeoutAction } from "../constants";
4
- import { TransactionManagerAddOption, TransactionManagerEventTypes } from "./TransactionManager.types";
3
+ import { TransactionManagerLogLevel, TransactionManagerTimeoutAction } from "../constants/index.js";
4
+ import { TransactionManagerAddOption, TransactionManagerEventTypes } from "./TransactionManager.types.js";
5
5
  export declare class TransactionManager {
6
6
  static DEFAULT_TIMEOUT: number;
7
7
  static DEFAULT_ACTION: TransactionManagerTimeoutAction;
@@ -14,16 +14,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.TransactionManager = void 0;
16
16
  const eventemitter3_1 = __importDefault(require("eventemitter3"));
17
- const constants_1 = require("../constants");
17
+ const index_js_1 = require("../constants/index.js");
18
18
  const LOG_TAG = '[TransactionManager]';
19
19
  class TransactionManager {
20
20
  constructor() {
21
21
  // Members
22
- this.logLevel = constants_1.TransactionManagerLogLevel.VERBOSE;
22
+ this.logLevel = index_js_1.TransactionManagerLogLevel.VERBOSE;
23
23
  this.transactionTimeoutMap = new Map();
24
24
  // Emitter
25
25
  this.emitter = new eventemitter3_1.default();
26
- if (this.logLevel <= constants_1.TransactionManagerLogLevel.VERBOSE) {
26
+ if (this.logLevel <= index_js_1.TransactionManagerLogLevel.VERBOSE) {
27
27
  console.log(LOG_TAG, 'TransactionManager instance initialized');
28
28
  }
29
29
  }
@@ -36,7 +36,7 @@ class TransactionManager {
36
36
  }
37
37
  setLogLevel(logLevel) {
38
38
  this.logLevel = logLevel;
39
- if (this.logLevel <= constants_1.TransactionManagerLogLevel.VERBOSE) {
39
+ if (this.logLevel <= index_js_1.TransactionManagerLogLevel.VERBOSE) {
40
40
  console.log(LOG_TAG, 'log level changed to', logLevel);
41
41
  }
42
42
  }
@@ -49,7 +49,7 @@ class TransactionManager {
49
49
  add(transaction, option) {
50
50
  var _a, _b;
51
51
  if (this.transactionTimeoutMap.has(transaction)) {
52
- if (this.logLevel <= constants_1.TransactionManagerLogLevel.ERROR) {
52
+ if (this.logLevel <= index_js_1.TransactionManagerLogLevel.ERROR) {
53
53
  console.error(LOG_TAG, 'transaction already exists');
54
54
  }
55
55
  return;
@@ -69,7 +69,7 @@ class TransactionManager {
69
69
  if (transactionTimeout != null) {
70
70
  clearTimeout(transactionTimeout.handler);
71
71
  this.transactionTimeoutMap.delete(transaction);
72
- if (this.logLevel <= constants_1.TransactionManagerLogLevel.VERBOSE) {
72
+ if (this.logLevel <= index_js_1.TransactionManagerLogLevel.VERBOSE) {
73
73
  console.log(LOG_TAG, this.getTransactionLogArg(transaction), 'removed');
74
74
  }
75
75
  }
@@ -89,7 +89,7 @@ class TransactionManager {
89
89
  let handled = false;
90
90
  const finished = transaction === null || transaction === void 0 ? void 0 : transaction.finished;
91
91
  if (finished != null) {
92
- if (this.logLevel <= constants_1.TransactionManagerLogLevel.VERBOSE) {
92
+ if (this.logLevel <= index_js_1.TransactionManagerLogLevel.VERBOSE) {
93
93
  console.log(LOG_TAG, this.getTransactionLogArg(transaction), `is already handled(${finished}) after`, reason);
94
94
  }
95
95
  this.remove(transaction);
@@ -98,18 +98,18 @@ class TransactionManager {
98
98
  try {
99
99
  let finished;
100
100
  switch (action) {
101
- case constants_1.TransactionManagerTimeoutAction.ROLLBACK: {
101
+ case index_js_1.TransactionManagerTimeoutAction.ROLLBACK: {
102
102
  yield transaction.rollback();
103
103
  finished = 'rollback';
104
104
  break;
105
105
  }
106
- case constants_1.TransactionManagerTimeoutAction.COMMIT: {
106
+ case index_js_1.TransactionManagerTimeoutAction.COMMIT: {
107
107
  yield transaction.commit();
108
108
  finished = 'commit';
109
109
  break;
110
110
  }
111
111
  default: {
112
- if (this.logLevel <= constants_1.TransactionManagerLogLevel.ERROR) {
112
+ if (this.logLevel <= index_js_1.TransactionManagerLogLevel.ERROR) {
113
113
  console.error(LOG_TAG, `unknown action`, action);
114
114
  }
115
115
  break;
@@ -117,12 +117,12 @@ class TransactionManager {
117
117
  }
118
118
  handled = finished != null;
119
119
  if (finished != null) {
120
- if (this.logLevel <= constants_1.TransactionManagerLogLevel.ERROR) {
120
+ if (this.logLevel <= index_js_1.TransactionManagerLogLevel.ERROR) {
121
121
  console.error(LOG_TAG, this.getTransactionLogArg(transaction), `handled(${finished}) after`, reason);
122
122
  }
123
123
  }
124
124
  else {
125
- if (this.logLevel <= constants_1.TransactionManagerLogLevel.ERROR) {
125
+ if (this.logLevel <= index_js_1.TransactionManagerLogLevel.ERROR) {
126
126
  console.error(LOG_TAG, this.getTransactionLogArg(transaction), `not handled 🚫`);
127
127
  }
128
128
  }
@@ -148,4 +148,4 @@ class TransactionManager {
148
148
  }
149
149
  exports.TransactionManager = TransactionManager;
150
150
  TransactionManager.DEFAULT_TIMEOUT = 60 * 1000;
151
- TransactionManager.DEFAULT_ACTION = constants_1.TransactionManagerTimeoutAction.ROLLBACK;
151
+ TransactionManager.DEFAULT_ACTION = index_js_1.TransactionManagerTimeoutAction.ROLLBACK;
@@ -1,4 +1,4 @@
1
- import { TransactionManagerTimeoutAction } from "../constants";
1
+ import { TransactionManagerTimeoutAction } from "../constants/index.js";
2
2
  import { Transaction } from "sequelize";
3
3
  export interface TransactionManagerAddOption {
4
4
  timeout?: number;
@@ -0,0 +1,2 @@
1
+ export * from './SessionManager.js';
2
+ export * from './SessionManager.type.js';
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./SessionManager"), exports);
18
- __exportStar(require("./SessionManager.type"), exports);
17
+ __exportStar(require("./SessionManager.js"), exports);
18
+ __exportStar(require("./SessionManager.type.js"), exports);
@@ -0,0 +1,2 @@
1
+ export * from './TransactionManager.js';
2
+ export * from './TransactionManager.types.js';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./TransactionManager.js"), exports);
18
+ __exportStar(require("./TransactionManager.types.js"), exports);
@@ -0,0 +1 @@
1
+ export declare const base64Polyfill: () => void;
@@ -0,0 +1 @@
1
+ export * from './base64Polyfill.js';
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./base64Polyfill"), exports);
17
+ __exportStar(require("./base64Polyfill.js"), exports);
@@ -0,0 +1 @@
1
+ export * from './index.browser.js';
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./index.browser"), exports);
17
+ __exportStar(require("./index.browser.js"), exports);
@@ -0,0 +1 @@
1
+ export * from './time/index.js';
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./time"), exports);
17
+ __exportStar(require("./time/index.js"), exports);
@@ -0,0 +1,2 @@
1
+ export * from './index.browser.js';
2
+ export * from './redis/index.js';
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./index.browser"), exports);
18
- __exportStar(require("./nodejs"), exports);
17
+ __exportStar(require("./index.browser.js"), exports);
18
+ __exportStar(require("./redis/index.js"), exports);
@@ -1,4 +1,4 @@
1
- import { RedisClient } from "./RedisClient";
1
+ import { RedisClient } from "./RedisClient.js";
2
2
  export declare class RedisPublisher extends RedisClient {
3
3
  private logging;
4
4
  constructor(options?: RedisClient.RedisClientOptions);
@@ -10,9 +10,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.RedisPublisher = void 0;
13
- const RedisClient_1 = require("./RedisClient");
13
+ const RedisClient_js_1 = require("./RedisClient.js");
14
14
  const LOG_TAG = '[REDIS-PUB]';
15
- class RedisPublisher extends RedisClient_1.RedisClient {
15
+ class RedisPublisher extends RedisClient_js_1.RedisClient {
16
16
  constructor(options) {
17
17
  super(options);
18
18
  this.logging = 'length';
@@ -1,5 +1,5 @@
1
- import { RedisClient } from "./RedisClient";
2
- import { PubSubListener } from "@redis/client/dist/lib/client/pub-sub";
1
+ import { RedisClient } from "./RedisClient.js";
2
+ import { PubSubListener } from "@redis/client/dist/lib/client/pub-sub.js";
3
3
  export declare class RedisSubscriber extends RedisClient {
4
4
  constructor(options?: RedisClient.RedisClientOptions);
5
5
  subscribe<T extends boolean = false>(channels: string | string[], listener: PubSubListener<T>, bufferMode?: T | undefined): Promise<void>;
@@ -10,16 +10,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.RedisSubscriber = void 0;
13
- const RedisClient_1 = require("./RedisClient");
14
- const utils_1 = require("../../utils");
15
- class RedisSubscriber extends RedisClient_1.RedisClient {
13
+ const RedisClient_js_1 = require("./RedisClient.js");
14
+ const index_js_1 = require("../../utils/index.js");
15
+ class RedisSubscriber extends RedisClient_js_1.RedisClient {
16
16
  constructor(options) {
17
17
  super(options);
18
18
  console.log(Date.now(), 'Subscriber', 'initialized');
19
19
  }
20
20
  subscribe(channels, listener, bufferMode) {
21
21
  return __awaiter(this, void 0, void 0, function* () {
22
- for (const channel of (0, utils_1.castArray)(channels)) {
22
+ for (const channel of (0, index_js_1.castArray)(channels)) {
23
23
  if ((/\*/g).test(channel)) {
24
24
  yield this.client.pSubscribe(channel, listener, bufferMode);
25
25
  }
@@ -31,7 +31,7 @@ class RedisSubscriber extends RedisClient_1.RedisClient {
31
31
  }
32
32
  unsubscribe(channels, listener, bufferMode) {
33
33
  return __awaiter(this, void 0, void 0, function* () {
34
- for (const channel of (0, utils_1.castArray)(channels)) {
34
+ for (const channel of (0, index_js_1.castArray)(channels)) {
35
35
  if ((/\*/g).test(channel)) {
36
36
  yield this.client.pUnsubscribe(channel, listener, bufferMode);
37
37
  }
@@ -0,0 +1,3 @@
1
+ export * from './RedisClient.js';
2
+ export * from './RedisPublisher.js';
3
+ export * from './RedisSubscriber.js';
@@ -15,6 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  // Files
18
- __exportStar(require("./RedisClient"), exports);
19
- __exportStar(require("./RedisPublisher"), exports);
20
- __exportStar(require("./RedisSubscriber"), exports);
18
+ __exportStar(require("./RedisClient.js"), exports);
19
+ __exportStar(require("./RedisPublisher.js"), exports);
20
+ __exportStar(require("./RedisSubscriber.js"), exports);
@@ -0,0 +1,31 @@
1
+ import EventEmitter from 'eventemitter3';
2
+ import type { TimeServiceClientTimeProvider, TimeServiceEvent, TimeServiceNtpResult, TimeServiceOffset, TimeServiceOptions, TimeServiceServerTimeProvider, TimeServiceTimeStamp } from "./TimeService.type.js";
3
+ export declare class TimeService extends EventEmitter<TimeServiceEvent> {
4
+ private syncHandler?;
5
+ private offset?;
6
+ private syncedAt?;
7
+ protected syncInterval?: number | null;
8
+ protected clientTimeProvider?: TimeServiceClientTimeProvider;
9
+ protected serverTimeProvider?: TimeServiceServerTimeProvider;
10
+ static calculateNTPResultOffset(ntpResult: TimeServiceNtpResult): TimeServiceOffset;
11
+ constructor(options?: TimeServiceOptions);
12
+ getOffset(defaultValue: TimeServiceOffset): TimeServiceOffset;
13
+ getOffset(): TimeServiceOffset | undefined;
14
+ setOffset(offset: TimeServiceOffset): TimeServiceOffset;
15
+ setOffset(offset: TimeServiceOffset | undefined): TimeServiceOffset;
16
+ getSyncedAt(): TimeServiceTimeStamp | undefined;
17
+ private setSyncedAt;
18
+ getSyncInterval(): number | null | undefined;
19
+ setSyncInterval(interval: TimeServiceOptions['syncInterval']): void;
20
+ getClientTimeProvider(): TimeServiceClientTimeProvider | undefined;
21
+ setClientTimeProvider(provider: TimeServiceClientTimeProvider | null | undefined): void;
22
+ getClientTime(): number | undefined;
23
+ getServerTimeProvider(): TimeServiceServerTimeProvider | undefined;
24
+ setServerTimeProvider(provider: TimeServiceServerTimeProvider | null | undefined): void;
25
+ getServerTime(): number | undefined;
26
+ getTime(): number;
27
+ private fetchServerNTPResult;
28
+ sync(): Promise<TimeServiceOffset | null>;
29
+ startSync(): void;
30
+ stopSync(): void;
31
+ }
@@ -0,0 +1,21 @@
1
+ export type TimeServiceOffset = number;
2
+ export type TimeServiceTimeStamp = number;
3
+ export interface TimeServiceNtpResult {
4
+ t1: TimeServiceTimeStamp;
5
+ t2: TimeServiceTimeStamp;
6
+ t3: TimeServiceTimeStamp;
7
+ t4: TimeServiceTimeStamp;
8
+ }
9
+ export interface TimeServiceServerNtpResult extends Pick<TimeServiceNtpResult, 't2' | 't3'> {
10
+ }
11
+ export type TimeServiceClientTimeProvider = () => TimeServiceTimeStamp;
12
+ export type TimeServiceServerTimeProvider = (t1: TimeServiceNtpResult['t1']) => (TimeServiceServerNtpResult | null) | (Promise<TimeServiceServerNtpResult | null>);
13
+ export type TimeServiceEvent = {
14
+ SYNCED: (offset: TimeServiceOffset, syncedAt: TimeServiceTimeStamp) => void;
15
+ SYNC_INTERVAL_CHANGED: (interval: number | undefined) => void;
16
+ };
17
+ export interface TimeServiceOptions {
18
+ syncInterval?: number;
19
+ clientTimeProvider?: TimeServiceClientTimeProvider;
20
+ serverTimeProvider?: TimeServiceServerTimeProvider;
21
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./TimeService.js";
2
+ export * from "./TimeService.type.js";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./TimeService.js"), exports);
18
+ __exportStar(require("./TimeService.type.js"), exports);
@@ -0,0 +1,3 @@
1
+ type Enumerate<N extends number, Acc extends number[] = []> = Acc['length'] extends N ? Acc[number] : Enumerate<N, [...Acc, Acc['length']]>;
2
+ export type IntRange<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>> | T;
3
+ export {};
@@ -0,0 +1 @@
1
+ export type PartialExcept<T, K extends keyof T> = Pick<T, K> & Partial<Omit<T, K>>;
@@ -0,0 +1,2 @@
1
+ export * from './IntRage.js';
2
+ export * from './PartialExcept.js';
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src/index.browser"), exports);
17
+ __exportStar(require("./IntRage.js"), exports);
18
+ __exportStar(require("./PartialExcept.js"), exports);
@@ -0,0 +1,2 @@
1
+ export * from './index.browser.js';
2
+ export * from './UpsertResult.js';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./index.browser.js"), exports);
18
+ __exportStar(require("./UpsertResult.js"), exports);
@@ -0,0 +1,12 @@
1
+ export declare class ArrayUtils {
2
+ static castArray<T>(value: T | T[]): T[];
3
+ /**
4
+ * 객체를 요소로 가지는 배열에서 가장 큰 값(Property)를 가지는 객체를 반환한다
5
+ * @param e 객체 배열
6
+ * @param key 값을 비교할 Property 키
7
+ */
8
+ static getGreatestObject(e: any[], key: string): any;
9
+ static removeDuplicate<T>(arr: T[]): T[];
10
+ static removeObjectDuplicate(arr: any[], key: string): any[];
11
+ static allValuesEqual<T>(...values: T[]): boolean;
12
+ }