@withwiz/toolkit 0.6.5 → 0.7.1

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.
Files changed (549) hide show
  1. package/README.md +99 -57
  2. package/dist/{chunk-FDFPNSKY.js → chunk-2D3YM34R.js} +1 -1
  3. package/dist/{chunk-7IY3RQQL.js → chunk-2P4N4OK2.js} +9 -10
  4. package/dist/{chunk-3GAY2T2A.js → chunk-2PFSRVVD.js} +10 -3
  5. package/dist/{chunk-C4TSQUFA.js → chunk-2SIBG5BG.js} +1 -1
  6. package/dist/{chunk-K3OYTLXU.js → chunk-33RIHX7O.js} +9 -3
  7. package/dist/{chunk-EUQATJLI.js → chunk-4ETAGZIT.js} +1 -1
  8. package/dist/{chunk-RJUVBBZG.js → chunk-4IQWQSEV.js} +2 -2
  9. package/dist/{chunk-LG6GH4V7.js → chunk-4K27YLAE.js} +2 -2
  10. package/dist/{chunk-62FLBG6B.js → chunk-4K76HG4V.js} +1 -1
  11. package/dist/{chunk-LRRQ54YJ.js → chunk-4KJZRI74.js} +2 -2
  12. package/dist/{chunk-JP7FDGGL.js → chunk-4L6OSSSG.js} +6 -6
  13. package/dist/{chunk-2NCTRLVH.js → chunk-4PROUAZ5.js} +9 -9
  14. package/dist/{chunk-A6FKWYO2.js → chunk-54REXMTE.js} +6 -9
  15. package/dist/{chunk-AIH3F7JV.js → chunk-5GWGARXI.js} +1 -1
  16. package/dist/{chunk-7VTBRP5M.js → chunk-5S7M2AJL.js} +3 -3
  17. package/dist/{chunk-TLZJQR26.js → chunk-65HVR74O.js} +2 -2
  18. package/dist/chunk-6HQ5JHL4.js +14 -0
  19. package/dist/{chunk-K25ICPU4.js → chunk-6J2EJVND.js} +1 -1
  20. package/dist/{chunk-G26T2PRQ.js → chunk-6JXHXIEH.js} +2 -2
  21. package/dist/{chunk-B7QWZ5SW.js → chunk-6TRD7ZW4.js} +6 -6
  22. package/dist/{chunk-UQM35MAO.js → chunk-6TUDUOGC.js} +3 -3
  23. package/dist/{chunk-ZTN4X5FN.js → chunk-7EXSMZ2O.js} +1 -1
  24. package/dist/{chunk-OFSPZUQD.js → chunk-7F5X6F7X.js} +3 -3
  25. package/dist/{chunk-MEFZZE4M.js → chunk-7VXRBTRF.js} +6 -6
  26. package/dist/{chunk-JNJALNRR.js → chunk-7WG7XPXC.js} +3 -3
  27. package/dist/{chunk-KY7JZ54O.js → chunk-7X2N4VZM.js} +1 -1
  28. package/dist/{chunk-WJWCTCWZ.js → chunk-7ZO5UNTJ.js} +3 -3
  29. package/dist/{chunk-QYXI45KH.js → chunk-A74POWYY.js} +3 -3
  30. package/dist/{chunk-AKD4YMJU.js → chunk-AMZWDLJ4.js} +1 -1
  31. package/dist/{chunk-N6TMHITU.js → chunk-AQZPGOEZ.js} +3 -3
  32. package/dist/{chunk-SVHD6WCJ.js → chunk-ARXUKGZI.js} +4 -4
  33. package/dist/{chunk-EOEMOXNT.js → chunk-ATAQRXTH.js} +2 -2
  34. package/dist/{chunk-545Q34YU.js → chunk-AV7ELXHG.js} +3 -3
  35. package/dist/{chunk-I6Q3WUDT.js → chunk-B5OH43PR.js} +1 -1
  36. package/dist/{chunk-VWPSQQ7E.js → chunk-B5VRZ2VJ.js} +4 -4
  37. package/dist/{chunk-YX3XMDDI.js → chunk-B6L5XV7O.js} +26 -9
  38. package/dist/{chunk-Q26CQW7T.js → chunk-BBE4RXR7.js} +4 -4
  39. package/dist/{chunk-A7TN46LC.js → chunk-BFZR62LZ.js} +5 -5
  40. package/dist/{chunk-L25BNU3E.js → chunk-BW4QO7T6.js} +2 -2
  41. package/dist/{chunk-CDLCZB6F.js → chunk-C5CBJC6V.js} +3 -3
  42. package/dist/{chunk-AHDPGRXS.js → chunk-CCNZFZW6.js} +1 -1
  43. package/dist/{chunk-LHIVUV7Q.js → chunk-CRJUFA73.js} +3 -3
  44. package/dist/{chunk-TBMRGMRP.js → chunk-D2KXIKI4.js} +5 -5
  45. package/dist/{chunk-GDWEDUHO.js → chunk-D73ZJQMX.js} +1 -1
  46. package/dist/{chunk-DEEJBDJE.js → chunk-E27YZK7O.js} +2 -2
  47. package/dist/{chunk-MRJE6OX5.js → chunk-EK4TL7VW.js} +2 -2
  48. package/dist/{chunk-57W32BFZ.js → chunk-ERFD6YAW.js} +1 -1
  49. package/dist/{chunk-BJSEYZBH.js → chunk-ERKJJDY6.js} +7 -17
  50. package/dist/{chunk-2QH66EVQ.js → chunk-F3R3UYBF.js} +1 -1
  51. package/dist/{chunk-3X7D3NV4.js → chunk-G4GT4X3J.js} +13 -13
  52. package/dist/{chunk-WSXOKK6N.js → chunk-G4LJN4OZ.js} +2 -2
  53. package/dist/{chunk-WBWDJUF5.js → chunk-G4SNTXJ3.js} +37 -13
  54. package/dist/{chunk-NQUYNPSD.js → chunk-GDTZMX3L.js} +4 -4
  55. package/dist/{chunk-RVL5ROWQ.js → chunk-GF3DKZIW.js} +2 -2
  56. package/dist/{chunk-G2CKET5G.js → chunk-GH3U4WRE.js} +1 -1
  57. package/dist/{chunk-NW3JIRFK.js → chunk-GJO2MPC3.js} +2 -2
  58. package/dist/{chunk-LGAV5UU2.js → chunk-GJYHMHTU.js} +3 -3
  59. package/dist/{chunk-MGBNIDTP.js → chunk-GORISA3L.js} +8 -3
  60. package/dist/{chunk-WDUFQFDP.js → chunk-GPOSTBDQ.js} +2 -2
  61. package/dist/{chunk-VB64KFBD.js → chunk-GSSHHVHF.js} +23 -11
  62. package/dist/{chunk-N54KGJPU.js → chunk-GSUCBWML.js} +1 -1
  63. package/dist/{chunk-LNV2E4I6.js → chunk-GTCCVI45.js} +1 -1
  64. package/dist/{chunk-GBLNXNEH.js → chunk-HIZ7USIF.js} +2 -2
  65. package/dist/{chunk-3LVCK2NQ.js → chunk-HX4MPCVV.js} +5 -5
  66. package/dist/{chunk-CVFVL5FL.js → chunk-I4NT6G2T.js} +3 -3
  67. package/dist/{chunk-LMQSV5UK.js → chunk-IKZB26SK.js} +3 -3
  68. package/dist/{chunk-TFZOOP3V.js → chunk-IMAFMUZ7.js} +3 -3
  69. package/dist/{chunk-QXPMO2CO.js → chunk-IOUNOHP7.js} +4 -4
  70. package/dist/{chunk-IJEZ7G7S.js → chunk-IRUFNC4L.js} +2 -2
  71. package/dist/{chunk-YJWLWUFK.js → chunk-J2MAXMIP.js} +2 -2
  72. package/dist/{chunk-ZG2XGO44.js → chunk-J5NLAZV2.js} +3 -3
  73. package/dist/{chunk-QOKDGW3F.js → chunk-JIYLTMVL.js} +2 -12
  74. package/dist/{chunk-XY3ZVORI.js → chunk-JJAIVUVD.js} +5 -5
  75. package/dist/{chunk-7UQZH2OH.js → chunk-JKSABDFT.js} +4 -4
  76. package/dist/chunk-JLRMET4V.js +49 -0
  77. package/dist/{chunk-GDX3YQGK.js → chunk-JRORMRVN.js} +15 -5
  78. package/dist/{chunk-XHZ5L4FO.js → chunk-K2PNAQI4.js} +1 -1
  79. package/dist/{chunk-NOAU2JG7.js → chunk-KG65BFPK.js} +2 -2
  80. package/dist/{chunk-KMCJIL57.js → chunk-KXYDTC4A.js} +1 -1
  81. package/dist/{chunk-JXACXHRL.js → chunk-KYAHURXN.js} +4 -4
  82. package/dist/{chunk-XRRPEBKB.js → chunk-LG3KM5V3.js} +1 -1
  83. package/dist/{chunk-FRY3TNJ6.js → chunk-LON5THYQ.js} +2 -2
  84. package/dist/{chunk-SOQOAFB2.js → chunk-LUIYCIF7.js} +3 -3
  85. package/dist/{chunk-WVDYHSHD.js → chunk-MFMQO6IS.js} +3 -3
  86. package/dist/{chunk-IHXRF3BH.js → chunk-MNYVAEXK.js} +1 -1
  87. package/dist/{chunk-F3NGZYL2.js → chunk-MREY2W7N.js} +2 -2
  88. package/dist/{chunk-VSGKVZB4.js → chunk-MRNRC45L.js} +2 -2
  89. package/dist/{chunk-2KG2G35D.js → chunk-MWBEE6VI.js} +6 -6
  90. package/dist/{chunk-WC2IYFGC.js → chunk-N5VOFGF3.js} +3 -3
  91. package/dist/{chunk-SS56XFLI.js → chunk-O4L6RI5S.js} +1 -1
  92. package/dist/{chunk-F6LCSFSU.js → chunk-PBQGXOVX.js} +2 -2
  93. package/dist/{chunk-YUBXS7YI.js → chunk-PBVP7CFZ.js} +1 -1
  94. package/dist/{chunk-WPW4HXW4.js → chunk-PX535BHW.js} +3 -3
  95. package/dist/{chunk-TLBY3DUK.js → chunk-Q66VOVGN.js} +2 -2
  96. package/dist/{chunk-FDRQUDFH.js → chunk-R463CTX4.js} +3 -3
  97. package/dist/{chunk-2O72OV5X.js → chunk-RJGYONRO.js} +2 -2
  98. package/dist/{chunk-UCYQNHST.js → chunk-STMAKLLG.js} +2 -2
  99. package/dist/{chunk-2TO7WUKK.js → chunk-THUQVCTI.js} +1 -1
  100. package/dist/{chunk-ZRDPJORV.js → chunk-TN75NAPU.js} +1 -1
  101. package/dist/{chunk-AUDUYK5B.js → chunk-UBASOMP5.js} +4 -4
  102. package/dist/{chunk-YTXCKIWE.js → chunk-UMRKMF3E.js} +2 -2
  103. package/dist/{chunk-57HPJEZB.js → chunk-UQ3Z3ZAF.js} +7 -7
  104. package/dist/{chunk-WMJ5M45N.js → chunk-V6YD53NH.js} +2 -2
  105. package/dist/{chunk-62Q7DN5G.js → chunk-VC2E6KYQ.js} +2 -2
  106. package/dist/{chunk-WLXAEHKK.js → chunk-VDRLJU6C.js} +9 -9
  107. package/dist/{chunk-D6MIC5AU.js → chunk-VJE4HA2C.js} +3 -3
  108. package/dist/{chunk-34IDAA7V.js → chunk-VNDL2E44.js} +3 -3
  109. package/dist/{chunk-ENETIGKL.js → chunk-VPRTPW7C.js} +3 -3
  110. package/dist/{chunk-ON4ENPUS.js → chunk-VUYS3SU7.js} +1 -1
  111. package/dist/{chunk-PT4FA7U4.js → chunk-W7PEL3DX.js} +9 -9
  112. package/dist/{chunk-HT7HEGH3.js → chunk-WIQAPWTY.js} +2 -2
  113. package/dist/{chunk-EZC6ETFW.js → chunk-WP233RH2.js} +2 -2
  114. package/dist/{chunk-TRBKJ7JT.js → chunk-WWOYFWFB.js} +1 -1
  115. package/dist/{chunk-34WAGUT5.js → chunk-X7FGBUA4.js} +2 -2
  116. package/dist/{chunk-SNTLJ646.js → chunk-XQIAXMRY.js} +1 -1
  117. package/dist/{chunk-X2UP5PNN.js → chunk-YSPIFSDI.js} +8 -8
  118. package/dist/{chunk-CRMXLNLC.js → chunk-ZCLKRGZ4.js} +6 -6
  119. package/dist/{chunk-UKE7WA3U.js → chunk-ZLYBY3R4.js} +3 -3
  120. package/dist/{chunk-QXIQB6OF.js → chunk-ZOWEW4GY.js} +3 -3
  121. package/dist/{chunk-7DMKTJHU.js → chunk-ZTRASVGZ.js} +16 -7
  122. package/dist/core/auth/config.js +14 -0
  123. package/dist/{auth → core/auth}/email/index.d.ts +1 -0
  124. package/dist/core/auth/email/index.js +11 -0
  125. package/dist/core/auth/email/sender.js +7 -0
  126. package/dist/{auth/core → core/auth}/email/token-generator.js +1 -1
  127. package/dist/{auth → core/auth}/errors/index.js +2 -2
  128. package/dist/{auth → core/auth}/index.d.ts +7 -7
  129. package/dist/{auth → core/auth}/index.js +23 -22
  130. package/dist/{auth/core → core/auth}/jwt/client.js +1 -1
  131. package/dist/{auth/core → core/auth}/jwt/cookie.d.ts +1 -1
  132. package/dist/core/auth/jwt/cookie.js +13 -0
  133. package/dist/{auth/core → core/auth}/jwt/index.d.ts +1 -1
  134. package/dist/core/auth/jwt/index.js +20 -0
  135. package/dist/{auth/core → core/auth}/jwt/types.d.ts +1 -1
  136. package/dist/{auth/core → core/auth}/jwt/types.js +1 -1
  137. package/dist/{auth/core → core/auth}/oauth/index.d.ts +5 -3
  138. package/dist/core/auth/oauth/index.js +45 -0
  139. package/dist/{auth/core → core/auth}/oauth/providers/github.d.ts +1 -1
  140. package/dist/{auth/core → core/auth}/oauth/providers/github.js +2 -2
  141. package/dist/{auth/core → core/auth}/oauth/providers/google.d.ts +1 -1
  142. package/dist/{auth/core → core/auth}/oauth/providers/google.js +2 -2
  143. package/dist/{auth/core → core/auth}/oauth/providers/index.js +7 -7
  144. package/dist/{auth/core → core/auth}/oauth/providers/kakao.d.ts +1 -1
  145. package/dist/{auth/core → core/auth}/oauth/providers/kakao.js +2 -2
  146. package/dist/{auth/core → core/auth}/oauth/providers/meta.d.ts +1 -1
  147. package/dist/{auth/core → core/auth}/oauth/providers/meta.js +2 -2
  148. package/dist/{auth/core → core/auth}/oauth/providers/microsoft.d.ts +6 -6
  149. package/dist/{auth/core → core/auth}/oauth/providers/microsoft.js +2 -2
  150. package/dist/core/auth/oauth/state-cookie.d.ts +28 -0
  151. package/dist/core/auth/oauth/state-cookie.js +15 -0
  152. package/dist/{auth/core → core/auth}/password/client-helper.d.ts +3 -3
  153. package/dist/{auth/core → core/auth}/password/client-helper.js +3 -3
  154. package/dist/{auth/core → core/auth}/password/index.d.ts +3 -3
  155. package/dist/{auth/core → core/auth}/password/index.js +2 -2
  156. package/dist/core/auth/services/email-verification.service.js +10 -0
  157. package/dist/core/auth/services/index.js +36 -0
  158. package/dist/core/auth/services/login.service.js +14 -0
  159. package/dist/core/auth/services/oauth-callback.service.js +14 -0
  160. package/dist/core/auth/services/password-reset.service.js +10 -0
  161. package/dist/core/auth/services/register.service.js +10 -0
  162. package/dist/core/auth/services/token-refresh.service.js +14 -0
  163. package/dist/{auth → core/auth}/types/index.js +2 -2
  164. package/dist/core/cache/cache-config.js +15 -0
  165. package/dist/{cache → core/cache}/cache-defaults.js +2 -2
  166. package/dist/{cache → core/cache}/cache-env.d.ts +3 -3
  167. package/dist/{cache → core/cache}/cache-env.js +7 -7
  168. package/dist/{cache → core/cache}/cache-factory.d.ts +1 -1
  169. package/dist/core/cache/cache-factory.js +33 -0
  170. package/dist/{cache → core/cache}/cache-invalidation.d.ts +3 -3
  171. package/dist/core/cache/cache-invalidation.js +29 -0
  172. package/dist/{cache → core/cache}/cache-redis.js +10 -10
  173. package/dist/{cache → core/cache}/cache-types.js +2 -2
  174. package/dist/core/cache/cache-wrapper.js +27 -0
  175. package/dist/{cache → core/cache}/cache.d.ts +1 -1
  176. package/dist/{cache → core/cache}/cache.js +20 -20
  177. package/dist/{cache → core/cache}/config.d.ts +5 -0
  178. package/dist/core/cache/config.js +15 -0
  179. package/dist/core/cache/hybrid-cache-manager.js +18 -0
  180. package/dist/{cache → core/cache}/index.js +20 -20
  181. package/dist/core/cache/inmemory-cache-manager.js +12 -0
  182. package/dist/core/cache/noop-cache-manager.js +14 -0
  183. package/dist/core/cache/redis-cache-manager.js +16 -0
  184. package/dist/core/config/common.js +13 -0
  185. package/dist/core/config/errors.js +7 -0
  186. package/dist/{config → core/config}/registry.d.ts +1 -1
  187. package/dist/{config → core/config}/registry.js +2 -2
  188. package/dist/core/config/warn.js +7 -0
  189. package/dist/{constants → core/constants}/error-codes.js +2 -2
  190. package/dist/{constants → core/constants}/index.js +19 -19
  191. package/dist/{constants → core/constants}/messages.js +2 -2
  192. package/dist/{constants → core/constants}/pagination.js +2 -2
  193. package/dist/{constants → core/constants}/security.js +2 -2
  194. package/dist/{constants → core/constants}/validation.js +2 -2
  195. package/dist/core/cors/index.js +13 -0
  196. package/dist/{error → core/error}/app-error.d.ts +2 -2
  197. package/dist/core/error/app-error.js +10 -0
  198. package/dist/core/error/extract-error-info.d.ts +11 -0
  199. package/dist/core/error/extract-error-info.js +7 -0
  200. package/dist/core/error/friendly-messages-v2.js +15 -0
  201. package/dist/{error → core/error}/friendly-messages.js +3 -3
  202. package/dist/core/error/index.d.ts +12 -0
  203. package/dist/core/error/index.js +59 -0
  204. package/dist/core/error/messages/en.js +7 -0
  205. package/dist/{error → core/error}/messages/index.js +4 -4
  206. package/dist/core/error/messages/ko.js +7 -0
  207. package/dist/{geolocation → core/geolocation}/batch-processor.d.ts +1 -1
  208. package/dist/core/geolocation/batch-processor.js +13 -0
  209. package/dist/{geolocation → core/geolocation}/config.js +4 -4
  210. package/dist/{geolocation → core/geolocation}/index.d.ts +3 -3
  211. package/dist/core/geolocation/index.js +40 -0
  212. package/dist/{geolocation → core/geolocation}/providers/base-provider.d.ts +2 -2
  213. package/dist/{geolocation → core/geolocation}/providers/base-provider.js +2 -2
  214. package/dist/{geolocation → core/geolocation}/providers/index.d.ts +1 -1
  215. package/dist/core/geolocation/providers/index.js +32 -0
  216. package/dist/{geolocation → core/geolocation}/providers/ip-api-provider.d.ts +2 -2
  217. package/dist/core/geolocation/providers/ip-api-provider.js +8 -0
  218. package/dist/{geolocation → core/geolocation}/providers/ipapi-co-provider.d.ts +2 -2
  219. package/dist/core/geolocation/providers/ipapi-co-provider.js +8 -0
  220. package/dist/{geolocation → core/geolocation}/providers/ipgeolocation-provider.d.ts +2 -2
  221. package/dist/core/geolocation/providers/ipgeolocation-provider.js +11 -0
  222. package/dist/{geolocation → core/geolocation}/providers/maxmind-provider.d.ts +2 -2
  223. package/dist/core/geolocation/providers/maxmind-provider.js +11 -0
  224. package/dist/core/logger/config.js +13 -0
  225. package/dist/{logger → core/logger}/logger.js +5 -5
  226. package/dist/core/storage/config.js +13 -0
  227. package/dist/{storage → core/storage}/r2-storage.js +7 -7
  228. package/dist/core/system/cpu.js +12 -0
  229. package/dist/core/system/disk.js +12 -0
  230. package/dist/core/system/environment.js +18 -0
  231. package/dist/{system → core/system}/health-check.d.ts +1 -1
  232. package/dist/core/system/health-check.js +15 -0
  233. package/dist/{system → core/system}/index.js +24 -24
  234. package/dist/core/system/memory.js +12 -0
  235. package/dist/core/system/network.js +12 -0
  236. package/dist/{system → core/system}/utils.js +6 -6
  237. package/dist/{types → core/types}/env.d.ts +7 -7
  238. package/dist/{types → core/types}/qr-code.js +2 -2
  239. package/dist/{utils → core/utils}/error-message-formatter.js +2 -2
  240. package/dist/{utils → core/utils}/format-number.js +2 -2
  241. package/dist/core/utils/index.d.ts +9 -0
  242. package/dist/core/utils/index.js +71 -0
  243. package/dist/{utils → core/utils}/input-validation.js +2 -2
  244. package/dist/{utils → core/utils}/ip-utils.js +2 -2
  245. package/dist/{utils → core/utils}/optimistic-lock.js +4 -4
  246. package/dist/{utils → core/utils}/sanitizer.js +2 -2
  247. package/dist/{utils → core/utils}/short-code-generator.js +2 -2
  248. package/dist/{utils → core/utils}/timezone.js +2 -2
  249. package/dist/{utils → core/utils}/type-guards.js +2 -2
  250. package/dist/{utils → core/utils}/url-normalizer.js +2 -2
  251. package/dist/{validators → core/validators}/index.js +2 -2
  252. package/dist/{validators → core/validators}/password-validator.js +2 -2
  253. package/dist/initialize.d.ts +10 -10
  254. package/dist/initialize.js +14 -14
  255. package/dist/{auth/handlers → next/auth-handlers}/forgot-password.handler.d.ts +1 -1
  256. package/dist/next/auth-handlers/forgot-password.handler.js +11 -0
  257. package/dist/{auth/handlers → next/auth-handlers}/index.d.ts +1 -1
  258. package/dist/{auth/handlers → next/auth-handlers}/index.js +43 -42
  259. package/dist/{auth/handlers → next/auth-handlers}/login.handler.d.ts +1 -1
  260. package/dist/next/auth-handlers/login.handler.js +14 -0
  261. package/dist/{auth/handlers → next/auth-handlers}/logout.handler.d.ts +1 -1
  262. package/dist/next/auth-handlers/logout.handler.js +12 -0
  263. package/dist/{auth/handlers → next/auth-handlers}/me.handler.d.ts +1 -1
  264. package/dist/next/auth-handlers/me.handler.js +14 -0
  265. package/dist/{auth/handlers → next/auth-handlers}/oauth-authorize.handler.d.ts +1 -1
  266. package/dist/next/auth-handlers/oauth-authorize.handler.js +17 -0
  267. package/dist/{auth/handlers → next/auth-handlers}/oauth-callback.handler.d.ts +1 -1
  268. package/dist/next/auth-handlers/oauth-callback.handler.js +24 -0
  269. package/dist/{auth/handlers → next/auth-handlers}/refresh.handler.d.ts +1 -1
  270. package/dist/next/auth-handlers/refresh.handler.js +15 -0
  271. package/dist/{auth/handlers → next/auth-handlers}/register.handler.d.ts +1 -1
  272. package/dist/next/auth-handlers/register.handler.js +11 -0
  273. package/dist/{auth/handlers → next/auth-handlers}/reset-password.handler.d.ts +1 -1
  274. package/dist/next/auth-handlers/reset-password.handler.js +11 -0
  275. package/dist/{auth/handlers → next/auth-handlers}/verify-email.handler.d.ts +1 -1
  276. package/dist/next/auth-handlers/verify-email.handler.js +11 -0
  277. package/dist/{auth/types → next/auth-types}/handler-types.d.ts +1 -1
  278. package/dist/next/auth-types/handler-types.js +1 -0
  279. package/dist/next/auth-types/index.d.ts +7 -0
  280. package/dist/next/auth-types/index.js +1 -0
  281. package/dist/next/error/error-handler.js +24 -0
  282. package/dist/next/error/index.d.ts +9 -0
  283. package/dist/{error → next/error}/index.js +19 -74
  284. package/dist/{error/core → next/error}/locale-detector.d.ts +1 -1
  285. package/dist/{error/core → next/error}/locale-detector.js +1 -1
  286. package/dist/{middleware → next/middleware}/auth.d.ts +2 -2
  287. package/dist/next/middleware/auth.js +28 -0
  288. package/dist/{middleware → next/middleware}/cors.d.ts +1 -1
  289. package/dist/next/middleware/cors.js +16 -0
  290. package/dist/next/middleware/error-handler.js +18 -0
  291. package/dist/{middleware → next/middleware}/index.js +27 -27
  292. package/dist/next/middleware/init-request.js +8 -0
  293. package/dist/next/middleware/middleware-chain.js +11 -0
  294. package/dist/{middleware → next/middleware}/rate-limit.d.ts +1 -1
  295. package/dist/next/middleware/rate-limit.js +17 -0
  296. package/dist/next/middleware/response-logger.js +11 -0
  297. package/dist/next/middleware/security.js +15 -0
  298. package/dist/{middleware → next/middleware}/types.d.ts +1 -1
  299. package/dist/next/middleware/wrappers.js +40 -0
  300. package/dist/{utils → next/utils}/api-helpers.js +3 -3
  301. package/dist/{utils → next/utils}/cors.js +6 -6
  302. package/dist/next/utils/csv-export-format.d.ts +11 -0
  303. package/dist/next/utils/csv-export-format.js +15 -0
  304. package/dist/{utils → next/utils}/csv-export.d.ts +0 -2
  305. package/dist/{utils → next/utils}/csv-export.js +6 -6
  306. package/dist/{utils → next/utils}/error-processor.d.ts +1 -1
  307. package/dist/{utils → next/utils}/error-processor.js +8 -8
  308. package/dist/{utils → next/utils}/index.d.ts +2 -5
  309. package/dist/{utils → next/utils}/index.js +32 -100
  310. package/dist/{auth/adapters/prisma → prisma/auth-adapter}/index.d.ts +1 -1
  311. package/dist/{auth/adapters/prisma → prisma/auth-adapter}/index.js +2 -2
  312. package/dist/react/components/ui/Alert.js +10 -0
  313. package/dist/react/components/ui/Badge.js +8 -0
  314. package/dist/react/components/ui/Button.js +8 -0
  315. package/dist/react/components/ui/DataTable.js +22 -0
  316. package/dist/{components → react/components}/ui/DomainDisplay.js +2 -2
  317. package/dist/react/components/ui/Input.js +8 -0
  318. package/dist/react/components/ui/Label.js +8 -0
  319. package/dist/{components → react/components}/ui/Pagination.js +3 -3
  320. package/dist/{components → react/components}/ui/Select.js +3 -3
  321. package/dist/react/components/ui/Skeleton.js +8 -0
  322. package/dist/{components → react/components}/ui/TimezoneDisplay.js +7 -7
  323. package/dist/{components → react/components}/ui/Tooltip.js +3 -3
  324. package/dist/react/components/ui/data-table/DataTable.js +22 -0
  325. package/dist/react/components/ui/data-table/DataTableBody.js +10 -0
  326. package/dist/react/components/ui/data-table/DataTableBulkActions.js +12 -0
  327. package/dist/react/components/ui/data-table/DataTableFilters.js +13 -0
  328. package/dist/react/components/ui/data-table/DataTablePagination.js +11 -0
  329. package/dist/react/components/ui/data-table/DataTableSearch.js +12 -0
  330. package/dist/react/components/ui/data-table/index.js +42 -0
  331. package/dist/{components → react/components}/ui/data-table/types.d.ts +5 -0
  332. package/dist/{components → react/components}/ui/data-table/types.js +2 -2
  333. package/dist/{components → react/components}/ui/loading-bar.js +3 -3
  334. package/dist/{error → react/error}/error-display.d.ts +2 -9
  335. package/dist/{error → react/error}/error-display.js +11 -9
  336. package/dist/react/error/index.d.ts +6 -0
  337. package/dist/react/error/index.js +30 -0
  338. package/dist/{hooks → react/hooks}/useDataTable.js +3 -3
  339. package/dist/react/hooks/useDebounce.js +7 -0
  340. package/dist/{hooks → react/hooks}/useExitIntent.js +2 -2
  341. package/dist/{hooks → react/hooks}/useTimezone.js +3 -3
  342. package/dist/{utils/client → react/utils}/client-utils.js +1 -1
  343. package/dist/{utils/client → react/utils}/qr-code.d.ts +1 -1
  344. package/dist/{utils/client → react/utils}/qr-code.js +1 -1
  345. package/package.json +147 -95
  346. package/dist/auth/config.js +0 -14
  347. package/dist/auth/core/jwt/cookie.js +0 -13
  348. package/dist/auth/core/jwt/index.js +0 -20
  349. package/dist/auth/core/oauth/index.js +0 -33
  350. package/dist/auth/email/index.js +0 -7
  351. package/dist/auth/email/sender.js +0 -7
  352. package/dist/auth/handlers/forgot-password.handler.js +0 -11
  353. package/dist/auth/handlers/login.handler.js +0 -14
  354. package/dist/auth/handlers/logout.handler.js +0 -12
  355. package/dist/auth/handlers/me.handler.js +0 -14
  356. package/dist/auth/handlers/oauth-authorize.handler.js +0 -16
  357. package/dist/auth/handlers/oauth-callback.handler.js +0 -23
  358. package/dist/auth/handlers/refresh.handler.js +0 -15
  359. package/dist/auth/handlers/register.handler.js +0 -11
  360. package/dist/auth/handlers/reset-password.handler.js +0 -11
  361. package/dist/auth/handlers/verify-email.handler.js +0 -11
  362. package/dist/auth/services/email-verification.service.js +0 -10
  363. package/dist/auth/services/index.js +0 -36
  364. package/dist/auth/services/login.service.js +0 -14
  365. package/dist/auth/services/oauth-callback.service.js +0 -14
  366. package/dist/auth/services/password-reset.service.js +0 -10
  367. package/dist/auth/services/register.service.js +0 -10
  368. package/dist/auth/services/token-refresh.service.js +0 -14
  369. package/dist/cache/cache-config.js +0 -15
  370. package/dist/cache/cache-factory.js +0 -33
  371. package/dist/cache/cache-invalidation.js +0 -29
  372. package/dist/cache/cache-wrapper.js +0 -27
  373. package/dist/cache/config.js +0 -13
  374. package/dist/cache/hybrid-cache-manager.js +0 -18
  375. package/dist/cache/inmemory-cache-manager.js +0 -12
  376. package/dist/cache/noop-cache-manager.js +0 -14
  377. package/dist/cache/redis-cache-manager.js +0 -16
  378. package/dist/components/ui/Alert.js +0 -10
  379. package/dist/components/ui/Badge.js +0 -8
  380. package/dist/components/ui/Button.js +0 -8
  381. package/dist/components/ui/DataTable.js +0 -22
  382. package/dist/components/ui/Input.js +0 -8
  383. package/dist/components/ui/Label.js +0 -8
  384. package/dist/components/ui/Skeleton.js +0 -8
  385. package/dist/components/ui/WorldMapChart.d.ts +0 -17
  386. package/dist/components/ui/WorldMapChart.js +0 -250
  387. package/dist/components/ui/data-table/DataTable.js +0 -22
  388. package/dist/components/ui/data-table/DataTableBody.js +0 -10
  389. package/dist/components/ui/data-table/DataTableBulkActions.js +0 -12
  390. package/dist/components/ui/data-table/DataTableFilters.js +0 -13
  391. package/dist/components/ui/data-table/DataTablePagination.js +0 -11
  392. package/dist/components/ui/data-table/DataTableSearch.js +0 -12
  393. package/dist/components/ui/data-table/index.js +0 -42
  394. package/dist/config/common.js +0 -13
  395. package/dist/config/errors.js +0 -7
  396. package/dist/config/warn.js +0 -7
  397. package/dist/error/app-error.js +0 -10
  398. package/dist/error/error-handler.js +0 -24
  399. package/dist/error/friendly-messages-v2.js +0 -15
  400. package/dist/error/index.d.ts +0 -22
  401. package/dist/error/messages/en.js +0 -7
  402. package/dist/error/messages/ko.js +0 -7
  403. package/dist/geolocation/batch-processor.js +0 -13
  404. package/dist/geolocation/index.js +0 -40
  405. package/dist/geolocation/providers/index.js +0 -32
  406. package/dist/geolocation/providers/ip-api-provider.js +0 -8
  407. package/dist/geolocation/providers/ipapi-co-provider.js +0 -8
  408. package/dist/geolocation/providers/ipgeolocation-provider.js +0 -11
  409. package/dist/geolocation/providers/maxmind-provider.js +0 -11
  410. package/dist/hooks/useDebounce.js +0 -7
  411. package/dist/logger/config.js +0 -13
  412. package/dist/middleware/auth.js +0 -28
  413. package/dist/middleware/cors-config.js +0 -13
  414. package/dist/middleware/cors.js +0 -16
  415. package/dist/middleware/error-handler.js +0 -18
  416. package/dist/middleware/init-request.js +0 -8
  417. package/dist/middleware/middleware-chain.js +0 -11
  418. package/dist/middleware/rate-limit.js +0 -17
  419. package/dist/middleware/response-logger.js +0 -11
  420. package/dist/middleware/security.js +0 -15
  421. package/dist/middleware/wrappers.js +0 -40
  422. package/dist/storage/config.js +0 -13
  423. package/dist/system/cpu.js +0 -12
  424. package/dist/system/disk.js +0 -12
  425. package/dist/system/environment.js +0 -18
  426. package/dist/system/health-check.js +0 -15
  427. package/dist/system/memory.js +0 -12
  428. package/dist/system/network.js +0 -12
  429. package/dist/world_countries-C2WUL2CQ.js +0 -279
  430. /package/dist/{auth/types/handler-types.js → chunk-7PEVOMBO.js} +0 -0
  431. /package/dist/{chunk-6CLQRZC2.js → chunk-CDALZTPN.js} +0 -0
  432. /package/dist/{chunk-EBUEBEJX.js → chunk-HH4ZKZHD.js} +0 -0
  433. /package/dist/{chunk-R4SXQYIT.js → chunk-M22Z2NO6.js} +0 -0
  434. /package/dist/{auth → core/auth}/config.d.ts +0 -0
  435. /package/dist/{auth → core/auth}/email/sender.d.ts +0 -0
  436. /package/dist/{auth/core → core/auth}/email/token-generator.d.ts +0 -0
  437. /package/dist/{auth → core/auth}/errors/index.d.ts +0 -0
  438. /package/dist/{auth/core → core/auth}/jwt/client.d.ts +0 -0
  439. /package/dist/{auth/core → core/auth}/oauth/providers/index.d.ts +0 -0
  440. /package/dist/{auth → core/auth}/services/email-verification.service.d.ts +0 -0
  441. /package/dist/{auth → core/auth}/services/index.d.ts +0 -0
  442. /package/dist/{auth → core/auth}/services/login.service.d.ts +0 -0
  443. /package/dist/{auth → core/auth}/services/oauth-callback.service.d.ts +0 -0
  444. /package/dist/{auth → core/auth}/services/password-reset.service.d.ts +0 -0
  445. /package/dist/{auth → core/auth}/services/register.service.d.ts +0 -0
  446. /package/dist/{auth → core/auth}/services/token-refresh.service.d.ts +0 -0
  447. /package/dist/{auth → core/auth}/types/index.d.ts +0 -0
  448. /package/dist/{cache → core/cache}/cache-config.d.ts +0 -0
  449. /package/dist/{cache → core/cache}/cache-defaults.d.ts +0 -0
  450. /package/dist/{cache → core/cache}/cache-redis.d.ts +0 -0
  451. /package/dist/{cache → core/cache}/cache-types.d.ts +0 -0
  452. /package/dist/{cache → core/cache}/cache-wrapper.d.ts +0 -0
  453. /package/dist/{cache → core/cache}/hybrid-cache-manager.d.ts +0 -0
  454. /package/dist/{cache → core/cache}/index.d.ts +0 -0
  455. /package/dist/{cache → core/cache}/inmemory-cache-manager.d.ts +0 -0
  456. /package/dist/{cache → core/cache}/noop-cache-manager.d.ts +0 -0
  457. /package/dist/{cache → core/cache}/redis-cache-manager.d.ts +0 -0
  458. /package/dist/{config → core/config}/common.d.ts +0 -0
  459. /package/dist/{config → core/config}/errors.d.ts +0 -0
  460. /package/dist/{config → core/config}/warn.d.ts +0 -0
  461. /package/dist/{constants → core/constants}/error-codes.d.ts +0 -0
  462. /package/dist/{constants → core/constants}/index.d.ts +0 -0
  463. /package/dist/{constants → core/constants}/messages.d.ts +0 -0
  464. /package/dist/{constants → core/constants}/pagination.d.ts +0 -0
  465. /package/dist/{constants → core/constants}/security.d.ts +0 -0
  466. /package/dist/{constants → core/constants}/validation.d.ts +0 -0
  467. /package/dist/{middleware/cors-config.d.ts → core/cors/index.d.ts} +0 -0
  468. /package/dist/{error → core/error}/friendly-messages-v2.d.ts +0 -0
  469. /package/dist/{error → core/error}/friendly-messages.d.ts +0 -0
  470. /package/dist/{error → core/error}/messages/en.d.ts +0 -0
  471. /package/dist/{error → core/error}/messages/index.d.ts +0 -0
  472. /package/dist/{error → core/error}/messages/ko.d.ts +0 -0
  473. /package/dist/{error → core/error}/messages/types.d.ts +0 -0
  474. /package/dist/{error → core/error}/messages/types.js +0 -0
  475. /package/dist/{geolocation → core/geolocation}/config.d.ts +0 -0
  476. /package/dist/{logger → core/logger}/config.d.ts +0 -0
  477. /package/dist/{logger → core/logger}/logger.d.ts +0 -0
  478. /package/dist/{storage → core/storage}/config.d.ts +0 -0
  479. /package/dist/{storage → core/storage}/r2-storage.d.ts +0 -0
  480. /package/dist/{system → core/system}/cpu.d.ts +0 -0
  481. /package/dist/{system → core/system}/disk.d.ts +0 -0
  482. /package/dist/{system → core/system}/environment.d.ts +0 -0
  483. /package/dist/{system → core/system}/index.d.ts +0 -0
  484. /package/dist/{system → core/system}/memory.d.ts +0 -0
  485. /package/dist/{system → core/system}/network.d.ts +0 -0
  486. /package/dist/{system → core/system}/types.d.ts +0 -0
  487. /package/dist/{middleware → core/system}/types.js +0 -0
  488. /package/dist/{system → core/system}/utils.d.ts +0 -0
  489. /package/dist/{types → core/types}/api.d.ts +0 -0
  490. /package/dist/{types → core/types}/api.js +0 -0
  491. /package/dist/{types → core/types}/database.d.ts +0 -0
  492. /package/dist/{types → core/types}/database.js +0 -0
  493. /package/dist/{types → core/types}/env.js +0 -0
  494. /package/dist/{types → core/types}/geoip.d.ts +0 -0
  495. /package/dist/{types → core/types}/geoip.js +0 -0
  496. /package/dist/{types → core/types}/i18n.d.ts +0 -0
  497. /package/dist/{types → core/types}/i18n.js +0 -0
  498. /package/dist/{types → core/types}/qr-code.d.ts +0 -0
  499. /package/dist/{types → core/types}/user.d.ts +0 -0
  500. /package/dist/{types → core/types}/user.js +0 -0
  501. /package/dist/{utils → core/utils}/error-message-formatter.d.ts +0 -0
  502. /package/dist/{utils → core/utils}/format-number.d.ts +0 -0
  503. /package/dist/{utils → core/utils}/input-validation.d.ts +0 -0
  504. /package/dist/{utils → core/utils}/ip-utils.d.ts +0 -0
  505. /package/dist/{utils → core/utils}/optimistic-lock.d.ts +0 -0
  506. /package/dist/{utils → core/utils}/sanitizer.d.ts +0 -0
  507. /package/dist/{utils → core/utils}/short-code-generator.d.ts +0 -0
  508. /package/dist/{utils → core/utils}/timezone.d.ts +0 -0
  509. /package/dist/{utils → core/utils}/type-guards.d.ts +0 -0
  510. /package/dist/{utils → core/utils}/url-normalizer.d.ts +0 -0
  511. /package/dist/{validators → core/validators}/index.d.ts +0 -0
  512. /package/dist/{validators → core/validators}/password-validator.d.ts +0 -0
  513. /package/dist/{error → next/error}/ErrorBoundary.d.ts +0 -0
  514. /package/dist/{error → next/error}/error-handler.d.ts +0 -0
  515. /package/dist/{middleware → next/middleware}/error-handler.d.ts +0 -0
  516. /package/dist/{middleware → next/middleware}/index.d.ts +0 -0
  517. /package/dist/{middleware → next/middleware}/init-request.d.ts +0 -0
  518. /package/dist/{middleware → next/middleware}/middleware-chain.d.ts +0 -0
  519. /package/dist/{middleware → next/middleware}/response-logger.d.ts +0 -0
  520. /package/dist/{middleware → next/middleware}/security.d.ts +0 -0
  521. /package/dist/{system → next/middleware}/types.js +0 -0
  522. /package/dist/{middleware → next/middleware}/wrappers.d.ts +0 -0
  523. /package/dist/{utils → next/utils}/api-helpers.d.ts +0 -0
  524. /package/dist/{utils → next/utils}/cors.d.ts +0 -0
  525. /package/dist/{components → react/components}/ui/Alert.d.ts +0 -0
  526. /package/dist/{components → react/components}/ui/Badge.d.ts +0 -0
  527. /package/dist/{components → react/components}/ui/Button.d.ts +0 -0
  528. /package/dist/{components → react/components}/ui/DataTable.d.ts +0 -0
  529. /package/dist/{components → react/components}/ui/DomainDisplay.d.ts +0 -0
  530. /package/dist/{components → react/components}/ui/Input.d.ts +0 -0
  531. /package/dist/{components → react/components}/ui/Label.d.ts +0 -0
  532. /package/dist/{components → react/components}/ui/Pagination.d.ts +0 -0
  533. /package/dist/{components → react/components}/ui/Select.d.ts +0 -0
  534. /package/dist/{components → react/components}/ui/Skeleton.d.ts +0 -0
  535. /package/dist/{components → react/components}/ui/TimezoneDisplay.d.ts +0 -0
  536. /package/dist/{components → react/components}/ui/Tooltip.d.ts +0 -0
  537. /package/dist/{components → react/components}/ui/data-table/DataTable.d.ts +0 -0
  538. /package/dist/{components → react/components}/ui/data-table/DataTableBody.d.ts +0 -0
  539. /package/dist/{components → react/components}/ui/data-table/DataTableBulkActions.d.ts +0 -0
  540. /package/dist/{components → react/components}/ui/data-table/DataTableFilters.d.ts +0 -0
  541. /package/dist/{components → react/components}/ui/data-table/DataTablePagination.d.ts +0 -0
  542. /package/dist/{components → react/components}/ui/data-table/DataTableSearch.d.ts +0 -0
  543. /package/dist/{components → react/components}/ui/data-table/index.d.ts +0 -0
  544. /package/dist/{components → react/components}/ui/loading-bar.d.ts +0 -0
  545. /package/dist/{hooks → react/hooks}/useDataTable.d.ts +0 -0
  546. /package/dist/{hooks → react/hooks}/useDebounce.d.ts +0 -0
  547. /package/dist/{hooks → react/hooks}/useExitIntent.d.ts +0 -0
  548. /package/dist/{hooks → react/hooks}/useTimezone.d.ts +0 -0
  549. /package/dist/{utils/client → react/utils}/client-utils.d.ts +0 -0
