@rakun-kit/core 1.1.1 → 1.2.0
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/README.md +1 -1
- package/dist/cjs/bootstrapState.js.map +1 -1
- package/dist/cjs/client.js +3 -2
- package/dist/cjs/client.js.map +1 -1
- package/dist/cjs/index.js +0 -14
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/ContentType.js +106 -74
- package/dist/cjs/lib/ContentType.js.map +1 -1
- package/dist/cjs/lib/Logger.js +56 -0
- package/dist/cjs/lib/Logger.js.map +1 -1
- package/dist/cjs/lib/Registry.js +35 -22
- package/dist/cjs/lib/Registry.js.map +1 -1
- package/dist/cjs/lib/fields/Boolean.js +14 -9
- package/dist/cjs/lib/fields/Boolean.js.map +1 -1
- package/dist/cjs/lib/fields/ContentReference.js +29 -17
- package/dist/cjs/lib/fields/ContentReference.js.map +1 -1
- package/dist/cjs/lib/fields/Date.js +26 -22
- package/dist/cjs/lib/fields/Date.js.map +1 -1
- package/dist/cjs/lib/fields/Field.js +79 -59
- package/dist/cjs/lib/fields/Field.js.map +1 -1
- package/dist/cjs/lib/fields/Fields.js +32 -0
- package/dist/cjs/lib/fields/Fields.js.map +1 -0
- package/dist/cjs/lib/fields/File.js +60 -85
- package/dist/cjs/lib/fields/File.js.map +1 -1
- package/dist/cjs/lib/fields/Iterator.js +8 -10
- package/dist/cjs/lib/fields/Iterator.js.map +1 -1
- package/dist/cjs/lib/fields/Link.js +20 -15
- package/dist/cjs/lib/fields/Link.js.map +1 -1
- package/dist/cjs/lib/fields/List.js +47 -16
- package/dist/cjs/lib/fields/List.js.map +1 -1
- package/dist/cjs/lib/fields/Number.js +35 -17
- package/dist/cjs/lib/fields/Number.js.map +1 -1
- package/dist/cjs/lib/fields/Relation.js +73 -66
- package/dist/cjs/lib/fields/Relation.js.map +1 -1
- package/dist/cjs/lib/fields/Select.js +28 -17
- package/dist/cjs/lib/fields/Select.js.map +1 -1
- package/dist/cjs/lib/fields/SelfRelation.js +30 -21
- package/dist/cjs/lib/fields/SelfRelation.js.map +1 -1
- package/dist/cjs/lib/fields/SimpleList.js +38 -21
- package/dist/cjs/lib/fields/SimpleList.js.map +1 -1
- package/dist/cjs/lib/fields/String.js +54 -40
- package/dist/cjs/lib/fields/String.js.map +1 -1
- package/dist/cjs/lib/fields/index.js +29 -37
- package/dist/cjs/lib/fields/index.js.map +1 -1
- package/dist/cjs/orm/operations/findDependencies.js +4 -2
- package/dist/cjs/orm/operations/findDependencies.js.map +1 -1
- package/dist/esm/api/context.d.ts +1 -1
- package/dist/esm/api/context.js +2 -2
- package/dist/esm/api/operations/custom.d.ts +1 -1
- package/dist/esm/api/operations/custom.js +1 -1
- package/dist/esm/api/operations/index.d.ts +56 -57
- package/dist/esm/api/operations/index.d.ts.map +1 -1
- package/dist/esm/api/operations/index.js +7 -7
- package/dist/esm/api/operations/manager-contract.d.ts +37 -36
- package/dist/esm/api/operations/manager-contract.d.ts.map +1 -1
- package/dist/esm/api/operations/manager-contract.js +4 -4
- package/dist/esm/api/operations/manager.d.ts +38 -37
- package/dist/esm/api/operations/manager.d.ts.map +1 -1
- package/dist/esm/api/operations/manager.js +35 -35
- package/dist/esm/api/operations/types.d.ts +1 -1
- package/dist/esm/api/operations/web-contract.d.ts +11 -13
- package/dist/esm/api/operations/web-contract.d.ts.map +1 -1
- package/dist/esm/api/operations/web-contract.js +3 -3
- package/dist/esm/api/operations/web.d.ts +12 -14
- package/dist/esm/api/operations/web.d.ts.map +1 -1
- package/dist/esm/api/operations/web.js +5 -5
- package/dist/esm/api/proxies/context.d.ts +2 -2
- package/dist/esm/api/proxies/index.d.ts +9 -5
- package/dist/esm/api/proxies/index.d.ts.map +1 -1
- package/dist/esm/api/proxies/index.js +1 -1
- package/dist/esm/api/routes/manager/auth/accountInfo.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/accountInfo.js +3 -3
- package/dist/esm/api/routes/manager/auth/deleteSession.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/deleteSession.js +3 -3
- package/dist/esm/api/routes/manager/auth/login.d.ts +1 -1
- package/dist/esm/api/routes/manager/auth/login.js +4 -4
- package/dist/esm/api/routes/manager/auth/logout.d.ts +1 -1
- package/dist/esm/api/routes/manager/auth/logout.js +3 -3
- package/dist/esm/api/routes/manager/auth/totp/confirmTotp.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/totp/confirmTotp.js +2 -2
- package/dist/esm/api/routes/manager/auth/totp/enrollTotp.d.ts +1 -1
- package/dist/esm/api/routes/manager/auth/totp/enrollTotp.js +3 -3
- package/dist/esm/api/routes/manager/auth/totp/verifyTotp.d.ts +1 -1
- package/dist/esm/api/routes/manager/auth/totp/verifyTotp.js +3 -3
- package/dist/esm/api/routes/manager/auth/updatePassword.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/updatePassword.js +3 -3
- package/dist/esm/api/routes/manager/auth/webauthn/webauthnAuthOptions.js +4 -4
- package/dist/esm/api/routes/manager/auth/webauthn/webauthnAuthVerify.js +4 -4
- package/dist/esm/api/routes/manager/auth/webauthn/webauthnRegisterOptions.d.ts +2 -2
- package/dist/esm/api/routes/manager/auth/webauthn/webauthnRegisterOptions.js +3 -3
- package/dist/esm/api/routes/manager/auth/webauthn/webauthnRegisterVerify.d.ts +1 -1
- package/dist/esm/api/routes/manager/auth/webauthn/webauthnRegisterVerify.js +4 -4
- package/dist/esm/api/routes/manager/create.d.ts +2 -2
- package/dist/esm/api/routes/manager/create.js +8 -8
- package/dist/esm/api/routes/manager/delete.d.ts +2 -2
- package/dist/esm/api/routes/manager/delete.js +8 -8
- package/dist/esm/api/routes/manager/get.d.ts +2 -2
- package/dist/esm/api/routes/manager/get.js +6 -6
- package/dist/esm/api/routes/manager/list.d.ts +2 -2
- package/dist/esm/api/routes/manager/list.js +8 -8
- package/dist/esm/api/routes/manager/literals/list.d.ts +2 -2
- package/dist/esm/api/routes/manager/literals/list.js +5 -5
- package/dist/esm/api/routes/manager/literals/upsert.d.ts +2 -2
- package/dist/esm/api/routes/manager/literals/upsert.js +6 -6
- package/dist/esm/api/routes/manager/media/createFolder.d.ts +2 -2
- package/dist/esm/api/routes/manager/media/createFolder.js +7 -7
- package/dist/esm/api/routes/manager/media/finalizeUpload.d.ts +2 -2
- package/dist/esm/api/routes/manager/media/finalizeUpload.js +9 -9
- package/dist/esm/api/routes/manager/media/getMediaUrl.d.ts +2 -2
- package/dist/esm/api/routes/manager/media/getMediaUrl.js +3 -3
- package/dist/esm/api/routes/manager/media/listFolders.d.ts +2 -2
- package/dist/esm/api/routes/manager/media/listFolders.js +4 -4
- package/dist/esm/api/routes/manager/media/prepareUpload.d.ts +2 -2
- package/dist/esm/api/routes/manager/media/prepareUpload.js +4 -4
- package/dist/esm/api/routes/manager/media/uploadBinary.d.ts +1 -1
- package/dist/esm/api/routes/manager/media/uploadBinary.js +6 -6
- package/dist/esm/api/routes/manager/setDefaultLanguage.d.ts +2 -2
- package/dist/esm/api/routes/manager/setDefaultLanguage.js +4 -4
- package/dist/esm/api/routes/manager/update.d.ts +2 -2
- package/dist/esm/api/routes/manager/update.js +8 -8
- package/dist/esm/api/routes/web/page.d.ts +1 -1
- package/dist/esm/api/routes/web/page.js +13 -13
- package/dist/esm/api/sessionCookie.d.ts +1 -1
- package/dist/esm/api/utils/checkFailureCase.d.ts +1 -1
- package/dist/esm/api/utils/checkFailureCase.js +1 -1
- package/dist/esm/api/utils/checkOwnership.d.ts +2 -2
- package/dist/esm/api/utils/checkOwnership.js +3 -3
- package/dist/esm/api/utils/checkPermissions.d.ts +2 -2
- package/dist/esm/api/utils/checkPermissions.js +2 -2
- package/dist/esm/api/utils/getLanguages.d.ts +2 -6
- package/dist/esm/api/utils/getLanguages.d.ts.map +1 -1
- package/dist/esm/api/utils/getLanguages.js +2 -2
- package/dist/esm/api/utils/getLink.d.ts +2 -2
- package/dist/esm/api/utils/getLink.js +4 -4
- package/dist/esm/api/utils/getUser.d.ts +7 -3
- package/dist/esm/api/utils/getUser.d.ts.map +1 -1
- package/dist/esm/api/utils/getUser.js +4 -4
- package/dist/esm/api/utils/parseId.d.ts +1 -1
- package/dist/esm/api/utils/parseId.js +1 -1
- package/dist/esm/api/utils/passwords.js +1 -1
- package/dist/esm/api/utils/populates/populateLinks.d.ts +2 -2
- package/dist/esm/api/utils/populates/populateLinks.js +4 -4
- package/dist/esm/api/utils/populates/populateRelations.d.ts +2 -2
- package/dist/esm/api/utils/populates/populateRelations.js +6 -6
- package/dist/esm/api/utils/redirects/resolveRedirect.js +2 -2
- package/dist/esm/api/utils/routes/revalidatePath.js +5 -5
- package/dist/esm/api/utils/routes/routeDefinitions.d.ts +1 -1
- package/dist/esm/api/utils/routes/routeMapHelpers.d.ts +3 -3
- package/dist/esm/api/utils/routes/routeMapHelpers.js +6 -6
- package/dist/esm/api/utils/routes/syncConfiguredRoutes.d.ts +2 -2
- package/dist/esm/api/utils/routes/syncConfiguredRoutes.js +5 -5
- package/dist/esm/api/utils/routes/updateRoutesMap.d.ts +2 -2
- package/dist/esm/api/utils/routes/updateRoutesMap.js +4 -4
- package/dist/esm/api/utils/transformObjectIdsToStrings.js +1 -1
- package/dist/esm/api/utils/transformStringToObjectIds.js +1 -1
- package/dist/esm/api/utils/translate.d.ts +1 -1
- package/dist/esm/api/utils/translate.js +3 -3
- package/dist/esm/api/utils/validateModule.d.ts +1 -1
- package/dist/esm/api/utils/validateModule.js +2 -2
- package/dist/esm/bootstrapState.d.ts +11 -10
- package/dist/esm/bootstrapState.d.ts.map +1 -1
- package/dist/esm/bootstrapState.js.map +1 -1
- package/dist/esm/client.d.ts +34 -34
- package/dist/esm/client.d.ts.map +1 -1
- package/dist/esm/client.js +25 -25
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/contracts.d.ts +26 -26
- package/dist/esm/contracts.js +26 -26
- package/dist/esm/index.d.ts +29 -43
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +25 -39
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/internal-content-types/HelloWorld.d.ts +55 -3
- package/dist/esm/internal-content-types/HelloWorld.d.ts.map +1 -1
- package/dist/esm/internal-content-types/HelloWorld.js +2 -2
- package/dist/esm/internal-content-types/Language.d.ts +70 -6
- package/dist/esm/internal-content-types/Language.d.ts.map +1 -1
- package/dist/esm/internal-content-types/Language.js +2 -2
- package/dist/esm/internal-content-types/LiteralTranslation.d.ts +109 -5
- package/dist/esm/internal-content-types/LiteralTranslation.d.ts.map +1 -1
- package/dist/esm/internal-content-types/LiteralTranslation.js +2 -2
- package/dist/esm/internal-content-types/ManagerRole.d.ts +56 -4
- package/dist/esm/internal-content-types/ManagerRole.d.ts.map +1 -1
- package/dist/esm/internal-content-types/ManagerRole.js +3 -3
- package/dist/esm/internal-content-types/ManagerUser.d.ts +350 -21
- package/dist/esm/internal-content-types/ManagerUser.d.ts.map +1 -1
- package/dist/esm/internal-content-types/ManagerUser.js +3 -3
- package/dist/esm/internal-content-types/Media.d.ts +472 -55
- package/dist/esm/internal-content-types/Media.d.ts.map +1 -1
- package/dist/esm/internal-content-types/Media.js +3 -3
- package/dist/esm/internal-content-types/MediaFolder.d.ts +163 -7
- package/dist/esm/internal-content-types/MediaFolder.d.ts.map +1 -1
- package/dist/esm/internal-content-types/MediaFolder.js +2 -2
- package/dist/esm/internal-content-types/MfaChallenge.d.ts +963 -55
- package/dist/esm/internal-content-types/MfaChallenge.d.ts.map +1 -1
- package/dist/esm/internal-content-types/MfaChallenge.js +3 -3
- package/dist/esm/internal-content-types/Page.d.ts +243 -27
- package/dist/esm/internal-content-types/Page.d.ts.map +1 -1
- package/dist/esm/internal-content-types/Page.js +3 -3
- package/dist/esm/internal-content-types/Redirect.d.ts +272 -14
- package/dist/esm/internal-content-types/Redirect.d.ts.map +1 -1
- package/dist/esm/internal-content-types/Redirect.js +2 -2
- package/dist/esm/internal-content-types/Route.d.ts +282 -11
- package/dist/esm/internal-content-types/Route.d.ts.map +1 -1
- package/dist/esm/internal-content-types/Route.js +2 -2
- package/dist/esm/internal-content-types/RouteLayoutModule.d.ts +308 -9
- package/dist/esm/internal-content-types/RouteLayoutModule.d.ts.map +1 -1
- package/dist/esm/internal-content-types/RouteLayoutModule.js +2 -2
- package/dist/esm/internal-content-types/RouteLayoutModuleOverride.d.ts +268 -8
- package/dist/esm/internal-content-types/RouteLayoutModuleOverride.d.ts.map +1 -1
- package/dist/esm/internal-content-types/RouteLayoutModuleOverride.js +2 -2
- package/dist/esm/internal-content-types/RouteMap.d.ts +267 -7
- package/dist/esm/internal-content-types/RouteMap.d.ts.map +1 -1
- package/dist/esm/internal-content-types/RouteMap.js +2 -2
- package/dist/esm/internal-content-types/RouteSettings.d.ts +299 -79
- package/dist/esm/internal-content-types/RouteSettings.d.ts.map +1 -1
- package/dist/esm/internal-content-types/RouteSettings.js +3 -3
- package/dist/esm/internal-content-types/Seo.d.ts +56 -4
- package/dist/esm/internal-content-types/Seo.d.ts.map +1 -1
- package/dist/esm/internal-content-types/Seo.js +2 -2
- package/dist/esm/internal-content-types/Session.d.ts +894 -51
- package/dist/esm/internal-content-types/Session.d.ts.map +1 -1
- package/dist/esm/internal-content-types/Session.js +3 -3
- package/dist/esm/internal-content-types/UserMfa.d.ts +831 -54
- package/dist/esm/internal-content-types/UserMfa.d.ts.map +1 -1
- package/dist/esm/internal-content-types/UserMfa.js +3 -3
- package/dist/esm/internal-content-types/WebAuthnCredential.d.ts +1066 -54
- package/dist/esm/internal-content-types/WebAuthnCredential.d.ts.map +1 -1
- package/dist/esm/internal-content-types/WebAuthnCredential.js +3 -3
- package/dist/esm/internal-content-types/WebAuthnRegChallenge.d.ts +948 -53
- package/dist/esm/internal-content-types/WebAuthnRegChallenge.d.ts.map +1 -1
- package/dist/esm/internal-content-types/WebAuthnRegChallenge.js +3 -3
- package/dist/esm/internal-content-types/index.d.ts +20 -20
- package/dist/esm/internal-content-types/index.js +20 -20
- package/dist/esm/lib/ContentType.d.ts +87 -49
- package/dist/esm/lib/ContentType.d.ts.map +1 -1
- package/dist/esm/lib/ContentType.js +94 -65
- package/dist/esm/lib/ContentType.js.map +1 -1
- package/dist/esm/lib/Logger.d.ts.map +1 -1
- package/dist/esm/lib/Logger.js +56 -0
- package/dist/esm/lib/Logger.js.map +1 -1
- package/dist/esm/lib/Permissions.d.ts +1 -1
- package/dist/esm/lib/Registry.d.ts +29 -7
- package/dist/esm/lib/Registry.d.ts.map +1 -1
- package/dist/esm/lib/Registry.js +35 -22
- package/dist/esm/lib/Registry.js.map +1 -1
- package/dist/esm/lib/errors/AppError.d.ts +1 -1
- package/dist/esm/lib/errors/AppError.js +1 -1
- package/dist/esm/lib/errors/index.d.ts +4 -4
- package/dist/esm/lib/errors/index.js +3 -3
- package/dist/esm/lib/errors/throwAppError.d.ts +1 -1
- package/dist/esm/lib/errors/throwAppError.js +3 -3
- package/dist/esm/lib/fields/Boolean.d.ts +8 -10
- package/dist/esm/lib/fields/Boolean.d.ts.map +1 -1
- package/dist/esm/lib/fields/Boolean.js +14 -8
- package/dist/esm/lib/fields/Boolean.js.map +1 -1
- package/dist/esm/lib/fields/ContentReference.d.ts +15 -15
- package/dist/esm/lib/fields/ContentReference.d.ts.map +1 -1
- package/dist/esm/lib/fields/ContentReference.js +30 -17
- package/dist/esm/lib/fields/ContentReference.js.map +1 -1
- package/dist/esm/lib/fields/Date.d.ts +14 -17
- package/dist/esm/lib/fields/Date.d.ts.map +1 -1
- package/dist/esm/lib/fields/Date.js +25 -21
- package/dist/esm/lib/fields/Date.js.map +1 -1
- package/dist/esm/lib/fields/Field.d.ts +122 -59
- package/dist/esm/lib/fields/Field.d.ts.map +1 -1
- package/dist/esm/lib/fields/Field.js +70 -55
- package/dist/esm/lib/fields/Field.js.map +1 -1
- package/dist/esm/lib/fields/Fields.d.ts +29 -0
- package/dist/esm/lib/fields/Fields.d.ts.map +1 -0
- package/dist/esm/lib/fields/Fields.js +29 -0
- package/dist/esm/lib/fields/Fields.js.map +1 -0
- package/dist/esm/lib/fields/File.d.ts +26 -51
- package/dist/esm/lib/fields/File.d.ts.map +1 -1
- package/dist/esm/lib/fields/File.js +60 -85
- package/dist/esm/lib/fields/File.js.map +1 -1
- package/dist/esm/lib/fields/Iterator.d.ts +13 -25
- package/dist/esm/lib/fields/Iterator.d.ts.map +1 -1
- package/dist/esm/lib/fields/Iterator.js +9 -10
- package/dist/esm/lib/fields/Iterator.js.map +1 -1
- package/dist/esm/lib/fields/Link.d.ts +13 -15
- package/dist/esm/lib/fields/Link.d.ts.map +1 -1
- package/dist/esm/lib/fields/Link.js +21 -15
- package/dist/esm/lib/fields/Link.js.map +1 -1
- package/dist/esm/lib/fields/List.d.ts +34 -34
- package/dist/esm/lib/fields/List.d.ts.map +1 -1
- package/dist/esm/lib/fields/List.js +46 -15
- package/dist/esm/lib/fields/List.js.map +1 -1
- package/dist/esm/lib/fields/Number.d.ts +12 -12
- package/dist/esm/lib/fields/Number.d.ts.map +1 -1
- package/dist/esm/lib/fields/Number.js +35 -16
- package/dist/esm/lib/fields/Number.js.map +1 -1
- package/dist/esm/lib/fields/Relation.d.ts +45 -39
- package/dist/esm/lib/fields/Relation.d.ts.map +1 -1
- package/dist/esm/lib/fields/Relation.js +75 -67
- package/dist/esm/lib/fields/Relation.js.map +1 -1
- package/dist/esm/lib/fields/Select.d.ts +14 -13
- package/dist/esm/lib/fields/Select.d.ts.map +1 -1
- package/dist/esm/lib/fields/Select.js +28 -16
- package/dist/esm/lib/fields/Select.js.map +1 -1
- package/dist/esm/lib/fields/SelfRelation.d.ts +19 -18
- package/dist/esm/lib/fields/SelfRelation.d.ts.map +1 -1
- package/dist/esm/lib/fields/SelfRelation.js +31 -21
- package/dist/esm/lib/fields/SelfRelation.js.map +1 -1
- package/dist/esm/lib/fields/SimpleList.d.ts +16 -20
- package/dist/esm/lib/fields/SimpleList.d.ts.map +1 -1
- package/dist/esm/lib/fields/SimpleList.js +38 -20
- package/dist/esm/lib/fields/SimpleList.js.map +1 -1
- package/dist/esm/lib/fields/String.d.ts +18 -25
- package/dist/esm/lib/fields/String.d.ts.map +1 -1
- package/dist/esm/lib/fields/String.js +55 -41
- package/dist/esm/lib/fields/String.js.map +1 -1
- package/dist/esm/lib/fields/index.d.ts +15 -83
- package/dist/esm/lib/fields/index.d.ts.map +1 -1
- package/dist/esm/lib/fields/index.js +15 -36
- package/dist/esm/lib/fields/index.js.map +1 -1
- package/dist/esm/lib/types/index.d.ts +8 -4
- package/dist/esm/lib/types/index.d.ts.map +1 -1
- package/dist/esm/lib/utils/getListField.d.ts +1 -1
- package/dist/esm/lib/utils/getSchemas.d.ts +1 -1
- package/dist/esm/lib/utils/getTranslation.d.ts +2 -2
- package/dist/esm/lib/utils/getTranslation.js +1 -1
- package/dist/esm/lib/utils/isTranslatableObject.d.ts +1 -1
- package/dist/esm/lib/utils/translateObject.d.ts +2 -2
- package/dist/esm/lib/utils/translateObject.js +3 -3
- package/dist/esm/literals/definitions.d.ts +1 -1
- package/dist/esm/literals/definitions.js +1 -1
- package/dist/esm/literals/index.d.ts +3 -3
- package/dist/esm/literals/index.js +3 -3
- package/dist/esm/literals/manager.d.ts +1 -1
- package/dist/esm/literals/manager.js +1 -1
- package/dist/esm/manager.d.ts +152 -148
- package/dist/esm/manager.d.ts.map +1 -1
- package/dist/esm/manager.js +2 -2
- package/dist/esm/media/imageOptimization.d.ts +1 -1
- package/dist/esm/media/imageOptimization.js +2 -2
- package/dist/esm/media/index.d.ts +4 -4
- package/dist/esm/media/index.js +3 -3
- package/dist/esm/media/mediaService.d.ts +1 -1
- package/dist/esm/orm/createIndexes.js +1 -1
- package/dist/esm/orm/database.js +3 -3
- package/dist/esm/orm/dbService.d.ts +3 -3
- package/dist/esm/orm/index.d.ts +2 -2
- package/dist/esm/orm/index.js +12 -12
- package/dist/esm/orm/mongodbPeer.js +1 -1
- package/dist/esm/orm/operations/clear.d.ts +1 -1
- package/dist/esm/orm/operations/clear.js +1 -1
- package/dist/esm/orm/operations/create.d.ts +2 -2
- package/dist/esm/orm/operations/create.js +4 -4
- package/dist/esm/orm/operations/delete.d.ts +2 -2
- package/dist/esm/orm/operations/delete.js +2 -2
- package/dist/esm/orm/operations/find.d.ts +2 -2
- package/dist/esm/orm/operations/find.js +3 -3
- package/dist/esm/orm/operations/findDependencies.d.ts +2 -2
- package/dist/esm/orm/operations/findDependencies.d.ts.map +1 -1
- package/dist/esm/orm/operations/findDependencies.js +8 -6
- package/dist/esm/orm/operations/findDependencies.js.map +1 -1
- package/dist/esm/orm/operations/get.d.ts +3 -3
- package/dist/esm/orm/operations/get.js +3 -3
- package/dist/esm/orm/operations/getAll.d.ts +2 -2
- package/dist/esm/orm/operations/getAll.js +2 -2
- package/dist/esm/orm/operations/list.d.ts +2 -2
- package/dist/esm/orm/operations/list.js +3 -3
- package/dist/esm/orm/operations/update.d.ts +3 -3
- package/dist/esm/orm/operations/update.js +5 -5
- package/dist/esm/orm/operations/updateMany.d.ts +2 -2
- package/dist/esm/orm/operations/updateMany.js +3 -3
- package/dist/esm/orm/operations/upsert.d.ts +2 -2
- package/dist/esm/orm/operations/upsert.js +4 -4
- package/dist/esm/orm/utils/deepDeleteNulls.js +1 -1
- package/dist/esm/orm/utils/parseId.d.ts +2 -2
- package/dist/esm/orm/utils/parseId.d.ts.map +1 -1
- package/dist/esm/orm/utils/parseId.js +1 -1
- package/dist/esm/orm/utils/transformObjectIdsToStrings.js +1 -1
- package/dist/esm/orm/utils/transformStringToObjectIds.js +1 -1
- package/dist/esm/schemas/manager/literals/upsert.js +1 -1
- package/dist/esm/schemas/manager/media/finalizeUpload.js +1 -1
- package/dist/esm/schemas/manager/media/getMediaUrl.js +1 -1
- package/dist/esm/schemas/manager/media/listFolders.js +1 -1
- package/dist/esm/schemas/web/page.d.ts +66 -18
- package/dist/esm/schemas/web/page.d.ts.map +1 -1
- package/dist/esm/schemas/web/page.js +1 -1
- package/dist/esm/web/index.d.ts +1 -1
- package/dist/esm/web/index.js +1 -1
- package/dist/esm/web/page.d.ts +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -3
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { MediaFolder, Media } from "../../../../internal-content-types
|
|
2
|
-
import { isAppError, throwAppError } from "../../../../lib/errors
|
|
3
|
-
import { Logger } from "../../../../lib/Logger
|
|
4
|
-
import { hasPermissions } from "../../../../lib/Permissions
|
|
5
|
-
import { MediaError, MediaErrorInvalidData, MediaErrorNotFound, getMediaService, } from "../../../../media
|
|
6
|
-
import { getMongoService } from "../../../../orm
|
|
7
|
-
import { DbErrorConflict, DbErrorInvalidData, } from "../../../../orm/dbService
|
|
8
|
-
import { checkPermissions } from "../../../utils/checkPermissions
|
|
9
|
-
import { slugify } from "../../../../lib/utils/slugify
|
|
1
|
+
import { MediaFolder, Media } from "../../../../internal-content-types";
|
|
2
|
+
import { isAppError, throwAppError } from "../../../../lib/errors";
|
|
3
|
+
import { Logger } from "../../../../lib/Logger";
|
|
4
|
+
import { hasPermissions } from "../../../../lib/Permissions";
|
|
5
|
+
import { MediaError, MediaErrorInvalidData, MediaErrorNotFound, getMediaService, } from "../../../../media";
|
|
6
|
+
import { getMongoService } from "../../../../orm";
|
|
7
|
+
import { DbErrorConflict, DbErrorInvalidData, } from "../../../../orm/dbService";
|
|
8
|
+
import { checkPermissions } from "../../../utils/checkPermissions";
|
|
9
|
+
import { slugify } from "../../../../lib/utils/slugify";
|
|
10
10
|
const normalizePath = (value) => value
|
|
11
11
|
.trim()
|
|
12
12
|
.replace(/\\/g, "/")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GetMediaUrlInput, GetMediaUrlOutput } from "../../../../media
|
|
2
|
-
import { RakunRequestContext } from "../../../context
|
|
1
|
+
import { GetMediaUrlInput, GetMediaUrlOutput } from "../../../../media";
|
|
2
|
+
import { RakunRequestContext } from "../../../context";
|
|
3
3
|
export declare const getMediaUrlHandler: ({ input, ctx, }: {
|
|
4
4
|
input: GetMediaUrlInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { throwAppError } from "../../../../lib/errors
|
|
2
|
-
import { MediaErrorInvalidData, MediaErrorNotFound, getMediaService, } from "../../../../media
|
|
3
|
-
import { checkAnyPermissions } from "../../../utils/checkPermissions
|
|
1
|
+
import { throwAppError } from "../../../../lib/errors";
|
|
2
|
+
import { MediaErrorInvalidData, MediaErrorNotFound, getMediaService, } from "../../../../media";
|
|
3
|
+
import { checkAnyPermissions } from "../../../utils/checkPermissions";
|
|
4
4
|
const mapMediaError = (error) => {
|
|
5
5
|
if (error instanceof MediaErrorInvalidData) {
|
|
6
6
|
throwAppError("VALIDATION", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RakunRequestContext } from "../../../context
|
|
2
|
-
import { ListFoldersInput, ListFoldersOutput } from "../../../../schemas/manager/media/listFolders
|
|
1
|
+
import { RakunRequestContext } from "../../../context";
|
|
2
|
+
import { ListFoldersInput, ListFoldersOutput } from "../../../../schemas/manager/media/listFolders";
|
|
3
3
|
export declare const listFoldersHandler: ({ input, ctx, }: {
|
|
4
4
|
input: ListFoldersInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MediaFolder } from "../../../../internal-content-types
|
|
2
|
-
import { hasPermissions } from "../../../../lib/Permissions
|
|
3
|
-
import { getMongoService } from "../../../../orm
|
|
4
|
-
import { checkAnyPermissions } from "../../../utils/checkPermissions
|
|
1
|
+
import { MediaFolder } from "../../../../internal-content-types";
|
|
2
|
+
import { hasPermissions } from "../../../../lib/Permissions";
|
|
3
|
+
import { getMongoService } from "../../../../orm";
|
|
4
|
+
import { checkAnyPermissions } from "../../../utils/checkPermissions";
|
|
5
5
|
export const listFoldersHandler = async ({ input, ctx, }) => {
|
|
6
6
|
const user = ctx.getUser();
|
|
7
7
|
const db = await getMongoService();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PrepareUploadInput, PrepareUploadOutput } from "../../../../media
|
|
2
|
-
import { RakunRequestContext } from "../../../context
|
|
1
|
+
import { PrepareUploadInput, PrepareUploadOutput } from "../../../../media";
|
|
2
|
+
import { RakunRequestContext } from "../../../context";
|
|
3
3
|
export declare const prepareUploadHandler: ({ input, ctx, }: {
|
|
4
4
|
input: PrepareUploadInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { throwAppError } from "../../../../lib/errors
|
|
2
|
-
import { Logger } from "../../../../lib/Logger
|
|
3
|
-
import { MediaErrorInvalidData, MediaErrorNotFound, getMediaService, } from "../../../../media
|
|
4
|
-
import { checkPermissions } from "../../../utils/checkPermissions
|
|
1
|
+
import { throwAppError } from "../../../../lib/errors";
|
|
2
|
+
import { Logger } from "../../../../lib/Logger";
|
|
3
|
+
import { MediaErrorInvalidData, MediaErrorNotFound, getMediaService, } from "../../../../media";
|
|
4
|
+
import { checkPermissions } from "../../../utils/checkPermissions";
|
|
5
5
|
const mapMediaError = (error) => {
|
|
6
6
|
Logger.error("manager.media.prepareUpload failed", {
|
|
7
7
|
error: error instanceof Error ? error.message : String(error),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
import { getAppErrorStatusCode, isAppError } from "../../../../lib/errors
|
|
3
|
-
import { Logger } from "../../../../lib/Logger
|
|
4
|
-
import { getMediaService } from "../../../../media
|
|
5
|
-
import { optimizeImageUpload } from "../../../../media/imageOptimization
|
|
6
|
-
import { createRequestContext } from "../../../context
|
|
7
|
-
import { checkPermissions } from "../../../utils/checkPermissions
|
|
2
|
+
import { getAppErrorStatusCode, isAppError } from "../../../../lib/errors";
|
|
3
|
+
import { Logger } from "../../../../lib/Logger";
|
|
4
|
+
import { getMediaService } from "../../../../media";
|
|
5
|
+
import { optimizeImageUpload } from "../../../../media/imageOptimization";
|
|
6
|
+
import { createRequestContext } from "../../../context";
|
|
7
|
+
import { checkPermissions } from "../../../utils/checkPermissions";
|
|
8
8
|
const uploadHeadersSchema = z.object({
|
|
9
9
|
key: z.string().min(1),
|
|
10
10
|
access: z.enum(["public", "private"]).default("public"),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RakunRequestContext } from "../../context
|
|
2
|
-
import { SetDefaultLanguageInput } from "../../../schemas/manager/setDefaultLanguage
|
|
1
|
+
import { RakunRequestContext } from "../../context";
|
|
2
|
+
import { SetDefaultLanguageInput } from "../../../schemas/manager/setDefaultLanguage";
|
|
3
3
|
export declare const setDefaultLanguageHandler: ({ input, ctx, }: {
|
|
4
4
|
input: SetDefaultLanguageInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Language } from "../../../internal-content-types
|
|
2
|
-
import { throwAppError } from "../../../lib/errors
|
|
3
|
-
import { getMongoService } from "../../../orm
|
|
4
|
-
import { checkPermissions } from "../../utils/checkPermissions
|
|
1
|
+
import { Language } from "../../../internal-content-types";
|
|
2
|
+
import { throwAppError } from "../../../lib/errors";
|
|
3
|
+
import { getMongoService } from "../../../orm";
|
|
4
|
+
import { checkPermissions } from "../../utils/checkPermissions";
|
|
5
5
|
export const setDefaultLanguageHandler = async ({ input, ctx, }) => {
|
|
6
6
|
const db = await getMongoService();
|
|
7
7
|
const { language: languageCode } = input;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UpdateInput } from "../../../schemas/manager/update
|
|
2
|
-
import { RakunRequestContext } from "../../context
|
|
1
|
+
import { UpdateInput } from "../../../schemas/manager/update";
|
|
2
|
+
import { RakunRequestContext } from "../../context";
|
|
3
3
|
export declare const updateHandler: ({ input, ctx, }: {
|
|
4
4
|
input: UpdateInput;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { throwAppError } from "../../../lib/errors
|
|
3
|
-
import { Logger } from "../../../lib/Logger
|
|
4
|
-
import { getContentTypeByName } from "../../../lib/Registry
|
|
5
|
-
import { getMongoService } from "../../../orm
|
|
6
|
-
import { DbErrorInvalidData, DbErrorConflict } from "../../../orm/dbService
|
|
7
|
-
import { getInputProxy } from "../../proxies
|
|
8
|
-
import { checkOwnership } from "../../utils/checkOwnership
|
|
9
|
-
import { checkRevalidatePath } from "../../utils/routes/revalidatePath
|
|
2
|
+
import { throwAppError } from "../../../lib/errors";
|
|
3
|
+
import { Logger } from "../../../lib/Logger";
|
|
4
|
+
import { getContentTypeByName } from "../../../lib/Registry";
|
|
5
|
+
import { getMongoService } from "../../../orm";
|
|
6
|
+
import { DbErrorInvalidData, DbErrorConflict } from "../../../orm/dbService";
|
|
7
|
+
import { getInputProxy } from "../../proxies";
|
|
8
|
+
import { checkOwnership } from "../../utils/checkOwnership";
|
|
9
|
+
import { checkRevalidatePath } from "../../utils/routes/revalidatePath";
|
|
10
10
|
export const updateHandler = async ({ input, ctx, }) => {
|
|
11
11
|
Logger.addTrace("manager.update: handler start", {
|
|
12
12
|
contentType: input.contentType,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { RouteMap, Route, RouteLayoutModule, RouteLayoutModuleOverride, Language, LiteralTranslation, } from "../../../internal-content-types
|
|
2
|
-
import { throwAppError } from "../../../lib/errors
|
|
3
|
-
import { Logger } from "../../../lib/Logger
|
|
4
|
-
import { getContentTypeByName } from "../../../lib/Registry
|
|
5
|
-
import { translateObject } from "../../../lib/utils/translateObject
|
|
6
|
-
import { getLiteralDefinitions } from "../../../literals
|
|
7
|
-
import { getMongoService } from "../../../orm
|
|
8
|
-
import { ProxyOutput } from "../../proxies
|
|
9
|
-
import { runProxyContext } from "../../proxies/context
|
|
10
|
-
import { getLanguages } from "../../utils/getLanguages
|
|
11
|
-
import { populateRelations } from "../../utils/populates/populateRelations
|
|
12
|
-
import { resolveRedirect } from "../../utils/redirects/resolveRedirect
|
|
13
|
-
import { validateModule } from "../../utils/validateModule
|
|
1
|
+
import { RouteMap, Route, RouteLayoutModule, RouteLayoutModuleOverride, Language, LiteralTranslation, } from "../../../internal-content-types";
|
|
2
|
+
import { throwAppError } from "../../../lib/errors";
|
|
3
|
+
import { Logger } from "../../../lib/Logger";
|
|
4
|
+
import { getContentTypeByName } from "../../../lib/Registry";
|
|
5
|
+
import { translateObject } from "../../../lib/utils/translateObject";
|
|
6
|
+
import { getLiteralDefinitions } from "../../../literals";
|
|
7
|
+
import { getMongoService } from "../../../orm";
|
|
8
|
+
import { ProxyOutput } from "../../proxies";
|
|
9
|
+
import { runProxyContext } from "../../proxies/context";
|
|
10
|
+
import { getLanguages } from "../../utils/getLanguages";
|
|
11
|
+
import { populateRelations } from "../../utils/populates/populateRelations";
|
|
12
|
+
import { resolveRedirect } from "../../utils/redirects/resolveRedirect";
|
|
13
|
+
import { validateModule } from "../../utils/validateModule";
|
|
14
14
|
const NotFoundResponse = {
|
|
15
15
|
renderMode: "static",
|
|
16
16
|
ttl: 86400,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { SimulatedFailureDatabaseCaseLiterals } from "../../orm/dbService
|
|
1
|
+
import { SimulatedFailureDatabaseCaseLiterals } from "../../orm/dbService";
|
|
2
2
|
export declare function checkFailureCase(failureCase: SimulatedFailureDatabaseCaseLiterals): Promise<void>;
|
|
3
3
|
//# sourceMappingURL=checkFailureCase.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getSimulatedFailureCase, DbErrorSimulatedFailure, } from "../../orm/dbService
|
|
1
|
+
import { getSimulatedFailureCase, DbErrorSimulatedFailure, } from "../../orm/dbService";
|
|
2
2
|
export async function checkFailureCase(failureCase) {
|
|
3
3
|
const currentFailureCase = getSimulatedFailureCase();
|
|
4
4
|
if (currentFailureCase === failureCase) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import ContentType from "../../lib/ContentType
|
|
2
|
-
import { RakunRequestContext } from "../context
|
|
1
|
+
import ContentType from "../../lib/ContentType";
|
|
2
|
+
import { RakunRequestContext } from "../context";
|
|
3
3
|
export declare const checkOwnership: ({ ctx, contentType, id, permission, }: {
|
|
4
4
|
contentType: ContentType;
|
|
5
5
|
ctx: RakunRequestContext;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { throwAppError } from "../../lib/errors
|
|
2
|
-
import { getMongoService } from "../../orm
|
|
3
|
-
import { checkAnyPermissions, checkPermissions } from "./checkPermissions
|
|
1
|
+
import { throwAppError } from "../../lib/errors";
|
|
2
|
+
import { getMongoService } from "../../orm";
|
|
3
|
+
import { checkAnyPermissions, checkPermissions } from "./checkPermissions";
|
|
4
4
|
export const checkOwnership = async ({ ctx, contentType, id, permission, }) => {
|
|
5
5
|
const user = ctx.getUser();
|
|
6
6
|
const db = await getMongoService();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ManagerUserSchema } from "../../internal-content-types
|
|
2
|
-
import { Permission } from "../../lib/Permissions
|
|
1
|
+
import { ManagerUserSchema } from "../../internal-content-types";
|
|
2
|
+
import { Permission } from "../../lib/Permissions";
|
|
3
3
|
export declare const checkPermissions: (user: ManagerUserSchema, permissions: Permission[]) => void;
|
|
4
4
|
export declare const checkAnyPermissions: (user: ManagerUserSchema, permissions: Permission[]) => void;
|
|
5
5
|
//# sourceMappingURL=checkPermissions.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { throwAppError } from "../../lib/errors
|
|
2
|
-
import { hasPermissions, mapPermissions, } from "../../lib/Permissions
|
|
1
|
+
import { throwAppError } from "../../lib/errors";
|
|
2
|
+
import { hasPermissions, mapPermissions, } from "../../lib/Permissions";
|
|
3
3
|
export const checkPermissions = (user, permissions) => {
|
|
4
4
|
if (!hasPermissions(user, permissions)) {
|
|
5
5
|
throwAppError("FORBIDDEN", {
|
|
@@ -2,13 +2,9 @@ export declare const getLanguages: () => Promise<{
|
|
|
2
2
|
code: string;
|
|
3
3
|
name: string;
|
|
4
4
|
default: boolean;
|
|
5
|
-
_type: "Language";
|
|
6
|
-
parent?: {
|
|
7
|
-
type: "self";
|
|
8
|
-
_id: string;
|
|
9
|
-
contentType: string;
|
|
10
|
-
} | undefined;
|
|
11
5
|
_id: string;
|
|
6
|
+
_type: "Language";
|
|
7
|
+
parent?: import("../..").SelfRelationValue<string> | undefined;
|
|
12
8
|
createdAt?: Date | undefined;
|
|
13
9
|
updatedAt?: Date | undefined;
|
|
14
10
|
createdBy?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLanguages.d.ts","sourceRoot":"","sources":["../../../../src/api/utils/getLanguages.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"getLanguages.d.ts","sourceRoot":"","sources":["../../../../src/api/utils/getLanguages.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;;;;;;;;;;IAGxB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Language } from "../../internal-content-types
|
|
2
|
-
import { getMongoService } from "../../orm
|
|
1
|
+
import { Language } from "../../internal-content-types";
|
|
2
|
+
import { getMongoService } from "../../orm";
|
|
3
3
|
export const getLanguages = async () => {
|
|
4
4
|
const db = await getMongoService();
|
|
5
5
|
return await db.getAll(Language);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TranslatableValue } from "../../lib/types
|
|
2
|
-
import { RouteKeys } from "./routes/routeDefinitions
|
|
1
|
+
import { TranslatableValue } from "../../lib/types";
|
|
2
|
+
import { RouteKeys } from "./routes/routeDefinitions";
|
|
3
3
|
export declare const getLink: (key: RouteKeys, id: string) => Promise<TranslatableValue<string>>;
|
|
4
4
|
export declare const getTranslatedLink: (key: RouteKeys, id: string, locale: string) => Promise<string>;
|
|
5
5
|
//# sourceMappingURL=getLink.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Route, RouteMap } from "../../internal-content-types
|
|
2
|
-
import { getRakunBootstrapOptions } from "../../bootstrapState
|
|
3
|
-
import { throwAppError } from "../../lib/errors
|
|
4
|
-
import { getMongoService } from "../../orm
|
|
1
|
+
import { Route, RouteMap } from "../../internal-content-types";
|
|
2
|
+
import { getRakunBootstrapOptions } from "../../bootstrapState";
|
|
3
|
+
import { throwAppError } from "../../lib/errors";
|
|
4
|
+
import { getMongoService } from "../../orm";
|
|
5
5
|
export const getLink = async (key, id) => {
|
|
6
6
|
const db = await getMongoService();
|
|
7
7
|
const configuredRoute = getRakunBootstrapOptions()?.routes?.find((route) => route.key === key);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RakunRequestContext } from "../context
|
|
1
|
+
import { RakunRequestContext } from "../context";
|
|
2
2
|
export declare const getUser: (ctx: RakunRequestContext) => Promise<{
|
|
3
3
|
user: string;
|
|
4
4
|
email: string;
|
|
@@ -8,13 +8,17 @@ export declare const getUser: (ctx: RakunRequestContext) => Promise<{
|
|
|
8
8
|
permissions: ("manager.users.readAny" | "manager.users.updateAny" | "manager.users.deleteAny" | "manager.roles.readAny" | "manager.roles.updateAny" | "manager.roles.deleteAny" | "manager.routes.readAny" | "manager.routes.updateAny" | "manager.routes.deleteAny" | "manager.languages.readAny" | "manager.languages.updateAny" | "manager.languages.deleteAny" | "content.Media.readAny" | "content.Media.own" | "content.Media.updateAny" | "content.Media.deleteAny" | "content.Redirect.readAny" | "content.Redirect.own" | "content.Redirect.updateAny" | "content.Redirect.deleteAny" | "manager.literals.readAny" | "manager.literals.updateAny")[];
|
|
9
9
|
_type: "ManagerRole";
|
|
10
10
|
_id: string;
|
|
11
|
+
createdAt?: Date | undefined;
|
|
12
|
+
updatedAt?: Date | undefined;
|
|
13
|
+
createdBy?: string | undefined;
|
|
14
|
+
updatedBy?: string | undefined;
|
|
11
15
|
};
|
|
12
16
|
twoFactorEnabled: boolean;
|
|
13
17
|
_type: "ManagerUser";
|
|
14
18
|
_id: string;
|
|
15
|
-
createdBy?: string | undefined;
|
|
16
|
-
updatedBy?: string | undefined;
|
|
17
19
|
createdAt?: Date | undefined;
|
|
18
20
|
updatedAt?: Date | undefined;
|
|
21
|
+
createdBy?: string | undefined;
|
|
22
|
+
updatedBy?: string | undefined;
|
|
19
23
|
} | null>;
|
|
20
24
|
//# sourceMappingURL=getUser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUser.d.ts","sourceRoot":"","sources":["../../../../src/api/utils/getUser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAMjD,eAAO,MAAM,OAAO,GAAU,KAAK,mBAAmB
|
|
1
|
+
{"version":3,"file":"getUser.d.ts","sourceRoot":"","sources":["../../../../src/api/utils/getUser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAMjD,eAAO,MAAM,OAAO,GAAU,KAAK,mBAAmB;;;;;;;;;;;;;;;;;;;;;SAiBrD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getSessionCookie } from "../sessionCookie
|
|
2
|
-
import { ManagerUser, Session } from "../../internal-content-types
|
|
3
|
-
import { getMongoService } from "../../orm
|
|
4
|
-
import { populateRelations } from "./populates/populateRelations
|
|
1
|
+
import { getSessionCookie } from "../sessionCookie";
|
|
2
|
+
import { ManagerUser, Session } from "../../internal-content-types";
|
|
3
|
+
import { getMongoService } from "../../orm";
|
|
4
|
+
import { populateRelations } from "./populates/populateRelations";
|
|
5
5
|
export const getUser = async (ctx) => {
|
|
6
6
|
const token = getSessionCookie(ctx);
|
|
7
7
|
if (!token)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { requirePeerDependency } from "../../lib/utils/peerDependencies
|
|
1
|
+
import { requirePeerDependency } from "../../lib/utils/peerDependencies";
|
|
2
2
|
const getBcrypt = () => requirePeerDependency("bcrypt", "npm install bcrypt", "Rakun uses bcrypt to verify and hash manager passwords.");
|
|
3
3
|
export const verifyPassword = (password, hash) => {
|
|
4
4
|
return getBcrypt().compareSync(password, hash);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ContentType from "../../../lib/ContentType
|
|
2
|
-
import { DBOutput, DataFront } from "../../../lib/types
|
|
1
|
+
import ContentType from "../../../lib/ContentType";
|
|
2
|
+
import { DBOutput, DataFront } from "../../../lib/types";
|
|
3
3
|
export declare const populateLinks: <T extends ContentType>(data: DBOutput<T>) => Promise<DataFront<T>>;
|
|
4
4
|
//# sourceMappingURL=populateLinks.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RouteMap } from "../../../internal-content-types
|
|
2
|
-
import { hasKeys } from "../../../lib/utils/hasKeys
|
|
3
|
-
import { getMongoService } from "../../../orm
|
|
4
|
-
import { getLanguages } from "../getLanguages
|
|
1
|
+
import { RouteMap } from "../../../internal-content-types";
|
|
2
|
+
import { hasKeys } from "../../../lib/utils/hasKeys";
|
|
3
|
+
import { getMongoService } from "../../../orm";
|
|
4
|
+
import { getLanguages } from "../getLanguages";
|
|
5
5
|
export const populateLinks = async (data) => {
|
|
6
6
|
const db = await getMongoService();
|
|
7
7
|
const languages = await getLanguages();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import ContentType from "../../../lib/ContentType
|
|
2
|
-
import { DBOutput, DataPopulated } from "../../../lib/types
|
|
1
|
+
import ContentType from "../../../lib/ContentType";
|
|
2
|
+
import { DBOutput, DataPopulated } from "../../../lib/types";
|
|
3
3
|
/**
|
|
4
4
|
*
|
|
5
5
|
* @param data - The raw database output for a content item, which may include relation references.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Media } from "../../../internal-content-types
|
|
2
|
-
import { getContentTypeByName } from "../../../lib/Registry
|
|
3
|
-
import { hasKeys } from "../../../lib/utils/hasKeys
|
|
4
|
-
import { getMediaService } from "../../../media
|
|
5
|
-
import { getMongoService } from "../../../orm
|
|
6
|
-
import { getMongoDB } from "../../../orm/mongodbPeer
|
|
1
|
+
import { Media } from "../../../internal-content-types";
|
|
2
|
+
import { getContentTypeByName } from "../../../lib/Registry";
|
|
3
|
+
import { hasKeys } from "../../../lib/utils/hasKeys";
|
|
4
|
+
import { getMediaService } from "../../../media";
|
|
5
|
+
import { getMongoService } from "../../../orm";
|
|
6
|
+
import { getMongoDB } from "../../../orm/mongodbPeer";
|
|
7
7
|
export async function populateRelations(data) {
|
|
8
8
|
const db = await getMongoService();
|
|
9
9
|
const { ObjectId } = getMongoDB();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Redirect } from "../../../internal-content-types
|
|
2
|
-
import { getMongoService } from "../../../orm
|
|
1
|
+
import { Redirect } from "../../../internal-content-types";
|
|
2
|
+
import { getMongoService } from "../../../orm";
|
|
3
3
|
const DEFAULT_STATUS = 302;
|
|
4
4
|
const TOKEN_REGEX = /\{([a-zA-Z0-9_]+)\}/g;
|
|
5
5
|
const MAX_HEADER_REGEX_LENGTH = 120;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Route, Language, RouteMap } from "../../../internal-content-types
|
|
2
|
-
import { getRakunBootstrapOptions } from "../../../bootstrapState
|
|
3
|
-
import { Logger } from "../../../lib/Logger
|
|
4
|
-
import { getMongoService } from "../../../orm
|
|
5
|
-
import { regenerateAllRoutesMap, updateLanguageRoutesMap, updateRouteRouteMap, updateSingleRouteMap, } from "./updateRoutesMap
|
|
1
|
+
import { Route, Language, RouteMap } from "../../../internal-content-types";
|
|
2
|
+
import { getRakunBootstrapOptions } from "../../../bootstrapState";
|
|
3
|
+
import { Logger } from "../../../lib/Logger";
|
|
4
|
+
import { getMongoService } from "../../../orm";
|
|
5
|
+
import { regenerateAllRoutesMap, updateLanguageRoutesMap, updateRouteRouteMap, updateSingleRouteMap, } from "./updateRoutesMap";
|
|
6
6
|
const normalizePath = (value) => {
|
|
7
7
|
const trimmed = value.trim();
|
|
8
8
|
if (!trimmed)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RouteMap, Route, Language, RouteSettings } from "../../../internal-content-types
|
|
2
|
-
import { DataInput, DBOutput } from "../../../lib/types
|
|
3
|
-
import { DBService } from "../../../orm/dbService
|
|
1
|
+
import { RouteMap, Route, Language, RouteSettings } from "../../../internal-content-types";
|
|
2
|
+
import { DataInput, DBOutput } from "../../../lib/types";
|
|
3
|
+
import { DBService } from "../../../orm/dbService";
|
|
4
4
|
export type UnknownItem = {
|
|
5
5
|
[x: string]: unknown;
|
|
6
6
|
_id: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { revalidatePath } from "./revalidatePath
|
|
2
|
-
import { getLanguages } from "../getLanguages
|
|
3
|
-
import { syncConfiguredRoutes } from "./syncConfiguredRoutes
|
|
4
|
-
import { RouteMap, RouteSettings, } from "../../../internal-content-types
|
|
5
|
-
import { getContentTypeByName } from "../../../lib/Registry
|
|
6
|
-
import { getMongoService } from "../../../orm
|
|
1
|
+
import { revalidatePath } from "./revalidatePath";
|
|
2
|
+
import { getLanguages } from "../getLanguages";
|
|
3
|
+
import { syncConfiguredRoutes } from "./syncConfiguredRoutes";
|
|
4
|
+
import { RouteMap, RouteSettings, } from "../../../internal-content-types";
|
|
5
|
+
import { getContentTypeByName } from "../../../lib/Registry";
|
|
6
|
+
import { getMongoService } from "../../../orm";
|
|
7
7
|
export async function loadRouteData() {
|
|
8
8
|
const db = await getMongoService();
|
|
9
9
|
const routes = await syncConfiguredRoutes();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Route } from "../../../internal-content-types
|
|
2
|
-
import { DBOutput } from "../../../lib/types
|
|
1
|
+
import { Route } from "../../../internal-content-types";
|
|
2
|
+
import { DBOutput } from "../../../lib/types";
|
|
3
3
|
export declare function syncConfiguredRoutes(): Promise<DBOutput<typeof Route>[]>;
|
|
4
4
|
//# sourceMappingURL=syncConfiguredRoutes.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Route, RouteLayoutModule, RouteLayoutModuleOverride, RouteMap, } from "../../../internal-content-types
|
|
2
|
-
import { getRakunBootstrapOptions } from "../../../bootstrapState
|
|
3
|
-
import { getMongoService } from "../../../orm
|
|
4
|
-
import { getLanguages } from "../getLanguages
|
|
5
|
-
import { createTranslatableBasePath, getRouteLayoutContentOrder, getRouteLayoutModules, routeSignature, } from "./routeDefinitions
|
|
1
|
+
import { Route, RouteLayoutModule, RouteLayoutModuleOverride, RouteMap, } from "../../../internal-content-types";
|
|
2
|
+
import { getRakunBootstrapOptions } from "../../../bootstrapState";
|
|
3
|
+
import { getMongoService } from "../../../orm";
|
|
4
|
+
import { getLanguages } from "../getLanguages";
|
|
5
|
+
import { createTranslatableBasePath, getRouteLayoutContentOrder, getRouteLayoutModules, routeSignature, } from "./routeDefinitions";
|
|
6
6
|
const buildRoutePayload = ({ definition, existingRoute, localeCodes, }) => ({
|
|
7
7
|
_type: "Route",
|
|
8
8
|
basePath: existingRoute?.basePath ??
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Language, Route } from "../../../internal-content-types
|
|
2
|
-
import { DBOutput } from "../../../lib/types
|
|
1
|
+
import { Language, Route } from "../../../internal-content-types";
|
|
2
|
+
import { DBOutput } from "../../../lib/types";
|
|
3
3
|
export declare const regenerateAllRoutesMap: () => Promise<void>;
|
|
4
4
|
export declare function updateSingleRouteMap({ contentType, contentTypeId, }: {
|
|
5
5
|
contentType: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RouteMap, Route } from "../../../internal-content-types
|
|
2
|
-
import { Logger } from "../../../lib/Logger
|
|
3
|
-
import { getContentTypeByName } from "../../../lib/Registry
|
|
4
|
-
import { buildRoutePath, generateRouteMapItems, getParentPath, getRouteFields, loadRouteData, revalidateRoutePaths, updateRouteMapEntries, } from "./routeMapHelpers
|
|
1
|
+
import { RouteMap, Route } from "../../../internal-content-types";
|
|
2
|
+
import { Logger } from "../../../lib/Logger";
|
|
3
|
+
import { getContentTypeByName } from "../../../lib/Registry";
|
|
4
|
+
import { buildRoutePath, generateRouteMapItems, getParentPath, getRouteFields, loadRouteData, revalidateRoutePaths, updateRouteMapEntries, } from "./routeMapHelpers";
|
|
5
5
|
export const regenerateAllRoutesMap = async () => {
|
|
6
6
|
Logger.addTrace("routes.regenerateAll: start");
|
|
7
7
|
const { routes, languages, routeSettings, db } = await loadRouteData();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MaybeTranslatableValue, FlattenTranslate } from "../../lib/types
|
|
1
|
+
import { MaybeTranslatableValue, FlattenTranslate } from "../../lib/types";
|
|
2
2
|
export declare const translate: <T extends Record<string, MaybeTranslatableValue<unknown>>>(obj: T, lang: string) => Promise<FlattenTranslate<T>>;
|
|
3
3
|
//# sourceMappingURL=translate.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { throwAppError } from "../../lib/errors
|
|
2
|
-
import { translateObject } from "../../lib/utils/translateObject
|
|
3
|
-
import { getLanguages } from "./getLanguages
|
|
1
|
+
import { throwAppError } from "../../lib/errors";
|
|
2
|
+
import { translateObject } from "../../lib/utils/translateObject";
|
|
3
|
+
import { getLanguages } from "./getLanguages";
|
|
4
4
|
export const translate = async (obj, lang) => {
|
|
5
5
|
const languages = await getLanguages();
|
|
6
6
|
const language = languages.find((l) => l.code === lang);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import z, { ZodError } from "zod";
|
|
2
|
-
import { Logger } from "../../lib/Logger
|
|
3
|
-
import { getContentTypeByName } from "../../lib/Registry
|
|
2
|
+
import { Logger } from "../../lib/Logger";
|
|
3
|
+
import { getContentTypeByName } from "../../lib/Registry";
|
|
4
4
|
export const validateModule = (module) => {
|
|
5
5
|
const ct = getContentTypeByName(module._type);
|
|
6
6
|
try {
|