@withwiz/toolkit 0.12.0 → 0.13.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/{chunk-2SV6VZOC.js → chunk-AQQ7JSS5.js} +1 -1
- package/dist/{chunk-F2FTS6H4.js → chunk-K7OZWWIS.js} +2 -2
- package/dist/{chunk-3EEOZHIJ.js → chunk-LYO2HV5F.js} +3 -3
- package/dist/{chunk-MTRPUJ4B.js → chunk-NKZPMRVF.js} +1 -1
- package/dist/{chunk-OEZPVNSA.js → chunk-QVPGBTCL.js} +1 -1
- package/dist/{chunk-4OKAMI6O.js → chunk-QVU4BHMC.js} +1 -1
- package/dist/{chunk-ZFBY2FNS.js → chunk-ROJJJXRL.js} +2 -2
- package/dist/{chunk-4OFL7KZ7.js → chunk-TDRB5BIM.js} +6 -6
- package/dist/{chunk-NT6URT4W.js → chunk-YOIZUVRD.js} +4 -4
- package/dist/{chunk-ZLUID5BU.js → chunk-Z3OLZKTN.js} +2 -2
- package/dist/{chunk-U2TGXJ3A.js → chunk-ZVGEGDYF.js} +1 -1
- package/dist/core/auth/index.js +23 -23
- package/dist/core/auth/oauth/index.js +4 -4
- package/dist/core/auth/oauth/providers/index.js +3 -3
- package/dist/core/auth/services/index.js +6 -6
- package/dist/core/cache/cache-config.js +3 -3
- package/dist/core/cache/cache-env.js +2 -2
- package/dist/core/cache/cache-factory.js +8 -8
- package/dist/core/cache/cache-invalidation.js +9 -9
- package/dist/core/cache/cache-redis.js +3 -3
- package/dist/core/cache/cache-wrapper.js +9 -9
- package/dist/core/cache/cache.js +10 -10
- package/dist/core/cache/hybrid-cache-manager.js +4 -4
- package/dist/core/cache/index.js +10 -10
- package/dist/core/cache/noop-cache-manager.js +4 -4
- package/dist/core/cache/redis-cache-manager.js +4 -4
- package/dist/core/error/index.js +3 -3
- package/dist/core/geolocation/index.js +7 -7
- package/dist/core/geolocation/providers/index.js +7 -7
- package/dist/core/system/environment.js +2 -2
- package/dist/core/system/health-check.js +1 -1
- package/dist/core/system/index.js +11 -11
- package/dist/core/utils/startup-banner.d.ts +56 -0
- package/dist/core/utils/startup-banner.js +78 -0
- package/dist/initialize.js +6 -6
- package/dist/next/auth-handlers/index.js +20 -20
- package/dist/next/auth-handlers/oauth-authorize.handler.js +3 -3
- package/dist/next/auth-handlers/oauth-callback.handler.js +3 -3
- package/dist/next/error/index.js +1 -1
- package/dist/next/middleware/error-handler.js +2 -2
- package/dist/next/middleware/index.js +8 -8
- package/dist/next/middleware/wrappers.js +4 -4
- package/dist/next/utils/index.js +23 -23
- package/package.json +2 -1
- package/dist/{chunk-LFJ24NDO.js → chunk-A6NIKJX5.js} +3 -3
- package/dist/{chunk-B2JZPUQ3.js → chunk-L4WQRYMR.js} +3 -3
- package/dist/{chunk-VDRLJU6C.js → chunk-Q5RPNLET.js} +6 -6
- package/dist/{chunk-ETXMWDXV.js → chunk-TGEKWTFZ.js} +0 -0
- package/dist/{chunk-BPDYEB37.js → chunk-UGLEAXTY.js} +3 -3
- package/dist/{chunk-P7WHMKN5.js → chunk-V3GEYUBG.js} +3 -3
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GeoIPProviderFactory
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import {
|
|
5
|
-
IPApiProvider
|
|
6
|
-
} from "../../chunk-E27YZK7O.js";
|
|
7
|
-
import {
|
|
8
|
-
IPApiCoProvider
|
|
9
|
-
} from "../../chunk-MRNRC45L.js";
|
|
3
|
+
} from "../../chunk-Q5RPNLET.js";
|
|
10
4
|
import {
|
|
11
5
|
IPGeolocationProvider
|
|
12
6
|
} from "../../chunk-GJYHMHTU.js";
|
|
13
7
|
import {
|
|
14
8
|
MaxMindProvider
|
|
15
9
|
} from "../../chunk-R463CTX4.js";
|
|
10
|
+
import {
|
|
11
|
+
IPApiProvider
|
|
12
|
+
} from "../../chunk-E27YZK7O.js";
|
|
13
|
+
import {
|
|
14
|
+
IPApiCoProvider
|
|
15
|
+
} from "../../chunk-MRNRC45L.js";
|
|
16
16
|
import {
|
|
17
17
|
BaseGeoIPProvider,
|
|
18
18
|
truncateString
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GeoIPProviderFactory
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import {
|
|
5
|
-
IPApiProvider
|
|
6
|
-
} from "../../../chunk-E27YZK7O.js";
|
|
7
|
-
import {
|
|
8
|
-
IPApiCoProvider
|
|
9
|
-
} from "../../../chunk-MRNRC45L.js";
|
|
3
|
+
} from "../../../chunk-Q5RPNLET.js";
|
|
10
4
|
import {
|
|
11
5
|
IPGeolocationProvider
|
|
12
6
|
} from "../../../chunk-GJYHMHTU.js";
|
|
13
7
|
import {
|
|
14
8
|
MaxMindProvider
|
|
15
9
|
} from "../../../chunk-R463CTX4.js";
|
|
10
|
+
import {
|
|
11
|
+
IPApiProvider
|
|
12
|
+
} from "../../../chunk-E27YZK7O.js";
|
|
13
|
+
import {
|
|
14
|
+
IPApiCoProvider
|
|
15
|
+
} from "../../../chunk-MRNRC45L.js";
|
|
16
16
|
import {
|
|
17
17
|
BaseGeoIPProvider,
|
|
18
18
|
truncateString
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
checkEnvironmentVariables
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-L4WQRYMR.js";
|
|
4
4
|
import "../../chunk-KWUOLKDO.js";
|
|
5
5
|
import "../../chunk-QAIN3WNN.js";
|
|
6
6
|
import "../../chunk-CRJUFA73.js";
|
|
@@ -8,8 +8,8 @@ import "../../chunk-IKZB26SK.js";
|
|
|
8
8
|
import "../../chunk-TQMQ5XXG.js";
|
|
9
9
|
import "../../chunk-7YWUKMZD.js";
|
|
10
10
|
import "../../chunk-OVOBSYR4.js";
|
|
11
|
-
import "../../chunk-PX535BHW.js";
|
|
12
11
|
import "../../chunk-RHYETIUR.js";
|
|
12
|
+
import "../../chunk-PX535BHW.js";
|
|
13
13
|
import "../../chunk-ERFD6YAW.js";
|
|
14
14
|
import "../../chunk-6J2EJVND.js";
|
|
15
15
|
import "../../chunk-F3R3UYBF.js";
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getCpuInfo
|
|
3
|
-
} from "../../chunk-DRTJSTEV.js";
|
|
4
|
-
import {
|
|
5
|
-
getDiskInfo
|
|
6
|
-
} from "../../chunk-E5TDIRBJ.js";
|
|
7
|
-
import {
|
|
8
|
-
checkEnvironmentVariables
|
|
9
|
-
} from "../../chunk-B2JZPUQ3.js";
|
|
10
1
|
import {
|
|
11
2
|
checkServiceHealth
|
|
12
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-TGEKWTFZ.js";
|
|
13
4
|
import "../../chunk-PBVP7CFZ.js";
|
|
14
5
|
import {
|
|
15
6
|
getMemoryInfo
|
|
@@ -17,6 +8,15 @@ import {
|
|
|
17
8
|
import {
|
|
18
9
|
getNetworkInfo
|
|
19
10
|
} from "../../chunk-WBHX4MJV.js";
|
|
11
|
+
import {
|
|
12
|
+
getCpuInfo
|
|
13
|
+
} from "../../chunk-DRTJSTEV.js";
|
|
14
|
+
import {
|
|
15
|
+
getDiskInfo
|
|
16
|
+
} from "../../chunk-E5TDIRBJ.js";
|
|
17
|
+
import {
|
|
18
|
+
checkEnvironmentVariables
|
|
19
|
+
} from "../../chunk-L4WQRYMR.js";
|
|
20
20
|
import {
|
|
21
21
|
getPlatform,
|
|
22
22
|
getRecommendedCommands
|
|
@@ -29,8 +29,8 @@ import "../../chunk-IKZB26SK.js";
|
|
|
29
29
|
import "../../chunk-TQMQ5XXG.js";
|
|
30
30
|
import "../../chunk-7YWUKMZD.js";
|
|
31
31
|
import "../../chunk-OVOBSYR4.js";
|
|
32
|
-
import "../../chunk-PX535BHW.js";
|
|
33
32
|
import "../../chunk-RHYETIUR.js";
|
|
33
|
+
import "../../chunk-PX535BHW.js";
|
|
34
34
|
import "../../chunk-ERFD6YAW.js";
|
|
35
35
|
import "../../chunk-6J2EJVND.js";
|
|
36
36
|
import "../../chunk-F3R3UYBF.js";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* startup-banner — 공용 서버 구동 배너
|
|
3
|
+
*
|
|
4
|
+
* 모든 withwiz 서버 프로젝트에서 서버 구동 시 환경설정을 동일한 형식으로 출력한다.
|
|
5
|
+
* 외부 의존성 없음(순수 console) — Core tier.
|
|
6
|
+
*
|
|
7
|
+
* 사용 예:
|
|
8
|
+
* import { printStartupBanner, mask, status } from '@withwiz/toolkit/core/utils/startup-banner';
|
|
9
|
+
* printStartupBanner({
|
|
10
|
+
* title: '🚀 My Service',
|
|
11
|
+
* version: process.env.npm_package_version,
|
|
12
|
+
* sections: [
|
|
13
|
+
* { emoji: '⚙️', title: 'Environment', lines: [
|
|
14
|
+
* ['Mode', process.env.NODE_ENV ?? 'development'],
|
|
15
|
+
* ['Base URL', mask(process.env.BASE_URL, 'url')],
|
|
16
|
+
* ]},
|
|
17
|
+
* ],
|
|
18
|
+
* });
|
|
19
|
+
*/
|
|
20
|
+
declare const colors: {
|
|
21
|
+
readonly reset: "\u001B[0m";
|
|
22
|
+
readonly bright: "\u001B[1m";
|
|
23
|
+
readonly dim: "\u001B[2m";
|
|
24
|
+
readonly cyan: "\u001B[36m";
|
|
25
|
+
readonly green: "\u001B[32m";
|
|
26
|
+
readonly yellow: "\u001B[33m";
|
|
27
|
+
readonly red: "\u001B[31m";
|
|
28
|
+
};
|
|
29
|
+
type Color = keyof typeof colors;
|
|
30
|
+
export declare const c: (color: Color, text: string) => string;
|
|
31
|
+
/** 민감/긴 값을 마스킹해 표시. url=host만, secret=앞 4글자, default=앞 20글자. */
|
|
32
|
+
export declare function mask(value: string | undefined, type?: 'url' | 'secret' | 'default'): string;
|
|
33
|
+
/** 불리언 상태를 ✓/✗ 로 표시. */
|
|
34
|
+
export declare function status(condition: boolean): string;
|
|
35
|
+
/** 기능 플래그 표시: 켜짐 ✓, 꺼짐 ⚠ OFF. */
|
|
36
|
+
export declare function feature(condition: boolean): string;
|
|
37
|
+
/** NODE_ENV 를 색상 라벨로. production=노랑, test=시안, 그 외=초록(DEVELOPMENT). */
|
|
38
|
+
export declare function modeLabel(nodeEnv: string | undefined): string;
|
|
39
|
+
export type BannerLine = [label: string, value: string];
|
|
40
|
+
export interface BannerSection {
|
|
41
|
+
emoji: string;
|
|
42
|
+
title: string;
|
|
43
|
+
lines: BannerLine[];
|
|
44
|
+
}
|
|
45
|
+
export interface StartupBannerOptions {
|
|
46
|
+
title: string;
|
|
47
|
+
version?: string;
|
|
48
|
+
sections: BannerSection[];
|
|
49
|
+
width?: number;
|
|
50
|
+
labelWidth?: number;
|
|
51
|
+
locale?: string;
|
|
52
|
+
timeZone?: string;
|
|
53
|
+
}
|
|
54
|
+
/** 서버 구동 배너 출력 (런타임에 실제 로드된 값 사용). */
|
|
55
|
+
export declare function printStartupBanner(opts: StartupBannerOptions): void;
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import "../../chunk-N3ETBM74.js";
|
|
2
|
+
|
|
3
|
+
// src/core/utils/startup-banner.ts
|
|
4
|
+
var colors = {
|
|
5
|
+
reset: "\x1B[0m",
|
|
6
|
+
bright: "\x1B[1m",
|
|
7
|
+
dim: "\x1B[2m",
|
|
8
|
+
cyan: "\x1B[36m",
|
|
9
|
+
green: "\x1B[32m",
|
|
10
|
+
yellow: "\x1B[33m",
|
|
11
|
+
red: "\x1B[31m"
|
|
12
|
+
};
|
|
13
|
+
var c = (color, text) => `${colors[color]}${text}${colors.reset}`;
|
|
14
|
+
function mask(value, type = "default") {
|
|
15
|
+
if (!value) return c("red", "\u2717 NOT_SET");
|
|
16
|
+
switch (type) {
|
|
17
|
+
case "url":
|
|
18
|
+
try {
|
|
19
|
+
const url = new URL(value);
|
|
20
|
+
return c("green", `\u2713 ${url.host}`);
|
|
21
|
+
} catch (e) {
|
|
22
|
+
return value.length > 15 ? value.substring(0, 15) + "..." : value;
|
|
23
|
+
}
|
|
24
|
+
case "secret":
|
|
25
|
+
return c("green", `\u2713 ${value.substring(0, 4)}***`);
|
|
26
|
+
default:
|
|
27
|
+
return c("green", `\u2713 ${value.length > 20 ? value.substring(0, 20) + "..." : value}`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function status(condition) {
|
|
31
|
+
return condition ? c("green", "\u2713") : c("red", "\u2717");
|
|
32
|
+
}
|
|
33
|
+
function feature(condition) {
|
|
34
|
+
return condition ? status(true) : c("yellow", "\u26A0 OFF");
|
|
35
|
+
}
|
|
36
|
+
function modeLabel(nodeEnv) {
|
|
37
|
+
const mode = nodeEnv || "development";
|
|
38
|
+
if (mode === "production") return c("yellow", "PRODUCTION");
|
|
39
|
+
if (mode === "test") return c("cyan", "TEST");
|
|
40
|
+
return c("green", "DEVELOPMENT");
|
|
41
|
+
}
|
|
42
|
+
function printStartupBanner(opts) {
|
|
43
|
+
const {
|
|
44
|
+
title,
|
|
45
|
+
version,
|
|
46
|
+
sections,
|
|
47
|
+
width = 50,
|
|
48
|
+
labelWidth = 28,
|
|
49
|
+
locale = "ko-KR",
|
|
50
|
+
timeZone = "Asia/Seoul"
|
|
51
|
+
} = opts;
|
|
52
|
+
const bar = c("cyan", "\u2501".repeat(width));
|
|
53
|
+
console.log(`
|
|
54
|
+
${bar}`);
|
|
55
|
+
console.log(`${c("bright", title)}${version ? " " + c("dim", `v${version}`) : ""}`);
|
|
56
|
+
console.log(bar);
|
|
57
|
+
for (const s of sections) {
|
|
58
|
+
console.log(`
|
|
59
|
+
${s.emoji} ${c("bright", s.title)}`);
|
|
60
|
+
for (const [label, value] of s.lines) {
|
|
61
|
+
console.log(` ${c("dim", label.padEnd(labelWidth))} ${value}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
console.log(`
|
|
65
|
+
${bar}`);
|
|
66
|
+
const time = (/* @__PURE__ */ new Date()).toLocaleTimeString(locale, { timeZone });
|
|
67
|
+
console.log(`${c("green", "\u2713")} Ready at ${time}`);
|
|
68
|
+
console.log(`${bar}
|
|
69
|
+
`);
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
c,
|
|
73
|
+
feature,
|
|
74
|
+
mask,
|
|
75
|
+
modeLabel,
|
|
76
|
+
printStartupBanner,
|
|
77
|
+
status
|
|
78
|
+
};
|
package/dist/initialize.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
initializeStorage
|
|
3
3
|
} from "./chunk-C5CBJC6V.js";
|
|
4
|
+
import {
|
|
5
|
+
initializeGeolocation
|
|
6
|
+
} from "./chunk-CRJUFA73.js";
|
|
4
7
|
import {
|
|
5
8
|
config,
|
|
6
9
|
resetConfig
|
|
@@ -8,9 +11,6 @@ import {
|
|
|
8
11
|
import {
|
|
9
12
|
initializeCors
|
|
10
13
|
} from "./chunk-7ZO5UNTJ.js";
|
|
11
|
-
import {
|
|
12
|
-
initializeGeolocation
|
|
13
|
-
} from "./chunk-CRJUFA73.js";
|
|
14
14
|
import {
|
|
15
15
|
initializeLogger
|
|
16
16
|
} from "./chunk-IKZB26SK.js";
|
|
@@ -19,12 +19,12 @@ import {
|
|
|
19
19
|
} from "./chunk-TQMQ5XXG.js";
|
|
20
20
|
import "./chunk-7YWUKMZD.js";
|
|
21
21
|
import "./chunk-OVOBSYR4.js";
|
|
22
|
-
import {
|
|
23
|
-
initializeCommon
|
|
24
|
-
} from "./chunk-PX535BHW.js";
|
|
25
22
|
import {
|
|
26
23
|
initializeCache
|
|
27
24
|
} from "./chunk-RHYETIUR.js";
|
|
25
|
+
import {
|
|
26
|
+
initializeCommon
|
|
27
|
+
} from "./chunk-PX535BHW.js";
|
|
28
28
|
import "./chunk-ERFD6YAW.js";
|
|
29
29
|
import "./chunk-6J2EJVND.js";
|
|
30
30
|
import "./chunk-F3R3UYBF.js";
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createLogoutHandler
|
|
3
|
-
} from "../../chunk-6E2Q27EN.js";
|
|
4
|
-
import {
|
|
5
|
-
createMeHandler
|
|
6
|
-
} from "../../chunk-AWFP2KAU.js";
|
|
7
|
-
import {
|
|
8
|
-
createOAuthAuthorizeHandler
|
|
9
|
-
} from "../../chunk-U2TGXJ3A.js";
|
|
10
|
-
import {
|
|
11
|
-
createOAuthCallbackHandler
|
|
12
|
-
} from "../../chunk-2SV6VZOC.js";
|
|
13
|
-
import "../../chunk-MTZXWVW3.js";
|
|
14
|
-
import {
|
|
15
|
-
createRefreshHandler
|
|
16
|
-
} from "../../chunk-RWN47K7J.js";
|
|
17
|
-
import "../../chunk-XAGPZLRK.js";
|
|
18
1
|
import {
|
|
19
2
|
createRegisterHandler
|
|
20
3
|
} from "../../chunk-RWCPRPEP.js";
|
|
@@ -33,15 +16,32 @@ import "../../chunk-75UDFONR.js";
|
|
|
33
16
|
import {
|
|
34
17
|
createLoginHandler
|
|
35
18
|
} from "../../chunk-5MPMPXIR.js";
|
|
36
|
-
import
|
|
19
|
+
import {
|
|
20
|
+
createLogoutHandler
|
|
21
|
+
} from "../../chunk-6E2Q27EN.js";
|
|
22
|
+
import {
|
|
23
|
+
createMeHandler
|
|
24
|
+
} from "../../chunk-AWFP2KAU.js";
|
|
25
|
+
import {
|
|
26
|
+
createOAuthAuthorizeHandler
|
|
27
|
+
} from "../../chunk-ZVGEGDYF.js";
|
|
28
|
+
import {
|
|
29
|
+
createOAuthCallbackHandler
|
|
30
|
+
} from "../../chunk-AQQ7JSS5.js";
|
|
31
|
+
import "../../chunk-MTZXWVW3.js";
|
|
32
|
+
import {
|
|
33
|
+
createRefreshHandler
|
|
34
|
+
} from "../../chunk-RWN47K7J.js";
|
|
35
|
+
import "../../chunk-XAGPZLRK.js";
|
|
36
|
+
import "../../chunk-ZZABL54F.js";
|
|
37
|
+
import "../../chunk-V3GEYUBG.js";
|
|
37
38
|
import "../../chunk-CDALZTPN.js";
|
|
39
|
+
import "../../chunk-HIZ7USIF.js";
|
|
38
40
|
import "../../chunk-GF3DKZIW.js";
|
|
39
41
|
import "../../chunk-65HVR74O.js";
|
|
40
42
|
import "../../chunk-33RIHX7O.js";
|
|
41
43
|
import "../../chunk-GSSHHVHF.js";
|
|
42
|
-
import "../../chunk-HIZ7USIF.js";
|
|
43
44
|
import "../../chunk-JLRMET4V.js";
|
|
44
|
-
import "../../chunk-ZZABL54F.js";
|
|
45
45
|
import "../../chunk-GH3U4WRE.js";
|
|
46
46
|
import "../../chunk-LWHLB2Y6.js";
|
|
47
47
|
import "../../chunk-5GWGARXI.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createOAuthAuthorizeHandler
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-ZVGEGDYF.js";
|
|
4
|
+
import "../../chunk-V3GEYUBG.js";
|
|
5
5
|
import "../../chunk-CDALZTPN.js";
|
|
6
|
+
import "../../chunk-HIZ7USIF.js";
|
|
6
7
|
import "../../chunk-GF3DKZIW.js";
|
|
7
8
|
import "../../chunk-65HVR74O.js";
|
|
8
9
|
import "../../chunk-33RIHX7O.js";
|
|
9
10
|
import "../../chunk-GSSHHVHF.js";
|
|
10
|
-
import "../../chunk-HIZ7USIF.js";
|
|
11
11
|
import "../../chunk-JLRMET4V.js";
|
|
12
12
|
import "../../chunk-GH3U4WRE.js";
|
|
13
13
|
import "../../chunk-5GWGARXI.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createOAuthCallbackHandler
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-AQQ7JSS5.js";
|
|
4
4
|
import "../../chunk-MTZXWVW3.js";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-V3GEYUBG.js";
|
|
6
6
|
import "../../chunk-CDALZTPN.js";
|
|
7
|
+
import "../../chunk-HIZ7USIF.js";
|
|
7
8
|
import "../../chunk-GF3DKZIW.js";
|
|
8
9
|
import "../../chunk-65HVR74O.js";
|
|
9
10
|
import "../../chunk-33RIHX7O.js";
|
|
10
11
|
import "../../chunk-GSSHHVHF.js";
|
|
11
|
-
import "../../chunk-HIZ7USIF.js";
|
|
12
12
|
import "../../chunk-JLRMET4V.js";
|
|
13
13
|
import "../../chunk-GH3U4WRE.js";
|
|
14
14
|
import "../../chunk-LWHLB2Y6.js";
|
package/dist/next/error/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
LocaleDetector
|
|
10
10
|
} from "../../chunk-K2PNAQI4.js";
|
|
11
|
+
import "../../chunk-MCPPJI3T.js";
|
|
11
12
|
import {
|
|
12
13
|
extractErrorInfo
|
|
13
14
|
} from "../../chunk-6HQ5JHL4.js";
|
|
@@ -17,7 +18,6 @@ import {
|
|
|
17
18
|
import "../../chunk-7WG7XPXC.js";
|
|
18
19
|
import "../../chunk-AMZWDLJ4.js";
|
|
19
20
|
import "../../chunk-VUYS3SU7.js";
|
|
20
|
-
import "../../chunk-MCPPJI3T.js";
|
|
21
21
|
import "../../chunk-5VZIAXO2.js";
|
|
22
22
|
import "../../chunk-QAIN3WNN.js";
|
|
23
23
|
import "../../chunk-5GWGARXI.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
errorHandlerMiddleware
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-A6NIKJX5.js";
|
|
4
4
|
import "../../chunk-NHFIOK2D.js";
|
|
5
|
+
import "../../chunk-MCPPJI3T.js";
|
|
5
6
|
import "../../chunk-7WG7XPXC.js";
|
|
6
7
|
import "../../chunk-AMZWDLJ4.js";
|
|
7
8
|
import "../../chunk-VUYS3SU7.js";
|
|
8
|
-
import "../../chunk-MCPPJI3T.js";
|
|
9
9
|
import "../../chunk-5VZIAXO2.js";
|
|
10
10
|
import "../../chunk-QAIN3WNN.js";
|
|
11
11
|
import "../../chunk-5GWGARXI.js";
|
|
@@ -4,12 +4,7 @@ import {
|
|
|
4
4
|
withCustomApi,
|
|
5
5
|
withOptionalAuthApi,
|
|
6
6
|
withPublicApi
|
|
7
|
-
} from "../../chunk-
|
|
8
|
-
import {
|
|
9
|
-
createRateLimitMiddleware,
|
|
10
|
-
rateLimitMiddleware,
|
|
11
|
-
setRateLimitAdapter
|
|
12
|
-
} from "../../chunk-M4ZVQFOH.js";
|
|
7
|
+
} from "../../chunk-YOIZUVRD.js";
|
|
13
8
|
import {
|
|
14
9
|
responseLoggerMiddleware
|
|
15
10
|
} from "../../chunk-LCYDMYZS.js";
|
|
@@ -32,19 +27,24 @@ import {
|
|
|
32
27
|
} from "../../chunk-37VGD4VX.js";
|
|
33
28
|
import {
|
|
34
29
|
errorHandlerMiddleware
|
|
35
|
-
} from "../../chunk-
|
|
30
|
+
} from "../../chunk-A6NIKJX5.js";
|
|
36
31
|
import {
|
|
37
32
|
initRequestMiddleware
|
|
38
33
|
} from "../../chunk-VC2E6KYQ.js";
|
|
39
34
|
import {
|
|
40
35
|
MiddlewareChain
|
|
41
36
|
} from "../../chunk-WXOWI7BJ.js";
|
|
37
|
+
import {
|
|
38
|
+
createRateLimitMiddleware,
|
|
39
|
+
rateLimitMiddleware,
|
|
40
|
+
setRateLimitAdapter
|
|
41
|
+
} from "../../chunk-M4ZVQFOH.js";
|
|
42
42
|
import "../../chunk-NHFIOK2D.js";
|
|
43
43
|
import "../../chunk-K2PNAQI4.js";
|
|
44
|
+
import "../../chunk-MCPPJI3T.js";
|
|
44
45
|
import "../../chunk-7WG7XPXC.js";
|
|
45
46
|
import "../../chunk-AMZWDLJ4.js";
|
|
46
47
|
import "../../chunk-VUYS3SU7.js";
|
|
47
|
-
import "../../chunk-MCPPJI3T.js";
|
|
48
48
|
import "../../chunk-5VZIAXO2.js";
|
|
49
49
|
import "../../chunk-QAIN3WNN.js";
|
|
50
50
|
import "../../chunk-LWHLB2Y6.js";
|
|
@@ -4,21 +4,21 @@ import {
|
|
|
4
4
|
withCustomApi,
|
|
5
5
|
withOptionalAuthApi,
|
|
6
6
|
withPublicApi
|
|
7
|
-
} from "../../chunk-
|
|
8
|
-
import "../../chunk-M4ZVQFOH.js";
|
|
7
|
+
} from "../../chunk-YOIZUVRD.js";
|
|
9
8
|
import "../../chunk-LCYDMYZS.js";
|
|
10
9
|
import "../../chunk-Y4WPEIKW.js";
|
|
11
10
|
import "../../chunk-7Q6SMNMN.js";
|
|
12
11
|
import "../../chunk-37VGD4VX.js";
|
|
13
|
-
import "../../chunk-
|
|
12
|
+
import "../../chunk-A6NIKJX5.js";
|
|
14
13
|
import "../../chunk-VC2E6KYQ.js";
|
|
15
14
|
import "../../chunk-WXOWI7BJ.js";
|
|
15
|
+
import "../../chunk-M4ZVQFOH.js";
|
|
16
16
|
import "../../chunk-NHFIOK2D.js";
|
|
17
17
|
import "../../chunk-K2PNAQI4.js";
|
|
18
|
+
import "../../chunk-MCPPJI3T.js";
|
|
18
19
|
import "../../chunk-7WG7XPXC.js";
|
|
19
20
|
import "../../chunk-AMZWDLJ4.js";
|
|
20
21
|
import "../../chunk-VUYS3SU7.js";
|
|
21
|
-
import "../../chunk-MCPPJI3T.js";
|
|
22
22
|
import "../../chunk-5VZIAXO2.js";
|
|
23
23
|
import "../../chunk-QAIN3WNN.js";
|
|
24
24
|
import "../../chunk-LWHLB2Y6.js";
|
package/dist/next/utils/index.js
CHANGED
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
boolFormatter,
|
|
3
|
-
createCsvHeader,
|
|
4
|
-
createSimpleCsvResponse,
|
|
5
|
-
createStreamingCsvResponse,
|
|
6
|
-
dateFormatter,
|
|
7
|
-
escapeCsvField,
|
|
8
|
-
rowToCsv
|
|
9
|
-
} from "../../chunk-DVCGAI5N.js";
|
|
10
|
-
import {
|
|
11
|
-
ErrorProcessor,
|
|
12
|
-
errorToResponse,
|
|
13
|
-
handlePrismaError,
|
|
14
|
-
processError,
|
|
15
|
-
throwBadRequestError,
|
|
16
|
-
throwBusinessRuleError,
|
|
17
|
-
throwConflictError,
|
|
18
|
-
throwForbiddenError,
|
|
19
|
-
throwNotFoundError,
|
|
20
|
-
throwUnauthorizedError,
|
|
21
|
-
throwValidationError,
|
|
22
|
-
withErrorHandling
|
|
23
|
-
} from "../../chunk-D4QADM6T.js";
|
|
24
1
|
import {
|
|
25
2
|
createPaginatedResponse,
|
|
26
3
|
getReferer,
|
|
@@ -45,6 +22,29 @@ import {
|
|
|
45
22
|
withPublicCORS,
|
|
46
23
|
withRestrictedCORS
|
|
47
24
|
} from "../../chunk-34L7HTM7.js";
|
|
25
|
+
import {
|
|
26
|
+
boolFormatter,
|
|
27
|
+
createCsvHeader,
|
|
28
|
+
createSimpleCsvResponse,
|
|
29
|
+
createStreamingCsvResponse,
|
|
30
|
+
dateFormatter,
|
|
31
|
+
escapeCsvField,
|
|
32
|
+
rowToCsv
|
|
33
|
+
} from "../../chunk-DVCGAI5N.js";
|
|
34
|
+
import {
|
|
35
|
+
ErrorProcessor,
|
|
36
|
+
errorToResponse,
|
|
37
|
+
handlePrismaError,
|
|
38
|
+
processError,
|
|
39
|
+
throwBadRequestError,
|
|
40
|
+
throwBusinessRuleError,
|
|
41
|
+
throwConflictError,
|
|
42
|
+
throwForbiddenError,
|
|
43
|
+
throwNotFoundError,
|
|
44
|
+
throwUnauthorizedError,
|
|
45
|
+
throwValidationError,
|
|
46
|
+
withErrorHandling
|
|
47
|
+
} from "../../chunk-D4QADM6T.js";
|
|
48
48
|
import "../../chunk-MCPPJI3T.js";
|
|
49
49
|
import "../../chunk-5VZIAXO2.js";
|
|
50
50
|
import "../../chunk-QAIN3WNN.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@withwiz/toolkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Shared utility library for withwiz projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -151,6 +151,7 @@
|
|
|
151
151
|
"./core/utils/optimistic-lock": "./dist/core/utils/optimistic-lock.js",
|
|
152
152
|
"./core/utils/sanitizer": "./dist/core/utils/sanitizer.js",
|
|
153
153
|
"./core/utils/short-code-generator": "./dist/core/utils/short-code-generator.js",
|
|
154
|
+
"./core/utils/startup-banner": "./dist/core/utils/startup-banner.js",
|
|
154
155
|
"./core/utils/timezone": "./dist/core/utils/timezone.js",
|
|
155
156
|
"./core/utils/type-guards": "./dist/core/utils/type-guards.js",
|
|
156
157
|
"./core/utils/url-normalizer": "./dist/core/utils/url-normalizer.js",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AUTH_ERROR_CODE_MAP
|
|
3
3
|
} from "./chunk-NHFIOK2D.js";
|
|
4
|
-
import {
|
|
5
|
-
getErrorMessage
|
|
6
|
-
} from "./chunk-7WG7XPXC.js";
|
|
7
4
|
import {
|
|
8
5
|
AppError
|
|
9
6
|
} from "./chunk-MCPPJI3T.js";
|
|
7
|
+
import {
|
|
8
|
+
getErrorMessage
|
|
9
|
+
} from "./chunk-7WG7XPXC.js";
|
|
10
10
|
import {
|
|
11
11
|
ERROR_CODES,
|
|
12
12
|
classifyError
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
getAuthConfig
|
|
9
9
|
} from "./chunk-TQMQ5XXG.js";
|
|
10
|
-
import {
|
|
11
|
-
getCommonConfig
|
|
12
|
-
} from "./chunk-PX535BHW.js";
|
|
13
10
|
import {
|
|
14
11
|
getResolvedCacheConfig
|
|
15
12
|
} from "./chunk-RHYETIUR.js";
|
|
13
|
+
import {
|
|
14
|
+
getCommonConfig
|
|
15
|
+
} from "./chunk-PX535BHW.js";
|
|
16
16
|
|
|
17
17
|
// src/core/system/environment.ts
|
|
18
18
|
import os from "os";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
IPApiProvider
|
|
3
|
-
} from "./chunk-E27YZK7O.js";
|
|
4
|
-
import {
|
|
5
|
-
IPApiCoProvider
|
|
6
|
-
} from "./chunk-MRNRC45L.js";
|
|
7
1
|
import {
|
|
8
2
|
IPGeolocationProvider
|
|
9
3
|
} from "./chunk-GJYHMHTU.js";
|
|
10
4
|
import {
|
|
11
5
|
MaxMindProvider
|
|
12
6
|
} from "./chunk-R463CTX4.js";
|
|
7
|
+
import {
|
|
8
|
+
IPApiProvider
|
|
9
|
+
} from "./chunk-E27YZK7O.js";
|
|
10
|
+
import {
|
|
11
|
+
IPApiCoProvider
|
|
12
|
+
} from "./chunk-MRNRC45L.js";
|
|
13
13
|
|
|
14
14
|
// src/core/geolocation/providers/index.ts
|
|
15
15
|
var GeoIPProviderFactory = class {
|
|
File without changes
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GitHubOAuthProvider
|
|
3
|
+
} from "./chunk-HIZ7USIF.js";
|
|
1
4
|
import {
|
|
2
5
|
GoogleOAuthProvider
|
|
3
6
|
} from "./chunk-GF3DKZIW.js";
|
|
@@ -10,9 +13,6 @@ import {
|
|
|
10
13
|
import {
|
|
11
14
|
MicrosoftOAuthProvider
|
|
12
15
|
} from "./chunk-GSSHHVHF.js";
|
|
13
|
-
import {
|
|
14
|
-
GitHubOAuthProvider
|
|
15
|
-
} from "./chunk-HIZ7USIF.js";
|
|
16
16
|
import {
|
|
17
17
|
OAuthError
|
|
18
18
|
} from "./chunk-5GWGARXI.js";
|