@dpuse/dpuse-tool-file-previewer 1.0.131 → 1.0.134
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 +10 -12
- package/dist/dpuse-tool-file-previewer.es.js +6608 -6556
- package/dist/dpuse-tool-file-previewer.es.js.map +1 -1
- package/dist/shipped-packages.json +1 -1
- package/dist/types/src/encoding.d.ts +20 -0
- package/dist/types/src/index.d.ts +3 -18
- package/dist/types/src/jsonDetection.d.ts +2 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
# DPUse File Previewer Tool
|
|
2
2
|
|
|
3
|
-
[](./LICENSE)
|
|
4
|
-
[](https://www.npmjs.com/package/@dpuse/dpuse-tool-file-previewer)
|
|
5
|
-
|
|
6
3
|
<!-- OPENING_START -->
|
|
7
4
|
|
|
8
5
|
[](./LICENSE)
|
|
@@ -10,7 +7,7 @@
|
|
|
10
7
|
[](https://www.npmjs.com/package/@dpuse/dpuse-tool-file-previewer)
|
|
11
8
|
[](https://github.com/dpuse/dpuse-tool-file-previewer/actions/workflows/ci.yml)
|
|
12
9
|
|
|
13
|
-
|
|
10
|
+
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.
|
|
14
11
|
|
|
15
12
|
[Report a Vulnerability](https://github.com/dpuse/dpuse-tool-file-previewer/security/advisories/new) · [Open an Issue](https://github.com/dpuse/dpuse-tool-file-previewer/issues)
|
|
16
13
|
|
|
@@ -28,7 +25,7 @@ In addition, DPUse provides [Tools](https://www.dpuse.app) used by the applicati
|
|
|
28
25
|
|
|
29
26
|
## Introduction
|
|
30
27
|
|
|
31
|
-
|
|
28
|
+
The File Previewer Tool reads the start of a file and identifies its format and encoding, so a connector can show a preview before the file is parsed. It recognises binary data formats such as Parquet, Arrow, Avro, Excel, OpenDocument and SQLite, decodes text using its byte order mark, its XML declaration or detection from its content, and tells JSON, JSON Lines, markdown and delimited text apart.
|
|
32
29
|
|
|
33
30
|
<!-- OPENING_END -->
|
|
34
31
|
|
|
@@ -65,7 +62,7 @@ License data is updated each time `npm run document` is run, using [license-chec
|
|
|
65
62
|
| Dependency | Version | License(s) | Document |
|
|
66
63
|
| :--------------------------------------------------------------------- | :-----: | :--------- | :-------------------------------------------------------------------- |
|
|
67
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) |
|
|
68
|
-
| [@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared) | 1.0.
|
|
65
|
+
| [@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared) | 1.0.209 | MIT | [LICENSE](licenses/downloads/@dpuse/dpuse-shared@1.0.209-LICENSE.txt) |
|
|
69
66
|
| [@tokenizer/inflate](https://github.com/Borewit/tokenizer-inflate) | 0.6.0 | MIT | [LICENSE](licenses/downloads/@tokenizer/inflate@0.6.0-LICENSE.txt) |
|
|
70
67
|
| [debug](https://github.com/debug-js/debug) | 4.4.3 | MIT | [LICENSE](licenses/downloads/debug@4.4.3-LICENSE.txt) |
|
|
71
68
|
| [file-type](https://github.com/sindresorhus/file-type) | 22.3.0 | MIT | [LICENSE](licenses/downloads/file-type@22.3.0-LICENSE.txt) |
|
|
@@ -80,7 +77,7 @@ License data is updated each time `npm run document` is run, using [license-chec
|
|
|
80
77
|
|
|
81
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.
|
|
82
79
|
|
|
83
|
-
- **[@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared)** 1.0.
|
|
80
|
+
- **[@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared)** 1.0.209 — this month: 2026-11-11
|
|
84
81
|
- **[file-type](https://github.com/sindresorhus/file-type)** 22.3.0 — this month: 2026-10-29
|
|
85
82
|
- **[valibot](https://github.com/open-circle/valibot)** 1.5.0 — 2 mths ago: 2026-09-09
|
|
86
83
|
- **[file-type](https://github.com/sindresorhus/file-type)** 22.3.0 — this month: 2026-10-29
|
|
@@ -106,8 +103,8 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
|
|
|
106
103
|
|
|
107
104
|
| Chunk/Module/File | Composition |
|
|
108
105
|
| :---------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------ |
|
|
109
|
-
| **dist/dpuse-tool-file-previewer.es.js** |
|
|
110
|
-
| jschardet → dist/jschardet.esm.min.js | `██████████████████░░` 89.6% ·
|
|
106
|
+
| **dist/dpuse-tool-file-previewer.es.js** | 1263.9 kB · gzip 724.5 kB · 100.0% of the build |
|
|
107
|
+
| jschardet → dist/jschardet.esm.min.js | `██████████████████░░` 89.6% · 1132.0 kB |
|
|
111
108
|
| file-type → source/index.js + 7 more | `█░░░░░░░░░░░░░░░░░░░` 3.4% · 42.9 kB |
|
|
112
109
|
| ↳ 8 smaller files | `▒░░░░░░░░░░░░░░░░░░░` 3.4% · 42.9 kB |
|
|
113
110
|
| @dpuse/dpuse-shared → dist/dpuse-shared.es.js | `░░░░░░░░░░░░░░░░░░░░` 1.8% · 22.5 kB |
|
|
@@ -115,14 +112,15 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
|
|
|
115
112
|
| ↳ 16 smaller files | `░░░░░░░░░░░░░░░░░░░░` 1.1% · 13.8 kB |
|
|
116
113
|
| @tokenizer/inflate → lib/ZipHandler.js + 3 more | `░░░░░░░░░░░░░░░░░░░░` 0.8% · 10.2 kB |
|
|
117
114
|
| ↳ 4 smaller files | `░░░░░░░░░░░░░░░░░░░░` 0.8% · 10.2 kB |
|
|
118
|
-
| src → index.ts
|
|
115
|
+
| src → index.ts + 2 more | `░░░░░░░░░░░░░░░░░░░░` 0.6% · 8.0 kB |
|
|
116
|
+
| ↳ 3 smaller files | `░░░░░░░░░░░░░░░░░░░░` 0.6% · 8.0 kB |
|
|
119
117
|
| debug → src/browser.js + 1 more | `░░░░░░░░░░░░░░░░░░░░` 0.4% · 5.1 kB |
|
|
120
118
|
| ↳ 2 smaller files | `░░░░░░░░░░░░░░░░░░░░` 0.4% · 5.1 kB |
|
|
121
|
-
| @borewit/text-codec → lib/index.js | `░░░░░░░░░░░░░░░░░░░░` 0.4% ·
|
|
119
|
+
| @borewit/text-codec → lib/index.js | `░░░░░░░░░░░░░░░░░░░░` 0.4% · 4.9 kB |
|
|
122
120
|
| ms → index.js | `░░░░░░░░░░░░░░░░░░░░` 0.1% · 1.6 kB |
|
|
123
121
|
| token-types → dist/lib/index.js | `░░░░░░░░░░░░░░░░░░░░` 0.1% · 1.2 kB |
|
|
124
122
|
| uint8array-extras → index.js | `░░░░░░░░░░░░░░░░░░░░` 0.1% · 1.2 kB |
|
|
125
|
-
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 1.6% · 20.
|
|
123
|
+
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 1.6% · 20.7 kB |
|
|
126
124
|
|
|
127
125
|
Bars show each row's share of its output file. ↳ rows are part of the row above.
|
|
128
126
|
|