@withwiz/toolkit 0.5.0 → 0.5.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 (108) hide show
  1. package/dist/auth/config.js +2 -2
  2. package/dist/auth/core/jwt/cookie.js +3 -3
  3. package/dist/auth/core/jwt/index.js +3 -3
  4. package/dist/auth/index.js +31 -31
  5. package/dist/cache/cache-config.js +4 -4
  6. package/dist/cache/cache-env.js +3 -3
  7. package/dist/cache/cache-factory.js +12 -12
  8. package/dist/cache/cache-invalidation.js +13 -13
  9. package/dist/cache/cache-redis.js +6 -6
  10. package/dist/cache/cache-wrapper.js +13 -13
  11. package/dist/cache/cache.js +20 -20
  12. package/dist/cache/hybrid-cache-manager.js +8 -8
  13. package/dist/cache/index.js +20 -20
  14. package/dist/cache/inmemory-cache-manager.js +5 -5
  15. package/dist/cache/noop-cache-manager.js +5 -5
  16. package/dist/cache/redis-cache-manager.js +7 -7
  17. package/dist/{chunk-DANUXNQU.js → chunk-2F6KNGOD.js} +1 -1
  18. package/dist/{chunk-7ZQQ6PJ4.js → chunk-2VMTIYLX.js} +2 -2
  19. package/dist/{chunk-WBU53USI.js → chunk-3J7FDOCU.js} +4 -4
  20. package/dist/{chunk-JY62DSMP.js → chunk-3YUKCYHI.js} +8 -8
  21. package/dist/{chunk-HGLQXH4D.js → chunk-4HBAPPB2.js} +2 -2
  22. package/dist/chunk-6PGZTY4N.js +30 -0
  23. package/dist/{chunk-PYTRCD33.js → chunk-6SOQUYOU.js} +2 -2
  24. package/dist/{chunk-VIWM2ZZH.js → chunk-7LJWRKDT.js} +1 -1
  25. package/dist/{chunk-S5KJZZKU.js → chunk-AQJAY5FA.js} +1 -1
  26. package/dist/{chunk-ET6RH4LB.js → chunk-BJLLMVWW.js} +1 -1
  27. package/dist/{chunk-DSRRNRZW.js → chunk-CRWMULHR.js} +2 -2
  28. package/dist/{chunk-PAYLVMZN.js → chunk-CUZPD3BF.js} +2 -2
  29. package/dist/{chunk-6WI4HNAF.js → chunk-FD2TXDTO.js} +2 -2
  30. package/dist/{chunk-XA32Z2OV.js → chunk-FPESPW6P.js} +1 -1
  31. package/dist/{chunk-D46PE6MU.js → chunk-FUDEEQR3.js} +6 -6
  32. package/dist/{chunk-LCKQOHXI.js → chunk-G5OMETUS.js} +1 -1
  33. package/dist/{chunk-5HSGNXQ3.js → chunk-GFAD4UAT.js} +1 -1
  34. package/dist/{chunk-MF4CWGMB.js → chunk-GGSFZP6T.js} +12 -12
  35. package/dist/{chunk-Y22GDIM6.js → chunk-GQVBWZLH.js} +2 -2
  36. package/dist/{chunk-GCR4PGRY.js → chunk-HHCDMWEF.js} +1 -1
  37. package/dist/{chunk-6XDE62WQ.js → chunk-J4TTSXDN.js} +1 -1
  38. package/dist/{chunk-NGV527RO.js → chunk-JOM3N4EJ.js} +1 -1
  39. package/dist/{chunk-SNKCKED5.js → chunk-K3HAYBWX.js} +1 -1
  40. package/dist/{chunk-W3IVVPS5.js → chunk-KGHWGLED.js} +4 -4
  41. package/dist/{chunk-TOVBPLHD.js → chunk-L6AU74EI.js} +3 -3
  42. package/dist/{chunk-QO27AXIH.js → chunk-LFQ3IQQB.js} +2 -2
  43. package/dist/{chunk-SUA4WQRN.js → chunk-LLVIA4JX.js} +1 -1
  44. package/dist/{chunk-I7NVWJ72.js → chunk-LX2EYD74.js} +2 -2
  45. package/dist/{chunk-4OCGUJL5.js → chunk-N3TAGJHR.js} +2 -2
  46. package/dist/{chunk-6OYE5XKI.js → chunk-NQQU6UFE.js} +3 -3
  47. package/dist/{chunk-3OZH2AMD.js → chunk-O3UR234Y.js} +10 -10
  48. package/dist/{chunk-FNKFQFZJ.js → chunk-OIRAH57Y.js} +1 -1
  49. package/dist/{chunk-G5WP3MJG.js → chunk-S5UCZ2T3.js} +1 -1
  50. package/dist/{chunk-3WS5MO6P.js → chunk-WMQE2YK7.js} +1 -1
  51. package/dist/{chunk-IEFYARHC.js → chunk-X5RMDLLM.js} +2 -2
  52. package/dist/{chunk-OSDAP24S.js → chunk-YSUL3SLC.js} +4 -4
  53. package/dist/{chunk-NDET73GO.js → chunk-ZBXSEQ6W.js} +4 -4
  54. package/dist/components/ui/DataTable.js +5 -5
  55. package/dist/components/ui/data-table/DataTable.js +5 -5
  56. package/dist/components/ui/data-table/DataTableFilters.js +2 -2
  57. package/dist/components/ui/data-table/DataTableSearch.js +2 -2
  58. package/dist/config/common.js +2 -2
  59. package/dist/config/registry.d.ts +42 -0
  60. package/dist/config/registry.js +12 -0
  61. package/dist/constants/index.js +9 -9
  62. package/dist/error/error-display.js +2 -2
  63. package/dist/error/error-handler.js +5 -5
  64. package/dist/error/index.js +15 -15
  65. package/dist/geolocation/batch-processor.js +5 -5
  66. package/dist/geolocation/config.js +2 -2
  67. package/dist/geolocation/index.js +9 -9
  68. package/dist/geolocation/providers/index.js +5 -5
  69. package/dist/geolocation/providers/ipgeolocation-provider.js +3 -3
  70. package/dist/geolocation/providers/maxmind-provider.js +3 -3
  71. package/dist/initialize.d.ts +2 -0
  72. package/dist/initialize.js +26 -18
  73. package/dist/logger/config.js +2 -2
  74. package/dist/logger/logger.js +4 -4
  75. package/dist/middleware/auth.js +7 -7
  76. package/dist/middleware/cors-config.js +2 -2
  77. package/dist/middleware/cors.js +6 -6
  78. package/dist/middleware/error-handler.js +7 -7
  79. package/dist/middleware/index.js +20 -20
  80. package/dist/middleware/middleware-chain.js +5 -5
  81. package/dist/middleware/rate-limit.js +5 -5
  82. package/dist/middleware/response-logger.js +5 -5
  83. package/dist/middleware/security.js +5 -5
  84. package/dist/middleware/wrappers.js +17 -17
  85. package/dist/storage/config.js +2 -2
  86. package/dist/storage/r2-storage.js +2 -2
  87. package/dist/system/cpu.js +6 -6
  88. package/dist/system/disk.js +6 -6
  89. package/dist/system/environment.js +8 -8
  90. package/dist/system/health-check.js +6 -6
  91. package/dist/system/index.js +13 -13
  92. package/dist/system/memory.js +6 -6
  93. package/dist/system/network.js +6 -6
  94. package/dist/system/utils.js +5 -5
  95. package/dist/utils/cors.js +4 -4
  96. package/dist/utils/csv-export.js +5 -5
  97. package/dist/utils/error-processor.js +5 -5
  98. package/dist/utils/index.js +8 -8
  99. package/package.json +2 -1
  100. package/dist/{chunk-2VNDWG6P.js → chunk-3CBGGMIY.js} +3 -3
  101. package/dist/{chunk-PL33DK2X.js → chunk-AYZJN32D.js} +3 -3
  102. package/dist/{chunk-I4UEUKSB.js → chunk-BJSEYZBH.js} +3 -3
  103. package/dist/{chunk-23LXAAMU.js → chunk-GFWGLWTS.js} +3 -3
  104. package/dist/{chunk-TH45RVP7.js → chunk-KHYY4KCV.js} +3 -3
  105. package/dist/{chunk-6O3I4ORK.js → chunk-OHBAELPZ.js} +3 -3
  106. package/dist/{chunk-52BIDTZH.js → chunk-OZE5KUS3.js} +3 -3
  107. package/dist/{chunk-LJEGM4OO.js → chunk-SEZJN4TC.js} +3 -3
  108. package/dist/{chunk-XICTHSUH.js → chunk-SFPMFVSD.js} +3 -3
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  runCommand,
3
3
  runMacCommand
