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,14 +1,14 @@
import * as http from 'http';
import * as websocket from 'websocket';
import MainStreamConnection from './stream/index';
import MainStreamConnection from './stream/index.js';
import { ParsedUrlQuery } from 'querystring';
import authenticate from './authenticate';
import authenticate from './authenticate.js';
import { EventEmitter } from 'events';
import { subsdcriber as redisClient } from '../../db/redis';
import { Users } from '@/models/index';
import { subsdcriber as redisClient } from '../../db/redis.js';
import { Users } from '@/models/index.js';
module.exports = (server: http.Server) => {
export const initializeStreamingServer = (server: http.Server) => {
// Init websocket server
const ws = new websocket.server({
httpServer: server,