From e1def81ed55f288277d1dad0e838638c3ba69da0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 6 Mar 2024 04:26:50 +0000 Subject: [PATCH] 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 --- packages/cli/package.json | 2 +- packages/cli/src/connector/factories.ts | 11 ++-- packages/cli/src/connector/types.ts | 2 +- packages/cli/src/connector/utils.ts | 2 +- .../connector-logto-email/package.json | 2 +- packages/console/package.json | 4 +- packages/core/package.json | 4 +- packages/toolkit/connector-kit/package.json | 4 +- .../toolkit/connector-kit/src/types/index.ts | 4 +- pnpm-lock.yaml | 54 ++++++++----------- 10 files changed, 41 insertions(+), 48 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index ea0cec924..342c5fb11 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -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", diff --git a/packages/cli/src/connector/factories.ts b/packages/cli/src/connector/factories.ts index 50281a726..f907657ed 100644 --- a/packages/cli/src/connector/factories.ts +++ b/packages/cli/src/connector/factories.ts @@ -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>> | undefined; +// eslint-disable-next-line @silverhand/fp/no-let +let cachedConnectorFactories: // eslint-disable-next-line @typescript-eslint/no-explicit-any +Array>> | 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> => + ( + connectorFactory + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ): connectorFactory is ConnectorFactory> => connectorFactory !== undefined ); diff --git a/packages/cli/src/connector/types.ts b/packages/cli/src/connector/types.ts index 2c296f545..e6c1287db 100644 --- a/packages/cli/src/connector/types.ts +++ b/packages/cli/src/connector/types.ts @@ -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, + T extends Router, U extends AllConnector = AllConnector, > = Pick & { createConnector: CreateConnector; diff --git a/packages/cli/src/connector/utils.ts b/packages/cli/src/connector/utils.ts index c0f2c4ca6..7a1c61206 100644 --- a/packages/cli/src/connector/utils.ts +++ b/packages/cli/src/connector/utils.ts @@ -93,7 +93,7 @@ export const parseMetadata = async ( export const buildRawConnector = async < // eslint-disable-next-line @typescript-eslint/no-explicit-any - T extends Router, + T extends Router, U extends AllConnector = AllConnector, >( connectorFactory: ConnectorFactory, diff --git a/packages/connectors/connector-logto-email/package.json b/packages/connectors/connector-logto-email/package.json index db0a66b2f..3fdd5355d 100644 --- a/packages/connectors/connector-logto-email/package.json +++ b/packages/connectors/connector-logto-email/package.json @@ -49,6 +49,6 @@ "access": "public" }, "devDependencies": { - "@logto/cloud": "0.2.5-faca9a9" + "@logto/cloud": "0.2.5-4ef0b45" } } diff --git a/packages/console/package.json b/packages/console/package.json index 64626cda8..282833920 100644 --- a/packages/console/package.json +++ b/packages/console/package.json @@ -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", diff --git a/packages/core/package.json b/packages/core/package.json index 1cbd88948..b71c1fe54 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -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", diff --git a/packages/toolkit/connector-kit/package.json b/packages/toolkit/connector-kit/package.json index 3ffb7f943..b6f9e0083 100644 --- a/packages/toolkit/connector-kit/package.json +++ b/packages/toolkit/connector-kit/package.json @@ -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" diff --git a/packages/toolkit/connector-kit/src/types/index.ts b/packages/toolkit/connector-kit/src/types/index.ts index 432c270a2..6e46c15b4 100644 --- a/packages/toolkit/connector-kit/src/types/index.ts +++ b/packages/toolkit/connector-kit/src/types/index.ts @@ -14,14 +14,14 @@ export * from './social.js'; export type GetConnectorConfig = (id: string) => Promise; // eslint-disable-next-line @typescript-eslint/no-explicit-any -export type GetCloudServiceClient> = () => Promise< +export type GetCloudServiceClient> = () => Promise< Client >; export type CreateConnector< T extends AllConnector, // eslint-disable-next-line @typescript-eslint/no-explicit-any - U extends Router = Router, + U extends Router = Router, > = (options: { getConfig: GetConnectorConfig; getCloudServiceClient?: GetCloudServiceClient; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ccdc8b0de..ed6e57990 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -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==}