4
- } from "./chunk-G5WP3MJG.js";
4
+ } from "./chunk-S5UCZ2T3.js";
5
5
  import {
6
6
  logger
7
- } from "./chunk-Y22GDIM6.js";
7
+ } from "./chunk-GQVBWZLH.js";
8
8
 
9
9
  // src/system/disk.ts
10
10
  async function getDiskInfo() {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getENV,
3
3
  isCacheEnabled
4
- } from "./chunk-ET6RH4LB.js";
4
+ } from "./chunk-BJLLMVWW.js";
5
5
 
6
6
  // src/cache/cache-config.ts
7
7
  var getCacheConfig = {
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-SNTLJ646.js";
7
7
  import {
8
8
  logger
9
- } from "./chunk-Y22GDIM6.js";
9
+ } from "./chunk-GQVBWZLH.js";
10
10
 
11
11
  // src/middleware/rate-limit.ts
12
12
  var GLOBAL_KEY = "__withwiz_rateLimitAdapter__";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-UCIUAZQT.js";
4
4
  import {
5
5
  getCommonConfig
6
- } from "./chunk-XICTHSUH.js";
6
+ } from "./chunk-SFPMFVSD.js";
7
7
 
8
8
  // src/cache/cache-env.ts
9
9
  function _getNodeEnv() {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  getCacheConfig
3
- } from "./chunk-VIWM2ZZH.js";
3
+ } from "./chunk-7LJWRKDT.js";
4
4
  import {
5
5
  getENV
6
- } from "./chunk-ET6RH4LB.js";
6
+ } from "./chunk-BJLLMVWW.js";
7
7
 
