zibri 2.3.0 → 2.4.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/dist/cjs/application-options.model.d.ts +37 -0
- package/dist/cjs/application-options.model.d.ts.map +1 -1
- package/dist/cjs/application-options.model.js +1 -0
- package/dist/cjs/application-options.model.js.map +1 -1
- package/dist/cjs/application.d.ts +4 -2
- package/dist/cjs/application.d.ts.map +1 -1
- package/dist/cjs/application.js +55 -4
- package/dist/cjs/application.js.map +1 -1
- package/dist/cjs/assets/asset.service.d.ts.map +1 -1
- package/dist/cjs/assets/asset.service.js +0 -5
- package/dist/cjs/assets/asset.service.js.map +1 -1
- package/dist/cjs/auth/2fa/methods/otp/otp.two-factor-method.d.ts +4 -4
- package/dist/cjs/auth/2fa/methods/otp/otp.two-factor-method.d.ts.map +1 -1
- package/dist/cjs/auth/2fa/methods/otp/otp.two-factor-method.js +4 -4
- package/dist/cjs/auth/2fa/methods/otp/otp.two-factor-method.js.map +1 -1
- package/dist/cjs/auth/2fa/methods/two-factor-method.interface.d.ts +3 -3
- package/dist/cjs/auth/2fa/methods/two-factor-method.interface.d.ts.map +1 -1
- package/dist/cjs/auth/2fa/two-factor-service.interface.d.ts +3 -3
- package/dist/cjs/auth/2fa/two-factor-service.interface.d.ts.map +1 -1
- package/dist/cjs/auth/2fa/two-factor.service.d.ts +3 -3
- package/dist/cjs/auth/2fa/two-factor.service.d.ts.map +1 -1
- package/dist/cjs/auth/2fa/two-factor.service.js +6 -2
- package/dist/cjs/auth/2fa/two-factor.service.js.map +1 -1
- package/dist/cjs/auth/auth-service.interface.d.ts +7 -7
- package/dist/cjs/auth/auth-service.interface.d.ts.map +1 -1
- package/dist/cjs/auth/auth.service.d.ts +8 -8
- package/dist/cjs/auth/auth.service.d.ts.map +1 -1
- package/dist/cjs/auth/auth.service.js +26 -18
- package/dist/cjs/auth/auth.service.js.map +1 -1
- package/dist/cjs/auth/encryption/encryption-key.model.d.ts +41 -0
- package/dist/cjs/auth/encryption/encryption-key.model.d.ts.map +1 -0
- package/dist/cjs/auth/encryption/encryption-key.model.js +59 -0
- package/dist/cjs/auth/encryption/encryption-key.model.js.map +1 -0
- package/dist/cjs/auth/encryption/encryption-master-options.model.d.ts +36 -0
- package/dist/cjs/auth/encryption/encryption-master-options.model.d.ts.map +1 -0
- package/dist/cjs/auth/encryption/encryption-master-options.model.js +3 -0
- package/dist/cjs/auth/encryption/encryption-master-options.model.js.map +1 -0
- package/dist/cjs/auth/encryption/encryption-service.interface.d.ts +68 -0
- package/dist/cjs/auth/encryption/encryption-service.interface.d.ts.map +1 -0
- package/dist/cjs/auth/encryption/encryption-service.interface.js +3 -0
- package/dist/cjs/auth/encryption/encryption-service.interface.js.map +1 -0
- package/dist/cjs/auth/encryption/encryption.service.d.ts +71 -0
- package/dist/cjs/auth/encryption/encryption.service.d.ts.map +1 -0
- package/dist/cjs/auth/encryption/encryption.service.js +559 -0
- package/dist/cjs/auth/encryption/encryption.service.js.map +1 -0
- package/dist/cjs/auth/encryption/encryption.utilities.d.ts +46 -0
- package/dist/cjs/auth/encryption/encryption.utilities.d.ts.map +1 -0
- package/dist/cjs/auth/encryption/encryption.utilities.js +37 -0
- package/dist/cjs/auth/encryption/encryption.utilities.js.map +1 -0
- package/dist/cjs/auth/encryption/strategies/aes-gcm.encryption-strategy.d.ts +37 -0
- package/dist/cjs/auth/encryption/strategies/aes-gcm.encryption-strategy.d.ts.map +1 -0
- package/dist/cjs/auth/encryption/strategies/aes-gcm.encryption-strategy.js +71 -0
- package/dist/cjs/auth/encryption/strategies/aes-gcm.encryption-strategy.js.map +1 -0
- package/dist/cjs/auth/encryption/strategies/encryption-strategy-entity.model.d.ts +42 -0
- package/dist/cjs/auth/encryption/strategies/encryption-strategy-entity.model.d.ts.map +1 -0
- package/dist/cjs/auth/encryption/strategies/encryption-strategy-entity.model.js +67 -0
- package/dist/cjs/auth/encryption/strategies/encryption-strategy-entity.model.js.map +1 -0
- package/dist/cjs/auth/encryption/strategies/encryption-strategy.interface.d.ts +61 -0
- package/dist/cjs/auth/encryption/strategies/encryption-strategy.interface.d.ts.map +1 -0
- package/dist/cjs/auth/encryption/strategies/encryption-strategy.interface.js +3 -0
- package/dist/cjs/auth/encryption/strategies/encryption-strategy.interface.js.map +1 -0
- package/dist/cjs/auth/hash/hash-service.interface.d.ts +35 -0
- package/dist/cjs/auth/hash/hash-service.interface.d.ts.map +1 -0
- package/dist/cjs/auth/hash/hash-service.interface.js +3 -0
- package/dist/cjs/auth/hash/hash-service.interface.js.map +1 -0
- package/dist/cjs/auth/hash/hash.service.d.ts +28 -0
- package/dist/cjs/auth/hash/hash.service.d.ts.map +1 -0
- package/dist/cjs/auth/hash/hash.service.js +148 -0
- package/dist/cjs/auth/hash/hash.service.js.map +1 -0
- package/dist/cjs/auth/hash/hash.utilities.d.ts +42 -0
- package/dist/cjs/auth/hash/hash.utilities.d.ts.map +1 -0
- package/dist/cjs/auth/hash/hash.utilities.js +36 -0
- package/dist/cjs/auth/hash/hash.utilities.js.map +1 -0
- package/dist/cjs/auth/hash/strategies/bcrypt.hash-strategy.d.ts +21 -0
- package/dist/cjs/auth/hash/strategies/bcrypt.hash-strategy.d.ts.map +1 -0
- package/dist/cjs/auth/hash/strategies/bcrypt.hash-strategy.js +26 -0
- package/dist/cjs/auth/hash/strategies/bcrypt.hash-strategy.js.map +1 -0
- package/dist/cjs/auth/hash/strategies/hash-strategy-entity.model.d.ts +32 -0
- package/dist/cjs/auth/hash/strategies/hash-strategy-entity.model.d.ts.map +1 -0
- package/dist/cjs/auth/hash/strategies/hash-strategy-entity.model.js +58 -0
- package/dist/cjs/auth/hash/strategies/hash-strategy-entity.model.js.map +1 -0
- package/dist/cjs/auth/hash/strategies/hash-strategy.interface.d.ts +23 -0
- package/dist/cjs/auth/hash/strategies/hash-strategy.interface.d.ts.map +1 -0
- package/dist/cjs/auth/hash/strategies/hash-strategy.interface.js +3 -0
- package/dist/cjs/auth/hash/strategies/hash-strategy.interface.js.map +1 -0
- package/dist/cjs/auth/strategies/auth-strategy.interface.d.ts +11 -6
- package/dist/cjs/auth/strategies/auth-strategy.interface.d.ts.map +1 -1
- package/dist/cjs/auth/strategies/auth-strategy.interface.js.map +1 -1
- package/dist/cjs/auth/strategies/cookie/cookie-auth-confirm-password-reset-data.model.d.ts +19 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-confirm-password-reset-data.model.d.ts.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-confirm-password-reset-data.model.js +40 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-confirm-password-reset-data.model.js.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-credentials.model.d.ts +49 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-credentials.model.d.ts.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-credentials.model.js +80 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-credentials.model.js.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-data.model.d.ts +26 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-data.model.d.ts.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-data.model.js +60 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-data.model.js.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-logout-data.model.d.ts +19 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-logout-data.model.d.ts.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-logout-data.model.js +40 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-logout-data.model.js.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-refresh-login-data.model.d.ts +11 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-refresh-login-data.model.d.ts.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-refresh-login-data.model.js +14 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-refresh-login-data.model.js.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-refresh-session.model.d.ts +39 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-refresh-session.model.d.ts.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-refresh-session.model.js +77 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-refresh-session.model.js.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-request-password-reset-data.model.d.ts +26 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-request-password-reset-data.model.d.ts.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-request-password-reset-data.model.js +3 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-request-password-reset-data.model.js.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-session-cleanup.cron-job.d.ts +15 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-session-cleanup.cron-job.d.ts.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-session-cleanup.cron-job.js +54 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-session-cleanup.cron-job.js.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-session.model.d.ts +29 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-session.model.d.ts.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-session.model.js +59 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth-session.model.js.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth.auth-strategy.d.ts +73 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth.auth-strategy.d.ts.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth.auth-strategy.js +430 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth.auth-strategy.js.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth.controller.d.ts +42 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth.controller.d.ts.map +1 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth.controller.js +210 -0
- package/dist/cjs/auth/strategies/cookie/cookie-auth.controller.js.map +1 -0
- package/dist/cjs/auth/strategies/jwt/jwt-auth.controller.d.ts +9 -3
- package/dist/cjs/auth/strategies/jwt/jwt-auth.controller.d.ts.map +1 -1
- package/dist/cjs/auth/strategies/jwt/jwt-auth.controller.js +41 -10
- package/dist/cjs/auth/strategies/jwt/jwt-auth.controller.js.map +1 -1
- package/dist/cjs/auth/strategies/jwt/jwt-confirm-password-reset-data.model.d.ts +5 -0
- package/dist/cjs/auth/strategies/jwt/jwt-confirm-password-reset-data.model.d.ts.map +1 -1
- package/dist/cjs/auth/strategies/jwt/jwt-confirm-password-reset-data.model.js +4 -0
- package/dist/cjs/auth/strategies/jwt/jwt-confirm-password-reset-data.model.js.map +1 -1
- package/dist/cjs/auth/strategies/jwt/jwt-credentials.model.d.ts +8 -3
- package/dist/cjs/auth/strategies/jwt/jwt-credentials.model.d.ts.map +1 -1
- package/dist/cjs/auth/strategies/jwt/jwt-credentials.model.js +11 -3
- package/dist/cjs/auth/strategies/jwt/jwt-credentials.model.js.map +1 -1
- package/dist/cjs/auth/strategies/jwt/jwt-refresh-login-data.model.d.ts +5 -0
- package/dist/cjs/auth/strategies/jwt/jwt-refresh-login-data.model.d.ts.map +1 -1
- package/dist/cjs/auth/strategies/jwt/jwt-refresh-login-data.model.js +4 -0
- package/dist/cjs/auth/strategies/jwt/jwt-refresh-login-data.model.js.map +1 -1
- package/dist/cjs/auth/strategies/jwt/jwt-refresh-token-cleanup.cron-job.d.ts +13 -0
- package/dist/cjs/auth/strategies/jwt/jwt-refresh-token-cleanup.cron-job.d.ts.map +1 -0
- package/dist/cjs/auth/strategies/jwt/jwt-refresh-token-cleanup.cron-job.js +48 -0
- package/dist/cjs/auth/strategies/jwt/jwt-refresh-token-cleanup.cron-job.js.map +1 -0
- package/dist/cjs/auth/strategies/jwt/jwt-request-password-reset-data.model.d.ts +5 -0
- package/dist/cjs/auth/strategies/jwt/jwt-request-password-reset-data.model.d.ts.map +1 -1
- package/dist/cjs/auth/strategies/jwt/jwt.auth-strategy.d.ts +16 -12
- package/dist/cjs/auth/strategies/jwt/jwt.auth-strategy.d.ts.map +1 -1
- package/dist/cjs/auth/strategies/jwt/jwt.auth-strategy.js +58 -54
- package/dist/cjs/auth/strategies/jwt/jwt.auth-strategy.js.map +1 -1
- package/dist/cjs/backup/backup.service.d.ts.map +1 -1
- package/dist/cjs/backup/backup.service.js +2 -1
- package/dist/cjs/backup/backup.service.js.map +1 -1
- package/dist/cjs/backup/transports/fs.backup-transport.d.ts.map +1 -1
- package/dist/cjs/backup/transports/fs.backup-transport.js +3 -2
- package/dist/cjs/backup/transports/fs.backup-transport.js.map +1 -1
- package/dist/cjs/caching/cache/base-cache.model.d.ts +87 -0
- package/dist/cjs/caching/cache/base-cache.model.d.ts.map +1 -0
- package/dist/cjs/caching/cache/base-cache.model.js +245 -0
- package/dist/cjs/caching/cache/base-cache.model.js.map +1 -0
- package/dist/cjs/caching/cache/cache-operation.enum.d.ts +10 -0
- package/dist/cjs/caching/cache/cache-operation.enum.d.ts.map +1 -0
- package/dist/cjs/caching/cache/cache-operation.enum.js +14 -0
- package/dist/cjs/caching/cache/cache-operation.enum.js.map +1 -0
- package/dist/cjs/caching/cache/cache-options.model.d.ts +107 -0
- package/dist/cjs/caching/cache/cache-options.model.d.ts.map +1 -0
- package/dist/cjs/caching/cache/cache-options.model.js +3 -0
- package/dist/cjs/caching/cache/cache-options.model.js.map +1 -0
- package/dist/cjs/caching/cache/cache.interface.d.ts +77 -0
- package/dist/cjs/caching/cache/cache.interface.d.ts.map +1 -0
- package/dist/cjs/caching/cache/cache.interface.js +36 -0
- package/dist/cjs/caching/cache/cache.interface.js.map +1 -0
- package/dist/cjs/caching/cache/multi-tier.cache.d.ts +64 -0
- package/dist/cjs/caching/cache/multi-tier.cache.d.ts.map +1 -0
- package/dist/cjs/caching/cache/multi-tier.cache.js +190 -0
- package/dist/cjs/caching/cache/multi-tier.cache.js.map +1 -0
- package/dist/cjs/caching/cache/read-aside/read-aside.cache.d.ts +16 -0
- package/dist/cjs/caching/cache/read-aside/read-aside.cache.d.ts.map +1 -0
- package/dist/cjs/caching/cache/read-aside/read-aside.cache.js +78 -0
- package/dist/cjs/caching/cache/read-aside/read-aside.cache.js.map +1 -0
- package/dist/cjs/caching/cache/read-aside/write-around-read-aside.cache.d.ts +16 -0
- package/dist/cjs/caching/cache/read-aside/write-around-read-aside.cache.d.ts.map +1 -0
- package/dist/cjs/caching/cache/read-aside/write-around-read-aside.cache.js +39 -0
- package/dist/cjs/caching/cache/read-aside/write-around-read-aside.cache.js.map +1 -0
- package/dist/cjs/caching/cache/read-aside/write-behind-read-aside.cache.d.ts +15 -0
- package/dist/cjs/caching/cache/read-aside/write-behind-read-aside.cache.d.ts.map +1 -0
- package/dist/cjs/caching/cache/read-aside/write-behind-read-aside.cache.js +73 -0
- package/dist/cjs/caching/cache/read-aside/write-behind-read-aside.cache.js.map +1 -0
- package/dist/cjs/caching/cache/read-aside/write-invalidate-read-aside-args-only.cache.d.ts +15 -0
- package/dist/cjs/caching/cache/read-aside/write-invalidate-read-aside-args-only.cache.d.ts.map +1 -0
- package/dist/cjs/caching/cache/read-aside/write-invalidate-read-aside-args-only.cache.js +63 -0
- package/dist/cjs/caching/cache/read-aside/write-invalidate-read-aside-args-only.cache.js.map +1 -0
- package/dist/cjs/caching/cache/read-aside/write-invalidate-read-aside-with-result.cache.d.ts +15 -0
- package/dist/cjs/caching/cache/read-aside/write-invalidate-read-aside-with-result.cache.d.ts.map +1 -0
- package/dist/cjs/caching/cache/read-aside/write-invalidate-read-aside-with-result.cache.js +63 -0
- package/dist/cjs/caching/cache/read-aside/write-invalidate-read-aside-with-result.cache.js.map +1 -0
- package/dist/cjs/caching/cache/read-aside/write-through-read-aside.cache.d.ts +15 -0
- package/dist/cjs/caching/cache/read-aside/write-through-read-aside.cache.d.ts.map +1 -0
- package/dist/cjs/caching/cache/read-aside/write-through-read-aside.cache.js +64 -0
- package/dist/cjs/caching/cache/read-aside/write-through-read-aside.cache.js.map +1 -0
- package/dist/cjs/caching/cache/read-through/read-through.cache.d.ts +9 -0
- package/dist/cjs/caching/cache/read-through/read-through.cache.d.ts.map +1 -0
- package/dist/cjs/caching/cache/read-through/read-through.cache.js +78 -0
- package/dist/cjs/caching/cache/read-through/read-through.cache.js.map +1 -0
- package/dist/cjs/caching/cache/read-through/write-around-read-through.cache.d.ts +13 -0
- package/dist/cjs/caching/cache/read-through/write-around-read-through.cache.d.ts.map +1 -0
- package/dist/cjs/caching/cache/read-through/write-around-read-through.cache.js +36 -0
- package/dist/cjs/caching/cache/read-through/write-around-read-through.cache.js.map +1 -0
- package/dist/cjs/caching/cache/read-through/write-behind-read-through.cache.d.ts +16 -0
- package/dist/cjs/caching/cache/read-through/write-behind-read-through.cache.d.ts.map +1 -0
- package/dist/cjs/caching/cache/read-through/write-behind-read-through.cache.js +76 -0
- package/dist/cjs/caching/cache/read-through/write-behind-read-through.cache.js.map +1 -0
- package/dist/cjs/caching/cache/read-through/write-invalidate-read-through-args-only.cache.d.ts +16 -0
- package/dist/cjs/caching/cache/read-through/write-invalidate-read-through-args-only.cache.d.ts.map +1 -0
- package/dist/cjs/caching/cache/read-through/write-invalidate-read-through-args-only.cache.js +65 -0
- package/dist/cjs/caching/cache/read-through/write-invalidate-read-through-args-only.cache.js.map +1 -0
- package/dist/cjs/caching/cache/read-through/write-invalidate-read-through-with-result.cache.d.ts +15 -0
- package/dist/cjs/caching/cache/read-through/write-invalidate-read-through-with-result.cache.d.ts.map +1 -0
- package/dist/cjs/caching/cache/read-through/write-invalidate-read-through-with-result.cache.js +64 -0
- package/dist/cjs/caching/cache/read-through/write-invalidate-read-through-with-result.cache.js.map +1 -0
- package/dist/cjs/caching/cache/read-through/write-through-read-through.cache.d.ts +12 -0
- package/dist/cjs/caching/cache/read-through/write-through-read-through.cache.d.ts.map +1 -0
- package/dist/cjs/caching/cache/read-through/write-through-read-through.cache.js +61 -0
- package/dist/cjs/caching/cache/read-through/write-through-read-through.cache.js.map +1 -0
- package/dist/cjs/caching/cache-metrics.model.d.ts +57 -0
- package/dist/cjs/caching/cache-metrics.model.d.ts.map +1 -0
- package/dist/cjs/caching/cache-metrics.model.js +3 -0
- package/dist/cjs/caching/cache-metrics.model.js.map +1 -0
- package/dist/cjs/caching/cache-service.interface.d.ts +15 -0
- package/dist/cjs/caching/cache-service.interface.d.ts.map +1 -0
- package/dist/cjs/caching/cache-service.interface.js +3 -0
- package/dist/cjs/caching/cache-service.interface.js.map +1 -0
- package/dist/cjs/caching/cache-tag-matchers.d.ts +19 -0
- package/dist/cjs/caching/cache-tag-matchers.d.ts.map +1 -0
- package/dist/cjs/caching/cache-tag-matchers.js +29 -0
- package/dist/cjs/caching/cache-tag-matchers.js.map +1 -0
- package/dist/cjs/caching/cache.service.d.ts +15 -0
- package/dist/cjs/caching/cache.service.d.ts.map +1 -0
- package/dist/cjs/caching/cache.service.js +74 -0
- package/dist/cjs/caching/cache.service.js.map +1 -0
- package/dist/cjs/caching/decorators/cache-delete.decorator.d.ts +12 -0
- package/dist/cjs/caching/decorators/cache-delete.decorator.d.ts.map +1 -0
- package/dist/cjs/caching/decorators/cache-delete.decorator.js +30 -0
- package/dist/cjs/caching/decorators/cache-delete.decorator.js.map +1 -0
- package/dist/cjs/caching/decorators/cache-invalidate.decorator.d.ts +11 -0
- package/dist/cjs/caching/decorators/cache-invalidate.decorator.d.ts.map +1 -0
- package/dist/cjs/caching/decorators/cache-invalidate.decorator.js +29 -0
- package/dist/cjs/caching/decorators/cache-invalidate.decorator.js.map +1 -0
- package/dist/cjs/caching/decorators/cache-write.decorator.d.ts +18 -0
- package/dist/cjs/caching/decorators/cache-write.decorator.d.ts.map +1 -0
- package/dist/cjs/caching/decorators/cache-write.decorator.js +32 -0
- package/dist/cjs/caching/decorators/cache-write.decorator.js.map +1 -0
- package/dist/cjs/caching/decorators/cache.decorator.d.ts +5 -0
- package/dist/cjs/caching/decorators/cache.decorator.d.ts.map +1 -0
- package/dist/cjs/caching/decorators/cache.decorator.js +21 -0
- package/dist/cjs/caching/decorators/cache.decorator.js.map +1 -0
- package/dist/cjs/caching/decorators/cached.decorator.d.ts +16 -0
- package/dist/cjs/caching/decorators/cached.decorator.d.ts.map +1 -0
- package/dist/cjs/caching/decorators/cached.decorator.js +31 -0
- package/dist/cjs/caching/decorators/cached.decorator.js.map +1 -0
- package/dist/cjs/caching/decorators/decorator-types.d.ts +11 -0
- package/dist/cjs/caching/decorators/decorator-types.d.ts.map +1 -0
- package/dist/cjs/caching/decorators/decorator-types.js +3 -0
- package/dist/cjs/caching/decorators/decorator-types.js.map +1 -0
- package/dist/cjs/caching/store/cache-store.interface.d.ts +57 -0
- package/dist/cjs/caching/store/cache-store.interface.d.ts.map +1 -0
- package/dist/cjs/caching/store/cache-store.interface.js +3 -0
- package/dist/cjs/caching/store/cache-store.interface.js.map +1 -0
- package/dist/cjs/caching/store/cached-value.model.d.ts +22 -0
- package/dist/cjs/caching/store/cached-value.model.d.ts.map +1 -0
- package/dist/cjs/caching/store/cached-value.model.js +52 -0
- package/dist/cjs/caching/store/cached-value.model.js.map +1 -0
- package/dist/cjs/caching/store/in-memory.cache-store.d.ts +32 -0
- package/dist/cjs/caching/store/in-memory.cache-store.d.ts.map +1 -0
- package/dist/cjs/caching/store/in-memory.cache-store.js +227 -0
- package/dist/cjs/caching/store/in-memory.cache-store.js.map +1 -0
- package/dist/cjs/change-sets/change-set-repository.d.ts +24 -21
- package/dist/cjs/change-sets/change-set-repository.d.ts.map +1 -1
- package/dist/cjs/change-sets/change-set-repository.js +65 -48
- package/dist/cjs/change-sets/change-set-repository.js.map +1 -1
- package/dist/cjs/change-sets/models/change-set.model.d.ts +2 -2
- package/dist/cjs/change-sets/models/change-set.model.d.ts.map +1 -1
- package/dist/cjs/change-sets/models/change-set.model.js +3 -3
- package/dist/cjs/change-sets/models/change-set.model.js.map +1 -1
- package/dist/cjs/change-sets/models/change.model.js +1 -1
- package/dist/cjs/change-sets/models/change.model.js.map +1 -1
- package/dist/cjs/change-sets/soft-delete-repository.d.ts +6 -3
- package/dist/cjs/change-sets/soft-delete-repository.d.ts.map +1 -1
- package/dist/cjs/change-sets/soft-delete-repository.js +7 -6
- package/dist/cjs/change-sets/soft-delete-repository.js.map +1 -1
- package/dist/cjs/context/als.utilities.d.ts +57 -0
- package/dist/cjs/context/als.utilities.d.ts.map +1 -0
- package/dist/cjs/context/als.utilities.js +77 -0
- package/dist/cjs/context/als.utilities.js.map +1 -0
- package/dist/cjs/context/base-context.d.ts +12 -0
- package/dist/cjs/context/base-context.d.ts.map +1 -0
- package/dist/cjs/context/base-context.js +15 -0
- package/dist/cjs/context/base-context.js.map +1 -0
- package/dist/cjs/context/request/http-request.context.d.ts +29 -0
- package/dist/cjs/context/request/http-request.context.d.ts.map +1 -0
- package/dist/cjs/context/request/http-request.context.js +43 -0
- package/dist/cjs/context/request/http-request.context.js.map +1 -0
- package/dist/cjs/context/request/request-context-token.model.d.ts +24 -0
- package/dist/cjs/context/request/request-context-token.model.d.ts.map +1 -0
- package/dist/cjs/context/request/request-context-token.model.js +70 -0
- package/dist/cjs/context/request/request-context-token.model.js.map +1 -0
- package/dist/cjs/context/request/websocket-request.context.d.ts +29 -0
- package/dist/cjs/context/request/websocket-request.context.d.ts.map +1 -0
- package/dist/cjs/context/request/websocket-request.context.js +43 -0
- package/dist/cjs/context/request/websocket-request.context.js.map +1 -0
- package/dist/cjs/cron/cron-expression.utilities.d.ts +100 -0
- package/dist/cjs/cron/cron-expression.utilities.d.ts.map +1 -0
- package/dist/cjs/cron/cron-expression.utilities.js +171 -0
- package/dist/cjs/cron/cron-expression.utilities.js.map +1 -0
- package/dist/cjs/cron/cron-job-entity.model.d.ts +2 -1
- package/dist/cjs/cron/cron-job-entity.model.d.ts.map +1 -1
- package/dist/cjs/cron/cron-job-entity.model.js.map +1 -1
- package/dist/cjs/cron/cron-job.model.d.ts +7 -4
- package/dist/cjs/cron/cron-job.model.d.ts.map +1 -1
- package/dist/cjs/cron/cron-job.model.js +5 -7
- package/dist/cjs/cron/cron-job.model.js.map +1 -1
- package/dist/cjs/cron/cron-service.interface.d.ts +2 -1
- package/dist/cjs/cron/cron-service.interface.d.ts.map +1 -1
- package/dist/cjs/cron/cron.service.d.ts +2 -1
- package/dist/cjs/cron/cron.service.d.ts.map +1 -1
- package/dist/cjs/cron/cron.service.js +4 -2
- package/dist/cjs/cron/cron.service.js.map +1 -1
- package/dist/cjs/data-source/data-sources/data-source.interface.d.ts +9 -1
- package/dist/cjs/data-source/data-sources/data-source.interface.d.ts.map +1 -1
- package/dist/cjs/data-source/data-sources/data-source.interface.js +11 -0
- package/dist/cjs/data-source/data-sources/data-source.interface.js.map +1 -1
- package/dist/cjs/data-source/data-sources/postgres-data-source.model.d.ts +1 -2
- package/dist/cjs/data-source/data-sources/postgres-data-source.model.d.ts.map +1 -1
- package/dist/cjs/data-source/data-sources/postgres-data-source.model.js +19 -7
- package/dist/cjs/data-source/data-sources/postgres-data-source.model.js.map +1 -1
- package/dist/cjs/data-source/hooks/before-return.d.ts +7 -0
- package/dist/cjs/data-source/hooks/before-return.d.ts.map +1 -0
- package/dist/cjs/data-source/hooks/before-return.js +3 -0
- package/dist/cjs/data-source/hooks/before-return.js.map +1 -0
- package/dist/cjs/data-source/hooks/before-save.d.ts +8 -0
- package/dist/cjs/data-source/hooks/before-save.d.ts.map +1 -0
- package/dist/cjs/data-source/hooks/before-save.js +3 -0
- package/dist/cjs/data-source/hooks/before-save.js.map +1 -0
- package/dist/cjs/data-source/hooks/hooks.default.d.ts +13 -0
- package/dist/cjs/data-source/hooks/hooks.default.d.ts.map +1 -0
- package/dist/cjs/data-source/hooks/hooks.default.js +37 -0
- package/dist/cjs/data-source/hooks/hooks.default.js.map +1 -0
- package/dist/cjs/data-source/models/where/number-where-filter.model.d.ts +8 -8
- package/dist/cjs/data-source/models/where/number-where-filter.model.d.ts.map +1 -1
- package/dist/cjs/data-source/models/where/where-filter-to-find-options-where.function.d.ts.map +1 -1
- package/dist/cjs/data-source/models/where/where-filter-to-find-options-where.function.js +19 -11
- package/dist/cjs/data-source/models/where/where-filter-to-find-options-where.function.js.map +1 -1
- package/dist/cjs/data-source/models/where/where-filter.model.d.ts +1 -1
- package/dist/cjs/data-source/models/where/where-filter.model.d.ts.map +1 -1
- package/dist/cjs/data-source/repository.d.ts +14 -5
- package/dist/cjs/data-source/repository.d.ts.map +1 -1
- package/dist/cjs/data-source/repository.js +57 -101
- package/dist/cjs/data-source/repository.js.map +1 -1
- package/dist/cjs/di/decorators/inject-repository.decorator.js.map +1 -1
- package/dist/cjs/di/default/zibri-di-providers.default.d.ts.map +1 -1
- package/dist/cjs/di/default/zibri-di-providers.default.js +73 -7
- package/dist/cjs/di/default/zibri-di-providers.default.js.map +1 -1
- package/dist/cjs/di/default/zibri-di-tokens.default.d.ts +33 -5
- package/dist/cjs/di/default/zibri-di-tokens.default.d.ts.map +1 -1
- package/dist/cjs/di/default/zibri-di-tokens.default.js +24 -5
- package/dist/cjs/di/default/zibri-di-tokens.default.js.map +1 -1
- package/dist/cjs/di/di-container.d.ts.map +1 -1
- package/dist/cjs/di/di-container.js +8 -7
- package/dist/cjs/di/di-container.js.map +1 -1
- package/dist/cjs/di/models/di-provider.model.d.ts +12 -0
- package/dist/cjs/di/models/di-provider.model.d.ts.map +1 -1
- package/dist/cjs/email/email.service.d.ts.map +1 -1
- package/dist/cjs/email/email.service.js +3 -1
- package/dist/cjs/email/email.service.js.map +1 -1
- package/dist/cjs/email/models/create-email-data.model.d.ts +1 -1
- package/dist/cjs/email/send-queued-emails.cron-job.d.ts.map +1 -1
- package/dist/cjs/email/send-queued-emails.cron-job.js +2 -1
- package/dist/cjs/email/send-queued-emails.cron-job.js.map +1 -1
- package/dist/cjs/entity/decorators/property.decorator.d.ts +5 -3
- package/dist/cjs/entity/decorators/property.decorator.d.ts.map +1 -1
- package/dist/cjs/entity/decorators/property.decorator.js +57 -23
- package/dist/cjs/entity/decorators/property.decorator.js.map +1 -1
- package/dist/cjs/entity/generation/generate-entity-file.function.d.ts.map +1 -1
- package/dist/cjs/entity/generation/generate-entity-file.function.js +4 -3
- package/dist/cjs/entity/generation/generate-entity-file.function.js.map +1 -1
- package/dist/cjs/entity/generation/generate-entity-files.function.d.ts.map +1 -1
- package/dist/cjs/entity/generation/generate-entity-files.function.js +1 -0
- package/dist/cjs/entity/generation/generate-entity-files.function.js.map +1 -1
- package/dist/cjs/entity/generation/providers/open-api-file.provider.d.ts.map +1 -1
- package/dist/cjs/entity/generation/providers/open-api-file.provider.js +2 -1
- package/dist/cjs/entity/generation/providers/open-api-file.provider.js.map +1 -1
- package/dist/cjs/entity/models/array-property-metadata.model.d.ts +1 -1
- package/dist/cjs/entity/models/array-property-metadata.model.d.ts.map +1 -1
- package/dist/cjs/entity/models/base-property-metadata.model.d.ts +21 -4
- package/dist/cjs/entity/models/base-property-metadata.model.d.ts.map +1 -1
- package/dist/cjs/entity/models/file-property-metadata.model.d.ts +1 -0
- package/dist/cjs/entity/models/file-property-metadata.model.d.ts.map +1 -1
- package/dist/cjs/entity/models/file-property-metadata.model.js +5 -5
- package/dist/cjs/entity/models/file-property-metadata.model.js.map +1 -1
- package/dist/cjs/entity/models/number-property-metadata.model.d.ts +11 -0
- package/dist/cjs/entity/models/number-property-metadata.model.d.ts.map +1 -1
- package/dist/cjs/entity/models/string-property-metadata.model.d.ts +45 -2
- package/dist/cjs/entity/models/string-property-metadata.model.d.ts.map +1 -1
- package/dist/cjs/error-handling/errors/validation.error.d.ts +2 -1
- package/dist/cjs/error-handling/errors/validation.error.d.ts.map +1 -1
- package/dist/cjs/error-handling/errors/validation.error.js +5 -2
- package/dist/cjs/error-handling/errors/validation.error.js.map +1 -1
- package/dist/cjs/error-handling/unknown-to-error-string.function.d.ts.map +1 -1
- package/dist/cjs/error-handling/unknown-to-error-string.function.js +2 -1
- package/dist/cjs/error-handling/unknown-to-error-string.function.js.map +1 -1
- package/dist/cjs/event/event-cleanup.cron-job.d.ts +13 -0
- package/dist/cjs/event/event-cleanup.cron-job.d.ts.map +1 -0
- package/dist/cjs/event/event-cleanup.cron-job.js +58 -0
- package/dist/cjs/event/event-cleanup.cron-job.js.map +1 -0
- package/dist/cjs/event/event-processing.error.d.ts +8 -0
- package/dist/cjs/event/event-processing.error.d.ts.map +1 -0
- package/dist/cjs/event/event-processing.error.js +19 -0
- package/dist/cjs/event/event-processing.error.js.map +1 -0
- package/dist/cjs/event/event-service.interface.d.ts +53 -0
- package/dist/cjs/event/event-service.interface.d.ts.map +1 -0
- package/dist/cjs/event/event-service.interface.js +3 -0
- package/dist/cjs/event/event-service.interface.js.map +1 -0
- package/dist/cjs/event/event-subscriber-run.model.d.ts +35 -0
- package/dist/cjs/event/event-subscriber-run.model.d.ts.map +1 -0
- package/dist/cjs/event/event-subscriber-run.model.js +73 -0
- package/dist/cjs/event/event-subscriber-run.model.js.map +1 -0
- package/dist/cjs/event/event.model.d.ts +54 -0
- package/dist/cjs/event/event.model.d.ts.map +1 -0
- package/dist/cjs/event/event.model.js +105 -0
- package/dist/cjs/event/event.model.js.map +1 -0
- package/dist/cjs/event/event.service.d.ts +57 -0
- package/dist/cjs/event/event.service.d.ts.map +1 -0
- package/dist/cjs/event/event.service.js +218 -0
- package/dist/cjs/event/event.service.js.map +1 -0
- package/dist/cjs/global/global-registry.d.ts +5 -0
- package/dist/cjs/global/global-registry.d.ts.map +1 -1
- package/dist/cjs/global/global-registry.js +4 -0
- package/dist/cjs/global/global-registry.js.map +1 -1
- package/dist/cjs/global/model-registry/decrypt-encryption-properties.function.d.ts +10 -0
- package/dist/cjs/global/model-registry/decrypt-encryption-properties.function.d.ts.map +1 -0
- package/dist/cjs/global/model-registry/decrypt-encryption-properties.function.js +64 -0
- package/dist/cjs/global/model-registry/decrypt-encryption-properties.function.js.map +1 -0
- package/dist/cjs/global/model-registry/default-descriptor.d.ts +28 -0
- package/dist/cjs/global/model-registry/default-descriptor.d.ts.map +1 -0
- package/dist/cjs/global/model-registry/default-descriptor.js +95 -0
- package/dist/cjs/global/model-registry/default-descriptor.js.map +1 -0
- package/dist/cjs/global/model-registry/encrypt-encryption-properties.function.d.ts +10 -0
- package/dist/cjs/global/model-registry/encrypt-encryption-properties.function.d.ts.map +1 -0
- package/dist/cjs/global/model-registry/encrypt-encryption-properties.function.js +71 -0
- package/dist/cjs/global/model-registry/encrypt-encryption-properties.function.js.map +1 -0
- package/dist/cjs/global/model-registry/encryption-descriptor.d.ts +27 -0
- package/dist/cjs/global/model-registry/encryption-descriptor.d.ts.map +1 -0
- package/dist/cjs/global/model-registry/encryption-descriptor.js +97 -0
- package/dist/cjs/global/model-registry/encryption-descriptor.js.map +1 -0
- package/dist/cjs/global/model-registry/exclude-descriptor.d.ts +27 -0
- package/dist/cjs/global/model-registry/exclude-descriptor.d.ts.map +1 -0
- package/dist/cjs/global/model-registry/exclude-descriptor.js +95 -0
- package/dist/cjs/global/model-registry/exclude-descriptor.js.map +1 -0
- package/dist/cjs/global/model-registry/hash-descriptor.d.ts +27 -0
- package/dist/cjs/global/model-registry/hash-descriptor.d.ts.map +1 -0
- package/dist/cjs/global/model-registry/hash-descriptor.js +97 -0
- package/dist/cjs/global/model-registry/hash-descriptor.js.map +1 -0
- package/dist/cjs/global/model-registry/hash-hash-properties.function.d.ts +10 -0
- package/dist/cjs/global/model-registry/hash-hash-properties.function.d.ts.map +1 -0
- package/dist/cjs/global/model-registry/hash-hash-properties.function.js +47 -0
- package/dist/cjs/global/model-registry/hash-hash-properties.function.js.map +1 -0
- package/dist/cjs/global/model-registry/model.registry.d.ts +53 -0
- package/dist/cjs/global/model-registry/model.registry.d.ts.map +1 -0
- package/dist/cjs/global/model-registry/model.registry.js +56 -0
- package/dist/cjs/global/model-registry/model.registry.js.map +1 -0
- package/dist/cjs/global/model-registry/remove-exclude-properties.function.d.ts +9 -0
- package/dist/cjs/global/model-registry/remove-exclude-properties.function.d.ts.map +1 -0
- package/dist/cjs/global/model-registry/remove-exclude-properties.function.js +66 -0
- package/dist/cjs/global/model-registry/remove-exclude-properties.function.js.map +1 -0
- package/dist/cjs/global/model-registry/restore-exclude-properties.function.d.ts +8 -0
- package/dist/cjs/global/model-registry/restore-exclude-properties.function.d.ts.map +1 -0
- package/dist/cjs/global/model-registry/restore-exclude-properties.function.js +46 -0
- package/dist/cjs/global/model-registry/restore-exclude-properties.function.js.map +1 -0
- package/dist/cjs/global/model-registry/set-default-values.function.d.ts +8 -0
- package/dist/cjs/global/model-registry/set-default-values.function.d.ts.map +1 -0
- package/dist/cjs/global/model-registry/set-default-values.function.js +44 -0
- package/dist/cjs/global/model-registry/set-default-values.function.js.map +1 -0
- package/dist/cjs/handlebars/handlebar.utilities.d.ts.map +1 -1
- package/dist/cjs/handlebars/handlebar.utilities.js +2 -1
- package/dist/cjs/handlebars/handlebar.utilities.js.map +1 -1
- package/dist/cjs/handlebars/resolve-all-array-keys.function.d.ts.map +1 -1
- package/dist/cjs/handlebars/resolve-all-array-keys.function.js +2 -1
- package/dist/cjs/handlebars/resolve-all-array-keys.function.js.map +1 -1
- package/dist/cjs/handlebars/resolve-keys-for-block-statement.function.d.ts.map +1 -1
- package/dist/cjs/handlebars/resolve-keys-for-block-statement.function.js +5 -4
- package/dist/cjs/handlebars/resolve-keys-for-block-statement.function.js.map +1 -1
- package/dist/cjs/http/cookie-options.model.d.ts +11 -0
- package/dist/cjs/http/cookie-options.model.d.ts.map +1 -0
- package/dist/cjs/http/cookie-options.model.js +3 -0
- package/dist/cjs/http/cookie-options.model.js.map +1 -0
- package/dist/cjs/http/http-request.model.d.ts +6 -1
- package/dist/cjs/http/http-request.model.d.ts.map +1 -1
- package/dist/cjs/http/http-request.model.js.map +1 -1
- package/dist/cjs/http/known-header.enum.d.ts +29 -25
- package/dist/cjs/http/known-header.enum.d.ts.map +1 -1
- package/dist/cjs/http/known-header.enum.js +30 -26
- package/dist/cjs/http/known-header.enum.js.map +1 -1
- package/dist/cjs/http/mime-type.enum.d.ts +34 -9
- package/dist/cjs/http/mime-type.enum.d.ts.map +1 -1
- package/dist/cjs/http/mime-type.enum.js +41 -8
- package/dist/cjs/http/mime-type.enum.js.map +1 -1
- package/dist/cjs/http/mime-type.helpers.d.ts +41 -17
- package/dist/cjs/http/mime-type.helpers.d.ts.map +1 -1
- package/dist/cjs/http/mime-type.helpers.js +93 -22
- package/dist/cjs/http/mime-type.helpers.js.map +1 -1
- package/dist/cjs/http-client/http-client.d.ts.map +1 -1
- package/dist/cjs/http-client/http-client.interface.d.ts +3 -2
- package/dist/cjs/http-client/http-client.interface.d.ts.map +1 -1
- package/dist/cjs/http-client/http-client.js +9 -7
- package/dist/cjs/http-client/http-client.js.map +1 -1
- package/dist/cjs/index.d.ts +85 -3
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +88 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/localization/formatting/format-price-fn.model.d.ts +1 -1
- package/dist/cjs/localization/formatting/format-price-fn.model.d.ts.map +1 -1
- package/dist/cjs/localization/formatting/format-price.function.d.ts.map +1 -1
- package/dist/cjs/localization/formatting/format-price.function.js.map +1 -1
- package/dist/cjs/logging/error-to-logged-error.function.d.ts.map +1 -1
- package/dist/cjs/logging/error-to-logged-error.function.js +2 -1
- package/dist/cjs/logging/error-to-logged-error.function.js.map +1 -1
- package/dist/cjs/logging/log-cleanup.cron-job.d.ts +1 -1
- package/dist/cjs/logging/log-cleanup.cron-job.d.ts.map +1 -1
- package/dist/cjs/logging/log-cleanup.cron-job.js +3 -2
- package/dist/cjs/logging/log-cleanup.cron-job.js.map +1 -1
- package/dist/cjs/logging/log-context.model.d.ts +51 -1
- package/dist/cjs/logging/log-context.model.d.ts.map +1 -1
- package/dist/cjs/logging/log-context.model.js +79 -1
- package/dist/cjs/logging/log-context.model.js.map +1 -1
- package/dist/cjs/logging/log.model.d.ts +0 -5
- package/dist/cjs/logging/log.model.d.ts.map +1 -1
- package/dist/cjs/logging/log.model.js +0 -9
- package/dist/cjs/logging/log.model.js.map +1 -1
- package/dist/cjs/logging/logger.d.ts +3 -2
- package/dist/cjs/logging/logger.d.ts.map +1 -1
- package/dist/cjs/logging/logger.interface.d.ts +3 -2
- package/dist/cjs/logging/logger.interface.d.ts.map +1 -1
- package/dist/cjs/logging/logger.js +36 -9
- package/dist/cjs/logging/logger.js.map +1 -1
- package/dist/cjs/logging/transport/log-to-console.function.js +2 -2
- package/dist/cjs/logging/transport/log-to-console.function.js.map +1 -1
- package/dist/cjs/metrics/{scrape-metrics.cron-job.d.ts → collect-metrics.cron-job.d.ts} +3 -3
- package/dist/cjs/metrics/collect-metrics.cron-job.d.ts.map +1 -0
- package/dist/cjs/metrics/{scrape-metrics.cron-job.js → collect-metrics.cron-job.js} +11 -10
- package/dist/cjs/metrics/collect-metrics.cron-job.js.map +1 -0
- package/dist/cjs/metrics/metrics.service.d.ts.map +1 -1
- package/dist/cjs/metrics/metrics.service.js +4 -2
- package/dist/cjs/metrics/metrics.service.js.map +1 -1
- package/dist/cjs/multithreading/services/multithreading.service.d.ts.map +1 -1
- package/dist/cjs/multithreading/services/multithreading.service.js +3 -2
- package/dist/cjs/multithreading/services/multithreading.service.js.map +1 -1
- package/dist/cjs/open-api/open-api.service.d.ts.map +1 -1
- package/dist/cjs/open-api/open-api.service.js +24 -14
- package/dist/cjs/open-api/open-api.service.js.map +1 -1
- package/dist/cjs/parsing/form-data/file-response.model.d.ts +9 -0
- package/dist/cjs/parsing/form-data/file-response.model.d.ts.map +1 -1
- package/dist/cjs/parsing/form-data/file-response.model.js +15 -3
- package/dist/cjs/parsing/form-data/file-response.model.js.map +1 -1
- package/dist/cjs/parsing/form-data/form-data-body-parser-cleanup.cron-job.d.ts.map +1 -1
- package/dist/cjs/parsing/form-data/form-data-body-parser-cleanup.cron-job.js +2 -1
- package/dist/cjs/parsing/form-data/form-data-body-parser-cleanup.cron-job.js.map +1 -1
- package/dist/cjs/parsing/form-data/form-data.body-parser.d.ts.map +1 -1
- package/dist/cjs/parsing/form-data/form-data.body-parser.js +13 -12
- package/dist/cjs/parsing/form-data/form-data.body-parser.js.map +1 -1
- package/dist/cjs/parsing/functions/parse-array.function.d.ts.map +1 -1
- package/dist/cjs/parsing/functions/parse-array.function.js +2 -1
- package/dist/cjs/parsing/functions/parse-array.function.js.map +1 -1
- package/dist/cjs/parsing/functions/parse-number.function.d.ts +4 -0
- package/dist/cjs/parsing/functions/parse-number.function.d.ts.map +1 -1
- package/dist/cjs/parsing/functions/parse-number.function.js +17 -0
- package/dist/cjs/parsing/functions/parse-number.function.js.map +1 -1
- package/dist/cjs/parsing/functions/parse-object.function.d.ts.map +1 -1
- package/dist/cjs/parsing/functions/parse-object.function.js +2 -1
- package/dist/cjs/parsing/functions/parse-object.function.js.map +1 -1
- package/dist/cjs/parsing/html/csp-options.model.d.ts +72 -0
- package/dist/cjs/parsing/html/csp-options.model.d.ts.map +1 -0
- package/dist/cjs/parsing/html/csp-options.model.js +43 -0
- package/dist/cjs/parsing/html/csp-options.model.js.map +1 -0
- package/dist/cjs/parsing/html/html-response.model.d.ts +17 -2
- package/dist/cjs/parsing/html/html-response.model.d.ts.map +1 -1
- package/dist/cjs/parsing/html/html-response.model.js +14 -5
- package/dist/cjs/parsing/html/html-response.model.js.map +1 -1
- package/dist/cjs/parsing/json/json.body-parser.js +4 -4
- package/dist/cjs/parsing/json/json.body-parser.js.map +1 -1
- package/dist/cjs/plugin/invoicing/services/invoice-calc-service.interface.d.ts +1 -1
- package/dist/cjs/plugin/invoicing/services/invoice-calc-service.interface.d.ts.map +1 -1
- package/dist/cjs/plugin/invoicing/services/invoice-calc.service.d.ts +1 -0
- package/dist/cjs/plugin/invoicing/services/invoice-calc.service.d.ts.map +1 -1
- package/dist/cjs/plugin/invoicing/services/invoice-calc.service.js +16 -16
- package/dist/cjs/plugin/invoicing/services/invoice-calc.service.js.map +1 -1
- package/dist/cjs/plugin/invoicing/services/invoice-pdf.service.d.ts.map +1 -1
- package/dist/cjs/plugin/invoicing/services/invoice-pdf.service.js.map +1 -1
- package/dist/cjs/plugin/mailing-list/mailing-list.controller.d.ts.map +1 -1
- package/dist/cjs/plugin/mailing-list/mailing-list.controller.js +7 -3
- package/dist/cjs/plugin/mailing-list/mailing-list.controller.js.map +1 -1
- package/dist/cjs/plugin/payment/providers/pay-pal/pay-pal.payment-provider.js.map +1 -1
- package/dist/cjs/preact/collector.d.ts +3 -0
- package/dist/cjs/preact/collector.d.ts.map +1 -1
- package/dist/cjs/preact/collector.js +85 -27
- package/dist/cjs/preact/collector.js.map +1 -1
- package/dist/cjs/preact/generate-client-scripts.function.d.ts.map +1 -1
- package/dist/cjs/preact/generate-client-scripts.function.js +4 -5
- package/dist/cjs/preact/generate-client-scripts.function.js.map +1 -1
- package/dist/cjs/preact/preact.utilities.d.ts +0 -14
- package/dist/cjs/preact/preact.utilities.d.ts.map +1 -1
- package/dist/cjs/preact/preact.utilities.js +14 -28
- package/dist/cjs/preact/preact.utilities.js.map +1 -1
- package/dist/cjs/rate-limiting/rate-limiter.d.ts +7 -0
- package/dist/cjs/rate-limiting/rate-limiter.d.ts.map +1 -1
- package/dist/cjs/rate-limiting/rate-limiter.js +9 -0
- package/dist/cjs/rate-limiting/rate-limiter.js.map +1 -1
- package/dist/cjs/routing/decorators/body.decorator.d.ts +2 -1
- package/dist/cjs/routing/decorators/body.decorator.d.ts.map +1 -1
- package/dist/cjs/routing/decorators/body.decorator.js.map +1 -1
- package/dist/cjs/routing/decorators/param.decorator.d.ts +6 -6
- package/dist/cjs/routing/decorators/param.decorator.d.ts.map +1 -1
- package/dist/cjs/routing/decorators/param.decorator.js.map +1 -1
- package/dist/cjs/routing/models/array-param-metadata.model.d.ts +3 -3
- package/dist/cjs/routing/models/array-param-metadata.model.d.ts.map +1 -1
- package/dist/cjs/routing/models/boolean-param-metadata.model.d.ts +1 -1
- package/dist/cjs/routing/models/boolean-param-metadata.model.d.ts.map +1 -1
- package/dist/cjs/routing/models/date-param-metadata.model.d.ts +1 -1
- package/dist/cjs/routing/models/date-param-metadata.model.d.ts.map +1 -1
- package/dist/cjs/routing/models/number-param-metadata.model.d.ts +1 -1
- package/dist/cjs/routing/models/number-param-metadata.model.d.ts.map +1 -1
- package/dist/cjs/routing/models/object-param-metadata.model.d.ts +1 -1
- package/dist/cjs/routing/models/object-param-metadata.model.d.ts.map +1 -1
- package/dist/cjs/routing/models/string-param-metadata.model.d.ts +4 -2
- package/dist/cjs/routing/models/string-param-metadata.model.d.ts.map +1 -1
- package/dist/cjs/routing/param-metdata.helpers.d.ts.map +1 -1
- package/dist/cjs/routing/param-metdata.helpers.js +6 -0
- package/dist/cjs/routing/param-metdata.helpers.js.map +1 -1
- package/dist/cjs/routing/resolve-route-params.function.d.ts +3 -7
- package/dist/cjs/routing/resolve-route-params.function.d.ts.map +1 -1
- package/dist/cjs/routing/resolve-route-params.function.js +62 -22
- package/dist/cjs/routing/resolve-route-params.function.js.map +1 -1
- package/dist/cjs/routing/route-configuration.model.d.ts +2 -2
- package/dist/cjs/routing/route-configuration.model.d.ts.map +1 -1
- package/dist/cjs/routing/router.d.ts +3 -1
- package/dist/cjs/routing/router.d.ts.map +1 -1
- package/dist/cjs/routing/router.js +143 -91
- package/dist/cjs/routing/router.js.map +1 -1
- package/dist/cjs/types/any-enum.type.d.ts +1 -1
- package/dist/cjs/types/any-enum.type.d.ts.map +1 -1
- package/dist/cjs/types/deep-partial.type.d.ts +1 -1
- package/dist/cjs/types/deep-partial.type.d.ts.map +1 -1
- package/dist/cjs/types/percentage.type.d.ts +1 -1
- package/dist/cjs/types/percentage.type.d.ts.map +1 -1
- package/dist/cjs/utilities/bytes.d.ts +19 -0
- package/dist/cjs/utilities/bytes.d.ts.map +1 -0
- package/dist/cjs/utilities/bytes.js +25 -0
- package/dist/cjs/utilities/bytes.js.map +1 -0
- package/dist/cjs/utilities/doubly-linked-list.d.ts +59 -0
- package/dist/cjs/utilities/doubly-linked-list.d.ts.map +1 -0
- package/dist/cjs/utilities/doubly-linked-list.js +127 -0
- package/dist/cjs/utilities/doubly-linked-list.js.map +1 -0
- package/dist/cjs/utilities/is-numeric.function.d.ts +1 -1
- package/dist/cjs/utilities/is-numeric.function.d.ts.map +1 -1
- package/dist/cjs/utilities/is-numeric.function.js +2 -1
- package/dist/cjs/utilities/is-numeric.function.js.map +1 -1
- package/dist/cjs/utilities/json.utilities.d.ts +24 -0
- package/dist/cjs/utilities/json.utilities.d.ts.map +1 -0
- package/dist/cjs/utilities/json.utilities.js +37 -0
- package/dist/cjs/utilities/json.utilities.js.map +1 -0
- package/dist/cjs/utilities/metadata-injection-keys.enum.d.ts +2 -1
- package/dist/cjs/utilities/metadata-injection-keys.enum.d.ts.map +1 -1
- package/dist/cjs/utilities/metadata-injection-keys.enum.js +1 -0
- package/dist/cjs/utilities/metadata-injection-keys.enum.js.map +1 -1
- package/dist/cjs/utilities/ms.d.ts +8 -0
- package/dist/cjs/utilities/ms.d.ts.map +1 -1
- package/dist/cjs/utilities/ms.js +8 -0
- package/dist/cjs/utilities/ms.js.map +1 -1
- package/dist/cjs/utilities/now-in-ns.function.d.ts +6 -0
- package/dist/cjs/utilities/now-in-ns.function.d.ts.map +1 -0
- package/dist/cjs/utilities/now-in-ns.function.js +15 -0
- package/dist/cjs/utilities/now-in-ns.function.js.map +1 -0
- package/dist/cjs/utilities/{big-number.utilities.d.ts → number.utilities.d.ts} +14 -7
- package/dist/cjs/utilities/number.utilities.d.ts.map +1 -0
- package/dist/cjs/utilities/{big-number.utilities.js → number.utilities.js} +13 -4
- package/dist/cjs/utilities/number.utilities.js.map +1 -0
- package/dist/cjs/utilities/promise.utilities.d.ts +1 -1
- package/dist/cjs/utilities/promise.utilities.d.ts.map +1 -1
- package/dist/cjs/utilities/promise.utilities.js +1 -1
- package/dist/cjs/utilities/promise.utilities.js.map +1 -1
- package/dist/cjs/validation/functions/validate-boolean.function.d.ts +1 -1
- package/dist/cjs/validation/functions/validate-boolean.function.d.ts.map +1 -1
- package/dist/cjs/validation/functions/validate-boolean.function.js +12 -10
- package/dist/cjs/validation/functions/validate-boolean.function.js.map +1 -1
- package/dist/cjs/validation/functions/validate-date.function.d.ts +1 -1
- package/dist/cjs/validation/functions/validate-date.function.d.ts.map +1 -1
- package/dist/cjs/validation/functions/validate-date.function.js +10 -10
- package/dist/cjs/validation/functions/validate-date.function.js.map +1 -1
- package/dist/cjs/validation/functions/validate-file.function.d.ts +1 -1
- package/dist/cjs/validation/functions/validate-file.function.d.ts.map +1 -1
- package/dist/cjs/validation/functions/validate-file.function.js +9 -12
- package/dist/cjs/validation/functions/validate-file.function.js.map +1 -1
- package/dist/cjs/validation/functions/validate-number.function.d.ts +1 -1
- package/dist/cjs/validation/functions/validate-number.function.d.ts.map +1 -1
- package/dist/cjs/validation/functions/validate-number.function.js +37 -11
- package/dist/cjs/validation/functions/validate-number.function.js.map +1 -1
- package/dist/cjs/validation/functions/validate-string.function.d.ts +1 -1
- package/dist/cjs/validation/functions/validate-string.function.d.ts.map +1 -1
- package/dist/cjs/validation/functions/validate-string.function.js +15 -4
- package/dist/cjs/validation/functions/validate-string.function.js.map +1 -1
- package/dist/cjs/validation/validation-service.interface.d.ts +5 -5
- package/dist/cjs/validation/validation-service.interface.d.ts.map +1 -1
- package/dist/cjs/validation/validation.service.d.ts +7 -5
- package/dist/cjs/validation/validation.service.d.ts.map +1 -1
- package/dist/cjs/validation/validation.service.js +55 -72
- package/dist/cjs/validation/validation.service.js.map +1 -1
- package/dist/cjs/websocket/services/websocket.service.d.ts.map +1 -1
- package/dist/cjs/websocket/services/websocket.service.js +63 -56
- package/dist/cjs/websocket/services/websocket.service.js.map +1 -1
- package/dist/esm/application-options.model.js +3 -1
- package/dist/esm/application-options.model.js.map +1 -1
- package/dist/esm/application.js +140 -82
- package/dist/esm/application.js.map +1 -1
- package/dist/esm/assets/asset-service.interface.js +2 -1
- package/dist/esm/assets/asset.service.js +31 -30
- package/dist/esm/assets/asset.service.js.map +1 -1
- package/dist/esm/auth/2fa/methods/otp/hi-base32.utilities.js +7 -3
- package/dist/esm/auth/2fa/methods/otp/hi-base32.utilities.js.map +1 -1
- package/dist/esm/auth/2fa/methods/otp/otp-credentials.model.js +17 -13
- package/dist/esm/auth/2fa/methods/otp/otp-credentials.model.js.map +1 -1
- package/dist/esm/auth/2fa/methods/otp/otp.two-factor-method.js +32 -29
- package/dist/esm/auth/2fa/methods/otp/otp.two-factor-method.js.map +1 -1
- package/dist/esm/auth/2fa/methods/otp/otp.utilities.js +8 -4
- package/dist/esm/auth/2fa/methods/otp/otp.utilities.js.map +1 -1
- package/dist/esm/auth/2fa/methods/two-factor-method.interface.js +4 -1
- package/dist/esm/auth/2fa/methods/two-factor-method.interface.js.map +1 -1
- package/dist/esm/auth/2fa/two-factor-methods.model.js +2 -1
- package/dist/esm/auth/2fa/two-factor-service.interface.js +2 -1
- package/dist/esm/auth/2fa/two-factor.service.js +19 -12
- package/dist/esm/auth/2fa/two-factor.service.js.map +1 -1
- package/dist/esm/auth/auth-controller.interface.js +2 -1
- package/dist/esm/auth/auth-service.interface.js +2 -1
- package/dist/esm/auth/auth.service.js +89 -78
- package/dist/esm/auth/auth.service.js.map +1 -1
- package/dist/esm/auth/decorators/auth.decorator.js +17 -14
- package/dist/esm/auth/decorators/auth.decorator.js.map +1 -1
- package/dist/esm/auth/decorators/belongs-to.decorator.js +10 -7
- package/dist/esm/auth/decorators/belongs-to.decorator.js.map +1 -1
- package/dist/esm/auth/decorators/current-user.decorator.js +7 -4
- package/dist/esm/auth/decorators/current-user.decorator.js.map +1 -1
- package/dist/esm/auth/decorators/has-role.decorator.js +10 -7
- package/dist/esm/auth/decorators/has-role.decorator.js.map +1 -1
- package/dist/esm/auth/decorators/is-logged-in.decorator.js +10 -7
- package/dist/esm/auth/decorators/is-logged-in.decorator.js.map +1 -1
- package/dist/esm/auth/decorators/is-not-logged-in.decorator.js +10 -7
- package/dist/esm/auth/decorators/is-not-logged-in.decorator.js.map +1 -1
- package/dist/esm/auth/decorators/require-2fa.decorator.js +11 -7
- package/dist/esm/auth/decorators/require-2fa.decorator.js.map +1 -1
- package/dist/esm/auth/decorators/user-repo.decorator.js +10 -7
- package/dist/esm/auth/decorators/user-repo.decorator.js.map +1 -1
- package/dist/esm/auth/encryption/encryption-key.model.js +59 -0
- package/dist/esm/auth/encryption/encryption-key.model.js.map +1 -0
- package/dist/esm/auth/encryption/encryption-master-options.model.js +3 -0
- package/dist/esm/auth/encryption/encryption-master-options.model.js.map +1 -0
- package/dist/esm/auth/encryption/encryption-service.interface.js +3 -0
- package/dist/esm/auth/encryption/encryption-service.interface.js.map +1 -0
- package/dist/esm/auth/encryption/encryption.service.js +559 -0
- package/dist/esm/auth/encryption/encryption.service.js.map +1 -0
- package/dist/esm/auth/encryption/encryption.utilities.js +37 -0
- package/dist/esm/auth/encryption/encryption.utilities.js.map +1 -0
- package/dist/esm/auth/encryption/strategies/aes-gcm.encryption-strategy.js +71 -0
- package/dist/esm/auth/encryption/strategies/aes-gcm.encryption-strategy.js.map +1 -0
- package/dist/esm/auth/encryption/strategies/encryption-strategy-entity.model.js +67 -0
- package/dist/esm/auth/encryption/strategies/encryption-strategy-entity.model.js.map +1 -0
- package/dist/esm/auth/encryption/strategies/encryption-strategy.interface.js +3 -0
- package/dist/esm/auth/encryption/strategies/encryption-strategy.interface.js.map +1 -0
- package/dist/esm/auth/hash/hash-service.interface.js +3 -0
- package/dist/esm/auth/hash/hash-service.interface.js.map +1 -0
- package/dist/esm/auth/hash/hash.service.js +148 -0
- package/dist/esm/auth/hash/hash.service.js.map +1 -0
- package/dist/esm/auth/hash/hash.utilities.js +36 -0
- package/dist/esm/auth/hash/hash.utilities.js.map +1 -0
- package/dist/esm/auth/hash/strategies/bcrypt.hash-strategy.js +26 -0
- package/dist/esm/auth/hash/strategies/bcrypt.hash-strategy.js.map +1 -0
- package/dist/esm/auth/hash/strategies/hash-strategy-entity.model.js +58 -0
- package/dist/esm/auth/hash/strategies/hash-strategy-entity.model.js.map +1 -0
- package/dist/esm/auth/hash/strategies/hash-strategy.interface.js +3 -0
- package/dist/esm/auth/hash/strategies/hash-strategy.interface.js.map +1 -0
- package/dist/esm/auth/models/base-user.model.js +11 -7
- package/dist/esm/auth/models/base-user.model.js.map +1 -1
- package/dist/esm/auth/models/belongs-to-metadata.model.js +2 -1
- package/dist/esm/auth/models/has-role-metadata.model.js +2 -1
- package/dist/esm/auth/models/is-logged-in-metadata.model.js +2 -1
- package/dist/esm/auth/models/is-not-logged-in-metadata.model.js +2 -1
- package/dist/esm/auth/models/password-reset-token.model.js +16 -12
- package/dist/esm/auth/models/password-reset-token.model.js.map +1 -1
- package/dist/esm/auth/models/require-2fa-metadata.model.js +2 -1
- package/dist/esm/auth/models/skip-auth-metadata.model.js +2 -1
- package/dist/esm/auth/models/user-repositories.model.js +2 -1
- package/dist/esm/auth/strategies/auth-strategies.model.js +2 -1
- package/dist/esm/auth/strategies/auth-strategy.interface.js +4 -1
- package/dist/esm/auth/strategies/auth-strategy.interface.js.map +1 -1
- package/dist/esm/auth/strategies/cookie/cookie-auth-confirm-password-reset-data.model.js +40 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth-confirm-password-reset-data.model.js.map +1 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth-credentials.model.js +80 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth-credentials.model.js.map +1 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth-data.model.js +60 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth-data.model.js.map +1 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth-logout-data.model.js +40 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth-logout-data.model.js.map +1 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth-refresh-login-data.model.js +14 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth-refresh-login-data.model.js.map +1 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth-refresh-session.model.js +77 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth-refresh-session.model.js.map +1 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth-request-password-reset-data.model.js +3 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth-request-password-reset-data.model.js.map +1 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth-session-cleanup.cron-job.js +54 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth-session-cleanup.cron-job.js.map +1 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth-session.model.js +59 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth-session.model.js.map +1 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth.auth-strategy.js +430 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth.auth-strategy.js.map +1 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth.controller.js +210 -0
- package/dist/esm/auth/strategies/cookie/cookie-auth.controller.js.map +1 -0
- package/dist/esm/auth/strategies/jwt/encoded-jwt-access-token.model.js +2 -1
- package/dist/esm/auth/strategies/jwt/jwt-access-token-payload.model.js +2 -1
- package/dist/esm/auth/strategies/jwt/jwt-auth-data.model.js +13 -9
- package/dist/esm/auth/strategies/jwt/jwt-auth-data.model.js.map +1 -1
- package/dist/esm/auth/strategies/jwt/jwt-auth.controller.js +87 -53
- package/dist/esm/auth/strategies/jwt/jwt-auth.controller.js.map +1 -1
- package/dist/esm/auth/strategies/jwt/jwt-confirm-password-reset-data.model.js +12 -4
- package/dist/esm/auth/strategies/jwt/jwt-confirm-password-reset-data.model.js.map +1 -1
- package/dist/esm/auth/strategies/jwt/jwt-credentials.model.js +27 -14
- package/dist/esm/auth/strategies/jwt/jwt-credentials.model.js.map +1 -1
- package/dist/esm/auth/strategies/jwt/jwt-refresh-login-data.model.js +11 -3
- package/dist/esm/auth/strategies/jwt/jwt-refresh-login-data.model.js.map +1 -1
- package/dist/esm/auth/strategies/jwt/jwt-refresh-token-cleanup.cron-job.js +48 -0
- package/dist/esm/auth/strategies/jwt/jwt-refresh-token-cleanup.cron-job.js.map +1 -0
- package/dist/esm/auth/strategies/jwt/jwt-refresh-token-payload.model.js +2 -1
- package/dist/esm/auth/strategies/jwt/jwt-refresh-token.model.js +18 -14
- package/dist/esm/auth/strategies/jwt/jwt-refresh-token.model.js.map +1 -1
- package/dist/esm/auth/strategies/jwt/jwt-request-password-reset-data.model.js +2 -1
- package/dist/esm/auth/strategies/jwt/jwt.auth-strategy.js +113 -106
- package/dist/esm/auth/strategies/jwt/jwt.auth-strategy.js.map +1 -1
- package/dist/esm/auth/strategies/jwt/jwt.model.js +8 -4
- package/dist/esm/auth/strategies/jwt/jwt.model.js.map +1 -1
- package/dist/esm/auth/strategies/jwt/jwt.utilities.js +8 -4
- package/dist/esm/auth/strategies/jwt/jwt.utilities.js.map +1 -1
- package/dist/esm/auth/user/user-repository.interface.js +2 -1
- package/dist/esm/auth/user/user-service.interface.js +2 -1
- package/dist/esm/auth/user/user.service.js +23 -20
- package/dist/esm/auth/user/user.service.js.map +1 -1
- package/dist/esm/backup/backup-entity.model.js +17 -14
- package/dist/esm/backup/backup-entity.model.js.map +1 -1
- package/dist/esm/backup/backup-resource-entity.model.js +17 -14
- package/dist/esm/backup/backup-resource-entity.model.js.map +1 -1
- package/dist/esm/backup/backup-resource.interface.js +2 -1
- package/dist/esm/backup/backup-service.interface.js +2 -1
- package/dist/esm/backup/backup.service.js +43 -39
- package/dist/esm/backup/backup.service.js.map +1 -1
- package/dist/esm/backup/decorators/backup-resource-metadata.model.js +2 -1
- package/dist/esm/backup/decorators/backup-resource.decorator.js +9 -6
- package/dist/esm/backup/decorators/backup-resource.decorator.js.map +1 -1
- package/dist/esm/backup/transports/backup-transport.interface.js +2 -1
- package/dist/esm/backup/transports/fs.backup-transport.js +25 -20
- package/dist/esm/backup/transports/fs.backup-transport.js.map +1 -1
- package/dist/esm/caching/cache/base-cache.model.js +245 -0
- package/dist/esm/caching/cache/base-cache.model.js.map +1 -0
- package/dist/esm/caching/cache/cache-operation.enum.js +14 -0
- package/dist/esm/caching/cache/cache-operation.enum.js.map +1 -0
- package/dist/esm/caching/cache/cache-options.model.js +3 -0
- package/dist/esm/caching/cache/cache-options.model.js.map +1 -0
- package/dist/esm/caching/cache/cache.interface.js +36 -0
- package/dist/esm/caching/cache/cache.interface.js.map +1 -0
- package/dist/esm/caching/cache/multi-tier.cache.js +190 -0
- package/dist/esm/caching/cache/multi-tier.cache.js.map +1 -0
- package/dist/esm/caching/cache/read-aside/read-aside.cache.js +78 -0
- package/dist/esm/caching/cache/read-aside/read-aside.cache.js.map +1 -0
- package/dist/esm/caching/cache/read-aside/write-around-read-aside.cache.js +39 -0
- package/dist/esm/caching/cache/read-aside/write-around-read-aside.cache.js.map +1 -0
- package/dist/esm/caching/cache/read-aside/write-behind-read-aside.cache.js +73 -0
- package/dist/esm/caching/cache/read-aside/write-behind-read-aside.cache.js.map +1 -0
- package/dist/esm/caching/cache/read-aside/write-invalidate-read-aside-args-only.cache.js +63 -0
- package/dist/esm/caching/cache/read-aside/write-invalidate-read-aside-args-only.cache.js.map +1 -0
- package/dist/esm/caching/cache/read-aside/write-invalidate-read-aside-with-result.cache.js +63 -0
- package/dist/esm/caching/cache/read-aside/write-invalidate-read-aside-with-result.cache.js.map +1 -0
- package/dist/esm/caching/cache/read-aside/write-through-read-aside.cache.js +64 -0
- package/dist/esm/caching/cache/read-aside/write-through-read-aside.cache.js.map +1 -0
- package/dist/esm/caching/cache/read-through/read-through.cache.js +78 -0
- package/dist/esm/caching/cache/read-through/read-through.cache.js.map +1 -0
- package/dist/esm/caching/cache/read-through/write-around-read-through.cache.js +36 -0
- package/dist/esm/caching/cache/read-through/write-around-read-through.cache.js.map +1 -0
- package/dist/esm/caching/cache/read-through/write-behind-read-through.cache.js +76 -0
- package/dist/esm/caching/cache/read-through/write-behind-read-through.cache.js.map +1 -0
- package/dist/esm/caching/cache/read-through/write-invalidate-read-through-args-only.cache.js +65 -0
- package/dist/esm/caching/cache/read-through/write-invalidate-read-through-args-only.cache.js.map +1 -0
- package/dist/esm/caching/cache/read-through/write-invalidate-read-through-with-result.cache.js +64 -0
- package/dist/esm/caching/cache/read-through/write-invalidate-read-through-with-result.cache.js.map +1 -0
- package/dist/esm/caching/cache/read-through/write-through-read-through.cache.js +61 -0
- package/dist/esm/caching/cache/read-through/write-through-read-through.cache.js.map +1 -0
- package/dist/esm/caching/cache-metrics.model.js +3 -0
- package/dist/esm/caching/cache-metrics.model.js.map +1 -0
- package/dist/esm/caching/cache-service.interface.js +3 -0
- package/dist/esm/caching/cache-service.interface.js.map +1 -0
- package/dist/esm/caching/cache-tag-matchers.js +29 -0
- package/dist/esm/caching/cache-tag-matchers.js.map +1 -0
- package/dist/esm/caching/cache.service.js +74 -0
- package/dist/esm/caching/cache.service.js.map +1 -0
- package/dist/esm/caching/decorators/cache-delete.decorator.js +30 -0
- package/dist/esm/caching/decorators/cache-delete.decorator.js.map +1 -0
- package/dist/esm/caching/decorators/cache-invalidate.decorator.js +29 -0
- package/dist/esm/caching/decorators/cache-invalidate.decorator.js.map +1 -0
- package/dist/esm/caching/decorators/cache-write.decorator.js +32 -0
- package/dist/esm/caching/decorators/cache-write.decorator.js.map +1 -0
- package/dist/esm/caching/decorators/cache.decorator.js +21 -0
- package/dist/esm/caching/decorators/cache.decorator.js.map +1 -0
- package/dist/esm/caching/decorators/cached.decorator.js +31 -0
- package/dist/esm/caching/decorators/cached.decorator.js.map +1 -0
- package/dist/esm/caching/decorators/decorator-types.js +3 -0
- package/dist/esm/caching/decorators/decorator-types.js.map +1 -0
- package/dist/esm/caching/store/cache-store.interface.js +3 -0
- package/dist/esm/caching/store/cache-store.interface.js.map +1 -0
- package/dist/esm/caching/store/cached-value.model.js +52 -0
- package/dist/esm/caching/store/cached-value.model.js.map +1 -0
- package/dist/esm/caching/store/in-memory.cache-store.js +227 -0
- package/dist/esm/caching/store/in-memory.cache-store.js.map +1 -0
- package/dist/esm/change-sets/change-set-repository.js +95 -74
- package/dist/esm/change-sets/change-set-repository.js.map +1 -1
- package/dist/esm/change-sets/models/change-set-entity.model.js +6 -3
- package/dist/esm/change-sets/models/change-set-entity.model.js.map +1 -1
- package/dist/esm/change-sets/models/change-set-type.enum.js +5 -2
- package/dist/esm/change-sets/models/change-set-type.enum.js.map +1 -1
- package/dist/esm/change-sets/models/change-set.model.js +19 -16
- package/dist/esm/change-sets/models/change-set.model.js.map +1 -1
- package/dist/esm/change-sets/models/change.model.js +16 -13
- package/dist/esm/change-sets/models/change.model.js.map +1 -1
- package/dist/esm/change-sets/models/soft-delete-entity.model.js +7 -4
- package/dist/esm/change-sets/models/soft-delete-entity.model.js.map +1 -1
- package/dist/esm/change-sets/models/soft-delete-find-all-options.model.js +2 -1
- package/dist/esm/change-sets/models/soft-delete-find-all-paginated-options.model.js +2 -1
- package/dist/esm/change-sets/models/soft-delete-find-by-id-options.model.js +2 -1
- package/dist/esm/change-sets/models/soft-delete-find-one-options.model.js +2 -1
- package/dist/esm/change-sets/models/soft-delete-update-all-options.model.js +2 -1
- package/dist/esm/change-sets/models/soft-delete-update-by-id-options.model.js +2 -1
- package/dist/esm/change-sets/models/soft-delete-where.model.js +2 -1
- package/dist/esm/change-sets/soft-delete-repository.js +19 -14
- package/dist/esm/change-sets/soft-delete-repository.js.map +1 -1
- package/dist/esm/context/als.utilities.js +77 -0
- package/dist/esm/context/als.utilities.js.map +1 -0
- package/dist/esm/context/base-context.js +15 -0
- package/dist/esm/context/base-context.js.map +1 -0
- package/dist/esm/context/request/http-request.context.js +43 -0
- package/dist/esm/context/request/http-request.context.js.map +1 -0
- package/dist/esm/context/request/request-context-token.model.js +70 -0
- package/dist/esm/context/request/request-context-token.model.js.map +1 -0
- package/dist/esm/context/request/websocket-request.context.js +43 -0
- package/dist/esm/context/request/websocket-request.context.js.map +1 -0
- package/dist/esm/cron/cron-expression.utilities.js +171 -0
- package/dist/esm/cron/cron-expression.utilities.js.map +1 -0
- package/dist/esm/cron/cron-job-entity.model.js +17 -14
- package/dist/esm/cron/cron-job-entity.model.js.map +1 -1
- package/dist/esm/cron/cron-job.model.js +22 -17
- package/dist/esm/cron/cron-job.model.js.map +1 -1
- package/dist/esm/cron/cron-service.interface.js +2 -1
- package/dist/esm/cron/cron.service.js +18 -13
- package/dist/esm/cron/cron.service.js.map +1 -1
- package/dist/esm/data-source/data-source-service.interface.js +2 -1
- package/dist/esm/data-source/data-source.service.js +17 -14
- package/dist/esm/data-source/data-source.service.js.map +1 -1
- package/dist/esm/data-source/data-sources/data-source.interface.js +15 -1
- package/dist/esm/data-source/data-sources/data-source.interface.js.map +1 -1
- package/dist/esm/data-source/data-sources/postgres-data-source.model.js +77 -62
- package/dist/esm/data-source/data-sources/postgres-data-source.model.js.map +1 -1
- package/dist/esm/data-source/decorators/data-source.decorator.js +8 -5
- package/dist/esm/data-source/decorators/data-source.decorator.js.map +1 -1
- package/dist/esm/data-source/hooks/before-return.js +3 -0
- package/dist/esm/data-source/hooks/before-return.js.map +1 -0
- package/dist/esm/data-source/hooks/before-save.js +3 -0
- package/dist/esm/data-source/hooks/before-save.js.map +1 -0
- package/dist/esm/data-source/hooks/hooks.default.js +37 -0
- package/dist/esm/data-source/hooks/hooks.default.js.map +1 -0
- package/dist/esm/data-source/migration/migration-entity.model.js +13 -10
- package/dist/esm/data-source/migration/migration-entity.model.js.map +1 -1
- package/dist/esm/data-source/migration/migration.model.js +10 -6
- package/dist/esm/data-source/migration/migration.model.js.map +1 -1
- package/dist/esm/data-source/models/column-type.model.js +2 -1
- package/dist/esm/data-source/models/data-source-options.model.js +2 -1
- package/dist/esm/data-source/models/options/base-repository-options.model.js +2 -1
- package/dist/esm/data-source/models/options/count-options.model.js +2 -1
- package/dist/esm/data-source/models/options/create-all-options.model.js +2 -1
- package/dist/esm/data-source/models/options/create-options.model.js +2 -1
- package/dist/esm/data-source/models/options/delete-all-options.model.js +2 -1
- package/dist/esm/data-source/models/options/delete-by-id-options.model.js +2 -1
- package/dist/esm/data-source/models/options/find-all-options.model.js +2 -1
- package/dist/esm/data-source/models/options/find-all-paginated-options.model.js +2 -1
- package/dist/esm/data-source/models/options/find-by-id-options.model.js +2 -1
- package/dist/esm/data-source/models/options/find-one-options.model.js +2 -1
- package/dist/esm/data-source/models/options/update-all-options.model.js +2 -1
- package/dist/esm/data-source/models/options/update-by-id-options.model.js +2 -1
- package/dist/esm/data-source/models/where/array-where-filter.model.js +2 -1
- package/dist/esm/data-source/models/where/base-where-filter.model.js +2 -1
- package/dist/esm/data-source/models/where/boolean-where-filter.model.js +2 -1
- package/dist/esm/data-source/models/where/date-where-filter.model.js +2 -1
- package/dist/esm/data-source/models/where/number-where-filter.model.js +2 -1
- package/dist/esm/data-source/models/where/object-where-filter.model.js +2 -1
- package/dist/esm/data-source/models/where/string-where-filter.model.js +2 -1
- package/dist/esm/data-source/models/where/where-filter-to-find-options-where.function.js +52 -41
- package/dist/esm/data-source/models/where/where-filter-to-find-options-where.function.js.map +1 -1
- package/dist/esm/data-source/models/where/where-filter.model.js +2 -1
- package/dist/esm/data-source/query-failed.error.js +5 -1
- package/dist/esm/data-source/query-failed.error.js.map +1 -1
- package/dist/esm/data-source/repository.js +86 -126
- package/dist/esm/data-source/repository.js.map +1 -1
- package/dist/esm/data-source/transaction/transaction.model.js +2 -1
- package/dist/esm/data-source/transaction/typeorm-transaction.model.js +5 -1
- package/dist/esm/data-source/transaction/typeorm-transaction.model.js.map +1 -1
- package/dist/esm/di/decorators/inject-repository.decorator.js +12 -8
- package/dist/esm/di/decorators/inject-repository.decorator.js.map +1 -1
- package/dist/esm/di/decorators/inject.decorator.js +8 -5
- package/dist/esm/di/decorators/inject.decorator.js.map +1 -1
- package/dist/esm/di/decorators/injectable.decorator.js +10 -7
- package/dist/esm/di/decorators/injectable.decorator.js.map +1 -1
- package/dist/esm/di/default/zibri-di-providers.default.js +143 -71
- package/dist/esm/di/default/zibri-di-providers.default.js.map +1 -1
- package/dist/esm/di/default/zibri-di-tokens.default.js +30 -8
- package/dist/esm/di/default/zibri-di-tokens.default.js.map +1 -1
- package/dist/esm/di/di-container.js +27 -22
- package/dist/esm/di/di-container.js.map +1 -1
- package/dist/esm/di/errors/get-dependency-stack-trace.function.js +6 -3
- package/dist/esm/di/errors/get-dependency-stack-trace.function.js.map +1 -1
- package/dist/esm/di/errors/no-provider.error.js +11 -7
- package/dist/esm/di/errors/no-provider.error.js.map +1 -1
- package/dist/esm/di/get-all-registered-tokens.function.js +6 -3
- package/dist/esm/di/get-all-registered-tokens.function.js.map +1 -1
- package/dist/esm/di/inject.function.js +6 -3
- package/dist/esm/di/inject.function.js.map +1 -1
- package/dist/esm/di/models/di-provider.model.js +4 -1
- package/dist/esm/di/models/di-provider.model.js.map +1 -1
- package/dist/esm/di/models/di-token.model.js +6 -3
- package/dist/esm/di/models/di-token.model.js.map +1 -1
- package/dist/esm/di/models/injection-token.model.js +5 -1
- package/dist/esm/di/models/injection-token.model.js.map +1 -1
- package/dist/esm/di/register.function.js +8 -5
- package/dist/esm/di/register.function.js.map +1 -1
- package/dist/esm/document/pdf.utilities.js +10 -3
- package/dist/esm/document/pdf.utilities.js.map +1 -1
- package/dist/esm/document/xml.utilities.js +7 -3
- package/dist/esm/document/xml.utilities.js.map +1 -1
- package/dist/esm/email/email-service.interface.js +2 -1
- package/dist/esm/email/email.service.js +37 -32
- package/dist/esm/email/email.service.js.map +1 -1
- package/dist/esm/email/models/create-email-data.model.js +12 -7
- package/dist/esm/email/models/create-email-data.model.js.map +1 -1
- package/dist/esm/email/models/email-attachment.model.js +8 -4
- package/dist/esm/email/models/email-attachment.model.js.map +1 -1
- package/dist/esm/email/models/email-config.model.js +2 -1
- package/dist/esm/email/models/email-priority.enum.js +5 -2
- package/dist/esm/email/models/email-priority.enum.js.map +1 -1
- package/dist/esm/email/models/email-status.enum.js +5 -2
- package/dist/esm/email/models/email-status.enum.js.map +1 -1
- package/dist/esm/email/models/email.model.js +25 -22
- package/dist/esm/email/models/email.model.js.map +1 -1
- package/dist/esm/email/send-queued-emails.cron-job.js +12 -8
- package/dist/esm/email/send-queued-emails.cron-job.js.map +1 -1
- package/dist/esm/entity/any-object.model.js +5 -1
- package/dist/esm/entity/any-object.model.js.map +1 -1
- package/dist/esm/entity/base-entity.model.js +7 -3
- package/dist/esm/entity/base-entity.model.js.map +1 -1
- package/dist/esm/entity/decorators/entity.decorator.js +10 -7
- package/dist/esm/entity/decorators/entity.decorator.js.map +1 -1
- package/dist/esm/entity/decorators/property.decorator.js +83 -45
- package/dist/esm/entity/decorators/property.decorator.js.map +1 -1
- package/dist/esm/entity/generation/generate-entity-file.function.js +16 -12
- package/dist/esm/entity/generation/generate-entity-file.function.js.map +1 -1
- package/dist/esm/entity/generation/generate-entity-files-for-provider.function.js +30 -27
- package/dist/esm/entity/generation/generate-entity-files-for-provider.function.js.map +1 -1
- package/dist/esm/entity/generation/generate-entity-files.function.js +18 -14
- package/dist/esm/entity/generation/generate-entity-files.function.js.map +1 -1
- package/dist/esm/entity/generation/get-entity-file-name.function.js +6 -3
- package/dist/esm/entity/generation/get-entity-file-name.function.js.map +1 -1
- package/dist/esm/entity/generation/providers/entity-generation-provider.interface.js +2 -1
- package/dist/esm/entity/generation/providers/open-api-file.provider.js +10 -5
- package/dist/esm/entity/generation/providers/open-api-file.provider.js.map +1 -1
- package/dist/esm/entity/generation/providers/open-api-to-v3.function.js +6 -3
- package/dist/esm/entity/generation/providers/open-api-to-v3.function.js.map +1 -1
- package/dist/esm/entity/generation/providers/open-api-url.provider.js +10 -6
- package/dist/esm/entity/generation/providers/open-api-url.provider.js.map +1 -1
- package/dist/esm/entity/intersection-class.model.js +6 -3
- package/dist/esm/entity/intersection-class.model.js.map +1 -1
- package/dist/esm/entity/models/array-property-metadata.model.js +2 -1
- package/dist/esm/entity/models/base-property-metadata.model.js +2 -1
- package/dist/esm/entity/models/base-relation-metadata.model.js +2 -1
- package/dist/esm/entity/models/boolean-property-metadata.model.js +2 -1
- package/dist/esm/entity/models/date-property-metadata.model.js +2 -1
- package/dist/esm/entity/models/file-property-metadata.model.js +9 -6
- package/dist/esm/entity/models/file-property-metadata.model.js.map +1 -1
- package/dist/esm/entity/models/many-to-many-property-metadata.model.js +2 -1
- package/dist/esm/entity/models/many-to-one-property-metadata.model.js +2 -1
- package/dist/esm/entity/models/number-property-metadata.model.js +2 -1
- package/dist/esm/entity/models/object-property-metadata.model.js +2 -1
- package/dist/esm/entity/models/one-to-many-property-metadata.model.js +2 -1
- package/dist/esm/entity/models/one-to-one-property-metadata.model.js +2 -1
- package/dist/esm/entity/models/relation.enum.js +5 -2
- package/dist/esm/entity/models/relation.enum.js.map +1 -1
- package/dist/esm/entity/models/string-property-metadata.model.js +2 -1
- package/dist/esm/entity/models/unknown-property-metadata.model.js +2 -1
- package/dist/esm/entity/omit-class.model.js +6 -3
- package/dist/esm/entity/omit-class.model.js.map +1 -1
- package/dist/esm/entity/partial-class.model.js +9 -6
- package/dist/esm/entity/partial-class.model.js.map +1 -1
- package/dist/esm/entity/pick-class.model.js +8 -5
- package/dist/esm/entity/pick-class.model.js.map +1 -1
- package/dist/esm/entity/utilities/copy-class-properties.function.js +19 -14
- package/dist/esm/entity/utilities/copy-class-properties.function.js.map +1 -1
- package/dist/esm/error-handling/error-handler.js +25 -20
- package/dist/esm/error-handling/error-handler.js.map +1 -1
- package/dist/esm/error-handling/error-handler.model.js +2 -1
- package/dist/esm/error-handling/errors/bad-request.error.js +8 -4
- package/dist/esm/error-handling/errors/bad-request.error.js.map +1 -1
- package/dist/esm/error-handling/errors/conflict.error.js +8 -4
- package/dist/esm/error-handling/errors/conflict.error.js.map +1 -1
- package/dist/esm/error-handling/errors/content-too-large.error.js +8 -4
- package/dist/esm/error-handling/errors/content-too-large.error.js.map +1 -1
- package/dist/esm/error-handling/errors/http.error.js +7 -2
- package/dist/esm/error-handling/errors/http.error.js.map +1 -1
- package/dist/esm/error-handling/errors/internal-server.error.js +8 -4
- package/dist/esm/error-handling/errors/internal-server.error.js.map +1 -1
- package/dist/esm/error-handling/errors/missing-entities.error.js +5 -1
- package/dist/esm/error-handling/errors/missing-entities.error.js.map +1 -1
- package/dist/esm/error-handling/errors/missing-tokens.error.js +7 -3
- package/dist/esm/error-handling/errors/missing-tokens.error.js.map +1 -1
- package/dist/esm/error-handling/errors/not-found.error.js +8 -4
- package/dist/esm/error-handling/errors/not-found.error.js.map +1 -1
- package/dist/esm/error-handling/errors/too-many-requests.error.js +8 -4
- package/dist/esm/error-handling/errors/too-many-requests.error.js.map +1 -1
- package/dist/esm/error-handling/errors/unauthorized.error.js +8 -4
- package/dist/esm/error-handling/errors/unauthorized.error.js.map +1 -1
- package/dist/esm/error-handling/errors/unmatched-route.error.js +6 -2
- package/dist/esm/error-handling/errors/unmatched-route.error.js.map +1 -1
- package/dist/esm/error-handling/errors/validation.error.js +11 -4
- package/dist/esm/error-handling/errors/validation.error.js.map +1 -1
- package/dist/esm/error-handling/is-error.function.js +4 -1
- package/dist/esm/error-handling/is-error.function.js.map +1 -1
- package/dist/esm/error-handling/unknown-to-error-string.function.js +8 -4
- package/dist/esm/error-handling/unknown-to-error-string.function.js.map +1 -1
- package/dist/esm/event/event-cleanup.cron-job.js +58 -0
- package/dist/esm/event/event-cleanup.cron-job.js.map +1 -0
- package/dist/esm/event/event-processing.error.js +19 -0
- package/dist/esm/event/event-processing.error.js.map +1 -0
- package/dist/esm/event/event-service.interface.js +3 -0
- package/dist/esm/event/event-service.interface.js.map +1 -0
- package/dist/esm/event/event-subscriber-run.model.js +73 -0
- package/dist/esm/event/event-subscriber-run.model.js.map +1 -0
- package/dist/esm/event/event.model.js +105 -0
- package/dist/esm/event/event.model.js.map +1 -0
- package/dist/esm/event/event.service.js +218 -0
- package/dist/esm/event/event.service.js.map +1 -0
- package/dist/esm/global/after-app-init.interface.js +4 -1
- package/dist/esm/global/after-app-init.interface.js.map +1 -1
- package/dist/esm/global/after-app-shutdown.interface.js +4 -1
- package/dist/esm/global/after-app-shutdown.interface.js.map +1 -1
- package/dist/esm/global/app-state.enum.js +5 -2
- package/dist/esm/global/app-state.enum.js.map +1 -1
- package/dist/esm/global/before-app-init.interface.js +4 -1
- package/dist/esm/global/before-app-init.interface.js.map +1 -1
- package/dist/esm/global/before-app-shutdown.interface.js +4 -1
- package/dist/esm/global/before-app-shutdown.interface.js.map +1 -1
- package/dist/esm/global/global-registry.js +58 -50
- package/dist/esm/global/global-registry.js.map +1 -1
- package/dist/esm/global/model-registry/decrypt-encryption-properties.function.js +64 -0
- package/dist/esm/global/model-registry/decrypt-encryption-properties.function.js.map +1 -0
- package/dist/esm/global/model-registry/default-descriptor.js +95 -0
- package/dist/esm/global/model-registry/default-descriptor.js.map +1 -0
- package/dist/esm/global/model-registry/encrypt-encryption-properties.function.js +71 -0
- package/dist/esm/global/model-registry/encrypt-encryption-properties.function.js.map +1 -0
- package/dist/esm/global/model-registry/encryption-descriptor.js +97 -0
- package/dist/esm/global/model-registry/encryption-descriptor.js.map +1 -0
- package/dist/esm/global/model-registry/exclude-descriptor.js +95 -0
- package/dist/esm/global/model-registry/exclude-descriptor.js.map +1 -0
- package/dist/esm/global/model-registry/hash-descriptor.js +97 -0
- package/dist/esm/global/model-registry/hash-descriptor.js.map +1 -0
- package/dist/esm/global/model-registry/hash-hash-properties.function.js +47 -0
- package/dist/esm/global/model-registry/hash-hash-properties.function.js.map +1 -0
- package/dist/esm/global/model-registry/model.registry.js +56 -0
- package/dist/esm/global/model-registry/model.registry.js.map +1 -0
- package/dist/esm/global/model-registry/remove-exclude-properties.function.js +66 -0
- package/dist/esm/global/model-registry/remove-exclude-properties.function.js.map +1 -0
- package/dist/esm/global/model-registry/restore-exclude-properties.function.js +46 -0
- package/dist/esm/global/model-registry/restore-exclude-properties.function.js.map +1 -0
- package/dist/esm/global/model-registry/set-default-values.function.js +44 -0
- package/dist/esm/global/model-registry/set-default-values.function.js.map +1 -0
- package/dist/esm/global/on-app-init.interface.js +4 -1
- package/dist/esm/global/on-app-init.interface.js.map +1 -1
- package/dist/esm/global/on-app-shutdown.interface.js +4 -1
- package/dist/esm/global/on-app-shutdown.interface.js.map +1 -1
- package/dist/esm/global/on-app-start.interface.js +4 -1
- package/dist/esm/global/on-app-start.interface.js.map +1 -1
- package/dist/esm/handlebars/ast.model.js +2 -1
- package/dist/esm/handlebars/generate-handlebar-type-files.function.js +24 -20
- package/dist/esm/handlebars/generate-handlebar-type-files.function.js.map +1 -1
- package/dist/esm/handlebars/handlebar.utilities.js +26 -18
- package/dist/esm/handlebars/handlebar.utilities.js.map +1 -1
- package/dist/esm/handlebars/resolve-all-array-keys.function.js +8 -4
- package/dist/esm/handlebars/resolve-all-array-keys.function.js.map +1 -1
- package/dist/esm/handlebars/resolve-key-for-mustache-statement.function.js +4 -1
- package/dist/esm/handlebars/resolve-key-for-mustache-statement.function.js.map +1 -1
- package/dist/esm/handlebars/resolve-key-for-path-expression.function.js +4 -1
- package/dist/esm/handlebars/resolve-key-for-path-expression.function.js.map +1 -1
- package/dist/esm/handlebars/resolve-keys-for-block-statement.function.js +16 -12
- package/dist/esm/handlebars/resolve-keys-for-block-statement.function.js.map +1 -1
- package/dist/esm/handlebars/resolve-keys-for-partial-statement.function.js +8 -4
- package/dist/esm/handlebars/resolve-keys-for-partial-statement.function.js.map +1 -1
- package/dist/esm/handlebars/resolve-tree.function.js +16 -12
- package/dist/esm/handlebars/resolve-tree.function.js.map +1 -1
- package/dist/esm/http/cookie-options.model.js +3 -0
- package/dist/esm/http/cookie-options.model.js.map +1 -0
- package/dist/esm/http/header.type.js +2 -1
- package/dist/esm/http/http-method.enum.js +5 -2
- package/dist/esm/http/http-method.enum.js.map +1 -1
- package/dist/esm/http/http-request.model.js +4 -1
- package/dist/esm/http/http-request.model.js.map +1 -1
- package/dist/esm/http/http-response.model.js +2 -1
- package/dist/esm/http/http-status.enum.js +5 -2
- package/dist/esm/http/http-status.enum.js.map +1 -1
- package/dist/esm/http/known-header.enum.js +38 -30
- package/dist/esm/http/known-header.enum.js.map +1 -1
- package/dist/esm/http/mime-type.enum.js +46 -10
- package/dist/esm/http/mime-type.enum.js.map +1 -1
- package/dist/esm/http/mime-type.helpers.js +114 -38
- package/dist/esm/http/mime-type.helpers.js.map +1 -1
- package/dist/esm/http-client/http-client-response.model.js +4 -1
- package/dist/esm/http-client/http-client-response.model.js.map +1 -1
- package/dist/esm/http-client/http-client.error.js +7 -2
- package/dist/esm/http-client/http-client.error.js.map +1 -1
- package/dist/esm/http-client/http-client.interface.js +2 -1
- package/dist/esm/http-client/http-client.js +82 -44
- package/dist/esm/http-client/http-client.js.map +1 -1
- package/dist/esm/index.js +441 -340
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/localization/formatting/format-date-fn.model.js +2 -1
- package/dist/esm/localization/formatting/format-date.function.js +7 -3
- package/dist/esm/localization/formatting/format-date.function.js.map +1 -1
- package/dist/esm/localization/formatting/format-percent-fn.model.js +2 -1
- package/dist/esm/localization/formatting/format-percent.function.js +5 -1
- package/dist/esm/localization/formatting/format-percent.function.js.map +1 -1
- package/dist/esm/localization/formatting/format-price-fn.model.js +2 -1
- package/dist/esm/localization/formatting/format-price.function.js +7 -3
- package/dist/esm/localization/formatting/format-price.function.js.map +1 -1
- package/dist/esm/localization/models/currency-code.model.js +2 -1
- package/dist/esm/localization/models/language-code.model.js +2 -1
- package/dist/esm/localization/models/localize-options.model.js +2 -1
- package/dist/esm/logging/error-to-logged-error.function.js +6 -2
- package/dist/esm/logging/error-to-logged-error.function.js.map +1 -1
- package/dist/esm/logging/log-cleanup.cron-job.js +15 -11
- package/dist/esm/logging/log-cleanup.cron-job.js.map +1 -1
- package/dist/esm/logging/log-context.model.js +96 -13
- package/dist/esm/logging/log-context.model.js.map +1 -1
- package/dist/esm/logging/log-level.enum.js +5 -2
- package/dist/esm/logging/log-level.enum.js.map +1 -1
- package/dist/esm/logging/log.model.js +18 -24
- package/dist/esm/logging/log.model.js.map +1 -1
- package/dist/esm/logging/logged-error.model.js +9 -5
- package/dist/esm/logging/logged-error.model.js.map +1 -1
- package/dist/esm/logging/logger.helpers.js +18 -13
- package/dist/esm/logging/logger.helpers.js.map +1 -1
- package/dist/esm/logging/logger.interface.js +2 -1
- package/dist/esm/logging/logger.js +54 -24
- package/dist/esm/logging/logger.js.map +1 -1
- package/dist/esm/logging/transport/log-to-console.function.js +20 -16
- package/dist/esm/logging/transport/log-to-console.function.js.map +1 -1
- package/dist/esm/logging/transport/log-to-db.function.js +8 -5
- package/dist/esm/logging/transport/log-to-db.function.js.map +1 -1
- package/dist/esm/logging/transport/log-to-email.function.js +20 -16
- package/dist/esm/logging/transport/log-to-email.function.js.map +1 -1
- package/dist/esm/logging/transport/logger-transport.model.js +11 -7
- package/dist/esm/logging/transport/logger-transport.model.js.map +1 -1
- package/dist/esm/metrics/{scrape-metrics.cron-job.js → collect-metrics.cron-job.js} +17 -13
- package/dist/esm/metrics/collect-metrics.cron-job.js.map +1 -0
- package/dist/esm/metrics/counter.interface.js +2 -1
- package/dist/esm/metrics/gauge.interface.js +2 -1
- package/dist/esm/metrics/histogram.interface.js +2 -1
- package/dist/esm/metrics/metric-type.enum.js +5 -2
- package/dist/esm/metrics/metric-type.enum.js.map +1 -1
- package/dist/esm/metrics/metric.model.js +11 -7
- package/dist/esm/metrics/metric.model.js.map +1 -1
- package/dist/esm/metrics/metrics-service.interface.js +2 -1
- package/dist/esm/metrics/metrics.service.js +30 -22
- package/dist/esm/metrics/metrics.service.js.map +1 -1
- package/dist/esm/multithreading/models/base-thread-job-worker-data.model.js +2 -1
- package/dist/esm/multithreading/models/multithreading-options.model.js +2 -1
- package/dist/esm/multithreading/models/thread-job-data.model.js +2 -1
- package/dist/esm/multithreading/models/thread-job-entity.model.js +22 -19
- package/dist/esm/multithreading/models/thread-job-entity.model.js.map +1 -1
- package/dist/esm/multithreading/models/thread-job-function.model.js +2 -1
- package/dist/esm/multithreading/models/thread-job-message.model.js +2 -1
- package/dist/esm/multithreading/models/thread-job-status.enum.js +5 -2
- package/dist/esm/multithreading/models/thread-job-status.enum.js.map +1 -1
- package/dist/esm/multithreading/services/multithreading-service.interface.js +2 -1
- package/dist/esm/multithreading/services/multithreading.service.js +55 -48
- package/dist/esm/multithreading/services/multithreading.service.js.map +1 -1
- package/dist/esm/multithreading/services/thread-job-worker.js +7 -3
- package/dist/esm/multithreading/services/thread-job-worker.js.map +1 -1
- package/dist/esm/multithreading/services/thread-job.js +7 -3
- package/dist/esm/multithreading/services/thread-job.js.map +1 -1
- package/dist/esm/multithreading/services/worker/helpers.js +12 -7
- package/dist/esm/multithreading/services/worker/helpers.js.map +1 -1
- package/dist/esm/open-api/decorators/response.decorator.js +32 -29
- package/dist/esm/open-api/decorators/response.decorator.js.map +1 -1
- package/dist/esm/open-api/open-api-service.interface.js +2 -1
- package/dist/esm/open-api/open-api.model.js +2 -1
- package/dist/esm/open-api/open-api.service.js +148 -132
- package/dist/esm/open-api/open-api.service.js.map +1 -1
- package/dist/esm/open-api/pagination-result.model.js +7 -4
- package/dist/esm/open-api/pagination-result.model.js.map +1 -1
- package/dist/esm/parsing/body-parser.interface.js +2 -1
- package/dist/esm/parsing/decorators/body-parser.decorator.js +9 -6
- package/dist/esm/parsing/decorators/body-parser.decorator.js.map +1 -1
- package/dist/esm/parsing/form-data/file-response.model.js +31 -15
- package/dist/esm/parsing/form-data/file-response.model.js.map +1 -1
- package/dist/esm/parsing/form-data/file.model.js +13 -9
- package/dist/esm/parsing/form-data/file.model.js.map +1 -1
- package/dist/esm/parsing/form-data/form-data-body-parser-cleanup.cron-job.js +19 -15
- package/dist/esm/parsing/form-data/form-data-body-parser-cleanup.cron-job.js.map +1 -1
- package/dist/esm/parsing/form-data/form-data.body-parser.js +73 -69
- package/dist/esm/parsing/form-data/form-data.body-parser.js.map +1 -1
- package/dist/esm/parsing/form-data/form-data.model.js +9 -5
- package/dist/esm/parsing/form-data/form-data.model.js.map +1 -1
- package/dist/esm/parsing/functions/parse-array.function.js +16 -12
- package/dist/esm/parsing/functions/parse-array.function.js.map +1 -1
- package/dist/esm/parsing/functions/parse-boolean.function.js +4 -1
- package/dist/esm/parsing/functions/parse-boolean.function.js.map +1 -1
- package/dist/esm/parsing/functions/parse-date.function.js +6 -3
- package/dist/esm/parsing/functions/parse-date.function.js.map +1 -1
- package/dist/esm/parsing/functions/parse-number.function.js +23 -3
- package/dist/esm/parsing/functions/parse-number.function.js.map +1 -1
- package/dist/esm/parsing/functions/parse-object.function.js +25 -21
- package/dist/esm/parsing/functions/parse-object.function.js.map +1 -1
- package/dist/esm/parsing/functions/parse-string.function.js +4 -1
- package/dist/esm/parsing/functions/parse-string.function.js.map +1 -1
- package/dist/esm/parsing/html/csp-options.model.js +43 -0
- package/dist/esm/parsing/html/csp-options.model.js.map +1 -0
- package/dist/esm/parsing/html/html-response.model.js +19 -6
- package/dist/esm/parsing/html/html-response.model.js.map +1 -1
- package/dist/esm/parsing/json/json.body-parser.js +29 -26
- package/dist/esm/parsing/json/json.body-parser.js.map +1 -1
- package/dist/esm/parsing/parser.interface.js +2 -1
- package/dist/esm/parsing/parser.js +63 -57
- package/dist/esm/parsing/parser.js.map +1 -1
- package/dist/esm/plugin/invoicing/invoicing.plugin.js +28 -24
- package/dist/esm/plugin/invoicing/invoicing.plugin.js.map +1 -1
- package/dist/esm/plugin/invoicing/invoicing.tokens.js +6 -3
- package/dist/esm/plugin/invoicing/invoicing.tokens.js.map +1 -1
- package/dist/esm/plugin/invoicing/models/amount-unit.model.js +8 -4
- package/dist/esm/plugin/invoicing/models/amount-unit.model.js.map +1 -1
- package/dist/esm/plugin/invoicing/models/company-info.model.js +2 -1
- package/dist/esm/plugin/invoicing/models/invoice-address.model.js +17 -13
- package/dist/esm/plugin/invoicing/models/invoice-address.model.js.map +1 -1
- package/dist/esm/plugin/invoicing/models/invoice-item.model.js +15 -11
- package/dist/esm/plugin/invoicing/models/invoice-item.model.js.map +1 -1
- package/dist/esm/plugin/invoicing/models/invoice.model.js +22 -19
- package/dist/esm/plugin/invoicing/models/invoice.model.js.map +1 -1
- package/dist/esm/plugin/invoicing/models/invoicing-options-input.model.js +2 -1
- package/dist/esm/plugin/invoicing/models/invoicing-options.model.js +2 -1
- package/dist/esm/plugin/invoicing/models/number-invoices.model.js +13 -10
- package/dist/esm/plugin/invoicing/models/number-invoices.model.js.map +1 -1
- package/dist/esm/plugin/invoicing/models/vat.model.js +9 -5
- package/dist/esm/plugin/invoicing/models/vat.model.js.map +1 -1
- package/dist/esm/plugin/invoicing/services/conformance/en16931/en16931-conformance.service.js +13 -10
- package/dist/esm/plugin/invoicing/services/conformance/en16931/en16931-conformance.service.js.map +1 -1
- package/dist/esm/plugin/invoicing/services/conformance/en16931/peppol-conformance.service.js +9 -6
- package/dist/esm/plugin/invoicing/services/conformance/en16931/peppol-conformance.service.js.map +1 -1
- package/dist/esm/plugin/invoicing/services/conformance/en16931/x-rechnung-conformance.service.js +9 -6
- package/dist/esm/plugin/invoicing/services/conformance/en16931/x-rechnung-conformance.service.js.map +1 -1
- package/dist/esm/plugin/invoicing/services/conformance/invoice-conformance-service.interface.js +2 -1
- package/dist/esm/plugin/invoicing/services/invoice-calc-service.interface.js +2 -1
- package/dist/esm/plugin/invoicing/services/invoice-calc.service.js +23 -20
- package/dist/esm/plugin/invoicing/services/invoice-calc.service.js.map +1 -1
- package/dist/esm/plugin/invoicing/services/invoice-number-service.interface.js +2 -1
- package/dist/esm/plugin/invoicing/services/invoice-number.service.js +20 -17
- package/dist/esm/plugin/invoicing/services/invoice-number.service.js.map +1 -1
- package/dist/esm/plugin/invoicing/services/invoice-pdf-service.interface.js +2 -1
- package/dist/esm/plugin/invoicing/services/invoice-pdf.service.js +18 -15
- package/dist/esm/plugin/invoicing/services/invoice-pdf.service.js.map +1 -1
- package/dist/esm/plugin/mailing-list/mailing-list.controller.js +59 -52
- package/dist/esm/plugin/mailing-list/mailing-list.controller.js.map +1 -1
- package/dist/esm/plugin/mailing-list/mailing-list.plugin.js +20 -16
- package/dist/esm/plugin/mailing-list/mailing-list.plugin.js.map +1 -1
- package/dist/esm/plugin/mailing-list/mailing-list.tokens.js +6 -3
- package/dist/esm/plugin/mailing-list/mailing-list.tokens.js.map +1 -1
- package/dist/esm/plugin/mailing-list/models/mailing-list-base-email-template.model.js +2 -1
- package/dist/esm/plugin/mailing-list/models/mailing-list-preferences-page-template.model.js +2 -1
- package/dist/esm/plugin/mailing-list/models/mailing-list-subscribe-confirmation-email-template.model.js +2 -1
- package/dist/esm/plugin/mailing-list/models/mailing-list-subscribe-success-page-template.model.js +2 -1
- package/dist/esm/plugin/mailing-list/models/mailing-list-subscriber.model.js +14 -11
- package/dist/esm/plugin/mailing-list/models/mailing-list-subscriber.model.js.map +1 -1
- package/dist/esm/plugin/mailing-list/models/mailing-list-subscription-confirmation-token.model.js +18 -14
- package/dist/esm/plugin/mailing-list/models/mailing-list-subscription-confirmation-token.model.js.map +1 -1
- package/dist/esm/plugin/mailing-list/models/mailing-list-unsubscribe-confirmation-page-template.model.js +2 -1
- package/dist/esm/plugin/mailing-list/models/mailing-list.model.js +13 -10
- package/dist/esm/plugin/mailing-list/models/mailing-list.model.js.map +1 -1
- package/dist/esm/plugin/mailing-list/models/update-mailing-list-preferences.model.js +7 -3
- package/dist/esm/plugin/mailing-list/models/update-mailing-list-preferences.model.js.map +1 -1
- package/dist/esm/plugin/mailing-list/services/mailing-list-service.interface.js +7 -3
- package/dist/esm/plugin/mailing-list/services/mailing-list-service.interface.js.map +1 -1
- package/dist/esm/plugin/mailing-list/services/mailing-list.service.js +42 -39
- package/dist/esm/plugin/mailing-list/services/mailing-list.service.js.map +1 -1
- package/dist/esm/plugin/payment/models/payment-method.model.js +5 -2
- package/dist/esm/plugin/payment/models/payment-method.model.js.map +1 -1
- package/dist/esm/plugin/payment/models/payment-plugin-options-input.model.js +2 -1
- package/dist/esm/plugin/payment/models/payment-plugin-options.model.js +2 -1
- package/dist/esm/plugin/payment/models/payment-status.enum.js +5 -2
- package/dist/esm/plugin/payment/models/payment-status.enum.js.map +1 -1
- package/dist/esm/plugin/payment/models/payment.model.js +19 -16
- package/dist/esm/plugin/payment/models/payment.model.js.map +1 -1
- package/dist/esm/plugin/payment/payment.plugin.js +21 -17
- package/dist/esm/plugin/payment/payment.plugin.js.map +1 -1
- package/dist/esm/plugin/payment/payment.tokens.js +6 -3
- package/dist/esm/plugin/payment/payment.tokens.js.map +1 -1
- package/dist/esm/plugin/payment/providers/pay-pal/pay-pal-client.js +55 -46
- package/dist/esm/plugin/payment/providers/pay-pal/pay-pal-client.js.map +1 -1
- package/dist/esm/plugin/payment/providers/pay-pal/pay-pal.payment-provider.js +33 -29
- package/dist/esm/plugin/payment/providers/pay-pal/pay-pal.payment-provider.js.map +1 -1
- package/dist/esm/plugin/payment/providers/payment-provider.interface.js +2 -1
- package/dist/esm/plugin/payment/services/payment-service.interface.js +2 -1
- package/dist/esm/plugin/payment/services/payment-service.types.js +2 -1
- package/dist/esm/plugin/payment/services/payment.service.js +28 -25
- package/dist/esm/plugin/payment/services/payment.service.js.map +1 -1
- package/dist/esm/plugin/plugin.model.js +5 -1
- package/dist/esm/plugin/plugin.model.js.map +1 -1
- package/dist/esm/preact/collector.js +101 -39
- package/dist/esm/preact/collector.js.map +1 -1
- package/dist/esm/preact/generate-client-scripts.function.js +33 -30
- package/dist/esm/preact/generate-client-scripts.function.js.map +1 -1
- package/dist/esm/preact/hooks/hooks.js +6 -3
- package/dist/esm/preact/hooks/hooks.js.map +1 -1
- package/dist/esm/preact/hooks/on-client.hook.js +4 -1
- package/dist/esm/preact/hooks/on-client.hook.js.map +1 -1
- package/dist/esm/preact/hooks/on-server.hook.js +4 -1
- package/dist/esm/preact/hooks/on-server.hook.js.map +1 -1
- package/dist/esm/preact/preact-component.model.js +2 -1
- package/dist/esm/preact/preact-email-component.model.js +2 -1
- package/dist/esm/preact/preact.utilities.js +49 -56
- package/dist/esm/preact/preact.utilities.js.map +1 -1
- package/dist/esm/preact/string-aware-replace.function.js +6 -2
- package/dist/esm/preact/string-aware-replace.function.js.map +1 -1
- package/dist/esm/preact/validate-email-templates.function.js +4 -1
- package/dist/esm/preact/validate-email-templates.function.js.map +1 -1
- package/dist/esm/rate-limiting/rate-limiter.js +19 -6
- package/dist/esm/rate-limiting/rate-limiter.js.map +1 -1
- package/dist/esm/routing/controller-route-configuration.model.js +2 -1
- package/dist/esm/routing/decorators/body.decorator.js +24 -20
- package/dist/esm/routing/decorators/body.decorator.js.map +1 -1
- package/dist/esm/routing/decorators/controller.decorator.js +10 -7
- package/dist/esm/routing/decorators/controller.decorator.js.map +1 -1
- package/dist/esm/routing/decorators/create-http-decorator.function.js +8 -5
- package/dist/esm/routing/decorators/create-http-decorator.function.js.map +1 -1
- package/dist/esm/routing/decorators/delete.decorator.js +7 -4
- package/dist/esm/routing/decorators/delete.decorator.js.map +1 -1
- package/dist/esm/routing/decorators/get.decorator.js +7 -4
- package/dist/esm/routing/decorators/get.decorator.js.map +1 -1
- package/dist/esm/routing/decorators/param.decorator.js +19 -16
- package/dist/esm/routing/decorators/param.decorator.js.map +1 -1
- package/dist/esm/routing/decorators/patch.decorator.js +7 -4
- package/dist/esm/routing/decorators/patch.decorator.js.map +1 -1
- package/dist/esm/routing/decorators/post.decorator.js +7 -4
- package/dist/esm/routing/decorators/post.decorator.js.map +1 -1
- package/dist/esm/routing/missing-base-route.error.js +7 -3
- package/dist/esm/routing/missing-base-route.error.js.map +1 -1
- package/dist/esm/routing/models/array-param-metadata.model.js +2 -1
- package/dist/esm/routing/models/base-param-metadata.model.js +2 -1
- package/dist/esm/routing/models/boolean-param-metadata.model.js +2 -1
- package/dist/esm/routing/models/crud-controller.model.js +35 -32
- package/dist/esm/routing/models/crud-controller.model.js.map +1 -1
- package/dist/esm/routing/models/date-param-metadata.model.js +2 -1
- package/dist/esm/routing/models/number-param-metadata.model.js +2 -1
- package/dist/esm/routing/models/object-param-metadata.model.js +2 -1
- package/dist/esm/routing/models/string-param-metadata.model.js +2 -1
- package/dist/esm/routing/param-metdata.helpers.js +16 -4
- package/dist/esm/routing/param-metdata.helpers.js.map +1 -1
- package/dist/esm/routing/resolve-route-params.function.js +77 -34
- package/dist/esm/routing/resolve-route-params.function.js.map +1 -1
- package/dist/esm/routing/route-configuration.model.js +2 -1
- package/dist/esm/routing/router.interface.js +2 -1
- package/dist/esm/routing/router.js +193 -138
- package/dist/esm/routing/router.js.map +1 -1
- package/dist/esm/types/any-enum.type.js +2 -1
- package/dist/esm/types/deep-partial.type.js +2 -1
- package/dist/esm/types/exclude-strict.type.js +2 -1
- package/dist/esm/types/newable.type.js +2 -1
- package/dist/esm/types/omit-strict.type.js +2 -1
- package/dist/esm/types/percentage.type.js +2 -1
- package/dist/esm/types/version.type.js +2 -1
- package/dist/esm/utilities/add-import-statement.function.js +4 -1
- package/dist/esm/utilities/add-import-statement.function.js.map +1 -1
- package/dist/esm/utilities/bytes.js +25 -0
- package/dist/esm/utilities/bytes.js.map +1 -0
- package/dist/esm/utilities/compare-versions.function.js +4 -1
- package/dist/esm/utilities/compare-versions.function.js.map +1 -1
- package/dist/esm/utilities/doubly-linked-list.js +127 -0
- package/dist/esm/utilities/doubly-linked-list.js.map +1 -0
- package/dist/esm/utilities/fs.utilities.js +36 -29
- package/dist/esm/utilities/fs.utilities.js.map +1 -1
- package/dist/esm/utilities/is-date.function.js +4 -1
- package/dist/esm/utilities/is-date.function.js.map +1 -1
- package/dist/esm/utilities/is-numeric.function.js +6 -2
- package/dist/esm/utilities/is-numeric.function.js.map +1 -1
- package/dist/esm/utilities/is-version.function.js +6 -3
- package/dist/esm/utilities/is-version.function.js.map +1 -1
- package/dist/esm/utilities/json.utilities.js +37 -0
- package/dist/esm/utilities/json.utilities.js.map +1 -0
- package/dist/esm/utilities/mask.utilities.js +5 -1
- package/dist/esm/utilities/mask.utilities.js.map +1 -1
- package/dist/esm/utilities/metadata-injection-keys.enum.js +6 -2
- package/dist/esm/utilities/metadata-injection-keys.enum.js.map +1 -1
- package/dist/esm/utilities/metadata.utilities.js +86 -82
- package/dist/esm/utilities/metadata.utilities.js.map +1 -1
- package/dist/esm/utilities/ms.js +13 -1
- package/dist/esm/utilities/ms.js.map +1 -1
- package/dist/esm/utilities/now-in-ns.function.js +15 -0
- package/dist/esm/utilities/now-in-ns.function.js.map +1 -0
- package/dist/esm/utilities/number.utilities.js +58 -0
- package/dist/esm/utilities/number.utilities.js.map +1 -0
- package/dist/esm/utilities/object.utilities.js +5 -1
- package/dist/esm/utilities/object.utilities.js.map +1 -1
- package/dist/esm/utilities/promise.utilities.js +8 -4
- package/dist/esm/utilities/promise.utilities.js.map +1 -1
- package/dist/esm/utilities/reflect.utilities.js +5 -1
- package/dist/esm/utilities/reflect.utilities.js.map +1 -1
- package/dist/esm/utilities/to-camel-case.function.js +4 -1
- package/dist/esm/utilities/to-camel-case.function.js.map +1 -1
- package/dist/esm/utilities/to-kebab-case.function.js +4 -1
- package/dist/esm/utilities/to-kebab-case.function.js.map +1 -1
- package/dist/esm/utilities/to-pascal-case.function.js +4 -1
- package/dist/esm/utilities/to-pascal-case.function.js.map +1 -1
- package/dist/esm/utilities/to-snake-case.function.js +4 -1
- package/dist/esm/utilities/to-snake-case.function.js.map +1 -1
- package/dist/esm/utilities/uuid.utilities.js +7 -3
- package/dist/esm/utilities/uuid.utilities.js.map +1 -1
- package/dist/esm/utilities/validate-entities-registered.function.js +8 -5
- package/dist/esm/utilities/validate-entities-registered.function.js.map +1 -1
- package/dist/esm/utilities/validate-tokens-registered.function.js +10 -7
- package/dist/esm/utilities/validate-tokens-registered.function.js.map +1 -1
- package/dist/esm/validation/functions/validate-boolean.function.js +17 -12
- package/dist/esm/validation/functions/validate-boolean.function.js.map +1 -1
- package/dist/esm/validation/functions/validate-date.function.js +19 -16
- package/dist/esm/validation/functions/validate-date.function.js.map +1 -1
- package/dist/esm/validation/functions/validate-file.function.js +19 -19
- package/dist/esm/validation/functions/validate-file.function.js.map +1 -1
- package/dist/esm/validation/functions/validate-number.function.js +44 -15
- package/dist/esm/validation/functions/validate-number.function.js.map +1 -1
- package/dist/esm/validation/functions/validate-string.function.js +24 -10
- package/dist/esm/validation/functions/validate-string.function.js.map +1 -1
- package/dist/esm/validation/validation-problem.model.js +18 -10
- package/dist/esm/validation/validation-problem.model.js.map +1 -1
- package/dist/esm/validation/validation-service.interface.js +2 -1
- package/dist/esm/validation/validation.service.js +105 -119
- package/dist/esm/validation/validation.service.js.map +1 -1
- package/dist/esm/websocket/decorators/current-websocket-connection.decorator.js +7 -4
- package/dist/esm/websocket/decorators/current-websocket-connection.decorator.js.map +1 -1
- package/dist/esm/websocket/decorators/websocket-body.decorator.js +11 -8
- package/dist/esm/websocket/decorators/websocket-body.decorator.js.map +1 -1
- package/dist/esm/websocket/decorators/websocket-controller.decorator.js +10 -7
- package/dist/esm/websocket/decorators/websocket-controller.decorator.js.map +1 -1
- package/dist/esm/websocket/decorators/websocket-route.decorator.js +8 -5
- package/dist/esm/websocket/decorators/websocket-route.decorator.js.map +1 -1
- package/dist/esm/websocket/models/connection/base-websocket-connection.model.js +2 -1
- package/dist/esm/websocket/models/connection/socket-io-websocket-connection.model.js +7 -3
- package/dist/esm/websocket/models/connection/socket-io-websocket-connection.model.js.map +1 -1
- package/dist/esm/websocket/models/websocket-channel.model.js +12 -9
- package/dist/esm/websocket/models/websocket-channel.model.js.map +1 -1
- package/dist/esm/websocket/models/websocket-controller-route-configuration.model.js +2 -1
- package/dist/esm/websocket/models/websocket-event.enum.js +5 -2
- package/dist/esm/websocket/models/websocket-event.enum.js.map +1 -1
- package/dist/esm/websocket/models/websocket-message.model.js +30 -26
- package/dist/esm/websocket/models/websocket-message.model.js.map +1 -1
- package/dist/esm/websocket/models/websocket-options.model.js +2 -1
- package/dist/esm/websocket/models/websocket-request.model.js +10 -6
- package/dist/esm/websocket/models/websocket-request.model.js.map +1 -1
- package/dist/esm/websocket/models/websocket-response.model.js +2 -1
- package/dist/esm/websocket/services/websocket-service.interface.js +2 -1
- package/dist/esm/websocket/services/websocket.service.js +131 -121
- package/dist/esm/websocket/services/websocket.service.js.map +1 -1
- package/package.json +30 -28
- package/src/__testing__/constants.ts +7 -1
- package/src/__testing__/test-server/create-test-data-source.function.ts +11 -1
- package/src/__testing__/test-server/providers.ts +12 -2
- package/src/__testing__/test-server/start-test-server.function.ts +23 -4
- package/src/__testing__/test-server/user-repository.ts +1 -1
- package/src/application-options.model.ts +39 -0
- package/src/application.ts +72 -6
- package/src/assets/asset.service.ts +0 -6
- package/src/auth/2fa/methods/otp/otp.two-factor-method.ts +6 -6
- package/src/auth/2fa/methods/two-factor-method.interface.ts +3 -3
- package/src/auth/2fa/two-factor-service.interface.ts +3 -3
- package/src/auth/2fa/two-factor.service.ts +8 -4
- package/src/auth/auth-service.interface.ts +11 -7
- package/src/auth/auth.service.ts +28 -20
- package/src/auth/encryption/encryption-key.model.ts +51 -0
- package/src/auth/encryption/encryption-master-options.model.ts +41 -0
- package/src/auth/encryption/encryption-service.interface.ts +87 -0
- package/src/auth/encryption/encryption.service.test.ts +67 -0
- package/src/auth/encryption/encryption.service.ts +695 -0
- package/src/auth/encryption/encryption.utilities.ts +65 -0
- package/src/auth/encryption/strategies/aes-gcm.encryption-strategy.ts +115 -0
- package/src/auth/encryption/strategies/encryption-strategy-entity.model.ts +52 -0
- package/src/auth/encryption/strategies/encryption-strategy.interface.ts +67 -0
- package/src/auth/hash/hash-service.interface.ts +39 -0
- package/src/auth/hash/hash.service.test.ts +60 -0
- package/src/auth/hash/hash.service.ts +164 -0
- package/src/auth/hash/hash.utilities.ts +60 -0
- package/src/auth/hash/strategies/bcrypt.hash-strategy.ts +39 -0
- package/src/auth/hash/strategies/hash-strategy-entity.model.ts +40 -0
- package/src/auth/hash/strategies/hash-strategy.interface.ts +23 -0
- package/src/auth/strategies/auth-strategy.interface.ts +11 -6
- package/src/auth/strategies/cookie/cookie-auth-confirm-password-reset-data.model.ts +23 -0
- package/src/auth/strategies/cookie/cookie-auth-credentials.model.ts +56 -0
- package/src/auth/strategies/cookie/cookie-auth-data.model.ts +32 -0
- package/src/auth/strategies/cookie/cookie-auth-logout-data.model.ts +22 -0
- package/src/auth/strategies/cookie/cookie-auth-refresh-login-data.model.ts +11 -0
- package/src/auth/strategies/cookie/cookie-auth-refresh-session.model.ts +46 -0
- package/src/auth/strategies/cookie/cookie-auth-request-password-reset-data.model.ts +28 -0
- package/src/auth/strategies/cookie/cookie-auth-session-cleanup.cron-job.ts +35 -0
- package/src/auth/strategies/cookie/cookie-auth-session.model.ts +34 -0
- package/src/auth/strategies/cookie/cookie-auth.auth-strategy.ts +561 -0
- package/src/auth/strategies/cookie/cookie-auth.controller.ts +182 -0
- package/src/auth/strategies/jwt/jwt-auth.controller.ts +42 -10
- package/src/auth/strategies/jwt/jwt-confirm-password-reset-data.model.ts +5 -0
- package/src/auth/strategies/jwt/jwt-credentials.model.ts +11 -4
- package/src/auth/strategies/jwt/jwt-refresh-login-data.model.ts +5 -0
- package/src/auth/strategies/jwt/jwt-refresh-token-cleanup.cron-job.ts +31 -0
- package/src/auth/strategies/jwt/jwt-request-password-reset-data.model.ts +6 -1
- package/src/auth/strategies/jwt/jwt.auth-strategy.ts +83 -64
- package/src/backup/backup.service.ts +2 -1
- package/src/backup/transports/fs.backup-transport.ts +3 -2
- package/src/caching/cache/base-cache.model.ts +333 -0
- package/src/caching/cache/cache-operation.enum.ts +9 -0
- package/src/caching/cache/cache-options.model.ts +121 -0
- package/src/caching/cache/cache.interface.ts +133 -0
- package/src/caching/cache/multi-tier.cache.test.ts +150 -0
- package/src/caching/cache/multi-tier.cache.ts +298 -0
- package/src/caching/cache/read-aside/read-aside.cache.ts +99 -0
- package/src/caching/cache/read-aside/write-around-read-aside.cache.ts +52 -0
- package/src/caching/cache/read-aside/write-behind-read-aside.cache.ts +95 -0
- package/src/caching/cache/read-aside/write-invalidate-read-aside-args-only.cache.ts +84 -0
- package/src/caching/cache/read-aside/write-invalidate-read-aside-with-result.cache.ts +84 -0
- package/src/caching/cache/read-aside/write-through-read-aside.cache.ts +86 -0
- package/src/caching/cache/read-through/read-through.cache.ts +104 -0
- package/src/caching/cache/read-through/write-around-read-through.cache.ts +51 -0
- package/src/caching/cache/read-through/write-behind-read-through.cache.ts +99 -0
- package/src/caching/cache/read-through/write-invalidate-read-through-args-only.cache.ts +86 -0
- package/src/caching/cache/read-through/write-invalidate-read-through-with-result.cache.ts +85 -0
- package/src/caching/cache/read-through/write-through-read-through.cache.test.ts +520 -0
- package/src/caching/cache/read-through/write-through-read-through.cache.ts +77 -0
- package/src/caching/cache-metrics.model.ts +57 -0
- package/src/caching/cache-service.interface.ts +15 -0
- package/src/caching/cache-tag-matchers.test.ts +114 -0
- package/src/caching/cache-tag-matchers.ts +31 -0
- package/src/caching/cache.service.test.ts +211 -0
- package/src/caching/cache.service.ts +69 -0
- package/src/caching/decorators/cache-delete.decorator.ts +46 -0
- package/src/caching/decorators/cache-invalidate.decorator.ts +43 -0
- package/src/caching/decorators/cache-write.decorator.ts +60 -0
- package/src/caching/decorators/cache.decorator.ts +20 -0
- package/src/caching/decorators/cached.decorator.ts +52 -0
- package/src/caching/decorators/decorator-types.ts +20 -0
- package/src/caching/store/cache-store.interface.ts +59 -0
- package/src/caching/store/cached-value.model.ts +27 -0
- package/src/caching/store/in-memory.cache-store.test.ts +120 -0
- package/src/caching/store/in-memory.cache-store.ts +272 -0
- package/src/change-sets/change-set-repository.ts +85 -53
- package/src/change-sets/models/change-set.model.ts +3 -3
- package/src/change-sets/models/change.model.ts +1 -1
- package/src/change-sets/soft-delete-repository.ts +19 -8
- package/src/context/als.utilities.ts +84 -0
- package/src/context/base-context.ts +12 -0
- package/src/context/request/http-request.context.test.ts +93 -0
- package/src/context/request/http-request.context.ts +44 -0
- package/src/context/request/request-context-token.model.ts +110 -0
- package/src/context/request/websocket-request.context.ts +43 -0
- package/src/cron/cron-expression.utilities.ts +238 -0
- package/src/cron/cron-job-entity.model.ts +2 -1
- package/src/cron/cron-job.model.ts +10 -11
- package/src/cron/cron-service.interface.ts +2 -1
- package/src/cron/cron.service.ts +5 -3
- package/src/data-source/cascade-delete.test.ts +15 -40
- package/src/data-source/data-sources/data-source.interface.ts +10 -2
- package/src/data-source/data-sources/postgres-data-source.model.ts +34 -10
- package/src/data-source/exclude-property.test.ts +383 -0
- package/src/data-source/hooks/before-return.ts +7 -0
- package/src/data-source/hooks/before-save.ts +16 -0
- package/src/data-source/hooks/hooks.default.ts +43 -0
- package/src/data-source/migration/migration.test.ts +15 -2
- package/src/data-source/models/where/number-where-filter.model.ts +8 -8
- package/src/data-source/models/where/where-filter-to-find-options-where-function.test.ts +2 -1
- package/src/data-source/models/where/where-filter-to-find-options-where.function.ts +24 -18
- package/src/data-source/models/where/where-filter.model.ts +15 -13
- package/src/data-source/repository.test.ts +10 -34
- package/src/data-source/repository.ts +70 -118
- package/src/di/decorators/inject-repository.decorator.ts +1 -1
- package/src/di/default/zibri-di-providers.default.ts +76 -7
- package/src/di/default/zibri-di-tokens.default.ts +42 -6
- package/src/di/di-container.ts +9 -7
- package/src/di/models/di-provider.model.ts +12 -0
- package/src/email/email.service.ts +3 -1
- package/src/email/send-queued-emails.cron-job.ts +2 -1
- package/src/entity/decorators/property.decorator.ts +73 -27
- package/src/entity/generation/generate-entity-file.function.ts +4 -3
- package/src/entity/generation/generate-entity-files.function.ts +3 -2
- package/src/entity/generation/providers/open-api-file.provider.ts +2 -1
- package/src/entity/models/array-property-metadata.model.ts +2 -2
- package/src/entity/models/base-property-metadata.model.ts +30 -6
- package/src/entity/models/file-property-metadata.model.ts +5 -5
- package/src/entity/models/number-property-metadata.model.ts +12 -0
- package/src/entity/models/string-property-metadata.model.ts +97 -3
- package/src/error-handling/errors/validation.error.ts +3 -2
- package/src/error-handling/unknown-to-error-string.function.ts +2 -1
- package/src/event/event-cleanup.cron-job.ts +43 -0
- package/src/event/event-processing.error.ts +16 -0
- package/src/event/event-service.interface.ts +62 -0
- package/src/event/event-subscriber-run.model.ts +43 -0
- package/src/event/event.model.ts +66 -0
- package/src/event/event.service.ts +252 -0
- package/src/global/global-registry.ts +5 -0
- package/src/global/model-registry/decrypt-encryption-properties.function.ts +102 -0
- package/src/global/model-registry/default-descriptor.ts +104 -0
- package/src/global/model-registry/encrypt-encryption-properties.function.ts +108 -0
- package/src/global/model-registry/encryption-descriptor.ts +109 -0
- package/src/global/model-registry/exclude-descriptor.ts +107 -0
- package/src/global/model-registry/hash-descriptor.ts +109 -0
- package/src/global/model-registry/hash-hash-properties.function.ts +66 -0
- package/src/global/model-registry/model.registry.ts +79 -0
- package/src/global/model-registry/remove-exclude-properties.function.ts +76 -0
- package/src/global/model-registry/restore-exclude-properties.function.ts +54 -0
- package/src/global/model-registry/set-default-values.function.ts +56 -0
- package/src/handlebars/handlebar.utilities.ts +2 -1
- package/src/handlebars/resolve-all-array-keys.function.ts +2 -1
- package/src/handlebars/resolve-keys-for-block-statement.function.ts +5 -4
- package/src/http/cookie-options.model.ts +11 -0
- package/src/http/http-request.model.ts +7 -2
- package/src/http/known-header.enum.ts +30 -26
- package/src/http/mime-type.enum.ts +48 -9
- package/src/http/mime-type.helpers.ts +95 -24
- package/src/http-client/http-client.interface.ts +3 -2
- package/src/http-client/http-client.test.ts +5 -4
- package/src/http-client/http-client.ts +27 -23
- package/src/index.ts +103 -4
- package/src/jest.setup.ts +5 -1
- package/src/localization/formatting/format-price-fn.model.ts +1 -1
- package/src/localization/formatting/format-price.function.ts +1 -0
- package/src/logging/error-to-logged-error.function.ts +2 -1
- package/src/logging/log-cleanup.cron-job.ts +3 -2
- package/src/logging/log-context.model.ts +61 -1
- package/src/logging/log.model.ts +0 -6
- package/src/logging/logger.interface.ts +3 -2
- package/src/logging/logger.ts +42 -12
- package/src/logging/transport/log-to-console.function.ts +2 -2
- package/src/metrics/{scrape-metrics.cron-job.ts → collect-metrics.cron-job.ts} +6 -5
- package/src/metrics/metrics.service.ts +4 -2
- package/src/multithreading/services/multithreading.service.test.ts +32 -68
- package/src/multithreading/services/multithreading.service.ts +3 -2
- package/src/open-api/open-api.service.ts +29 -14
- package/src/parsing/form-data/file-response.model.ts +22 -5
- package/src/parsing/form-data/form-data-body-parser-cleanup.cron-job.ts +2 -1
- package/src/parsing/form-data/form-data.body-parser.ts +13 -12
- package/src/parsing/functions/parse-array.function.ts +2 -1
- package/src/parsing/functions/parse-number.function.ts +23 -0
- package/src/parsing/functions/parse-object.function.ts +2 -1
- package/src/parsing/functions/parse-object.test.ts +2 -1
- package/src/parsing/html/csp-options.model.ts +109 -0
- package/src/parsing/html/html-response.model.ts +25 -5
- package/src/parsing/json/json.body-parser.ts +4 -4
- package/src/plugin/invoicing/services/invoice-calc-service.interface.ts +1 -1
- package/src/plugin/invoicing/services/invoice-calc.service.ts +16 -16
- package/src/plugin/invoicing/services/invoice-pdf.service.ts +1 -0
- package/src/plugin/mailing-list/mailing-list.controller.ts +12 -3
- package/src/plugin/payment/providers/pay-pal/pay-pal.payment-provider.test.ts +2 -1
- package/src/plugin/payment/providers/pay-pal/pay-pal.payment-provider.ts +1 -1
- package/src/preact/collector.ts +124 -40
- package/src/preact/generate-client-scripts.function.ts +6 -5
- package/src/preact/preact.utilities.ts +16 -33
- package/src/rate-limiting/rate-limiter.ts +10 -0
- package/src/routing/decorators/body.decorator.ts +2 -1
- package/src/routing/decorators/param.decorator.ts +12 -6
- package/src/routing/models/array-param-metadata.model.ts +5 -3
- package/src/routing/models/boolean-param-metadata.model.ts +1 -1
- package/src/routing/models/date-param-metadata.model.ts +1 -1
- package/src/routing/models/number-param-metadata.model.ts +4 -1
- package/src/routing/models/object-param-metadata.model.ts +4 -1
- package/src/routing/models/string-param-metadata.model.ts +20 -2
- package/src/routing/param-metdata.helpers.ts +6 -0
- package/src/routing/resolve-route-params.function.ts +79 -37
- package/src/routing/route-configuration.model.ts +6 -3
- package/src/routing/router.ts +164 -118
- package/src/types/any-enum.type.ts +1 -1
- package/src/types/deep-partial.type.ts +13 -10
- package/src/types/percentage.type.ts +1 -1
- package/src/utilities/bytes.ts +20 -0
- package/src/utilities/doubly-linked-list.ts +132 -0
- package/src/utilities/is-numeric.function.ts +4 -2
- package/src/utilities/json.utilities.ts +37 -0
- package/src/utilities/metadata-injection-keys.enum.ts +2 -1
- package/src/utilities/ms.ts +8 -0
- package/src/utilities/now-in-ns.function.ts +13 -0
- package/src/utilities/{big-number.utilities.ts → number.utilities.ts} +16 -6
- package/src/utilities/promise.utilities.ts +5 -5
- package/src/validation/functions/validate-boolean.function.ts +15 -17
- package/src/validation/functions/validate-date.function.ts +13 -17
- package/src/validation/functions/validate-file.function.ts +12 -17
- package/src/validation/functions/validate-number.function.ts +43 -20
- package/src/validation/functions/validate-string.function.ts +20 -7
- package/src/validation/validation-service.interface.ts +5 -5
- package/src/validation/validation.service.ts +78 -84
- package/src/websocket/services/websocket.service.ts +73 -68
- package/dist/cjs/auth/hash.utilities.d.ts +0 -19
- package/dist/cjs/auth/hash.utilities.d.ts.map +0 -1
- package/dist/cjs/auth/hash.utilities.js +0 -28
- package/dist/cjs/auth/hash.utilities.js.map +0 -1
- package/dist/cjs/metrics/scrape-metrics.cron-job.d.ts.map +0 -1
- package/dist/cjs/metrics/scrape-metrics.cron-job.js.map +0 -1
- package/dist/cjs/routing/request.context.d.ts +0 -15
- package/dist/cjs/routing/request.context.d.ts.map +0 -1
- package/dist/cjs/routing/request.context.js +0 -25
- package/dist/cjs/routing/request.context.js.map +0 -1
- package/dist/cjs/utilities/big-number.utilities.d.ts.map +0 -1
- package/dist/cjs/utilities/big-number.utilities.js.map +0 -1
- package/dist/esm/auth/hash.utilities.js +0 -24
- package/dist/esm/auth/hash.utilities.js.map +0 -1
- package/dist/esm/metrics/scrape-metrics.cron-job.js.map +0 -1
- package/dist/esm/routing/request.context.js +0 -21
- package/dist/esm/routing/request.context.js.map +0 -1
- package/dist/esm/utilities/big-number.utilities.js +0 -42
- package/dist/esm/utilities/big-number.utilities.js.map +0 -1
- package/src/auth/hash.utilities.ts +0 -24
- package/src/routing/request.context.ts +0 -35
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isDeepStrictEqual } from 'util';
|
|
1
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
3
2
|
|
|
4
3
|
import { Repository as TORepository } from 'typeorm';
|
|
5
4
|
|
|
@@ -7,7 +6,13 @@ import { AuthServiceInterface } from '../auth/auth-service.interface';
|
|
|
7
6
|
import { ChangeSetEntity } from './models/change-set-entity.model';
|
|
8
7
|
import { ChangeSetType } from './models/change-set-type.enum';
|
|
9
8
|
import { ChangeSet, CreateChangeSetData } from './models/change-set.model';
|
|
9
|
+
import { NewChange } from './models/change.model';
|
|
10
10
|
import { BaseUser } from '../auth/models/base-user.model';
|
|
11
|
+
import { HttpRequestContext } from '../context/request/http-request.context';
|
|
12
|
+
import { WebsocketRequestContext } from '../context/request/websocket-request.context';
|
|
13
|
+
import { DataSourceInterface } from '../data-source/data-sources/data-source.interface';
|
|
14
|
+
import { BeforeReturnHook } from '../data-source/hooks/before-return';
|
|
15
|
+
import { BeforeSaveHook } from '../data-source/hooks/before-save';
|
|
11
16
|
import { BaseRepositoryOptions } from '../data-source/models/options/base-repository-options.model';
|
|
12
17
|
import { CreateAllOptions } from '../data-source/models/options/create-all-options.model';
|
|
13
18
|
import { CreateOptions } from '../data-source/models/options/create-options.model';
|
|
@@ -20,14 +25,16 @@ import { ZIBRI_DI_TOKENS } from '../di/default/zibri-di-tokens.default';
|
|
|
20
25
|
import { inject } from '../di/inject.function';
|
|
21
26
|
import { PropertyMetadata } from '../entity/decorators/property.decorator';
|
|
22
27
|
import { BadRequestError } from '../error-handling/errors/bad-request.error';
|
|
23
|
-
import {
|
|
28
|
+
import { removeExcludeProperties } from '../global/model-registry/remove-exclude-properties.function';
|
|
29
|
+
import { restoreExcludeProperties } from '../global/model-registry/restore-exclude-properties.function';
|
|
24
30
|
import { LoggerInterface } from '../logging/logger.interface';
|
|
31
|
+
import { DeepPartial } from '../types/deep-partial.type';
|
|
25
32
|
import { Newable } from '../types/newable.type';
|
|
33
|
+
import { JsonUtilities } from '../utilities/json.utilities';
|
|
26
34
|
import { MetadataUtilities } from '../utilities/metadata.utilities';
|
|
35
|
+
import { nowInNs } from '../utilities/now-in-ns.function';
|
|
27
36
|
import { ObjectUtilities } from '../utilities/object.utilities';
|
|
28
37
|
import { PromiseUtilities } from '../utilities/promise.utilities';
|
|
29
|
-
import { NewChange } from './models/change.model';
|
|
30
|
-
import { DeepPartial } from '../types/deep-partial.type';
|
|
31
38
|
|
|
32
39
|
/**
|
|
33
40
|
* The result for resetting a change set on an entity.
|
|
@@ -55,22 +62,29 @@ export class ChangeSetRepository<
|
|
|
55
62
|
/**
|
|
56
63
|
* Any keys that should be excluded from the change set.
|
|
57
64
|
*/
|
|
58
|
-
protected readonly keysToExcludeFromChangeSets:
|
|
65
|
+
protected readonly keysToExcludeFromChangeSets: Set<keyof T> = new Set();
|
|
59
66
|
|
|
60
67
|
private readonly changeSetRepository: Repository<ChangeSet, CreateChangeSetData>;
|
|
61
68
|
private readonly authService: AuthServiceInterface;
|
|
62
69
|
|
|
63
|
-
constructor(
|
|
64
|
-
|
|
70
|
+
constructor(
|
|
71
|
+
entityClass: Newable<T>,
|
|
72
|
+
repo: TORepository<T> | Repository<T>,
|
|
73
|
+
logger: LoggerInterface,
|
|
74
|
+
dataSource: DataSourceInterface,
|
|
75
|
+
beforeSave: BeforeSaveHook<T, CreateData, UpdateData>,
|
|
76
|
+
beforeReturn: BeforeReturnHook<T>
|
|
77
|
+
) {
|
|
78
|
+
super(entityClass, repo, logger, dataSource, beforeSave, beforeReturn);
|
|
65
79
|
|
|
66
80
|
this.authService = inject(ZIBRI_DI_TOKENS.AUTH_SERVICE);
|
|
67
81
|
this.changeSetRepository = inject(repositoryTokenFor(ChangeSet));
|
|
68
82
|
|
|
69
|
-
this.keysToExcludeFromChangeSets
|
|
83
|
+
this.keysToExcludeFromChangeSets.add('changeSets');
|
|
70
84
|
const props: Record<string, PropertyMetadata> = MetadataUtilities.getModelProperties(entityClass);
|
|
71
85
|
for (const [key, m] of ObjectUtilities.entries(props)) {
|
|
72
86
|
if (m.excludeFromChangeSets) {
|
|
73
|
-
this.keysToExcludeFromChangeSets.
|
|
87
|
+
this.keysToExcludeFromChangeSets.add(key as keyof T);
|
|
74
88
|
}
|
|
75
89
|
}
|
|
76
90
|
}
|
|
@@ -191,7 +205,7 @@ export class ChangeSetRepository<
|
|
|
191
205
|
* Rolls back all changes on the given entity that have happened since the given change set.
|
|
192
206
|
* This DOES NOT preserve any changes that happened after the change set.
|
|
193
207
|
* The given change set and any change sets after that will be deleted in the end.
|
|
194
|
-
* Calls
|
|
208
|
+
* Calls rollbackToTimestamp on the change set timestamp internally.
|
|
195
209
|
* @param entity - The entity to rollback.
|
|
196
210
|
* @param changeSetId - The id of the changeSet to rollback to.
|
|
197
211
|
* @param createChangeSet - Whether or not a change set should be created.
|
|
@@ -208,14 +222,14 @@ export class ChangeSetRepository<
|
|
|
208
222
|
options?: BaseRepositoryOptions
|
|
209
223
|
): Promise<T> {
|
|
210
224
|
const changeSet: ChangeSet = await this.changeSetRepository.findById(changeSetId, options);
|
|
211
|
-
return this.
|
|
225
|
+
return this.rollbackToTimestamp(entity, changeSet.createdAt, createChangeSet, preserveCreateChangeSet, options);
|
|
212
226
|
}
|
|
213
227
|
|
|
214
228
|
/**
|
|
215
229
|
* Rolls back all changes on the entity with the given id that have happened since the given change set.
|
|
216
230
|
* This DOES NOT preserve any changes that happened after the change set.
|
|
217
231
|
* The given change set and any change sets after that will be deleted in the end.
|
|
218
|
-
* Calls
|
|
232
|
+
* Calls rollbackToTimestampById on the change set timestamp internally.
|
|
219
233
|
* @param id - The id of the entity to rollback.
|
|
220
234
|
* @param changeSetId - The id of the changeSet to rollback to.
|
|
221
235
|
* @param createChangeSet - Whether or not a change set should be created.
|
|
@@ -237,30 +251,30 @@ export class ChangeSetRepository<
|
|
|
237
251
|
'Could not rollback to the given change set: The changeSet doesn\'t belong to the entity with the given id.'
|
|
238
252
|
);
|
|
239
253
|
}
|
|
240
|
-
return this.
|
|
254
|
+
return this.rollbackToTimestampById(id, changeSet.createdAt, createChangeSet, preserveCreateChangeSet, options);
|
|
241
255
|
}
|
|
242
256
|
|
|
243
257
|
/**
|
|
244
|
-
* Rolls back all changes on the given entity that have happened since the given
|
|
245
|
-
* This DOES NOT preserve any changes that happened after the
|
|
246
|
-
* Any change sets after the given
|
|
258
|
+
* Rolls back all changes on the given entity that have happened since the given timestamp.
|
|
259
|
+
* This DOES NOT preserve any changes that happened after the timestamp.
|
|
260
|
+
* Any change sets after the given timestamp will be deleted in the end.
|
|
247
261
|
* @param entity - The entity to rollback.
|
|
248
|
-
* @param
|
|
262
|
+
* @param timestampInNs - The timestamp to which the rollback should happen with nanosecond precision.
|
|
249
263
|
* @param createChangeSet - Whether or not a change set should be created.
|
|
250
264
|
* @param preserveCreateChangeSet - Whether or not create change sets should be preserved.
|
|
251
265
|
* In that case the entity gets reset to the state after the create change set. Also, the create change set isn't deleted.
|
|
252
266
|
* @param options - Additional options, eg. Transaction.
|
|
253
267
|
* @returns The updated entity.
|
|
254
268
|
*/
|
|
255
|
-
async
|
|
269
|
+
async rollbackToTimestamp(
|
|
256
270
|
entity: T,
|
|
257
|
-
|
|
271
|
+
timestampInNs: bigint,
|
|
258
272
|
createChangeSet: boolean = true,
|
|
259
273
|
preserveCreateChangeSet: boolean = true,
|
|
260
274
|
options?: BaseRepositoryOptions
|
|
261
275
|
): Promise<T> {
|
|
262
276
|
const changeSets: ChangeSet[] = await this.changeSetRepository.findAll({
|
|
263
|
-
where: { changeSetEntityId: entity.id, createdAt: {
|
|
277
|
+
where: { changeSetEntityId: entity.id, createdAt: { greaterThan: timestampInNs } },
|
|
264
278
|
relations: ['changes'],
|
|
265
279
|
order: { createdAt: 'ASC' }
|
|
266
280
|
});
|
|
@@ -282,33 +296,33 @@ export class ChangeSetRepository<
|
|
|
282
296
|
}
|
|
283
297
|
|
|
284
298
|
/**
|
|
285
|
-
* Rolls back all changes on the entity with the given id that have happened since the given
|
|
286
|
-
* This DOES NOT preserve any changes that happened after the
|
|
287
|
-
* Any change sets after the given
|
|
299
|
+
* Rolls back all changes on the entity with the given id that have happened since the given timestamp.
|
|
300
|
+
* This DOES NOT preserve any changes that happened after the timestamp.
|
|
301
|
+
* Any change sets after the given timestamp will be deleted in the end.
|
|
288
302
|
* @param id - The id of the entity to rollback.
|
|
289
|
-
* @param
|
|
303
|
+
* @param timestampInNs - The timestamp to which the rollback should happen with nanosecond precision.
|
|
290
304
|
* @param createChangeSet - Whether or not a change set should be created.
|
|
291
305
|
* @param preserveCreateChangeSet - Whether or not create change sets should be preserved.
|
|
292
306
|
* In that case the entity gets reset to the state after the create change set. Also, the create change set isn't deleted.
|
|
293
307
|
* @param options - Additional options, eg. Transaction.
|
|
294
308
|
* @returns The updated entity.
|
|
295
309
|
*/
|
|
296
|
-
async
|
|
310
|
+
async rollbackToTimestampById(
|
|
297
311
|
id: T['id'],
|
|
298
|
-
|
|
312
|
+
timestampInNs: bigint,
|
|
299
313
|
createChangeSet: boolean = true,
|
|
300
314
|
preserveCreateChangeSet: boolean = true,
|
|
301
315
|
options?: BaseRepositoryOptions
|
|
302
316
|
): Promise<T> {
|
|
303
317
|
const entity: T = await this.findById(id, options);
|
|
304
|
-
return this.
|
|
318
|
+
return this.rollbackToTimestamp(entity, timestampInNs, createChangeSet, preserveCreateChangeSet, options);
|
|
305
319
|
}
|
|
306
320
|
|
|
307
321
|
/**
|
|
308
|
-
* Rolls back all changes on the entities found with the given where filter to the state of the given
|
|
309
|
-
* This DOES NOT preserve any changes that happened after the
|
|
310
|
-
* Any change sets after the given
|
|
311
|
-
* @param
|
|
322
|
+
* Rolls back all changes on the entities found with the given where filter to the state of the given timestamp.
|
|
323
|
+
* This DOES NOT preserve any changes that happened after the timestamp.
|
|
324
|
+
* Any change sets after the given timestamp will be deleted in the end.
|
|
325
|
+
* @param timestampInNs - The timestamp to which the rollback should happen with nanosecond precision.
|
|
312
326
|
* @param where - A filter to only rollback some entities.
|
|
313
327
|
* @param createChangeSet - Whether or not a change set should be created.
|
|
314
328
|
* @param preserveCreateChangeSet - Whether or not create change sets should be preserved.
|
|
@@ -316,8 +330,8 @@ export class ChangeSetRepository<
|
|
|
316
330
|
* @param options - Additional options, eg. Transaction.
|
|
317
331
|
* @returns The updated entity.
|
|
318
332
|
*/
|
|
319
|
-
async
|
|
320
|
-
|
|
333
|
+
async rollbackAllToTimestamp(
|
|
334
|
+
timestampInNs: bigint,
|
|
321
335
|
where?: Where<T>,
|
|
322
336
|
createChangeSet: boolean = true,
|
|
323
337
|
preserveCreateChangeSet: boolean = true,
|
|
@@ -326,7 +340,7 @@ export class ChangeSetRepository<
|
|
|
326
340
|
const entitiesToRollback: T[] = await this.findAll({ where: where, ...options });
|
|
327
341
|
await PromiseUtilities.allChunked(
|
|
328
342
|
entitiesToRollback,
|
|
329
|
-
e => this.
|
|
343
|
+
e => this.rollbackToTimestamp(e, timestampInNs, createChangeSet, preserveCreateChangeSet, options)
|
|
330
344
|
);
|
|
331
345
|
return entitiesToRollback.length;
|
|
332
346
|
}
|
|
@@ -347,17 +361,25 @@ export class ChangeSetRepository<
|
|
|
347
361
|
options?: CreateOptions,
|
|
348
362
|
force: boolean = false
|
|
349
363
|
): Promise<void> {
|
|
350
|
-
|
|
364
|
+
restoreExcludeProperties(entityPriorChanges, this.entityClass);
|
|
365
|
+
restoreExcludeProperties(data, this.entityClass);
|
|
366
|
+
const changes: NewChange[] = this.getChangesFromData(entityPriorChanges, data, type);
|
|
367
|
+
await Promise.all([
|
|
368
|
+
removeExcludeProperties(entityPriorChanges, this.entityClass),
|
|
369
|
+
removeExcludeProperties(data, this.entityClass)
|
|
370
|
+
]);
|
|
371
|
+
|
|
372
|
+
if (!force && !changes.length) {
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
|
|
351
376
|
const changeSetData: CreateChangeSetData = {
|
|
352
377
|
changeSetEntityId: entityPriorChanges.id,
|
|
353
378
|
type: type,
|
|
354
|
-
createdAt:
|
|
379
|
+
createdAt: nowInNs(),
|
|
355
380
|
createdBy: await this.getCreatedBy(),
|
|
356
|
-
changes
|
|
381
|
+
changes
|
|
357
382
|
};
|
|
358
|
-
if (!force && !changeSetData.changes.length) {
|
|
359
|
-
return;
|
|
360
|
-
}
|
|
361
383
|
await this.changeSetRepository.create(changeSetData, options);
|
|
362
384
|
}
|
|
363
385
|
|
|
@@ -378,13 +400,23 @@ export class ChangeSetRepository<
|
|
|
378
400
|
force: boolean = false
|
|
379
401
|
): Promise<void> {
|
|
380
402
|
const userId: string | undefined = await this.getCreatedBy();
|
|
381
|
-
|
|
382
|
-
let changeSetData: CreateChangeSetData[] = entitiesPriorChanges.map((e, i) =>
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
403
|
+
|
|
404
|
+
let changeSetData: CreateChangeSetData[] = await Promise.all(entitiesPriorChanges.map(async (e, i) => {
|
|
405
|
+
restoreExcludeProperties(e, this.entityClass);
|
|
406
|
+
restoreExcludeProperties(data[i], this.entityClass);
|
|
407
|
+
const changes: NewChange[] = this.getChangesFromData(e, data[i], type);
|
|
408
|
+
await Promise.all([
|
|
409
|
+
removeExcludeProperties(e, this.entityClass),
|
|
410
|
+
removeExcludeProperties(data[i], this.entityClass)
|
|
411
|
+
]);
|
|
412
|
+
|
|
413
|
+
return {
|
|
414
|
+
changeSetEntityId: e.id,
|
|
415
|
+
type,
|
|
416
|
+
createdAt: nowInNs(),
|
|
417
|
+
createdByUserId: userId,
|
|
418
|
+
changes
|
|
419
|
+
};
|
|
388
420
|
}));
|
|
389
421
|
if (!force) {
|
|
390
422
|
changeSetData = changeSetData.filter(d => d.changes.length);
|
|
@@ -423,12 +455,12 @@ export class ChangeSetRepository<
|
|
|
423
455
|
* @returns The id of the currently logged in user or undefined if that didn't work.
|
|
424
456
|
*/
|
|
425
457
|
protected async getCreatedBy(): Promise<string | undefined> {
|
|
426
|
-
const
|
|
427
|
-
if (!
|
|
458
|
+
const context: HttpRequestContext | WebsocketRequestContext | undefined = inject(ZIBRI_DI_TOKENS.CURRENT_REQUEST_CONTEXT);
|
|
459
|
+
if (!context) {
|
|
428
460
|
throw new Error('No request in context');
|
|
429
461
|
}
|
|
430
462
|
const user: BaseUser<string> | undefined = await this.authService.getCurrentUser(
|
|
431
|
-
|
|
463
|
+
context,
|
|
432
464
|
this.authService.strategies,
|
|
433
465
|
false
|
|
434
466
|
);
|
|
@@ -445,7 +477,7 @@ export class ChangeSetRepository<
|
|
|
445
477
|
): (keyof (CreateData | UpdateData | DeepPartial<T>))[] {
|
|
446
478
|
const keys: (keyof (CreateData | UpdateData | DeepPartial<T>))[] = [];
|
|
447
479
|
for (const key in data) {
|
|
448
|
-
if (!this.keysToExcludeFromChangeSets.
|
|
480
|
+
if (!this.keysToExcludeFromChangeSets.has(key as keyof T)) {
|
|
449
481
|
keys.push(key as keyof (CreateData | UpdateData | DeepPartial<T>));
|
|
450
482
|
}
|
|
451
483
|
}
|
|
@@ -465,7 +497,7 @@ export class ChangeSetRepository<
|
|
|
465
497
|
): boolean {
|
|
466
498
|
return !(
|
|
467
499
|
isDeepStrictEqual(previousValue, newValue)
|
|
468
|
-
||
|
|
500
|
+
|| JsonUtilities.stringify(previousValue) === JsonUtilities.stringify(newValue)
|
|
469
501
|
);
|
|
470
502
|
}
|
|
471
503
|
}
|
|
@@ -18,10 +18,10 @@ export class ChangeSet extends BaseEntity {
|
|
|
18
18
|
@Property.string({ enum: ChangeSetType })
|
|
19
19
|
type!: ChangeSetType;
|
|
20
20
|
/**
|
|
21
|
-
* The time at which the change happened.
|
|
21
|
+
* The time at which the change happened with nanosecond precision.
|
|
22
22
|
*/
|
|
23
|
-
@Property.
|
|
24
|
-
createdAt!:
|
|
23
|
+
@Property.number({ format: 'bigint' })
|
|
24
|
+
createdAt!: bigint;
|
|
25
25
|
/**
|
|
26
26
|
* The id of the user that changed something.
|
|
27
27
|
*/
|
|
@@ -27,7 +27,7 @@ export class Change<T = unknown> extends BaseEntity {
|
|
|
27
27
|
/**
|
|
28
28
|
* The change set that this change belongs to.
|
|
29
29
|
*/
|
|
30
|
-
@Property.manyToOne({ target: () => ChangeSet, inverseSide: 'changes'
|
|
30
|
+
@Property.manyToOne({ target: () => ChangeSet, inverseSide: 'changes' })
|
|
31
31
|
changeSet!: ChangeSet;
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -16,6 +16,9 @@ import { SoftDeleteFindOneOptions } from './models/soft-delete-find-one-options.
|
|
|
16
16
|
import { SoftDeleteUpdateAllOptions } from './models/soft-delete-update-all-options.model';
|
|
17
17
|
import { SoftDeleteUpdateByIdOptions } from './models/soft-delete-update-by-id-options.model';
|
|
18
18
|
import { SoftDeleteWhere } from './models/soft-delete-where.model';
|
|
19
|
+
import { DataSourceInterface } from '../data-source/data-sources/data-source.interface';
|
|
20
|
+
import { BeforeReturnHook } from '../data-source/hooks/before-return';
|
|
21
|
+
import { BeforeSaveHook } from '../data-source/hooks/before-save';
|
|
19
22
|
import { Where } from '../data-source/models/where/where-filter.model';
|
|
20
23
|
import { NotFoundError } from '../error-handling/errors/not-found.error';
|
|
21
24
|
import { LoggerInterface } from '../logging/logger.interface';
|
|
@@ -51,10 +54,18 @@ export class SoftDeleteRepository<
|
|
|
51
54
|
>
|
|
52
55
|
extends ChangeSetRepository<T, CreateData, UpdateData> {
|
|
53
56
|
|
|
54
|
-
protected override readonly keysToExcludeFromChangeSets:
|
|
55
|
-
|
|
56
|
-
constructor(
|
|
57
|
-
|
|
57
|
+
protected override readonly keysToExcludeFromChangeSets: Set<keyof T> = new Set();
|
|
58
|
+
|
|
59
|
+
constructor(
|
|
60
|
+
entityClass: Newable<T>,
|
|
61
|
+
repo: TORepository<T> | Repository<T>,
|
|
62
|
+
logger: LoggerInterface,
|
|
63
|
+
dataSource: DataSourceInterface,
|
|
64
|
+
beforeSave: BeforeSaveHook<T, CreateData, UpdateData>,
|
|
65
|
+
beforeReturn: BeforeReturnHook<T>
|
|
66
|
+
) {
|
|
67
|
+
super(entityClass, repo, logger, dataSource, beforeSave, beforeReturn);
|
|
68
|
+
this.keysToExcludeFromChangeSets.add('deleted');
|
|
58
69
|
}
|
|
59
70
|
|
|
60
71
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
@@ -129,17 +140,17 @@ export class SoftDeleteRepository<
|
|
|
129
140
|
}
|
|
130
141
|
|
|
131
142
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
132
|
-
async deleteById(id: T['id'], options?: SoftDeleteByIdOptions): Promise<
|
|
143
|
+
async deleteById(id: T['id'], options?: SoftDeleteByIdOptions): Promise<T> {
|
|
133
144
|
if (options?.hardDelete === true) {
|
|
134
|
-
await super.deleteById(id, options);
|
|
135
|
-
return;
|
|
145
|
+
return await super.deleteById(id, options);
|
|
136
146
|
}
|
|
137
147
|
const entity: T = await this.findById(id, options);
|
|
138
148
|
if (entity.deleted) {
|
|
139
149
|
throw new NotFoundError(`Could not find ${this.entityClass.name} with id "${id}".`);
|
|
140
150
|
}
|
|
141
|
-
await this.updateById(id, { deleted: true } as UpdateData, options);
|
|
151
|
+
const res: T = await this.updateById(id, { deleted: true } as UpdateData, options);
|
|
142
152
|
await this.createChangeSet(entity, { deleted: true } as UpdateData, ChangeSetType.DELETE, options, true);
|
|
153
|
+
return res;
|
|
143
154
|
}
|
|
144
155
|
|
|
145
156
|
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
2
|
+
|
|
3
|
+
import { HttpRequestContext } from './request/http-request.context';
|
|
4
|
+
import { WebsocketRequestContext } from './request/websocket-request.context';
|
|
5
|
+
import { LogCacheContext } from '../logging/log-context.model';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Encapsulates functionality around async local storage.
|
|
9
|
+
*/
|
|
10
|
+
export abstract class AlsUtilities {
|
|
11
|
+
private static readonly httpRequest: AsyncLocalStorage<HttpRequestContext> = new AsyncLocalStorage<HttpRequestContext>();
|
|
12
|
+
private static readonly websocketRequest: AsyncLocalStorage<WebsocketRequestContext> = new AsyncLocalStorage<WebsocketRequestContext>();
|
|
13
|
+
private static readonly cacheContext: AsyncLocalStorage<LogCacheContext[]> = new AsyncLocalStorage<LogCacheContext[]>();
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Resolves the currently active request context from the async local storage.
|
|
17
|
+
* @returns The currently active request context.
|
|
18
|
+
* @throws When the async local storage store has not been initialized yet.
|
|
19
|
+
*/
|
|
20
|
+
static getCurrentRequestContext(): HttpRequestContext | WebsocketRequestContext | undefined {
|
|
21
|
+
return this.getCurrentHttpRequestContext() ?? this.getCurrentWebsocketRequestContext();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Runs the given function with the request context saved in async local storage.
|
|
26
|
+
* @param context - The request context.
|
|
27
|
+
* @param fn - The function to run.
|
|
28
|
+
* @returns The result of the function.
|
|
29
|
+
*/
|
|
30
|
+
static runWithHttpRequestContext<T>(context: HttpRequestContext, fn: () => T): T {
|
|
31
|
+
return this.httpRequest.run(context, fn);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Resolves the currently active request context from the async local storage.
|
|
36
|
+
* @returns The currently active http request context.
|
|
37
|
+
* @throws When the async local storage store has not been initialized yet.
|
|
38
|
+
*/
|
|
39
|
+
protected static getCurrentHttpRequestContext(): HttpRequestContext | undefined {
|
|
40
|
+
const store: HttpRequestContext | undefined = this.httpRequest.getStore();
|
|
41
|
+
return store;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Runs the given function with the request context saved in async local storage.
|
|
46
|
+
* @param context - The request context.
|
|
47
|
+
* @param fn - The function to run.
|
|
48
|
+
* @returns The result of the function.
|
|
49
|
+
*/
|
|
50
|
+
static runWithWebsocketRequestContext<T>(context: WebsocketRequestContext, fn: () => T): T {
|
|
51
|
+
return this.websocketRequest.run(context, fn);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Resolves the currently active request context from the async local storage.
|
|
56
|
+
* @returns The currently active websocket request context.
|
|
57
|
+
* @throws When the async local storage store has not been initialized yet.
|
|
58
|
+
*/
|
|
59
|
+
protected static getCurrentWebsocketRequestContext(): WebsocketRequestContext | undefined {
|
|
60
|
+
const store: WebsocketRequestContext | undefined = this.websocketRequest.getStore();
|
|
61
|
+
return store;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Runs the given function with the cache context saved in async local storage.
|
|
66
|
+
* @param context - The cache context.
|
|
67
|
+
* @param fn - The function to run.
|
|
68
|
+
* @returns The result of the function.
|
|
69
|
+
*/
|
|
70
|
+
static runWithCacheContext<T>(context: LogCacheContext, fn: () => T): T {
|
|
71
|
+
const existing: LogCacheContext[] = this.getCurrentCacheContext() ?? [];
|
|
72
|
+
// New array — doesn't mutate the parent scope's array
|
|
73
|
+
return this.cacheContext.run([...existing, context], fn);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Resolves the currently active cache context from the async local storage.
|
|
78
|
+
* @returns The currently active cache context.
|
|
79
|
+
* @throws When the async local storage store has not been initialized yet.
|
|
80
|
+
*/
|
|
81
|
+
static getCurrentCacheContext(): LogCacheContext[] | undefined {
|
|
82
|
+
return this.cacheContext.getStore();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The base context that any context needs to extend from.
|
|
3
|
+
*/
|
|
4
|
+
export abstract class BaseContext<T> {
|
|
5
|
+
abstract readonly type: T;
|
|
6
|
+
/**
|
|
7
|
+
* The cached token values.
|
|
8
|
+
*/
|
|
9
|
+
protected readonly tokenValues: Map<string, unknown> = new Map();
|
|
10
|
+
|
|
11
|
+
constructor() {}
|
|
12
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
|
|
2
|
+
import { afterAll, beforeAll, describe, expect, test } from '@jest/globals';
|
|
3
|
+
|
|
4
|
+
import { RequestContextToken } from './request-context-token.model';
|
|
5
|
+
import { createTestDataSource, defaultTestServerEntities } from '../../__testing__/test-server/create-test-data-source.function';
|
|
6
|
+
import { StartedTestServer, startTestServer } from '../../__testing__/test-server/start-test-server.function';
|
|
7
|
+
import { Repository } from '../../data-source/repository';
|
|
8
|
+
import { InjectRepository } from '../../di/decorators/inject-repository.decorator';
|
|
9
|
+
import { BaseEntity } from '../../entity/base-entity.model';
|
|
10
|
+
import { Entity } from '../../entity/decorators/entity.decorator';
|
|
11
|
+
import { Property } from '../../entity/decorators/property.decorator';
|
|
12
|
+
import { KnownHeader } from '../../http/known-header.enum';
|
|
13
|
+
import { Controller } from '../../routing/decorators/controller.decorator';
|
|
14
|
+
import { Get } from '../../routing/decorators/get.decorator';
|
|
15
|
+
|
|
16
|
+
const CURRENT_USER: RequestContextToken<{ isAdmin: boolean }> = new RequestContextToken(
|
|
17
|
+
'current-user',
|
|
18
|
+
(ctx) => {
|
|
19
|
+
const auth: string | undefined = ctx.request.headers[KnownHeader.AUTHORIZATION];
|
|
20
|
+
return { isAdmin: auth === 'admin' };
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
@Entity()
|
|
25
|
+
class Test extends BaseEntity {
|
|
26
|
+
@Property.string({
|
|
27
|
+
exclude: async (_, ctx) => {
|
|
28
|
+
if (!ctx) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
const { isAdmin } = await ctx.get(CURRENT_USER);
|
|
32
|
+
return !isAdmin;
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
secret!: string;
|
|
36
|
+
|
|
37
|
+
@Property.string({
|
|
38
|
+
default: async (_, ctx) => {
|
|
39
|
+
if (!ctx) {
|
|
40
|
+
throw new Error('Could not find request context when resolving default value for Test.label');
|
|
41
|
+
}
|
|
42
|
+
const { isAdmin } = await ctx.get(CURRENT_USER);
|
|
43
|
+
return isAdmin ? 'admin-default' : 'user-default';
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
label!: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@Controller('/context-test')
|
|
50
|
+
class ContextTestController {
|
|
51
|
+
constructor(
|
|
52
|
+
@InjectRepository(Test)
|
|
53
|
+
private readonly testRepository: Repository<Test>
|
|
54
|
+
) {}
|
|
55
|
+
|
|
56
|
+
@Get('/')
|
|
57
|
+
async get(): Promise<Test> {
|
|
58
|
+
return await this.testRepository.create({ secret: 'top-secret' });
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
let server: StartedTestServer;
|
|
63
|
+
let baseUrl: string;
|
|
64
|
+
describe('request context integration', () => {
|
|
65
|
+
beforeAll(async () => {
|
|
66
|
+
server = await startTestServer({
|
|
67
|
+
dataSources: [createTestDataSource({ entities: [...defaultTestServerEntities, Test] })],
|
|
68
|
+
controllers: [ContextTestController]
|
|
69
|
+
});
|
|
70
|
+
baseUrl = await server.start();
|
|
71
|
+
}, 15000);
|
|
72
|
+
|
|
73
|
+
afterAll(async () => {
|
|
74
|
+
await server.shutdown();
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
test('context is available during exclude/default evaluation and is cached', async () => {
|
|
78
|
+
const res: Response = await fetch(`${baseUrl}/context-test`, { headers: { Authorization: 'admin' } });
|
|
79
|
+
expect(res.status).toBe(200);
|
|
80
|
+
|
|
81
|
+
const body: Test = await res.json() as Test;
|
|
82
|
+
expect(body.secret).toBe('top-secret');
|
|
83
|
+
expect(body.label).toBe('admin-default');
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
test('exclude sees the request context for non-admin users', async () => {
|
|
87
|
+
const res: Response = await fetch(`${baseUrl}/context-test`, { headers: { Authorization: 'user' } });
|
|
88
|
+
|
|
89
|
+
const body: Test = await res.json() as Test;
|
|
90
|
+
expect(body.secret).toBeUndefined();
|
|
91
|
+
expect(body.label).toBe('user-default');
|
|
92
|
+
});
|
|
93
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
|
|
2
|
+
import { BaseContext } from '../base-context';
|
|
3
|
+
import { RequestContextToken } from './request-context-token.model';
|
|
4
|
+
import { HttpRequest } from '../../http/http-request.model';
|
|
5
|
+
import { HttpResponse } from '../../http/http-response.model';
|
|
6
|
+
import { Newable } from '../../types/newable.type';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The context of an incoming http request.
|
|
10
|
+
*/
|
|
11
|
+
export class HttpRequestContext extends BaseContext<'http-request'> {
|
|
12
|
+
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
13
|
+
readonly type: 'http-request' = 'http-request';
|
|
14
|
+
|
|
15
|
+
constructor(
|
|
16
|
+
readonly request: HttpRequest,
|
|
17
|
+
readonly response: HttpResponse,
|
|
18
|
+
readonly controllerClass: Newable<unknown> | undefined,
|
|
19
|
+
readonly controllerMethod: string | undefined
|
|
20
|
+
) {
|
|
21
|
+
super();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Whether or not a value for the given token has been cached.
|
|
26
|
+
* @param token - The token to check.
|
|
27
|
+
* @returns True if a value has been cached, false otherwise.
|
|
28
|
+
*/
|
|
29
|
+
has<T>(token: RequestContextToken<T>): boolean {
|
|
30
|
+
return this.tokenValues.has(token.key);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Either returns the cached value for the given token or initializes and caches a new value.
|
|
35
|
+
* @param token - The token to get the value of.
|
|
36
|
+
* @returns Either the cached or a new value.
|
|
37
|
+
*/
|
|
38
|
+
get<T>(token: RequestContextToken<T>): T {
|
|
39
|
+
if (!this.has(token)) {
|
|
40
|
+
this.tokenValues.set(token.key, token.fn(this));
|
|
41
|
+
}
|
|
42
|
+
return this.tokenValues.get(token.key) as T;
|
|
43
|
+
}
|
|
44
|
+
}
|