mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-26 04:24:22 +02:00
refactor: Use ESM (#8358)
* wip * wip * fix * clean up * Update tsconfig.json * Update activitypub.ts * wip
This commit is contained in:
@@ -1,23 +1,22 @@
|
||||
import * as fs from 'fs';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { dirname } from 'path';
|
||||
import * as Koa from 'koa';
|
||||
import * as fs from 'node:fs';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname } from 'node:path';
|
||||
import Koa from 'koa';
|
||||
import * as send from 'koa-send';
|
||||
import * as rename from 'rename';
|
||||
import rename from 'rename';
|
||||
import * as tmp from 'tmp';
|
||||
import { serverLogger } from '../index';
|
||||
import { contentDisposition } from '@/misc/content-disposition';
|
||||
import { DriveFiles } from '@/models/index';
|
||||
import { InternalStorage } from '@/services/drive/internal-storage';
|
||||
import { downloadUrl } from '@/misc/download-url';
|
||||
import { detectType } from '@/misc/get-file-info';
|
||||
import { convertToJpeg, convertToPng, convertToPngOrJpeg } from '@/services/drive/image-processor';
|
||||
import { GenerateVideoThumbnail } from '@/services/drive/generate-video-thumbnail';
|
||||
import { StatusError } from '@/misc/fetch';
|
||||
import { FILE_TYPE_BROWSERSAFE } from '@/const';
|
||||
import { serverLogger } from '../index.js';
|
||||
import { contentDisposition } from '@/misc/content-disposition.js';
|
||||
import { DriveFiles } from '@/models/index.js';
|
||||
import { InternalStorage } from '@/services/drive/internal-storage.js';
|
||||
import { downloadUrl } from '@/misc/download-url.js';
|
||||
import { detectType } from '@/misc/get-file-info.js';
|
||||
import { convertToJpeg, convertToPng, convertToPngOrJpeg } from '@/services/drive/image-processor.js';
|
||||
import { GenerateVideoThumbnail } from '@/services/drive/generate-video-thumbnail.js';
|
||||
import { StatusError } from '@/misc/fetch.js';
|
||||
import { FILE_TYPE_BROWSERSAFE } from '@/const.js';
|
||||
|
||||
//const _filename = fileURLToPath(import.meta.url);
|
||||
const _filename = __filename;
|
||||
const _filename = fileURLToPath(import.meta.url);
|
||||
const _dirname = dirname(_filename);
|
||||
|
||||
const assets = `${_dirname}/../../server/file/assets/`;
|
||||
|
||||
Reference in New Issue
Block a user