@withwiz/toolkit 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ko.md +235 -0
- package/README.md +57 -26
- package/dist/{chunk-V6YD53NH.js → chunk-23LQJYZN.js} +5 -2
- package/dist/{chunk-ZTRASVGZ.js → chunk-34L7HTM7.js} +1 -1
- package/dist/{chunk-GSUCBWML.js → chunk-3RK3MKAR.js} +5 -2
- package/dist/{chunk-6JXHXIEH.js → chunk-3UIKCS56.js} +2 -2
- package/dist/{chunk-MNYVAEXK.js → chunk-4ROIPF33.js} +16 -3
- package/dist/{chunk-JKSABDFT.js → chunk-4TGPAUJV.js} +4 -4
- package/dist/{chunk-D2KXIKI4.js → chunk-4XPXZNBX.js} +18 -11
- package/dist/{chunk-LG3KM5V3.js → chunk-5I3EQHR4.js} +6 -2
- package/dist/chunk-63EKUOJH.js +72 -0
- package/dist/{chunk-N5VOFGF3.js → chunk-75UDFONR.js} +5 -4
- package/dist/{chunk-GORISA3L.js → chunk-7KIM5MHV.js} +1 -1
- package/dist/{chunk-4L6OSSSG.js → chunk-7S2PCYNT.js} +3 -3
- package/dist/{chunk-2SIBG5BG.js → chunk-7YWUKMZD.js} +7 -0
- package/dist/{chunk-7X2N4VZM.js → chunk-ATBYGPLP.js} +1 -1
- package/dist/{chunk-A74POWYY.js → chunk-B7AJJKOY.js} +1 -1
- package/dist/{chunk-W7PEL3DX.js → chunk-BRBOGLFT.js} +4 -4
- package/dist/{chunk-IOUNOHP7.js → chunk-BRFW2LL2.js} +1 -1
- package/dist/{chunk-I4NT6G2T.js → chunk-DRTJSTEV.js} +2 -2
- package/dist/{chunk-JIYLTMVL.js → chunk-DVCGAI5N.js} +2 -2
- package/dist/{chunk-AV7ELXHG.js → chunk-E5TDIRBJ.js} +2 -2
- package/dist/{chunk-UBASOMP5.js → chunk-HGVPZSWW.js} +18 -13
- package/dist/{chunk-7F5X6F7X.js → chunk-HV6A6Z5R.js} +1 -1
- package/dist/chunk-ILMPKSWS.js +125 -0
- package/dist/{chunk-J5NLAZV2.js → chunk-JHUWZ6YW.js} +2 -2
- package/dist/{chunk-LON5THYQ.js → chunk-KLMKCYIN.js} +1 -1
- package/dist/{chunk-4KJZRI74.js → chunk-KWUOLKDO.js} +1 -1
- package/dist/{chunk-GJO2MPC3.js → chunk-LCYDMYZS.js} +1 -1
- package/dist/{chunk-WIQAPWTY.js → chunk-LL3VWKY4.js} +1 -1
- package/dist/{chunk-IMAFMUZ7.js → chunk-LSS3GJUE.js} +3 -2
- package/dist/{chunk-2PFSRVVD.js → chunk-LWHLB2Y6.js} +84 -18
- package/dist/{chunk-BBE4RXR7.js → chunk-MTZXWVW3.js} +17 -6
- package/dist/{chunk-ORMEWXMH.js → chunk-N3ETBM74.js} +1 -14
- package/dist/{chunk-KYAHURXN.js → chunk-N3TCQ5BF.js} +4 -3
- package/dist/{chunk-G4SNTXJ3.js → chunk-NLV7IEYM.js} +7 -6
- package/dist/{chunk-HX4MPCVV.js → chunk-NTZBMWB6.js} +4 -4
- package/dist/{chunk-JRORMRVN.js → chunk-OII5BXCZ.js} +1 -1
- package/dist/{chunk-RJGYONRO.js → chunk-PRPMEHRE.js} +2 -2
- package/dist/{chunk-KG65BFPK.js → chunk-QAIN3WNN.js} +1 -1
- package/dist/{chunk-JJAIVUVD.js → chunk-R7EFDSPZ.js} +2 -2
- package/dist/{chunk-VJE4HA2C.js → chunk-RWCPRPEP.js} +3 -2
- package/dist/{chunk-B6L5XV7O.js → chunk-SCAFDDJP.js} +11 -11
- package/dist/{chunk-KXYDTC4A.js → chunk-SNFPZD6L.js} +11 -2
- package/dist/{chunk-MWBEE6VI.js → chunk-SXBDP3CK.js} +3 -3
- package/dist/{chunk-B5VRZ2VJ.js → chunk-TNDEYJEL.js} +25 -6
- package/dist/{chunk-GDTZMX3L.js → chunk-TRGFXIEF.js} +1 -1
- package/dist/{chunk-VNDL2E44.js → chunk-U52U5SK7.js} +2 -2
- package/dist/{chunk-54REXMTE.js → chunk-UWOWKOOQ.js} +3 -1
- package/dist/{chunk-4PROUAZ5.js → chunk-V3WZFUY3.js} +7 -7
- package/dist/{chunk-G4LJN4OZ.js → chunk-VH57Y5Z4.js} +1 -1
- package/dist/{chunk-5S7M2AJL.js → chunk-VWAB4PM7.js} +1 -1
- package/dist/{chunk-AQZPGOEZ.js → chunk-VWKZMGPJ.js} +5 -4
- package/dist/{chunk-4K27YLAE.js → chunk-VZ2PQA4U.js} +2 -2
- package/dist/{chunk-ZOWEW4GY.js → chunk-WBHX4MJV.js} +2 -2
- package/dist/{chunk-UMRKMF3E.js → chunk-WXOWI7BJ.js} +2 -2
- package/dist/chunk-XAGPZLRK.js +106 -0
- package/dist/{chunk-VPRTPW7C.js → chunk-XF3WUF3F.js} +2 -2
- package/dist/{chunk-6TRD7ZW4.js → chunk-XKIBJJA3.js} +25 -21
- package/dist/{chunk-ZLYBY3R4.js → chunk-XTGS6JJB.js} +10 -5
- package/dist/{chunk-BFZR62LZ.js → chunk-XXPB4C37.js} +7 -7
- package/dist/{chunk-LUIYCIF7.js → chunk-Y4ME3Q5K.js} +2 -2
- package/dist/{chunk-Q66VOVGN.js → chunk-Y4WPEIKW.js} +1 -1
- package/dist/{chunk-MREY2W7N.js → chunk-Y6CPPBJI.js} +1 -1
- package/dist/{chunk-6TUDUOGC.js → chunk-ZEHNCHIV.js} +2 -2
- package/dist/{chunk-D73ZJQMX.js → chunk-ZZABL54F.js} +13 -0
- package/dist/core/auth/config.d.ts +3 -0
- package/dist/core/auth/config.js +3 -3
- package/dist/core/auth/email/index.d.ts +3 -3
- package/dist/core/auth/email/index.js +3 -3
- package/dist/core/auth/email/sender.d.ts +1 -1
- package/dist/core/auth/email/sender.js +2 -2
- package/dist/core/auth/email/token-generator.d.ts +11 -0
- package/dist/core/auth/email/token-generator.js +2 -2
- package/dist/core/auth/errors/index.js +1 -1
- package/dist/core/auth/index.d.ts +11 -11
- package/dist/core/auth/index.js +27 -19
- package/dist/core/auth/jwt/client.js +3 -2
- package/dist/core/auth/jwt/cookie.d.ts +1 -1
- package/dist/core/auth/jwt/cookie.js +4 -4
- package/dist/core/auth/jwt/index.d.ts +41 -9
- package/dist/core/auth/jwt/index.js +6 -6
- package/dist/core/auth/jwt/types.d.ts +1 -1
- package/dist/core/auth/jwt/types.js +1 -1
- package/dist/core/auth/oauth/index.d.ts +6 -6
- package/dist/core/auth/oauth/index.js +8 -8
- package/dist/core/auth/oauth/providers/github.d.ts +1 -1
- package/dist/core/auth/oauth/providers/github.js +1 -1
- package/dist/core/auth/oauth/providers/google.d.ts +1 -1
- package/dist/core/auth/oauth/providers/google.js +1 -1
- package/dist/core/auth/oauth/providers/index.d.ts +5 -5
- package/dist/core/auth/oauth/providers/index.js +7 -7
- package/dist/core/auth/oauth/providers/kakao.d.ts +1 -1
- package/dist/core/auth/oauth/providers/kakao.js +1 -1
- package/dist/core/auth/oauth/providers/meta.d.ts +1 -1
- package/dist/core/auth/oauth/providers/meta.js +1 -1
- package/dist/core/auth/oauth/providers/microsoft.d.ts +1 -1
- package/dist/core/auth/oauth/providers/microsoft.js +1 -1
- package/dist/core/auth/oauth/state-cookie.js +1 -1
- package/dist/core/auth/password/client-helper.d.ts +9 -9
- package/dist/core/auth/password/client-helper.js +5 -3
- package/dist/core/auth/password/hasher.d.ts +83 -0
- package/dist/core/auth/password/hasher.js +14 -0
- package/dist/core/auth/password/index.d.ts +8 -6
- package/dist/core/auth/password/index.js +11 -2
- package/dist/core/auth/services/email-verification.service.d.ts +1 -1
- package/dist/core/auth/services/email-verification.service.js +3 -3
- package/dist/core/auth/services/index.d.ts +13 -12
- package/dist/core/auth/services/index.js +16 -16
- package/dist/core/auth/services/login.service.d.ts +15 -1
- package/dist/core/auth/services/login.service.js +6 -6
- package/dist/core/auth/services/oauth-callback.service.d.ts +7 -1
- package/dist/core/auth/services/oauth-callback.service.js +6 -6
- package/dist/core/auth/services/password-reset.service.d.ts +1 -1
- package/dist/core/auth/services/password-reset.service.js +3 -3
- package/dist/core/auth/services/refresh-token-store.d.ts +39 -0
- package/dist/core/auth/services/register.service.d.ts +1 -1
- package/dist/core/auth/services/register.service.js +3 -3
- package/dist/core/auth/services/token-refresh.service.d.ts +27 -1
- package/dist/core/auth/services/token-refresh.service.js +6 -6
- package/dist/core/auth/token-delivery.d.ts +47 -0
- package/dist/core/auth/token-delivery.js +14 -0
- package/dist/core/auth/types/index.d.ts +38 -4
- package/dist/core/auth/types/index.js +1 -1
- package/dist/core/cache/cache-config.js +4 -4
- package/dist/core/cache/cache-defaults.js +1 -1
- package/dist/core/cache/cache-env.d.ts +3 -3
- package/dist/core/cache/cache-env.js +3 -3
- package/dist/core/cache/cache-factory.d.ts +6 -6
- package/dist/core/cache/cache-factory.js +11 -11
- package/dist/core/cache/cache-invalidation.d.ts +4 -4
- package/dist/core/cache/cache-invalidation.js +12 -12
- package/dist/core/cache/cache-redis.js +5 -5
- package/dist/core/cache/cache-types.js +1 -1
- package/dist/core/cache/cache-wrapper.d.ts +1 -1
- package/dist/core/cache/cache-wrapper.js +12 -12
- package/dist/core/cache/cache.d.ts +2 -2
- package/dist/core/cache/cache.js +17 -17
- package/dist/core/cache/config.js +2 -2
- package/dist/core/cache/hybrid-cache-manager.d.ts +1 -1
- package/dist/core/cache/hybrid-cache-manager.js +7 -7
- package/dist/core/cache/index.d.ts +15 -15
- package/dist/core/cache/index.js +17 -17
- package/dist/core/cache/inmemory-cache-manager.d.ts +1 -1
- package/dist/core/cache/inmemory-cache-manager.js +3 -3
- package/dist/core/cache/noop-cache-manager.d.ts +1 -1
- package/dist/core/cache/noop-cache-manager.js +5 -5
- package/dist/core/cache/redis-cache-manager.d.ts +2 -2
- package/dist/core/cache/redis-cache-manager.js +6 -6
- package/dist/core/config/common.js +1 -1
- package/dist/core/config/errors.js +1 -1
- package/dist/core/config/registry.d.ts +7 -7
- package/dist/core/config/registry.js +1 -1
- package/dist/core/config/warn.js +1 -1
- package/dist/core/constants/error-codes.js +1 -1
- package/dist/core/constants/index.d.ts +5 -5
- package/dist/core/constants/index.js +4 -2
- package/dist/core/constants/messages.js +1 -1
- package/dist/core/constants/pagination.js +1 -1
- package/dist/core/constants/security.d.ts +15 -0
- package/dist/core/constants/security.js +4 -2
- package/dist/core/constants/validation.js +1 -1
- package/dist/core/cors/index.js +1 -1
- package/dist/core/error/app-error.d.ts +2 -2
- package/dist/core/error/app-error.js +1 -1
- package/dist/core/error/extract-error-info.js +1 -1
- package/dist/core/error/friendly-messages-v2.d.ts +3 -3
- package/dist/core/error/friendly-messages-v2.js +4 -4
- package/dist/core/error/friendly-messages.js +1 -1
- package/dist/core/error/index.d.ts +6 -6
- package/dist/core/error/index.js +4 -4
- package/dist/core/error/messages/en.d.ts +1 -1
- package/dist/core/error/messages/en.js +1 -1
- package/dist/core/error/messages/index.d.ts +2 -2
- package/dist/core/error/messages/index.js +3 -3
- package/dist/core/error/messages/ko.d.ts +1 -1
- package/dist/core/error/messages/ko.js +1 -1
- package/dist/core/geolocation/batch-processor.d.ts +1 -1
- package/dist/core/geolocation/batch-processor.js +3 -3
- package/dist/core/geolocation/config.js +1 -1
- package/dist/core/geolocation/index.d.ts +5 -5
- package/dist/core/geolocation/index.js +3 -3
- package/dist/core/geolocation/providers/base-provider.d.ts +2 -2
- package/dist/core/geolocation/providers/base-provider.js +1 -1
- package/dist/core/geolocation/providers/index.d.ts +6 -6
- package/dist/core/geolocation/providers/index.js +1 -1
- package/dist/core/geolocation/providers/ip-api-provider.d.ts +3 -3
- package/dist/core/geolocation/providers/ip-api-provider.js +1 -1
- package/dist/core/geolocation/providers/ipapi-co-provider.d.ts +3 -3
- package/dist/core/geolocation/providers/ipapi-co-provider.js +1 -1
- package/dist/core/geolocation/providers/ipgeolocation-provider.d.ts +3 -3
- package/dist/core/geolocation/providers/ipgeolocation-provider.js +1 -1
- package/dist/core/geolocation/providers/maxmind-provider.d.ts +3 -3
- package/dist/core/geolocation/providers/maxmind-provider.js +1 -1
- package/dist/core/logger/config.js +1 -1
- package/dist/core/logger/logger.js +2 -2
- package/dist/core/storage/config.js +1 -1
- package/dist/core/storage/r2-storage.js +1 -1
- package/dist/core/system/cpu.d.ts +1 -1
- package/dist/core/system/cpu.js +4 -4
- package/dist/core/system/disk.d.ts +1 -1
- package/dist/core/system/disk.js +4 -4
- package/dist/core/system/environment.d.ts +1 -1
- package/dist/core/system/environment.js +7 -7
- package/dist/core/system/health-check.d.ts +2 -2
- package/dist/core/system/health-check.js +5 -5
- package/dist/core/system/index.d.ts +7 -7
- package/dist/core/system/index.js +14 -14
- package/dist/core/system/memory.d.ts +1 -1
- package/dist/core/system/memory.js +4 -4
- package/dist/core/system/network.d.ts +1 -1
- package/dist/core/system/network.js +4 -4
- package/dist/core/system/utils.js +3 -3
- package/dist/core/types/geoip.d.ts +1 -1
- package/dist/core/types/qr-code.js +1 -1
- package/dist/core/utils/error-message-formatter.js +1 -1
- package/dist/core/utils/format-number.js +1 -1
- package/dist/core/utils/index.d.ts +3 -3
- package/dist/core/utils/index.js +2 -2
- package/dist/core/utils/input-validation.js +52 -16
- package/dist/core/utils/ip-utils.js +1 -1
- package/dist/core/utils/optimistic-lock.js +1 -1
- package/dist/core/utils/sanitizer.js +2 -2
- package/dist/core/utils/short-code-generator.js +1 -1
- package/dist/core/utils/timezone.js +121 -14
- package/dist/core/utils/type-guards.js +1 -1
- package/dist/core/utils/url-normalizer.js +1 -1
- package/dist/core/validators/index.d.ts +1 -1
- package/dist/core/validators/index.js +2 -2
- package/dist/core/validators/password-validator.d.ts +3 -3
- package/dist/core/validators/password-validator.js +2 -2
- package/dist/initialize.d.ts +10 -10
- package/dist/initialize.js +8 -8
- package/dist/next/auth-handlers/forgot-password.handler.d.ts +1 -1
- package/dist/next/auth-handlers/forgot-password.handler.js +4 -4
- package/dist/next/auth-handlers/index.d.ts +11 -11
- package/dist/next/auth-handlers/index.js +29 -28
- package/dist/next/auth-handlers/login.handler.d.ts +1 -1
- package/dist/next/auth-handlers/login.handler.js +7 -6
- package/dist/next/auth-handlers/logout.handler.d.ts +1 -1
- package/dist/next/auth-handlers/logout.handler.js +5 -5
- package/dist/next/auth-handlers/me.handler.d.ts +1 -1
- package/dist/next/auth-handlers/me.handler.js +7 -6
- package/dist/next/auth-handlers/oauth-authorize.handler.d.ts +1 -1
- package/dist/next/auth-handlers/oauth-authorize.handler.js +5 -5
- package/dist/next/auth-handlers/oauth-callback.handler.d.ts +1 -1
- package/dist/next/auth-handlers/oauth-callback.handler.js +10 -10
- package/dist/next/auth-handlers/refresh.handler.d.ts +1 -1
- package/dist/next/auth-handlers/refresh.handler.js +8 -7
- package/dist/next/auth-handlers/register.handler.d.ts +1 -1
- package/dist/next/auth-handlers/register.handler.js +4 -4
- package/dist/next/auth-handlers/reset-password.handler.d.ts +1 -1
- package/dist/next/auth-handlers/reset-password.handler.js +4 -4
- package/dist/next/auth-handlers/verify-email.handler.d.ts +1 -1
- package/dist/next/auth-handlers/verify-email.handler.js +4 -4
- package/dist/next/auth-types/handler-types.d.ts +5 -1
- package/dist/next/auth-types/handler-types.js +13 -1
- package/dist/next/auth-types/index.d.ts +1 -1
- package/dist/next/auth-types/index.js +13 -1
- package/dist/next/error/error-handler.js +3 -3
- package/dist/next/error/index.d.ts +3 -3
- package/dist/next/error/index.js +6 -6
- package/dist/next/error/locale-detector.d.ts +1 -1
- package/dist/next/error/locale-detector.js +1 -1
- package/dist/next/middleware/auth.d.ts +3 -3
- package/dist/next/middleware/auth.js +8 -7
- package/dist/next/middleware/cors.d.ts +2 -2
- package/dist/next/middleware/cors.js +3 -3
- package/dist/next/middleware/error-handler.d.ts +1 -1
- package/dist/next/middleware/error-handler.js +6 -6
- package/dist/next/middleware/index.d.ts +11 -11
- package/dist/next/middleware/index.js +18 -17
- package/dist/next/middleware/init-request.d.ts +1 -1
- package/dist/next/middleware/init-request.js +1 -1
- package/dist/next/middleware/middleware-chain.d.ts +1 -1
- package/dist/next/middleware/middleware-chain.js +3 -3
- package/dist/next/middleware/rate-limit.d.ts +2 -2
- package/dist/next/middleware/rate-limit.js +3 -3
- package/dist/next/middleware/response-logger.d.ts +1 -1
- package/dist/next/middleware/response-logger.js +3 -3
- package/dist/next/middleware/security.d.ts +1 -1
- package/dist/next/middleware/security.js +3 -3
- package/dist/next/middleware/types.d.ts +6 -3
- package/dist/next/middleware/wrappers.d.ts +2 -2
- package/dist/next/middleware/wrappers.js +18 -17
- package/dist/next/utils/api-helpers.d.ts +6 -2
- package/dist/next/utils/api-helpers.js +3 -2
- package/dist/next/utils/cors.js +2 -2
- package/dist/next/utils/csv-export-format.js +1 -1
- package/dist/next/utils/csv-export.js +3 -3
- package/dist/next/utils/error-processor.d.ts +1 -1
- package/dist/next/utils/error-processor.js +3 -3
- package/dist/next/utils/index.d.ts +5 -5
- package/dist/next/utils/index.js +16 -15
- package/dist/prisma/auth-adapter/index.d.ts +1 -1
- package/dist/prisma/auth-adapter/index.js +1 -1
- package/package.json +94 -51
- package/dist/chunk-2P4N4OK2.js +0 -150
- package/dist/chunk-4IQWQSEV.js +0 -27
- package/dist/chunk-4K76HG4V.js +0 -34
- package/dist/chunk-7EXSMZ2O.js +0 -29
- package/dist/chunk-7VXRBTRF.js +0 -110
- package/dist/chunk-ARXUKGZI.js +0 -58
- package/dist/chunk-B5OH43PR.js +0 -31
- package/dist/chunk-BW4QO7T6.js +0 -56
- package/dist/chunk-EK4TL7VW.js +0 -22
- package/dist/chunk-ERKJJDY6.js +0 -117
- package/dist/chunk-G4GT4X3J.js +0 -240
- package/dist/chunk-GPOSTBDQ.js +0 -193
- package/dist/chunk-IRUFNC4L.js +0 -26
- package/dist/chunk-J2MAXMIP.js +0 -105
- package/dist/chunk-MFMQO6IS.js +0 -127
- package/dist/chunk-PBQGXOVX.js +0 -31
- package/dist/chunk-STMAKLLG.js +0 -24
- package/dist/chunk-WP233RH2.js +0 -80
- package/dist/chunk-WWOYFWFB.js +0 -137
- package/dist/chunk-X7FGBUA4.js +0 -117
- package/dist/chunk-YSPIFSDI.js +0 -136
- package/dist/chunk-ZCLKRGZ4.js +0 -81
- package/dist/react/components/ui/Alert.d.ts +0 -12
- package/dist/react/components/ui/Alert.js +0 -10
- package/dist/react/components/ui/Badge.d.ts +0 -7
- package/dist/react/components/ui/Badge.js +0 -8
- package/dist/react/components/ui/Button.d.ts +0 -7
- package/dist/react/components/ui/Button.js +0 -8
- package/dist/react/components/ui/DataTable.d.ts +0 -8
- package/dist/react/components/ui/DataTable.js +0 -22
- package/dist/react/components/ui/DomainDisplay.d.ts +0 -12
- package/dist/react/components/ui/DomainDisplay.js +0 -31
- package/dist/react/components/ui/Input.d.ts +0 -5
- package/dist/react/components/ui/Input.js +0 -8
- package/dist/react/components/ui/Label.d.ts +0 -5
- package/dist/react/components/ui/Label.js +0 -8
- package/dist/react/components/ui/Pagination.d.ts +0 -42
- package/dist/react/components/ui/Pagination.js +0 -20
- package/dist/react/components/ui/Select.d.ts +0 -15
- package/dist/react/components/ui/Select.js +0 -27
- package/dist/react/components/ui/Skeleton.d.ts +0 -6
- package/dist/react/components/ui/Skeleton.js +0 -8
- package/dist/react/components/ui/TimezoneDisplay.d.ts +0 -22
- package/dist/react/components/ui/TimezoneDisplay.js +0 -83
- package/dist/react/components/ui/Tooltip.d.ts +0 -21
- package/dist/react/components/ui/Tooltip.js +0 -94
- package/dist/react/components/ui/data-table/DataTable.d.ts +0 -2
- package/dist/react/components/ui/data-table/DataTable.js +0 -22
- package/dist/react/components/ui/data-table/DataTableBody.d.ts +0 -19
- package/dist/react/components/ui/data-table/DataTableBody.js +0 -10
- package/dist/react/components/ui/data-table/DataTableBulkActions.d.ts +0 -17
- package/dist/react/components/ui/data-table/DataTableBulkActions.js +0 -12
- package/dist/react/components/ui/data-table/DataTableFilters.d.ts +0 -15
- package/dist/react/components/ui/data-table/DataTableFilters.js +0 -13
- package/dist/react/components/ui/data-table/DataTablePagination.d.ts +0 -10
- package/dist/react/components/ui/data-table/DataTablePagination.js +0 -11
- package/dist/react/components/ui/data-table/DataTableSearch.d.ts +0 -24
- package/dist/react/components/ui/data-table/DataTableSearch.js +0 -12
- package/dist/react/components/ui/data-table/index.d.ts +0 -13
- package/dist/react/components/ui/data-table/index.js +0 -42
- package/dist/react/components/ui/data-table/types.d.ts +0 -120
- package/dist/react/components/ui/data-table/types.js +0 -9
- package/dist/react/components/ui/loading-bar.d.ts +0 -20
- package/dist/react/components/ui/loading-bar.js +0 -15
- package/dist/react/error/error-display.d.ts +0 -48
- package/dist/react/error/error-display.js +0 -30
- package/dist/react/error/index.d.ts +0 -6
- package/dist/react/error/index.js +0 -30
- package/dist/react/hooks/useDataTable.d.ts +0 -96
- package/dist/react/hooks/useDataTable.js +0 -151
- package/dist/react/hooks/useDebounce.d.ts +0 -7
- package/dist/react/hooks/useDebounce.js +0 -7
- package/dist/react/hooks/useExitIntent.d.ts +0 -35
- package/dist/react/hooks/useExitIntent.js +0 -72
- package/dist/react/hooks/useTimezone.d.ts +0 -19
- package/dist/react/hooks/useTimezone.js +0 -11
- package/dist/react/utils/client-utils.d.ts +0 -3
- package/dist/react/utils/client-utils.js +0 -9
- package/dist/react/utils/qr-code.d.ts +0 -16
- package/dist/react/utils/qr-code.js +0 -215
- package/dist/{chunk-7PEVOMBO.js → chunk-AOWUPAPS.js} +0 -0
- package/dist/{chunk-UQ3Z3ZAF.js → chunk-ER6LSA4M.js} +6 -6
- package/dist/{chunk-7WG7XPXC.js → chunk-KKZCNF6U.js} +3 -3
- /package/dist/{chunk-M22Z2NO6.js → core/auth/services/refresh-token-store.js} +0 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import {
|
|
2
|
+
setTokenCookies
|
|
3
|
+
} from "./chunk-PRPMEHRE.js";
|
|
4
|
+
import {
|
|
5
|
+
getAuthConfig
|
|
6
|
+
} from "./chunk-N3TCQ5BF.js";
|
|
7
|
+
import {
|
|
8
|
+
__spreadValues
|
|
9
|
+
} from "./chunk-N3ETBM74.js";
|
|
10
|
+
|
|
11
|
+
// src/core/auth/token-delivery.ts
|
|
12
|
+
async function readBodyRefreshToken(source) {
|
|
13
|
+
if (!source.json) return void 0;
|
|
14
|
+
try {
|
|
15
|
+
const body = await source.json();
|
|
16
|
+
return typeof (body == null ? void 0 : body.refreshToken) === "string" ? body.refreshToken : void 0;
|
|
17
|
+
} catch (e) {
|
|
18
|
+
return void 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
var cookieStrategy = {
|
|
22
|
+
extractAccessToken: (source) => {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
return (_b = (_a = source.cookies.get("access_token")) == null ? void 0 : _a.value) != null ? _b : null;
|
|
25
|
+
},
|
|
26
|
+
extractRefreshToken: async (source) => {
|
|
27
|
+
var _a;
|
|
28
|
+
return (_a = source.cookies.get("refresh_token")) == null ? void 0 : _a.value;
|
|
29
|
+
},
|
|
30
|
+
buildTokenResponse: (body) => body,
|
|
31
|
+
attachCookies: (response, tokens, options) => setTokenCookies(response, tokens, options)
|
|
32
|
+
};
|
|
33
|
+
var headerStrategy = {
|
|
34
|
+
extractAccessToken: (source, parseHeader) => parseHeader(source.headers.get("authorization")),
|
|
35
|
+
extractRefreshToken: (source) => readBodyRefreshToken(source),
|
|
36
|
+
buildTokenResponse: (body, fragment) => __spreadValues(__spreadValues({}, body), fragment),
|
|
37
|
+
attachCookies: (response) => response
|
|
38
|
+
};
|
|
39
|
+
var hybridStrategy = {
|
|
40
|
+
extractAccessToken: (source, parseHeader) => {
|
|
41
|
+
var _a, _b;
|
|
42
|
+
return (_b = (_a = source.cookies.get("access_token")) == null ? void 0 : _a.value) != null ? _b : parseHeader(source.headers.get("authorization"));
|
|
43
|
+
},
|
|
44
|
+
// 쿠키 우선 — 쿠키가 있으면 body 를 소비하지 않는다 (빈 body 요청 보호)
|
|
45
|
+
extractRefreshToken: async (source) => {
|
|
46
|
+
var _a, _b;
|
|
47
|
+
return (_b = (_a = source.cookies.get("refresh_token")) == null ? void 0 : _a.value) != null ? _b : await readBodyRefreshToken(source);
|
|
48
|
+
},
|
|
49
|
+
buildTokenResponse: (body, fragment) => __spreadValues(__spreadValues({}, body), fragment),
|
|
50
|
+
attachCookies: (response, tokens, options) => setTokenCookies(response, tokens, options)
|
|
51
|
+
};
|
|
52
|
+
var strategies = {
|
|
53
|
+
cookie: cookieStrategy,
|
|
54
|
+
header: headerStrategy,
|
|
55
|
+
hybrid: hybridStrategy
|
|
56
|
+
};
|
|
57
|
+
function resolveTokenDelivery(optionValue) {
|
|
58
|
+
if (optionValue) return optionValue;
|
|
59
|
+
try {
|
|
60
|
+
return getAuthConfig().tokenDelivery;
|
|
61
|
+
} catch (e) {
|
|
62
|
+
return "hybrid";
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
function getTokenDeliveryStrategy(optionValue) {
|
|
66
|
+
return strategies[resolveTokenDelivery(optionValue)];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export {
|
|
70
|
+
resolveTokenDelivery,
|
|
71
|
+
getTokenDeliveryStrategy
|
|
72
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TokenGenerator
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZZABL54F.js";
|
|
4
4
|
import {
|
|
5
5
|
AuthError
|
|
6
6
|
} from "./chunk-5GWGARXI.js";
|
|
@@ -26,12 +26,13 @@ var PasswordResetService = class {
|
|
|
26
26
|
if (!user) return;
|
|
27
27
|
const token = TokenGenerator.generate();
|
|
28
28
|
const expires = new Date(Date.now() + this.tokenExpiryHours * 60 * 60 * 1e3);
|
|
29
|
-
await this.tokenRepo.create(email, token, "PASSWORD_RESET" /* PASSWORD_RESET */, expires);
|
|
29
|
+
await this.tokenRepo.create(email, TokenGenerator.hash(token), "PASSWORD_RESET" /* PASSWORD_RESET */, expires);
|
|
30
30
|
await this.emailSender.sendPasswordResetEmail(email, token);
|
|
31
31
|
this.logger.info("Password reset requested", { email });
|
|
32
32
|
}
|
|
33
33
|
async resetPassword(email, token, newPassword) {
|
|
34
|
-
const
|
|
34
|
+
const hashedToken = TokenGenerator.hash(token);
|
|
35
|
+
const tokenRecord = await this.tokenRepo.findByEmailAndToken(email, hashedToken, "PASSWORD_RESET" /* PASSWORD_RESET */);
|
|
35
36
|
if (!tokenRecord || tokenRecord.expires < /* @__PURE__ */ new Date()) {
|
|
36
37
|
throw new AuthError("Invalid or expired token", "TOKEN_INVALID", 400);
|
|
37
38
|
}
|
|
@@ -41,7 +42,7 @@ var PasswordResetService = class {
|
|
|
41
42
|
}
|
|
42
43
|
const hashedPassword = await hash(newPassword, this.bcryptRounds);
|
|
43
44
|
await this.userRepo.update(user.id, { password: hashedPassword });
|
|
44
|
-
await this.tokenRepo.delete(email,
|
|
45
|
+
await this.tokenRepo.delete(email, hashedToken, "PASSWORD_RESET" /* PASSWORD_RESET */);
|
|
45
46
|
this.logger.info("Password reset completed", { userId: user.id });
|
|
46
47
|
}
|
|
47
48
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getPlatform
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KWUOLKDO.js";
|
|
4
4
|
import {
|
|
5
5
|
getGeolocationConfig
|
|
6
6
|
} from "./chunk-CRJUFA73.js";
|
|
7
7
|
import {
|
|
8
8
|
getAuthConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-N3TCQ5BF.js";
|
|
10
10
|
import {
|
|
11
11
|
getCommonConfig
|
|
12
12
|
} from "./chunk-PX535BHW.js";
|
|
13
13
|
import {
|
|
14
14
|
getResolvedCacheConfig
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7KIM5MHV.js";
|
|
16
16
|
|
|
17
17
|
// src/core/system/environment.ts
|
|
18
18
|
import os from "os";
|
|
@@ -9,6 +9,12 @@ var JWT_DEFAULTS = {
|
|
|
9
9
|
/** 토큰 타입 */
|
|
10
10
|
TOKEN_TYPE: "Bearer"
|
|
11
11
|
};
|
|
12
|
+
var ROLE_DEFAULTS = {
|
|
13
|
+
/** role 미지정/누락 시 적용되는 기본 역할. */
|
|
14
|
+
DEFAULT_ROLE: "USER",
|
|
15
|
+
/** `adminMiddleware`·`requireAdmin` 의 기본 관리자 역할 이름. */
|
|
16
|
+
ADMIN_ROLE: "ADMIN"
|
|
17
|
+
};
|
|
12
18
|
var EMAIL_VERIFICATION = {
|
|
13
19
|
/** 토큰 만료 시간 (시간 단위) */
|
|
14
20
|
TOKEN_EXPIRES_HOURS: 24,
|
|
@@ -58,6 +64,7 @@ var SECURITY_HEADERS = {
|
|
|
58
64
|
|
|
59
65
|
export {
|
|
60
66
|
JWT_DEFAULTS,
|
|
67
|
+
ROLE_DEFAULTS,
|
|
61
68
|
EMAIL_VERIFICATION,
|
|
62
69
|
PASSWORD_RESET,
|
|
63
70
|
MAGIC_LINK,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AUTH_ERROR_CODE_MAP
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-R7EFDSPZ.js";
|
|
4
4
|
import {
|
|
5
5
|
getErrorMessage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KKZCNF6U.js";
|
|
7
7
|
import {
|
|
8
8
|
AppError
|
|
9
9
|
} from "./chunk-ATAQRXTH.js";
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
} from "./chunk-5GWGARXI.js";
|
|
17
17
|
import {
|
|
18
18
|
logger
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QAIN3WNN.js";
|
|
20
20
|
import {
|
|
21
21
|
__spreadValues
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-N3ETBM74.js";
|
|
23
23
|
|
|
24
24
|
// src/next/middleware/error-handler.ts
|
|
25
25
|
import { NextResponse } from "next/server";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TokenRefreshService
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
setTokenCookies
|
|
6
|
-
} from "./chunk-RJGYONRO.js";
|
|
3
|
+
} from "./chunk-XAGPZLRK.js";
|
|
7
4
|
import {
|
|
8
5
|
AuthError
|
|
9
6
|
} from "./chunk-5GWGARXI.js";
|
|
7
|
+
import {
|
|
8
|
+
getTokenDeliveryStrategy
|
|
9
|
+
} from "./chunk-63EKUOJH.js";
|
|
10
10
|
|
|
11
11
|
// src/next/auth-handlers/refresh.handler.ts
|
|
12
12
|
import { NextResponse } from "next/server";
|
|
13
13
|
function createRefreshHandler(options) {
|
|
14
|
-
const { dependencies, jwt, hooks, cookie } = options;
|
|
14
|
+
const { dependencies, jwt, hooks, cookie, tokenDelivery } = options;
|
|
15
15
|
const refreshService = new TokenRefreshService({
|
|
16
16
|
userRepository: dependencies.userRepository,
|
|
17
17
|
jwtSecret: jwt.secret,
|
|
@@ -21,9 +21,9 @@ function createRefreshHandler(options) {
|
|
|
21
21
|
logger: dependencies.logger
|
|
22
22
|
});
|
|
23
23
|
return async (request) => {
|
|
24
|
-
var _a;
|
|
25
24
|
try {
|
|
26
|
-
const
|
|
25
|
+
const strategy = getTokenDeliveryStrategy(tokenDelivery);
|
|
26
|
+
const refreshToken = await strategy.extractRefreshToken(request);
|
|
27
27
|
if (!refreshToken) {
|
|
28
28
|
return NextResponse.json({ success: false, error: "No refresh token" }, { status: 401 });
|
|
29
29
|
}
|
|
@@ -32,12 +32,17 @@ function createRefreshHandler(options) {
|
|
|
32
32
|
if (hookResult instanceof Response) return hookResult;
|
|
33
33
|
}
|
|
34
34
|
const result = await refreshService.refresh(refreshToken);
|
|
35
|
-
const response = NextResponse.json(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
const response = NextResponse.json(
|
|
36
|
+
strategy.buildTokenResponse(
|
|
37
|
+
{ success: true, user: result.user },
|
|
38
|
+
{ accessToken: result.accessToken }
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
strategy.attachCookies(
|
|
42
|
+
response,
|
|
43
|
+
{ accessToken: result.accessToken, refreshToken },
|
|
44
|
+
{ secure: cookie == null ? void 0 : cookie.secure }
|
|
45
|
+
);
|
|
41
46
|
return response;
|
|
42
47
|
} catch (error) {
|
|
43
48
|
if (error instanceof AuthError) {
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AuthError
|
|
3
|
+
} from "./chunk-5GWGARXI.js";
|
|
4
|
+
|
|
5
|
+
// src/core/auth/password/hasher.ts
|
|
6
|
+
import bcrypt from "bcryptjs";
|
|
7
|
+
var BCRYPT_PREFIX = /^\$2[aby]\$/;
|
|
8
|
+
var BcryptPasswordHasher = class {
|
|
9
|
+
constructor(options = {}) {
|
|
10
|
+
this.id = "bcrypt";
|
|
11
|
+
var _a;
|
|
12
|
+
this.rounds = (_a = options.rounds) != null ? _a : 12;
|
|
13
|
+
}
|
|
14
|
+
identifies(hash) {
|
|
15
|
+
return BCRYPT_PREFIX.test(hash);
|
|
16
|
+
}
|
|
17
|
+
async hash(password) {
|
|
18
|
+
return bcrypt.hash(password, this.rounds);
|
|
19
|
+
}
|
|
20
|
+
async verify(password, hash) {
|
|
21
|
+
return bcrypt.compare(password, hash);
|
|
22
|
+
}
|
|
23
|
+
needsRehash(hash) {
|
|
24
|
+
var _a;
|
|
25
|
+
if (!this.identifies(hash)) return true;
|
|
26
|
+
const cost = Number.parseInt((_a = hash.split("$")[2]) != null ? _a : "", 10);
|
|
27
|
+
if (Number.isNaN(cost)) return true;
|
|
28
|
+
return cost < this.rounds;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
var ARGON2_PREFIX = /^\$argon2(id|i|d)\$/;
|
|
32
|
+
var argon2Cache;
|
|
33
|
+
async function loadArgon2() {
|
|
34
|
+
var _a;
|
|
35
|
+
if (argon2Cache) return argon2Cache;
|
|
36
|
+
try {
|
|
37
|
+
const mod = await import("argon2");
|
|
38
|
+
argon2Cache = (_a = mod.default) != null ? _a : mod;
|
|
39
|
+
return argon2Cache;
|
|
40
|
+
} catch (e) {
|
|
41
|
+
throw new AuthError(
|
|
42
|
+
"argon2 package is not installed. Run `npm install argon2` to use Argon2idPasswordHasher.",
|
|
43
|
+
"ARGON2_NOT_INSTALLED",
|
|
44
|
+
500
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function __resetArgon2Cache() {
|
|
49
|
+
argon2Cache = void 0;
|
|
50
|
+
}
|
|
51
|
+
function parseArgon2Params(hash) {
|
|
52
|
+
const paramSegment = hash.split("$").find((s) => s.startsWith("m="));
|
|
53
|
+
if (!paramSegment) return null;
|
|
54
|
+
const params = {};
|
|
55
|
+
for (const kv of paramSegment.split(",")) {
|
|
56
|
+
const [k, v] = kv.split("=");
|
|
57
|
+
const n = Number.parseInt(v != null ? v : "", 10);
|
|
58
|
+
if (!Number.isNaN(n)) params[k] = n;
|
|
59
|
+
}
|
|
60
|
+
if (params.m === void 0 || params.t === void 0 || params.p === void 0) return null;
|
|
61
|
+
return { m: params.m, t: params.t, p: params.p };
|
|
62
|
+
}
|
|
63
|
+
var Argon2idPasswordHasher = class {
|
|
64
|
+
constructor(options = {}) {
|
|
65
|
+
this.id = "argon2id";
|
|
66
|
+
var _a, _b, _c;
|
|
67
|
+
this.memoryCost = (_a = options.memoryCost) != null ? _a : 19456;
|
|
68
|
+
this.timeCost = (_b = options.timeCost) != null ? _b : 2;
|
|
69
|
+
this.parallelism = (_c = options.parallelism) != null ? _c : 1;
|
|
70
|
+
}
|
|
71
|
+
identifies(hash) {
|
|
72
|
+
return ARGON2_PREFIX.test(hash);
|
|
73
|
+
}
|
|
74
|
+
async hash(password) {
|
|
75
|
+
const argon2 = await loadArgon2();
|
|
76
|
+
return argon2.hash(password, {
|
|
77
|
+
type: argon2.argon2id,
|
|
78
|
+
memoryCost: this.memoryCost,
|
|
79
|
+
timeCost: this.timeCost,
|
|
80
|
+
parallelism: this.parallelism
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
async verify(password, hash) {
|
|
84
|
+
const argon2 = await loadArgon2();
|
|
85
|
+
return argon2.verify(hash, password);
|
|
86
|
+
}
|
|
87
|
+
needsRehash(hash) {
|
|
88
|
+
if (!this.identifies(hash)) return true;
|
|
89
|
+
const params = parseArgon2Params(hash);
|
|
90
|
+
if (!params) return true;
|
|
91
|
+
return params.m < this.memoryCost || params.t < this.timeCost || params.p < this.parallelism;
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
var MigratingPasswordHasher = class {
|
|
95
|
+
constructor(options) {
|
|
96
|
+
var _a;
|
|
97
|
+
this.preferred = options.preferred;
|
|
98
|
+
this.legacy = (_a = options.legacy) != null ? _a : [];
|
|
99
|
+
}
|
|
100
|
+
get id() {
|
|
101
|
+
return this.preferred.id;
|
|
102
|
+
}
|
|
103
|
+
identifies(hash) {
|
|
104
|
+
return [this.preferred, ...this.legacy].some((h) => h.identifies(hash));
|
|
105
|
+
}
|
|
106
|
+
async hash(password) {
|
|
107
|
+
return this.preferred.hash(password);
|
|
108
|
+
}
|
|
109
|
+
async verify(password, hash) {
|
|
110
|
+
const hasher = [this.preferred, ...this.legacy].find((h) => h.identifies(hash));
|
|
111
|
+
if (!hasher) return false;
|
|
112
|
+
return hasher.verify(password, hash);
|
|
113
|
+
}
|
|
114
|
+
needsRehash(hash) {
|
|
115
|
+
if (!this.preferred.identifies(hash)) return true;
|
|
116
|
+
return this.preferred.needsRehash(hash);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export {
|
|
121
|
+
BcryptPasswordHasher,
|
|
122
|
+
__resetArgon2Cache,
|
|
123
|
+
Argon2idPasswordHasher,
|
|
124
|
+
MigratingPasswordHasher
|
|
125
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
logger
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QAIN3WNN.js";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_INMEMORY_CONFIG
|
|
6
6
|
} from "./chunk-O4L6RI5S.js";
|
|
7
7
|
import {
|
|
8
8
|
__spreadProps,
|
|
9
9
|
__spreadValues
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-N3ETBM74.js";
|
|
11
11
|
|
|
12
12
|
// src/core/cache/inmemory-cache-manager.ts
|
|
13
13
|
var InMemoryCacheManager = class _InMemoryCacheManager {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PasswordResetService
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-75UDFONR.js";
|
|
4
4
|
import {
|
|
5
5
|
AuthError
|
|
6
6
|
} from "./chunk-5GWGARXI.js";
|
|
@@ -8,10 +8,11 @@ import {
|
|
|
8
8
|
// src/next/auth-handlers/reset-password.handler.ts
|
|
9
9
|
import { NextResponse } from "next/server";
|
|
10
10
|
import { z } from "zod";
|
|
11
|
+
var withinBcryptByteLimit = (value) => new TextEncoder().encode(value).length <= 72;
|
|
11
12
|
var schema = z.object({
|
|
12
13
|
email: z.string().email(),
|
|
13
14
|
token: z.string().min(1),
|
|
14
|
-
password: z.string().min(8)
|
|
15
|
+
password: z.string().min(8).refine(withinBcryptByteLimit, { message: "Password cannot exceed 72 bytes" })
|
|
15
16
|
});
|
|
16
17
|
function createResetPasswordHandler(options) {
|
|
17
18
|
const { dependencies } = options;
|