8
8
  // src/cache/noop-cache-manager.ts
9
9
  var NoopCacheManager = class {
@@ -6,10 +6,10 @@ import {
6
6
  } from "./chunk-VSGKVZB4.js";
7
7
  import {
8
8
  IPGeolocationProvider
9
- } from "./chunk-GCR4PGRY.js";
9
+ } from "./chunk-HHCDMWEF.js";
10
10
  import {
11
11
  MaxMindProvider
12
- } from "./chunk-LCKQOHXI.js";
12
+ } from "./chunk-G5OMETUS.js";
13
13
 
14
14
  // src/geolocation/providers/index.ts
15
15
  var GeoIPProviderFactory = class {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  runCommand,
3
3
  runMacCommand
4
- } from "./chunk-G5WP3MJG.js";
4
+ } from "./chunk-S5UCZ2T3.js";
5
5
  import {
6
6
  logger
7
- } from "./chunk-Y22GDIM6.js";
7
+ } from "./chunk-GQVBWZLH.js";
8
8
 
9
9
  // src/system/cpu.ts
10
10
  import os from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-Y22GDIM6.js";
3
+ } from "./chunk-GQVBWZLH.js";
4
4
  import {
5
5
  __spreadValues
6
6
  } from "./chunk-ORMEWXMH.js";
