@payloadcms/next 3.0.0-beta.90 → 3.0.0-beta.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/withPayload.js +111 -0
- package/dist/cjs/withPayload.js.map +1 -0
- package/dist/config.js +0 -1
- package/dist/config.js.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/ShouldRenderTabs.js +15 -9
- package/dist/elements/DocumentHeader/Tabs/ShouldRenderTabs.js.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/Tab/TabLink.js +100 -35
- package/dist/elements/DocumentHeader/Tabs/Tab/TabLink.js.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/Tab/index.js +74 -63
- package/dist/elements/DocumentHeader/Tabs/Tab/index.js.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/getCustomViews.js +31 -35
- package/dist/elements/DocumentHeader/Tabs/getCustomViews.js.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/getViewConfig.js +15 -12
- package/dist/elements/DocumentHeader/Tabs/getViewConfig.js.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/index.js +86 -79
- package/dist/elements/DocumentHeader/Tabs/index.js.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/tabs/VersionsPill/index.js +32 -13
- package/dist/elements/DocumentHeader/Tabs/tabs/VersionsPill/index.js.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/tabs/index.js +60 -52
- package/dist/elements/DocumentHeader/Tabs/tabs/index.js.map +1 -1
- package/dist/elements/DocumentHeader/index.js +24 -23
- package/dist/elements/DocumentHeader/index.js.map +1 -1
- package/dist/elements/EmailAndUsername/index.js +107 -75
- package/dist/elements/EmailAndUsername/index.js.map +1 -1
- package/dist/elements/LeaveWithoutSaving/index.js +150 -83
- package/dist/elements/LeaveWithoutSaving/index.js.map +1 -1
- package/dist/elements/LeaveWithoutSaving/usePreventLeave.d.ts.map +1 -1
- package/dist/elements/LeaveWithoutSaving/usePreventLeave.js +119 -101
- package/dist/elements/LeaveWithoutSaving/usePreventLeave.js.map +1 -1
- package/dist/elements/Logo/index.js +36 -21
- package/dist/elements/Logo/index.js.map +1 -1
- package/dist/elements/Nav/NavHamburger/index.js +41 -13
- package/dist/elements/Nav/NavHamburger/index.js.map +1 -1
- package/dist/elements/Nav/NavWrapper/index.js +48 -16
- package/dist/elements/Nav/NavWrapper/index.js.map +1 -1
- package/dist/elements/Nav/index.client.js +149 -76
- package/dist/elements/Nav/index.client.js.map +1 -1
- package/dist/elements/Nav/index.js +56 -50
- package/dist/elements/Nav/index.js.map +1 -1
- package/dist/exports/layouts.js +0 -1
- package/dist/exports/layouts.js.map +1 -1
- package/dist/exports/routes.js +0 -1
- package/dist/exports/routes.js.map +1 -1
- package/dist/exports/templates.js +0 -1
- package/dist/exports/templates.js.map +1 -1
- package/dist/exports/utilities.js +0 -1
- package/dist/exports/utilities.js.map +1 -1
- package/dist/exports/views.js +0 -1
- package/dist/exports/views.js.map +1 -1
- package/dist/fetchAPI-multipart/fileFactory.js +35 -34
- package/dist/fetchAPI-multipart/fileFactory.js.map +1 -1
- package/dist/fetchAPI-multipart/handlers.js +77 -78
- package/dist/fetchAPI-multipart/handlers.js.map +1 -1
- package/dist/fetchAPI-multipart/index.js +33 -31
- package/dist/fetchAPI-multipart/index.js.map +1 -1
- package/dist/fetchAPI-multipart/isEligibleRequest.js +13 -21
- package/dist/fetchAPI-multipart/isEligibleRequest.js.map +1 -1
- package/dist/fetchAPI-multipart/processMultipart.js +158 -141
- package/dist/fetchAPI-multipart/processMultipart.js.map +1 -1
- package/dist/fetchAPI-multipart/processNested.js +23 -21
- package/dist/fetchAPI-multipart/processNested.js.map +1 -1
- package/dist/fetchAPI-multipart/uploadTimer.js +16 -17
- package/dist/fetchAPI-multipart/uploadTimer.js.map +1 -1
- package/dist/fetchAPI-multipart/utilities.js +166 -166
- package/dist/fetchAPI-multipart/utilities.js.map +1 -1
- package/dist/fetchAPI-stream-file/index.js +19 -17
- package/dist/fetchAPI-stream-file/index.js.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/layouts/Root/index.js +118 -115
- package/dist/layouts/Root/index.js.map +1 -1
- package/dist/prod/styles.css +1 -1
- package/dist/routes/graphql/handler.js +109 -103
- package/dist/routes/graphql/handler.js.map +1 -1
- package/dist/routes/graphql/index.js +0 -1
- package/dist/routes/graphql/index.js.map +1 -1
- package/dist/routes/graphql/playground.js +23 -24
- package/dist/routes/graphql/playground.js.map +1 -1
- package/dist/routes/index.js +0 -1
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/rest/auth/access.js +22 -21
- package/dist/routes/rest/auth/access.js.map +1 -1
- package/dist/routes/rest/auth/forgotPassword.js +29 -25
- package/dist/routes/rest/auth/forgotPassword.js.map +1 -1
- package/dist/routes/rest/auth/init.js +16 -14
- package/dist/routes/rest/auth/init.js.map +1 -1
- package/dist/routes/rest/auth/login.js +43 -38
- package/dist/routes/rest/auth/login.js.map +1 -1
- package/dist/routes/rest/auth/logout.js +31 -27
- package/dist/routes/rest/auth/logout.js.map +1 -1
- package/dist/routes/rest/auth/me.js +23 -21
- package/dist/routes/rest/auth/me.js.map +1 -1
- package/dist/routes/rest/auth/refresh.js +31 -27
- package/dist/routes/rest/auth/refresh.js.map +1 -1
- package/dist/routes/rest/auth/registerFirstUser.js +43 -38
- package/dist/routes/rest/auth/registerFirstUser.js.map +1 -1
- package/dist/routes/rest/auth/resetPassword.js +38 -33
- package/dist/routes/rest/auth/resetPassword.js.map +1 -1
- package/dist/routes/rest/auth/unlock.js +27 -23
- package/dist/routes/rest/auth/unlock.js.map +1 -1
- package/dist/routes/rest/auth/verifyEmail.js +22 -17
- package/dist/routes/rest/auth/verifyEmail.js.map +1 -1
- package/dist/routes/rest/buildFormState.js +38 -37
- package/dist/routes/rest/buildFormState.js.map +1 -1
- package/dist/routes/rest/checkEndpoints.js +11 -9
- package/dist/routes/rest/checkEndpoints.js.map +1 -1
- package/dist/routes/rest/collections/count.js +15 -11
- package/dist/routes/rest/collections/count.js.map +1 -1
- package/dist/routes/rest/collections/create.js +30 -26
- package/dist/routes/rest/collections/create.js.map +1 -1
- package/dist/routes/rest/collections/delete.js +40 -35
- package/dist/routes/rest/collections/delete.js.map +1 -1
- package/dist/routes/rest/collections/deleteByID.js +36 -31
- package/dist/routes/rest/collections/deleteByID.js.map +1 -1
- package/dist/routes/rest/collections/docAccess.js +17 -14
- package/dist/routes/rest/collections/docAccess.js.map +1 -1
- package/dist/routes/rest/collections/duplicate.js +36 -31
- package/dist/routes/rest/collections/duplicate.js.map +1 -1
- package/dist/routes/rest/collections/find.js +29 -20
- package/dist/routes/rest/collections/find.js.map +1 -1
- package/dist/routes/rest/collections/findByID.js +28 -23
- package/dist/routes/rest/collections/findByID.js.map +1 -1
- package/dist/routes/rest/collections/findVersionByID.js +27 -22
- package/dist/routes/rest/collections/findVersionByID.js.map +1 -1
- package/dist/routes/rest/collections/findVersions.js +27 -19
- package/dist/routes/rest/collections/findVersions.js.map +1 -1
- package/dist/routes/rest/collections/preview.js +39 -34
- package/dist/routes/rest/collections/preview.js.map +1 -1
- package/dist/routes/rest/collections/restoreVersion.js +32 -27
- package/dist/routes/rest/collections/restoreVersion.js.map +1 -1
- package/dist/routes/rest/collections/update.js +43 -37
- package/dist/routes/rest/collections/update.js.map +1 -1
- package/dist/routes/rest/collections/updateByID.js +38 -33
- package/dist/routes/rest/collections/updateByID.js.map +1 -1
- package/dist/routes/rest/files/checkFileAccess.js +46 -44
- package/dist/routes/rest/files/checkFileAccess.js.map +1 -1
- package/dist/routes/rest/files/getFile.js +52 -49
- package/dist/routes/rest/files/getFile.js.map +1 -1
- package/dist/routes/rest/files/getFileTypeFallback.js +16 -17
- package/dist/routes/rest/files/getFileTypeFallback.js.map +1 -1
- package/dist/routes/rest/globals/docAccess.js +15 -13
- package/dist/routes/rest/globals/docAccess.js.map +1 -1
- package/dist/routes/rest/globals/findOne.js +22 -18
- package/dist/routes/rest/globals/findOne.js.map +1 -1
- package/dist/routes/rest/globals/findVersionByID.js +22 -17
- package/dist/routes/rest/globals/findVersionByID.js.map +1 -1
- package/dist/routes/rest/globals/findVersions.js +27 -19
- package/dist/routes/rest/globals/findVersions.js.map +1 -1
- package/dist/routes/rest/globals/preview.js +38 -34
- package/dist/routes/rest/globals/preview.js.map +1 -1
- package/dist/routes/rest/globals/restoreVersion.js +27 -22
- package/dist/routes/rest/globals/restoreVersion.js.map +1 -1
- package/dist/routes/rest/globals/update.js +32 -28
- package/dist/routes/rest/globals/update.js.map +1 -1
- package/dist/routes/rest/index.js +651 -626
- package/dist/routes/rest/index.js.map +1 -1
- package/dist/routes/rest/og/image.js +74 -76
- package/dist/routes/rest/og/image.js.map +1 -1
- package/dist/routes/rest/og/index.js +60 -59
- package/dist/routes/rest/og/index.js.map +1 -1
- package/dist/routes/rest/routeError.js +102 -95
- package/dist/routes/rest/routeError.js.map +1 -1
- package/dist/routes/rest/types.js +1 -2
- package/dist/routes/rest/types.js.map +1 -1
- package/dist/routes/rest/utilities/sanitizeCollectionID.js +14 -11
- package/dist/routes/rest/utilities/sanitizeCollectionID.js.map +1 -1
- package/dist/scss/app.scss +4 -4
- package/dist/scss/type.scss +4 -4
- package/dist/templates/Default/NavHamburger/index.js +18 -6
- package/dist/templates/Default/NavHamburger/index.js.map +1 -1
- package/dist/templates/Default/Wrapper/index.js +42 -13
- package/dist/templates/Default/Wrapper/index.js.map +1 -1
- package/dist/templates/Default/index.js +54 -47
- package/dist/templates/Default/index.js.map +1 -1
- package/dist/templates/Minimal/index.js +16 -16
- package/dist/templates/Minimal/index.js.map +1 -1
- package/dist/utilities/addDataAndFileToRequest.js +40 -35
- package/dist/utilities/addDataAndFileToRequest.js.map +1 -1
- package/dist/utilities/addLocalesToRequest.js +44 -36
- package/dist/utilities/addLocalesToRequest.js.map +1 -1
- package/dist/utilities/createPayloadRequest.js +85 -74
- package/dist/utilities/createPayloadRequest.js.map +1 -1
- package/dist/utilities/getNextRequestI18n.js +13 -11
- package/dist/utilities/getNextRequestI18n.js.map +1 -1
- package/dist/utilities/getPayloadHMR.d.ts +1 -1
- package/dist/utilities/getPayloadHMR.d.ts.map +1 -1
- package/dist/utilities/getPayloadHMR.js +91 -94
- package/dist/utilities/getPayloadHMR.js.map +1 -1
- package/dist/utilities/getRequestLanguage.js +16 -13
- package/dist/utilities/getRequestLanguage.js.map +1 -1
- package/dist/utilities/getRequestLocales.js +27 -24
- package/dist/utilities/getRequestLocales.js.map +1 -1
- package/dist/utilities/getRequestTheme.js +16 -16
- package/dist/utilities/getRequestTheme.js.map +1 -1
- package/dist/utilities/headersWithCors.js +21 -30
- package/dist/utilities/headersWithCors.js.map +1 -1
- package/dist/utilities/initPage/handleAdminPage.js +46 -42
- package/dist/utilities/initPage/handleAdminPage.js.map +1 -1
- package/dist/utilities/initPage/handleAuthRedirect.js +45 -32
- package/dist/utilities/initPage/handleAuthRedirect.js.map +1 -1
- package/dist/utilities/initPage/index.js +146 -120
- package/dist/utilities/initPage/index.js.map +1 -1
- package/dist/utilities/initPage/shared.js +26 -25
- package/dist/utilities/initPage/shared.js.map +1 -1
- package/dist/utilities/initPage/types.js +1 -2
- package/dist/utilities/initPage/types.js.map +1 -1
- package/dist/utilities/mergeHeaders.js +8 -9
- package/dist/utilities/mergeHeaders.js.map +1 -1
- package/dist/utilities/meta.js +66 -68
- package/dist/utilities/meta.js.map +1 -1
- package/dist/utilities/timestamp.js +4 -5
- package/dist/utilities/timestamp.js.map +1 -1
- package/dist/views/API/LocaleSelector/index.d.ts.map +1 -1
- package/dist/views/API/LocaleSelector/index.js +38 -11
- package/dist/views/API/LocaleSelector/index.js.map +1 -1
- package/dist/views/API/RenderJSON/index.js +124 -112
- package/dist/views/API/RenderJSON/index.js.map +1 -1
- package/dist/views/API/index.client.js +190 -202
- package/dist/views/API/index.client.js.map +1 -1
- package/dist/views/API/index.js +2 -3
- package/dist/views/API/index.js.map +1 -1
- package/dist/views/API/meta.js +22 -18
- package/dist/views/API/meta.js.map +1 -1
- package/dist/views/Account/Settings/LanguageSelector.js +45 -12
- package/dist/views/Account/Settings/LanguageSelector.js.map +1 -1
- package/dist/views/Account/Settings/index.js +21 -28
- package/dist/views/Account/Settings/index.js.map +1 -1
- package/dist/views/Account/ToggleTheme/index.js +51 -30
- package/dist/views/Account/ToggleTheme/index.js.map +1 -1
- package/dist/views/Account/index.client.js +32 -16
- package/dist/views/Account/index.client.js.map +1 -1
- package/dist/views/Account/index.js +99 -68
- package/dist/views/Account/index.js.map +1 -1
- package/dist/views/Account/meta.js +12 -8
- package/dist/views/Account/meta.js.map +1 -1
- package/dist/views/CreateFirstUser/index.client.js +95 -57
- package/dist/views/CreateFirstUser/index.client.js.map +1 -1
- package/dist/views/CreateFirstUser/index.js +42 -28
- package/dist/views/CreateFirstUser/index.js.map +1 -1
- package/dist/views/CreateFirstUser/meta.js +12 -8
- package/dist/views/CreateFirstUser/meta.js.map +1 -1
- package/dist/views/Dashboard/Default/index.js +132 -115
- package/dist/views/Dashboard/Default/index.js.map +1 -1
- package/dist/views/Dashboard/index.js +61 -52
- package/dist/views/Dashboard/index.js.map +1 -1
- package/dist/views/Dashboard/meta.js +16 -12
- package/dist/views/Dashboard/meta.js.map +1 -1
- package/dist/views/Document/getCustomViewByKey.js +2 -3
- package/dist/views/Document/getCustomViewByKey.js.map +1 -1
- package/dist/views/Document/getCustomViewByRoute.js +30 -27
- package/dist/views/Document/getCustomViewByRoute.js.map +1 -1
- package/dist/views/Document/getDocumentData.js +34 -28
- package/dist/views/Document/getDocumentData.js.map +1 -1
- package/dist/views/Document/getDocumentPermissions.js +83 -74
- package/dist/views/Document/getDocumentPermissions.js.map +1 -1
- package/dist/views/Document/getMetaBySegment.js +113 -107
- package/dist/views/Document/getMetaBySegment.js.map +1 -1
- package/dist/views/Document/getViewsFromConfig.js +309 -331
- package/dist/views/Document/getViewsFromConfig.js.map +1 -1
- package/dist/views/Document/index.d.ts.map +1 -1
- package/dist/views/Document/index.js +193 -159
- package/dist/views/Document/index.js.map +1 -1
- package/dist/views/Document/meta.js +1 -2
- package/dist/views/Document/meta.js.map +1 -1
- package/dist/views/Edit/Default/Auth/APIKey.js +118 -132
- package/dist/views/Edit/Default/Auth/APIKey.js.map +1 -1
- package/dist/views/Edit/Default/Auth/index.js +293 -196
- package/dist/views/Edit/Default/Auth/index.js.map +1 -1
- package/dist/views/Edit/Default/Auth/types.js +1 -2
- package/dist/views/Edit/Default/Auth/types.js.map +1 -1
- package/dist/views/Edit/Default/SetDocumentStepNav/index.js +121 -70
- package/dist/views/Edit/Default/SetDocumentStepNav/index.js.map +1 -1
- package/dist/views/Edit/Default/SetDocumentTitle/index.js +74 -29
- package/dist/views/Edit/Default/SetDocumentTitle/index.js.map +1 -1
- package/dist/views/Edit/Default/index.js +190 -187
- package/dist/views/Edit/Default/index.js.map +1 -1
- package/dist/views/Edit/Default/types.js +1 -2
- package/dist/views/Edit/Default/types.js.map +1 -1
- package/dist/views/Edit/index.client.js +45 -21
- package/dist/views/Edit/index.client.js.map +1 -1
- package/dist/views/Edit/index.js +2 -3
- package/dist/views/Edit/index.js.map +1 -1
- package/dist/views/Edit/meta.js +43 -35
- package/dist/views/Edit/meta.js.map +1 -1
- package/dist/views/Edit/sanitizeEditViewProps.js +8 -9
- package/dist/views/Edit/sanitizeEditViewProps.js.map +1 -1
- package/dist/views/ForgotPassword/ForgotPasswordForm/index.js +151 -94
- package/dist/views/ForgotPassword/ForgotPasswordForm/index.js.map +1 -1
- package/dist/views/ForgotPassword/index.js +59 -46
- package/dist/views/ForgotPassword/index.js.map +1 -1
- package/dist/views/ForgotPassword/meta.js +12 -8
- package/dist/views/ForgotPassword/meta.js.map +1 -1
- package/dist/views/List/Default/index.js +348 -208
- package/dist/views/List/Default/index.js.map +1 -1
- package/dist/views/List/Default/types.js +1 -2
- package/dist/views/List/Default/types.js.map +1 -1
- package/dist/views/List/index.js +153 -137
- package/dist/views/List/index.js.map +1 -1
- package/dist/views/List/meta.js +20 -17
- package/dist/views/List/meta.js.map +1 -1
- package/dist/views/LivePreview/Context/collisionDetection.js +24 -21
- package/dist/views/LivePreview/Context/collisionDetection.js.map +1 -1
- package/dist/views/LivePreview/Context/context.d.ts +2 -1
- package/dist/views/LivePreview/Context/context.d.ts.map +1 -1
- package/dist/views/LivePreview/Context/context.js +39 -36
- package/dist/views/LivePreview/Context/context.js.map +1 -1
- package/dist/views/LivePreview/Context/index.js +134 -142
- package/dist/views/LivePreview/Context/index.js.map +1 -1
- package/dist/views/LivePreview/Context/sizeReducer.js +18 -19
- package/dist/views/LivePreview/Context/sizeReducer.js.map +1 -1
- package/dist/views/LivePreview/Device/index.js +78 -71
- package/dist/views/LivePreview/Device/index.js.map +1 -1
- package/dist/views/LivePreview/DeviceContainer/index.js +47 -23
- package/dist/views/LivePreview/DeviceContainer/index.js.map +1 -1
- package/dist/views/LivePreview/IFrame/index.js +21 -16
- package/dist/views/LivePreview/IFrame/index.js.map +1 -1
- package/dist/views/LivePreview/Preview/index.js +145 -92
- package/dist/views/LivePreview/Preview/index.js.map +1 -1
- package/dist/views/LivePreview/Toolbar/Controls/index.js +136 -115
- package/dist/views/LivePreview/Toolbar/Controls/index.js.map +1 -1
- package/dist/views/LivePreview/Toolbar/SizeInput/index.js +89 -51
- package/dist/views/LivePreview/Toolbar/SizeInput/index.js.map +1 -1
- package/dist/views/LivePreview/Toolbar/index.js +82 -50
- package/dist/views/LivePreview/Toolbar/index.js.map +1 -1
- package/dist/views/LivePreview/ToolbarArea/index.js +32 -10
- package/dist/views/LivePreview/ToolbarArea/index.js.map +1 -1
- package/dist/views/LivePreview/index.client.js +316 -160
- package/dist/views/LivePreview/index.client.js.map +1 -1
- package/dist/views/LivePreview/index.js +67 -55
- package/dist/views/LivePreview/index.js.map +1 -1
- package/dist/views/LivePreview/meta.js +14 -9
- package/dist/views/LivePreview/meta.js.map +1 -1
- package/dist/views/LivePreview/usePopupWindow.js +91 -94
- package/dist/views/LivePreview/usePopupWindow.js.map +1 -1
- package/dist/views/Login/LoginField/index.js +83 -39
- package/dist/views/Login/LoginField/index.js.map +1 -1
- package/dist/views/Login/LoginForm/index.js +130 -66
- package/dist/views/Login/LoginForm/index.js.map +1 -1
- package/dist/views/Login/index.js +77 -54
- package/dist/views/Login/index.js.map +1 -1
- package/dist/views/Login/meta.js +12 -8
- package/dist/views/Login/meta.js.map +1 -1
- package/dist/views/Logout/LogoutClient.js +84 -39
- package/dist/views/Logout/LogoutClient.js.map +1 -1
- package/dist/views/Logout/index.js +29 -16
- package/dist/views/Logout/index.js.map +1 -1
- package/dist/views/Logout/meta.js +11 -7
- package/dist/views/Logout/meta.js.map +1 -1
- package/dist/views/NotFound/index.client.js +78 -40
- package/dist/views/NotFound/index.client.js.map +1 -1
- package/dist/views/NotFound/index.js +47 -37
- package/dist/views/NotFound/index.js.map +1 -1
- package/dist/views/NotFound/meta.js +9 -7
- package/dist/views/NotFound/meta.js.map +1 -1
- package/dist/views/ResetPassword/index.client.js +97 -59
- package/dist/views/ResetPassword/index.client.js.map +1 -1
- package/dist/views/ResetPassword/index.js +68 -53
- package/dist/views/ResetPassword/index.js.map +1 -1
- package/dist/views/ResetPassword/meta.js +12 -8
- package/dist/views/ResetPassword/meta.js.map +1 -1
- package/dist/views/Root/generateCustomViewMetadata.js +21 -19
- package/dist/views/Root/generateCustomViewMetadata.js.map +1 -1
- package/dist/views/Root/getCustomViewByRoute.js +42 -31
- package/dist/views/Root/getCustomViewByRoute.js.map +1 -1
- package/dist/views/Root/getViewFromConfig.js +162 -156
- package/dist/views/Root/getViewFromConfig.js.map +1 -1
- package/dist/views/Root/index.js +99 -82
- package/dist/views/Root/index.js.map +1 -1
- package/dist/views/Root/isPathMatchingRoute.js +18 -13
- package/dist/views/Root/isPathMatchingRoute.js.map +1 -1
- package/dist/views/Root/meta.js +141 -136
- package/dist/views/Root/meta.js.map +1 -1
- package/dist/views/Unauthorized/index.js +32 -22
- package/dist/views/Unauthorized/index.js.map +1 -1
- package/dist/views/Unauthorized/meta.js +12 -8
- package/dist/views/Unauthorized/meta.js.map +1 -1
- package/dist/views/Verify/index.js +58 -43
- package/dist/views/Verify/index.js.map +1 -1
- package/dist/views/Verify/meta.js +12 -8
- package/dist/views/Verify/meta.js.map +1 -1
- package/dist/views/Version/Default/SetStepNav.d.ts.map +1 -1
- package/dist/views/Version/Default/SetStepNav.js +147 -103
- package/dist/views/Version/Default/SetStepNav.js.map +1 -1
- package/dist/views/Version/Default/index.js +198 -114
- package/dist/views/Version/Default/index.js.map +1 -1
- package/dist/views/Version/Default/types.js +1 -2
- package/dist/views/Version/Default/types.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/Label/index.js +6 -5
- package/dist/views/Version/RenderFieldsToDiff/Label/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js +65 -69
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Nested/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Nested/index.js +34 -31
- package/dist/views/Version/RenderFieldsToDiff/fields/Nested/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js +108 -78
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/DiffViewer/index.js +17 -11
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/DiffViewer/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js +40 -38
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js +42 -32
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/DiffViewer/index.js +17 -11
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/DiffViewer/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js +34 -31
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/diffMethods.js +4 -5
- package/dist/views/Version/RenderFieldsToDiff/fields/diffMethods.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/index.js +20 -21
- package/dist/views/Version/RenderFieldsToDiff/fields/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/styles.js +23 -24
- package/dist/views/Version/RenderFieldsToDiff/fields/styles.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/types.js +1 -2
- package/dist/views/Version/RenderFieldsToDiff/fields/types.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/index.js +102 -97
- package/dist/views/Version/RenderFieldsToDiff/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/types.js +1 -2
- package/dist/views/Version/RenderFieldsToDiff/types.js.map +1 -1
- package/dist/views/Version/Restore/index.js +107 -110
- package/dist/views/Version/Restore/index.js.map +1 -1
- package/dist/views/Version/Restore/types.js +1 -2
- package/dist/views/Version/Restore/types.js.map +1 -1
- package/dist/views/Version/SelectComparison/index.js +130 -138
- package/dist/views/Version/SelectComparison/index.js.map +1 -1
- package/dist/views/Version/SelectComparison/types.js +1 -2
- package/dist/views/Version/SelectComparison/types.js.map +1 -1
- package/dist/views/Version/SelectLocales/index.js +58 -30
- package/dist/views/Version/SelectLocales/index.js.map +1 -1
- package/dist/views/Version/SelectLocales/types.js +1 -2
- package/dist/views/Version/SelectLocales/types.js.map +1 -1
- package/dist/views/Version/index.js +126 -105
- package/dist/views/Version/index.js.map +1 -1
- package/dist/views/Version/meta.js +49 -43
- package/dist/views/Version/meta.js.map +1 -1
- package/dist/views/Versions/buildColumns.js +87 -82
- package/dist/views/Versions/buildColumns.js.map +1 -1
- package/dist/views/Versions/cells/AutosaveCell/index.js +69 -42
- package/dist/views/Versions/cells/AutosaveCell/index.js.map +1 -1
- package/dist/views/Versions/cells/CreatedAt/index.js +70 -17
- package/dist/views/Versions/cells/CreatedAt/index.js.map +1 -1
- package/dist/views/Versions/cells/ID/index.js +17 -5
- package/dist/views/Versions/cells/ID/index.js.map +1 -1
- package/dist/views/Versions/getLatestVersion.js +33 -29
- package/dist/views/Versions/getLatestVersion.js.map +1 -1
- package/dist/views/Versions/index.client.js +80 -77
- package/dist/views/Versions/index.client.js.map +1 -1
- package/dist/views/Versions/index.js +148 -127
- package/dist/views/Versions/index.js.map +1 -1
- package/dist/views/Versions/meta.js +43 -37
- package/dist/views/Versions/meta.js.map +1 -1
- package/dist/views/Versions/types.js +1 -2
- package/dist/views/Versions/types.js.map +1 -1
- package/dist/withPayload.js +83 -117
- package/dist/withPayload.js.map +1 -1
- package/package.json +20 -10
- package/dist/cjs/withPayload.cjs +0 -145
- package/dist/cjs/withPayload.cjs.map +0 -1
|
@@ -2,85 +2,84 @@ import crypto from 'crypto';
|
|
|
2
2
|
import fs, { WriteStream } from 'fs';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import { checkAndMakeDir, debugLog, deleteFile, getTempFilename } from './utilities.js';
|
|
5
|
-
export const tempFileHandler = (options, fieldname, filename)=>{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
});
|
|
5
|
+
export const tempFileHandler = (options, fieldname, filename) => {
|
|
6
|
+
const dir = path.normalize(options.tempFileDir);
|
|
7
|
+
const tempFilePath = path.join(process.cwd(), dir, getTempFilename());
|
|
8
|
+
checkAndMakeDir({
|
|
9
|
+
createParentPath: true
|
|
10
|
+
}, tempFilePath);
|
|
11
|
+
debugLog(options, `Temporary file path is ${tempFilePath}`);
|
|
12
|
+
const hash = crypto.createHash('md5');
|
|
13
|
+
let fileSize = 0;
|
|
14
|
+
let completed = false;
|
|
15
|
+
debugLog(options, `Opening write stream for ${fieldname}->${filename}...`);
|
|
16
|
+
const writeStream = fs.createWriteStream(tempFilePath);
|
|
17
|
+
const writePromise = new Promise((resolve, reject) => {
|
|
18
|
+
writeStream.on('finish', () => resolve(true));
|
|
19
|
+
writeStream.on('error', err => {
|
|
20
|
+
debugLog(options, `Error write temp file: ${err}`);
|
|
21
|
+
reject(err);
|
|
23
22
|
});
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
23
|
+
});
|
|
24
|
+
return {
|
|
25
|
+
cleanup: () => {
|
|
26
|
+
completed = true;
|
|
27
|
+
debugLog(options, `Cleaning up temporary file ${tempFilePath}...`);
|
|
28
|
+
writeStream.end();
|
|
29
|
+
deleteFile(tempFilePath, err => err ? debugLog(options, `Cleaning up temporary file ${tempFilePath} failed: ${err}`) : debugLog(options, `Cleaning up temporary file ${tempFilePath} done.`));
|
|
30
|
+
},
|
|
31
|
+
complete: () => {
|
|
32
|
+
completed = true;
|
|
33
|
+
debugLog(options, `Upload ${fieldname}->${filename} completed, bytes:${fileSize}.`);
|
|
34
|
+
if (writeStream instanceof WriteStream) writeStream.end();
|
|
35
|
+
// Return empty buff since data was uploaded into a temp file.
|
|
36
|
+
return Buffer.concat([]);
|
|
37
|
+
},
|
|
38
|
+
dataHandler: data => {
|
|
39
|
+
if (completed === true) {
|
|
40
|
+
debugLog(options, `Error: got ${fieldname}->${filename} data chunk for completed upload!`);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
writeStream.write(data);
|
|
44
|
+
hash.update(data);
|
|
45
|
+
fileSize += data.length;
|
|
46
|
+
debugLog(options, `Uploading ${fieldname}->${filename}, bytes:${fileSize}...`);
|
|
47
|
+
},
|
|
48
|
+
getFilePath: () => tempFilePath,
|
|
49
|
+
getFileSize: () => fileSize,
|
|
50
|
+
getHash: () => hash.digest('hex'),
|
|
51
|
+
getWritePromise: () => writePromise
|
|
52
|
+
};
|
|
53
53
|
};
|
|
54
|
-
export const memHandler = (options, fieldname, filename)=>{
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
54
|
+
export const memHandler = (options, fieldname, filename) => {
|
|
55
|
+
const buffers = [];
|
|
56
|
+
const hash = crypto.createHash('md5');
|
|
57
|
+
let fileSize = 0;
|
|
58
|
+
let completed = false;
|
|
59
|
+
const getBuffer = () => Buffer.concat(buffers, fileSize);
|
|
60
|
+
return {
|
|
61
|
+
cleanup: () => {
|
|
62
|
+
completed = true;
|
|
63
|
+
},
|
|
64
|
+
complete: () => {
|
|
65
|
+
debugLog(options, `Upload ${fieldname}->${filename} completed, bytes:${fileSize}.`);
|
|
66
|
+
completed = true;
|
|
67
|
+
return getBuffer();
|
|
68
|
+
},
|
|
69
|
+
dataHandler: data => {
|
|
70
|
+
if (completed === true) {
|
|
71
|
+
debugLog(options, `Error: got ${fieldname}->${filename} data chunk for completed upload!`);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
buffers.push(data);
|
|
75
|
+
hash.update(data);
|
|
76
|
+
fileSize += data.length;
|
|
77
|
+
debugLog(options, `Uploading ${fieldname}->${filename}, bytes:${fileSize}...`);
|
|
78
|
+
},
|
|
79
|
+
getFilePath: () => '',
|
|
80
|
+
getFileSize: () => fileSize,
|
|
81
|
+
getHash: () => hash.digest('hex'),
|
|
82
|
+
getWritePromise: () => Promise.resolve(true)
|
|
83
|
+
};
|
|
84
84
|
};
|
|
85
|
-
|
|
86
85
|
//# sourceMappingURL=handlers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/fetchAPI-multipart/handlers.ts"],"sourcesContent":["import crypto from 'crypto'\nimport fs, { WriteStream } from 'fs'\nimport path from 'path'\n\nimport type { FetchAPIFileUploadOptions } from './index.js'\n\nimport { checkAndMakeDir, debugLog, deleteFile, getTempFilename } from './utilities.js'\n\ntype Handler = (\n options: FetchAPIFileUploadOptions,\n fieldname: string,\n filename: string,\n) => {\n cleanup: () => void\n complete: () => Buffer\n dataHandler: (data: Buffer) => void\n getFilePath: () => string\n getFileSize: () => number\n getHash: () => string\n getWritePromise: () => Promise<boolean>\n}\n\nexport const tempFileHandler: Handler = (options, fieldname, filename) => {\n const dir = path.normalize(options.tempFileDir)\n const tempFilePath = path.join(process.cwd(), dir, getTempFilename())\n checkAndMakeDir({ createParentPath: true }, tempFilePath)\n\n debugLog(options, `Temporary file path is ${tempFilePath}`)\n\n const hash = crypto.createHash('md5')\n let fileSize = 0\n let completed = false\n\n debugLog(options, `Opening write stream for ${fieldname}->${filename}...`)\n const writeStream = fs.createWriteStream(tempFilePath)\n const writePromise = new Promise<boolean>((resolve, reject) => {\n writeStream.on('finish', () => resolve(true))\n writeStream.on('error', (err) => {\n debugLog(options, `Error write temp file: ${err}`)\n reject(err)\n })\n })\n\n return {\n cleanup: () => {\n completed = true\n debugLog(options, `Cleaning up temporary file ${tempFilePath}...`)\n writeStream.end()\n deleteFile(tempFilePath, (err) =>\n err\n ? debugLog(options, `Cleaning up temporary file ${tempFilePath} failed: ${err}`)\n : debugLog(options, `Cleaning up temporary file ${tempFilePath} done.`),\n )\n },\n complete: () => {\n completed = true\n debugLog(options, `Upload ${fieldname}->${filename} completed, bytes:${fileSize}.`)\n if (writeStream instanceof WriteStream) writeStream.end()\n // Return empty buff since data was uploaded into a temp file.\n return Buffer.concat([])\n },\n dataHandler: (data) => {\n if (completed === true) {\n debugLog(options, `Error: got ${fieldname}->${filename} data chunk for completed upload!`)\n return\n }\n writeStream.write(data)\n hash.update(data)\n fileSize += data.length\n debugLog(options, `Uploading ${fieldname}->${filename}, bytes:${fileSize}...`)\n },\n getFilePath: () => tempFilePath,\n getFileSize: () => fileSize,\n getHash: () => hash.digest('hex'),\n getWritePromise: () => writePromise,\n }\n}\n\nexport const memHandler: Handler = (options, fieldname, filename) => {\n const buffers: Buffer[] = []\n const hash = crypto.createHash('md5')\n let fileSize = 0\n let completed = false\n\n const getBuffer = () => Buffer.concat(buffers, fileSize)\n\n return {\n cleanup: () => {\n completed = true\n },\n complete: () => {\n debugLog(options, `Upload ${fieldname}->${filename} completed, bytes:${fileSize}.`)\n completed = true\n return getBuffer()\n },\n dataHandler: (data) => {\n if (completed === true) {\n debugLog(options, `Error: got ${fieldname}->${filename} data chunk for completed upload!`)\n return\n }\n buffers.push(data)\n hash.update(data)\n fileSize += data.length\n debugLog(options, `Uploading ${fieldname}->${filename}, bytes:${fileSize}...`)\n },\n getFilePath: () => '',\n getFileSize: () => fileSize,\n getHash: () => hash.digest('hex'),\n getWritePromise: () => Promise.resolve(true),\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"handlers.js","names":["crypto","fs","WriteStream","path","checkAndMakeDir","debugLog","deleteFile","getTempFilename","tempFileHandler","options","fieldname","filename","dir","normalize","tempFileDir","tempFilePath","join","process","cwd","createParentPath","hash","createHash","fileSize","completed","writeStream","createWriteStream","writePromise","Promise","resolve","reject","on","err","cleanup","end","complete","Buffer","concat","dataHandler","data","write","update","length","getFilePath","getFileSize","getHash","digest","getWritePromise","memHandler","buffers","getBuffer","push"],"sources":["../../src/fetchAPI-multipart/handlers.ts"],"sourcesContent":["import crypto from 'crypto'\nimport fs, { WriteStream } from 'fs'\nimport path from 'path'\n\nimport type { FetchAPIFileUploadOptions } from './index.js'\n\nimport { checkAndMakeDir, debugLog, deleteFile, getTempFilename } from './utilities.js'\n\ntype Handler = (\n options: FetchAPIFileUploadOptions,\n fieldname: string,\n filename: string,\n) => {\n cleanup: () => void\n complete: () => Buffer\n dataHandler: (data: Buffer) => void\n getFilePath: () => string\n getFileSize: () => number\n getHash: () => string\n getWritePromise: () => Promise<boolean>\n}\n\nexport const tempFileHandler: Handler = (options, fieldname, filename) => {\n const dir = path.normalize(options.tempFileDir)\n const tempFilePath = path.join(process.cwd(), dir, getTempFilename())\n checkAndMakeDir({ createParentPath: true }, tempFilePath)\n\n debugLog(options, `Temporary file path is ${tempFilePath}`)\n\n const hash = crypto.createHash('md5')\n let fileSize = 0\n let completed = false\n\n debugLog(options, `Opening write stream for ${fieldname}->${filename}...`)\n const writeStream = fs.createWriteStream(tempFilePath)\n const writePromise = new Promise<boolean>((resolve, reject) => {\n writeStream.on('finish', () => resolve(true))\n writeStream.on('error', (err) => {\n debugLog(options, `Error write temp file: ${err}`)\n reject(err)\n })\n })\n\n return {\n cleanup: () => {\n completed = true\n debugLog(options, `Cleaning up temporary file ${tempFilePath}...`)\n writeStream.end()\n deleteFile(tempFilePath, (err) =>\n err\n ? debugLog(options, `Cleaning up temporary file ${tempFilePath} failed: ${err}`)\n : debugLog(options, `Cleaning up temporary file ${tempFilePath} done.`),\n )\n },\n complete: () => {\n completed = true\n debugLog(options, `Upload ${fieldname}->${filename} completed, bytes:${fileSize}.`)\n if (writeStream instanceof WriteStream) writeStream.end()\n // Return empty buff since data was uploaded into a temp file.\n return Buffer.concat([])\n },\n dataHandler: (data) => {\n if (completed === true) {\n debugLog(options, `Error: got ${fieldname}->${filename} data chunk for completed upload!`)\n return\n }\n writeStream.write(data)\n hash.update(data)\n fileSize += data.length\n debugLog(options, `Uploading ${fieldname}->${filename}, bytes:${fileSize}...`)\n },\n getFilePath: () => tempFilePath,\n getFileSize: () => fileSize,\n getHash: () => hash.digest('hex'),\n getWritePromise: () => writePromise,\n }\n}\n\nexport const memHandler: Handler = (options, fieldname, filename) => {\n const buffers: Buffer[] = []\n const hash = crypto.createHash('md5')\n let fileSize = 0\n let completed = false\n\n const getBuffer = () => Buffer.concat(buffers, fileSize)\n\n return {\n cleanup: () => {\n completed = true\n },\n complete: () => {\n debugLog(options, `Upload ${fieldname}->${filename} completed, bytes:${fileSize}.`)\n completed = true\n return getBuffer()\n },\n dataHandler: (data) => {\n if (completed === true) {\n debugLog(options, `Error: got ${fieldname}->${filename} data chunk for completed upload!`)\n return\n }\n buffers.push(data)\n hash.update(data)\n fileSize += data.length\n debugLog(options, `Uploading ${fieldname}->${filename}, bytes:${fileSize}...`)\n },\n getFilePath: () => '',\n getFileSize: () => fileSize,\n getHash: () => hash.digest('hex'),\n getWritePromise: () => Promise.resolve(true),\n }\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -4,38 +4,40 @@ import { isEligibleRequest } from './isEligibleRequest.js';
|
|
|
4
4
|
import { processMultipart } from './processMultipart.js';
|
|
5
5
|
import { debugLog } from './utilities.js';
|
|
6
6
|
const DEFAULT_OPTIONS = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
abortOnLimit: false,
|
|
8
|
+
createParentPath: false,
|
|
9
|
+
debug: false,
|
|
10
|
+
fileHandler: false,
|
|
11
|
+
limitHandler: false,
|
|
12
|
+
parseNested: false,
|
|
13
|
+
preserveExtension: false,
|
|
14
|
+
responseOnLimit: 'File size limit has been reached',
|
|
15
|
+
safeFileNames: false,
|
|
16
|
+
tempFileDir: path.join(process.cwd(), 'tmp'),
|
|
17
|
+
uploadTimeout: 60000,
|
|
18
|
+
uriDecodeFileNames: false,
|
|
19
|
+
useTempFiles: false
|
|
20
20
|
};
|
|
21
|
-
export const fetchAPIFileUpload = async ({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
export const fetchAPIFileUpload = async ({
|
|
22
|
+
options,
|
|
23
|
+
request
|
|
24
|
+
}) => {
|
|
25
|
+
const uploadOptions = {
|
|
26
|
+
...DEFAULT_OPTIONS,
|
|
27
|
+
...options
|
|
28
|
+
};
|
|
29
|
+
if (!isEligibleRequest(request)) {
|
|
30
|
+
debugLog(uploadOptions, 'Request is not eligible for file upload!');
|
|
31
|
+
return {
|
|
32
|
+
error: new APIError('Request is not eligible for file upload', 500),
|
|
33
|
+
fields: undefined,
|
|
34
|
+
files: undefined
|
|
25
35
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
} else {
|
|
34
|
-
return processMultipart({
|
|
35
|
-
options: uploadOptions,
|
|
36
|
-
request
|
|
37
|
-
});
|
|
38
|
-
}
|
|
36
|
+
} else {
|
|
37
|
+
return processMultipart({
|
|
38
|
+
options: uploadOptions,
|
|
39
|
+
request
|
|
40
|
+
});
|
|
41
|
+
}
|
|
39
42
|
};
|
|
40
|
-
|
|
41
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/fetchAPI-multipart/index.ts"],"sourcesContent":["import type { BusboyConfig } from 'busboy'\n\nimport path from 'path'\nimport { APIError } from 'payload'\n\nimport { isEligibleRequest } from './isEligibleRequest.js'\nimport { processMultipart } from './processMultipart.js'\nimport { debugLog } from './utilities.js'\n\nconst DEFAULT_OPTIONS = {\n abortOnLimit: false,\n createParentPath: false,\n debug: false,\n fileHandler: false,\n limitHandler: false,\n parseNested: false,\n preserveExtension: false,\n responseOnLimit: 'File size limit has been reached',\n safeFileNames: false,\n tempFileDir: path.join(process.cwd(), 'tmp'),\n uploadTimeout: 60000,\n uriDecodeFileNames: false,\n useTempFiles: false,\n}\n\nexport type FileShape = {\n data: Buffer\n encoding: string\n md5: Buffer | string\n mimetype: string\n mv: (filePath: string, callback: () => void) => Promise<void> | void\n name: string\n size: number\n tempFilePath: string\n truncated: boolean\n}\n\nexport type FetchAPIFileUploadOptions = {\n /**\n * Returns a HTTP 413 when the file is bigger than the size limit if `true`.\n * Otherwise, it will add a `truncated = true` to the resulting file structure.\n * @default false\n */\n abortOnLimit?: boolean | undefined\n /**\n * Automatically creates the directory path specified in `.mv(filePathName)`\n * @default false\n */\n createParentPath?: boolean | undefined\n /**\n * Turn on/off upload process logging. Can be useful for troubleshooting.\n * @default false\n */\n debug?: boolean | undefined\n /**\n * User defined limit handler which will be invoked if the file is bigger than configured limits.\n * @default false\n */\n limitHandler?: ((args: { request: Request; size: number }) => void) | boolean | undefined\n /**\n * By default, `req.body` and `req.files` are flattened like this:\n * `{'name': 'John', 'hobbies[0]': 'Cinema', 'hobbies[1]': 'Bike'}\n *\n * When this option is enabled they are parsed in order to be nested like this:\n * `{'name': 'John', 'hobbies': ['Cinema', 'Bike']}`\n * @default false\n */\n parseNested?: boolean | undefined\n /**\n * Preserves filename extension when using `safeFileNames` option.\n * If set to `true`, will default to an extension length of `3`.\n * If set to `number`, this will be the max allowable extension length.\n * If an extension is smaller than the extension length, it remains untouched. If the extension is longer,\n * it is shifted.\n * @default false\n *\n * @example\n * // true\n * app.use(fileUpload({ safeFileNames: true, preserveExtension: true }));\n * // myFileName.ext --> myFileName.ext\n *\n * @example\n * // max extension length 2, extension shifted\n * app.use(fileUpload({ safeFileNames: true, preserveExtension: 2 }));\n * // myFileName.ext --> myFileNamee.xt\n */\n preserveExtension?: boolean | number | undefined\n /**\n * Response which will be send to client if file size limit exceeded when `abortOnLimit` set to `true`.\n * @default 'File size limit has been reached'\n */\n responseOnLimit?: string | undefined\n /**\n * Strips characters from the upload's filename.\n * You can use custom regex to determine what to strip.\n * If set to `true`, non-alphanumeric characters _except_ dashes and underscores will be stripped.\n * This option is off by default.\n * @default false\n *\n * @example\n * // strip slashes from file names\n * app.use(fileUpload({ safeFileNames: /\\\\/g }))\n *\n * @example\n * app.use(fileUpload({ safeFileNames: true }))\n */\n safeFileNames?: RegExp | boolean | undefined\n /**\n * Path to store temporary files.\n * Used along with the `useTempFiles` option. By default this module uses `'tmp'` folder\n * in the current working directory.\n * You can use trailing slash, but it is not necessary.\n * @default './tmp'\n */\n tempFileDir?: string | undefined\n /**\n * This defines how long to wait for data before aborting. Set to `0` if you want to turn off timeout checks.\n * @default 60_000\n */\n uploadTimeout?: number | undefined\n /**\n * Applies uri decoding to file names if set `true`.\n * @default false\n */\n uriDecodeFileNames?: boolean | undefined\n /**\n * By default this module uploads files into RAM.\n * Setting this option to `true` turns on using temporary files instead of utilising RAM.\n * This avoids memory overflow issues when uploading large files or in case of uploading\n * lots of files at same time.\n * @default false\n */\n useTempFiles?: boolean | undefined\n} & Partial<BusboyConfig>\n\ntype FetchAPIFileUploadResponseFile = {\n data: Buffer\n mimetype: string\n name: string\n size: number\n tempFilePath?: string\n}\n\nexport type FetchAPIFileUploadResponse = {\n error?: APIError\n fields: Record<string, string>\n files: Record<string, FetchAPIFileUploadResponseFile>\n}\n\ntype FetchAPIFileUpload = (args: {\n options?: FetchAPIFileUploadOptions\n request: Request\n}) => Promise<FetchAPIFileUploadResponse>\nexport const fetchAPIFileUpload: FetchAPIFileUpload = async ({ options, request }) => {\n const uploadOptions: FetchAPIFileUploadOptions = { ...DEFAULT_OPTIONS, ...options }\n if (!isEligibleRequest(request)) {\n debugLog(uploadOptions, 'Request is not eligible for file upload!')\n return {\n error: new APIError('Request is not eligible for file upload', 500),\n fields: undefined,\n files: undefined,\n }\n } else {\n return processMultipart({ options: uploadOptions, request })\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"index.js","names":["path","APIError","isEligibleRequest","processMultipart","debugLog","DEFAULT_OPTIONS","abortOnLimit","createParentPath","debug","fileHandler","limitHandler","parseNested","preserveExtension","responseOnLimit","safeFileNames","tempFileDir","join","process","cwd","uploadTimeout","uriDecodeFileNames","useTempFiles","fetchAPIFileUpload","options","request","uploadOptions","error","fields","undefined","files"],"sources":["../../src/fetchAPI-multipart/index.ts"],"sourcesContent":["import type { BusboyConfig } from 'busboy'\n\nimport path from 'path'\nimport { APIError } from 'payload'\n\nimport { isEligibleRequest } from './isEligibleRequest.js'\nimport { processMultipart } from './processMultipart.js'\nimport { debugLog } from './utilities.js'\n\nconst DEFAULT_OPTIONS = {\n abortOnLimit: false,\n createParentPath: false,\n debug: false,\n fileHandler: false,\n limitHandler: false,\n parseNested: false,\n preserveExtension: false,\n responseOnLimit: 'File size limit has been reached',\n safeFileNames: false,\n tempFileDir: path.join(process.cwd(), 'tmp'),\n uploadTimeout: 60000,\n uriDecodeFileNames: false,\n useTempFiles: false,\n}\n\nexport type FileShape = {\n data: Buffer\n encoding: string\n md5: Buffer | string\n mimetype: string\n mv: (filePath: string, callback: () => void) => Promise<void> | void\n name: string\n size: number\n tempFilePath: string\n truncated: boolean\n}\n\nexport type FetchAPIFileUploadOptions = {\n /**\n * Returns a HTTP 413 when the file is bigger than the size limit if `true`.\n * Otherwise, it will add a `truncated = true` to the resulting file structure.\n * @default false\n */\n abortOnLimit?: boolean | undefined\n /**\n * Automatically creates the directory path specified in `.mv(filePathName)`\n * @default false\n */\n createParentPath?: boolean | undefined\n /**\n * Turn on/off upload process logging. Can be useful for troubleshooting.\n * @default false\n */\n debug?: boolean | undefined\n /**\n * User defined limit handler which will be invoked if the file is bigger than configured limits.\n * @default false\n */\n limitHandler?: ((args: { request: Request; size: number }) => void) | boolean | undefined\n /**\n * By default, `req.body` and `req.files` are flattened like this:\n * `{'name': 'John', 'hobbies[0]': 'Cinema', 'hobbies[1]': 'Bike'}\n *\n * When this option is enabled they are parsed in order to be nested like this:\n * `{'name': 'John', 'hobbies': ['Cinema', 'Bike']}`\n * @default false\n */\n parseNested?: boolean | undefined\n /**\n * Preserves filename extension when using `safeFileNames` option.\n * If set to `true`, will default to an extension length of `3`.\n * If set to `number`, this will be the max allowable extension length.\n * If an extension is smaller than the extension length, it remains untouched. If the extension is longer,\n * it is shifted.\n * @default false\n *\n * @example\n * // true\n * app.use(fileUpload({ safeFileNames: true, preserveExtension: true }));\n * // myFileName.ext --> myFileName.ext\n *\n * @example\n * // max extension length 2, extension shifted\n * app.use(fileUpload({ safeFileNames: true, preserveExtension: 2 }));\n * // myFileName.ext --> myFileNamee.xt\n */\n preserveExtension?: boolean | number | undefined\n /**\n * Response which will be send to client if file size limit exceeded when `abortOnLimit` set to `true`.\n * @default 'File size limit has been reached'\n */\n responseOnLimit?: string | undefined\n /**\n * Strips characters from the upload's filename.\n * You can use custom regex to determine what to strip.\n * If set to `true`, non-alphanumeric characters _except_ dashes and underscores will be stripped.\n * This option is off by default.\n * @default false\n *\n * @example\n * // strip slashes from file names\n * app.use(fileUpload({ safeFileNames: /\\\\/g }))\n *\n * @example\n * app.use(fileUpload({ safeFileNames: true }))\n */\n safeFileNames?: RegExp | boolean | undefined\n /**\n * Path to store temporary files.\n * Used along with the `useTempFiles` option. By default this module uses `'tmp'` folder\n * in the current working directory.\n * You can use trailing slash, but it is not necessary.\n * @default './tmp'\n */\n tempFileDir?: string | undefined\n /**\n * This defines how long to wait for data before aborting. Set to `0` if you want to turn off timeout checks.\n * @default 60_000\n */\n uploadTimeout?: number | undefined\n /**\n * Applies uri decoding to file names if set `true`.\n * @default false\n */\n uriDecodeFileNames?: boolean | undefined\n /**\n * By default this module uploads files into RAM.\n * Setting this option to `true` turns on using temporary files instead of utilising RAM.\n * This avoids memory overflow issues when uploading large files or in case of uploading\n * lots of files at same time.\n * @default false\n */\n useTempFiles?: boolean | undefined\n} & Partial<BusboyConfig>\n\ntype FetchAPIFileUploadResponseFile = {\n data: Buffer\n mimetype: string\n name: string\n size: number\n tempFilePath?: string\n}\n\nexport type FetchAPIFileUploadResponse = {\n error?: APIError\n fields: Record<string, string>\n files: Record<string, FetchAPIFileUploadResponseFile>\n}\n\ntype FetchAPIFileUpload = (args: {\n options?: FetchAPIFileUploadOptions\n request: Request\n}) => Promise<FetchAPIFileUploadResponse>\nexport const fetchAPIFileUpload: FetchAPIFileUpload = async ({ options, request }) => {\n const uploadOptions: FetchAPIFileUploadOptions = { ...DEFAULT_OPTIONS, ...options }\n if (!isEligibleRequest(request)) {\n debugLog(uploadOptions, 'Request is not eligible for file upload!')\n return {\n error: new APIError('Request is not eligible for file upload', 500),\n fields: undefined,\n files: undefined,\n }\n } else {\n return processMultipart({ options: uploadOptions, request })\n }\n}\n"],"mappings":"AAEA,OAAOA,IAAA,MAAU;AACjB,SAASC,QAAQ,QAAQ;AAEzB,SAASC,iBAAiB,QAAQ;AAClC,SAASC,gBAAgB,QAAQ;AACjC,SAASC,QAAQ,QAAQ;AAEzB,MAAMC,eAAA,GAAkB;EACtBC,YAAA,EAAc;EACdC,gBAAA,EAAkB;EAClBC,KAAA,EAAO;EACPC,WAAA,EAAa;EACbC,YAAA,EAAc;EACdC,WAAA,EAAa;EACbC,iBAAA,EAAmB;EACnBC,eAAA,EAAiB;EACjBC,aAAA,EAAe;EACfC,WAAA,EAAaf,IAAA,CAAKgB,IAAI,CAACC,OAAA,CAAQC,GAAG,IAAI;EACtCC,aAAA,EAAe;EACfC,kBAAA,EAAoB;EACpBC,YAAA,EAAc;AAChB;AAkIA,OAAO,MAAMC,kBAAA,GAAyC,MAAAA,CAAO;EAAEC,OAAO;EAAEC;AAAO,CAAE;EAC/E,MAAMC,aAAA,GAA2C;IAAE,GAAGpB,eAAe;IAAE,GAAGkB;EAAQ;EAClF,IAAI,CAACrB,iBAAA,CAAkBsB,OAAA,GAAU;IAC/BpB,QAAA,CAASqB,aAAA,EAAe;IACxB,OAAO;MACLC,KAAA,EAAO,IAAIzB,QAAA,CAAS,2CAA2C;MAC/D0B,MAAA,EAAQC,SAAA;MACRC,KAAA,EAAOD;IACT;EACF,OAAO;IACL,OAAOzB,gBAAA,CAAiB;MAAEoB,OAAA,EAASE,aAAA;MAAeD;IAAQ;EAC5D;AACF","ignoreList":[]}
|
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
const ACCEPTABLE_CONTENT_TYPE = /multipart\/['"()+-_]+(?:; ?['"()+-_]*)+$/i;
|
|
2
|
-
const UNACCEPTABLE_METHODS = new Set([
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
'DELETE',
|
|
6
|
-
'OPTIONS',
|
|
7
|
-
'CONNECT',
|
|
8
|
-
'TRACE'
|
|
9
|
-
]);
|
|
10
|
-
const hasBody = (req)=>{
|
|
11
|
-
return Boolean(req.headers.get('transfer-encoding') || req.headers.get('content-length') && req.headers.get('content-length') !== '0');
|
|
2
|
+
const UNACCEPTABLE_METHODS = new Set(['GET', 'HEAD', 'DELETE', 'OPTIONS', 'CONNECT', 'TRACE']);
|
|
3
|
+
const hasBody = req => {
|
|
4
|
+
return Boolean(req.headers.get('transfer-encoding') || req.headers.get('content-length') && req.headers.get('content-length') !== '0');
|
|
12
5
|
};
|
|
13
|
-
const hasAcceptableMethod =
|
|
14
|
-
const hasAcceptableContentType =
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
const hasAcceptableMethod = req => !UNACCEPTABLE_METHODS.has(req.method);
|
|
7
|
+
const hasAcceptableContentType = req => {
|
|
8
|
+
const contType = req.headers.get('content-type');
|
|
9
|
+
return contType.includes('boundary=') && ACCEPTABLE_CONTENT_TYPE.test(contType);
|
|
17
10
|
};
|
|
18
|
-
export const isEligibleRequest =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
11
|
+
export const isEligibleRequest = req => {
|
|
12
|
+
try {
|
|
13
|
+
return hasBody(req) && hasAcceptableMethod(req) && hasAcceptableContentType(req);
|
|
14
|
+
} catch (e) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
24
17
|
};
|
|
25
|
-
|
|
26
18
|
//# sourceMappingURL=isEligibleRequest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/fetchAPI-multipart/isEligibleRequest.ts"],"sourcesContent":["const ACCEPTABLE_CONTENT_TYPE = /multipart\\/['\"()+-_]+(?:; ?['\"()+-_]*)+$/i\nconst UNACCEPTABLE_METHODS = new Set(['GET', 'HEAD', 'DELETE', 'OPTIONS', 'CONNECT', 'TRACE'])\n\nconst hasBody = (req: Request): boolean => {\n return Boolean(\n req.headers.get('transfer-encoding') ||\n (req.headers.get('content-length') && req.headers.get('content-length') !== '0'),\n )\n}\n\nconst hasAcceptableMethod = (req: Request): boolean => !UNACCEPTABLE_METHODS.has(req.method)\n\nconst hasAcceptableContentType = (req: Request): boolean => {\n const contType = req.headers.get('content-type')\n return contType.includes('boundary=') && ACCEPTABLE_CONTENT_TYPE.test(contType)\n}\n\nexport const isEligibleRequest = (req: Request): boolean => {\n try {\n return hasBody(req) && hasAcceptableMethod(req) && hasAcceptableContentType(req)\n } catch (e) {\n return false\n }\n}\n"],"
|
|
1
|
+
{"version":3,"file":"isEligibleRequest.js","names":["ACCEPTABLE_CONTENT_TYPE","UNACCEPTABLE_METHODS","Set","hasBody","req","Boolean","headers","get","hasAcceptableMethod","has","method","hasAcceptableContentType","contType","includes","test","isEligibleRequest","e"],"sources":["../../src/fetchAPI-multipart/isEligibleRequest.ts"],"sourcesContent":["const ACCEPTABLE_CONTENT_TYPE = /multipart\\/['\"()+-_]+(?:; ?['\"()+-_]*)+$/i\nconst UNACCEPTABLE_METHODS = new Set(['GET', 'HEAD', 'DELETE', 'OPTIONS', 'CONNECT', 'TRACE'])\n\nconst hasBody = (req: Request): boolean => {\n return Boolean(\n req.headers.get('transfer-encoding') ||\n (req.headers.get('content-length') && req.headers.get('content-length') !== '0'),\n )\n}\n\nconst hasAcceptableMethod = (req: Request): boolean => !UNACCEPTABLE_METHODS.has(req.method)\n\nconst hasAcceptableContentType = (req: Request): boolean => {\n const contType = req.headers.get('content-type')\n return contType.includes('boundary=') && ACCEPTABLE_CONTENT_TYPE.test(contType)\n}\n\nexport const isEligibleRequest = (req: Request): boolean => {\n try {\n return hasBody(req) && hasAcceptableMethod(req) && hasAcceptableContentType(req)\n } catch (e) {\n return false\n }\n}\n"],"mappings":"AAAA,MAAMA,uBAAA,GAA0B;AAChC,MAAMC,oBAAA,GAAuB,IAAIC,GAAA,CAAI,CAAC,OAAO,QAAQ,UAAU,WAAW,WAAW,QAAQ;AAE7F,MAAMC,OAAA,GAAWC,GAAA;EACf,OAAOC,OAAA,CACLD,GAAA,CAAIE,OAAO,CAACC,GAAG,CAAC,wBACbH,GAAA,CAAIE,OAAO,CAACC,GAAG,CAAC,qBAAqBH,GAAA,CAAIE,OAAO,CAACC,GAAG,CAAC,sBAAsB;AAElF;AAEA,MAAMC,mBAAA,GAAuBJ,GAAA,IAA0B,CAACH,oBAAA,CAAqBQ,GAAG,CAACL,GAAA,CAAIM,MAAM;AAE3F,MAAMC,wBAAA,GAA4BP,GAAA;EAChC,MAAMQ,QAAA,GAAWR,GAAA,CAAIE,OAAO,CAACC,GAAG,CAAC;EACjC,OAAOK,QAAA,CAASC,QAAQ,CAAC,gBAAgBb,uBAAA,CAAwBc,IAAI,CAACF,QAAA;AACxE;AAEA,OAAO,MAAMG,iBAAA,GAAqBX,GAAA;EAChC,IAAI;IACF,OAAOD,OAAA,CAAQC,GAAA,KAAQI,mBAAA,CAAoBJ,GAAA,KAAQO,wBAAA,CAAyBP,GAAA;EAC9E,EAAE,OAAOY,CAAA,EAAG;IACV,OAAO;EACT;AACF","ignoreList":[]}
|