@prestizni-software/server-dem 0.7.4 → 0.7.5

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 (517) hide show
  1. package/AutoUpdateClientManagerClass.d.ts +141 -0
  2. package/AutoUpdateClientManagerClass.js +656 -0
  3. package/AutoUpdateClientManagerClass.js.map +1 -0
  4. package/AutoUpdateManagerClass.d.ts +102 -0
  5. package/AutoUpdateManagerClass.js +117 -0
  6. package/AutoUpdateManagerClass.js.map +1 -0
  7. package/AutoUpdateServerManagerClass.d.ts +208 -0
  8. package/AutoUpdateServerManagerClass.js +913 -0
  9. package/AutoUpdateServerManagerClass.js.map +1 -0
  10. package/AutoUpdatedClientObjectClass.d.ts +215 -0
  11. package/AutoUpdatedClientObjectClass.js +911 -0
  12. package/AutoUpdatedClientObjectClass.js.map +1 -0
  13. package/AutoUpdatedServerObjectClass.d.ts +134 -0
  14. package/AutoUpdatedServerObjectClass.js +346 -0
  15. package/AutoUpdatedServerObjectClass.js.map +1 -0
  16. package/ClientTypes.d.ts +15 -0
  17. package/ClientTypes.js +52 -0
  18. package/ClientTypes.js.map +1 -0
  19. package/CommonTypes.d.ts +259 -0
  20. package/CommonTypes.js +233 -0
  21. package/CommonTypes.js.map +1 -0
  22. package/CommonTypes_server.d.ts +1 -0
  23. package/CommonTypes_server.js +2 -0
  24. package/CommonTypes_server.js.map +1 -0
  25. package/{dist/DEMErrors.js.map → DEMErrors.js.map} +1 -1
  26. package/ServerTypes.d.ts +16 -0
  27. package/ServerTypes.js +60 -0
  28. package/ServerTypes.js.map +1 -0
  29. package/client.d.ts +6 -0
  30. package/client.js +7 -0
  31. package/client.js.map +1 -0
  32. package/coverage/lcov-report/block-navigation.js +71 -0
  33. package/coverage/lcov-report/block-navigation.js.map +1 -0
  34. package/coverage/lcov-report/prettify.js +478 -0
  35. package/coverage/lcov-report/prettify.js.map +1 -0
  36. package/coverage/lcov-report/sorter.js +177 -0
  37. package/coverage/lcov-report/sorter.js.map +1 -0
  38. package/dist/AutoUpdateClientManagerClass.d.ts +20 -0
  39. package/dist/AutoUpdateClientManagerClass.js +283 -0
  40. package/dist/AutoUpdateClientManagerClass.js.map +1 -0
  41. package/dist/AutoUpdateManagerClass.d.ts +17 -96
  42. package/dist/AutoUpdateManagerClass.js +15 -73
  43. package/dist/AutoUpdateManagerClass.js.map +1 -1
  44. package/dist/AutoUpdateServerManagerClass.d.ts +18 -207
  45. package/dist/AutoUpdateServerManagerClass.js +198 -680
  46. package/dist/AutoUpdateServerManagerClass.js.map +1 -1
  47. package/dist/AutoUpdatedClientObjectClass.d.ts +63 -206
  48. package/dist/AutoUpdatedClientObjectClass.js +660 -707
  49. package/dist/AutoUpdatedClientObjectClass.js.map +1 -1
  50. package/dist/AutoUpdatedServerObjectClass.d.ts +13 -126
  51. package/dist/AutoUpdatedServerObjectClass.js +92 -315
  52. package/dist/AutoUpdatedServerObjectClass.js.map +1 -1
  53. package/dist/ClientTypes.d.ts +13 -0
  54. package/dist/ClientTypes.js +70 -0
  55. package/dist/ClientTypes.js.map +1 -0
  56. package/dist/CommonTypes.d.ts +3 -266
  57. package/dist/CommonTypes.js +4 -234
  58. package/dist/CommonTypes.js.map +1 -1
  59. package/dist/CommonTypes_server.d.ts +1 -1
  60. package/dist/CommonTypes_server.js +2 -1
  61. package/dist/CommonTypes_server.js.map +1 -1
  62. package/dist/ServerTypes.d.ts +13 -0
  63. package/dist/ServerTypes.js +78 -0
  64. package/dist/ServerTypes.js.map +1 -0
  65. package/dist/TestTypes.d.ts +1 -0
  66. package/dist/TestTypes.js +7 -0
  67. package/dist/TestTypes.js.map +1 -0
  68. package/dist/client.d.ts +1 -0
  69. package/dist/client.js +12 -0
  70. package/dist/client.js.map +1 -0
  71. package/dist/coverage/lcov-report/block-navigation.d.ts +1 -0
  72. package/dist/coverage/lcov-report/block-navigation.js +71 -0
  73. package/dist/coverage/lcov-report/block-navigation.js.map +1 -0
  74. package/dist/coverage/lcov-report/prettify.d.ts +0 -0
  75. package/dist/coverage/lcov-report/prettify.js +736 -0
  76. package/dist/coverage/lcov-report/prettify.js.map +1 -0
  77. package/dist/coverage/lcov-report/sorter.d.ts +1 -0
  78. package/dist/coverage/lcov-report/sorter.js +177 -0
  79. package/dist/coverage/lcov-report/sorter.js.map +1 -0
  80. package/dist/dist/AutoUpdateClientManagerClass.d.ts +19 -0
  81. package/dist/dist/AutoUpdateClientManagerClass.js +284 -0
  82. package/dist/dist/AutoUpdateClientManagerClass.js.map +1 -0
  83. package/dist/dist/AutoUpdateManagerClass.d.ts +23 -0
  84. package/dist/dist/AutoUpdateManagerClass.js +60 -0
  85. package/dist/dist/AutoUpdateManagerClass.js.map +1 -0
  86. package/dist/dist/AutoUpdateServerManagerClass.d.ts +50 -0
  87. package/dist/dist/AutoUpdateServerManagerClass.js +413 -0
  88. package/dist/dist/AutoUpdateServerManagerClass.js.map +1 -0
  89. package/dist/dist/AutoUpdatedClientObjectClass.d.ts +72 -0
  90. package/dist/dist/AutoUpdatedClientObjectClass.js +865 -0
  91. package/dist/dist/AutoUpdatedClientObjectClass.js.map +1 -0
  92. package/dist/dist/AutoUpdatedServerObjectClass.d.ts +15 -0
  93. package/dist/dist/AutoUpdatedServerObjectClass.js +124 -0
  94. package/dist/dist/AutoUpdatedServerObjectClass.js.map +1 -0
  95. package/dist/dist/ClientTypes.d.ts +13 -0
  96. package/dist/dist/ClientTypes.js +71 -0
  97. package/dist/dist/ClientTypes.js.map +1 -0
  98. package/dist/dist/CommonTypes.d.ts +3 -0
  99. package/dist/dist/CommonTypes.js +20 -0
  100. package/dist/dist/CommonTypes.js.map +1 -0
  101. package/dist/dist/CommonTypes_server.d.ts +1 -0
  102. package/dist/dist/CommonTypes_server.js +4 -0
  103. package/dist/dist/CommonTypes_server.js.map +1 -0
  104. package/dist/dist/ServerTypes.d.ts +13 -0
  105. package/dist/dist/ServerTypes.js +79 -0
  106. package/dist/dist/ServerTypes.js.map +1 -0
  107. package/dist/dist/TestTypes.d.ts +1 -0
  108. package/dist/dist/TestTypes.js +8 -0
  109. package/dist/dist/TestTypes.js.map +1 -0
  110. package/dist/dist/client.d.ts +1 -0
  111. package/dist/dist/client.js +13 -0
  112. package/dist/dist/client.js.map +1 -0
  113. package/dist/dist/coverage/lcov-report/block-navigation.d.ts +1 -0
  114. package/dist/dist/coverage/lcov-report/block-navigation.js +71 -0
  115. package/dist/dist/coverage/lcov-report/block-navigation.js.map +1 -0
  116. package/dist/dist/coverage/lcov-report/prettify.d.ts +0 -0
  117. package/dist/dist/coverage/lcov-report/prettify.js +736 -0
  118. package/dist/dist/coverage/lcov-report/prettify.js.map +1 -0
  119. package/dist/dist/coverage/lcov-report/sorter.d.ts +1 -0
  120. package/dist/dist/coverage/lcov-report/sorter.js +177 -0
  121. package/dist/dist/coverage/lcov-report/sorter.js.map +1 -0
  122. package/dist/dist/dist/AutoUpdateClientManagerClass.d.ts +19 -0
  123. package/dist/dist/dist/AutoUpdateClientManagerClass.js +285 -0
  124. package/dist/dist/dist/AutoUpdateClientManagerClass.js.map +1 -0
  125. package/dist/dist/dist/AutoUpdateManagerClass.d.ts +23 -0
  126. package/dist/dist/dist/AutoUpdateManagerClass.js +61 -0
  127. package/dist/dist/dist/AutoUpdateManagerClass.js.map +1 -0
  128. package/dist/dist/dist/AutoUpdateServerManagerClass.d.ts +158 -0
  129. package/dist/dist/dist/AutoUpdateServerManagerClass.js +414 -0
  130. package/dist/dist/dist/AutoUpdateServerManagerClass.js.map +1 -0
  131. package/dist/dist/dist/AutoUpdatedClientObjectClass.d.ts +72 -0
  132. package/dist/dist/dist/AutoUpdatedClientObjectClass.js +866 -0
  133. package/dist/dist/dist/AutoUpdatedClientObjectClass.js.map +1 -0
  134. package/dist/dist/dist/AutoUpdatedServerObjectClass.d.ts +15 -0
  135. package/dist/dist/dist/AutoUpdatedServerObjectClass.js +125 -0
  136. package/dist/dist/dist/AutoUpdatedServerObjectClass.js.map +1 -0
  137. package/dist/dist/dist/ClientTypes.d.ts +13 -0
  138. package/dist/dist/dist/ClientTypes.js +72 -0
  139. package/dist/dist/dist/ClientTypes.js.map +1 -0
  140. package/dist/dist/dist/CommonTypes.d.ts +3 -0
  141. package/dist/dist/dist/CommonTypes.js +21 -0
  142. package/dist/dist/dist/CommonTypes.js.map +1 -0
  143. package/dist/dist/dist/CommonTypes_server.d.ts +1 -0
  144. package/dist/dist/dist/CommonTypes_server.js +5 -0
  145. package/dist/dist/dist/CommonTypes_server.js.map +1 -0
  146. package/dist/dist/dist/ServerTypes.d.ts +13 -0
  147. package/dist/dist/dist/ServerTypes.js +80 -0
  148. package/dist/dist/dist/ServerTypes.js.map +1 -0
  149. package/dist/dist/dist/TestTypes.d.ts +1 -0
  150. package/dist/dist/dist/TestTypes.js +9 -0
  151. package/dist/dist/dist/TestTypes.js.map +1 -0
  152. package/dist/dist/dist/client.d.ts +1 -0
  153. package/dist/dist/dist/client.js +14 -0
  154. package/dist/dist/dist/client.js.map +1 -0
  155. package/dist/dist/dist/coverage/lcov-report/block-navigation.d.ts +1 -0
  156. package/dist/dist/dist/coverage/lcov-report/block-navigation.js +71 -0
  157. package/dist/dist/dist/coverage/lcov-report/block-navigation.js.map +1 -0
  158. package/dist/dist/dist/coverage/lcov-report/prettify.d.ts +0 -0
  159. package/dist/dist/dist/coverage/lcov-report/prettify.js +736 -0
  160. package/dist/dist/dist/coverage/lcov-report/prettify.js.map +1 -0
  161. package/dist/dist/dist/coverage/lcov-report/sorter.d.ts +1 -0
  162. package/dist/dist/dist/coverage/lcov-report/sorter.js +177 -0
  163. package/dist/dist/dist/coverage/lcov-report/sorter.js.map +1 -0
  164. package/dist/dist/dist/expo-test/app/(tabs)/_layout.d.ts +1 -0
  165. package/dist/dist/dist/expo-test/app/(tabs)/_layout.js +27 -0
  166. package/dist/dist/dist/expo-test/app/(tabs)/_layout.js.map +1 -0
  167. package/dist/dist/dist/expo-test/app/(tabs)/explore.d.ts +1 -0
  168. package/dist/dist/dist/expo-test/app/(tabs)/explore.js +95 -0
  169. package/dist/dist/dist/expo-test/app/(tabs)/explore.js.map +1 -0
  170. package/dist/dist/dist/expo-test/app/(tabs)/index.d.ts +1 -0
  171. package/dist/dist/dist/expo-test/app/(tabs)/index.js +81 -0
  172. package/dist/dist/dist/expo-test/app/(tabs)/index.js.map +1 -0
  173. package/dist/dist/dist/expo-test/app/_layout.d.ts +4 -0
  174. package/dist/dist/dist/expo-test/app/_layout.js +22 -0
  175. package/dist/dist/dist/expo-test/app/_layout.js.map +1 -0
  176. package/dist/dist/dist/expo-test/app/modal.d.ts +1 -0
  177. package/dist/dist/dist/expo-test/app/modal.js +28 -0
  178. package/dist/dist/dist/expo-test/app/modal.js.map +1 -0
  179. package/dist/dist/dist/expo-test/components/external-link.d.ts +4 -0
  180. package/dist/dist/dist/expo-test/components/external-link.js +18 -0
  181. package/dist/dist/dist/expo-test/components/external-link.js.map +1 -0
  182. package/dist/dist/dist/expo-test/components/haptic-tab.d.ts +1 -0
  183. package/dist/dist/dist/expo-test/components/haptic-tab.js +15 -0
  184. package/dist/dist/dist/expo-test/components/haptic-tab.js.map +1 -0
  185. package/dist/dist/dist/expo-test/components/hello-wave.d.ts +1 -0
  186. package/dist/dist/dist/expo-test/components/hello-wave.js +19 -0
  187. package/dist/dist/dist/expo-test/components/hello-wave.js.map +1 -0
  188. package/dist/dist/dist/expo-test/components/parallax-scroll-view.d.ts +5 -0
  189. package/dist/dist/dist/expo-test/components/parallax-scroll-view.js +53 -0
  190. package/dist/dist/dist/expo-test/components/parallax-scroll-view.js.map +1 -0
  191. package/dist/dist/dist/expo-test/components/themed-text.d.ts +7 -0
  192. package/dist/dist/dist/expo-test/components/themed-text.js +43 -0
  193. package/dist/dist/dist/expo-test/components/themed-text.js.map +1 -0
  194. package/dist/dist/dist/expo-test/components/themed-view.d.ts +6 -0
  195. package/dist/dist/dist/expo-test/components/themed-view.js +10 -0
  196. package/dist/dist/dist/expo-test/components/themed-view.js.map +1 -0
  197. package/dist/dist/dist/expo-test/components/ui/collapsible.d.ts +4 -0
  198. package/dist/dist/dist/expo-test/components/ui/collapsible.js +34 -0
  199. package/dist/dist/dist/expo-test/components/ui/collapsible.js.map +1 -0
  200. package/dist/dist/dist/expo-test/components/ui/icon-symbol.d.ts +11 -0
  201. package/dist/dist/dist/expo-test/components/ui/icon-symbol.ios.d.ts +7 -0
  202. package/dist/dist/dist/expo-test/components/ui/icon-symbol.ios.js +14 -0
  203. package/dist/dist/dist/expo-test/components/ui/icon-symbol.ios.js.map +1 -0
  204. package/dist/dist/dist/expo-test/components/ui/icon-symbol.js +25 -0
  205. package/dist/dist/dist/expo-test/components/ui/icon-symbol.js.map +1 -0
  206. package/dist/dist/dist/expo-test/constants/theme.d.ts +26 -0
  207. package/dist/dist/dist/expo-test/constants/theme.js +53 -0
  208. package/dist/dist/dist/expo-test/constants/theme.js.map +1 -0
  209. package/dist/dist/dist/expo-test/eslint.config.d.ts +2 -0
  210. package/dist/dist/dist/expo-test/eslint.config.js +11 -0
  211. package/dist/dist/dist/expo-test/eslint.config.js.map +1 -0
  212. package/dist/dist/dist/expo-test/hooks/use-color-scheme.d.ts +1 -0
  213. package/dist/dist/dist/expo-test/hooks/use-color-scheme.js +5 -0
  214. package/dist/dist/dist/expo-test/hooks/use-color-scheme.js.map +1 -0
  215. package/dist/dist/dist/expo-test/hooks/use-color-scheme.web.d.ts +4 -0
  216. package/dist/dist/dist/expo-test/hooks/use-color-scheme.web.js +20 -0
  217. package/dist/dist/dist/expo-test/hooks/use-color-scheme.web.js.map +1 -0
  218. package/dist/dist/dist/expo-test/hooks/use-theme-color.d.ts +1 -0
  219. package/dist/dist/dist/expo-test/hooks/use-theme-color.js +20 -0
  220. package/dist/dist/dist/expo-test/hooks/use-theme-color.js.map +1 -0
  221. package/dist/dist/dist/expo-test/scripts/reset-project.d.ts +2 -0
  222. package/dist/dist/dist/expo-test/scripts/reset-project.js +98 -0
  223. package/dist/dist/dist/expo-test/scripts/reset-project.js.map +1 -0
  224. package/dist/dist/dist/jest.config.d.ts +21 -0
  225. package/dist/dist/dist/jest.config.js +20 -0
  226. package/dist/dist/dist/jest.config.js.map +1 -0
  227. package/dist/dist/dist/server.d.ts +1 -0
  228. package/dist/dist/dist/server.js +16 -0
  229. package/dist/dist/dist/server.js.map +1 -0
  230. package/dist/dist/dist/socket_test.d.ts +1 -0
  231. package/dist/dist/dist/socket_test.js +24 -0
  232. package/dist/dist/dist/socket_test.js.map +1 -0
  233. package/dist/dist/dist/test.d.ts +1 -0
  234. package/dist/dist/dist/test.js +7 -0
  235. package/dist/dist/dist/test.js.map +1 -0
  236. package/dist/dist/dist/test_client.d.ts +1 -0
  237. package/dist/dist/dist/test_client.js +26 -0
  238. package/dist/dist/dist/test_client.js.map +1 -0
  239. package/dist/dist/dist/test_lib.d.ts +2 -0
  240. package/dist/dist/dist/test_lib.js +85 -0
  241. package/dist/dist/dist/test_lib.js.map +1 -0
  242. package/dist/dist/dist/test_server.d.ts +1 -0
  243. package/dist/dist/dist/test_server.js +54 -0
  244. package/dist/dist/dist/test_server.js.map +1 -0
  245. package/dist/dist/dist/tests/dem.test.d.ts +1 -0
  246. package/dist/dist/dist/tests/dem.test.js +341 -0
  247. package/dist/dist/dist/tests/dem.test.js.map +1 -0
  248. package/dist/dist/expo-test/app/(tabs)/_layout.d.ts +1 -0
  249. package/dist/dist/expo-test/app/(tabs)/_layout.js +26 -0
  250. package/dist/dist/expo-test/app/(tabs)/_layout.js.map +1 -0
  251. package/dist/dist/expo-test/app/(tabs)/explore.d.ts +1 -0
  252. package/dist/dist/expo-test/app/(tabs)/explore.js +94 -0
  253. package/dist/dist/expo-test/app/(tabs)/explore.js.map +1 -0
  254. package/dist/dist/expo-test/app/(tabs)/index.d.ts +1 -0
  255. package/dist/dist/expo-test/app/(tabs)/index.js +80 -0
  256. package/dist/dist/expo-test/app/(tabs)/index.js.map +1 -0
  257. package/dist/dist/expo-test/app/_layout.d.ts +4 -0
  258. package/dist/dist/expo-test/app/_layout.js +21 -0
  259. package/dist/dist/expo-test/app/_layout.js.map +1 -0
  260. package/dist/dist/expo-test/app/modal.d.ts +1 -0
  261. package/dist/dist/expo-test/app/modal.js +27 -0
  262. package/dist/dist/expo-test/app/modal.js.map +1 -0
  263. package/dist/dist/expo-test/components/external-link.d.ts +4 -0
  264. package/dist/dist/expo-test/components/external-link.js +17 -0
  265. package/dist/dist/expo-test/components/external-link.js.map +1 -0
  266. package/dist/dist/expo-test/components/haptic-tab.d.ts +1 -0
  267. package/dist/dist/expo-test/components/haptic-tab.js +14 -0
  268. package/dist/dist/expo-test/components/haptic-tab.js.map +1 -0
  269. package/dist/dist/expo-test/components/hello-wave.d.ts +1 -0
  270. package/dist/dist/expo-test/components/hello-wave.js +18 -0
  271. package/dist/dist/expo-test/components/hello-wave.js.map +1 -0
  272. package/dist/dist/expo-test/components/parallax-scroll-view.d.ts +5 -0
  273. package/dist/dist/expo-test/components/parallax-scroll-view.js +52 -0
  274. package/dist/dist/expo-test/components/parallax-scroll-view.js.map +1 -0
  275. package/dist/dist/expo-test/components/themed-text.d.ts +7 -0
  276. package/dist/dist/expo-test/components/themed-text.js +42 -0
  277. package/dist/dist/expo-test/components/themed-text.js.map +1 -0
  278. package/dist/dist/expo-test/components/themed-view.d.ts +6 -0
  279. package/dist/dist/expo-test/components/themed-view.js +9 -0
  280. package/dist/dist/expo-test/components/themed-view.js.map +1 -0
  281. package/dist/dist/expo-test/components/ui/collapsible.d.ts +4 -0
  282. package/dist/dist/expo-test/components/ui/collapsible.js +33 -0
  283. package/dist/dist/expo-test/components/ui/collapsible.js.map +1 -0
  284. package/dist/dist/expo-test/components/ui/icon-symbol.d.ts +11 -0
  285. package/dist/dist/expo-test/components/ui/icon-symbol.ios.d.ts +7 -0
  286. package/dist/dist/expo-test/components/ui/icon-symbol.ios.js +13 -0
  287. package/dist/dist/expo-test/components/ui/icon-symbol.ios.js.map +1 -0
  288. package/dist/dist/expo-test/components/ui/icon-symbol.js +24 -0
  289. package/dist/dist/expo-test/components/ui/icon-symbol.js.map +1 -0
  290. package/dist/dist/expo-test/constants/theme.d.ts +26 -0
  291. package/dist/dist/expo-test/constants/theme.js +52 -0
  292. package/dist/dist/expo-test/constants/theme.js.map +1 -0
  293. package/dist/dist/expo-test/eslint.config.d.ts +2 -0
  294. package/dist/dist/expo-test/eslint.config.js +11 -0
  295. package/dist/dist/expo-test/eslint.config.js.map +1 -0
  296. package/dist/dist/expo-test/hooks/use-color-scheme.d.ts +1 -0
  297. package/dist/dist/expo-test/hooks/use-color-scheme.js +4 -0
  298. package/dist/dist/expo-test/hooks/use-color-scheme.js.map +1 -0
  299. package/dist/dist/expo-test/hooks/use-color-scheme.web.d.ts +4 -0
  300. package/dist/dist/expo-test/hooks/use-color-scheme.web.js +19 -0
  301. package/dist/dist/expo-test/hooks/use-color-scheme.web.js.map +1 -0
  302. package/dist/dist/expo-test/hooks/use-theme-color.d.ts +1 -0
  303. package/dist/dist/expo-test/hooks/use-theme-color.js +19 -0
  304. package/dist/dist/expo-test/hooks/use-theme-color.js.map +1 -0
  305. package/dist/dist/expo-test/scripts/reset-project.d.ts +2 -0
  306. package/dist/dist/expo-test/scripts/reset-project.js +98 -0
  307. package/dist/dist/expo-test/scripts/reset-project.js.map +1 -0
  308. package/dist/dist/jest.config.d.ts +21 -0
  309. package/dist/dist/jest.config.js +19 -0
  310. package/dist/dist/jest.config.js.map +1 -0
  311. package/dist/dist/server.d.ts +1 -0
  312. package/dist/dist/server.js +15 -0
  313. package/dist/dist/server.js.map +1 -0
  314. package/dist/dist/socket_test.d.ts +1 -0
  315. package/dist/dist/socket_test.js +23 -0
  316. package/dist/dist/socket_test.js.map +1 -0
  317. package/dist/dist/test.d.ts +1 -0
  318. package/dist/dist/test.js +6 -0
  319. package/dist/dist/test.js.map +1 -0
  320. package/dist/dist/test_client.d.ts +1 -0
  321. package/dist/dist/test_client.js +25 -0
  322. package/dist/dist/test_client.js.map +1 -0
  323. package/dist/dist/test_lib.d.ts +2 -0
  324. package/dist/dist/test_lib.js +84 -0
  325. package/dist/dist/test_lib.js.map +1 -0
  326. package/dist/dist/test_server.d.ts +1 -0
  327. package/dist/dist/test_server.js +53 -0
  328. package/dist/dist/test_server.js.map +1 -0
  329. package/dist/dist/tests/dem.test.d.ts +1 -0
  330. package/dist/dist/tests/dem.test.js +340 -0
  331. package/dist/dist/tests/dem.test.js.map +1 -0
  332. package/dist/expo-test/app/(tabs)/_layout.d.ts +1 -0
  333. package/dist/expo-test/app/(tabs)/_layout.js +25 -0
  334. package/dist/expo-test/app/(tabs)/_layout.js.map +1 -0
  335. package/dist/expo-test/app/(tabs)/explore.d.ts +1 -0
  336. package/dist/expo-test/app/(tabs)/explore.js +93 -0
  337. package/dist/expo-test/app/(tabs)/explore.js.map +1 -0
  338. package/dist/expo-test/app/(tabs)/index.d.ts +1 -0
  339. package/dist/expo-test/app/(tabs)/index.js +79 -0
  340. package/dist/expo-test/app/(tabs)/index.js.map +1 -0
  341. package/dist/expo-test/app/_layout.d.ts +4 -0
  342. package/dist/expo-test/app/_layout.js +20 -0
  343. package/dist/expo-test/app/_layout.js.map +1 -0
  344. package/dist/expo-test/app/modal.d.ts +1 -0
  345. package/dist/expo-test/app/modal.js +26 -0
  346. package/dist/expo-test/app/modal.js.map +1 -0
  347. package/dist/expo-test/components/external-link.d.ts +4 -0
  348. package/dist/expo-test/components/external-link.js +16 -0
  349. package/dist/expo-test/components/external-link.js.map +1 -0
  350. package/dist/expo-test/components/haptic-tab.d.ts +1 -0
  351. package/dist/expo-test/components/haptic-tab.js +13 -0
  352. package/dist/expo-test/components/haptic-tab.js.map +1 -0
  353. package/dist/expo-test/components/hello-wave.d.ts +1 -0
  354. package/dist/expo-test/components/hello-wave.js +17 -0
  355. package/dist/expo-test/components/hello-wave.js.map +1 -0
  356. package/dist/expo-test/components/parallax-scroll-view.d.ts +5 -0
  357. package/dist/expo-test/components/parallax-scroll-view.js +51 -0
  358. package/dist/expo-test/components/parallax-scroll-view.js.map +1 -0
  359. package/dist/expo-test/components/themed-text.d.ts +7 -0
  360. package/dist/expo-test/components/themed-text.js +41 -0
  361. package/dist/expo-test/components/themed-text.js.map +1 -0
  362. package/dist/expo-test/components/themed-view.d.ts +6 -0
  363. package/dist/expo-test/components/themed-view.js +8 -0
  364. package/dist/expo-test/components/themed-view.js.map +1 -0
  365. package/dist/expo-test/components/ui/collapsible.d.ts +4 -0
  366. package/dist/expo-test/components/ui/collapsible.js +32 -0
  367. package/dist/expo-test/components/ui/collapsible.js.map +1 -0
  368. package/dist/expo-test/components/ui/icon-symbol.d.ts +11 -0
  369. package/dist/expo-test/components/ui/icon-symbol.ios.d.ts +7 -0
  370. package/dist/expo-test/components/ui/icon-symbol.ios.js +12 -0
  371. package/dist/expo-test/components/ui/icon-symbol.ios.js.map +1 -0
  372. package/dist/expo-test/components/ui/icon-symbol.js +23 -0
  373. package/dist/expo-test/components/ui/icon-symbol.js.map +1 -0
  374. package/dist/expo-test/constants/theme.d.ts +26 -0
  375. package/dist/expo-test/constants/theme.js +51 -0
  376. package/dist/expo-test/constants/theme.js.map +1 -0
  377. package/dist/expo-test/eslint.config.d.ts +2 -0
  378. package/dist/expo-test/eslint.config.js +11 -0
  379. package/dist/expo-test/eslint.config.js.map +1 -0
  380. package/dist/expo-test/hooks/use-color-scheme.d.ts +1 -0
  381. package/dist/expo-test/hooks/use-color-scheme.js +3 -0
  382. package/dist/expo-test/hooks/use-color-scheme.js.map +1 -0
  383. package/dist/expo-test/hooks/use-color-scheme.web.d.ts +4 -0
  384. package/dist/expo-test/hooks/use-color-scheme.web.js +18 -0
  385. package/dist/expo-test/hooks/use-color-scheme.web.js.map +1 -0
  386. package/dist/expo-test/hooks/use-theme-color.d.ts +1 -0
  387. package/dist/expo-test/hooks/use-theme-color.js +18 -0
  388. package/dist/expo-test/hooks/use-theme-color.js.map +1 -0
  389. package/dist/expo-test/scripts/reset-project.d.ts +2 -0
  390. package/dist/expo-test/scripts/reset-project.js +98 -0
  391. package/dist/expo-test/scripts/reset-project.js.map +1 -0
  392. package/dist/jest.config.d.ts +21 -0
  393. package/dist/jest.config.js +18 -0
  394. package/dist/jest.config.js.map +1 -0
  395. package/dist/server.d.ts +1 -8
  396. package/dist/server.js +13 -8
  397. package/dist/server.js.map +1 -1
  398. package/dist/socket_test.d.ts +1 -0
  399. package/dist/socket_test.js +22 -0
  400. package/dist/socket_test.js.map +1 -0
  401. package/dist/test.d.ts +1 -0
  402. package/dist/test.js +5 -0
  403. package/dist/test.js.map +1 -0
  404. package/dist/test_client.d.ts +1 -0
  405. package/dist/test_client.js +24 -0
  406. package/dist/test_client.js.map +1 -0
  407. package/dist/test_lib.d.ts +12 -0
  408. package/dist/test_lib.js +83 -0
  409. package/dist/test_lib.js.map +1 -0
  410. package/dist/test_server.d.ts +1 -0
  411. package/dist/test_server.js +52 -0
  412. package/dist/test_server.js.map +1 -0
  413. package/dist/tests/dem.test.d.ts +1 -0
  414. package/dist/tests/dem.test.js +339 -0
  415. package/dist/tests/dem.test.js.map +1 -0
  416. package/expo-test/app/(tabs)/_layout.d.ts +2 -0
  417. package/expo-test/app/(tabs)/_layout.js +24 -0
  418. package/expo-test/app/(tabs)/_layout.js.map +1 -0
  419. package/expo-test/app/(tabs)/explore.d.ts +1 -0
  420. package/expo-test/app/(tabs)/explore.js +92 -0
  421. package/expo-test/app/(tabs)/explore.js.map +1 -0
  422. package/expo-test/app/(tabs)/index.d.ts +1 -0
  423. package/expo-test/app/(tabs)/index.js +78 -0
  424. package/expo-test/app/(tabs)/index.js.map +1 -0
  425. package/expo-test/app/_layout.d.ts +5 -0
  426. package/expo-test/app/_layout.js +19 -0
  427. package/expo-test/app/_layout.js.map +1 -0
  428. package/expo-test/app/modal.d.ts +1 -0
  429. package/expo-test/app/modal.js +25 -0
  430. package/expo-test/app/modal.js.map +1 -0
  431. package/expo-test/components/external-link.d.ts +7 -0
  432. package/expo-test/components/external-link.js +15 -0
  433. package/expo-test/components/external-link.js.map +1 -0
  434. package/expo-test/components/haptic-tab.d.ts +2 -0
  435. package/expo-test/components/haptic-tab.js +12 -0
  436. package/expo-test/components/haptic-tab.js.map +1 -0
  437. package/expo-test/components/hello-wave.d.ts +1 -0
  438. package/expo-test/components/hello-wave.js +16 -0
  439. package/expo-test/components/hello-wave.js.map +1 -0
  440. package/expo-test/components/parallax-scroll-view.d.ts +10 -0
  441. package/expo-test/components/parallax-scroll-view.js +50 -0
  442. package/expo-test/components/parallax-scroll-view.js.map +1 -0
  443. package/expo-test/components/themed-text.d.ts +7 -0
  444. package/expo-test/components/themed-text.js +40 -0
  445. package/expo-test/components/themed-text.js.map +1 -0
  446. package/expo-test/components/themed-view.d.ts +6 -0
  447. package/expo-test/components/themed-view.js +7 -0
  448. package/expo-test/components/themed-view.js.map +1 -0
  449. package/expo-test/components/ui/collapsible.d.ts +4 -0
  450. package/expo-test/components/ui/collapsible.js +31 -0
  451. package/expo-test/components/ui/collapsible.js.map +1 -0
  452. package/expo-test/components/ui/icon-symbol.d.ts +25 -0
  453. package/expo-test/components/ui/icon-symbol.ios.d.ts +9 -0
  454. package/expo-test/components/ui/icon-symbol.ios.js +11 -0
  455. package/expo-test/components/ui/icon-symbol.ios.js.map +1 -0
  456. package/expo-test/components/ui/icon-symbol.js +22 -0
  457. package/expo-test/components/ui/icon-symbol.js.map +1 -0
  458. package/expo-test/constants/theme.d.ts +32 -0
  459. package/expo-test/constants/theme.js +50 -0
  460. package/expo-test/constants/theme.js.map +1 -0
  461. package/expo-test/eslint.config.d.ts +2 -0
  462. package/expo-test/eslint.config.js +11 -0
  463. package/expo-test/eslint.config.js.map +1 -0
  464. package/expo-test/hooks/use-color-scheme.d.ts +1 -0
  465. package/expo-test/hooks/use-color-scheme.js +2 -0
  466. package/expo-test/hooks/use-color-scheme.js.map +1 -0
  467. package/expo-test/hooks/use-color-scheme.web.d.ts +4 -0
  468. package/expo-test/hooks/use-color-scheme.web.js +17 -0
  469. package/expo-test/hooks/use-color-scheme.web.js.map +1 -0
  470. package/expo-test/hooks/use-theme-color.d.ts +9 -0
  471. package/expo-test/hooks/use-theme-color.js +17 -0
  472. package/expo-test/hooks/use-theme-color.js.map +1 -0
  473. package/expo-test/scripts/reset-project.d.ts +2 -0
  474. package/expo-test/scripts/reset-project.js +98 -0
  475. package/expo-test/scripts/reset-project.js.map +1 -0
  476. package/index.d.ts +4 -0
  477. package/index.js +5 -0
  478. package/index.js.map +1 -0
  479. package/jest.config.d.ts +3 -0
  480. package/jest.config.js +17 -0
  481. package/jest.config.js.map +1 -0
  482. package/package.json +23 -42
  483. package/server.d.ts +8 -0
  484. package/server.js +9 -0
  485. package/server.js.map +1 -0
  486. package/sync/ServerChangeTracker.js.map +1 -0
  487. package/version.d.ts +21 -0
  488. package/version.js +22 -0
  489. package/version.js.map +1 -0
  490. package/README.md +0 -18
  491. package/dist/sync/ServerChangeTracker.js.map +0 -1
  492. package/dist/tsconfig.tsbuildinfo +0 -1
  493. /package/{dist/DEMErrors.d.ts → DEMErrors.d.ts} +0 -0
  494. /package/{dist/DEMErrors.js → DEMErrors.js} +0 -0
  495. /package/{dist/sync → sync}/ClientStateReconciler.d.ts +0 -0
  496. /package/{dist/sync → sync}/ClientStateReconciler.js +0 -0
  497. /package/{dist/sync → sync}/ClientStateReconciler.js.map +0 -0
  498. /package/{dist/sync → sync}/ServerChangeTracker.d.ts +0 -0
  499. /package/{dist/sync → sync}/ServerChangeTracker.js +0 -0
  500. /package/{dist/sync → sync}/index.d.ts +0 -0
  501. /package/{dist/sync → sync}/index.js +0 -0
  502. /package/{dist/sync → sync}/index.js.map +0 -0
  503. /package/{dist/sync → sync}/storage/IClientStorageAdapter.d.ts +0 -0
  504. /package/{dist/sync → sync}/storage/IClientStorageAdapter.js +0 -0
  505. /package/{dist/sync → sync}/storage/IClientStorageAdapter.js.map +0 -0
  506. /package/{dist/sync → sync}/storage/IndexedDbStorageAdapter.d.ts +0 -0
  507. /package/{dist/sync → sync}/storage/IndexedDbStorageAdapter.js +0 -0
  508. /package/{dist/sync → sync}/storage/IndexedDbStorageAdapter.js.map +0 -0
  509. /package/{dist/sync → sync}/storage/LocalStorageAdapter.d.ts +0 -0
  510. /package/{dist/sync → sync}/storage/LocalStorageAdapter.js +0 -0
  511. /package/{dist/sync → sync}/storage/LocalStorageAdapter.js.map +0 -0
  512. /package/{dist/sync → sync}/storage/MemoryStorageAdapter.d.ts +0 -0
  513. /package/{dist/sync → sync}/storage/MemoryStorageAdapter.js +0 -0
  514. /package/{dist/sync → sync}/storage/MemoryStorageAdapter.js.map +0 -0
  515. /package/{dist/sync → sync}/types.d.ts +0 -0
  516. /package/{dist/sync → sync}/types.js +0 -0
  517. /package/{dist/sync → sync}/types.js.map +0 -0
