@datapos/datapos-tool-file-operators 0.0.7 → 0.0.9
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.
|
@@ -8278,6 +8278,8 @@ class rx {
|
|
|
8278
8278
|
}
|
|
8279
8279
|
}
|
|
8280
8280
|
async function $e(i) {
|
|
8281
|
+
if (i.length === 0)
|
|
8282
|
+
return { bytes: i, dataFormatId: void 0, encodingId: void 0, encodingConfidenceLevel: void 0, fileTypeConfig: void 0, text: void 0 };
|
|
8281
8283
|
let e;
|
|
8282
8284
|
const x = await Fe(i);
|
|
8283
8285
|
if (x == null)
|
|
@@ -8292,6 +8294,7 @@ async function $e(i) {
|
|
|
8292
8294
|
dataFormatId: e,
|
|
8293
8295
|
encodingId: a.encoding.id,
|
|
8294
8296
|
encodingConfidenceLevel: a.encoding.confidenceLevel,
|
|
8297
|
+
fileTypeConfig: x,
|
|
8295
8298
|
text: a.text
|
|
8296
8299
|
};
|
|
8297
8300
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { FileTypeResult } from 'file-type';
|
|
1
2
|
import { DataFormatId } from '@datapos/datapos-shared';
|
|
2
3
|
interface PreviewConfig {
|
|
3
4
|
bytes: Uint8Array;
|
|
4
5
|
dataFormatId: DataFormatId | undefined;
|
|
5
6
|
encodingId: string | undefined;
|
|
6
7
|
encodingConfidenceLevel: number | undefined;
|
|
7
|
-
|
|
8
|
+
fileTypeConfig: FileTypeResult | undefined;
|
|
9
|
+
text: string | undefined;
|
|
8
10
|
}
|
|
9
11
|
/**
|
|
10
12
|
* Tool.
|