@withwiz/toolkit 0.6.1 → 0.6.2
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/config.d.ts +0 -3
- package/dist/auth/config.js +1 -1
- package/dist/auth/core/jwt/cookie.js +2 -2
- package/dist/auth/core/jwt/index.js +2 -2
- package/dist/auth/handlers/index.js +21 -21
- package/dist/auth/handlers/login.handler.js +3 -3
- package/dist/auth/handlers/logout.handler.js +3 -3
- package/dist/auth/handlers/me.handler.js +2 -2
- package/dist/auth/handlers/oauth-callback.handler.js +3 -3
- package/dist/auth/handlers/refresh.handler.js +3 -3
- package/dist/auth/index.js +2 -2
- package/dist/auth/services/index.js +10 -10
- package/dist/auth/services/login.service.js +2 -2
- package/dist/auth/services/oauth-callback.service.js +2 -2
- package/dist/auth/services/token-refresh.service.js +2 -2
- package/dist/cache/cache-config.js +4 -4
- package/dist/cache/cache-env.js +3 -3
- package/dist/cache/cache-factory.js +12 -12
- package/dist/cache/cache-invalidation.js +13 -13
- package/dist/cache/cache-redis.js +6 -6
- package/dist/cache/cache-wrapper.js +13 -13
- package/dist/cache/cache.js +14 -14
- package/dist/cache/config.d.ts +0 -14
- package/dist/cache/config.js +1 -1
- package/dist/cache/hybrid-cache-manager.js +8 -8
- package/dist/cache/index.js +14 -14
- package/dist/cache/inmemory-cache-manager.js +3 -3
- package/dist/cache/noop-cache-manager.js +5 -5
- package/dist/cache/redis-cache-manager.js +7 -7
- package/dist/{chunk-3ECJUXLM.js → chunk-2KG2G35D.js} +3 -3
- package/dist/{chunk-3AJHXCDG.js → chunk-34IDAA7V.js} +2 -2
- package/dist/{chunk-77BJRPMN.js → chunk-3LVCK2NQ.js} +4 -4
- package/dist/{chunk-W2GBKW2T.js → chunk-545Q34YU.js} +2 -2
- package/dist/{chunk-2VMTIYLX.js → chunk-7DMKTJHU.js} +2 -2
- package/dist/{chunk-O35V6RIF.js → chunk-7UQZH2OH.js} +3 -3
- package/dist/{chunk-7KZRPDQD.js → chunk-A6FKWYO2.js} +2 -2
- package/dist/{chunk-EXJQKCTN.js → chunk-A7TN46LC.js} +4 -4
- package/dist/{chunk-S7OQWKUJ.js → chunk-B6Q7UNCU.js} +1 -1
- package/dist/{chunk-AYZJN32D.js → chunk-CDLCZB6F.js} +10 -15
- package/dist/{chunk-SR3SQL72.js → chunk-CVFVL5FL.js} +2 -2
- package/dist/{chunk-Q6KXN7HL.js → chunk-ENETIGKL.js} +2 -2
- package/dist/{chunk-WNEXLSDB.js → chunk-ERO4PGNO.js} +1 -1
- package/dist/{chunk-BEV7PQM3.js → chunk-F3NGZYL2.js} +1 -1
- package/dist/chunk-FDFPNSKY.js +14 -0
- package/dist/{chunk-G5OMETUS.js → chunk-FDRQUDFH.js} +1 -1
- package/dist/{chunk-MGQV723O.js → chunk-L74XPPH4.js} +1 -1
- package/dist/{chunk-SSS6XSEG.js → chunk-LG6GH4V7.js} +1 -1
- package/dist/{chunk-HHCDMWEF.js → chunk-LGAV5UU2.js} +1 -1
- package/dist/{chunk-3CBGGMIY.js → chunk-LHIVUV7Q.js} +10 -15
- package/dist/{chunk-OHBAELPZ.js → chunk-LMQSV5UK.js} +15 -21
- package/dist/{chunk-A2XAOU55.js → chunk-LNPZZ23G.js} +13 -19
- package/dist/{chunk-X6MGVFT3.js → chunk-LRRQ54YJ.js} +1 -1
- package/dist/chunk-MGBNIDTP.js +100 -0
- package/dist/{chunk-PYVYYO4X.js → chunk-MULM3Q5S.js} +5 -5
- package/dist/{chunk-TEXVRHPF.js → chunk-NOAU2JG7.js} +1 -1
- package/dist/{chunk-WJSMXUZB.js → chunk-NQUYNPSD.js} +1 -1
- package/dist/{chunk-CKK55QFQ.js → chunk-NW3JIRFK.js} +1 -1
- package/dist/{chunk-FI46LV42.js → chunk-O5E36ZIJ.js} +1 -1
- package/dist/{chunk-DBHISLC6.js → chunk-OFSPZUQD.js} +2 -2
- package/dist/{chunk-WRWWB2NU.js → chunk-PT4FA7U4.js} +2 -2
- package/dist/{chunk-VCOA6LMN.js → chunk-QOKDGW3F.js} +1 -1
- package/dist/{chunk-OCI7QCLM.js → chunk-QXIQB6OF.js} +2 -2
- package/dist/{chunk-L5WLPC2T.js → chunk-QXPMO2CO.js} +1 -1
- package/dist/{chunk-LFKPXF5E.js → chunk-RXVX2DCW.js} +2 -2
- package/dist/{chunk-PAF5OGDU.js → chunk-SI2Z26KP.js} +7 -7
- package/dist/{chunk-4BGAE7NU.js → chunk-TLBY3DUK.js} +1 -1
- package/dist/{chunk-IHUQRVPV.js → chunk-UQM35MAO.js} +2 -2
- package/dist/{chunk-G2Q4TI3Q.js → chunk-V3ZIR4UL.js} +1 -1
- package/dist/{chunk-GFWGLWTS.js → chunk-WJWCTCWZ.js} +10 -15
- package/dist/{chunk-CMU52MEQ.js → chunk-WLXAEHKK.js} +2 -2
- package/dist/{chunk-SFPMFVSD.js → chunk-WPW4HXW4.js} +9 -15
- package/dist/{chunk-ON7HZ3PW.js → chunk-WSXOKK6N.js} +1 -1
- package/dist/{chunk-MDTID4D2.js → chunk-XY3ZVORI.js} +1 -1
- package/dist/{chunk-KF3O2DAV.js → chunk-YTXCKIWE.js} +1 -1
- package/dist/{chunk-7JKZBEVB.js → chunk-YX3XMDDI.js} +8 -8
- package/dist/{chunk-CW3INZMV.js → chunk-ZG2XGO44.js} +1 -1
- package/dist/config/common.d.ts +0 -3
- package/dist/config/common.js +1 -1
- package/dist/config/registry.d.ts +5 -13
- package/dist/config/registry.js +1 -1
- package/dist/constants/index.js +14 -14
- package/dist/error/error-handler.js +3 -3
- package/dist/error/index.js +3 -3
- package/dist/geolocation/batch-processor.js +3 -3
- package/dist/geolocation/config.d.ts +0 -3
- package/dist/geolocation/config.js +1 -1
- package/dist/geolocation/index.js +7 -7
- package/dist/geolocation/providers/index.js +4 -4
- package/dist/geolocation/providers/ipgeolocation-provider.js +2 -2
- package/dist/geolocation/providers/maxmind-provider.js +2 -2
- package/dist/initialize.d.ts +2 -1
- package/dist/initialize.js +18 -17
- package/dist/logger/config.d.ts +0 -3
- package/dist/logger/config.js +1 -1
- package/dist/logger/logger.js +2 -2
- package/dist/middleware/auth.js +5 -5
- package/dist/middleware/cors-config.d.ts +0 -3
- package/dist/middleware/cors-config.js +1 -1
- package/dist/middleware/cors.js +4 -4
- package/dist/middleware/error-handler.js +4 -4
- package/dist/middleware/index.js +14 -14
- package/dist/middleware/middleware-chain.js +3 -3
- package/dist/middleware/rate-limit.js +3 -3
- package/dist/middleware/response-logger.js +3 -3
- package/dist/middleware/security.js +3 -3
- package/dist/middleware/wrappers.js +14 -14
- package/dist/storage/config.d.ts +0 -3
- package/dist/storage/config.js +1 -1
- package/dist/storage/r2-storage.js +1 -1
- package/dist/system/cpu.js +4 -4
- package/dist/system/disk.js +4 -4
- package/dist/system/environment.js +8 -8
- package/dist/system/health-check.js +5 -5
- package/dist/system/index.js +13 -13
- package/dist/system/memory.js +4 -4
- package/dist/system/network.js +4 -4
- package/dist/system/utils.js +3 -3
- package/dist/utils/cors.js +3 -3
- package/dist/utils/csv-export.js +3 -3
- package/dist/utils/error-processor.js +3 -3
- package/dist/utils/index.js +15 -15
- package/package.json +1 -1
- package/dist/chunk-GTPUVHSV.js +0 -30
- package/dist/chunk-UCIUAZQT.js +0 -106
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AUTH_ERROR_CODE_MAP
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XY3ZVORI.js";
|
|
4
4
|
import {
|
|
5
5
|
AppError
|
|
6
6
|
} from "./chunk-EOEMOXNT.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-AIH3F7JV.js";
|
|
17
17
|
import {
|
|
18
18
|
logger
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-NOAU2JG7.js";
|
|
20
20
|
import {
|
|
21
21
|
__spreadValues
|
|
22
22
|
} from "./chunk-ORMEWXMH.js";
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
formatBytesPerSec,
|
|
4
4
|
runCommand,
|
|
5
5
|
runMacCommand
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LRRQ54YJ.js";
|
|
7
7
|
import {
|
|
8
8
|
logger
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NOAU2JG7.js";
|
|
10
10
|
|
|
11
11
|
// src/system/network.ts
|
|
12
12
|
async function getNetworkInfo() {
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
} from "./chunk-3GAY2T2A.js";
|
|
10
10
|
import {
|
|
11
11
|
getAuthConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LNPZZ23G.js";
|
|
13
13
|
import {
|
|
14
14
|
logger
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NOAU2JG7.js";
|
|
16
16
|
|
|
17
17
|
// src/middleware/auth.ts
|
|
18
18
|
function setAccessTokenBlacklistChecker(checker) {
|
|
@@ -3,27 +3,27 @@ import {
|
|
|
3
3
|
} from "./chunk-62Q7DN5G.js";
|
|
4
4
|
import {
|
|
5
5
|
MiddlewareChain
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YTXCKIWE.js";
|
|
7
7
|
import {
|
|
8
8
|
rateLimitMiddleware
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NQUYNPSD.js";
|
|
10
10
|
import {
|
|
11
11
|
responseLoggerMiddleware
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NW3JIRFK.js";
|
|
13
13
|
import {
|
|
14
14
|
securityMiddleware
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-TLBY3DUK.js";
|
|
16
16
|
import {
|
|
17
17
|
adminMiddleware,
|
|
18
18
|
authMiddleware,
|
|
19
19
|
optionalAuthMiddleware
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-RXVX2DCW.js";
|
|
21
21
|
import {
|
|
22
22
|
corsMiddleware
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-A6FKWYO2.js";
|
|
24
24
|
import {
|
|
25
25
|
errorHandlerMiddleware
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-PT4FA7U4.js";
|
|
27
27
|
|
|
28
28
|
// src/middleware/wrappers.ts
|
|
29
29
|
function withPublicApi(handler) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
logger
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NOAU2JG7.js";
|
|
4
4
|
import {
|
|
5
5
|
getCacheFallbackConfig,
|
|
6
6
|
getConfig,
|
|
7
7
|
getEnv,
|
|
8
8
|
isCacheEnabled,
|
|
9
9
|
validateRedisEnvironment
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OFSPZUQD.js";
|
|
11
11
|
|
|
12
12
|
// src/cache/cache-redis.ts
|
|
13
13
|
import { Redis } from "@upstash/redis";
|
|
@@ -6,16 +6,10 @@ import {
|
|
|
6
6
|
} from "./chunk-2QH66EVQ.js";
|
|
7
7
|
|
|
8
8
|
// src/middleware/cors-config.ts
|
|
9
|
-
var GLOBAL_KEY = "__withwiz_cors_config";
|
|
10
|
-
function getConfig() {
|
|
11
|
-
var _a;
|
|
12
|
-
return (_a = globalThis[GLOBAL_KEY]) != null ? _a : null;
|
|
13
|
-
}
|
|
14
|
-
function setConfig(config) {
|
|
15
|
-
globalThis[GLOBAL_KEY] = config;
|
|
16
|
-
}
|
|
17
9
|
function initializeCors(config) {
|
|
18
|
-
|
|
10
|
+
var _a;
|
|
11
|
+
(_a = globalThis.__withwiz_config) != null ? _a : globalThis.__withwiz_config = {};
|
|
12
|
+
if (globalThis.__withwiz_config.cors) return;
|
|
19
13
|
if (!config.allowedOrigins) {
|
|
20
14
|
throw new ConfigurationError("CORS", "allowedOrigins is required");
|
|
21
15
|
}
|
|
@@ -25,20 +19,21 @@ function initializeCors(config) {
|
|
|
25
19
|
if (config.baseUrl === void 0) {
|
|
26
20
|
configWarn("CORS", "baseUrl not provided");
|
|
27
21
|
}
|
|
28
|
-
|
|
22
|
+
globalThis.__withwiz_config.cors = {
|
|
29
23
|
allowedOrigins: [...config.allowedOrigins],
|
|
30
24
|
baseUrl: config.baseUrl
|
|
31
|
-
}
|
|
25
|
+
};
|
|
32
26
|
}
|
|
33
27
|
function getCorsConfig() {
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
var _a;
|
|
29
|
+
const cors = (_a = globalThis.__withwiz_config) == null ? void 0 : _a.cors;
|
|
30
|
+
if (!cors) {
|
|
36
31
|
throw new ConfigurationError("CORS", "Not initialized. Call initializeCors() first.");
|
|
37
32
|
}
|
|
38
|
-
return
|
|
33
|
+
return cors;
|
|
39
34
|
}
|
|
40
35
|
function resetCors() {
|
|
41
|
-
globalThis
|
|
36
|
+
if (globalThis.__withwiz_config) delete globalThis.__withwiz_config.cors;
|
|
42
37
|
}
|
|
43
38
|
|
|
44
39
|
export {
|
|
@@ -6,31 +6,25 @@ import {
|
|
|
6
6
|
} from "./chunk-2QH66EVQ.js";
|
|
7
7
|
|
|
8
8
|
// src/config/common.ts
|
|
9
|
-
var GLOBAL_KEY = "__withwiz_common_config";
|
|
10
|
-
function getConfig() {
|
|
11
|
-
var _a;
|
|
12
|
-
return (_a = globalThis[GLOBAL_KEY]) != null ? _a : null;
|
|
13
|
-
}
|
|
14
|
-
function setConfig(config) {
|
|
15
|
-
globalThis[GLOBAL_KEY] = config;
|
|
16
|
-
}
|
|
17
9
|
function initializeCommon(config) {
|
|
18
|
-
var _a;
|
|
19
|
-
|
|
10
|
+
var _a, _b;
|
|
11
|
+
(_a = globalThis.__withwiz_config) != null ? _a : globalThis.__withwiz_config = {};
|
|
12
|
+
if (globalThis.__withwiz_config.common) return;
|
|
20
13
|
if (!config.nodeEnv) {
|
|
21
14
|
configWarn("Common", "nodeEnv not provided, using default: development");
|
|
22
15
|
}
|
|
23
|
-
|
|
16
|
+
globalThis.__withwiz_config.common = { nodeEnv: (_b = config.nodeEnv) != null ? _b : "development" };
|
|
24
17
|
}
|
|
25
18
|
function getCommonConfig() {
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
var _a;
|
|
20
|
+
const common = (_a = globalThis.__withwiz_config) == null ? void 0 : _a.common;
|
|
21
|
+
if (!common) {
|
|
28
22
|
throw new ConfigurationError("Common", "Not initialized. Call initializeCommon() first.");
|
|
29
23
|
}
|
|
30
|
-
return
|
|
24
|
+
return common;
|
|
31
25
|
}
|
|
32
26
|
function resetCommon() {
|
|
33
|
-
globalThis
|
|
27
|
+
if (globalThis.__withwiz_config) delete globalThis.__withwiz_config.common;
|
|
34
28
|
}
|
|
35
29
|
|
|
36
30
|
export {
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NoopCacheManager
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ENETIGKL.js";
|
|
4
4
|
import {
|
|
5
5
|
RedisCacheManager
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7UQZH2OH.js";
|
|
7
7
|
import {
|
|
8
8
|
HybridCacheManager
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-A7TN46LC.js";
|
|
10
10
|
import {
|
|
11
11
|
isRedisAvailableNow,
|
|
12
12
|
isRedisGloballyDisabled
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-UQM35MAO.js";
|
|
14
14
|
import {
|
|
15
15
|
InMemoryCacheManager
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZG2XGO44.js";
|
|
17
17
|
import {
|
|
18
18
|
logger
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-NOAU2JG7.js";
|
|
20
20
|
import {
|
|
21
21
|
getCacheConfig
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-F3NGZYL2.js";
|
|
23
23
|
import {
|
|
24
24
|
getENV,
|
|
25
25
|
isCacheEnabled
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-OFSPZUQD.js";
|
|
27
27
|
|
|
28
28
|
// src/cache/cache-factory.ts
|
|
29
29
|
function getInMemoryConfig() {
|
package/dist/config/common.d.ts
CHANGED
|
@@ -4,9 +4,6 @@ export interface CommonConfig {
|
|
|
4
4
|
export interface ResolvedCommonConfig {
|
|
5
5
|
nodeEnv: 'development' | 'production' | 'test';
|
|
6
6
|
}
|
|
7
|
-
declare global {
|
|
8
|
-
var __withwiz_common_config: ResolvedCommonConfig | undefined;
|
|
9
|
-
}
|
|
10
7
|
export declare function initializeCommon(config: CommonConfig): void;
|
|
11
8
|
export declare function getCommonConfig(): ResolvedCommonConfig;
|
|
12
9
|
export declare function resetCommon(): void;
|
package/dist/config/common.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Unified Config Registry
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* `config.auth` and `getAuthConfig()` return the same object —
|
|
8
|
-
* there is only one source of truth per module.
|
|
4
|
+
* 모든 모듈 설정을 단일 객체 `globalThis.__withwiz_config`에 저장.
|
|
5
|
+
* `config.auth`와 `getAuthConfig()` 모두 같은 객체를 반환한다.
|
|
9
6
|
*/
|
|
10
7
|
import type { ResolvedCommonConfig } from './common';
|
|
11
8
|
import type { ResolvedAuthConfig } from '../auth/config';
|
|
@@ -23,13 +20,8 @@ export interface ConfigRegistry {
|
|
|
23
20
|
geolocation?: ResolvedGeolocationConfig;
|
|
24
21
|
cors?: ResolvedCorsConfig;
|
|
25
22
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* Throws `TypeError` on any setter attempt.
|
|
30
|
-
*/
|
|
23
|
+
declare global {
|
|
24
|
+
var __withwiz_config: Partial<ConfigRegistry> | undefined;
|
|
25
|
+
}
|
|
31
26
|
export declare const config: ConfigRegistry;
|
|
32
|
-
/**
|
|
33
|
-
* Reset all module stores. For test cleanup only.
|
|
34
|
-
*/
|
|
35
27
|
export declare function resetConfig(): void;
|
package/dist/config/registry.js
CHANGED
package/dist/constants/index.js
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ERROR_CODES,
|
|
3
|
+
HTTP_STATUS,
|
|
4
|
+
classifyError,
|
|
5
|
+
formatErrorMessage,
|
|
6
|
+
getAllErrorCodes,
|
|
7
|
+
getDefaultErrorMessage,
|
|
8
|
+
getErrorByCode,
|
|
9
|
+
getErrorCategory,
|
|
10
|
+
getErrorCodesByCategory,
|
|
11
|
+
getErrorInfo,
|
|
12
|
+
getHttpStatus,
|
|
13
|
+
getLogLevel
|
|
14
|
+
} from "../chunk-SNTLJ646.js";
|
|
1
15
|
import {
|
|
2
16
|
GENERIC_CONFIRM_MESSAGES,
|
|
3
17
|
GENERIC_ERROR_MESSAGES,
|
|
@@ -30,20 +44,6 @@ import {
|
|
|
30
44
|
URL,
|
|
31
45
|
USER_INPUT
|
|
32
46
|
} from "../chunk-LNV2E4I6.js";
|
|
33
|
-
import {
|
|
34
|
-
ERROR_CODES,
|
|
35
|
-
HTTP_STATUS,
|
|
36
|
-
classifyError,
|
|
37
|
-
formatErrorMessage,
|
|
38
|
-
getAllErrorCodes,
|
|
39
|
-
getDefaultErrorMessage,
|
|
40
|
-
getErrorByCode,
|
|
41
|
-
getErrorCategory,
|
|
42
|
-
getErrorCodesByCategory,
|
|
43
|
-
getErrorInfo,
|
|
44
|
-
getHttpStatus,
|
|
45
|
-
getLogLevel
|
|
46
|
-
} from "../chunk-SNTLJ646.js";
|
|
47
47
|
import "../chunk-ORMEWXMH.js";
|
|
48
48
|
export {
|
|
49
49
|
CSRF,
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
error_handler_default,
|
|
6
6
|
processError,
|
|
7
7
|
withErrorHandler
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-XY3ZVORI.js";
|
|
9
9
|
import "../chunk-EOEMOXNT.js";
|
|
10
10
|
import "../chunk-SNTLJ646.js";
|
|
11
11
|
import "../chunk-AIH3F7JV.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-NOAU2JG7.js";
|
|
13
|
+
import "../chunk-LMQSV5UK.js";
|
|
14
14
|
import "../chunk-K25ICPU4.js";
|
|
15
15
|
import "../chunk-2QH66EVQ.js";
|
|
16
16
|
import "../chunk-ORMEWXMH.js";
|
package/dist/error/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
errorToResponse,
|
|
16
16
|
processError,
|
|
17
17
|
withErrorHandler
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-XY3ZVORI.js";
|
|
19
19
|
import {
|
|
20
20
|
AppError
|
|
21
21
|
} from "../chunk-EOEMOXNT.js";
|
|
@@ -48,8 +48,8 @@ import {
|
|
|
48
48
|
getLogLevel
|
|
49
49
|
} from "../chunk-SNTLJ646.js";
|
|
50
50
|
import "../chunk-AIH3F7JV.js";
|
|
51
|
-
import "../chunk-
|
|
52
|
-
import "../chunk-
|
|
51
|
+
import "../chunk-NOAU2JG7.js";
|
|
52
|
+
import "../chunk-LMQSV5UK.js";
|
|
53
53
|
import "../chunk-K25ICPU4.js";
|
|
54
54
|
import "../chunk-2QH66EVQ.js";
|
|
55
55
|
import "../chunk-ORMEWXMH.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BatchProcessor,
|
|
3
3
|
createBatchProcessor
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-LG6GH4V7.js";
|
|
5
|
+
import "../chunk-NOAU2JG7.js";
|
|
6
|
+
import "../chunk-LMQSV5UK.js";
|
|
7
7
|
import "../chunk-K25ICPU4.js";
|
|
8
8
|
import "../chunk-2QH66EVQ.js";
|
|
9
9
|
import "../chunk-ORMEWXMH.js";
|
|
@@ -6,9 +6,6 @@ export interface ResolvedGeolocationConfig {
|
|
|
6
6
|
ipgeolocationApiKey?: string;
|
|
7
7
|
maxmindLicenseKey?: string;
|
|
8
8
|
}
|
|
9
|
-
declare global {
|
|
10
|
-
var __withwiz_geolocation_config: ResolvedGeolocationConfig | undefined;
|
|
11
|
-
}
|
|
12
9
|
export declare function initializeGeolocation(config: GeolocationConfig): void;
|
|
13
10
|
export declare function getGeolocationConfig(): ResolvedGeolocationConfig;
|
|
14
11
|
export declare function resetGeolocation(): void;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GeoIPProviderFactory
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-WLXAEHKK.js";
|
|
4
4
|
import {
|
|
5
5
|
IPGeolocationProvider
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-LGAV5UU2.js";
|
|
7
7
|
import {
|
|
8
8
|
MaxMindProvider
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-FDRQUDFH.js";
|
|
10
10
|
import {
|
|
11
11
|
IPApiProvider
|
|
12
12
|
} from "../chunk-DEEJBDJE.js";
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
BatchProcessor,
|
|
22
22
|
createBatchProcessor
|
|
23
|
-
} from "../chunk-
|
|
24
|
-
import "../chunk-
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
23
|
+
} from "../chunk-LG6GH4V7.js";
|
|
24
|
+
import "../chunk-LHIVUV7Q.js";
|
|
25
|
+
import "../chunk-NOAU2JG7.js";
|
|
26
|
+
import "../chunk-LMQSV5UK.js";
|
|
27
27
|
import "../chunk-K25ICPU4.js";
|
|
28
28
|
import "../chunk-2QH66EVQ.js";
|
|
29
29
|
import "../chunk-ORMEWXMH.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GeoIPProviderFactory
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-WLXAEHKK.js";
|
|
4
4
|
import {
|
|
5
5
|
IPGeolocationProvider
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-LGAV5UU2.js";
|
|
7
7
|
import {
|
|
8
8
|
MaxMindProvider
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-FDRQUDFH.js";
|
|
10
10
|
import {
|
|
11
11
|
IPApiProvider
|
|
12
12
|
} from "../../chunk-DEEJBDJE.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
BaseGeoIPProvider,
|
|
18
18
|
truncateString
|
|
19
19
|
} from "../../chunk-AHDPGRXS.js";
|
|
20
|
-
import "../../chunk-
|
|
20
|
+
import "../../chunk-LHIVUV7Q.js";
|
|
21
21
|
import "../../chunk-K25ICPU4.js";
|
|
22
22
|
import "../../chunk-2QH66EVQ.js";
|
|
23
23
|
import "../../chunk-ORMEWXMH.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IPGeolocationProvider
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-LGAV5UU2.js";
|
|
4
4
|
import "../../chunk-AHDPGRXS.js";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-LHIVUV7Q.js";
|
|
6
6
|
import "../../chunk-K25ICPU4.js";
|
|
7
7
|
import "../../chunk-2QH66EVQ.js";
|
|
8
8
|
import "../../chunk-ORMEWXMH.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MaxMindProvider
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-FDRQUDFH.js";
|
|
4
4
|
import "../../chunk-AHDPGRXS.js";
|
|
5
|
-
import "../../chunk-
|
|
5
|
+
import "../../chunk-LHIVUV7Q.js";
|
|
6
6
|
import "../../chunk-K25ICPU4.js";
|
|
7
7
|
import "../../chunk-2QH66EVQ.js";
|
|
8
8
|
import "../../chunk-ORMEWXMH.js";
|
package/dist/initialize.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { CacheConfigInput } from './cache/config';
|
|
|
5
5
|
import type { StorageConfig } from './storage/config';
|
|
6
6
|
import type { GeolocationConfig } from './geolocation/config';
|
|
7
7
|
import type { CorsConfig } from './middleware/cors-config';
|
|
8
|
+
import type { ConfigRegistry } from './config/registry';
|
|
8
9
|
export interface ToolkitConfig {
|
|
9
10
|
nodeEnv?: CommonConfig['nodeEnv'];
|
|
10
11
|
auth?: AuthConfig;
|
|
@@ -14,7 +15,7 @@ export interface ToolkitConfig {
|
|
|
14
15
|
geolocation?: GeolocationConfig;
|
|
15
16
|
cors?: CorsConfig;
|
|
16
17
|
}
|
|
17
|
-
export declare function initialize(
|
|
18
|
+
export declare function initialize(toolkitConfig: ToolkitConfig): ConfigRegistry;
|
|
18
19
|
export type { AuthConfig, LoggerConfig, CacheConfigInput as CacheConfig, StorageConfig, GeolocationConfig, CorsConfig, };
|
|
19
20
|
export { config, resetConfig } from './config/registry';
|
|
20
21
|
export type { ConfigRegistry } from './config/registry';
|