You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@leafer/file

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafer/file - npm Package Compare versions

Comparing version
2.0.1
to
2.0.2
+6
-6
package.json
{
"name": "@leafer/file",
"version": "2.0.1",
"version": "2.0.2",
"description": "@leafer/file",

@@ -25,10 +25,10 @@ "author": "Chao (Leafer) Wan",

"dependencies": {
"@leafer/platform": "2.0.1",
"@leafer/task": "2.0.1",
"@leafer/data": "2.0.1",
"@leafer/debug": "2.0.1"
"@leafer/platform": "2.0.2",
"@leafer/task": "2.0.2",
"@leafer/data": "2.0.2",
"@leafer/debug": "2.0.2"
},
"devDependencies": {
"@leafer/interface": "2.0.1"
"@leafer/interface": "2.0.2"
}
}

@@ -9,6 +9,6 @@ import { IExportFileType, IStringMap, IExportOptions } from '@leafer/interface'

mineType(type: string): string {
if (!type || type.startsWith('image')) return type
mimeType(type: string, base: string = 'image'): string {
if (!type || type.startsWith(base)) return type
if (type === 'jpg') type = 'jpeg'
return 'image/' + type
return base + '/' + type
},

@@ -37,4 +37,5 @@

const F = FileHelper
const F = FileHelper;
(F as any).mineType = F.mimeType // 兼容老代码,后面可以移除
F.alphaPixelTypes.forEach(type => F.upperCaseTypeMap[type] = type.toUpperCase())

@@ -1,2 +0,2 @@

import { ILeaferImage, IResource, IObject, ILeaferCanvas, IExportFileType, ILeaferImageConfig } from '@leafer/interface'
import { ILeaferImage, ILeaferFilm, ILeaferVideo, IFilmFileType, IVideoFileType, IResource, IObject, ILeaferCanvas, IExportFileType, ILeaferImageConfig } from '@leafer/interface'

@@ -13,4 +13,6 @@ import { Creator } from '@leafer/platform'

tasker: new TaskProcessor(),
tasker: new TaskProcessor(), // 会并行的异步加载任务
queue: new TaskProcessor({ parallel: 1 }), // 全局按顺序执行的任务队列,防止阻塞主线程
map: {},

@@ -57,3 +59,10 @@

// film
loadFilm(_key: string, _format?: IFilmFileType): Promise<ILeaferFilm> { return undefined },
// video
loadVideo(_key: string, _format?: IVideoFileType): Promise<ILeaferVideo> { return undefined },
destroy(): void {

@@ -60,0 +69,0 @@ R.map = {}

@@ -6,3 +6,3 @@ import { IExportFileType, IStringMap, IExportOptions, IResource } from '@leafer/interface';

upperCaseTypeMap: IStringMap;
mineType(type: string): string;
mimeType(type: string, base?: string): string;
fileType(filename: string): string;

@@ -9,0 +9,0 @@ isOpaqueImage(filename: string): boolean;