@@ -0,0 +1,913 @@
1
+ import { AutoUpdateManager } from "./AutoUpdateManagerClass.js";
2
+ import { createAutoUpdatedClass } from "./AutoUpdatedServerObjectClass.js";
3
+ import { globalCache, EVENT_NEW, EVENT_UPDATE, EVENT_DELETE, EVENT_GET, EVENT_STARTUP, EVENT_VERSION, DEM_VERSION, DEM_SERVER_VERSION, DEM_PROTOCOL_VERSION, safeStringify, verifyDEMVersion, DEMError, DEMErrorCode, toDEMError, } from "./CommonTypes.js";
4
+ import { EventEmitter } from "eventemitter3";
5
+ import { getModelForClass } from "@typegoose/typegoose";
6
+ import { ServerChangeTracker, } from "./sync/index.js";
7
+ export var DEMEventTypes;
8
+ (function (DEMEventTypes) {
9
+ DEMEventTypes["new"] = "new";
10
+ DEMEventTypes["update"] = "update";
11
+ DEMEventTypes["delete"] = "delete";
12
+ DEMEventTypes["get"] = "get";
13
+ DEMEventTypes["startup"] = "startup";
14
+ })(DEMEventTypes || (DEMEventTypes = {}));
15
+ /**
16
+ * Configures event whitelisting and permission middleware for the Socket.IO server.
17
+ *
18
+ * @param socket_server - Socket.IO server instance.
19
+ * @param loggers - Logging interfaces.
20
+ * @param managers - Registry of server managers.
21
+ * @param _models - Optional models registry.
22
+ */
23
+ function setupSocketMiddleware(socket_server, loggers, managers, _models) {
24
+ socket_server.use(async (socket, next) => {
25
+ socket.use((async (event, nextEvent) => {
26
+ if (event.length !== 3 ||
27
+ typeof event[0] !== "string" ||
28
+ typeof event[2] !== "function") {
29
+ loggers.warn?.("Invalid event: [" +
30
+ event
31
+ .map((e) => (typeof e === "object" ? "[object]" : String(e)))
32
+ .join("], [") +
33
+ "]");
34
+ return;
35
+ }
36
+ if (!socket
37
+ .eventNames()
38
+ .some((e) => e.toString() === event[0] ||
39
+ e.toString() === event[0].slice(0, -24))) {
40
+ loggers.warn?.("Undefined event: [" +
41
+ event
42
+ .map((e) => (typeof e === "object" ? "[object]" : String(e)))
43
+ .join("], [") +
44
+ "]");
45
+ event[2]({
46
+ success: false,
47
+ code: DEMErrorCode.UNDEFINED_EVENT,
48
+ message: "Undefined event, event: " + event[0] + " not found",
49
+ });
50
+ return;
51
+ }
52
+ try {
53
+ const e = event[0];
54
+ let demEvent;
55
+ const id = e.slice(-24);
56
+ switch (true) {
57
+ case e.startsWith(EVENT_NEW):
58
+ demEvent = {
59
+ type: DEMEventTypes.new,
60
+ manager: managers[e.replace(EVENT_NEW, "")],
61
+ data: event[1],
62
+ object: undefined,
63
+ };
64
+ break;
65
+ case e.startsWith(EVENT_UPDATE):
66
+ {
67
+ const manager = managers[e.replace(EVENT_UPDATE, "").replace(id, "")];
68
+ demEvent = {
69
+ type: DEMEventTypes.update,
70
+ manager: manager,
71
+ object: manager.getObject(id),
72
+ data: event[1],
73
+ };
74
+ }
75
+ break;
76
+ case e.startsWith(EVENT_DELETE):
77
+ {
78
+ const manager = managers[e.replace(EVENT_DELETE, "")];
79
+ const obj = manager.getObject(event[1]);
80
+ if (!obj) {
81
+ event[2]({
82
+ success: true,
83
+ message: "Object already deleted",
84
+ data: undefined,
85
+ });
86
+ return;
87
+ }
88
+ demEvent = {
89
+ type: DEMEventTypes.delete,
90
+ manager: manager,
91
+ object: obj,
92
+ data: undefined,
93
+ };
94
+ }
95
+ break;
96
+ case e.startsWith(EVENT_GET):
97
+ {
98
+ const manager = managers[e.replace(EVENT_GET, "").replace(id, "")];
99
+ demEvent = {
100
+ type: DEMEventTypes.get,
101
+ manager: manager,
102
+ object: manager.getObject(id),
103
+ data: undefined,
104
+ };
105
+ }
106
+ break;
107
+ case e.startsWith(EVENT_STARTUP):
108
+ demEvent = {
109
+ type: DEMEventTypes.startup,
110
+ manager: managers[e.replace(EVENT_STARTUP, "")],
111
+ object: undefined,
112
+ data: undefined,
113
+ };
114
+ break;
115
+ default:
116
+ throw new DEMError(DEMErrorCode.UNKNOWN_EVENT, "Unknown event: " +
117
+ e +
118
+ " - known events: [" +
119
+ Object.values(DEMEventTypes).join(", ") +
120
+ "]");
121
+ }
122
+ try {
123
+ await demEvent.manager.options?.accessDefinitions?.eventMiddleware?.(demEvent, managers, socket);
124
+ nextEvent();
125
+ }
126
+ catch (error) {
127
+ loggers.warn?.("Someone got access denied:\nUser (" +
128
+ safeStringify(socket.handshake.auth) +
129
+ ")\nWith ID: '" +
130
+ socket.id +
131
+ "'\nFrom: '" +
132
+ socket.handshake.address +
133
+ "'\nTo the event: '" +
134
+ event[0] +
135
+ "'\nFor: '" +
136
+ (error instanceof Error ? error.message : String(error)) +
137
+ "'");
138
+ event[2]({
139
+ success: false,
140
+ code: DEMErrorCode.ACCESS_DENIED,
141
+ message: "You were denied access to this event '" +
142
+ event[0] +
143
+ "' by the server.\n" +
144
+ (error instanceof Error ? error.message : String(error)),
145
+ });
146
+ }
147
+ }
148
+ catch (error) {
149
+ const demErr = toDEMError(error, DEMErrorCode.INTERNAL_ERROR);
150
+ loggers.error?.("Error with event: " +
151
+ event[0] +
152
+ "\nError: " +
153
+ demErr.message);
154
+ event[2]({
155
+ success: false,
156
+ code: demErr.code,
157
+ message: error instanceof Error ? error.message : String(error),
158
+ });
159
+ return;
160
+ }
161
+ }));
162
+ next();
163
+ });
164
+ }
165
+ /**
166
+ * Inspects database readiness states across all configured server managers.
167
+ *
168
+ * @param managers - Registry of server managers to inspect.
169
+ * @param loggers - Optional logger callbacks.
170
+ * @param emitter - Optional event emitter for error events.
171
+ * @throws {DEMError} Throws DEMErrorCode.DB_NOT_CONNECTED if any database is disconnected.
172
+ */
173
+ export function checkServerDbStates(managers, loggers, emitter) {
174
+ for (const [key, manager] of Object.entries(managers)) {
175
+ if (!manager)
176
+ continue;
177
+ const status = manager.checkDbState();
178
+ if (!status.connected) {
179
+ const err = new DEMError(DEMErrorCode.DB_NOT_CONNECTED, `Server DB state check failed for '${key}': Database is in state '${status.stateName}' (code: ${status.readyState}). Database must be connected before DEM starts loading.`, { manager: key, readyState: status.readyState, stateName: status.stateName });
180
+ emitter?.emit("error", err);
181
+ loggers?.error?.(err.message);
182
+ throw err;
183
+ }
184
+ }
185
+ }
186
+ /**
187
+ * Initializes and starts all server managers, executes DB state assertions, preloads data, and attaches sockets.
188
+ *
189
+ * @param defs - Server manager definitions including class constructors and options.
190
+ * @param loggers_ - Loggers interface.
191
+ * @param socket - Socket.IO server instance.
192
+ * @param doDebug - Flag indicating whether debug logging is enabled.
193
+ * @param emitter - Shared event emitter.
194
+ * @param models - Optional model registry.
195
+ * @returns Promise resolving to the map of initialized server managers.
196
+ */
197
+ export async function AUSManagerFactory(defs, loggers_, socket, doDebug = true, emitter = new EventEmitter(), models) {
198
+ // Use delegation instead of cloning or direct mutation to ensure late-added spies work
199
+ const loggers = {
200
+ info: (s) => loggers_.info?.(s),
201
+ debug: (s) => (doDebug ? loggers_.debug?.(s) : undefined),
202
+ error: (s) => loggers_.error?.(s),
203
+ warn: (s) => loggers_.warn?.(s),
204
+ };
205
+ socket.use((socket, next) => {
206
+ socket.onAny((event) => { });
207
+ next();
208
+ });
209
+ const managers = {};
210
+ const keys = Object.keys(defs);
211
+ // 1. Create all managers
212
+ for (const key of keys) {
213
+ loggers.debug?.(`Creating manager for ${key}`);
214
+ const def = defs[key];
215
+ const model = getModelForClass(def.class);
216
+ try {
217
+ const c = new AutoUpdateServerManager(def.class, key, socket, loggers, model, managers, emitter, def.options);
218
+ managers[key] = c;
219
+ }
220
+ catch (error) {
221
+ loggers.error?.("Error creating manager: " + key);
222
+ loggers.error?.(error instanceof Error ? error.message : String(error));
223
+ if (error instanceof Error && error.stack)
224
+ loggers.error?.(error.stack);
225
+ }
226
+ }
227
+ // 1.5. Inspect database states before loading starts
228
+ checkServerDbStates(managers, loggers, emitter);
229
+ // 2. Pre-load all managers in parallel
230
+ await Promise.all(keys.map(async (key) => {
231
+ if (!managers[key])
232
+ return;
233
+ loggers.debug?.("Loading DB for manager: " + key);
234
+ try {
235
+ await managers[key].preLoad();
236
+ }
237
+ catch (error) {
238
+ loggers.error?.("Error loading DB for manager: " + key);
239
+ loggers.error?.(error instanceof Error ? error.message : String(error));
240
+ if (error instanceof Error && error.stack)
241
+ loggers.error?.(error.stack);
242
+ }
243
+ }));
244
+ // 3. Load references for all managers in parallel
245
+ await Promise.all(Object.values(managers).map(async (manager) => {
246
+ try {
247
+ await manager.loadReferences();
248
+ }
249
+ catch (error) {
250
+ loggers.error?.("Error loading DB for manager: " +
251
+ manager.className +
252
+ " (loadReferences)");
253
+ loggers.error?.(error instanceof Error ? error.message : String(error));
254
+ if (error instanceof Error && error.stack)
255
+ loggers.error?.(error.stack);
256
+ }
257
+ }));
258
+ socket.on("connection", async (socket) => {
259
+ loggers.debug?.(`Client connected: ${socket?.id}`);
260
+ socket?.emit?.(EVENT_VERSION, {
261
+ version: DEM_VERSION,
262
+ protocolVersion: DEM_PROTOCOL_VERSION,
263
+ });
264
+ for (const manager of Object.values(managers)) {
265
+ manager.registerSocket(socket);
266
+ }
267
+ socket?.on?.("disconnect", () => {
268
+ loggers.debug?.(`Client disconnected: ${socket?.id}`);
269
+ });
270
+ });
271
+ try {
272
+ setupSocketMiddleware(socket, loggers, managers, models);
273
+ }
274
+ catch (error) {
275
+ loggers.error?.("Error setting up socket middleware");
276
+ loggers.error?.(error instanceof Error ? error.message : String(error));
277
+ if (error instanceof Error && error.stack)
278
+ loggers.error?.(error.stack);
279
+ }
280
+ return managers;
281
+ }
282
+ export class AutoUpdateServerManager extends AutoUpdateManager {
283
+ model;
284
+ clientSockets = new Set();
285
+ knownObjectIdsBySocket = new Map();
286
+ options;
287
+ objects_ = {};
288
+ managers;
289
+ startupPayloadCache = null;
290
+ _cachedObjectsArray = null;
291
+ changeTracker;
292
+ /**
293
+ * Initializes an AutoUpdateServerManager instance.
294
+ *
295
+ * @param classParam - Target server object class constructor.
296
+ * @param className - Managed entity class name.
297
+ * @param socket - Socket.IO Server instance.
298
+ * @param loggers - Logger callbacks interface.
299
+ * @param model - Typegoose Mongoose model for database operations.
300
+ * @param managers - Sibling server managers registry.
301
+ * @param emitter - Shared event emitter.
302
+ * @param options - Server manager options including access middlewares and delta sync settings.
303
+ */
304
+ constructor(classParam, className, socket, loggers, model, managers, emitter, options) {
305
+ super(classParam, className, socket, loggers, managers, emitter);
306
+ this.managers = managers;
307
+ this.model = model;
308
+ this.options = options;
309
+ if (options?.deltaSync) {
310
+ const deltaOpts = typeof options.deltaSync === "object" ? options.deltaSync : {};
311
+ if (deltaOpts.enabled !== false) {
312
+ this.changeTracker = new ServerChangeTracker(this.className, deltaOpts);
313
+ }
314
+ }
315
+ }
316
+ /**
317
+ * Inspects current database connection state.
318
+ *
319
+ * @returns Object describing connected flag, numeric readyState, and stateName.
320
+ */
321
+ checkDbState() {
322
+ const db = this.model?.db;
323
+ if (!db || typeof db.readyState !== "number") {
324
+ return { connected: true, readyState: 1, stateName: "connected" };
325
+ }
326
+ const readyState = db.readyState;
327
+ const stateNames = {
328
+ 0: "disconnected",
329
+ 1: "connected",
330
+ 2: "connecting",
331
+ 3: "disconnecting",
332
+ 99: "uninitialized",
333
+ };
334
+ const stateName = stateNames[readyState] ?? "unknown";
335
+ return {
336
+ connected: readyState === 1,
337
+ readyState,
338
+ stateName,
339
+ };
340
+ }
341
+ /**
342
+ * Verifies database connection is active.
343
+ *
344
+ * @throws {DEMError} Throws DEMErrorCode.DB_NOT_CONNECTED if database is not connected.
345
+ */
346
+ assertDbConnected() {
347
+ const status = this.checkDbState();
348
+ if (!status.connected) {
349
+ const err = new DEMError(DEMErrorCode.DB_NOT_CONNECTED, `Database for manager '${this.className}' is in state '${status.stateName}' (code: ${status.readyState}). Database must be connected before DEM starts loading.`, { className: this.className, readyState: status.readyState, stateName: status.stateName });
350
+ this.emitter.emit("error", err);
351
+ this.loggers.error?.(err.message);
352
+ throw err;
353
+ }
354
+ }
355
+ /**
356
+ * Preloads all database documents into memory for the manager class.
357
+ *
358
+ * @param options - Optional batch loading options.
359
+ * @returns Promise resolving when all entities are loaded and populated in globalCache.
360
+ */
361
+ async preLoad(options) {
362
+ this.assertDbConnected();
363
+ this.loggers.debug("Loading manager DB " + this.className);
364
+ const docs = await this.model.find({});
365
+ // Optimization: Parallelize object creation to ensure all objects are in globalCache
366
+ // as quickly as possible before reference resolution starts.
367
+ await Promise.all(docs.map(async (doc) => {
368
+ const id = doc._id?.toString();
369
+ if (!id) {
370
+ this.loggers.debug("Invalid document, no _id: " + (doc?._id ?? "[no id]"));
371
+ return;
372
+ }
373
+ this.objects_[id] =
374
+ this.objects_[id] ??
375
+ (await createAutoUpdatedClass(this.classParam, this.className, this.socket, id, this.loggers, this, this.emitter, doc));
376
+ globalCache.objects[id] = {
377
+ className: this.className,
378
+ object: this.objects_[id],
379
+ };
380
+ }));
381
+ this.startupPayloadCache = null;
382
+ this._cachedObjectsArray = null;
383
+ this.loggers.debug("Loaded manager DB " +
384
+ this.className +
385
+ " - [" +
386
+ docs.length +
387
+ "] entries");
388
+ }
389
+ /**
390
+ * Resolves back-references and pointers across loaded objects.
391
+ *
392
+ * @returns Promise resolving when reference resolution completes.
393
+ */
394
+ async loadReferences() {
395
+ // Phase 1: Initial reference resolution (including back-references/createdWithParent)
396
+ // This MUST happen after all managers have finished preLoad so that all objects exist in globalCache.
397
+ await Promise.all(this.objectsAsArray.map((object) => object.isPreLoadedAsync()));
398
+ // Phase 2: Resolve missing references (pointers) and set isLoaded_ = true
399
+ await super.loadReferences();
400
+ }
401
+ /**
402
+ * Registers a client socket with the manager and binds startup, delete, and new event listeners.
403
+ *
404
+ * @param socket - Connected client Socket instance.
405
+ */
406
+ registerSocket(socket) {
407
+ this.clientSockets.add(socket);
408
+ socket.on(EVENT_STARTUP + this.className, async (req, ack) => {
409
+ try {
410
+ const clientVersion = req && typeof req === "object" && typeof req.clientVersion === "string"
411
+ ? req.clientVersion
412
+ : undefined;
413
+ if (clientVersion) {
414
+ const verResult = verifyDEMVersion(clientVersion, DEM_SERVER_VERSION);
415
+ if (!verResult.compatible) {
416
+ const errMsg = verResult.message ||
417
+ `DEM Version Incompatibility: Client (${clientVersion}) is incompatible with Server (${DEM_SERVER_VERSION})`;
418
+ this.loggers.warn?.(`Rejecting client connection from ${socket.id}: ${errMsg}`);
419
+ if (typeof ack === "function") {
420
+ ack({
421
+ success: false,
422
+ code: DEMErrorCode.VERSION_MISMATCH,
423
+ message: errMsg,
424
+ });
425
+ }
426
+ return;
427
+ }
428
+ }
429
+ const clientLastRev = req && typeof req === "object" && typeof req.lastRevision === "number"
430
+ ? req.lastRevision
431
+ : undefined;
432
+ // Check if delta sync can be fulfilled
433
+ if (this.changeTracker && typeof clientLastRev === "number") {
434
+ let allowedIdsSet = undefined;
435
+ if (this.options?.accessDefinitions?.startupMiddleware) {
436
+ const allowedObjects = await this.options.accessDefinitions.startupMiddleware(this.objectsAsArray, this.managers, socket);
437
+ allowedIdsSet = new Set(allowedObjects.map((obj) => obj._id.toString()).filter(Boolean));
438
+ this.knownObjectIdsBySocket.set(socket, new Set(allowedIdsSet));
439
+ }
440
+ const changesResult = this.changeTracker.getChangesSince(clientLastRev, allowedIdsSet);
441
+ if (!changesResult.isExpired) {
442
+ if (changesResult.changes.length === 0) {
443
+ this.loggers.debug("Client up to date for manager " +
444
+ this.className +
445
+ " at revision " +
446
+ clientLastRev);
447
+ if (typeof ack === "function") {
448
+ ack({
449
+ data: {
450
+ status: "up-to-date",
451
+ revision: this.changeTracker.getCurrentRevision(),
452
+ ids: [],
453
+ properties: this.properties,
454
+ version: DEM_VERSION,
455
+ protocolVersion: DEM_PROTOCOL_VERSION,
456
+ },
457
+ success: true,
458
+ });
459
+ }
460
+ return;
461
+ }
462
+ else {
463
+ this.loggers.debug("Sending delta startup data (" +
464
+ changesResult.changes.length +
465
+ " changes) for manager " +
466
+ this.className);
467
+ if (typeof ack === "function") {
468
+ ack({
469
+ data: {
470
+ status: "delta",
471
+ revision: this.changeTracker.getCurrentRevision(),
472
+ changes: changesResult.changes,
473
+ ids: [],
474
+ properties: this.properties,
475
+ version: DEM_VERSION,
476
+ protocolVersion: DEM_PROTOCOL_VERSION,
477
+ },
478
+ success: true,
479
+ });
480
+ }
481
+ return;
482
+ }
483
+ }
484
+ }
485
+ let ids;
486
+ let objects;
487
+ if (!this.options?.accessDefinitions?.startupMiddleware && this.startupPayloadCache) {
488
+ ids = this.startupPayloadCache.ids;
489
+ objects = this.startupPayloadCache.objects ?? [];
490
+ }
491
+ else {
492
+ const allowedObjects = this.options?.accessDefinitions?.startupMiddleware
493
+ ? await this.options.accessDefinitions.startupMiddleware(this.objectsAsArray, this.managers, socket)
494
+ : this.objectsAsArray;
495
+ ids = allowedObjects.map((obj) => obj._id.toString()).filter(Boolean);
496
+ objects = allowedObjects.map((obj) => obj.extractedData).filter(Boolean);
497
+ this.knownObjectIdsBySocket.set(socket, new Set(ids));
498
+ if (!this.options?.accessDefinitions?.startupMiddleware) {
499
+ this.startupPayloadCache = {
500
+ ids,
501
+ objects,
502
+ properties: this.properties,
503
+ };
504
+ }
505
+ }
506
+ this.loggers.debug("Sending startup data for manager " + this.className);
507
+ if (typeof ack === "function") {
508
+ ack({
509
+ data: {
510
+ status: "full",
511
+ revision: this.changeTracker ? this.changeTracker.getCurrentRevision() : 0,
512
+ ids,
513
+ objects,
514
+ properties: this.properties,
515
+ version: DEM_VERSION,
516
+ protocolVersion: DEM_PROTOCOL_VERSION,
517
+ },
518
+ success: true,
519
+ });
520
+ }
521
+ }
522
+ catch (error) {
523
+ this.loggers.error("Error sending startup data for manager " +
524
+ this.className +
525
+ ": " +
526
+ (error instanceof Error ? error.message : String(error)));
527
+ if (error instanceof Error && error.stack)
528
+ this.loggers.error(error.stack);
529
+ const demErr = toDEMError(error, DEMErrorCode.STARTUP_FAILED);
530
+ if (typeof ack === "function") {
531
+ ack({
532
+ success: false,
533
+ code: demErr.code,
534
+ message: error instanceof Error ? error.message : String(error),
535
+ });
536
+ }
537
+ }
538
+ });
539
+ socket.on(EVENT_DELETE + this.className, async (id, ack) => {
540
+ this.loggers.debug("Deleting object from manager " + this.className + " - " + id);
541
+ try {
542
+ const res = await this.deleteObject(id);
543
+ this.startupPayloadCache = null;
544
+ if (typeof ack === "function") {
545
+ if (res && !res.success) {
546
+ ack({
547
+ success: false,
548
+ code: res.code ?? DEMErrorCode.OBJECT_DELETE_FAILED,
549
+ message: res.message || "Deletion unsuccessful",
550
+ });
551
+ }
552
+ else {
553
+ ack({
554
+ success: true,
555
+ message: "Deleted successfully",
556
+ data: undefined,
557
+ });
558
+ }
559
+ }
560
+ }
561
+ catch (error) {
562
+ this.loggers.error("Error deleting object from manager " +
563
+ this.className +
564
+ " - " +
565
+ id +
566
+ ": " +
567
+ (error instanceof Error ? error.message : String(error)));
568
+ if (error instanceof Error && error.stack)
569
+ this.loggers.error(error.stack);
570
+ const demErr = toDEMError(error, DEMErrorCode.OBJECT_DELETE_FAILED);
571
+ if (typeof ack === "function") {
572
+ ack({
573
+ success: false,
574
+ code: demErr.code,
575
+ message: error instanceof Error ? error.message : String(error),
576
+ });
577
+ }
578
+ }
579
+ });
580
+ socket.on(EVENT_NEW + this.className, async (data, ack) => {
581
+ this.loggers.debug("Recieved new object creation in manager " + this.className);
582
+ try {
583
+ const newDoc = await this.createObject(data);
584
+ this.startupPayloadCache = null;
585
+ if (typeof ack === "function") {
586
+ ack({
587
+ data: newDoc.extractedData,
588
+ success: true,
589
+ message: "Created successfully",
590
+ });
591
+ }
592
+ }
593
+ catch (error) {
594
+ this.loggers.error("Error creating new object creation in manager " +
595
+ this.className +
596
+ " - " +
597
+ (error instanceof Error ? error.message : String(error)));
598
+ if (error instanceof Error && error.stack)
599
+ this.loggers.error(error.stack);
600
+ const demErr = toDEMError(error, DEMErrorCode.OBJECT_CREATE_FAILED);
601
+ if (typeof ack === "function") {
602
+ ack({
603
+ success: false,
604
+ code: demErr.code,
605
+ message: error instanceof Error ? error.message : String(error),
606
+ });
607
+ }
608
+ }
609
+ });
610
+ // Registered into socket.eventNames() so setupSocketMiddleware can validate and permit dynamic update/get events
611
+ socket.on(EVENT_UPDATE + this.className, async () => { });
612
+ socket.on(EVENT_GET + this.className, async () => { });
613
+ socket.onAny(async (event, data, ack) => {
614
+ if (event.startsWith(EVENT_UPDATE + this.className) &&
615
+ event.replace(EVENT_UPDATE + this.className, "").length === 24) {
616
+ this.loggers.debug("Updating object in manager " +
617
+ this.className +
618
+ ": " +
619
+ event +
620
+ " - " +
621
+ (typeof data === "object" ? "[object]" : String(data)));
622
+ try {
623
+ const id = event.replace(EVENT_UPDATE + this.className, "");
624
+ let obj = this.objects_[id];
625
+ if (!obj)
626
+ throw new DEMError(DEMErrorCode.OBJECT_GET_FAILED, `Never... failed to get object somehow: ${id}`);
627
+ const res = await obj.setValue(data.key, data.value);
628
+ if (typeof ack === "function") {
629
+ res.success
630
+ ? ack({
631
+ data: null,
632
+ success: res.success,
633
+ message: res.msg,
634
+ })
635
+ : ack({
636
+ success: res.success,
637
+ code: res.code ?? DEMErrorCode.DB_SAVE_FAILED,
638
+ message: res.msg,
639
+ });
640
+ }
641
+ }
642
+ catch (error) {
643
+ this.loggers.warn("Failed to update object in manager " + this.className);
644
+ const demErr = toDEMError(error, DEMErrorCode.DB_SAVE_FAILED);
645
+ if (typeof ack === "function") {
646
+ ack({
647
+ success: false,
648
+ code: demErr.code,
649
+ message: error instanceof Error ? error.message : String(error),
650
+ });
651
+ }
652
+ }
653
+ }
654
+ else if (event.startsWith(EVENT_GET + this.className) &&
655
+ event.replace(EVENT_GET + this.className, "").length === 24) {
656
+ try {
657
+ const id = event.replace(EVENT_GET + this.className, "");
658
+ let obj = this.objects_[id];
659
+ if (!obj)
660
+ throw new DEMError(DEMErrorCode.OBJECT_NOT_FOUND, `Object not found: ${id}`);
661
+ if (typeof ack === "function") {
662
+ ack({
663
+ data: obj.extractedData,
664
+ success: true,
665
+ message: "Updated successfully",
666
+ });
667
+ }
668
+ }
669
+ catch (error) {
670
+ this.loggers.error("Error sending startup data for manager " +
671
+ this.className +
672
+ ": " +
673
+ (error instanceof Error ? error.message : String(error)));
674
+ if (error instanceof Error && error.stack)
675
+ this.loggers.error(error.stack);
676
+ const demErr = toDEMError(error, DEMErrorCode.OBJECT_GET_FAILED);
677
+ if (typeof ack === "function") {
678
+ ack({
679
+ success: false,
680
+ code: demErr.code,
681
+ message: error instanceof Error ? error.message : String(error),
682
+ });
683
+ }
684
+ }
685
+ }
686
+ });
687
+ socket.on("disconnect", () => {
688
+ this.clientSockets.delete(socket);
689
+ this.knownObjectIdsBySocket.delete(socket);
690
+ });
691
+ }
692
+ /**
693
+ * Retrieves a server managed object by identifier.
694
+ *
695
+ * @param _id - Optional entity identifier.
696
+ * @returns Managed entity instance, null, or undefined.
697
+ */
698
+ getObject(_id) {
699
+ if (!_id)
700
+ return null;
701
+ return this.objects_[_id.toString()] || undefined;
702
+ }
703
+ /**
704
+ * Dictionary of all managed entities keyed by their string IDs.
705
+ *
706
+ * @returns Map of managed entities.
707
+ */
708
+ get objects() {
709
+ return this.objects_;
710
+ }
711
+ /**
712
+ * Array representation of all managed entities.
713
+ *
714
+ * @returns Array containing all managed entities.
715
+ */
716
+ get objectsAsArray() {
717
+ if (!this._cachedObjectsArray) {
718
+ this._cachedObjectsArray = Object.values(this.objects_);
719
+ }
720
+ return this._cachedObjectsArray;
721
+ }
722
+ /**
723
+ * Deletes an entity from database, manager cache, and mutation tracker.
724
+ *
725
+ * @param _id - Identifier of entity to delete.
726
+ * @returns Promise resolving to deletion outcome object.
727
+ */
728
+ async deleteObject(_id) {
729
+ this._cachedObjectsArray = null;
730
+ const idStr = _id.toString();
731
+ if (this.changeTracker) {
732
+ this.changeTracker.recordChange("delete", idStr);
733
+ }
734
+ for (const socket of this.clientSockets) {
735
+ const known = this.knownObjectIdsBySocket.get(socket);
736
+ if (known) {
737
+ known.delete(idStr);
738
+ }
739
+ }
740
+ return super.deleteObject(_id);
741
+ }
742
+ pendingMissingFetches = new Map();
743
+ /**
744
+ * Retrieves an entity missing from memory by querying MongoDB directly.
745
+ *
746
+ * @param _id - Identifier of missing entity.
747
+ * @returns Promise resolving to the retrieved server object.
748
+ * @throws {DEMError} Throws DEMErrorCode.DOCUMENT_NOT_FOUND or MANAGERS_NOT_INITIALIZED.
749
+ */
750
+ async handleGetMissingObject(_id) {
751
+ const _idStr = _id.toString();
752
+ if (this.getObject(_idStr))
753
+ return this.getObject(_idStr);
754
+ if (this.pendingMissingFetches.has(_idStr)) {
755
+ return this.pendingMissingFetches.get(_idStr);
756
+ }
757
+ const fetchPromise = (async () => {
758
+ try {
759
+ const document = await this.model.findById(_idStr);
760
+ if (!document)
761
+ throw new DEMError(DEMErrorCode.DOCUMENT_NOT_FOUND, `No document with id ${_idStr} in DB.`);
762
+ if (!this.managers)
763
+ throw new DEMError(DEMErrorCode.MANAGERS_NOT_INITIALIZED, `No managers.`);
764
+ const object = await createAutoUpdatedClass(this.classParam, this.className, this.socket, document, this.loggers, this, this.emitter);
765
+ await object.waitForPreloaded();
766
+ this.objects_[object._id.toString()] = object;
767
+ this._cachedObjectsArray = null;
768
+ globalCache.objects[object._id.toString()] = {
769
+ className: this.className,
770
+ object: object,
771
+ };
772
+ await object.isPreLoadedAsync();
773
+ await object.loadMissingReferences();
774
+ await object.contactChildren();
775
+ return object;
776
+ }
777
+ finally {
778
+ this.pendingMissingFetches.delete(_idStr);
779
+ }
780
+ })();
781
+ this.pendingMissingFetches.set(_idStr, fetchPromise);
782
+ return fetchPromise;
783
+ }
784
+ /**
785
+ * Creates a new entity document in MongoDB and instantiates its manager wrapper.
786
+ * Broadcasts creation event to client sockets with authorized access.
787
+ *
788
+ * @param data - Initial entity properties.
789
+ * @returns Promise resolving to the created server entity.
790
+ * @throws {DEMError} Throws DEMErrorCode.MANAGERS_NOT_INITIALIZED.
791
+ */
792
+ async createObject(data) {
793
+ if (!this.managers)
794
+ throw new DEMError(DEMErrorCode.MANAGERS_NOT_INITIALIZED, `No managers.`);
795
+ this.loggers.debug("Creating new object from manager " + this.className);
796
+ const rawRec = { ...data };
797
+ if (rawRec._id === "" || rawRec._id === null)
798
+ delete rawRec._id;
799
+ // Sanitize creation payload to prevent property injection
800
+ const dataRec = {};
801
+ for (const key of Object.keys(rawRec)) {
802
+ if (key !== "__proto__" &&
803
+ key !== "constructor" &&
804
+ key !== "prototype" &&
805
+ (this.properties.includes(key) ||
806
+ key === "_id" ||
807
+ Boolean(this.model.schema?.path?.(key)))) {
808
+ const val = rawRec[key];
809
+ if (val && typeof val === "object") {
810
+ if (Array.isArray(val)) {
811
+ dataRec[key] = val.map((v) => v && typeof v === "object" && v._id ? v._id.toString() : v);
812
+ }
813
+ else if (val._id) {
814
+ dataRec[key] = val._id.toString();
815
+ }
816
+ else {
817
+ dataRec[key] = val;
818
+ }
819
+ }
820
+ else {
821
+ dataRec[key] = val;
822
+ }
823
+ }
824
+ }
825
+ const doc = await this.model.create(dataRec);
826
+ const id = doc._id.toString();
827
+ const object = await createAutoUpdatedClass(this.classParam, this.className, this.socket, id, this.loggers, this, this.emitter, doc);
828
+ await object.waitForPreloaded();
829
+ // Copy virtual references from raw data payload
830
+ const cleanedData = object.handleDataCleanup(rawRec);
831
+ for (const key of object.properties) {
832
+ if (cleanedData[key] !== undefined &&
833
+ object.data[key] === undefined) {
834
+ object.data[key] = cleanedData[key];
835
+ }
836
+ }
837
+ this.objects_[id] = object;
838
+ this._cachedObjectsArray = null;
839
+ this.startupPayloadCache = null;
840
+ globalCache.objects[id] = {
841
+ className: this.className,
842
+ object: object,
843
+ };
844
+ await object.isPreLoadedAsync();
845
+ await object.loadMissingReferences();
846
+ await object.contactChildren();
847
+ if (this.changeTracker) {
848
+ this.changeTracker.recordChange("create", id, object.extractedData || object.data);
849
+ }
850
+ for (const socket of this.clientSockets) {
851
+ try {
852
+ const theTruth = this.options?.accessDefinitions?.startupMiddleware
853
+ ? await this.options.accessDefinitions.startupMiddleware([object], this.managers, socket)
854
+ : [object];
855
+ if (theTruth.length > 0) {
856
+ let known = this.knownObjectIdsBySocket.get(socket);
857
+ if (!known) {
858
+ known = new Set();
859
+ this.knownObjectIdsBySocket.set(socket, known);
860
+ }
861
+ known.add(id);
862
+ this.loggers.debug("Emitting new object " + object._id);
863
+ socket.emit("new" + this.className, object._id.toString());
864
+ }
865
+ }
866
+ catch (error) {
867
+ this.loggers.error("Error when emitting new object to client: " +
868
+ (error instanceof Error ? error.name : "Error"));
869
+ this.loggers.error(error instanceof Error ? error.message : String(error));
870
+ if (error instanceof Error && error.stack)
871
+ this.loggers.error(error.stack);
872
+ }
873
+ }
874
+ return object;
875
+ }
876
+ /**
877
+ * Re-evaluates client socket permissions against dynamic startup middleware rules.
878
+ * Emits 'new' or 'delete' socket events when client access changes dynamically.
879
+ *
880
+ * @param object - Entity to evaluate.
881
+ */
882
+ async checkPermissionBoundaries(object) {
883
+ if (!this.options?.accessDefinitions?.startupMiddleware)
884
+ return;
885
+ const id = object._id.toString();
886
+ for (const socket of this.clientSockets) {
887
+ try {
888
+ const theTruth = await this.options.accessDefinitions.startupMiddleware([object], this.managers, socket);
889
+ const hasAccess = theTruth && theTruth.length > 0;
890
+ let known = this.knownObjectIdsBySocket.get(socket);
891
+ if (!known) {
892
+ known = new Set();
893
+ this.knownObjectIdsBySocket.set(socket, known);
894
+ }
895
+ const hadAccess = known.has(id);
896
+ if (hasAccess && !hadAccess) {
897
+ known.add(id);
898
+ this.loggers.debug(`Granting dynamic access to ${this.className} ${id} for socket ${socket.id}`);
899
+ socket.emit("new" + this.className, id);
900
+ }
901
+ else if (!hasAccess && hadAccess) {
902
+ known.delete(id);
903
+ this.loggers.debug(`Revoking dynamic access to ${this.className} ${id} for socket ${socket.id}`);
904
+ socket.emit("delete" + this.className, id);
905
+ }
906
+ }
907
+ catch (error) {
908
+ this.loggers.error(`Error checking permission boundaries for ${this.className} ${id}: ${error instanceof Error ? error.message : String(error)}`);
909
+ }
910
+ }
911
+ }
912
+ }
913
+ //# sourceMappingURL=AutoUpdateServerManagerClass.js.map