mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
chore(deps): upgrade withtyped and cloud packages (#5408)
* fix(deps): upgrade withtyped packages * chore: fix types * chore(deps): upgrade logto cloud package * refactor(cli): fix types --------- Co-authored-by: Gao Sun <gao@silverhand.io>
This commit is contained in:
parent
23e7564475
commit
e1def81ed5
10 changed files with 41 additions and 48 deletions
|
@ -76,7 +76,7 @@
|
|||
"devDependencies": {
|
||||
"@silverhand/eslint-config": "5.0.0",
|
||||
"@silverhand/ts-config": "5.0.0",
|
||||
"@withtyped/server": "^0.12.9",
|
||||
"@withtyped/server": "^0.13.3",
|
||||
"@types/inquirer": "^9.0.0",
|
||||
"@types/jest": "^29.4.0",
|
||||
"@types/node": "^20.9.5",
|
||||
|
|
|
@ -8,8 +8,9 @@ import { loadConnector } from './loader.js';
|
|||
import type { ConnectorFactory, ConnectorPackage } from './types.js';
|
||||
import { parseMetadata, validateConnectorModule } from './utils.js';
|
||||
|
||||
// eslint-disable-next-line @silverhand/fp/no-let, @typescript-eslint/no-explicit-any
|
||||
let cachedConnectorFactories: Array<ConnectorFactory<Router<any, BaseRoutes, string>>> | undefined;
|
||||
// eslint-disable-next-line @silverhand/fp/no-let
|
||||
let cachedConnectorFactories: // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
Array<ConnectorFactory<Router<any, any, BaseRoutes, string>>> | undefined;
|
||||
|
||||
export const loadConnectorFactories = async (
|
||||
connectorPackages: ConnectorPackage[],
|
||||
|
@ -49,8 +50,10 @@ export const loadConnectorFactories = async (
|
|||
|
||||
// eslint-disable-next-line @silverhand/fp/no-mutation
|
||||
cachedConnectorFactories = connectorFactories.filter(
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(connectorFactory): connectorFactory is ConnectorFactory<Router<any, BaseRoutes, string>> =>
|
||||
(
|
||||
connectorFactory
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
): connectorFactory is ConnectorFactory<Router<any, any, BaseRoutes, string>> =>
|
||||
connectorFactory !== undefined
|
||||
);
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import type { BaseRoutes, Router } from '@withtyped/server';
|
|||
*/
|
||||
export type ConnectorFactory<
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
T extends Router<any, BaseRoutes, string>,
|
||||
T extends Router<any, any, BaseRoutes, string>,
|
||||
U extends AllConnector = AllConnector,
|
||||
> = Pick<U, 'type' | 'metadata' | 'configGuard'> & {
|
||||
createConnector: CreateConnector<U, T>;
|
||||
|
|
|
@ -93,7 +93,7 @@ export const parseMetadata = async (
|
|||
|
||||
export const buildRawConnector = async <
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
T extends Router<any, BaseRoutes, string>,
|
||||
T extends Router<any, any, BaseRoutes, string>,
|
||||
U extends AllConnector = AllConnector,
|
||||
>(
|
||||
connectorFactory: ConnectorFactory<T, U>,
|
||||
|
|
|
@ -49,6 +49,6 @@
|
|||
"access": "public"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@logto/cloud": "0.2.5-faca9a9"
|
||||
"@logto/cloud": "0.2.5-4ef0b45"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
"@fontsource/roboto-mono": "^5.0.0",
|
||||
"@jest/types": "^29.5.0",
|
||||
"@logto/app-insights": "workspace:^1.4.0",
|
||||
"@logto/cloud": "0.2.5-faca9a9",
|
||||
"@logto/cloud": "0.2.5-4ef0b45",
|
||||
"@logto/connector-kit": "workspace:^2.1.0",
|
||||
"@logto/core-kit": "workspace:^2.3.0",
|
||||
"@logto/language-kit": "workspace:^1.1.0",
|
||||
|
@ -60,7 +60,7 @@
|
|||
"@types/react-helmet": "^6.1.6",
|
||||
"@types/react-modal": "^3.13.1",
|
||||
"@types/react-syntax-highlighter": "^15.5.1",
|
||||
"@withtyped/client": "^0.7.22",
|
||||
"@withtyped/client": "^0.8.4",
|
||||
"buffer": "^5.7.1",
|
||||
"classnames": "^2.3.1",
|
||||
"clean-deep": "^3.4.0",
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
"@logto/shared": "workspace:^3.1.0",
|
||||
"@silverhand/essentials": "^2.9.0",
|
||||
"@simplewebauthn/server": "^9.0.0",
|
||||
"@withtyped/client": "^0.7.22",
|
||||
"@withtyped/client": "^0.8.4",
|
||||
"camelcase": "^8.0.0",
|
||||
"camelcase-keys": "^9.0.0",
|
||||
"chalk": "^5.0.0",
|
||||
|
@ -93,7 +93,7 @@
|
|||
"zod": "^3.22.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@logto/cloud": "0.2.5-faca9a9",
|
||||
"@logto/cloud": "0.2.5-4ef0b45",
|
||||
"@silverhand/eslint-config": "5.0.0",
|
||||
"@silverhand/ts-config": "5.0.0",
|
||||
"@types/debug": "^4.1.7",
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
"dependencies": {
|
||||
"@logto/language-kit": "workspace:^1.1.0",
|
||||
"@silverhand/essentials": "^2.9.0",
|
||||
"@withtyped/client": "^0.7.22",
|
||||
"@withtyped/server": "^0.12.9"
|
||||
"@withtyped/client": "^0.8.4",
|
||||
"@withtyped/server": "^0.13.3"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"zod": "^3.22.4"
|
||||
|
|
|
@ -14,14 +14,14 @@ export * from './social.js';
|
|||
export type GetConnectorConfig = (id: string) => Promise<unknown>;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export type GetCloudServiceClient<T extends Router<any, BaseRoutes, string>> = () => Promise<
|
||||
export type GetCloudServiceClient<T extends Router<any, any, BaseRoutes, string>> = () => Promise<
|
||||
Client<T>
|
||||
>;
|
||||
|
||||
export type CreateConnector<
|
||||
T extends AllConnector,
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
U extends Router<any, BaseRoutes, string> = Router<any, BaseRoutes, string>,
|
||||
U extends Router<any, any, BaseRoutes, string> = Router<any, any, BaseRoutes, string>,
|
||||
> = (options: {
|
||||
getConfig: GetConnectorConfig;
|
||||
getCloudServiceClient?: GetCloudServiceClient<U>;
|
||||
|
|
|
@ -219,8 +219,8 @@ importers:
|
|||
specifier: ^17.0.13
|
||||
version: 17.0.13
|
||||
'@withtyped/server':
|
||||
specifier: ^0.12.9
|
||||
version: 0.12.9(zod@3.22.4)
|
||||
specifier: ^0.13.3
|
||||
version: 0.13.3(zod@3.22.4)
|
||||
eslint:
|
||||
specifier: ^8.44.0
|
||||
version: 8.44.0
|
||||
|
@ -1322,8 +1322,8 @@ importers:
|
|||
specifier: ^29.5.0
|
||||
version: 29.6.3
|
||||
'@logto/cloud':
|
||||
specifier: 0.2.5-faca9a9
|
||||
version: 0.2.5-faca9a9(zod@3.22.4)
|
||||
specifier: 0.2.5-4ef0b45
|
||||
version: 0.2.5-4ef0b45(zod@3.22.4)
|
||||
'@rollup/plugin-commonjs':
|
||||
specifier: ^25.0.0
|
||||
version: 25.0.7(rollup@4.12.0)
|
||||
|
@ -2919,8 +2919,8 @@ importers:
|
|||
specifier: workspace:^1.4.0
|
||||
version: link:../app-insights
|
||||
'@logto/cloud':
|
||||
specifier: 0.2.5-faca9a9
|
||||
version: 0.2.5-faca9a9(zod@3.22.4)
|
||||
specifier: 0.2.5-4ef0b45
|
||||
version: 0.2.5-4ef0b45(zod@3.22.4)
|
||||
'@logto/connector-kit':
|
||||
specifier: workspace:^2.1.0
|
||||
version: link:../toolkit/connector-kit
|
||||
|
@ -3021,8 +3021,8 @@ importers:
|
|||
specifier: ^15.5.1
|
||||
version: 15.5.1
|
||||
'@withtyped/client':
|
||||
specifier: ^0.7.22
|
||||
version: 0.7.22(zod@3.22.4)
|
||||
specifier: ^0.8.4
|
||||
version: 0.8.4(zod@3.22.4)
|
||||
buffer:
|
||||
specifier: ^5.7.1
|
||||
version: 5.7.1
|
||||
|
@ -3267,8 +3267,8 @@ importers:
|
|||
specifier: ^9.0.0
|
||||
version: 9.0.1
|
||||
'@withtyped/client':
|
||||
specifier: ^0.7.22
|
||||
version: 0.7.22(zod@3.22.4)
|
||||
specifier: ^0.8.4
|
||||
version: 0.8.4(zod@3.22.4)
|
||||
camelcase:
|
||||
specifier: ^8.0.0
|
||||
version: 8.0.0
|
||||
|
@ -3406,8 +3406,8 @@ importers:
|
|||
version: 3.22.4
|
||||
devDependencies:
|
||||
'@logto/cloud':
|
||||
specifier: 0.2.5-faca9a9
|
||||
version: 0.2.5-faca9a9(zod@3.22.4)
|
||||
specifier: 0.2.5-4ef0b45
|
||||
version: 0.2.5-4ef0b45(zod@3.22.4)
|
||||
'@silverhand/eslint-config':
|
||||
specifier: 5.0.0
|
||||
version: 5.0.0(eslint@8.44.0)(prettier@3.0.0)(typescript@5.3.3)
|
||||
|
@ -4119,11 +4119,11 @@ importers:
|
|||
specifier: ^2.9.0
|
||||
version: 2.9.0
|
||||
'@withtyped/client':
|
||||
specifier: ^0.7.22
|
||||
version: 0.7.22(zod@3.22.4)
|
||||
specifier: ^0.8.4
|
||||
version: 0.8.4(zod@3.22.4)
|
||||
'@withtyped/server':
|
||||
specifier: ^0.12.9
|
||||
version: 0.12.9(zod@3.22.4)
|
||||
specifier: ^0.13.3
|
||||
version: 0.13.3(zod@3.22.4)
|
||||
optionalDependencies:
|
||||
zod:
|
||||
specifier: ^3.22.4
|
||||
|
@ -7667,12 +7667,12 @@ packages:
|
|||
jose: 5.2.2
|
||||
dev: true
|
||||
|
||||
/@logto/cloud@0.2.5-faca9a9(zod@3.22.4):
|
||||
resolution: {integrity: sha512-hUiuzOPd4bKIV6fIKZLQW2Fc8JYmwKWWps7gZoxGbL3uLmAYYci5JHIP+vM7nbNS+oK1V141sy3JjNS1vAkvGA==}
|
||||
/@logto/cloud@0.2.5-4ef0b45(zod@3.22.4):
|
||||
resolution: {integrity: sha512-mW+Olp8KBYwlJY0CTlMm6Qja0P1mOGy1P3P+RwkVjlMKu8MWq0zvodMU5/Bgxon5MsV5a5yj8DlT5t/Oj6vBJw==}
|
||||
engines: {node: ^20.9.0}
|
||||
dependencies:
|
||||
'@silverhand/essentials': 2.9.0
|
||||
'@withtyped/server': 0.12.9(zod@3.22.4)
|
||||
'@withtyped/server': 0.13.3(zod@3.22.4)
|
||||
transitivePeerDependencies:
|
||||
- zod
|
||||
dev: true
|
||||
|
@ -10528,23 +10528,14 @@ packages:
|
|||
resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}
|
||||
dev: true
|
||||
|
||||
/@withtyped/client@0.7.22(zod@3.22.4):
|
||||
resolution: {integrity: sha512-emNtcO0jc0dFWhvL7eUIRYzhTfn+JqgIvCmXb8ZUFOR8wdSSGrr9VDlm+wgQD06DEBBpmqtTHMMHTNXJdUC/Qw==}
|
||||
/@withtyped/client@0.8.4(zod@3.22.4):
|
||||
resolution: {integrity: sha512-oX19xZRjUASZLWUzQW4LKhLsDgtwFfWU7mgReKiY/tddwvHLoakLqz1o1MvRDuz+EOoYrQM+VpkwJeMsnbNT1w==}
|
||||
dependencies:
|
||||
'@withtyped/server': 0.12.9(zod@3.22.4)
|
||||
'@withtyped/server': 0.13.3(zod@3.22.4)
|
||||
'@withtyped/shared': 0.2.2
|
||||
transitivePeerDependencies:
|
||||
- zod
|
||||
|
||||
/@withtyped/server@0.12.9(zod@3.22.4):
|
||||
resolution: {integrity: sha512-K5zoV9D+WpawbghtlJKF1KOshKkBjq+gYzNRWuZk13YmFWFLcmZn+QCblNP55z9IGdcHWpTRknqb1APuicdzgA==}
|
||||
peerDependencies:
|
||||
zod: ^3.19.1
|
||||
dependencies:
|
||||
'@silverhand/essentials': 2.9.0
|
||||
'@withtyped/shared': 0.2.2
|
||||
zod: 3.22.4
|
||||
|
||||
/@withtyped/server@0.13.3(zod@3.22.4):
|
||||
resolution: {integrity: sha512-MPyjRPQd5JySDnMnXPxGXXnw7AACAl8TLhWPjm4sdBgVMssSrmBbjRxBep0jY64PJ3xzICZh0ArWTRdXyNFIog==}
|
||||
peerDependencies:
|
||||
|
@ -10553,7 +10544,6 @@ packages:
|
|||
'@silverhand/essentials': 2.9.0
|
||||
'@withtyped/shared': 0.2.2
|
||||
zod: 3.22.4
|
||||
dev: false
|
||||
|
||||
/@withtyped/shared@0.2.2:
|
||||
resolution: {integrity: sha512-Vpcj12NqaoZ8M5Z/1kffheI9FBZEm9goed0THmgTcMKXLHjXSRbMZMp0olVxovEgaTIAydshqJOQUXKZMctIZw==}
|
||||
|
|
Loading…
Reference in a new issue