@withwiz/toolkit 0.2.8 → 0.3.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 (122) hide show
  1. package/dist/auth/config.d.ts +16 -0
  2. package/dist/auth/config.js +13 -0
  3. package/dist/auth/index.js +18 -18
  4. package/dist/cache/cache-config.js +6 -3
  5. package/dist/cache/cache-env.d.ts +11 -20
  6. package/dist/cache/cache-env.js +5 -6
  7. package/dist/cache/cache-factory.js +15 -10
  8. package/dist/cache/cache-invalidation.js +15 -10
  9. package/dist/cache/cache-redis.js +8 -3
  10. package/dist/cache/cache-wrapper.js +15 -10
  11. package/dist/cache/cache.js +32 -24
  12. package/dist/cache/config.d.ts +116 -0
  13. package/dist/cache/config.js +13 -0
  14. package/dist/cache/hybrid-cache-manager.js +10 -5
  15. package/dist/cache/index.d.ts +2 -1
  16. package/dist/cache/index.js +32 -24
  17. package/dist/cache/inmemory-cache-manager.js +6 -2
  18. package/dist/cache/noop-cache-manager.js +7 -4
  19. package/dist/cache/redis-cache-manager.js +9 -4
  20. package/dist/{chunk-JWZSWMOM.js → chunk-2KDLKHTO.js} +1 -1
  21. package/dist/chunk-2QH66EVQ.js +11 -0
  22. package/dist/chunk-3CBGGMIY.js +39 -0
  23. package/dist/{chunk-67KRDPIH.js → chunk-4HBAPPB2.js} +2 -2
  24. package/dist/{chunk-QMZ75GBU.js → chunk-6MI4XLWC.js} +1 -1
  25. package/dist/{chunk-BX5CNRVS.js → chunk-6SOQUYOU.js} +2 -2
  26. package/dist/{chunk-YVF4RXOK.js → chunk-7IN4WRSO.js} +15 -15
  27. package/dist/{chunk-I5PCM2JQ.js → chunk-AXCB7SKY.js} +4 -4
  28. package/dist/chunk-AYZJN32D.js +45 -0
  29. package/dist/{chunk-74MSBKYW.js → chunk-BDY3AOX5.js} +14 -10
  30. package/dist/{chunk-IT43YQND.js → chunk-BYCFXGQL.js} +20 -5
  31. package/dist/{chunk-QF6FH4GZ.js → chunk-CUZPD3BF.js} +5 -5
  32. package/dist/{chunk-JOGXLVUZ.js → chunk-E54MAI4I.js} +1 -1
  33. package/dist/{chunk-WEDR5GJO.js → chunk-FD2TXDTO.js} +2 -2
  34. package/dist/{chunk-HOMWLK62.js → chunk-FDRIFPG6.js} +2 -2
  35. package/dist/{chunk-AOZVTVJG.js → chunk-FPESPW6P.js} +1 -1
  36. package/dist/{chunk-4NWJ3WCZ.js → chunk-G5OMETUS.js} +8 -1
  37. package/dist/chunk-GFWGLWTS.js +48 -0
  38. package/dist/{chunk-5A2L6TXD.js → chunk-GQVBWZLH.js} +34 -15
  39. package/dist/{chunk-DH2ZHGW2.js → chunk-HHCDMWEF.js} +14 -2
  40. package/dist/{chunk-Y6IHEA3Q.js → chunk-J4TTSXDN.js} +3 -3
  41. package/dist/{chunk-WZDS4QEC.js → chunk-JOM3N4EJ.js} +1 -1
  42. package/dist/{chunk-WSUFD4SO.js → chunk-JR7GVCQX.js} +11 -3
  43. package/dist/chunk-K25ICPU4.js +8 -0
  44. package/dist/{chunk-T3YUJYBX.js → chunk-K3HAYBWX.js} +1 -1
  45. package/dist/{chunk-WDJLAZCW.js → chunk-KGHWGLED.js} +18 -3
  46. package/dist/{chunk-XN4YP4XO.js → chunk-KZUBO2IL.js} +5 -5
  47. package/dist/{chunk-3GEQQ4VL.js → chunk-LD7POV6B.js} +10 -10
  48. package/dist/{chunk-7KCWVRPR.js → chunk-LFQ3IQQB.js} +2 -2
  49. package/dist/{chunk-RPWEGUUS.js → chunk-LX2EYD74.js} +8 -8
  50. package/dist/{chunk-HCTNZM7D.js → chunk-O7CK3CKJ.js} +1 -1
  51. package/dist/chunk-OHBAELPZ.js +46 -0
  52. package/dist/{chunk-M5LIX3TD.js → chunk-OIRAH57Y.js} +1 -1
  53. package/dist/chunk-OZE5KUS3.js +50 -0
  54. package/dist/{chunk-NJXCFTOE.js → chunk-QVWDWROP.js} +1 -1
  55. package/dist/{chunk-YMIDD4YE.js → chunk-RWVGJUON.js} +6 -6
  56. package/dist/{chunk-6WVKLXVT.js → chunk-S5UCZ2T3.js} +1 -1
  57. package/dist/chunk-SFPMFVSD.js +40 -0
  58. package/dist/{chunk-R5OFGX3C.js → chunk-SV7X6HEN.js} +6 -6
  59. package/dist/chunk-TFD3DSM2.js +110 -0
  60. package/dist/{chunk-GCZOXUDV.js → chunk-TO5CMMQC.js} +50 -10
  61. package/dist/{chunk-LEWQBXN6.js → chunk-VF4EVAMV.js} +1 -1
  62. package/dist/chunk-WNF2RKFA.js +122 -0
  63. package/dist/chunk-XI4MRH5P.js +156 -0
  64. package/dist/components/ui/DataTable.js +5 -5
  65. package/dist/components/ui/data-table/DataTable.js +5 -5
  66. package/dist/components/ui/data-table/DataTableFilters.js +2 -2
  67. package/dist/components/ui/data-table/DataTableSearch.js +2 -2
  68. package/dist/config/common.d.ts +12 -0
  69. package/dist/config/common.js +13 -0
  70. package/dist/config/errors.d.ts +3 -0
  71. package/dist/config/errors.js +7 -0
  72. package/dist/config/warn.d.ts +4 -0
  73. package/dist/config/warn.js +7 -0
  74. package/dist/constants/index.js +13 -13
  75. package/dist/error/error-handler.js +6 -2
  76. package/dist/error/index.js +6 -2
  77. package/dist/geolocation/batch-processor.js +6 -2
  78. package/dist/geolocation/config.d.ts +14 -0
  79. package/dist/geolocation/config.js +13 -0
  80. package/dist/geolocation/index.js +13 -8
  81. package/dist/geolocation/providers/index.js +9 -6
  82. package/dist/geolocation/providers/ipgeolocation-provider.js +4 -1
  83. package/dist/geolocation/providers/maxmind-provider.js +4 -1
  84. package/dist/initialize.d.ts +18 -0
  85. package/dist/initialize.js +41 -0
  86. package/dist/logger/config.d.ts +20 -0
  87. package/dist/logger/config.js +13 -0
  88. package/dist/logger/logger.js +5 -1
  89. package/dist/middleware/auth.js +7 -2
  90. package/dist/middleware/cors-config.d.ts +14 -0
  91. package/dist/middleware/cors-config.js +13 -0
  92. package/dist/middleware/cors.js +7 -2
  93. package/dist/middleware/error-handler.js +7 -3
  94. package/dist/middleware/index.js +19 -13
  95. package/dist/middleware/middleware-chain.js +6 -2
  96. package/dist/middleware/rate-limit.js +6 -2
  97. package/dist/middleware/response-logger.js +6 -2
  98. package/dist/middleware/security.js +6 -2
  99. package/dist/middleware/wrappers.js +16 -10
  100. package/dist/storage/config.d.ts +20 -0
  101. package/dist/storage/config.js +13 -0
  102. package/dist/storage/r2-storage.d.ts +4 -0
  103. package/dist/storage/r2-storage.js +19 -10
  104. package/dist/system/cpu.js +7 -3
  105. package/dist/system/disk.js +7 -3
  106. package/dist/system/environment.js +11 -3
  107. package/dist/system/health-check.js +9 -3
  108. package/dist/system/index.js +18 -10
  109. package/dist/system/memory.js +7 -3
  110. package/dist/system/network.js +7 -3
  111. package/dist/system/utils.js +6 -2
  112. package/dist/types/env.d.ts +12 -2
  113. package/dist/utils/cors.js +5 -1
  114. package/dist/utils/csv-export.js +6 -2
  115. package/dist/utils/error-processor.js +6 -2
  116. package/dist/utils/index.js +23 -18
  117. package/package.json +10 -1
  118. package/dist/chunk-N4XYQB2G.js +0 -193
  119. package/dist/chunk-OFPRBEO6.js +0 -93
  120. package/dist/{chunk-TH45RVP7.js → chunk-KHYY4KCV.js} +3 -3
  121. package/dist/{chunk-EBUEBEJX.js → chunk-QMCOX3DP.js} +0 -0
  122. package/dist/{chunk-X2UP5PNN.js → chunk-SEZJN4TC.js} +3 -3