@@ -1,16 +1,16 @@
1
- import {
2
- InMemoryCacheManager
3
- } from "./chunk-6XDE62WQ.js";
4
1
  import {
5
2
  isRedisGloballyDisabled,
6
3
  notifyRedisError
7
- } from "./chunk-IEFYARHC.js";
4
+ } from "./chunk-X5RMDLLM.js";
5
+ import {
6
+ InMemoryCacheManager
7
+ } from "./chunk-J4TTSXDN.js";
8
8
  import {
9
9
  logger
10
- } from "./chunk-Y22GDIM6.js";
10
+ } from "./chunk-GQVBWZLH.js";
11
11
  import {
12
12
  getCacheFallbackConfig
13
- } from "./chunk-ET6RH4LB.js";
13
+ } from "./chunk-BJLLMVWW.js";
14
14
  import {
15
15
  __spreadValues
16
16
  } from "./chunk-ORMEWXMH.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-AHDPGRXS.js";
4
4
  import {
5
5
  getGeolocationConfig
6
- } from "./chunk-2VNDWG6P.js";
6
+ } from "./chunk-3CBGGMIY.js";
7
7
 
8
8
  // src/geolocation/providers/maxmind-provider.ts
9
9
  var MaxMindProvider = class extends BaseGeoIPProvider {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  cache,
3
3
  geoCache
4
- } from "./chunk-MF4CWGMB.js";
4
+ } from "./chunk-GGSFZP6T.js";
5
5
 
6
6
  // src/cache/cache-invalidation.ts
7
7
  var invalidateCache = {
@@ -1,29 +1,29 @@
1
- import {
2
- HybridCacheManager
3
- } from "./chunk-D46PE6MU.js";
4
- import {
5
- InMemoryCacheManager
6
- } from "./chunk-6XDE62WQ.js";
7
1
  import {
8
2
  NoopCacheManager
9
- } from "./chunk-DSRRNRZW.js";
3
+ } from "./chunk-CRWMULHR.js";
10
4
  import {
11
5
  RedisCacheManager
12
- } from "./chunk-6OYE5XKI.js";
6
+ } from "./chunk-NQQU6UFE.js";
7
+ import {
8
+ HybridCacheManager
9
+ } from "./chunk-FUDEEQR3.js";
13
10
  import {
14
11
  isRedisAvailableNow,
15
12
  isRedisGloballyDisabled
16
- } from "./chunk-IEFYARHC.js";
13
+ } from "./chunk-X5RMDLLM.js";
14
+ import {
15
+ InMemoryCacheManager
16
+ } from "./chunk-J4TTSXDN.js";
17
17
  import {
18
18
  logger
19
- } from "./chunk-Y22GDIM6.js";
19
+ } from "./chunk-GQVBWZLH.js";
20
20
  import {
21
21
  getCacheConfig
22
- } from "./chunk-VIWM2ZZH.js";
22
+ } from "./chunk-7LJWRKDT.js";
23
23
  import {
24
24
  getENV,
25
25
  isCacheEnabled
26
- } from "./chunk-ET6RH4LB.js";
26
+ } from "./chunk-BJLLMVWW.js";
27
27
 
28
28
  // src/cache/cache-factory.ts
29
29
  function getInMemoryConfig() {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  getLoggerConfig
3
- } from "./chunk-6O3I4ORK.js";
3
+ } from "./chunk-OHBAELPZ.js";
4
4
  import {
5
5
  getCommonConfig
6
- } from "./chunk-XICTHSUH.js";
6
+ } from "./chunk-SFPMFVSD.js";
7
7
  import {
8
8
  __spreadProps,
9
9
  __spreadValues
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-AHDPGRXS.js";
5
5
  import {
6
6
  getGeolocationConfig
7
- } from "./chunk-2VNDWG6P.js";
7
+ } from "./chunk-3CBGGMIY.js";
8
8
 
9
9
  // src/geolocation/providers/ipgeolocation-provider.ts
10
10
  var IPGeolocationProvider = class extends BaseGeoIPProvider {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-Y22GDIM6.js";
3
+ } from "./chunk-GQVBWZLH.js";
4
4
  import {
5
5
  DEFAULT_INMEMORY_CONFIG
6
6
  } from "./chunk-SS56XFLI.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-Y22GDIM6.js";
3
+ } from "./chunk-GQVBWZLH.js";
4
4
  import {
5
5
  __spreadValues
6
6
  } from "./chunk-ORMEWXMH.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-Y22GDIM6.js";
