diff --git a/packages/connector-alipay-native/package.json b/packages/connector-alipay-native/package.json index 2c5b6415..109ca6e1 100644 --- a/packages/connector-alipay-native/package.json +++ b/packages/connector-alipay-native/package.json @@ -25,7 +25,7 @@ "dependencies": { "@logto/connector-kit": "^1.0.0-beta.20", "@silverhand/essentials": "^1.2.0", - "@silverhand/jest-config": "1.0.0", + "@silverhand/jest-config": "1.2.2", "dayjs": "^1.10.5", "got": "^11.8.2", "iconv-lite": "0.6.3", @@ -35,8 +35,8 @@ "devDependencies": { "@jest/types": "^28.1.3", "@shopify/jest-koa-mocks": "^5.0.0", - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/jest": "^28.1.6", "@types/lodash.pick": "^4.4.6", "@types/node": "^16.3.1", diff --git a/packages/connector-alipay-native/src/constant.ts b/packages/connector-alipay-native/src/constant.ts index cb4ce70c..87ded426 100644 --- a/packages/connector-alipay-native/src/constant.ts +++ b/packages/connector-alipay-native/src/constant.ts @@ -1,4 +1,5 @@ -import { ConnectorMetadata, ConnectorPlatform } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; +import { ConnectorPlatform } from '@logto/connector-kit'; export const authorizationEndpoint = 'alipay://'; // This is used to arouse the native Alipay App export const alipayEndpoint = 'https://openapi.alipay.com/gateway.do'; diff --git a/packages/connector-alipay-native/src/index.ts b/packages/connector-alipay-native/src/index.ts index 690cf4e6..de452c29 100644 --- a/packages/connector-alipay-native/src/index.ts +++ b/packages/connector-alipay-native/src/index.ts @@ -7,14 +7,16 @@ * https://opendocs.alipay.com/open/204/105296/ */ -import { - ConnectorError, - ConnectorErrorCodes, +import type { GetAuthorizationUri, GetUserInfo, GetConnectorConfig, CreateConnector, SocialConnector, +} from '@logto/connector-kit'; +import { + ConnectorError, + ConnectorErrorCodes, validateConfig, ConnectorType, parseJson, @@ -35,13 +37,8 @@ import { invalidAccessTokenCode, invalidAccessTokenSubCode, } from './constant'; -import { - alipayNativeConfigGuard, - AlipayNativeConfig, - accessTokenResponseGuard, - userInfoResponseGuard, - ErrorHandler, -} from './types'; +import type { AlipayNativeConfig, ErrorHandler } from './types'; +import { alipayNativeConfigGuard, accessTokenResponseGuard, userInfoResponseGuard } from './types'; import { signingParameters } from './utils'; export type { AlipayNativeConfig } from './types'; diff --git a/packages/connector-alipay-native/src/mock.ts b/packages/connector-alipay-native/src/mock.ts index ad925f61..0a8ec8c8 100644 --- a/packages/connector-alipay-native/src/mock.ts +++ b/packages/connector-alipay-native/src/mock.ts @@ -1,4 +1,4 @@ -import { AlipayNativeConfig } from './types'; +import type { AlipayNativeConfig } from './types'; export const mockedTimestamp = '2022-02-22 22:22:22'; diff --git a/packages/connector-alipay-native/src/utils.ts b/packages/connector-alipay-native/src/utils.ts index e52b810a..38229197 100644 --- a/packages/connector-alipay-native/src/utils.ts +++ b/packages/connector-alipay-native/src/utils.ts @@ -5,7 +5,7 @@ import * as iconv from 'iconv-lite'; import snakeCaseKeys from 'snakecase-keys'; import { alipaySigningAlgorithmMapping } from './constant'; -import { AlipayNativeConfig } from './types'; +import type { AlipayNativeConfig } from './types'; export type SigningParameters = ( parameters: AlipayNativeConfig & Record diff --git a/packages/connector-alipay-web/package.json b/packages/connector-alipay-web/package.json index 4d77d4bc..4fa372b9 100644 --- a/packages/connector-alipay-web/package.json +++ b/packages/connector-alipay-web/package.json @@ -26,7 +26,7 @@ "@logto/connector-kit": "^1.0.0-beta.20", "@logto/core-kit": "1.0.0-beta.20", "@silverhand/essentials": "^1.2.0", - "@silverhand/jest-config": "1.0.0", + "@silverhand/jest-config": "1.2.2", "dayjs": "^1.10.5", "got": "^11.8.2", "iconv-lite": "0.6.3", @@ -36,8 +36,8 @@ "devDependencies": { "@jest/types": "^28.1.3", "@shopify/jest-koa-mocks": "^5.0.0", - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/jest": "^28.1.6", "@types/lodash.pick": "^4.4.6", "@types/node": "^16.3.1", diff --git a/packages/connector-alipay-web/src/constant.ts b/packages/connector-alipay-web/src/constant.ts index 28222d91..8882e00d 100644 --- a/packages/connector-alipay-web/src/constant.ts +++ b/packages/connector-alipay-web/src/constant.ts @@ -1,4 +1,5 @@ -import { ConnectorMetadata, ConnectorPlatform } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; +import { ConnectorPlatform } from '@logto/connector-kit'; export const authorizationEndpoint = 'https://openauth.alipay.com/oauth2/publicAppAuthorize.htm'; export const alipayEndpoint = 'https://openapi.alipay.com/gateway.do'; diff --git a/packages/connector-alipay-web/src/index.ts b/packages/connector-alipay-web/src/index.ts index 26de33d2..076f773c 100644 --- a/packages/connector-alipay-web/src/index.ts +++ b/packages/connector-alipay-web/src/index.ts @@ -5,14 +5,16 @@ * https://opendocs.alipay.com/open/01emu5 */ -import { - ConnectorError, - ConnectorErrorCodes, +import type { GetConnectorConfig, GetAuthorizationUri, GetUserInfo, CreateConnector, SocialConnector, +} from '@logto/connector-kit'; +import { + ConnectorError, + ConnectorErrorCodes, validateConfig, ConnectorType, parseJson, @@ -34,13 +36,8 @@ import { invalidAccessTokenCode, invalidAccessTokenSubCode, } from './constant'; -import { - alipayConfigGuard, - AlipayConfig, - accessTokenResponseGuard, - userInfoResponseGuard, - ErrorHandler, -} from './types'; +import type { AlipayConfig, ErrorHandler } from './types'; +import { alipayConfigGuard, accessTokenResponseGuard, userInfoResponseGuard } from './types'; import { signingParameters } from './utils'; export type { AlipayConfig } from './types'; diff --git a/packages/connector-alipay-web/src/mock.ts b/packages/connector-alipay-web/src/mock.ts index dd56b5b7..c70a7459 100644 --- a/packages/connector-alipay-web/src/mock.ts +++ b/packages/connector-alipay-web/src/mock.ts @@ -1,4 +1,4 @@ -import { AlipayConfig } from './types'; +import type { AlipayConfig } from './types'; export const mockedTimestamp = '2022-02-22 22:22:22'; diff --git a/packages/connector-alipay-web/src/utils.ts b/packages/connector-alipay-web/src/utils.ts index fbe7a912..337d4e5e 100644 --- a/packages/connector-alipay-web/src/utils.ts +++ b/packages/connector-alipay-web/src/utils.ts @@ -5,7 +5,7 @@ import * as iconv from 'iconv-lite'; import snakeCaseKeys from 'snakecase-keys'; import { alipaySigningAlgorithmMapping } from './constant'; -import { AlipayConfig } from './types'; +import type { AlipayConfig } from './types'; export type SigningParameters = ( parameters: AlipayConfig & Record diff --git a/packages/connector-aliyun-dm/package.json b/packages/connector-aliyun-dm/package.json index 4413ae6b..9a2ef5f5 100644 --- a/packages/connector-aliyun-dm/package.json +++ b/packages/connector-aliyun-dm/package.json @@ -25,14 +25,14 @@ "dependencies": { "@logto/connector-kit": "^1.0.0-beta.20", "@silverhand/essentials": "^1.2.0", - "@silverhand/jest-config": "1.0.0", + "@silverhand/jest-config": "1.2.2", "got": "^11.8.2", "zod": "^3.14.3" }, "devDependencies": { "@jest/types": "^28.1.3", - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/jest": "^28.1.6", "@types/node": "^16.3.1", "@vercel/ncc": "^0.34.0", diff --git a/packages/connector-aliyun-dm/src/constant.ts b/packages/connector-aliyun-dm/src/constant.ts index dbaf650b..5737e2a6 100644 --- a/packages/connector-aliyun-dm/src/constant.ts +++ b/packages/connector-aliyun-dm/src/constant.ts @@ -1,4 +1,4 @@ -import { ConnectorMetadata } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; export const endpoint = 'https://dm.aliyuncs.com/'; diff --git a/packages/connector-aliyun-dm/src/index.ts b/packages/connector-aliyun-dm/src/index.ts index 37bdc795..83a85671 100644 --- a/packages/connector-aliyun-dm/src/index.ts +++ b/packages/connector-aliyun-dm/src/index.ts @@ -1,11 +1,13 @@ -import { - ConnectorError, - ConnectorErrorCodes, - ConnectorType, +import type { CreateConnector, EmailConnector, GetConnectorConfig, SendMessageFunction, +} from '@logto/connector-kit'; +import { + ConnectorError, + ConnectorErrorCodes, + ConnectorType, validateConfig, parseJson, } from '@logto/connector-kit'; @@ -14,16 +16,11 @@ import { HTTPError } from 'got'; import { defaultMetadata } from './constant'; import { singleSendMail } from './single-send-mail'; -import { - AliyunDmConfig, - aliyunDmConfigGuard, - sendEmailResponseGuard, - sendMailErrorResponseGuard, -} from './types'; +import type { AliyunDmConfig } from './types'; +import { aliyunDmConfigGuard, sendEmailResponseGuard, sendMailErrorResponseGuard } from './types'; const sendMessage = (getConfig: GetConnectorConfig): SendMessageFunction => - // eslint-disable-next-line complexity async (data, inputConfig) => { const { to, type, payload } = data; const config = inputConfig ?? (await getConfig(defaultMetadata.id)); diff --git a/packages/connector-aliyun-dm/src/single-send-mail.ts b/packages/connector-aliyun-dm/src/single-send-mail.ts index 5249818e..344430f3 100644 --- a/packages/connector-aliyun-dm/src/single-send-mail.ts +++ b/packages/connector-aliyun-dm/src/single-send-mail.ts @@ -1,5 +1,5 @@ import { endpoint, staticConfigs } from './constant'; -import { PublicParameters, SingleSendMail } from './types'; +import type { PublicParameters, SingleSendMail } from './types'; import { request } from './utils'; /** diff --git a/packages/connector-aliyun-dm/src/utils.ts b/packages/connector-aliyun-dm/src/utils.ts index e31d203c..a1e13f36 100644 --- a/packages/connector-aliyun-dm/src/utils.ts +++ b/packages/connector-aliyun-dm/src/utils.ts @@ -2,7 +2,7 @@ import { createHmac } from 'crypto'; import got from 'got'; -import { PublicParameters } from './types'; +import type { PublicParameters } from './types'; // Aliyun has special escape rules. // https://help.aliyun.com/document_detail/29442.html diff --git a/packages/connector-aliyun-sms/package.json b/packages/connector-aliyun-sms/package.json index 68dbddff..8cee2520 100644 --- a/packages/connector-aliyun-sms/package.json +++ b/packages/connector-aliyun-sms/package.json @@ -25,14 +25,14 @@ "dependencies": { "@logto/connector-kit": "^1.0.0-beta.20", "@silverhand/essentials": "^1.2.0", - "@silverhand/jest-config": "1.0.0", + "@silverhand/jest-config": "1.2.2", "got": "^11.8.2", "zod": "^3.14.3" }, "devDependencies": { "@jest/types": "^28.1.3", - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/jest": "^28.1.6", "@types/node": "^16.3.1", "@vercel/ncc": "^0.34.0", diff --git a/packages/connector-aliyun-sms/src/constant.ts b/packages/connector-aliyun-sms/src/constant.ts index f6b47af0..0240886f 100644 --- a/packages/connector-aliyun-sms/src/constant.ts +++ b/packages/connector-aliyun-sms/src/constant.ts @@ -1,4 +1,4 @@ -import { ConnectorMetadata } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; export const endpoint = 'https://dysmsapi.aliyuncs.com/'; diff --git a/packages/connector-aliyun-sms/src/index.ts b/packages/connector-aliyun-sms/src/index.ts index bfe11126..7144dd14 100644 --- a/packages/connector-aliyun-sms/src/index.ts +++ b/packages/connector-aliyun-sms/src/index.ts @@ -1,10 +1,12 @@ -import { - ConnectorError, - ConnectorErrorCodes, +import type { GetConnectorConfig, SendMessageFunction, SmsConnector, CreateConnector, +} from '@logto/connector-kit'; +import { + ConnectorError, + ConnectorErrorCodes, validateConfig, ConnectorType, parseJson, @@ -14,7 +16,8 @@ import { HTTPError } from 'got'; import { defaultMetadata } from './constant'; import { sendSms } from './single-send-text'; -import { aliyunSmsConfigGuard, AliyunSmsConfig, sendSmsResponseGuard } from './types'; +import type { AliyunSmsConfig } from './types'; +import { aliyunSmsConfigGuard, sendSmsResponseGuard } from './types'; const sendMessage = (getConfig: GetConnectorConfig): SendMessageFunction => diff --git a/packages/connector-aliyun-sms/src/single-send-text.ts b/packages/connector-aliyun-sms/src/single-send-text.ts index 8caa3b2d..f394c3bb 100644 --- a/packages/connector-aliyun-sms/src/single-send-text.ts +++ b/packages/connector-aliyun-sms/src/single-send-text.ts @@ -1,5 +1,5 @@ import { endpoint, staticConfigs } from './constant'; -import { PublicParameters, SendSms } from './types'; +import type { PublicParameters, SendSms } from './types'; import { request } from './utils'; /** diff --git a/packages/connector-aliyun-sms/src/utils.ts b/packages/connector-aliyun-sms/src/utils.ts index e31d203c..a1e13f36 100644 --- a/packages/connector-aliyun-sms/src/utils.ts +++ b/packages/connector-aliyun-sms/src/utils.ts @@ -2,7 +2,7 @@ import { createHmac } from 'crypto'; import got from 'got'; -import { PublicParameters } from './types'; +import type { PublicParameters } from './types'; // Aliyun has special escape rules. // https://help.aliyun.com/document_detail/29442.html diff --git a/packages/connector-apple/package.json b/packages/connector-apple/package.json index f281e494..7c24d582 100644 --- a/packages/connector-apple/package.json +++ b/packages/connector-apple/package.json @@ -26,15 +26,15 @@ "dependencies": { "@logto/connector-kit": "^1.0.0-beta.20", "@silverhand/essentials": "^1.2.0", - "@silverhand/jest-config": "1.0.0", + "@silverhand/jest-config": "1.2.2", "got": "^11.8.2", "jose": "^4.3.8", "zod": "^3.14.3" }, "devDependencies": { "@jest/types": "^28.1.3", - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/jest": "^28.1.6", "@types/node": "^16.3.1", "@vercel/ncc": "^0.34.0", diff --git a/packages/connector-apple/src/constant.ts b/packages/connector-apple/src/constant.ts index 3db20095..1a454136 100644 --- a/packages/connector-apple/src/constant.ts +++ b/packages/connector-apple/src/constant.ts @@ -1,4 +1,5 @@ -import { ConnectorMetadata, ConnectorPlatform } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; +import { ConnectorPlatform } from '@logto/connector-kit'; // https://appleid.apple.com/.well-known/openid-configuration export const issuer = 'https://appleid.apple.com'; diff --git a/packages/connector-apple/src/index.ts b/packages/connector-apple/src/index.ts index 77caf584..2a992908 100644 --- a/packages/connector-apple/src/index.ts +++ b/packages/connector-apple/src/index.ts @@ -1,18 +1,21 @@ -import { +import type { GetAuthorizationUri, GetUserInfo, - ConnectorError, - ConnectorErrorCodes, GetConnectorConfig, - validateConfig, CreateConnector, SocialConnector, +} from '@logto/connector-kit'; +import { + ConnectorError, + ConnectorErrorCodes, + validateConfig, ConnectorType, } from '@logto/connector-kit'; import { createRemoteJWKSet, jwtVerify } from 'jose'; import { scope, defaultMetadata, jwksUri, issuer, authorizationEndpoint } from './constant'; -import { appleConfigGuard, AppleConfig, dataGuard } from './types'; +import type { AppleConfig } from './types'; +import { appleConfigGuard, dataGuard } from './types'; // TO-DO: support nonce validation diff --git a/packages/connector-azuread/package.json b/packages/connector-azuread/package.json index 85daceae..bfe90dd9 100644 --- a/packages/connector-azuread/package.json +++ b/packages/connector-azuread/package.json @@ -26,14 +26,14 @@ "@azure/msal-node": "^1.12.0", "@logto/connector-kit": "^1.0.0-beta.20", "@silverhand/essentials": "^1.2.0", - "@silverhand/jest-config": "1.0.0", + "@silverhand/jest-config": "1.2.2", "got": "^11.8.2", "zod": "^3.14.3" }, "devDependencies": { "@jest/types": "^28.1.3", - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/jest": "^28.1.6", "@types/node": "^16.3.1", "@vercel/ncc": "^0.34.0", diff --git a/packages/connector-azuread/src/constant.ts b/packages/connector-azuread/src/constant.ts index b6fe44be..253c0d17 100644 --- a/packages/connector-azuread/src/constant.ts +++ b/packages/connector-azuread/src/constant.ts @@ -1,4 +1,5 @@ -import { ConnectorMetadata, ConnectorPlatform } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; +import { ConnectorPlatform } from '@logto/connector-kit'; export const graphAPIEndpoint = 'https://graph.microsoft.com/v1.0/me'; export const scopes = ['User.Read']; diff --git a/packages/connector-azuread/src/index.test.ts b/packages/connector-azuread/src/index.test.ts index 03d97a74..fcb48699 100644 --- a/packages/connector-azuread/src/index.test.ts +++ b/packages/connector-azuread/src/index.test.ts @@ -1,4 +1,4 @@ -import { GetConnectorConfig } from '@logto/connector-kit'; +import type { GetConnectorConfig } from '@logto/connector-kit'; import createConnector from '.'; diff --git a/packages/connector-azuread/src/index.ts b/packages/connector-azuread/src/index.ts index 94591f7e..9edd30d5 100644 --- a/packages/connector-azuread/src/index.ts +++ b/packages/connector-azuread/src/index.ts @@ -1,20 +1,18 @@ import path from 'path'; -import { - ConfidentialClientApplication, - AuthorizationCodeRequest, - AuthorizationUrlRequest, - CryptoProvider, -} from '@azure/msal-node'; -import { - ConnectorError, - ConnectorErrorCodes, +import type { AuthorizationCodeRequest, AuthorizationUrlRequest } from '@azure/msal-node'; +import { ConfidentialClientApplication, CryptoProvider } from '@azure/msal-node'; +import type { GetAuthorizationUri, GetUserInfo, GetConnectorConfig, - validateConfig, CreateConnector, SocialConnector, +} from '@logto/connector-kit'; +import { + ConnectorError, + ConnectorErrorCodes, + validateConfig, ConnectorType, parseJson, } from '@logto/connector-kit'; @@ -22,9 +20,9 @@ import { assert, conditional } from '@silverhand/essentials'; import got, { HTTPError } from 'got'; import { scopes, defaultMetadata, defaultTimeout, graphAPIEndpoint } from './constant'; +import type { AzureADConfig } from './types'; import { azureADConfigGuard, - AzureADConfig, accessTokenResponseGuard, userInfoResponseGuard, authResponseGuard, diff --git a/packages/connector-discord/package.json b/packages/connector-discord/package.json index 3c1f9e08..1e138cd3 100644 --- a/packages/connector-discord/package.json +++ b/packages/connector-discord/package.json @@ -25,14 +25,14 @@ "dependencies": { "@logto/connector-kit": "^1.0.0-beta.20", "@silverhand/essentials": "^1.2.0", - "@silverhand/jest-config": "1.0.0", + "@silverhand/jest-config": "1.2.2", "got": "^11.8.2", "zod": "^3.14.3" }, "devDependencies": { "@jest/types": "^28.1.3", - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/jest": "^28.1.6", "@types/node": "^16.3.1", "@vercel/ncc": "^0.34.0", diff --git a/packages/connector-discord/src/constant.ts b/packages/connector-discord/src/constant.ts index 9913b40d..0c3f20da 100644 --- a/packages/connector-discord/src/constant.ts +++ b/packages/connector-discord/src/constant.ts @@ -1,4 +1,5 @@ -import { ConnectorMetadata, ConnectorPlatform } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; +import { ConnectorPlatform } from '@logto/connector-kit'; /** * Base authorization URL. diff --git a/packages/connector-discord/src/index.ts b/packages/connector-discord/src/index.ts index 96183556..0ac3e4f4 100644 --- a/packages/connector-discord/src/index.ts +++ b/packages/connector-discord/src/index.ts @@ -3,15 +3,17 @@ * https://discord.com/developers/docs/topics/oauth2 */ -import { +import type { GetConnectorConfig, GetAuthorizationUri, - validateConfig, - ConnectorError, - ConnectorErrorCodes, GetUserInfo, CreateConnector, SocialConnector, +} from '@logto/connector-kit'; +import { + validateConfig, + ConnectorError, + ConnectorErrorCodes, ConnectorType, parseJson, } from '@logto/connector-kit'; @@ -26,8 +28,8 @@ import { defaultTimeout, userInfoEndpoint, } from './constant'; +import type { DiscordConfig } from './types'; import { - DiscordConfig, discordConfigGuard, authResponseGuard, accessTokenResponseGuard, @@ -83,7 +85,6 @@ export const getAccessToken = async ( return { accessToken }; }; -/* eslint-disable complexity */ const getUserInfo = (getConfig: GetConnectorConfig): GetUserInfo => async (data) => { @@ -129,7 +130,6 @@ const getUserInfo = throw error; } }; -/* eslint-enable complexity */ const authorizationCallbackHandler = async (parameterObject: unknown) => { const result = authResponseGuard.safeParse(parameterObject); diff --git a/packages/connector-facebook/package.json b/packages/connector-facebook/package.json index 97189b8c..fefa4f20 100644 --- a/packages/connector-facebook/package.json +++ b/packages/connector-facebook/package.json @@ -25,14 +25,14 @@ "dependencies": { "@logto/connector-kit": "^1.0.0-beta.20", "@silverhand/essentials": "^1.2.0", - "@silverhand/jest-config": "1.0.0", + "@silverhand/jest-config": "1.2.2", "got": "^11.8.2", "zod": "^3.14.3" }, "devDependencies": { "@jest/types": "^28.1.3", - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/jest": "^28.1.6", "@types/node": "^16.3.1", "@vercel/ncc": "^0.34.0", diff --git a/packages/connector-facebook/src/constant.ts b/packages/connector-facebook/src/constant.ts index 11375a9f..5b4030ac 100644 --- a/packages/connector-facebook/src/constant.ts +++ b/packages/connector-facebook/src/constant.ts @@ -1,4 +1,5 @@ -import { ConnectorMetadata, ConnectorPlatform } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; +import { ConnectorPlatform } from '@logto/connector-kit'; /** * Note: If you do not include a version number we will default to the oldest available version, so it's recommended to include the version number in your requests. diff --git a/packages/connector-facebook/src/index.ts b/packages/connector-facebook/src/index.ts index c320cff8..8063d571 100644 --- a/packages/connector-facebook/src/index.ts +++ b/packages/connector-facebook/src/index.ts @@ -3,14 +3,16 @@ * https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow */ -import { - ConnectorError, - ConnectorErrorCodes, +import type { CreateConnector, SocialConnector, GetAuthorizationUri, GetUserInfo, GetConnectorConfig, +} from '@logto/connector-kit'; +import { + ConnectorError, + ConnectorErrorCodes, validateConfig, ConnectorType, parseJson, @@ -26,11 +28,11 @@ import { defaultMetadata, defaultTimeout, } from './constant'; +import type { FacebookConfig } from './types'; import { authorizationCallbackErrorGuard, facebookConfigGuard, accessTokenResponseGuard, - FacebookConfig, userInfoResponseGuard, authResponseGuard, } from './types'; diff --git a/packages/connector-github/package.json b/packages/connector-github/package.json index c759cd4c..29d23143 100644 --- a/packages/connector-github/package.json +++ b/packages/connector-github/package.json @@ -26,15 +26,15 @@ "dependencies": { "@logto/connector-kit": "^1.0.0-beta.20", "@silverhand/essentials": "^1.2.0", - "@silverhand/jest-config": "1.0.0", + "@silverhand/jest-config": "1.2.2", "got": "^11.8.2", "query-string": "^7.0.1", "zod": "^3.14.3" }, "devDependencies": { "@jest/types": "^28.1.3", - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/jest": "^28.1.6", "@types/node": "^16.3.1", "@vercel/ncc": "^0.34.0", diff --git a/packages/connector-github/src/constant.ts b/packages/connector-github/src/constant.ts index 8c5b2d26..a51fca46 100644 --- a/packages/connector-github/src/constant.ts +++ b/packages/connector-github/src/constant.ts @@ -1,4 +1,5 @@ -import { ConnectorMetadata, ConnectorPlatform } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; +import { ConnectorPlatform } from '@logto/connector-kit'; export const authorizationEndpoint = 'https://github.com/login/oauth/authorize'; export const scope = 'read:user'; diff --git a/packages/connector-github/src/index.ts b/packages/connector-github/src/index.ts index 5fc85914..64c38cb2 100644 --- a/packages/connector-github/src/index.ts +++ b/packages/connector-github/src/index.ts @@ -1,11 +1,13 @@ -import { +import type { GetAuthorizationUri, GetUserInfo, - ConnectorError, - ConnectorErrorCodes, SocialConnector, CreateConnector, GetConnectorConfig, +} from '@logto/connector-kit'; +import { + ConnectorError, + ConnectorErrorCodes, validateConfig, ConnectorType, parseJson, @@ -22,11 +24,11 @@ import { defaultMetadata, defaultTimeout, } from './constant'; +import type { GithubConfig } from './types'; import { authorizationCallbackErrorGuard, githubConfigGuard, accessTokenResponseGuard, - GithubConfig, userInfoResponseGuard, authResponseGuard, } from './types'; diff --git a/packages/connector-google/package.json b/packages/connector-google/package.json index 23431e2f..7fa32450 100644 --- a/packages/connector-google/package.json +++ b/packages/connector-google/package.json @@ -25,14 +25,14 @@ "dependencies": { "@logto/connector-kit": "^1.0.0-beta.20", "@silverhand/essentials": "^1.2.0", - "@silverhand/jest-config": "1.0.0", + "@silverhand/jest-config": "1.2.2", "got": "^11.8.2", "zod": "^3.14.3" }, "devDependencies": { "@jest/types": "^28.1.3", - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/jest": "^28.1.6", "@types/node": "^16.3.1", "@vercel/ncc": "^0.34.0", diff --git a/packages/connector-google/src/constant.ts b/packages/connector-google/src/constant.ts index baec27a2..37eff09b 100644 --- a/packages/connector-google/src/constant.ts +++ b/packages/connector-google/src/constant.ts @@ -1,4 +1,5 @@ -import { ConnectorMetadata, ConnectorPlatform } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; +import { ConnectorPlatform } from '@logto/connector-kit'; export const authorizationEndpoint = 'https://accounts.google.com/o/oauth2/v2/auth'; export const accessTokenEndpoint = 'https://oauth2.googleapis.com/token'; diff --git a/packages/connector-google/src/index.ts b/packages/connector-google/src/index.ts index 0cc1c3ee..9db0d7b4 100644 --- a/packages/connector-google/src/index.ts +++ b/packages/connector-google/src/index.ts @@ -2,15 +2,17 @@ * The Implementation of OpenID Connect of Google Identity Platform. * https://developers.google.com/identity/protocols/oauth2/openid-connect */ -import { - ConnectorError, - ConnectorErrorCodes, +import type { GetAuthorizationUri, GetUserInfo, GetConnectorConfig, - validateConfig, CreateConnector, SocialConnector, +} from '@logto/connector-kit'; +import { + ConnectorError, + ConnectorErrorCodes, + validateConfig, ConnectorType, parseJson, } from '@logto/connector-kit'; @@ -25,9 +27,9 @@ import { defaultMetadata, defaultTimeout, } from './constant'; +import type { GoogleConfig } from './types'; import { googleConfigGuard, - GoogleConfig, accessTokenResponseGuard, userInfoResponseGuard, authResponseGuard, diff --git a/packages/connector-kakao/package.json b/packages/connector-kakao/package.json index b4019158..6de4bf89 100644 --- a/packages/connector-kakao/package.json +++ b/packages/connector-kakao/package.json @@ -25,14 +25,14 @@ "dependencies": { "@logto/connector-kit": "^1.0.0-beta.20", "@silverhand/essentials": "^1.2.0", - "@silverhand/jest-config": "1.0.0", + "@silverhand/jest-config": "1.2.2", "got": "^11.8.2", "zod": "^3.14.3" }, "devDependencies": { "@jest/types": "^28.1.3", - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/jest": "^28.1.6", "@types/node": "^16.3.1", "@vercel/ncc": "^0.34.0", diff --git a/packages/connector-kakao/src/constant.ts b/packages/connector-kakao/src/constant.ts index dcffb7b0..7c1bb29c 100644 --- a/packages/connector-kakao/src/constant.ts +++ b/packages/connector-kakao/src/constant.ts @@ -1,4 +1,5 @@ -import { ConnectorMetadata, ConnectorPlatform } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; +import { ConnectorPlatform } from '@logto/connector-kit'; export const authorizationEndpoint = 'https://kauth.kakao.com/oauth/authorize'; export const accessTokenEndpoint = 'https://kauth.kakao.com/oauth/token'; diff --git a/packages/connector-kakao/src/index.ts b/packages/connector-kakao/src/index.ts index f5b12b65..8b3810bb 100644 --- a/packages/connector-kakao/src/index.ts +++ b/packages/connector-kakao/src/index.ts @@ -2,15 +2,17 @@ * The Implementation of OpenID Connect of Kakao. * https://developers.kakao.com/docs/latest/en/kakaologin/rest-api */ -import { - ConnectorError, - ConnectorErrorCodes, - ConnectorType, +import type { CreateConnector, GetAuthorizationUri, GetConnectorConfig, GetUserInfo, SocialConnector, +} from '@logto/connector-kit'; +import { + ConnectorError, + ConnectorErrorCodes, + ConnectorType, validateConfig, parseJson, } from '@logto/connector-kit'; @@ -24,10 +26,10 @@ import { defaultTimeout, userInfoEndpoint, } from './constant'; +import type { KakaoConfig } from './types'; import { accessTokenResponseGuard, authResponseGuard, - KakaoConfig, kakaoConfigGuard, userInfoResponseGuard, } from './types'; @@ -83,7 +85,6 @@ export const getAccessToken = async ( const getUserInfo = (getConfig: GetConnectorConfig): GetUserInfo => - // eslint-disable-next-line complexity async (data) => { const { code, redirectUri } = await authorizationCallbackHandler(data); const config = await getConfig(defaultMetadata.id); diff --git a/packages/connector-mock-email/package.json b/packages/connector-mock-email/package.json index ec8fa5d1..11035d03 100644 --- a/packages/connector-mock-email/package.json +++ b/packages/connector-mock-email/package.json @@ -26,8 +26,8 @@ "zod": "^3.14.3" }, "devDependencies": { - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/node": "^16.3.1", "@vercel/ncc": "^0.34.0", "eslint": "^8.21.0", diff --git a/packages/connector-mock-email/src/constant.ts b/packages/connector-mock-email/src/constant.ts index 435a1f70..fcdaf6b8 100644 --- a/packages/connector-mock-email/src/constant.ts +++ b/packages/connector-mock-email/src/constant.ts @@ -1,4 +1,4 @@ -import { ConnectorMetadata } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; export const defaultMetadata: ConnectorMetadata = { id: 'mock-email-service', diff --git a/packages/connector-mock-email/src/index.ts b/packages/connector-mock-email/src/index.ts index fbd2a4f5..87a59ce9 100644 --- a/packages/connector-mock-email/src/index.ts +++ b/packages/connector-mock-email/src/index.ts @@ -1,20 +1,23 @@ import fs from 'fs/promises'; import path from 'path'; -import { - ConnectorError, - ConnectorErrorCodes, +import type { GetConnectorConfig, SendMessageFunction, CreateConnector, EmailConnector, +} from '@logto/connector-kit'; +import { + ConnectorError, + ConnectorErrorCodes, validateConfig, ConnectorType, } from '@logto/connector-kit'; import { assert } from '@silverhand/essentials'; import { defaultMetadata } from './constant'; -import { mockMailConfigGuard, MockMailConfig } from './types'; +import type { MockMailConfig } from './types'; +import { mockMailConfigGuard } from './types'; const sendMessage = (getConfig: GetConnectorConfig): SendMessageFunction => diff --git a/packages/connector-mock-sms/package.json b/packages/connector-mock-sms/package.json index 92dc5bdf..b9978c2f 100644 --- a/packages/connector-mock-sms/package.json +++ b/packages/connector-mock-sms/package.json @@ -26,8 +26,8 @@ "zod": "^3.14.3" }, "devDependencies": { - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/node": "^16.3.1", "@vercel/ncc": "^0.34.0", "eslint": "^8.21.0", diff --git a/packages/connector-mock-sms/src/constant.ts b/packages/connector-mock-sms/src/constant.ts index 731fb637..d0dfaf4d 100644 --- a/packages/connector-mock-sms/src/constant.ts +++ b/packages/connector-mock-sms/src/constant.ts @@ -1,4 +1,4 @@ -import { ConnectorMetadata } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; export const defaultMetadata: ConnectorMetadata = { id: 'mock-short-message-service', diff --git a/packages/connector-mock-sms/src/index.ts b/packages/connector-mock-sms/src/index.ts index 62f5ab58..a32d4618 100644 --- a/packages/connector-mock-sms/src/index.ts +++ b/packages/connector-mock-sms/src/index.ts @@ -1,20 +1,23 @@ import fs from 'fs/promises'; import path from 'path'; -import { - ConnectorError, - ConnectorErrorCodes, +import type { GetConnectorConfig, SendMessageFunction, - validateConfig, CreateConnector, SmsConnector, +} from '@logto/connector-kit'; +import { + ConnectorError, + ConnectorErrorCodes, + validateConfig, ConnectorType, } from '@logto/connector-kit'; import { assert } from '@silverhand/essentials'; import { defaultMetadata } from './constant'; -import { mockSmsConfigGuard, MockSmsConfig } from './types'; +import type { MockSmsConfig } from './types'; +import { mockSmsConfigGuard } from './types'; const sendMessage = (getConfig: GetConnectorConfig): SendMessageFunction => diff --git a/packages/connector-mock-social/package.json b/packages/connector-mock-social/package.json index 43e4302d..9b9fd1e2 100644 --- a/packages/connector-mock-social/package.json +++ b/packages/connector-mock-social/package.json @@ -26,8 +26,8 @@ "zod": "^3.14.3" }, "devDependencies": { - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/node": "^16.3.1", "@vercel/ncc": "^0.34.0", "eslint": "^8.21.0", diff --git a/packages/connector-mock-social/src/constant.ts b/packages/connector-mock-social/src/constant.ts index 48c52ee7..51669dec 100644 --- a/packages/connector-mock-social/src/constant.ts +++ b/packages/connector-mock-social/src/constant.ts @@ -1,4 +1,5 @@ -import { ConnectorMetadata, ConnectorPlatform } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; +import { ConnectorPlatform } from '@logto/connector-kit'; export const defaultMetadata: ConnectorMetadata = { id: 'mock-social-connector', diff --git a/packages/connector-mock-social/src/index.ts b/packages/connector-mock-social/src/index.ts index 68bd27e4..d2cdfd6d 100644 --- a/packages/connector-mock-social/src/index.ts +++ b/packages/connector-mock-social/src/index.ts @@ -1,14 +1,12 @@ import { randomUUID } from 'crypto'; -import { - ConnectorError, - ConnectorErrorCodes, +import type { GetAuthorizationUri, GetUserInfo, CreateConnector, SocialConnector, - ConnectorType, } from '@logto/connector-kit'; +import { ConnectorError, ConnectorErrorCodes, ConnectorType } from '@logto/connector-kit'; import { z } from 'zod'; import { defaultMetadata } from './constant'; diff --git a/packages/connector-naver/package.json b/packages/connector-naver/package.json index 4f69df37..ca942d14 100644 --- a/packages/connector-naver/package.json +++ b/packages/connector-naver/package.json @@ -25,14 +25,14 @@ "dependencies": { "@logto/connector-kit": "^1.0.0-beta.20", "@silverhand/essentials": "^1.2.0", - "@silverhand/jest-config": "1.0.0", + "@silverhand/jest-config": "1.2.2", "got": "^11.8.2", "zod": "^3.14.3" }, "devDependencies": { "@jest/types": "^28.1.3", - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/jest": "^28.1.6", "@types/node": "^16.3.1", "@vercel/ncc": "^0.34.0", diff --git a/packages/connector-naver/src/constant.ts b/packages/connector-naver/src/constant.ts index 926cf566..09335496 100644 --- a/packages/connector-naver/src/constant.ts +++ b/packages/connector-naver/src/constant.ts @@ -1,4 +1,5 @@ -import { ConnectorMetadata, ConnectorPlatform } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; +import { ConnectorPlatform } from '@logto/connector-kit'; export const authorizationEndpoint = 'https://nid.naver.com/oauth2.0/authorize'; export const accessTokenEndpoint = 'https://nid.naver.com/oauth2.0/token'; diff --git a/packages/connector-naver/src/index.ts b/packages/connector-naver/src/index.ts index 99cd45df..07e097ad 100644 --- a/packages/connector-naver/src/index.ts +++ b/packages/connector-naver/src/index.ts @@ -2,15 +2,17 @@ * The Implementation of OAuth2 of Naver. * https://developers.naver.com/docs/login/api/api.md */ -import { - ConnectorError, - ConnectorErrorCodes, - ConnectorType, +import type { CreateConnector, GetAuthorizationUri, GetConnectorConfig, GetUserInfo, SocialConnector, +} from '@logto/connector-kit'; +import { + ConnectorError, + ConnectorErrorCodes, + ConnectorType, validateConfig, parseJson, } from '@logto/connector-kit'; @@ -24,10 +26,10 @@ import { defaultTimeout, userInfoEndpoint, } from './constant'; +import type { NaverConfig } from './types'; import { accessTokenResponseGuard, authResponseGuard, - NaverConfig, naverConfigGuard, userInfoResponseGuard, } from './types'; diff --git a/packages/connector-sendgrid-email/package.json b/packages/connector-sendgrid-email/package.json index 3f98c0d8..ebb9e15b 100644 --- a/packages/connector-sendgrid-email/package.json +++ b/packages/connector-sendgrid-email/package.json @@ -25,14 +25,14 @@ "dependencies": { "@logto/connector-kit": "^1.0.0-beta.20", "@silverhand/essentials": "^1.2.0", - "@silverhand/jest-config": "1.0.0", + "@silverhand/jest-config": "1.2.2", "got": "^11.8.2", "zod": "^3.14.3" }, "devDependencies": { "@jest/types": "^28.1.3", - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/jest": "^28.1.6", "@types/node": "^16.3.1", "@vercel/ncc": "^0.34.0", diff --git a/packages/connector-sendgrid-email/src/constant.ts b/packages/connector-sendgrid-email/src/constant.ts index 596c2113..05c2277a 100644 --- a/packages/connector-sendgrid-email/src/constant.ts +++ b/packages/connector-sendgrid-email/src/constant.ts @@ -1,4 +1,4 @@ -import { ConnectorMetadata } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; export const endpoint = 'https://api.sendgrid.com/v3/mail/send'; diff --git a/packages/connector-sendgrid-email/src/index.ts b/packages/connector-sendgrid-email/src/index.ts index 1a3233b9..fbb350c5 100644 --- a/packages/connector-sendgrid-email/src/index.ts +++ b/packages/connector-sendgrid-email/src/index.ts @@ -1,29 +1,30 @@ -import { - ConnectorError, - ConnectorErrorCodes, +import type { GetConnectorConfig, SendMessageFunction, - validateConfig, CreateConnector, EmailConnector, +} from '@logto/connector-kit'; +import { + ConnectorError, + ConnectorErrorCodes, + validateConfig, ConnectorType, } from '@logto/connector-kit'; import { assert } from '@silverhand/essentials'; import got, { HTTPError } from 'got'; import { defaultMetadata, endpoint } from './constant'; -import { - sendGridMailConfigGuard, +import type { SendGridMailConfig, EmailData, Personalization, Content, PublicParameters, } from './types'; +import { sendGridMailConfigGuard } from './types'; const sendMessage = (getConfig: GetConnectorConfig): SendMessageFunction => - // eslint-disable-next-line complexity async (data, inputConfig) => { const { to, type, payload } = data; const config = inputConfig ?? (await getConfig(defaultMetadata.id)); diff --git a/packages/connector-sendgrid-email/src/mock.ts b/packages/connector-sendgrid-email/src/mock.ts index dfe68e78..a619339c 100644 --- a/packages/connector-sendgrid-email/src/mock.ts +++ b/packages/connector-sendgrid-email/src/mock.ts @@ -1,11 +1,11 @@ -import { +import type { Content, - ContextType, EmailData, Personalization, PublicParameters, SendGridMailConfig, } from './types'; +import { ContextType } from './types'; const receivers: EmailData[] = [{ email: 'foo@logto.io' }]; const sender: EmailData = { email: 'noreply@logto.test.io', name: 'Logto Test' }; diff --git a/packages/connector-smtp/package.json b/packages/connector-smtp/package.json index 32b1c42a..0e4fe381 100644 --- a/packages/connector-smtp/package.json +++ b/packages/connector-smtp/package.json @@ -26,14 +26,14 @@ "@logto/connector-kit": "^1.0.0-beta.20", "@logto/shared": "^1.0.0-beta.8", "@silverhand/essentials": "^1.2.0", - "@silverhand/jest-config": "1.0.0", + "@silverhand/jest-config": "1.2.2", "nodemailer": "^6.7.5", "zod": "^3.14.3" }, "devDependencies": { "@jest/types": "^28.1.3", - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/jest": "^28.1.6", "@types/node": "^16.3.1", "@types/nodemailer": "^6.4.4", diff --git a/packages/connector-smtp/src/constant.ts b/packages/connector-smtp/src/constant.ts index daa0c3c1..de1df229 100644 --- a/packages/connector-smtp/src/constant.ts +++ b/packages/connector-smtp/src/constant.ts @@ -1,4 +1,4 @@ -import { ConnectorMetadata } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; export const defaultMetadata: ConnectorMetadata = { id: 'simple-mail-transfer-protocol', diff --git a/packages/connector-smtp/src/index.ts b/packages/connector-smtp/src/index.ts index 2b2bcbfd..a387e970 100644 --- a/packages/connector-smtp/src/index.ts +++ b/packages/connector-smtp/src/index.ts @@ -1,19 +1,22 @@ -import { - ConnectorError, - ConnectorErrorCodes, +import type { GetConnectorConfig, CreateConnector, EmailConnector, SendMessageFunction, +} from '@logto/connector-kit'; +import { + ConnectorError, + ConnectorErrorCodes, validateConfig, ConnectorType, } from '@logto/connector-kit'; import { assert } from '@silverhand/essentials'; import nodemailer from 'nodemailer'; -import SMTPTransport from 'nodemailer/lib/smtp-transport'; +import type SMTPTransport from 'nodemailer/lib/smtp-transport'; import { defaultMetadata } from './constant'; -import { ContextType, smtpConfigGuard, SmtpConfig } from './types'; +import type { SmtpConfig } from './types'; +import { ContextType, smtpConfigGuard } from './types'; const sendMessage = (getConfig: GetConnectorConfig): SendMessageFunction => diff --git a/packages/connector-twilio-sms/package.json b/packages/connector-twilio-sms/package.json index 2ba8f84c..0b86455c 100644 --- a/packages/connector-twilio-sms/package.json +++ b/packages/connector-twilio-sms/package.json @@ -25,14 +25,14 @@ "dependencies": { "@logto/connector-kit": "^1.0.0-beta.20", "@silverhand/essentials": "^1.2.0", - "@silverhand/jest-config": "1.0.0", + "@silverhand/jest-config": "1.2.2", "got": "^11.8.2", "zod": "^3.14.3" }, "devDependencies": { "@jest/types": "^28.1.3", - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/jest": "^28.1.6", "@types/node": "^16.3.1", "@vercel/ncc": "^0.34.0", diff --git a/packages/connector-twilio-sms/src/constant.ts b/packages/connector-twilio-sms/src/constant.ts index 4fc1e9e8..39c51986 100644 --- a/packages/connector-twilio-sms/src/constant.ts +++ b/packages/connector-twilio-sms/src/constant.ts @@ -1,4 +1,4 @@ -import { ConnectorMetadata } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; export const endpoint = 'https://api.twilio.com/2010-04-01/Accounts/{{accountSID}}/Messages.json'; diff --git a/packages/connector-twilio-sms/src/index.ts b/packages/connector-twilio-sms/src/index.ts index 2f935864..f839d716 100644 --- a/packages/connector-twilio-sms/src/index.ts +++ b/packages/connector-twilio-sms/src/index.ts @@ -1,18 +1,21 @@ -import { - ConnectorError, - ConnectorErrorCodes, +import type { GetConnectorConfig, SendMessageFunction, - validateConfig, CreateConnector, SmsConnector, +} from '@logto/connector-kit'; +import { + ConnectorError, + ConnectorErrorCodes, + validateConfig, ConnectorType, } from '@logto/connector-kit'; import { assert } from '@silverhand/essentials'; import got, { HTTPError } from 'got'; import { defaultMetadata, endpoint } from './constant'; -import { twilioSmsConfigGuard, TwilioSmsConfig, PublicParameters } from './types'; +import type { TwilioSmsConfig, PublicParameters } from './types'; +import { twilioSmsConfigGuard } from './types'; const sendMessage = (getConfig: GetConnectorConfig): SendMessageFunction => diff --git a/packages/connector-twilio-sms/src/mock.ts b/packages/connector-twilio-sms/src/mock.ts index f008ff8e..a2e159e4 100644 --- a/packages/connector-twilio-sms/src/mock.ts +++ b/packages/connector-twilio-sms/src/mock.ts @@ -1,4 +1,4 @@ -import { TwilioSmsConfig } from './types'; +import type { TwilioSmsConfig } from './types'; const mockedAccountSID = 'account-sid'; const mockedAuthToken = 'auth-token'; diff --git a/packages/connector-twilio-sms/src/types.ts b/packages/connector-twilio-sms/src/types.ts index 162382ba..cf1096aa 100644 --- a/packages/connector-twilio-sms/src/types.ts +++ b/packages/connector-twilio-sms/src/types.ts @@ -1,4 +1,4 @@ -import { Nullable } from '@silverhand/essentials'; +import type { Nullable } from '@silverhand/essentials'; import { z } from 'zod'; /** diff --git a/packages/connector-wechat-native/package.json b/packages/connector-wechat-native/package.json index d180430b..5b0f899b 100644 --- a/packages/connector-wechat-native/package.json +++ b/packages/connector-wechat-native/package.json @@ -25,14 +25,14 @@ "dependencies": { "@logto/connector-kit": "^1.0.0-beta.20", "@silverhand/essentials": "^1.2.0", - "@silverhand/jest-config": "1.0.0", + "@silverhand/jest-config": "1.2.2", "got": "^11.8.2", "zod": "^3.14.3" }, "devDependencies": { "@jest/types": "^28.1.3", - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/jest": "^28.1.6", "@types/node": "^16.3.1", "@vercel/ncc": "^0.34.0", diff --git a/packages/connector-wechat-native/src/constant.ts b/packages/connector-wechat-native/src/constant.ts index 1f310722..1fe22f6c 100644 --- a/packages/connector-wechat-native/src/constant.ts +++ b/packages/connector-wechat-native/src/constant.ts @@ -1,4 +1,5 @@ -import { ConnectorMetadata, ConnectorPlatform } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; +import { ConnectorPlatform } from '@logto/connector-kit'; export const authorizationEndpoint = 'wechat://'; // This is used to arouse the native WeChat App export const accessTokenEndpoint = 'https://api.weixin.qq.com/sns/oauth2/access_token'; diff --git a/packages/connector-wechat-native/src/index.ts b/packages/connector-wechat-native/src/index.ts index 628e16d9..1e0c086e 100644 --- a/packages/connector-wechat-native/src/index.ts +++ b/packages/connector-wechat-native/src/index.ts @@ -3,15 +3,17 @@ * https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Wechat_Login.html */ -import { +import type { GetAuthorizationUri, GetUserInfo, - ConnectorError, - ConnectorErrorCodes, GetConnectorConfig, - validateConfig, CreateConnector, SocialConnector, +} from '@logto/connector-kit'; +import { + ConnectorError, + ConnectorErrorCodes, + validateConfig, ConnectorType, parseJson, } from '@logto/connector-kit'; @@ -27,13 +29,15 @@ import { invalidAccessTokenErrcode, invalidAuthCodeErrcode, } from './constant'; +import type { + GetAccessTokenErrorHandler, + UserInfoResponseMessageParser, + WechatNativeConfig, +} from './types'; import { wechatNativeConfigGuard, accessTokenResponseGuard, - GetAccessTokenErrorHandler, userInfoResponseGuard, - UserInfoResponseMessageParser, - WechatNativeConfig, authResponseGuard, } from './types'; diff --git a/packages/connector-wechat-web/package.json b/packages/connector-wechat-web/package.json index 19f80e54..b389ec1b 100644 --- a/packages/connector-wechat-web/package.json +++ b/packages/connector-wechat-web/package.json @@ -25,14 +25,14 @@ "dependencies": { "@logto/connector-kit": "^1.0.0-beta.20", "@silverhand/essentials": "^1.2.0", - "@silverhand/jest-config": "1.0.0", + "@silverhand/jest-config": "1.2.2", "got": "^11.8.2", "zod": "^3.14.3" }, "devDependencies": { "@jest/types": "^28.1.3", - "@silverhand/eslint-config": "1.0.0", - "@silverhand/ts-config": "1.0.0", + "@silverhand/eslint-config": "1.3.0", + "@silverhand/ts-config": "1.2.1", "@types/jest": "^28.1.6", "@types/node": "^16.3.1", "@vercel/ncc": "^0.34.0", diff --git a/packages/connector-wechat-web/src/constant.ts b/packages/connector-wechat-web/src/constant.ts index a4157a00..893f3983 100644 --- a/packages/connector-wechat-web/src/constant.ts +++ b/packages/connector-wechat-web/src/constant.ts @@ -1,4 +1,5 @@ -import { ConnectorMetadata, ConnectorPlatform } from '@logto/connector-kit'; +import type { ConnectorMetadata } from '@logto/connector-kit'; +import { ConnectorPlatform } from '@logto/connector-kit'; export const authorizationEndpoint = 'https://open.weixin.qq.com/connect/qrconnect'; export const accessTokenEndpoint = 'https://api.weixin.qq.com/sns/oauth2/access_token'; diff --git a/packages/connector-wechat-web/src/index.ts b/packages/connector-wechat-web/src/index.ts index 87fae1d4..2560dcb1 100644 --- a/packages/connector-wechat-web/src/index.ts +++ b/packages/connector-wechat-web/src/index.ts @@ -3,15 +3,17 @@ * https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Wechat_Login.html */ -import { +import type { GetAuthorizationUri, GetUserInfo, - ConnectorError, - ConnectorErrorCodes, GetConnectorConfig, - validateConfig, CreateConnector, SocialConnector, +} from '@logto/connector-kit'; +import { + ConnectorError, + ConnectorErrorCodes, + validateConfig, ConnectorType, parseJson, } from '@logto/connector-kit'; @@ -28,13 +30,15 @@ import { invalidAccessTokenErrcode, invalidAuthCodeErrcode, } from './constant'; +import type { + GetAccessTokenErrorHandler, + UserInfoResponseMessageParser, + WechatConfig, +} from './types'; import { wechatConfigGuard, accessTokenResponseGuard, - GetAccessTokenErrorHandler, userInfoResponseGuard, - UserInfoResponseMessageParser, - WechatConfig, authResponseGuard, } from './types'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 840c9b79..aa241e04 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,10 +27,10 @@ importers: '@jest/types': ^28.1.3 '@logto/connector-kit': ^1.0.0-beta.20 '@shopify/jest-koa-mocks': ^5.0.0 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/jest-config': 1.0.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/jest-config': 1.2.2 + '@silverhand/ts-config': 1.2.1 '@types/jest': ^28.1.6 '@types/lodash.pick': ^4.4.6 '@types/node': ^16.3.1 @@ -52,7 +52,7 @@ importers: dependencies: '@logto/connector-kit': 1.0.0-beta.20 '@silverhand/essentials': 1.2.0 - '@silverhand/jest-config': 1.0.0_556mfp7b5dutuj2jcrj5i7zc5q + '@silverhand/jest-config': 1.2.2_556mfp7b5dutuj2jcrj5i7zc5q dayjs: 1.11.5 got: 11.8.5 iconv-lite: 0.6.3 @@ -61,8 +61,8 @@ importers: devDependencies: '@jest/types': 28.1.3 '@shopify/jest-koa-mocks': 5.0.1 - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/jest': 28.1.8 '@types/lodash.pick': 4.4.7 '@types/node': 16.11.56 @@ -83,10 +83,10 @@ importers: '@logto/connector-kit': ^1.0.0-beta.20 '@logto/core-kit': 1.0.0-beta.20 '@shopify/jest-koa-mocks': ^5.0.0 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/jest-config': 1.0.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/jest-config': 1.2.2 + '@silverhand/ts-config': 1.2.1 '@types/jest': ^28.1.6 '@types/lodash.pick': ^4.4.6 '@types/node': ^16.3.1 @@ -109,7 +109,7 @@ importers: '@logto/connector-kit': 1.0.0-beta.20 '@logto/core-kit': 1.0.0-beta.20 '@silverhand/essentials': 1.2.0 - '@silverhand/jest-config': 1.0.0_556mfp7b5dutuj2jcrj5i7zc5q + '@silverhand/jest-config': 1.2.2_556mfp7b5dutuj2jcrj5i7zc5q dayjs: 1.11.5 got: 11.8.5 iconv-lite: 0.6.3 @@ -118,8 +118,8 @@ importers: devDependencies: '@jest/types': 28.1.3 '@shopify/jest-koa-mocks': 5.0.1 - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/jest': 28.1.8 '@types/lodash.pick': 4.4.7 '@types/node': 16.11.56 @@ -138,10 +138,10 @@ importers: specifiers: '@jest/types': ^28.1.3 '@logto/connector-kit': ^1.0.0-beta.20 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/jest-config': 1.0.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/jest-config': 1.2.2 + '@silverhand/ts-config': 1.2.1 '@types/jest': ^28.1.6 '@types/node': ^16.3.1 '@vercel/ncc': ^0.34.0 @@ -155,13 +155,13 @@ importers: dependencies: '@logto/connector-kit': 1.0.0-beta.20 '@silverhand/essentials': 1.2.0 - '@silverhand/jest-config': 1.0.0_556mfp7b5dutuj2jcrj5i7zc5q + '@silverhand/jest-config': 1.2.2_556mfp7b5dutuj2jcrj5i7zc5q got: 11.8.5 zod: 3.18.0 devDependencies: '@jest/types': 28.1.3 - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/jest': 28.1.8 '@types/node': 16.11.56 '@vercel/ncc': 0.34.0 @@ -175,10 +175,10 @@ importers: specifiers: '@jest/types': ^28.1.3 '@logto/connector-kit': ^1.0.0-beta.20 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/jest-config': 1.0.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/jest-config': 1.2.2 + '@silverhand/ts-config': 1.2.1 '@types/jest': ^28.1.6 '@types/node': ^16.3.1 '@vercel/ncc': ^0.34.0 @@ -192,13 +192,13 @@ importers: dependencies: '@logto/connector-kit': 1.0.0-beta.20 '@silverhand/essentials': 1.2.0 - '@silverhand/jest-config': 1.0.0_556mfp7b5dutuj2jcrj5i7zc5q + '@silverhand/jest-config': 1.2.2_556mfp7b5dutuj2jcrj5i7zc5q got: 11.8.5 zod: 3.18.0 devDependencies: '@jest/types': 28.1.3 - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/jest': 28.1.8 '@types/node': 16.11.56 '@vercel/ncc': 0.34.0 @@ -212,10 +212,10 @@ importers: specifiers: '@jest/types': ^28.1.3 '@logto/connector-kit': ^1.0.0-beta.20 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/jest-config': 1.0.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/jest-config': 1.2.2 + '@silverhand/ts-config': 1.2.1 '@types/jest': ^28.1.6 '@types/node': ^16.3.1 '@vercel/ncc': ^0.34.0 @@ -232,14 +232,14 @@ importers: dependencies: '@logto/connector-kit': 1.0.0-beta.20 '@silverhand/essentials': 1.2.0 - '@silverhand/jest-config': 1.0.0_556mfp7b5dutuj2jcrj5i7zc5q + '@silverhand/jest-config': 1.2.2_556mfp7b5dutuj2jcrj5i7zc5q got: 11.8.5 jose: 4.9.2 zod: 3.18.0 devDependencies: '@jest/types': 28.1.3 - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/jest': 28.1.8 '@types/node': 16.11.56 '@vercel/ncc': 0.34.0 @@ -256,10 +256,10 @@ importers: '@azure/msal-node': ^1.12.0 '@jest/types': ^28.1.3 '@logto/connector-kit': ^1.0.0-beta.20 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/jest-config': 1.0.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/jest-config': 1.2.2 + '@silverhand/ts-config': 1.2.1 '@types/jest': ^28.1.6 '@types/node': ^16.3.1 '@vercel/ncc': ^0.34.0 @@ -276,13 +276,13 @@ importers: '@azure/msal-node': 1.12.1 '@logto/connector-kit': 1.0.0-beta.20 '@silverhand/essentials': 1.2.0 - '@silverhand/jest-config': 1.0.0_556mfp7b5dutuj2jcrj5i7zc5q + '@silverhand/jest-config': 1.2.2_556mfp7b5dutuj2jcrj5i7zc5q got: 11.8.5 zod: 3.18.0 devDependencies: '@jest/types': 28.1.3 - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/jest': 28.1.8 '@types/node': 16.11.56 '@vercel/ncc': 0.34.0 @@ -298,10 +298,10 @@ importers: specifiers: '@jest/types': ^28.1.3 '@logto/connector-kit': ^1.0.0-beta.20 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/jest-config': 1.0.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/jest-config': 1.2.2 + '@silverhand/ts-config': 1.2.1 '@types/jest': ^28.1.6 '@types/node': ^16.3.1 '@vercel/ncc': ^0.34.0 @@ -317,13 +317,13 @@ importers: dependencies: '@logto/connector-kit': 1.0.0-beta.20 '@silverhand/essentials': 1.2.0 - '@silverhand/jest-config': 1.0.0_556mfp7b5dutuj2jcrj5i7zc5q + '@silverhand/jest-config': 1.2.2_556mfp7b5dutuj2jcrj5i7zc5q got: 11.8.5 zod: 3.18.0 devDependencies: '@jest/types': 28.1.3 - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/jest': 28.1.8 '@types/node': 16.11.56 '@vercel/ncc': 0.34.0 @@ -339,10 +339,10 @@ importers: specifiers: '@jest/types': ^28.1.3 '@logto/connector-kit': ^1.0.0-beta.20 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/jest-config': 1.0.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/jest-config': 1.2.2 + '@silverhand/ts-config': 1.2.1 '@types/jest': ^28.1.6 '@types/node': ^16.3.1 '@vercel/ncc': ^0.34.0 @@ -358,13 +358,13 @@ importers: dependencies: '@logto/connector-kit': 1.0.0-beta.20 '@silverhand/essentials': 1.2.0 - '@silverhand/jest-config': 1.0.0_556mfp7b5dutuj2jcrj5i7zc5q + '@silverhand/jest-config': 1.2.2_556mfp7b5dutuj2jcrj5i7zc5q got: 11.8.5 zod: 3.18.0 devDependencies: '@jest/types': 28.1.3 - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/jest': 28.1.8 '@types/node': 16.11.56 '@vercel/ncc': 0.34.0 @@ -380,10 +380,10 @@ importers: specifiers: '@jest/types': ^28.1.3 '@logto/connector-kit': ^1.0.0-beta.20 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/jest-config': 1.0.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/jest-config': 1.2.2 + '@silverhand/ts-config': 1.2.1 '@types/jest': ^28.1.6 '@types/node': ^16.3.1 '@vercel/ncc': ^0.34.0 @@ -400,14 +400,14 @@ importers: dependencies: '@logto/connector-kit': 1.0.0-beta.20 '@silverhand/essentials': 1.2.0 - '@silverhand/jest-config': 1.0.0_556mfp7b5dutuj2jcrj5i7zc5q + '@silverhand/jest-config': 1.2.2_556mfp7b5dutuj2jcrj5i7zc5q got: 11.8.5 query-string: 7.1.1 zod: 3.18.0 devDependencies: '@jest/types': 28.1.3 - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/jest': 28.1.8 '@types/node': 16.11.56 '@vercel/ncc': 0.34.0 @@ -423,10 +423,10 @@ importers: specifiers: '@jest/types': ^28.1.3 '@logto/connector-kit': ^1.0.0-beta.20 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/jest-config': 1.0.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/jest-config': 1.2.2 + '@silverhand/ts-config': 1.2.1 '@types/jest': ^28.1.6 '@types/node': ^16.3.1 '@vercel/ncc': ^0.34.0 @@ -442,13 +442,13 @@ importers: dependencies: '@logto/connector-kit': 1.0.0-beta.20 '@silverhand/essentials': 1.2.0 - '@silverhand/jest-config': 1.0.0_556mfp7b5dutuj2jcrj5i7zc5q + '@silverhand/jest-config': 1.2.2_556mfp7b5dutuj2jcrj5i7zc5q got: 11.8.5 zod: 3.18.0 devDependencies: '@jest/types': 28.1.3 - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/jest': 28.1.8 '@types/node': 16.11.56 '@vercel/ncc': 0.34.0 @@ -464,10 +464,10 @@ importers: specifiers: '@jest/types': ^28.1.3 '@logto/connector-kit': ^1.0.0-beta.20 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/jest-config': 1.0.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/jest-config': 1.2.2 + '@silverhand/ts-config': 1.2.1 '@types/jest': ^28.1.6 '@types/node': ^16.3.1 '@vercel/ncc': ^0.34.0 @@ -483,13 +483,13 @@ importers: dependencies: '@logto/connector-kit': 1.0.0-beta.20 '@silverhand/essentials': 1.2.0 - '@silverhand/jest-config': 1.0.0_556mfp7b5dutuj2jcrj5i7zc5q + '@silverhand/jest-config': 1.2.2_556mfp7b5dutuj2jcrj5i7zc5q got: 11.8.5 zod: 3.18.0 devDependencies: '@jest/types': 28.1.3 - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/jest': 28.1.8 '@types/node': 16.11.56 '@vercel/ncc': 0.34.0 @@ -504,9 +504,9 @@ importers: packages/connector-mock-email: specifiers: '@logto/connector-kit': ^1.0.0-beta.20 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/ts-config': 1.2.1 '@types/node': ^16.3.1 '@vercel/ncc': ^0.34.0 eslint: ^8.21.0 @@ -519,8 +519,8 @@ importers: '@silverhand/essentials': 1.2.0 zod: 3.18.0 devDependencies: - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/node': 16.11.56 '@vercel/ncc': 0.34.0 eslint: 8.23.0 @@ -531,9 +531,9 @@ importers: packages/connector-mock-sms: specifiers: '@logto/connector-kit': ^1.0.0-beta.20 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/ts-config': 1.2.1 '@types/node': ^16.3.1 '@vercel/ncc': ^0.34.0 eslint: ^8.21.0 @@ -546,8 +546,8 @@ importers: '@silverhand/essentials': 1.2.0 zod: 3.18.0 devDependencies: - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/node': 16.11.56 '@vercel/ncc': 0.34.0 eslint: 8.23.0 @@ -558,9 +558,9 @@ importers: packages/connector-mock-social: specifiers: '@logto/connector-kit': ^1.0.0-beta.20 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/ts-config': 1.2.1 '@types/node': ^16.3.1 '@vercel/ncc': ^0.34.0 eslint: ^8.21.0 @@ -573,8 +573,8 @@ importers: '@silverhand/essentials': 1.2.0 zod: 3.18.0 devDependencies: - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/node': 16.11.56 '@vercel/ncc': 0.34.0 eslint: 8.23.0 @@ -586,10 +586,10 @@ importers: specifiers: '@jest/types': ^28.1.3 '@logto/connector-kit': ^1.0.0-beta.20 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/jest-config': 1.0.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/jest-config': 1.2.2 + '@silverhand/ts-config': 1.2.1 '@types/jest': ^28.1.6 '@types/node': ^16.3.1 '@vercel/ncc': ^0.34.0 @@ -605,13 +605,13 @@ importers: dependencies: '@logto/connector-kit': 1.0.0-beta.20 '@silverhand/essentials': 1.2.0 - '@silverhand/jest-config': 1.0.0_556mfp7b5dutuj2jcrj5i7zc5q + '@silverhand/jest-config': 1.2.2_556mfp7b5dutuj2jcrj5i7zc5q got: 11.8.5 zod: 3.18.0 devDependencies: '@jest/types': 28.1.3 - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/jest': 28.1.8 '@types/node': 16.11.56 '@vercel/ncc': 0.34.0 @@ -627,10 +627,10 @@ importers: specifiers: '@jest/types': ^28.1.3 '@logto/connector-kit': ^1.0.0-beta.20 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/jest-config': 1.0.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/jest-config': 1.2.2 + '@silverhand/ts-config': 1.2.1 '@types/jest': ^28.1.6 '@types/node': ^16.3.1 '@vercel/ncc': ^0.34.0 @@ -644,13 +644,13 @@ importers: dependencies: '@logto/connector-kit': 1.0.0-beta.20 '@silverhand/essentials': 1.2.0 - '@silverhand/jest-config': 1.0.0_556mfp7b5dutuj2jcrj5i7zc5q + '@silverhand/jest-config': 1.2.2_556mfp7b5dutuj2jcrj5i7zc5q got: 11.8.5 zod: 3.18.0 devDependencies: '@jest/types': 28.1.3 - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/jest': 28.1.8 '@types/node': 16.11.56 '@vercel/ncc': 0.34.0 @@ -665,10 +665,10 @@ importers: '@jest/types': ^28.1.3 '@logto/connector-kit': ^1.0.0-beta.20 '@logto/shared': ^1.0.0-beta.8 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/jest-config': 1.0.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/jest-config': 1.2.2 + '@silverhand/ts-config': 1.2.1 '@types/jest': ^28.1.6 '@types/node': ^16.3.1 '@types/nodemailer': ^6.4.4 @@ -684,13 +684,13 @@ importers: '@logto/connector-kit': 1.0.0-beta.20 '@logto/shared': 1.0.0-beta.8 '@silverhand/essentials': 1.2.0 - '@silverhand/jest-config': 1.0.0_556mfp7b5dutuj2jcrj5i7zc5q + '@silverhand/jest-config': 1.2.2_556mfp7b5dutuj2jcrj5i7zc5q nodemailer: 6.7.8 zod: 3.18.0 devDependencies: '@jest/types': 28.1.3 - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/jest': 28.1.8 '@types/node': 16.11.56 '@types/nodemailer': 6.4.5 @@ -705,10 +705,10 @@ importers: specifiers: '@jest/types': ^28.1.3 '@logto/connector-kit': ^1.0.0-beta.20 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/jest-config': 1.0.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/jest-config': 1.2.2 + '@silverhand/ts-config': 1.2.1 '@types/jest': ^28.1.6 '@types/node': ^16.3.1 '@vercel/ncc': ^0.34.0 @@ -722,13 +722,13 @@ importers: dependencies: '@logto/connector-kit': 1.0.0-beta.20 '@silverhand/essentials': 1.2.0 - '@silverhand/jest-config': 1.0.0_556mfp7b5dutuj2jcrj5i7zc5q + '@silverhand/jest-config': 1.2.2_556mfp7b5dutuj2jcrj5i7zc5q got: 11.8.5 zod: 3.18.0 devDependencies: '@jest/types': 28.1.3 - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/jest': 28.1.8 '@types/node': 16.11.56 '@vercel/ncc': 0.34.0 @@ -742,10 +742,10 @@ importers: specifiers: '@jest/types': ^28.1.3 '@logto/connector-kit': ^1.0.0-beta.20 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/jest-config': 1.0.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/jest-config': 1.2.2 + '@silverhand/ts-config': 1.2.1 '@types/jest': ^28.1.6 '@types/node': ^16.3.1 '@vercel/ncc': ^0.34.0 @@ -761,13 +761,13 @@ importers: dependencies: '@logto/connector-kit': 1.0.0-beta.20 '@silverhand/essentials': 1.2.0 - '@silverhand/jest-config': 1.0.0_556mfp7b5dutuj2jcrj5i7zc5q + '@silverhand/jest-config': 1.2.2_556mfp7b5dutuj2jcrj5i7zc5q got: 11.8.5 zod: 3.18.0 devDependencies: '@jest/types': 28.1.3 - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/jest': 28.1.8 '@types/node': 16.11.56 '@vercel/ncc': 0.34.0 @@ -783,10 +783,10 @@ importers: specifiers: '@jest/types': ^28.1.3 '@logto/connector-kit': ^1.0.0-beta.20 - '@silverhand/eslint-config': 1.0.0 + '@silverhand/eslint-config': 1.3.0 '@silverhand/essentials': ^1.2.0 - '@silverhand/jest-config': 1.0.0 - '@silverhand/ts-config': 1.0.0 + '@silverhand/jest-config': 1.2.2 + '@silverhand/ts-config': 1.2.1 '@types/jest': ^28.1.6 '@types/node': ^16.3.1 '@vercel/ncc': ^0.34.0 @@ -802,13 +802,13 @@ importers: dependencies: '@logto/connector-kit': 1.0.0-beta.20 '@silverhand/essentials': 1.2.0 - '@silverhand/jest-config': 1.0.0_556mfp7b5dutuj2jcrj5i7zc5q + '@silverhand/jest-config': 1.2.2_556mfp7b5dutuj2jcrj5i7zc5q got: 11.8.5 zod: 3.18.0 devDependencies: '@jest/types': 28.1.3 - '@silverhand/eslint-config': 1.0.0_er5sflmxjcrgfvrsp3qwdvxste - '@silverhand/ts-config': 1.0.0_typescript@4.8.2 + '@silverhand/eslint-config': 1.3.0_er5sflmxjcrgfvrsp3qwdvxste + '@silverhand/ts-config': 1.2.1_typescript@4.8.2 '@types/jest': 28.1.8 '@types/node': 16.11.56 '@vercel/ncc': 0.34.0 @@ -1504,6 +1504,13 @@ packages: dependencies: '@sinclair/typebox': 0.24.34 + /@jest/schemas/29.0.0: + resolution: {integrity: sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@sinclair/typebox': 0.24.34 + dev: false + /@jest/source-map/28.1.2: resolution: {integrity: sha512-cV8Lx3BeStJb8ipPHnqVw/IM2VCMWO3crWZzYodSIkxXnRcXJipCdx1JCK0K5MsJJouZQTH73mzf4vgxRaH9ww==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} @@ -1563,6 +1570,18 @@ packages: '@types/yargs': 17.0.12 chalk: 4.1.2 + /@jest/types/29.2.1: + resolution: {integrity: sha512-O/QNDQODLnINEPAI0cl9U6zUIDXEWXt6IC1o2N2QENuos7hlGUIthlKyV4p6ki3TvXFX071blj8HUhgLGquPjw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/schemas': 29.0.0 + '@types/istanbul-lib-coverage': 2.0.4 + '@types/istanbul-reports': 3.0.1 + '@types/node': 18.7.13 + '@types/yargs': 17.0.12 + chalk: 4.1.2 + dev: false + /@jridgewell/gen-mapping/0.1.1: resolution: {integrity: sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==} engines: {node: '>=6.0.0'} @@ -2690,8 +2709,8 @@ packages: - supports-color dev: true - /@silverhand/eslint-config/1.0.0_er5sflmxjcrgfvrsp3qwdvxste: - resolution: {integrity: sha512-cRA24+tuVGi8DQpBT7l7qssHZgQCLHoF+4E9/pAmDDLF7rYcImObaBbnkl4DRbeLHQAWvml2If4Xig9K+BZYdQ==} + /@silverhand/eslint-config/1.3.0_er5sflmxjcrgfvrsp3qwdvxste: + resolution: {integrity: sha512-0+SXJXAkUe1pg2DNn3JCEo99Weev07chQsL2iSCramXeMKjEk1R1UKjgQJM9saUGF7ovY4hlE/JjFD3PFId4DQ==} engines: {node: ^16.0.0 || ^18.0.0} peerDependencies: eslint: ^8.21.0 @@ -2702,8 +2721,8 @@ packages: '@typescript-eslint/parser': 5.36.1_yqf6kl63nyoq5megxukfnom5rm eslint: 8.23.0 eslint-config-prettier: 8.5.0_eslint@8.23.0 - eslint-config-xo: 0.41.0_eslint@8.23.0 - eslint-config-xo-typescript: 0.52.0_56gn3pktaor6mgs7vhgmks23ie + eslint-config-xo: 0.42.0_eslint@8.23.0 + eslint-config-xo-typescript: 0.53.0_56gn3pktaor6mgs7vhgmks23ie eslint-import-resolver-typescript: 3.5.0_faomjyrlgqmwswvqymymzkxcqi eslint-plugin-consistent-default-export-name: 0.0.15 eslint-plugin-eslint-comments: 3.2.0_eslint@8.23.0 @@ -2751,19 +2770,19 @@ packages: lodash.pick: 4.4.0 dev: false - /@silverhand/jest-config/1.0.0_556mfp7b5dutuj2jcrj5i7zc5q: - resolution: {integrity: sha512-rIFdERK2g753U+cx+fsy4WjjRuEPZebTqnKnKYlXeEEWgA3sB5BELADcLkjXyckd1man85a9uoz8j7CDy67kHw==} + /@silverhand/jest-config/1.2.2_556mfp7b5dutuj2jcrj5i7zc5q: + resolution: {integrity: sha512-sCOIHN3kIG9nyySkDao8nz6HK8VhGoUV4WG1CCriDDeGTqbHs4IprzTp1p+ChFdC8JGBCElQC0cIFrWYTFnTAQ==} engines: {node: ^16.0.0 || ^18.0.0} peerDependencies: - jest: ^28.1.3 + jest: ^29.0.0 dependencies: - '@jest/types': 28.1.3 + '@jest/types': 29.2.1 deepmerge: 4.2.2 identity-obj-proxy: 3.0.0 jest: 28.1.3_@types+node@16.11.56 jest-matcher-specific-error: 1.0.0 jest-transform-stub: 2.0.0 - ts-jest: 28.0.8_qa3j3zglltqvm5nef4hdjvdcyu + ts-jest: 29.0.3_ckdvg4jpv2ynid2iptcov5m7du transitivePeerDependencies: - '@babel/core' - babel-jest @@ -2771,8 +2790,8 @@ packages: - typescript dev: false - /@silverhand/ts-config/1.0.0_typescript@4.8.2: - resolution: {integrity: sha512-XKBqfHAcb77xZmGFXW+f/NZvalhRjxhm0au5hLxtRbzDPYHWlNn/n6c7xula5tcUbyaLS41K3M05KcKBq9I+eg==} + /@silverhand/ts-config/1.2.1_typescript@4.8.2: + resolution: {integrity: sha512-Lm5Ydb45qKmXvlOfQfSb+1WHrdL5IBtzt+AMOR5h528H073FLzaazLiaDo4noBVT9PAVtO7kG9qjwSPzHf0k9Q==} engines: {node: ^16.0.0 || ^18.0.0} peerDependencies: typescript: ^4.7.4 @@ -4437,12 +4456,12 @@ packages: eslint: 8.23.0 dev: true - /eslint-config-xo-typescript/0.52.0_56gn3pktaor6mgs7vhgmks23ie: - resolution: {integrity: sha512-8HMY/ArRT1Jv8dD5Fkjb+5wex+egwuniNcKNHnPZR0YAEy99/SiCcBrS72hlSiWdhrK/dmv3nZM3uIgvhJI0gQ==} + /eslint-config-xo-typescript/0.53.0_56gn3pktaor6mgs7vhgmks23ie: + resolution: {integrity: sha512-IJ1n70egMPTou/41HoGGFbLf/2WCsVW5lSUxOSklrR8T1221fMRPVJxIVZ3evr8R+N5wR6uzg/0uzSymwWA5Bg==} engines: {node: '>=12'} peerDependencies: - '@typescript-eslint/eslint-plugin': '>=5.28.0' - '@typescript-eslint/parser': '>=5.28.0' + '@typescript-eslint/eslint-plugin': '>=5.31.0' + '@typescript-eslint/parser': '>=5.31.0' eslint: '>=8.0.0' typescript: '>=4.4' dependencies: @@ -4452,8 +4471,8 @@ packages: typescript: 4.8.2 dev: true - /eslint-config-xo/0.41.0_eslint@8.23.0: - resolution: {integrity: sha512-cyTc182COQVdalOi5105h0Cw/Qb52IRGyIZLmUICIauANm9Upmv81UEsuFkdKnvwr4NtU95qjdk3g4/kNspA6g==} + /eslint-config-xo/0.42.0_eslint@8.23.0: + resolution: {integrity: sha512-HIfd+AM6tHFoaZ/NXYDV3Mr/CJrAj/DoP6IOYt1/v+90XtCwVYOfW7LXbRDYDmhQMzT16h7eqPRcex72waRqdA==} engines: {node: '>=12'} peerDependencies: eslint: '>=8.14.0' @@ -6304,6 +6323,18 @@ packages: graceful-fs: 4.2.10 picomatch: 2.3.1 + /jest-util/29.2.1: + resolution: {integrity: sha512-P5VWDj25r7kj7kl4pN2rG/RN2c1TLfYYYZYULnS/35nFDjBai+hBeo3MDrYZS7p6IoY3YHZnt2vq4L6mKnLk0g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/types': 29.2.1 + '@types/node': 18.7.13 + chalk: 4.1.2 + ci-info: 3.3.2 + graceful-fs: 4.2.10 + picomatch: 2.3.1 + dev: false + /jest-validate/28.1.3: resolution: {integrity: sha512-SZbOGBWEsaTxBGCOpsRWlXlvNkvTkY0XxRfh7zYmvd8uL5Qzyg0CHAXiXKROflh801quA6+/DsT4ODDthOC/OA==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} @@ -8744,16 +8775,16 @@ packages: engines: {node: '>=8'} dev: true - /ts-jest/28.0.8_qa3j3zglltqvm5nef4hdjvdcyu: - resolution: {integrity: sha512-5FaG0lXmRPzApix8oFG8RKjAz4ehtm8yMKOTy5HX3fY6W8kmvOrmcY0hKDElW52FJov+clhUbrKAqofnj4mXTg==} - engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} + /ts-jest/29.0.3_ckdvg4jpv2ynid2iptcov5m7du: + resolution: {integrity: sha512-Ibygvmuyq1qp/z3yTh9QTwVVAbFdDy/+4BtIQR2sp6baF2SJU/8CKK/hhnGIDY2L90Az2jIqTwZPnN2p+BweiQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true peerDependencies: '@babel/core': '>=7.0.0-beta.0 <8' - '@jest/types': ^28.0.0 - babel-jest: ^28.0.0 + '@jest/types': ^29.0.0 + babel-jest: ^29.0.0 esbuild: '*' - jest: ^28.0.0 + jest: ^29.0.0 typescript: '>=4.3' peerDependenciesMeta: '@babel/core': @@ -8765,11 +8796,11 @@ packages: esbuild: optional: true dependencies: - '@jest/types': 28.1.3 + '@jest/types': 29.2.1 bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 jest: 28.1.3_@types+node@16.11.56 - jest-util: 28.1.3 + jest-util: 29.2.1 json5: 2.2.1 lodash.memoize: 4.1.2 make-error: 1.3.6