@@ -0,0 +1,122 @@
1
+ import {
2
+ getPlatform
3
+ } from "./chunk-S5UCZ2T3.js";
4
+ import {
5
+ getGeolocationConfig
6
+ } from "./chunk-3CBGGMIY.js";
7
+ import {
8
+ getAuthConfig
9
+ } from "./chunk-OZE5KUS3.js";
10
+ import {
11
+ getCommonConfig
12
+ } from "./chunk-SFPMFVSD.js";
13
+ import {
14
+ getResolvedCacheConfig
15
+ } from "./chunk-TFD3DSM2.js";
16
+
17
+ // src/system/environment.ts
18
+ import os from "os";
19
+ function checkEnvironmentVariables() {
20
+ const platform = getPlatform();
21
+ const results = [];
22
+ try {
23
+ const auth = getAuthConfig();
24
+ results.push({
25
+ key: "JWT_SECRET",
26
+ ok: true,
27
+ value: auth.jwtSecret.length > 20 ? auth.jwtSecret.substring(0, 20) + "..." : auth.jwtSecret
28
+ });
29
+ } catch (e) {
30
+ results.push({ key: "JWT_SECRET", ok: false });
31
+ }
32
+ try {
33
+ const cache = getResolvedCacheConfig();
34
+ results.push({
35
+ key: "CACHE_ENABLED",
36
+ ok: true,
37
+ value: String(cache.enabled)
38
+ });
39
+ if (cache.redis) {
40
+ results.push({
41
+ key: "UPSTASH_REDIS_REST_URL",
42
+ ok: true,
43
+ value: cache.redis.url.length > 20 ? cache.redis.url.substring(0, 20) + "..." : cache.redis.url
44
+ });
45
+ results.push({ key: "UPSTASH_REDIS_REST_TOKEN", ok: true, value: "***" });
46
+ } else {
47
+ results.push({ key: "UPSTASH_REDIS_REST_URL", ok: false });
48
+ results.push({ key: "UPSTASH_REDIS_REST_TOKEN", ok: false });
49
+ }
50
+ } catch (e) {
51
+ results.push({ key: "CACHE_ENABLED", ok: false });
52
+ results.push({ key: "UPSTASH_REDIS_REST_URL", ok: false });
53
+ results.push({ key: "UPSTASH_REDIS_REST_TOKEN", ok: false });
54
+ }
55
+ try {
56
+ const geo = getGeolocationConfig();
57
+ results.push({ key: "IPGEOLOCATION_API_KEY", ok: !!geo.ipgeolocationApiKey });
58
+ results.push({ key: "MAXMIND_LICENSE_KEY", ok: !!geo.maxmindLicenseKey });
59
+ } catch (e) {
60
+ results.push({ key: "IPGEOLOCATION_API_KEY", ok: false });
61
+ results.push({ key: "MAXMIND_LICENSE_KEY", ok: false });
62
+ }
63
+ results.push({
64
+ key: "PLATFORM",
65
+ ok: true,
66
+ value: platform === "darwin" ? "macOS" : "Linux"
67
+ });
68
+ let nodeEnvValue;
69
+ try {
70
+ nodeEnvValue = getCommonConfig().nodeEnv;
71
+ } catch (e) {
72
+ nodeEnvValue = "development";
73
+ }
74
+ results.push({
75
+ key: "NODE_ENV",
76
+ ok: true,
77
+ value: nodeEnvValue
78
+ });
79
+ results.push({
80
+ key: "ARCHITECTURE",
81
+ ok: true,
82
+ value: process.arch
83
+ });
84
+ results.push({
85
+ key: "NODE_VERSION",
86
+ ok: true,
87
+ value: process.version
88
+ });
89
+ results.push({
90
+ key: "HOSTNAME",
91
+ ok: true,
92
+ value: os.hostname()
93
+ });
94
+ results.push({
95
+ key: "USER_HOME",
96
+ ok: true,
97
+ value: os.homedir()
98
+ });
99
+ results.push({
100
+ key: "TEMP_DIR",
101
+ ok: true,
102
+ value: os.tmpdir()
103
+ });
104
+ if (platform === "darwin") {
105
+ results.push({
106
+ key: "MACOS_VERSION",
107
+ ok: true,
108
+ value: os.release()
109
+ });
110
+ } else {
111
+ results.push({
112
+ key: "LINUX_DISTRO",
113
+ ok: true,
114
+ value: os.release()
115
+ });
116
+ }
117
+ return results;
118
+ }
119
+
120
+ export {
121
+ checkEnvironmentVariables
122
+ };
@@ -0,0 +1,156 @@
1
+ import {
2
+ getCommonConfig
3
+ } from "./chunk-SFPMFVSD.js";
4
+ import {
5
+ getResolvedCacheConfig
6
+ } from "./chunk-TFD3DSM2.js";
7
+
8
+ // src/cache/cache-env.ts
9
+ function _getNodeEnv() {
10
+ try {
11
+ return getCommonConfig().nodeEnv;
12
+ } catch (e) {
13
+ return "development";
14
+ }
15
+ }
16
+ function getConfig() {
17
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba;
18
+ const cc = getResolvedCacheConfig();
19
+ const nodeEnv = _getNodeEnv();
20
+ return {
21
+ env: {
22
+ NODE_ENV: nodeEnv,
23
+ UPSTASH_REDIS_REST_URL: (_a = cc.redis) == null ? void 0 : _a.url,
24
+ UPSTASH_REDIS_REST_TOKEN: (_b = cc.redis) == null ? void 0 : _b.token,
25
+ CACHE_ENABLED: cc.enabled
26
+ },
27
+ ENV: {
28
+ REDIS: {
29
+ URL: (_c = cc.redis) == null ? void 0 : _c.url,
30
+ TOKEN: (_d = cc.redis) == null ? void 0 : _d.token,
31
+ IS_AVAILABLE: !!((_e = cc.redis) == null ? void 0 : _e.url) && !!((_f = cc.redis) == null ? void 0 : _f.token),
32
+ ENABLED: (_h = (_g = cc.redis) == null ? void 0 : _g.enabled) != null ? _h : false
33
+ },
34
+ CACHE: {
35
+ ENABLED: cc.enabled,
36
+ REDIS: { ENABLED: (_j = (_i = cc.redis) == null ? void 0 : _i.enabled) != null ? _j : false },
37
+ INMEMORY: {
38
+ ENABLED: cc.inmemory.enabled,
39
+ MAX_SIZE: cc.inmemory.maxSize,
40
+ MAX_MB: cc.inmemory.maxMb,
41
+ EVICTION: cc.inmemory.eviction,
42
+ CLEANUP_INTERVAL: cc.inmemory.cleanupInterval
43
+ },
44
+ TTL: cc.ttl,
45
+ ANALYTICS: {
46
+ ENABLED: (_l = (_k = cc.categories.ANALYTICS) == null ? void 0 : _k.enabled) != null ? _l : true,
47
+ DURATION: (_n = (_m = cc.categories.ANALYTICS) == null ? void 0 : _m.duration) != null ? _n : 1800
48
+ },
49
+ USER: {
50
+ ENABLED: (_p = (_o = cc.categories.USER) == null ? void 0 : _o.enabled) != null ? _p : true,
51
+ DURATION: (_r = (_q = cc.categories.USER) == null ? void 0 : _q.duration) != null ? _r : 600
52
+ },
53
+ GEOIP: {
54
+ ENABLED: (_t = (_s = cc.categories.GEOIP) == null ? void 0 : _s.enabled) != null ? _t : true,
55
+ DURATION: (_v = (_u = cc.categories.GEOIP) == null ? void 0 : _u.duration) != null ? _v : 2592e3
56
+ },
57
+ SETTINGS: {
58
+ ENABLED: (_x = (_w = cc.categories.SETTINGS) == null ? void 0 : _w.enabled) != null ? _x : true,
59
+ DURATION: (_z = (_y = cc.categories.SETTINGS) == null ? void 0 : _y.duration) != null ? _z : 1800
60
+ },
61
+ RESERVED_WORDS: {
62
+ ENABLED: (_B = (_A = cc.categories.RESERVED_WORDS) == null ? void 0 : _A.enabled) != null ? _B : true,
63
+ DURATION: (_D = (_C = cc.categories.RESERVED_WORDS) == null ? void 0 : _C.duration) != null ? _D : 1800
64
+ },
65
+ ALIAS: {
66
+ ENABLED: (_F = (_E = cc.categories.ALIAS) == null ? void 0 : _E.enabled) != null ? _F : true,
67
+ DURATION: (_H = (_G = cc.categories.ALIAS) == null ? void 0 : _G.duration) != null ? _H : 300
68
+ },
69
+ COMMUNITY: {
70
+ ENABLED: (_J = (_I = cc.categories.COMMUNITY) == null ? void 0 : _I.enabled) != null ? _J : true,
71
+ DURATION: (_L = (_K = cc.categories.COMMUNITY) == null ? void 0 : _K.duration) != null ? _L : 900
72
+ },
73
+ LINK: {
74
+ ENABLED: (_N = (_M = cc.categories.LINK) == null ? void 0 : _M.enabled) != null ? _N : true,
75
+ DURATION: (_P = (_O = cc.categories.LINK) == null ? void 0 : _O.duration) != null ? _P : 1800
76
+ },
77
+ RATE_LIMIT: {
78
+ ENABLED: true,
79
+ DURATION: (_R = (_Q = cc.categories.RATE_LIMIT) == null ? void 0 : _Q.duration) != null ? _R : 60
80
+ },
81
+ URL_TOKEN: {
82
+ ENABLED: (_T = (_S = cc.categories.URL_TOKEN) == null ? void 0 : _S.enabled) != null ? _T : true,
83
+ DURATION: (_V = (_U = cc.categories.URL_TOKEN) == null ? void 0 : _U.duration) != null ? _V : 300
84
+ },
85
+ API_KEY: {
86
+ ENABLED: (_X = (_W = cc.categories.API_KEY) == null ? void 0 : _W.enabled) != null ? _X : true,
87
+ DURATION: (_Z = (_Y = cc.categories.API_KEY) == null ? void 0 : _Y.duration) != null ? _Z : 300
88
+ },
89
+ API_CONFIG: {
90
+ ENABLED: (_$ = (__ = cc.categories.API_CONFIG) == null ? void 0 : __.enabled) != null ? _$ : true,
91
+ DURATION: (_ba = (_aa = cc.categories.API_CONFIG) == null ? void 0 : _aa.duration) != null ? _ba : 600
92
+ }
93
+ }
94
+ },
95
+ isCacheEnabled: () => cc.enabled,
96
+ isRedisAvailable: () => {
97
+ var _a2, _b2;
98
+ return !!((_a2 = cc.redis) == null ? void 0 : _a2.url) && !!((_b2 = cc.redis) == null ? void 0 : _b2.token);
99
+ }
100
+ };
101
+ }
102
+ var getEnv = () => getConfig().env;
103
+ var getENV = () => getConfig().ENV;
104
+ var isCacheEnabled = () => getResolvedCacheConfig().enabled;
105
+ function validateRedisEnvironment() {
106
+ var _a, _b;
107
+ const errors = [];
108
+ const cc = getResolvedCacheConfig();
109
+ const redisUrl = (_a = cc.redis) == null ? void 0 : _a.url;
110
+ const redisToken = (_b = cc.redis) == null ? void 0 : _b.token;
111
+ if (!redisUrl) {
112
+ errors.push("UPSTASH_REDIS_REST_URL is not configured.");
113
+ } else if (redisUrl.trim() === "") {
114
+ errors.push("UPSTASH_REDIS_REST_URL is an empty string.");
115
+ }
116
+ if (!redisToken) {
117
+ errors.push("UPSTASH_REDIS_REST_TOKEN is not configured.");
118
+ } else if (redisToken.trim() === "") {
119
+ errors.push("UPSTASH_REDIS_REST_TOKEN is an empty string.");
120
+ }
121
+ return {
122
+ isValid: errors.length === 0,
123
+ errors
124
+ };
125
+ }
126
+ function getCacheFallbackConfig() {
127
+ const fallback = getResolvedCacheConfig().fallback;
128
+ return {
129
+ redisErrorThresholdGlobal: fallback.redisErrorThresholdGlobal,
130
+ redisErrorThresholdLocal: fallback.redisErrorThresholdLocal,
131
+ redisReconnectInterval: fallback.redisReconnectInterval,
132
+ fallbackOnRedisError: fallback.fallbackOnRedisError,
133
+ writeToMemory: fallback.writeToMemory
134
+ };
135
+ }
136
+ function getCacheHealthConfig() {
137
+ const health = getResolvedCacheConfig().health;
138
+ return {
139
+ errorRateThreshold: health.errorRateThreshold,
140
+ hitRateThreshold: health.hitRateThreshold,
141
+ reportHitRateThreshold: health.reportHitRateThreshold,
142
+ reportResponseTimeThreshold: health.reportResponseTimeThreshold,
143
+ reportInvalidationThreshold: health.reportInvalidationThreshold,
144
+ reportMinRequests: health.reportMinRequests
145
+ };
146
+ }
147
+
148
+ export {
149
+ getConfig,
150
+ getEnv,
151
+ getENV,
152
+ isCacheEnabled,
153
+ validateRedisEnvironment,
154
+ getCacheFallbackConfig,
155
+ getCacheHealthConfig
156
+ };
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  DataTable
3
- } from "../../chunk-RPWEGUUS.js";
4
- import "../../chunk-X2UP5PNN.js";
5
- import "../../chunk-IPXPCBDO.js";
6
- import "../../chunk-TH45RVP7.js";
3
+ } from "../../chunk-LX2EYD74.js";
7
4
  import "../../chunk-7IY3RQQL.js";
