@ozdao/martyrs 0.2.485 → 0.2.486
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.
- package/dist/{Media-DlUBwVWs.js → Media-CXQSPHt2.js} +1 -1
- package/dist/{Media-ByPHBvAU.cjs → Media-DhpD64nT.cjs} +1 -1
- package/dist/_virtual/index.cjs +4 -4
- package/dist/_virtual/index.js +4 -4
- package/dist/_virtual/index2.cjs +4 -4
- package/dist/_virtual/index2.js +4 -4
- package/dist/auth.server.cjs +2 -23
- package/dist/auth.server.js +1 -22
- package/dist/globals.crud-BQG1Lm0A.js +90 -0
- package/dist/globals.crud-Dv7UXbRM.cjs +89 -0
- package/dist/globals.server.cjs +3 -322
- package/dist/globals.server.js +1 -303
- package/dist/globals.websocket-DzvdIBf6.js +306 -0
- package/dist/globals.websocket-k6_B1T7k.cjs +322 -0
- package/dist/{main-CK6rC5Sz.js → main-Cfh5138F.js} +2155 -2087
- package/dist/main-DKJqboZy.cjs +11 -0
- package/dist/martyrs/src/components/Button/{Button.vue2.cjs → Button.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Button/{Button.vue2.js.map → Button.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Button/{Button.vue2.js → Button.vue.js} +2 -2
- package/dist/martyrs/src/components/Button/Button.vue.js.map +1 -0
- package/dist/martyrs/src/components/{DatePicker → Calendar}/Calendar.vue.cjs +1 -1
- package/dist/martyrs/src/components/Calendar/Calendar.vue.cjs.map +1 -0
- package/dist/martyrs/src/components/{DatePicker → Calendar}/Calendar.vue.js +1 -1
- package/dist/martyrs/src/components/Calendar/Calendar.vue.js.map +1 -0
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue.cjs +1 -1
- package/dist/martyrs/src/components/FieldTags/FieldTags.vue.js +1 -1
- package/dist/martyrs/src/components/Menu/{Menu.vue2.cjs → Menu.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue.cjs.map +1 -0
- package/dist/martyrs/src/components/Menu/{Menu.vue2.js → Menu.vue.js} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue.js.map +1 -0
- package/dist/martyrs/src/components/Popup/{Popup.vue2.cjs → Popup.vue.cjs} +2 -2
- package/dist/martyrs/src/components/Popup/{Popup.vue2.js.map → Popup.vue.cjs.map} +1 -1
- package/dist/martyrs/src/components/Popup/{Popup.vue2.js → Popup.vue.js} +2 -2
- package/dist/martyrs/src/components/Popup/Popup.vue.js.map +1 -0
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +2 -2
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +2 -2
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +2 -2
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +3 -3
- package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js.map +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/pages/Events.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +2 -2
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/AlertDialog.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/AlertDialog.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +3 -3
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +3 -3
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js +1 -1
- package/dist/martyrs/src/modules/globals/views/utils/axios-instance.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/utils/axios-instance.js.map +1 -1
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs +87 -0
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +87 -0
- package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.cjs +83 -0
- package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js +83 -0
- package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs +83 -0
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +83 -0
- package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.cjs +68 -0
- package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.js +68 -0
- package/dist/martyrs/src/modules/music/components/cards/TrackCard.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +174 -0
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +174 -0
- package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs +80 -0
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +80 -0
- package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/forms/UploadForm.vue.cjs +328 -0
- package/dist/martyrs/src/modules/music/components/forms/UploadForm.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/forms/UploadForm.vue.js +328 -0
- package/dist/martyrs/src/modules/music/components/forms/UploadForm.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.cjs +115 -0
- package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.js +115 -0
- package/dist/martyrs/src/modules/music/components/layouts/MusicLayout.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/lists/AlbumList.vue.cjs +44 -0
- package/dist/martyrs/src/modules/music/components/lists/AlbumList.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/lists/AlbumList.vue.js +44 -0
- package/dist/martyrs/src/modules/music/components/lists/AlbumList.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/lists/ArtistList.vue.cjs +305 -0
- package/dist/martyrs/src/modules/music/components/lists/ArtistList.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/lists/ArtistList.vue.js +305 -0
- package/dist/martyrs/src/modules/music/components/lists/ArtistList.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/lists/PlaylistList.vue.cjs +44 -0
- package/dist/martyrs/src/modules/music/components/lists/PlaylistList.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/lists/PlaylistList.vue.js +44 -0
- package/dist/martyrs/src/modules/music/components/lists/PlaylistList.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/lists/TrackList.vue.cjs +199 -0
- package/dist/martyrs/src/modules/music/components/lists/TrackList.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/lists/TrackList.vue.js +199 -0
- package/dist/martyrs/src/modules/music/components/lists/TrackList.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/AlbumDetail.vue.cjs +290 -0
- package/dist/martyrs/src/modules/music/components/pages/AlbumDetail.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/AlbumDetail.vue.js +290 -0
- package/dist/martyrs/src/modules/music/components/pages/AlbumDetail.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/ArtistDetail.vue.cjs +467 -0
- package/dist/martyrs/src/modules/music/components/pages/ArtistDetail.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/ArtistDetail.vue.js +467 -0
- package/dist/martyrs/src/modules/music/components/pages/ArtistDetail.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/ArtistForm.vue.cjs +382 -0
- package/dist/martyrs/src/modules/music/components/pages/ArtistForm.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/ArtistForm.vue.js +382 -0
- package/dist/martyrs/src/modules/music/components/pages/ArtistForm.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/ArtistManager.vue.cjs +303 -0
- package/dist/martyrs/src/modules/music/components/pages/ArtistManager.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/ArtistManager.vue.js +303 -0
- package/dist/martyrs/src/modules/music/components/pages/ArtistManager.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.cjs +221 -0
- package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.js +221 -0
- package/dist/martyrs/src/modules/music/components/pages/MusicHome.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs +200 -0
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +200 -0
- package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/MusicUpload.vue.cjs +50 -0
- package/dist/martyrs/src/modules/music/components/pages/MusicUpload.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/MusicUpload.vue.js +50 -0
- package/dist/martyrs/src/modules/music/components/pages/MusicUpload.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/PlaylistDetail.vue.cjs +556 -0
- package/dist/martyrs/src/modules/music/components/pages/PlaylistDetail.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/PlaylistDetail.vue.js +556 -0
- package/dist/martyrs/src/modules/music/components/pages/PlaylistDetail.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs +449 -0
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +449 -0
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/TrackDetail.vue.cjs +87 -0
- package/dist/martyrs/src/modules/music/components/pages/TrackDetail.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/pages/TrackDetail.vue.js +87 -0
- package/dist/martyrs/src/modules/music/components/pages/TrackDetail.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs +227 -0
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +227 -0
- package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.cjs +85 -0
- package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js +85 -0
- package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.cjs +71 -0
- package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js +71 -0
- package/dist/martyrs/src/modules/music/components/player/VolumeControl.vue.js.map +1 -0
- package/dist/martyrs/src/modules/music/music.client.cjs +137 -0
- package/dist/martyrs/src/modules/music/music.client.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/music.client.js +137 -0
- package/dist/martyrs/src/modules/music/music.client.js.map +1 -0
- package/dist/martyrs/src/modules/music/router/music.cjs +99 -0
- package/dist/martyrs/src/modules/music/router/music.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/router/music.js +99 -0
- package/dist/martyrs/src/modules/music/router/music.js.map +1 -0
- package/dist/martyrs/src/modules/music/store/albums.cjs +167 -0
- package/dist/martyrs/src/modules/music/store/albums.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/store/albums.js +167 -0
- package/dist/martyrs/src/modules/music/store/albums.js.map +1 -0
- package/dist/martyrs/src/modules/music/store/artists.cjs +154 -0
- package/dist/martyrs/src/modules/music/store/artists.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/store/artists.js +154 -0
- package/dist/martyrs/src/modules/music/store/artists.js.map +1 -0
- package/dist/martyrs/src/modules/music/store/player.cjs +297 -0
- package/dist/martyrs/src/modules/music/store/player.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/store/player.js +297 -0
- package/dist/martyrs/src/modules/music/store/player.js.map +1 -0
- package/dist/martyrs/src/modules/music/store/playlists.cjs +174 -0
- package/dist/martyrs/src/modules/music/store/playlists.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/store/playlists.js +174 -0
- package/dist/martyrs/src/modules/music/store/playlists.js.map +1 -0
- package/dist/martyrs/src/modules/music/store/search.cjs +109 -0
- package/dist/martyrs/src/modules/music/store/search.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/store/search.js +109 -0
- package/dist/martyrs/src/modules/music/store/search.js.map +1 -0
- package/dist/martyrs/src/modules/music/store/tracks.cjs +180 -0
- package/dist/martyrs/src/modules/music/store/tracks.cjs.map +1 -0
- package/dist/martyrs/src/modules/music/store/tracks.js +180 -0
- package/dist/martyrs/src/modules/music/store/tracks.js.map +1 -0
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.cjs +1 -1
- package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +2 -2
- package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +2 -2
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/router/organizations.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/router/organizations.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +2 -2
- package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/LeftoverEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/pages/LeftoverEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditIngredients.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditIngredients.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +2 -2
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +2 -2
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +2 -2
- package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +2 -2
- package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +2 -2
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +2 -2
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
- package/dist/martyrs.cjs.js +1 -1
- package/dist/martyrs.css +1 -1
- package/dist/martyrs.es.js +38 -36
- package/dist/music.server.cjs +1407 -0
- package/dist/music.server.js +1407 -0
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.cjs +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.cjs +1 -1
- package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
- package/dist/orders.server.cjs +3 -88
- package/dist/orders.server.js +2 -87
- package/dist/socials.schema-BOZV82Mp.js +25 -0
- package/dist/socials.schema-CtpSF9dE.cjs +24 -0
- package/dist/style.css +155 -15
- package/package.json +1 -1
- package/src/.martyrs/filemap.json +2 -2
- package/src/components/Feed/Feed.vue +1 -1
- package/src/components/index.js +2 -0
- package/src/main.js +6 -0
- package/src/modules/events/components/pages/EditEvent.vue +1 -1
- package/src/modules/globals/views/components/blocks/PopupDateSelector.vue +1 -1
- package/src/modules/globals/views/utils/axios-instance.js +15 -1
- package/src/modules/products/components/pages/Product.vue +1 -1
- package/dist/main-137vO86w.cjs +0 -11
- package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/DatePicker/Calendar.vue.cjs.map +0 -1
- package/dist/martyrs/src/components/DatePicker/Calendar.vue.js.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue2.cjs.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +0 -1
- package/dist/martyrs/src/components/Popup/Popup.vue2.cjs.map +0 -1
- /package/src/components/{DatePicker → Calendar}/Calendar.vue +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as u, computed as m, onMounted as N, onUnmounted as P, createElementBlock as c, openBlock as d, createCommentVNode as f, mergeProps as V, createElementVNode as S, toDisplayString as q } from "vue";
|
|
2
|
-
import { _ as z } from "./main-
|
|
2
|
+
import { _ as z } from "./main-Cfh5138F.js";
|
|
3
3
|
const D = { class: "media-container" }, T = ["src", "data-src", "alt"], U = ["controls", "loop", "muted", "autoplay", "playsinline", "preload"], _ = ["src", "type"], $ = {
|
|
4
4
|
key: 2,
|
|
5
5
|
class: "media-placeholder"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),V=require("./main-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),V=require("./main-DKJqboZy.cjs"),C={class:"media-container"},M=["src","data-src","alt"],j=["controls","loop","muted","autoplay","playsinline","preload"],N=["src","type"],O={key:2,class:"media-placeholder"},P={key:3,class:"media-error"},S={__name:"Media",props:{url:{type:String,required:!0},options:{type:Object,default:()=>({muted:!0,loop:!0,playsinline:!0,preload:"metadata"})}},setup(t){const m=t,l=e.ref(null),p=e.ref(null),s=e.ref(!1),u=e.ref(null),v=e.ref(!1);let i=null,f=!1;const d=e.computed(()=>{var o,a,n;return(n=(a=(o=m.url)==null?void 0:o.split("."))==null?void 0:a.pop())==null?void 0:n.toLowerCase()}),g=e.computed(()=>["jpg","jpeg","png","gif","webp","svg","avif"].includes(d.value)),y=e.computed(()=>["mp4","webm","ogg"].includes(d.value)),x=e.computed(()=>({mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg"})[d.value]||"");function E(){s.value=!0}function I(o){u.value=`Ошибка загрузки медиа: ${o.message}`,s.value=!1}async function w(){if(l.value)try{l.value.paused&&!f&&(await l.value.play(),f=!0)}catch(o){I(o)}}function L(){const o={root:null,rootMargin:"50px",threshold:.1};i=new IntersectionObserver(n=>{n.forEach(r=>{var c;v.value=r.isIntersecting,r.isIntersecting&&(y.value&&((c=m.options)!=null&&c.autoplay)&&w(),i.disconnect())})},o);const a=g.value?p.value:l.value;a&&i.observe(a)}return e.onMounted(()=>{L()}),e.onUnmounted(()=>{i&&i.disconnect()}),(o,a)=>{var n,r,c,k,h,b,B;return e.openBlock(),e.createElementBlock("div",C,[g.value?(e.openBlock(),e.createElementBlock("img",e.mergeProps({key:0,src:v.value?t.url:"","data-src":t.url,alt:((n=t.options)==null?void 0:n.alt)||"Image",class:["media-item",{loading:!s.value}],loading:"lazy",onLoad:E},t.options,{ref_key:"imageElement",ref:p}),null,16,M)):y.value?(e.openBlock(),e.createElementBlock("video",e.mergeProps({key:1,ref_key:"videoElement",ref:l,class:[{loading:!s.value},"media-item"],controls:!((r=t.options)!=null&&r.hideControls),loop:((c=t.options)==null?void 0:c.loop)!==!1,muted:((k=t.options)==null?void 0:k.muted)!==!1,autoplay:(h=t.options)==null?void 0:h.autoplay,playsinline:((b=t.options)==null?void 0:b.playsinline)!==!1,preload:((B=t.options)==null?void 0:B.preload)||"metadata",onLoadeddata:E},t.options),[e.createElementVNode("source",{src:t.url,type:x.value},null,8,N)],16,j)):e.createCommentVNode("",!0),s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",O," Loading... ")),u.value?(e.openBlock(),e.createElementBlock("div",P,e.toDisplayString(u.value),1)):e.createCommentVNode("",!0)])}}},q=V._export_sfc(S,[["__scopeId","data-v-1f94a0e9"]]);exports.default=q;
|
package/dist/_virtual/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const _commonjsHelpers = require("./_commonjsHelpers.cjs");
|
|
4
|
-
const index = require("../node_modules/
|
|
5
|
-
var
|
|
6
|
-
const
|
|
7
|
-
exports.default =
|
|
4
|
+
const index = require("../node_modules/lodash.merge/index.cjs");
|
|
5
|
+
var lodash_mergeExports = index.__require();
|
|
6
|
+
const merge = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(lodash_mergeExports);
|
|
7
|
+
exports.default = merge;
|
|
8
8
|
//# sourceMappingURL=index.cjs.map
|
package/dist/_virtual/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as
|
|
3
|
-
var
|
|
4
|
-
const
|
|
2
|
+
import { __require as requireLodash_merge } from "../node_modules/lodash.merge/index.js";
|
|
3
|
+
var lodash_mergeExports = requireLodash_merge();
|
|
4
|
+
const merge = /* @__PURE__ */ getDefaultExportFromCjs(lodash_mergeExports);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
merge as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
package/dist/_virtual/index2.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const _commonjsHelpers = require("./_commonjsHelpers.cjs");
|
|
4
|
-
const index = require("../node_modules/
|
|
5
|
-
var
|
|
6
|
-
const
|
|
7
|
-
exports.default =
|
|
4
|
+
const index = require("../node_modules/fast-deep-equal/index.cjs");
|
|
5
|
+
var fastDeepEqualExports = index.__require();
|
|
6
|
+
const equal = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(fastDeepEqualExports);
|
|
7
|
+
exports.default = equal;
|
|
8
8
|
//# sourceMappingURL=index2.cjs.map
|
package/dist/_virtual/index2.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as
|
|
3
|
-
var
|
|
4
|
-
const
|
|
2
|
+
import { __require as requireFastDeepEqual } from "../node_modules/fast-deep-equal/index.js";
|
|
3
|
+
var fastDeepEqualExports = requireFastDeepEqual();
|
|
4
|
+
const equal = /* @__PURE__ */ getDefaultExportFromCjs(fastDeepEqualExports);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
equal as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index2.js.map
|
package/dist/auth.server.cjs
CHANGED
|
@@ -10,6 +10,7 @@ const mailing = require("./mailing-q7sR8gCV.cjs");
|
|
|
10
10
|
const addUserStatusFields = require("./addUserStatusFields-7-66sf45.cjs");
|
|
11
11
|
const credentials_schema = require("./credentials.schema-DwhGdrwC.cjs");
|
|
12
12
|
const profile_schema = require("./profile.schema-yQuIzngl.cjs");
|
|
13
|
+
const socials_schema = require("./socials.schema-CtpSF9dE.cjs");
|
|
13
14
|
const fingerprintCache = /* @__PURE__ */ new Map();
|
|
14
15
|
const generateFingerprint = (req) => {
|
|
15
16
|
const { ip, headers } = req;
|
|
@@ -485,28 +486,6 @@ const RoleModel = (db) => {
|
|
|
485
486
|
const Role = db.mongoose.model("Role", RoleSchema);
|
|
486
487
|
return Role;
|
|
487
488
|
};
|
|
488
|
-
const applySocialsSchema = function applySocialsSchema2(schema, db) {
|
|
489
|
-
schema.add({
|
|
490
|
-
socials: {
|
|
491
|
-
telegram: {
|
|
492
|
-
type: String,
|
|
493
|
-
default: ""
|
|
494
|
-
},
|
|
495
|
-
twitter: {
|
|
496
|
-
type: String,
|
|
497
|
-
default: ""
|
|
498
|
-
},
|
|
499
|
-
facebook: {
|
|
500
|
-
type: String,
|
|
501
|
-
default: ""
|
|
502
|
-
},
|
|
503
|
-
instagram: {
|
|
504
|
-
type: String,
|
|
505
|
-
default: ""
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
});
|
|
509
|
-
};
|
|
510
489
|
const UserModel = (db) => {
|
|
511
490
|
const UserSchema = new db.mongoose.Schema(
|
|
512
491
|
{
|
|
@@ -544,7 +523,7 @@ const UserModel = (db) => {
|
|
|
544
523
|
}
|
|
545
524
|
);
|
|
546
525
|
profile_schema.applyProfileSchema(UserSchema);
|
|
547
|
-
applySocialsSchema(UserSchema);
|
|
526
|
+
socials_schema.applySocialsSchema(UserSchema);
|
|
548
527
|
credentials_schema.applyCredentialsSchema(UserSchema);
|
|
549
528
|
const User = db.mongoose.model("User", UserSchema);
|
|
550
529
|
return User;
|
package/dist/auth.server.js
CHANGED
|
@@ -8,6 +8,7 @@ import { m as mailing } from "./mailing-C11EYWm-.js";
|
|
|
8
8
|
import { a as addUserStatusFields, b as addMembersQuantity } from "./addUserStatusFields-Cc-JpmPo.js";
|
|
9
9
|
import { a as applyCredentialsSchema } from "./credentials.schema-C9FB2EyY.js";
|
|
10
10
|
import { a as applyProfileSchema } from "./profile.schema-DchVS-Jr.js";
|
|
11
|
+
import { a as applySocialsSchema } from "./socials.schema-BOZV82Mp.js";
|
|
11
12
|
const fingerprintCache = /* @__PURE__ */ new Map();
|
|
12
13
|
const generateFingerprint = (req) => {
|
|
13
14
|
const { ip, headers } = req;
|
|
@@ -483,28 +484,6 @@ const RoleModel = (db) => {
|
|
|
483
484
|
const Role = db.mongoose.model("Role", RoleSchema);
|
|
484
485
|
return Role;
|
|
485
486
|
};
|
|
486
|
-
const applySocialsSchema = function applySocialsSchema2(schema, db) {
|
|
487
|
-
schema.add({
|
|
488
|
-
socials: {
|
|
489
|
-
telegram: {
|
|
490
|
-
type: String,
|
|
491
|
-
default: ""
|
|
492
|
-
},
|
|
493
|
-
twitter: {
|
|
494
|
-
type: String,
|
|
495
|
-
default: ""
|
|
496
|
-
},
|
|
497
|
-
facebook: {
|
|
498
|
-
type: String,
|
|
499
|
-
default: ""
|
|
500
|
-
},
|
|
501
|
-
instagram: {
|
|
502
|
-
type: String,
|
|
503
|
-
default: ""
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
});
|
|
507
|
-
};
|
|
508
487
|
const UserModel = (db) => {
|
|
509
488
|
const UserSchema = new db.mongoose.Schema(
|
|
510
489
|
{
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { C as Cache, L as Logger } from "./globals.logger-Bf6rRU7j.js";
|
|
2
|
+
import { q as queryProcessorGlobals } from "./queryProcessor-CVcLPEnv.js";
|
|
3
|
+
class CRUD {
|
|
4
|
+
constructor(basePath, app, db, model, options) {
|
|
5
|
+
this.model = model;
|
|
6
|
+
this.cache = new Cache();
|
|
7
|
+
this.logger = new Logger(db);
|
|
8
|
+
this.app = app;
|
|
9
|
+
this.basePath = basePath;
|
|
10
|
+
if (!options || options && !options.disableDefaultRoutes) this.registerRoutes();
|
|
11
|
+
}
|
|
12
|
+
registerRoutes() {
|
|
13
|
+
this.app.post(`${this.basePath}/create`, this.create.bind(this));
|
|
14
|
+
this.app.get(`${this.basePath}/read`, this.read.bind(this));
|
|
15
|
+
this.app.put(`${this.basePath}/update`, this.update.bind(this));
|
|
16
|
+
this.app.delete(`${this.basePath}/delete`, this.delete.bind(this));
|
|
17
|
+
}
|
|
18
|
+
async create(req, res) {
|
|
19
|
+
try {
|
|
20
|
+
const createdData = await this.model.create(req.body);
|
|
21
|
+
await this.cache.flush();
|
|
22
|
+
res.status(201).json(createdData);
|
|
23
|
+
} catch (error) {
|
|
24
|
+
console.log(error);
|
|
25
|
+
this.logger.error("Ошибка создания данных", error);
|
|
26
|
+
res.status(500).json({ error: error.message });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
async read(req, res) {
|
|
30
|
+
try {
|
|
31
|
+
let stages = [];
|
|
32
|
+
stages = [
|
|
33
|
+
...queryProcessorGlobals.getBasicOptions(req.query),
|
|
34
|
+
// For creator
|
|
35
|
+
queryProcessorGlobals.getCreatorUserLookupStage(),
|
|
36
|
+
queryProcessorGlobals.getCreatorOrganizationLookupStage(),
|
|
37
|
+
// For owner
|
|
38
|
+
queryProcessorGlobals.getOwnerUserLookupStage(),
|
|
39
|
+
queryProcessorGlobals.getOwnerOrganizationLookupStage(),
|
|
40
|
+
queryProcessorGlobals.getAddFieldsCreatorOwnerStage(),
|
|
41
|
+
// Pagination
|
|
42
|
+
...queryProcessorGlobals.getSortingOptions(req.query.sortParam, req.query.sortOrder),
|
|
43
|
+
...queryProcessorGlobals.getPaginationOptions(req.query.skip, req.query.limit),
|
|
44
|
+
queryProcessorGlobals.removeTempPropeties()
|
|
45
|
+
];
|
|
46
|
+
const cacheKey = JSON.stringify({ stages });
|
|
47
|
+
let data = await this.cache.get(cacheKey);
|
|
48
|
+
if (!data) {
|
|
49
|
+
data = await this.model.aggregate(stages).exec();
|
|
50
|
+
await this.cache.set(cacheKey, data);
|
|
51
|
+
}
|
|
52
|
+
res.json(data);
|
|
53
|
+
} catch (error) {
|
|
54
|
+
this.logger.error(error);
|
|
55
|
+
res.status(500).json({ error: error.message });
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async update(req, res) {
|
|
59
|
+
try {
|
|
60
|
+
const updatedData = await this.model.findOneAndUpdate({ _id: req.body._id }, req.body, {
|
|
61
|
+
new: true,
|
|
62
|
+
runValidators: true
|
|
63
|
+
});
|
|
64
|
+
if (!updatedData) {
|
|
65
|
+
throw new Error("Документ не найден.");
|
|
66
|
+
}
|
|
67
|
+
await this.cache.flush();
|
|
68
|
+
res.json(updatedData);
|
|
69
|
+
} catch (error) {
|
|
70
|
+
this.logger.error("Ошибка обновления данных", error);
|
|
71
|
+
res.status(404).json({ error: error.message });
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
async delete(req, res) {
|
|
75
|
+
try {
|
|
76
|
+
const deletedData = await this.model.findOneAndDelete({ _id: req.body._id });
|
|
77
|
+
if (!deletedData) {
|
|
78
|
+
throw new Error("Документ не найден.");
|
|
79
|
+
}
|
|
80
|
+
await this.cache.flush();
|
|
81
|
+
res.status(204).send();
|
|
82
|
+
} catch (error) {
|
|
83
|
+
this.logger.error("Ошибка удаления данных", error);
|
|
84
|
+
res.status(404).json({ error: error.message });
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
export {
|
|
89
|
+
CRUD as C
|
|
90
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const globals_logger = require("./globals.logger-CZMgIMlM.cjs");
|
|
3
|
+
const queryProcessor = require("./queryProcessor-B_X680wC.cjs");
|
|
4
|
+
class CRUD {
|
|
5
|
+
constructor(basePath, app, db, model, options) {
|
|
6
|
+
this.model = model;
|
|
7
|
+
this.cache = new globals_logger.Cache();
|
|
8
|
+
this.logger = new globals_logger.Logger(db);
|
|
9
|
+
this.app = app;
|
|
10
|
+
this.basePath = basePath;
|
|
11
|
+
if (!options || options && !options.disableDefaultRoutes) this.registerRoutes();
|
|
12
|
+
}
|
|
13
|
+
registerRoutes() {
|
|
14
|
+
this.app.post(`${this.basePath}/create`, this.create.bind(this));
|
|
15
|
+
this.app.get(`${this.basePath}/read`, this.read.bind(this));
|
|
16
|
+
this.app.put(`${this.basePath}/update`, this.update.bind(this));
|
|
17
|
+
this.app.delete(`${this.basePath}/delete`, this.delete.bind(this));
|
|
18
|
+
}
|
|
19
|
+
async create(req, res) {
|
|
20
|
+
try {
|
|
21
|
+
const createdData = await this.model.create(req.body);
|
|
22
|
+
await this.cache.flush();
|
|
23
|
+
res.status(201).json(createdData);
|
|
24
|
+
} catch (error) {
|
|
25
|
+
console.log(error);
|
|
26
|
+
this.logger.error("Ошибка создания данных", error);
|
|
27
|
+
res.status(500).json({ error: error.message });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
async read(req, res) {
|
|
31
|
+
try {
|
|
32
|
+
let stages = [];
|
|
33
|
+
stages = [
|
|
34
|
+
...queryProcessor.queryProcessorGlobals.getBasicOptions(req.query),
|
|
35
|
+
// For creator
|
|
36
|
+
queryProcessor.queryProcessorGlobals.getCreatorUserLookupStage(),
|
|
37
|
+
queryProcessor.queryProcessorGlobals.getCreatorOrganizationLookupStage(),
|
|
38
|
+
// For owner
|
|
39
|
+
queryProcessor.queryProcessorGlobals.getOwnerUserLookupStage(),
|
|
40
|
+
queryProcessor.queryProcessorGlobals.getOwnerOrganizationLookupStage(),
|
|
41
|
+
queryProcessor.queryProcessorGlobals.getAddFieldsCreatorOwnerStage(),
|
|
42
|
+
// Pagination
|
|
43
|
+
...queryProcessor.queryProcessorGlobals.getSortingOptions(req.query.sortParam, req.query.sortOrder),
|
|
44
|
+
...queryProcessor.queryProcessorGlobals.getPaginationOptions(req.query.skip, req.query.limit),
|
|
45
|
+
queryProcessor.queryProcessorGlobals.removeTempPropeties()
|
|
46
|
+
];
|
|
47
|
+
const cacheKey = JSON.stringify({ stages });
|
|
48
|
+
let data = await this.cache.get(cacheKey);
|
|
49
|
+
if (!data) {
|
|
50
|
+
data = await this.model.aggregate(stages).exec();
|
|
51
|
+
await this.cache.set(cacheKey, data);
|
|
52
|
+
}
|
|
53
|
+
res.json(data);
|
|
54
|
+
} catch (error) {
|
|
55
|
+
this.logger.error(error);
|
|
56
|
+
res.status(500).json({ error: error.message });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async update(req, res) {
|
|
60
|
+
try {
|
|
61
|
+
const updatedData = await this.model.findOneAndUpdate({ _id: req.body._id }, req.body, {
|
|
62
|
+
new: true,
|
|
63
|
+
runValidators: true
|
|
64
|
+
});
|
|
65
|
+
if (!updatedData) {
|
|
66
|
+
throw new Error("Документ не найден.");
|
|
67
|
+
}
|
|
68
|
+
await this.cache.flush();
|
|
69
|
+
res.json(updatedData);
|
|
70
|
+
} catch (error) {
|
|
71
|
+
this.logger.error("Ошибка обновления данных", error);
|
|
72
|
+
res.status(404).json({ error: error.message });
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
async delete(req, res) {
|
|
76
|
+
try {
|
|
77
|
+
const deletedData = await this.model.findOneAndDelete({ _id: req.body._id });
|
|
78
|
+
if (!deletedData) {
|
|
79
|
+
throw new Error("Документ не найден.");
|
|
80
|
+
}
|
|
81
|
+
await this.cache.flush();
|
|
82
|
+
res.status(204).send();
|
|
83
|
+
} catch (error) {
|
|
84
|
+
this.logger.error("Ошибка удаления данных", error);
|
|
85
|
+
res.status(404).json({ error: error.message });
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.CRUD = CRUD;
|
package/dist/globals.server.cjs
CHANGED
|
@@ -1,326 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const abac = require("./abac-6LjoG9u-.cjs");
|
|
4
|
-
const
|
|
5
|
-
const jwt = require("jsonwebtoken");
|
|
6
|
-
const uWS = require("uWebSockets.js");
|
|
7
|
-
function _interopNamespaceDefault(e) {
|
|
8
|
-
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
9
|
-
if (e) {
|
|
10
|
-
for (const k in e) {
|
|
11
|
-
if (k !== "default") {
|
|
12
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: () => e[k]
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
n.default = e;
|
|
21
|
-
return Object.freeze(n);
|
|
22
|
-
}
|
|
23
|
-
const cookie__namespace = /* @__PURE__ */ _interopNamespaceDefault(cookie);
|
|
24
|
-
class WebSocketManager {
|
|
25
|
-
constructor() {
|
|
26
|
-
this.app = uWS.App();
|
|
27
|
-
this.modules = /* @__PURE__ */ new Map();
|
|
28
|
-
this.userConnections = /* @__PURE__ */ new Map();
|
|
29
|
-
this.rpcMethods = /* @__PURE__ */ new Map();
|
|
30
|
-
this.app.ws("/api/ws", {
|
|
31
|
-
maxPayloadLength: 16 * 1024 * 1024,
|
|
32
|
-
idleTimeout: 120,
|
|
33
|
-
compression: uWS.SHARED_COMPRESSOR,
|
|
34
|
-
maxBackpressure: 1024 * 1024,
|
|
35
|
-
// Обработчик аутентификации и апгрейда соединения
|
|
36
|
-
upgrade: (res, req, context) => {
|
|
37
|
-
let userId = null;
|
|
38
|
-
const headers = {};
|
|
39
|
-
req.forEach((key, value) => {
|
|
40
|
-
headers[key.toLowerCase()] = value;
|
|
41
|
-
});
|
|
42
|
-
const secWebSocketKey = headers["sec-websocket-key"] || "";
|
|
43
|
-
const secWebSocketProtocol = headers["sec-websocket-protocol"] || "";
|
|
44
|
-
const secWebSocketExtensions = headers["sec-websocket-extensions"] || "";
|
|
45
|
-
try {
|
|
46
|
-
if (headers.cookie) {
|
|
47
|
-
const cookies = cookie__namespace.parse(headers.cookie);
|
|
48
|
-
if (cookies.user) {
|
|
49
|
-
const token = JSON.parse(decodeURIComponent(cookies.user));
|
|
50
|
-
const decoded = jwt.verify(token.accessToken, process.env.SECRET_KEY);
|
|
51
|
-
userId = decoded._id;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
} catch (err) {
|
|
55
|
-
console.error("Invalid token:", err);
|
|
56
|
-
}
|
|
57
|
-
if (process.env.REQUIRE_AUTH === "true" && !userId) {
|
|
58
|
-
res.writeStatus("401 Unauthorized").end("Authentication required");
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
const userData = { userId };
|
|
62
|
-
res.upgrade(userData, secWebSocketKey, secWebSocketProtocol, secWebSocketExtensions, context);
|
|
63
|
-
},
|
|
64
|
-
// Обработчик открытия соединения
|
|
65
|
-
open: (ws) => {
|
|
66
|
-
ws.userId = ws.getUserData().userId;
|
|
67
|
-
ws.subscriptions = /* @__PURE__ */ new Set();
|
|
68
|
-
if (ws.userId) {
|
|
69
|
-
this._trackUserConnection(ws.userId, ws);
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
// Обработчик входящих сообщений
|
|
73
|
-
message: async (ws, message, isBinary) => {
|
|
74
|
-
if (!isBinary) {
|
|
75
|
-
try {
|
|
76
|
-
const msgStr = new TextDecoder().decode(message);
|
|
77
|
-
const msg = JSON.parse(msgStr);
|
|
78
|
-
if (msg.type === "subscribe" && msg.module && this.modules.has(msg.module)) {
|
|
79
|
-
ws.subscriptions.add(msg.module);
|
|
80
|
-
return;
|
|
81
|
-
} else if (msg.type === "unsubscribe" && msg.module) {
|
|
82
|
-
ws.subscriptions.delete(msg.module);
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
if (msg.type === "rpc") {
|
|
86
|
-
await this._handleRpcCall(ws, msg);
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
const moduleName = msg.module;
|
|
90
|
-
if (moduleName && this.modules.has(moduleName)) {
|
|
91
|
-
const handler = this.modules.get(moduleName);
|
|
92
|
-
Promise.resolve(handler(ws, msg)).catch((err) => {
|
|
93
|
-
console.error(`Error in handler for module ${moduleName}:`, err);
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
} catch (err) {
|
|
97
|
-
console.error("Invalid message or handler error:", err);
|
|
98
|
-
if (err instanceof Error) {
|
|
99
|
-
try {
|
|
100
|
-
ws.send(
|
|
101
|
-
JSON.stringify({
|
|
102
|
-
type: "error",
|
|
103
|
-
error: {
|
|
104
|
-
message: err.message,
|
|
105
|
-
code: err.code || "INTERNAL_ERROR"
|
|
106
|
-
}
|
|
107
|
-
}),
|
|
108
|
-
false
|
|
109
|
-
);
|
|
110
|
-
} catch (sendErr) {
|
|
111
|
-
console.error("Error sending error response:", sendErr);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
// Обработчик закрытия соединения
|
|
118
|
-
close: (ws, code, message) => {
|
|
119
|
-
const userId = ws.userId;
|
|
120
|
-
if (userId && this.userConnections.has(userId)) {
|
|
121
|
-
this.userConnections.get(userId).delete(ws);
|
|
122
|
-
if (this.userConnections.get(userId).size === 0) {
|
|
123
|
-
this.userConnections.delete(userId);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
if (ws.subscriptions && typeof ws.subscriptions.clear === "function") {
|
|
127
|
-
ws.subscriptions.clear();
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
this.listenSocket = null;
|
|
132
|
-
}
|
|
133
|
-
// Метод для запуска сервера
|
|
134
|
-
listen(port, callback) {
|
|
135
|
-
this.app.listen(port, (listenSocket) => {
|
|
136
|
-
if (listenSocket) {
|
|
137
|
-
this.listenSocket = listenSocket;
|
|
138
|
-
if (callback) callback(null, this.app);
|
|
139
|
-
} else {
|
|
140
|
-
if (callback) callback(new Error("Failed to listen"), null);
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
return this;
|
|
144
|
-
}
|
|
145
|
-
_trackUserConnection(userId, ws) {
|
|
146
|
-
if (!this.userConnections.has(userId)) {
|
|
147
|
-
this.userConnections.set(userId, /* @__PURE__ */ new Set());
|
|
148
|
-
}
|
|
149
|
-
this.userConnections.get(userId).add(ws);
|
|
150
|
-
}
|
|
151
|
-
registerModule(moduleName, handler) {
|
|
152
|
-
this.modules.set(moduleName, handler);
|
|
153
|
-
}
|
|
154
|
-
// Добавляем методы для регистрации RPC
|
|
155
|
-
registerRpcMethod(moduleName, methodName, handler, options = {}) {
|
|
156
|
-
const fullMethodName = `${moduleName}.${methodName}`;
|
|
157
|
-
if (!this.rpcMethods.has(moduleName)) {
|
|
158
|
-
this.rpcMethods.set(moduleName, /* @__PURE__ */ new Map());
|
|
159
|
-
}
|
|
160
|
-
this.rpcMethods.get(moduleName).set(methodName, {
|
|
161
|
-
handler,
|
|
162
|
-
options: {
|
|
163
|
-
requireAuth: options.requireAuth !== false,
|
|
164
|
-
// По умолчанию true
|
|
165
|
-
validateParams: options.validateParams || null,
|
|
166
|
-
rateLimit: options.rateLimit || null,
|
|
167
|
-
...options
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
console.log(`RPC method registered: ${fullMethodName}`);
|
|
171
|
-
return this;
|
|
172
|
-
}
|
|
173
|
-
// Метод для регистрации группы RPC методов из модуля
|
|
174
|
-
registerRpcMethods(moduleName, methodsMap) {
|
|
175
|
-
for (const [methodName, config] of Object.entries(methodsMap)) {
|
|
176
|
-
const handler = typeof config === "function" ? config : config.handler;
|
|
177
|
-
const options = typeof config === "function" ? {} : config.options || {};
|
|
178
|
-
this.registerRpcMethod(moduleName, methodName, handler, options);
|
|
179
|
-
}
|
|
180
|
-
return this;
|
|
181
|
-
}
|
|
182
|
-
// Обработчик RPC вызовов
|
|
183
|
-
async _handleRpcCall(ws, message) {
|
|
184
|
-
const { module: module2, method, params, id } = message;
|
|
185
|
-
if (!this.rpcMethods.has(module2) || !this.rpcMethods.get(module2).has(method)) {
|
|
186
|
-
this._sendRpcResponse(ws, id, null, {
|
|
187
|
-
code: -32601,
|
|
188
|
-
message: `Method ${module2}.${method} not found`
|
|
189
|
-
});
|
|
190
|
-
return;
|
|
191
|
-
}
|
|
192
|
-
const { handler, options } = this.rpcMethods.get(module2).get(method);
|
|
193
|
-
if (options.requireAuth && !ws.userId) {
|
|
194
|
-
this._sendRpcResponse(ws, id, null, {
|
|
195
|
-
code: -32e3,
|
|
196
|
-
message: "Authentication required"
|
|
197
|
-
});
|
|
198
|
-
return;
|
|
199
|
-
}
|
|
200
|
-
if (options.validateParams && !options.validateParams(params)) {
|
|
201
|
-
this._sendRpcResponse(ws, id, null, {
|
|
202
|
-
code: -32602,
|
|
203
|
-
message: "Invalid params"
|
|
204
|
-
});
|
|
205
|
-
return;
|
|
206
|
-
}
|
|
207
|
-
try {
|
|
208
|
-
const context = {
|
|
209
|
-
userId: ws.userId,
|
|
210
|
-
ws,
|
|
211
|
-
sendResponse: (result2) => this._sendRpcResponse(ws, id, result2),
|
|
212
|
-
sendError: (error) => this._sendRpcResponse(ws, id, null, error)
|
|
213
|
-
};
|
|
214
|
-
const result = await handler.call(context, params, context);
|
|
215
|
-
if (!context.responseSent) {
|
|
216
|
-
this._sendRpcResponse(ws, id, result);
|
|
217
|
-
}
|
|
218
|
-
} catch (error) {
|
|
219
|
-
console.error(`Error executing RPC method ${module2}.${method}:`, error);
|
|
220
|
-
this._sendRpcResponse(ws, id, null, {
|
|
221
|
-
code: -32603,
|
|
222
|
-
message: error.message || "Internal error"
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
// Отправка ответа на RPC запрос
|
|
227
|
-
_sendRpcResponse(ws, id, result, error = null) {
|
|
228
|
-
if (ws.context?.responseSent) return;
|
|
229
|
-
if (ws.context) ws.context.responseSent = true;
|
|
230
|
-
const response = {
|
|
231
|
-
type: "rpc_response",
|
|
232
|
-
id
|
|
233
|
-
};
|
|
234
|
-
if (error) {
|
|
235
|
-
response.error = {
|
|
236
|
-
code: error.code || -32603,
|
|
237
|
-
message: error.message || "Internal error",
|
|
238
|
-
data: error.data
|
|
239
|
-
};
|
|
240
|
-
} else {
|
|
241
|
-
response.result = result;
|
|
242
|
-
}
|
|
243
|
-
try {
|
|
244
|
-
ws.send(JSON.stringify(response), false);
|
|
245
|
-
} catch (err) {
|
|
246
|
-
console.error("Error sending RPC response:", err);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
sendToUserInModule(moduleName, userId, data) {
|
|
250
|
-
const userIdStr = userId.toString();
|
|
251
|
-
const sockets = this.userConnections.get(userIdStr);
|
|
252
|
-
if (!sockets) {
|
|
253
|
-
console.log(`No sockets found for user ${userIdStr}`);
|
|
254
|
-
return false;
|
|
255
|
-
}
|
|
256
|
-
let sent = false;
|
|
257
|
-
const message = JSON.stringify(data);
|
|
258
|
-
for (const ws of sockets) {
|
|
259
|
-
if (ws.subscriptions.has(moduleName)) {
|
|
260
|
-
try {
|
|
261
|
-
const ok = ws.send(message, false);
|
|
262
|
-
if (!ok) {
|
|
263
|
-
console.warn("WebSocket backpressure exceeded for user:", userIdStr);
|
|
264
|
-
} else {
|
|
265
|
-
sent = true;
|
|
266
|
-
}
|
|
267
|
-
} catch (err) {
|
|
268
|
-
console.warn("Failed to send message to user:", userIdStr, err);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
return sent;
|
|
273
|
-
}
|
|
274
|
-
broadcastToModule(moduleName, data) {
|
|
275
|
-
const message = JSON.stringify(data);
|
|
276
|
-
let failedSends = 0;
|
|
277
|
-
for (const sockets of this.userConnections.values()) {
|
|
278
|
-
for (const ws of sockets) {
|
|
279
|
-
if (ws.subscriptions.has(moduleName)) {
|
|
280
|
-
try {
|
|
281
|
-
const ok = ws.send(message, false);
|
|
282
|
-
if (!ok) {
|
|
283
|
-
failedSends++;
|
|
284
|
-
}
|
|
285
|
-
} catch (err) {
|
|
286
|
-
failedSends++;
|
|
287
|
-
console.warn("Failed to broadcast message:", err);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
if (failedSends > 0) {
|
|
293
|
-
console.warn(`Failed to send broadcast to ${failedSends} connections due to backpressure or closed sockets`);
|
|
294
|
-
}
|
|
295
|
-
return true;
|
|
296
|
-
}
|
|
297
|
-
broadcastToModuleWithFilter(moduleName, filterFn, data) {
|
|
298
|
-
const message = JSON.stringify(data);
|
|
299
|
-
let failedSends = 0;
|
|
300
|
-
for (const sockets of this.userConnections.values()) {
|
|
301
|
-
for (const ws of sockets) {
|
|
302
|
-
if (!ws.subscriptions.has(moduleName)) continue;
|
|
303
|
-
if (!filterFn(ws)) continue;
|
|
304
|
-
try {
|
|
305
|
-
const ok = ws.send(message, false);
|
|
306
|
-
if (!ok) {
|
|
307
|
-
failedSends++;
|
|
308
|
-
}
|
|
309
|
-
} catch (err) {
|
|
310
|
-
failedSends++;
|
|
311
|
-
console.warn("Failed to send filtered broadcast:", err);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
if (failedSends > 0) {
|
|
316
|
-
console.warn(`Failed to send filtered broadcast to ${failedSends} connections due to backpressure or closed sockets`);
|
|
317
|
-
}
|
|
318
|
-
return true;
|
|
319
|
-
}
|
|
320
|
-
getServer() {
|
|
321
|
-
return this.app;
|
|
322
|
-
}
|
|
323
|
-
}
|
|
4
|
+
const globals_websocket = require("./globals.websocket-k6_B1T7k.cjs");
|
|
324
5
|
const initGlobalsPolicies = function initializeDefaultPolicies(abacAccessControl) {
|
|
325
6
|
abacAccessControl.registerGlobalPolicy("AdminModeratorAccessPolicy", async (context) => {
|
|
326
7
|
const { user, req } = context;
|
|
@@ -439,8 +120,8 @@ function initializeGlobals(app, db, origins, publicPath) {
|
|
|
439
120
|
}
|
|
440
121
|
const globals_server = {
|
|
441
122
|
initialize: initializeGlobals,
|
|
442
|
-
WebSocketManager
|
|
123
|
+
WebSocketManager: globals_websocket.WebSocketManager
|
|
443
124
|
};
|
|
444
|
-
exports.WebSocketManager = WebSocketManager;
|
|
125
|
+
exports.WebSocketManager = globals_websocket.WebSocketManager;
|
|
445
126
|
exports.default = globals_server;
|
|
446
127
|
exports.initialize = initializeGlobals;
|