@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
package/dist/system/index.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getCpuInfo
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-6WI4HNAF.js";
|
|
4
4
|
import {
|
|
5
5
|
getDiskInfo
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-PYTRCD33.js";
|
|
7
7
|
import {
|
|
8
8
|
checkEnvironmentVariables
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-WBU53USI.js";
|
|
10
10
|
import {
|
|
11
11
|
checkServiceHealth
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-4OCGUJL5.js";
|
|
13
|
+
import "../chunk-YUBXS7YI.js";
|
|
14
14
|
import {
|
|
15
15
|
getMemoryInfo
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-QO27AXIH.js";
|
|
17
17
|
import {
|
|
18
18
|
getNetworkInfo
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-HGLQXH4D.js";
|
|
20
20
|
import {
|
|
21
21
|
getPlatform,
|
|
22
22
|
getRecommendedCommands
|
|
23
|
-
} from "../chunk-
|
|
24
|
-
import "../chunk-3CBGGMIY.js";
|
|
25
|
-
import "../chunk-OZE5KUS3.js";
|
|
23
|
+
} from "../chunk-G5WP3MJG.js";
|
|
26
24
|
import {
|
|
27
25
|
logger
|
|
28
|
-
} from "../chunk-
|
|
29
|
-
import "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
26
|
+
} from "../chunk-Y22GDIM6.js";
|
|
27
|
+
import "../chunk-2VNDWG6P.js";
|
|
28
|
+
import "../chunk-6O3I4ORK.js";
|
|
29
|
+
import "../chunk-52BIDTZH.js";
|
|
30
|
+
import "../chunk-UCIUAZQT.js";
|
|
31
|
+
import "../chunk-XICTHSUH.js";
|
|
33
32
|
import "../chunk-2QH66EVQ.js";
|
|
34
|
-
import "../chunk-
|
|
33
|
+
import "../chunk-K25ICPU4.js";
|
|
34
|
+
import "../chunk-57W32BFZ.js";
|
|
35
35
|
import "../chunk-ORMEWXMH.js";
|
|
36
36
|
|
|
37
37
|
// src/system/index.ts
|
package/dist/system/memory.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getMemoryInfo
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-K25ICPU4.js";
|
|
3
|
+
} from "../chunk-QO27AXIH.js";
|
|
4
|
+
import "../chunk-G5WP3MJG.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
|
getMemoryInfo
|
package/dist/system/network.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getNetworkInfo
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-K25ICPU4.js";
|
|
3
|
+
} from "../chunk-HGLQXH4D.js";
|
|
4
|
+
import "../chunk-G5WP3MJG.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
|
getNetworkInfo
|
package/dist/system/utils.js
CHANGED
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
runMacCommand,
|
|
10
10
|
runPlatformCommand,
|
|
11
11
|
runSafeCommand
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-K25ICPU4.js";
|
|
12
|
+
} from "../chunk-G5WP3MJG.js";
|
|
13
|
+
import "../chunk-Y22GDIM6.js";
|
|
14
|
+
import "../chunk-6O3I4ORK.js";
|
|
15
|
+
import "../chunk-XICTHSUH.js";
|
|
17
16
|
import "../chunk-2QH66EVQ.js";
|
|
17
|
+
import "../chunk-K25ICPU4.js";
|
|
18
18
|
import "../chunk-ORMEWXMH.js";
|
|
19
19
|
export {
|
|
20
20
|
commandExists,
|
package/dist/types/env.d.ts
CHANGED
|
@@ -42,10 +42,6 @@ export interface ICacheTTLConfig {
|
|
|
42
42
|
SETTINGS: number;
|
|
43
43
|
ANALYTICS: number;
|
|
44
44
|
USER: number;
|
|
45
|
-
LINK: number;
|
|
46
|
-
ALIAS: number;
|
|
47
|
-
COMMUNITY: number;
|
|
48
|
-
RESERVED_WORDS: number;
|
|
49
45
|
}
|
|
50
46
|
/**
|
|
51
47
|
* 캐시 백엔드 타입
|
|
@@ -83,22 +79,15 @@ export interface ICacheEnv {
|
|
|
83
79
|
USER: ICacheCategoryConfig;
|
|
84
80
|
GEOIP: ICacheCategoryConfig;
|
|
85
81
|
SETTINGS: ICacheCategoryConfig;
|
|
86
|
-
RESERVED_WORDS: ICacheCategoryConfig;
|
|
87
|
-
ALIAS: ICacheCategoryConfig;
|
|
88
|
-
COMMUNITY: ICacheCategoryConfig;
|
|
89
|
-
LINK: ICacheCategoryConfig;
|
|
90
82
|
RATE_LIMIT: ICacheCategoryConfig;
|
|
91
|
-
URL_TOKEN: ICacheCategoryConfig;
|
|
92
|
-
API_KEY: ICacheCategoryConfig;
|
|
93
|
-
API_CONFIG: ICacheCategoryConfig;
|
|
94
83
|
}
|
|
95
84
|
/**
|
|
96
85
|
* Raw 환경 변수 인터페이스 (직접 접근용)
|
|
97
86
|
*/
|
|
98
87
|
export interface IRawEnv {
|
|
99
88
|
NODE_ENV: 'development' | 'production' | 'test';
|
|
100
|
-
|
|
101
|
-
|
|
89
|
+
REDIS_REST_URL?: string;
|
|
90
|
+
REDIS_REST_TOKEN?: string;
|
|
102
91
|
CACHE_ENABLED: boolean;
|
|
103
92
|
}
|
|
104
93
|
/**
|
package/dist/types/geoip.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ export interface IGeoIPConfig {
|
|
|
13
13
|
export interface IGeoIPService {
|
|
14
14
|
getGeoLocation(ip: string): Promise<IGeoLocationData | null>;
|
|
15
15
|
getGeoLocationBatch(ips: string[]): Promise<Map<string, IGeoLocationData>>;
|
|
16
|
-
|
|
17
|
-
getGeographyAnalytics(
|
|
16
|
+
updateGeoLocation(entityId: string, ip: string): Promise<void>;
|
|
17
|
+
getGeographyAnalytics(entityId: string, days?: number): Promise<IGeographyAnalytics>;
|
|
18
18
|
getUserGeographyAnalytics(userId: string, days?: number): Promise<IGeographyAnalytics>;
|
|
19
19
|
findOrCreateGeoLocation(ip: string): Promise<string | null>;
|
|
20
20
|
isGeoLocationOutdated(validFrom: Date): boolean;
|
|
@@ -40,7 +40,7 @@ export interface IGeoIPServiceFactory {
|
|
|
40
40
|
}
|
|
41
41
|
export interface IGeoIPBatchProcessor {
|
|
42
42
|
processMissingGeoIPData(): Promise<IBatchProcessResult>;
|
|
43
|
-
|
|
43
|
+
processGeoIPData(entityId: string): Promise<IBatchProcessResult>;
|
|
44
44
|
cleanupOldGeoIPData(daysOld?: number): Promise<number>;
|
|
45
45
|
getGeoIPStats(): Promise<IGeoIPStats>;
|
|
46
46
|
processUserGeoIPData(userId: string): Promise<IBatchProcessResult>;
|
|
@@ -78,7 +78,7 @@ export interface IGeoIPProvider {
|
|
|
78
78
|
getTimeout(): number;
|
|
79
79
|
}
|
|
80
80
|
export interface IGeographyAnalytics {
|
|
81
|
-
|
|
81
|
+
totalEvents: number;
|
|
82
82
|
countries: Array<{
|
|
83
83
|
country: string;
|
|
84
84
|
countryName: string;
|
package/dist/types/qr-code.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface IQRCodeSettings {
|
|
|
10
10
|
}
|
|
11
11
|
export interface IQRCodeConfig {
|
|
12
12
|
id: string;
|
|
13
|
-
|
|
13
|
+
entityId: string;
|
|
14
14
|
settings: IQRCodeSettings;
|
|
15
15
|
isActive: boolean;
|
|
16
16
|
createdAt: Date;
|
|
@@ -28,31 +28,31 @@ export interface IQRTemplate {
|
|
|
28
28
|
updatedAt: Date;
|
|
29
29
|
}
|
|
30
30
|
export interface IQRCodeStats {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
totalInteractions: number;
|
|
32
|
+
scanCount: number;
|
|
33
|
+
directInteractions: number;
|
|
34
|
+
interactions: number;
|
|
35
|
+
apiInteractions: number;
|
|
36
|
+
usageRate: number;
|
|
37
37
|
}
|
|
38
38
|
export interface IQRCodeAnalytics {
|
|
39
39
|
dailyStats: Array<{
|
|
40
40
|
date: string;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
totalInteractions: number;
|
|
42
|
+
scanCount: number;
|
|
43
|
+
usageRate: number;
|
|
44
44
|
}>;
|
|
45
45
|
deviceStats: Array<{
|
|
46
46
|
deviceType: string;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
totalInteractions: number;
|
|
48
|
+
scanCount: number;
|
|
49
|
+
usageRate: number;
|
|
50
50
|
}>;
|
|
51
51
|
browserStats: Array<{
|
|
52
52
|
browser: string;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
totalInteractions: number;
|
|
54
|
+
scanCount: number;
|
|
55
|
+
usageRate: number;
|
|
56
56
|
}>;
|
|
57
57
|
}
|
|
58
58
|
export interface IQRCodeDownloadOptions {
|
|
@@ -85,8 +85,8 @@ export declare const QR_CODE_TEMPLATES: readonly [{
|
|
|
85
85
|
readonly name: "브랜드";
|
|
86
86
|
readonly description: "브랜드 컬러 적용";
|
|
87
87
|
readonly settings: {
|
|
88
|
-
readonly color: "#
|
|
89
|
-
readonly bgColor: "#
|
|
88
|
+
readonly color: "#4A90D9";
|
|
89
|
+
readonly bgColor: "#F5F5F5";
|
|
90
90
|
readonly errorCorrectionLevel: "H";
|
|
91
91
|
readonly size: number;
|
|
92
92
|
readonly includeMargin: boolean;
|
|
@@ -113,8 +113,8 @@ export declare const QR_CODE_TEMPLATES: readonly [{
|
|
|
113
113
|
readonly name: "컬러풀";
|
|
114
114
|
readonly description: "화려한 컬러 스타일";
|
|
115
115
|
readonly settings: {
|
|
116
|
-
readonly color: "#
|
|
117
|
-
readonly bgColor: "#
|
|
116
|
+
readonly color: "#D94A4A";
|
|
117
|
+
readonly bgColor: "#FFF8E1";
|
|
118
118
|
readonly errorCorrectionLevel: "H";
|
|
119
119
|
readonly size: number;
|
|
120
120
|
readonly includeMargin: boolean;
|
package/dist/types/qr-code.js
CHANGED
|
@@ -34,8 +34,8 @@ var QR_CODE_TEMPLATES = [
|
|
|
34
34
|
name: "\uBE0C\uB79C\uB4DC",
|
|
35
35
|
description: "\uBE0C\uB79C\uB4DC \uCEEC\uB7EC \uC801\uC6A9",
|
|
36
36
|
settings: __spreadProps(__spreadValues({}, DEFAULT_QR_SETTINGS), {
|
|
37
|
-
color: "#
|
|
38
|
-
bgColor: "#
|
|
37
|
+
color: "#4A90D9",
|
|
38
|
+
bgColor: "#F5F5F5",
|
|
39
39
|
errorCorrectionLevel: "H"
|
|
40
40
|
})
|
|
41
41
|
},
|
|
@@ -54,8 +54,8 @@ var QR_CODE_TEMPLATES = [
|
|
|
54
54
|
name: "\uCEEC\uB7EC\uD480",
|
|
55
55
|
description: "\uD654\uB824\uD55C \uCEEC\uB7EC \uC2A4\uD0C0\uC77C",
|
|
56
56
|
settings: __spreadProps(__spreadValues({}, DEFAULT_QR_SETTINGS), {
|
|
57
|
-
color: "#
|
|
58
|
-
bgColor: "#
|
|
57
|
+
color: "#D94A4A",
|
|
58
|
+
bgColor: "#FFF8E1",
|
|
59
59
|
errorCorrectionLevel: "H"
|
|
60
60
|
})
|
|
61
61
|
},
|
package/dist/utils/cors.d.ts
CHANGED
|
@@ -25,12 +25,14 @@ export declare function initCorsConfig(config: CorsConfig): void;
|
|
|
25
25
|
*/
|
|
26
26
|
export declare function getCorsConfig(): CorsConfig;
|
|
27
27
|
/**
|
|
28
|
-
* 허용된 도메인 목록
|
|
28
|
+
* 허용된 도메인 목록
|
|
29
29
|
*
|
|
30
30
|
* 우선순위:
|
|
31
|
-
* 1.
|
|
32
|
-
* 2.
|
|
33
|
-
* 3.
|
|
31
|
+
* 1. 미들웨어 CORS 설정의 allowedOrigins
|
|
32
|
+
* 2. baseUrl(설정/미들웨어)에서 자동 추출한 도메인
|
|
33
|
+
* 3. additionalOrigins(호출자 직접 추가)
|
|
34
|
+
*
|
|
35
|
+
* 개발 환경의 localhost 등은 호출자가 additionalOrigins로 명시 주입해야 합니다.
|
|
34
36
|
*/
|
|
35
37
|
export declare function getAllowedOrigins(): string[];
|
|
36
38
|
export declare function isOriginAllowed(origin: string | null | undefined): boolean;
|
package/dist/utils/cors.js
CHANGED
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
withCORS,
|
|
8
8
|
withPublicCORS,
|
|
9
9
|
withRestrictedCORS
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-K25ICPU4.js";
|
|
10
|
+
} from "../chunk-7ZQQ6PJ4.js";
|
|
11
|
+
import "../chunk-23LXAAMU.js";
|
|
12
|
+
import "../chunk-XICTHSUH.js";
|
|
14
13
|
import "../chunk-2QH66EVQ.js";
|
|
14
|
+
import "../chunk-K25ICPU4.js";
|
|
15
15
|
import "../chunk-ORMEWXMH.js";
|
|
16
16
|
export {
|
|
17
17
|
getAllowedOrigins,
|
package/dist/utils/csv-export.js
CHANGED
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
dateFormatter,
|
|
7
7
|
escapeCsvField,
|
|
8
8
|
rowToCsv
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-K25ICPU4.js";
|
|
9
|
+
} from "../chunk-SNKCKED5.js";
|
|
10
|
+
import "../chunk-Y22GDIM6.js";
|
|
11
|
+
import "../chunk-6O3I4ORK.js";
|
|
12
|
+
import "../chunk-XICTHSUH.js";
|
|
14
13
|
import "../chunk-2QH66EVQ.js";
|
|
14
|
+
import "../chunk-K25ICPU4.js";
|
|
15
15
|
import "../chunk-ORMEWXMH.js";
|
|
16
16
|
export {
|
|
17
17
|
boolFormatter,
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
throwUnauthorizedError,
|
|
13
13
|
throwValidationError,
|
|
14
14
|
withErrorHandling
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-DANUXNQU.js";
|
|
16
16
|
import "../chunk-EOEMOXNT.js";
|
|
17
17
|
import "../chunk-SNTLJ646.js";
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-K25ICPU4.js";
|
|
18
|
+
import "../chunk-Y22GDIM6.js";
|
|
19
|
+
import "../chunk-6O3I4ORK.js";
|
|
20
|
+
import "../chunk-XICTHSUH.js";
|
|
22
21
|
import "../chunk-2QH66EVQ.js";
|
|
22
|
+
import "../chunk-K25ICPU4.js";
|
|
23
23
|
import "../chunk-ORMEWXMH.js";
|
|
24
24
|
export {
|
|
25
25
|
ErrorProcessor,
|
package/dist/utils/index.js
CHANGED
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
withCORS,
|
|
58
58
|
withPublicCORS,
|
|
59
59
|
withRestrictedCORS
|
|
60
|
-
} from "../chunk-
|
|
60
|
+
} from "../chunk-7ZQQ6PJ4.js";
|
|
61
61
|
import {
|
|
62
62
|
boolFormatter,
|
|
63
63
|
createCsvHeader,
|
|
@@ -66,7 +66,7 @@ import {
|
|
|
66
66
|
dateFormatter,
|
|
67
67
|
escapeCsvField,
|
|
68
68
|
rowToCsv
|
|
69
|
-
} from "../chunk-
|
|
69
|
+
} from "../chunk-SNKCKED5.js";
|
|
70
70
|
import {
|
|
71
71
|
ErrorProcessor,
|
|
72
72
|
errorToResponse,
|
|
@@ -80,15 +80,15 @@ import {
|
|
|
80
80
|
throwUnauthorizedError,
|
|
81
81
|
throwValidationError,
|
|
82
82
|
withErrorHandling
|
|
83
|
-
} from "../chunk-
|
|
83
|
+
} from "../chunk-DANUXNQU.js";
|
|
84
84
|
import "../chunk-EOEMOXNT.js";
|
|
85
85
|
import "../chunk-SNTLJ646.js";
|
|
86
|
-
import "../chunk-
|
|
87
|
-
import "../chunk-
|
|
88
|
-
import "../chunk-
|
|
89
|
-
import "../chunk-
|
|
90
|
-
import "../chunk-K25ICPU4.js";
|
|
86
|
+
import "../chunk-Y22GDIM6.js";
|
|
87
|
+
import "../chunk-23LXAAMU.js";
|
|
88
|
+
import "../chunk-6O3I4ORK.js";
|
|
89
|
+
import "../chunk-XICTHSUH.js";
|
|
91
90
|
import "../chunk-2QH66EVQ.js";
|
|
91
|
+
import "../chunk-K25ICPU4.js";
|
|
92
92
|
import "../chunk-ORMEWXMH.js";
|
|
93
93
|
export {
|
|
94
94
|
ErrorProcessor,
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
* @example
|
|
15
15
|
* ```typescript
|
|
16
16
|
* await withOptimisticLock(
|
|
17
|
-
* () => prisma.
|
|
18
|
-
* where: { id
|
|
19
|
-
* data: {
|
|
17
|
+
* () => prisma.entity.updateMany({
|
|
18
|
+
* where: { id, version: currentVersion },
|
|
19
|
+
* data: { name: newName, version: { increment: 1 } },
|
|
20
20
|
* }),
|
|
21
|
-
* '
|
|
21
|
+
* 'Entity'
|
|
22
22
|
* );
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@withwiz/toolkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Shared utility library for withwiz projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -30,6 +30,10 @@
|
|
|
30
30
|
"./auth/core/password": "./dist/auth/core/password/index.js",
|
|
31
31
|
"./auth/core/password/client-helper": "./dist/auth/core/password/client-helper.js",
|
|
32
32
|
"./auth/core/oauth": "./dist/auth/core/oauth/index.js",
|
|
33
|
+
"./auth/core/oauth/providers": "./dist/auth/core/oauth/providers/index.js",
|
|
34
|
+
"./auth/core/oauth/providers/google": "./dist/auth/core/oauth/providers/google.js",
|
|
35
|
+
"./auth/core/oauth/providers/github": "./dist/auth/core/oauth/providers/github.js",
|
|
36
|
+
"./auth/core/oauth/providers/kakao": "./dist/auth/core/oauth/providers/kakao.js",
|
|
33
37
|
"./auth/adapters/prisma": "./dist/auth/adapters/prisma/index.js",
|
|
34
38
|
"./cache": "./dist/cache/index.js",
|
|
35
39
|
"./cache/cache": "./dist/cache/cache.js",
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Legacy Cache Keys
|
|
3
|
-
*
|
|
4
|
-
* @deprecated CacheKeys (<your-project>/config/cache-keys.ts)를 사용하세요.
|
|
5
|
-
*
|
|
6
|
-
* 캐시 키 생성 헬퍼 함수들 (레거시 호환성 유지)
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated CacheKeys (<your-project>/config/cache-keys.ts)를 사용하세요.
|
|
10
|
-
* 이 객체는 레거시 호환성을 위해 유지됩니다.
|
|
11
|
-
*/
|
|
12
|
-
export declare const cacheKeys: {
|
|
13
|
-
geographyStats: (linkId: string) => string;
|
|
14
|
-
timelineStats: (linkId: string) => string;
|
|
15
|
-
deviceStats: (linkId: string) => string;
|
|
16
|
-
browserStats: (linkId: string) => string;
|
|
17
|
-
osStats: (linkId: string) => string;
|
|
18
|
-
adminCountryStats: () => string;
|
|
19
|
-
adminCityStats: () => string;
|
|
20
|
-
adminDailyStats: () => string;
|
|
21
|
-
adminDeviceStats: () => string;
|
|
22
|
-
adminBrowserStats: () => string;
|
|
23
|
-
userLinks: (userId: string) => string;
|
|
24
|
-
userStats: (userId: string) => string;
|
|
25
|
-
linkInfo: (linkId: string) => string;
|
|
26
|
-
linkClicks: (linkId: string) => string;
|
|
27
|
-
geoLocation: (ipAddress: string) => string;
|
|
28
|
-
community: {
|
|
29
|
-
popularTags: (period: string, limit: number) => string;
|
|
30
|
-
tagLinks: (tagId: string, page: number, pageSize: number, sortBy: string, period: string) => string;
|
|
31
|
-
recentLinks: (page: number, pageSize: number) => string;
|
|
32
|
-
trendingLinks: (period: string, algorithm: string, limit: number) => string;
|
|
33
|
-
searchLinks: (query: string, tagIds: string, sortBy: string, page: number, pageSize: number) => string;
|
|
34
|
-
};
|
|
35
|
-
};
|
package/dist/chunk-JBCDEAMW.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// src/cache/cache-keys-legacy.ts
|
|
2
|
-
var cacheKeys = {
|
|
3
|
-
// 분석 데이터 캐시 키
|
|
4
|
-
geographyStats: (linkId) => `geography:${linkId}`,
|
|
5
|
-
timelineStats: (linkId) => `timeline:${linkId}`,
|
|
6
|
-
deviceStats: (linkId) => `devices:${linkId}`,
|
|
7
|
-
browserStats: (linkId) => `browsers:${linkId}`,
|
|
8
|
-
osStats: (linkId) => `os:${linkId}`,
|
|
9
|
-
// 관리자 통계 캐시 키
|
|
10
|
-
adminCountryStats: () => "admin:stats:country",
|
|
11
|
-
adminCityStats: () => "admin:stats:city",
|
|
12
|
-
adminDailyStats: () => "admin:stats:daily",
|
|
13
|
-
adminDeviceStats: () => "admin:stats:device",
|
|
14
|
-
adminBrowserStats: () => "admin:stats:browser",
|
|
15
|
-
// 사용자 데이터 캐시 키
|
|
16
|
-
userLinks: (userId) => `user:links:${userId}`,
|
|
17
|
-
userStats: (userId) => `user:stats:${userId}`,
|
|
18
|
-
// 링크 데이터 캐시 키
|
|
19
|
-
linkInfo: (linkId) => `link:info:${linkId}`,
|
|
20
|
-
linkClicks: (linkId) => `link:clicks:${linkId}`,
|
|
21
|
-
// GeoLocation 캐시 키
|
|
22
|
-
geoLocation: (ipAddress) => `geo:${ipAddress}`,
|
|
23
|
-
// 커뮤니티 캐시 키
|
|
24
|
-
community: {
|
|
25
|
-
popularTags: (period, limit) => `popular-tags:${period}:${limit}`,
|
|
26
|
-
tagLinks: (tagId, page, pageSize, sortBy, period) => `tag-links:${tagId}:${page}:${pageSize}:${sortBy}:${period}`,
|
|
27
|
-
recentLinks: (page, pageSize) => `recent-links:${page}:${pageSize}`,
|
|
28
|
-
trendingLinks: (period, algorithm, limit) => `trending-links:${period}:${algorithm}:${limit}`,
|
|
29
|
-
searchLinks: (query, tagIds, sortBy, page, pageSize) => `search:${query}:${tagIds}:${sortBy}:${page}:${pageSize}`
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export {
|
|
34
|
-
cacheKeys
|
|
35
|
-
};
|
package/dist/chunk-O7CK3CKJ.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getENV,
|
|
3
|
-
isCacheEnabled
|
|
4
|
-
} from "./chunk-XI4MRH5P.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
|
-
// Reserved Words 캐시 설정
|
|
29
|
-
reservedWords: {
|
|
30
|
-
enabled: () => getENV().CACHE.RESERVED_WORDS.ENABLED && isCacheEnabled(),
|
|
31
|
-
duration: () => getENV().CACHE.RESERVED_WORDS.DURATION
|
|
32
|
-
},
|
|
33
|
-
// Alias 캐시 설정
|
|
34
|
-
alias: {
|
|
35
|
-
enabled: () => getENV().CACHE.ALIAS.ENABLED && isCacheEnabled(),
|
|
36
|
-
duration: () => getENV().CACHE.ALIAS.DURATION
|
|
37
|
-
},
|
|
38
|
-
// Community 캐시 설정
|
|
39
|
-
community: {
|
|
40
|
-
enabled: () => getENV().CACHE.COMMUNITY.ENABLED && isCacheEnabled(),
|
|
41
|
-
duration: () => getENV().CACHE.COMMUNITY.DURATION
|
|
42
|
-
},
|
|
43
|
-
// Link 캐시 설정
|
|
44
|
-
link: {
|
|
45
|
-
enabled: () => getENV().CACHE.LINK.ENABLED && isCacheEnabled(),
|
|
46
|
-
duration: () => getENV().CACHE.LINK.DURATION
|
|
47
|
-
},
|
|
48
|
-
// Rate Limiter 캐시 설정
|
|
49
|
-
rateLimit: {
|
|
50
|
-
enabled: () => getENV().CACHE.RATE_LIMIT.ENABLED && isCacheEnabled(),
|
|
51
|
-
duration: () => getENV().CACHE.RATE_LIMIT.DURATION
|
|
52
|
-
},
|
|
53
|
-
// URL Shortener Token 캐시 설정
|
|
54
|
-
urlToken: {
|
|
55
|
-
enabled: () => getENV().CACHE.URL_TOKEN.ENABLED && isCacheEnabled(),
|
|
56
|
-
duration: () => getENV().CACHE.URL_TOKEN.DURATION
|
|
57
|
-
},
|
|
58
|
-
// API Key 캐시 설정
|
|
59
|
-
apiKey: {
|
|
60
|
-
enabled: () => getENV().CACHE.API_KEY.ENABLED && isCacheEnabled(),
|
|
61
|
-
duration: () => getENV().CACHE.API_KEY.DURATION
|
|
62
|
-
},
|
|
63
|
-
// API Config 캐시 설정
|
|
64
|
-
apiConfig: {
|
|
65
|
-
enabled: () => getENV().CACHE.API_CONFIG.ENABLED && isCacheEnabled(),
|
|
66
|
-
duration: () => getENV().CACHE.API_CONFIG.DURATION
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
var getCacheTTL = {
|
|
70
|
-
settings: () => getCacheConfig.settings.duration(),
|
|
71
|
-
reservedWords: () => getCacheConfig.reservedWords.duration(),
|
|
72
|
-
alias: () => getCacheConfig.alias.duration(),
|
|
73
|
-
user: () => getCacheConfig.user.duration(),
|
|
74
|
-
analytics: () => getCacheConfig.analytics.duration(),
|
|
75
|
-
geoip: () => getCacheConfig.geoip.duration(),
|
|
76
|
-
community: () => getCacheConfig.community.duration(),
|
|
77
|
-
link: () => getCacheConfig.link.duration(),
|
|
78
|
-
default: () => getCacheConfig.analytics.duration()
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export {
|
|
82
|
-
getCacheConfig,
|
|
83
|
-
getCacheTTL
|
|
84
|
-
};
|