8
5
  import "../../chunk-MAATEX2R.js";
6
+ import "../../chunk-SEZJN4TC.js";
7
+ import "../../chunk-IPXPCBDO.js";
8
+ import "../../chunk-KHYY4KCV.js";
9
9
  import "../../chunk-NY5QXT33.js";
10
10
  import "../../chunk-34WAGUT5.js";
11
- import "../../chunk-L25BNU3E.js";
12
11
  import "../../chunk-RJUVBBZG.js";
13
12
  import "../../chunk-IJEZ7G7S.js";
14
13
  import "../../chunk-YJWLWUFK.js";
15
14
  import "../../chunk-WDUFQFDP.js";
16
15
  import "../../chunk-F6LCSFSU.js";
16
+ import "../../chunk-L25BNU3E.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-RPWEGUUS.js";
5
- import "../../../chunk-X2UP5PNN.js";
6
- import "../../../chunk-IPXPCBDO.js";
7
- import "../../../chunk-TH45RVP7.js";
4
+ } from "../../../chunk-LX2EYD74.js";
8
5
  import "../../../chunk-7IY3RQQL.js";
9
6
  import "../../../chunk-MAATEX2R.js";
7
+ import "../../../chunk-SEZJN4TC.js";
8
+ import "../../../chunk-IPXPCBDO.js";
9
+ import "../../../chunk-KHYY4KCV.js";
10
10
  import "../../../chunk-NY5QXT33.js";
