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:
parent
d0d9321e79
commit
e7b0de43b7
4 changed files with 5 additions and 4 deletions
|
@ -11,7 +11,7 @@
|
||||||
},
|
},
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"logto": "bin/logto"
|
"logto": "bin/logto.js"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"bin",
|
"bin",
|
||||||
|
|
|
@ -62,8 +62,8 @@ const mockFindSocialRelatedUser = jest.fn(async () => [
|
||||||
{ id: 'user1', identities: {}, isSuspended: false },
|
{ id: 'user1', identities: {}, isSuspended: false },
|
||||||
]);
|
]);
|
||||||
const mockGetUserInfoByAuthCode = jest.fn();
|
const mockGetUserInfoByAuthCode = jest.fn();
|
||||||
jest.mock('#src/lib/social', () => ({
|
jest.mock('#src/lib/social.js', () => ({
|
||||||
...jest.requireActual('@/lib/social'),
|
...jest.requireActual('#src/lib/social.js'),
|
||||||
findSocialRelatedUser: async () => mockFindSocialRelatedUser(),
|
findSocialRelatedUser: async () => mockFindSocialRelatedUser(),
|
||||||
getUserInfoByAuthCode: async () => mockGetUserInfoByAuthCode(),
|
getUserInfoByAuthCode: async () => mockGetUserInfoByAuthCode(),
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -9,9 +9,10 @@ import { object, string, unknown } from 'zod';
|
||||||
import { getLogtoConnectorById } from '#src/connectors/index.js';
|
import { getLogtoConnectorById } from '#src/connectors/index.js';
|
||||||
import RequestError from '#src/errors/RequestError/index.js';
|
import RequestError from '#src/errors/RequestError/index.js';
|
||||||
import { checkSessionHealth } from '#src/lib/session.js';
|
import { checkSessionHealth } from '#src/lib/session.js';
|
||||||
|
import { getUserInfoByAuthCode } from '#src/lib/social.js';
|
||||||
import { encryptUserPassword } from '#src/lib/user.js';
|
import { encryptUserPassword } from '#src/lib/user.js';
|
||||||
import koaGuard from '#src/middleware/koa-guard.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 assertThat from '#src/utils/assert-that.js';
|
||||||
|
|
||||||
import type { AnonymousRouter } from '../types.js';
|
import type { AnonymousRouter } from '../types.js';
|
||||||
|
|
Loading…
Reference in a new issue