0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

chore: fix build

This commit is contained in:
Gao Sun 2022-11-22 01:26:17 +08:00
parent d0d9321e79
commit e7b0de43b7
No known key found for this signature in database
GPG key ID: 13EBE123E4773688
4 changed files with 5 additions and 4 deletions

View file

@ -11,7 +11,7 @@
},
"main": "lib/index.js",
"bin": {
"logto": "bin/logto"
"logto": "bin/logto.js"
},
"files": [
"bin",

View file

@ -62,8 +62,8 @@ const mockFindSocialRelatedUser = jest.fn(async () => [
{ id: 'user1', identities: {}, isSuspended: false },
]);
const mockGetUserInfoByAuthCode = jest.fn();
jest.mock('#src/lib/social', () => ({
...jest.requireActual('@/lib/social'),
jest.mock('#src/lib/social.js', () => ({
...jest.requireActual('#src/lib/social.js'),
findSocialRelatedUser: async () => mockFindSocialRelatedUser(),
getUserInfoByAuthCode: async () => mockGetUserInfoByAuthCode(),
}));

View file

@ -9,9 +9,10 @@ import { object, string, unknown } from 'zod';
import { getLogtoConnectorById } from '#src/connectors/index.js';
import RequestError from '#src/errors/RequestError/index.js';
import { checkSessionHealth } from '#src/lib/session.js';
import { getUserInfoByAuthCode } from '#src/lib/social.js';
import { encryptUserPassword } from '#src/lib/user.js';
import koaGuard from '#src/middleware/koa-guard.js';
import { findUserById, updateUserById } from '#src/queries/user.js';
import { deleteUserIdentity, findUserById, updateUserById } from '#src/queries/user.js';
import assertThat from '#src/utils/assert-that.js';
import type { AnonymousRouter } from '../types.js';