11
11
  import "../../../chunk-34WAGUT5.js";
12
- import "../../../chunk-L25BNU3E.js";
13
12
  import "../../../chunk-RJUVBBZG.js";
14
13
  import "../../../chunk-IJEZ7G7S.js";
15
14
  import "../../../chunk-YJWLWUFK.js";
16
15
  import "../../../chunk-WDUFQFDP.js";
17
16
  import "../../../chunk-F6LCSFSU.js";
17
+ import "../../../chunk-L25BNU3E.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-X2UP5PNN.js";
5
- import "../../../chunk-L25BNU3E.js";
4
+ } from "../../../chunk-SEZJN4TC.js";
6
5
  import "../../../chunk-RJUVBBZG.js";
7
6
  import "../../../chunk-IJEZ7G7S.js";
8
7
  import "../../../chunk-WDUFQFDP.js";
8
+ import "../../../chunk-L25BNU3E.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 {
@@ -0,0 +1,12 @@
1
+ export interface CommonConfig {
2
+ nodeEnv?: 'development' | 'production' | 'test';
3
+ }
4
+ export interface ResolvedCommonConfig {
5
+ nodeEnv: 'development' | 'production' | 'test';
6
+ }
7
+ declare global {
8
+ var __withwiz_common_config: ResolvedCommonConfig | undefined;
9
+ }
10
+ export declare function initializeCommon(config: CommonConfig): void;
11
+ export declare function getCommonConfig(): ResolvedCommonConfig;
12
+ export declare function resetCommon(): void;
@@ -0,0 +1,13 @@
1
+ import {
2
+ getCommonConfig,
3
+ initializeCommon,
4
+ resetCommon
5
+ } from "../chunk-SFPMFVSD.js";
6
+ import "../chunk-K25ICPU4.js";
7
+ import "../chunk-2QH66EVQ.js";
8
+ import "../chunk-ORMEWXMH.js";
9
+ export {
10
+ getCommonConfig,
11
+ initializeCommon,
12
+ resetCommon
13
+ };
@@ -0,0 +1,3 @@
1
+ export declare class ConfigurationError extends Error {
2
+ constructor(module: string, message: string);
3
+ }
@@ -0,0 +1,7 @@
1
+ import {
2
+ ConfigurationError
3
+ } from "../chunk-2QH66EVQ.js";
4
+ import "../chunk-ORMEWXMH.js";
5
+ export {
6
+ ConfigurationError
7
+ };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 모듈 초기화 시 선택 설정 누락 warn 로그 출력
3
+ */
4
+ export declare function configWarn(module: string, message: string): void;
@@ -0,0 +1,7 @@
1
+ import {
2
+ configWarn
3
+ } from "../chunk-K25ICPU4.js";
4
+ import "../chunk-ORMEWXMH.js";
5
+ export {
6
+ configWarn
7
+ };
@@ -1,16 +1,3 @@
1
- import {
2
- GENERIC_CONFIRM_MESSAGES,
3
- GENERIC_ERROR_MESSAGES,
4
- GENERIC_INFO_MESSAGES,
5
- GENERIC_SUCCESS_MESSAGES
6
- } from "../chunk-2TO7WUKK.js";
7
- import {
8
- DATE_RANGE,
9
- FILTER_OPTIONS,
10
- PAGE_SIZES,
11
- PAGINATION,
12
- SORT_OPTIONS
13
- } from "../chunk-VDXB5DCY.js";
14
1
  import {
15
2
  API_KEY,
16
3
  CSRF,
@@ -31,6 +18,19 @@ import {
31
18
  URL,
32
19
  USER_INPUT
33
20
  } from "../chunk-LNV2E4I6.js";
21
+ import {
22
+ GENERIC_CONFIRM_MESSAGES,
23
+ GENERIC_ERROR_MESSAGES,
24
+ GENERIC_INFO_MESSAGES,
25
+ GENERIC_SUCCESS_MESSAGES
26
+ } from "../chunk-2TO7WUKK.js";
27
+ import {
28
+ DATE_RANGE,
29
+ FILTER_OPTIONS,
30
+ PAGE_SIZES,
31
+ PAGINATION,
32
+ SORT_OPTIONS
33
+ } from "../chunk-VDXB5DCY.js";
34
34
  import {
35
35
  ERROR_CODES,
36
36
  HTTP_STATUS,
@@ -5,11 +5,15 @@ import {
5
5
  error_handler_default,
6
6
  processError,
7
7
  withErrorHandler
8
- } from "../chunk-JWZSWMOM.js";
8
+ } from "../chunk-2KDLKHTO.js";
9
9
  import "../chunk-KXXROUA5.js";
10
10
  import "../chunk-SNVGJPPX.js";
11
11
  import "../chunk-AIH3F7JV.js";
12
- import "../chunk-5A2L6TXD.js";
12
+ import "../chunk-GQVBWZLH.js";
13
+ import "../chunk-OHBAELPZ.js";
14
+ import "../chunk-SFPMFVSD.js";
15
+ import "../chunk-K25ICPU4.js";
16
+ import "../chunk-2QH66EVQ.js";
13
17
  import "../chunk-ORMEWXMH.js";
14
18
  export {
15
19
  AUTH_ERROR_CODE_MAP,
@@ -7,7 +7,7 @@ import {
7
7
  errorToResponse,
8
8
  processError,
9
9
  withErrorHandler
10
- } from "../chunk-JWZSWMOM.js";
10
+ } from "../chunk-2KDLKHTO.js";
11
11
  import {
12
12
  extractErrorInfo,
13
13
  formatInlineError,
@@ -48,7 +48,11 @@ import {
48
48
  getLogLevel
49
49
  } from "../chunk-SNVGJPPX.js";
50
50
  import "../chunk-AIH3F7JV.js";
51
- import "../chunk-5A2L6TXD.js";
51
+ import "../chunk-GQVBWZLH.js";
52
+ import "../chunk-OHBAELPZ.js";
53
+ import "../chunk-SFPMFVSD.js";
54
+ import "../chunk-K25ICPU4.js";
55
+ import "../chunk-2QH66EVQ.js";
52
56
  import "../chunk-ORMEWXMH.js";
53
57
 
54
58
  // src/error/ErrorBoundary.tsx
@@ -1,8 +1,12 @@
1
1
  import {
2
2
  BatchProcessor,
3
3
  createBatchProcessor
4
- } from "../chunk-WZDS4QEC.js";
5
- import "../chunk-5A2L6TXD.js";
4
+ } from "../chunk-JOM3N4EJ.js";
5
+ import "../chunk-GQVBWZLH.js";
6
+ import "../chunk-OHBAELPZ.js";
7
+ import "../chunk-SFPMFVSD.js";
8
+ import "../chunk-K25ICPU4.js";
9
+ import "../chunk-2QH66EVQ.js";
6
10
  import "../chunk-ORMEWXMH.js";
7
11
  export {
8
12
  BatchProcessor,
@@ -0,0 +1,14 @@
1
+ export interface GeolocationConfig {
2
+ ipgeolocationApiKey?: string;
3
+ maxmindLicenseKey?: string;
4
+ }
5
+ export interface ResolvedGeolocationConfig {
6
+ ipgeolocationApiKey?: string;
7
+ maxmindLicenseKey?: string;
8
+ }
9
+ declare global {
10
+ var __withwiz_geolocation_config: ResolvedGeolocationConfig | undefined;
11
+ }
12
+ export declare function initializeGeolocation(config: GeolocationConfig): void;
13
+ export declare function getGeolocationConfig(): ResolvedGeolocationConfig;
14
+ export declare function resetGeolocation(): void;
@@ -0,0 +1,13 @@
1
+ import {
2
+ getGeolocationConfig,
3
+ initializeGeolocation,
4
+ resetGeolocation
5
+ } from "../chunk-3CBGGMIY.js";
6
+ import "../chunk-K25ICPU4.js";
7
+ import "../chunk-2QH66EVQ.js";
8
+ import "../chunk-ORMEWXMH.js";
9
+ export {
10
+ getGeolocationConfig,
11
+ initializeGeolocation,
12
+ resetGeolocation
13
+ };
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  GeoIPProviderFactory
3
- } from "../chunk-QF6FH4GZ.js";
3
+ } from "../chunk-CUZPD3BF.js";
4
+ import {
5
+ IPApiProvider
6
+ } from "../chunk-DEEJBDJE.js";
4
7
  import {
5
8
  IPApiCoProvider
6
9
  } from "../chunk-VSGKVZB4.js";
