refactor: Use ESM (#8358)

* wip

* wip

* fix

* clean up

* Update tsconfig.json

* Update activitypub.ts

* wip
This commit is contained in:
syuilo 2022-02-27 11:07:39 +09:00 committed by GitHub
parent 0a882471f3
commit d071d18dd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
737 changed files with 4135 additions and 3678 deletions

View file

@ -1,13 +1,13 @@
import * as Koa from 'koa';
import * as bcrypt from 'bcryptjs';
import Koa from 'koa';
import bcrypt from 'bcryptjs';
import * as speakeasy from 'speakeasy';
import signin from '../common/signin';
import config from '@/config/index';
import { Users, Signins, UserProfiles, UserSecurityKeys, AttestationChallenges } from '@/models/index';
import { ILocalUser } from '@/models/entities/user';
import { genId } from '@/misc/gen-id';
import { verifyLogin, hash } from '../2fa';
import { randomBytes } from 'crypto';
import signin from '../common/signin.js';
import config from '@/config/index.js';
import { Users, Signins, UserProfiles, UserSecurityKeys, AttestationChallenges } from '@/models/index.js';
import { ILocalUser } from '@/models/entities/user.js';
import { genId } from '@/misc/gen-id.js';
import { verifyLogin, hash } from '../2fa.js';
import { randomBytes } from 'node:crypto';
export default async (ctx: Koa.Context) => {
ctx.set('Access-Control-Allow-Origin', config.url);