@withwiz/toolkit 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/adapters/prisma/index.d.ts +20 -4
- package/dist/auth/adapters/prisma/index.js +51 -61
- package/dist/auth/config.js +2 -2
- package/dist/auth/core/jwt/cookie.d.ts +1 -0
- package/dist/auth/core/jwt/cookie.js +4 -1
- package/dist/auth/core/jwt/index.d.ts +1 -1
- package/dist/auth/core/jwt/index.js +4 -1
- package/dist/auth/core/jwt/types.js +5 -7
- package/dist/auth/core/oauth/index.d.ts +17 -27
- package/dist/auth/core/oauth/index.js +18 -5
- package/dist/auth/core/oauth/providers/github.d.ts +12 -0
- package/dist/auth/core/oauth/providers/github.js +8 -0
- package/dist/auth/core/oauth/providers/google.d.ts +12 -0
- package/dist/auth/core/oauth/providers/google.js +8 -0
- package/dist/auth/core/oauth/providers/index.d.ts +3 -0
- package/dist/auth/core/oauth/providers/index.js +17 -0
- package/dist/auth/core/oauth/providers/kakao.d.ts +12 -0
- package/dist/auth/core/oauth/providers/kakao.js +8 -0
- package/dist/auth/core/password/client-helper.js +1 -1
- package/dist/auth/core/password/index.js +1 -1
- package/dist/auth/index.d.ts +2 -3
- package/dist/auth/index.js +27 -13
- package/dist/auth/types/index.d.ts +31 -31
- package/dist/auth/types/index.js +5 -7
- package/dist/cache/cache-config.d.ts +0 -32
- package/dist/cache/cache-config.js +6 -6
- package/dist/cache/cache-defaults.d.ts +2 -28
- package/dist/cache/cache-defaults.js +1 -1
- package/dist/cache/cache-env.js +5 -5
- package/dist/cache/cache-factory.js +14 -14
- package/dist/cache/cache-invalidation.js +15 -15
- package/dist/cache/cache-redis.js +8 -8
- package/dist/cache/cache-wrapper.js +15 -15
- package/dist/cache/cache.js +22 -26
- package/dist/cache/config.d.ts +0 -8
- package/dist/cache/config.js +2 -2
- package/dist/cache/hybrid-cache-manager.js +10 -10
- package/dist/cache/index.d.ts +0 -1
- package/dist/cache/index.js +22 -26
- package/dist/cache/inmemory-cache-manager.js +5 -5
- package/dist/cache/noop-cache-manager.d.ts +2 -2
- package/dist/cache/noop-cache-manager.js +7 -7
- package/dist/cache/redis-cache-manager.d.ts +2 -2
- package/dist/cache/redis-cache-manager.js +9 -9
- package/dist/chunk-2QQNL4ND.js +62 -0
- package/dist/{chunk-YP5SAHAP.js → chunk-3OZH2AMD.js} +10 -10
- package/dist/{chunk-WMQE2YK7.js → chunk-3WS5MO6P.js} +1 -1
- package/dist/{chunk-BYCFXGQL.js → chunk-4OCGUJL5.js} +4 -4
- package/dist/{chunk-IQQKKUAV.js → chunk-57W32BFZ.js} +4 -30
- package/dist/{chunk-VF4EVAMV.js → chunk-5HSGNXQ3.js} +1 -1
- package/dist/{chunk-KZUBO2IL.js → chunk-6OYE5XKI.js} +5 -5
- package/dist/{chunk-FD2TXDTO.js → chunk-6WI4HNAF.js} +2 -2
- package/dist/{chunk-J4TTSXDN.js → chunk-6XDE62WQ.js} +1 -1
- package/dist/{chunk-TO5CMMQC.js → chunk-7ZQQ6PJ4.js} +4 -17
- package/dist/{chunk-JLLMTTQ4.js → chunk-C4TSQUFA.js} +0 -7
- package/dist/{chunk-SV7X6HEN.js → chunk-D46PE6MU.js} +4 -4
- package/dist/{chunk-2F6KNGOD.js → chunk-DANUXNQU.js} +1 -1
- package/dist/{chunk-FDRIFPG6.js → chunk-DSRRNRZW.js} +4 -4
- package/dist/{chunk-XI4MRH5P.js → chunk-ET6RH4LB.js} +12 -40
- package/dist/{chunk-OIRAH57Y.js → chunk-FNKFQFZJ.js} +1 -1
- package/dist/{chunk-S5UCZ2T3.js → chunk-G5WP3MJG.js} +1 -1
- package/dist/chunk-GBLNXNEH.js +64 -0
- package/dist/{chunk-HHCDMWEF.js → chunk-GCR4PGRY.js} +1 -1
- package/dist/{chunk-4HBAPPB2.js → chunk-HGLQXH4D.js} +2 -2
- package/dist/chunk-HZLJYEOO.js +92 -0
- package/dist/{chunk-LX2EYD74.js → chunk-I7NVWJ72.js} +2 -2
- package/dist/{chunk-AXCB7SKY.js → chunk-IEFYARHC.js} +16 -16
- package/dist/{chunk-3YUKCYHI.js → chunk-JY62DSMP.js} +8 -8
- package/dist/{chunk-G5OMETUS.js → chunk-LCKQOHXI.js} +1 -1
- package/dist/{chunk-7IN4WRSO.js → chunk-MF4CWGMB.js} +12 -12
- package/dist/{chunk-J5AISIJS.js → chunk-NDET73GO.js} +22 -18
- package/dist/{chunk-JOM3N4EJ.js → chunk-NGV527RO.js} +1 -1
- package/dist/{chunk-RWVGJUON.js → chunk-OSDAP24S.js} +4 -4
- package/dist/{chunk-CUZPD3BF.js → chunk-PAYLVMZN.js} +2 -2
- package/dist/{chunk-6SOQUYOU.js → chunk-PYTRCD33.js} +2 -2
- package/dist/{chunk-6D3HHYER.js → chunk-QKC73SWB.js} +6 -12
- package/dist/{chunk-LFQ3IQQB.js → chunk-QO27AXIH.js} +2 -2
- package/dist/chunk-RVL5ROWQ.js +62 -0
- package/dist/{chunk-AQJAY5FA.js → chunk-S5KJZZKU.js} +1 -1
- package/dist/{chunk-K3HAYBWX.js → chunk-SNKCKED5.js} +1 -1
- package/dist/{chunk-AJLUPYCQ.js → chunk-SUA4WQRN.js} +20 -8
- package/dist/chunk-T4MDCVUQ.js +0 -0
- package/dist/{chunk-L6AU74EI.js → chunk-TOVBPLHD.js} +3 -3
- package/dist/{chunk-TFD3DSM2.js → chunk-UCIUAZQT.js} +14 -18
- package/dist/chunk-VIWM2ZZH.js +45 -0
- package/dist/{chunk-KGHWGLED.js → chunk-W3IVVPS5.js} +4 -4
- package/dist/{chunk-WNF2RKFA.js → chunk-WBU53USI.js} +13 -13
- package/dist/{chunk-FPESPW6P.js → chunk-XA32Z2OV.js} +1 -1
- package/dist/{chunk-GQVBWZLH.js → chunk-Y22GDIM6.js} +2 -2
- package/dist/{chunk-OIVXOT2X.js → chunk-YUBXS7YI.js} +2 -3
- package/dist/{chunk-VDXB5DCY.js → chunk-ZRDPJORV.js} +0 -10
- package/dist/components/ui/DataTable.js +5 -5
- package/dist/components/ui/data-table/DataTable.js +5 -5
- package/dist/components/ui/data-table/DataTableFilters.js +2 -2
- package/dist/components/ui/data-table/DataTableSearch.js +2 -2
- package/dist/config/common.js +2 -2
- package/dist/constants/index.js +11 -13
- package/dist/constants/pagination.d.ts +0 -5
- package/dist/constants/pagination.js +1 -1
- package/dist/constants/security.d.ts +0 -6
- package/dist/constants/security.js +1 -3
- package/dist/constants/validation.d.ts +1 -3
- package/dist/error/error-display.js +2 -2
- package/dist/error/error-handler.js +5 -5
- package/dist/error/index.js +15 -15
- package/dist/geolocation/batch-processor.js +5 -5
- package/dist/geolocation/config.js +2 -2
- package/dist/geolocation/index.js +9 -9
- package/dist/geolocation/providers/index.js +5 -5
- package/dist/geolocation/providers/ipgeolocation-provider.js +3 -3
- package/dist/geolocation/providers/maxmind-provider.js +3 -3
- package/dist/initialize.js +12 -12
- package/dist/logger/config.js +2 -2
- package/dist/logger/logger.js +4 -4
- package/dist/middleware/auth.d.ts +1 -0
- package/dist/middleware/auth.js +9 -7
- package/dist/middleware/cors-config.js +2 -2
- package/dist/middleware/cors.js +6 -6
- package/dist/middleware/error-handler.js +7 -7
- package/dist/middleware/index.d.ts +1 -1
- package/dist/middleware/index.js +22 -20
- package/dist/middleware/middleware-chain.js +5 -5
- package/dist/middleware/rate-limit.d.ts +3 -7
- package/dist/middleware/rate-limit.js +5 -5
- package/dist/middleware/response-logger.js +5 -5
- package/dist/middleware/security.js +5 -5
- package/dist/middleware/types.d.ts +1 -1
- package/dist/middleware/wrappers.js +17 -17
- package/dist/storage/config.js +2 -2
- package/dist/storage/r2-storage.js +2 -2
- package/dist/system/cpu.js +6 -6
- package/dist/system/disk.js +6 -6
- package/dist/system/environment.js +10 -10
- package/dist/system/health-check.js +9 -9
- package/dist/system/index.js +16 -16
- package/dist/system/memory.js +6 -6
- package/dist/system/network.js +6 -6
- package/dist/system/utils.js +5 -5
- package/dist/types/env.d.ts +2 -13
- package/dist/types/geoip.d.ts +4 -4
- package/dist/types/qr-code.d.ts +20 -20
- package/dist/types/qr-code.js +4 -4
- package/dist/utils/cors.d.ts +6 -4
- package/dist/utils/cors.js +4 -4
- package/dist/utils/csv-export.js +5 -5
- package/dist/utils/error-message-formatter.js +1 -1
- package/dist/utils/error-processor.js +5 -5
- package/dist/utils/index.js +8 -8
- package/dist/utils/optimistic-lock.d.ts +4 -4
- package/package.json +5 -1
- package/dist/cache/cache-keys-legacy.d.ts +0 -35
- package/dist/cache/cache-keys-legacy.js +0 -7
- package/dist/chunk-JBCDEAMW.js +0 -35
- package/dist/chunk-O7CK3CKJ.js +0 -84
- package/dist/chunk-V5K5FYU7.js +0 -200
- package/dist/{chunk-GFWGLWTS.js → chunk-23LXAAMU.js} +3 -3
- package/dist/{chunk-3CBGGMIY.js → chunk-2VNDWG6P.js} +3 -3
- package/dist/{chunk-OZE5KUS3.js → chunk-52BIDTZH.js} +3 -3
- package/dist/{chunk-OHBAELPZ.js → chunk-6O3I4ORK.js} +3 -3
- package/dist/{chunk-QMCOX3DP.js → chunk-EBUEBEJX.js} +0 -0
- package/dist/{chunk-BJSEYZBH.js → chunk-I4UEUKSB.js} +3 -3
- package/dist/{chunk-SEZJN4TC.js → chunk-LJEGM4OO.js} +3 -3
- package/dist/{chunk-AYZJN32D.js → chunk-PL33DK2X.js} +3 -3
- package/dist/{chunk-KHYY4KCV.js → chunk-TH45RVP7.js} +3 -3
- package/dist/{chunk-SFPMFVSD.js → chunk-XICTHSUH.js} +3 -3
|
@@ -1,14 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getCommonConfig
|
|
3
|
+
} from "./chunk-XICTHSUH.js";
|
|
1
4
|
import {
|
|
2
5
|
__spreadValues
|
|
3
6
|
} from "./chunk-ORMEWXMH.js";
|
|
4
7
|
|
|
5
8
|
// src/auth/core/jwt/cookie.ts
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
function getDefaultOptions() {
|
|
10
|
+
let isProduction = false;
|
|
11
|
+
try {
|
|
12
|
+
isProduction = getCommonConfig().nodeEnv === "production";
|
|
13
|
+
} catch (e) {
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
secure: isProduction,
|
|
17
|
+
sameSite: "lax"
|
|
18
|
+
};
|
|
19
|
+
}
|
|
10
20
|
function setTokenCookies(response, tokenPair, options = {}) {
|
|
11
|
-
|
|
21
|
+
var _a;
|
|
22
|
+
const opts = __spreadValues(__spreadValues({}, getDefaultOptions()), options);
|
|
12
23
|
response.cookies.set("access_token", tokenPair.accessToken, {
|
|
13
24
|
httpOnly: true,
|
|
14
25
|
secure: opts.secure,
|
|
@@ -20,13 +31,14 @@ function setTokenCookies(response, tokenPair, options = {}) {
|
|
|
20
31
|
httpOnly: true,
|
|
21
32
|
secure: opts.secure,
|
|
22
33
|
sameSite: opts.sameSite,
|
|
23
|
-
path: "/api/auth",
|
|
34
|
+
path: (_a = opts.refreshTokenPath) != null ? _a : "/api/auth",
|
|
24
35
|
maxAge: 7 * 24 * 60 * 60
|
|
25
36
|
});
|
|
26
37
|
return response;
|
|
27
38
|
}
|
|
28
39
|
function clearTokenCookies(response, options = {}) {
|
|
29
|
-
|
|
40
|
+
var _a;
|
|
41
|
+
const opts = __spreadValues(__spreadValues({}, getDefaultOptions()), options);
|
|
30
42
|
response.cookies.set("access_token", "", {
|
|
31
43
|
httpOnly: true,
|
|
32
44
|
secure: opts.secure,
|
|
@@ -38,7 +50,7 @@ function clearTokenCookies(response, options = {}) {
|
|
|
38
50
|
httpOnly: true,
|
|
39
51
|
secure: opts.secure,
|
|
40
52
|
sameSite: opts.sameSite,
|
|
41
|
-
path: "/api/auth",
|
|
53
|
+
path: (_a = opts.refreshTokenPath) != null ? _a : "/api/auth",
|
|
42
54
|
maxAge: 0
|
|
43
55
|
});
|
|
44
56
|
return response;
|
|
File without changes
|
|
@@ -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";
|
|
10
13
|
import {
|
|
11
14
|
AuthError
|
|
12
15
|
} from "./chunk-AIH3F7JV.js";
|
|
13
|
-
import {
|
|
14
|
-
logger
|
|
15
|
-
} from "./chunk-GQVBWZLH.js";
|
|
16
16
|
import {
|
|
17
17
|
__spreadProps,
|
|
18
18
|
__spreadValues
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
CACHE_HEALTH_DEFAULTS,
|
|
8
8
|
CACHE_TTL_DEFAULTS,
|
|
9
9
|
INMEMORY_CACHE_DEFAULTS
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-57W32BFZ.js";
|
|
11
11
|
import {
|
|
12
12
|
__spreadValues
|
|
13
13
|
} from "./chunk-ORMEWXMH.js";
|
|
@@ -22,7 +22,7 @@ function setConfig(config) {
|
|
|
22
22
|
globalThis[GLOBAL_KEY] = config;
|
|
23
23
|
}
|
|
24
24
|
function initializeCache(input) {
|
|
25
|
-
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
|
|
25
|
+
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;
|
|
26
26
|
if (getConfig()) return;
|
|
27
27
|
if (input.redis !== void 0) {
|
|
28
28
|
if (!input.redis.url) {
|
|
@@ -68,27 +68,23 @@ function initializeCache(input) {
|
|
|
68
68
|
GEOIP: (_x = (_w = input.ttl) == null ? void 0 : _w.GEOIP) != null ? _x : CACHE_TTL_DEFAULTS.GEOIP,
|
|
69
69
|
SETTINGS: (_z = (_y = input.ttl) == null ? void 0 : _y.SETTINGS) != null ? _z : CACHE_TTL_DEFAULTS.SETTINGS,
|
|
70
70
|
ANALYTICS: (_B = (_A = input.ttl) == null ? void 0 : _A.ANALYTICS) != null ? _B : CACHE_TTL_DEFAULTS.ANALYTICS,
|
|
71
|
-
USER: (_D = (_C = input.ttl) == null ? void 0 : _C.USER) != null ? _D : CACHE_TTL_DEFAULTS.USER
|
|
72
|
-
LINK: (_F = (_E = input.ttl) == null ? void 0 : _E.LINK) != null ? _F : CACHE_TTL_DEFAULTS.LINK,
|
|
73
|
-
ALIAS: (_H = (_G = input.ttl) == null ? void 0 : _G.ALIAS) != null ? _H : CACHE_TTL_DEFAULTS.ALIAS,
|
|
74
|
-
COMMUNITY: (_J = (_I = input.ttl) == null ? void 0 : _I.COMMUNITY) != null ? _J : CACHE_TTL_DEFAULTS.COMMUNITY,
|
|
75
|
-
RESERVED_WORDS: (_L = (_K = input.ttl) == null ? void 0 : _K.RESERVED_WORDS) != null ? _L : CACHE_TTL_DEFAULTS.RESERVED_WORDS
|
|
71
|
+
USER: (_D = (_C = input.ttl) == null ? void 0 : _C.USER) != null ? _D : CACHE_TTL_DEFAULTS.USER
|
|
76
72
|
},
|
|
77
73
|
categories: mergedCategories,
|
|
78
74
|
fallback: {
|
|
79
|
-
redisErrorThresholdGlobal: (
|
|
80
|
-
redisErrorThresholdLocal: (
|
|
81
|
-
redisReconnectInterval: (
|
|
82
|
-
fallbackOnRedisError: (
|
|
83
|
-
writeToMemory: (
|
|
75
|
+
redisErrorThresholdGlobal: (_F = (_E = input.fallback) == null ? void 0 : _E.redisErrorThresholdGlobal) != null ? _F : CACHE_FALLBACK_DEFAULTS.REDIS_ERROR_THRESHOLD_GLOBAL,
|
|
76
|
+
redisErrorThresholdLocal: (_H = (_G = input.fallback) == null ? void 0 : _G.redisErrorThresholdLocal) != null ? _H : CACHE_FALLBACK_DEFAULTS.REDIS_ERROR_THRESHOLD_LOCAL,
|
|
77
|
+
redisReconnectInterval: (_J = (_I = input.fallback) == null ? void 0 : _I.redisReconnectInterval) != null ? _J : CACHE_FALLBACK_DEFAULTS.REDIS_RECONNECT_INTERVAL,
|
|
78
|
+
fallbackOnRedisError: (_L = (_K = input.fallback) == null ? void 0 : _K.fallbackOnRedisError) != null ? _L : CACHE_FALLBACK_DEFAULTS.FALLBACK_ON_REDIS_ERROR,
|
|
79
|
+
writeToMemory: (_N = (_M = input.fallback) == null ? void 0 : _M.writeToMemory) != null ? _N : CACHE_FALLBACK_DEFAULTS.WRITE_TO_MEMORY
|
|
84
80
|
},
|
|
85
81
|
health: {
|
|
86
|
-
errorRateThreshold: (
|
|
87
|
-
hitRateThreshold: (
|
|
88
|
-
reportHitRateThreshold: (
|
|
89
|
-
reportResponseTimeThreshold: (
|
|
90
|
-
reportInvalidationThreshold: (
|
|
91
|
-
reportMinRequests: (
|
|
82
|
+
errorRateThreshold: (_P = (_O = input.health) == null ? void 0 : _O.errorRateThreshold) != null ? _P : CACHE_HEALTH_DEFAULTS.ERROR_RATE_THRESHOLD,
|
|
83
|
+
hitRateThreshold: (_R = (_Q = input.health) == null ? void 0 : _Q.hitRateThreshold) != null ? _R : CACHE_HEALTH_DEFAULTS.HIT_RATE_THRESHOLD,
|
|
84
|
+
reportHitRateThreshold: (_T = (_S = input.health) == null ? void 0 : _S.reportHitRateThreshold) != null ? _T : CACHE_HEALTH_DEFAULTS.REPORT_HIT_RATE_THRESHOLD,
|
|
85
|
+
reportResponseTimeThreshold: (_V = (_U = input.health) == null ? void 0 : _U.reportResponseTimeThreshold) != null ? _V : CACHE_HEALTH_DEFAULTS.REPORT_RESPONSE_TIME_THRESHOLD,
|
|
86
|
+
reportInvalidationThreshold: (_X = (_W = input.health) == null ? void 0 : _W.reportInvalidationThreshold) != null ? _X : CACHE_HEALTH_DEFAULTS.REPORT_INVALIDATION_THRESHOLD,
|
|
87
|
+
reportMinRequests: (_Z = (_Y = input.health) == null ? void 0 : _Y.reportMinRequests) != null ? _Z : CACHE_HEALTH_DEFAULTS.REPORT_MIN_REQUESTS
|
|
92
88
|
}
|
|
93
89
|
});
|
|
94
90
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getENV,
|
|
3
|
+
isCacheEnabled
|
|
4
|
+
} from "./chunk-ET6RH4LB.js";
|
|
5
|
+
|
|
6
|
+
// src/cache/cache-config.ts
|
|
7
|
+
var getCacheConfig = {
|
|
8
|
+
// Analytics 캐시 설정
|
|
9
|
+
analytics: {
|
|
10
|
+
enabled: () => getENV().CACHE.ANALYTICS.ENABLED && isCacheEnabled(),
|
|
11
|
+
duration: () => getENV().CACHE.ANALYTICS.DURATION
|
|
12
|
+
},
|
|
13
|
+
// User 캐시 설정
|
|
14
|
+
user: {
|
|
15
|
+
enabled: () => getENV().CACHE.USER.ENABLED && isCacheEnabled(),
|
|
16
|
+
duration: () => getENV().CACHE.USER.DURATION
|
|
17
|
+
},
|
|
18
|
+
// GeoIP 캐시 설정
|
|
19
|
+
geoip: {
|
|
20
|
+
enabled: () => getENV().CACHE.GEOIP.ENABLED && isCacheEnabled(),
|
|
21
|
+
duration: () => getENV().CACHE.GEOIP.DURATION
|
|
22
|
+
},
|
|
23
|
+
// Settings 캐시 설정
|
|
24
|
+
settings: {
|
|
25
|
+
enabled: () => getENV().CACHE.SETTINGS.ENABLED && isCacheEnabled(),
|
|
26
|
+
duration: () => getENV().CACHE.SETTINGS.DURATION
|
|
27
|
+
},
|
|
28
|
+
// Rate Limiter 캐시 설정
|
|
29
|
+
rateLimit: {
|
|
30
|
+
enabled: () => getENV().CACHE.RATE_LIMIT.ENABLED && isCacheEnabled(),
|
|
31
|
+
duration: () => getENV().CACHE.RATE_LIMIT.DURATION
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
var getCacheTTL = {
|
|
35
|
+
settings: () => getCacheConfig.settings.duration(),
|
|
36
|
+
user: () => getCacheConfig.user.duration(),
|
|
37
|
+
analytics: () => getCacheConfig.analytics.duration(),
|
|
38
|
+
geoip: () => getCacheConfig.geoip.duration(),
|
|
39
|
+
default: () => getCacheConfig.analytics.duration()
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export {
|
|
43
|
+
getCacheConfig,
|
|
44
|
+
getCacheTTL
|
|
45
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getCorsConfig
|
|
3
|
-
} from "./chunk-GFWGLWTS.js";
|
|
4
1
|
import {
|
|
5
2
|
logger
|
|
6
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Y22GDIM6.js";
|
|
4
|
+
import {
|
|
5
|
+
getCorsConfig
|
|
6
|
+
} from "./chunk-23LXAAMU.js";
|
|
7
7
|
|
|
8
8
|
// src/middleware/cors.ts
|
|
9
9
|
import { NextResponse } from "next/server";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getPlatform
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-G5WP3MJG.js";
|
|
4
4
|
import {
|
|
5
5
|
getGeolocationConfig
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2VNDWG6P.js";
|
|
7
7
|
import {
|
|
8
8
|
getAuthConfig
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import {
|
|
11
|
-
getCommonConfig
|
|
12
|
-
} from "./chunk-SFPMFVSD.js";
|
|
9
|
+
} from "./chunk-52BIDTZH.js";
|
|
13
10
|
import {
|
|
14
11
|
getResolvedCacheConfig
|
|
15
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UCIUAZQT.js";
|
|
13
|
+
import {
|
|
14
|
+
getCommonConfig
|
|
15
|
+
} from "./chunk-XICTHSUH.js";
|
|
16
16
|
|
|
17
17
|
// src/system/environment.ts
|
|
18
18
|
import os from "os";
|
|
@@ -38,19 +38,19 @@ function checkEnvironmentVariables() {
|
|
|
38
38
|
});
|
|
39
39
|
if (cache.redis) {
|
|
40
40
|
results.push({
|
|
41
|
-
key: "
|
|
41
|
+
key: "REDIS_REST_URL",
|
|
42
42
|
ok: true,
|
|
43
43
|
value: cache.redis.url.length > 20 ? cache.redis.url.substring(0, 20) + "..." : cache.redis.url
|
|
44
44
|
});
|
|
45
|
-
results.push({ key: "
|
|
45
|
+
results.push({ key: "REDIS_REST_TOKEN", ok: true, value: "***" });
|
|
46
46
|
} else {
|
|
47
|
-
results.push({ key: "
|
|
48
|
-
results.push({ key: "
|
|
47
|
+
results.push({ key: "REDIS_REST_URL", ok: false });
|
|
48
|
+
results.push({ key: "REDIS_REST_TOKEN", ok: false });
|
|
49
49
|
}
|
|
50
50
|
} catch (e) {
|
|
51
51
|
results.push({ key: "CACHE_ENABLED", ok: false });
|
|
52
|
-
results.push({ key: "
|
|
53
|
-
results.push({ key: "
|
|
52
|
+
results.push({ key: "REDIS_REST_URL", ok: false });
|
|
53
|
+
results.push({ key: "REDIS_REST_TOKEN", ok: false });
|
|
54
54
|
}
|
|
55
55
|
try {
|
|
56
56
|
const geo = getGeolocationConfig();
|
|
@@ -10,17 +10,16 @@ function formatRedisError(errorMessage) {
|
|
|
10
10
|
if (cleanMessage.startsWith("ERR ")) {
|
|
11
11
|
cleanMessage = cleanMessage.replace(/^ERR\s+/, "").trim();
|
|
12
12
|
}
|
|
13
|
-
cleanMessage = cleanMessage.replace(/\s*See https
|
|
13
|
+
cleanMessage = cleanMessage.replace(/\s*See https?:\/\/\S+\s*for details.*$/i, "").trim();
|
|
14
14
|
if (cleanMessage.includes("max requests limit exceeded")) {
|
|
15
15
|
const limitMatch = cleanMessage.match(/Limit:\s*(\d+)/);
|
|
16
16
|
const usageMatch = cleanMessage.match(/Usage:\s*(\d+)/);
|
|
17
17
|
if (limitMatch && usageMatch) {
|
|
18
18
|
const limit = parseInt(limitMatch[1]);
|
|
19
|
-
const usage = parseInt(usageMatch[1]);
|
|
20
19
|
const limitInK = Math.floor(limit / 1e3);
|
|
21
20
|
return `Redis request limit exceeded (${limitInK}K requests used). Please upgrade your plan or wait for the quota to reset.`;
|
|
22
21
|
}
|
|
23
|
-
return "Redis request limit exceeded. Please check your
|
|
22
|
+
return "Redis request limit exceeded. Please check your Redis provider plan.";
|
|
24
23
|
}
|
|
25
24
|
if (cleanMessage.includes("timeout") || cleanMessage.includes("ETIMEDOUT")) {
|
|
26
25
|
return "Redis connection timeout. Please check network connectivity.";
|
|
@@ -10,18 +10,8 @@ var PAGINATION = {
|
|
|
10
10
|
DEFAULT_PAGE: 1
|
|
11
11
|
};
|
|
12
12
|
var PAGE_SIZES = {
|
|
13
|
-
// 링크 목록
|
|
14
|
-
LINKS: 10,
|
|
15
13
|
// 사용자 목록
|
|
16
14
|
USERS: 20,
|
|
17
|
-
// 예약어 목록
|
|
18
|
-
RESERVED_WORDS: 20,
|
|
19
|
-
// 공지사항 목록
|
|
20
|
-
NOTICES: 10,
|
|
21
|
-
// 태그 목록
|
|
22
|
-
TAGS: 50,
|
|
23
|
-
// 클릭 히스토리
|
|
24
|
-
CLICK_HISTORY: 50,
|
|
25
15
|
// 활동 내역
|
|
26
16
|
ACTIVITY: 20,
|
|
27
17
|
// 검색 결과
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DataTable
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-I7NVWJ72.js";
|
|
4
4
|
import "../../chunk-7IY3RQQL.js";
|
|
5
5
|
import "../../chunk-MAATEX2R.js";
|
|
6
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-LJEGM4OO.js";
|
|
7
7
|
import "../../chunk-IPXPCBDO.js";
|
|
8
|
-
import "../../chunk-
|
|
8
|
+
import "../../chunk-TH45RVP7.js";
|
|
9
9
|
import "../../chunk-NY5QXT33.js";
|
|
10
|
-
import "../../chunk-34WAGUT5.js";
|
|
11
|
-
import "../../chunk-RJUVBBZG.js";
|
|
12
10
|
import "../../chunk-IJEZ7G7S.js";
|
|
13
11
|
import "../../chunk-YJWLWUFK.js";
|
|
14
12
|
import "../../chunk-WDUFQFDP.js";
|
|
13
|
+
import "../../chunk-34WAGUT5.js";
|
|
15
14
|
import "../../chunk-F6LCSFSU.js";
|
|
16
15
|
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-
|
|
4
|
+
} from "../../../chunk-I7NVWJ72.js";
|
|
5
5
|
import "../../../chunk-7IY3RQQL.js";
|
|
6
6
|
import "../../../chunk-MAATEX2R.js";
|
|
7
|
-
import "../../../chunk-
|
|
7
|
+
import "../../../chunk-LJEGM4OO.js";
|
|
8
8
|
import "../../../chunk-IPXPCBDO.js";
|
|
9
|
-
import "../../../chunk-
|
|
9
|
+
import "../../../chunk-TH45RVP7.js";
|
|
10
10
|
import "../../../chunk-NY5QXT33.js";
|
|
11
|
-
import "../../../chunk-34WAGUT5.js";
|
|
12
|
-
import "../../../chunk-RJUVBBZG.js";
|
|
13
11
|
import "../../../chunk-IJEZ7G7S.js";
|
|
14
12
|
import "../../../chunk-YJWLWUFK.js";
|
|
15
13
|
import "../../../chunk-WDUFQFDP.js";
|
|
14
|
+
import "../../../chunk-34WAGUT5.js";
|
|
16
15
|
import "../../../chunk-F6LCSFSU.js";
|
|
17
16
|
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-
|
|
5
|
-
import "../../../chunk-RJUVBBZG.js";
|
|
4
|
+
} from "../../../chunk-LJEGM4OO.js";
|
|
6
5
|
import "../../../chunk-IJEZ7G7S.js";
|
|
7
6
|
import "../../../chunk-WDUFQFDP.js";
|
|
8
7
|
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-
|
|
4
|
+
} from "../../../chunk-TH45RVP7.js";
|
|
5
5
|
import "../../../chunk-NY5QXT33.js";
|
|
6
|
-
import "../../../chunk-RJUVBBZG.js";
|
|
7
6
|
import "../../../chunk-L25BNU3E.js";
|
|
7
|
+
import "../../../chunk-RJUVBBZG.js";
|
|
8
8
|
import "../../../chunk-62FLBG6B.js";
|
|
9
9
|
import "../../../chunk-ORMEWXMH.js";
|
|
10
10
|
export {
|
package/dist/config/common.js
CHANGED
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
getCommonConfig,
|
|
3
3
|
initializeCommon,
|
|
4
4
|
resetCommon
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-K25ICPU4.js";
|
|
5
|
+
} from "../chunk-XICTHSUH.js";
|
|
7
6
|
import "../chunk-2QH66EVQ.js";
|
|
7
|
+
import "../chunk-K25ICPU4.js";
|
|
8
8
|
import "../chunk-ORMEWXMH.js";
|
|
9
9
|
export {
|
|
10
10
|
getCommonConfig,
|
package/dist/constants/index.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DATE,
|
|
3
|
+
FILE_UPLOAD,
|
|
4
|
+
NUMERIC,
|
|
5
|
+
PASSWORD,
|
|
6
|
+
TEXT,
|
|
7
|
+
URL,
|
|
8
|
+
USER_INPUT
|
|
9
|
+
} from "../chunk-LNV2E4I6.js";
|
|
1
10
|
import {
|
|
2
11
|
GENERIC_CONFIRM_MESSAGES,
|
|
3
12
|
GENERIC_ERROR_MESSAGES,
|
|
@@ -10,9 +19,8 @@ import {
|
|
|
10
19
|
PAGE_SIZES,
|
|
11
20
|
PAGINATION,
|
|
12
21
|
SORT_OPTIONS
|
|
13
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-ZRDPJORV.js";
|
|
14
23
|
import {
|
|
15
|
-
API_KEY,
|
|
16
24
|
CSRF,
|
|
17
25
|
EMAIL_VERIFICATION,
|
|
18
26
|
JWT_DEFAULTS,
|
|
@@ -21,16 +29,7 @@ import {
|
|
|
21
29
|
PASSWORD_RESET,
|
|
22
30
|
SECURITY_HEADERS,
|
|
23
31
|
SESSION
|
|
24
|
-
} from "../chunk-
|
|
25
|
-
import {
|
|
26
|
-
DATE,
|
|
27
|
-
FILE_UPLOAD,
|
|
28
|
-
NUMERIC,
|
|
29
|
-
PASSWORD,
|
|
30
|
-
TEXT,
|
|
31
|
-
URL,
|
|
32
|
-
USER_INPUT
|
|
33
|
-
} from "../chunk-LNV2E4I6.js";
|
|
32
|
+
} from "../chunk-C4TSQUFA.js";
|
|
34
33
|
import {
|
|
35
34
|
ERROR_CODES,
|
|
36
35
|
HTTP_STATUS,
|
|
@@ -47,7 +46,6 @@ import {
|
|
|
47
46
|
} from "../chunk-SNTLJ646.js";
|
|
48
47
|
import "../chunk-ORMEWXMH.js";
|
|
49
48
|
export {
|
|
50
|
-
API_KEY,
|
|
51
49
|
CSRF,
|
|
52
50
|
DATE,
|
|
53
51
|
DATE_RANGE,
|
|
@@ -8,12 +8,7 @@ export declare const PAGINATION: {
|
|
|
8
8
|
readonly DEFAULT_PAGE: 1;
|
|
9
9
|
};
|
|
10
10
|
export declare const PAGE_SIZES: {
|
|
11
|
-
readonly LINKS: 10;
|
|
12
11
|
readonly USERS: 20;
|
|
13
|
-
readonly RESERVED_WORDS: 20;
|
|
14
|
-
readonly NOTICES: 10;
|
|
15
|
-
readonly TAGS: 50;
|
|
16
|
-
readonly CLICK_HISTORY: 50;
|
|
17
12
|
readonly ACTIVITY: 20;
|
|
18
13
|
readonly SEARCH_RESULTS: 10;
|
|
19
14
|
};
|
|
@@ -30,12 +30,6 @@ export declare const MAGIC_LINK: {
|
|
|
30
30
|
/** 토큰 길이 (바이트) */
|
|
31
31
|
readonly TOKEN_LENGTH: 32;
|
|
32
32
|
};
|
|
33
|
-
export declare const API_KEY: {
|
|
34
|
-
/** 키 길이 (문자) */
|
|
35
|
-
readonly LENGTH: 32;
|
|
36
|
-
/** 키 접두사 */
|
|
37
|
-
readonly PREFIX: "tlog_";
|
|
38
|
-
};
|
|
39
33
|
export declare const SESSION: {
|
|
40
34
|
/** 세션 쿠키 이름 */
|
|
41
35
|
readonly COOKIE_NAME: "session";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
API_KEY,
|
|
3
2
|
CSRF,
|
|
4
3
|
EMAIL_VERIFICATION,
|
|
5
4
|
JWT_DEFAULTS,
|
|
@@ -8,10 +7,9 @@ import {
|
|
|
8
7
|
PASSWORD_RESET,
|
|
9
8
|
SECURITY_HEADERS,
|
|
10
9
|
SESSION
|
|
11
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-C4TSQUFA.js";
|
|
12
11
|
import "../chunk-ORMEWXMH.js";
|
|
13
12
|
export {
|
|
14
|
-
API_KEY,
|
|
15
13
|
CSRF,
|
|
16
14
|
EMAIL_VERIFICATION,
|
|
17
15
|
JWT_DEFAULTS,
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
* 데이터 검증 관련 상수 (범용 유틸리티)
|
|
3
3
|
*
|
|
4
4
|
* 이 파일은 프로젝트 독립적인 범용 검증 상수들만 포함합니다.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @see <your-project>/constants/alias.ts - Alias, Link, ShortCode 관련 상수
|
|
5
|
+
* 도메인 비즈니스 로직 상수는 소비 프로젝트의 constants/ 영역에서 정의하세요.
|
|
8
6
|
*/
|
|
9
7
|
export declare const PASSWORD: {
|
|
10
8
|
/** 최소 길이 */
|
|
@@ -5,8 +5,7 @@ import {
|
|
|
5
5
|
getErrorIcon,
|
|
6
6
|
handleApiResponse,
|
|
7
7
|
showFriendlyError
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-EOEMOXNT.js";
|
|
8
|
+
} from "../chunk-I4UEUKSB.js";
|
|
10
9
|
import {
|
|
11
10
|
getErrorDisplayInfo,
|
|
12
11
|
getFriendlyMessage
|
|
@@ -14,6 +13,7 @@ import {
|
|
|
14
13
|
import "../chunk-JNJALNRR.js";
|
|
15
14
|
import "../chunk-AKD4YMJU.js";
|
|
16
15
|
import "../chunk-ON4ENPUS.js";
|
|
16
|
+
import "../chunk-EOEMOXNT.js";
|
|
17
17
|
import "../chunk-SNTLJ646.js";
|
|
18
18
|
import "../chunk-ORMEWXMH.js";
|
|
19
19
|
export {
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
error_handler_default,
|
|
6
6
|
processError,
|
|
7
7
|
withErrorHandler
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-TOVBPLHD.js";
|
|
9
9
|
import "../chunk-EOEMOXNT.js";
|
|
10
10
|
import "../chunk-SNTLJ646.js";
|
|
11
|
+
import "../chunk-Y22GDIM6.js";
|
|
12
|
+
import "../chunk-6O3I4ORK.js";
|
|
11
13
|
import "../chunk-AIH3F7JV.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-OHBAELPZ.js";
|
|
14
|
-
import "../chunk-SFPMFVSD.js";
|
|
15
|
-
import "../chunk-K25ICPU4.js";
|
|
14
|
+
import "../chunk-XICTHSUH.js";
|
|
16
15
|
import "../chunk-2QH66EVQ.js";
|
|
16
|
+
import "../chunk-K25ICPU4.js";
|
|
17
17
|
import "../chunk-ORMEWXMH.js";
|
|
18
18
|
export {
|
|
19
19
|
AUTH_ERROR_CODE_MAP,
|
package/dist/error/index.js
CHANGED
|
@@ -8,17 +8,7 @@ import {
|
|
|
8
8
|
getErrorIcon,
|
|
9
9
|
handleApiResponse,
|
|
10
10
|
showFriendlyError
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import {
|
|
13
|
-
AUTH_ERROR_CODE_MAP,
|
|
14
|
-
ErrorResponse,
|
|
15
|
-
errorToResponse,
|
|
16
|
-
processError,
|
|
17
|
-
withErrorHandler
|
|
18
|
-
} from "../chunk-L6AU74EI.js";
|
|
19
|
-
import {
|
|
20
|
-
AppError
|
|
21
|
-
} from "../chunk-EOEMOXNT.js";
|
|
11
|
+
} from "../chunk-I4UEUKSB.js";
|
|
22
12
|
import {
|
|
23
13
|
formatFriendlyError,
|
|
24
14
|
getErrorDisplayInfo,
|
|
@@ -33,6 +23,16 @@ import {
|
|
|
33
23
|
} from "../chunk-JNJALNRR.js";
|
|
34
24
|
import "../chunk-AKD4YMJU.js";
|
|
35
25
|
import "../chunk-ON4ENPUS.js";
|
|
26
|
+
import {
|
|
27
|
+
AUTH_ERROR_CODE_MAP,
|
|
28
|
+
ErrorResponse,
|
|
29
|
+
errorToResponse,
|
|
30
|
+
processError,
|
|
31
|
+
withErrorHandler
|
|
32
|
+
} from "../chunk-TOVBPLHD.js";
|
|
33
|
+
import {
|
|
34
|
+
AppError
|
|
35
|
+
} from "../chunk-EOEMOXNT.js";
|
|
36
36
|
import {
|
|
37
37
|
ERROR_CODES,
|
|
38
38
|
HTTP_STATUS,
|
|
@@ -47,12 +47,12 @@ import {
|
|
|
47
47
|
getHttpStatus,
|
|
48
48
|
getLogLevel
|
|
49
49
|
} from "../chunk-SNTLJ646.js";
|
|
50
|
+
import "../chunk-Y22GDIM6.js";
|
|
51
|
+
import "../chunk-6O3I4ORK.js";
|
|
50
52
|
import "../chunk-AIH3F7JV.js";
|
|
51
|
-
import "../chunk-
|
|
52
|
-
import "../chunk-OHBAELPZ.js";
|
|
53
|
-
import "../chunk-SFPMFVSD.js";
|
|
54
|
-
import "../chunk-K25ICPU4.js";
|
|
53
|
+
import "../chunk-XICTHSUH.js";
|
|
55
54
|
import "../chunk-2QH66EVQ.js";
|
|
55
|
+
import "../chunk-K25ICPU4.js";
|
|
56
56
|
import "../chunk-ORMEWXMH.js";
|
|
57
57
|
|
|
58
58
|
// src/error/ErrorBoundary.tsx
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BatchProcessor,
|
|
3
3
|
createBatchProcessor
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-K25ICPU4.js";
|
|
4
|
+
} from "../chunk-NGV527RO.js";
|
|
5
|
+
import "../chunk-Y22GDIM6.js";
|
|
6
|
+
import "../chunk-6O3I4ORK.js";
|
|
7
|
+
import "../chunk-XICTHSUH.js";
|
|
9
8
|
import "../chunk-2QH66EVQ.js";
|
|
9
|
+
import "../chunk-K25ICPU4.js";
|
|
10
10
|
import "../chunk-ORMEWXMH.js";
|
|
11
11
|
export {
|
|
12
12
|
BatchProcessor,
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
getGeolocationConfig,
|
|
3
3
|
initializeGeolocation,
|
|
4
4
|
resetGeolocation
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-K25ICPU4.js";
|
|
5
|
+
} from "../chunk-2VNDWG6P.js";
|
|
7
6
|
import "../chunk-2QH66EVQ.js";
|
|
7
|
+
import "../chunk-K25ICPU4.js";
|
|
8
8
|
import "../chunk-ORMEWXMH.js";
|
|
9
9
|
export {
|
|
10
10
|
getGeolocationConfig,
|