@dpuse/dpuse-tool-file-previewer 0.0.58 → 0.0.59
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.
|
@@ -6756,9 +6756,11 @@ async function at(e, { maximumLength: t = V } = {}) {
|
|
|
6756
6756
|
for (;;) {
|
|
6757
6757
|
let { done: e, value: a } = await n.read();
|
|
6758
6758
|
if (e) break;
|
|
6759
|
-
if (i += a.length, i > t) throw await n.cancel(), Error(`ZIP entry decompressed data exceeds ${t} bytes`);
|
|
6759
|
+
if (i += a.length, i > t) throw await n.cancel().catch(() => {}), Error(`ZIP entry decompressed data exceeds ${t} bytes`);
|
|
6760
6760
|
r.push(a);
|
|
6761
6761
|
}
|
|
6762
|
+
} catch (e) {
|
|
6763
|
+
if (e.code !== "ERR_TRAILING_JUNK_AFTER_STREAM_END") throw e;
|
|
6762
6764
|
} finally {
|
|
6763
6765
|
n.releaseLock();
|
|
6764
6766
|
}
|
|
@@ -7286,7 +7288,7 @@ async function jt(e) {
|
|
|
7286
7288
|
}
|
|
7287
7289
|
//#endregion
|
|
7288
7290
|
//#region node_modules/file-type/source/index.js
|
|
7289
|
-
var Z = 4100, Mt =
|
|
7291
|
+
var Z = 4100, Mt = 4096, Nt = N, Pt = 1, Ft = 100, Q = N, It = 512, Lt = 256, Rt = 1048576, $ = N;
|
|
7290
7292
|
function zt(e) {
|
|
7291
7293
|
return Number.isFinite(e) ? Math.max(1, Math.trunc(e)) : Z;
|
|
7292
7294
|
}
|
|
@@ -8769,9 +8771,9 @@ var qt = class e {
|
|
|
8769
8771
|
mime: "image/x-icon"
|
|
8770
8772
|
};
|
|
8771
8773
|
if (await e.peekBuffer(this.buffer, {
|
|
8772
|
-
length: Math.min(
|
|
8774
|
+
length: Math.min(4 + this.options.mpegOffsetTolerance, t),
|
|
8773
8775
|
mayBeLess: !0
|
|
8774
|
-
}), this.buffer.length >=
|
|
8776
|
+
}), this.buffer.length >= 4 + this.options.mpegOffsetTolerance) for (let e = 0; e <= this.options.mpegOffsetTolerance; ++e) {
|
|
8775
8777
|
let t = this.scanMpeg(e);
|
|
8776
8778
|
if (t) return t;
|
|
8777
8779
|
}
|
|
@@ -8845,13 +8847,20 @@ var qt = class e {
|
|
|
8845
8847
|
if (this.check([16], {
|
|
8846
8848
|
offset: e + 1,
|
|
8847
8849
|
mask: [22]
|
|
8848
|
-
})) return
|
|
8849
|
-
offset: e + 1,
|
|
8850
|
-
mask: [8]
|
|
8851
|
-
}), {
|
|
8850
|
+
})) return {
|
|
8852
8851
|
ext: "aac",
|
|
8853
8852
|
mime: "audio/aac"
|
|
8854
8853
|
};
|
|
8854
|
+
if (this.check([255, 254], { offset: e }) || this.check([8], {
|
|
8855
|
+
offset: e + 1,
|
|
8856
|
+
mask: [24]
|
|
8857
|
+
}) || this.check([240], {
|
|
8858
|
+
offset: e + 2,
|
|
8859
|
+
mask: [240]
|
|
8860
|
+
}) || this.check([12], {
|
|
8861
|
+
offset: e + 2,
|
|
8862
|
+
mask: [12]
|
|
8863
|
+
})) return;
|
|
8855
8864
|
if (this.check([2], {
|
|
8856
8865
|
offset: e + 1,
|
|
8857
8866
|
mask: [6]
|
|
@@ -9536,5 +9545,3 @@ function ln(e) {
|
|
|
9536
9545
|
}
|
|
9537
9546
|
//#endregion
|
|
9538
9547
|
export { rn as Tool };
|
|
9539
|
-
|
|
9540
|
-
//# sourceMappingURL=dpuse-tool-file-previewer.es.js.map
|