3
+ } from "./chunk-GQVBWZLH.js";
4
4
  import {
5
5
  __spreadValues
6
6
  } from "./chunk-ORMEWXMH.js";
@@ -1,9 +1,9 @@
1
- import {
2
- logger
3
- } from "./chunk-Y22GDIM6.js";
4
1
  import {
5
2
  getCorsConfig
6
- } from "./chunk-23LXAAMU.js";
3
+ } from "./chunk-GFWGLWTS.js";
4
+ import {
5
+ logger
6
+ } from "./chunk-GQVBWZLH.js";
7
7
 
8
8
  // src/middleware/cors.ts
9
9
  import { NextResponse } from "next/server";
@@ -7,12 +7,12 @@ import {
7
7
  formatErrorMessage,
8
8
  getHttpStatus
9
9
  } from "./chunk-SNTLJ646.js";
10
- import {
11
- logger
12
- } from "./chunk-Y22GDIM6.js";
13
10
  import {
14
11
  AuthError
15
12
  } from "./chunk-AIH3F7JV.js";
13
+ import {
14
+ logger
15
+ } from "./chunk-GQVBWZLH.js";
16
16
  import {
17
17
  __spreadProps,
18
18
  __spreadValues
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  runCommand,
3
3
  runMacCommand
4
- } from "./chunk-G5WP3MJG.js";
4
+ } from "./chunk-S5UCZ2T3.js";
5
5
  import {
6
6
  logger
7
- } from "./chunk-Y22GDIM6.js";
7
+ } from "./chunk-GQVBWZLH.js";
8
8
 
9
9
  // src/system/memory.ts
10
10
  import os from "os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getCommonConfig
3
- } from "./chunk-XICTHSUH.js";
3
+ } from "./chunk-SFPMFVSD.js";
4
4
  import {
5
5
  __spreadValues
6
6
  } from "./chunk-ORMEWXMH.js";
@@ -6,13 +6,13 @@ import {
6
6
  } from "./chunk-MAATEX2R.js";
7
7
  import {
8
8
  DataTableFilters
9
- } from "./chunk-LJEGM4OO.js";
9
+ } from "./chunk-SEZJN4TC.js";
10
10
  import {
11
11
  DataTablePagination
12
12
  } from "./chunk-IPXPCBDO.js";
13
13
  import {
14
14
  DataTableSearch
15
- } from "./chunk-TH45RVP7.js";
15
+ } from "./chunk-KHYY4KCV.js";
16
16
  import {
17
17
  DEFAULT_LABELS
18
18
  } from "./chunk-NY5QXT33.js";
@@ -4,10 +4,10 @@ import {
4
4
  } from "./chunk-YUBXS7YI.js";
5
5
  import {
6
6
  getPlatform
7
- } from "./chunk-G5WP3MJG.js";
7
+ } from "./chunk-S5UCZ2T3.js";
8
8
  import {
9
9
  logger
10
- } from "./chunk-Y22GDIM6.js";
10
+ } from "./chunk-GQVBWZLH.js";
11
11
  import {
12
12
  getResolvedCacheConfig
13
13
  } from "./chunk-UCIUAZQT.js";
@@ -3,14 +3,14 @@ import {
3
3
  isRedisGloballyDisabled,
4
4
  notifyRedisError,
5
5
  resetRedisGlobalState
6
- } from "./chunk-IEFYARHC.js";
6
+ } from "./chunk-X5RMDLLM.js";
7
7
  import {
8
8
  logger
9
- } from "./chunk-Y22GDIM6.js";
9
+ } from "./chunk-GQVBWZLH.js";
10
10
  import {
11
11
  getENV,
12
12
  isCacheEnabled
13
- } from "./chunk-ET6RH4LB.js";
13
+ } from "./chunk-BJLLMVWW.js";
14
14
  import {
15
15
  __spreadValues
16
16
  } from "./chunk-ORMEWXMH.js";
