@payloadcms/next 3.0.0-beta.9 → 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.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +0 -1
- package/dist/config.js.map +1 -1
- package/dist/elements/DocumentHeader/Tabs/ShouldRenderTabs.d.ts +5 -0
- package/dist/elements/DocumentHeader/Tabs/ShouldRenderTabs.d.ts.map +1 -0
- package/dist/elements/DocumentHeader/Tabs/ShouldRenderTabs.js +19 -0
- package/dist/elements/DocumentHeader/Tabs/ShouldRenderTabs.js.map +1 -0
- package/dist/elements/DocumentHeader/Tabs/Tab/TabLink.d.ts +13 -0
- package/dist/elements/DocumentHeader/Tabs/Tab/TabLink.d.ts.map +1 -0
- package/dist/elements/DocumentHeader/Tabs/Tab/TabLink.js +112 -0
- package/dist/elements/DocumentHeader/Tabs/Tab/TabLink.js.map +1 -0
- package/dist/elements/DocumentHeader/Tabs/Tab/index.d.ts +8 -0
- package/dist/elements/DocumentHeader/Tabs/Tab/index.d.ts.map +1 -0
- package/dist/elements/DocumentHeader/Tabs/Tab/index.js +82 -0
- package/dist/elements/DocumentHeader/Tabs/Tab/index.js.map +1 -0
- package/dist/elements/DocumentHeader/Tabs/Tab/index.scss +93 -0
- package/dist/elements/DocumentHeader/Tabs/getCustomViews.d.ts +6 -0
- package/dist/elements/DocumentHeader/Tabs/getCustomViews.d.ts.map +1 -0
- package/dist/elements/DocumentHeader/Tabs/getCustomViews.js +34 -0
- package/dist/elements/DocumentHeader/Tabs/getCustomViews.js.map +1 -0
- package/dist/elements/DocumentHeader/Tabs/getViewConfig.d.ts +7 -0
- package/dist/elements/DocumentHeader/Tabs/getViewConfig.d.ts.map +1 -0
- package/dist/elements/DocumentHeader/Tabs/getViewConfig.js +17 -0
- package/dist/elements/DocumentHeader/Tabs/getViewConfig.js.map +1 -0
- package/dist/elements/DocumentHeader/Tabs/index.d.ts +12 -0
- package/dist/elements/DocumentHeader/Tabs/index.d.ts.map +1 -0
- package/dist/elements/DocumentHeader/Tabs/index.js +98 -0
- package/dist/elements/DocumentHeader/Tabs/index.js.map +1 -0
- package/dist/elements/DocumentHeader/Tabs/index.scss +52 -0
- package/dist/elements/DocumentHeader/Tabs/tabs/VersionsPill/index.d.ts +3 -0
- package/dist/elements/DocumentHeader/Tabs/tabs/VersionsPill/index.d.ts.map +1 -0
- package/dist/elements/DocumentHeader/Tabs/tabs/VersionsPill/index.js +40 -0
- package/dist/elements/DocumentHeader/Tabs/tabs/VersionsPill/index.js.map +1 -0
- package/dist/elements/DocumentHeader/Tabs/tabs/index.d.ts +9 -0
- package/dist/elements/DocumentHeader/Tabs/tabs/index.d.ts.map +1 -0
- package/dist/elements/DocumentHeader/Tabs/tabs/index.js +65 -0
- package/dist/elements/DocumentHeader/Tabs/tabs/index.js.map +1 -0
- package/dist/elements/DocumentHeader/index.d.ts +14 -0
- package/dist/elements/DocumentHeader/index.d.ts.map +1 -0
- package/dist/elements/DocumentHeader/index.js +31 -0
- package/dist/elements/DocumentHeader/index.js.map +1 -0
- package/dist/elements/DocumentHeader/index.scss +52 -0
- package/dist/elements/EmailAndUsername/index.d.ts +14 -0
- package/dist/elements/EmailAndUsername/index.d.ts.map +1 -0
- package/dist/elements/EmailAndUsername/index.js +121 -0
- package/dist/elements/EmailAndUsername/index.js.map +1 -0
- package/dist/elements/LeaveWithoutSaving/index.d.ts.map +1 -1
- package/dist/elements/LeaveWithoutSaving/index.js +153 -61
- package/dist/elements/LeaveWithoutSaving/index.js.map +1 -1
- package/dist/elements/LeaveWithoutSaving/index.scss +1 -0
- package/dist/elements/LeaveWithoutSaving/usePreventLeave.d.ts +2 -1
- package/dist/elements/LeaveWithoutSaving/usePreventLeave.d.ts.map +1 -1
- package/dist/elements/LeaveWithoutSaving/usePreventLeave.js +119 -99
- package/dist/elements/LeaveWithoutSaving/usePreventLeave.js.map +1 -1
- package/dist/elements/Logo/index.d.ts +4 -0
- package/dist/elements/Logo/index.d.ts.map +1 -0
- package/dist/elements/Logo/index.js +42 -0
- package/dist/elements/Logo/index.js.map +1 -0
- package/dist/elements/Nav/NavHamburger/index.d.ts +5 -0
- package/dist/elements/Nav/NavHamburger/index.d.ts.map +1 -0
- package/dist/elements/Nav/NavHamburger/index.js +48 -0
- package/dist/elements/Nav/NavHamburger/index.js.map +1 -0
- package/dist/elements/Nav/NavWrapper/index.d.ts +7 -0
- package/dist/elements/Nav/NavWrapper/index.d.ts.map +1 -0
- package/dist/elements/Nav/NavWrapper/index.js +55 -0
- package/dist/elements/Nav/NavWrapper/index.js.map +1 -0
- package/dist/elements/Nav/NavWrapper/index.scss +20 -0
- package/dist/elements/Nav/index.client.d.ts +3 -0
- package/dist/elements/Nav/index.client.d.ts.map +1 -0
- package/dist/elements/Nav/index.client.js +161 -0
- package/dist/elements/Nav/index.client.js.map +1 -0
- package/dist/elements/Nav/index.d.ts +6 -0
- package/dist/elements/Nav/index.d.ts.map +1 -0
- package/dist/elements/Nav/index.js +67 -0
- package/dist/elements/Nav/index.js.map +1 -0
- package/dist/elements/Nav/index.scss +156 -0
- package/dist/exports/layouts.js +0 -1
- package/dist/exports/layouts.js.map +1 -1
- package/dist/exports/routes.d.ts +1 -1
- package/dist/exports/routes.d.ts.map +1 -1
- package/dist/exports/routes.js +1 -2
- package/dist/exports/routes.js.map +1 -1
- package/dist/exports/templates.d.ts +3 -0
- package/dist/exports/templates.d.ts.map +1 -0
- package/dist/exports/templates.js +3 -0
- package/dist/exports/templates.js.map +1 -0
- package/dist/exports/utilities.d.ts +5 -1
- package/dist/exports/utilities.d.ts.map +1 -1
- package/dist/exports/utilities.js +5 -2
- package/dist/exports/utilities.js.map +1 -1
- package/dist/exports/views.d.ts +2 -1
- package/dist/exports/views.d.ts.map +1 -1
- package/dist/exports/views.js +2 -2
- package/dist/exports/views.js.map +1 -1
- package/dist/{next-fileupload → fetchAPI-multipart}/fileFactory.d.ts +2 -3
- package/dist/fetchAPI-multipart/fileFactory.d.ts.map +1 -0
- package/dist/fetchAPI-multipart/fileFactory.js +44 -0
- package/dist/fetchAPI-multipart/fileFactory.js.map +1 -0
- package/dist/{next-fileupload → fetchAPI-multipart}/handlers.d.ts +2 -3
- package/dist/fetchAPI-multipart/handlers.d.ts.map +1 -0
- package/dist/fetchAPI-multipart/handlers.js +85 -0
- package/dist/fetchAPI-multipart/handlers.js.map +1 -0
- package/dist/{next-fileupload → fetchAPI-multipart}/index.d.ts +10 -13
- package/dist/fetchAPI-multipart/index.d.ts.map +1 -0
- package/dist/fetchAPI-multipart/index.js +43 -0
- package/dist/fetchAPI-multipart/index.js.map +1 -0
- package/dist/fetchAPI-multipart/isEligibleRequest.d.ts.map +1 -0
- package/dist/fetchAPI-multipart/isEligibleRequest.js +18 -0
- package/dist/fetchAPI-multipart/isEligibleRequest.js.map +1 -0
- package/dist/fetchAPI-multipart/processMultipart.d.ts +8 -0
- package/dist/fetchAPI-multipart/processMultipart.d.ts.map +1 -0
- package/dist/fetchAPI-multipart/processMultipart.js +179 -0
- package/dist/fetchAPI-multipart/processMultipart.js.map +1 -0
- package/dist/fetchAPI-multipart/processNested.d.ts.map +1 -0
- package/dist/fetchAPI-multipart/processNested.js +27 -0
- package/dist/fetchAPI-multipart/processNested.js.map +1 -0
- package/dist/fetchAPI-multipart/uploadTimer.d.ts.map +1 -0
- package/dist/fetchAPI-multipart/uploadTimer.js +18 -0
- package/dist/fetchAPI-multipart/uploadTimer.js.map +1 -0
- package/dist/{next-fileupload → fetchAPI-multipart}/utilities.d.ts +4 -4
- package/dist/fetchAPI-multipart/utilities.d.ts.map +1 -0
- package/dist/fetchAPI-multipart/utilities.js +207 -0
- package/dist/fetchAPI-multipart/utilities.js.map +1 -0
- package/dist/{next-stream-file → fetchAPI-stream-file}/index.d.ts +0 -1
- package/dist/fetchAPI-stream-file/index.d.ts.map +1 -0
- package/dist/fetchAPI-stream-file/index.js +27 -0
- package/dist/fetchAPI-stream-file/index.js.map +1 -0
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/layouts/Root/index.d.ts +5 -5
- package/dist/layouts/Root/index.d.ts.map +1 -1
- package/dist/layouts/Root/index.js +118 -80
- package/dist/layouts/Root/index.js.map +1 -1
- package/dist/prod/styles.css +1 -1
- package/dist/routes/graphql/handler.d.ts +1 -1
- package/dist/routes/graphql/handler.d.ts.map +1 -1
- package/dist/routes/graphql/handler.js +113 -99
- 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.d.ts +1 -1
- package/dist/routes/graphql/playground.d.ts.map +1 -1
- package/dist/routes/graphql/playground.js +23 -24
- package/dist/routes/graphql/playground.js.map +1 -1
- package/dist/routes/index.d.ts +1 -1
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +1 -2
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/rest/auth/access.d.ts.map +1 -1
- package/dist/routes/rest/auth/access.js +21 -5
- package/dist/routes/rest/auth/access.js.map +1 -1
- package/dist/routes/rest/auth/forgotPassword.d.ts.map +1 -1
- package/dist/routes/rest/auth/forgotPassword.js +31 -18
- package/dist/routes/rest/auth/forgotPassword.js.map +1 -1
- package/dist/routes/rest/auth/init.d.ts.map +1 -1
- package/dist/routes/rest/auth/init.js +18 -10
- package/dist/routes/rest/auth/init.js.map +1 -1
- package/dist/routes/rest/auth/login.d.ts.map +1 -1
- package/dist/routes/rest/auth/login.js +46 -34
- package/dist/routes/rest/auth/login.js.map +1 -1
- package/dist/routes/rest/auth/logout.d.ts.map +1 -1
- package/dist/routes/rest/auth/logout.js +33 -25
- package/dist/routes/rest/auth/logout.js.map +1 -1
- package/dist/routes/rest/auth/me.d.ts.map +1 -1
- package/dist/routes/rest/auth/me.js +25 -19
- package/dist/routes/rest/auth/me.js.map +1 -1
- package/dist/routes/rest/auth/refresh.d.ts.map +1 -1
- package/dist/routes/rest/auth/refresh.js +31 -33
- package/dist/routes/rest/auth/refresh.js.map +1 -1
- package/dist/routes/rest/auth/registerFirstUser.d.ts.map +1 -1
- package/dist/routes/rest/auth/registerFirstUser.js +45 -31
- package/dist/routes/rest/auth/registerFirstUser.js.map +1 -1
- package/dist/routes/rest/auth/resetPassword.d.ts.map +1 -1
- package/dist/routes/rest/auth/resetPassword.js +40 -33
- package/dist/routes/rest/auth/resetPassword.js.map +1 -1
- package/dist/routes/rest/auth/unlock.d.ts.map +1 -1
- package/dist/routes/rest/auth/unlock.js +29 -16
- package/dist/routes/rest/auth/unlock.js.map +1 -1
- package/dist/routes/rest/auth/verifyEmail.d.ts.map +1 -1
- package/dist/routes/rest/auth/verifyEmail.js +24 -14
- package/dist/routes/rest/auth/verifyEmail.js.map +1 -1
- package/dist/routes/rest/buildFormState.d.ts +1 -3
- package/dist/routes/rest/buildFormState.d.ts.map +1 -1
- package/dist/routes/rest/buildFormState.js +41 -155
- package/dist/routes/rest/buildFormState.js.map +1 -1
- package/dist/routes/rest/checkEndpoints.d.ts.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.d.ts +3 -0
- package/dist/routes/rest/collections/count.d.ts.map +1 -0
- package/dist/routes/rest/collections/count.js +19 -0
- package/dist/routes/rest/collections/count.js.map +1 -0
- package/dist/routes/rest/collections/create.d.ts.map +1 -1
- package/dist/routes/rest/collections/create.js +33 -24
- package/dist/routes/rest/collections/create.js.map +1 -1
- package/dist/routes/rest/collections/delete.d.ts.map +1 -1
- package/dist/routes/rest/collections/delete.js +43 -31
- package/dist/routes/rest/collections/delete.js.map +1 -1
- package/dist/routes/rest/collections/deleteByID.d.ts.map +1 -1
- package/dist/routes/rest/collections/deleteByID.js +39 -27
- package/dist/routes/rest/collections/deleteByID.js.map +1 -1
- package/dist/routes/rest/collections/docAccess.d.ts.map +1 -1
- package/dist/routes/rest/collections/docAccess.js +19 -11
- package/dist/routes/rest/collections/docAccess.js.map +1 -1
- package/dist/routes/rest/collections/duplicate.d.ts.map +1 -1
- package/dist/routes/rest/collections/duplicate.js +39 -29
- package/dist/routes/rest/collections/duplicate.js.map +1 -1
- package/dist/routes/rest/collections/find.d.ts.map +1 -1
- package/dist/routes/rest/collections/find.js +32 -18
- package/dist/routes/rest/collections/find.js.map +1 -1
- package/dist/routes/rest/collections/findByID.d.ts.map +1 -1
- package/dist/routes/rest/collections/findByID.js +31 -21
- package/dist/routes/rest/collections/findByID.js.map +1 -1
- package/dist/routes/rest/collections/findVersionByID.d.ts.map +1 -1
- package/dist/routes/rest/collections/findVersionByID.js +30 -20
- package/dist/routes/rest/collections/findVersionByID.js.map +1 -1
- package/dist/routes/rest/collections/findVersions.d.ts.map +1 -1
- package/dist/routes/rest/collections/findVersions.js +30 -17
- package/dist/routes/rest/collections/findVersions.js.map +1 -1
- package/dist/routes/rest/collections/preview.d.ts.map +1 -1
- package/dist/routes/rest/collections/preview.js +42 -32
- package/dist/routes/rest/collections/preview.js.map +1 -1
- package/dist/routes/rest/collections/restoreVersion.d.ts.map +1 -1
- package/dist/routes/rest/collections/restoreVersion.js +35 -23
- package/dist/routes/rest/collections/restoreVersion.js.map +1 -1
- package/dist/routes/rest/collections/update.d.ts.map +1 -1
- package/dist/routes/rest/collections/update.js +46 -33
- package/dist/routes/rest/collections/update.js.map +1 -1
- package/dist/routes/rest/collections/updateByID.d.ts.map +1 -1
- package/dist/routes/rest/collections/updateByID.js +41 -31
- package/dist/routes/rest/collections/updateByID.js.map +1 -1
- package/dist/routes/rest/files/checkFileAccess.d.ts +2 -2
- package/dist/routes/rest/files/checkFileAccess.d.ts.map +1 -1
- package/dist/routes/rest/files/checkFileAccess.js +47 -45
- package/dist/routes/rest/files/checkFileAccess.js.map +1 -1
- package/dist/routes/rest/files/getFile.d.ts +1 -1
- package/dist/routes/rest/files/getFile.d.ts.map +1 -1
- package/dist/routes/rest/files/getFile.js +57 -43
- package/dist/routes/rest/files/getFile.js.map +1 -1
- package/dist/routes/rest/files/getFileTypeFallback.d.ts +7 -0
- package/dist/routes/rest/files/getFileTypeFallback.d.ts.map +1 -0
- package/dist/routes/rest/files/getFileTypeFallback.js +20 -0
- package/dist/routes/rest/files/getFileTypeFallback.js.map +1 -0
- package/dist/routes/rest/globals/docAccess.d.ts.map +1 -1
- package/dist/routes/rest/globals/docAccess.js +17 -10
- package/dist/routes/rest/globals/docAccess.js.map +1 -1
- package/dist/routes/rest/globals/findOne.d.ts.map +1 -1
- package/dist/routes/rest/globals/findOne.js +25 -16
- package/dist/routes/rest/globals/findOne.js.map +1 -1
- package/dist/routes/rest/globals/findVersionByID.d.ts.map +1 -1
- package/dist/routes/rest/globals/findVersionByID.js +25 -15
- package/dist/routes/rest/globals/findVersionByID.js.map +1 -1
- package/dist/routes/rest/globals/findVersions.d.ts.map +1 -1
- package/dist/routes/rest/globals/findVersions.js +30 -17
- package/dist/routes/rest/globals/findVersions.js.map +1 -1
- package/dist/routes/rest/globals/preview.d.ts.map +1 -1
- package/dist/routes/rest/globals/preview.js +41 -32
- package/dist/routes/rest/globals/preview.js.map +1 -1
- package/dist/routes/rest/globals/restoreVersion.d.ts.map +1 -1
- package/dist/routes/rest/globals/restoreVersion.js +30 -18
- package/dist/routes/rest/globals/restoreVersion.js.map +1 -1
- package/dist/routes/rest/globals/update.d.ts.map +1 -1
- package/dist/routes/rest/globals/update.js +35 -26
- package/dist/routes/rest/globals/update.js.map +1 -1
- package/dist/routes/rest/index.d.ts +2 -1
- package/dist/routes/rest/index.d.ts.map +1 -1
- package/dist/routes/rest/index.js +659 -483
- package/dist/routes/rest/index.js.map +1 -1
- package/dist/routes/rest/og/image.d.ts +10 -0
- package/dist/routes/rest/og/image.d.ts.map +1 -0
- package/dist/routes/rest/og/image.js +81 -0
- package/dist/routes/rest/og/image.js.map +1 -0
- package/dist/routes/rest/og/index.d.ts +11 -0
- package/dist/routes/rest/og/index.d.ts.map +1 -0
- package/dist/routes/rest/og/index.js +78 -0
- package/dist/routes/rest/og/index.js.map +1 -0
- package/dist/routes/rest/og/roboto-regular.woff +0 -0
- package/dist/routes/rest/routeError.d.ts +6 -5
- package/dist/routes/rest/routeError.d.ts.map +1 -1
- package/dist/routes/rest/routeError.js +105 -84
- package/dist/routes/rest/routeError.js.map +1 -1
- package/dist/routes/rest/types.d.ts +1 -1
- package/dist/routes/rest/types.d.ts.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.d.ts +1 -1
- package/dist/routes/rest/utilities/sanitizeCollectionID.d.ts.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 +14 -19
- package/dist/scss/colors.scss +76 -76
- package/dist/scss/toastify.scss +1 -0
- package/dist/scss/toasts.scss +142 -0
- package/dist/scss/type.scss +19 -27
- package/dist/scss/vars.scss +26 -47
- package/dist/templates/Default/NavHamburger/index.d.ts +3 -0
- package/dist/templates/Default/NavHamburger/index.d.ts.map +1 -0
- package/dist/templates/Default/NavHamburger/index.js +25 -0
- package/dist/templates/Default/NavHamburger/index.js.map +1 -0
- package/dist/templates/Default/Wrapper/index.d.ts +8 -0
- package/dist/templates/Default/Wrapper/index.d.ts.map +1 -0
- package/dist/templates/Default/Wrapper/index.js +49 -0
- package/dist/templates/Default/Wrapper/index.js.map +1 -0
- package/dist/templates/Default/Wrapper/index.scss +57 -0
- package/dist/templates/Default/index.d.ts +10 -0
- package/dist/templates/Default/index.d.ts.map +1 -0
- package/dist/templates/Default/index.js +66 -0
- package/dist/templates/Default/index.js.map +1 -0
- package/dist/templates/Default/index.scss +67 -0
- package/dist/templates/Minimal/index.d.ts +10 -0
- package/dist/templates/Minimal/index.d.ts.map +1 -0
- package/dist/templates/Minimal/index.js +21 -0
- package/dist/templates/Minimal/index.js.map +1 -0
- package/dist/templates/Minimal/index.scss +28 -0
- package/dist/utilities/addDataAndFileToRequest.d.ts +8 -0
- package/dist/utilities/addDataAndFileToRequest.d.ts.map +1 -0
- package/dist/utilities/addDataAndFileToRequest.js +47 -0
- package/dist/utilities/addDataAndFileToRequest.js.map +1 -0
- package/dist/utilities/addLocalesToRequest.d.ts +17 -0
- package/dist/utilities/addLocalesToRequest.d.ts.map +1 -0
- package/dist/utilities/addLocalesToRequest.js +51 -0
- package/dist/utilities/addLocalesToRequest.js.map +1 -0
- package/dist/utilities/createPayloadRequest.d.ts +1 -1
- package/dist/utilities/createPayloadRequest.d.ts.map +1 -1
- package/dist/utilities/createPayloadRequest.js +88 -85
- package/dist/utilities/createPayloadRequest.js.map +1 -1
- package/dist/utilities/getNextRequestI18n.d.ts +5 -5
- package/dist/utilities/getNextRequestI18n.d.ts.map +1 -1
- package/dist/utilities/getNextRequestI18n.js +15 -11
- package/dist/utilities/getNextRequestI18n.js.map +1 -1
- package/dist/utilities/getPayloadHMR.d.ts +3 -3
- package/dist/utilities/getPayloadHMR.d.ts.map +1 -1
- package/dist/utilities/getPayloadHMR.js +94 -65
- package/dist/utilities/getPayloadHMR.js.map +1 -1
- package/dist/utilities/getRequestLanguage.d.ts +2 -2
- package/dist/utilities/getRequestLanguage.d.ts.map +1 -1
- package/dist/utilities/getRequestLanguage.js +16 -14
- 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.d.ts +11 -0
- package/dist/utilities/getRequestTheme.d.ts.map +1 -0
- package/dist/utilities/getRequestTheme.js +19 -0
- package/dist/utilities/getRequestTheme.js.map +1 -0
- package/dist/utilities/headersWithCors.d.ts +8 -0
- package/dist/utilities/headersWithCors.d.ts.map +1 -0
- package/dist/utilities/headersWithCors.js +24 -0
- package/dist/utilities/headersWithCors.js.map +1 -0
- package/dist/utilities/initPage/handleAdminPage.d.ts +16 -0
- package/dist/utilities/initPage/handleAdminPage.d.ts.map +1 -0
- package/dist/utilities/initPage/handleAdminPage.js +52 -0
- package/dist/utilities/initPage/handleAdminPage.js.map +1 -0
- package/dist/utilities/initPage/handleAuthRedirect.d.ts +9 -0
- package/dist/utilities/initPage/handleAuthRedirect.d.ts.map +1 -0
- package/dist/utilities/initPage/handleAuthRedirect.js +52 -0
- package/dist/utilities/initPage/handleAuthRedirect.js.map +1 -0
- package/dist/utilities/initPage/index.d.ts +4 -0
- package/dist/utilities/initPage/index.d.ts.map +1 -0
- package/dist/utilities/initPage/index.js +160 -0
- package/dist/utilities/initPage/index.js.map +1 -0
- package/dist/utilities/initPage/shared.d.ts +16 -0
- package/dist/utilities/initPage/shared.d.ts.map +1 -0
- package/dist/utilities/initPage/shared.js +30 -0
- package/dist/utilities/initPage/shared.js.map +1 -0
- package/dist/utilities/initPage/types.d.ts +25 -0
- package/dist/utilities/initPage/types.d.ts.map +1 -0
- package/dist/utilities/initPage/types.js +2 -0
- package/dist/utilities/initPage/types.js.map +1 -0
- package/dist/utilities/mergeHeaders.d.ts +2 -0
- package/dist/utilities/mergeHeaders.d.ts.map +1 -0
- package/dist/utilities/mergeHeaders.js +10 -0
- package/dist/utilities/mergeHeaders.js.map +1 -0
- package/dist/utilities/meta.d.ts +3 -7
- package/dist/utilities/meta.d.ts.map +1 -1
- package/dist/utilities/meta.js +70 -33
- 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 +9 -0
- package/dist/views/API/LocaleSelector/index.d.ts.map +1 -0
- package/dist/views/API/LocaleSelector/index.js +44 -0
- package/dist/views/API/LocaleSelector/index.js.map +1 -0
- package/dist/views/API/RenderJSON/index.js +116 -72
- package/dist/views/API/RenderJSON/index.js.map +1 -1
- package/dist/views/API/index.client.d.ts.map +1 -1
- package/dist/views/API/index.client.js +193 -178
- package/dist/views/API/index.client.js.map +1 -1
- package/dist/views/API/index.d.ts +2 -2
- package/dist/views/API/index.d.ts.map +1 -1
- package/dist/views/API/index.js +3 -3
- package/dist/views/API/index.js.map +1 -1
- package/dist/views/API/index.scss +1 -2
- package/dist/views/API/meta.d.ts.map +1 -1
- package/dist/views/API/meta.js +23 -8
- package/dist/views/API/meta.js.map +1 -1
- package/dist/views/Account/Settings/LanguageSelector.d.ts +6 -0
- package/dist/views/Account/Settings/LanguageSelector.d.ts.map +1 -0
- package/dist/views/Account/Settings/LanguageSelector.js +52 -0
- package/dist/views/Account/Settings/LanguageSelector.js.map +1 -0
- package/dist/views/Account/Settings/index.d.ts +5 -1
- package/dist/views/Account/Settings/index.d.ts.map +1 -1
- package/dist/views/Account/Settings/index.js +23 -25
- package/dist/views/Account/Settings/index.js.map +1 -1
- package/dist/views/Account/ToggleTheme/index.d.ts.map +1 -1
- package/dist/views/Account/ToggleTheme/index.js +52 -30
- package/dist/views/Account/ToggleTheme/index.js.map +1 -1
- package/dist/views/Account/index.client.d.ts +3 -0
- package/dist/views/Account/index.client.d.ts.map +1 -0
- package/dist/views/Account/index.client.js +37 -0
- package/dist/views/Account/index.client.js.map +1 -0
- package/dist/views/Account/index.d.ts +1 -1
- package/dist/views/Account/index.d.ts.map +1 -1
- package/dist/views/Account/index.js +106 -48
- package/dist/views/Account/index.js.map +1 -1
- package/dist/views/Account/meta.d.ts.map +1 -1
- package/dist/views/Account/meta.js +12 -9
- package/dist/views/Account/meta.js.map +1 -1
- package/dist/views/CreateFirstUser/index.client.d.ts +4 -3
- package/dist/views/CreateFirstUser/index.client.d.ts.map +1 -1
- package/dist/views/CreateFirstUser/index.client.js +96 -12
- package/dist/views/CreateFirstUser/index.client.js.map +1 -1
- package/dist/views/CreateFirstUser/index.d.ts +1 -1
- package/dist/views/CreateFirstUser/index.d.ts.map +1 -1
- package/dist/views/CreateFirstUser/index.js +44 -58
- package/dist/views/CreateFirstUser/index.js.map +1 -1
- package/dist/views/CreateFirstUser/index.scss +6 -12
- package/dist/views/CreateFirstUser/meta.d.ts.map +1 -1
- package/dist/views/CreateFirstUser/meta.js +12 -9
- package/dist/views/CreateFirstUser/meta.js.map +1 -1
- package/dist/views/Dashboard/Default/index.d.ts +4 -4
- package/dist/views/Dashboard/Default/index.d.ts.map +1 -1
- package/dist/views/Dashboard/Default/index.js +138 -25
- package/dist/views/Dashboard/Default/index.js.map +1 -1
- package/dist/views/Dashboard/Default/index.scss +11 -7
- package/dist/views/Dashboard/index.d.ts +1 -1
- package/dist/views/Dashboard/index.d.ts.map +1 -1
- package/dist/views/Dashboard/index.js +63 -19
- package/dist/views/Dashboard/index.js.map +1 -1
- package/dist/views/Dashboard/meta.d.ts.map +1 -1
- package/dist/views/Dashboard/meta.js +16 -9
- package/dist/views/Dashboard/meta.js.map +1 -1
- package/dist/views/Document/getCustomViewByKey.d.ts +2 -3
- package/dist/views/Document/getCustomViewByKey.d.ts.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.d.ts +6 -4
- package/dist/views/Document/getCustomViewByRoute.d.ts.map +1 -1
- package/dist/views/Document/getCustomViewByRoute.js +30 -17
- package/dist/views/Document/getCustomViewByRoute.js.map +1 -1
- package/dist/views/Document/getDocumentData.d.ts +10 -0
- package/dist/views/Document/getDocumentData.d.ts.map +1 -0
- package/dist/views/Document/getDocumentData.js +38 -0
- package/dist/views/Document/getDocumentData.js.map +1 -0
- package/dist/views/Document/getDocumentPermissions.d.ts +13 -0
- package/dist/views/Document/getDocumentPermissions.d.ts.map +1 -0
- package/dist/views/Document/getDocumentPermissions.js +91 -0
- package/dist/views/Document/getDocumentPermissions.js.map +1 -0
- package/dist/views/Document/getMetaBySegment.d.ts +4 -4
- package/dist/views/Document/getMetaBySegment.d.ts.map +1 -1
- package/dist/views/Document/getMetaBySegment.js +114 -63
- package/dist/views/Document/getMetaBySegment.js.map +1 -1
- package/dist/views/Document/getViewsFromConfig.d.ts +18 -9
- package/dist/views/Document/getViewsFromConfig.d.ts.map +1 -1
- package/dist/views/Document/getViewsFromConfig.js +310 -226
- package/dist/views/Document/getViewsFromConfig.js.map +1 -1
- package/dist/views/Document/index.d.ts +1 -1
- package/dist/views/Document/index.d.ts.map +1 -1
- package/dist/views/Document/index.js +201 -143
- 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.d.ts +2 -1
- package/dist/views/Edit/Default/Auth/APIKey.d.ts.map +1 -1
- package/dist/views/Edit/Default/Auth/APIKey.js +116 -84
- package/dist/views/Edit/Default/Auth/APIKey.js.map +1 -1
- package/dist/views/Edit/Default/Auth/index.d.ts.map +1 -1
- package/dist/views/Edit/Default/Auth/index.js +299 -121
- package/dist/views/Edit/Default/Auth/index.js.map +1 -1
- package/dist/views/Edit/Default/Auth/index.scss +17 -2
- package/dist/views/Edit/Default/Auth/types.d.ts +5 -2
- package/dist/views/Edit/Default/Auth/types.d.ts.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/{SetStepNav → SetDocumentStepNav}/index.d.ts +2 -3
- package/dist/views/Edit/Default/SetDocumentStepNav/index.d.ts.map +1 -0
- package/dist/views/Edit/Default/SetDocumentStepNav/index.js +130 -0
- package/dist/views/Edit/Default/SetDocumentStepNav/index.js.map +1 -0
- package/dist/views/Edit/Default/SetDocumentTitle/index.d.ts +1 -2
- package/dist/views/Edit/Default/SetDocumentTitle/index.d.ts.map +1 -1
- package/dist/views/Edit/Default/SetDocumentTitle/index.js +76 -33
- package/dist/views/Edit/Default/SetDocumentTitle/index.js.map +1 -1
- package/dist/views/Edit/Default/index.d.ts.map +1 -1
- package/dist/views/Edit/Default/index.js +194 -176
- package/dist/views/Edit/Default/index.js.map +1 -1
- package/dist/views/Edit/Default/index.scss +2 -2
- package/dist/views/Edit/Default/types.d.ts +1 -1
- package/dist/views/Edit/Default/types.d.ts.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.d.ts.map +1 -1
- package/dist/views/Edit/index.client.js +48 -17
- package/dist/views/Edit/index.client.js.map +1 -1
- package/dist/views/Edit/index.d.ts +2 -2
- package/dist/views/Edit/index.d.ts.map +1 -1
- package/dist/views/Edit/index.js +3 -3
- package/dist/views/Edit/index.js.map +1 -1
- package/dist/views/Edit/meta.d.ts.map +1 -1
- package/dist/views/Edit/meta.js +43 -22
- package/dist/views/Edit/meta.js.map +1 -1
- package/dist/views/Edit/sanitizeEditViewProps.d.ts +1 -1
- package/dist/views/Edit/sanitizeEditViewProps.d.ts.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.d.ts +3 -0
- package/dist/views/ForgotPassword/ForgotPasswordForm/index.d.ts.map +1 -0
- package/dist/views/ForgotPassword/ForgotPasswordForm/index.js +165 -0
- package/dist/views/ForgotPassword/ForgotPasswordForm/index.js.map +1 -0
- package/dist/views/ForgotPassword/index.d.ts +1 -1
- package/dist/views/ForgotPassword/index.d.ts.map +1 -1
- package/dist/views/ForgotPassword/index.js +65 -61
- package/dist/views/ForgotPassword/index.js.map +1 -1
- package/dist/views/ForgotPassword/meta.d.ts.map +1 -1
- package/dist/views/ForgotPassword/meta.js +12 -9
- package/dist/views/ForgotPassword/meta.js.map +1 -1
- package/dist/views/List/Default/index.d.ts.map +1 -1
- package/dist/views/List/Default/index.js +350 -136
- package/dist/views/List/Default/index.js.map +1 -1
- package/dist/views/List/Default/index.scss +9 -27
- package/dist/views/List/Default/types.d.ts +2 -2
- package/dist/views/List/Default/types.d.ts.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.d.ts +1 -1
- package/dist/views/List/index.d.ts.map +1 -1
- package/dist/views/List/index.js +158 -97
- package/dist/views/List/index.js.map +1 -1
- package/dist/views/List/meta.d.ts +3 -3
- package/dist/views/List/meta.d.ts.map +1 -1
- package/dist/views/List/meta.js +20 -15
- 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 +6 -5
- 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.d.ts +3 -4
- package/dist/views/LivePreview/Context/index.d.ts.map +1 -1
- package/dist/views/LivePreview/Context/index.js +136 -141
- 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.d.ts.map +1 -1
- package/dist/views/LivePreview/Device/index.js +80 -43
- package/dist/views/LivePreview/Device/index.js.map +1 -1
- package/dist/views/LivePreview/DeviceContainer/index.js +49 -23
- package/dist/views/LivePreview/DeviceContainer/index.js.map +1 -1
- package/dist/views/LivePreview/IFrame/index.js +22 -16
- package/dist/views/LivePreview/IFrame/index.js.map +1 -1
- package/dist/views/LivePreview/Preview/index.d.ts +1 -1
- package/dist/views/LivePreview/Preview/index.d.ts.map +1 -1
- package/dist/views/LivePreview/Preview/index.js +152 -67
- package/dist/views/LivePreview/Preview/index.js.map +1 -1
- package/dist/views/LivePreview/Toolbar/Controls/index.d.ts +1 -1
- package/dist/views/LivePreview/Toolbar/Controls/index.d.ts.map +1 -1
- package/dist/views/LivePreview/Toolbar/Controls/index.js +130 -63
- package/dist/views/LivePreview/Toolbar/Controls/index.js.map +1 -1
- package/dist/views/LivePreview/Toolbar/SizeInput/index.js +90 -51
- package/dist/views/LivePreview/Toolbar/SizeInput/index.js.map +1 -1
- package/dist/views/LivePreview/Toolbar/index.d.ts +3 -3
- package/dist/views/LivePreview/Toolbar/index.d.ts.map +1 -1
- package/dist/views/LivePreview/Toolbar/index.js +82 -35
- package/dist/views/LivePreview/Toolbar/index.js.map +1 -1
- package/dist/views/LivePreview/ToolbarArea/index.js +33 -9
- package/dist/views/LivePreview/ToolbarArea/index.js.map +1 -1
- package/dist/views/LivePreview/index.client.d.ts +4 -5
- package/dist/views/LivePreview/index.client.d.ts.map +1 -1
- package/dist/views/LivePreview/index.client.js +322 -150
- package/dist/views/LivePreview/index.client.js.map +1 -1
- package/dist/views/LivePreview/index.d.ts +2 -2
- package/dist/views/LivePreview/index.d.ts.map +1 -1
- package/dist/views/LivePreview/index.js +68 -55
- package/dist/views/LivePreview/index.js.map +1 -1
- package/dist/views/LivePreview/meta.d.ts.map +1 -1
- package/dist/views/LivePreview/meta.js +15 -25
- package/dist/views/LivePreview/meta.js.map +1 -1
- package/dist/views/LivePreview/usePopupWindow.d.ts +3 -2
- package/dist/views/LivePreview/usePopupWindow.d.ts.map +1 -1
- package/dist/views/LivePreview/usePopupWindow.js +92 -95
- package/dist/views/LivePreview/usePopupWindow.js.map +1 -1
- package/dist/views/Login/LoginField/index.d.ts +9 -0
- package/dist/views/Login/LoginField/index.d.ts.map +1 -0
- package/dist/views/Login/LoginField/index.js +93 -0
- package/dist/views/Login/LoginField/index.js.map +1 -0
- package/dist/views/Login/LoginForm/index.d.ts +3 -0
- package/dist/views/Login/LoginForm/index.d.ts.map +1 -1
- package/dist/views/Login/LoginForm/index.js +138 -49
- package/dist/views/Login/LoginForm/index.js.map +1 -1
- package/dist/views/Login/index.d.ts +1 -1
- package/dist/views/Login/index.d.ts.map +1 -1
- package/dist/views/Login/index.js +80 -20
- package/dist/views/Login/index.js.map +1 -1
- package/dist/views/Login/meta.d.ts.map +1 -1
- package/dist/views/Login/meta.js +12 -9
- package/dist/views/Login/meta.js.map +1 -1
- package/dist/views/Logout/LogoutClient.d.ts.map +1 -1
- package/dist/views/Logout/LogoutClient.js +88 -27
- package/dist/views/Logout/LogoutClient.js.map +1 -1
- package/dist/views/Logout/index.d.ts +3 -3
- package/dist/views/Logout/index.d.ts.map +1 -1
- package/dist/views/Logout/index.js +30 -18
- package/dist/views/Logout/index.js.map +1 -1
- package/dist/views/Logout/meta.d.ts.map +1 -1
- package/dist/views/Logout/meta.js +11 -9
- package/dist/views/Logout/meta.js.map +1 -1
- package/dist/views/NotFound/index.client.d.ts.map +1 -1
- package/dist/views/NotFound/index.client.js +81 -34
- package/dist/views/NotFound/index.client.js.map +1 -1
- package/dist/views/NotFound/index.d.ts +4 -3
- package/dist/views/NotFound/index.d.ts.map +1 -1
- package/dist/views/NotFound/index.js +52 -31
- package/dist/views/NotFound/index.js.map +1 -1
- package/dist/views/NotFound/meta.d.ts +3 -3
- package/dist/views/NotFound/meta.d.ts.map +1 -1
- package/dist/views/NotFound/meta.js +9 -9
- package/dist/views/NotFound/meta.js.map +1 -1
- package/dist/views/ResetPassword/index.client.d.ts +7 -0
- package/dist/views/ResetPassword/index.client.d.ts.map +1 -0
- package/dist/views/ResetPassword/index.client.js +110 -0
- package/dist/views/ResetPassword/index.client.js.map +1 -0
- package/dist/views/ResetPassword/index.d.ts +1 -1
- package/dist/views/ResetPassword/index.d.ts.map +1 -1
- package/dist/views/ResetPassword/index.js +72 -58
- package/dist/views/ResetPassword/index.js.map +1 -1
- package/dist/views/ResetPassword/index.scss +2 -12
- package/dist/views/ResetPassword/meta.d.ts.map +1 -1
- package/dist/views/ResetPassword/meta.js +12 -9
- package/dist/views/ResetPassword/meta.js.map +1 -1
- package/dist/views/Root/generateCustomViewMetadata.d.ts +11 -0
- package/dist/views/Root/generateCustomViewMetadata.d.ts.map +1 -0
- package/dist/views/Root/generateCustomViewMetadata.js +25 -0
- package/dist/views/Root/generateCustomViewMetadata.js.map +1 -0
- package/dist/views/Root/getCustomViewByRoute.d.ts +7 -2
- package/dist/views/Root/getCustomViewByRoute.d.ts.map +1 -1
- package/dist/views/Root/getCustomViewByRoute.js +45 -16
- package/dist/views/Root/getCustomViewByRoute.js.map +1 -1
- package/dist/views/Root/getViewFromConfig.d.ts +12 -7
- package/dist/views/Root/getViewFromConfig.d.ts.map +1 -1
- package/dist/views/Root/getViewFromConfig.js +164 -120
- package/dist/views/Root/getViewFromConfig.js.map +1 -1
- package/dist/views/Root/index.d.ts +9 -7
- package/dist/views/Root/index.d.ts.map +1 -1
- package/dist/views/Root/index.js +104 -42
- 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.d.ts +1 -1
- package/dist/views/Root/meta.d.ts.map +1 -1
- package/dist/views/Root/meta.js +143 -140
- package/dist/views/Root/meta.js.map +1 -1
- package/dist/views/Unauthorized/index.d.ts +2 -2
- package/dist/views/Unauthorized/index.d.ts.map +1 -1
- package/dist/views/Unauthorized/index.js +34 -13
- package/dist/views/Unauthorized/index.js.map +1 -1
- package/dist/views/Unauthorized/meta.d.ts.map +1 -1
- package/dist/views/Unauthorized/meta.js +12 -9
- package/dist/views/Unauthorized/meta.js.map +1 -1
- package/dist/views/Verify/index.d.ts +1 -1
- package/dist/views/Verify/index.d.ts.map +1 -1
- package/dist/views/Verify/index.js +62 -25
- package/dist/views/Verify/index.js.map +1 -1
- package/dist/views/Verify/meta.d.ts.map +1 -1
- package/dist/views/Verify/meta.js +12 -9
- package/dist/views/Verify/meta.js.map +1 -1
- package/dist/views/Version/Default/SetStepNav.d.ts +8 -10
- package/dist/views/Version/Default/SetStepNav.d.ts.map +1 -1
- package/dist/views/Version/Default/SetStepNav.js +150 -94
- package/dist/views/Version/Default/SetStepNav.js.map +1 -1
- package/dist/views/Version/Default/index.d.ts.map +1 -1
- package/dist/views/Version/Default/index.js +202 -103
- package/dist/views/Version/Default/index.js.map +1 -1
- package/dist/views/Version/Default/types.d.ts +9 -11
- package/dist/views/Version/Default/types.d.ts.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 +7 -4
- package/dist/views/Version/RenderFieldsToDiff/Label/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.d.ts +2 -2
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js +57 -46
- package/dist/views/Version/RenderFieldsToDiff/fields/Iterable/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Nested/index.d.ts +2 -2
- package/dist/views/Version/RenderFieldsToDiff/fields/Nested/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Nested/index.js +29 -14
- package/dist/views/Version/RenderFieldsToDiff/fields/Nested/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.d.ts +3 -2
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js +113 -52
- package/dist/views/Version/RenderFieldsToDiff/fields/Relationship/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/DiffViewer/index.js +18 -11
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/DiffViewer/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.d.ts +3 -6
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js +41 -28
- package/dist/views/Version/RenderFieldsToDiff/fields/Select/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.d.ts +3 -6
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js +39 -28
- package/dist/views/Version/RenderFieldsToDiff/fields/Tabs/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/DiffViewer/index.js +18 -11
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/DiffViewer/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.d.ts +3 -2
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/Text/index.js +35 -21
- 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.d.ts +21 -58
- package/dist/views/Version/RenderFieldsToDiff/fields/index.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/fields/index.js +22 -22
- 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.d.ts +16 -17
- package/dist/views/Version/RenderFieldsToDiff/fields/types.d.ts.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.d.ts.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/index.js +102 -90
- package/dist/views/Version/RenderFieldsToDiff/index.js.map +1 -1
- package/dist/views/Version/RenderFieldsToDiff/types.d.ts +12 -13
- package/dist/views/Version/RenderFieldsToDiff/types.d.ts.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.d.ts.map +1 -1
- package/dist/views/Version/Restore/index.js +113 -64
- package/dist/views/Version/Restore/index.js.map +1 -1
- package/dist/views/Version/Restore/index.scss +35 -2
- package/dist/views/Version/Restore/types.d.ts +2 -1
- package/dist/views/Version/Restore/types.d.ts.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.d.ts.map +1 -1
- package/dist/views/Version/SelectComparison/index.js +136 -119
- package/dist/views/Version/SelectComparison/index.js.map +1 -1
- package/dist/views/Version/SelectComparison/index.scss +1 -1
- package/dist/views/Version/SelectComparison/types.d.ts +3 -3
- package/dist/views/Version/SelectComparison/types.d.ts.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.d.ts.map +1 -1
- package/dist/views/Version/SelectLocales/index.js +59 -26
- package/dist/views/Version/SelectLocales/index.js.map +1 -1
- package/dist/views/Version/SelectLocales/types.d.ts +1 -1
- package/dist/views/Version/SelectLocales/types.d.ts.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.d.ts +2 -2
- package/dist/views/Version/index.d.ts.map +1 -1
- package/dist/views/Version/index.js +129 -95
- package/dist/views/Version/index.js.map +1 -1
- package/dist/views/Version/meta.d.ts.map +1 -1
- package/dist/views/Version/meta.js +51 -37
- package/dist/views/Version/meta.js.map +1 -1
- package/dist/views/Versions/buildColumns.d.ts +5 -3
- package/dist/views/Versions/buildColumns.d.ts.map +1 -1
- package/dist/views/Versions/buildColumns.js +89 -56
- package/dist/views/Versions/buildColumns.js.map +1 -1
- package/dist/views/Versions/cells/AutosaveCell/index.d.ts +7 -1
- package/dist/views/Versions/cells/AutosaveCell/index.d.ts.map +1 -1
- package/dist/views/Versions/cells/AutosaveCell/index.js +75 -10
- package/dist/views/Versions/cells/AutosaveCell/index.js.map +1 -1
- package/dist/views/Versions/cells/CreatedAt/index.d.ts.map +1 -1
- package/dist/views/Versions/cells/CreatedAt/index.js +75 -16
- package/dist/views/Versions/cells/CreatedAt/index.js.map +1 -1
- package/dist/views/Versions/cells/ID/index.js +20 -5
- package/dist/views/Versions/cells/ID/index.js.map +1 -1
- package/dist/views/Versions/getLatestVersion.d.ts +14 -0
- package/dist/views/Versions/getLatestVersion.d.ts.map +1 -0
- package/dist/views/Versions/getLatestVersion.js +38 -0
- package/dist/views/Versions/getLatestVersion.js.map +1 -0
- package/dist/views/Versions/index.client.d.ts +6 -6
- package/dist/views/Versions/index.client.d.ts.map +1 -1
- package/dist/views/Versions/index.client.js +81 -51
- package/dist/views/Versions/index.client.js.map +1 -1
- package/dist/views/Versions/index.d.ts +2 -2
- package/dist/views/Versions/index.d.ts.map +1 -1
- package/dist/views/Versions/index.js +154 -83
- package/dist/views/Versions/index.js.map +1 -1
- package/dist/views/Versions/meta.d.ts.map +1 -1
- package/dist/views/Versions/meta.js +44 -29
- package/dist/views/Versions/meta.js.map +1 -1
- package/dist/views/Versions/types.d.ts +1 -3
- package/dist/views/Versions/types.d.ts.map +1 -1
- package/dist/views/Versions/types.js +1 -2
- package/dist/views/Versions/types.js.map +1 -1
- package/dist/withPayload.d.ts +1 -1
- package/dist/withPayload.d.ts.map +1 -1
- package/dist/withPayload.js +84 -68
- package/dist/withPayload.js.map +1 -1
- package/package.json +79 -51
- package/dist/cjs/withPayload.cjs +0 -95
- package/dist/cjs/withPayload.cjs.map +0 -1
- package/dist/next-fileupload/fileFactory.d.ts.map +0 -1
- package/dist/next-fileupload/fileFactory.js +0 -43
- package/dist/next-fileupload/fileFactory.js.map +0 -1
- package/dist/next-fileupload/handlers.d.ts.map +0 -1
- package/dist/next-fileupload/handlers.js +0 -86
- package/dist/next-fileupload/handlers.js.map +0 -1
- package/dist/next-fileupload/index.d.ts.map +0 -1
- package/dist/next-fileupload/index.js +0 -43
- package/dist/next-fileupload/index.js.map +0 -1
- package/dist/next-fileupload/isEligibleRequest.d.ts.map +0 -1
- package/dist/next-fileupload/isEligibleRequest.js +0 -26
- package/dist/next-fileupload/isEligibleRequest.js.map +0 -1
- package/dist/next-fileupload/processMultipart.d.ts +0 -8
- package/dist/next-fileupload/processMultipart.d.ts.map +0 -1
- package/dist/next-fileupload/processMultipart.js +0 -133
- package/dist/next-fileupload/processMultipart.js.map +0 -1
- package/dist/next-fileupload/processNested.d.ts.map +0 -1
- package/dist/next-fileupload/processNested.js +0 -24
- package/dist/next-fileupload/processNested.js.map +0 -1
- package/dist/next-fileupload/uploadTimer.d.ts.map +0 -1
- package/dist/next-fileupload/uploadTimer.js +0 -19
- package/dist/next-fileupload/uploadTimer.js.map +0 -1
- package/dist/next-fileupload/utilities.d.ts.map +0 -1
- package/dist/next-fileupload/utilities.js +0 -207
- package/dist/next-fileupload/utilities.js.map +0 -1
- package/dist/next-stream-file/index.d.ts.map +0 -1
- package/dist/next-stream-file/index.js +0 -25
- package/dist/next-stream-file/index.js.map +0 -1
- package/dist/prod/payload/favicon.svg +0 -15
- package/dist/prod/payload/og-image.png +0 -0
- package/dist/utilities/buildFieldSchemaMap/index.d.ts +0 -4
- package/dist/utilities/buildFieldSchemaMap/index.d.ts.map +0 -1
- package/dist/utilities/buildFieldSchemaMap/index.js +0 -28
- package/dist/utilities/buildFieldSchemaMap/index.js.map +0 -1
- package/dist/utilities/buildFieldSchemaMap/traverseFields.d.ts +0 -14
- package/dist/utilities/buildFieldSchemaMap/traverseFields.d.ts.map +0 -1
- package/dist/utilities/buildFieldSchemaMap/traverseFields.js +0 -72
- package/dist/utilities/buildFieldSchemaMap/traverseFields.js.map +0 -1
- package/dist/utilities/buildFieldSchemaMap/types.d.ts +0 -3
- package/dist/utilities/buildFieldSchemaMap/types.d.ts.map +0 -1
- package/dist/utilities/buildFieldSchemaMap/types.js +0 -3
- package/dist/utilities/buildFieldSchemaMap/types.js.map +0 -1
- package/dist/utilities/getDataAndFile.d.ts +0 -12
- package/dist/utilities/getDataAndFile.d.ts.map +0 -1
- package/dist/utilities/getDataAndFile.js +0 -68
- package/dist/utilities/getDataAndFile.js.map +0 -1
- package/dist/utilities/initPage.d.ts +0 -12
- package/dist/utilities/initPage.d.ts.map +0 -1
- package/dist/utilities/initPage.js +0 -98
- package/dist/utilities/initPage.js.map +0 -1
- package/dist/views/Dashboard/Default/index.client.d.ts +0 -10
- package/dist/views/Dashboard/Default/index.client.d.ts.map +0 -1
- package/dist/views/Dashboard/Default/index.client.js +0 -103
- package/dist/views/Dashboard/Default/index.client.js.map +0 -1
- package/dist/views/Edit/Default/SetStepNav/index.d.ts.map +0 -1
- package/dist/views/Edit/Default/SetStepNav/index.js +0 -64
- package/dist/views/Edit/Default/SetStepNav/index.js.map +0 -1
- package/dist/views/Version/shared.d.ts +0 -9
- package/dist/views/Version/shared.d.ts.map +0 -1
- package/dist/views/Version/shared.js +0 -10
- package/dist/views/Version/shared.js.map +0 -1
- package/dist/webpackEntry.d.ts +0 -5
- package/dist/webpackEntry.d.ts.map +0 -1
- package/dist/webpackEntry.js +0 -6
- package/dist/webpackEntry.js.map +0 -1
- package/src/index.js +0 -1
- /package/dist/{next-fileupload → fetchAPI-multipart}/isEligibleRequest.d.ts +0 -0
- /package/dist/{next-fileupload → fetchAPI-multipart}/processNested.d.ts +0 -0
- /package/dist/{next-fileupload → fetchAPI-multipart}/uploadTimer.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SanitizedConfig } from 'payload
|
|
1
|
+
import type { SanitizedConfig } from 'payload';
|
|
2
2
|
export declare const getGraphql: (config: Promise<SanitizedConfig> | SanitizedConfig) => Promise<any>;
|
|
3
3
|
export declare const POST: (config: Promise<SanitizedConfig> | SanitizedConfig) => (request: Request) => Promise<Response>;
|
|
4
4
|
//# sourceMappingURL=handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/routes/graphql/handler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/routes/graphql/handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAqC,eAAe,EAAE,MAAM,SAAS,CAAA;AAsDjF,eAAO,MAAM,UAAU,WAAkB,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,iBAyBlF,CAAA;AAED,eAAO,MAAM,IAAI,WACN,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,eAAqB,OAAO,sBAyD9E,CAAA"}
|
|
@@ -1,111 +1,125 @@
|
|
|
1
1
|
import { configToSchema } from '@payloadcms/graphql';
|
|
2
2
|
import { createHandler } from 'graphql-http/lib/use/fetch';
|
|
3
3
|
import httpStatus from 'http-status';
|
|
4
|
+
import { addDataAndFileToRequest } from '../../utilities/addDataAndFileToRequest.js';
|
|
5
|
+
import { addLocalesToRequestFromData } from '../../utilities/addLocalesToRequest.js';
|
|
4
6
|
import { createPayloadRequest } from '../../utilities/createPayloadRequest.js';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
7
|
+
import { headersWithCors } from '../../utilities/headersWithCors.js';
|
|
8
|
+
import { mergeHeaders } from '../../utilities/mergeHeaders.js';
|
|
9
|
+
const handleError = async (payload, err, debug, afterErrorHook) => {
|
|
10
|
+
const status = err.originalError.status || httpStatus.INTERNAL_SERVER_ERROR;
|
|
11
|
+
let errorMessage = err.message;
|
|
12
|
+
payload.logger.error(err.stack);
|
|
13
|
+
// Internal server errors can contain anything, including potentially sensitive data.
|
|
14
|
+
// Therefore, error details will be hidden from the response unless `config.debug` is `true`
|
|
15
|
+
if (!debug && status === httpStatus.INTERNAL_SERVER_ERROR) {
|
|
16
|
+
errorMessage = 'Something went wrong.';
|
|
17
|
+
}
|
|
18
|
+
let response = {
|
|
19
|
+
extensions: {
|
|
20
|
+
name: err?.originalError?.name || undefined,
|
|
21
|
+
data: err && err.originalError && err.originalError.data || undefined,
|
|
22
|
+
stack: debug ? err.stack : undefined,
|
|
23
|
+
statusCode: status
|
|
24
|
+
},
|
|
25
|
+
locations: err.locations,
|
|
26
|
+
message: errorMessage,
|
|
27
|
+
path: err.path
|
|
28
|
+
};
|
|
29
|
+
if (afterErrorHook) {
|
|
30
|
+
({
|
|
31
|
+
response
|
|
32
|
+
} = afterErrorHook(err, response, null, null) || {
|
|
33
|
+
response
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return response;
|
|
31
37
|
};
|
|
32
38
|
let cached = global._payload_graphql;
|
|
33
39
|
if (!cached) {
|
|
34
|
-
|
|
40
|
+
cached = global._payload_graphql = {
|
|
41
|
+
graphql: null,
|
|
42
|
+
promise: null
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export const getGraphql = async config => {
|
|
46
|
+
if (process.env.NODE_ENV === 'development') {
|
|
35
47
|
cached = global._payload_graphql = {
|
|
36
|
-
|
|
37
|
-
|
|
48
|
+
graphql: null,
|
|
49
|
+
promise: null
|
|
38
50
|
};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (process.env.NODE_ENV === 'development') {
|
|
42
|
-
cached = global._payload_graphql = {
|
|
43
|
-
graphql: null,
|
|
44
|
-
promise: null
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
if (cached.graphql) {
|
|
48
|
-
return cached.graphql;
|
|
49
|
-
}
|
|
50
|
-
if (!cached.promise) {
|
|
51
|
-
cached.promise = new Promise(async (resolve)=>{
|
|
52
|
-
const resolvedConfig = await config;
|
|
53
|
-
const schema = await configToSchema(resolvedConfig);
|
|
54
|
-
resolve(schema);
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
try {
|
|
58
|
-
cached.graphql = await cached.promise;
|
|
59
|
-
} catch (e) {
|
|
60
|
-
cached.promise = null;
|
|
61
|
-
throw e;
|
|
62
|
-
}
|
|
51
|
+
}
|
|
52
|
+
if (cached.graphql) {
|
|
63
53
|
return cached.graphql;
|
|
54
|
+
}
|
|
55
|
+
if (!cached.promise) {
|
|
56
|
+
const resolvedConfig = await config;
|
|
57
|
+
cached.promise = new Promise(resolve => {
|
|
58
|
+
const schema = configToSchema(resolvedConfig);
|
|
59
|
+
resolve(cached.graphql || schema);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
try {
|
|
63
|
+
cached.graphql = await cached.promise;
|
|
64
|
+
} catch (e) {
|
|
65
|
+
cached.promise = null;
|
|
66
|
+
throw e;
|
|
67
|
+
}
|
|
68
|
+
return cached.graphql;
|
|
69
|
+
};
|
|
70
|
+
export const POST = config => async request => {
|
|
71
|
+
const originalRequest = request.clone();
|
|
72
|
+
const req = await createPayloadRequest({
|
|
73
|
+
config,
|
|
74
|
+
request
|
|
75
|
+
});
|
|
76
|
+
await addDataAndFileToRequest(req);
|
|
77
|
+
addLocalesToRequestFromData(req);
|
|
78
|
+
const {
|
|
79
|
+
schema,
|
|
80
|
+
validationRules
|
|
81
|
+
} = await getGraphql(config);
|
|
82
|
+
const {
|
|
83
|
+
payload
|
|
84
|
+
} = req;
|
|
85
|
+
const afterErrorHook = typeof payload.config.hooks.afterError === 'function' ? payload.config.hooks.afterError : null;
|
|
86
|
+
const headers = {};
|
|
87
|
+
const apiResponse = await createHandler({
|
|
88
|
+
context: {
|
|
89
|
+
headers,
|
|
90
|
+
req
|
|
91
|
+
},
|
|
92
|
+
onOperation: async (request, args, result) => {
|
|
93
|
+
const response = typeof payload.extensions === 'function' ? await payload.extensions({
|
|
94
|
+
args,
|
|
95
|
+
req: request,
|
|
96
|
+
result
|
|
97
|
+
}) : result;
|
|
98
|
+
if (response.errors) {
|
|
99
|
+
const errors = await Promise.all(result.errors.map(error => {
|
|
100
|
+
return handleError(payload, error, payload.config.debug, afterErrorHook);
|
|
101
|
+
}));
|
|
102
|
+
// errors type should be FormattedGraphQLError[] but onOperation has a return type of ExecutionResult instead of FormattedExecutionResult
|
|
103
|
+
return {
|
|
104
|
+
...response,
|
|
105
|
+
errors
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
return response;
|
|
109
|
+
},
|
|
110
|
+
schema,
|
|
111
|
+
validationRules: (_, args, defaultRules) => defaultRules.concat(validationRules(args))
|
|
112
|
+
})(originalRequest);
|
|
113
|
+
const resHeaders = headersWithCors({
|
|
114
|
+
headers: new Headers(apiResponse.headers),
|
|
115
|
+
req
|
|
116
|
+
});
|
|
117
|
+
for (const key in headers) {
|
|
118
|
+
resHeaders.append(key, headers[key]);
|
|
119
|
+
}
|
|
120
|
+
return new Response(apiResponse.body, {
|
|
121
|
+
headers: req.responseHeaders ? mergeHeaders(req.responseHeaders, resHeaders) : resHeaders,
|
|
122
|
+
status: apiResponse.status
|
|
123
|
+
});
|
|
64
124
|
};
|
|
65
|
-
export const POST = (config)=>async (request)=>{
|
|
66
|
-
const originalRequest = request.clone();
|
|
67
|
-
const req = await createPayloadRequest({
|
|
68
|
-
config,
|
|
69
|
-
request
|
|
70
|
-
});
|
|
71
|
-
const { schema, validationRules } = await getGraphql(config);
|
|
72
|
-
const { payload } = req;
|
|
73
|
-
const afterErrorHook = typeof payload.config.hooks.afterError === 'function' ? payload.config.hooks.afterError : null;
|
|
74
|
-
const headers = {};
|
|
75
|
-
const apiResponse = await createHandler({
|
|
76
|
-
context: {
|
|
77
|
-
headers,
|
|
78
|
-
req
|
|
79
|
-
},
|
|
80
|
-
onOperation: async (request, args, result)=>{
|
|
81
|
-
const response = typeof payload.extensions === 'function' ? await payload.extensions({
|
|
82
|
-
args,
|
|
83
|
-
req: request,
|
|
84
|
-
result
|
|
85
|
-
}) : result;
|
|
86
|
-
if (response.errors) {
|
|
87
|
-
const errors = await Promise.all(result.errors.map((error)=>{
|
|
88
|
-
return handleError(payload, error, payload.config.debug, afterErrorHook);
|
|
89
|
-
}));
|
|
90
|
-
// errors type should be FormattedGraphQLError[] but onOperation has a return type of ExecutionResult instead of FormattedExecutionResult
|
|
91
|
-
return {
|
|
92
|
-
...response,
|
|
93
|
-
errors
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
return response;
|
|
97
|
-
},
|
|
98
|
-
schema,
|
|
99
|
-
validationRules: (request, args, defaultRules)=>defaultRules.concat(validationRules(args))
|
|
100
|
-
})(originalRequest);
|
|
101
|
-
const resHeaders = new Headers(apiResponse.headers);
|
|
102
|
-
for(const key in headers){
|
|
103
|
-
resHeaders.append(key, headers[key]);
|
|
104
|
-
}
|
|
105
|
-
return new Response(apiResponse.body, {
|
|
106
|
-
headers: new Headers(resHeaders),
|
|
107
|
-
status: apiResponse.status
|
|
108
|
-
});
|
|
109
|
-
};
|
|
110
|
-
|
|
111
125
|
//# sourceMappingURL=handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/routes/graphql/handler.ts"],"sourcesContent":["import type { GraphQLFormattedError } from 'graphql'\nimport type {
|
|
1
|
+
{"version":3,"file":"handler.js","names":["configToSchema","createHandler","httpStatus","addDataAndFileToRequest","addLocalesToRequestFromData","createPayloadRequest","headersWithCors","mergeHeaders","handleError","payload","err","debug","afterErrorHook","status","originalError","INTERNAL_SERVER_ERROR","errorMessage","message","logger","error","stack","response","extensions","name","undefined","data","statusCode","locations","path","cached","global","_payload_graphql","graphql","promise","getGraphql","config","process","env","NODE_ENV","resolvedConfig","Promise","resolve","schema","e","POST","request","originalRequest","clone","req","validationRules","hooks","afterError","headers","apiResponse","context","onOperation","args","result","errors","all","map","_","defaultRules","concat","resHeaders","Headers","key","append","Response","body","responseHeaders"],"sources":["../../../src/routes/graphql/handler.ts"],"sourcesContent":["import type { GraphQLError, GraphQLFormattedError } from 'graphql'\nimport type { CollectionAfterErrorHook, Payload, SanitizedConfig } from 'payload'\n\nimport { configToSchema } from '@payloadcms/graphql'\nimport { createHandler } from 'graphql-http/lib/use/fetch'\nimport httpStatus from 'http-status'\n\nimport { addDataAndFileToRequest } from '../../utilities/addDataAndFileToRequest.js'\nimport { addLocalesToRequestFromData } from '../../utilities/addLocalesToRequest.js'\nimport { createPayloadRequest } from '../../utilities/createPayloadRequest.js'\nimport { headersWithCors } from '../../utilities/headersWithCors.js'\nimport { mergeHeaders } from '../../utilities/mergeHeaders.js'\n\nconst handleError = async (\n payload: Payload,\n err: any,\n debug: boolean,\n afterErrorHook: CollectionAfterErrorHook,\n // eslint-disable-next-line @typescript-eslint/require-await\n): Promise<GraphQLFormattedError> => {\n const status = err.originalError.status || httpStatus.INTERNAL_SERVER_ERROR\n let errorMessage = err.message\n payload.logger.error(err.stack)\n\n // Internal server errors can contain anything, including potentially sensitive data.\n // Therefore, error details will be hidden from the response unless `config.debug` is `true`\n if (!debug && status === httpStatus.INTERNAL_SERVER_ERROR) {\n errorMessage = 'Something went wrong.'\n }\n\n let response: GraphQLFormattedError = {\n extensions: {\n name: err?.originalError?.name || undefined,\n data: (err && err.originalError && err.originalError.data) || undefined,\n stack: debug ? err.stack : undefined,\n statusCode: status,\n },\n locations: err.locations,\n message: errorMessage,\n path: err.path,\n }\n\n if (afterErrorHook) {\n ;({ response } = afterErrorHook(err, response, null, null) || { response })\n }\n\n return response\n}\n\nlet cached = global._payload_graphql\n\nif (!cached) {\n cached = global._payload_graphql = { graphql: null, promise: null }\n}\n\nexport const getGraphql = async (config: Promise<SanitizedConfig> | SanitizedConfig) => {\n if (process.env.NODE_ENV === 'development') {\n cached = global._payload_graphql = { graphql: null, promise: null }\n }\n\n if (cached.graphql) {\n return cached.graphql\n }\n\n if (!cached.promise) {\n const resolvedConfig = await config\n cached.promise = new Promise((resolve) => {\n const schema = configToSchema(resolvedConfig)\n resolve(cached.graphql || schema)\n })\n }\n\n try {\n cached.graphql = await cached.promise\n } catch (e) {\n cached.promise = null\n throw e\n }\n\n return cached.graphql\n}\n\nexport const POST =\n (config: Promise<SanitizedConfig> | SanitizedConfig) => async (request: Request) => {\n const originalRequest = request.clone()\n const req = await createPayloadRequest({\n config,\n request,\n })\n\n await addDataAndFileToRequest(req)\n addLocalesToRequestFromData(req)\n\n const { schema, validationRules } = await getGraphql(config)\n\n const { payload } = req\n\n const afterErrorHook =\n typeof payload.config.hooks.afterError === 'function' ? payload.config.hooks.afterError : null\n\n const headers = {}\n const apiResponse = await createHandler({\n context: { headers, req },\n onOperation: async (request, args, result) => {\n const response =\n typeof payload.extensions === 'function'\n ? await payload.extensions({\n args,\n req: request,\n result,\n })\n : result\n if (response.errors) {\n const errors = (await Promise.all(\n result.errors.map((error) => {\n return handleError(payload, error, payload.config.debug, afterErrorHook)\n }),\n )) as GraphQLError[]\n // errors type should be FormattedGraphQLError[] but onOperation has a return type of ExecutionResult instead of FormattedExecutionResult\n return { ...response, errors }\n }\n return response\n },\n schema,\n validationRules: (_, args, defaultRules) => defaultRules.concat(validationRules(args)),\n })(originalRequest)\n\n const resHeaders = headersWithCors({\n headers: new Headers(apiResponse.headers),\n req,\n })\n\n for (const key in headers) {\n resHeaders.append(key, headers[key])\n }\n\n return new Response(apiResponse.body, {\n headers: req.responseHeaders ? mergeHeaders(req.responseHeaders, resHeaders) : resHeaders,\n status: apiResponse.status,\n })\n }\n"],"mappings":"AAGA,SAASA,cAAc,QAAQ;AAC/B,SAASC,aAAa,QAAQ;AAC9B,OAAOC,UAAA,MAAgB;AAEvB,SAASC,uBAAuB,QAAQ;AACxC,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,oBAAoB,QAAQ;AACrC,SAASC,eAAe,QAAQ;AAChC,SAASC,YAAY,QAAQ;AAE7B,MAAMC,WAAA,GAAc,MAAAA,CAClBC,OAAA,EACAC,GAAA,EACAC,KAAA,EACAC,cAAA;EAGA,MAAMC,MAAA,GAASH,GAAA,CAAII,aAAa,CAACD,MAAM,IAAIX,UAAA,CAAWa,qBAAqB;EAC3E,IAAIC,YAAA,GAAeN,GAAA,CAAIO,OAAO;EAC9BR,OAAA,CAAQS,MAAM,CAACC,KAAK,CAACT,GAAA,CAAIU,KAAK;EAE9B;EACA;EACA,IAAI,CAACT,KAAA,IAASE,MAAA,KAAWX,UAAA,CAAWa,qBAAqB,EAAE;IACzDC,YAAA,GAAe;EACjB;EAEA,IAAIK,QAAA,GAAkC;IACpCC,UAAA,EAAY;MACVC,IAAA,EAAMb,GAAA,EAAKI,aAAA,EAAeS,IAAA,IAAQC,SAAA;MAClCC,IAAA,EAAMf,GAAC,IAAOA,GAAA,CAAII,aAAa,IAAIJ,GAAA,CAAII,aAAa,CAACW,IAAI,IAAKD,SAAA;MAC9DJ,KAAA,EAAOT,KAAA,GAAQD,GAAA,CAAIU,KAAK,GAAGI,SAAA;MAC3BE,UAAA,EAAYb;IACd;IACAc,SAAA,EAAWjB,GAAA,CAAIiB,SAAS;IACxBV,OAAA,EAASD,YAAA;IACTY,IAAA,EAAMlB,GAAA,CAAIkB;EACZ;EAEA,IAAIhB,cAAA,EAAgB;IAChB;MAAES;IAAQ,CAAE,GAAGT,cAAA,CAAeF,GAAA,EAAKW,QAAA,EAAU,MAAM,SAAS;MAAEA;IAAS;EAC3E;EAEA,OAAOA,QAAA;AACT;AAEA,IAAIQ,MAAA,GAASC,MAAA,CAAOC,gBAAgB;AAEpC,IAAI,CAACF,MAAA,EAAQ;EACXA,MAAA,GAASC,MAAA,CAAOC,gBAAgB,GAAG;IAAEC,OAAA,EAAS;IAAMC,OAAA,EAAS;EAAK;AACpE;AAEA,OAAO,MAAMC,UAAA,GAAa,MAAOC,MAAA;EAC/B,IAAIC,OAAA,CAAQC,GAAG,CAACC,QAAQ,KAAK,eAAe;IAC1CT,MAAA,GAASC,MAAA,CAAOC,gBAAgB,GAAG;MAAEC,OAAA,EAAS;MAAMC,OAAA,EAAS;IAAK;EACpE;EAEA,IAAIJ,MAAA,CAAOG,OAAO,EAAE;IAClB,OAAOH,MAAA,CAAOG,OAAO;EACvB;EAEA,IAAI,CAACH,MAAA,CAAOI,OAAO,EAAE;IACnB,MAAMM,cAAA,GAAiB,MAAMJ,MAAA;IAC7BN,MAAA,CAAOI,OAAO,GAAG,IAAIO,OAAA,CAASC,OAAA;MAC5B,MAAMC,MAAA,GAAS1C,cAAA,CAAeuC,cAAA;MAC9BE,OAAA,CAAQZ,MAAA,CAAOG,OAAO,IAAIU,MAAA;IAC5B;EACF;EAEA,IAAI;IACFb,MAAA,CAAOG,OAAO,GAAG,MAAMH,MAAA,CAAOI,OAAO;EACvC,EAAE,OAAOU,CAAA,EAAG;IACVd,MAAA,CAAOI,OAAO,GAAG;IACjB,MAAMU,CAAA;EACR;EAEA,OAAOd,MAAA,CAAOG,OAAO;AACvB;AAEA,OAAO,MAAMY,IAAA,GACVT,MAAA,IAAuD,MAAOU,OAAA;EAC7D,MAAMC,eAAA,GAAkBD,OAAA,CAAQE,KAAK;EACrC,MAAMC,GAAA,GAAM,MAAM3C,oBAAA,CAAqB;IACrC8B,MAAA;IACAU;EACF;EAEA,MAAM1C,uBAAA,CAAwB6C,GAAA;EAC9B5C,2BAAA,CAA4B4C,GAAA;EAE5B,MAAM;IAAEN,MAAM;IAAEO;EAAe,CAAE,GAAG,MAAMf,UAAA,CAAWC,MAAA;EAErD,MAAM;IAAE1B;EAAO,CAAE,GAAGuC,GAAA;EAEpB,MAAMpC,cAAA,GACJ,OAAOH,OAAA,CAAQ0B,MAAM,CAACe,KAAK,CAACC,UAAU,KAAK,aAAa1C,OAAA,CAAQ0B,MAAM,CAACe,KAAK,CAACC,UAAU,GAAG;EAE5F,MAAMC,OAAA,GAAU,CAAC;EACjB,MAAMC,WAAA,GAAc,MAAMpD,aAAA,CAAc;IACtCqD,OAAA,EAAS;MAAEF,OAAA;MAASJ;IAAI;IACxBO,WAAA,EAAa,MAAAA,CAAOV,OAAA,EAASW,IAAA,EAAMC,MAAA;MACjC,MAAMpC,QAAA,GACJ,OAAOZ,OAAA,CAAQa,UAAU,KAAK,aAC1B,MAAMb,OAAA,CAAQa,UAAU,CAAC;QACvBkC,IAAA;QACAR,GAAA,EAAKH,OAAA;QACLY;MACF,KACAA,MAAA;MACN,IAAIpC,QAAA,CAASqC,MAAM,EAAE;QACnB,MAAMA,MAAA,GAAU,MAAMlB,OAAA,CAAQmB,GAAG,CAC/BF,MAAA,CAAOC,MAAM,CAACE,GAAG,CAAEzC,KAAA;UACjB,OAAOX,WAAA,CAAYC,OAAA,EAASU,KAAA,EAAOV,OAAA,CAAQ0B,MAAM,CAACxB,KAAK,EAAEC,cAAA;QAC3D;QAEF;QACA,OAAO;UAAE,GAAGS,QAAQ;UAAEqC;QAAO;MAC/B;MACA,OAAOrC,QAAA;IACT;IACAqB,MAAA;IACAO,eAAA,EAAiBA,CAACY,CAAA,EAAGL,IAAA,EAAMM,YAAA,KAAiBA,YAAA,CAAaC,MAAM,CAACd,eAAA,CAAgBO,IAAA;EAClF,GAAGV,eAAA;EAEH,MAAMkB,UAAA,GAAa1D,eAAA,CAAgB;IACjC8C,OAAA,EAAS,IAAIa,OAAA,CAAQZ,WAAA,CAAYD,OAAO;IACxCJ;EACF;EAEA,KAAK,MAAMkB,GAAA,IAAOd,OAAA,EAAS;IACzBY,UAAA,CAAWG,MAAM,CAACD,GAAA,EAAKd,OAAO,CAACc,GAAA,CAAI;EACrC;EAEA,OAAO,IAAIE,QAAA,CAASf,WAAA,CAAYgB,IAAI,EAAE;IACpCjB,OAAA,EAASJ,GAAA,CAAIsB,eAAe,GAAG/D,YAAA,CAAayC,GAAA,CAAIsB,eAAe,EAAEN,UAAA,IAAcA,UAAA;IAC/EnD,MAAA,EAAQwC,WAAA,CAAYxC;EACtB;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/routes/graphql/index.ts"],"sourcesContent":["export { POST as GRAPHQL_POST } from './handler.js'\n\nexport { GET as GRAPHQL_PLAYGROUND_GET } from './playground.js'\n"],"
|
|
1
|
+
{"version":3,"file":"index.js","names":["POST","GRAPHQL_POST","GET","GRAPHQL_PLAYGROUND_GET"],"sources":["../../../src/routes/graphql/index.ts"],"sourcesContent":["export { POST as GRAPHQL_POST } from './handler.js'\n\nexport { GET as GRAPHQL_PLAYGROUND_GET } from './playground.js'\n"],"mappings":"AAAA,SAASA,IAAA,IAAQC,YAAY,QAAQ;AAErC,SAASC,GAAA,IAAOC,sBAAsB,QAAQ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../../../src/routes/graphql/playground.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../../../src/routes/graphql/playground.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAM9C,eAAO,MAAM,GAAG,WAAY,OAAO,CAAC,eAAe,CAAC,eAAqB,OAAO,sBA6B/E,CAAA"}
|
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
import { renderPlaygroundPage } from 'graphql-playground-html';
|
|
2
2
|
import { createPayloadRequest } from '../../utilities/createPayloadRequest.js';
|
|
3
|
-
export const GET =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
3
|
+
export const GET = config => async request => {
|
|
4
|
+
const req = await createPayloadRequest({
|
|
5
|
+
config,
|
|
6
|
+
request
|
|
7
|
+
});
|
|
8
|
+
if (!req.payload.config.graphQL.disable && !req.payload.config.graphQL.disablePlaygroundInProduction && process.env.NODE_ENV === 'production' || process.env.NODE_ENV !== 'production') {
|
|
9
|
+
return new Response(renderPlaygroundPage({
|
|
10
|
+
endpoint: `${req.payload.config.routes.api}${req.payload.config.routes.graphQL}`,
|
|
11
|
+
settings: {
|
|
12
|
+
'request.credentials': 'include'
|
|
13
|
+
}
|
|
14
|
+
}), {
|
|
15
|
+
headers: {
|
|
16
|
+
'Content-Type': 'text/html'
|
|
17
|
+
},
|
|
18
|
+
status: 200
|
|
19
|
+
});
|
|
20
|
+
} else {
|
|
21
|
+
return new Response('Route Not Found', {
|
|
22
|
+
status: 404
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
};
|
|
27
26
|
//# sourceMappingURL=playground.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/routes/graphql/playground.ts"],"sourcesContent":["import type { SanitizedConfig } from 'payload
|
|
1
|
+
{"version":3,"file":"playground.js","names":["renderPlaygroundPage","createPayloadRequest","GET","config","request","req","payload","graphQL","disable","disablePlaygroundInProduction","process","env","NODE_ENV","Response","endpoint","routes","api","settings","headers","status"],"sources":["../../../src/routes/graphql/playground.ts"],"sourcesContent":["import type { SanitizedConfig } from 'payload'\n\nimport { renderPlaygroundPage } from 'graphql-playground-html'\n\nimport { createPayloadRequest } from '../../utilities/createPayloadRequest.js'\n\nexport const GET = (config: Promise<SanitizedConfig>) => async (request: Request) => {\n const req = await createPayloadRequest({\n config,\n request,\n })\n\n if (\n (!req.payload.config.graphQL.disable &&\n !req.payload.config.graphQL.disablePlaygroundInProduction &&\n process.env.NODE_ENV === 'production') ||\n process.env.NODE_ENV !== 'production'\n ) {\n return new Response(\n renderPlaygroundPage({\n endpoint: `${req.payload.config.routes.api}${req.payload.config.routes.graphQL}`,\n settings: {\n 'request.credentials': 'include',\n },\n }),\n {\n headers: {\n 'Content-Type': 'text/html',\n },\n status: 200,\n },\n )\n } else {\n return new Response('Route Not Found', { status: 404 })\n }\n}\n"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ;AAErC,SAASC,oBAAoB,QAAQ;AAErC,OAAO,MAAMC,GAAA,GAAOC,MAAA,IAAqC,MAAOC,OAAA;EAC9D,MAAMC,GAAA,GAAM,MAAMJ,oBAAA,CAAqB;IACrCE,MAAA;IACAC;EACF;EAEA,IACE,CAAEC,GAAA,CAAIC,OAAO,CAACH,MAAM,CAACI,OAAO,CAACC,OAAO,IAClC,CAACH,GAAA,CAAIC,OAAO,CAACH,MAAM,CAACI,OAAO,CAACE,6BAA6B,IACzDC,OAAA,CAAQC,GAAG,CAACC,QAAQ,KAAK,gBAC3BF,OAAA,CAAQC,GAAG,CAACC,QAAQ,KAAK,cACzB;IACA,OAAO,IAAIC,QAAA,CACTb,oBAAA,CAAqB;MACnBc,QAAA,EAAU,GAAGT,GAAA,CAAIC,OAAO,CAACH,MAAM,CAACY,MAAM,CAACC,GAAG,GAAGX,GAAA,CAAIC,OAAO,CAACH,MAAM,CAACY,MAAM,CAACR,OAAO,EAAE;MAChFU,QAAA,EAAU;QACR,uBAAuB;MACzB;IACF,IACA;MACEC,OAAA,EAAS;QACP,gBAAgB;MAClB;MACAC,MAAA,EAAQ;IACV;EAEJ,OAAO;IACL,OAAO,IAAIN,QAAA,CAAS,mBAAmB;MAAEM,MAAA,EAAQ;IAAI;EACvD;AACF","ignoreList":[]}
|
package/dist/routes/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { GRAPHQL_PLAYGROUND_GET, GRAPHQL_POST } from './graphql/index.js';
|
|
2
|
-
export { DELETE as REST_DELETE, GET as REST_GET, PATCH as REST_PATCH, POST as REST_POST, } from './rest/index.js';
|
|
2
|
+
export { DELETE as REST_DELETE, GET as REST_GET, OPTIONS as REST_OPTIONS, PATCH as REST_PATCH, POST as REST_POST, } from './rest/index.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEzE,OAAO,EACL,MAAM,IAAI,WAAW,EACrB,GAAG,IAAI,QAAQ,EACf,KAAK,IAAI,UAAU,EACnB,IAAI,IAAI,SAAS,GAClB,MAAM,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/routes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEzE,OAAO,EACL,MAAM,IAAI,WAAW,EACrB,GAAG,IAAI,QAAQ,EACf,OAAO,IAAI,YAAY,EACvB,KAAK,IAAI,UAAU,EACnB,IAAI,IAAI,SAAS,GAClB,MAAM,iBAAiB,CAAA"}
|
package/dist/routes/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { GRAPHQL_PLAYGROUND_GET, GRAPHQL_POST } from './graphql/index.js';
|
|
2
|
-
export { DELETE as REST_DELETE, GET as REST_GET, PATCH as REST_PATCH, POST as REST_POST } from './rest/index.js';
|
|
3
|
-
|
|
2
|
+
export { DELETE as REST_DELETE, GET as REST_GET, OPTIONS as REST_OPTIONS, PATCH as REST_PATCH, POST as REST_POST } from './rest/index.js';
|
|
4
3
|
//# sourceMappingURL=index.js.map
|
package/dist/routes/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/routes/index.ts"],"sourcesContent":["export { GRAPHQL_PLAYGROUND_GET, GRAPHQL_POST } from './graphql/index.js'\n\nexport {\n DELETE as REST_DELETE,\n GET as REST_GET,\n PATCH as REST_PATCH,\n POST as REST_POST,\n} from './rest/index.js'\n"],"
|
|
1
|
+
{"version":3,"file":"index.js","names":["GRAPHQL_PLAYGROUND_GET","GRAPHQL_POST","DELETE","REST_DELETE","GET","REST_GET","OPTIONS","REST_OPTIONS","PATCH","REST_PATCH","POST","REST_POST"],"sources":["../../src/routes/index.ts"],"sourcesContent":["export { GRAPHQL_PLAYGROUND_GET, GRAPHQL_POST } from './graphql/index.js'\n\nexport {\n DELETE as REST_DELETE,\n GET as REST_GET,\n OPTIONS as REST_OPTIONS,\n PATCH as REST_PATCH,\n POST as REST_POST,\n} from './rest/index.js'\n"],"mappings":"AAAA,SAASA,sBAAsB,EAAEC,YAAY,QAAQ;AAErD,SACEC,MAAA,IAAUC,WAAW,EACrBC,GAAA,IAAOC,QAAQ,EACfC,OAAA,IAAWC,YAAY,EACvBC,KAAA,IAASC,UAAU,EACnBC,IAAA,IAAQC,SAAS,QACZ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/auth/access.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/auth/access.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAInD,eAAO,MAAM,MAAM,EAAE,gBA0BpB,CAAA"}
|
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
import httpStatus from 'http-status';
|
|
2
|
-
import { accessOperation } from 'payload
|
|
3
|
-
|
|
2
|
+
import { accessOperation } from 'payload';
|
|
3
|
+
import { headersWithCors } from '../../../utilities/headersWithCors.js';
|
|
4
|
+
export const access = async ({
|
|
5
|
+
req
|
|
6
|
+
}) => {
|
|
7
|
+
const headers = headersWithCors({
|
|
8
|
+
headers: new Headers(),
|
|
9
|
+
req
|
|
10
|
+
});
|
|
11
|
+
try {
|
|
4
12
|
const results = await accessOperation({
|
|
5
|
-
|
|
13
|
+
req
|
|
6
14
|
});
|
|
7
15
|
return Response.json(results, {
|
|
8
|
-
|
|
16
|
+
headers,
|
|
17
|
+
status: httpStatus.OK
|
|
9
18
|
});
|
|
19
|
+
} catch (e) {
|
|
20
|
+
return Response.json({
|
|
21
|
+
error: e
|
|
22
|
+
}, {
|
|
23
|
+
headers,
|
|
24
|
+
status: httpStatus.INTERNAL_SERVER_ERROR
|
|
25
|
+
});
|
|
26
|
+
}
|
|
10
27
|
};
|
|
11
|
-
|
|
12
28
|
//# sourceMappingURL=access.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/routes/rest/auth/access.ts"],"sourcesContent":["import httpStatus from 'http-status'\nimport { accessOperation } from 'payload
|
|
1
|
+
{"version":3,"file":"access.js","names":["httpStatus","accessOperation","headersWithCors","access","req","headers","Headers","results","Response","json","status","OK","e","error","INTERNAL_SERVER_ERROR"],"sources":["../../../../src/routes/rest/auth/access.ts"],"sourcesContent":["import httpStatus from 'http-status'\nimport { accessOperation } from 'payload'\n\nimport type { BaseRouteHandler } from '../types.js'\n\nimport { headersWithCors } from '../../../utilities/headersWithCors.js'\n\nexport const access: BaseRouteHandler = async ({ req }) => {\n const headers = headersWithCors({\n headers: new Headers(),\n req,\n })\n\n try {\n const results = await accessOperation({\n req,\n })\n\n return Response.json(results, {\n headers,\n status: httpStatus.OK,\n })\n } catch (e: unknown) {\n return Response.json(\n {\n error: e,\n },\n {\n headers,\n status: httpStatus.INTERNAL_SERVER_ERROR,\n },\n )\n }\n}\n"],"mappings":"AAAA,OAAOA,UAAA,MAAgB;AACvB,SAASC,eAAe,QAAQ;AAIhC,SAASC,eAAe,QAAQ;AAEhC,OAAO,MAAMC,MAAA,GAA2B,MAAAA,CAAO;EAAEC;AAAG,CAAE;EACpD,MAAMC,OAAA,GAAUH,eAAA,CAAgB;IAC9BG,OAAA,EAAS,IAAIC,OAAA;IACbF;EACF;EAEA,IAAI;IACF,MAAMG,OAAA,GAAU,MAAMN,eAAA,CAAgB;MACpCG;IACF;IAEA,OAAOI,QAAA,CAASC,IAAI,CAACF,OAAA,EAAS;MAC5BF,OAAA;MACAK,MAAA,EAAQV,UAAA,CAAWW;IACrB;EACF,EAAE,OAAOC,CAAA,EAAY;IACnB,OAAOJ,QAAA,CAASC,IAAI,CAClB;MACEI,KAAA,EAAOD;IACT,GACA;MACEP,OAAA;MACAK,MAAA,EAAQV,UAAA,CAAWc;IACrB;EAEJ;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgotPassword.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/auth/forgotPassword.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"forgotPassword.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/auth/forgotPassword.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAIzD,eAAO,MAAM,cAAc,EAAE,sBA+B5B,CAAA"}
|
|
@@ -1,21 +1,34 @@
|
|
|
1
1
|
import httpStatus from 'http-status';
|
|
2
|
-
import { forgotPasswordOperation } from 'payload
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
import { forgotPasswordOperation } from 'payload';
|
|
3
|
+
import { headersWithCors } from '../../../utilities/headersWithCors.js';
|
|
4
|
+
export const forgotPassword = async ({
|
|
5
|
+
collection,
|
|
6
|
+
req
|
|
7
|
+
}) => {
|
|
8
|
+
const {
|
|
9
|
+
t
|
|
10
|
+
} = req;
|
|
11
|
+
const authData = collection.config.auth?.loginWithUsername ? {
|
|
12
|
+
email: typeof req.data?.email === 'string' ? req.data.email : '',
|
|
13
|
+
username: typeof req.data?.username === 'string' ? req.data.username : ''
|
|
14
|
+
} : {
|
|
15
|
+
email: typeof req.data?.email === 'string' ? req.data.email : ''
|
|
16
|
+
};
|
|
17
|
+
await forgotPasswordOperation({
|
|
18
|
+
collection,
|
|
19
|
+
data: authData,
|
|
20
|
+
disableEmail: Boolean(req.data?.disableEmail),
|
|
21
|
+
expiration: typeof req.data.expiration === 'number' ? req.data.expiration : undefined,
|
|
22
|
+
req
|
|
23
|
+
});
|
|
24
|
+
return Response.json({
|
|
25
|
+
message: t('general:success')
|
|
26
|
+
}, {
|
|
27
|
+
headers: headersWithCors({
|
|
28
|
+
headers: new Headers(),
|
|
29
|
+
req
|
|
30
|
+
}),
|
|
31
|
+
status: httpStatus.OK
|
|
32
|
+
});
|
|
19
33
|
};
|
|
20
|
-
|
|
21
34
|
//# sourceMappingURL=forgotPassword.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/routes/rest/auth/forgotPassword.ts"],"sourcesContent":["import httpStatus from 'http-status'\nimport { forgotPasswordOperation } from 'payload
|
|
1
|
+
{"version":3,"file":"forgotPassword.js","names":["httpStatus","forgotPasswordOperation","headersWithCors","forgotPassword","collection","req","t","authData","config","auth","loginWithUsername","email","data","username","disableEmail","Boolean","expiration","undefined","Response","json","message","headers","Headers","status","OK"],"sources":["../../../../src/routes/rest/auth/forgotPassword.ts"],"sourcesContent":["import httpStatus from 'http-status'\nimport { forgotPasswordOperation } from 'payload'\n\nimport type { CollectionRouteHandler } from '../types.js'\n\nimport { headersWithCors } from '../../../utilities/headersWithCors.js'\n\nexport const forgotPassword: CollectionRouteHandler = async ({ collection, req }) => {\n const { t } = req\n const authData = collection.config.auth?.loginWithUsername\n ? {\n email: typeof req.data?.email === 'string' ? req.data.email : '',\n username: typeof req.data?.username === 'string' ? req.data.username : '',\n }\n : {\n email: typeof req.data?.email === 'string' ? req.data.email : '',\n }\n\n await forgotPasswordOperation({\n collection,\n data: authData,\n disableEmail: Boolean(req.data?.disableEmail),\n expiration: typeof req.data.expiration === 'number' ? req.data.expiration : undefined,\n req,\n })\n\n return Response.json(\n {\n message: t('general:success'),\n },\n {\n headers: headersWithCors({\n headers: new Headers(),\n req,\n }),\n status: httpStatus.OK,\n },\n )\n}\n"],"mappings":"AAAA,OAAOA,UAAA,MAAgB;AACvB,SAASC,uBAAuB,QAAQ;AAIxC,SAASC,eAAe,QAAQ;AAEhC,OAAO,MAAMC,cAAA,GAAyC,MAAAA,CAAO;EAAEC,UAAU;EAAEC;AAAG,CAAE;EAC9E,MAAM;IAAEC;EAAC,CAAE,GAAGD,GAAA;EACd,MAAME,QAAA,GAAWH,UAAA,CAAWI,MAAM,CAACC,IAAI,EAAEC,iBAAA,GACrC;IACEC,KAAA,EAAO,OAAON,GAAA,CAAIO,IAAI,EAAED,KAAA,KAAU,WAAWN,GAAA,CAAIO,IAAI,CAACD,KAAK,GAAG;IAC9DE,QAAA,EAAU,OAAOR,GAAA,CAAIO,IAAI,EAAEC,QAAA,KAAa,WAAWR,GAAA,CAAIO,IAAI,CAACC,QAAQ,GAAG;EACzE,IACA;IACEF,KAAA,EAAO,OAAON,GAAA,CAAIO,IAAI,EAAED,KAAA,KAAU,WAAWN,GAAA,CAAIO,IAAI,CAACD,KAAK,GAAG;EAChE;EAEJ,MAAMV,uBAAA,CAAwB;IAC5BG,UAAA;IACAQ,IAAA,EAAML,QAAA;IACNO,YAAA,EAAcC,OAAA,CAAQV,GAAA,CAAIO,IAAI,EAAEE,YAAA;IAChCE,UAAA,EAAY,OAAOX,GAAA,CAAIO,IAAI,CAACI,UAAU,KAAK,WAAWX,GAAA,CAAIO,IAAI,CAACI,UAAU,GAAGC,SAAA;IAC5EZ;EACF;EAEA,OAAOa,QAAA,CAASC,IAAI,CAClB;IACEC,OAAA,EAASd,CAAA,CAAE;EACb,GACA;IACEe,OAAA,EAASnB,eAAA,CAAgB;MACvBmB,OAAA,EAAS,IAAIC,OAAA;MACbjB;IACF;IACAkB,MAAA,EAAQvB,UAAA,CAAWwB;EACrB;AAEJ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/auth/init.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/auth/init.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAIzD,eAAO,MAAM,IAAI,EAAE,sBAelB,CAAA"}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import { initOperation } from 'payload
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { initOperation } from 'payload';
|
|
2
|
+
import { headersWithCors } from '../../../utilities/headersWithCors.js';
|
|
3
|
+
export const init = async ({
|
|
4
|
+
collection,
|
|
5
|
+
req
|
|
6
|
+
}) => {
|
|
7
|
+
const initialized = await initOperation({
|
|
8
|
+
collection: collection.config.slug,
|
|
9
|
+
req
|
|
10
|
+
});
|
|
11
|
+
return Response.json({
|
|
12
|
+
initialized
|
|
13
|
+
}, {
|
|
14
|
+
headers: headersWithCors({
|
|
15
|
+
headers: new Headers(),
|
|
16
|
+
req
|
|
17
|
+
})
|
|
18
|
+
});
|
|
10
19
|
};
|
|
11
|
-
|
|
12
20
|
//# sourceMappingURL=init.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/routes/rest/auth/init.ts"],"sourcesContent":["import { initOperation } from 'payload
|
|
1
|
+
{"version":3,"file":"init.js","names":["initOperation","headersWithCors","init","collection","req","initialized","config","slug","Response","json","headers","Headers"],"sources":["../../../../src/routes/rest/auth/init.ts"],"sourcesContent":["import { initOperation } from 'payload'\n\nimport type { CollectionRouteHandler } from '../types.js'\n\nimport { headersWithCors } from '../../../utilities/headersWithCors.js'\n\nexport const init: CollectionRouteHandler = async ({ collection, req }) => {\n const initialized = await initOperation({\n collection: collection.config.slug,\n req,\n })\n\n return Response.json(\n { initialized },\n {\n headers: headersWithCors({\n headers: new Headers(),\n req,\n }),\n },\n )\n}\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ;AAI9B,SAASC,eAAe,QAAQ;AAEhC,OAAO,MAAMC,IAAA,GAA+B,MAAAA,CAAO;EAAEC,UAAU;EAAEC;AAAG,CAAE;EACpE,MAAMC,WAAA,GAAc,MAAML,aAAA,CAAc;IACtCG,UAAA,EAAYA,UAAA,CAAWG,MAAM,CAACC,IAAI;IAClCH;EACF;EAEA,OAAOI,QAAA,CAASC,IAAI,CAClB;IAAEJ;EAAY,GACd;IACEK,OAAA,EAAST,eAAA,CAAgB;MACvBS,OAAA,EAAS,IAAIC,OAAA;MACbP;IACF;EACF;AAEJ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/auth/login.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../src/routes/rest/auth/login.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAIzD,eAAO,MAAM,KAAK,EAAE,sBA+CnB,CAAA"}
|