pigallery2-extension-kit 2.0.1-edge → 2.0.2-edge
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/ext-enums.tsconfig.json +11 -0
- package/ext-interface.tsconfig.json +12 -0
- package/lib/backend/model/NotifocationManager.js +44 -0
- package/lib/backend/model/PasswordHelper.js +20 -0
- package/lib/common/BackendTexts.js +14 -0
- package/lib/common/SupportedFormats.js +45 -0
- package/lib/common/Utils.js +284 -0
- package/lib/common/config/private/Config.js +97 -0
- package/lib/common/config/private/MessagingConfig.js +134 -0
- package/lib/common/config/private/PrivateConfig.js +1411 -0
- package/lib/common/config/private/WebConfig.js +19 -0
- package/lib/common/config/public/ClientConfig.js +1819 -0
- package/lib/common/config/public/Config.js +24 -0
- package/lib/common/entities/AutoCompleteItem.js +13 -0
- package/lib/common/entities/ConentWrapper.js +479 -0
- package/lib/common/entities/DirectoryDTO.js +51 -0
- package/lib/common/entities/DuplicatesDTO.js +2 -0
- package/lib/common/entities/DynamicConfig.js +2 -0
- package/lib/common/entities/Error.js +45 -0
- package/lib/common/entities/FileDTO.js +2 -0
- package/lib/common/entities/GridSizes.js +11 -0
- package/lib/common/entities/LoginCredential.js +11 -0
- package/lib/common/entities/MDFileDTO.js +2 -0
- package/lib/common/entities/MediaDTO.js +53 -0
- package/lib/common/entities/MediaPickDTO.js +2 -0
- package/lib/common/entities/Message.js +12 -0
- package/lib/common/entities/NotificationDTO.js +9 -0
- package/lib/common/entities/PasswordChangeRequest.js +12 -0
- package/lib/common/entities/PersonDTO.js +2 -0
- package/lib/common/entities/PhotoDTO.js +2 -0
- package/lib/common/entities/SearchQueryDTO.js +130 -0
- package/lib/common/entities/SearchResultDTO.js +2 -0
- package/lib/common/entities/SharingDTO.js +2 -0
- package/lib/common/entities/SortingMethods.js +41 -0
- package/lib/common/entities/UserDTO.js +46 -0
- package/lib/common/entities/UserModificationRequest.js +9 -0
- package/lib/common/entities/VideoDTO.js +2 -0
- package/lib/common/entities/album/AlbumBaseDTO.js +2 -0
- package/lib/common/entities/album/SavedSearchDTO.js +2 -0
- package/lib/common/entities/job/JobDTO.js +29 -0
- package/lib/common/entities/job/JobProgressDTO.js +12 -0
- package/lib/common/entities/job/JobScheduleDTO.js +53 -0
- package/lib/common/entities/settings/IndexingDTO.js +2 -0
- package/lib/common/entities/settings/StatisticDTO.js +2 -0
- package/package.json +1 -1
- package/lib/extension/index.d.ts +0 -1
- package/lib/test.d.ts +0 -1
- package/lib/test2.d.ts +0 -1
- /package/lib/{src/backend → backend}/Logger.d.ts +0 -0
- /package/lib/{src/backend → backend}/ProjectPath.d.ts +0 -0
- /package/lib/{src/backend → backend}/exceptions/LocationLookupException.d.ts +0 -0
- /package/lib/{src/backend → backend}/index.d.ts +0 -0
- /package/lib/{src/backend → backend}/middlewares/AlbumMWs.d.ts +0 -0
- /package/lib/{src/backend → backend}/middlewares/GalleryMWs.d.ts +0 -0
- /package/lib/{src/backend → backend}/middlewares/MetaFileMWs.d.ts +0 -0
- /package/lib/{src/backend → backend}/middlewares/NotificationMWs.d.ts +0 -0
- /package/lib/{src/backend → backend}/middlewares/PersonMWs.d.ts +0 -0
- /package/lib/{src/backend → backend}/middlewares/RenderingMWs.d.ts +0 -0
- /package/lib/{src/backend → backend}/middlewares/ServerTimingMWs.d.ts +0 -0
- /package/lib/{src/backend → backend}/middlewares/SharingMWs.d.ts +0 -0
- /package/lib/{src/backend → backend}/middlewares/VersionMWs.d.ts +0 -0
- /package/lib/{src/backend → backend}/middlewares/admin/AdminMWs.d.ts +0 -0
- /package/lib/{src/backend → backend}/middlewares/admin/SettingsMWs.d.ts +0 -0
- /package/lib/{src/backend → backend}/middlewares/thumbnail/PhotoConverterMWs.d.ts +0 -0
- /package/lib/{src/backend → backend}/middlewares/thumbnail/ThumbnailGeneratorMWs.d.ts +0 -0
- /package/lib/{src/backend → backend}/middlewares/user/AuthenticationMWs.d.ts +0 -0
- /package/lib/{src/backend → backend}/middlewares/user/UserMWs.d.ts +0 -0
- /package/lib/{src/backend → backend}/middlewares/user/UserRequestConstrainsMWs.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/EventLoopHandler.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/FFmpegFactory.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/Localizations.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/NotifocationManager.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/ObjectManagers.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/PasswordHelper.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/AlbumManager.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/CoverManager.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/GalleryManager.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/IObjectManager.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/IndexingManager.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/LocationManager.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/PersonManager.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/SQLConnection.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/SearchManager.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/SharingManager.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/UserManager.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/VersionManager.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/enitites/DirectoryEntity.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/enitites/EntityUtils.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/enitites/FileEntity.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/enitites/MDFileEntity.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/enitites/MediaEntity.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/enitites/PersonEntry.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/enitites/PersonJunctionTable.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/enitites/PhotoEntity.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/enitites/SharingEntity.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/enitites/UserEntity.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/enitites/VersionEntity.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/enitites/VideoEntity.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/enitites/album/AlbumBaseEntity.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/database/enitites/album/SavedSearchEntity.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/diagnostics/ConfigDiagnostics.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/extension/ExpressRouterWrapper.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/extension/ExtensionApp.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/extension/ExtensionConfigWrapper.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/extension/ExtensionDB.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/extension/ExtensionDecorator.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/extension/ExtensionEvent.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/extension/ExtensionManager.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/extension/ExtensionMessengerHandler.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/extension/ExtensionObject.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/extension/IExtension.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/fileaccess/DiskManager.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/fileaccess/MetadataLoader.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/fileaccess/PhotoWorker.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/fileaccess/TaskExecuter.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/fileaccess/TaskQue.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/fileaccess/VideoConverterWorker.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/fileaccess/fileprocessing/GPXProcessing.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/fileaccess/fileprocessing/PhotoProcessing.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/fileaccess/fileprocessing/VideoProcessing.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/JobManager.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/JobProgressManager.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/JobRepository.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/jobs/AlbumCoverFillingJob.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/jobs/AlbumCoverResetJob.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/jobs/AlbumResetJob.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/jobs/FileJob.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/jobs/GPXCompressionJob.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/jobs/GPXCompressionResetJob.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/jobs/GalleryResetJob.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/jobs/IJob.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/jobs/IJobListener.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/jobs/IndexingJob.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/jobs/Job.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/jobs/JobProgress.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/jobs/PhotoConvertingJob.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/jobs/TempFolderCleaningJob.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/jobs/ThumbnailGenerationJob.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/jobs/TopPickSendJob.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/jobs/jobs/VideoConvertingJob.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/messenger/EmailMessenger.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/messenger/ExtensionMessenger.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/messenger/Messenger.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/messenger/MessengerRepository.d.ts +0 -0
- /package/lib/{src/backend → backend}/model/messenger/StdoutMessenger.d.ts +0 -0
- /package/lib/{src/backend → backend}/routes/AlbumRouter.d.ts +0 -0
- /package/lib/{src/backend → backend}/routes/ErrorRouter.d.ts +0 -0
- /package/lib/{src/backend → backend}/routes/GalleryRouter.d.ts +0 -0
- /package/lib/{src/backend → backend}/routes/LoggerRouter.d.ts +0 -0
- /package/lib/{src/backend → backend}/routes/NotificationRouter.d.ts +0 -0
- /package/lib/{src/backend → backend}/routes/PersonRouter.d.ts +0 -0
- /package/lib/{src/backend → backend}/routes/PublicRouter.d.ts +0 -0
- /package/lib/{src/backend → backend}/routes/Router.d.ts +0 -0
- /package/lib/{src/backend → backend}/routes/SharingRouter.d.ts +0 -0
- /package/lib/{src/backend → backend}/routes/UserRouter.d.ts +0 -0
- /package/lib/{src/backend → backend}/routes/admin/AdminRouter.d.ts +0 -0
- /package/lib/{src/backend → backend}/routes/admin/SettingsRouter.d.ts +0 -0
- /package/lib/{src/backend → backend}/server.d.ts +0 -0
- /package/lib/{src/common → common}/BackendTexts.d.ts +0 -0
- /package/lib/{src/common → common}/CookieNames.d.ts +0 -0
- /package/lib/{src/common → common}/CustomHeaders.d.ts +0 -0
- /package/lib/{src/common → common}/DataStructureVersion.d.ts +0 -0
- /package/lib/{src/common → common}/PG2ConfMap.d.ts +0 -0
- /package/lib/{src/common → common}/QueryParams.d.ts +0 -0
- /package/lib/{src/common → common}/SearchQueryParser.d.ts +0 -0
- /package/lib/{src/common → common}/SupportedFormats.d.ts +0 -0
- /package/lib/{src/common → common}/Utils.d.ts +0 -0
- /package/lib/{src/common → common}/config/private/Config.d.ts +0 -0
- /package/lib/{src/common → common}/config/private/MessagingConfig.d.ts +0 -0
- /package/lib/{src/common → common}/config/private/PrivateConfig.d.ts +0 -0
- /package/lib/{src/common → common}/config/private/WebConfig.d.ts +0 -0
- /package/lib/{src/common → common}/config/public/ClientConfig.d.ts +0 -0
- /package/lib/{src/common → common}/config/public/Config.d.ts +0 -0
- /package/lib/{src/common → common}/entities/AutoCompleteItem.d.ts +0 -0
- /package/lib/{src/common → common}/entities/ConentWrapper.d.ts +0 -0
- /package/lib/{src/common → common}/entities/DirectoryDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/DuplicatesDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/DynamicConfig.d.ts +0 -0
- /package/lib/{src/common → common}/entities/Error.d.ts +0 -0
- /package/lib/{src/common → common}/entities/FileDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/GridSizes.d.ts +0 -0
- /package/lib/{src/common → common}/entities/LoginCredential.d.ts +0 -0
- /package/lib/{src/common → common}/entities/MDFileDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/MediaDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/MediaPickDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/Message.d.ts +0 -0
- /package/lib/{src/common → common}/entities/NotificationDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/PasswordChangeRequest.d.ts +0 -0
- /package/lib/{src/common → common}/entities/PersonDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/PhotoDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/SearchQueryDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/SearchResultDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/SharingDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/SortingMethods.d.ts +0 -0
- /package/lib/{src/common → common}/entities/UserDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/UserModificationRequest.d.ts +0 -0
- /package/lib/{src/common → common}/entities/VideoDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/album/AlbumBaseDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/album/SavedSearchDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/job/JobDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/job/JobProgressDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/job/JobScheduleDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/settings/IndexingDTO.d.ts +0 -0
- /package/lib/{src/common → common}/entities/settings/StatisticDTO.d.ts +0 -0
- /package/lib/{src/common → common}/event/Event.d.ts +0 -0
- /package/lib/{src/common → common}/event/Event2Args.d.ts +0 -0
- /package/lib/{src/common → common}/event/EventLimit.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/app.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/app.module.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/app.routing.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/icon.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/IRenderable.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/backendtext.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/backendtext.service.spec.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/navigation.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/network/autehentication.service.spec.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/network/authentication.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/network/helper/auth.guard.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/network/helper/csrf.interceptor.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/network/helper/error.interceptor.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/network/network.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/network/network.service.spec.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/network/user.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/network/user.service.spec.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/notification.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/page.helper.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/pi-title.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/query.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/seededRandom.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/theme.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/model/version.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/pipes/DurationPipe.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/pipes/FileDTOToPathPipe.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/pipes/FileDTOToRelativePathPipe.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/pipes/FileSizePipe.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/pipes/GPXFilesFilterPipe.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/pipes/MDFilesFilterPipe.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/pipes/ParseIntPipe.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/pipes/PhotoFilterPipe.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/pipes/SafeHTMLPipe.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/pipes/StringifyEnum.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/pipes/StringifyGridSize.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/pipes/StringifyRolePipe.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/pipes/StringifySearchQuery.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/pipes/StringifySearchType.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/pipes/StringifySortingMethod.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/EnumTranslations.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/admin/admin.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/albums/album/album.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/albums/albums.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/albums/albums.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/albums/saved-search-popup/saved-search-popup.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/duplicates/duplicates.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/duplicates/duplicates.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/duplicates/photo/photo.duplicates.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/faces/Person.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/faces/face/face.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/faces/faces.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/faces/faces.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/frame/frame.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/Media.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/MediaIcon.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/blog/blog.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/blog/blog.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/cache.gallery.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/content.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/contentLoader.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/directories/directories.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/directories/directory/directory.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/filter/filter.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/filter/filter.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/fullscreen.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/grid/GridMedia.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/grid/GridRowBuilder.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/grid/grid.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/grid/grid.gallery.component.spec.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/grid/photo/loading/loading.photo.grid.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/grid/photo/photo.grid.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/lightbox/lightbox.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/lightbox/lightbox.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/lightbox/media/media.lightbox.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/map/MarkerFactory.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/map/lightbox/lightbox.map.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/map/map.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/map/map.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/navigator/navigator.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/navigator/navigator.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/navigator/sorting.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/overlay.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/random-query-builder/random-query-builder.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/search/AutoCompleteRenderItem.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/search/autocomplete.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/search/query-builder/query-bulder.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/search/query-enrty/query-entry.search.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/search/search-field/search-field.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/search/search-field-base/search-field-base.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/search/search-query-parser.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/search/search.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/share/share.gallery.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/share.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/thumbnailLoader.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/gallery/thumbnailManager.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/language/language.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/login/login.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/settings/gallery-statistic/gallery-statistic.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/settings/scheduled-jobs.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/settings/settings.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/settings/sharings-list/sharings-list.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/settings/template/CustomSettingsEntries.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/settings/template/ISettingsComponent.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/settings/template/settings-entry/settings-entry.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/settings/template/settings-entry/sorting-method/sorting-method.settings-entry.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/settings/template/template.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/settings/users/users.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/settings/users/users.service.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/settings/workflow/button/job-button.settings.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/settings/workflow/progress/job-progress.settings.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/settings/workflow/workflow.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/sharelogin/share-login.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/utils/grid-size-icon/grid-size-icon.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/utils/sorting-method-icon/sorting-method-icon.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/utils/timestamp-datepicker/datepicker.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/app/ui/utils/timestamp-timepicker/timepicker.component.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/environments/environment.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/environments/environment.prod.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/main.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/polyfills.d.ts +0 -0
- /package/lib/{src/frontend → frontend}/test.d.ts +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationManager = void 0;
|
|
4
|
+
const NotificationDTO_1 = require("../../common/entities/NotificationDTO");
|
|
5
|
+
class NotificationManager {
|
|
6
|
+
static { this.notifications = []; }
|
|
7
|
+
static { this.HasNotification = [
|
|
8
|
+
{
|
|
9
|
+
type: NotificationDTO_1.NotificationType.info,
|
|
10
|
+
message: 'There are unhandled server notification. Login as Administrator to handle them.',
|
|
11
|
+
},
|
|
12
|
+
]; }
|
|
13
|
+
static error(message, details, req) {
|
|
14
|
+
const noti = {
|
|
15
|
+
type: NotificationDTO_1.NotificationType.error,
|
|
16
|
+
message,
|
|
17
|
+
details,
|
|
18
|
+
};
|
|
19
|
+
if (req) {
|
|
20
|
+
noti.request = {
|
|
21
|
+
method: req.method,
|
|
22
|
+
url: req.url,
|
|
23
|
+
statusCode: req.statusCode,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
NotificationManager.notifications.push(noti);
|
|
27
|
+
}
|
|
28
|
+
static warning(message, details, req) {
|
|
29
|
+
const noti = {
|
|
30
|
+
type: NotificationDTO_1.NotificationType.warning,
|
|
31
|
+
message,
|
|
32
|
+
details,
|
|
33
|
+
};
|
|
34
|
+
if (req) {
|
|
35
|
+
noti.request = {
|
|
36
|
+
method: req.method,
|
|
37
|
+
url: req.url,
|
|
38
|
+
statusCode: req.statusCode,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
NotificationManager.notifications.push(noti);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.NotificationManager = NotificationManager;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PasswordHelper = void 0;
|
|
4
|
+
const bcrypt = require("bcrypt");
|
|
5
|
+
class PasswordHelper {
|
|
6
|
+
static cryptPassword(password) {
|
|
7
|
+
const salt = bcrypt.genSaltSync(9);
|
|
8
|
+
return bcrypt.hashSync(password, salt);
|
|
9
|
+
}
|
|
10
|
+
static comparePassword(password, encryptedPassword) {
|
|
11
|
+
try {
|
|
12
|
+
return bcrypt.compareSync(password, encryptedPassword);
|
|
13
|
+
// eslint-disable-next-line no-empty
|
|
14
|
+
}
|
|
15
|
+
catch (e) {
|
|
16
|
+
}
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.PasswordHelper = PasswordHelper;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.backendTexts = void 0;
|
|
4
|
+
// keep the numbering sparse to support later addition
|
|
5
|
+
exports.backendTexts = {
|
|
6
|
+
indexedFilesOnly: { name: 10, description: 12 },
|
|
7
|
+
sizeToGenerate: { name: 20, description: 22 },
|
|
8
|
+
indexChangesOnly: { name: 30, description: 32 },
|
|
9
|
+
mediaPick: { name: 40, description: 42 },
|
|
10
|
+
emailTo: { name: 70, description: 72 },
|
|
11
|
+
emailSubject: { name: 90, description: 92 },
|
|
12
|
+
emailText: { name: 100, description: 102 },
|
|
13
|
+
messenger: { name: 110, description: 112 }
|
|
14
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SupportedFormats = void 0;
|
|
4
|
+
let Config;
|
|
5
|
+
if (typeof window !== 'undefined') {
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
7
|
+
Config = require('./config/public/Config').Config;
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
11
|
+
Config = require('./config/private/Config').Config;
|
|
12
|
+
}
|
|
13
|
+
exports.SupportedFormats = {
|
|
14
|
+
Photos: Config.Media.Photo.supportedFormats,
|
|
15
|
+
// Browser supported video formats
|
|
16
|
+
// Read more: https://www.w3schools.com/html/html5_video.asp
|
|
17
|
+
Videos: Config.Media.Video.supportedFormats,
|
|
18
|
+
MetaFiles: Config.MetaFile.supportedFormats,
|
|
19
|
+
// These formats need to be transcoded (with the build-in ffmpeg support)
|
|
20
|
+
TranscodeNeed: {
|
|
21
|
+
// based on libvips, all supported formats for sharp: https://github.com/libvips/libvips
|
|
22
|
+
Photos: [],
|
|
23
|
+
Videos: Config.Media.Video.supportedFormatsWithTranscoding,
|
|
24
|
+
},
|
|
25
|
+
// --------------------------------------------
|
|
26
|
+
// Below this, it is autogenerated, DO NOT EDIT
|
|
27
|
+
WithDots: {
|
|
28
|
+
Photos: [],
|
|
29
|
+
Videos: [],
|
|
30
|
+
MetaFiles: [],
|
|
31
|
+
TranscodeNeed: {
|
|
32
|
+
Photos: [],
|
|
33
|
+
Videos: [],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
exports.SupportedFormats.Photos = exports.SupportedFormats.Photos.concat(exports.SupportedFormats.TranscodeNeed.Photos);
|
|
38
|
+
exports.SupportedFormats.Videos = exports.SupportedFormats.Videos.concat(exports.SupportedFormats.TranscodeNeed.Videos);
|
|
39
|
+
exports.SupportedFormats.WithDots.Photos = exports.SupportedFormats.Photos.map((f) => '.' + f);
|
|
40
|
+
exports.SupportedFormats.WithDots.Videos = exports.SupportedFormats.Videos.map((f) => '.' + f);
|
|
41
|
+
exports.SupportedFormats.WithDots.MetaFiles = exports.SupportedFormats.MetaFiles.map((f) => '.' + f);
|
|
42
|
+
exports.SupportedFormats.WithDots.TranscodeNeed.Photos =
|
|
43
|
+
exports.SupportedFormats.TranscodeNeed.Photos.map((f) => '.' + f);
|
|
44
|
+
exports.SupportedFormats.WithDots.TranscodeNeed.Videos =
|
|
45
|
+
exports.SupportedFormats.TranscodeNeed.Videos.map((f) => '.' + f);
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LRU = exports.Utils = void 0;
|
|
4
|
+
class Utils {
|
|
5
|
+
static GUID() {
|
|
6
|
+
const s4 = () => Math.floor((1 + Math.random()) * 0x10000)
|
|
7
|
+
.toString(16)
|
|
8
|
+
.substring(1);
|
|
9
|
+
return s4() + s4() + '-' + s4() + s4();
|
|
10
|
+
}
|
|
11
|
+
static chunkArrays(arr, chunkSize) {
|
|
12
|
+
const R = [];
|
|
13
|
+
for (let i = 0; i < arr.length; i += chunkSize) {
|
|
14
|
+
R.push(arr.slice(i, i + chunkSize));
|
|
15
|
+
}
|
|
16
|
+
return R;
|
|
17
|
+
}
|
|
18
|
+
static wait(time) {
|
|
19
|
+
return new Promise((resolve) => {
|
|
20
|
+
setTimeout(resolve, time);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
static removeNullOrEmptyObj(obj) {
|
|
24
|
+
if (typeof obj !== 'object' || obj == null) {
|
|
25
|
+
return obj;
|
|
26
|
+
}
|
|
27
|
+
const keys = Object.keys(obj);
|
|
28
|
+
for (const key of keys) {
|
|
29
|
+
if (obj[key] !== null && typeof obj[key] === 'object') {
|
|
30
|
+
if (Utils.removeNullOrEmptyObj(obj[key])) {
|
|
31
|
+
if (Object.keys(obj[key]).length === 0) {
|
|
32
|
+
delete obj[key];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else if (obj[key] === null) {
|
|
37
|
+
delete obj[key];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return obj;
|
|
41
|
+
}
|
|
42
|
+
static clone(object) {
|
|
43
|
+
return JSON.parse(JSON.stringify(object));
|
|
44
|
+
}
|
|
45
|
+
static shallowClone(object) {
|
|
46
|
+
const c = {};
|
|
47
|
+
for (const e of Object.entries(object)) {
|
|
48
|
+
c[e[0]] = e[1];
|
|
49
|
+
}
|
|
50
|
+
return c;
|
|
51
|
+
}
|
|
52
|
+
static zeroPrefix(value, length) {
|
|
53
|
+
const ret = '00000' + value;
|
|
54
|
+
return ret.substr(ret.length - length);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Checks if the two input (let them be objects or arrays or just primitives) are equal
|
|
58
|
+
*/
|
|
59
|
+
static equalsFilter(object, filter, skipProp = []) {
|
|
60
|
+
if (typeof filter !== 'object' || filter == null) {
|
|
61
|
+
return object === filter;
|
|
62
|
+
}
|
|
63
|
+
if (!object) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
if (Array.isArray(object) && object.length !== filter.length) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
const keys = Object.keys(filter);
|
|
70
|
+
for (const key of keys) {
|
|
71
|
+
if (skipProp.includes(key)) {
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
if (typeof filter[key] === 'object') {
|
|
75
|
+
if (Utils.equalsFilter(object[key], filter[key], skipProp) === false) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
else if (object[key] !== filter[key]) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
static toIsoString(d) {
|
|
86
|
+
if (!(d instanceof Date)) {
|
|
87
|
+
d = new Date(d);
|
|
88
|
+
}
|
|
89
|
+
return d.getUTCFullYear() + '-' + d.getUTCMonth() + '-' + d.getUTCDate();
|
|
90
|
+
}
|
|
91
|
+
static makeUTCMidnight(d) {
|
|
92
|
+
if (!(d instanceof Date)) {
|
|
93
|
+
d = new Date(d);
|
|
94
|
+
}
|
|
95
|
+
d.setUTCHours(0);
|
|
96
|
+
d.setUTCMinutes(0);
|
|
97
|
+
d.setUTCSeconds(0);
|
|
98
|
+
d.setUTCMilliseconds(0);
|
|
99
|
+
return d;
|
|
100
|
+
}
|
|
101
|
+
static renderDataSize(size) {
|
|
102
|
+
const postFixes = ['B', 'KB', 'MB', 'GB', 'TB'];
|
|
103
|
+
let index = 0;
|
|
104
|
+
while (size > 1000 && index < postFixes.length - 1) {
|
|
105
|
+
size /= 1000;
|
|
106
|
+
index++;
|
|
107
|
+
}
|
|
108
|
+
return size.toFixed(2) + postFixes[index];
|
|
109
|
+
}
|
|
110
|
+
static getUnique(arr) {
|
|
111
|
+
return arr.filter((value, index, arr) => arr.indexOf(value) === index);
|
|
112
|
+
}
|
|
113
|
+
static createRange(from, to) {
|
|
114
|
+
const arr = new Array(to - from + 1);
|
|
115
|
+
let c = to - from + 1;
|
|
116
|
+
while (c--) {
|
|
117
|
+
arr[c] = to--;
|
|
118
|
+
}
|
|
119
|
+
return arr;
|
|
120
|
+
}
|
|
121
|
+
static canonizePath(path) {
|
|
122
|
+
return path
|
|
123
|
+
.replace(new RegExp('\\\\', 'g'), '/')
|
|
124
|
+
.replace(new RegExp('/+', 'g'), '/');
|
|
125
|
+
}
|
|
126
|
+
static concatUrls(...args) {
|
|
127
|
+
let url = '';
|
|
128
|
+
for (const item of args) {
|
|
129
|
+
if (item === '' || typeof item === 'undefined') {
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
const part = item.replace(new RegExp('\\\\', 'g'), '/');
|
|
133
|
+
if (part === '/' || part === './') {
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
136
|
+
url += part + '/';
|
|
137
|
+
}
|
|
138
|
+
url = url.replace(/(https?:\/\/)|(\/){2,}/g, '$1$2');
|
|
139
|
+
if (url.trim() === '') {
|
|
140
|
+
url = './';
|
|
141
|
+
}
|
|
142
|
+
return url.substring(0, url.length - 1);
|
|
143
|
+
}
|
|
144
|
+
static updateKeys(targetObject, sourceObject) {
|
|
145
|
+
Object.keys(sourceObject).forEach((key) => {
|
|
146
|
+
if (typeof targetObject[key] === 'undefined') {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
if (typeof targetObject[key] === 'object') {
|
|
150
|
+
Utils.updateKeys(targetObject[key], sourceObject[key]);
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
targetObject[key] = sourceObject[key];
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
static setKeys(targetObject, sourceObject) {
|
|
158
|
+
Object.keys(sourceObject).forEach((key) => {
|
|
159
|
+
if (typeof targetObject[key] === 'object') {
|
|
160
|
+
Utils.setKeys(targetObject[key], sourceObject[key]);
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
targetObject[key] = sourceObject[key];
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
static setKeysForced(targetObject, sourceObject) {
|
|
168
|
+
Object.keys(sourceObject).forEach((key) => {
|
|
169
|
+
if (typeof sourceObject[key] === 'object') {
|
|
170
|
+
if (typeof targetObject[key] === 'undefined') {
|
|
171
|
+
targetObject[key] = {};
|
|
172
|
+
}
|
|
173
|
+
Utils.setKeysForced(targetObject[key], sourceObject[key]);
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
targetObject[key] = sourceObject[key];
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
static isValidEnumInt(EnumType, value) {
|
|
181
|
+
return typeof EnumType[value] === 'string';
|
|
182
|
+
}
|
|
183
|
+
static enumToArray(EnumType) {
|
|
184
|
+
const arr = [];
|
|
185
|
+
for (const enumMember in EnumType) {
|
|
186
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
187
|
+
if (!EnumType.hasOwnProperty(enumMember)) {
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
const key = parseInt(enumMember, 10);
|
|
191
|
+
if (key >= 0) {
|
|
192
|
+
arr.push({ key, value: EnumType[enumMember] });
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return arr;
|
|
196
|
+
}
|
|
197
|
+
static findClosest(num, arr) {
|
|
198
|
+
let curr = arr[0];
|
|
199
|
+
let diff = Math.abs(num - curr);
|
|
200
|
+
arr.forEach((value) => {
|
|
201
|
+
const newDiff = Math.abs(num - value);
|
|
202
|
+
if (newDiff < diff) {
|
|
203
|
+
diff = newDiff;
|
|
204
|
+
curr = value;
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
return curr;
|
|
208
|
+
}
|
|
209
|
+
static findClosestinSorted(num, arr) {
|
|
210
|
+
let curr = arr[0];
|
|
211
|
+
let diff = Math.abs(num - curr);
|
|
212
|
+
for (const item of arr) {
|
|
213
|
+
const newDiff = Math.abs(num - item);
|
|
214
|
+
if (newDiff > diff) {
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
diff = newDiff;
|
|
218
|
+
curr = item;
|
|
219
|
+
}
|
|
220
|
+
return curr;
|
|
221
|
+
}
|
|
222
|
+
static isUInt32(value, max = 4294967295) {
|
|
223
|
+
value = parseInt('' + value, 10);
|
|
224
|
+
return !isNaN(value) && value >= 0 && value <= max;
|
|
225
|
+
}
|
|
226
|
+
static isInt32(value) {
|
|
227
|
+
value = parseFloat('' + value);
|
|
228
|
+
return !isNaN(value) && value >= -2147483648 && value <= 2147483647;
|
|
229
|
+
}
|
|
230
|
+
static isFloat32(value) {
|
|
231
|
+
const E = Math.pow(10, 38);
|
|
232
|
+
const nE = Math.pow(10, -38);
|
|
233
|
+
return (!isNaN(value) &&
|
|
234
|
+
((value >= -3.402823466 * E && value <= -1.175494351 * nE) ||
|
|
235
|
+
(value <= 3.402823466 * E && value >= 1.175494351 * nE)));
|
|
236
|
+
}
|
|
237
|
+
static getAnyX(num, arr, start = 0) {
|
|
238
|
+
if (num <= 0 || num > arr.length || start >= arr.length) {
|
|
239
|
+
return [];
|
|
240
|
+
}
|
|
241
|
+
if (num <= 1) {
|
|
242
|
+
return arr.slice(start).map((e) => [e]);
|
|
243
|
+
}
|
|
244
|
+
if (num === arr.length - start) {
|
|
245
|
+
return [arr.slice(start)];
|
|
246
|
+
}
|
|
247
|
+
const ret = [];
|
|
248
|
+
for (let i = start; i < arr.length; ++i) {
|
|
249
|
+
Utils.getAnyX(num - 1, arr, i + 1).forEach((a) => {
|
|
250
|
+
a.push(arr[i]);
|
|
251
|
+
ret.push(a);
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
return ret;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
exports.Utils = Utils;
|
|
258
|
+
class LRU {
|
|
259
|
+
constructor(size) {
|
|
260
|
+
this.size = size;
|
|
261
|
+
this.data = {};
|
|
262
|
+
}
|
|
263
|
+
set(key, value) {
|
|
264
|
+
this.data[key] = { usage: Date.now(), value };
|
|
265
|
+
if (Object.keys(this.data).length > this.size) {
|
|
266
|
+
let oldestK = key;
|
|
267
|
+
let oldest = this.data[oldestK].usage;
|
|
268
|
+
for (const k in this.data) {
|
|
269
|
+
if (this.data[k].usage < oldest) {
|
|
270
|
+
oldestK = k;
|
|
271
|
+
oldest = this.data[oldestK].usage;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
delete this.data[oldestK];
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
get(key) {
|
|
278
|
+
if (!this.data[key]) {
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
return this.data[key].value;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
exports.LRU = LRU;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Config = exports.PrivateConfigClass = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
6
|
+
const PrivateConfig_1 = require("./PrivateConfig");
|
|
7
|
+
const crypto = require("crypto");
|
|
8
|
+
const path = require("path");
|
|
9
|
+
const node_1 = require("typeconfig/node");
|
|
10
|
+
const PasswordHelper_1 = require("../../../backend/model/PasswordHelper");
|
|
11
|
+
const NotifocationManager_1 = require("../../../backend/model/NotifocationManager");
|
|
12
|
+
const upTime = new Date().toISOString();
|
|
13
|
+
// TODO: Refactor Config to be injectable globally.
|
|
14
|
+
// This is a bad habit to let the Config know if its in a testing env.
|
|
15
|
+
const isTesting = process.env['NODE_ENV'] == true || ['afterEach', 'after', 'beforeEach', 'before', 'describe', 'it']
|
|
16
|
+
.every((fn) => global[fn] instanceof Function);
|
|
17
|
+
let PrivateConfigClass = class PrivateConfigClass extends PrivateConfig_1.ServerConfig {
|
|
18
|
+
constructor() {
|
|
19
|
+
super();
|
|
20
|
+
if (!this.Server.sessionSecret || this.Server.sessionSecret.length === 0) {
|
|
21
|
+
this.Server.sessionSecret = [
|
|
22
|
+
crypto.randomBytes(256).toString('hex'),
|
|
23
|
+
crypto.randomBytes(256).toString('hex'),
|
|
24
|
+
crypto.randomBytes(256).toString('hex'),
|
|
25
|
+
];
|
|
26
|
+
}
|
|
27
|
+
this.Environment.appVersion =
|
|
28
|
+
require('../../../../package.json').version;
|
|
29
|
+
this.Environment.buildTime =
|
|
30
|
+
require('../../../../package.json').buildTime;
|
|
31
|
+
this.Environment.buildCommitHash =
|
|
32
|
+
require('../../../../package.json').buildCommitHash;
|
|
33
|
+
this.Environment.upTime = upTime;
|
|
34
|
+
this.Environment.isDocker = !!process.env.PI_DOCKER;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
PrivateConfigClass = tslib_1.__decorate([
|
|
38
|
+
(0, node_1.ConfigClass)({
|
|
39
|
+
configPath: path.join(__dirname, !isTesting ? './../../../../config.json' : './../../../../test/backend/tmp/config.json'),
|
|
40
|
+
crateConfigPathIfNotExists: isTesting,
|
|
41
|
+
saveIfNotExist: true,
|
|
42
|
+
attachDescription: true,
|
|
43
|
+
enumsAsString: true,
|
|
44
|
+
softReadonly: true,
|
|
45
|
+
cli: {
|
|
46
|
+
enable: {
|
|
47
|
+
configPath: true,
|
|
48
|
+
attachState: true,
|
|
49
|
+
attachDescription: true,
|
|
50
|
+
rewriteCLIConfig: true,
|
|
51
|
+
rewriteENVConfig: true,
|
|
52
|
+
enumsAsString: true,
|
|
53
|
+
saveIfNotExist: true,
|
|
54
|
+
exitOnConfig: true,
|
|
55
|
+
},
|
|
56
|
+
defaults: {
|
|
57
|
+
enabled: true,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
onLoadedSync: async (config) => {
|
|
61
|
+
let changed = false;
|
|
62
|
+
for (let i = 0; i < config.Users.enforcedUsers.length; ++i) {
|
|
63
|
+
const uc = config.Users.enforcedUsers[i];
|
|
64
|
+
// encrypt password and save back to the config
|
|
65
|
+
if (uc.password) {
|
|
66
|
+
if (!uc.encryptedPassword) {
|
|
67
|
+
uc.encryptedPassword = PasswordHelper_1.PasswordHelper.cryptPassword(uc.password);
|
|
68
|
+
}
|
|
69
|
+
uc.password = '';
|
|
70
|
+
changed = true;
|
|
71
|
+
}
|
|
72
|
+
if (!uc.encrypted) {
|
|
73
|
+
uc.encrypted = !!uc.encryptedPassword;
|
|
74
|
+
changed = true;
|
|
75
|
+
}
|
|
76
|
+
if (!uc.encrypted && !uc.password) {
|
|
77
|
+
throw new Error('Password error for enforced user: ' + uc.name);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (changed) {
|
|
81
|
+
config.saveSync();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}),
|
|
85
|
+
tslib_1.__metadata("design:paramtypes", [])
|
|
86
|
+
], PrivateConfigClass);
|
|
87
|
+
exports.PrivateConfigClass = PrivateConfigClass;
|
|
88
|
+
exports.Config = node_1.ConfigClassBuilder.attachInterface(new PrivateConfigClass());
|
|
89
|
+
try {
|
|
90
|
+
exports.Config.loadSync();
|
|
91
|
+
}
|
|
92
|
+
catch (e) {
|
|
93
|
+
console.error('Error during loading config. Reverting to defaults.');
|
|
94
|
+
console.error('This is most likely due to: 1) you added a bad configuration in the server.json OR 2) The configuration changed in the latest release.');
|
|
95
|
+
console.error(e);
|
|
96
|
+
NotifocationManager_1.NotificationManager.error('Cant load config. Reverting to default. This is most likely due to: 1) you added a bad configuration in the server.json OR 2) The configuration changed in the latest release.', (e.toString ? e.toString() : JSON.stringify(e)));
|
|
97
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MessagingConfig = exports.EmailMessagingConfig = exports.EmailSMTPMessagingConfig = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-inferrable-types */
|
|
6
|
+
const common_1 = require("typeconfig/common");
|
|
7
|
+
const ClientConfig_1 = require("../public/ClientConfig");
|
|
8
|
+
if (typeof $localize === 'undefined') {
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
global.$localize = (s) => s;
|
|
12
|
+
}
|
|
13
|
+
let EmailSMTPMessagingConfig = class EmailSMTPMessagingConfig {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.host = '';
|
|
16
|
+
this.port = 587;
|
|
17
|
+
this.secure = false;
|
|
18
|
+
this.requireTLS = true;
|
|
19
|
+
this.user = '';
|
|
20
|
+
this.password = '';
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
tslib_1.__decorate([
|
|
24
|
+
(0, common_1.ConfigProperty)({
|
|
25
|
+
tags: {
|
|
26
|
+
name: $localize `Host`,
|
|
27
|
+
priority: ClientConfig_1.ConfigPriority.advanced,
|
|
28
|
+
hint: 'smtp.example.com'
|
|
29
|
+
},
|
|
30
|
+
description: $localize `SMTP host server`
|
|
31
|
+
}),
|
|
32
|
+
tslib_1.__metadata("design:type", String)
|
|
33
|
+
], EmailSMTPMessagingConfig.prototype, "host", void 0);
|
|
34
|
+
tslib_1.__decorate([
|
|
35
|
+
(0, common_1.ConfigProperty)({
|
|
36
|
+
tags: {
|
|
37
|
+
name: $localize `Port`,
|
|
38
|
+
priority: ClientConfig_1.ConfigPriority.advanced,
|
|
39
|
+
},
|
|
40
|
+
description: $localize `SMTP server's port`
|
|
41
|
+
}),
|
|
42
|
+
tslib_1.__metadata("design:type", Number)
|
|
43
|
+
], EmailSMTPMessagingConfig.prototype, "port", void 0);
|
|
44
|
+
tslib_1.__decorate([
|
|
45
|
+
(0, common_1.ConfigProperty)({
|
|
46
|
+
tags: {
|
|
47
|
+
name: $localize `isSecure`,
|
|
48
|
+
priority: ClientConfig_1.ConfigPriority.advanced,
|
|
49
|
+
},
|
|
50
|
+
description: $localize `Is the connection secure. See https://nodemailer.com/smtp/#tls-options for more details`
|
|
51
|
+
}),
|
|
52
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
53
|
+
], EmailSMTPMessagingConfig.prototype, "secure", void 0);
|
|
54
|
+
tslib_1.__decorate([
|
|
55
|
+
(0, common_1.ConfigProperty)({
|
|
56
|
+
tags: {
|
|
57
|
+
name: $localize `TLS required`,
|
|
58
|
+
priority: ClientConfig_1.ConfigPriority.advanced,
|
|
59
|
+
},
|
|
60
|
+
description: $localize `if this is true and secure is false then Nodemailer (used library in the background) tries to use STARTTLS. See https://nodemailer.com/smtp/#tls-options for more details`
|
|
61
|
+
}),
|
|
62
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
63
|
+
], EmailSMTPMessagingConfig.prototype, "requireTLS", void 0);
|
|
64
|
+
tslib_1.__decorate([
|
|
65
|
+
(0, common_1.ConfigProperty)({
|
|
66
|
+
tags: {
|
|
67
|
+
name: $localize `User`,
|
|
68
|
+
priority: ClientConfig_1.ConfigPriority.advanced,
|
|
69
|
+
},
|
|
70
|
+
description: $localize `User to connect to the SMTP server.`
|
|
71
|
+
}),
|
|
72
|
+
tslib_1.__metadata("design:type", String)
|
|
73
|
+
], EmailSMTPMessagingConfig.prototype, "user", void 0);
|
|
74
|
+
tslib_1.__decorate([
|
|
75
|
+
(0, common_1.ConfigProperty)({
|
|
76
|
+
tags: {
|
|
77
|
+
name: $localize `Password`,
|
|
78
|
+
priority: ClientConfig_1.ConfigPriority.advanced,
|
|
79
|
+
},
|
|
80
|
+
type: 'password',
|
|
81
|
+
description: $localize `Password to connect to the SMTP server.`
|
|
82
|
+
}),
|
|
83
|
+
tslib_1.__metadata("design:type", String)
|
|
84
|
+
], EmailSMTPMessagingConfig.prototype, "password", void 0);
|
|
85
|
+
EmailSMTPMessagingConfig = tslib_1.__decorate([
|
|
86
|
+
(0, common_1.SubConfigClass)({ softReadonly: true })
|
|
87
|
+
], EmailSMTPMessagingConfig);
|
|
88
|
+
exports.EmailSMTPMessagingConfig = EmailSMTPMessagingConfig;
|
|
89
|
+
let EmailMessagingConfig = class EmailMessagingConfig {
|
|
90
|
+
constructor() {
|
|
91
|
+
this.emailFrom = 'noreply@pigallery2.com';
|
|
92
|
+
this.smtp = new EmailSMTPMessagingConfig();
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
tslib_1.__decorate([
|
|
96
|
+
(0, common_1.ConfigProperty)({
|
|
97
|
+
tags: {
|
|
98
|
+
name: $localize `Sender email`,
|
|
99
|
+
priority: ClientConfig_1.ConfigPriority.advanced,
|
|
100
|
+
},
|
|
101
|
+
description: $localize `Some services do not allow sending from random e-mail addresses. Set this accordingly.`
|
|
102
|
+
}),
|
|
103
|
+
tslib_1.__metadata("design:type", String)
|
|
104
|
+
], EmailMessagingConfig.prototype, "emailFrom", void 0);
|
|
105
|
+
tslib_1.__decorate([
|
|
106
|
+
(0, common_1.ConfigProperty)({
|
|
107
|
+
tags: {
|
|
108
|
+
name: $localize `SMTP`,
|
|
109
|
+
}
|
|
110
|
+
}),
|
|
111
|
+
tslib_1.__metadata("design:type", EmailSMTPMessagingConfig)
|
|
112
|
+
], EmailMessagingConfig.prototype, "smtp", void 0);
|
|
113
|
+
EmailMessagingConfig = tslib_1.__decorate([
|
|
114
|
+
(0, common_1.SubConfigClass)({ softReadonly: true })
|
|
115
|
+
], EmailMessagingConfig);
|
|
116
|
+
exports.EmailMessagingConfig = EmailMessagingConfig;
|
|
117
|
+
let MessagingConfig = class MessagingConfig {
|
|
118
|
+
constructor() {
|
|
119
|
+
this.Email = new EmailMessagingConfig();
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
tslib_1.__decorate([
|
|
123
|
+
(0, common_1.ConfigProperty)({
|
|
124
|
+
tags: {
|
|
125
|
+
name: $localize `Email`,
|
|
126
|
+
},
|
|
127
|
+
description: $localize `The app uses Nodemailer in the background for sending e-mails. Refer to https://nodemailer.com/usage/ if some options are not clear.`
|
|
128
|
+
}),
|
|
129
|
+
tslib_1.__metadata("design:type", EmailMessagingConfig)
|
|
130
|
+
], MessagingConfig.prototype, "Email", void 0);
|
|
131
|
+
MessagingConfig = tslib_1.__decorate([
|
|
132
|
+
(0, common_1.SubConfigClass)({ softReadonly: true })
|
|
133
|
+
], MessagingConfig);
|
|
134
|
+
exports.MessagingConfig = MessagingConfig;
|