@ts-pf/file 0.1.1 → 0.2.0
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/LICENSE +21 -0
- package/README.md +66 -3
- package/dist/codec.d.ts +2 -2
- package/dist/codec.d.ts.map +1 -1
- package/dist/codec.js +5 -29
- package/dist/codec.js.map +1 -1
- package/package.json +11 -8
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ts-pf contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,7 +1,70 @@
|
|
|
1
1
|
# @ts-pf/file
|
|
2
2
|
|
|
3
|
-
Opt-in `MultipartCodec` for
|
|
3
|
+
Opt-in `MultipartCodec` for `File` / `Blob` attachments in [ts-pf](https://github.com/crobinson42/ts-pf#readme). JSON calls stay JSON; a call whose input or output contains a `Blob` goes as `multipart/form-data` with the JSON envelope in part `rpc`. Same contracts, same typed errors.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Install
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
```sh
|
|
8
|
+
npm i @ts-pf/contract @ts-pf/server @ts-pf/server-http @ts-pf/client @ts-pf/client-http zod
|
|
9
|
+
npm i @ts-pf/file
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Use
|
|
13
|
+
|
|
14
|
+
Put `Blob` in a schema like any other value:
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
// contract.ts
|
|
18
|
+
import { procedure, router } from '@ts-pf/contract'
|
|
19
|
+
import { z } from 'zod'
|
|
20
|
+
|
|
21
|
+
export const contract = router({
|
|
22
|
+
avatar: {
|
|
23
|
+
upload: procedure
|
|
24
|
+
.input(z.object({ userId: z.string(), image: z.instanceof(Blob) }))
|
|
25
|
+
.output(z.object({ bytes: z.number() })),
|
|
26
|
+
},
|
|
27
|
+
})
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Put the same codec on both ends. Size caps are codec options, not a `HandlerPlugin`:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
// server.ts
|
|
34
|
+
import { createImplementer } from '@ts-pf/server'
|
|
35
|
+
import { FetchHandler } from '@ts-pf/server-http'
|
|
36
|
+
import { MultipartCodec } from '@ts-pf/file'
|
|
37
|
+
import { contract } from './contract.js'
|
|
38
|
+
|
|
39
|
+
const impl = createImplementer(contract)
|
|
40
|
+
export const app = impl.router({
|
|
41
|
+
avatar: {
|
|
42
|
+
upload: impl.avatar.upload.handler(async ({ input }) => ({ bytes: input.image.size })),
|
|
43
|
+
},
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
export const handler = new FetchHandler(app, {
|
|
47
|
+
codec: new MultipartCodec({ maxFiles: 1, maxFileSize: 5 * 1024 * 1024 }),
|
|
48
|
+
})
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
// client.ts
|
|
53
|
+
import { createClient } from '@ts-pf/client'
|
|
54
|
+
import { FetchLink } from '@ts-pf/client-http'
|
|
55
|
+
import { MultipartCodec } from '@ts-pf/file'
|
|
56
|
+
import type { contract } from './contract.js'
|
|
57
|
+
|
|
58
|
+
const client = createClient<typeof contract>(
|
|
59
|
+
new FetchLink({ url: '/rpc', codec: new MultipartCodec() }),
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
const image = new File(['…'], 'me.png', { type: 'image/png' })
|
|
63
|
+
await client.avatar.upload({ userId: 'u1', image }) // sent as multipart/form-data
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
`MultipartCodec` wraps `JSONCodec` (override with `{ inner }`). Wire details: [`PROTOCOL.md`](https://github.com/crobinson42/ts-pf/blob/main/packages/protocol/PROTOCOL.md) (Binary attachments). Serving `handler`: [root README](https://github.com/crobinson42/ts-pf#serving-fetchhandler).
|
|
67
|
+
|
|
68
|
+
## Agent skills
|
|
69
|
+
|
|
70
|
+
This package ships [`ts-pf-file`](https://github.com/crobinson42/ts-pf/blob/main/packages/file/skills/ts-pf-file/SKILL.md). Sync with `npx skills experimental_sync -y`.
|
package/dist/codec.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type RpcBodySource, type RpcCodec, type RpcEncodedBody } from '@ts-pf/http';
|
|
1
|
+
import { type EnvelopeTextCodec, type RpcBodySource, type RpcCodec, type RpcEncodedBody } from '@ts-pf/http';
|
|
2
2
|
import { type RpcRequest, type RpcResponse } from '@ts-pf/protocol';
|
|
3
3
|
export declare class MultipartCodec implements RpcCodec {
|
|
4
4
|
private readonly inner;
|
|
5
5
|
private readonly maxFiles;
|
|
6
6
|
private readonly maxFileSize;
|
|
7
7
|
constructor(options?: {
|
|
8
|
-
inner?:
|
|
8
|
+
inner?: EnvelopeTextCodec;
|
|
9
9
|
maxFiles?: number;
|
|
10
10
|
maxFileSize?: number;
|
|
11
11
|
});
|
package/dist/codec.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../src/codec.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../src/codec.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EAKtB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,cAAc,EAEpB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAW,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAmB5E,qBAAa,cAAe,YAAW,QAAQ;IAC7C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAmB;IACzC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;IACjC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAQ;gBAExB,OAAO,CAAC,EAAE;QACpB,KAAK,CAAC,EAAE,iBAAiB,CAAA;QACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB;IAMK,aAAa,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC;IAMvD,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC;IAczD,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;IAM1D,aAAa,CAAC,KAAK,EAAE;QACnB,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,CAAC,EAAE,OAAO,CAAA;KACf,GAAG,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;IAItC,cAAc,CAAC,CAAC,GAAG,OAAO,EAC9B,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAmBZ,eAAe;YAsBf,aAAa;CA+B5B"}
|
package/dist/codec.js
CHANGED
|
@@ -1,38 +1,14 @@
|
|
|
1
|
-
import { JSONCodec, } from '@ts-pf/http';
|
|
1
|
+
import { isJsonContentType, JSONCodec, jsonBodySource, mimeType, } from '@ts-pf/http';
|
|
2
2
|
import { PFError } from '@ts-pf/protocol';
|
|
3
3
|
import { assertNoPlaceholders, extractFiles, fileFromPart, injectFiles, } from './files.js';
|
|
4
4
|
const DEFAULT_MAX_FILES = 32;
|
|
5
5
|
const DEFAULT_MAX_FILE_SIZE = 10 * 1024 * 1024;
|
|
6
|
-
function mime(contentType) {
|
|
7
|
-
if (contentType == null || contentType === '') {
|
|
8
|
-
return '';
|
|
9
|
-
}
|
|
10
|
-
return contentType.split(';')[0]?.trim().toLowerCase() ?? '';
|
|
11
|
-
}
|
|
12
|
-
function isJsonContentType(contentType) {
|
|
13
|
-
const type = mime(contentType);
|
|
14
|
-
return type === '' || type === 'application/json';
|
|
15
|
-
}
|
|
16
6
|
function isMultipartContentType(contentType) {
|
|
17
|
-
return
|
|
7
|
+
return mimeType(contentType) === 'multipart/form-data';
|
|
18
8
|
}
|
|
19
9
|
function badRequest(message) {
|
|
20
10
|
return new PFError({ code: 'BAD_REQUEST', status: 400, message });
|
|
21
11
|
}
|
|
22
|
-
function jsonSource(text) {
|
|
23
|
-
return {
|
|
24
|
-
contentType: 'application/json',
|
|
25
|
-
text: async () => text,
|
|
26
|
-
formData: async () => new FormData(),
|
|
27
|
-
body: () => null,
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
async function jsonText(encoded) {
|
|
31
|
-
if (typeof encoded.body === 'string') {
|
|
32
|
-
return encoded.body;
|
|
33
|
-
}
|
|
34
|
-
throw new Error('MultipartCodec inner codec must produce a JSON string');
|
|
35
|
-
}
|
|
36
12
|
export class MultipartCodec {
|
|
37
13
|
inner;
|
|
38
14
|
maxFiles;
|
|
@@ -48,7 +24,7 @@ export class MultipartCodec {
|
|
|
48
24
|
async decodeRequest(source) {
|
|
49
25
|
if (isMultipartContentType(source.contentType)) {
|
|
50
26
|
const { json, parts } = await this.readMultipart(source);
|
|
51
|
-
const decoded = await this.inner.decodeRequest(
|
|
27
|
+
const decoded = await this.inner.decodeRequest(jsonBodySource(json));
|
|
52
28
|
return { input: injectFiles(decoded.input, parts) };
|
|
53
29
|
}
|
|
54
30
|
if (!isJsonContentType(source.contentType)) {
|
|
@@ -67,7 +43,7 @@ export class MultipartCodec {
|
|
|
67
43
|
async decodeResponse(source) {
|
|
68
44
|
if (isMultipartContentType(source.contentType)) {
|
|
69
45
|
const { json, parts } = await this.readMultipart(source);
|
|
70
|
-
const decoded = await this.inner.decodeResponse(
|
|
46
|
+
const decoded = await this.inner.decodeResponse(jsonBodySource(json));
|
|
71
47
|
if (!decoded.ok) {
|
|
72
48
|
return decoded;
|
|
73
49
|
}
|
|
@@ -91,7 +67,7 @@ export class MultipartCodec {
|
|
|
91
67
|
if (extracted.files.length === 0) {
|
|
92
68
|
return encoded;
|
|
93
69
|
}
|
|
94
|
-
const json =
|
|
70
|
+
const json = encoded.body;
|
|
95
71
|
const form = new FormData();
|
|
96
72
|
form.set('rpc', new Blob([json], { type: 'application/json' }));
|
|
97
73
|
for (const [index, file] of extracted.files.entries()) {
|
package/dist/codec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec.js","sourceRoot":"","sources":["../src/codec.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"codec.js","sourceRoot":"","sources":["../src/codec.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,QAAQ,GAKT,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,OAAO,EAAqC,MAAM,iBAAiB,CAAA;AAC5E,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GAAG,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QACF,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAA;IACxB,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ts-pf/file",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Opt-in MultipartCodec for File/Blob attachments",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ts-pf",
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
"form-data"
|
|
17
17
|
],
|
|
18
18
|
"license": "MIT",
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=22"
|
|
21
|
+
},
|
|
19
22
|
"repository": {
|
|
20
23
|
"type": "git",
|
|
21
24
|
"url": "git+https://github.com/crobinson42/ts-pf.git",
|
|
@@ -47,15 +50,15 @@
|
|
|
47
50
|
"lint": "biome check src tests"
|
|
48
51
|
},
|
|
49
52
|
"dependencies": {
|
|
50
|
-
"@ts-pf/http": "0.
|
|
51
|
-
"@ts-pf/protocol": "0.
|
|
53
|
+
"@ts-pf/http": "0.2.0",
|
|
54
|
+
"@ts-pf/protocol": "0.2.0"
|
|
52
55
|
},
|
|
53
56
|
"devDependencies": {
|
|
54
|
-
"@ts-pf/client": "0.
|
|
55
|
-
"@ts-pf/client-http": "0.
|
|
56
|
-
"@ts-pf/contract": "0.
|
|
57
|
-
"@ts-pf/server": "0.
|
|
58
|
-
"@ts-pf/server-http": "0.
|
|
57
|
+
"@ts-pf/client": "0.2.0",
|
|
58
|
+
"@ts-pf/client-http": "0.2.0",
|
|
59
|
+
"@ts-pf/contract": "0.2.0",
|
|
60
|
+
"@ts-pf/server": "0.4.0",
|
|
61
|
+
"@ts-pf/server-http": "0.3.0",
|
|
59
62
|
"zod": "^4.0.0"
|
|
60
63
|
}
|
|
61
64
|
}
|