@fgv/ts-http-storage 5.1.0-55 → 5.1.0-56
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/CAPABILITIES.md +29 -0
- package/package.json +11 -11
package/CAPABILITIES.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# `@fgv/ts-http-storage` — the server side of the HTTP `FileTree` backend
|
|
2
|
+
|
|
3
|
+
> **This file is authoritative for what ``@fgv/ts-http-storage`` provides and what not to hand-roll.**
|
|
4
|
+
> `README.md`, where present, is getting-started material. The always-loaded index at
|
|
5
|
+
> [`.ai/instructions/LIBRARY_CAPABILITIES.md`](../../.ai/instructions/LIBRARY_CAPABILITIES.md)
|
|
6
|
+
> routes here; it never duplicates this content.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
[libraries/ts-http-storage](https://github.com/ErikFortune/fgv/tree/release/libraries/ts-http-storage)
|
|
12
|
+
|
|
13
|
+
Defines the storage REST contract that `@fgv/ts-web-extras`' `HttpTreeAccessors` is the client for — `IHttpStorageProvider` (backend contract), `IStorageFileResponse` / `IStorageReadFileRequest` (wire shapes), `createStorageRoutes` (Hono routes: `GET /tree/item`, `GET /tree/children`, `GET /file`, `PUT /file`, `DELETE /file`, `POST /directories`, `POST /sync`), and `FsStorageProvider` (filesystem-backed implementation). **We own both ends of this wire**, so a representation gap here is a design decision, not an external constraint.
|
|
14
|
+
|
|
15
|
+
**Content encoding.** `StorageContentEncoding = 'utf8' | 'base64'` selects how a file's bytes ride in the `contents` string. `'utf8'` (the default, and what a provider signals by **omitting** `encoding` from the response) is **lossy** — it is a lenient WHATWG decode, so invalid sequences became U+FFFD before the wire and are unrecoverable downstream. `'base64'` is byte-faithful and is the only representation over which a consumer can decide whether the stored bytes were valid UTF-8, or read genuinely binary content; it costs ~33% more payload. Request it with `?encoding=base64` on `GET /file`; an unrecognized value is a **400**, never a silent downgrade. **`encoding` on the response describes what the server produced, not what the client asked for** — a provider that does not implement base64 answers in UTF-8 and says so by omission, and a client must branch on the response (a client that decoded on the strength of having *asked* would corrupt every such reply). Byte **writes** are still not supported: `PUT /file` carries `contents` as text.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Recent additions
|
|
22
|
+
|
|
23
|
+
*Newest first. **Generated** — see the repo index; do not hand-edit inside the markers.*
|
|
24
|
+
|
|
25
|
+
<!-- BEGIN GENERATED: recent-additions -->
|
|
26
|
+
|
|
27
|
+
*No stream has recorded a `sourceLine` against this package yet.*
|
|
28
|
+
|
|
29
|
+
<!-- END GENERATED: recent-additions -->
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fgv/ts-http-storage",
|
|
3
|
-
"version": "5.1.0-
|
|
3
|
+
"version": "5.1.0-56",
|
|
4
4
|
"description": "Reusable HTTP storage services for FileTree-style backends",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "dist/ts-http-storage.d.ts",
|
|
@@ -26,30 +26,30 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"hono": "~4.7.11",
|
|
29
|
-
"@fgv/ts-utils": "5.1.0-
|
|
29
|
+
"@fgv/ts-utils": "5.1.0-56"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@microsoft/api-documenter": "^7.28.2",
|
|
33
33
|
"@microsoft/api-extractor": "^7.55.2",
|
|
34
|
-
"@rushstack/heft": "1.
|
|
35
|
-
"@rushstack/heft-node-rig": "2.11.
|
|
34
|
+
"@rushstack/heft": "1.3.0",
|
|
35
|
+
"@rushstack/heft-node-rig": "2.11.50",
|
|
36
36
|
"@rushstack/eslint-config": "4.6.4",
|
|
37
37
|
"@types/heft-jest": "1.0.6",
|
|
38
|
-
"@types/jest": "^
|
|
38
|
+
"@types/jest": "^30.0.0",
|
|
39
39
|
"@types/node": "^20.14.9",
|
|
40
40
|
"@typescript-eslint/eslint-plugin": "^8.52.0",
|
|
41
41
|
"@typescript-eslint/parser": "^8.52.0",
|
|
42
42
|
"eslint": "^9.39.2",
|
|
43
43
|
"eslint-plugin-tsdoc": "~0.5.2",
|
|
44
|
-
"jest": "^
|
|
45
|
-
"ts-jest": "^29.4.
|
|
44
|
+
"jest": "^30.5.2",
|
|
45
|
+
"ts-jest": "^29.4.12",
|
|
46
46
|
"typescript": "5.9.3",
|
|
47
47
|
"typedoc": "~0.28.16",
|
|
48
48
|
"typedoc-plugin-markdown": "~4.9.0",
|
|
49
|
-
"@rushstack/heft-jest-plugin": "
|
|
50
|
-
"@fgv/ts-utils-jest": "5.1.0-
|
|
51
|
-
"@fgv/heft-dual-rig": "5.1.0-
|
|
52
|
-
"@fgv/typedoc-compact-theme": "5.1.0-
|
|
49
|
+
"@rushstack/heft-jest-plugin": "2.0.17",
|
|
50
|
+
"@fgv/ts-utils-jest": "5.1.0-56",
|
|
51
|
+
"@fgv/heft-dual-rig": "5.1.0-56",
|
|
52
|
+
"@fgv/typedoc-compact-theme": "5.1.0-56"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"build": "heft build --clean",
|