@dpuse/dpuse-tool-file-previewer 1.0.134 → 1.0.135
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { EncodingDetectionConfig, EncodingSourceId } from '@dpuse/dpuse-shared';
|
|
2
|
-
export
|
|
2
|
+
export interface DecodingEncoding {
|
|
3
|
+
confidenceLevel: number | undefined;
|
|
3
4
|
id: string;
|
|
4
|
-
}
|
|
5
|
+
}
|
|
5
6
|
export interface EncodingDetection {
|
|
6
7
|
encoding: DecodingEncoding;
|
|
7
8
|
sourceId: EncodingSourceId;
|
|
8
9
|
}
|
|
9
10
|
export interface DecodedText {
|
|
10
11
|
encoding: DecodingEncoding;
|
|
11
|
-
isFallback: boolean;
|
|
12
12
|
replacementCharacterCount: number;
|
|
13
13
|
text: string;
|
|
14
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FilePreviewerInterface, FilePreviewResult
|
|
1
|
+
import { FilePreviewerInterface, FilePreviewResult } from '@dpuse/dpuse-shared';
|
|
2
2
|
export declare class Tool implements FilePreviewerInterface {
|
|
3
|
-
previewFile(url: string, signal: AbortSignal, chunkSize?: number, mimeType?: string,
|
|
3
|
+
previewFile(url: string, signal: AbortSignal, chunkSize?: number, mimeType?: string, encodingId?: string): Promise<FilePreviewResult>;
|
|
4
4
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dpuse/dpuse-tool-file-previewer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.135",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A library that wraps file-type and jschardet to identify a file's format and encoding from its first bytes, and return a decoded sample of its text.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"test": "node -e \"import('@dpuse/dpuse-development').then(m => m.testProject())\""
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@dpuse/dpuse-shared": "^1.0.
|
|
64
|
+
"@dpuse/dpuse-shared": "^1.0.210",
|
|
65
65
|
"file-type": "^22.3.0",
|
|
66
66
|
"jschardet": "^4.1.0"
|
|
67
67
|
},
|
|
@@ -71,12 +71,12 @@
|
|
|
71
71
|
"@types/node": "^26.6.6",
|
|
72
72
|
"@vitest/coverage-v8": "^5.1.0",
|
|
73
73
|
"eslint": "^10.14.0",
|
|
74
|
-
"prettier": "^3.
|
|
74
|
+
"prettier": "^3.10.0",
|
|
75
75
|
"sonda": "^0.14.0",
|
|
76
76
|
"typescript": "^6.0.3",
|
|
77
77
|
"vite": "^8.3.8",
|
|
78
78
|
"vite-plugin-dts": "^5.1.2",
|
|
79
79
|
"vitest": "^5.1.0",
|
|
80
|
-
"wrangler": "^4.160.
|
|
80
|
+
"wrangler": "^4.160.1"
|
|
81
81
|
}
|
|
82
82
|
}
|