@@ -1,29 +1,29 @@
1
+ import {
2
+ initRequestMiddleware
3
+ } from "./chunk-62Q7DN5G.js";
1
4
  import {
2
5
  MiddlewareChain
3
- } from "./chunk-XA32Z2OV.js";
6
+ } from "./chunk-FPESPW6P.js";
4
7
  import {
5
8
  rateLimitMiddleware
6
- } from "./chunk-S5KJZZKU.js";
9
+ } from "./chunk-AQJAY5FA.js";
7
10
  import {
8
11
  responseLoggerMiddleware
9
- } from "./chunk-FNKFQFZJ.js";
12
+ } from "./chunk-OIRAH57Y.js";
10
13
  import {
11
14
  securityMiddleware
12
- } from "./chunk-3WS5MO6P.js";
15
+ } from "./chunk-WMQE2YK7.js";
13
16
  import {
14
17
  adminMiddleware,
15
18
  authMiddleware,
16
19
  optionalAuthMiddleware
17
- } from "./chunk-NDET73GO.js";
20
+ } from "./chunk-ZBXSEQ6W.js";
18
21
  import {
19
22
  corsMiddleware
20
- } from "./chunk-W3IVVPS5.js";
23
+ } from "./chunk-KGHWGLED.js";
21
24
  import {
22
25
  errorHandlerMiddleware
23
- } from "./chunk-JY62DSMP.js";
24
- import {
25
- initRequestMiddleware
26
- } from "./chunk-62Q7DN5G.js";
26
+ } from "./chunk-3YUKCYHI.js";
27
27
 
28
28
  // src/middleware/wrappers.ts
29
29
  function withPublicApi(handler) {
@@ -2,7 +2,7 @@ import {
2
2
  logApiRequest,
3
3
  logApiResponse,
4
4
  logger
5
- } from "./chunk-Y22GDIM6.js";
5
+ } from "./chunk-GQVBWZLH.js";
6
6
 
7
7
  // src/middleware/response-logger.ts
8
8
  var responseLoggerMiddleware = async (context, next) => {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-Y22GDIM6.js";
3
+ } from "./chunk-GQVBWZLH.js";
4
4
 
5
5
  // src/system/utils.ts
6
6
  import { exec } from "child_process";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-Y22GDIM6.js";
3
+ } from "./chunk-GQVBWZLH.js";
4
4
 
5
5
  // src/middleware/security.ts
6
6
  import { NextResponse } from "next/server";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-Y22GDIM6.js";
3
+ } from "./chunk-GQVBWZLH.js";
4
4
  import {
5
5
  getCacheFallbackConfig,
6
6
  getConfig,
7
7
  getEnv,
8
8
  isCacheEnabled,
9
9
  validateRedisEnvironment
10
- } from "./chunk-ET6RH4LB.js";
10
+ } from "./chunk-BJLLMVWW.js";
11
11
 
12
12
  // src/cache/cache-redis.ts
13
13
  import { Redis } from "@upstash/redis";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  getCacheManager,
3
3
  getEffectiveCacheBackend
4
- } from "./chunk-MF4CWGMB.js";
4
+ } from "./chunk-GGSFZP6T.js";
5
5
  import {
6
6
  logger
7
- } from "./chunk-Y22GDIM6.js";
7
+ } from "./chunk-GQVBWZLH.js";
8
8
  import {
9
9
  getCacheConfig,
10
10
  getCacheTTL
11
- } from "./chunk-VIWM2ZZH.js";
11
+ } from "./chunk-7LJWRKDT.js";
12
12
  import {
13
13
  isCacheEnabled
14
- } from "./chunk-ET6RH4LB.js";
14
+ } from "./chunk-BJLLMVWW.js";
15
15
 
16
16
  // src/cache/cache-wrapper.ts
17
17
  function getCacheBackendLabel() {
@@ -4,15 +4,15 @@ import {
4
4
  import {
5
5
  ERROR_CODES
6
6
  } from "./chunk-SNTLJ646.js";
7
- import {
8
- logger
9
- } from "./chunk-Y22GDIM6.js";
10
7
  import {
11
8
  getAuthConfig
12
- } from "./chunk-52BIDTZH.js";
9
+ } from "./chunk-OZE5KUS3.js";
13
10
  import {
14
11
  JWTManager
15
12
  } from "./chunk-3GAY2T2A.js";
13
+ import {
14
+ logger
15
+ } from "./chunk-GQVBWZLH.js";
16
16
 
17
17
  // src/middleware/auth.ts
18
18
  function setAccessTokenBlacklistChecker(checker) {
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  DataTable
3
- } from "../../chunk-I7NVWJ72.js";
3
+ } from "../../chunk-LX2EYD74.js";
4
4
  import "../../chunk-7IY3RQQL.js";