package/README.md CHANGED
@@ -4,18 +4,20 @@ Shared utility library for [withwiz](https://github.com/greeun) projects — a c
4
4
 
5
5
  ## Features
6
6
 
7
- - **Auth** — JWT, password hashing, OAuth helpers (Google / GitHub / Kakao / Microsoft / Meta), Prisma adapter
8
- - **Cache** — Redis-backed caching with factory, invalidation, and defaults
7
+ - **Composition root** — 단일 `initialize()`로 모든 티어 설정을 번에 조립
8
+ - **Framework tiers** — `core` / `next` / `react` / `prisma` 4개 티어로 의존성 분리 (0.7+)
9
+ - **Auth** — JWT, password hashing, OAuth helpers (Google / GitHub / Kakao / Microsoft / Meta), state-cookie CSRF 바인딩, Prisma adapter
10
+ - **Cache** — Redis / in-memory / hybrid / noop 백엔드, factory, invalidation, defaults
9
11
  - **Constants** — Error codes, messages, pagination, security constants
10
- - **Error** — Typed `AppError`, centralized error handler and display
12
+ - **Error** — Typed `AppError`, framework-aware error handler / display (core · next · react)
11
13
  - **Geolocation** — GeoIP lookup, batch processing, provider factory
12
14
  - **Hooks** — `useDataTable`, `useDebounce`, `useExitIntent`, `useTimezone`
13
15
  - **Logger** — Winston-based structured logger with daily rotation
14
- - **Middleware** — Auth, rate-limiting, CORS, security middleware wrappers
16
+ - **Middleware** — Auth, rate-limiting, CORS, security middleware wrappers (Next.js)
15
17
  - **Storage** — Cloudflare R2 (AWS S3-compatible) storage
16
- - **System** — Health check endpoint
18
+ - **System** — Health check, system monitoring
17
19
  - **Types** — Shared TypeScript types (API, DB, env, GeoIP, user, i18n, QR)
18
- - **Utils** — Sanitizer, validators, CSV export, URL normalizer, timezone, IP utils, and more
20
+ - **Utils** — Sanitizer, type-guards, CSV export, URL normalizer, timezone, IP utils, ...
19
21
  - **Validators** — Password strength validator
20
22
 
21
23
  ## Installation
@@ -28,17 +30,26 @@ pnpm add @withwiz/toolkit
28
30
  yarn add @withwiz/toolkit
29
31
  ```
30
32
 
31
- ### Peer dependencies
33
+ ### Peer dependencies (optional)
34
+
35
+ `next` / `react` / `react-dom` 은 **optional** peer입니다 — 사용하는 티어가 요구하는 peer만 설치하세요.
32
36
 
33
37
  ```bash
34
- npm install next react react-dom
38
+ # next 티어를 쓸 때
39
+ npm install next
40
+
41
+ # react 티어를 쓸 때
42
+ npm install react react-dom
43
+
44
+ # core 티어만 쓰는 백엔드 / CLI
45
+ # (별도 peer 설치 불필요)
35
46
  ```
36
47
 
37
48
  ## Quick start
38
49
 
39
50
  ```ts
40
51
  // Auth — JWT
41
- import { signToken, verifyToken } from '@withwiz/toolkit/auth/core/jwt'
52
+ import { signToken, verifyToken } from '@withwiz/toolkit/core/auth/jwt'
42
53
 
43
54
  const token = await signToken({ userId: 'u_123' })
44
55
  const payload = await verifyToken(token)
@@ -46,21 +57,21 @@ const payload = await verifyToken(token)
46
57
 
47
58
  ```ts
48
59
  // Cache — Redis wrapper
49
- import { withCache } from '@withwiz/toolkit/cache'
60
+ import { withCache } from '@withwiz/toolkit/core/cache'
50
61
 
51
62
  const data = await withCache('my-key', async () => fetchData(), 3600)
52
63
  ```
53
64
 
54
65
  ```ts
55
66
  // Error — typed error class
56
- import { AppError } from '@withwiz/toolkit/error'
67
+ import { AppError } from '@withwiz/toolkit/core/error'
57
68
 
58
69
  throw new AppError('NOT_FOUND', 'Resource not found', 404)
59
70
  ```
60
71
 
61
72
  ```ts
62
73
  // Logger
63
- import { logInfo, logError } from '@withwiz/toolkit/logger/logger'
74
+ import { logInfo, logError } from '@withwiz/toolkit/core/logger/logger'
64
75
 
65
76
  logInfo('Server started', { port: 3000 })
66
77
  logError('Something went wrong', { error })
@@ -68,7 +79,7 @@ logError('Something went wrong', { error })
68
79
 
69
80
  ```ts
70
81
  // Geolocation
71
- import { getGeoLocation } from '@withwiz/toolkit/geolocation'
82
+ import { getGeoLocation } from '@withwiz/toolkit/core/geolocation'
72
83
 
73
84
  const geo = await getGeoLocation('8.8.8.8')
74
85
  // { country: 'US', city: 'Mountain View', ... }
@@ -76,68 +87,99 @@ const geo = await getGeoLocation('8.8.8.8')
76
87
 
77
88
  ```tsx
78
89
  // Hooks (React)
79
- import { useDebounce } from '@withwiz/toolkit/hooks/useDebounce'
90
+ import { useDebounce } from '@withwiz/toolkit/react/hooks/useDebounce'
80
91
 
81
92
  const debouncedQuery = useDebounce(query, 300)
82
93
  ```
83
94
 
84
95
  ```ts
85
96
  // Utils
86
- import { sanitizeInput } from '@withwiz/toolkit/utils/sanitizer'
87
- import { formatNumber } from '@withwiz/toolkit/utils/format-number'
88
- import { normalizeUrl } from '@withwiz/toolkit/utils/url-normalizer'
97
+ import { sanitizeInput } from '@withwiz/toolkit/core/utils/sanitizer'
98
+ import { formatNumber } from '@withwiz/toolkit/core/utils/format-number'
99
+ import { normalizeUrl } from '@withwiz/toolkit/core/utils/url-normalizer'
89
100
  ```
90
101
 
91
102
  ## Module reference
92
103
 
104
+ 0.7부터 모든 subpath는 프레임워크 의존성에 따라 4개 티어로 분리됩니다.
105
+ 자세한 티어 모델·규칙·마이그레이션 매핑은 [`docs/FRAMEWORK_TIERS.md`](docs/FRAMEWORK_TIERS.md)
106
+ 및 [`CHANGELOG.md`](CHANGELOG.md) 의 0.7.0 항목을 참조하세요.
107
+
108
+ ### Composition root
109
+
110
+ | Subpath | Description |
111
+ |---|---|
112
+ | `/initialize` | 모든 티어 설정을 단일 객체로 조립하는 통합 진입점 |
113
+
114
+ ### `core` — 프레임워크 독립 (pure TS)
115
+
116
+ | Subpath | Description |
117
+ |---|---|
118
+ | `/core/auth` | Full auth (JWT + password + OAuth + services + email + types) |
119
+ | `/core/auth/jwt` | JWT sign / verify |
120
+ | `/core/auth/password` | bcrypt helpers |
121
+ | `/core/auth/oauth` | OAuth utilities (Google / GitHub / Kakao / Microsoft / Meta) |
122
+ | `/core/auth/oauth/providers/{google,github,kakao,microsoft,meta}` | Individual OAuth providers |
123
+ | `/core/auth/services` | Login / token-refresh / oauth-callback services |
124
+ | `/core/auth/email` | Email token generation |
125
+ | `/core/auth/types` | Framework-independent auth types |
126
+ | `/core/cache` | Cache facade (get / set / delete / withCache) |
127
+ | `/core/cache/cache-factory` | Cache backend factory (Redis / in-memory / hybrid / noop) |
128
+ | `/core/cache/cache-invalidation` | Pattern-based cache invalidation |
129
+ | `/core/config` | Config registry |
130
+ | `/core/constants/{error-codes,messages,pagination,security}` | Shared constants |
131
+ | `/core/cors` | Framework-independent CORS config |
132
+ | `/core/error` | `AppError`, error codes, i18n messages, `extractErrorInfo` |
133
+ | `/core/geolocation` | GeoIP lookup, batch processor, provider factory |
134
+ | `/core/logger/logger` | Winston-based structured logger |
135
+ | `/core/storage` | Cloudflare R2 / S3-compatible storage |
136
+ | `/core/system` | Health check, system monitoring |
137
+ | `/core/types/{api,database,env,geoip,i18n,qr-code,user}` | Shared TypeScript types |
138
+ | `/core/utils` | `sanitizer`, `type-guards`, `format-number`, `ip-utils`, `timezone`, ... |
139
+ | `/core/validators` | Password strength validator |
140
+
141
+ ### `next` — Next.js 의존
142
+
93
143
  | Subpath | Description |
94
144
  |---|---|
95
- | `/auth` | Full auth module (JWT + password + OAuth + Prisma adapter) |
96
- | `/auth/core/jwt` | JWT sign / verify |
97
- | `/auth/core/password` | bcrypt helpers |
98
- | `/auth/core/oauth` | OAuth utilities (Google / GitHub / Kakao / Microsoft / Meta) |
99
- | `/auth/adapters/prisma` | Prisma-based session adapter |
100
- | `/cache` | Redis cache (get / set / delete / withCache) |
101
- | `/cache/cache-factory` | Cache factory for multiple backends |
102
- | `/cache/cache-invalidation` | Pattern-based cache invalidation |
103
- | `/constants` | All shared constants |
104
- | `/constants/error-codes` | Application error codes |
105
- | `/constants/messages` | Shared user-facing messages |
106
- | `/constants/pagination` | Default pagination settings |
107
- | `/constants/security` | Security-related constants |
108
- | `/error` | AppError, error handler, error display |
109
- | `/geolocation` | GeoIP lookup & batch processor |
110
- | `/hooks/useDataTable` | Table state management hook |
111
- | `/hooks/useDebounce` | Debounce hook |
112
- | `/hooks/useExitIntent` | Exit intent detection hook |
113
- | `/hooks/useTimezone` | Timezone detection hook |
114
- | `/logger/logger` | Structured Winston logger |
115
- | `/middleware` | Next.js middleware helpers |
116
- | `/middleware/auth` | Auth middleware |
117
- | `/middleware/rate-limit` | Rate limiting middleware |
118
- | `/middleware/cors` | CORS middleware |
119
- | `/middleware/security` | Security headers middleware |
120
- | `/storage` | Cloudflare R2 / S3 storage client |
121
- | `/system/health-check` | Health check handler |
122
- | `/types/api` | API response types |
123
- | `/types/database` | Database entity types |
124
- | `/types/env` | Environment variable types |
125
- | `/types/user` | User types |
126
- | `/types/geoip` | GeoIP types |
127
- | `/utils` | All utility functions |
128
- | `/utils/sanitizer` | Input sanitization |
129
- | `/utils/url-normalizer` | URL normalization |
130
- | `/utils/timezone` | Timezone formatting helpers |
131
- | `/utils/csv-export` | CSV export helper |
132
- | `/validators/password-validator` | Password strength validator |
145
+ | `/next/middleware` | Auth · rate-limit · CORS · security · wrappers |
146
+ | `/next/auth-handlers` | Route handlers (login / refresh / oauth callback / me) |
147
+ | `/next/auth-types` | Handler types (`NextRequest` signatures) |
148
+ | `/next/error` | `error-handler` (NextResponse), `LocaleDetector`, `ErrorBoundary` |
149
+ | `/next/utils` | `api-helpers`, `cors`, `csv-export`, `error-processor` |
150
+
151
+ ### `react` React 의존
152
+
153
+ | Subpath | Description |
154
+ |---|---|
155
+ | `/react/components/ui/*` | Button, Table, Badge, DataTable, ... |
156
+ | `/react/hooks/{useDataTable,useDebounce,useExitIntent,useTimezone}` | React hooks |
157
+ | `/react/error` | `error-display` (sonner toast) |
158
+ | `/react/utils/{client-utils,qr-code}` | Browser-context utilities |
159
+
160
+ ### `prisma` Prisma 의존
161
+
162
+ | Subpath | Description |
163
+ |---|---|
164
+ | `/prisma/auth-adapter` | `UserRepository` / `OAuthAccountRepository` / `EmailTokenRepository` Prisma 구현체 |
133
165
 
134
166
  ## Requirements
135
167
 
136
168
  - Node.js >= 18
137
- - Next.js >= 14
138
- - React >= 18
139
169
  - TypeScript >= 5
140
170
 
171
+ ### Optional peers
172
+
173
+ `next` / `react` / `react-dom` 은 `optional` peer dependency입니다.
174
+ 사용하는 티어가 요구하는 peer만 설치하세요:
175
+
176
+ - `core` 티어만 쓰는 백엔드 / CLI: peer 불필요
177
+ - `next` 티어: Next.js >= 15
178
+ - `react` 티어: React >= 18, React-DOM >= 18
179
+ - `prisma` 티어: Prisma 호환 클라이언트 (덕 타이핑)
180
+ - Prisma 어댑터의 `EmailTokenRepository` 등 일부 모듈: `date-fns >= 3` (optional)
181
+ - 이메일 전송: `nodemailer >= 6` (optional)
182
+
141
183
  ## Development
142
184
 
143
185
  ```bash
@@ -1,4 +1,4 @@
1
- // src/config/registry.ts
1
+ // src/core/config/registry.ts
2
2
  var _a;
3
3
  (_a = globalThis.__withwiz_config) != null ? _a : globalThis.__withwiz_config = {};
4
4
  var config = globalThis.__withwiz_config;
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  LoadingBar
3
- } from "./chunk-34WAGUT5.js";
3
+ } from "./chunk-X7FGBUA4.js";
4
4
  import {
5
5
  cn
6
- } from "./chunk-62FLBG6B.js";
6
+ } from "./chunk-4K76HG4V.js";
7
7
 
8
- // src/components/ui/data-table/DataTableBody.tsx
8
+ // src/react/components/ui/data-table/DataTableBody.tsx
9
9
  import { useRef, useEffect } from "react";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
11
  function DataTableBody({
@@ -31,7 +31,7 @@ function DataTableBody({
31
31
  }, [localSelectedIds, data.length]);
32
32
  return /* @__PURE__ */ jsx("div", { className: "border rounded-lg overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "overflow-x-auto max-w-full", children: /* @__PURE__ */ jsxs("table", { className: "w-full text-sm min-w-full", children: [
33
33
  /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { className: "border-b bg-muted/50", children: [
34
- selectable && /* @__PURE__ */ jsx("th", { className: "px-1 py-2 text-left font-medium w-8", children: /* @__PURE__ */ jsx(
34
+ selectable && /* @__PURE__ */ jsx("th", { className: "px-3 py-2 text-center font-medium w-12", children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(
35
35
  "input",
36
36
  {
37
37
  "data-testid": "select-all-checkbox",
@@ -41,16 +41,15 @@ function DataTableBody({
41
41
  onChange: (e) => onSelectAll(e.target.checked),
42
42
  className: "h-4 w-4"
43
43
  }
44
- ) }),
44
+ ) }) }),
45
45
  visibleColumns.map((column) => {
46
46
  var _a, _b, _c, _d;
47
47
  const width = column.width === "auto" ? void 0 : column.width;
48
- const minWidth = column.minWidth;
49
48
  return /* @__PURE__ */ jsx(
50
49
  "th",
51
50
  {
52
51
  className: cn(
53
- "px-2 py-2 font-medium",
52
+ "px-2 py-2 font-medium first:pl-4 last:pr-4",
54
53
  column.sortable && "cursor-pointer",
55
54
  column.className,
56
55
  ((_a = column.responsive) == null ? void 0 : _a.sm) && "hidden sm:table-cell",
@@ -60,7 +59,7 @@ function DataTableBody({
60
59
  ),
61
60
  style: {
62
61
  width,
63
- minWidth: minWidth || width || void 0,
62
+ minWidth: column.minWidth || width || void 0,
64
63
  maxWidth: column.maxWidth || void 0
65
64
  },
66
65
  onClick: column.sortable ? () => onSort(column.key) : void 0,
@@ -107,7 +106,7 @@ function DataTableBody({
107
106
  localSelectedIds.includes(rowId) && "bg-primary/5"
108
107
  ),
109
108
  children: [
110
- selectable && /* @__PURE__ */ jsx("td", { className: "px-1 py-2 w-8", children: /* @__PURE__ */ jsx(
109
+ selectable && /* @__PURE__ */ jsx("td", { className: "px-3 py-3 text-center w-12", children: /* @__PURE__ */ jsx(
111
110
  "input",
112
111
  {
113
112
  "data-testid": `row-checkbox-${rowId}`,
@@ -123,7 +122,7 @@ function DataTableBody({
123
122
  "td",
124
123
  {
125
124
  className: cn(
126
- "px-2 py-3 overflow-hidden",
125
+ "px-2 py-3 overflow-hidden first:pl-4 last:pr-4",
127
126
  column.className,
128
127
  ((_a = column.responsive) == null ? void 0 : _a.sm) && "hidden sm:table-cell",
129
128
  ((_b = column.responsive) == null ? void 0 : _b.md) && "hidden md:table-cell",
@@ -1,8 +1,12 @@
1
1
  import {
2
2
  JWTError
3
- } from "./chunk-AIH3F7JV.js";
3
+ } from "./chunk-5GWGARXI.js";
4
+ import {
5
+ __spreadProps,
6
+ __spreadValues
7
+ } from "./chunk-ORMEWXMH.js";
4
8
 
5
- // src/auth/core/jwt/index.ts
9
+ // src/core/auth/jwt/index.ts
6
10
  import { SignJWT, jwtVerify } from "jose";
7
11
  var JWTManager = class {
8
12
  constructor(config, logger) {
@@ -18,7 +22,7 @@ var JWTManager = class {
18
22
  */
19
23
  async createAccessToken(payload) {
20
24
  try {
21
- const jwt = await new SignJWT(payload).setProtectedHeader({ alg: this.config.algorithm }).setIssuedAt().setExpirationTime(this.config.accessTokenExpiry).sign(this.secretKey);
25
+ const jwt = await new SignJWT(__spreadProps(__spreadValues({}, payload), { tokenType: "access" })).setProtectedHeader({ alg: this.config.algorithm }).setIssuedAt().setExpirationTime(this.config.accessTokenExpiry).sign(this.secretKey);
22
26
  this.logger.debug("Access token created successfully", {
23
27
  userId: payload.userId,
24
28
  expiresIn: this.config.accessTokenExpiry
@@ -92,6 +96,9 @@ var JWTManager = class {
92
96
  if (!userId || !payload.email || !payload.role) {
93
97
  throw new JWTError("Invalid JWT payload structure", "INVALID_PAYLOAD");
94
98
  }
99
+ if (payload.tokenType !== void 0 && payload.tokenType !== "access") {
100
+ throw new JWTError("Token is not an access token", "INVALID_PAYLOAD");
101
+ }
95
102
  this.logger.debug("Access token verified successfully", {
96
103
  userId
97
104
  });
@@ -1,4 +1,4 @@
1
- // src/constants/security.ts
1
+ // src/core/constants/security.ts
2
2
  var JWT_DEFAULTS = {
3
3
  /** 알고리즘 */
4
4
  ALGORITHM: "HS256",
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  OAuthError
3
- } from "./chunk-AIH3F7JV.js";
3
+ } from "./chunk-5GWGARXI.js";
4
4
 
5
- // src/auth/core/oauth/providers/meta.ts
5
+ // src/core/auth/oauth/providers/meta.ts
6
6
  var META_GRAPH_VERSION = "v25.0";
7
7
  var MetaOAuthProvider = class {
8
8
  constructor() {
@@ -33,7 +33,11 @@ var MetaOAuthProvider = class {
33
33
  const errorData = await response.text();
34
34
  throw new OAuthError(`Meta token exchange failed: ${errorData}`, "TOKEN_EXCHANGE_FAILED");
35
35
  }
36
- return response.json();
36
+ const data = await response.json();
37
+ if (!data.access_token) {
38
+ throw new OAuthError("Invalid Meta response: missing access_token", "INVALID_RESPONSE");
39
+ }
40
+ return data;
37
41
  }
38
42
  async getUserInfo(accessToken) {
39
43
  var _a, _b, _c, _d;
@@ -53,6 +57,8 @@ var MetaOAuthProvider = class {
53
57
  email: data.email,
54
58
  name: (_a = data.name) != null ? _a : null,
55
59
  image: (_d = (_c = (_b = data.picture) == null ? void 0 : _b.data) == null ? void 0 : _c.url) != null ? _d : null,
60
+ // Graph API는 이메일 검증 신호를 제공하지 않음 → 존재만으로 true.
61
+ // Microsoft(email_verified)/Kakao(is_email_verified) 같은 strict 검증 불가(provider 한계).
56
62
  emailVerified: !!data.email
57
63
  };
58
64
  }
@@ -1,4 +1,4 @@
1
- // src/utils/type-guards.ts
1
+ // src/core/utils/type-guards.ts
2
2
  function isNotNull(value) {
3
3
  return value !== null;
4
4
  }
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  cn
3
- } from "./chunk-62FLBG6B.js";
3
+ } from "./chunk-4K76HG4V.js";
4
4
  import {
5
5
  __objRest,
6
6
  __spreadValues
7
7
  } from "./chunk-ORMEWXMH.js";
8
8
 
9
- // src/components/ui/Input.tsx
9
+ // src/react/components/ui/Input.tsx
10
10
  import { jsx } from "react/jsx-runtime";
11
11
  function Input(_a) {
12
12
  var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-NOAU2JG7.js";
3
+ } from "./chunk-KG65BFPK.js";
4
4
  import {
5
5
  __spreadValues
6
6
  } from "./chunk-ORMEWXMH.js";
7
7
 
8
- // src/geolocation/batch-processor.ts
8
+ // src/core/geolocation/batch-processor.ts
9
9
  var BatchProcessor = class {
10
10
  constructor(config) {
11
11
  this.config = __spreadValues({
@@ -1,4 +1,4 @@
1
- // src/utils/client/client-utils.ts
1
+ // src/react/utils/client-utils.ts
2
2
  import { clsx } from "clsx";
3
3
  import { twMerge } from "tailwind-merge";
4
4
  function cn(...inputs) {
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-NOAU2JG7.js";
3
+ } from "./chunk-KG65BFPK.js";
4
4
 
5
- // src/system/utils.ts
5
+ // src/core/system/utils.ts
6
6
  import { exec } from "child_process";
7
7
  import { promisify } from "util";
8
8
  import os from "os";
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  getPlatform
3
- } from "./chunk-LRRQ54YJ.js";
3
+ } from "./chunk-4KJZRI74.js";
4
4
  import {
5
5
  getGeolocationConfig
6
- } from "./chunk-LHIVUV7Q.js";
6
+ } from "./chunk-CRJUFA73.js";
7
7
  import {
8
8
  getAuthConfig
9
- } from "./chunk-JXACXHRL.js";
9
+ } from "./chunk-KYAHURXN.js";
10
10
  import {
11
11
  getCommonConfig
12
- } from "./chunk-WPW4HXW4.js";
12
+ } from "./chunk-PX535BHW.js";
13
13
  import {
14
14
  getResolvedCacheConfig
15
- } from "./chunk-MGBNIDTP.js";
15
+ } from "./chunk-GORISA3L.js";
16
16
 
17
- // src/system/environment.ts
17
+ // src/core/system/environment.ts
18
18
  import os from "os";
19
19
  function checkEnvironmentVariables() {
20
20
  const platform = getPlatform();
@@ -1,31 +1,31 @@
1
1
  import {
2
2
  initRequestMiddleware
3
- } from "./chunk-62Q7DN5G.js";
3
+ } from "./chunk-VC2E6KYQ.js";
4
4
  import {
5
5
  MiddlewareChain
6
- } from "./chunk-YTXCKIWE.js";
6
+ } from "./chunk-UMRKMF3E.js";
7
7
  import {
8
8
  rateLimitMiddleware
9
- } from "./chunk-NQUYNPSD.js";
9
+ } from "./chunk-GDTZMX3L.js";
10
10
  import {
11
11
  responseLoggerMiddleware
12
- } from "./chunk-NW3JIRFK.js";
12
+ } from "./chunk-GJO2MPC3.js";
13
13
  import {
14
14
  securityMiddleware
15
- } from "./chunk-TLBY3DUK.js";
15
+ } from "./chunk-Q66VOVGN.js";
16
16
  import {
17
17
  adminMiddleware,
18
18
  authMiddleware,
19
19
  optionalAuthMiddleware
20
- } from "./chunk-B7QWZ5SW.js";
20
+ } from "./chunk-6TRD7ZW4.js";
21
21
  import {
22
22
  corsMiddleware
23
- } from "./chunk-A6FKWYO2.js";
23
+ } from "./chunk-54REXMTE.js";
24
24
  import {
25
25
  errorHandlerMiddleware
26
- } from "./chunk-PT4FA7U4.js";
26
+ } from "./chunk-W7PEL3DX.js";
27
27
 
28
- // src/middleware/wrappers.ts
28
+ // src/next/middleware/wrappers.ts
29
29
  function withPublicApi(handler) {
30
30
  const chain = new MiddlewareChain().use(errorHandlerMiddleware).use(securityMiddleware).use(corsMiddleware).use(initRequestMiddleware).use(rateLimitMiddleware.api).use(responseLoggerMiddleware);
31
31
  return async (request, props) => {
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  getCorsConfig
3
- } from "./chunk-WJWCTCWZ.js";
3
+ } from "./chunk-7ZO5UNTJ.js";
4
4
  import {
5
5
  logger
6
- } from "./chunk-NOAU2JG7.js";
6
+ } from "./chunk-KG65BFPK.js";
7
7
 
8
- // src/middleware/cors.ts
8
+ // src/next/middleware/cors.ts
9
9
  import { NextResponse } from "next/server";
10
10
  var DEFAULT_METHODS = "GET, POST, PUT, DELETE, PATCH, OPTIONS";
11
11
  var DEFAULT_HEADERS = "Content-Type, Authorization, X-Requested-With, X-API-Key";
@@ -25,15 +25,15 @@ function createCorsMiddleware(config) {
25
25
  const response2 = new NextResponse(null, { status: 204 });
26
26
  if (origin && allowedOrigins.includes(origin)) {
27
27
  response2.headers.set("Access-Control-Allow-Origin", origin);
28
+ if (allowCredentials) {
29
+ response2.headers.set("Access-Control-Allow-Credentials", "true");
30
+ }
28
31
  } else if (allowedOrigins.includes("*")) {
29
32
  response2.headers.set("Access-Control-Allow-Origin", "*");
30
33
  }
31
34
  response2.headers.set("Access-Control-Allow-Methods", allowedMethods);
32
35
  response2.headers.set("Access-Control-Allow-Headers", allowedHeaders);
33
36
  response2.headers.set("Access-Control-Max-Age", String(maxAge));
34
- if (allowCredentials) {
35
- response2.headers.set("Access-Control-Allow-Credentials", "true");
36
- }
37
37
  return response2;
38
38
  }
39
39
  const response = await next();
@@ -44,9 +44,6 @@ function createCorsMiddleware(config) {
44
44
  }
45
45
  } else if (allowedOrigins.includes("*")) {
46
46
  response.headers.set("Access-Control-Allow-Origin", "*");
47
- if (allowCredentials) {
48
- response.headers.set("Access-Control-Allow-Credentials", "true");
49
- }
50
47
  }
51
48
  response.headers.set("Access-Control-Allow-Methods", allowedMethods);
52
49
  response.headers.set("Access-Control-Allow-Headers", allowedHeaders);
@@ -1,4 +1,4 @@
1
- // src/auth/errors/index.ts
1
+ // src/core/auth/errors/index.ts
2
2
  var AuthError = class _AuthError extends Error {
3
3
  constructor(message, code, statusCode = 400) {
4
4
  super(message);
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  getErrorMessage
3
- } from "./chunk-JNJALNRR.js";
3
+ } from "./chunk-7WG7XPXC.js";
4
4
  import {
5
5
  getErrorCategory
6
- } from "./chunk-SNTLJ646.js";
6
+ } from "./chunk-XQIAXMRY.js";
7
7
 
8
- // src/error/friendly-messages-v2.ts
8
+ // src/core/error/friendly-messages-v2.ts
9
9
  var categoryIcons = {
10
10
  validation: "\u26A0\uFE0F",
11
11
  auth: "\u{1F510}",
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  OAuthError
3
- } from "./chunk-AIH3F7JV.js";
3
+ } from "./chunk-5GWGARXI.js";
4
4
 
5
- // src/auth/core/oauth/providers/kakao.ts
5
+ // src/core/auth/oauth/providers/kakao.ts
6
6
  var KakaoOAuthProvider = class {
7
7
  constructor() {
8
8
  this.name = "kakao";
@@ -0,0 +1,14 @@
1
+ // src/core/error/extract-error-info.ts
2
+ function extractErrorInfo(error) {
3
+ if (error instanceof Error) {
4
+ if ("code" in error && typeof error.code === "number" && error.code >= 1e4) {
5
+ return { code: error.code, message: error.message, stack: error.stack };
6
+ }
7
+ return { code: 50001, message: error.message, stack: error.stack };
8
+ }
9
+ return { code: 50001, message: String(error) };
10
+ }
11
+
12
+ export {
13
+ extractErrorInfo
14
+ };
@@ -1,4 +1,4 @@
1
- // src/config/warn.ts
1
+ // src/core/config/warn.ts
2
2
  function configWarn(module, message) {
3
3
  console.warn(`[${module}] ${message}`);
4
4
  }
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  PasswordHasher,
3
3
  PasswordValidator
4
- } from "./chunk-IHXRF3BH.js";
4
+ } from "./chunk-MNYVAEXK.js";
5
5
  import {
6
6
  __spreadValues
7
7
  } from "./chunk-ORMEWXMH.js";
8
8
 
9
- // src/auth/core/password/client-helper.ts
9
+ // src/core/auth/password/client-helper.ts
10
10
  var DEFAULT_PASSWORD_CONFIG = {
11
11
  minLength: 8,
12
12
  maxLength: 128,