mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
chore: fix test and lint issues
This commit is contained in:
parent
3ad272f345
commit
5087846e8b
88 changed files with 452 additions and 114 deletions
|
@ -19,9 +19,9 @@
|
|||
"//": "# `changeset version` won't run version lifecycle scripts, see https://github.com/changesets/changesets/issues/860",
|
||||
"ci:version": "changeset version && pnpm -r version",
|
||||
"ci:build": "pnpm -r build",
|
||||
"ci:lint": "pnpm -r --parallel lint",
|
||||
"ci:stylelint": "pnpm -r --parallel stylelint",
|
||||
"ci:test": "pnpm -r --parallel test:ci"
|
||||
"ci:lint": "pnpm -r --parallel --workspace-concurrency=0 lint",
|
||||
"ci:stylelint": "pnpm -r --parallel --workspace-concurrency=0 stylelint",
|
||||
"ci:test": "pnpm -r --parallel --workspace-concurrency=0 test:ci"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@changesets/cli": "^2.25.0",
|
||||
|
|
|
@ -38,7 +38,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
import nock from 'nock';
|
||||
|
||||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
|
||||
import { alipayEndpoint } from './constant.js';
|
||||
import createConnector, { getAccessToken } from './index.js';
|
||||
import { mockedAlipayNativeConfigWithValidPrivateKey } from './mock.js';
|
||||
|
|
|
@ -7,6 +7,10 @@
|
|||
* https://opendocs.alipay.com/open/204/105296/
|
||||
*/
|
||||
|
||||
import { assert } from '@silverhand/essentials';
|
||||
import { got } from 'got';
|
||||
import { z } from 'zod';
|
||||
|
||||
import type {
|
||||
GetAuthorizationUri,
|
||||
GetUserInfo,
|
||||
|
@ -21,10 +25,7 @@ import {
|
|||
ConnectorType,
|
||||
parseJson,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert } from '@silverhand/essentials';
|
||||
import dayjs from 'dayjs';
|
||||
import { got } from 'got';
|
||||
import { z } from 'zod';
|
||||
|
||||
import {
|
||||
alipayEndpoint,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import crypto from 'node:crypto';
|
||||
import snakeCaseKeys from 'snakecase-keys';
|
||||
|
||||
import { parseJsonObject } from '@logto/connector-kit';
|
||||
import iconv from 'iconv-lite';
|
||||
import snakeCaseKeys from 'snakecase-keys';
|
||||
|
||||
import { alipaySigningAlgorithmMapping } from './constant.js';
|
||||
import type { AlipayNativeConfig } from './types.js';
|
||||
|
|
|
@ -38,7 +38,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
import nock from 'nock';
|
||||
|
||||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
|
||||
import { alipayEndpoint, authorizationEndpoint } from './constant.js';
|
||||
import createConnector, { getAccessToken } from './index.js';
|
||||
import { mockedAlipayConfigWithValidPrivateKey } from './mock.js';
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
* https://opendocs.alipay.com/open/01emu5
|
||||
*/
|
||||
|
||||
import { assert } from '@silverhand/essentials';
|
||||
import { got } from 'got';
|
||||
import { z } from 'zod';
|
||||
|
||||
import type {
|
||||
GetConnectorConfig,
|
||||
GetAuthorizationUri,
|
||||
|
@ -19,10 +23,7 @@ import {
|
|||
ConnectorType,
|
||||
parseJson,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert } from '@silverhand/essentials';
|
||||
import dayjs from 'dayjs';
|
||||
import { got } from 'got';
|
||||
import { z } from 'zod';
|
||||
|
||||
import {
|
||||
alipayEndpoint,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import crypto from 'node:crypto';
|
||||
import snakeCaseKeys from 'snakecase-keys';
|
||||
|
||||
import { parseJsonObject } from '@logto/connector-kit';
|
||||
import iconv from 'iconv-lite';
|
||||
import snakeCaseKeys from 'snakecase-keys';
|
||||
|
||||
import { alipaySigningAlgorithmMapping } from './constant.js';
|
||||
import type { AlipayConfig } from './types.js';
|
||||
|
|
|
@ -32,7 +32,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import { assert } from '@silverhand/essentials';
|
||||
import { HTTPError } from 'got';
|
||||
|
||||
import type {
|
||||
CreateConnector,
|
||||
EmailConnector,
|
||||
|
@ -11,8 +14,6 @@ import {
|
|||
validateConfig,
|
||||
parseJson,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert } from '@silverhand/essentials';
|
||||
import { HTTPError } from 'got';
|
||||
|
||||
import { defaultMetadata } from './constant.js';
|
||||
import { singleSendMail } from './single-send-mail.js';
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { createHmac } from 'node:crypto';
|
||||
|
||||
import { got } from 'got';
|
||||
import { createHmac } from 'node:crypto';
|
||||
|
||||
import type { PublicParameters } from './types.js';
|
||||
|
||||
|
|
|
@ -32,7 +32,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import { assert } from '@silverhand/essentials';
|
||||
import { HTTPError } from 'got';
|
||||
|
||||
import type {
|
||||
GetConnectorConfig,
|
||||
SendMessageFunction,
|
||||
|
@ -11,8 +14,6 @@ import {
|
|||
ConnectorType,
|
||||
parseJson,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert } from '@silverhand/essentials';
|
||||
import { HTTPError } from 'got';
|
||||
|
||||
import { defaultMetadata } from './constant.js';
|
||||
import { sendSms } from './single-send-text.js';
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { createHmac } from 'node:crypto';
|
||||
|
||||
import { got } from 'got';
|
||||
import { createHmac } from 'node:crypto';
|
||||
|
||||
import type { PublicParameters } from './types.js';
|
||||
|
||||
|
|
|
@ -34,7 +34,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { assert } from '@silverhand/essentials';
|
||||
|
||||
import type {
|
||||
GetAuthorizationUri,
|
||||
GetUserInfo,
|
||||
|
@ -12,7 +14,6 @@ import {
|
|||
ConnectorType,
|
||||
} from '@logto/connector-kit';
|
||||
import { generateStandardId } from '@logto/core-kit';
|
||||
import { assert } from '@silverhand/essentials';
|
||||
import { createRemoteJWKSet, jwtVerify } from 'jose';
|
||||
|
||||
import { scope, defaultMetadata, jwksUri, issuer, authorizationEndpoint } from './constant.js';
|
||||
|
|
|
@ -35,7 +35,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { assert } from '@silverhand/essentials';
|
||||
|
||||
import type { SESv2Client, SendEmailCommand } from '@aws-sdk/client-sesv2';
|
||||
import { SESv2ServiceException } from '@aws-sdk/client-sesv2';
|
||||
import type {
|
||||
|
@ -12,7 +14,6 @@ import {
|
|||
ConnectorType,
|
||||
validateConfig,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert } from '@silverhand/essentials';
|
||||
|
||||
import { defaultMetadata } from './constant.js';
|
||||
import type { AwsSesConfig } from './types.js';
|
||||
|
|
|
@ -34,7 +34,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { assert, conditional } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
import path from 'node:path';
|
||||
|
||||
import type { AuthorizationCodeRequest, AuthorizationUrlRequest } from '@azure/msal-node';
|
||||
|
@ -16,8 +18,6 @@ import {
|
|||
ConnectorType,
|
||||
parseJson,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert, conditional } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import { scopes, defaultMetadata, defaultTimeout, graphAPIEndpoint } from './constant.js';
|
||||
import type { AzureADConfig } from './types.js';
|
||||
|
|
|
@ -33,7 +33,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
import nock from 'nock';
|
||||
|
||||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
|
||||
import { accessTokenEndpoint, authorizationEndpoint, userInfoEndpoint } from './constant.js';
|
||||
import createConnector, { getAccessToken } from './index.js';
|
||||
import { mockedConfig } from './mock.js';
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
* https://discord.com/developers/docs/topics/oauth2
|
||||
*/
|
||||
|
||||
import { assert, conditional } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import type {
|
||||
GetConnectorConfig,
|
||||
GetAuthorizationUri,
|
||||
|
@ -18,8 +21,6 @@ import {
|
|||
ConnectorType,
|
||||
parseJson,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert, conditional } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import {
|
||||
defaultMetadata,
|
||||
|
|
|
@ -33,7 +33,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
import nock from 'nock';
|
||||
|
||||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
|
||||
import { accessTokenEndpoint, authorizationEndpoint, userInfoEndpoint } from './constant.js';
|
||||
import createConnector, { getAccessToken } from './index.js';
|
||||
import { clientId, clientSecret, code, dummyRedirectUri, fields, mockedConfig } from './mock.js';
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
* https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow
|
||||
*/
|
||||
|
||||
import { assert } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import type {
|
||||
CreateConnector,
|
||||
SocialConnector,
|
||||
|
@ -17,8 +20,6 @@ import {
|
|||
ConnectorType,
|
||||
parseJson,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import {
|
||||
accessTokenEndpoint,
|
||||
|
|
|
@ -33,7 +33,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
import nock from 'nock';
|
||||
|
||||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
|
||||
import { accessTokenEndpoint, codeEndpoint, userInfoEndpoint } from './constant.js';
|
||||
import createConnector, { buildAuthorizationUri, getAccessToken } from './index.js';
|
||||
import { mockedFeishuConfig } from './mock.js';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import { assert, conditional } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import type {
|
||||
CreateConnector,
|
||||
GetAuthorizationUri,
|
||||
|
@ -12,8 +15,6 @@ import {
|
|||
ConnectorType,
|
||||
validateConfig,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert, conditional } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import {
|
||||
accessTokenEndpoint,
|
||||
|
|
|
@ -34,7 +34,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
import nock from 'nock';
|
||||
|
||||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
import qs from 'query-string';
|
||||
|
||||
import { accessTokenEndpoint, authorizationEndpoint, userInfoEndpoint } from './constant.js';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import { assert, conditional } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import type {
|
||||
GetAuthorizationUri,
|
||||
GetUserInfo,
|
||||
|
@ -12,8 +15,6 @@ import {
|
|||
ConnectorType,
|
||||
parseJson,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert, conditional } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
import qs from 'query-string';
|
||||
|
||||
import {
|
||||
|
|
|
@ -33,7 +33,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
import nock from 'nock';
|
||||
|
||||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
|
||||
import { accessTokenEndpoint, authorizationEndpoint, userInfoEndpoint } from './constant.js';
|
||||
import createConnector, { getAccessToken } from './index.js';
|
||||
import { mockedConfig } from './mock.js';
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
* The Implementation of OpenID Connect of Google Identity Platform.
|
||||
* https://developers.google.com/identity/protocols/oauth2/openid-connect
|
||||
*/
|
||||
import { conditional, assert } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import type {
|
||||
GetAuthorizationUri,
|
||||
GetUserInfo,
|
||||
|
@ -16,8 +19,6 @@ import {
|
|||
ConnectorType,
|
||||
parseJson,
|
||||
} from '@logto/connector-kit';
|
||||
import { conditional, assert } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import {
|
||||
accessTokenEndpoint,
|
||||
|
|
|
@ -33,7 +33,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
import nock from 'nock';
|
||||
|
||||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
|
||||
import { accessTokenEndpoint, authorizationEndpoint, userInfoEndpoint } from './constant.js';
|
||||
import createConnector, { getAccessToken } from './index.js';
|
||||
import { mockedConfig } from './mock.js';
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
* The Implementation of OpenID Connect of Kakao.
|
||||
* https://developers.kakao.com/docs/latest/en/kakaologin/rest-api
|
||||
*/
|
||||
import { assert, conditional } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import type {
|
||||
CreateConnector,
|
||||
GetAuthorizationUri,
|
||||
|
@ -16,8 +19,6 @@ import {
|
|||
validateConfig,
|
||||
parseJson,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert, conditional } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import {
|
||||
accessTokenEndpoint,
|
||||
|
|
|
@ -33,7 +33,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
import { got } from 'got';
|
||||
|
||||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
|
||||
import { defaultTimeout, scope } from './constant.js';
|
||||
import { accessTokenResponseGuard } from './types.js';
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { VerificationCodeType } from '@logto/connector-kit';
|
||||
import nock from 'nock';
|
||||
|
||||
import { VerificationCodeType } from '@logto/connector-kit';
|
||||
|
||||
import { emailEndpoint } from './constant.js';
|
||||
import { mockedAccessTokenResponse, mockedConfig } from './mock.js';
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { HTTPError, got } from 'got';
|
||||
|
||||
import type {
|
||||
CreateConnector,
|
||||
EmailConnector,
|
||||
|
@ -5,7 +7,6 @@ import type {
|
|||
SendMessageFunction,
|
||||
} from '@logto/connector-kit';
|
||||
import { ConnectorType, validateConfig } from '@logto/connector-kit';
|
||||
import { HTTPError, got } from 'got';
|
||||
|
||||
import { defaultMetadata, defaultTimeout, emailEndpoint } from './constant.js';
|
||||
import { grantAccessToken } from './grant-access-token.js';
|
||||
|
|
|
@ -33,7 +33,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
import { got } from 'got';
|
||||
|
||||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
|
||||
import { defaultTimeout, scope } from './constant.js';
|
||||
import { accessTokenResponseGuard } from './types.js';
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { VerificationCodeType } from '@logto/connector-kit';
|
||||
import nock from 'nock';
|
||||
|
||||
import { VerificationCodeType } from '@logto/connector-kit';
|
||||
|
||||
import { smsEndpoint } from './constant.js';
|
||||
import { mockedAccessTokenResponse, mockedConfig } from './mock.js';
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { HTTPError, got } from 'got';
|
||||
|
||||
import type {
|
||||
CreateConnector,
|
||||
GetConnectorConfig,
|
||||
|
@ -5,7 +7,6 @@ import type {
|
|||
SmsConnector,
|
||||
} from '@logto/connector-kit';
|
||||
import { ConnectorType, validateConfig } from '@logto/connector-kit';
|
||||
import { HTTPError, got } from 'got';
|
||||
|
||||
import { defaultMetadata, defaultTimeout, smsEndpoint } from './constant.js';
|
||||
import { grantAccessToken } from './grant-access-token.js';
|
||||
|
|
|
@ -33,7 +33,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -33,7 +33,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
describe('test', () => {
|
||||
it('makes ci happy', () => {
|
||||
expect(true);
|
||||
});
|
||||
});
|
|
@ -1,3 +1,4 @@
|
|||
import { assert } from '@silverhand/essentials';
|
||||
import fs from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
|
||||
|
@ -13,7 +14,6 @@ import {
|
|||
validateConfig,
|
||||
ConnectorType,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert } from '@silverhand/essentials';
|
||||
|
||||
import { defaultMetadata } from './constant.js';
|
||||
import type { MockMailConfig } from './types.js';
|
||||
|
|
|
@ -33,7 +33,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
describe('test', () => {
|
||||
it('makes ci happy', () => {
|
||||
expect(true);
|
||||
});
|
||||
});
|
|
@ -1,3 +1,4 @@
|
|||
import { assert } from '@silverhand/essentials';
|
||||
import fs from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
|
||||
|
@ -13,7 +14,6 @@ import {
|
|||
validateConfig,
|
||||
ConnectorType,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert } from '@silverhand/essentials';
|
||||
|
||||
import { defaultMetadata } from './constant.js';
|
||||
import type { MockMailConfig } from './types.js';
|
||||
|
|
|
@ -33,7 +33,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
5
packages/connectors/connector-mock-sms/src/index.test.ts
Normal file
5
packages/connectors/connector-mock-sms/src/index.test.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
describe('test', () => {
|
||||
it('makes ci happy', () => {
|
||||
expect(true);
|
||||
});
|
||||
});
|
|
@ -1,3 +1,4 @@
|
|||
import { assert } from '@silverhand/essentials';
|
||||
import fs from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
|
||||
|
@ -13,7 +14,6 @@ import {
|
|||
validateConfig,
|
||||
ConnectorType,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert } from '@silverhand/essentials';
|
||||
|
||||
import { defaultMetadata } from './constant.js';
|
||||
import type { MockSmsConfig } from './types.js';
|
||||
|
|
|
@ -33,7 +33,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
describe('test', () => {
|
||||
it('makes ci happy', () => {
|
||||
expect(true);
|
||||
});
|
||||
});
|
|
@ -1,4 +1,5 @@
|
|||
import { randomUUID } from 'node:crypto';
|
||||
import { z } from 'zod';
|
||||
|
||||
import type {
|
||||
GetAuthorizationUri,
|
||||
|
@ -7,7 +8,6 @@ import type {
|
|||
SocialConnector,
|
||||
} from '@logto/connector-kit';
|
||||
import { ConnectorError, ConnectorErrorCodes, ConnectorType } from '@logto/connector-kit';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { defaultMetadata } from './constant.js';
|
||||
import { mockSocialConfigGuard } from './types.js';
|
||||
|
|
|
@ -33,7 +33,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
import nock from 'nock';
|
||||
|
||||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
|
||||
import { accessTokenEndpoint, authorizationEndpoint, userInfoEndpoint } from './constant.js';
|
||||
import createConnector, { getAccessToken } from './index.js';
|
||||
import { mockedConfig } from './mock.js';
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
* The Implementation of OAuth2 of Naver.
|
||||
* https://developers.naver.com/docs/login/api/api.md
|
||||
*/
|
||||
import { assert, conditional } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import type {
|
||||
CreateConnector,
|
||||
GetAuthorizationUri,
|
||||
|
@ -16,8 +19,6 @@ import {
|
|||
validateConfig,
|
||||
parseJson,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert, conditional } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import {
|
||||
accessTokenEndpoint,
|
||||
|
|
|
@ -34,7 +34,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
import { assert, pick } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
import snakecaseKeys from 'snakecase-keys';
|
||||
|
||||
import {
|
||||
type GetAuthorizationUri,
|
||||
type GetUserInfo,
|
||||
|
@ -10,9 +14,6 @@ import {
|
|||
validateConfig,
|
||||
ConnectorType,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert, pick } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
import snakecaseKeys from 'snakecase-keys';
|
||||
|
||||
import { defaultMetadata, defaultTimeout } from './constant.js';
|
||||
import type { OauthConfig } from './types.js';
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import { ConnectorError, ConnectorErrorCodes, parseJson } from '@logto/connector-kit';
|
||||
import { assert, pick } from '@silverhand/essentials';
|
||||
import type { Response } from 'got';
|
||||
import { got, HTTPError } from 'got';
|
||||
import * as qs from 'query-string';
|
||||
import snakecaseKeys from 'snakecase-keys';
|
||||
|
||||
import { ConnectorError, ConnectorErrorCodes, parseJson } from '@logto/connector-kit';
|
||||
import * as qs from 'query-string';
|
||||
|
||||
import { defaultTimeout } from './constant.js';
|
||||
import type {
|
||||
OauthConfig,
|
||||
|
|
|
@ -35,7 +35,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
import { assert, conditional, pick } from '@silverhand/essentials';
|
||||
import { HTTPError } from 'got';
|
||||
import snakecaseKeys from 'snakecase-keys';
|
||||
|
||||
import type {
|
||||
GetAuthorizationUri,
|
||||
GetUserInfo,
|
||||
|
@ -12,10 +16,7 @@ import {
|
|||
ConnectorType,
|
||||
} from '@logto/connector-kit';
|
||||
import { generateStandardId } from '@logto/core-kit';
|
||||
import { assert, conditional, pick } from '@silverhand/essentials';
|
||||
import { HTTPError } from 'got';
|
||||
import { createRemoteJWKSet, jwtVerify } from 'jose';
|
||||
import snakecaseKeys from 'snakecase-keys';
|
||||
|
||||
import { defaultMetadata } from './constant.js';
|
||||
import type { OidcConfig } from './types.js';
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import { ConnectorError, ConnectorErrorCodes, parseJson } from '@logto/connector-kit';
|
||||
import { assert, pick } from '@silverhand/essentials';
|
||||
import type { Response } from 'got';
|
||||
import { got, HTTPError } from 'got';
|
||||
import snakecaseKeys from 'snakecase-keys';
|
||||
|
||||
import { ConnectorError, ConnectorErrorCodes, parseJson } from '@logto/connector-kit';
|
||||
|
||||
import { defaultTimeout } from './constant.js';
|
||||
import type { AccessTokenResponse, OidcConfig } from './types.js';
|
||||
import { accessTokenResponseGuard, delimiter, authResponseGuard } from './types.js';
|
||||
|
|
|
@ -35,7 +35,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import { assert } from '@silverhand/essentials';
|
||||
import { z } from 'zod';
|
||||
|
||||
import type {
|
||||
GetAuthorizationUri,
|
||||
GetUserInfo,
|
||||
|
@ -12,9 +15,7 @@ import {
|
|||
validateConfig,
|
||||
ConnectorType,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert } from '@silverhand/essentials';
|
||||
import * as saml from 'samlify';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { defaultMetadata } from './constant.js';
|
||||
import { samlConfigGuard } from './types.js';
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import type * as saml from 'samlify';
|
||||
import { z } from 'zod';
|
||||
|
||||
import type * as saml from 'samlify';
|
||||
|
||||
import {
|
||||
assertionBinding,
|
||||
authnRequestBinding,
|
||||
|
|
|
@ -33,7 +33,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import { assert } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import type {
|
||||
GetConnectorConfig,
|
||||
SendMessageFunction,
|
||||
|
@ -10,8 +13,6 @@ import {
|
|||
validateConfig,
|
||||
ConnectorType,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import { defaultMetadata, endpoint } from './constant.js';
|
||||
import type {
|
||||
|
|
|
@ -37,7 +37,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { assert } from '@silverhand/essentials';
|
||||
|
||||
import type {
|
||||
GetConnectorConfig,
|
||||
CreateConnector,
|
||||
|
@ -10,7 +12,6 @@ import {
|
|||
validateConfig,
|
||||
ConnectorType,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert } from '@silverhand/essentials';
|
||||
import nodemailer from 'nodemailer';
|
||||
import type SMTPTransport from 'nodemailer/lib/smtp-transport';
|
||||
|
||||
|
|
|
@ -33,7 +33,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import { got } from 'got';
|
||||
import type { BinaryToTextEncoding } from 'node:crypto';
|
||||
import crypto from 'node:crypto';
|
||||
|
||||
import { got } from 'got';
|
||||
|
||||
import { tencentErrorResponse } from './schema.js';
|
||||
import type { TencentErrorResponse, TencentSuccessResponse } from './schema.js';
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import { assert } from '@silverhand/essentials';
|
||||
import { HTTPError } from 'got';
|
||||
|
||||
import type {
|
||||
CreateConnector,
|
||||
GetConnectorConfig,
|
||||
|
@ -10,8 +13,6 @@ import {
|
|||
ConnectorType,
|
||||
validateConfig,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert } from '@silverhand/essentials';
|
||||
import { HTTPError } from 'got';
|
||||
|
||||
import { defaultMetadata } from './constant.js';
|
||||
import { isSmsErrorResponse, sendSmsRequest } from './http.js';
|
||||
|
|
|
@ -33,7 +33,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import { assert } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import type {
|
||||
GetConnectorConfig,
|
||||
SendMessageFunction,
|
||||
|
@ -10,8 +13,6 @@ import {
|
|||
validateConfig,
|
||||
ConnectorType,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import { defaultMetadata, endpoint } from './constant.js';
|
||||
import type { TwilioSmsConfig, PublicParameters } from './types.js';
|
||||
|
|
|
@ -33,7 +33,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
import nock from 'nock';
|
||||
|
||||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
|
||||
import { accessTokenEndpoint, authorizationEndpoint, userInfoEndpoint } from './constant.js';
|
||||
import createConnector, { getAccessToken } from './index.js';
|
||||
import { mockedConfig } from './mock.js';
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
* https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Wechat_Login.html
|
||||
*/
|
||||
|
||||
import { assert } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import type {
|
||||
GetAuthorizationUri,
|
||||
GetUserInfo,
|
||||
|
@ -17,8 +20,6 @@ import {
|
|||
ConnectorType,
|
||||
parseJson,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import {
|
||||
authorizationEndpoint,
|
||||
|
|
|
@ -33,7 +33,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
import nock from 'nock';
|
||||
|
||||
import { ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
|
||||
|
||||
import { accessTokenEndpoint, authorizationEndpoint, userInfoEndpoint } from './constant.js';
|
||||
import createConnector, { getAccessToken } from './index.js';
|
||||
import { mockedConfig } from './mock.js';
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
* https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Wechat_Login.html
|
||||
*/
|
||||
|
||||
import { assert } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import type {
|
||||
GetAuthorizationUri,
|
||||
GetUserInfo,
|
||||
|
@ -17,8 +20,6 @@ import {
|
|||
ConnectorType,
|
||||
parseJson,
|
||||
} from '@logto/connector-kit';
|
||||
import { assert } from '@silverhand/essentials';
|
||||
import { got, HTTPError } from 'got';
|
||||
|
||||
import {
|
||||
authorizationEndpoint,
|
||||
|
|
|
@ -54,7 +54,16 @@
|
|||
"node": "^18.12.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@silverhand"
|
||||
"extends": "@silverhand",
|
||||
"settings": {
|
||||
"import/core-modules": [
|
||||
"@silverhand/essentials",
|
||||
"got",
|
||||
"nock",
|
||||
"snakecase-keys",
|
||||
"zod"
|
||||
]
|
||||
}
|
||||
},
|
||||
"prettier": "@silverhand/eslint-config/.prettierrc",
|
||||
"publishConfig": {
|
||||
|
|
Loading…
Reference in a new issue