@ozdao/martyrs 0.2.486 → 0.2.487

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 (591) hide show
  1. package/dist/Media-B2jWzwLB.cjs +1 -0
  2. package/dist/{Media-CXQSPHt2.js → Media-DZ5_ItXQ.js} +3 -3
  3. package/dist/auth.server.cjs +1 -1
  4. package/dist/auth.server.js +1 -1
  5. package/dist/{authJwt-DBB51Iql.cjs → authJwt-D35KyJlE.cjs} +31 -2
  6. package/dist/{authJwt-DcYNNwcr.js → authJwt-DqxhUym0.js} +31 -2
  7. package/dist/chats.server.cjs +1 -1
  8. package/dist/chats.server.js +1 -1
  9. package/dist/community.server.cjs +1 -1
  10. package/dist/community.server.js +1 -1
  11. package/dist/crud-BDIArc5A.cjs +1096 -0
  12. package/dist/crud-DJvpe0aZ.js +1097 -0
  13. package/dist/events.server.cjs +1 -1
  14. package/dist/events.server.js +1 -1
  15. package/dist/files.server.cjs +1 -1
  16. package/dist/files.server.js +1 -1
  17. package/dist/gallery.server.cjs +1 -1
  18. package/dist/gallery.server.js +1 -1
  19. package/dist/{index-CsJwdsBW.js → index-CVuQC4k1.js} +1 -1
  20. package/dist/{index-YNOkL1mu.cjs → index-DiSKVCaA.cjs} +1 -1
  21. package/dist/main-C6_DPWGX.cjs +11 -0
  22. package/dist/{main-Cfh5138F.js → main-nQmkbWsW.js} +825 -826
  23. package/dist/martyrs/src/components/Chips/{Chips.vue2.cjs → Chips.vue.cjs} +2 -2
  24. package/dist/martyrs/src/components/Chips/Chips.vue.cjs.map +1 -0
  25. package/dist/martyrs/src/components/Chips/{Chips.vue2.js → Chips.vue.js} +2 -2
  26. package/dist/martyrs/src/components/Chips/Chips.vue.js.map +1 -0
  27. package/dist/martyrs/src/components/Field/{Field.vue.cjs → Field.vue2.cjs} +5 -6
  28. package/dist/martyrs/src/components/Field/Field.vue2.cjs.map +1 -0
  29. package/dist/martyrs/src/components/Field/{Field.vue.js → Field.vue2.js} +5 -6
  30. package/dist/martyrs/src/components/Field/Field.vue2.js.map +1 -0
  31. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs +10 -9
  32. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs.map +1 -1
  33. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +13 -12
  34. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js.map +1 -1
  35. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  36. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.cjs.map +1 -1
  37. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.js +1 -1
  38. package/dist/martyrs/src/components/FieldPhone/FieldPhone.vue.js.map +1 -1
  39. package/dist/martyrs/src/components/Media/Media.vue.cjs +2 -2
  40. package/dist/martyrs/src/components/Media/Media.vue.cjs.map +1 -1
  41. package/dist/martyrs/src/components/Media/Media.vue.js +2 -2
  42. package/dist/martyrs/src/components/Media/Media.vue.js.map +1 -1
  43. package/dist/martyrs/src/components/Select/Select.vue.cjs +2 -2
  44. package/dist/martyrs/src/components/Select/Select.vue.cjs.map +1 -1
  45. package/dist/martyrs/src/components/Select/Select.vue.js +2 -2
  46. package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -1
  47. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -0
  48. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.cjs.map +1 -1
  49. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -0
  50. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js.map +1 -1
  51. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
  52. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +5 -5
  53. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
  54. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +5 -5
  55. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +1 -0
  56. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs.map +1 -1
  57. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +1 -0
  58. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
  59. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +1 -1
  60. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +10 -10
  61. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
  62. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +4 -4
  63. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -1
  64. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +5 -5
  65. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
  66. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +4 -4
  67. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
  68. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +23 -23
  69. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  70. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  71. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  72. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +1 -1
  73. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  74. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +11 -11
  75. package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.cjs +1 -1
  76. package/dist/martyrs/src/modules/constructor/components/elements/Card.vue.js +3 -3
  77. package/dist/martyrs/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  78. package/dist/martyrs/src/modules/constructor/components/elements/Embed.vue.js +2 -2
  79. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  80. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  81. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  82. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +25 -25
  83. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  84. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +15 -15
  85. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +9 -2
  86. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
  87. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +9 -2
  88. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
  89. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +2 -1
  90. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs.map +1 -1
  91. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -1
  92. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js.map +1 -1
  93. package/dist/martyrs/src/modules/globals/views/classes/globals.store.cjs +24 -58
  94. package/dist/martyrs/src/modules/globals/views/classes/globals.store.cjs.map +1 -1
  95. package/dist/martyrs/src/modules/globals/views/classes/globals.store.js +24 -58
  96. package/dist/martyrs/src/modules/globals/views/classes/globals.store.js.map +1 -1
  97. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
  98. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue.js +2 -2
  99. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs +1 -0
  100. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs.map +1 -1
  101. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js +1 -0
  102. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js.map +1 -1
  103. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterOptions.vue.cjs +1 -1
  104. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterOptions.vue.js +2 -2
  105. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterPrice.vue.cjs +1 -1
  106. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterPrice.vue.js +3 -3
  107. package/dist/martyrs/src/modules/globals/views/store/globals.cjs +6 -0
  108. package/dist/martyrs/src/modules/globals/views/store/globals.cjs.map +1 -1
  109. package/dist/martyrs/src/modules/globals/views/store/globals.js +6 -0
  110. package/dist/martyrs/src/modules/globals/views/store/globals.js.map +1 -1
  111. package/dist/martyrs/src/modules/globals/views/utils/query-serializer.cjs +100 -0
  112. package/dist/martyrs/src/modules/globals/views/utils/query-serializer.cjs.map +1 -0
  113. package/dist/martyrs/src/modules/globals/views/utils/query-serializer.js +100 -0
  114. package/dist/martyrs/src/modules/globals/views/utils/query-serializer.js.map +1 -0
  115. package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.cjs +224 -0
  116. package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.cjs.map +1 -0
  117. package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.js +224 -0
  118. package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.js.map +1 -0
  119. package/dist/martyrs/src/modules/icons/entities/IconAddress.vue.cjs +40 -0
  120. package/dist/martyrs/src/modules/icons/entities/IconAddress.vue.cjs.map +1 -0
  121. package/dist/martyrs/src/modules/icons/entities/IconAddress.vue.js +40 -0
  122. package/dist/martyrs/src/modules/icons/entities/IconAddress.vue.js.map +1 -0
  123. package/dist/martyrs/src/modules/icons/entities/IconDate.vue.cjs +6 -6
  124. package/dist/martyrs/src/modules/icons/entities/IconDate.vue.js +6 -6
  125. package/dist/martyrs/src/modules/icons/entities/IconEmail.vue.cjs +32 -0
  126. package/dist/martyrs/src/modules/icons/entities/IconEmail.vue.cjs.map +1 -0
  127. package/dist/martyrs/src/modules/icons/entities/IconEmail.vue.js +32 -0
  128. package/dist/martyrs/src/modules/icons/entities/IconEmail.vue.js.map +1 -0
  129. package/dist/martyrs/src/modules/icons/entities/IconMusic.vue.cjs +10 -12
  130. package/dist/martyrs/src/modules/icons/entities/IconMusic.vue.cjs.map +1 -1
  131. package/dist/martyrs/src/modules/icons/entities/IconMusic.vue.js +11 -13
  132. package/dist/martyrs/src/modules/icons/entities/IconMusic.vue.js.map +1 -1
  133. package/dist/martyrs/src/modules/icons/entities/IconPhone.vue.cjs +32 -0
  134. package/dist/martyrs/src/modules/icons/entities/IconPhone.vue.cjs.map +1 -0
  135. package/dist/martyrs/src/modules/icons/entities/IconPhone.vue.js +32 -0
  136. package/dist/martyrs/src/modules/icons/entities/IconPhone.vue.js.map +1 -0
  137. package/dist/martyrs/src/modules/icons/icons.client.cjs +48 -4
  138. package/dist/martyrs/src/modules/icons/icons.client.cjs.map +1 -1
  139. package/dist/martyrs/src/modules/icons/icons.client.js +172 -128
  140. package/dist/martyrs/src/modules/icons/icons.client.js.map +1 -1
  141. package/dist/martyrs/src/modules/icons/navigation/IconCross.vue.cjs +5 -7
  142. package/dist/martyrs/src/modules/icons/navigation/IconCross.vue.cjs.map +1 -1
  143. package/dist/martyrs/src/modules/icons/navigation/IconCross.vue.js +5 -7
  144. package/dist/martyrs/src/modules/icons/navigation/IconCross.vue.js.map +1 -1
  145. package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.cjs +6 -11
  146. package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.cjs.map +1 -1
  147. package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.js +6 -11
  148. package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.js.map +1 -1
  149. package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.cjs +6 -11
  150. package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.cjs.map +1 -1
  151. package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.js +6 -11
  152. package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.js.map +1 -1
  153. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs +62 -6
  154. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs.map +1 -1
  155. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js +189 -133
  156. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js.map +1 -1
  157. package/dist/martyrs/src/modules/icons/socials/dribbble.vue.cjs +21 -12
  158. package/dist/martyrs/src/modules/icons/socials/dribbble.vue.cjs.map +1 -1
  159. package/dist/martyrs/src/modules/icons/socials/dribbble.vue.js +21 -12
  160. package/dist/martyrs/src/modules/icons/socials/dribbble.vue.js.map +1 -1
  161. package/dist/martyrs/src/modules/icons/socials/facebook.vue.cjs +21 -12
  162. package/dist/martyrs/src/modules/icons/socials/facebook.vue.cjs.map +1 -1
  163. package/dist/martyrs/src/modules/icons/socials/facebook.vue.js +21 -12
  164. package/dist/martyrs/src/modules/icons/socials/facebook.vue.js.map +1 -1
  165. package/dist/martyrs/src/modules/icons/socials/instagram.vue.cjs +25 -17
  166. package/dist/martyrs/src/modules/icons/socials/instagram.vue.cjs.map +1 -1
  167. package/dist/martyrs/src/modules/icons/socials/instagram.vue.js +25 -17
  168. package/dist/martyrs/src/modules/icons/socials/instagram.vue.js.map +1 -1
  169. package/dist/martyrs/src/modules/icons/socials/line.vue.cjs +23 -14
  170. package/dist/martyrs/src/modules/icons/socials/line.vue.cjs.map +1 -1
  171. package/dist/martyrs/src/modules/icons/socials/line.vue.js +23 -14
  172. package/dist/martyrs/src/modules/icons/socials/line.vue.js.map +1 -1
  173. package/dist/martyrs/src/modules/icons/socials/linkedin.vue.cjs +26 -17
  174. package/dist/martyrs/src/modules/icons/socials/linkedin.vue.cjs.map +1 -1
  175. package/dist/martyrs/src/modules/icons/socials/linkedin.vue.js +26 -17
  176. package/dist/martyrs/src/modules/icons/socials/linkedin.vue.js.map +1 -1
  177. package/dist/martyrs/src/modules/icons/socials/reddit.vue.cjs +21 -12
  178. package/dist/martyrs/src/modules/icons/socials/reddit.vue.cjs.map +1 -1
  179. package/dist/martyrs/src/modules/icons/socials/reddit.vue.js +21 -12
  180. package/dist/martyrs/src/modules/icons/socials/reddit.vue.js.map +1 -1
  181. package/dist/martyrs/src/modules/icons/socials/telegram.vue.cjs +29 -20
  182. package/dist/martyrs/src/modules/icons/socials/telegram.vue.cjs.map +1 -1
  183. package/dist/martyrs/src/modules/icons/socials/telegram.vue.js +29 -20
  184. package/dist/martyrs/src/modules/icons/socials/telegram.vue.js.map +1 -1
  185. package/dist/martyrs/src/modules/icons/socials/twitter.vue.cjs +21 -12
  186. package/dist/martyrs/src/modules/icons/socials/twitter.vue.cjs.map +1 -1
  187. package/dist/martyrs/src/modules/icons/socials/twitter.vue.js +21 -12
  188. package/dist/martyrs/src/modules/icons/socials/twitter.vue.js.map +1 -1
  189. package/dist/martyrs/src/modules/icons/socials/vk.vue.cjs +21 -12
  190. package/dist/martyrs/src/modules/icons/socials/vk.vue.cjs.map +1 -1
  191. package/dist/martyrs/src/modules/icons/socials/vk.vue.js +21 -12
  192. package/dist/martyrs/src/modules/icons/socials/vk.vue.js.map +1 -1
  193. package/dist/martyrs/src/modules/icons/socials/whatsapp.vue.cjs +32 -0
  194. package/dist/martyrs/src/modules/icons/socials/whatsapp.vue.cjs.map +1 -0
  195. package/dist/martyrs/src/modules/icons/socials/whatsapp.vue.js +32 -0
  196. package/dist/martyrs/src/modules/icons/socials/whatsapp.vue.js.map +1 -0
  197. package/dist/martyrs/src/modules/icons/socials/youtube.vue.cjs +21 -12
  198. package/dist/martyrs/src/modules/icons/socials/youtube.vue.cjs.map +1 -1
  199. package/dist/martyrs/src/modules/icons/socials/youtube.vue.js +21 -12
  200. package/dist/martyrs/src/modules/icons/socials/youtube.vue.js.map +1 -1
  201. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs +3 -3
  202. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs.map +1 -1
  203. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +3 -3
  204. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js.map +1 -1
  205. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.cjs +3 -3
  206. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.cjs.map +1 -1
  207. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js +3 -3
  208. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js.map +1 -1
  209. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs +3 -3
  210. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs.map +1 -1
  211. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +3 -3
  212. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js.map +1 -1
  213. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.cjs +2 -2
  214. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.cjs.map +1 -1
  215. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.js +2 -2
  216. package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.js.map +1 -1
  217. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.cjs +162 -0
  218. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.cjs.map +1 -0
  219. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +162 -0
  220. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js.map +1 -0
  221. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs +437 -0
  222. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs.map +1 -0
  223. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +437 -0
  224. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js.map +1 -0
  225. package/dist/martyrs/src/modules/music/components/{pages → forms}/ArtistForm.vue.cjs +140 -106
  226. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs.map +1 -0
  227. package/dist/martyrs/src/modules/music/components/{pages → forms}/ArtistForm.vue.js +162 -128
  228. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js.map +1 -0
  229. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +11 -11
  230. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs.map +1 -1
  231. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +23 -23
  232. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js.map +1 -1
  233. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs +2 -2
  234. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs.map +1 -1
  235. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +2 -2
  236. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js.map +1 -1
  237. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs +554 -0
  238. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs.map +1 -0
  239. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +554 -0
  240. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js.map +1 -0
  241. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.cjs +57 -68
  242. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.cjs.map +1 -1
  243. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.js +58 -69
  244. package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.js.map +1 -1
  245. package/dist/martyrs/src/modules/music/components/pages/{AlbumDetail.vue.cjs → Album.vue.cjs} +47 -23
  246. package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs.map +1 -0
  247. package/dist/martyrs/src/modules/music/components/pages/{AlbumDetail.vue.js → Album.vue.js} +47 -23
  248. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js.map +1 -0
  249. package/dist/martyrs/src/modules/music/components/pages/AlbumCreate.vue.cjs +14 -0
  250. package/dist/martyrs/src/modules/music/components/pages/AlbumCreate.vue.cjs.map +1 -0
  251. package/dist/martyrs/src/modules/music/components/pages/AlbumCreate.vue.js +14 -0
  252. package/dist/martyrs/src/modules/music/components/pages/AlbumCreate.vue.js.map +1 -0
  253. package/dist/martyrs/src/modules/music/components/pages/AlbumEdit.vue.cjs +23 -0
  254. package/dist/martyrs/src/modules/music/components/pages/AlbumEdit.vue.cjs.map +1 -0
  255. package/dist/martyrs/src/modules/music/components/pages/AlbumEdit.vue.js +23 -0
  256. package/dist/martyrs/src/modules/music/components/pages/AlbumEdit.vue.js.map +1 -0
  257. package/dist/martyrs/src/modules/music/components/pages/{ArtistDetail.vue.cjs → Artist.vue.cjs} +11 -11
  258. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs.map +1 -0
  259. package/dist/martyrs/src/modules/music/components/pages/{ArtistDetail.vue.js → Artist.vue.js} +11 -11
  260. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js.map +1 -0
  261. package/dist/martyrs/src/modules/music/components/pages/ArtistCreate.vue.cjs +14 -0
  262. package/dist/martyrs/src/modules/music/components/pages/ArtistCreate.vue.cjs.map +1 -0
  263. package/dist/martyrs/src/modules/music/components/pages/ArtistCreate.vue.js +14 -0
  264. package/dist/martyrs/src/modules/music/components/pages/ArtistCreate.vue.js.map +1 -0
  265. package/dist/martyrs/src/modules/music/components/pages/ArtistEdit.vue.cjs +23 -0
  266. package/dist/martyrs/src/modules/music/components/pages/ArtistEdit.vue.cjs.map +1 -0
  267. package/dist/martyrs/src/modules/music/components/pages/ArtistEdit.vue.js +23 -0
  268. package/dist/martyrs/src/modules/music/components/pages/ArtistEdit.vue.js.map +1 -0
  269. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.cjs +94 -59
  270. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.cjs.map +1 -1
  271. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.js +95 -60
  272. package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.js.map +1 -1
  273. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs +168 -120
  274. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs.map +1 -1
  275. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +170 -122
  276. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js.map +1 -1
  277. package/dist/martyrs/src/modules/music/components/pages/{PlaylistDetail.vue.cjs → Playlist.vue.cjs} +60 -36
  278. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs.map +1 -0
  279. package/dist/martyrs/src/modules/music/components/pages/{PlaylistDetail.vue.js → Playlist.vue.js} +73 -49
  280. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js.map +1 -0
  281. package/dist/martyrs/src/modules/music/components/pages/PlaylistCreate.vue.cjs +14 -0
  282. package/dist/martyrs/src/modules/music/components/pages/PlaylistCreate.vue.cjs.map +1 -0
  283. package/dist/martyrs/src/modules/music/components/pages/PlaylistCreate.vue.js +14 -0
  284. package/dist/martyrs/src/modules/music/components/pages/PlaylistCreate.vue.js.map +1 -0
  285. package/dist/martyrs/src/modules/music/components/pages/PlaylistEdit.vue.cjs +23 -0
  286. package/dist/martyrs/src/modules/music/components/pages/PlaylistEdit.vue.cjs.map +1 -0
  287. package/dist/martyrs/src/modules/music/components/pages/PlaylistEdit.vue.js +23 -0
  288. package/dist/martyrs/src/modules/music/components/pages/PlaylistEdit.vue.js.map +1 -0
  289. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs +52 -28
  290. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs.map +1 -1
  291. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +52 -28
  292. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js.map +1 -1
  293. package/dist/martyrs/src/modules/music/components/pages/{TrackDetail.vue.cjs → Track.vue.cjs} +37 -13
  294. package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs.map +1 -0
  295. package/dist/martyrs/src/modules/music/components/pages/{TrackDetail.vue.js → Track.vue.js} +38 -14
  296. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js.map +1 -0
  297. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.cjs +28 -0
  298. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.cjs.map +1 -0
  299. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +28 -0
  300. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js.map +1 -0
  301. package/dist/martyrs/src/modules/music/components/pages/TrackEdit.vue.cjs +23 -0
  302. package/dist/martyrs/src/modules/music/components/pages/TrackEdit.vue.cjs.map +1 -0
  303. package/dist/martyrs/src/modules/music/components/pages/TrackEdit.vue.js +23 -0
  304. package/dist/martyrs/src/modules/music/components/pages/TrackEdit.vue.js.map +1 -0
  305. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs +3 -3
  306. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs.map +1 -1
  307. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +3 -3
  308. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js.map +1 -1
  309. package/dist/martyrs/src/modules/music/music.client.cjs +31 -31
  310. package/dist/martyrs/src/modules/music/music.client.cjs.map +1 -1
  311. package/dist/martyrs/src/modules/music/music.client.js +31 -31
  312. package/dist/martyrs/src/modules/music/music.client.js.map +1 -1
  313. package/dist/martyrs/src/modules/music/router/albums.cjs +34 -0
  314. package/dist/martyrs/src/modules/music/router/albums.cjs.map +1 -0
  315. package/dist/martyrs/src/modules/music/router/albums.js +34 -0
  316. package/dist/martyrs/src/modules/music/router/albums.js.map +1 -0
  317. package/dist/martyrs/src/modules/music/router/artists.cjs +34 -0
  318. package/dist/martyrs/src/modules/music/router/artists.cjs.map +1 -0
  319. package/dist/martyrs/src/modules/music/router/artists.js +34 -0
  320. package/dist/martyrs/src/modules/music/router/artists.js.map +1 -0
  321. package/dist/martyrs/src/modules/music/router/music.cjs +12 -64
  322. package/dist/martyrs/src/modules/music/router/music.cjs.map +1 -1
  323. package/dist/martyrs/src/modules/music/router/music.js +12 -64
  324. package/dist/martyrs/src/modules/music/router/music.js.map +1 -1
  325. package/dist/martyrs/src/modules/music/router/playlists.cjs +34 -0
  326. package/dist/martyrs/src/modules/music/router/playlists.cjs.map +1 -0
  327. package/dist/martyrs/src/modules/music/router/playlists.js +34 -0
  328. package/dist/martyrs/src/modules/music/router/playlists.js.map +1 -0
  329. package/dist/martyrs/src/modules/music/router/tracks.cjs +34 -0
  330. package/dist/martyrs/src/modules/music/router/tracks.cjs.map +1 -0
  331. package/dist/martyrs/src/modules/music/router/tracks.js +34 -0
  332. package/dist/martyrs/src/modules/music/router/tracks.js.map +1 -0
  333. package/dist/martyrs/src/modules/music/store/artists.cjs +12 -6
  334. package/dist/martyrs/src/modules/music/store/artists.cjs.map +1 -1
  335. package/dist/martyrs/src/modules/music/store/artists.js +12 -6
  336. package/dist/martyrs/src/modules/music/store/artists.js.map +1 -1
  337. package/dist/martyrs/src/modules/music/store/genres.cjs +123 -0
  338. package/dist/martyrs/src/modules/music/store/genres.cjs.map +1 -0
  339. package/dist/martyrs/src/modules/music/store/genres.js +123 -0
  340. package/dist/martyrs/src/modules/music/store/genres.js.map +1 -0
  341. package/dist/martyrs/src/modules/music/store/playlists.cjs +14 -6
  342. package/dist/martyrs/src/modules/music/store/playlists.cjs.map +1 -1
  343. package/dist/martyrs/src/modules/music/store/playlists.js +14 -6
  344. package/dist/martyrs/src/modules/music/store/playlists.js.map +1 -1
  345. package/dist/martyrs/src/modules/music/store/tracks.cjs +6 -2
  346. package/dist/martyrs/src/modules/music/store/tracks.cjs.map +1 -1
  347. package/dist/martyrs/src/modules/music/store/tracks.js +6 -2
  348. package/dist/martyrs/src/modules/music/store/tracks.js.map +1 -1
  349. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -0
  350. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs.map +1 -1
  351. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -0
  352. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js.map +1 -1
  353. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -0
  354. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs.map +1 -1
  355. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -0
  356. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js.map +1 -1
  357. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  358. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.js +5 -5
  359. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  360. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +2 -2
  361. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  362. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  363. package/dist/martyrs/src/modules/organizations/components/blocks/Socials.vue.js +16 -16
  364. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  365. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +15 -15
  366. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  367. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +16 -16
  368. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +1 -1
  369. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js +1 -1
  370. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  371. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  372. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  373. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +8 -8
  374. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -0
  375. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs.map +1 -1
  376. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -0
  377. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js.map +1 -1
  378. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -0
  379. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs.map +1 -1
  380. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -0
  381. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js.map +1 -1
  382. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -0
  383. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs.map +1 -1
  384. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -0
  385. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js.map +1 -1
  386. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.cjs +1 -1
  387. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +1 -1
  388. package/dist/martyrs/src/modules/products/components/forms/ReorderSettingsForm.vue.cjs +1 -1
  389. package/dist/martyrs/src/modules/products/components/forms/ReorderSettingsForm.vue.js +8 -8
  390. package/dist/martyrs/src/modules/products/components/forms/StockAuditForm.vue.cjs +1 -1
  391. package/dist/martyrs/src/modules/products/components/forms/StockAuditForm.vue.js +12 -12
  392. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  393. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +11 -11
  394. package/dist/martyrs/src/modules/products/components/pages/LeftoverEdit.vue.cjs +1 -1
  395. package/dist/martyrs/src/modules/products/components/pages/LeftoverEdit.vue.js +10 -10
  396. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  397. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +17 -17
  398. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.cjs +1 -1
  399. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +6 -6
  400. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +1 -1
  401. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +12 -12
  402. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +1 -1
  403. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +16 -16
  404. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.cjs +1 -1
  405. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +4 -4
  406. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  407. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  408. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -0
  409. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs.map +1 -1
  410. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -0
  411. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js.map +1 -1
  412. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -0
  413. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs.map +1 -1
  414. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -0
  415. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js.map +1 -1
  416. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  417. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +12 -12
  418. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +1 -1
  419. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +7 -7
  420. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
  421. package/dist/martyrs/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +2 -2
  422. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  423. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
  424. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  425. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
  426. package/dist/martyrs.cjs.js +1 -1
  427. package/dist/martyrs.css +1 -1
  428. package/dist/martyrs.es.js +1 -1
  429. package/dist/music.server.cjs +1165 -551
  430. package/dist/music.server.js +1161 -547
  431. package/dist/orders.server.cjs +89 -4
  432. package/dist/orders.server.js +88 -3
  433. package/dist/organizations.server.cjs +1 -1
  434. package/dist/organizations.server.js +1 -1
  435. package/dist/products.server.cjs +3 -1093
  436. package/dist/products.server.js +2 -1092
  437. package/dist/rents.server.cjs +1 -1
  438. package/dist/rents.server.js +1 -1
  439. package/dist/style.css +121 -77
  440. package/dist/wallet.server.cjs +1 -1
  441. package/dist/wallet.server.js +1 -1
  442. package/package.json +1 -1
  443. package/src/components/Field/Field.vue +13 -8
  444. package/src/components/FieldBig/FieldBig.vue +3 -5
  445. package/src/components/FieldPhone/FieldPhone.vue +1 -1
  446. package/src/components/Media/Media.vue +1 -1
  447. package/src/components/Select/Select.vue +1 -1
  448. package/src/components/Status/Snack.vue +83 -0
  449. package/src/modules/auth/controllers/middlewares/authJwt.js +59 -6
  450. package/src/modules/globals/views/classes/globals.store.js +31 -66
  451. package/src/modules/globals/views/components/partials/FooterAlt.vue +363 -0
  452. package/src/modules/globals/views/store/globals.js +42 -0
  453. package/src/modules/globals/views/utils/query-serializer.js +182 -0
  454. package/src/modules/icons/components/IconSearchPopup.vue +254 -0
  455. package/src/modules/icons/entities/IconAddress.vue +17 -0
  456. package/src/modules/icons/entities/IconDate.vue +3 -3
  457. package/src/modules/icons/entities/IconEmail.vue +14 -0
  458. package/src/modules/icons/entities/IconMusic.vue +3 -3
  459. package/src/modules/icons/entities/IconPhone.vue +14 -0
  460. package/src/modules/icons/icons.client.js +85 -31
  461. package/src/modules/icons/icons.server.js +292 -0
  462. package/src/modules/icons/navigation/IconCross.vue +4 -16
  463. package/src/modules/icons/navigation/IconPause.vue +9 -24
  464. package/src/modules/icons/navigation/IconRefresh.vue +9 -24
  465. package/src/modules/icons/pages/IconsPage.vue +78 -2
  466. package/src/modules/icons/routes/icons.routes.js +81 -0
  467. package/src/modules/icons/socials/dribbble.vue +11 -2
  468. package/src/modules/icons/socials/facebook.vue +11 -2
  469. package/src/modules/icons/socials/instagram.vue +11 -4
  470. package/src/modules/icons/socials/line.vue +11 -2
  471. package/src/modules/icons/socials/linkedin.vue +11 -2
  472. package/src/modules/icons/socials/reddit.vue +10 -1
  473. package/src/modules/icons/socials/telegram.vue +11 -2
  474. package/src/modules/icons/socials/twitter.vue +11 -2
  475. package/src/modules/icons/socials/vk.vue +11 -2
  476. package/src/modules/icons/socials/whatsapp.vue +12 -0
  477. package/src/modules/icons/socials/youtube.vue +11 -2
  478. package/src/modules/music/.claude/settings.local.json +8 -0
  479. package/src/modules/music/CLAUDE.md +312 -0
  480. package/src/modules/music/components/SidebarMusic.vue +8 -8
  481. package/src/modules/music/components/cards/AlbumCard.vue +2 -2
  482. package/src/modules/music/components/cards/ArtistCard.vue +2 -2
  483. package/src/modules/music/components/cards/PlaylistCard.vue +2 -2
  484. package/src/modules/music/components/cards/TrackCard.vue +1 -1
  485. package/src/modules/music/components/cards/TrackListCard.vue +135 -0
  486. package/src/modules/music/components/forms/AlbumForm.vue +463 -0
  487. package/src/modules/music/components/{pages → forms}/ArtistForm.vue +127 -96
  488. package/src/modules/music/components/forms/PlaylistForm.vue +10 -10
  489. package/src/modules/music/components/forms/SearchForm.vue +1 -1
  490. package/src/modules/music/components/forms/TrackForm.vue +577 -0
  491. package/src/modules/music/components/layouts/MusicLayout.vue +35 -41
  492. package/src/modules/music/components/pages/{AlbumDetail.vue → Album.vue} +42 -20
  493. package/src/modules/music/components/pages/AlbumCreate.vue +7 -0
  494. package/src/modules/music/components/pages/AlbumEdit.vue +14 -0
  495. package/src/modules/music/components/pages/{ArtistDetail.vue → Artist.vue} +9 -9
  496. package/src/modules/music/components/pages/ArtistCreate.vue +7 -0
  497. package/src/modules/music/components/pages/ArtistEdit.vue +14 -0
  498. package/src/modules/music/components/pages/MusicHome.vue +86 -67
  499. package/src/modules/music/components/pages/MusicLibrary.vue +136 -105
  500. package/src/modules/music/components/pages/{PlaylistDetail.vue → Playlist.vue} +56 -34
  501. package/src/modules/music/components/pages/PlaylistCreate.vue +7 -0
  502. package/src/modules/music/components/pages/PlaylistEdit.vue +14 -0
  503. package/src/modules/music/components/pages/SearchResults.vue +49 -27
  504. package/src/modules/music/components/pages/{TrackDetail.vue → Track.vue} +36 -14
  505. package/src/modules/music/components/pages/TrackCreate.vue +23 -0
  506. package/src/modules/music/components/pages/TrackEdit.vue +14 -0
  507. package/src/modules/music/components/player/MusicPlayer.vue +2 -2
  508. package/src/modules/music/middlewares/albums.verifier.js +234 -0
  509. package/src/modules/music/middlewares/artists.verifier.js +213 -0
  510. package/src/modules/music/middlewares/genres.verifier.js +148 -0
  511. package/src/modules/music/middlewares/playlists.verifier.js +219 -0
  512. package/src/modules/music/middlewares/tracks.verifier.js +263 -0
  513. package/src/modules/music/music.client.js +31 -33
  514. package/src/modules/music/music.server.js +33 -26
  515. package/src/modules/music/router/albums.js +31 -0
  516. package/src/modules/music/router/artists.js +31 -0
  517. package/src/modules/music/router/music.js +14 -65
  518. package/src/modules/music/router/playlists.js +31 -0
  519. package/src/modules/music/router/tracks.js +31 -0
  520. package/src/modules/music/routes/albums.routes.js +126 -0
  521. package/src/modules/music/routes/artists.routes.js +171 -0
  522. package/src/modules/music/routes/genres.routes.js +118 -0
  523. package/src/modules/music/routes/playlists.routes.js +239 -0
  524. package/src/modules/music/routes/tracks.routes.js +149 -0
  525. package/src/modules/music/store/artists.js +17 -7
  526. package/src/modules/music/store/genres.js +150 -0
  527. package/src/modules/music/store/playlists.js +19 -6
  528. package/src/modules/music/store/tracks.js +9 -2
  529. package/dist/Media-DhpD64nT.cjs +0 -1
  530. package/dist/globals.crud-BQG1Lm0A.js +0 -90
  531. package/dist/globals.crud-Dv7UXbRM.cjs +0 -89
  532. package/dist/main-DKJqboZy.cjs +0 -11
  533. package/dist/martyrs/src/components/Chips/Chips.vue2.cjs.map +0 -1
  534. package/dist/martyrs/src/components/Chips/Chips.vue2.js.map +0 -1
  535. package/dist/martyrs/src/components/Field/Field.vue.cjs.map +0 -1
  536. package/dist/martyrs/src/components/Field/Field.vue.js.map +0 -1
  537. package/dist/martyrs/src/modules/music/components/forms/UploadForm.vue.cjs +0 -328
  538. package/dist/martyrs/src/modules/music/components/forms/UploadForm.vue.cjs.map +0 -1
  539. package/dist/martyrs/src/modules/music/components/forms/UploadForm.vue.js +0 -328
  540. package/dist/martyrs/src/modules/music/components/forms/UploadForm.vue.js.map +0 -1
  541. package/dist/martyrs/src/modules/music/components/lists/AlbumList.vue.cjs +0 -44
  542. package/dist/martyrs/src/modules/music/components/lists/AlbumList.vue.cjs.map +0 -1
  543. package/dist/martyrs/src/modules/music/components/lists/AlbumList.vue.js +0 -44
  544. package/dist/martyrs/src/modules/music/components/lists/AlbumList.vue.js.map +0 -1
  545. package/dist/martyrs/src/modules/music/components/lists/ArtistList.vue.cjs +0 -305
  546. package/dist/martyrs/src/modules/music/components/lists/ArtistList.vue.cjs.map +0 -1
  547. package/dist/martyrs/src/modules/music/components/lists/ArtistList.vue.js +0 -305
  548. package/dist/martyrs/src/modules/music/components/lists/ArtistList.vue.js.map +0 -1
  549. package/dist/martyrs/src/modules/music/components/lists/PlaylistList.vue.cjs +0 -44
  550. package/dist/martyrs/src/modules/music/components/lists/PlaylistList.vue.cjs.map +0 -1
  551. package/dist/martyrs/src/modules/music/components/lists/PlaylistList.vue.js +0 -44
  552. package/dist/martyrs/src/modules/music/components/lists/PlaylistList.vue.js.map +0 -1
  553. package/dist/martyrs/src/modules/music/components/lists/TrackList.vue.cjs +0 -199
  554. package/dist/martyrs/src/modules/music/components/lists/TrackList.vue.cjs.map +0 -1
  555. package/dist/martyrs/src/modules/music/components/lists/TrackList.vue.js +0 -199
  556. package/dist/martyrs/src/modules/music/components/lists/TrackList.vue.js.map +0 -1
  557. package/dist/martyrs/src/modules/music/components/pages/AlbumDetail.vue.cjs.map +0 -1
  558. package/dist/martyrs/src/modules/music/components/pages/AlbumDetail.vue.js.map +0 -1
  559. package/dist/martyrs/src/modules/music/components/pages/ArtistDetail.vue.cjs.map +0 -1
  560. package/dist/martyrs/src/modules/music/components/pages/ArtistDetail.vue.js.map +0 -1
  561. package/dist/martyrs/src/modules/music/components/pages/ArtistForm.vue.cjs.map +0 -1
  562. package/dist/martyrs/src/modules/music/components/pages/ArtistForm.vue.js.map +0 -1
  563. package/dist/martyrs/src/modules/music/components/pages/ArtistManager.vue.cjs +0 -303
  564. package/dist/martyrs/src/modules/music/components/pages/ArtistManager.vue.cjs.map +0 -1
  565. package/dist/martyrs/src/modules/music/components/pages/ArtistManager.vue.js +0 -303
  566. package/dist/martyrs/src/modules/music/components/pages/ArtistManager.vue.js.map +0 -1
  567. package/dist/martyrs/src/modules/music/components/pages/MusicUpload.vue.cjs +0 -50
  568. package/dist/martyrs/src/modules/music/components/pages/MusicUpload.vue.cjs.map +0 -1
  569. package/dist/martyrs/src/modules/music/components/pages/MusicUpload.vue.js +0 -50
  570. package/dist/martyrs/src/modules/music/components/pages/MusicUpload.vue.js.map +0 -1
  571. package/dist/martyrs/src/modules/music/components/pages/PlaylistDetail.vue.cjs.map +0 -1
  572. package/dist/martyrs/src/modules/music/components/pages/PlaylistDetail.vue.js.map +0 -1
  573. package/dist/martyrs/src/modules/music/components/pages/TrackDetail.vue.cjs.map +0 -1
  574. package/dist/martyrs/src/modules/music/components/pages/TrackDetail.vue.js.map +0 -1
  575. package/src/modules/music/components/forms/UploadForm.vue +0 -313
  576. package/src/modules/music/components/lists/AlbumList.vue +0 -25
  577. package/src/modules/music/components/lists/ArtistList.vue +0 -280
  578. package/src/modules/music/components/lists/PlaylistList.vue +0 -25
  579. package/src/modules/music/components/lists/TrackList.vue +0 -175
  580. package/src/modules/music/components/pages/ArtistManager.vue +0 -277
  581. package/src/modules/music/components/pages/MusicUpload.vue +0 -44
  582. package/src/modules/music/controllers/album.controller.js +0 -82
  583. package/src/modules/music/controllers/artist.controller.js +0 -99
  584. package/src/modules/music/controllers/genre.controller.js +0 -63
  585. package/src/modules/music/controllers/music.controller.js +0 -145
  586. package/src/modules/music/controllers/playlist.controller.js +0 -146
  587. package/src/modules/music/routes/album.routes.js +0 -28
  588. package/src/modules/music/routes/artist.routes.js +0 -30
  589. package/src/modules/music/routes/genre.routes.js +0 -28
  590. package/src/modules/music/routes/music.routes.js +0 -106
  591. package/src/modules/music/routes/playlist.routes.js +0 -47