5
5
  import "../../chunk-MAATEX2R.js";
6
- import "../../chunk-LJEGM4OO.js";
6
+ import "../../chunk-SEZJN4TC.js";
7
7
  import "../../chunk-IPXPCBDO.js";
8
- import "../../chunk-TH45RVP7.js";
8
+ import "../../chunk-KHYY4KCV.js";
9
9
  import "../../chunk-NY5QXT33.js";
10
+ import "../../chunk-34WAGUT5.js";
11
+ import "../../chunk-RJUVBBZG.js";
10
12
  import "../../chunk-IJEZ7G7S.js";
11
13
  import "../../chunk-YJWLWUFK.js";
12
14
  import "../../chunk-WDUFQFDP.js";
13
- import "../../chunk-34WAGUT5.js";
14
15
  import "../../chunk-F6LCSFSU.js";
15
16
  import "../../chunk-L25BNU3E.js";
16
- import "../../chunk-RJUVBBZG.js";
17
17
  import "../../chunk-62FLBG6B.js";
18
18
  import "../../chunk-ORMEWXMH.js";
19
19
  export {
@@ -1,20 +1,20 @@
1
1
  "use client";
2
2
  import {
3
3
  DataTable
4
- } from "../../../chunk-I7NVWJ72.js";
4
+ } from "../../../chunk-LX2EYD74.js";
5
5
  import "../../../chunk-7IY3RQQL.js";
6
6
  import "../../../chunk-MAATEX2R.js";
7
- import "../../../chunk-LJEGM4OO.js";
7
+ import "../../../chunk-SEZJN4TC.js";
8
8
  import "../../../chunk-IPXPCBDO.js";
9
- import "../../../chunk-TH45RVP7.js";
9
+ import "../../../chunk-KHYY4KCV.js";
10
10
  import "../../../chunk-NY5QXT33.js";
11
+ import "../../../chunk-34WAGUT5.js";
12
+ import "../../../chunk-RJUVBBZG.js";
11
13
  import "../../../chunk-IJEZ7G7S.js";
12
14
  import "../../../chunk-YJWLWUFK.js";
13
15
  import "../../../chunk-WDUFQFDP.js";
14
- import "../../../chunk-34WAGUT5.js";
15
16
  import "../../../chunk-F6LCSFSU.js";
16
17
  import "../../../chunk-L25BNU3E.js";
17
- import "../../../chunk-RJUVBBZG.js";
18
18
  import "../../../chunk-62FLBG6B.js";
19
19
  import "../../../chunk-ORMEWXMH.js";
20
20
  export {
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import {
3
3
  DataTableFilters
4
- } from "../../../chunk-LJEGM4OO.js";
4
+ } from "../../../chunk-SEZJN4TC.js";
5
+ import "../../../chunk-RJUVBBZG.js";
5
6
  import "../../../chunk-IJEZ7G7S.js";
6
7
  import "../../../chunk-WDUFQFDP.js";
7
8
  import "../../../chunk-L25BNU3E.js";
8
- import "../../../chunk-RJUVBBZG.js";
9
9
  import "../../../chunk-62FLBG6B.js";
10
10
  import "../../../chunk-ORMEWXMH.js";
11
11
  export {
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  DataTableSearch
4
- } from "../../../chunk-TH45RVP7.js";
4
+ } from "../../../chunk-KHYY4KCV.js";
5
5
  import "../../../chunk-NY5QXT33.js";
6
- import "../../../chunk-L25BNU3E.js";
7
6
  import "../../../chunk-RJUVBBZG.js";