7
10
  import {
8
11
  IPGeolocationProvider
9
- } from "../chunk-DH2ZHGW2.js";
12
+ } from "../chunk-HHCDMWEF.js";
10
13
  import {
11
14
  MaxMindProvider
12
- } from "../chunk-4NWJ3WCZ.js";
13
- import {
14
- IPApiProvider
15
- } from "../chunk-DEEJBDJE.js";
15
+ } from "../chunk-G5OMETUS.js";
16
16
  import {
17
17
  BaseGeoIPProvider,
18
18
  truncateString
@@ -20,8 +20,13 @@ import {
20
20
  import {
21
21
  BatchProcessor,
22
22
  createBatchProcessor
23
- } from "../chunk-WZDS4QEC.js";
24
- import "../chunk-5A2L6TXD.js";
23
+ } from "../chunk-JOM3N4EJ.js";
24
+ import "../chunk-3CBGGMIY.js";
25
+ import "../chunk-GQVBWZLH.js";
26
+ import "../chunk-OHBAELPZ.js";
27
+ import "../chunk-SFPMFVSD.js";
28
+ import "../chunk-K25ICPU4.js";
29
+ import "../chunk-2QH66EVQ.js";
25
30
  import "../chunk-ORMEWXMH.js";
26
31
  export {
27
32
  BaseGeoIPProvider,
@@ -1,22 +1,25 @@
1
1
  import {
2
2
  GeoIPProviderFactory
3
- } from "../../chunk-QF6FH4GZ.js";
3
+ } from "../../chunk-CUZPD3BF.js";
4
+ import {
5
+ IPApiProvider
6
+ } from "../../chunk-DEEJBDJE.js";
4
7
  import {
5
8
  IPApiCoProvider
6
9
  } from "../../chunk-VSGKVZB4.js";
7
10
  import {
8
11
  IPGeolocationProvider
9
- } from "../../chunk-DH2ZHGW2.js";
12
+ } from "../../chunk-HHCDMWEF.js";
10
13
  import {
11
14
  MaxMindProvider
12
- } from "../../chunk-4NWJ3WCZ.js";
13
- import {
14
- IPApiProvider
15
- } from "../../chunk-DEEJBDJE.js";
15
+ } from "../../chunk-G5OMETUS.js";
16
16
  import {
17
17
  BaseGeoIPProvider,
18
18
  truncateString
19
19
  } from "../../chunk-AHDPGRXS.js";
