mirror of
https://github.com/logto-io/logto.git
synced 2025-01-13 21:30:30 -05:00
fix(deps): update dependency snakecase-keys to v6 (#5253)
Co-authored-by: Gao Sun <gao@silverhand.io>
This commit is contained in:
parent
f74fdce9a0
commit
0a9e1d093c
4 changed files with 89 additions and 78 deletions
|
@ -25,7 +25,7 @@
|
|||
"dependencies": {
|
||||
"@silverhand/essentials": "^2.8.8",
|
||||
"got": "^14.0.0",
|
||||
"snakecase-keys": "^5.4.4",
|
||||
"snakecase-keys": "^6.0.0",
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
"slonik-interceptor-preset": "^1.2.10",
|
||||
"slonik-sql-tag-raw": "^1.1.4",
|
||||
"snake-case": "^3.0.4",
|
||||
"snakecase-keys": "^5.4.4",
|
||||
"snakecase-keys": "^6.0.0",
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -33,10 +33,26 @@ export const parseJson = (
|
|||
}
|
||||
};
|
||||
|
||||
const isRecordOrArray = (parsed: unknown): parsed is Record<string, unknown> | unknown[] => {
|
||||
if (Array.isArray(parsed)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(parsed !== null && typeof parsed === 'object')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Object.getOwnPropertySymbols(parsed).length > 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
export const parseJsonObject = (...args: Parameters<typeof parseJson>) => {
|
||||
const parsed = parseJson(...args);
|
||||
|
||||
if (!(parsed !== null && typeof parsed === 'object')) {
|
||||
if (!isRecordOrArray(parsed)) {
|
||||
throw new ConnectorError(ConnectorErrorCodes.InvalidResponse, parsed);
|
||||
}
|
||||
|
||||
|
|
145
pnpm-lock.yaml
generated
145
pnpm-lock.yaml
generated
|
@ -255,8 +255,8 @@ importers:
|
|||
specifier: ^0.6.3
|
||||
version: 0.6.3
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -343,8 +343,8 @@ importers:
|
|||
specifier: ^0.6.3
|
||||
version: 0.6.3
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -425,8 +425,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -504,8 +504,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -589,8 +589,8 @@ importers:
|
|||
specifier: ^5.0.0
|
||||
version: 5.0.1
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -674,8 +674,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -756,8 +756,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -835,8 +835,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -914,8 +914,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -993,8 +993,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -1075,8 +1075,8 @@ importers:
|
|||
specifier: ^8.0.0
|
||||
version: 8.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -1154,8 +1154,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -1233,8 +1233,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -1312,8 +1312,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -1394,8 +1394,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -1473,8 +1473,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -1552,8 +1552,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -1631,8 +1631,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -1710,8 +1710,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -1789,8 +1789,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -1868,8 +1868,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -1947,8 +1947,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -2029,8 +2029,8 @@ importers:
|
|||
specifier: ^8.0.0
|
||||
version: 8.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -2117,8 +2117,8 @@ importers:
|
|||
specifier: ^5.0.1
|
||||
version: 5.0.1
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -2202,8 +2202,8 @@ importers:
|
|||
specifier: 2.8.10
|
||||
version: 2.8.10
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -2281,8 +2281,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -2360,8 +2360,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -2442,8 +2442,8 @@ importers:
|
|||
specifier: ^6.9.1
|
||||
version: 6.9.1
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -2524,8 +2524,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -2603,8 +2603,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -2682,8 +2682,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -2761,8 +2761,8 @@ importers:
|
|||
specifier: ^14.0.0
|
||||
version: 14.0.0
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -3320,8 +3320,8 @@ importers:
|
|||
specifier: ^3.0.4
|
||||
version: 3.0.4
|
||||
snakecase-keys:
|
||||
specifier: ^5.4.4
|
||||
version: 5.4.4
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
version: 3.22.4
|
||||
|
@ -19874,13 +19874,13 @@ packages:
|
|||
tslib: 2.4.1
|
||||
dev: false
|
||||
|
||||
/snakecase-keys@5.4.4:
|
||||
resolution: {integrity: sha512-YTywJG93yxwHLgrYLZjlC75moVEX04LZM4FHfihjHe1FCXm+QaLOFfSf535aXOAd0ArVQMWUAe8ZPm4VtWyXaA==}
|
||||
engines: {node: '>=12'}
|
||||
/snakecase-keys@6.0.0:
|
||||
resolution: {integrity: sha512-E5a0C3rcj+Cvq+dt41mw6tV6Wx78/JpQyR71GDiyGSXdp3jEvKxv8pIP0tOHmEMiqKVZSwflXtlWwqNn5oTbbQ==}
|
||||
engines: {node: '>=18'}
|
||||
dependencies:
|
||||
map-obj: 4.3.0
|
||||
snake-case: 3.0.4
|
||||
type-fest: 2.19.0
|
||||
type-fest: 3.13.1
|
||||
dev: false
|
||||
|
||||
/socks-proxy-agent@8.0.1:
|
||||
|
@ -20963,11 +20963,6 @@ packages:
|
|||
engines: {node: '>=10'}
|
||||
dev: true
|
||||
|
||||
/type-fest@2.19.0:
|
||||
resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==}
|
||||
engines: {node: '>=12.20'}
|
||||
dev: false
|
||||
|
||||
/type-fest@3.13.1:
|
||||
resolution: {integrity: sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==}
|
||||
engines: {node: '>=14.16'}
|
||||
|
|
Loading…
Add table
Reference in a new issue