File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 "json5" : " ^2.2.3" ,
2929 "minato" : " ^3.6.1" ,
3030 "silk-wasm" : " ^3.7.1" ,
31- "ts-case-convert" : " ^2.1.0" ,
3231 "ws" : " ^8.18.2"
3332 },
3433 "devDependencies" : {
35- "@rollup/plugin-commonjs" : " ^28.0.3" ,
3634 "@types/cors" : " ^2.8.18" ,
3735 "@types/express" : " ^5.0.1" ,
3836 "@types/fluent-ffmpeg" : " ^2.1.27" ,
3937 "@types/node" : " ^20.14.15" ,
4038 "@types/ws" : " ^8.18.1" ,
4139 "protobufjs" : " ^7.5.3" ,
4240 "protobufjs-cli" : " ^1.1.3" ,
41+ "ts-case-convert" : " ^2.1.0" ,
4342 "tsx" : " ^4.19.4" ,
4443 "typescript" : " ^5.8.3" ,
45- "vite" : " ^6.3.5 " ,
44+ "vite" : " npm:rolldown-vite@latest " ,
4645 "vite-plugin-cp" : " ^6.0.3"
4746 },
4847 "packageManager" : " yarn@4.9.1"
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import fs from 'node:fs'
22import fsPromise from 'node:fs/promises'
33import path from 'node:path'
44import * as fileType from 'file-type'
5+ // @ts -ignore
56import { imageSizeFromFile } from "image-size/fromFile" ;
67import { TEMP_DIR } from '../globalVars'
78import { randomUUID , createHash } from 'node:crypto'
@@ -36,7 +37,7 @@ export function calculateFileMD5(filePath: string): Promise<string> {
3637 // 创建一个流式读取器
3738 const stream = fs . createReadStream ( filePath )
3839
39- stream . on ( 'data' , ( data : Buffer ) => {
40+ stream . on ( 'data' , ( data : Buffer | string ) => {
4041 // 当读取到数据时,更新哈希对象的状态
4142 hash . update ( data )
4243 } )
Original file line number Diff line number Diff line change 11import { defineConfig } from 'vite'
2- import commonjs from '@rollup/plugin-commonjs'
32import { builtinModules } from 'module'
4- import path from 'node:path'
53import cp from 'vite-plugin-cp'
64import { writeVersion } from './src/version'
75
86writeVersion ( )
97
108const external = [
9+ 'fluent-ffmpeg' ,
10+ 'express' ,
1111 'silk-wasm' ,
1212 '@minatojs/sql.js' ,
1313 'ws' ,
@@ -58,9 +58,6 @@ export default defineConfig({
5858 { src : './doc/使用说明.txt' , dest : 'dist/' }
5959 ] ,
6060 } ) ,
61- commonjs ( {
62- include : / n o d e _ m o d u l e s \/ f i l e - t y p e / ,
63- } ) ,
6461 ] ,
6562 } ,
6663 } ,
You can’t perform that action at this time.
0 commit comments