@dpuse/dpuse-tool-file-previewer 1.0.135 → 1.0.136

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.
package/README.md CHANGED
@@ -62,7 +62,7 @@ License data is updated each time `npm run document` is run, using [license-chec
62
62
  | Dependency | Version | License(s) | Document |
63
63
  | :--------------------------------------------------------------------- | :-----: | :--------- | :-------------------------------------------------------------------- |
64
64
  | [@borewit/text-codec](https://github.com/Borewit/text-codec) | 0.2.3 | MIT | [LICENSE](licenses/downloads/@borewit/text-codec@0.2.3-LICENSE.txt) |
65
- | [@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared) | 1.0.210 | MIT | [LICENSE](licenses/downloads/@dpuse/dpuse-shared@1.0.210-LICENSE.txt) |
65
+ | [@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared) | 1.0.211 | MIT | [LICENSE](licenses/downloads/@dpuse/dpuse-shared@1.0.211-LICENSE.txt) |
66
66
  | [@tokenizer/inflate](https://github.com/Borewit/tokenizer-inflate) | 0.6.0 | MIT | [LICENSE](licenses/downloads/@tokenizer/inflate@0.6.0-LICENSE.txt) |
67
67
  | [debug](https://github.com/debug-js/debug) | 4.4.3 | MIT | [LICENSE](licenses/downloads/debug@4.4.3-LICENSE.txt) |
68
68
  | [file-type](https://github.com/sindresorhus/file-type) | 22.3.0 | MIT | [LICENSE](licenses/downloads/file-type@22.3.0-LICENSE.txt) |
@@ -77,7 +77,7 @@ License data is updated each time `npm run document` is run, using [license-chec
77
77
 
78
78
  The dependency tree below shows how each package in the table above is reached — direct and transitive — along with its installed version, release date, and update status. A package that does not ship itself, such as one whose parts are bundled separately, is left out and what ships beneath it is shown in its place. Packages flagged ❗ have a newer version available; ⚠️ indicates a package that hasn't been updated in the last 6 months or longer. Neither flag necessarily indicates a problem: we let new releases stabilise before upgrading, and some packages are mature and stable (have limited or no dependencies), so they require no active development.
79
79
 
80
- - **[@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared)** 1.0.210 — this month: 2026-11-11
80
+ - **[@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared)** 1.0.211 — this month: 2026-11-11
81
81
  - **[file-type](https://github.com/sindresorhus/file-type)** 22.3.0 — this month: 2026-10-29
82
82
  - **[valibot](https://github.com/open-circle/valibot)** 1.5.0 — 2 mths ago: 2026-09-09
83
83
  - **[file-type](https://github.com/sindresorhus/file-type)** 22.3.0 — this month: 2026-10-29
@@ -3719,7 +3719,6 @@ var zn = {
3719
3719
  "previewObject",
3720
3720
  "queryRecords",
3721
3721
  "removeRecords",
3722
- "retrieveChunks",
3723
3722
  "retrieveRecords",
3724
3723
  "upsertRecords"
3725
3724
  ]), F([
@@ -9929,10 +9928,10 @@ var Il = 65536, Ll = {
9929
9928
  headers: { Range: `bytes=0-${String(o - 1)}` },
9930
9929
  signal: t
9931
9930
  });
9932
- if (s.status === 416) return Hl(/* @__PURE__ */ new Uint8Array(), a, !0);
9931
+ if (s.status === 416) return Vl(/* @__PURE__ */ new Uint8Array(), a, !0);
9933
9932
  if (!s.ok) throw await Kn(s, `Failed to fetch '${e}' file.`, "dpuse-tool-file-previewer.Tool.previewFile");
9934
9933
  let { fileBytes: c, isCutShort: l } = await Bl(s, o);
9935
- return Hl(c, a, !l && Vl(s, c.length, o), i);
9934
+ return Vl(c, a, !l && Gl(s, c.length, o), i);
9936
9935
  }
9937
9936
  };
9938
9937
  async function Bl(e, t) {
@@ -9951,11 +9950,7 @@ async function Bl(e, t) {
9951
9950
  isCutShort: a
9952
9951
  };
9953
9952
  }
9954
- function Vl(e, t, n) {
9955
- let r = /\/(\d+)$/.exec(e.headers.get("content-range") ?? "")?.[1];
9956
- return r == null ? e.status !== 206 || t < n : t >= Number(r);
9957
- }
9958
- async function Hl(e, t, n, r) {
9953
+ async function Vl(e, t, n, r) {
9959
9954
  if (e.length === 0) return {
9960
9955
  bytes: e,
9961
9956
  dataFormatId: void 0,
@@ -9971,29 +9966,29 @@ async function Hl(e, t, n, r) {
9971
9966
  text: void 0
9972
9967
  };
9973
9968
  let i = await _n(e);
9974
- if (i != null) return Ul(e, i, n, r);
9975
- let a = pl(e, n), o = hl(e, Wl(r) ?? a.encoding, n);
9969
+ if (i != null) return Hl(e, i, n, r);
9970
+ let a = pl(e, n), o = hl(e, Ul(r) ?? a.encoding, n);
9976
9971
  return {
9977
9972
  bytes: e,
9978
9973
  ...ql(o.text, t),
9979
- ...Gl(a, o),
9974
+ ...Wl(a, o),
9980
9975
  encodingCandidates: a.candidates,
9981
9976
  fileTypeConfig: i,
9982
9977
  isComplete: n,
9983
9978
  text: o.text
9984
9979
  };
9985
9980
  }
9986
- function Ul(e, t, n, r) {
9981
+ function Hl(e, t, n, r) {
9987
9982
  let i = Object.hasOwn(Ll, t.ext) ? Ll[t.ext] : void 0, a = {
9988
9983
  dataFormatId: i,
9989
9984
  dataFormatSourceId: i == null ? void 0 : "fileContent"
9990
9985
  };
9991
9986
  if (t.ext === "xml") {
9992
- let i = ml(e), o = hl(e, Wl(r) ?? i.encoding, n);
9987
+ let i = ml(e), o = hl(e, Ul(r) ?? i.encoding, n);
9993
9988
  return {
9994
9989
  bytes: e,
9995
9990
  ...a,
9996
- ...Gl(i, o),
9991
+ ...Wl(i, o),
9997
9992
  encodingCandidates: void 0,
9998
9993
  fileTypeConfig: t,
9999
9994
  isComplete: n,
@@ -10014,13 +10009,13 @@ function Ul(e, t, n, r) {
10014
10009
  text: gl(e)
10015
10010
  };
10016
10011
  }
10017
- function Wl(e) {
10012
+ function Ul(e) {
10018
10013
  return e == null ? void 0 : {
10019
10014
  id: e,
10020
10015
  confidenceLevel: 1
10021
10016
  };
10022
10017
  }
10023
- function Gl(e, t) {
10018
+ function Wl(e, t) {
10024
10019
  return {
10025
10020
  decodedEncodingId: t.encoding.id,
10026
10021
  encodingId: e.encoding.id,
@@ -10029,6 +10024,10 @@ function Gl(e, t) {
10029
10024
  replacementCharacterCount: t.replacementCharacterCount
10030
10025
  };
10031
10026
  }
10027
+ function Gl(e, t, n) {
10028
+ let r = /\/(\d+)$/.exec(e.headers.get("content-range") ?? "")?.[1];
10029
+ return r == null ? e.status !== 206 || t < n : t >= Number(r);
10030
+ }
10032
10031
  function Kl(e, t) {
10033
10032
  let n = e?.split(";", 1)[0]?.trim().toLowerCase();
10034
10033
  return n != null && n !== "" && n !== "application/octet-stream" ? n === "text/markdown" ? "mimeType" : void 0 : t != null && Rl.has(t) ? "extension" : void 0;