@withwiz/toolkit 0.11.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/README.md +6 -0
- package/dist/chunk-4JZIIMAF.js +33 -0
- package/dist/{chunk-XQIAXMRY.js → chunk-5VZIAXO2.js} +2 -1
- package/dist/{chunk-MJOXTFIC.js → chunk-7Q6SMNMN.js} +2 -2
- package/dist/{chunk-4Y5MRUMX.js → chunk-A6NIKJX5.js} +3 -3
- package/dist/{chunk-DISEIUYD.js → chunk-AQQ7JSS5.js} +1 -1
- package/dist/{chunk-BRFW2LL2.js → chunk-D4QADM6T.js} +2 -2
- package/dist/{chunk-RWENSBNW.js → chunk-G4IGD3AZ.js} +30 -10
- package/dist/{chunk-4TGPAUJV.js → chunk-K7OZWWIS.js} +2 -2
- package/dist/{chunk-23LQJYZN.js → chunk-KAS5ILUM.js} +1 -1
- package/dist/{chunk-YBVZ5UVC.js → chunk-L4WQRYMR.js} +3 -3
- package/dist/{chunk-QBXNL6QU.js → chunk-LYO2HV5F.js} +3 -3
- package/dist/{chunk-TRGFXIEF.js → chunk-M4ZVQFOH.js} +2 -2
- package/dist/{chunk-ATAQRXTH.js → chunk-MCPPJI3T.js} +1 -1
- package/dist/{chunk-AYCXN6QJ.js → chunk-NHFIOK2D.js} +2 -2
- package/dist/{chunk-ZEHNCHIV.js → chunk-NKZPMRVF.js} +1 -1
- package/dist/{chunk-Y6CPPBJI.js → chunk-QVPGBTCL.js} +1 -1
- package/dist/{chunk-2QO7YXTF.js → chunk-QVU4BHMC.js} +1 -1
- package/dist/{chunk-XF3WUF3F.js → chunk-ROJJJXRL.js} +2 -2
- package/dist/{chunk-NAFMJT62.js → chunk-TDRB5BIM.js} +7 -7
- package/dist/{chunk-WYA763JL.js → chunk-TGEKWTFZ.js} +1 -1
- package/dist/{chunk-HV6A6Z5R.js → chunk-UGLEAXTY.js} +3 -3
- package/dist/{chunk-5S7M2AJL.js → chunk-W2FBLCOR.js} +1 -1
- package/dist/{chunk-7IOAGJMK.js → chunk-YOIZUVRD.js} +3 -3
- package/dist/{chunk-2GK4LDPV.js → chunk-Z3OLZKTN.js} +2 -2
- package/dist/{chunk-JRORMRVN.js → chunk-ZVGEGDYF.js} +1 -1
- package/dist/core/api-key/api-key.service.d.ts +1 -0
- package/dist/core/api-key/api-key.service.js +2 -1
- package/dist/core/api-key/errors.d.ts +21 -0
- package/dist/core/api-key/errors.js +11 -0
- package/dist/core/api-key/index.d.ts +1 -0
- package/dist/core/api-key/index.js +11 -3
- package/dist/core/auth/index.js +29 -29
- package/dist/core/auth/oauth/index.js +7 -7
- package/dist/core/auth/oauth/providers/index.js +6 -6
- package/dist/core/auth/services/index.js +7 -7
- package/dist/core/cache/cache-config.js +4 -4
- package/dist/core/cache/cache-env.js +3 -3
- package/dist/core/cache/cache-factory.js +9 -9
- package/dist/core/cache/cache-invalidation.js +10 -10
- package/dist/core/cache/cache-redis.js +4 -4
- package/dist/core/cache/cache-wrapper.js +10 -10
- package/dist/core/cache/cache.js +13 -13
- package/dist/core/cache/config.js +2 -2
- package/dist/core/cache/hybrid-cache-manager.js +5 -5
- package/dist/core/cache/index.js +13 -13
- package/dist/core/cache/noop-cache-manager.js +5 -5
- package/dist/core/cache/redis-cache-manager.js +5 -5
- package/dist/core/constants/error-codes.js +1 -1
- package/dist/core/constants/index.js +1 -1
- package/dist/core/error/app-error.js +2 -2
- package/dist/core/error/friendly-messages-v2.js +2 -2
- package/dist/core/error/friendly-messages.js +1 -1
- 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/storage/r2-storage.js +2 -2
- package/dist/core/system/environment.js +3 -3
- package/dist/core/system/health-check.js +3 -3
- package/dist/core/system/index.js +7 -7
- package/dist/core/utils/optimistic-lock.js +2 -2
- package/dist/core/utils/startup-banner.d.ts +56 -0
- package/dist/core/utils/startup-banner.js +78 -0
- package/dist/initialize.js +10 -10
- package/dist/next/auth-handlers/index.js +18 -18
- package/dist/next/auth-handlers/oauth-authorize.handler.js +4 -4
- package/dist/next/auth-handlers/oauth-callback.handler.js +5 -5
- package/dist/next/error/error-handler.js +3 -3
- package/dist/next/error/index.js +4 -4
- package/dist/next/middleware/auth.js +3 -3
- package/dist/next/middleware/error-handler.js +4 -4
- package/dist/next/middleware/index.js +7 -7
- package/dist/next/middleware/rate-limit.js +3 -3
- package/dist/next/middleware/wrappers.js +7 -7
- package/dist/next/oapi/api-key-auth.js +4 -3
- package/dist/next/oapi/index.js +4 -3
- package/dist/next/utils/api-helpers.js +2 -2
- package/dist/next/utils/error-processor.js +3 -3
- package/dist/next/utils/index.js +17 -17
- package/package.json +3 -1
- package/dist/{chunk-MXWSG6ER.js → chunk-KYUJ6D65.js} +0 -0
- package/dist/{chunk-VDRLJU6C.js → chunk-Q5RPNLET.js} +6 -6
- package/dist/{chunk-7KIM5MHV.js → chunk-RHYETIUR.js} +3 -3
- package/dist/{chunk-UQ3Z3ZAF.js → chunk-V3GEYUBG.js} +6 -6
package/dist/next/utils/index.js
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ErrorProcessor,
|
|
3
|
-
errorToResponse,
|
|
4
|
-
handlePrismaError,
|
|
5
|
-
processError,
|
|
6
|
-
throwBadRequestError,
|
|
7
|
-
throwBusinessRuleError,
|
|
8
|
-
throwConflictError,
|
|
9
|
-
throwForbiddenError,
|
|
10
|
-
throwNotFoundError,
|
|
11
|
-
throwUnauthorizedError,
|
|
12
|
-
throwValidationError,
|
|
13
|
-
withErrorHandling
|
|
14
|
-
} from "../../chunk-BRFW2LL2.js";
|
|
15
1
|
import {
|
|
16
2
|
createPaginatedResponse,
|
|
17
3
|
getReferer,
|
|
@@ -25,7 +11,7 @@ import {
|
|
|
25
11
|
parseSort,
|
|
26
12
|
requireAdmin,
|
|
27
13
|
validateAndParse
|
|
28
|
-
} from "../../chunk-
|
|
14
|
+
} from "../../chunk-KAS5ILUM.js";
|
|
29
15
|
import {
|
|
30
16
|
getAllowedOrigins,
|
|
31
17
|
getCorsConfig,
|
|
@@ -45,8 +31,22 @@ import {
|
|
|
45
31
|
escapeCsvField,
|
|
46
32
|
rowToCsv
|
|
47
33
|
} from "../../chunk-DVCGAI5N.js";
|
|
48
|
-
import
|
|
49
|
-
|
|
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
|
+
import "../../chunk-MCPPJI3T.js";
|
|
49
|
+
import "../../chunk-5VZIAXO2.js";
|
|
50
50
|
import "../../chunk-QAIN3WNN.js";
|
|
51
51
|
import "../../chunk-7ZO5UNTJ.js";
|
|
52
52
|
import "../../chunk-IKZB26SK.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,
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"import": "./dist/core/api-key/index.js"
|
|
37
37
|
},
|
|
38
38
|
"./core/api-key/types": "./dist/core/api-key/types.js",
|
|
39
|
+
"./core/api-key/errors": "./dist/core/api-key/errors.js",
|
|
39
40
|
"./core/api-key/ports": "./dist/core/api-key/ports.js",
|
|
40
41
|
"./core/api-key/key-generator": "./dist/core/api-key/key-generator.js",
|
|
41
42
|
"./core/api-key/ip-whitelist": "./dist/core/api-key/ip-whitelist.js",
|
|
@@ -150,6 +151,7 @@
|
|
|
150
151
|
"./core/utils/optimistic-lock": "./dist/core/utils/optimistic-lock.js",
|
|
151
152
|
"./core/utils/sanitizer": "./dist/core/utils/sanitizer.js",
|
|
152
153
|
"./core/utils/short-code-generator": "./dist/core/utils/short-code-generator.js",
|
|
154
|
+
"./core/utils/startup-banner": "./dist/core/utils/startup-banner.js",
|
|
153
155
|
"./core/utils/timezone": "./dist/core/utils/timezone.js",
|
|
154
156
|
"./core/utils/type-guards": "./dist/core/utils/type-guards.js",
|
|
155
157
|
"./core/utils/url-normalizer": "./dist/core/utils/url-normalizer.js",
|
|
File without changes
|
|
@@ -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 {
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ConfigurationError
|
|
3
|
-
} from "./chunk-F3R3UYBF.js";
|
|
4
1
|
import {
|
|
5
2
|
CACHE_DURATION_DEFAULTS,
|
|
6
3
|
CACHE_FALLBACK_DEFAULTS,
|
|
@@ -8,6 +5,9 @@ import {
|
|
|
8
5
|
CACHE_TTL_DEFAULTS,
|
|
9
6
|
INMEMORY_CACHE_DEFAULTS
|
|
10
7
|
} from "./chunk-ERFD6YAW.js";
|
|
8
|
+
import {
|
|
9
|
+
ConfigurationError
|
|
10
|
+
} from "./chunk-F3R3UYBF.js";
|
|
11
11
|
import {
|
|
12
12
|
__spreadValues
|
|
13
13
|
} from "./chunk-N3ETBM74.js";
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GitHubOAuthProvider
|
|
3
|
+
} from "./chunk-HIZ7USIF.js";
|
|
4
|
+
import {
|
|
5
|
+
GoogleOAuthProvider
|
|
6
|
+
} from "./chunk-GF3DKZIW.js";
|
|
1
7
|
import {
|
|
2
8
|
KakaoOAuthProvider
|
|
3
9
|
} from "./chunk-65HVR74O.js";
|
|
@@ -7,12 +13,6 @@ import {
|
|
|
7
13
|
import {
|
|
8
14
|
MicrosoftOAuthProvider
|
|
9
15
|
} from "./chunk-GSSHHVHF.js";
|
|
10
|
-
import {
|
|
11
|
-
GitHubOAuthProvider
|
|
12
|
-
} from "./chunk-HIZ7USIF.js";
|
|
13
|
-
import {
|
|
14
|
-
GoogleOAuthProvider
|
|
15
|
-
} from "./chunk-GF3DKZIW.js";
|
|
16
16
|
import {
|
|
17
17
|
OAuthError
|
|
18
18
|
} from "./chunk-5GWGARXI.js";
|