@ozdao/prometheus-framework 0.2.33 → 0.2.35
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/events.server.js +32 -0
- package/dist/events.server.mjs +32 -0
- package/dist/files.server.js +99 -78
- package/dist/files.server.mjs +99 -78
- package/dist/globals.server.js +0 -1
- package/dist/globals.server.mjs +0 -1
- package/dist/main.css +1 -1
- package/dist/node_modules/@ozdao/prometheus-framework/dist/_virtual/_commonjsHelpers.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/_virtual/_commonjsHelpers.js +6 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/_virtual/_plugin-vue_export-helper.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/_virtual/js.cookie.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/_virtual/js.cookie.js +4 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/node_modules/js-cookie/src/js.cookie.cjs +7 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/node_modules/js-cookie/src/js.cookie.js +97 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/node_modules/vue-select/dist/vue-select.es.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/node_modules/vue-select/dist/vue-select.es.js +173 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.js +337 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/@capacitor/preferences/dist/esm/index.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/@capacitor/preferences/dist/esm/index.js +7 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/@capacitor/preferences/dist/esm/web.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/@capacitor/preferences/dist/esm/web.js +54 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/adapters/adapters.cjs +3 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/adapters/adapters.js +51 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/adapters/xhr.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/adapters/xhr.js +109 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/axios.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/axios.js +47 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/cancel/CancelToken.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/cancel/CancelToken.js +73 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/cancel/CanceledError.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/cancel/CanceledError.js +11 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/cancel/isCancel.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/cancel/isCancel.js +6 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/Axios.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/Axios.js +117 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/AxiosError.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/AxiosError.js +54 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/AxiosHeaders.cjs +2 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/AxiosHeaders.js +165 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/InterceptorManager.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/InterceptorManager.js +59 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/buildFullPath.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/buildFullPath.js +8 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/dispatchRequest.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/dispatchRequest.js +31 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/mergeConfig.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/mergeConfig.js +72 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/settle.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/settle.js +14 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/transformData.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/core/transformData.js +13 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/defaults/index.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/defaults/index.js +88 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/defaults/transitional.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/defaults/transitional.js +8 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/env/data.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/env/data.js +4 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/AxiosURLSearchParams.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +33 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/HttpStatusCode.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/HttpStatusCode.js +72 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/bind.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/bind.js +8 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/buildURL.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/buildURL.js +19 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/combineURLs.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/combineURLs.js +6 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/cookies.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/cookies.js +32 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/formDataToJSON.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/formDataToJSON.js +30 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isAbsoluteURL.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isAbsoluteURL.js +6 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isAxiosError.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isAxiosError.js +7 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isURLSameOrigin.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/isURLSameOrigin.js +37 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/null.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/null.js +4 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/parseHeaders.cjs +2 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/parseHeaders.js +30 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/parseProtocol.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/parseProtocol.js +7 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/speedometer.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/speedometer.js +19 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/spread.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/spread.js +8 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/toFormData.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/toFormData.js +84 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/toURLEncodedForm.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/toURLEncodedForm.js +13 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/validator.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/helpers/validator.js +51 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/Blob.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/Blob.js +4 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/FormData.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/FormData.js +4 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/URLSearchParams.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +5 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/index.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/browser/index.js +15 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/common/utils.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/common/utils.js +7 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/index.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/platform/index.js +9 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/utils.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/node_modules/axios/lib/utils.js +224 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/auth/store/auth.js +44 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/auth/store/twofa.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/auth/store/twofa.js +19 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/community/store/blogposts.js +38 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/community/store/reactions.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/community/store/reactions.js +16 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/events/store/events.js +42 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +22 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/globals/store/globals.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/globals/store/globals.js +59 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/navigation/IconChevronRight.vue.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/navigation/IconChevronRight.vue.js +28 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/dribbble.vue.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/dribbble.vue.js +21 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/facebook.vue.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/facebook.vue.js +21 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/instagram.vue.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/instagram.vue.js +21 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/line.vue.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/line.vue.js +23 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/reddit.vue.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/reddit.vue.js +21 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/telegram.vue.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/telegram.vue.js +29 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/twitter.vue.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/icons/socials/twitter.vue.js +21 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.js +3 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/middlewares/client/inputs.validation.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/middlewares/client/inputs.validation.js +35 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/mobile/components/Menu/MenuItem.vue.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/mobile/components/Menu/MenuItem.vue.js +60 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.js +80 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/departments.js +34 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/invites.js +17 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/memberships.js +16 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/organizations/store/organizations.js +42 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/products/store/categories.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/products/store/categories.js +20 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/products/store/products.js +28 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/reports/store/reports.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/reports/store/reports.js +28 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/spots/store/spots.cjs +1 -0
- package/dist/node_modules/@ozdao/prometheus-framework/dist/prometheus-framework/src/modules/spots/store/spots.js +34 -0
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +2 -61
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.js +61 -2
- package/dist/prometheus-framework/src/components/Countdown/Countdown.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Countdown/Countdown.vue.js +62 -0
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +49 -2
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +2 -49
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +42 -34
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +2 -70
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +70 -2
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +2 -93
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +93 -2
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +99 -2
- package/dist/prometheus-framework/src/components/Upload/Upload.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Upload/Upload.vue2.js +2 -73
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +30 -28
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +25 -24
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -65
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +65 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +381 -140
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +4 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +122 -48
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +116 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue2.js +4 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionLineup.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionLineup.vue.js +29 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.cjs +3 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.js +117 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue2.js +4 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js +108 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionSpecialGuests.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionSpecialGuests.vue.js +70 -0
- package/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/store/events.js +20 -16
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +2 -11
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +11 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +14 -14
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +58 -55
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +3 -3
- package/dist/prometheus-framework.cjs.js +19 -19
- package/dist/prometheus-framework.es.js +390 -376
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/modules/events/components/pages/EditEvent.vue +20 -5
- package/src/modules/events/components/pages/Event.vue +5 -2
- package/src/modules/events/components/sections/SectionPreviousEvents.vue +1 -1
- package/src/modules/events/models/event.model.js +2 -1
- package/src/modules/marketplace/components/pages/Catalog.vue +1 -0
- package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
- package/src/modules/users/components/pages/Profile.vue +1 -1
package/dist/events.server.js
CHANGED
@@ -163,6 +163,8 @@ function getProjectStage() {
|
|
163
163
|
date: 1,
|
164
164
|
numberOfTickets: 1,
|
165
165
|
participantsPhotos: 1,
|
166
|
+
special: 1,
|
167
|
+
specialData: 1,
|
166
168
|
hasTicket: 1,
|
167
169
|
tickets: 1,
|
168
170
|
createdAt: 1
|
@@ -290,6 +292,7 @@ const middlewareFactory = (db) => {
|
|
290
292
|
}
|
291
293
|
};
|
292
294
|
const update = async (req, res) => {
|
295
|
+
console.log(req.body);
|
293
296
|
try {
|
294
297
|
const event = await Event.findOneAndUpdate({ url: req.body.url }, { $set: req.body }, { new: true }).exec();
|
295
298
|
if (!event) {
|
@@ -555,6 +558,35 @@ var event_model = (db) => {
|
|
555
558
|
end: {
|
556
559
|
type: Date
|
557
560
|
}
|
561
|
+
},
|
562
|
+
specialData: {
|
563
|
+
type: Object,
|
564
|
+
default: () => ({
|
565
|
+
subtitle: "NMS Presents",
|
566
|
+
ticketPrice: "499",
|
567
|
+
ticketImage: null,
|
568
|
+
ticketLinkStripe: null,
|
569
|
+
video: null,
|
570
|
+
guests: [],
|
571
|
+
guestVideo: null,
|
572
|
+
guestTitle: null,
|
573
|
+
guestDescription: null,
|
574
|
+
guestFacebook: null,
|
575
|
+
guestInstagram: null,
|
576
|
+
guestTelegram: null,
|
577
|
+
guestTwitter: null,
|
578
|
+
guestSoundcloud: null,
|
579
|
+
guestSpotify: null,
|
580
|
+
logos: [],
|
581
|
+
lineup: [],
|
582
|
+
lineupBackground: null,
|
583
|
+
previousVideo: null
|
584
|
+
})
|
585
|
+
},
|
586
|
+
// Adding special boolean property
|
587
|
+
special: {
|
588
|
+
type: Boolean,
|
589
|
+
default: false
|
558
590
|
}
|
559
591
|
}, {
|
560
592
|
timestamps: {
|
package/dist/events.server.mjs
CHANGED
@@ -161,6 +161,8 @@ function getProjectStage() {
|
|
161
161
|
date: 1,
|
162
162
|
numberOfTickets: 1,
|
163
163
|
participantsPhotos: 1,
|
164
|
+
special: 1,
|
165
|
+
specialData: 1,
|
164
166
|
hasTicket: 1,
|
165
167
|
tickets: 1,
|
166
168
|
createdAt: 1
|
@@ -288,6 +290,7 @@ const middlewareFactory = (db) => {
|
|
288
290
|
}
|
289
291
|
};
|
290
292
|
const update = async (req, res) => {
|
293
|
+
console.log(req.body);
|
291
294
|
try {
|
292
295
|
const event = await Event.findOneAndUpdate({ url: req.body.url }, { $set: req.body }, { new: true }).exec();
|
293
296
|
if (!event) {
|
@@ -553,6 +556,35 @@ var event_model = (db) => {
|
|
553
556
|
end: {
|
554
557
|
type: Date
|
555
558
|
}
|
559
|
+
},
|
560
|
+
specialData: {
|
561
|
+
type: Object,
|
562
|
+
default: () => ({
|
563
|
+
subtitle: "NMS Presents",
|
564
|
+
ticketPrice: "499",
|
565
|
+
ticketImage: null,
|
566
|
+
ticketLinkStripe: null,
|
567
|
+
video: null,
|
568
|
+
guests: [],
|
569
|
+
guestVideo: null,
|
570
|
+
guestTitle: null,
|
571
|
+
guestDescription: null,
|
572
|
+
guestFacebook: null,
|
573
|
+
guestInstagram: null,
|
574
|
+
guestTelegram: null,
|
575
|
+
guestTwitter: null,
|
576
|
+
guestSoundcloud: null,
|
577
|
+
guestSpotify: null,
|
578
|
+
logos: [],
|
579
|
+
lineup: [],
|
580
|
+
lineupBackground: null,
|
581
|
+
previousVideo: null
|
582
|
+
})
|
583
|
+
},
|
584
|
+
// Adding special boolean property
|
585
|
+
special: {
|
586
|
+
type: Boolean,
|
587
|
+
default: false
|
556
588
|
}
|
557
589
|
}, {
|
558
590
|
timestamps: {
|
package/dist/files.server.js
CHANGED
@@ -5,13 +5,14 @@ const index = require("./index-a8dffc0c.js");
|
|
5
5
|
const require$$0$1 = require("sharp");
|
6
6
|
const require$$1 = require("fs");
|
7
7
|
const require$$2 = require("fs/promises");
|
8
|
-
require("
|
9
|
-
const require$$5 = require("busboy");
|
8
|
+
const require$$4 = require("busboy");
|
10
9
|
require("jsonwebtoken");
|
11
10
|
require("mongodb");
|
12
11
|
const path = require$$0;
|
13
12
|
const controllerFactory$1 = (db, publicPath) => {
|
14
13
|
const uploadMultipleFileController = async (req, res, next) => {
|
14
|
+
console.log("uploadMultipleFileController called");
|
15
|
+
console.log("Files received:", req.files ? req.files.length : 0);
|
15
16
|
if (!req.files || req.files.length === 0) {
|
16
17
|
return res.status(400).send({ message: "No files uploaded." });
|
17
18
|
}
|
@@ -45,98 +46,119 @@ function requireMiddlewareBusboy() {
|
|
45
46
|
const fs = require$$1;
|
46
47
|
const fsp = require$$2;
|
47
48
|
const path2 = require$$0;
|
48
|
-
const busboy = require$$
|
49
|
+
const busboy = require$$4;
|
49
50
|
const createThumbnail = async (originalPath) => {
|
50
51
|
const thumbnailPath = path2.join(
|
51
52
|
path2.dirname(originalPath),
|
52
53
|
"thumbnail_" + path2.basename(originalPath)
|
53
54
|
);
|
54
55
|
try {
|
55
|
-
await sharp(originalPath).
|
56
|
+
const metadata = await sharp(originalPath).metadata();
|
57
|
+
const resizeOptions = {};
|
58
|
+
if (metadata.width > 800) {
|
59
|
+
resizeOptions.width = 800;
|
60
|
+
}
|
61
|
+
await sharp(originalPath).rotate().resize(resizeOptions).toFile(thumbnailPath);
|
56
62
|
} catch (error) {
|
57
63
|
console.error("Error creating thumbnail:", error);
|
64
|
+
throw error;
|
58
65
|
}
|
59
66
|
};
|
67
|
+
const handleFileUpload = (req, res, next, publicPath, { folderNameDefault = "unsorted", maxSize = 10 * 1024 * 1024, allowedTypes = null }) => {
|
68
|
+
console.log("handleFileUpload middleware called");
|
69
|
+
console.log("Options:" + folderNameDefault + maxSize + allowedTypes);
|
70
|
+
let folderName = req.query.folderName || folderNameDefault;
|
71
|
+
folderName = decodeURIComponent(folderName);
|
72
|
+
folderName = folderName.startsWith("/") ? folderName : "/" + folderName;
|
73
|
+
const filePath = path2.join(publicPath, folderName);
|
74
|
+
let files = [];
|
75
|
+
let filesWrongSize = [];
|
76
|
+
let filesWrongType = [];
|
77
|
+
let fileProcessingPromises = [];
|
78
|
+
const bb = busboy({
|
79
|
+
headers: req.headers,
|
80
|
+
limits: { fileSize: maxSize }
|
81
|
+
});
|
82
|
+
bb.on("file", (name, file, info) => {
|
83
|
+
console.log(`Received file: ${info.filename}, Type: ${info.mimeType}`);
|
84
|
+
const isValidType = !allowedTypes || allowedTypes.includes(info.mimeType);
|
85
|
+
if (!isValidType) {
|
86
|
+
console.log(`File of wrong type: ${info.filename}`);
|
87
|
+
filesWrongType.push(info.filename);
|
88
|
+
file.resume();
|
89
|
+
return;
|
90
|
+
}
|
91
|
+
const fileName = `${Math.floor(Math.random() * 1e4)}-${info.filename}`;
|
92
|
+
const fileFullPath = path2.join(filePath, fileName);
|
93
|
+
const fileProcess = fsp.mkdir(path2.dirname(fileFullPath), { recursive: true }).then(() => new Promise((resolve, reject) => {
|
94
|
+
const stream = file.pipe(fs.createWriteStream(fileFullPath));
|
95
|
+
stream.on("finish", () => {
|
96
|
+
files.push(path2.relative(publicPath, fileFullPath));
|
97
|
+
resolve();
|
98
|
+
});
|
99
|
+
stream.on("error", reject);
|
100
|
+
}));
|
101
|
+
fileProcessingPromises.push(fileProcess);
|
102
|
+
file.on("limit", () => {
|
103
|
+
filesWrongSize.push(info.filename);
|
104
|
+
fsp.unlink(fileFullPath).catch((err) => console.error(`Error deleting oversized file: ${err.message}`));
|
105
|
+
});
|
106
|
+
});
|
107
|
+
bb.on("finish", () => {
|
108
|
+
Promise.all(fileProcessingPromises).then(() => {
|
109
|
+
console.log(`Upload finished. Files: ${files.length}, Wrong Size: ${filesWrongSize.length}, Wrong Type: ${filesWrongType.length}`);
|
110
|
+
req.files = files;
|
111
|
+
if (files.length === 0 && (filesWrongSize.length > 0 || filesWrongType.length > 0)) {
|
112
|
+
let errorMessage = "No files uploaded.";
|
113
|
+
if (filesWrongSize.length > 0) {
|
114
|
+
errorMessage += " Some files were too large.";
|
115
|
+
}
|
116
|
+
if (filesWrongType.length > 0) {
|
117
|
+
errorMessage += " Some files were of an unsupported type.";
|
118
|
+
}
|
119
|
+
return res.status(400).json({ message: errorMessage });
|
120
|
+
}
|
121
|
+
next();
|
122
|
+
}).catch((error) => {
|
123
|
+
console.error("Failed processing one or more files", error);
|
124
|
+
res.status(500).json({ message: "Error processing files" });
|
125
|
+
});
|
126
|
+
});
|
127
|
+
req.pipe(bb);
|
128
|
+
};
|
60
129
|
const middlewareFactory = (db, publicPath) => {
|
61
130
|
const generatePreviewMiddleware = async (req, res, next) => {
|
62
|
-
const files = req.
|
131
|
+
const files = req.files;
|
63
132
|
try {
|
64
|
-
await Promise.all(files.map((file) => createThumbnail(file)));
|
133
|
+
await Promise.all(files.map((file) => createThumbnail(path2.join(publicPath, file))));
|
65
134
|
} catch (error) {
|
66
135
|
console.error("Error generating previews:", error);
|
136
|
+
return res.status(500).json({ message: "Internal server error while generating previews." });
|
67
137
|
}
|
68
138
|
next();
|
69
139
|
};
|
70
|
-
const
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
next(err);
|
89
|
-
});
|
90
|
-
let fileFullPath;
|
91
|
-
bb.on("file", (name2, file, info) => {
|
92
|
-
if (info.filename.length > 0) {
|
93
|
-
file.resume();
|
94
|
-
}
|
95
|
-
if (info.mimeType != "image/png" && info.mimeType != "image/jpeg" && info.mimeType != "image/gif") {
|
96
|
-
filesWrongType.push(info.filename);
|
97
|
-
file.resume();
|
98
|
-
}
|
99
|
-
let fileName = `${Math.floor(Math.random() * 1e4)}-${info.filename}`;
|
100
|
-
fileFullPath = path2.join(filePath, fileName);
|
101
|
-
fileRelativePath = path2.join(folderName, fileName);
|
102
|
-
filePromise = new Promise((resolve, reject) => {
|
103
|
-
const writeStream = fs.createWriteStream(fileFullPath).on("error", reject).on("finish", resolve);
|
104
|
-
file.on("error", reject);
|
105
|
-
file.pipe(writeStream);
|
106
|
-
});
|
107
|
-
files.push(fileFullPath);
|
108
|
-
file.on("limit", () => {
|
109
|
-
filesWrongSize.push(info.filename);
|
110
|
-
fsp.unlink(fileFullPath);
|
111
|
-
const index2 = files.indexOf(fileFullPath);
|
112
|
-
if (index2 !== -1) {
|
113
|
-
files.splice(index2, 1);
|
114
|
-
}
|
115
|
-
file.resume();
|
116
|
-
});
|
117
|
-
});
|
118
|
-
bb.on("close", async () => {
|
119
|
-
try {
|
120
|
-
if (!filePromise) {
|
121
|
-
res.status(400).json({ message: `Uploaded file '${name}' is missing` });
|
122
|
-
return;
|
123
|
-
}
|
124
|
-
await filePromise;
|
125
|
-
req.files = files;
|
126
|
-
next();
|
127
|
-
} catch (err) {
|
128
|
-
next(err);
|
129
|
-
} finally {
|
130
|
-
bb.removeAllListeners();
|
131
|
-
}
|
132
|
-
});
|
133
|
-
req.pipe(bb);
|
134
|
-
} catch (err) {
|
135
|
-
res.status(400).json({ message: `Could not retrieve file from request - ${err.message}` });
|
136
|
-
}
|
140
|
+
const uploadFilesMiddleware = (req, res, next) => {
|
141
|
+
const allowedTypes = [
|
142
|
+
"image/png",
|
143
|
+
"image/jpeg",
|
144
|
+
"image/jpg",
|
145
|
+
"image/gif",
|
146
|
+
"application/pdf",
|
147
|
+
"image/svg+xml",
|
148
|
+
"video/mp4",
|
149
|
+
"video/quicktime",
|
150
|
+
// MOV
|
151
|
+
"video/webm"
|
152
|
+
];
|
153
|
+
handleFileUpload(req, res, next, publicPath, { folderNameDefault: "unsorted", maxSize: 10 * 1024 * 1024, allowedTypes });
|
154
|
+
};
|
155
|
+
const uploadImagesMiddleware = (req, res, next) => {
|
156
|
+
const allowedTypes = ["image/png", "image/jpeg", "image/jpg", "image/gif"];
|
157
|
+
handleFileUpload(req, res, next, publicPath, { folderNameDefault: "unsorted", maxSize: 10 * 1024 * 1024, allowedTypes });
|
137
158
|
};
|
138
159
|
return {
|
139
|
-
|
160
|
+
uploadImagesMiddleware,
|
161
|
+
uploadFilesMiddleware,
|
140
162
|
generatePreviewMiddleware
|
141
163
|
};
|
142
164
|
};
|
@@ -169,7 +191,7 @@ var files_routes = function(app, db, origins, publicPath) {
|
|
169
191
|
app.post(
|
170
192
|
"/api/upload/image",
|
171
193
|
[
|
172
|
-
middlewareBusboy2.
|
194
|
+
middlewareBusboy2.uploadImagesMiddleware,
|
173
195
|
middlewareBusboy2.generatePreviewMiddleware
|
174
196
|
],
|
175
197
|
controller.uploadMultipleFileController
|
@@ -177,15 +199,14 @@ var files_routes = function(app, db, origins, publicPath) {
|
|
177
199
|
app.post(
|
178
200
|
"/api/upload/file",
|
179
201
|
[
|
180
|
-
middlewareBusboy2.
|
181
|
-
middlewareBusboy2.generatePreviewMiddleware
|
202
|
+
middlewareBusboy2.uploadFilesMiddleware
|
182
203
|
],
|
183
204
|
controller.uploadMultipleFileController
|
184
205
|
);
|
185
206
|
app.post(
|
186
207
|
"/api/upload/multiple",
|
187
208
|
[
|
188
|
-
middlewareBusboy2.
|
209
|
+
middlewareBusboy2.uploadImagesMiddleware,
|
189
210
|
middlewareBusboy2.generatePreviewMiddleware
|
190
211
|
],
|
191
212
|
controller.uploadMultipleFileController
|
package/dist/files.server.mjs
CHANGED
@@ -4,13 +4,14 @@ import { s as server$1 } from "./index-d769324d.mjs";
|
|
4
4
|
import require$$0$1 from "sharp";
|
5
5
|
import require$$1 from "fs";
|
6
6
|
import require$$2 from "fs/promises";
|
7
|
-
import "
|
8
|
-
import require$$5 from "busboy";
|
7
|
+
import require$$4 from "busboy";
|
9
8
|
import "jsonwebtoken";
|
10
9
|
import "mongodb";
|
11
10
|
const path = require$$0;
|
12
11
|
const controllerFactory$1 = (db, publicPath) => {
|
13
12
|
const uploadMultipleFileController = async (req, res, next) => {
|
13
|
+
console.log("uploadMultipleFileController called");
|
14
|
+
console.log("Files received:", req.files ? req.files.length : 0);
|
14
15
|
if (!req.files || req.files.length === 0) {
|
15
16
|
return res.status(400).send({ message: "No files uploaded." });
|
16
17
|
}
|
@@ -44,98 +45,119 @@ function requireMiddlewareBusboy() {
|
|
44
45
|
const fs = require$$1;
|
45
46
|
const fsp = require$$2;
|
46
47
|
const path2 = require$$0;
|
47
|
-
const busboy = require$$
|
48
|
+
const busboy = require$$4;
|
48
49
|
const createThumbnail = async (originalPath) => {
|
49
50
|
const thumbnailPath = path2.join(
|
50
51
|
path2.dirname(originalPath),
|
51
52
|
"thumbnail_" + path2.basename(originalPath)
|
52
53
|
);
|
53
54
|
try {
|
54
|
-
await sharp(originalPath).
|
55
|
+
const metadata = await sharp(originalPath).metadata();
|
56
|
+
const resizeOptions = {};
|
57
|
+
if (metadata.width > 800) {
|
58
|
+
resizeOptions.width = 800;
|
59
|
+
}
|
60
|
+
await sharp(originalPath).rotate().resize(resizeOptions).toFile(thumbnailPath);
|
55
61
|
} catch (error) {
|
56
62
|
console.error("Error creating thumbnail:", error);
|
63
|
+
throw error;
|
57
64
|
}
|
58
65
|
};
|
66
|
+
const handleFileUpload = (req, res, next, publicPath, { folderNameDefault = "unsorted", maxSize = 10 * 1024 * 1024, allowedTypes = null }) => {
|
67
|
+
console.log("handleFileUpload middleware called");
|
68
|
+
console.log("Options:" + folderNameDefault + maxSize + allowedTypes);
|
69
|
+
let folderName = req.query.folderName || folderNameDefault;
|
70
|
+
folderName = decodeURIComponent(folderName);
|
71
|
+
folderName = folderName.startsWith("/") ? folderName : "/" + folderName;
|
72
|
+
const filePath = path2.join(publicPath, folderName);
|
73
|
+
let files = [];
|
74
|
+
let filesWrongSize = [];
|
75
|
+
let filesWrongType = [];
|
76
|
+
let fileProcessingPromises = [];
|
77
|
+
const bb = busboy({
|
78
|
+
headers: req.headers,
|
79
|
+
limits: { fileSize: maxSize }
|
80
|
+
});
|
81
|
+
bb.on("file", (name, file, info) => {
|
82
|
+
console.log(`Received file: ${info.filename}, Type: ${info.mimeType}`);
|
83
|
+
const isValidType = !allowedTypes || allowedTypes.includes(info.mimeType);
|
84
|
+
if (!isValidType) {
|
85
|
+
console.log(`File of wrong type: ${info.filename}`);
|
86
|
+
filesWrongType.push(info.filename);
|
87
|
+
file.resume();
|
88
|
+
return;
|
89
|
+
}
|
90
|
+
const fileName = `${Math.floor(Math.random() * 1e4)}-${info.filename}`;
|
91
|
+
const fileFullPath = path2.join(filePath, fileName);
|
92
|
+
const fileProcess = fsp.mkdir(path2.dirname(fileFullPath), { recursive: true }).then(() => new Promise((resolve, reject) => {
|
93
|
+
const stream = file.pipe(fs.createWriteStream(fileFullPath));
|
94
|
+
stream.on("finish", () => {
|
95
|
+
files.push(path2.relative(publicPath, fileFullPath));
|
96
|
+
resolve();
|
97
|
+
});
|
98
|
+
stream.on("error", reject);
|
99
|
+
}));
|
100
|
+
fileProcessingPromises.push(fileProcess);
|
101
|
+
file.on("limit", () => {
|
102
|
+
filesWrongSize.push(info.filename);
|
103
|
+
fsp.unlink(fileFullPath).catch((err) => console.error(`Error deleting oversized file: ${err.message}`));
|
104
|
+
});
|
105
|
+
});
|
106
|
+
bb.on("finish", () => {
|
107
|
+
Promise.all(fileProcessingPromises).then(() => {
|
108
|
+
console.log(`Upload finished. Files: ${files.length}, Wrong Size: ${filesWrongSize.length}, Wrong Type: ${filesWrongType.length}`);
|
109
|
+
req.files = files;
|
110
|
+
if (files.length === 0 && (filesWrongSize.length > 0 || filesWrongType.length > 0)) {
|
111
|
+
let errorMessage = "No files uploaded.";
|
112
|
+
if (filesWrongSize.length > 0) {
|
113
|
+
errorMessage += " Some files were too large.";
|
114
|
+
}
|
115
|
+
if (filesWrongType.length > 0) {
|
116
|
+
errorMessage += " Some files were of an unsupported type.";
|
117
|
+
}
|
118
|
+
return res.status(400).json({ message: errorMessage });
|
119
|
+
}
|
120
|
+
next();
|
121
|
+
}).catch((error) => {
|
122
|
+
console.error("Failed processing one or more files", error);
|
123
|
+
res.status(500).json({ message: "Error processing files" });
|
124
|
+
});
|
125
|
+
});
|
126
|
+
req.pipe(bb);
|
127
|
+
};
|
59
128
|
const middlewareFactory = (db, publicPath) => {
|
60
129
|
const generatePreviewMiddleware = async (req, res, next) => {
|
61
|
-
const files = req.
|
130
|
+
const files = req.files;
|
62
131
|
try {
|
63
|
-
await Promise.all(files.map((file) => createThumbnail(file)));
|
132
|
+
await Promise.all(files.map((file) => createThumbnail(path2.join(publicPath, file))));
|
64
133
|
} catch (error) {
|
65
134
|
console.error("Error generating previews:", error);
|
135
|
+
return res.status(500).json({ message: "Internal server error while generating previews." });
|
66
136
|
}
|
67
137
|
next();
|
68
138
|
};
|
69
|
-
const
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
next(err);
|
88
|
-
});
|
89
|
-
let fileFullPath;
|
90
|
-
bb.on("file", (name2, file, info) => {
|
91
|
-
if (info.filename.length > 0) {
|
92
|
-
file.resume();
|
93
|
-
}
|
94
|
-
if (info.mimeType != "image/png" && info.mimeType != "image/jpeg" && info.mimeType != "image/gif") {
|
95
|
-
filesWrongType.push(info.filename);
|
96
|
-
file.resume();
|
97
|
-
}
|
98
|
-
let fileName = `${Math.floor(Math.random() * 1e4)}-${info.filename}`;
|
99
|
-
fileFullPath = path2.join(filePath, fileName);
|
100
|
-
fileRelativePath = path2.join(folderName, fileName);
|
101
|
-
filePromise = new Promise((resolve, reject) => {
|
102
|
-
const writeStream = fs.createWriteStream(fileFullPath).on("error", reject).on("finish", resolve);
|
103
|
-
file.on("error", reject);
|
104
|
-
file.pipe(writeStream);
|
105
|
-
});
|
106
|
-
files.push(fileFullPath);
|
107
|
-
file.on("limit", () => {
|
108
|
-
filesWrongSize.push(info.filename);
|
109
|
-
fsp.unlink(fileFullPath);
|
110
|
-
const index = files.indexOf(fileFullPath);
|
111
|
-
if (index !== -1) {
|
112
|
-
files.splice(index, 1);
|
113
|
-
}
|
114
|
-
file.resume();
|
115
|
-
});
|
116
|
-
});
|
117
|
-
bb.on("close", async () => {
|
118
|
-
try {
|
119
|
-
if (!filePromise) {
|
120
|
-
res.status(400).json({ message: `Uploaded file '${name}' is missing` });
|
121
|
-
return;
|
122
|
-
}
|
123
|
-
await filePromise;
|
124
|
-
req.files = files;
|
125
|
-
next();
|
126
|
-
} catch (err) {
|
127
|
-
next(err);
|
128
|
-
} finally {
|
129
|
-
bb.removeAllListeners();
|
130
|
-
}
|
131
|
-
});
|
132
|
-
req.pipe(bb);
|
133
|
-
} catch (err) {
|
134
|
-
res.status(400).json({ message: `Could not retrieve file from request - ${err.message}` });
|
135
|
-
}
|
139
|
+
const uploadFilesMiddleware = (req, res, next) => {
|
140
|
+
const allowedTypes = [
|
141
|
+
"image/png",
|
142
|
+
"image/jpeg",
|
143
|
+
"image/jpg",
|
144
|
+
"image/gif",
|
145
|
+
"application/pdf",
|
146
|
+
"image/svg+xml",
|
147
|
+
"video/mp4",
|
148
|
+
"video/quicktime",
|
149
|
+
// MOV
|
150
|
+
"video/webm"
|
151
|
+
];
|
152
|
+
handleFileUpload(req, res, next, publicPath, { folderNameDefault: "unsorted", maxSize: 10 * 1024 * 1024, allowedTypes });
|
153
|
+
};
|
154
|
+
const uploadImagesMiddleware = (req, res, next) => {
|
155
|
+
const allowedTypes = ["image/png", "image/jpeg", "image/jpg", "image/gif"];
|
156
|
+
handleFileUpload(req, res, next, publicPath, { folderNameDefault: "unsorted", maxSize: 10 * 1024 * 1024, allowedTypes });
|
136
157
|
};
|
137
158
|
return {
|
138
|
-
|
159
|
+
uploadImagesMiddleware,
|
160
|
+
uploadFilesMiddleware,
|
139
161
|
generatePreviewMiddleware
|
140
162
|
};
|
141
163
|
};
|
@@ -168,7 +190,7 @@ var files_routes = function(app, db, origins, publicPath) {
|
|
168
190
|
app.post(
|
169
191
|
"/api/upload/image",
|
170
192
|
[
|
171
|
-
middlewareBusboy2.
|
193
|
+
middlewareBusboy2.uploadImagesMiddleware,
|
172
194
|
middlewareBusboy2.generatePreviewMiddleware
|
173
195
|
],
|
174
196
|
controller.uploadMultipleFileController
|
@@ -176,15 +198,14 @@ var files_routes = function(app, db, origins, publicPath) {
|
|
176
198
|
app.post(
|
177
199
|
"/api/upload/file",
|
178
200
|
[
|
179
|
-
middlewareBusboy2.
|
180
|
-
middlewareBusboy2.generatePreviewMiddleware
|
201
|
+
middlewareBusboy2.uploadFilesMiddleware
|
181
202
|
],
|
182
203
|
controller.uploadMultipleFileController
|
183
204
|
);
|
184
205
|
app.post(
|
185
206
|
"/api/upload/multiple",
|
186
207
|
[
|
187
|
-
middlewareBusboy2.
|
208
|
+
middlewareBusboy2.uploadImagesMiddleware,
|
188
209
|
middlewareBusboy2.generatePreviewMiddleware
|
189
210
|
],
|
190
211
|
controller.uploadMultipleFileController
|
package/dist/globals.server.js
CHANGED