20
+ import "../../chunk-3CBGGMIY.js";
21
+ import "../../chunk-K25ICPU4.js";
22
+ import "../../chunk-2QH66EVQ.js";
20
23
  import "../../chunk-ORMEWXMH.js";
21
24
  export {
22
25
  BaseGeoIPProvider,
@@ -1,7 +1,10 @@
1
1
  import {
2
2
  IPGeolocationProvider
3
- } from "../../chunk-DH2ZHGW2.js";
3
+ } from "../../chunk-HHCDMWEF.js";
4
4
  import "../../chunk-AHDPGRXS.js";
5
+ import "../../chunk-3CBGGMIY.js";
6
+ import "../../chunk-K25ICPU4.js";
7
+ import "../../chunk-2QH66EVQ.js";
5
8
  import "../../chunk-ORMEWXMH.js";
6
9
  export {
7
10
  IPGeolocationProvider
@@ -1,7 +1,10 @@
1
1
  import {
2
2
  MaxMindProvider
3
- } from "../../chunk-4NWJ3WCZ.js";
3
+ } from "../../chunk-G5OMETUS.js";
4
4
  import "../../chunk-AHDPGRXS.js";
5
+ import "../../chunk-3CBGGMIY.js";
6
+ import "../../chunk-K25ICPU4.js";
7
+ import "../../chunk-2QH66EVQ.js";
5
8
  import "../../chunk-ORMEWXMH.js";
6
9
  export {
7
10
  MaxMindProvider
@@ -0,0 +1,18 @@
1
+ import type { CommonConfig } from './config/common';
2
+ import type { AuthConfig } from './auth/config';
3
+ import type { LoggerConfig } from './logger/config';
4
+ import type { CacheConfigInput } from './cache/config';
5
+ import type { StorageConfig } from './storage/config';
6
+ import type { GeolocationConfig } from './geolocation/config';
7
+ import type { CorsConfig } from './middleware/cors-config';
8
+ export interface ToolkitConfig {
9
+ nodeEnv?: CommonConfig['nodeEnv'];
10
+ auth?: AuthConfig;
11
+ logger?: LoggerConfig;
12
+ cache?: CacheConfigInput;
13
+ storage?: StorageConfig;
14
+ geolocation?: GeolocationConfig;
15
+ cors?: CorsConfig;
16
+ }
17
+ export declare function initialize(config: ToolkitConfig): void;
18
+ export type { AuthConfig, LoggerConfig, CacheConfigInput as CacheConfig, StorageConfig, GeolocationConfig, CorsConfig, };