@dpuse/dpuse-tool-file-previewer 1.0.136 → 1.0.138
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 +65 -58
- package/dist/dpuse-tool-file-previewer.es.js +987 -894
- package/dist/shipped-packages.json +1 -1
- package/package.json +15 -13
- package/dist/dpuse-tool-file-previewer.es.js.map +0 -1
package/README.md
CHANGED
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
<!-- OPENING_START -->
|
|
4
4
|
|
|
5
5
|
[](./LICENSE)
|
|
6
|
+
[](https://github.com/dpuse/dpuse-tool-file-previewer/actions/workflows/ci.yml)
|
|
7
|
+
[](https://github.com/dpuse/dpuse-tool-file-previewer/security/code-scanning)
|
|
8
|
+

|
|
6
9
|
[](https://github.com/dpuse/dpuse-tool-file-previewer/releases/latest)
|
|
7
10
|
[](https://www.npmjs.com/package/@dpuse/dpuse-tool-file-previewer)
|
|
8
|
-
[](https://github.com/dpuse/dpuse-tool-file-previewer/actions/workflows/ci.yml)
|
|
9
11
|
|
|
10
12
|
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.
|
|
11
13
|
|
|
@@ -13,15 +15,15 @@ A library that wraps file-type and jschardet to identify a file's format and enc
|
|
|
13
15
|
|
|
14
16
|
## About DPUse
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
DPUse (Data Positioning & Use) is a browser-based app that helps you prepare your data for use in two main steps: Sourcing and Contextualising. Once your data is contextualised, Presentations and Cookbooks give you two ways to put it to use.
|
|
17
19
|
|
|
18
|
-
**Sourcing** uses
|
|
20
|
+
**Sourcing** uses Connectors to link to applications, databases, file stores, and curated datasets. These Connections help you set up tabular Data Views from your sources.
|
|
19
21
|
|
|
20
|
-
**Contextualising**
|
|
22
|
+
**Contextualising** maps events from your Data Views to detailed Context Models. These models give the DPUse Engine the structure it needs to create clear transactions, facts, or observations.
|
|
21
23
|
|
|
22
|
-
**
|
|
24
|
+
**Presentations** use ready-made Presenters to show your contextualised data in a meaningful way as soon as it's ready.
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
**Cookbooks** of Recipes guide you in building Data Apps, and additional Presenters, with your contextualised data using your preferred tools.
|
|
25
27
|
|
|
26
28
|
## Introduction
|
|
27
29
|
|
|
@@ -39,6 +41,8 @@ This [package](https://www.npmjs.com/package/@dpuse/dpuse-tool-file-previewer) i
|
|
|
39
41
|
npm install @dpuse/dpuse-tool-file-previewer
|
|
40
42
|
```
|
|
41
43
|
|
|
44
|
+
_Requires [Node.js](https://nodejs.org/) 24 or later, [npm](https://www.npmjs.com/) 12 or later._
|
|
45
|
+
|
|
42
46
|
To work on the source instead, clone this repository.
|
|
43
47
|
|
|
44
48
|
```bash
|
|
@@ -47,22 +51,30 @@ cd dpuse-tool-file-previewer
|
|
|
47
51
|
npm install
|
|
48
52
|
```
|
|
49
53
|
|
|
50
|
-
|
|
54
|
+
_Working on the source also requires [TypeScript](https://www.typescriptlang.org/) 6.0.3 or a later 6.0 release. Later versions, including TypeScript 7, are not supported yet._
|
|
51
55
|
|
|
52
56
|
This repository is managed using the common set of actions provided by [@dpuse/dpuse-development](https://github.com/dpuse/dpuse-development). See the `scripts` block in [package.json](https://github.com/dpuse/dpuse-tool-file-previewer/blob/main/package.json) for details.
|
|
53
57
|
|
|
58
|
+
### Release Status
|
|
59
|
+
|
|
60
|
+
DPUse is a new product, and this package is a release candidate: complete and in use across DPUse, but not yet at its first stable release.
|
|
61
|
+
|
|
62
|
+
The last number of the version increases with every push to GitHub, whether or not that push is released, so the versions of consecutive releases can skip numbers, for example from 1.1.120 to 1.1.124. Until the first stable release, any release may include changes that need updates in the projects that use it, so depend on an exact version to avoid unexpected changes. Once stable, versions will follow [Semantic Versioning](https://semver.org): breaking changes in the first number, new features in the second and fixes in the last.
|
|
63
|
+
|
|
64
|
+
Every release is listed on the [Releases](https://github.com/dpuse/dpuse-tool-file-previewer/releases) page.
|
|
65
|
+
|
|
54
66
|
<!-- USAGE_END -->
|
|
55
67
|
|
|
56
68
|
<!-- DEPENDENCY_LICENSES_START -->
|
|
57
69
|
|
|
58
70
|
## Dependency Licenses
|
|
59
71
|
|
|
60
|
-
License data is updated each time `npm run document` is run, using [
|
|
72
|
+
License data is updated each time `npm run document` is run, using [CycloneDX](https://github.com/CycloneDX/cyclonedx-node-npm). The following table lists every package whose code, styles or assets are included in this project's build, as recorded by the build itself. Modules loaded at run time are not included; each documents its own. These dependencies have been checked and confirmed to use 0BSD or MIT, all of which allow commercial use. All are used as published. Where the build has to adjust a dependency so it can be bundled, the adjustment only affects how its files are located and loaded, never what the code does. Developers cloning this repository should independently verify development dependencies.
|
|
61
73
|
|
|
62
74
|
| Dependency | Version | License(s) | Document |
|
|
63
75
|
| :--------------------------------------------------------------------- | :-----: | :--------- | :-------------------------------------------------------------------- |
|
|
64
76
|
| [@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.
|
|
77
|
+
| [@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared) | 1.0.256 | MIT | [LICENSE](licenses/downloads/@dpuse/dpuse-shared@1.0.256-LICENSE.txt) |
|
|
66
78
|
| [@tokenizer/inflate](https://github.com/Borewit/tokenizer-inflate) | 0.6.0 | MIT | [LICENSE](licenses/downloads/@tokenizer/inflate@0.6.0-LICENSE.txt) |
|
|
67
79
|
| [debug](https://github.com/debug-js/debug) | 4.4.3 | MIT | [LICENSE](licenses/downloads/debug@4.4.3-LICENSE.txt) |
|
|
68
80
|
| [file-type](https://github.com/sindresorhus/file-type) | 22.3.0 | MIT | [LICENSE](licenses/downloads/file-type@22.3.0-LICENSE.txt) |
|
|
@@ -77,19 +89,20 @@ License data is updated each time `npm run document` is run, using [license-chec
|
|
|
77
89
|
|
|
78
90
|
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
91
|
|
|
80
|
-
- **[@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared)** 1.0.
|
|
92
|
+
- **[@dpuse/dpuse-shared](https://github.com/dpuse/dpuse-shared)** 1.0.256 — this month: 2026-11-28
|
|
81
93
|
- **[file-type](https://github.com/sindresorhus/file-type)** 22.3.0 — this month: 2026-10-29
|
|
82
94
|
- **[valibot](https://github.com/open-circle/valibot)** 1.5.0 — 2 mths ago: 2026-09-09
|
|
83
95
|
- **[file-type](https://github.com/sindresorhus/file-type)** 22.3.0 — this month: 2026-10-29
|
|
84
|
-
- **[@tokenizer/inflate](https://github.com/Borewit/tokenizer-inflate)** 0.6.0 — this month: 2026-
|
|
85
|
-
- **[debug](https://github.com/debug-js/debug)** 4.4.3 —
|
|
86
|
-
- **[strtok3](https://github.com/Borewit/strtok3)** 10.7.0 — this month: 2026-11-02
|
|
96
|
+
- **[@tokenizer/inflate](https://github.com/Borewit/tokenizer-inflate)** 0.6.0 — 1 mth ago: 2026-10-24 → latest: 0.6.1 — this month: 2026-11-15 ❗
|
|
97
|
+
- **[debug](https://github.com/debug-js/debug)** 4.4.3 — 14 mths ago: 2025-09-13 ⚠️
|
|
98
|
+
- **[strtok3](https://github.com/Borewit/strtok3)** 10.7.0 — this month: 2026-11-02 → latest: 10.8.0 — this month: 2026-11-13 ❗
|
|
87
99
|
- **[token-types](https://github.com/Borewit/token-types)** 6.2.0 — this month: 2026-11-02
|
|
88
|
-
- **[strtok3](https://github.com/Borewit/strtok3)** 10.7.0 — this month: 2026-11-02
|
|
100
|
+
- **[strtok3](https://github.com/Borewit/strtok3)** 10.7.0 — this month: 2026-11-02 → latest: 10.8.0 — this month: 2026-11-13 ❗
|
|
89
101
|
- **[token-types](https://github.com/Borewit/token-types)** 6.2.0 — this month: 2026-11-02
|
|
90
|
-
- **[@borewit/text-codec](https://github.com/Borewit/text-codec)** 0.2.3 —
|
|
91
|
-
- **[uint8array-extras](https://github.com/sindresorhus/uint8array-extras)** 1.6.0 —
|
|
92
|
-
- **[jschardet](https://github.com/aadsm/jschardet)** 4.1.0 —
|
|
102
|
+
- **[@borewit/text-codec](https://github.com/Borewit/text-codec)** 0.2.3 — 1 mth ago: 2026-10-28
|
|
103
|
+
- **[uint8array-extras](https://github.com/sindresorhus/uint8array-extras)** 1.6.0 — 2 mths ago: 2026-09-26
|
|
104
|
+
- **[jschardet](https://github.com/aadsm/jschardet)** 4.1.0 — 1 mth ago: 2026-10-25
|
|
105
|
+
- **[ms](https://github.com/vercel/ms)** 2.1.3 — 71 mths ago: 2020-12-08 ⚠️
|
|
93
106
|
|
|
94
107
|
<!-- DEPENDENCY_LICENSES_END -->
|
|
95
108
|
|
|
@@ -101,28 +114,23 @@ This report is updated with each release, from the bundle the release builds, us
|
|
|
101
114
|
|
|
102
115
|
_Note: Sonda's Vite reports currently exclude CSS files, since Vite does not generate source maps for CSS._
|
|
103
116
|
|
|
104
|
-
| Chunk/Module/File | Composition
|
|
105
|
-
| :---------------------------------------------------------------------- |
|
|
106
|
-
| **dist/dpuse-tool-file-previewer.es.js** |
|
|
107
|
-
| jschardet → dist/jschardet.esm.min.js | `██████████████████░░` 89.
|
|
108
|
-
| file-type → source/index.js + 7 more | `█░░░░░░░░░░░░░░░░░░░` 3.4% · 42.9 kB
|
|
109
|
-
|  
|
|
110
|
-
|  
|
|
111
|
-
|  
|
|
112
|
-
|  
|
|
113
|
-
|  
|
|
114
|
-
|  
|
|
115
|
-
|
|
|
116
|
-
|  
|
|
117
|
-
|
|
|
118
|
-
|  
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
| token-types → dist/lib/index.js | `░░░░░░░░░░░░░░░░░░░░` 0.1% · 1.2 kB |
|
|
122
|
-
| uint8array-extras → index.js | `░░░░░░░░░░░░░░░░░░░░` 0.1% · 1.2 kB |
|
|
123
|
-
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 1.6% · 20.7 kB |
|
|
124
|
-
|
|
125
|
-
Bars show each row's share of its output file. ↳ rows are part of the row above.
|
|
117
|
+
| Chunk/Module/File | Composition |
|
|
118
|
+
| :---------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- |
|
|
119
|
+
| **dist/dpuse-tool-file-previewer.es.js** | 1.2 MB · gzip 724.6 kB · 100.0% of the build |
|
|
120
|
+
| jschardet → dist/jschardet.esm.min.js | `██████████████████░░` 89.5% · 1.1 MB |
|
|
121
|
+
| file-type → source/index.js + 7 more | `█░░░░░░░░░░░░░░░░░░░` 3.4% · 42.9 kB |
|
|
122
|
+
| @dpuse/dpuse-shared → dist/dpuse-shared.es.js | `░░░░░░░░░░░░░░░░░░░░` 1.9% · 23.7 kB |
|
|
123
|
+
| strtok3 → lib/TokenizerView.js + 15 more | `░░░░░░░░░░░░░░░░░░░░` 1.1% · 13.7 kB |
|
|
124
|
+
| @tokenizer/inflate → lib/ZipHandler.js + 3 more | `░░░░░░░░░░░░░░░░░░░░` 0.8% · 10.2 kB |
|
|
125
|
+
| src → index.ts + 2 more | `░░░░░░░░░░░░░░░░░░░░` 0.6% · 7.7 kB |
|
|
126
|
+
| debug → src/browser.js + 1 more | `░░░░░░░░░░░░░░░░░░░░` 0.4% · 5.0 kB |
|
|
127
|
+
| @borewit/text-codec → lib/index.js | `░░░░░░░░░░░░░░░░░░░░` 0.4% · 4.9 kB |
|
|
128
|
+
| ms → index.js | `░░░░░░░░░░░░░░░░░░░░` 0.1% · 1.6 kB |
|
|
129
|
+
| token-types → dist/lib/index.js | `░░░░░░░░░░░░░░░░░░░░` 0.1% · 1.2 kB |
|
|
130
|
+
| uint8array-extras → index.js | `░░░░░░░░░░░░░░░░░░░░` 0.1% · 1.2 kB |
|
|
131
|
+
| (bundler output, whitespace & JSON) | `░░░░░░░░░░░░░░░░░░░░` 1.6% · 20.8 kB |
|
|
132
|
+
|
|
133
|
+
Bars show each row's share of its output file.
|
|
126
134
|
|
|
127
135
|
- n more = the row also holds n more files from the same package or folder, each no larger than the one named. A package can appear under several output files, each holding different files, never the same file twice.
|
|
128
136
|
|
|
@@ -138,36 +146,35 @@ This section is updated each time `npm run document` is run. Settings come from
|
|
|
138
146
|
|
|
139
147
|
### Testing
|
|
140
148
|
|
|
141
|
-
| Check | Status | What it does
|
|
142
|
-
| :------------------- | :----- |
|
|
143
|
-
| Unit tests | ✅ On | [Vitest](https://vitest.dev) runs the unit tests. Part of the [CI workflow](https://github.com/dpuse/dpuse-tool-file-previewer/actions/workflows/ci.yml) on every push and pull request to `main`.
|
|
144
|
-
| Property-based tests | ❌ Off | [fast-check](https://fast-check.dev) runs many random inputs per test to find edge cases, alongside the unit tests.
|
|
145
|
-
| Test coverage | ✅ On |
|
|
149
|
+
| Check | Status | What it does |
|
|
150
|
+
| :------------------- | :----- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
151
|
+
| Unit tests | ✅ On | [Vitest](https://vitest.dev) runs the unit tests. Part of the [CI workflow](https://github.com/dpuse/dpuse-tool-file-previewer/actions/workflows/ci.yml) on every push and pull request to `main`. |
|
|
152
|
+
| Property-based tests | ❌ Off | [fast-check](https://fast-check.dev) runs many random inputs per test to find edge cases, alongside the unit tests. |
|
|
153
|
+
| Test coverage | ✅ On | [Vitest's V8 coverage](https://vitest.dev/guide/coverage) measures the share of source lines the unit tests run. |
|
|
146
154
|
|
|
147
155
|
### Code Quality
|
|
148
156
|
|
|
149
|
-
| Check | Status | What it does
|
|
150
|
-
| :------------ | :----- |
|
|
151
|
-
|
|
|
152
|
-
|
|
|
157
|
+
| Check | Status | What it does |
|
|
158
|
+
| :------------ | :----- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
159
|
+
| Linting | ✅ On | [ESLint](https://eslint.org) checks the code for errors and style problems, and the [TypeScript](https://www.typescriptlang.org/) compiler type-checks the whole project. Part of the [CI workflow](https://github.com/dpuse/dpuse-tool-file-previewer/actions/workflows/ci.yml) on every push and pull request to `main`. |
|
|
160
|
+
| Code analysis | ❌ Off | [SonarCloud](https://sonarcloud.io) checks every push for bugs, code smells and vulnerabilities. |
|
|
153
161
|
|
|
154
162
|
### Security Analysis
|
|
155
163
|
|
|
156
|
-
| Check | Status | What it does
|
|
157
|
-
| :-------------- | :----- |
|
|
158
|
-
| Push protection | ✅ On | [GitHub push protection](https://docs.github.com/en/code-security/secret-scanning/push-protection-for-repositories-and-organizations) blocks pushes that contain credentials.
|
|
159
|
-
| Static analysis | ✅ On | [
|
|
160
|
-
| Secret scanning | ✅ On | [GitHub secret scanning](https://docs.github.com/en/code-security/secret-scanning) detects credentials, such as API keys and tokens, committed to the repository.
|
|
164
|
+
| Check | Status | What it does |
|
|
165
|
+
| :-------------- | :----- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
166
|
+
| Push protection | ✅ On | [GitHub push protection](https://docs.github.com/en/code-security/secret-scanning/push-protection-for-repositories-and-organizations) blocks pushes that contain credentials. |
|
|
167
|
+
| Static analysis | ✅ On | [GitHub CodeQL](https://codeql.github.com) scans GitHub Actions and JavaScript/TypeScript for security vulnerabilities, using the extended security queries, on every push and pull request to `main` and weekly. |
|
|
168
|
+
| Secret scanning | ✅ On | [GitHub secret scanning](https://docs.github.com/en/code-security/secret-scanning) detects credentials, such as API keys and tokens, committed to the repository. |
|
|
161
169
|
|
|
162
170
|
### Dependencies
|
|
163
171
|
|
|
164
172
|
| Check | Status | What it does |
|
|
165
173
|
| :------------------ | :----- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
166
174
|
| Vulnerability audit | ✅ On | [npm audit](https://docs.npmjs.com/cli/commands/npm-audit) fails when a shipped dependency has any known vulnerability, or a development dependency has a high or critical one. Part of the [CI workflow](https://github.com/dpuse/dpuse-tool-file-previewer/actions/workflows/ci.yml) on every push and pull request to `main`. |
|
|
167
|
-
| Supply chain risk | ✅ On | [Socket](https://socket.dev) flags malicious packages, typosquatting and suspicious behaviour that may not yet have a CVE.
|
|
168
|
-
| Security alerts | ✅ On | [Dependabot](https://docs.github.com/en/code-security/dependabot) alerts when a dependency has a known vulnerability, using the GitHub Advisory Database.
|
|
169
|
-
|
|
|
170
|
-
| Version updates | ❌ Off | [Dependabot](https://docs.github.com/en/code-security/dependabot) opens pull requests for new dependency versions. These are handled manually. |
|
|
175
|
+
| Supply chain risk | ✅ On | [Socket.dev](https://socket.dev) flags malicious packages, typosquatting and suspicious behaviour that may not yet have a CVE. |
|
|
176
|
+
| Security alerts | ✅ On | [GitHub Dependabot](https://docs.github.com/en/code-security/dependabot) alerts when a dependency has a known vulnerability, using the GitHub Advisory Database. |
|
|
177
|
+
| Dependency updates | ❌ Off | [GitHub Dependabot](https://docs.github.com/en/code-security/dependabot) can open pull requests for new and vulnerable dependency versions. Dependencies are updated by hand with `npm run check` instead. |
|
|
171
178
|
|
|
172
179
|
### OpenSSF 🚧
|
|
173
180
|
|
|
@@ -185,7 +192,7 @@ Please do not open public GitHub issues for security vulnerabilities. Use [GitHu
|
|
|
185
192
|
|
|
186
193
|
## Contributing
|
|
187
194
|
|
|
188
|
-
This repository is maintained solely by its owner and does not, at present, accept external contributions
|
|
195
|
+
This repository is maintained solely by its owner and does not, at present, accept external contributions.
|
|
189
196
|
|
|
190
197
|
For security vulnerabilities, see [Reporting Vulnerabilities](#reporting-vulnerabilities). For bugs, inconsistencies, or other feedback, [open a GitHub issue](https://github.com/dpuse/dpuse-tool-file-previewer/issues) — feedback is read, but responses and fixes are at the maintainer's discretion.
|
|
191
198
|
|