@@ -6,10 +6,10 @@ import { a as applyCommonSchema } from "./common.schema-Bw1O5_2Q.js";
6
6
  import { a as applyEngagementSchema } from "./engagement.schema-Dh1adRsn.js";
7
7
  import { a as applyMetadataSchema } from "./metadata.schema-CWmcDJN7.js";
8
8
  import { a as applyOwnershipSchema } from "./ownership.schema-CCZX5vfw.js";
9
- import { m as middlewareFactory } from "./authJwt-DcYNNwcr.js";
9
+ import { m as middlewareFactory } from "./authJwt-DqxhUym0.js";
10
10
  import { g as globalsabac } from "./globals.abac-DBV_kaOq.js";
11
11
  import { a as Validator, V as Verifier } from "./globals.verifier-CWFz5Gh2.js";
12
- import { O as Observer } from "./globals.observer-CDqUjVU5.js";
12
+ import { C as CRUD } from "./crud-DJvpe0aZ.js";
13
13
  import { A as ABAC } from "./abac-Cf_9lCSh.js";
14
14
  const controllerFactory$2 = (db) => {
15
15
  const Category = db.category;
@@ -1395,1096 +1395,6 @@ const productsRoutes = function(app, db, allowedOrigins) {
1395
1395
  app.delete("/api/products/:_id", controller.Delete);
1396
1396
  app.post("/api/product/recommended", controller.getProductRecommendation);
1397
1397
  };
1398
- class CRUDCore {
1399
- constructor(crud) {
1400
- this.crud = crud;
1401
- this.verifiers = {};
1402
- this.hooks = {};
1403
- this.aggregateExtensions = {};
1404
- this.cacheOptions = {
1405
- ttl: 300,
1406
- // 5 минут по умолчанию
1407
- tags: [crud.modelName],
1408
- enabled: true
1409
- };
1410
- this.auth = {
1411
- read: false,
1412
- // Публичный доступ к чтению
1413
- create: true,
1414
- // Требует авторизацию
1415
- update: true,
1416
- // Требует авторизацию
1417
- delete: true
1418
- // Требует авторизацию
1419
- };
1420
- this.options = {
1421
- enableEvents: true,
1422
- enableAudit: false,
1423
- enableMetrics: false,
1424
- strictMode: false,
1425
- serviceKey: process.env.SERVICE_KEY
1426
- };
1427
- }
1428
- // Инициализация с опциями
1429
- init(options = {}) {
1430
- if (options.auth !== void 0) {
1431
- if (options.auth === false) {
1432
- this.auth = false;
1433
- } else if (options.auth === true) {
1434
- this.auth = {
1435
- read: false,
1436
- create: true,
1437
- update: true,
1438
- delete: true
1439
- };
1440
- } else if (typeof options.auth === "object") {
1441
- this.auth = {
1442
- read: false,
1443
- create: true,
1444
- update: true,
1445
- delete: true,
1446
- ...options.auth
1447
- };
1448
- }
1449
- }
1450
- if (options.cache !== void 0) {
1451
- if (options.cache === false) {
1452
- this.cacheOptions.enabled = false;
1453
- } else if (typeof options.cache === "object") {
1454
- this.setCacheOptions(options.cache);
1455
- }
1456
- }
1457
- if (options.events !== void 0) {
1458
- if (options.events === false) {
1459
- this.options.enableEvents = false;
1460
- } else if (typeof options.events === "object") {
1461
- Object.assign(this.options, options.events);
1462
- }
1463
- }
1464
- if (options.verifiers) this.initVerifiers(options.verifiers);
1465
- if (options.hooks) this.initHooks(options.hooks);
1466
- if (options.middlewares) this.initMiddlewares(options.middlewares);
1467
- if (options.aggregateExtensions) this.initAggregateExtensions(options.aggregateExtensions);
1468
- if (options.abac) this.initABAC(options.abac, options.policies, options.fieldsPolicies);
1469
- if (options.serviceKey !== void 0) {
1470
- this.options.serviceKey = options.serviceKey;
1471
- }
1472
- this.crud.events.init(this.options);
1473
- if (options.abac) {
1474
- this.crud.policies.init(options.abac, options.policies, options.fieldsPolicies);
1475
- }
1476
- }
1477
- // Управление auth
1478
- setAuth(action, required) {
1479
- if (this.auth === false) {
1480
- this.auth = {};
1481
- }
1482
- this.auth[action] = required;
1483
- }
1484
- getAuth(action) {
1485
- if (this.auth === false) return false;
1486
- return this.auth[action] ?? true;
1487
- }
1488
- isAuthEnabled() {
1489
- return this.auth !== false;
1490
- }
1491
- // Управление верификаторами
1492
- setVerifier(action, verifier) {
1493
- this.verifiers[action] = verifier;
1494
- }
1495
- getVerifier(action) {
1496
- return this.verifiers[action];
1497
- }
1498
- initVerifiers(verifiers) {
1499
- Object.entries(verifiers).forEach(([action, verifier]) => {
1500
- this.setVerifier(action, verifier);
1501
- });
1502
- }
1503
- // Управление хуками
1504
- addHook(name, handler) {
1505
- this.hooks[name] = handler;
1506
- }
1507
- getHook(name) {
1508
- return this.hooks[name];
1509
- }
1510
- async executeHook(name, ...args) {
1511
- const hook = this.getHook(name);
1512
- if (hook) {
1513
- return await hook(...args);
1514
- }
1515
- }
1516
- initHooks(hooks) {
1517
- Object.entries(hooks).forEach(([name, handler]) => {
1518
- this.addHook(name, handler);
1519
- });
1520
- }
1521
- // Управление расширениями агрегации
1522
- addAggregateExtension(phase, extension) {
1523
- this.aggregateExtensions[phase] = extension;
1524
- }
1525
- getAggregateExtensions() {
1526
- return this.aggregateExtensions;
1527
- }
1528
- initAggregateExtensions(extensions) {
1529
- Object.entries(extensions).forEach(([phase, extension]) => {
1530
- this.addAggregateExtension(phase, extension);
1531
- });
1532
- }
1533
- // Управление middleware (делегирует в controller)
1534
- initMiddlewares(middlewares) {
1535
- Object.entries(middlewares).forEach(([phase, actions]) => {
1536
- if (typeof actions === "object") {
1537
- Object.entries(actions).forEach(([action, mws]) => {
1538
- const middlewareArray = Array.isArray(mws) ? mws : [mws];
1539
- middlewareArray.forEach((mw) => {
1540
- this.crud.controller.addMiddleware(phase, action, mw);
1541
- });
1542
- });
1543
- }
1544
- });
1545
- }
1546
- // Управление ABAC (делегирует в policies)
1547
- initABAC(abac, policies = {}, fieldsPolicies = null) {
1548
- if (fieldsPolicies && typeof fieldsPolicies === "function" && abac) {
1549
- abac.registerFieldsPolicy(this.crud.modelName, fieldsPolicies);
1550
- }
1551
- }
1552
- // Управление кешем
1553
- getCacheOptions() {
1554
- return { ...this.cacheOptions };
1555
- }
1556
- setCacheOptions(options) {
1557
- Object.assign(this.cacheOptions, options);
1558
- if (!this.cacheOptions.tags.includes(this.crud.modelName)) {
1559
- this.cacheOptions.tags.unshift(this.crud.modelName);
1560
- }
1561
- }
1562
- // Получение опций
1563
- getOptions() {
1564
- return { ...this.options };
1565
- }
1566
- setOption(key, value) {
1567
- this.options[key] = value;
1568
- }
1569
- // Проверка включенности функций
1570
- isEventsEnabled() {
1571
- return this.options.enableEvents;
1572
- }
1573
- isCacheEnabled() {
1574
- return this.cacheOptions.enabled && this.crud.cache !== null;
1575
- }
1576
- isAuditEnabled() {
1577
- return this.options.enableAudit;
1578
- }
1579
- isMetricsEnabled() {
1580
- return this.options.enableMetrics;
1581
- }
1582
- }
1583
- class CRUDController {
1584
- constructor(crud) {
1585
- this.crud = crud;
1586
- this.routes = /* @__PURE__ */ new Map();
1587
- this.middlewares = {
1588
- before: {},
1589
- after: {}
1590
- };
1591
- this.jwt = middlewareFactory(crud.db);
1592
- }
1593
- // Добавление middleware
1594
- addMiddleware(phase, action, middleware) {
1595
- if (!["before", "after"].includes(phase)) {
1596
- throw new Error(`Invalid middleware phase: ${phase}`);
1597
- }
1598
- if (!this.middlewares[phase][action]) {
1599
- this.middlewares[phase][action] = [];
1600
- }
1601
- this.middlewares[phase][action].push(middleware);
1602
- }
1603
- // Получение middleware для действия
1604
- getMiddlewares(phase, action) {
1605
- return this.middlewares[phase][action] || [];
1606
- }
1607
- // Регистрация роута
1608
- registerRoute(method, path, actionName) {
1609
- const fullPath = `${this.crud.basePath}${path}`;
1610
- const middlewareStack = [];
1611
- if (this.crud.core.isAuthEnabled()) {
1612
- const authRequired = this.crud.core.getAuth(actionName);
1613
- middlewareStack.push(this.jwt.verifyToken(!authRequired));
1614
- }
1615
- const verifierMiddleware = this._createVerifierMiddleware(method, actionName);
1616
- if (verifierMiddleware) {
1617
- middlewareStack.push(verifierMiddleware);
1618
- }
1619
- middlewareStack.push(...this.getMiddlewares("before", actionName));
1620
- const abacMiddleware = this.crud.policies.getPoliciesMiddleware(actionName);
1621
- if (abacMiddleware) {
1622
- middlewareStack.push(abacMiddleware);
1623
- }
1624
- if (["create", "update"].includes(actionName)) {
1625
- const fieldsMiddleware = this.crud.policies.getFieldsMiddleware(actionName);
1626
- if (fieldsMiddleware) {
1627
- middlewareStack.push(fieldsMiddleware);
1628
- }
1629
- }
1630
- const handler = this._createHandler(actionName);
1631
- const wrappedHandler = this._wrapHandler(handler, actionName);
1632
- this.crud.app[method](fullPath, ...middlewareStack, wrappedHandler);
1633
- this.routes.set(`${method.toUpperCase()} ${fullPath}`, {
1634
- method,
1635
- path: fullPath,
1636
- actionName,
1637
- middlewareStack
1638
- });
1639
- return this;
1640
- }
1641
- // Регистрация кастомного роута
1642
- registerCustomRoute(method, path, actionName, handler) {
1643
- this.crud.service.registerCustomHandler(actionName, handler);
1644
- return this.registerRoute(method, path, actionName);
1645
- }
1646
- // Создание handler для стандартных CRUD операций
1647
- _createHandler(actionName) {
1648
- switch (actionName) {
1649
- case "create":
1650
- return async (req, res) => {
1651
- try {
1652
- const data = req.verified || req.body;
1653
- const context = this._buildContext(req);
1654
- const created = await this.crud.service.create(data, context);
1655
- res.status(201).json(created);
1656
- } catch (error) {
1657
- this._handleError(error, res);
1658
- }
1659
- };
1660
- case "read":
1661
- return async (req, res) => {
1662
- try {
1663
- const query = req.verified || req.query;
1664
- const context = this._buildContext(req);
1665
- let data = await this.crud.service.read(query, context);
1666
- if (this.crud.policies.hasAbac()) {
1667
- data = await this.crud.policies.filterFieldsForRead(req, data);
1668
- }
1669
- res.json(data);
1670
- } catch (error) {
1671
- this._handleError(error, res);
1672
- }
1673
- };
1674
- case "update":
1675
- return async (req, res) => {
1676
- try {
1677
- const data = req.verified || req.body;
1678
- const { _id, ...updateData } = data;
1679
- if (!_id) {
1680
- return res.status(400).json({ error: "ID_REQUIRED" });
1681
- }
1682
- const context = this._buildContext(req);
1683
- const updated = await this.crud.service.update(_id, updateData, context);
1684
- res.json(updated);
1685
- } catch (error) {
1686
- this._handleError(error, res);
1687
- }
1688
- };
1689
- case "delete":
1690
- return async (req, res) => {
1691
- try {
1692
- const data = req.verified || req.query || req.body;
1693
- const { _id } = data;
1694
- if (!_id) {
1695
- return res.status(400).json({ error: "ID_REQUIRED" });
1696
- }
1697
- const context = this._buildContext(req);
1698
- await this.crud.service.delete(_id, context);
1699
- res.status(204).send();
1700
- } catch (error) {
1701
- this._handleError(error, res);
1702
- }
1703
- };
1704
- default:
1705
- return async (req, res) => {
1706
- try {
1707
- const customHandler = this.crud.service.getCustomHandler(actionName);
1708
- if (!customHandler) {
1709
- return res.status(404).json({ error: "ACTION_NOT_FOUND" });
1710
- }
1711
- await customHandler.call(this.crud, req, res);
1712
- } catch (error) {
1713
- this._handleError(error, res);
1714
- }
1715
- };
1716
- }
1717
- }
1718
- // Создание контекста из request
1719
- _buildContext(req) {
1720
- return {
1721
- userId: req.userId,
1722
- user: req.user,
1723
- organizationId: req.organizationId,
1724
- roles: req.roles || [],
1725
- permissions: req.permissions || [],
1726
- abacContext: req.abacContext || {},
1727
- ip: req.ip,
1728
- userAgent: req.get("user-agent"),
1729
- isServiceRequest: req.isServiceRequest || false,
1730
- ...req.context
1731
- // Дополнительный контекст
1732
- };
1733
- }
1734
- // Обработка ошибок
1735
- _handleError(error, res) {
1736
- if (res.headersSent) return;
1737
- const statusCode = error.statusCode || error.code === "NOT_FOUND" ? 404 : 500;
1738
- const message = error.message || "Internal Server Error";
1739
- res.status(statusCode).json({
1740
- error: message,
1741
- code: error.code
1742
- });
1743
- }
1744
- // Создание middleware для верификации
1745
- _createVerifierMiddleware(method, actionName) {
1746
- const verifier = this.crud.core.getVerifier(actionName);
1747
- if (!verifier) return null;
1748
- const verifyTarget = this._getVerificationTarget(method, actionName);
1749
- if (!verifyTarget) return null;
1750
- return (req, res, next) => {
1751
- const data = verifyTarget === "query" ? req.query : req.body;
1752
- const result = verifier.verify ? verifier.verify(data) : verifier.validate(data);
1753
- if (!result.isValid) {
1754
- return res.status(400).json({
1755
- error: "VALIDATION_ERROR",
1756
- field: verifyTarget,
1757
- errors: result.verificationErrors || result.errors
1758
- });
1759
- }
1760
- console.log("verified result", result);
1761
- req.verified = result.verifiedData || data;
1762
- next();
1763
- };
1764
- }
1765
- // Определение цели верификации
1766
- _getVerificationTarget(method, actionName) {
1767
- if (["create", "update"].includes(actionName)) {
1768
- return "body";
1769
- }
1770
- if (["read", "delete"].includes(actionName)) {
1771
- return "query";
1772
- }
1773
- if (["post", "put", "patch"].includes(method)) {
1774
- return "body";
1775
- }
1776
- if (["get", "delete"].includes(method)) {
1777
- return "query";
1778
- }
1779
- return null;
1780
- }
1781
- // Обертка handler для after middleware
1782
- _wrapHandler(handler, actionName) {
1783
- return async (req, res, next) => {
1784
- try {
1785
- await handler(req, res, next);
1786
- if (!res.headersSent) {
1787
- const afterMiddlewares = this.getMiddlewares("after", actionName);
1788
- for (const mw of afterMiddlewares) {
1789
- await new Promise((resolve, reject) => {
1790
- mw(req, res, (err) => err ? reject(err) : resolve());
1791
- });
1792
- }
1793
- }
1794
- } catch (error) {
1795
- next(error);
1796
- }
1797
- };
1798
- }
1799
- // Получение информации о роутах
1800
- getRoutes() {
1801
- return Array.from(this.routes.entries()).map(([key, value]) => ({
1802
- key,
1803
- ...value
1804
- }));
1805
- }
1806
- // Удаление роута
1807
- removeRoute(method, path) {
1808
- const key = `${method.toUpperCase()} ${this.crud.basePath}${path}`;
1809
- return this.routes.delete(key);
1810
- }
1811
- // Проверка существования роута
1812
- hasRoute(method, path) {
1813
- const key = `${method.toUpperCase()} ${this.crud.basePath}${path}`;
1814
- return this.routes.has(key);
1815
- }
1816
- }
1817
- class CRUDService {
1818
- constructor(crud) {
1819
- this.crud = crud;
1820
- this.customHandlers = /* @__PURE__ */ new Map();
1821
- }
1822
- // Регистрация кастомного handler
1823
- registerCustomHandler(name, handler) {
1824
- this.customHandlers.set(name, handler);
1825
- }
1826
- // CREATE операция
1827
- async create(data, context = {}) {
1828
- try {
1829
- const hookData = await this.crud.core.executeHook("beforeCreate", data, context);
1830
- const finalData = hookData || data;
1831
- const created = await this.crud.model.create(finalData);
1832
- if (this.crud.core.isCacheEnabled()) {
1833
- await this.invalidateCache("create", created);
1834
- }
1835
- if (this.crud.core.isEventsEnabled()) {
1836
- await this.crud.events.emit("created", {
1837
- document: created,
1838
- user: context.userId
1839
- });
1840
- }
1841
- await this.crud.core.executeHook("afterCreate", created, context);
1842
- return created;
1843
- } catch (error) {
1844
- console.log(error);
1845
- await this.crud.events.logError("create", error);
1846
- throw error;
1847
- }
1848
- }
1849
- // READ операция
1850
- async read(query = {}, context = {}) {
1851
- try {
1852
- await this.crud.core.executeHook("beforeRead", query, context);
1853
- let data = null;
1854
- let cacheKey = null;
1855
- if (this.crud.core.isCacheEnabled()) {
1856
- cacheKey = this.generateCacheKey("read", query);
1857
- data = await this.crud.cache.get(cacheKey);
1858
- }
1859
- if (!data) {
1860
- const pipeline = await this.buildAggregationPipeline(query, context);
1861
- data = await this.crud.model.aggregate(pipeline).exec();
1862
- if (this.crud.core.isCacheEnabled() && cacheKey) {
1863
- const cacheOptions = this.crud.core.getCacheOptions();
1864
- await this.crud.cache.setWithTags(
1865
- cacheKey,
1866
- data,
1867
- [...cacheOptions.tags, `${this.crud.modelName}_list`],
1868
- cacheOptions.ttl
1869
- );
1870
- }
1871
- }
1872
- if (this.crud.core.isEventsEnabled()) {
1873
- await this.crud.events.emitRead(query, data, context.userId);
1874
- }
1875
- const hookResult = await this.crud.core.executeHook("afterRead", data, context);
1876
- return hookResult || data;
1877
- } catch (error) {
1878
- console.log(error);
1879
- await this.crud.events.logError("read", error);
1880
- throw error;
1881
- }
1882
- }
1883
- // UPDATE операция
1884
- async update(id, updateData, context = {}) {
1885
- try {
1886
- const current = await this.crud.model.findById(id);
1887
- if (!current) {
1888
- const error = new Error("NOT_FOUND");
1889
- error.code = "NOT_FOUND";
1890
- error.statusCode = 404;
1891
- throw error;
1892
- }
1893
- const hookData = await this.crud.core.executeHook("beforeUpdate", updateData, context, current);
1894
- const finalData = hookData || updateData;
1895
- const updated = await this.crud.model.findByIdAndUpdate(
1896
- id,
1897
- finalData,
1898
- { new: true, runValidators: true }
1899
- );
1900
- if (this.crud.core.isCacheEnabled()) {
1901
- await this.invalidateCache("update", updated);
1902
- }
1903
- if (this.crud.core.isEventsEnabled()) {
1904
- await this.crud.events.emit("updated", {
1905
- document: updated,
1906
- previousDocument: current,
1907
- user: context.userId
1908
- });
1909
- }
1910
- await this.crud.core.executeHook("afterUpdate", updated, context, current);
1911
- return updated;
1912
- } catch (error) {
1913
- await this.crud.events.logError("update", error);
1914
- throw error;
1915
- }
1916
- }
1917
- // DELETE операция
1918
- async delete(id, context = {}) {
1919
- try {
1920
- const document = await this.crud.model.findById(id);
1921
- if (!document) {
1922
- const error = new Error("NOT_FOUND");
1923
- error.code = "NOT_FOUND";
1924
- error.statusCode = 404;
1925
- throw error;
1926
- }
1927
- await this.crud.core.executeHook("beforeDelete", document, context);
1928
- await this.crud.model.findByIdAndDelete(id);
1929
- if (this.crud.core.isCacheEnabled()) {
1930
- await this.invalidateCache("delete", document);
1931
- }
1932
- if (this.crud.core.isEventsEnabled()) {
1933
- await this.crud.events.emit("deleted", {
1934
- document,
1935
- user: context.userId
1936
- });
1937
- }
1938
- await this.crud.core.executeHook("afterDelete", document, context);
1939
- return document;
1940
- } catch (error) {
1941
- await this.crud.events.logError("delete", error);
1942
- throw error;
1943
- }
1944
- }
1945
- // Получение кастомного handler
1946
- getCustomHandler(name) {
1947
- return this.customHandlers.get(name);
1948
- }
1949
- // Построение aggregation pipeline
1950
- async buildAggregationPipeline(query, context) {
1951
- const stages = [];
1952
- const extensions = this.crud.core.getAggregateExtensions();
1953
- if (extensions.before) {
1954
- stages.push(...await extensions.before(query, context));
1955
- }
1956
- stages.push(...queryProcessorGlobals.getBasicOptions(query));
1957
- if (extensions.middle) {
1958
- stages.push(...await extensions.middle(query, context));
1959
- }
1960
- stages.push(
1961
- queryProcessorGlobals.getCreatorUserLookupStage(),
1962
- queryProcessorGlobals.getCreatorOrganizationLookupStage(),
1963
- queryProcessorGlobals.getOwnerUserLookupStage(),
1964
- queryProcessorGlobals.getOwnerOrganizationLookupStage(),
1965
- queryProcessorGlobals.getAddFieldsCreatorOwnerStage()
1966
- );
1967
- if (extensions.beforePagination) {
1968
- stages.push(...await extensions.beforePagination(query, context));
1969
- }
1970
- stages.push(
1971
- ...queryProcessorGlobals.getSortingOptions(query.sortParam, query.sortOrder),
1972
- ...queryProcessorGlobals.getPaginationOptions(query.skip, query.limit),
1973
- queryProcessorGlobals.removeTempPropeties()
1974
- );
1975
- if (extensions.after) {
1976
- stages.push(...await extensions.after(query, context));
1977
- }
1978
- return stages;
1979
- }
1980
- // Управление кешем
1981
- generateCacheKey(operation, data) {
1982
- const prefix = `${this.crud.modelName}:${operation}`;
1983
- if (operation === "read") {
1984
- return `${prefix}:${JSON.stringify(this._normalizeQuery(data))}`;
1985
- }
1986
- return `${prefix}:${Date.now()}`;
1987
- }
1988
- _normalizeQuery(query) {
1989
- const normalized = {};
1990
- const keys = Object.keys(query).sort();
1991
- for (const key of keys) {
1992
- if (query[key] !== void 0 && query[key] !== null && query[key] !== "") {
1993
- normalized[key] = query[key];
1994
- }
1995
- }
1996
- return normalized;
1997
- }
1998
- async invalidateCache(operation, document) {
1999
- const cacheOptions = this.crud.core.getCacheOptions();
2000
- const tags = [...cacheOptions.tags];
2001
- if (["create", "update", "delete"].includes(operation)) {
2002
- tags.push(`${this.crud.modelName}_list`);
2003
- if (document && document._id) {
2004
- tags.push(`${this.crud.modelName}_${document._id}`);
2005
- }
2006
- }
2007
- for (const tag of tags) {
2008
- await this.crud.cache.delByTags([tag]);
2009
- }
2010
- }
2011
- }
2012
- class CRUDPolicies {
2013
- constructor(crud) {
2014
- this.crud = crud;
2015
- this.abac = null;
2016
- this.policyOptions = {};
2017
- this.defaultPolicies = {};
2018
- }
2019
- // Инициализация с ABAC
2020
- init(abac, policies = {}, fieldPolicies = null) {
2021
- this.abac = abac;
2022
- this.defaultPolicies = policies;
2023
- }
2024
- // Установка опций для конкретного действия
2025
- setOptions(action, options) {
2026
- this.policyOptions[action] = {
2027
- enabled: options.enabled !== false,
2028
- policies: options.policies || [],
2029
- customPolicies: options.customPolicies || {},
2030
- skipDefaultPolicies: options.skipDefaultPolicies || false,
2031
- ...options
2032
- };
2033
- }
2034
- // Получение опций для действия
2035
- getOptions(action) {
2036
- return this.policyOptions[action] || this.defaultPolicies[action] || {};
2037
- }
2038
- // Получение ABAC middleware для действия
2039
- getPoliciesMiddleware(action) {
2040
- if (!this.abac) return null;
2041
- const options = this.getOptions(action);
2042
- if (options.enabled === false) {
2043
- return null;
2044
- }
2045
- if (options.policies && options.policies.length > 0) {
2046
- return this.abac.policyMiddleware(
2047
- options.policies,
2048
- options.customPolicies || {},
2049
- {
2050
- resource: this.crud.modelName,
2051
- action,
2052
- skipDefaultPolicies: options.skipDefaultPolicies
2053
- }
2054
- );
2055
- }
2056
- return this.abac.middleware(this.crud.modelName, action, options);
2057
- }
2058
- // Получение middleware для проверки доступа к полям
2059
- getFieldsMiddleware(action) {
2060
- if (!this.abac) return null;
2061
- return async (req, res, next) => {
2062
- try {
2063
- const data = req.verified || req.body;
2064
- const context = {
2065
- user: req.userId,
2066
- resource: this.crud.modelName,
2067
- action,
2068
- req,
2069
- data: {
2070
- ...req.body,
2071
- ...req.query,
2072
- params: req.params
2073
- },
2074
- params: req.params
2075
- };
2076
- if (req.skipFieldPolicies) {
2077
- console.log("Skipping field policies for admin/moderator");
2078
- req.verified = data;
2079
- return next();
2080
- }
2081
- if (action === "update" && data._id) {
2082
- try {
2083
- const current = await this.crud.model.findById(data._id);
2084
- if (current) {
2085
- context.currentResource = current;
2086
- }
2087
- } catch (err) {
2088
- }
2089
- }
2090
- const fieldsResult = await this.abac.checkFields(
2091
- context,
2092
- data,
2093
- action
2094
- );
2095
- if (fieldsResult.denied && fieldsResult.denied.length > 0) {
2096
- return res.status(403).json({
2097
- error: "FIELD_ACCESS_DENIED",
2098
- deniedFields: fieldsResult.denied.map((d) => d.path)
2099
- });
2100
- }
2101
- if (fieldsResult.errors && fieldsResult.errors.length > 0) {
2102
- return res.status(400).json({
2103
- error: "FIELD_VALIDATION_ERROR",
2104
- fields: fieldsResult.errors
2105
- });
2106
- }
2107
- req.verified = fieldsResult.transformed || fieldsResult.allowed;
2108
- next();
2109
- } catch (error) {
2110
- next(error);
2111
- }
2112
- };
2113
- }
2114
- // Фильтрация полей для чтения (вызывается из controller после получения данных)
2115
- async filterFieldsForRead(req, data) {
2116
- if (!this.abac) {
2117
- return data;
2118
- }
2119
- const context = {
2120
- user: req.userId,
2121
- resource: this.crud.modelName,
2122
- action: "read",
2123
- req,
2124
- data: {
2125
- ...req.query,
2126
- params: req.params
2127
- },
2128
- params: req.params
2129
- };
2130
- if (Array.isArray(data)) {
2131
- const results = [];
2132
- for (const doc of data) {
2133
- const fieldsResult2 = await this.abac.checkFields(
2134
- { ...context, currentResource: doc },
2135
- doc,
2136
- "read"
2137
- );
2138
- results.push(fieldsResult2.transformed || fieldsResult2.allowed);
2139
- }
2140
- return results;
2141
- }
2142
- const fieldsResult = await this.abac.checkFields(
2143
- { ...context, currentResource: data },
2144
- data,
2145
- "read"
2146
- );
2147
- return fieldsResult.transformed || fieldsResult.allowed;
2148
- }
2149
- // Добавление кастомной политики
2150
- addPolicy(action, policyName, policyFn = null) {
2151
- if (!this.policyOptions[action]) {
2152
- this.policyOptions[action] = {
2153
- enabled: true,
2154
- policies: [],
2155
- customPolicies: {}
2156
- };
2157
- }
2158
- if (policyFn) {
2159
- this.policyOptions[action].customPolicies[policyName] = policyFn;
2160
- }
2161
- if (!this.policyOptions[action].policies.includes(policyName)) {
2162
- this.policyOptions[action].policies.push(policyName);
2163
- }
2164
- }
2165
- // Удаление политики
2166
- removePolicy(action, policyName) {
2167
- if (!this.policyOptions[action]) return;
2168
- const policies = this.policyOptions[action].policies;
2169
- const index = policies.indexOf(policyName);
2170
- if (index > -1) {
2171
- policies.splice(index, 1);
2172
- }
2173
- delete this.policyOptions[action].customPolicies[policyName];
2174
- }
2175
- // Проверка наличия ABAC
2176
- hasAbac() {
2177
- return !!this.abac;
2178
- }
2179
- // Получение всех политик для действия
2180
- getPolicies(action) {
2181
- const options = this.getOptions(action);
2182
- return {
2183
- enabled: options.enabled !== false,
2184
- policies: options.policies || [],
2185
- customPolicies: options.customPolicies || {},
2186
- defaultPolicies: this.defaultPolicies[action] || {}
2187
- };
2188
- }
2189
- // Временное отключение ABAC для действия
2190
- disableForAction(action) {
2191
- if (!this.policyOptions[action]) {
2192
- this.policyOptions[action] = {};
2193
- }
2194
- this.policyOptions[action].enabled = false;
2195
- }
2196
- // Включение ABAC для действия
2197
- enableForAction(action) {
2198
- if (!this.policyOptions[action]) {
2199
- this.policyOptions[action] = {};
2200
- }
2201
- this.policyOptions[action].enabled = true;
2202
- }
2203
- // Установка политик по умолчанию для всех действий
2204
- setDefaultPolicies(policies) {
2205
- ["create", "read", "update", "delete"].forEach((action) => {
2206
- if (!this.policyOptions[action]) {
2207
- this.policyOptions[action] = {};
2208
- }
2209
- this.policyOptions[action].policies = [...policies];
2210
- });
2211
- }
2212
- }
2213
- class CRUDEvents {
2214
- constructor(crud) {
2215
- this.crud = crud;
2216
- this.observer = null;
2217
- this.logger = null;
2218
- this.enabled = false;
2219
- this.options = {};
2220
- }
2221
- init(options = {}) {
2222
- this.enabled = options.enabled !== false;
2223
- this.options = options;
2224
- if (this.enabled) {
2225
- this.observer = options.observer || new Observer();
2226
- this.logger = options.logger || new Logger(this.crud.db);
2227
- }
2228
- }
2229
- // Отправка события
2230
- async emit(eventName, data) {
2231
- if (!this.enabled || !this.observer) return;
2232
- const fullEventName = `${this.crud.modelName}:${eventName}`;
2233
- try {
2234
- await this.observer.notify(fullEventName, {
2235
- ...data,
2236
- timestamp: /* @__PURE__ */ new Date(),
2237
- model: this.crud.modelName
2238
- });
2239
- await this.log("info", `Event emitted: ${fullEventName}`, data);
2240
- } catch (error) {
2241
- console.error(`Error emitting event ${fullEventName}:`, error);
2242
- }
2243
- }
2244
- // Подписка на событие
2245
- subscribe(eventName, handler) {
2246
- if (!this.observer) return null;
2247
- const fullEventName = `${this.crud.modelName}:${eventName}`;
2248
- return this.observer.subscribe(fullEventName, handler);
2249
- }
2250
- // Отписка от события
2251
- unsubscribe(eventName, handler) {
2252
- if (!this.observer) return;
2253
- const fullEventName = `${this.crud.modelName}:${eventName}`;
2254
- this.observer.unsubscribe(fullEventName, handler);
2255
- }
2256
- // Логирование
2257
- async log(level, message, data = {}) {
2258
- if (!this.enabled || !this.logger) return;
2259
- try {
2260
- const logData = {
2261
- model: this.crud.modelName,
2262
- ...data
2263
- };
2264
- switch (level) {
2265
- case "info":
2266
- await this.logger.info(message, logData);
2267
- break;
2268
- case "warning":
2269
- await this.logger.warning(message, logData);
2270
- break;
2271
- case "error":
2272
- await this.logger.error(message, logData);
2273
- break;
2274
- default:
2275
- await this.logger.info(message, logData);
2276
- }
2277
- } catch (error) {
2278
- console.error("Logging error:", error);
2279
- }
2280
- }
2281
- // Логирование ошибок
2282
- async logError(operation, error) {
2283
- await this.log("error", `Error in ${operation} operation`, {
2284
- operation,
2285
- error: error.message,
2286
- stack: error.stack
2287
- });
2288
- }
2289
- // Специализированные методы событий
2290
- async emitCreate(document, userId) {
2291
- await this.emit("created", {
2292
- document,
2293
- user: userId,
2294
- action: "create"
2295
- });
2296
- }
2297
- async emitUpdate(document, previousDocument, userId) {
2298
- await this.emit("updated", {
2299
- document,
2300
- previousDocument,
2301
- user: userId,
2302
- action: "update",
2303
- changes: this._getChanges(previousDocument, document)
2304
- });
2305
- }
2306
- async emitDelete(document, userId) {
2307
- await this.emit("deleted", {
2308
- document,
2309
- user: userId,
2310
- action: "delete"
2311
- });
2312
- }
2313
- async emitRead(query, results, userId) {
2314
- if (this.options.logReads !== false) {
2315
- await this.emit("read", {
2316
- query,
2317
- resultCount: Array.isArray(results) ? results.length : 1,
2318
- user: userId,
2319
- action: "read"
2320
- });
2321
- }
2322
- }
2323
- // Вспомогательные методы
2324
- _getChanges(oldDoc, newDoc) {
2325
- const changes = {};
2326
- if (!oldDoc || !newDoc) return changes;
2327
- for (const key in newDoc) {
2328
- if (newDoc.hasOwnProperty(key)) {
2329
- const oldVal = oldDoc[key];
2330
- const newVal = newDoc[key];
2331
- if (["_id", "__v", "updatedAt"].includes(key)) continue;
2332
- if (JSON.stringify(oldVal) !== JSON.stringify(newVal)) {
2333
- changes[key] = {
2334
- old: oldVal,
2335
- new: newVal
2336
- };
2337
- }
2338
- }
2339
- }
2340
- return changes;
2341
- }
2342
- // Аудит действий
2343
- async audit(action, data) {
2344
- if (!this.options.enableAudit) return;
2345
- const auditData = {
2346
- action,
2347
- model: this.crud.modelName,
2348
- timestamp: /* @__PURE__ */ new Date(),
2349
- ...data
2350
- };
2351
- await this.emit("audit", auditData);
2352
- await this.log("info", `Audit: ${action}`, auditData);
2353
- }
2354
- // Метрики
2355
- async recordMetric(metric, value = 1) {
2356
- if (!this.options.enableMetrics) return;
2357
- await this.emit("metric", {
2358
- metric,
2359
- value,
2360
- model: this.crud.modelName,
2361
- timestamp: /* @__PURE__ */ new Date()
2362
- });
2363
- }
2364
- // Проверка включены ли события
2365
- isEnabled() {
2366
- return this.enabled;
2367
- }
2368
- // Временное отключение событий
2369
- disable() {
2370
- this.enabled = false;
2371
- }
2372
- // Включение событий
2373
- enable() {
2374
- if (this.observer && this.logger) {
2375
- this.enabled = true;
2376
- }
2377
- }
2378
- }
2379
- class CRUD {
2380
- constructor(options = {}) {
2381
- const {
2382
- app,
2383
- db,
2384
- model,
2385
- basePath,
2386
- modelName = model?.modelName || "resource",
2387
- cache,
2388
- logger,
2389
- ...otherOptions
2390
- } = options;
2391
- this.app = app;
2392
- this.db = db;
2393
- this.model = model;
2394
- this.basePath = basePath;
2395
- this.modelName = modelName;
2396
- this.cache = cache !== false ? cache instanceof Cache ? cache : new Cache() : null;
2397
- this.logger = logger || new Logger(db);
2398
- this.initModules(otherOptions);
2399
- this.core.init(otherOptions);
2400
- if (!otherOptions.disableDefaultRoutes) {
2401
- this.registerDefaultRoutes();
2402
- }
2403
- }
2404
- initModules(options) {
2405
- this.core = new CRUDCore(this);
2406
- this.service = new CRUDService(this);
2407
- this.controller = new CRUDController(this);
2408
- this.policies = new CRUDPolicies(this);
2409
- this.events = new CRUDEvents(this);
2410
- }
2411
- // Регистрация дефолтных CRUD роутов
2412
- registerDefaultRoutes() {
2413
- this.controller.registerRoute("post", "/create", "create");
2414
- this.controller.registerRoute("get", "/read", "read");
2415
- this.controller.registerRoute("put", "/update", "update");
2416
- this.controller.registerRoute("delete", "/delete", "delete");
2417
- }
2418
- // API методы для конфигурации
2419
- setVerifier(action, verifier) {
2420
- this.core.setVerifier(action, verifier);
2421
- return this;
2422
- }
2423
- addHook(name, handler) {
2424
- this.core.addHook(name, handler);
2425
- return this;
2426
- }
2427
- addMiddleware(phase, action, middleware) {
2428
- this.controller.addMiddleware(phase, action, middleware);
2429
- return this;
2430
- }
2431
- addAbac(action, options = {}) {
2432
- this.policies.setOptions(action, options);
2433
- return this;
2434
- }
2435
- addAggregateExtension(phase, extension) {
2436
- this.core.addAggregateExtension(phase, extension);
2437
- return this;
2438
- }
2439
- // Управление авторизацией
2440
- setAuth(action, required) {
2441
- this.core.setAuth(action, required);
2442
- return this;
2443
- }
2444
- // Добавление кастомного действия
2445
- addAction(name, config) {
2446
- const {
2447
- method = "post",
2448
- path = `/${name}`,
2449
- handler,
2450
- verifier,
2451
- middlewares = { before: [], after: [] },
2452
- abac = {},
2453
- hooks = {},
2454
- auth = true
2455
- // По умолчанию требует авторизацию
2456
- } = config;
2457
- if (verifier) this.setVerifier(name, verifier);
2458
- if (abac) this.addAbac(name, abac);
2459
- if (auth !== void 0) this.setAuth(name, auth);
2460
- if (middlewares.before) {
2461
- const beforeMiddlewares = Array.isArray(middlewares.before) ? middlewares.before : [middlewares.before];
2462
- beforeMiddlewares.forEach((mw) => this.addMiddleware("before", name, mw));
2463
- }
2464
- if (middlewares.after) {
2465
- const afterMiddlewares = Array.isArray(middlewares.after) ? middlewares.after : [middlewares.after];
2466
- afterMiddlewares.forEach((mw) => this.addMiddleware("after", name, mw));
2467
- }
2468
- Object.entries(hooks).forEach(([hookName, hookFn]) => {
2469
- this.addHook(hookName, hookFn);
2470
- });
2471
- if (handler) {
2472
- this.controller.registerCustomRoute(method, path, name, handler);
2473
- } else {
2474
- this.controller.registerRoute(method, path, name);
2475
- }
2476
- return this;
2477
- }
2478
- // Получение конфигурации кеша
2479
- getCacheOptions() {
2480
- return this.core.getCacheOptions();
2481
- }
2482
- // Установка опций кеша
2483
- setCacheOptions(options) {
2484
- this.core.setCacheOptions(options);
2485
- return this;
2486
- }
2487
- }
2488
1398
  const verifierFactory = function(db) {
2489
1399
  const createVerifier = new Verifier({
2490
1400
  name: {