7
+ import "../../../chunk-L25BNU3E.js";
8
8
  import "../../../chunk-62FLBG6B.js";
9
9
  import "../../../chunk-ORMEWXMH.js";
10
10
  export {
@@ -2,9 +2,9 @@ import {
2
2
  getCommonConfig,
3
3
  initializeCommon,
4
4
  resetCommon
5
- } from "../chunk-XICTHSUH.js";
6
- import "../chunk-2QH66EVQ.js";
5
+ } from "../chunk-SFPMFVSD.js";
7
6
  import "../chunk-K25ICPU4.js";
7
+ import "../chunk-2QH66EVQ.js";
8
8
  import "../chunk-ORMEWXMH.js";
9
9
  export {
10
10
  getCommonConfig,
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Unified Config Registry
3
+ *
4
+ * Single entry point for all withwiz configuration.
5
+ * Stores resolved configs in globalThis.__withwiz_config and exposes
6
+ * them via a read-only Proxy (`config`).
7
+ */
8
+ import type { ResolvedCommonConfig } from './common';
9
+ import type { ResolvedAuthConfig } from '../auth/config';
10
+ import type { ResolvedLoggerConfig } from '../logger/config';
11
+ import type { ResolvedCacheConfig } from '../cache/config';
12
+ import type { ResolvedStorageConfig } from '../storage/config';
13
+ import type { ResolvedGeolocationConfig } from '../geolocation/config';
14
+ import type { ResolvedCorsConfig } from '../middleware/cors-config';
15
+ export interface ConfigRegistry {
16
+ common: ResolvedCommonConfig;
17
+ auth: ResolvedAuthConfig;
18
+ logger: ResolvedLoggerConfig;
19
+ cache?: ResolvedCacheConfig;
20
+ storage?: ResolvedStorageConfig;
21
+ geolocation?: ResolvedGeolocationConfig;
22
+ cors?: ResolvedCorsConfig;
23
+ }
24
+ declare global {
25
+ var __withwiz_config: ConfigRegistry | undefined;
26
+ }
27
+ /**
28
+ * Initialise the unified config registry.
29
+ * Idempotent — a second call is silently ignored.
30
+ * The stored object is frozen to prevent mutation.
31
+ */
32
+ export declare function initConfig(entries: ConfigRegistry): void;
33
+ /**
34
+ * Read-only Proxy that delegates to `globalThis.__withwiz_config`.
35
+ * Throws `ConfigurationError` if accessed before `initConfig()`.
36
+ * Throws `TypeError` on any setter attempt.
37
+ */
38
+ export declare const config: ConfigRegistry;
39
+ /**
40
+ * Reset the registry to uninitialised state. For test cleanup only.
41
+ */
42
+ export declare function resetConfig(): void;
@@ -0,0 +1,12 @@
1
+ import {
2
+ config,
3
+ initConfig,
4
+ resetConfig
5
+ } from "../chunk-6PGZTY4N.js";
6
+ import "../chunk-2QH66EVQ.js";
7
+ import "../chunk-ORMEWXMH.js";
8
+ export {
9
+ config,
10
+ initConfig,
11
+ resetConfig
12
+ };
@@ -1,12 +1,3 @@
1
- import {
2
- DATE,
3
- FILE_UPLOAD,
4
- NUMERIC,
5
- PASSWORD,
6
- TEXT,
7
- URL,
8
- USER_INPUT
9
- } from "../chunk-LNV2E4I6.js";
10
1
  import {
11
2
  GENERIC_CONFIRM_MESSAGES,
12
3
  GENERIC_ERROR_MESSAGES,
@@ -30,6 +21,15 @@ import {
30
21
  SECURITY_HEADERS,
31
22
  SESSION
32
23
  } from "../chunk-C4TSQUFA.js";
24
+ import {
25
+ DATE,
26
+ FILE_UPLOAD,
27
+ NUMERIC,
28
+ PASSWORD,
29
+ TEXT,
30
+ URL,
31
+ USER_INPUT
32
+ } from "../chunk-LNV2E4I6.js";
33
33
  import {
34
34
  ERROR_CODES,
35
35
  HTTP_STATUS,