@sync-in/server 1.11.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1040) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/LICENSE +1 -1
  3. package/README.md +3 -11
  4. package/environment/environment.dist.min.yaml +1 -1
  5. package/environment/environment.dist.yaml +173 -28
  6. package/package.json +17 -16
  7. package/server/app.bootstrap.js +1 -5
  8. package/server/app.bootstrap.js.map +1 -1
  9. package/server/app.constants.js +1 -5
  10. package/server/app.constants.js.map +1 -1
  11. package/server/app.e2e-spec.js +1 -5
  12. package/server/app.e2e-spec.js.map +1 -1
  13. package/server/app.functions.js +1 -5
  14. package/server/app.functions.js.map +1 -1
  15. package/server/app.module.js +1 -5
  16. package/server/app.module.js.map +1 -1
  17. package/server/app.service.js +1 -5
  18. package/server/app.service.js.map +1 -1
  19. package/server/app.service.spec.js +2 -6
  20. package/server/app.service.spec.js.map +1 -1
  21. package/server/applications/admin/admin.module.js +1 -5
  22. package/server/applications/admin/admin.module.js.map +1 -1
  23. package/server/applications/admin/constants/routes.js +1 -5
  24. package/server/applications/admin/constants/routes.js.map +1 -1
  25. package/server/applications/admin/interfaces/check-update.interfaces.js +1 -5
  26. package/server/applications/admin/interfaces/check-update.interfaces.js.map +1 -1
  27. package/server/applications/admin/services/admin-scheduler.service.js +1 -5
  28. package/server/applications/admin/services/admin-scheduler.service.js.map +1 -1
  29. package/server/applications/admin/services/admin.service.js +13 -8
  30. package/server/applications/admin/services/admin.service.js.map +1 -1
  31. package/server/applications/admin/services/admin.service.spec.js +1 -5
  32. package/server/applications/admin/services/admin.service.spec.js.map +1 -1
  33. package/server/applications/admin/utils/check-update.js +1 -5
  34. package/server/applications/admin/utils/check-update.js.map +1 -1
  35. package/server/applications/applications.config.js +1 -5
  36. package/server/applications/applications.config.js.map +1 -1
  37. package/server/applications/applications.constants.js +5 -5
  38. package/server/applications/applications.constants.js.map +1 -1
  39. package/server/applications/applications.module.js +1 -5
  40. package/server/applications/applications.module.js.map +1 -1
  41. package/server/applications/comments/comments.controller.js +1 -5
  42. package/server/applications/comments/comments.controller.js.map +1 -1
  43. package/server/applications/comments/comments.controller.spec.js +1 -5
  44. package/server/applications/comments/comments.controller.spec.js.map +1 -1
  45. package/server/applications/comments/comments.module.js +1 -5
  46. package/server/applications/comments/comments.module.js.map +1 -1
  47. package/server/applications/comments/constants/routes.js +1 -5
  48. package/server/applications/comments/constants/routes.js.map +1 -1
  49. package/server/applications/comments/dto/comment.dto.js +1 -5
  50. package/server/applications/comments/dto/comment.dto.js.map +1 -1
  51. package/server/applications/comments/interfaces/comment-recent.interface.js +1 -5
  52. package/server/applications/comments/interfaces/comment-recent.interface.js.map +1 -1
  53. package/server/applications/comments/schemas/comment.interface.js +1 -5
  54. package/server/applications/comments/schemas/comment.interface.js.map +1 -1
  55. package/server/applications/comments/schemas/comments.schema.js +1 -5
  56. package/server/applications/comments/schemas/comments.schema.js.map +1 -1
  57. package/server/applications/comments/services/comments-manager.service.js +9 -7
  58. package/server/applications/comments/services/comments-manager.service.js.map +1 -1
  59. package/server/applications/comments/services/comments-manager.service.spec.js +10 -8
  60. package/server/applications/comments/services/comments-manager.service.spec.js.map +1 -1
  61. package/server/applications/comments/services/comments-queries.service.js +1 -5
  62. package/server/applications/comments/services/comments-queries.service.js.map +1 -1
  63. package/server/applications/files/adapters/files-indexer-mysql.service.js +29 -12
  64. package/server/applications/files/adapters/files-indexer-mysql.service.js.map +1 -1
  65. package/server/applications/files/adapters/files-indexer-mysql.service.spec.js +1 -5
  66. package/server/applications/files/adapters/files-indexer-mysql.service.spec.js.map +1 -1
  67. package/server/applications/files/constants/cache.js +1 -5
  68. package/server/applications/files/constants/cache.js.map +1 -1
  69. package/server/applications/files/constants/compress.js +1 -5
  70. package/server/applications/files/constants/compress.js.map +1 -1
  71. package/server/applications/files/constants/files.js +1 -5
  72. package/server/applications/files/constants/files.js.map +1 -1
  73. package/server/applications/files/constants/indexing.js +1 -5
  74. package/server/applications/files/constants/indexing.js.map +1 -1
  75. package/server/applications/files/constants/operations.js +1 -5
  76. package/server/applications/files/constants/operations.js.map +1 -1
  77. package/server/applications/files/constants/routes.js +1 -5
  78. package/server/applications/files/constants/routes.js.map +1 -1
  79. package/server/applications/files/constants/samples.js +1 -5
  80. package/server/applications/files/constants/samples.js.map +1 -1
  81. package/server/applications/files/dto/file-operations.dto.js +1 -5
  82. package/server/applications/files/dto/file-operations.dto.js.map +1 -1
  83. package/server/applications/files/events/file-task-event.js +1 -5
  84. package/server/applications/files/events/file-task-event.js.map +1 -1
  85. package/server/applications/files/files-tasks.controller.js +1 -5
  86. package/server/applications/files/files-tasks.controller.js.map +1 -1
  87. package/server/applications/files/files-tasks.controller.spec.js +1 -5
  88. package/server/applications/files/files-tasks.controller.spec.js.map +1 -1
  89. package/server/applications/files/files.config.js +1 -5
  90. package/server/applications/files/files.config.js.map +1 -1
  91. package/server/applications/files/files.controller.js +1 -5
  92. package/server/applications/files/files.controller.js.map +1 -1
  93. package/server/applications/files/files.controller.spec.js +1 -5
  94. package/server/applications/files/files.controller.spec.js.map +1 -1
  95. package/server/applications/files/files.module.js +1 -5
  96. package/server/applications/files/files.module.js.map +1 -1
  97. package/server/applications/files/interfaces/file-db-props.interface.js +1 -5
  98. package/server/applications/files/interfaces/file-db-props.interface.js.map +1 -1
  99. package/server/applications/files/interfaces/file-lock.interface.js +1 -5
  100. package/server/applications/files/interfaces/file-lock.interface.js.map +1 -1
  101. package/server/applications/files/interfaces/file-parse-index.js +1 -5
  102. package/server/applications/files/interfaces/file-parse-index.js.map +1 -1
  103. package/server/applications/files/interfaces/file-props.interface.js +1 -5
  104. package/server/applications/files/interfaces/file-props.interface.js.map +1 -1
  105. package/server/applications/files/interfaces/file-recent-location.interface.js +1 -5
  106. package/server/applications/files/interfaces/file-recent-location.interface.js.map +1 -1
  107. package/server/applications/files/interfaces/file-space.interface.js +1 -5
  108. package/server/applications/files/interfaces/file-space.interface.js.map +1 -1
  109. package/server/applications/files/interfaces/file-tree.interface.js +1 -5
  110. package/server/applications/files/interfaces/file-tree.interface.js.map +1 -1
  111. package/server/applications/files/models/file-error.js +1 -5
  112. package/server/applications/files/models/file-error.js.map +1 -1
  113. package/server/applications/files/models/file-lock-error.js +1 -5
  114. package/server/applications/files/models/file-lock-error.js.map +1 -1
  115. package/server/applications/files/models/file-task.js +1 -5
  116. package/server/applications/files/models/file-task.js.map +1 -1
  117. package/server/applications/files/models/files-indexer.js +1 -5
  118. package/server/applications/files/models/files-indexer.js.map +1 -1
  119. package/server/applications/files/modules/collabora-online/collabora-online-environment.decorator.js +1 -5
  120. package/server/applications/files/modules/collabora-online/collabora-online-environment.decorator.js.map +1 -1
  121. package/server/applications/files/modules/collabora-online/collabora-online-manager.service.js +21 -10
  122. package/server/applications/files/modules/collabora-online/collabora-online-manager.service.js.map +1 -1
  123. package/server/applications/files/modules/collabora-online/collabora-online-manager.service.spec.js +1 -5
  124. package/server/applications/files/modules/collabora-online/collabora-online-manager.service.spec.js.map +1 -1
  125. package/server/applications/files/modules/collabora-online/collabora-online.config.js +1 -5
  126. package/server/applications/files/modules/collabora-online/collabora-online.config.js.map +1 -1
  127. package/server/applications/files/modules/collabora-online/collabora-online.constants.js +1 -5
  128. package/server/applications/files/modules/collabora-online/collabora-online.constants.js.map +1 -1
  129. package/server/applications/files/modules/collabora-online/collabora-online.controller.js +1 -5
  130. package/server/applications/files/modules/collabora-online/collabora-online.controller.js.map +1 -1
  131. package/server/applications/files/modules/collabora-online/collabora-online.controller.spec.js +1 -5
  132. package/server/applications/files/modules/collabora-online/collabora-online.controller.spec.js.map +1 -1
  133. package/server/applications/files/modules/collabora-online/collabora-online.dtos.js +1 -5
  134. package/server/applications/files/modules/collabora-online/collabora-online.dtos.js.map +1 -1
  135. package/server/applications/files/modules/collabora-online/collabora-online.guard.js +1 -5
  136. package/server/applications/files/modules/collabora-online/collabora-online.guard.js.map +1 -1
  137. package/server/applications/files/modules/collabora-online/collabora-online.guard.spec.js +1 -5
  138. package/server/applications/files/modules/collabora-online/collabora-online.guard.spec.js.map +1 -1
  139. package/server/applications/files/modules/collabora-online/collabora-online.interface.js +1 -5
  140. package/server/applications/files/modules/collabora-online/collabora-online.interface.js.map +1 -1
  141. package/server/applications/files/modules/collabora-online/collabora-online.module.js +1 -5
  142. package/server/applications/files/modules/collabora-online/collabora-online.module.js.map +1 -1
  143. package/server/applications/files/modules/collabora-online/collabora-online.routes.js +1 -5
  144. package/server/applications/files/modules/collabora-online/collabora-online.routes.js.map +1 -1
  145. package/server/applications/files/modules/collabora-online/collabora-online.strategy.js +1 -5
  146. package/server/applications/files/modules/collabora-online/collabora-online.strategy.js.map +1 -1
  147. package/server/applications/files/modules/collabora-online/collabora-online.utils.js +1 -5
  148. package/server/applications/files/modules/collabora-online/collabora-online.utils.js.map +1 -1
  149. package/server/applications/files/modules/file-editor-providers.interface.js +6 -0
  150. package/server/applications/files/modules/file-editor-providers.interface.js.map +1 -0
  151. package/server/applications/files/modules/only-office/only-office-environment.decorator.js +1 -5
  152. package/server/applications/files/modules/only-office/only-office-environment.decorator.js.map +1 -1
  153. package/server/applications/files/modules/only-office/only-office-manager.service.js +57 -19
  154. package/server/applications/files/modules/only-office/only-office-manager.service.js.map +1 -1
  155. package/server/applications/files/modules/only-office/only-office-manager.service.spec.js +1 -5
  156. package/server/applications/files/modules/only-office/only-office-manager.service.spec.js.map +1 -1
  157. package/server/applications/files/modules/only-office/only-office.config.js +1 -5
  158. package/server/applications/files/modules/only-office/only-office.config.js.map +1 -1
  159. package/server/applications/files/modules/only-office/only-office.constants.js +1 -5
  160. package/server/applications/files/modules/only-office/only-office.constants.js.map +1 -1
  161. package/server/applications/files/modules/only-office/only-office.controller.js +1 -5
  162. package/server/applications/files/modules/only-office/only-office.controller.js.map +1 -1
  163. package/server/applications/files/modules/only-office/only-office.controller.spec.js +1 -5
  164. package/server/applications/files/modules/only-office/only-office.controller.spec.js.map +1 -1
  165. package/server/applications/files/modules/only-office/only-office.dtos.js +1 -5
  166. package/server/applications/files/modules/only-office/only-office.dtos.js.map +1 -1
  167. package/server/applications/files/modules/only-office/only-office.guard.js +1 -5
  168. package/server/applications/files/modules/only-office/only-office.guard.js.map +1 -1
  169. package/server/applications/files/modules/only-office/only-office.guard.spec.js +1 -5
  170. package/server/applications/files/modules/only-office/only-office.guard.spec.js.map +1 -1
  171. package/server/applications/files/modules/only-office/only-office.interface.js +1 -5
  172. package/server/applications/files/modules/only-office/only-office.interface.js.map +1 -1
  173. package/server/applications/files/modules/only-office/only-office.module.js +1 -5
  174. package/server/applications/files/modules/only-office/only-office.module.js.map +1 -1
  175. package/server/applications/files/modules/only-office/only-office.routes.js +1 -5
  176. package/server/applications/files/modules/only-office/only-office.routes.js.map +1 -1
  177. package/server/applications/files/modules/only-office/only-office.strategy.js +1 -5
  178. package/server/applications/files/modules/only-office/only-office.strategy.js.map +1 -1
  179. package/server/applications/files/schemas/file-content.interface.js +1 -5
  180. package/server/applications/files/schemas/file-content.interface.js.map +1 -1
  181. package/server/applications/files/schemas/file-recent.interface.js +1 -5
  182. package/server/applications/files/schemas/file-recent.interface.js.map +1 -1
  183. package/server/applications/files/schemas/file.interface.js +1 -5
  184. package/server/applications/files/schemas/file.interface.js.map +1 -1
  185. package/server/applications/files/schemas/files-content.schema.js +1 -5
  186. package/server/applications/files/schemas/files-content.schema.js.map +1 -1
  187. package/server/applications/files/schemas/files-recents.schema.js +1 -5
  188. package/server/applications/files/schemas/files-recents.schema.js.map +1 -1
  189. package/server/applications/files/schemas/files.schema.js +1 -5
  190. package/server/applications/files/schemas/files.schema.js.map +1 -1
  191. package/server/applications/files/services/files-content-manager.service.js +45 -16
  192. package/server/applications/files/services/files-content-manager.service.js.map +1 -1
  193. package/server/applications/files/services/files-lock-manager.service.js +53 -18
  194. package/server/applications/files/services/files-lock-manager.service.js.map +1 -1
  195. package/server/applications/files/services/files-lock-manager.service.spec.js +1 -5
  196. package/server/applications/files/services/files-lock-manager.service.spec.js.map +1 -1
  197. package/server/applications/files/services/files-manager.service.js +77 -24
  198. package/server/applications/files/services/files-manager.service.js.map +1 -1
  199. package/server/applications/files/services/files-manager.service.spec.js +1 -5
  200. package/server/applications/files/services/files-manager.service.spec.js.map +1 -1
  201. package/server/applications/files/services/files-methods.service.js +5 -6
  202. package/server/applications/files/services/files-methods.service.js.map +1 -1
  203. package/server/applications/files/services/files-methods.service.spec.js +1 -5
  204. package/server/applications/files/services/files-methods.service.spec.js.map +1 -1
  205. package/server/applications/files/services/files-parser.service.js +13 -8
  206. package/server/applications/files/services/files-parser.service.js.map +1 -1
  207. package/server/applications/files/services/files-parser.service.spec.js +1 -5
  208. package/server/applications/files/services/files-parser.service.spec.js.map +1 -1
  209. package/server/applications/files/services/files-queries.service.js +29 -12
  210. package/server/applications/files/services/files-queries.service.js.map +1 -1
  211. package/server/applications/files/services/files-recents.service.js +1 -5
  212. package/server/applications/files/services/files-recents.service.js.map +1 -1
  213. package/server/applications/files/services/files-recents.service.spec.js +1 -5
  214. package/server/applications/files/services/files-recents.service.spec.js.map +1 -1
  215. package/server/applications/files/services/files-scheduler.service.js +77 -24
  216. package/server/applications/files/services/files-scheduler.service.js.map +1 -1
  217. package/server/applications/files/services/files-search-manager.service.js +9 -7
  218. package/server/applications/files/services/files-search-manager.service.js.map +1 -1
  219. package/server/applications/files/services/files-search-manager.service.spec.js +1 -5
  220. package/server/applications/files/services/files-search-manager.service.spec.js.map +1 -1
  221. package/server/applications/files/services/files-tasks-manager.service.js +77 -24
  222. package/server/applications/files/services/files-tasks-manager.service.js.map +1 -1
  223. package/server/applications/files/services/files-tasks-manager.service.spec.js +1 -5
  224. package/server/applications/files/services/files-tasks-manager.service.spec.js.map +1 -1
  225. package/server/applications/files/utils/doc-textify/adapters/excel.js +1 -5
  226. package/server/applications/files/utils/doc-textify/adapters/excel.js.map +1 -1
  227. package/server/applications/files/utils/doc-textify/adapters/html.js +1 -5
  228. package/server/applications/files/utils/doc-textify/adapters/html.js.map +1 -1
  229. package/server/applications/files/utils/doc-textify/adapters/open-office.js +1 -5
  230. package/server/applications/files/utils/doc-textify/adapters/open-office.js.map +1 -1
  231. package/server/applications/files/utils/doc-textify/adapters/pdf.js +1 -5
  232. package/server/applications/files/utils/doc-textify/adapters/pdf.js.map +1 -1
  233. package/server/applications/files/utils/doc-textify/adapters/power-point.js +1 -5
  234. package/server/applications/files/utils/doc-textify/adapters/power-point.js.map +1 -1
  235. package/server/applications/files/utils/doc-textify/adapters/text.js +1 -5
  236. package/server/applications/files/utils/doc-textify/adapters/text.js.map +1 -1
  237. package/server/applications/files/utils/doc-textify/adapters/word.js +1 -5
  238. package/server/applications/files/utils/doc-textify/adapters/word.js.map +1 -1
  239. package/server/applications/files/utils/doc-textify/doc-textify.js +1 -5
  240. package/server/applications/files/utils/doc-textify/doc-textify.js.map +1 -1
  241. package/server/applications/files/utils/doc-textify/interfaces/doc-textify.interfaces.js +1 -5
  242. package/server/applications/files/utils/doc-textify/interfaces/doc-textify.interfaces.js.map +1 -1
  243. package/server/applications/files/utils/doc-textify/utils/clean.js +1 -5
  244. package/server/applications/files/utils/doc-textify/utils/clean.js.map +1 -1
  245. package/server/applications/files/utils/files-search.js +1 -5
  246. package/server/applications/files/utils/files-search.js.map +1 -1
  247. package/server/applications/files/utils/files-tree.js +1 -5
  248. package/server/applications/files/utils/files-tree.js.map +1 -1
  249. package/server/applications/files/utils/files.js +1 -5
  250. package/server/applications/files/utils/files.js.map +1 -1
  251. package/server/applications/files/utils/send-file.js +1 -5
  252. package/server/applications/files/utils/send-file.js.map +1 -1
  253. package/server/applications/files/utils/unzip-file.js +1 -5
  254. package/server/applications/files/utils/unzip-file.js.map +1 -1
  255. package/server/applications/files/utils/url-file.js +1 -5
  256. package/server/applications/files/utils/url-file.js.map +1 -1
  257. package/server/applications/links/constants/cache.js +1 -5
  258. package/server/applications/links/constants/cache.js.map +1 -1
  259. package/server/applications/links/constants/links.js +1 -5
  260. package/server/applications/links/constants/links.js.map +1 -1
  261. package/server/applications/links/constants/routes.js +1 -5
  262. package/server/applications/links/constants/routes.js.map +1 -1
  263. package/server/applications/links/dto/create-or-update-link.dto.js +1 -5
  264. package/server/applications/links/dto/create-or-update-link.dto.js.map +1 -1
  265. package/server/applications/links/interfaces/link-guest.interface.js +1 -5
  266. package/server/applications/links/interfaces/link-guest.interface.js.map +1 -1
  267. package/server/applications/links/interfaces/link-space.interface.js +1 -5
  268. package/server/applications/links/interfaces/link-space.interface.js.map +1 -1
  269. package/server/applications/links/links.controller.js +1 -5
  270. package/server/applications/links/links.controller.js.map +1 -1
  271. package/server/applications/links/links.controller.spec.js +1 -5
  272. package/server/applications/links/links.controller.spec.js.map +1 -1
  273. package/server/applications/links/schemas/link.interface.js +1 -5
  274. package/server/applications/links/schemas/link.interface.js.map +1 -1
  275. package/server/applications/links/schemas/links.schema.js +1 -5
  276. package/server/applications/links/schemas/links.schema.js.map +1 -1
  277. package/server/applications/links/services/links-manager.service.js +55 -20
  278. package/server/applications/links/services/links-manager.service.js.map +1 -1
  279. package/server/applications/links/services/links-manager.service.spec.js +3 -7
  280. package/server/applications/links/services/links-manager.service.spec.js.map +1 -1
  281. package/server/applications/links/services/links-queries.service.js +1 -5
  282. package/server/applications/links/services/links-queries.service.js.map +1 -1
  283. package/server/applications/notifications/constants/notifications.js +1 -5
  284. package/server/applications/notifications/constants/notifications.js.map +1 -1
  285. package/server/applications/notifications/constants/routes.js +1 -5
  286. package/server/applications/notifications/constants/routes.js.map +1 -1
  287. package/server/applications/notifications/constants/websocket.js +1 -5
  288. package/server/applications/notifications/constants/websocket.js.map +1 -1
  289. package/server/applications/notifications/i18n/de.js +1 -9
  290. package/server/applications/notifications/i18n/de.js.map +1 -1
  291. package/server/applications/notifications/i18n/es.js +1 -5
  292. package/server/applications/notifications/i18n/es.js.map +1 -1
  293. package/server/applications/notifications/i18n/fr.js +1 -5
  294. package/server/applications/notifications/i18n/fr.js.map +1 -1
  295. package/server/applications/notifications/i18n/hi.js +1 -5
  296. package/server/applications/notifications/i18n/hi.js.map +1 -1
  297. package/server/applications/notifications/i18n/index.js +1 -5
  298. package/server/applications/notifications/i18n/index.js.map +1 -1
  299. package/server/applications/notifications/i18n/it.js +1 -5
  300. package/server/applications/notifications/i18n/it.js.map +1 -1
  301. package/server/applications/notifications/i18n/ja.js +1 -5
  302. package/server/applications/notifications/i18n/ja.js.map +1 -1
  303. package/server/applications/notifications/i18n/ko.js +1 -5
  304. package/server/applications/notifications/i18n/ko.js.map +1 -1
  305. package/server/applications/notifications/i18n/pl.js +1 -5
  306. package/server/applications/notifications/i18n/pl.js.map +1 -1
  307. package/server/applications/notifications/i18n/pt.js +1 -5
  308. package/server/applications/notifications/i18n/pt.js.map +1 -1
  309. package/server/applications/notifications/i18n/pt_br.js +1 -5
  310. package/server/applications/notifications/i18n/pt_br.js.map +1 -1
  311. package/server/applications/notifications/i18n/ru.js +1 -5
  312. package/server/applications/notifications/i18n/ru.js.map +1 -1
  313. package/server/applications/notifications/i18n/tr.js +1 -5
  314. package/server/applications/notifications/i18n/tr.js.map +1 -1
  315. package/server/applications/notifications/i18n/zh.js +1 -5
  316. package/server/applications/notifications/i18n/zh.js.map +1 -1
  317. package/server/applications/notifications/interfaces/notification-properties.interface.js +1 -5
  318. package/server/applications/notifications/interfaces/notification-properties.interface.js.map +1 -1
  319. package/server/applications/notifications/interfaces/user-mail-notification.interface.js +1 -5
  320. package/server/applications/notifications/interfaces/user-mail-notification.interface.js.map +1 -1
  321. package/server/applications/notifications/mails/models.js +1 -5
  322. package/server/applications/notifications/mails/models.js.map +1 -1
  323. package/server/applications/notifications/mails/templates.js +1 -5
  324. package/server/applications/notifications/mails/templates.js.map +1 -1
  325. package/server/applications/notifications/mails/urls.js +1 -5
  326. package/server/applications/notifications/mails/urls.js.map +1 -1
  327. package/server/applications/notifications/notifications.controller.js +1 -5
  328. package/server/applications/notifications/notifications.controller.js.map +1 -1
  329. package/server/applications/notifications/notifications.controller.spec.js +1 -5
  330. package/server/applications/notifications/notifications.controller.spec.js.map +1 -1
  331. package/server/applications/notifications/notifications.gateway.js +1 -5
  332. package/server/applications/notifications/notifications.gateway.js.map +1 -1
  333. package/server/applications/notifications/notifications.module.js +1 -5
  334. package/server/applications/notifications/notifications.module.js.map +1 -1
  335. package/server/applications/notifications/schemas/notification.interface.js +1 -5
  336. package/server/applications/notifications/schemas/notification.interface.js.map +1 -1
  337. package/server/applications/notifications/schemas/notifications.schema.js +1 -5
  338. package/server/applications/notifications/schemas/notifications.schema.js.map +1 -1
  339. package/server/applications/notifications/services/notifications-manager.service.js +25 -11
  340. package/server/applications/notifications/services/notifications-manager.service.js.map +1 -1
  341. package/server/applications/notifications/services/notifications-manager.service.spec.js +20 -11
  342. package/server/applications/notifications/services/notifications-manager.service.spec.js.map +1 -1
  343. package/server/applications/notifications/services/notifications-queries.service.js +1 -5
  344. package/server/applications/notifications/services/notifications-queries.service.js.map +1 -1
  345. package/server/applications/shares/constants/routes.js +1 -5
  346. package/server/applications/shares/constants/routes.js.map +1 -1
  347. package/server/applications/shares/constants/shares.js +1 -5
  348. package/server/applications/shares/constants/shares.js.map +1 -1
  349. package/server/applications/shares/dto/create-or-update-share.dto.js +1 -5
  350. package/server/applications/shares/dto/create-or-update-share.dto.js.map +1 -1
  351. package/server/applications/shares/interfaces/share-child.interface.js +1 -5
  352. package/server/applications/shares/interfaces/share-child.interface.js.map +1 -1
  353. package/server/applications/shares/interfaces/share-env.interface.js +1 -5
  354. package/server/applications/shares/interfaces/share-env.interface.js.map +1 -1
  355. package/server/applications/shares/interfaces/share-file.interface.js +1 -5
  356. package/server/applications/shares/interfaces/share-file.interface.js.map +1 -1
  357. package/server/applications/shares/interfaces/share-link.interface.js +1 -5
  358. package/server/applications/shares/interfaces/share-link.interface.js.map +1 -1
  359. package/server/applications/shares/interfaces/share-props.interface.js +1 -5
  360. package/server/applications/shares/interfaces/share-props.interface.js.map +1 -1
  361. package/server/applications/shares/models/share-child.model.js +1 -5
  362. package/server/applications/shares/models/share-child.model.js.map +1 -1
  363. package/server/applications/shares/schemas/share-members.interface.js +1 -5
  364. package/server/applications/shares/schemas/share-members.interface.js.map +1 -1
  365. package/server/applications/shares/schemas/share.interface.js +1 -5
  366. package/server/applications/shares/schemas/share.interface.js.map +1 -1
  367. package/server/applications/shares/schemas/shares-members.schema.js +1 -5
  368. package/server/applications/shares/schemas/shares-members.schema.js.map +1 -1
  369. package/server/applications/shares/schemas/shares.schema.js +1 -5
  370. package/server/applications/shares/schemas/shares.schema.js.map +1 -1
  371. package/server/applications/shares/services/shares-manager.service.js +214 -68
  372. package/server/applications/shares/services/shares-manager.service.js.map +1 -1
  373. package/server/applications/shares/services/shares-manager.service.spec.js +1 -5
  374. package/server/applications/shares/services/shares-manager.service.spec.js.map +1 -1
  375. package/server/applications/shares/services/shares-queries.service.js +49 -17
  376. package/server/applications/shares/services/shares-queries.service.js.map +1 -1
  377. package/server/applications/shares/shares.controller.js +1 -5
  378. package/server/applications/shares/shares.controller.js.map +1 -1
  379. package/server/applications/shares/shares.controller.spec.js +1 -5
  380. package/server/applications/shares/shares.controller.spec.js.map +1 -1
  381. package/server/applications/shares/shares.module.js +1 -5
  382. package/server/applications/shares/shares.module.js.map +1 -1
  383. package/server/applications/spaces/constants/cache.js +1 -5
  384. package/server/applications/spaces/constants/cache.js.map +1 -1
  385. package/server/applications/spaces/constants/routes.js +1 -5
  386. package/server/applications/spaces/constants/routes.js.map +1 -1
  387. package/server/applications/spaces/constants/spaces.js +1 -5
  388. package/server/applications/spaces/constants/spaces.js.map +1 -1
  389. package/server/applications/spaces/decorators/space-override-permission.decorator.js +1 -5
  390. package/server/applications/spaces/decorators/space-override-permission.decorator.js.map +1 -1
  391. package/server/applications/spaces/decorators/space-skip-guard.decorator.js +1 -5
  392. package/server/applications/spaces/decorators/space-skip-guard.decorator.js.map +1 -1
  393. package/server/applications/spaces/decorators/space-skip-permissions.decorator.js +1 -5
  394. package/server/applications/spaces/decorators/space-skip-permissions.decorator.js.map +1 -1
  395. package/server/applications/spaces/decorators/space.decorator.js +1 -5
  396. package/server/applications/spaces/decorators/space.decorator.js.map +1 -1
  397. package/server/applications/spaces/dto/create-or-update-space.dto.js +1 -5
  398. package/server/applications/spaces/dto/create-or-update-space.dto.js.map +1 -1
  399. package/server/applications/spaces/dto/delete-space.dto.js +1 -5
  400. package/server/applications/spaces/dto/delete-space.dto.js.map +1 -1
  401. package/server/applications/spaces/dto/search-space.dto.js +1 -5
  402. package/server/applications/spaces/dto/search-space.dto.js.map +1 -1
  403. package/server/applications/spaces/dto/space-roots.dto.js +1 -5
  404. package/server/applications/spaces/dto/space-roots.dto.js.map +1 -1
  405. package/server/applications/spaces/guards/space.guard.js +17 -9
  406. package/server/applications/spaces/guards/space.guard.js.map +1 -1
  407. package/server/applications/spaces/guards/space.guard.spec.js +1 -5
  408. package/server/applications/spaces/guards/space.guard.spec.js.map +1 -1
  409. package/server/applications/spaces/interfaces/space-diff.interface.js +1 -5
  410. package/server/applications/spaces/interfaces/space-diff.interface.js.map +1 -1
  411. package/server/applications/spaces/interfaces/space-files.interface.js +1 -5
  412. package/server/applications/spaces/interfaces/space-files.interface.js.map +1 -1
  413. package/server/applications/spaces/interfaces/space-request.interface.js +1 -5
  414. package/server/applications/spaces/interfaces/space-request.interface.js.map +1 -1
  415. package/server/applications/spaces/interfaces/space-trash.interface.js +1 -5
  416. package/server/applications/spaces/interfaces/space-trash.interface.js.map +1 -1
  417. package/server/applications/spaces/models/space-env.model.js +1 -5
  418. package/server/applications/spaces/models/space-env.model.js.map +1 -1
  419. package/server/applications/spaces/models/space-props.model.js +1 -5
  420. package/server/applications/spaces/models/space-props.model.js.map +1 -1
  421. package/server/applications/spaces/models/space-root-props.model.js +1 -5
  422. package/server/applications/spaces/models/space-root-props.model.js.map +1 -1
  423. package/server/applications/spaces/models/space.model.js +1 -5
  424. package/server/applications/spaces/models/space.model.js.map +1 -1
  425. package/server/applications/spaces/schemas/space-members.interface.js +1 -5
  426. package/server/applications/spaces/schemas/space-members.interface.js.map +1 -1
  427. package/server/applications/spaces/schemas/space-root.interface.js +1 -5
  428. package/server/applications/spaces/schemas/space-root.interface.js.map +1 -1
  429. package/server/applications/spaces/schemas/space.interface.js +1 -5
  430. package/server/applications/spaces/schemas/space.interface.js.map +1 -1
  431. package/server/applications/spaces/schemas/spaces-members.schema.js +1 -5
  432. package/server/applications/spaces/schemas/spaces-members.schema.js.map +1 -1
  433. package/server/applications/spaces/schemas/spaces-roots.schema.js +1 -5
  434. package/server/applications/spaces/schemas/spaces-roots.schema.js.map +1 -1
  435. package/server/applications/spaces/schemas/spaces.schema.js +1 -5
  436. package/server/applications/spaces/schemas/spaces.schema.js.map +1 -1
  437. package/server/applications/spaces/services/spaces-browser.service.js +77 -24
  438. package/server/applications/spaces/services/spaces-browser.service.js.map +1 -1
  439. package/server/applications/spaces/services/spaces-browser.service.spec.js +1 -5
  440. package/server/applications/spaces/services/spaces-browser.service.spec.js.map +1 -1
  441. package/server/applications/spaces/services/spaces-manager.service.js +193 -53
  442. package/server/applications/spaces/services/spaces-manager.service.js.map +1 -1
  443. package/server/applications/spaces/services/spaces-manager.service.spec.js +1 -5
  444. package/server/applications/spaces/services/spaces-manager.service.spec.js.map +1 -1
  445. package/server/applications/spaces/services/spaces-queries.service.js +65 -21
  446. package/server/applications/spaces/services/spaces-queries.service.js.map +1 -1
  447. package/server/applications/spaces/services/spaces-scheduler.service.js +49 -17
  448. package/server/applications/spaces/services/spaces-scheduler.service.js.map +1 -1
  449. package/server/applications/spaces/spaces.controller.js +1 -5
  450. package/server/applications/spaces/spaces.controller.js.map +1 -1
  451. package/server/applications/spaces/spaces.controller.spec.js +1 -5
  452. package/server/applications/spaces/spaces.controller.spec.js.map +1 -1
  453. package/server/applications/spaces/spaces.module.js +1 -5
  454. package/server/applications/spaces/spaces.module.js.map +1 -1
  455. package/server/applications/spaces/utils/paths.js +1 -5
  456. package/server/applications/spaces/utils/paths.js.map +1 -1
  457. package/server/applications/spaces/utils/permissions.js +1 -5
  458. package/server/applications/spaces/utils/permissions.js.map +1 -1
  459. package/server/applications/spaces/utils/routes.js +1 -5
  460. package/server/applications/spaces/utils/routes.js.map +1 -1
  461. package/server/applications/sync/constants/auth.js +1 -5
  462. package/server/applications/sync/constants/auth.js.map +1 -1
  463. package/server/applications/sync/constants/routes.js +6 -5
  464. package/server/applications/sync/constants/routes.js.map +1 -1
  465. package/server/applications/sync/constants/store.js +1 -9
  466. package/server/applications/sync/constants/store.js.map +1 -1
  467. package/server/applications/sync/constants/sync.js +2 -6
  468. package/server/applications/sync/constants/sync.js.map +1 -1
  469. package/server/applications/sync/decorators/sync-context.decorator.js +1 -5
  470. package/server/applications/sync/decorators/sync-context.decorator.js.map +1 -1
  471. package/server/applications/sync/decorators/sync-environment.decorator.js +1 -5
  472. package/server/applications/sync/decorators/sync-environment.decorator.js.map +1 -1
  473. package/server/applications/sync/dtos/sync-client-auth.dto.js +12 -8
  474. package/server/applications/sync/dtos/sync-client-auth.dto.js.map +1 -1
  475. package/server/applications/sync/dtos/sync-client-info.dto.js +49 -0
  476. package/server/applications/sync/dtos/sync-client-info.dto.js.map +1 -0
  477. package/server/applications/sync/dtos/sync-client-registration.dto.js +34 -11
  478. package/server/applications/sync/dtos/sync-client-registration.dto.js.map +1 -1
  479. package/server/applications/sync/dtos/sync-operations.dto.js +1 -5
  480. package/server/applications/sync/dtos/sync-operations.dto.js.map +1 -1
  481. package/server/applications/sync/dtos/sync-path.dto.js +1 -5
  482. package/server/applications/sync/dtos/sync-path.dto.js.map +1 -1
  483. package/server/applications/sync/dtos/sync-upload.dto.js +1 -5
  484. package/server/applications/sync/dtos/sync-upload.dto.js.map +1 -1
  485. package/server/applications/sync/interceptors/sync-diff-gzip-body.interceptor.js +1 -5
  486. package/server/applications/sync/interceptors/sync-diff-gzip-body.interceptor.js.map +1 -1
  487. package/server/applications/sync/interceptors/sync-diff-gzip-body.interceptor.spec.js +1 -5
  488. package/server/applications/sync/interceptors/sync-diff-gzip-body.interceptor.spec.js.map +1 -1
  489. package/server/applications/sync/interfaces/store-manifest.interface.js +1 -5
  490. package/server/applications/sync/interfaces/store-manifest.interface.js.map +1 -1
  491. package/server/applications/sync/interfaces/sync-client-auth.interface.js +1 -25
  492. package/server/applications/sync/interfaces/sync-client-auth.interface.js.map +1 -1
  493. package/server/applications/sync/interfaces/sync-client-paths.interface.js +1 -5
  494. package/server/applications/sync/interfaces/sync-client-paths.interface.js.map +1 -1
  495. package/server/applications/sync/interfaces/sync-client.interface.js +1 -5
  496. package/server/applications/sync/interfaces/sync-client.interface.js.map +1 -1
  497. package/server/applications/sync/interfaces/sync-diff.interface.js +1 -5
  498. package/server/applications/sync/interfaces/sync-diff.interface.js.map +1 -1
  499. package/server/applications/sync/interfaces/sync-path.interface.js +1 -5
  500. package/server/applications/sync/interfaces/sync-path.interface.js.map +1 -1
  501. package/server/applications/sync/schemas/sync-client.interface.js +1 -5
  502. package/server/applications/sync/schemas/sync-client.interface.js.map +1 -1
  503. package/server/applications/sync/schemas/sync-clients.schema.js +1 -5
  504. package/server/applications/sync/schemas/sync-clients.schema.js.map +1 -1
  505. package/server/applications/sync/schemas/sync-path.interface.js +1 -5
  506. package/server/applications/sync/schemas/sync-path.interface.js.map +1 -1
  507. package/server/applications/sync/schemas/sync-paths.schema.js +1 -5
  508. package/server/applications/sync/schemas/sync-paths.schema.js.map +1 -1
  509. package/server/applications/sync/services/sync-clients-manager.service.js +108 -44
  510. package/server/applications/sync/services/sync-clients-manager.service.js.map +1 -1
  511. package/server/applications/sync/services/sync-clients-manager.service.spec.js +14 -17
  512. package/server/applications/sync/services/sync-clients-manager.service.spec.js.map +1 -1
  513. package/server/applications/sync/services/sync-manager.service.js +29 -12
  514. package/server/applications/sync/services/sync-manager.service.js.map +1 -1
  515. package/server/applications/sync/services/sync-manager.service.spec.js +1 -5
  516. package/server/applications/sync/services/sync-manager.service.spec.js.map +1 -1
  517. package/server/applications/sync/services/sync-paths-manager.service.js +27 -17
  518. package/server/applications/sync/services/sync-paths-manager.service.js.map +1 -1
  519. package/server/applications/sync/services/sync-paths-manager.service.spec.js +11 -15
  520. package/server/applications/sync/services/sync-paths-manager.service.spec.js.map +1 -1
  521. package/server/applications/sync/services/sync-queries.service.js +1 -5
  522. package/server/applications/sync/services/sync-queries.service.js.map +1 -1
  523. package/server/applications/sync/sync.config.js +1 -5
  524. package/server/applications/sync/sync.config.js.map +1 -1
  525. package/server/applications/sync/sync.controller.js +21 -6
  526. package/server/applications/sync/sync.controller.js.map +1 -1
  527. package/server/applications/sync/sync.controller.spec.js +1 -5
  528. package/server/applications/sync/sync.controller.spec.js.map +1 -1
  529. package/server/applications/sync/sync.module.js +1 -5
  530. package/server/applications/sync/sync.module.js.map +1 -1
  531. package/server/applications/sync/utils/functions.js +1 -5
  532. package/server/applications/sync/utils/functions.js.map +1 -1
  533. package/server/applications/sync/utils/normalizedMap.js +1 -5
  534. package/server/applications/sync/utils/normalizedMap.js.map +1 -1
  535. package/server/applications/sync/utils/routes.js +1 -5
  536. package/server/applications/sync/utils/routes.js.map +1 -1
  537. package/server/applications/users/admin-users.controller.js +2 -6
  538. package/server/applications/users/admin-users.controller.js.map +1 -1
  539. package/server/applications/users/admin-users.controller.spec.js +6 -10
  540. package/server/applications/users/admin-users.controller.spec.js.map +1 -1
  541. package/server/applications/users/constants/group.js +1 -5
  542. package/server/applications/users/constants/group.js.map +1 -1
  543. package/server/applications/users/constants/member.js +1 -5
  544. package/server/applications/users/constants/member.js.map +1 -1
  545. package/server/applications/users/constants/routes.js +1 -5
  546. package/server/applications/users/constants/routes.js.map +1 -1
  547. package/server/applications/users/constants/user.js +1 -5
  548. package/server/applications/users/constants/user.js.map +1 -1
  549. package/server/applications/users/constants/websocket.js +1 -5
  550. package/server/applications/users/constants/websocket.js.map +1 -1
  551. package/server/applications/users/decorators/permissions.decorator.js +1 -5
  552. package/server/applications/users/decorators/permissions.decorator.js.map +1 -1
  553. package/server/applications/users/decorators/roles.decorator.js +1 -5
  554. package/server/applications/users/decorators/roles.decorator.js.map +1 -1
  555. package/server/applications/users/decorators/user.decorator.js +1 -5
  556. package/server/applications/users/decorators/user.decorator.js.map +1 -1
  557. package/server/applications/users/dto/create-or-update-group.dto.js +1 -5
  558. package/server/applications/users/dto/create-or-update-group.dto.js.map +1 -1
  559. package/server/applications/users/dto/create-or-update-user.dto.js +1 -5
  560. package/server/applications/users/dto/create-or-update-user.dto.js.map +1 -1
  561. package/server/applications/users/dto/delete-user.dto.js +1 -5
  562. package/server/applications/users/dto/delete-user.dto.js.map +1 -1
  563. package/server/applications/users/dto/search-members.dto.js +1 -5
  564. package/server/applications/users/dto/search-members.dto.js.map +1 -1
  565. package/server/applications/users/dto/user-properties.dto.js +1 -5
  566. package/server/applications/users/dto/user-properties.dto.js.map +1 -1
  567. package/server/applications/users/guards/permissions.guard.js +1 -5
  568. package/server/applications/users/guards/permissions.guard.js.map +1 -1
  569. package/server/applications/users/guards/permissions.guard.spec.js +1 -5
  570. package/server/applications/users/guards/permissions.guard.spec.js.map +1 -1
  571. package/server/applications/users/guards/roles.guard.js +1 -5
  572. package/server/applications/users/guards/roles.guard.js.map +1 -1
  573. package/server/applications/users/guards/roles.guard.spec.js +1 -5
  574. package/server/applications/users/guards/roles.guard.spec.js.map +1 -1
  575. package/server/applications/users/interfaces/admin-group.interface.js +1 -5
  576. package/server/applications/users/interfaces/admin-group.interface.js.map +1 -1
  577. package/server/applications/users/interfaces/admin-user.interface.js +1 -5
  578. package/server/applications/users/interfaces/admin-user.interface.js.map +1 -1
  579. package/server/applications/users/interfaces/group-browse.interface.js +1 -5
  580. package/server/applications/users/interfaces/group-browse.interface.js.map +1 -1
  581. package/server/applications/users/interfaces/group-member.js +1 -5
  582. package/server/applications/users/interfaces/group-member.js.map +1 -1
  583. package/server/applications/users/interfaces/guest-user.interface.js +1 -5
  584. package/server/applications/users/interfaces/guest-user.interface.js.map +1 -1
  585. package/server/applications/users/interfaces/member.interface.js +1 -5
  586. package/server/applications/users/interfaces/member.interface.js.map +1 -1
  587. package/server/applications/users/interfaces/owner.interface.js +1 -5
  588. package/server/applications/users/interfaces/owner.interface.js.map +1 -1
  589. package/server/applications/users/interfaces/user-secrets.interface.js +1 -5
  590. package/server/applications/users/interfaces/user-secrets.interface.js.map +1 -1
  591. package/server/applications/users/interfaces/websocket.interface.js +1 -5
  592. package/server/applications/users/interfaces/websocket.interface.js.map +1 -1
  593. package/server/applications/users/models/user.model.js +1 -5
  594. package/server/applications/users/models/user.model.js.map +1 -1
  595. package/server/applications/users/schemas/group.interface.js +1 -5
  596. package/server/applications/users/schemas/group.interface.js.map +1 -1
  597. package/server/applications/users/schemas/groups.schema.js +1 -5
  598. package/server/applications/users/schemas/groups.schema.js.map +1 -1
  599. package/server/applications/users/schemas/user-group.interface.js +1 -5
  600. package/server/applications/users/schemas/user-group.interface.js.map +1 -1
  601. package/server/applications/users/schemas/user.interface.js +1 -5
  602. package/server/applications/users/schemas/user.interface.js.map +1 -1
  603. package/server/applications/users/schemas/users-groups.schema.js +1 -5
  604. package/server/applications/users/schemas/users-groups.schema.js.map +1 -1
  605. package/server/applications/users/schemas/users-guests.schema.js +1 -5
  606. package/server/applications/users/schemas/users-guests.schema.js.map +1 -1
  607. package/server/applications/users/schemas/users.schema.js +1 -5
  608. package/server/applications/users/schemas/users.schema.js.map +1 -1
  609. package/server/applications/users/services/admin-users-manager.service.js +67 -23
  610. package/server/applications/users/services/admin-users-manager.service.js.map +1 -1
  611. package/server/applications/users/services/admin-users-manager.service.spec.js +3 -7
  612. package/server/applications/users/services/admin-users-manager.service.spec.js.map +1 -1
  613. package/server/applications/users/services/admin-users-queries.service.js +65 -21
  614. package/server/applications/users/services/admin-users-queries.service.js.map +1 -1
  615. package/server/applications/users/services/users-manager.service.js +81 -25
  616. package/server/applications/users/services/users-manager.service.js.map +1 -1
  617. package/server/applications/users/services/users-manager.service.spec.js +14 -12
  618. package/server/applications/users/services/users-manager.service.spec.js.map +1 -1
  619. package/server/applications/users/services/users-queries.service.js +49 -17
  620. package/server/applications/users/services/users-queries.service.js.map +1 -1
  621. package/server/applications/users/users.controller.js +2 -6
  622. package/server/applications/users/users.controller.js.map +1 -1
  623. package/server/applications/users/users.controller.spec.js +5 -9
  624. package/server/applications/users/users.controller.spec.js.map +1 -1
  625. package/server/applications/users/users.e2e-spec.js +3 -7
  626. package/server/applications/users/users.e2e-spec.js.map +1 -1
  627. package/server/applications/users/users.gateway.js +29 -12
  628. package/server/applications/users/users.gateway.js.map +1 -1
  629. package/server/applications/users/users.gateway.spec.js +1 -5
  630. package/server/applications/users/users.gateway.spec.js.map +1 -1
  631. package/server/applications/users/users.module.js +1 -5
  632. package/server/applications/users/users.module.js.map +1 -1
  633. package/server/applications/users/utils/avatar.js +1 -5
  634. package/server/applications/users/utils/avatar.js.map +1 -1
  635. package/server/applications/users/utils/test.js +1 -5
  636. package/server/applications/users/utils/test.js.map +1 -1
  637. package/server/applications/webdav/constants/routes.js +1 -5
  638. package/server/applications/webdav/constants/routes.js.map +1 -1
  639. package/server/applications/webdav/constants/webdav.js +1 -5
  640. package/server/applications/webdav/constants/webdav.js.map +1 -1
  641. package/server/applications/webdav/decorators/if-header.decorator.js +1 -5
  642. package/server/applications/webdav/decorators/if-header.decorator.js.map +1 -1
  643. package/server/applications/webdav/decorators/webdav-context.decorator.js +1 -5
  644. package/server/applications/webdav/decorators/webdav-context.decorator.js.map +1 -1
  645. package/server/applications/webdav/filters/webdav.filter.js +1 -5
  646. package/server/applications/webdav/filters/webdav.filter.js.map +1 -1
  647. package/server/applications/webdav/filters/webdav.filter.spec.js +1 -5
  648. package/server/applications/webdav/filters/webdav.filter.spec.js.map +1 -1
  649. package/server/applications/webdav/guards/webdav-protocol.guard.js +54 -20
  650. package/server/applications/webdav/guards/webdav-protocol.guard.js.map +1 -1
  651. package/server/applications/webdav/guards/webdav-protocol.guard.spec.js +54 -0
  652. package/server/applications/webdav/guards/webdav-protocol.guard.spec.js.map +1 -1
  653. package/server/applications/webdav/interfaces/if-header.interface.js +1 -5
  654. package/server/applications/webdav/interfaces/if-header.interface.js.map +1 -1
  655. package/server/applications/webdav/interfaces/webdav.interface.js +1 -5
  656. package/server/applications/webdav/interfaces/webdav.interface.js.map +1 -1
  657. package/server/applications/webdav/models/webdav-file.model.js +1 -5
  658. package/server/applications/webdav/models/webdav-file.model.js.map +1 -1
  659. package/server/applications/webdav/services/webdav-methods.service.js +74 -26
  660. package/server/applications/webdav/services/webdav-methods.service.js.map +1 -1
  661. package/server/applications/webdav/services/webdav-methods.service.spec.js +15 -18
  662. package/server/applications/webdav/services/webdav-methods.service.spec.js.map +1 -1
  663. package/server/applications/webdav/services/webdav-spaces.service.js +17 -9
  664. package/server/applications/webdav/services/webdav-spaces.service.js.map +1 -1
  665. package/server/applications/webdav/services/webdav-spaces.service.spec.js +1 -5
  666. package/server/applications/webdav/services/webdav-spaces.service.spec.js.map +1 -1
  667. package/server/applications/webdav/utils/bootstrap.js +1 -5
  668. package/server/applications/webdav/utils/bootstrap.js.map +1 -1
  669. package/server/applications/webdav/utils/if-header.js +1 -5
  670. package/server/applications/webdav/utils/if-header.js.map +1 -1
  671. package/server/applications/webdav/utils/routes.js +1 -5
  672. package/server/applications/webdav/utils/routes.js.map +1 -1
  673. package/server/applications/webdav/utils/webdav.js +1 -5
  674. package/server/applications/webdav/utils/webdav.js.map +1 -1
  675. package/server/applications/webdav/utils/xml.js +1 -5
  676. package/server/applications/webdav/utils/xml.js.map +1 -1
  677. package/server/applications/webdav/webdav.controller.js +1 -5
  678. package/server/applications/webdav/webdav.controller.js.map +1 -1
  679. package/server/applications/webdav/webdav.controller.spec.js +1 -5
  680. package/server/applications/webdav/webdav.controller.spec.js.map +1 -1
  681. package/server/applications/webdav/webdav.e2e-spec.js +1 -5
  682. package/server/applications/webdav/webdav.e2e-spec.js.map +1 -1
  683. package/server/applications/webdav/webdav.module.js +1 -5
  684. package/server/applications/webdav/webdav.module.js.map +1 -1
  685. package/server/authentication/auth.config.js +23 -123
  686. package/server/authentication/auth.config.js.map +1 -1
  687. package/server/authentication/auth.controller.js +27 -21
  688. package/server/authentication/auth.controller.js.map +1 -1
  689. package/server/authentication/auth.controller.spec.js +6 -10
  690. package/server/authentication/auth.controller.spec.js.map +1 -1
  691. package/server/authentication/auth.e2e-spec.js +1 -5
  692. package/server/authentication/auth.e2e-spec.js.map +1 -1
  693. package/server/authentication/auth.module.js +17 -20
  694. package/server/authentication/auth.module.js.map +1 -1
  695. package/server/authentication/{services/auth-manager.service.js → auth.service.js} +41 -18
  696. package/server/authentication/auth.service.js.map +1 -0
  697. package/server/authentication/{services/auth-manager.service.spec.js → auth.service.spec.js} +6 -10
  698. package/server/authentication/auth.service.spec.js.map +1 -0
  699. package/server/authentication/constants/auth.js +1 -5
  700. package/server/authentication/constants/auth.js.map +1 -1
  701. package/server/authentication/constants/routes.js +41 -30
  702. package/server/authentication/constants/routes.js.map +1 -1
  703. package/server/authentication/constants/scope.js +2 -5
  704. package/server/authentication/constants/scope.js.map +1 -1
  705. package/server/authentication/decorators/auth-token-optional.decorator.js +1 -5
  706. package/server/authentication/decorators/auth-token-optional.decorator.js.map +1 -1
  707. package/server/authentication/decorators/auth-token-skip.decorator.js +1 -5
  708. package/server/authentication/decorators/auth-token-skip.decorator.js.map +1 -1
  709. package/server/authentication/dto/login-response.dto.js +1 -10
  710. package/server/authentication/dto/login-response.dto.js.map +1 -1
  711. package/server/authentication/dto/token-response.dto.js +1 -5
  712. package/server/authentication/dto/token-response.dto.js.map +1 -1
  713. package/server/authentication/guards/auth-anonymous.guard.js +1 -5
  714. package/server/authentication/guards/auth-anonymous.guard.js.map +1 -1
  715. package/server/authentication/guards/auth-anonymous.guard.spec.js +1 -5
  716. package/server/authentication/guards/auth-anonymous.guard.spec.js.map +1 -1
  717. package/server/authentication/guards/auth-anonymous.strategy.js +1 -5
  718. package/server/authentication/guards/auth-anonymous.strategy.js.map +1 -1
  719. package/server/authentication/guards/auth-basic.guard.js +1 -5
  720. package/server/authentication/guards/auth-basic.guard.js.map +1 -1
  721. package/server/authentication/guards/auth-basic.guard.spec.js +13 -14
  722. package/server/authentication/guards/auth-basic.guard.spec.js.map +1 -1
  723. package/server/authentication/guards/auth-basic.strategy.js +10 -11
  724. package/server/authentication/guards/auth-basic.strategy.js.map +1 -1
  725. package/server/authentication/guards/auth-digest.guard.js +1 -5
  726. package/server/authentication/guards/auth-digest.guard.js.map +1 -1
  727. package/server/authentication/guards/auth-digest.strategy.js +1 -5
  728. package/server/authentication/guards/auth-digest.strategy.js.map +1 -1
  729. package/server/authentication/guards/auth-local.guard.js +1 -5
  730. package/server/authentication/guards/auth-local.guard.js.map +1 -1
  731. package/server/authentication/guards/auth-local.guard.spec.js +9 -13
  732. package/server/authentication/guards/auth-local.guard.spec.js.map +1 -1
  733. package/server/authentication/guards/auth-local.strategy.js +6 -10
  734. package/server/authentication/guards/auth-local.strategy.js.map +1 -1
  735. package/server/authentication/guards/auth-token-access.guard.js +1 -5
  736. package/server/authentication/guards/auth-token-access.guard.js.map +1 -1
  737. package/server/authentication/guards/auth-token-access.guard.spec.js +3 -7
  738. package/server/authentication/guards/auth-token-access.guard.spec.js.map +1 -1
  739. package/server/authentication/guards/auth-token-access.strategy.js +3 -7
  740. package/server/authentication/guards/auth-token-access.strategy.js.map +1 -1
  741. package/server/authentication/guards/auth-token-refresh.guard.js +1 -5
  742. package/server/authentication/guards/auth-token-refresh.guard.js.map +1 -1
  743. package/server/authentication/guards/auth-token-refresh.guard.spec.js +3 -7
  744. package/server/authentication/guards/auth-token-refresh.guard.spec.js.map +1 -1
  745. package/server/authentication/guards/auth-token-refresh.strategy.js +3 -7
  746. package/server/authentication/guards/auth-token-refresh.strategy.js.map +1 -1
  747. package/server/authentication/guards/implementations/http-basic.strategy.js +1 -5
  748. package/server/authentication/guards/implementations/http-basic.strategy.js.map +1 -1
  749. package/server/authentication/guards/implementations/http-digest.strategy.js +1 -5
  750. package/server/authentication/guards/implementations/http-digest.strategy.js.map +1 -1
  751. package/server/authentication/interfaces/auth-request.interface.js +1 -5
  752. package/server/authentication/interfaces/auth-request.interface.js.map +1 -1
  753. package/server/authentication/interfaces/jwt-payload.interface.js +1 -5
  754. package/server/authentication/interfaces/jwt-payload.interface.js.map +1 -1
  755. package/server/authentication/interfaces/token.interface.js +1 -5
  756. package/server/authentication/interfaces/token.interface.js.map +1 -1
  757. package/server/authentication/providers/auth-providers.constants.js +18 -0
  758. package/server/authentication/providers/auth-providers.constants.js.map +1 -0
  759. package/server/authentication/providers/auth-providers.models.js +14 -0
  760. package/server/authentication/providers/auth-providers.models.js.map +1 -0
  761. package/server/authentication/providers/auth-providers.utils.js +42 -0
  762. package/server/authentication/providers/auth-providers.utils.js.map +1 -0
  763. package/server/authentication/providers/ldap/auth-ldap.config.js +143 -0
  764. package/server/authentication/providers/ldap/auth-ldap.config.js.map +1 -0
  765. package/server/authentication/{constants/auth-ldap.js → providers/ldap/auth-ldap.constants.js} +12 -6
  766. package/server/authentication/providers/ldap/auth-ldap.constants.js.map +1 -0
  767. package/server/authentication/providers/ldap/auth-provider-ldap.service.js +506 -0
  768. package/server/authentication/providers/ldap/auth-provider-ldap.service.js.map +1 -0
  769. package/server/authentication/providers/ldap/auth-provider-ldap.service.spec.js +674 -0
  770. package/server/authentication/providers/ldap/auth-provider-ldap.service.spec.js.map +1 -0
  771. package/server/authentication/{services/auth-methods/auth-method-database.service.js → providers/mysql/auth-provider-mysql.service.js} +16 -14
  772. package/server/authentication/providers/mysql/auth-provider-mysql.service.js.map +1 -0
  773. package/server/authentication/{services/auth-methods/auth-method-database.service.spec.js → providers/mysql/auth-provider-mysql.service.spec.js} +15 -19
  774. package/server/authentication/providers/mysql/auth-provider-mysql.service.spec.js.map +1 -0
  775. package/server/authentication/providers/oidc/auth-oidc-desktop.constants.js +30 -0
  776. package/server/authentication/providers/oidc/auth-oidc-desktop.constants.js.map +1 -0
  777. package/server/authentication/providers/oidc/auth-oidc.config.js +149 -0
  778. package/server/authentication/providers/oidc/auth-oidc.config.js.map +1 -0
  779. package/server/authentication/providers/oidc/auth-oidc.constants.js +39 -0
  780. package/server/authentication/providers/oidc/auth-oidc.constants.js.map +1 -0
  781. package/server/authentication/providers/oidc/auth-oidc.controller.js +83 -0
  782. package/server/authentication/providers/oidc/auth-oidc.controller.js.map +1 -0
  783. package/server/authentication/providers/oidc/auth-oidc.interfaces.js +6 -0
  784. package/server/authentication/providers/oidc/auth-oidc.interfaces.js.map +1 -0
  785. package/server/authentication/providers/oidc/auth-provider-oidc.module.js +36 -0
  786. package/server/authentication/providers/oidc/auth-provider-oidc.module.js.map +1 -0
  787. package/server/authentication/providers/oidc/auth-provider-oidc.service.js +373 -0
  788. package/server/authentication/providers/oidc/auth-provider-oidc.service.js.map +1 -0
  789. package/server/authentication/providers/oidc/auth-provider-oidc.service.spec.js +270 -0
  790. package/server/authentication/providers/oidc/auth-provider-oidc.service.spec.js.map +1 -0
  791. package/server/authentication/{services/auth-methods/auth-method-two-fa.service.js → providers/two-fa/auth-provider-two-fa.service.js} +56 -38
  792. package/server/authentication/providers/two-fa/auth-provider-two-fa.service.js.map +1 -0
  793. package/server/authentication/{services/auth-methods/auth-method-two-fa.service.spec.js → providers/two-fa/auth-provider-two-fa.service.spec.js} +6 -10
  794. package/server/authentication/providers/two-fa/auth-provider-two-fa.service.spec.js.map +1 -0
  795. package/server/authentication/{guards → providers/two-fa}/auth-two-fa-guard.js +10 -14
  796. package/server/authentication/providers/two-fa/auth-two-fa-guard.js.map +1 -0
  797. package/server/authentication/providers/two-fa/auth-two-fa.config.js +57 -0
  798. package/server/authentication/providers/two-fa/auth-two-fa.config.js.map +1 -0
  799. package/server/authentication/{dto/two-fa-verify.dto.js → providers/two-fa/auth-two-fa.dtos.js} +8 -6
  800. package/server/authentication/providers/two-fa/auth-two-fa.dtos.js.map +1 -0
  801. package/server/authentication/providers/two-fa/auth-two-fa.interfaces.js +6 -0
  802. package/server/authentication/providers/two-fa/auth-two-fa.interfaces.js.map +1 -0
  803. package/server/authentication/utils/crypt-secret.js +1 -5
  804. package/server/authentication/utils/crypt-secret.js.map +1 -1
  805. package/server/common/constants.js +1 -5
  806. package/server/common/constants.js.map +1 -1
  807. package/server/common/decorators.js +1 -5
  808. package/server/common/decorators.js.map +1 -1
  809. package/server/common/functions.js +25 -9
  810. package/server/common/functions.js.map +1 -1
  811. package/server/common/i18n.js +1 -5
  812. package/server/common/i18n.js.map +1 -1
  813. package/server/common/image.js +1 -5
  814. package/server/common/image.js.map +1 -1
  815. package/server/common/interfaces.js +1 -5
  816. package/server/common/interfaces.js.map +1 -1
  817. package/server/common/qrcode.js +1 -5
  818. package/server/common/qrcode.js.map +1 -1
  819. package/server/common/shared.js +6 -6
  820. package/server/common/shared.js.map +1 -1
  821. package/server/configuration/config.constants.js +1 -5
  822. package/server/configuration/config.constants.js.map +1 -1
  823. package/server/configuration/config.environment.js +2 -6
  824. package/server/configuration/config.environment.js.map +1 -1
  825. package/server/configuration/config.interfaces.js +1 -5
  826. package/server/configuration/config.interfaces.js.map +1 -1
  827. package/server/configuration/config.loader.js +1 -5
  828. package/server/configuration/config.loader.js.map +1 -1
  829. package/server/configuration/config.logger.js +4 -8
  830. package/server/configuration/config.logger.js.map +1 -1
  831. package/server/configuration/config.validation.js +7 -5
  832. package/server/configuration/config.validation.js.map +1 -1
  833. package/server/infrastructure/cache/adapters/mysql-cache.adapter.js +9 -7
  834. package/server/infrastructure/cache/adapters/mysql-cache.adapter.js.map +1 -1
  835. package/server/infrastructure/cache/adapters/redis-cache.adapter.js +1 -5
  836. package/server/infrastructure/cache/adapters/redis-cache.adapter.js.map +1 -1
  837. package/server/infrastructure/cache/cache.config.js +1 -5
  838. package/server/infrastructure/cache/cache.config.js.map +1 -1
  839. package/server/infrastructure/cache/cache.decorator.js +9 -7
  840. package/server/infrastructure/cache/cache.decorator.js.map +1 -1
  841. package/server/infrastructure/cache/cache.e2e-spec.js +1 -5
  842. package/server/infrastructure/cache/cache.e2e-spec.js.map +1 -1
  843. package/server/infrastructure/cache/cache.module.js +1 -5
  844. package/server/infrastructure/cache/cache.module.js.map +1 -1
  845. package/server/infrastructure/cache/schemas/mysql-cache.interface.js +1 -5
  846. package/server/infrastructure/cache/schemas/mysql-cache.interface.js.map +1 -1
  847. package/server/infrastructure/cache/schemas/mysql-cache.schema.js +1 -5
  848. package/server/infrastructure/cache/schemas/mysql-cache.schema.js.map +1 -1
  849. package/server/infrastructure/cache/services/cache.service.js +1 -5
  850. package/server/infrastructure/cache/services/cache.service.js.map +1 -1
  851. package/server/infrastructure/context/context.module.js +1 -5
  852. package/server/infrastructure/context/context.module.js.map +1 -1
  853. package/server/infrastructure/context/interceptors/context.interceptor.js +1 -5
  854. package/server/infrastructure/context/interceptors/context.interceptor.js.map +1 -1
  855. package/server/infrastructure/context/interceptors/context.interceptor.spec.js +2 -6
  856. package/server/infrastructure/context/interceptors/context.interceptor.spec.js.map +1 -1
  857. package/server/infrastructure/context/interfaces/context-store.interface.js +1 -5
  858. package/server/infrastructure/context/interfaces/context-store.interface.js.map +1 -1
  859. package/server/infrastructure/context/services/context-manager.service.js +1 -5
  860. package/server/infrastructure/context/services/context-manager.service.js.map +1 -1
  861. package/server/infrastructure/context/services/context-manager.service.spec.js +1 -5
  862. package/server/infrastructure/context/services/context-manager.service.spec.js.map +1 -1
  863. package/server/infrastructure/database/columns.js +1 -5
  864. package/server/infrastructure/database/columns.js.map +1 -1
  865. package/server/infrastructure/database/configuration.js +1 -5
  866. package/server/infrastructure/database/configuration.js.map +1 -1
  867. package/server/infrastructure/database/constants.js +2 -6
  868. package/server/infrastructure/database/constants.js.map +1 -1
  869. package/server/infrastructure/database/database.config.js +1 -5
  870. package/server/infrastructure/database/database.config.js.map +1 -1
  871. package/server/infrastructure/database/database.logger.js +1 -5
  872. package/server/infrastructure/database/database.logger.js.map +1 -1
  873. package/server/infrastructure/database/database.module.js +1 -5
  874. package/server/infrastructure/database/database.module.js.map +1 -1
  875. package/server/infrastructure/database/interfaces/database.interface.js +1 -5
  876. package/server/infrastructure/database/interfaces/database.interface.js.map +1 -1
  877. package/server/infrastructure/database/schema.js +1 -5
  878. package/server/infrastructure/database/schema.js.map +1 -1
  879. package/server/infrastructure/database/scripts/create-user.js +1 -5
  880. package/server/infrastructure/database/scripts/create-user.js.map +1 -1
  881. package/server/infrastructure/database/scripts/db.js +1 -5
  882. package/server/infrastructure/database/scripts/db.js.map +1 -1
  883. package/server/infrastructure/database/scripts/seed/main.js +1 -5
  884. package/server/infrastructure/database/scripts/seed/main.js.map +1 -1
  885. package/server/infrastructure/database/scripts/seed/usersgroups.js +1 -5
  886. package/server/infrastructure/database/scripts/seed/usersgroups.js.map +1 -1
  887. package/server/infrastructure/database/utils.js +1 -5
  888. package/server/infrastructure/database/utils.js.map +1 -1
  889. package/server/infrastructure/mailer/interfaces/mail.interface.js +1 -5
  890. package/server/infrastructure/mailer/interfaces/mail.interface.js.map +1 -1
  891. package/server/infrastructure/mailer/mailer.config.js +1 -5
  892. package/server/infrastructure/mailer/mailer.config.js.map +1 -1
  893. package/server/infrastructure/mailer/mailer.module.js +1 -5
  894. package/server/infrastructure/mailer/mailer.module.js.map +1 -1
  895. package/server/infrastructure/mailer/mailer.service.js +1 -5
  896. package/server/infrastructure/mailer/mailer.service.js.map +1 -1
  897. package/server/infrastructure/mailer/mailer.service.spec.js +2 -6
  898. package/server/infrastructure/mailer/mailer.service.spec.js.map +1 -1
  899. package/server/infrastructure/scheduler/scheduler.constants.js +1 -5
  900. package/server/infrastructure/scheduler/scheduler.constants.js.map +1 -1
  901. package/server/infrastructure/scheduler/scheduler.module.js +1 -5
  902. package/server/infrastructure/scheduler/scheduler.module.js.map +1 -1
  903. package/server/infrastructure/websocket/adapters/cluster.adapter.js +1 -5
  904. package/server/infrastructure/websocket/adapters/cluster.adapter.js.map +1 -1
  905. package/server/infrastructure/websocket/adapters/redis.adapter.js +1 -5
  906. package/server/infrastructure/websocket/adapters/redis.adapter.js.map +1 -1
  907. package/server/infrastructure/websocket/adapters/web-socket.adapter.js +1 -5
  908. package/server/infrastructure/websocket/adapters/web-socket.adapter.js.map +1 -1
  909. package/server/infrastructure/websocket/decorators/web-socket-user.decorator.js +1 -5
  910. package/server/infrastructure/websocket/decorators/web-socket-user.decorator.js.map +1 -1
  911. package/server/infrastructure/websocket/interfaces/auth-socket-io.interface.js +1 -5
  912. package/server/infrastructure/websocket/interfaces/auth-socket-io.interface.js.map +1 -1
  913. package/server/infrastructure/websocket/utils.js +1 -5
  914. package/server/infrastructure/websocket/utils.js.map +1 -1
  915. package/server/infrastructure/websocket/web-socket.config.js +1 -5
  916. package/server/infrastructure/websocket/web-socket.config.js.map +1 -1
  917. package/server/main.js +5 -0
  918. package/server/main.js.map +1 -1
  919. package/static/assets/pdfjs/build/pdf.mjs +724 -745
  920. package/static/assets/pdfjs/build/pdf.mjs.map +1 -1
  921. package/static/assets/pdfjs/build/pdf.sandbox.mjs +2 -2
  922. package/static/assets/pdfjs/build/pdf.worker.mjs +706 -193
  923. package/static/assets/pdfjs/build/pdf.worker.mjs.map +1 -1
  924. package/static/assets/pdfjs/version +1 -1
  925. package/static/assets/pdfjs/web/locale/dsb/viewer.ftl +5 -5
  926. package/static/assets/pdfjs/web/locale/en-US/viewer.ftl +1 -0
  927. package/static/assets/pdfjs/web/locale/fur/viewer.ftl +5 -0
  928. package/static/assets/pdfjs/web/locale/kk/viewer.ftl +28 -0
  929. package/static/assets/pdfjs/web/locale/ml/viewer.ftl +4 -0
  930. package/static/assets/pdfjs/web/locale/ru/viewer.ftl +3 -3
  931. package/static/assets/pdfjs/web/viewer.css +207 -65
  932. package/static/assets/pdfjs/web/viewer.html +11 -10
  933. package/static/assets/pdfjs/web/viewer.mjs +850 -270
  934. package/static/assets/pdfjs/web/viewer.mjs.map +1 -1
  935. package/static/assets/pdfjs/web/wasm/LICENSE_JBIG2 +196 -0
  936. package/static/assets/pdfjs/web/wasm/LICENSE_PDFJS_JBIG2 +13 -0
  937. package/static/assets/pdfjs/web/wasm/jbig2.wasm +0 -0
  938. package/static/chunk-22TZP6HW.js +1 -0
  939. package/static/{chunk-G7TLKY5X.js → chunk-27ATUHBH.js} +1 -1
  940. package/static/{chunk-CQOQXVYG.js → chunk-2CKLZ3FM.js} +1 -1
  941. package/static/{chunk-FVFOX6OP.js → chunk-2QZPX7LO.js} +1 -1
  942. package/static/{chunk-32AVRWC3.js → chunk-2R6IBBPZ.js} +1 -1
  943. package/static/{chunk-76JDXKD7.js → chunk-4FIGEBNL.js} +1 -1
  944. package/static/{chunk-ACCGBDUZ.js → chunk-4P3JABAP.js} +4 -4
  945. package/static/chunk-5CZOSAMZ.js +1 -0
  946. package/static/{chunk-2PDTP6N4.js → chunk-677WUBCT.js} +1 -1
  947. package/static/{chunk-K5VO5XTG.js → chunk-74CAHBFM.js} +1 -1
  948. package/static/{chunk-WTWGBCFO.js → chunk-7GWW6MJO.js} +1 -1
  949. package/static/{chunk-JXZOYX4N.js → chunk-A4UGPSWX.js} +1 -1
  950. package/static/{chunk-44D7RWET.js → chunk-AHO37FKW.js} +1 -1
  951. package/static/{chunk-WB2DECOA.js → chunk-AQCXMKP3.js} +1 -1
  952. package/static/chunk-B6PDYCRO.js +3 -0
  953. package/static/{chunk-JVGN5V5E.js → chunk-CU76ATCF.js} +1 -1
  954. package/static/{chunk-Q5K4ZUHK.js → chunk-CWYHOPOP.js} +1 -1
  955. package/static/{chunk-IOX3ANJR.js → chunk-E5WI5725.js} +1 -1
  956. package/static/{chunk-NUG54Y65.js → chunk-FC5HTKVM.js} +1 -1
  957. package/static/{chunk-LRK6RNPR.js → chunk-FOSM7EYI.js} +1 -1
  958. package/static/{chunk-B4UP2EQM.js → chunk-GAZO25PI.js} +1 -1
  959. package/static/{chunk-3WBCGTYW.js → chunk-GB7ABR5N.js} +1 -1
  960. package/static/{chunk-XFZ37WVK.js → chunk-GEHFKZQ5.js} +1 -1
  961. package/static/{chunk-4CQLN5HL.js → chunk-GQFMWVFD.js} +1 -1
  962. package/static/{chunk-YBEH442D.js → chunk-GVNTC564.js} +1 -1
  963. package/static/{chunk-WO6GBHBZ.js → chunk-HGL3NYP2.js} +2 -2
  964. package/static/{chunk-IAWRRL6J.js → chunk-HLIWPWRA.js} +1 -1
  965. package/static/{chunk-6LHJBXUE.js → chunk-HNYB3M4S.js} +1 -1
  966. package/static/{chunk-5WTIUYFF.js → chunk-HUXAUQMN.js} +1 -1
  967. package/static/{chunk-VBH3Y2M5.js → chunk-I2XA6PPK.js} +1 -1
  968. package/static/{chunk-I3XI72AV.js → chunk-ISV3BO6R.js} +1 -1
  969. package/static/{chunk-P7X53PEP.js → chunk-JV3AGU5B.js} +1 -1
  970. package/static/{chunk-ZFAXICUH.js → chunk-K25E7YGG.js} +1 -1
  971. package/static/{chunk-CAD3RHAY.js → chunk-K46PUTZB.js} +1 -1
  972. package/static/{chunk-GYFLVCFN.js → chunk-KERFLJ56.js} +1 -7
  973. package/static/{chunk-WSTGWBVW.js → chunk-KJD3KFF3.js} +1 -1
  974. package/static/{chunk-R4P4NBUL.js → chunk-KPKSI23S.js} +1 -1
  975. package/static/{chunk-M7IFVC5D.js → chunk-KZS7CTNR.js} +1 -1
  976. package/static/{chunk-P2IJCGWD.js → chunk-L5IHUVXL.js} +1 -1
  977. package/static/{chunk-DXESTGOH.js → chunk-L7RRX2M3.js} +1 -1
  978. package/static/{chunk-WE3ISL7O.js → chunk-LGWJ2WKU.js} +1 -1
  979. package/static/{chunk-OKI3N5AI.js → chunk-MLC7JK2H.js} +2 -2
  980. package/static/{chunk-NG7QWUFM.js → chunk-MOHNYW2A.js} +1 -1
  981. package/static/{chunk-SQYWQUL4.js → chunk-NCDUOVMW.js} +1 -1
  982. package/static/chunk-NGUAJIGI.js +1 -0
  983. package/static/{chunk-OYPJUVD6.js → chunk-NIPP6JDI.js} +1 -1
  984. package/static/{chunk-Y433XOAJ.js → chunk-NMTBMHUL.js} +1 -1
  985. package/static/chunk-O4XXMZFX.js +4 -0
  986. package/static/{chunk-IOP3ON2H.js → chunk-OANZITPM.js} +1 -1
  987. package/static/{chunk-WJFKUJJX.js → chunk-OGE4SAHU.js} +1 -1
  988. package/static/{chunk-7EHP6HO3.js → chunk-OI3ME22C.js} +1 -1
  989. package/static/{chunk-D4XDSS6P.js → chunk-Q3EGCMF5.js} +1 -1
  990. package/static/{chunk-TQBCGNFG.js → chunk-QF2NSHZA.js} +1 -1
  991. package/static/{chunk-RBBMH2FM.js → chunk-QKN6LAAA.js} +1 -1
  992. package/static/{chunk-J45SD6RC.js → chunk-QRFESU5O.js} +2 -2
  993. package/static/chunk-QVRVFYJH.js +1 -0
  994. package/static/{chunk-BAHNSFET.js → chunk-RFJIPIOK.js} +1 -1
  995. package/static/{chunk-IZ7TCHUW.js → chunk-RLL634K4.js} +1 -1
  996. package/static/{chunk-MOWL3ILT.js → chunk-RS2OFKWP.js} +1 -1
  997. package/static/{chunk-WM56LPJ3.js → chunk-RWAAC3A4.js} +1 -1
  998. package/static/{chunk-F3GMI6OL.js → chunk-S5Y64DDS.js} +1 -1
  999. package/static/{chunk-VNNLMUK7.js → chunk-SLG5KDU6.js} +1 -1
  1000. package/static/chunk-TJ4CVFEL.js +1 -0
  1001. package/static/{chunk-SAN35XTD.js → chunk-TWCGKSYE.js} +1 -1
  1002. package/static/{chunk-EUKVDBBK.js → chunk-UMDRE4S7.js} +1 -1
  1003. package/static/{chunk-YKCUUBZP.js → chunk-VRIOLRYR.js} +4 -4
  1004. package/static/chunk-VS4O2XDP.js +1 -0
  1005. package/static/{chunk-2MRTBCSV.js → chunk-VSBFNFOM.js} +1 -1
  1006. package/static/{chunk-CTPKDDVI.js → chunk-WN4WXCVK.js} +1 -1
  1007. package/static/{chunk-2AA3WMW5.js → chunk-WX7RXW7K.js} +1 -1
  1008. package/static/{chunk-J2BUPRCZ.js → chunk-XC4POKR3.js} +2 -2
  1009. package/static/{chunk-AXLDYLIO.js → chunk-Y4AUYQTG.js} +1 -1
  1010. package/static/{chunk-RPHWIW7S.js → chunk-YMIXHRJQ.js} +1 -7
  1011. package/static/{chunk-AFNUBQMD.js → chunk-ZUNKFAKP.js} +1 -1
  1012. package/static/index.html +3 -3
  1013. package/static/main-QN4UCOC5.js +5 -0
  1014. package/static/{styles-PD6764CP.css → styles-46GLIE7Y.css} +1 -1
  1015. package/server/authentication/constants/auth-ldap.js.map +0 -1
  1016. package/server/authentication/dto/two-fa-verify.dto.js.map +0 -1
  1017. package/server/authentication/guards/auth-two-fa-guard.js.map +0 -1
  1018. package/server/authentication/interfaces/two-fa-setup.interface.js +0 -10
  1019. package/server/authentication/interfaces/two-fa-setup.interface.js.map +0 -1
  1020. package/server/authentication/models/auth-method.js +0 -18
  1021. package/server/authentication/models/auth-method.js.map +0 -1
  1022. package/server/authentication/services/auth-manager.service.js.map +0 -1
  1023. package/server/authentication/services/auth-manager.service.spec.js.map +0 -1
  1024. package/server/authentication/services/auth-methods/auth-method-database.service.js.map +0 -1
  1025. package/server/authentication/services/auth-methods/auth-method-database.service.spec.js.map +0 -1
  1026. package/server/authentication/services/auth-methods/auth-method-ldap.service.js +0 -326
  1027. package/server/authentication/services/auth-methods/auth-method-ldap.service.js.map +0 -1
  1028. package/server/authentication/services/auth-methods/auth-method-ldap.service.spec.js +0 -534
  1029. package/server/authentication/services/auth-methods/auth-method-ldap.service.spec.js.map +0 -1
  1030. package/server/authentication/services/auth-methods/auth-method-two-fa.service.js.map +0 -1
  1031. package/server/authentication/services/auth-methods/auth-method-two-fa.service.spec.js.map +0 -1
  1032. package/static/chunk-3I6NPM62.js +0 -1
  1033. package/static/chunk-GCPX3EFC.js +0 -1
  1034. package/static/chunk-KBUIDMCK.js +0 -1
  1035. package/static/chunk-KY6MNZLC.js +0 -1
  1036. package/static/chunk-MPWD4VMY.js +0 -1
  1037. package/static/chunk-QQAF3MLL.js +0 -1
  1038. package/static/chunk-VHZKPUWE.js +0 -4
  1039. package/static/chunk-YWLMFOB4.js +0 -3
  1040. package/static/main-ZXEMCBMI.js +0 -11
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../backend/src/applications/files/modules/only-office/only-office.controller.spec.ts"],"sourcesContent":["/*\n * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>\n * This file is part of Sync-in | The open source file sync and share solution\n * See the LICENSE file for licensing details\n */\n\nimport { Test, TestingModule } from '@nestjs/testing'\nimport { ContextInterceptor } from '../../../../infrastructure/context/interceptors/context.interceptor'\nimport { ContextManager } from '../../../../infrastructure/context/services/context-manager.service'\nimport { SpacesManager } from '../../../spaces/services/spaces-manager.service'\nimport { FILE_MODE } from '../../constants/operations'\nimport { FilesMethods } from '../../services/files-methods.service'\nimport { OnlyOfficeManager } from './only-office-manager.service'\nimport { OnlyOfficeController } from './only-office.controller'\n\ndescribe(OnlyOfficeController.name, () => {\n let controller: OnlyOfficeController\n\n const filesOnlyOfficeManagerMock = {\n getSettings: jest.fn(),\n callBack: jest.fn()\n }\n\n const filesMethodsMock = {\n headOrGet: jest.fn()\n }\n\n beforeEach(async () => {\n jest.clearAllMocks()\n const module: TestingModule = await Test.createTestingModule({\n controllers: [OnlyOfficeController],\n providers: [\n { provide: OnlyOfficeManager, useValue: filesOnlyOfficeManagerMock },\n { provide: FilesMethods, useValue: filesMethodsMock },\n { provide: SpacesManager, useValue: {} },\n ContextManager,\n ContextInterceptor\n ]\n }).compile()\n\n controller = module.get<OnlyOfficeController>(OnlyOfficeController)\n })\n\n it('should be defined', () => {\n expect(controller).toBeDefined()\n })\n\n describe('onlyOfficeSettings', () => {\n it('should call manager with default mode \"view\" when mode is undefined', async () => {\n const user: any = { id: 1 }\n const space: any = { id: 'space-1' }\n const req: any = { headers: {}, params: {}, query: {}, user, space }\n const expected = { config: 'ok', mode: FILE_MODE.VIEW }\n filesOnlyOfficeManagerMock.getSettings.mockResolvedValue(expected)\n\n const result = await controller.onlyOfficeSettings(req)\n\n expect(filesOnlyOfficeManagerMock.getSettings).toHaveBeenCalledTimes(1)\n expect(filesOnlyOfficeManagerMock.getSettings).toHaveBeenCalledWith(user, space, req)\n expect(result).toBe(expected)\n })\n\n it('should pass provided mode to manager', async () => {\n const user: any = { id: 2 }\n const space: any = { id: 'space-2' }\n const req: any = { headers: { 'x-test': '1' }, user, space }\n const expected = { config: 'ok', mode: FILE_MODE.EDIT }\n filesOnlyOfficeManagerMock.getSettings.mockResolvedValue(expected)\n\n const result = await controller.onlyOfficeSettings(req)\n\n expect(filesOnlyOfficeManagerMock.getSettings).toHaveBeenCalledWith(user, space, req)\n expect(result).toBe(expected)\n })\n })\n\n describe('onlyOfficeDocument', () => {\n it('should delegate to filesMethods.headOrGet with req and res', async () => {\n const req: any = { params: { '*': 'path/to/file' } }\n const res: any = { header: jest.fn(), status: jest.fn().mockReturnThis() }\n const stream: any = { readable: true }\n filesMethodsMock.headOrGet.mockResolvedValue(stream)\n\n const result = await controller.onlyOfficeDocument(req, res)\n\n expect(filesMethodsMock.headOrGet).toHaveBeenCalledTimes(1)\n expect(filesMethodsMock.headOrGet).toHaveBeenCalledWith(req, res)\n expect(result).toBe(stream)\n })\n })\n\n describe('onlyOfficeCallBack', () => {\n it('should call manager.callBack with user, space, token and fileId (fid)', async () => {\n const user: any = { id: 3 }\n const space: any = { id: 'space-3' }\n const token = 'jwt-token'\n const expected = { ok: true }\n filesOnlyOfficeManagerMock.callBack.mockResolvedValue(expected)\n\n const result = await controller.onlyOfficeCallBack(user, space, token)\n\n expect(filesOnlyOfficeManagerMock.callBack).toHaveBeenCalledTimes(1)\n expect(filesOnlyOfficeManagerMock.callBack).toHaveBeenCalledWith(user, space, token)\n expect(result).toBe(expected)\n })\n })\n})\n"],"names":["describe","OnlyOfficeController","name","controller","filesOnlyOfficeManagerMock","getSettings","jest","fn","callBack","filesMethodsMock","headOrGet","beforeEach","clearAllMocks","module","Test","createTestingModule","controllers","providers","provide","OnlyOfficeManager","useValue","FilesMethods","SpacesManager","ContextManager","ContextInterceptor","compile","get","it","expect","toBeDefined","user","id","space","req","headers","params","query","expected","config","mode","FILE_MODE","VIEW","mockResolvedValue","result","onlyOfficeSettings","toHaveBeenCalledTimes","toHaveBeenCalledWith","toBe","EDIT","res","header","status","mockReturnThis","stream","readable","onlyOfficeDocument","token","ok","onlyOfficeCallBack"],"mappings":"AAAA;;;;CAIC;;;;yBAEmC;oCACD;uCACJ;sCACD;4BACJ;qCACG;0CACK;sCACG;AAErCA,SAASC,0CAAoB,CAACC,IAAI,EAAE;IAClC,IAAIC;IAEJ,MAAMC,6BAA6B;QACjCC,aAAaC,KAAKC,EAAE;QACpBC,UAAUF,KAAKC,EAAE;IACnB;IAEA,MAAME,mBAAmB;QACvBC,WAAWJ,KAAKC,EAAE;IACpB;IAEAI,WAAW;QACTL,KAAKM,aAAa;QAClB,MAAMC,SAAwB,MAAMC,aAAI,CAACC,mBAAmB,CAAC;YAC3DC,aAAa;gBAACf,0CAAoB;aAAC;YACnCgB,WAAW;gBACT;oBAAEC,SAASC,2CAAiB;oBAAEC,UAAUhB;gBAA2B;gBACnE;oBAAEc,SAASG,iCAAY;oBAAED,UAAUX;gBAAiB;gBACpD;oBAAES,SAASI,mCAAa;oBAAEF,UAAU,CAAC;gBAAE;gBACvCG,qCAAc;gBACdC,sCAAkB;aACnB;QACH,GAAGC,OAAO;QAEVtB,aAAaU,OAAOa,GAAG,CAAuBzB,0CAAoB;IACpE;IAEA0B,GAAG,qBAAqB;QACtBC,OAAOzB,YAAY0B,WAAW;IAChC;IAEA7B,SAAS,sBAAsB;QAC7B2B,GAAG,uEAAuE;YACxE,MAAMG,OAAY;gBAAEC,IAAI;YAAE;YAC1B,MAAMC,QAAa;gBAAED,IAAI;YAAU;YACnC,MAAME,MAAW;gBAAEC,SAAS,CAAC;gBAAGC,QAAQ,CAAC;gBAAGC,OAAO,CAAC;gBAAGN;gBAAME;YAAM;YACnE,MAAMK,WAAW;gBAAEC,QAAQ;gBAAMC,MAAMC,qBAAS,CAACC,IAAI;YAAC;YACtDrC,2BAA2BC,WAAW,CAACqC,iBAAiB,CAACL;YAEzD,MAAMM,SAAS,MAAMxC,WAAWyC,kBAAkB,CAACX;YAEnDL,OAAOx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1B,MAAMC,QAAa;gBAAED,IAAI;YAAU;YACnC,MAAMyB,QAAQ;YACd,MAAMnB,WAAW;gBAAEoB,IAAI;YAAK;YAC5BrD,2BAA2BI,QAAQ,CAACkC,iBAAiB,CAACL;YAEtD,MAAMM,SAAS,MAAMxC,WAAWuD,kBAAkB,CAAC5B,MAAME,OAAOwB;YAEhE5B,OAAOxB,2BAA2BI,QAAQ,EAAEqC,qBAAqB,CAAC;YAClEjB,OAAOxB,2BAA2BI,QAAQ,EAAEsC,oBAAoB,CAAChB,MAAME,OAAOwB;YAC9E5B,OAAOe,QAAQI,IAAI,CAACV;QACtB;IACF;AACF"}
1
+ {"version":3,"sources":["../../../../../../backend/src/applications/files/modules/only-office/only-office.controller.spec.ts"],"sourcesContent":["import { Test, TestingModule } from '@nestjs/testing'\nimport { ContextInterceptor } from '../../../../infrastructure/context/interceptors/context.interceptor'\nimport { ContextManager } from '../../../../infrastructure/context/services/context-manager.service'\nimport { SpacesManager } from '../../../spaces/services/spaces-manager.service'\nimport { FILE_MODE } from '../../constants/operations'\nimport { FilesMethods } from '../../services/files-methods.service'\nimport { OnlyOfficeManager } from './only-office-manager.service'\nimport { OnlyOfficeController } from './only-office.controller'\n\ndescribe(OnlyOfficeController.name, () => {\n let controller: OnlyOfficeController\n\n const filesOnlyOfficeManagerMock = {\n getSettings: jest.fn(),\n callBack: jest.fn()\n }\n\n const filesMethodsMock = {\n headOrGet: jest.fn()\n }\n\n beforeEach(async () => {\n jest.clearAllMocks()\n const module: TestingModule = await Test.createTestingModule({\n controllers: [OnlyOfficeController],\n providers: [\n { provide: OnlyOfficeManager, useValue: filesOnlyOfficeManagerMock },\n { provide: FilesMethods, useValue: filesMethodsMock },\n { provide: SpacesManager, useValue: {} },\n ContextManager,\n ContextInterceptor\n ]\n }).compile()\n\n controller = module.get<OnlyOfficeController>(OnlyOfficeController)\n })\n\n it('should be defined', () => {\n expect(controller).toBeDefined()\n })\n\n describe('onlyOfficeSettings', () => {\n it('should call manager with default mode \"view\" when mode is undefined', async () => {\n const user: any = { id: 1 }\n const space: any = { id: 'space-1' }\n const req: any = { headers: {}, params: {}, query: {}, user, space }\n const expected = { config: 'ok', mode: FILE_MODE.VIEW }\n filesOnlyOfficeManagerMock.getSettings.mockResolvedValue(expected)\n\n const result = await controller.onlyOfficeSettings(req)\n\n expect(filesOnlyOfficeManagerMock.getSettings).toHaveBeenCalledTimes(1)\n expect(filesOnlyOfficeManagerMock.getSettings).toHaveBeenCalledWith(user, space, req)\n expect(result).toBe(expected)\n })\n\n it('should pass provided mode to manager', async () => {\n const user: any = { id: 2 }\n const space: any = { id: 'space-2' }\n const req: any = { headers: { 'x-test': '1' }, user, space }\n const expected = { config: 'ok', mode: FILE_MODE.EDIT }\n filesOnlyOfficeManagerMock.getSettings.mockResolvedValue(expected)\n\n const result = await controller.onlyOfficeSettings(req)\n\n expect(filesOnlyOfficeManagerMock.getSettings).toHaveBeenCalledWith(user, space, req)\n expect(result).toBe(expected)\n })\n })\n\n describe('onlyOfficeDocument', () => {\n it('should delegate to filesMethods.headOrGet with req and res', async () => {\n const req: any = { params: { '*': 'path/to/file' } }\n const res: any = { header: jest.fn(), status: jest.fn().mockReturnThis() }\n const stream: any = { readable: true }\n filesMethodsMock.headOrGet.mockResolvedValue(stream)\n\n const result = await controller.onlyOfficeDocument(req, res)\n\n expect(filesMethodsMock.headOrGet).toHaveBeenCalledTimes(1)\n expect(filesMethodsMock.headOrGet).toHaveBeenCalledWith(req, res)\n expect(result).toBe(stream)\n })\n })\n\n describe('onlyOfficeCallBack', () => {\n it('should call manager.callBack with user, space, token and fileId (fid)', async () => {\n const user: any = { id: 3 }\n const space: any = { id: 'space-3' }\n const token = 'jwt-token'\n const expected = { ok: true }\n filesOnlyOfficeManagerMock.callBack.mockResolvedValue(expected)\n\n const result = await controller.onlyOfficeCallBack(user, space, token)\n\n expect(filesOnlyOfficeManagerMock.callBack).toHaveBeenCalledTimes(1)\n expect(filesOnlyOfficeManagerMock.callBack).toHaveBeenCalledWith(user, space, token)\n expect(result).toBe(expected)\n })\n })\n})\n"],"names":["describe","OnlyOfficeController","name","controller","filesOnlyOfficeManagerMock","getSettings","jest","fn","callBack","filesMethodsMock","headOrGet","beforeEach","clearAllMocks","module","Test","createTestingModule","controllers","providers","provide","OnlyOfficeManager","useValue","FilesMethods","SpacesManager","ContextManager","ContextInterceptor","compile","get","it","expect","toBeDefined","user","id","space","req","headers","params","query","expected","config","mode","FILE_MODE","VIEW","mockResolvedValue","result","onlyOfficeSettings","toHaveBeenCalledTimes","toHaveBeenCalledWith","toBe","EDIT","res","header","status","mockReturnThis","stream","readable","onlyOfficeDocument","token","ok","onlyOfficeCallBack"],"mappings":";;;;yBAAoC;oCACD;uCACJ;sCACD;4BACJ;qCACG;0CACK;sCACG;AAErCA,SAASC,0CAAoB,CAACC,IAAI,EAAE;IAClC,IAAIC;IAEJ,MAAMC,6BAA6B;QACjCC,aAAaC,KAAKC,EAAE;QACpBC,UAAUF,KAAKC,EAAE;IACnB;IAEA,MAAME,mBAAmB;QACvBC,WAAWJ,KAAKC,EAAE;IACpB;IAEAI,WAAW;QACTL,KAAKM,aAAa;QAClB,MAAMC,SAAwB,MAAMC,aAAI,CAACC,mBAAmB,CAAC;YAC3DC,aAAa;gBAACf,0CAAoB;aAAC;YACnCgB,WAAW;gBACT;oBAAEC,SAASC,2CAAiB;oBAAEC,UAAUhB;gBAA2B;gBACnE;oBAAEc,SAASG,iCAAY;oBAAED,UAAUX;gBAAiB;gBACpD;oBAAES,SAASI,mCAAa;oBAAEF,UAAU,CAAC;gBAAE;gBACvCG,qCAAc;gBACdC,sCAAkB;aACnB;QACH,GAAGC,OAAO;QAEVtB,aAAaU,OAAOa,GAAG,CAAuBzB,0CAAoB;IACpE;IAEA0B,GAAG,qBAAqB;QACtBC,OAAOzB,YAAY0B,WAAW;IAChC;IAEA7B,SAAS,sBAAsB;QAC7B2B,GAAG,uEAAuE;YACxE,MAAMG,OAAY;gBAAEC,IAAI;YAAE;YA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iB,CAACW;YAE7C,MAAMV,SAAS,MAAMxC,WAAWoD,kBAAkB,CAACtB,KAAKgB;YAExDrB,OAAOnB,iBAAiBC,SAAS,EAAEmC,qBAAqB,CAAC;YACzDjB,OAAOnB,iBAAiBC,SAAS,EAAEoC,oBAAoB,CAACb,KAAKgB;YAC7DrB,OAAOe,QAAQI,IAAI,CAACM;QACtB;IACF;IAEArD,SAAS,sBAAsB;QAC7B2B,GAAG,yEAAyE;YAC1E,MAAMG,OAAY;gBAAEC,IAAI;YAAE;YAC1B,MAAMC,QAAa;gBAAED,IAAI;YAAU;YACnC,MAAMyB,QAAQ;YACd,MAAMnB,WAAW;gBAAEoB,IAAI;YAAK;YAC5BrD,2BAA2BI,QAAQ,CAACkC,iBAAiB,CAACL;YAEtD,MAAMM,SAAS,MAAMxC,WAAWuD,kBAAkB,CAAC5B,MAAME,OAAOwB;YAEhE5B,OAAOxB,2BAA2BI,QAAQ,EAAEqC,qBAAqB,CAAC;YAClEjB,OAAOxB,2BAA2BI,QAAQ,EAAEsC,oBAAoB,CAAChB,MAAME,OAAOwB;YAC9E5B,OAAOe,QAAQI,IAAI,CAACV;QACtB;IACF;AACF"}
@@ -1,8 +1,4 @@
1
- /*
2
- * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>
3
- * This file is part of Sync-in | The open source file sync and share solution
4
- * See the LICENSE file for licensing details
5
- */ "use strict";
1
+ "use strict";
6
2
  Object.defineProperty(exports, "__esModule", {
7
3
  value: true
8
4
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../backend/src/applications/files/modules/only-office/only-office.dtos.ts"],"sourcesContent":["/*\n * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>\n * This file is part of Sync-in | The open source file sync and share solution\n * See the LICENSE file for licensing details\n */\n\nimport type { FileLockProps } from '../../interfaces/file-props.interface'\nimport type { OnlyOfficeConfig } from './only-office.interface'\n\nexport interface OnlyOfficeReqDto {\n documentServerUrl: string\n config: OnlyOfficeConfig\n hasLock: false | FileLockProps\n}\n"],"names":[],"mappings":"AAAA;;;;CAIC"}
1
+ {"version":3,"sources":["../../../../../../backend/src/applications/files/modules/only-office/only-office.dtos.ts"],"names":[],"mappings":""}
@@ -1,8 +1,4 @@
1
- /*
2
- * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>
3
- * This file is part of Sync-in | The open source file sync and share solution
4
- * See the LICENSE file for licensing details
5
- */ "use strict";
1
+ "use strict";
6
2
  Object.defineProperty(exports, "__esModule", {
7
3
  value: true
8
4
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../backend/src/applications/files/modules/only-office/only-office.guard.ts"],"sourcesContent":["/*\n * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>\n * This file is part of Sync-in | The open source file sync and share solution\n * See the LICENSE file for licensing details\n */\n\nimport { ExecutionContext, Injectable, Logger } from '@nestjs/common'\nimport { AuthGuard, IAuthGuard } from '@nestjs/passport'\n\n@Injectable()\nexport class OnlyOfficeGuard extends AuthGuard('filesOnlyOfficeToken') implements IAuthGuard {\n private readonly logger = new Logger(OnlyOfficeGuard.name)\n\n handleRequest<TUser = any>(err: any, user: any, info: Error, ctx: ExecutionContext, status?: any): TUser {\n const req = this.getRequest(ctx)\n req.raw.user = user?.login || 'unauthorized'\n if (info) {\n this.logger.warn(`<${req.raw.user}> <${req.ip}> ${info}`)\n }\n return super.handleRequest(err, user, info, ctx, status)\n }\n}\n"],"names":["OnlyOfficeGuard","AuthGuard","handleRequest","err","user","info","ctx","status","req","getRequest","raw","login","logger","warn","ip","Logger","name"],"mappings":"AAAA;;;;CAIC;;;;+BAMYA;;;eAAAA;;;wBAJwC;0BACf;;;;;;;AAG/B,IAAA,AAAMA,kBAAN,MAAMA,wBAAwBC,IAAAA,mBAAS,EAAC;IAG7CC,cAA2BC,GAAQ,EAAEC,IAAS,EAAEC,IAAW,EAAEC,GAAqB,EAAEC,MAAY,EAAS;QACvG,MAAMC,MAAM,IAAI,CAACC,UAAU,CAACH;QAC5BE,IAAIE,GAAG,CAACN,IAAI,GAAGA,MAAMO,SAAS;QAC9B,IAAIN,MAAM;YACR,IAAI,CAACO,MAAM,CAACC,IAAI,CAAC,CAAC,CAAC,EAAEL,IAAIE,GAAG,CAACN,IAAI,CAAC,GAAG,EAAEI,IAAIM,EAAE,CAAC,EAAE,EAAET,MAAM;QAC1D;QACA,OAAO,KAAK,CAACH,cAAcC,KAAKC,MAAMC,MAAMC,KAAKC;IACnD;;QAVK,qBACYK,SAAS,IAAIG,cAAM,CAACf,gBAAgBgB,IAAI;;AAU3D"}
1
+ {"version":3,"sources":["../../../../../../backend/src/applications/files/modules/only-office/only-office.guard.ts"],"sourcesContent":["import { ExecutionContext, Injectable, Logger } from '@nestjs/common'\nimport { AuthGuard, IAuthGuard } from '@nestjs/passport'\n\n@Injectable()\nexport class OnlyOfficeGuard extends AuthGuard('filesOnlyOfficeToken') implements IAuthGuard {\n private readonly logger = new Logger(OnlyOfficeGuard.name)\n\n handleRequest<TUser = any>(err: any, user: any, info: Error, ctx: ExecutionContext, status?: any): TUser {\n const req = this.getRequest(ctx)\n req.raw.user = user?.login || 'unauthorized'\n if (info) {\n this.logger.warn(`<${req.raw.user}> <${req.ip}> ${info}`)\n }\n return super.handleRequest(err, user, info, ctx, status)\n }\n}\n"],"names":["OnlyOfficeGuard","AuthGuard","handleRequest","err","user","info","ctx","status","req","getRequest","raw","login","logger","warn","ip","Logger","name"],"mappings":";;;;+BAIaA;;;eAAAA;;;wBAJwC;0BACf;;;;;;;AAG/B,IAAA,AAAMA,kBAAN,MAAMA,wBAAwBC,IAAAA,mBAAS,EAAC;IAG7CC,cAA2BC,GAAQ,EAAEC,IAAS,EAAEC,IAAW,EAAEC,GAAqB,EAAEC,MAAY,EAAS;QACvG,MAAMC,MAAM,IAAI,CAACC,UAAU,CAACH;QAC5BE,IAAIE,GAAG,CAACN,IAAI,GAAGA,MAAMO,SAAS;QAC9B,IAAIN,MAAM;YACR,IAAI,CAACO,MAAM,CAACC,IAAI,CAAC,CAAC,CAAC,EAAEL,IAAIE,GAAG,CAACN,IAAI,CAAC,GAAG,EAAEI,IAAIM,EAAE,CAAC,EAAE,EAAET,MAAM;QAC1D;QACA,OAAO,KAAK,CAACH,cAAcC,KAAKC,MAAMC,MAAMC,KAAKC;IACnD;;QAVK,qBACYK,SAAS,IAAIG,cAAM,CAACf,gBAAgBgB,IAAI;;AAU3D"}
@@ -1,8 +1,4 @@
1
- /*
2
- * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>
3
- * This file is part of Sync-in | The open source file sync and share solution
4
- * See the LICENSE file for licensing details
5
- */ "use strict";
1
+ "use strict";
6
2
  Object.defineProperty(exports, "__esModule", {
7
3
  value: true
8
4
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../backend/src/applications/files/modules/only-office/only-office.guard.spec.ts"],"sourcesContent":["/*\n * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>\n * This file is part of Sync-in | The open source file sync and share solution\n * See the LICENSE file for licensing details\n */\n\nimport { createMock, DeepMocked } from '@golevelup/ts-jest'\nimport { ExecutionContext } from '@nestjs/common'\nimport { JwtModule, JwtService } from '@nestjs/jwt'\nimport { Test, TestingModule } from '@nestjs/testing'\nimport { PinoLogger } from 'nestjs-pino'\nimport { JwtPayload } from '../../../../authentication/interfaces/jwt-payload.interface'\nimport { configuration } from '../../../../configuration/config.environment'\nimport { ONLY_OFFICE_TOKEN_QUERY_PARAM_NAME } from './only-office.constants'\nimport { OnlyOfficeGuard } from './only-office.guard'\nimport { API_ONLY_OFFICE_CALLBACK } from './only-office.routes'\nimport { OnlyOfficeStrategy } from './only-office.strategy'\n\ndescribe(OnlyOfficeGuard.name, () => {\n let jwtService: JwtService\n let filesOnlyOfficeGuard: OnlyOfficeGuard\n let context: DeepMocked<ExecutionContext>\n let accessToken: string\n\n beforeAll(async () => {\n const module: TestingModule = await Test.createTestingModule({\n imports: [JwtModule.register({ global: true })],\n providers: [\n OnlyOfficeGuard,\n OnlyOfficeStrategy,\n {\n provide: PinoLogger,\n useValue: {\n assign: () => undefined\n }\n }\n ]\n }).compile()\n\n jwtService = module.get<JwtService>(JwtService)\n filesOnlyOfficeGuard = module.get<OnlyOfficeGuard>(OnlyOfficeGuard)\n context = createMock<ExecutionContext>()\n accessToken = await jwtService.signAsync({ identity: { id: 1, login: 'foo' } } as JwtPayload, {\n secret: configuration.auth.token.access.secret,\n expiresIn: 30\n })\n })\n\n it('should be defined', () => {\n expect(jwtService).toBeDefined()\n expect(filesOnlyOfficeGuard).toBeDefined()\n expect(accessToken).toBeDefined()\n })\n\n it('should not pass without a valid token', async () => {\n context.switchToHttp().getRequest.mockReturnValue({\n url: `${API_ONLY_OFFICE_CALLBACK}`,\n raw: { user: '' }\n })\n await expect(filesOnlyOfficeGuard.canActivate(context)).rejects.toThrow('Unauthorized')\n })\n\n it('should pass with a (un)valid token', async () => {\n context.switchToHttp().getRequest.mockReturnValue({\n url: `${API_ONLY_OFFICE_CALLBACK}?${ONLY_OFFICE_TOKEN_QUERY_PARAM_NAME}=${accessToken}`,\n raw: { user: '' }\n })\n expect(await filesOnlyOfficeGuard.canActivate(context)).toBe(true)\n context.switchToHttp().getRequest.mockReturnValue({\n url: `${API_ONLY_OFFICE_CALLBACK}?${ONLY_OFFICE_TOKEN_QUERY_PARAM_NAME}=unvalidToken`,\n raw: { user: '' }\n })\n await expect(filesOnlyOfficeGuard.canActivate(context)).rejects.toThrow('Unauthorized')\n })\n})\n"],"names":["describe","OnlyOfficeGuard","name","jwtService","filesOnlyOfficeGuard","context","accessToken","beforeAll","module","Test","createTestingModule","imports","JwtModule","register","global","providers","OnlyOfficeStrategy","provide","PinoLogger","useValue","assign","undefined","compile","get","JwtService","createMock","signAsync","identity","id","login","secret","configuration","auth","token","access","expiresIn","it","expect","toBeDefined","switchToHttp","getRequest","mockReturnValue","url","API_ONLY_OFFICE_CALLBACK","raw","user","canActivate","rejects","toTh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AAY,GAAGC,UAAU,CAACC,eAAe,CAAC;YAChDC,KAAK,GAAGC,0CAAwB,CAAC,CAAC,EAAEM,uDAAkC,CAAC,CAAC,EAAE3C,aAAa;YACvFsC,KAAK;gBAAEC,MAAM;YAAG;QAClB;QACAR,OAAO,MAAMjC,qBAAqB0C,WAAW,CAACzC,UAAU6C,IAAI,CAAC;QAC7D7C,QAAQkC,YAAY,GAAGC,UAAU,CAACC,eAAe,CAAC;YAChDC,KAAK,GAAGC,0CAAwB,CAAC,CAAC,EAAEM,uDAAkC,CAAC,aAAa,CAAC;YACrFL,KAAK;gBAAEC,MAAM;YAAG;QAClB;QACA,MAAMR,OAAOjC,qBAAqB0C,WAAW,CAACzC,UAAU0C,OAAO,CAACC,OAAO,CAAC;IAC1E;AACF"}
1
+ {"version":3,"sources":["../../../../../../backend/src/applications/files/modules/only-office/only-office.guard.spec.ts"],"sourcesContent":["import { createMock, DeepMocked } from '@golevelup/ts-jest'\nimport { ExecutionContext } from '@nestjs/common'\nimport { JwtModule, JwtService } from '@nestjs/jwt'\nimport { Test, TestingModule } from '@nestjs/testing'\nimport { PinoLogger } from 'nestjs-pino'\nimport { JwtPayload } from '../../../../authentication/interfaces/jwt-payload.interface'\nimport { configuration } from '../../../../configuration/config.environment'\nimport { ONLY_OFFICE_TOKEN_QUERY_PARAM_NAME } from './only-office.constants'\nimport { OnlyOfficeGuard } from './only-office.guard'\nimport { API_ONLY_OFFICE_CALLBACK } from './only-office.routes'\nimport { OnlyOfficeStrategy } from './only-office.strategy'\n\ndescribe(OnlyOfficeGuard.name, () => {\n let jwtService: JwtService\n let filesOnlyOfficeGuard: OnlyOfficeGuard\n let context: DeepMocked<ExecutionContext>\n let accessToken: string\n\n beforeAll(async () => {\n const module: TestingModule = await Test.createTestingModule({\n imports: [JwtModule.register({ global: true })],\n providers: [\n OnlyOfficeGuard,\n OnlyOfficeStrategy,\n {\n provide: PinoLogger,\n useValue: {\n assign: () => undefined\n }\n }\n ]\n }).compile()\n\n jwtService = module.get<JwtService>(JwtService)\n filesOnlyOfficeGuard = module.get<OnlyOfficeGuard>(OnlyOfficeGuard)\n context = createMock<ExecutionContext>()\n accessToken = await jwtService.signAsync({ identity: { id: 1, login: 'foo' } } as JwtPayload, {\n secret: configuration.auth.token.access.secret,\n expiresIn: 30\n })\n })\n\n it('should be defined', () => {\n expect(jwtService).toBeDefined()\n expect(filesOnlyOfficeGuard).toBeDefined()\n expect(accessToken).toBeDefined()\n })\n\n it('should not pass without a valid token', async () => {\n context.switchToHttp().getRequest.mockReturnValue({\n url: `${API_ONLY_OFFICE_CALLBACK}`,\n raw: { user: '' }\n })\n await expect(filesOnlyOfficeGuard.canActivate(context)).rejects.toThrow('Unauthorized')\n })\n\n it('should pass with a (un)valid token', async () => {\n context.switchToHttp().getRequest.mockReturnValue({\n url: `${API_ONLY_OFFICE_CALLBACK}?${ONLY_OFFICE_TOKEN_QUERY_PARAM_NAME}=${accessToken}`,\n raw: { user: '' }\n })\n expect(await filesOnlyOfficeGuard.canActivate(context)).toBe(true)\n context.switchToHttp().getRequest.mockReturnValue({\n url: `${API_ONLY_OFFICE_CALLBACK}?${ONLY_OFFICE_TOKEN_QUERY_PARAM_NAME}=unvalidToken`,\n raw: { user: '' }\n })\n await expect(filesOnlyOfficeGuard.canActivate(context)).rejects.toThrow('Unauthorized')\n })\n})\n"],"names":["describe","OnlyOfficeGuard","name","jwtService","filesOnlyOfficeGuard","context","accessToken","beforeAll","module","Test","createTestingModule","imports","JwtModule","register","global","providers","OnlyOfficeStrategy","provide","PinoLogger","useValue","assign","undefined","compile","get","JwtService","createMock","signAsync","identity","id","login","secret","configuration","auth","token","access","expiresIn","it","expect","toBeDefined","switchToHttp","getRequest","mockReturnValue","url","API_ONLY_OFFICE_CALLBACK","raw","user","canActivate","rejects","toThrow","ONLY_OFFICE_TOKEN_QUERY_PARAM_NAME","toBe"],"mappings":";;;;wBAAuC;qBAED;yBACF;4BACT;mCAEG;qCACqB;iCACnB;kCACS;oCACN;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gBAAEC,MAAM;YAAG;QAClB;QACAR,OAAO,MAAMjC,qBAAqB0C,WAAW,CAACzC,UAAU6C,IAAI,CAAC;QAC7D7C,QAAQkC,YAAY,GAAGC,UAAU,CAACC,eAAe,CAAC;YAChDC,KAAK,GAAGC,0CAAwB,CAAC,CAAC,EAAEM,uDAAkC,CAAC,aAAa,CAAC;YACrFL,KAAK;gBAAEC,MAAM;YAAG;QAClB;QACA,MAAMR,OAAOjC,qBAAqB0C,WAAW,CAACzC,UAAU0C,OAAO,CAACC,OAAO,CAAC;IAC1E;AACF"}
@@ -1,8 +1,4 @@
1
- /*
2
- * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>
3
- * This file is part of Sync-in | The open source file sync and share solution
4
- * See the LICENSE file for licensing details
5
- */ "use strict";
1
+ "use strict";
6
2
  Object.defineProperty(exports, "__esModule", {
7
3
  value: true
8
4
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../backend/src/applications/files/modules/only-office/only-office.interface.ts"],"sourcesContent":["/*\n * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>\n * This file is part of Sync-in | The open source file sync and share solution\n * See the LICENSE file for licensing details\n */\n\nimport { FILE_MODE } from '../../constants/operations'\n\nexport interface OnlyOfficeConvertForm {\n key: string\n url: string\n outputtype: string\n filetype: string\n async: boolean\n token?: string\n}\n\nexport interface OnlyOfficeConfig {\n documentType?: string\n token?: string\n type?: 'mobile' | 'desktop'\n height?: string\n width?: string\n document?: {\n fileType: string\n key: string\n referenceData?: {\n fileKey: string\n instanceId: string\n }\n title: string\n url: string\n info?: {\n owner?: string\n uploaded?: string\n favorite?: boolean\n folder?: string\n sharingSettings?: any[]\n }\n permissions?: {\n /**\n * @deprecated Deprecated since version 5.5, please add the onRequestRestore field instead.\n */\n changeHistory?: boolean\n chat?: boolean\n comment?: boolean\n commentGroups?: any\n copy?: boolean\n deleteCommentAuthorOnly?: boolean\n download?: boolean\n edit?: boolean\n editCommentAuthorOnly?: boolean\n fillForms?: boolean\n modifyContentControl?: boolean\n modifyFilter?: boolean\n print?: boolean\n protect?: boolean\n review?: boolean\n reviewGroups?: string[]\n userInfoGroups?: string[]\n }\n }\n editorConfig?: {\n actionLink?: any\n callbackUrl?: string\n coEditing?: {\n mode: string\n change: boolean\n }\n createUrl?: string\n lang?: string\n mode?: FILE_MODE\n recent?: any[]\n region?: string\n templates?: any[]\n user?: {\n group?: string\n id?: string\n image?: string\n name?: string\n }\n customization?: {\n anonymous?: {\n request?: boolean\n label?: string\n }\n autosave?: boolean\n forcesave?: boolean\n close?: {\n visible: boolean\n text: string\n }\n comments?: boolean\n compactHeader?: boolean\n compactToolbar?: boolean\n compatibleFeatures?: boolean\n customer?: {\n address?: string\n info?: string\n logo?: string\n logoDark?: string\n mail?: string\n name?: string\n phone?: string\n www?: string\n }\n features?: any\n feedback?: any\n goback?: any\n help?: boolean\n hideNotes?: boolean\n hideRightMenu?: boolean\n hideRulers?: boolean\n integrationMode?: string\n logo?: {\n image?: string\n imageDark?: string\n imageLight?: string\n imageEmbedded?: string\n url?: string\n visible?: boolean\n }\n macros?: boolean\n macrosMode?: string\n mentionShare?: boolean\n mobileForceView?: boolean\n plugins?: boolean\n review?: {\n hideReviewDisplay?: boolean\n hoverMode?: boolean\n reviewDisplay?: string\n showReviewChanges?: boolean\n trackChanges?: boolean\n }\n submitForm?: boolean\n toolbarHideFileName?: boolean\n toolbarNoTabs?: boolean\n uiTheme?: string\n unit?: string\n zoom?: number\n about?: boolean\n }\n embedded?: {\n embedUrl?: string\n fullscreenUrl?: string\n saveUrl?: string\n shareUrl?: string\n toolbarDocked?: string\n }\n plugins?: {\n autostart?: string[]\n options?: {\n all?: any\n pluginGuid: any\n }\n pluginsData?: string[]\n }\n }\n events?: {\n onAppReady?: (event: object) => void\n onCollaborativeChanges?: (event: object) => void\n onDocumentReady?: (event: object) => void\n onDocumentStateChange?: (event: { data: boolean }) => void\n onDownloadAs?: (event: object) => void\n onError?: (event: object) => void\n onInfo?: (event: object) => void\n onMetaChange?: (event: object) => void\n onMakeActionLink?: (event: object) => void\n onRequestRefreshFile?: (event: object) => void\n onPluginsReady?: (event: object) => void\n onReady?: (event: object) => void\n onRequestClose?: (event: object) => void\n onRequestCreateNew?: (event: object) => void\n onRequestEditRights?: (event: object) => void\n onRequestHistory?: (event: object) => void\n onRequestHistoryClose?: (event: object) => void\n onRequestHistoryData?: (event: object) => void\n onRequestInsertImage?: (event: object) => void\n onRequestOpen?: (event: object) => void\n onRequestReferenceData?: (event: object) => void\n onRequestReferenceSource?: (event: object) => void\n onRequestRename?: (event: object) => void\n onRequestRestore?: (event: object) => void\n onRequestSaveAs?: (event: object) => void\n onRequestSelectDocument?: (event: object) => void\n onRequestSelectSpreadsheet?: (event: object) => void\n onRequestSendNotify?: (event: object) => void\n onRequestSharingSettings?: (event: object) => void\n onRequestStartFilling?: (event: object) => void\n onRequestUsers?: (event: object) => void\n onSubmit?: (event: object) => void\n onWarning?: (event: object) => void\n }\n}\n\nexport interface OnlyOfficeCallBack {\n /* documentation : https://api.onlyoffice.com/docs/docs-api/usage-api/callback-handler/ */\n key: string // document key\n /*\n status:\n 1 - document is being edited\n 2 - document is ready for saving\n 3 - document saving error has occurred\n 4 - document is closed with no changes\n 6 - document is being edited, but the current document state is saved\n 7 - error has occurred while force saving the document\n */\n status: 1 | 2 | 3 | 4 | 6 | 7\n url?: string // link to download the modified version (for status: 2, 3, 6 or 7)\n notmodified?: boolean // only with status 2\n /*\n actions:\n 0 - the user disconnects from the document co-editing\n 1 - the new user connects to the document co-editing\n 2 - the user clicks the forcesave button.\n */\n actions?: { type: 0 | 1 | 2; userid: string }[]\n forcesavetype?: 0 | 1 | 2 | 3 // The type is present when the status value is equal to 6 or 7 only\n /*\n forcesavetype:\n 0 - to the command service\n 1 - each time the saving is done (e.g. the Save button is clicked), which is only available when the forcesave option is set to true\n 2 - by timer with the settings from the server config\n 3 - each time the form is submitted (e.g. the Complete & Submit button is clicked)\n */\n users?: string[] // when multiple users are editing the document\n}\n"],"names":[],"mappings":"AAAA;;;;CAIC"}
1
+ {"version":3,"sources":["../../../../../../backend/src/applications/files/modules/only-office/only-office.interface.ts"],"names":[],"mappings":""}
@@ -1,8 +1,4 @@
1
- /*
2
- * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>
3
- * This file is part of Sync-in | The open source file sync and share solution
4
- * See the LICENSE file for licensing details
5
- */ "use strict";
1
+ "use strict";
6
2
  Object.defineProperty(exports, "__esModule", {
7
3
  value: true
8
4
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../backend/src/applications/files/modules/only-office/only-office.module.ts"],"sourcesContent":["/*\n * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>\n * This file is part of Sync-in | The open source file sync and share solution\n * See the LICENSE file for licensing details\n */\n\nimport { Module } from '@nestjs/common'\nimport { OnlyOfficeManager } from './only-office-manager.service'\nimport { OnlyOfficeController } from './only-office.controller'\nimport { OnlyOfficeGuard } from './only-office.guard'\nimport { OnlyOfficeStrategy } from './only-office.strategy'\n\n@Module({\n controllers: [OnlyOfficeController],\n providers: [OnlyOfficeManager, OnlyOfficeGuard, OnlyOfficeStrategy]\n})\nexport class OnlyOfficeModule {}\n"],"names":["OnlyOfficeModule","controllers","OnlyOfficeController","providers","OnlyOfficeManager","OnlyOfficeGuard","OnlyOfficeStrategy"],"mappings":"AAAA;;;;CAIC;;;;+BAYYA;;;eAAAA;;;wBAVU;0CACW;sCACG;iCACL;oCACG;;;;;;;AAM5B,IAAA,AAAMA,mBAAN,MAAMA;AAAkB;;;QAH7BC,aAAa;YAACC,0CAAoB;SAAC;QACnCC,WAAW;YAACC,2CAAiB;YAAEC,gCAAe;YAAEC,sCAAkB;SAAC"}
1
+ {"version":3,"sources":["../../../../../../backend/src/applications/files/modules/only-office/only-office.module.ts"],"sourcesContent":["import { Module } from '@nestjs/common'\nimport { OnlyOfficeManager } from './only-office-manager.service'\nimport { OnlyOfficeController } from './only-office.controller'\nimport { OnlyOfficeGuard } from './only-office.guard'\nimport { OnlyOfficeStrategy } from './only-office.strategy'\n\n@Module({\n controllers: [OnlyOfficeController],\n providers: [OnlyOfficeManager, OnlyOfficeGuard, OnlyOfficeStrategy]\n})\nexport class OnlyOfficeModule {}\n"],"names":["OnlyOfficeModule","controllers","OnlyOfficeController","providers","OnlyOfficeManager","OnlyOfficeGuard","OnlyOfficeStrategy"],"mappings":";;;;+BAUaA;;;eAAAA;;;wBAVU;0CACW;sCACG;iCACL;oCACG;;;;;;;AAM5B,IAAA,AAAMA,mBAAN,MAAMA;AAAkB;;;QAH7BC,aAAa;YAACC,0CAAoB;SAAC;QACnCC,WAAW;YAACC,2CAAiB;YAAEC,gCAAe;YAAEC,sCAAkB;SAAC"}
@@ -1,8 +1,4 @@
1
- /*
2
- * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>
3
- * This file is part of Sync-in | The open source file sync and share solution
4
- * See the LICENSE file for licensing details
5
- */ "use strict";
1
+ "use strict";
6
2
  Object.defineProperty(exports, "__esModule", {
7
3
  value: true
8
4
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../backend/src/applications/files/modules/only-office/only-office.routes.ts"],"sourcesContent":["/*\n * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>\n * This file is part of Sync-in | The open source file sync and share solution\n * See the LICENSE file for licensing details\n */\n\nimport { SPACES_ROUTE } from '../../../spaces/constants/routes'\n\nexport const ONLY_OFFICE_ROUTE = {\n BASE: SPACES_ROUTE.BASE,\n ONLY_OFFICE: 'onlyoffice',\n SETTINGS: 'settings',\n DOCUMENT: 'document',\n CALLBACK: 'callback'\n} as const\n\nexport const API_ONLY_OFFICE = `${ONLY_OFFICE_ROUTE.BASE}/${ONLY_OFFICE_ROUTE.ONLY_OFFICE}`\nexport const API_ONLY_OFFICE_SETTINGS = `${API_ONLY_OFFICE}/${ONLY_OFFICE_ROUTE.SETTINGS}`\nexport const API_ONLY_OFFICE_DOCUMENT = `${API_ONLY_OFFICE}/${ONLY_OFFICE_ROUTE.DOCUMENT}`\nexport const API_ONLY_OFFICE_CALLBACK = `${API_ONLY_OFFICE}/${ONLY_OFFICE_ROUTE.CALLBACK}`\n"],"names":["API_ONLY_OFFICE","API_ONLY_OFFICE_CALLBACK","API_ONLY_OFFICE_DOCUMENT","API_ONLY_OFFICE_SETTINGS","ONLY_OFFICE_ROUTE","BASE","SPACES_ROUTE","ONLY_OFFICE","SETTINGS","DOCUMENT","CALLBACK"],"mappings":"AAAA;;;;CAIC;;;;;;;;;;;QAYYA;eAAAA;;QAGAC;eAAAA;;QADAC;eAAAA;;QADAC;eAAAA;;QATAC;eAAAA;;;wBAFgB;AAEtB,MAAMA,oBAAoB;IAC/BC,MAAMC,oBAAY,CAACD,IAAI;IACvBE,aAAa;IACbC,UAAU;IACVC,UAAU;IACVC,UAAU;AACZ;AAEO,MAAMV,kBAAkB,GAAGI,kBAAkBC,IAAI,CAAC,CAAC,EAAED,kBAAkBG,WAAW,EAAE;AACpF,MAAMJ,2BAA2B,GAAGH,gBAAgB,CAAC,EAAEI,kBAAkBI,QAAQ,EAAE;AACnF,MAAMN,2BAA2B,GAAGF,gBAAgB,CAAC,EAAEI,kBAAkBK,QAAQ,EAAE;AACnF,MAAMR,2BAA2B,GAAGD,gBAAgB,CAAC,EAAEI,kBAAkBM,QAAQ,EAAE"}
1
+ {"version":3,"sources":["../../../../../../backend/src/applications/files/modules/only-office/only-office.routes.ts"],"sourcesContent":["import { SPACES_ROUTE } from '../../../spaces/constants/routes'\n\nexport const ONLY_OFFICE_ROUTE = {\n BASE: SPACES_ROUTE.BASE,\n ONLY_OFFICE: 'onlyoffice',\n SETTINGS: 'settings',\n DOCUMENT: 'document',\n CALLBACK: 'callback'\n} as const\n\nexport const API_ONLY_OFFICE = `${ONLY_OFFICE_ROUTE.BASE}/${ONLY_OFFICE_ROUTE.ONLY_OFFICE}`\nexport const API_ONLY_OFFICE_SETTINGS = `${API_ONLY_OFFICE}/${ONLY_OFFICE_ROUTE.SETTINGS}`\nexport const API_ONLY_OFFICE_DOCUMENT = `${API_ONLY_OFFICE}/${ONLY_OFFICE_ROUTE.DOCUMENT}`\nexport const API_ONLY_OFFICE_CALLBACK = `${API_ONLY_OFFICE}/${ONLY_OFFICE_ROUTE.CALLBACK}`\n"],"names":["API_ONLY_OFFICE","API_ONLY_OFFICE_CALLBACK","API_ONLY_OFFICE_DOCUMENT","API_ONLY_OFFICE_SETTINGS","ONLY_OFFICE_ROUTE","BASE","SPACES_ROUTE","ONLY_OFFICE","SETTINGS","DOCUMENT","CALLBACK"],"mappings":";;;;;;;;;;;QAUaA;eAAAA;;QAGAC;eAAAA;;QADAC;eAAAA;;QADAC;eAAAA;;QATAC;eAAAA;;;wBAFgB;AAEtB,MAAMA,oBAAoB;IAC/BC,MAAMC,oBAAY,CAACD,IAAI;IACvBE,aAAa;IACbC,UAAU;IACVC,UAAU;IACVC,UAAU;AACZ;AAEO,MAAMV,kBAAkB,GAAGI,kBAAkBC,IAAI,CAAC,CAAC,EAAED,kBAAkBG,WAAW,EAAE;AACpF,MAAMJ,2BAA2B,GAAGH,gBAAgB,CAAC,EAAEI,kBAAkBI,QAAQ,EAAE;AACnF,MAAMN,2BAA2B,GAAGF,gBAAgB,CAAC,EAAEI,kBAAkBK,QAAQ,EAAE;AACnF,MAAMR,2BAA2B,GAAGD,gBAAgB,CAAC,EAAEI,kBAAkBM,QAAQ,EAAE"}
@@ -1,8 +1,4 @@
1
- /*
2
- * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>
3
- * This file is part of Sync-in | The open source file sync and share solution
4
- * See the LICENSE file for licensing details
5
- */ "use strict";
1
+ "use strict";
6
2
  Object.defineProperty(exports, "__esModule", {
7
3
  value: true
8
4
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../backend/src/applications/files/modules/only-office/only-office.strategy.ts"],"sourcesContent":["/*\n * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>\n * This file is part of Sync-in | The open source file sync and share solution\n * See the LICENSE file for licensing details\n */\n\nimport { Injectable } from '@nestjs/common'\nimport { AbstractStrategy, PassportStrategy } from '@nestjs/passport'\nimport { PinoLogger } from 'nestjs-pino'\nimport { ExtractJwt, Strategy } from 'passport-jwt'\nimport { AuthTokenAccessStrategy } from '../../../../authentication/guards/auth-token-access.strategy'\nimport { JwtPayload } from '../../../../authentication/interfaces/jwt-payload.interface'\nimport { configuration } from '../../../../configuration/config.environment'\nimport { UserModel } from '../../../users/models/user.model'\nimport { ONLY_OFFICE_TOKEN_QUERY_PARAM_NAME } from './only-office.constants'\n\n@Injectable()\nexport class OnlyOfficeStrategy extends PassportStrategy(Strategy, 'filesOnlyOfficeToken') implements AbstractStrategy {\n constructor(private readonly logger: PinoLogger) {\n super({\n jwtFromRequest: ExtractJwt.fromExtractors([\n AuthTokenAccessStrategy.extractJWTFromCookie,\n ExtractJwt.fromUrlQueryParameter(ONLY_OFFICE_TOKEN_QUERY_PARAM_NAME)\n ]),\n secretOrKey: configuration.auth.token.access.secret,\n ignoreExpiration: false,\n passReqToCallback: false\n })\n }\n\n validate(jwtPayload: JwtPayload): UserModel {\n this.logger.assign({ user: jwtPayload.identity.login })\n return new UserModel(jwtPayload.identity)\n }\n}\n"],"names":["OnlyOfficeStrategy","PassportStrategy","Strategy","validate","jwtPayload","logger","assign","user","identity","login","UserModel","jwtFromRequest","ExtractJwt","fromExtractors","AuthTokenAccessStrategy","extractJWTFromCookie","fromUrlQueryParameter","ONLY_OFFICE_TOKEN_QUERY_PARAM_NAME","secretOrKey","configuration","auth","token","access","secret","ignoreExpiration","passReqToCallback"],"mappings":"AAAA;;;;CAIC;;;;+BAaYA;;;eAAAA;;;wBAXc;0BACwB;4BACxB;6BACU;yCACG;mCAEV;2BACJ;qCACyB;;;;;;;;;;AAG5C,IAAA,AAAMA,qBAAN,MAAMA,2BAA2BC,IAAAA,0BAAgB,EAACC,qBAAQ,EAAE;IAajEC,SAASC,UAAsB,EAAa;QAC1C,IAAI,CAACC,MAAM,CAACC,MAAM,CAAC;YAAEC,MAAMH,WAAWI,QAAQ,CAACC,KAAK;QAAC;QACrD,OAAO,IAAIC,oBAAS,CAACN,WAAWI,QAAQ;IAC1C;IAfA,YAAY,AAAiBH,MAAkB,CAAE;QAC/C,KAAK,CAAC;YACJM,gBAAgBC,uBAAU,CAACC,cAAc,CAAC;gBACxCC,gDAAuB,CAACC,oBAAoB;gBAC5CH,uBAAU,CAACI,qBAAqB,CAACC,uDAAkC;aACpE;YACDC,aAAaC,gCAAa,CAACC,IAAI,CAACC,KAAK,CAACC,MAAM,CAACC,MAAM;YACnDC,kBAAkB;YAClBC,mBAAmB;QACrB,SAT2BpB,SAAAA;IAU7B;AAMF"}
1
+ {"version":3,"sources":["../../../../../../backend/src/applications/files/modules/only-office/only-office.strategy.ts"],"sourcesContent":["import { Injectable } from '@nestjs/common'\nimport { AbstractStrategy, PassportStrategy } from '@nestjs/passport'\nimport { PinoLogger } from 'nestjs-pino'\nimport { ExtractJwt, Strategy } from 'passport-jwt'\nimport { AuthTokenAccessStrategy } from '../../../../authentication/guards/auth-token-access.strategy'\nimport { JwtPayload } from '../../../../authentication/interfaces/jwt-payload.interface'\nimport { configuration } from '../../../../configuration/config.environment'\nimport { UserModel } from '../../../users/models/user.model'\nimport { ONLY_OFFICE_TOKEN_QUERY_PARAM_NAME } from './only-office.constants'\n\n@Injectable()\nexport class OnlyOfficeStrategy extends PassportStrategy(Strategy, 'filesOnlyOfficeToken') implements AbstractStrategy {\n constructor(private readonly logger: PinoLogger) {\n super({\n jwtFromRequest: ExtractJwt.fromExtractors([\n AuthTokenAccessStrategy.extractJWTFromCookie,\n ExtractJwt.fromUrlQueryParameter(ONLY_OFFICE_TOKEN_QUERY_PARAM_NAME)\n ]),\n secretOrKey: configuration.auth.token.access.secret,\n ignoreExpiration: false,\n passReqToCallback: false\n })\n }\n\n validate(jwtPayload: JwtPayload): UserModel {\n this.logger.assign({ user: jwtPayload.identity.login })\n return new UserModel(jwtPayload.identity)\n }\n}\n"],"names":["OnlyOfficeStrategy","PassportStrategy","Strategy","validate","jwtPayload","logger","assign","user","identity","login","UserModel","jwtFromRequest","ExtractJwt","fromExtractors","AuthTokenAccessStrategy","extractJWTFromCookie","fromUrlQueryParameter","ONLY_OFFICE_TOKEN_QUERY_PARAM_NAME","secretOrKey","configuration","auth","token","access","secret","ignoreExpiration","passReqToCallback"],"mappings":";;;;+BAWaA;;;eAAAA;;;wBAXc;0BACwB;4BACxB;6BACU;yCACG;mCAEV;2BACJ;qCACyB;;;;;;;;;;AAG5C,IAAA,AAAMA,qBAAN,MAAMA,2BAA2BC,IAAAA,0BAAgB,EAACC,qBAAQ,EAAE;IAajEC,SAASC,UAAsB,EAAa;QAC1C,IAAI,CAACC,MAAM,CAACC,MAAM,CAAC;YAAEC,MAAMH,WAAWI,QAAQ,CAACC,KAAK;QAAC;QACrD,OAAO,IAAIC,oBAAS,CAACN,WAAWI,QAAQ;IAC1C;IAfA,YAAY,AAAiBH,MAAkB,CAAE;QAC/C,KAAK,CAAC;YACJM,gBAAgBC,uBAAU,CAACC,cAAc,CAAC;gBACxCC,gDAAuB,CAACC,oBAAoB;gBAC5CH,uBAAU,CAACI,qBAAqB,CAACC,uDAAkC;aACpE;YACDC,aAAaC,gCAAa,CAACC,IAAI,CAACC,KAAK,CAACC,MAAM,CAACC,MAAM;YACnDC,kBAAkB;YAClBC,mBAAmB;QACrB,SAT2BpB,SAAAA;IAU7B;AAMF"}
@@ -1,8 +1,4 @@
1
- /*
2
- * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>
3
- * This file is part of Sync-in | The open source file sync and share solution
4
- * See the LICENSE file for licensing details
5
- */ "use strict";
1
+ "use strict";
6
2
  Object.defineProperty(exports, "__esModule", {
7
3
  value: true
8
4
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../backend/src/applications/files/schemas/file-content.interface.ts"],"sourcesContent":["/*\n * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>\n * This file is part of Sync-in | The open source file sync and share solution\n * See the LICENSE file for licensing details\n */\n\nexport interface FileContent {\n id: number\n path: string\n name: string\n mime: string\n size: number\n mtime: number\n // used for inserts\n content?: string\n // used for search\n matches?: string[]\n // used for search\n score?: number\n}\n"],"names":[],"mappings":"AAAA;;;;CAIC"}
1
+ {"version":3,"sources":["../../../../../backend/src/applications/files/schemas/file-content.interface.ts"],"names":[],"mappings":""}
@@ -1,8 +1,4 @@
1
- /*
2
- * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>
3
- * This file is part of Sync-in | The open source file sync and share solution
4
- * See the LICENSE file for licensing details
5
- */ "use strict";
1
+ "use strict";
6
2
  Object.defineProperty(exports, "__esModule", {
7
3
  value: true
8
4
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../backend/src/applications/files/schemas/file-recent.interface.ts"],"sourcesContent":["/*\n * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>\n * This file is part of Sync-in | The open source file sync and share solution\n * See the LICENSE file for licensing details\n */\n\nimport { filesRecents } from './files-recents.schema'\n\ntype FileRecentSchema = typeof filesRecents.$inferSelect\n\nexport class FileRecent implements FileRecentSchema {\n id: number\n ownerId: number\n spaceId: number\n shareId: number\n path: string\n name: string\n mime: string\n mtime: number\n}\n"],"names":["FileRecent"],"mappings":"AAAA;;;;CAIC;;;;+BAMYA;;;eAAAA;;;AAAN,IAAA,AAAMA,aAAN,MAAMA;AASb"}
1
+ {"version":3,"sources":["../../../../../backend/src/applications/files/schemas/file-recent.interface.ts"],"sourcesContent":["import { filesRecents } from './files-recents.schema'\n\ntype FileRecentSchema = typeof filesRecents.$inferSelect\n\nexport class FileRecent implements FileRecentSchema {\n id: number\n ownerId: number\n spaceId: number\n shareId: number\n path: string\n name: string\n mime: string\n mtime: number\n}\n"],"names":["FileRecent"],"mappings":";;;;+BAIaA;;;eAAAA;;;AAAN,IAAA,AAAMA,aAAN,MAAMA;AASb"}
@@ -1,8 +1,4 @@
1
- /*
2
- * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>
3
- * This file is part of Sync-in | The open source file sync and share solution
4
- * See the LICENSE file for licensing details
5
- */ "use strict";
1
+ "use strict";
6
2
  Object.defineProperty(exports, "__esModule", {
7
3
  value: true
8
4
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../backend/src/applications/files/schemas/file.interface.ts"],"sourcesContent":["/*\n * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>\n * This file is part of Sync-in | The open source file sync and share solution\n * See the LICENSE file for licensing details\n */\n\nimport type { files } from './files.schema'\n\ntype FileSchema = typeof files.$inferSelect\n\nexport class File implements FileSchema {\n id: number\n ownerId: number\n spaceId: number\n spaceExternalRootId: number\n shareExternalId: number\n path: string\n name: string\n isDir: boolean\n inTrash: boolean\n mime: string\n size: number\n mtime: number\n ctime: number\n}\n"],"names":["File"],"mappings":"AAAA;;;;CAIC;;;;+BAMYA;;;eAAAA;;;AAAN,IAAA,AAAMA,OAAN,MAAMA;AAcb"}
1
+ {"version":3,"sources":["../../../../../backend/src/applications/files/schemas/file.interface.ts"],"sourcesContent":["import type { files } from './files.schema'\n\ntype FileSchema = typeof files.$inferSelect\n\nexport class File implements FileSchema {\n id: number\n ownerId: number\n spaceId: number\n spaceExternalRootId: number\n shareExternalId: number\n path: string\n name: string\n isDir: boolean\n inTrash: boolean\n mime: string\n size: number\n mtime: number\n ctime: number\n}\n"],"names":["File"],"mappings":";;;;+BAIaA;;;eAAAA;;;AAAN,IAAA,AAAMA,OAAN,MAAMA;AAcb"}
@@ -1,8 +1,4 @@
1
- /*
2
- * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>
3
- * This file is part of Sync-in | The open source file sync and share solution
4
- * See the LICENSE file for licensing details
5
- */ "use strict";
1
+ "use strict";
6
2
  Object.defineProperty(exports, "__esModule", {
7
3
  value: true
8
4
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../backend/src/applications/files/schemas/files-content.schema.ts"],"sourcesContent":["/*\n * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>\n * This file is part of Sync-in | The open source file sync and share solution\n * See the LICENSE file for licensing details\n */\n\nexport const FILES_CONTENT_TABLE_PREFIX = 'files_content_' as const\n\n// The utf8mb4_uca1400_ai_ci COLLATE is better for precision but slower\nexport function createTableFilesContent(tableName: string): string {\n return `\n CREATE TABLE IF NOT EXISTS ${tableName}\n (\n id bigint NOT NULL,\n path varchar(4096) NOT NULL,\n name varchar(255) NOT NULL,\n mime varchar(255),\n size bigint unsigned NOT NULL,\n mtime bigint unsigned NOT NULL,\n content LONGTEXT,\n FULLTEXT (content),\n CONSTRAINT files_content_id PRIMARY KEY (id)\n ) CHARACTER SET utf8mb4\n COLLATE utf8mb4_general_ci;`\n}\n"],"names":["FILES_CONTENT_TABLE_PREFIX","createTableFilesContent","tableName"],"mappings":"AAAA;;;;CAIC;;;;;;;;;;;QAEYA;eAAAA;;QAGGC;eAAAA;;;AAHT,MAAMD,6BAA6B;AAGnC,SAASC,wBAAwBC,SAAiB;IACvD,OAAO,CAAC;iCACuB,EAAEA,UAAU;;;;;;;;;;;;mCAYV,CAAC;AACpC"}
1
+ {"version":3,"sources":["../../../../../backend/src/applications/files/schemas/files-content.schema.ts"],"sourcesContent":["export const FILES_CONTENT_TABLE_PREFIX = 'files_content_' as const\n\n// The utf8mb4_uca1400_ai_ci COLLATE is better for precision but slower\nexport function createTableFilesContent(tableName: string): string {\n return `\n CREATE TABLE IF NOT EXISTS ${tableName}\n (\n id bigint NOT NULL,\n path varchar(4096) NOT NULL,\n name varchar(255) NOT NULL,\n mime varchar(255),\n size bigint unsigned NOT NULL,\n mtime bigint unsigned NOT NULL,\n content LONGTEXT,\n FULLTEXT (content),\n CONSTRAINT files_content_id PRIMARY KEY (id)\n ) CHARACTER SET utf8mb4\n COLLATE utf8mb4_general_ci;`\n}\n"],"names":["FILES_CONTENT_TABLE_PREFIX","createTableFilesContent","tableName"],"mappings":";;;;;;;;;;;QAAaA;eAAAA;;QAGGC;eAAAA;;;AAHT,MAAMD,6BAA6B;AAGnC,SAASC,wBAAwBC,SAAiB;IACvD,OAAO,CAAC;iCACuB,EAAEA,UAAU;;;;;;;;;;;;mCAYV,CAAC;AACpC"}
@@ -1,8 +1,4 @@
1
- /*
2
- * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>
3
- * This file is part of Sync-in | The open source file sync and share solution
4
- * See the LICENSE file for licensing details
5
- */ "use strict";
1
+ "use strict";
6
2
  Object.defineProperty(exports, "__esModule", {
7
3
  value: true
8
4
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../backend/src/applications/files/schemas/files-recents.schema.ts"],"sourcesContent":["/*\n * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>\n * This file is part of Sync-in | The open source file sync and share solution\n * See the LICENSE file for licensing details\n */\n\nimport { bigint, index, mysqlTable, varchar } from 'drizzle-orm/mysql-core'\nimport { shares } from '../../shares/schemas/shares.schema'\nimport { spaces } from '../../spaces/schemas/spaces.schema'\nimport { users } from '../../users/schemas/users.schema'\n\nexport const filesRecents = mysqlTable(\n 'files_recents',\n {\n id: bigint('id', { mode: 'number', unsigned: false }),\n ownerId: bigint('ownerId', { mode: 'number', unsigned: true }).references(() => users.id, { onDelete: 'cascade' }),\n spaceId: bigint('spaceId', { mode: 'number', unsigned: true }).references(() => spaces.id, { onDelete: 'cascade' }),\n shareId: bigint('shareId', { mode: 'number', unsigned: true }).references(() => shares.id, { onDelete: 'cascade' }),\n path: varchar('path', { length: 4096 }).notNull(),\n name: varchar('name', { length: 255 }).notNull(),\n mime: varchar('mime', { length: 255 }),\n mtime: bigint('mtime', { mode: 'number', unsigned: true }).notNull()\n },\n (table) => [\n index('owner_idx').on(table.ownerId),\n index('space_idx').on(table.spaceId),\n index('share_idx').on(table.shareId),\n index('mtime_idx').on(table.mtime),\n index('path_idx').on(table.path)\n ]\n)\n"],"names":["filesRecents","mysqlTable","id","bigint","mode","unsigned","ownerId","references","users","onDelete","spaceId","spaces","shareId","shares","path","varchar","length","notNull","name","mime","mtime","table","index","on"],"mappings":"AAAA;;;;CAIC;;;;+BAOYA;;;eAAAA;;;2BALsC;8BAC5B;8BACA;6BACD;AAEf,MAAMA,eAAeC,IAAAA,qBAAU,EACpC,iBACA;IACEC,IAAIC,IAAAA,iBAAM,EAAC,MAAM;QAAEC,MAAM;QAAUC,UAAU;IAAM;IACnDC,SAASH,IAAAA,iBAAM,EAAC,WAAW;QAAEC,MAAM;QAAUC,UAAU;IAAK,GAAGE,UAAU,CAAC,IAAMC,kBAAK,CAACN,EAAE,EAAE;QAAEO,UAAU;IAAU;IAChHC,SAASP,IAAAA,iBAAM,EAAC,WAAW;QAAEC,MAAM;QAAUC,UAAU;IAAK,GAAGE,UAAU,CAAC,IAAMI,oBAAM,CAACT,EAAE,EAAE;QAAEO,UAAU;IAAU;IACjHG,SAAST,IAAAA,iBAAM,EAAC,WAAW;QAAEC,MAAM;QAAUC,UAAU;IAAK,GAAGE,UAAU,CAAC,IAAMM,oBAAM,CAACX,EAAE,EAAE;QAAEO,UAAU;IAAU;IACjHK,MAAMC,IAAAA,kBAAO,EAAC,QAAQ;QAAEC,QAAQ;IAAK,GAAGC,OAAO;IAC/CC,MAAMH,IAAAA,kBAAO,EAAC,QAAQ;QAAEC,QAAQ;IAAI,GAAGC,OAAO;IAC9CE,MAAMJ,IAAAA,kBAAO,EAAC,QAAQ;QAAEC,QAAQ;IAAI;IACpCI,OAAOjB,IAAAA,iBAAM,EAAC,SAAS;QAAEC,MAAM;QAAUC,UAAU;IAAK,GAAGY,OAAO;AACpE,GACA,CAACI,QAAU;QACTC,IAAAA,gBAAK,EAAC,aAAaC,EAAE,CAACF,MAAMf,OAAO;QACnCgB,IAAAA,gBAAK,EAAC,aAAaC,EAAE,CAACF,MAAMX,OAAO;QACnCY,IAAAA,gBAAK,EAAC,aAAaC,EAAE,CAACF,MAAMT,OAAO;QACnCU,IAAAA,gBAAK,EAAC,aAAaC,EAAE,CAACF,MAAMD,KAAK;QACjCE,IAAAA,gBAAK,EAAC,YAAYC,EAAE,CAACF,MAAMP,IAAI;KAChC"}
1
+ {"version":3,"sources":["../../../../../backend/src/applications/files/schemas/files-recents.schema.ts"],"sourcesContent":["import { bigint, index, mysqlTable, varchar } from 'drizzle-orm/mysql-core'\nimport { shares } from '../../shares/schemas/shares.schema'\nimport { spaces } from '../../spaces/schemas/spaces.schema'\nimport { users } from '../../users/schemas/users.schema'\n\nexport const filesRecents = mysqlTable(\n 'files_recents',\n {\n id: bigint('id', { mode: 'number', unsigned: false }),\n ownerId: bigint('ownerId', { mode: 'number', unsigned: true }).references(() => users.id, { onDelete: 'cascade' }),\n spaceId: bigint('spaceId', { mode: 'number', unsigned: true }).references(() => spaces.id, { onDelete: 'cascade' }),\n shareId: bigint('shareId', { mode: 'number', unsigned: true }).references(() => shares.id, { onDelete: 'cascade' }),\n path: varchar('path', { length: 4096 }).notNull(),\n name: varchar('name', { length: 255 }).notNull(),\n mime: varchar('mime', { length: 255 }),\n mtime: bigint('mtime', { mode: 'number', unsigned: true }).notNull()\n },\n (table) => [\n index('owner_idx').on(table.ownerId),\n index('space_idx').on(table.spaceId),\n index('share_idx').on(table.shareId),\n index('mtime_idx').on(table.mtime),\n index('path_idx').on(table.path)\n ]\n)\n"],"names":["filesRecents","mysqlTable","id","bigint","mode","unsigned","ownerId","references","users","onDelete","spaceId","spaces","shareId","shares","path","varchar","length","notNull","name","mime","mtime","table","index","on"],"mappings":";;;;+BAKaA;;;eAAAA;;;2BALsC;8BAC5B;8BACA;6BACD;AAEf,MAAMA,eAAeC,IAAAA,qBAAU,EACpC,iBACA;IACEC,IAAIC,IAAAA,iBAAM,EAAC,MAAM;QAAEC,MAAM;QAAUC,UAAU;IAAM;IACnDC,SAASH,IAAAA,iBAAM,EAAC,WAAW;QAAEC,MAAM;QAAUC,UAAU;IAAK,GAAGE,UAAU,CAAC,IAAMC,kBAAK,CAACN,EAAE,EAAE;QAAEO,UAAU;IAAU;IAChHC,SAASP,IAAAA,iBAAM,EAAC,WAAW;QAAEC,MAAM;QAAUC,UAAU;IAAK,GAAGE,UAAU,CAAC,IAAMI,oBAAM,CAACT,EAAE,EAAE;QAAEO,UAAU;IAAU;IACjHG,SAAST,IAAAA,iBAAM,EAAC,WAAW;QAAEC,MAAM;QAAUC,UAAU;IAAK,GAAGE,UAAU,CAAC,IAAMM,oBAAM,CAACX,EAAE,EAAE;QAAEO,UAAU;IAAU;IACjHK,MAAMC,IAAAA,kBAAO,EAAC,QAAQ;QAAEC,QAAQ;IAAK,GAAGC,OAAO;IAC/CC,MAAMH,IAAAA,kBAAO,EAAC,QAAQ;QAAEC,QAAQ;IAAI,GAAGC,OAAO;IAC9CE,MAAMJ,IAAAA,kBAAO,EAAC,QAAQ;QAAEC,QAAQ;IAAI;IACpCI,OAAOjB,IAAAA,iBAAM,EAAC,SAAS;QAAEC,MAAM;QAAUC,UAAU;IAAK,GAAGY,OAAO;AACpE,GACA,CAACI,QAAU;QACTC,IAAAA,gBAAK,EAAC,aAAaC,EAAE,CAACF,MAAMf,OAAO;QACnCgB,IAAAA,gBAAK,EAAC,aAAaC,EAAE,CAACF,MAAMX,OAAO;QACnCY,IAAAA,gBAAK,EAAC,aAAaC,EAAE,CAACF,MAAMT,OAAO;QACnCU,IAAAA,gBAAK,EAAC,aAAaC,EAAE,CAACF,MAAMD,KAAK;QACjCE,IAAAA,gBAAK,EAAC,YAAYC,EAAE,CAACF,MAAMP,IAAI;KAChC"}
@@ -1,8 +1,4 @@
1
- /*
2
- * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>
3
- * This file is part of Sync-in | The open source file sync and share solution
4
- * See the LICENSE file for licensing details
5
- */ "use strict";
1
+ "use strict";
6
2
  Object.defineProperty(exports, "__esModule", {
7
3
  value: true
8
4
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../backend/src/applications/files/schemas/files.schema.ts"],"sourcesContent":["/*\n * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>\n * This file is part of Sync-in | The open source file sync and share solution\n * See the LICENSE file for licensing details\n */\n\nimport { SQL, sql } from 'drizzle-orm'\nimport { AnyMySqlColumn, bigint, boolean, index, mysqlTable, varchar } from 'drizzle-orm/mysql-core'\nimport { escapeSQLRegexp } from '../../../common/functions'\nimport { shares } from '../../shares/schemas/shares.schema'\nimport { spacesRoots } from '../../spaces/schemas/spaces-roots.schema'\nimport { spaces } from '../../spaces/schemas/spaces.schema'\nimport { users } from '../../users/schemas/users.schema'\n\n/*\n ownerId: defined if the file is in a personal space (spaceId & spaceExternalRootId & shareExternalId must be null)\n spaceId: defined if the file is in a space (ownerId & spaceExternalRootId & shareExternalId must be null)\n spaceExternalRootId: defined if the file is in space root with an external path (spaceId required)\n shareExternalId: defined for a share created with an external path (spaceId & spaceRootId must be null)\n*/\n\nexport const files = mysqlTable(\n 'files',\n {\n id: bigint('id', { mode: 'number', unsigned: true }).autoincrement().primaryKey(),\n ownerId: bigint('ownerId', { mode: 'number', unsigned: true }).references(() => users.id, { onDelete: 'cascade' }),\n spaceId: bigint('spaceId', { mode: 'number', unsigned: true }).references(() => spaces.id, { onDelete: 'cascade' }),\n spaceExternalRootId: bigint('spaceExternalRootId', {\n mode: 'number',\n unsigned: true\n }).references((): AnyMySqlColumn => spacesRoots.id, { onDelete: 'cascade' }),\n shareExternalId: bigint('shareExternalId', { mode: 'number', unsigned: true }).references(() => shares.id, { onDelete: 'cascade' }),\n path: varchar('path', { length: 4096 }).notNull(),\n name: varchar('name', { length: 255 }).notNull(),\n isDir: boolean('isDir').notNull(),\n inTrash: boolean('inTrash').default(false).notNull(),\n mime: varchar('mime', { length: 255 }),\n size: bigint('size', { mode: 'number', unsigned: true }).default(0),\n mtime: bigint('mtime', { mode: 'number', unsigned: true }).default(0),\n ctime: bigint('ctime', { mode: 'number', unsigned: true }).default(0)\n },\n (table) => [\n index('owner_idx').on(table.ownerId),\n index('space_idx').on(table.spaceId),\n index('space_external_root_idx').on(table.spaceExternalRootId),\n index('share_external_idx').on(table.shareExternalId),\n index('name_idx').on(table.name),\n index('path_idx').on(table.path)\n ]\n)\n\n// supports the case where path = '.' or './sync-in' and removes '.' or './' if exists\nexport const filePathSQL = (file: any): SQL<string> => sql`REGEXP_REPLACE(CONCAT(${file.path}, '/', ${file.name}), '^(\\\\\\\\.\\\\\\\\/){0,1}(.*)', '\\\\\\\\2')`\n\nexport const childFilesFindRegexp = (path: string): SQL<string> => sql`${files.path}${sql.raw(`REGEXP '^${escapeSQLRegexp(path)}(/|$)'`)}`\n\nexport const childFilesReplaceRegexp = (srcPath: string, dstPath: string): SQL<string> =>\n sql`REGEXP_REPLACE(${files.path}, '^${sql.raw(escapeSQLRegexp(srcPath))}', '${sql.raw(escapeSQLRegexp(dstPath))}')`\n"],"names":["childFilesFindRegexp","childFilesReplaceRegexp","filePathSQL","files","mysqlTable","id","bigint","mode","unsigned","autoincrement","primaryKey","ownerId","references","users","onDelete","spaceId","spaces","spaceExternalRootId","spacesRoots","shareExternalId","shares","path","varchar","length","notNull","name","isDir","boolean","inTrash","default","mime","size","mtime","ctime","table","index","on","file","sql","raw","escapeSQLRegexp","srcPath","dstPath"],"mappings":"AAAA;;;;CAIC;;;;;;;;;;;QAkDYA;eAAAA;;QAEAC;eAAAA;;QAJAC;eAAAA;;QA/BAC;eAAAA;;;4BAfY;2BACmD;2BAC5C;8BACT;mCACK;8BACL;6BACD;AASf,MAAMA,QAAQC,IAAAA,qBAAU,EAC7B,SACA;IACEC,IAAIC,IAAAA,iBAAM,EAAC,MAAM;QAAEC,MAAM;QAAUC,UAAU;IAAK,GAAGC,aAAa,GAAGC,UAAU;IAC/EC,SAASL,IAAAA,iBAAM,EAAC,WAAW;QAAEC,MAAM;QAAUC,UAAU;IAAK,GAAGI,UAAU,CAAC,IAAMC,kBAAK,CAACR,EA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QACnCoB,IAAAA,gBAAK,EAAC,2BAA2BC,EAAE,CAACF,MAAMjB,mBAAmB;QAC7DkB,IAAAA,gBAAK,EAAC,sBAAsBC,EAAE,CAACF,MAAMf,eAAe;QACpDgB,IAAAA,gBAAK,EAAC,YAAYC,EAAE,CAACF,MAAMT,IAAI;QAC/BU,IAAAA,gBAAK,EAAC,YAAYC,EAAE,CAACF,MAAMb,IAAI;KAChC;AAII,MAAMnB,cAAc,CAACmC,OAA2BC,IAAAA,eAAG,CAAA,CAAC,sBAAsB,EAAED,KAAKhB,IAAI,CAAC,OAAO,EAAEgB,KAAKZ,IAAI,CAAC,qCAAqC,CAAC;AAE/I,MAAMzB,uBAAuB,CAACqB,OAA8BiB,IAAAA,eAAG,CAAA,CAAC,EAAEnC,MAAMkB,IAAI,CAAC,EAAEiB,eAAG,CAACC,GAAG,CAAC,CAAC,SAAS,EAAEC,IAAAA,0BAAe,EAACnB,MAAM,MAAM,CAAC,EAAE,CAAC;AAEnI,MAAMpB,0BAA0B,CAACwC,SAAiBC,UACvDJ,IAAAA,eAAG,CAAA,CAAC,eAAe,EAAEnC,MAAMkB,IAAI,CAAC,IAAI,EAAEiB,eAAG,CAACC,GAAG,CAACC,IAAAA,0BAAe,EAACC,UAAU,IAAI,EAAEH,eAAG,CAACC,GAAG,CAACC,IAAAA,0BAAe,EAACE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"sources":["../../../../../backend/src/applications/files/schemas/files.schema.ts"],"sourcesContent":["import { SQL, sql } from 'drizzle-orm'\nimport { AnyMySqlColumn, bigint, boolean, index, mysqlTable, varchar } from 'drizzle-orm/mysql-core'\nimport { escapeSQLRegexp } from '../../../common/functions'\nimport { shares } from '../../shares/schemas/shares.schema'\nimport { spacesRoots } from '../../spaces/schemas/spaces-roots.schema'\nimport { spaces } from '../../spaces/schemas/spaces.schema'\nimport { users } from '../../users/schemas/users.schema'\n\n/*\n ownerId: defined if the file is in a personal space (spaceId & spaceExternalRootId & shareExternalId must be null)\n spaceId: defined if the file is in a space (ownerId & spaceExternalRootId & shareExternalId must be null)\n spaceExternalRootId: defined if the file is in space root with an external path (spaceId required)\n shareExternalId: defined for a share created with an external path (spaceId & spaceRootId must be null)\n*/\n\nexport const files = mysqlTable(\n 'files',\n {\n id: bigint('id', { mode: 'number', unsigned: true }).autoincrement().primaryKey(),\n ownerId: bigint('ownerId', { mode: 'number', unsigned: true }).references(() => users.id, { onDelete: 'cascade' }),\n spaceId: bigint('spaceId', { mode: 'number', unsigned: true }).references(() => spaces.id, { onDelete: 'cascade' }),\n spaceExternalRootId: bigint('spaceExternalRootId', {\n mode: 'number',\n unsigned: true\n }).references((): AnyMySqlColumn => spacesRoots.id, { onDelete: 'cascade' }),\n shareExternalId: bigint('shareExternalId', { mode: 'number', unsigned: true }).references(() => shares.id, { onDelete: 'cascade' }),\n path: varchar('path', { length: 4096 }).notNull(),\n name: varchar('name', { length: 255 }).notNull(),\n isDir: boolean('isDir').notNull(),\n inTrash: boolean('inTrash').default(false).notNull(),\n mime: varchar('mime', { length: 255 }),\n size: bigint('size', { mode: 'number', unsigned: true }).default(0),\n mtime: bigint('mtime', { mode: 'number', unsigned: true }).default(0),\n ctime: bigint('ctime', { mode: 'number', unsigned: true }).default(0)\n },\n (table) => [\n index('owner_idx').on(table.ownerId),\n index('space_idx').on(table.spaceId),\n index('space_external_root_idx').on(table.spaceExternalRootId),\n index('share_external_idx').on(table.shareExternalId),\n index('name_idx').on(table.name),\n index('path_idx').on(table.path)\n ]\n)\n\n// supports the case where path = '.' or './sync-in' and removes '.' or './' if exists\nexport const filePathSQL = (file: any): SQL<string> => sql`REGEXP_REPLACE(CONCAT(${file.path}, '/', ${file.name}), '^(\\\\\\\\.\\\\\\\\/){0,1}(.*)', '\\\\\\\\2')`\n\nexport const childFilesFindRegexp = (path: string): SQL<string> => sql`${files.path}${sql.raw(`REGEXP '^${escapeSQLRegexp(path)}(/|$)'`)}`\n\nexport const childFilesReplaceRegexp = (srcPath: string, dstPath: string): SQL<string> =>\n sql`REGEXP_REPLACE(${files.path}, '^${sql.raw(escapeSQLRegexp(srcPath))}', '${sql.raw(escapeSQLRegexp(dstPath))}')`\n"],"names":["childFilesFindRegexp","childFilesReplaceRegexp","filePathSQL","files","mysqlTable","id","bigint","mode","unsigned","autoincrement","primaryKey","ownerId","references","users","onDelete","spaceId","spaces","spaceExternalRootId","spacesRoots","shareExternalId","shares","path","varchar","length","notNull","name","isDir","boolean","inTrash","default","mime","size","mtime","ctime","table","index","on","file","sql","raw","escapeSQLRegexp","srcPath","dstPath"],"mappings":";;;;;;;;;;;QAgDaA;eAAAA;;QAEAC;eAAAA;;QAJAC;eAAAA;;QA/BAC;eAAAA;;;4BAfY;2BACmD;2BAC5C;8BACT;mCACK;8BACL;6BACD;AASf,MAAMA,QAAQC,IAAAA,qBAAU,EAC7B,SACA;IACEC,IAAIC,IAAAA,iBAAM,EAAC,MAAM;QAAEC,MAAM;QAAUC,UAAU;IAAK,GAAGC,aAAa,GAAGC,UAAU;IAC/EC,SAASL,IAAAA,iBAAM,EAAC,WAAW;QAAEC,MAAM;QAAUC,UAAU;IAAK,GAAGI,UAAU,CAAC,IAAMC,kBAAK,CAACR,EAAE,EAAE;QAAES,UAAU;IAAU;IAChHC,SAAST,IAAAA,iBAAM,EAAC,WAAW;QAAEC,MAAM;QAAUC,UAAU;IAAK,GAAGI,UAAU,CAAC,IAAMI,oBAAM,CAACX,EAAE,EAAE;QAAES,UAAU;IAAU;IACjHG,qBAAqBX,IAAAA,iBAAM,EAAC,uBAAuB;QACjDC,MAAM;QACNC,UAAU;IACZ,GAAGI,UAAU,CAAC,IAAsBM,8BAAW,CAACb,EAAE,EAAE;QAAES,UAAU;IAAU;IAC1EK,iBAAiBb,IAAAA,iBAAM,EAAC,mBAAmB;QAAEC,MAAM;QAAUC,UAAU;IAAK,GAAGI,UAAU,CAAC,IAAMQ,oBAAM,CAACf,EAAE,EAAE;QAAES,UAAU;IAAU;IACjIO,MAAMC,IAAAA,kBAAO,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AC,EAAEiB,eAAG,CAACC,GAAG,CAAC,CAAC,SAAS,EAAEC,IAAAA,0BAAe,EAACnB,MAAM,MAAM,CAAC,EAAE,CAAC;AAEnI,MAAMpB,0BAA0B,CAACwC,SAAiBC,UACvDJ,IAAAA,eAAG,CAAA,CAAC,eAAe,EAAEnC,MAAMkB,IAAI,CAAC,IAAI,EAAEiB,eAAG,CAACC,GAAG,CAACC,IAAAA,0BAAe,EAACC,UAAU,IAAI,EAAEH,eAAG,CAACC,GAAG,CAACC,IAAAA,0BAAe,EAACE,UAAU,EAAE,CAAC"}
@@ -1,8 +1,4 @@
1
- /*
2
- * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>
3
- * This file is part of Sync-in | The open source file sync and share solution
4
- * See the LICENSE file for licensing details
5
- */ "use strict";
1
+ "use strict";
6
2
  Object.defineProperty(exports, "__esModule", {
7
3
  value: true
8
4
  });
@@ -52,7 +48,10 @@ let FilesContentManager = class FilesContentManager {
52
48
  try {
53
49
  await this.indexFiles(indexSuffix, paths);
54
50
  } catch (e) {
55
- this.logger.error(`${this.parseAndIndexAllFiles.name} : ${e}`);
51
+ this.logger.error({
52
+ tag: this.parseAndIndexAllFiles.name,
53
+ msg: `${e}`
54
+ });
56
55
  }
57
56
  indexSuffixes.push(indexSuffix);
58
57
  }
@@ -82,7 +81,10 @@ let FilesContentManager = class FilesContentManager {
82
81
  if (rootFileContent !== null) {
83
82
  this.filesIndexer.insertRecord(indexName, rootFileContent).catch((e)=>{
84
83
  errorRecords++;
85
- this.logger.error(`${this.indexFiles.name} - ${indexSuffix} | ${rootFileContent.name} : ${e}`);
84
+ this.logger.error({
85
+ tag: this.indexFiles.name,
86
+ msg: `${indexSuffix} | ${rootFileContent.name} : ${e}`
87
+ });
86
88
  });
87
89
  indexedRecords++;
88
90
  }
@@ -91,27 +93,45 @@ let FilesContentManager = class FilesContentManager {
91
93
  for await (const fileContent of this.parseFiles(p.realPath, context)){
92
94
  this.filesIndexer.insertRecord(indexName, fileContent).catch((e)=>{
93
95
  errorRecords++;
94
- this.logger.error(`${this.indexFiles.name} - ${indexSuffix} | ${fileContent.name} : ${e}`);
96
+ this.logger.error({
97
+ tag: this.indexFiles.name,
98
+ msg: `${indexSuffix} | ${fileContent.name} : ${e}`
99
+ });
95
100
  });
96
101
  indexedRecords++;
97
102
  }
98
103
  }
99
104
  if (context.db.size === 0 && indexedRecords === 0) {
100
105
  // case when no data
101
- this.filesIndexer.dropIndex(indexName).catch((e)=>this.logger.error(`${this.indexFiles.name} - ${indexSuffix} - unable to drop index : ${e}`));
102
- this.logger.log(`${this.indexFiles.name} - ${indexSuffix} - no data, index not stored`);
106
+ this.filesIndexer.dropIndex(indexName).catch((e)=>this.logger.error({
107
+ tag: this.indexFiles.name,
108
+ msg: `${indexSuffix} - unable to drop index : ${e}`
109
+ }));
110
+ this.logger.log({
111
+ tag: this.indexFiles.name,
112
+ msg: `${indexSuffix} - no data, index not stored`
113
+ });
103
114
  } else {
104
115
  // clean up old records
105
116
  const recordsToDelete = [
106
117
  ...context.db.keys()
107
118
  ].filter((key)=>!context.fs.has(key));
108
119
  if (recordsToDelete.length > 0) {
109
- this.filesIndexer.deleteRecords(indexName, recordsToDelete).catch((e)=>this.logger.error(`${this.indexFiles.name} - ${indexSuffix} - unable to delete records : ${e}`));
120
+ this.filesIndexer.deleteRecords(indexName, recordsToDelete).catch((e)=>this.logger.error({
121
+ tag: this.indexFiles.name,
122
+ msg: `${indexSuffix} - unable to delete records : ${e}`
123
+ }));
110
124
  }
111
125
  if (indexedRecords === 0 && errorRecords === 0 && recordsToDelete.length === 0) {
112
- this.logger.log(`${this.indexFiles.name} - ${indexSuffix} - no new data`);
126
+ this.logger.log({
127
+ tag: this.indexFiles.name,
128
+ msg: `${indexSuffix} - no new data`
129
+ });
113
130
  } else {
114
- this.logger.log(`${this.indexFiles.name} - ${indexSuffix} - indexed: ${indexedRecords - errorRecords}, errors: ${errorRecords}, deleted: ${recordsToDelete.length}`);
131
+ this.logger.log({
132
+ tag: this.indexFiles.name,
133
+ msg: `${indexSuffix} - indexed: ${indexedRecords - errorRecords}, errors: ${errorRecords}, deleted: ${recordsToDelete.length}`
134
+ });
115
135
  }
116
136
  }
117
137
  }
@@ -131,7 +151,10 @@ let FilesContentManager = class FilesContentManager {
131
151
  }
132
152
  }
133
153
  } catch (e) {
134
- this.logger.warn(`${this.parseFiles.name} - ${context.indexSuffix} - unable to parse: ${dir} - ${e}`);
154
+ this.logger.warn({
155
+ tag: this.parseFiles.name,
156
+ msg: `${context.indexSuffix} - unable to parse: ${dir} - ${e}`
157
+ });
135
158
  }
136
159
  }
137
160
  async analyzeFile(realPath, context, isRootFile = false) {
@@ -144,7 +167,10 @@ let FilesContentManager = class FilesContentManager {
144
167
  try {
145
168
  stats = await _promises.default.stat(realPath);
146
169
  } catch (e) {
147
- this.logger.warn(`${this.analyzeFile.name} - unable to stats: ${realPath} - ${e}`);
170
+ this.logger.warn({
171
+ tag: this.analyzeFile.name,
172
+ msg: `unable to stats: ${realPath} - ${e}`
173
+ });
148
174
  return null;
149
175
  }
150
176
  if (stats.size === 0 || stats.size > this.maxDocumentSize) {
@@ -181,7 +207,10 @@ let FilesContentManager = class FilesContentManager {
181
207
  });
182
208
  return content.length ? content : null;
183
209
  } catch (e) {
184
- this.logger.warn(`${this.parseContent.name} - unable to index: ${rPath} - ${e}`);
210
+ this.logger.warn({
211
+ tag: this.parseContent.name,
212
+ msg: `unable to index: ${rPath} - ${e}`
213
+ });
185
214
  }
186
215
  return null;
187
216
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../backend/src/applications/files/services/files-content-manager.service.ts"],"sourcesContent":["/*\n * Copyright (C) 2012-2025 Johan Legrand <johan.legrand@sync-in.com>\n * This file is part of Sync-in | The open source file sync and share solution\n * See the LICENSE file for licensing details\n */\n\nimport { Injectable, Logger } from '@nestjs/common'\nimport fs from 'fs/promises'\nimport { Stats } from 'node:fs'\nimport path from 'node:path'\nimport { indexableExtensions, shareIndexPrefix, spaceIndexPrefix, userIndexPrefix } from '../constants/indexing'\nimport { FileIndexContext, FileParseContext } from '../interfaces/file-parse-index'\nimport { FilesIndexer } from '../models/files-indexer'\nimport { FileContent } from '../schemas/file-content.interface'\nimport { docTextify } from '../utils/doc-textify/doc-textify'\nimport { getMimeType } from '../utils/files'\nimport { FilesParser } from './files-parser.service'\n\n@Injectable()\nexport class FilesContentManager {\n private readonly maxDocumentSize = 150 * 1_000_000\n private readonly logger = new Logger(FilesContentManager.name)\n\n constructor(\n private readonly filesIndexer: FilesIndexer,\n private readonly filesParser: FilesParser\n ) {}\n\n async parseAndIndexAllFiles(): Promise<void> {\n const indexSuffixes: string[] = []\n for await (const [id, type, paths] of this.filesParser.allPaths()) {\n let indexSuffix: string\n switch (type) {\n case 'user':\n indexSuffix = `${userIndexPrefix}${id}`\n break\n case 'space':\n indexSuffix = `${spaceIndexPrefix}${id}`\n break\n case 'share':\n indexSuffix = `${shareIndexPrefix}${id}`\n }\n try {\n await this.indexFiles(indexSuffix, paths)\n } catch (e) {\n this.logger.error(`${this.parseAndIndexAllFiles.name} : ${e}`)\n }\n indexSuffixes.push(indexSuffix)\n }\n // clean up old tables\n await this.filesIndexer.cleanIndexes(indexSuffixes)\n }\n\n private async indexFiles(indexSuffix: string, paths: FileParseContext[]): Promise<void> {\n const indexName = this.filesIndexer.getIndexName(indexSuffix)\n if (!(await this.filesIndexer.createIndex(indexName))) {\n return\n }\n const context: FileIndexContext = {\n indexSuffix: indexSuffix,\n pathPrefix: '',\n regexBasePath: undefined,\n db: await this.filesIndexer.getRecordStats(indexName),\n fs: new Set()\n }\n let indexedRecords = 0\n let errorRecords = 0\n\n for (const p of paths) {\n context.regexBasePath = new RegExp(`^/?${p.realPath}/?`)\n context.pathPrefix = p.pathPrefix || ''\n if (!p.isDir) {\n // Handles the space root file or shared file case\n const rootFileContent = await this.analyzeFile(p.realPath, context, true)\n if (rootFileContent !== null) {\n this.filesIndexer.insertRecord(indexName, rootFileContent).catch((e: Error) => {\n errorRecords++\n this.logger.error(`${this.indexFiles.name} - ${indexSuffix} | ${rootFileContent.name} : ${e}`)\n })\n indexedRecords++\n }\n continue\n }\n for await (const fileContent of this.parseFiles(p.realPath, context)) {\n this.filesIndexer.insertRecord(indexName, fileContent).catch((e: Error) => {\n errorRecords++\n this.logger.error(`${this.indexFiles.name} - ${indexSuffix} | ${fileContent.name} : ${e}`)\n })\n indexedRecords++\n }\n }\n\n if (context.db.size === 0 && indexedRecords === 0) {\n // case when no data\n this.filesIndexer\n .dropIndex(indexName)\n .catch((e: Error) => this.logger.error(`${this.indexFiles.name} - ${indexSuffix} - unable to drop index : ${e}`))\n this.logger.log(`${this.indexFiles.name} - ${indexSuffix} - no data, index not stored`)\n } else {\n // clean up old records\n const recordsToDelete: number[] = [...context.db.keys()].filter((key) => !context.fs.has(key))\n if (recordsToDelete.length > 0) {\n this.filesIndexer\n .deleteRecords(indexName, recordsToDelete)\n .catch((e: Error) => this.logger.error(`${this.indexFiles.name} - ${indexSuffix} - unable to delete records : ${e}`))\n }\n if (indexedRecords === 0 && errorRecords === 0 && recordsToDelete.length === 0) {\n this.logger.log(`${this.indexFiles.name} - ${indexSuffix} - no new data`)\n } else {\n this.logger.log(\n `${this.indexFiles.name} - ${indexSuffix} - indexed: ${indexedRecords - errorRecords}, errors: ${errorRecords}, deleted: ${recordsToDelete.length}`\n )\n }\n }\n }\n\n private async *parseFiles(dir: string, context: FileIndexContext): AsyncGenerator<FileContent> {\n try {\n for (const entry of await fs.readdir(dir, { withFileTypes: true })) {\n const realPath = path.join(entry.parentPath, entry.name)\n if (entry.isDirectory()) {\n yield* this.parseFiles(realPath, context)\n continue\n }\n const fileContent = await this.analyzeFile(realPath, context)\n if (fileContent !== null) {\n yield fileContent\n }\n }\n } catch (e) {\n this.logger.warn(`${this.parseFiles.name} - ${context.indexSuffix} - unable to parse: ${dir} - ${e}`)\n }\n }\n\n private async analyzeFile(realPath: string, context: FileIndexContext, isRootFile = false): Promise<FileContent> {\n const extension = path.extname(realPath).slice(1).toLowerCase()\n if (!indexableExtensions.has(extension)) return null\n\n const fileName = isRootFile ? path.basename(context.pathPrefix) : path.basename(realPath)\n\n // ignore temporary documents\n if (fileName.startsWith('~$')) return null\n\n let stats: Stats\n try {\n stats = await fs.stat(realPath)\n } catch (e) {\n this.logger.warn(`${this.analyzeFile.name} - unable to stats: ${realPath} - ${e}`)\n return null\n }\n if (stats.size === 0 || stats.size > this.maxDocumentSize) {\n return null\n }\n\n const filePath = isRootFile\n ? path.dirname(context.pathPrefix) || '.'\n : path.join(context.pathPrefix, path.dirname(realPath).replace(context.regexBasePath, '') || '.')\n\n const f = context.db.get(stats.ino)\n if (f && f.size === stats.size && f.path === filePath && f.name === fileName) {\n // no changes, store inode id & skip it\n context.fs.add(stats.ino)\n return null\n }\n\n // store inode id\n context.fs.add(stats.ino)\n\n // store the content with null value to not parse it later\n return {\n id: stats.ino,\n path: filePath,\n name: fileName,\n mime: getMimeType(realPath, false),\n size: stats.size,\n mtime: stats.mtime.getTime(),\n content: await this.parseContent(realPath, extension)\n }\n }\n\n private async parseContent(rPath: string, extension: string): Promise<string> {\n try {\n const content = await docTextify(\n rPath,\n { newlineDelimiter: ' ', minCharsToExtract: 10 },\n {\n extension: extension,\n verified: true\n }\n )\n return content.length ? content : null\n } catch (e) {\n this.logger.warn(`${this.parseContent.name} - unable to index: ${rPath} - ${e}`)\n }\n return null\n }\n}\n"],"names":["FilesContentManager","parseAndIndexAllFiles","indexSuffixes","id","type","paths","filesParser","allPaths","indexSuffix","userIndexPrefix","spaceIndexPrefix","shareIndexPrefix","indexFiles","e","logger","error","name","push","filesIndexer","cleanIndexes","indexName","getIndexName","createIndex","context","pathPrefix","regexBasePath","undefined","db","getRecordStats","fs","Set","indexedRecords","errorRecords","p","RegExp","realPath","isDir","rootFileContent","analyzeFile","insertRecord","catch","fileContent","parseFiles","size","dropIndex","log","recordsToDelete","keys","filter","key","has","length","deleteRecords","dir","entry","readdir","withFileTypes","path","join","parentPath","isDirectory","warn","isRootFile","extension","extname","slice","toLowerCase","indexableExtensions","fileName","basename","startsWith","stats","stat","maxDocumentSize","filePath","dirname","replace","f","get","ino","add","mime","getMimeType","mtime","getTime","content","parseContent","rPath","docTextify","newlineDelimiter","minCharsToExtract","verified","Logger"],"mappings":"AAAA;;;;CAIC;;;;+BAeYA;;;eAAAA;;;wBAbsB;iEACpB;iEAEE;0BACwE;8BAE5D;4BAEF;uBACC;oCACA;;;;;;;;;;;;;;;AAGrB,IAAA,AAAMA,sBAAN,MAAMA;IASX,MAAMC,wBAAuC;QAC3C,MAAMC,gBAA0B,EAAE;QAClC,WAAW,MAAM,CAACC,IAAIC,MAAMC,MAAM,IAAI,IAAI,CAACC,WAAW,CAACC,QAAQ,GAAI;YACjE,IAAIC;YACJ,OAAQJ;gBACN,KAAK;oBACHI,cAAc,GAAGC,yBAAe,GAAGN,IAAI;oBACvC;gBACF,KAAK;oBACHK,cAAc,GAAGE,0BAAgB,GAAGP,IAAI;oBACxC;gBACF,KAAK;oBACHK,cAAc,GAAGG,0BAAgB,GAAGR,IAAI;YAC5C;YACA,IAAI;gBACF,MAAM,IAAI,CAACS,UAAU,CAACJ,aAAaH;YACrC,EAAE,OAAOQ,GAAG;gBACV,IAAI,CAACC,MAAM,CAACC,KAAK,CAAC,GAAG,IAAI,CAACd,qBAAqB,CAACe,IAAI,CAAC,GAAG,EAAEH,GAAG;YAC/D;YACAX,cAAce,IAAI,CAACT;QACrB;QACA,sBAAsB;QACtB,MAAM,IAAI,CAACU,YAAY,CAACC,YAAY,CAACjB;IACvC;IAEA,MAAcU,WAAWJ,WAAmB,EAAEH,KAAyB,EAAiB;QACtF,MAAMe,YAAY,IAAI,CAACF,YAAY,CAACG,YAAY,CAACb;QACjD,IAAI,CAAE,MAAM,IAAI,CAACU,YAAY,CAACI,WAAW,CAACF,YAAa;YACrD;QACF;QACA,MAAMG,UAA4B;YAChCf,aAAaA;YACbgB,YAAY;YACZC,eAAeC;YACfC,I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,MAAM,GAAG,EAAE1E,GAAG;QACjF;QACA,OAAO;IACT;IA5KA,YACE,AAAiBK,YAA0B,EAC3C,AAAiBZ,WAAwB,CACzC;aAFiBY,eAAAA;aACAZ,cAAAA;aALFmE,kBAAkB,MAAM;aACxB3D,SAAS,IAAI8E,cAAM,CAAC5F,oBAAoBgB,IAAI;IAK1D;AA0KL"}
1
+ {"version":3,"sources":["../../../../../backend/src/applications/files/services/files-content-manager.service.ts"],"sourcesContent":["import { Injectable, Logger } from '@nestjs/common'\nimport fs from 'fs/promises'\nimport { Stats } from 'node:fs'\nimport path from 'node:path'\nimport { indexableExtensions, shareIndexPrefix, spaceIndexPrefix, userIndexPrefix } from '../constants/indexing'\nimport { FileIndexContext, FileParseContext } from '../interfaces/file-parse-index'\nimport { FilesIndexer } from '../models/files-indexer'\nimport { FileContent } from '../schemas/file-content.interface'\nimport { docTextify } from '../utils/doc-textify/doc-textify'\nimport { getMimeType } from '../utils/files'\nimport { FilesParser } from './files-parser.service'\n\n@Injectable()\nexport class FilesContentManager {\n private readonly maxDocumentSize = 150 * 1_000_000\n private readonly logger = new Logger(FilesContentManager.name)\n\n constructor(\n private readonly filesIndexer: FilesIndexer,\n private readonly filesParser: FilesParser\n ) {}\n\n async parseAndIndexAllFiles(): Promise<void> {\n const indexSuffixes: string[] = []\n for await (const [id, type, paths] of this.filesParser.allPaths()) {\n let indexSuffix: string\n switch (type) {\n case 'user':\n indexSuffix = `${userIndexPrefix}${id}`\n break\n case 'space':\n indexSuffix = `${spaceIndexPrefix}${id}`\n break\n case 'share':\n indexSuffix = `${shareIndexPrefix}${id}`\n }\n try {\n await this.indexFiles(indexSuffix, paths)\n } catch (e) {\n this.logger.error({ tag: this.parseAndIndexAllFiles.name, msg: `${e}` })\n }\n indexSuffixes.push(indexSuffix)\n }\n // clean up old tables\n await this.filesIndexer.cleanIndexes(indexSuffixes)\n }\n\n private async indexFiles(indexSuffix: string, paths: FileParseContext[]): Promise<void> {\n const indexName = this.filesIndexer.getIndexName(indexSuffix)\n if (!(await this.filesIndexer.createIndex(indexName))) {\n return\n }\n const context: FileIndexContext = {\n indexSuffix: indexSuffix,\n pathPrefix: '',\n regexBasePath: undefined,\n db: await this.filesIndexer.getRecordStats(indexName),\n fs: new Set()\n }\n let indexedRecords = 0\n let errorRecords = 0\n\n for (const p of paths) {\n context.regexBasePath = new RegExp(`^/?${p.realPath}/?`)\n context.pathPrefix = p.pathPrefix || ''\n if (!p.isDir) {\n // Handles the space root file or shared file case\n const rootFileContent = await this.analyzeFile(p.realPath, context, true)\n if (rootFileContent !== null) {\n this.filesIndexer.insertRecord(indexName, rootFileContent).catch((e: Error) => {\n errorRecords++\n this.logger.error({ tag: this.indexFiles.name, msg: `${indexSuffix} | ${rootFileContent.name} : ${e}` })\n })\n indexedRecords++\n }\n continue\n }\n for await (const fileContent of this.parseFiles(p.realPath, context)) {\n this.filesIndexer.insertRecord(indexName, fileContent).catch((e: Error) => {\n errorRecords++\n this.logger.error({ tag: this.indexFiles.name, msg: `${indexSuffix} | ${fileContent.name} : ${e}` })\n })\n indexedRecords++\n }\n }\n\n if (context.db.size === 0 && indexedRecords === 0) {\n // case when no data\n this.filesIndexer\n .dropIndex(indexName)\n .catch((e: Error) => this.logger.error({ tag: this.indexFiles.name, msg: `${indexSuffix} - unable to drop index : ${e}` }))\n this.logger.log({ tag: this.indexFiles.name, msg: `${indexSuffix} - no data, index not stored` })\n } else {\n // clean up old records\n const recordsToDelete: number[] = [...context.db.keys()].filter((key) => !context.fs.has(key))\n if (recordsToDelete.length > 0) {\n this.filesIndexer\n .deleteRecords(indexName, recordsToDelete)\n .catch((e: Error) => this.logger.error({ tag: this.indexFiles.name, msg: `${indexSuffix} - unable to delete records : ${e}` }))\n }\n if (indexedRecords === 0 && errorRecords === 0 && recordsToDelete.length === 0) {\n this.logger.log({ tag: this.indexFiles.name, msg: `${indexSuffix} - no new data` })\n } else {\n this.logger.log({\n tag: this.indexFiles.name,\n msg: `${indexSuffix} - indexed: ${indexedRecords - errorRecords}, errors: ${errorRecords}, deleted: ${recordsToDelete.length}`\n })\n }\n }\n }\n\n private async *parseFiles(dir: string, context: FileIndexContext): AsyncGenerator<FileContent> {\n try {\n for (const entry of await fs.readdir(dir, { withFileTypes: true })) {\n const realPath = path.join(entry.parentPath, entry.name)\n if (entry.isDirectory()) {\n yield* this.parseFiles(realPath, context)\n continue\n }\n const fileContent = await this.analyzeFile(realPath, context)\n if (fileContent !== null) {\n yield fileContent\n }\n }\n } catch (e) {\n this.logger.warn({ tag: this.parseFiles.name, msg: `${context.indexSuffix} - unable to parse: ${dir} - ${e}` })\n }\n }\n\n private async analyzeFile(realPath: string, context: FileIndexContext, isRootFile = false): Promise<FileContent> {\n const extension = path.extname(realPath).slice(1).toLowerCase()\n if (!indexableExtensions.has(extension)) return null\n\n const fileName = isRootFile ? path.basename(context.pathPrefix) : path.basename(realPath)\n\n // ignore temporary documents\n if (fileName.startsWith('~$')) return null\n\n let stats: Stats\n try {\n stats = await fs.stat(realPath)\n } catch (e) {\n this.logger.warn({ tag: this.analyzeFile.name, msg: `unable to stats: ${realPath} - ${e}` })\n return null\n }\n if (stats.size === 0 || stats.size > this.maxDocumentSize) {\n return null\n }\n\n const filePath = isRootFile\n ? path.dirname(context.pathPrefix) || '.'\n : path.join(context.pathPrefix, path.dirname(realPath).replace(context.regexBasePath, '') || '.')\n\n const f = context.db.get(stats.ino)\n if (f && f.size === stats.size && f.path === filePath && f.name === fileName) {\n // no changes, store inode id & skip it\n context.fs.add(stats.ino)\n return null\n }\n\n // store inode id\n context.fs.add(stats.ino)\n\n // store the content with null value to not parse it later\n return {\n id: stats.ino,\n path: filePath,\n name: fileName,\n mime: getMimeType(realPath, false),\n size: stats.size,\n mtime: stats.mtime.getTime(),\n content: await this.parseContent(realPath, extension)\n }\n }\n\n private async parseContent(rPath: string, extension: string): Promise<string> {\n try {\n const content = await docTextify(\n rPath,\n { newlineDelimiter: ' ', minCharsToExtract: 10 },\n {\n extension: extension,\n verified: true\n }\n )\n return content.length ? content : null\n } catch (e) {\n this.logger.warn({ tag: this.parseContent.name, msg: `unable to index: ${rPath} - ${e}` })\n }\n return null\n }\n}\n"],"names":["FilesContentManager","parseAndIndexAllFiles","indexSuffixes","id","type","paths","filesParser","allPaths","indexSuffix","userIndexPrefix","spaceIndexPrefix","shareIndexPrefix","indexFiles","e","logger","error","tag","name","msg","push","filesIndexer","cleanIndexes","indexName","getIndexName","createIndex","context","pathPrefix","regexBasePath","undefined","db","getRecordStats","fs","Set","indexedRecords","errorRecords","p","RegExp","realPath","isDir","rootFileContent","analyzeFile","insertRecord","catch","fileContent","parseFiles","size","dropIndex","log","recordsToDelete","keys","filter","key","has","length","deleteRecords","dir","entry","readdir","withFileTypes","path","join","parentPath","isDirectory","warn","isRootFile","extension","extname","slice","toLowerCase","indexableExtensions","fileName","basename","startsWith","stats","stat","maxDocumentSize","filePath","dirname","replace","f","get","ino","add","mime","getMimeType","mtime","getTime","content","parseContent","rPath","docTextify","newlineDelimiter","minCharsToExtract","verified","Logger"],"mappings":";;;;+BAaaA;;;eAAAA;;;wBAbsB;iEACpB;iEAEE;0BACwE;8BAE5D;4BAEF;uBACC;oCACA;;;;;;;;;;;;;;;AAGrB,IAAA,AAAMA,sBAAN,MAAMA;IASX,MAAMC,wBAAuC;QAC3C,MAAMC,gBAA0B,EAAE;QAClC,WAAW,MAAM,CAACC,IAAIC,MAAMC,MAAM,IAAI,IAAI,CAACC,WAAW,CAACC,QAAQ,GAAI;YACjE,IAAIC;YACJ,OAAQJ;gBACN,KAAK;oBACHI,cAAc,GAAGC,yBAAe,GAAGN,IAAI;oBACvC;gBACF,KAAK;oBACHK,cAAc,GAAGE,0BAAgB,GAAGP,IAAI;oBACxC;gBACF,KAAK;oBACHK,cAAc,GAAGG,0BAAgB,GAAGR,IAAI;YAC5C;YACA,IAAI;gBACF,MAAM,IAAI,CAACS,UAAU,CAACJ,aAAaH;YACrC,EAAE,OAAOQ,GAAG;gBACV,IAAI,CAACC,M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