@orpc/node 2.0.0-beta.49 → 2.0.0-beta.51
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 -8
- package/dist/batch-response-compression-handler-plugin.d.ts +30 -29
- package/dist/batch-response-compression-handler-plugin.js +104 -125
- package/dist/index.d.ts +4 -3
- package/dist/index.js +3 -3
- package/dist/multipart.js +160 -211
- package/dist/static-file-handler-plugin.d.ts +74 -74
- package/dist/static-file-handler-plugin.js +175 -200
- package/dist/tmp-file-upload-handler-plugin.d.ts +92 -101
- package/dist/tmp-file-upload-handler-plugin.js +379 -451
- package/package.json +7 -7
- package/dist/multipart.d.ts +0 -60
package/dist/multipart.js
CHANGED
|
@@ -1,221 +1,170 @@
|
|
|
1
|
-
import { Buffer } from
|
|
1
|
+
import { Buffer } from "node:buffer";
|
|
2
|
+
// src/multipart.ts
|
|
2
3
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const MAX_PART_HEADER_SIZE =
|
|
7
|
-
const CRLF = /* @__PURE__ */ Buffer.from(
|
|
8
|
-
const HEADER_BLOCK_END = /* @__PURE__ */ Buffer.from(
|
|
4
|
+
* Part headers are tiny in practice, so an unterminated header block is cut off
|
|
5
|
+
* long before it can buffer a request-sized payload in memory.
|
|
6
|
+
*/
|
|
7
|
+
const MAX_PART_HEADER_SIZE = 16384;
|
|
8
|
+
const CRLF = /* @__PURE__ */ Buffer.from("\r\n");
|
|
9
|
+
const HEADER_BLOCK_END = /* @__PURE__ */ Buffer.from("\r\n\r\n");
|
|
9
10
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if (headerEnd === -1) {
|
|
95
|
-
if (buffer.length >= headerWindow) {
|
|
96
|
-
throw new TypeError('Invalid multipart body: part headers exceed the maximum allowed size');
|
|
97
|
-
}
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
const headerSize = headerEnd + HEADER_BLOCK_END.length;
|
|
101
|
-
const part = parsePartHeaders(buffer.subarray(0, headerEnd).toString(), headerSize);
|
|
102
|
-
buffer = buffer.subarray(headerSize);
|
|
103
|
-
writer = await onPart(part);
|
|
104
|
-
state = 'body';
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
for await (const chunk of source) {
|
|
108
|
-
if (done) {
|
|
109
|
-
continue;
|
|
110
|
-
}
|
|
111
|
-
// A bare view suffices when nothing is retained, skipping a copy
|
|
112
|
-
buffer =
|
|
113
|
-
buffer.length === 0
|
|
114
|
-
? Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength)
|
|
115
|
-
: Buffer.concat([buffer, chunk]);
|
|
116
|
-
await process();
|
|
117
|
-
}
|
|
118
|
-
if (!done) {
|
|
119
|
-
throw new TypeError('Invalid multipart body: unexpected end of body');
|
|
120
|
-
}
|
|
11
|
+
* Parses a `multipart/form-data` byte stream part by part, so a part's body can be
|
|
12
|
+
* consumed as it arrives instead of being buffered whole. Bodies are delivered to the
|
|
13
|
+
* writer `onPart` returns, with writer promises awaited for backpressure, so parts are
|
|
14
|
+
* processed strictly one at a time.
|
|
15
|
+
*
|
|
16
|
+
* Line endings are strictly CRLF, every part must carry a `form-data` content
|
|
17
|
+
* disposition with a `name` parameter, and a malformed or truncated body throws a
|
|
18
|
+
* `TypeError`, matching the standard parser's strictness.
|
|
19
|
+
*
|
|
20
|
+
* @see https://www.rfc-editor.org/rfc/rfc7578
|
|
21
|
+
* @see https://www.rfc-editor.org/rfc/rfc2046#section-5.1.1
|
|
22
|
+
*/
|
|
23
|
+
async function parseMultipart(source, boundary, onPart) {
|
|
24
|
+
const delimiter = Buffer.from(`\r\n--${boundary}`);
|
|
25
|
+
/**
|
|
26
|
+
* Seeded with a virtual CRLF so the opening `--boundary` line, which the grammar
|
|
27
|
+
* allows without a preceding line break, matches the same needle as every
|
|
28
|
+
* later delimiter.
|
|
29
|
+
*/
|
|
30
|
+
let buffer = CRLF;
|
|
31
|
+
let state = "preamble";
|
|
32
|
+
let writer;
|
|
33
|
+
let done = false;
|
|
34
|
+
const process = async () => {
|
|
35
|
+
while (true) {
|
|
36
|
+
if (state === "preamble" || state === "body") {
|
|
37
|
+
const index = buffer.indexOf(delimiter);
|
|
38
|
+
if (index === -1) {
|
|
39
|
+
const settledLength = buffer.length - delimiter.length + 1;
|
|
40
|
+
if (settledLength > 0) {
|
|
41
|
+
if (state === "body") await writer.write(buffer.subarray(0, settledLength));
|
|
42
|
+
buffer = buffer.subarray(settledLength);
|
|
43
|
+
}
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (state === "body") {
|
|
47
|
+
if (index > 0) await writer.write(buffer.subarray(0, index));
|
|
48
|
+
await writer.end();
|
|
49
|
+
writer = void 0;
|
|
50
|
+
}
|
|
51
|
+
buffer = buffer.subarray(index + delimiter.length);
|
|
52
|
+
state = "delimiter-end";
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
if (state === "delimiter-end") {
|
|
56
|
+
if (buffer.length < 2) return;
|
|
57
|
+
if (buffer[0] === 45 && buffer[1] === 45) {
|
|
58
|
+
done = true;
|
|
59
|
+
buffer = Buffer.alloc(0);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
state = "transport-padding";
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
if (state === "transport-padding") {
|
|
66
|
+
let index = 0;
|
|
67
|
+
while (index < buffer.length && (buffer[index] === 32 || buffer[index] === 9)) index++;
|
|
68
|
+
buffer = buffer.subarray(index);
|
|
69
|
+
if (buffer.length < 2) return;
|
|
70
|
+
if (buffer[0] !== 13 || buffer[1] !== 10) throw new TypeError("Invalid multipart body: expected CRLF after a boundary delimiter");
|
|
71
|
+
buffer = buffer.subarray(2);
|
|
72
|
+
state = "headers";
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
if (buffer[0] === 13 && buffer[1] === 10) throw new TypeError("Invalid multipart body: part is missing the content-disposition header");
|
|
76
|
+
const headerWindow = MAX_PART_HEADER_SIZE + HEADER_BLOCK_END.length;
|
|
77
|
+
const headerEnd = buffer.subarray(0, headerWindow).indexOf(HEADER_BLOCK_END);
|
|
78
|
+
if (headerEnd === -1) {
|
|
79
|
+
if (buffer.length >= headerWindow) throw new TypeError("Invalid multipart body: part headers exceed the maximum allowed size");
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const headerSize = headerEnd + HEADER_BLOCK_END.length;
|
|
83
|
+
const part = parsePartHeaders(buffer.subarray(0, headerEnd).toString(), headerSize);
|
|
84
|
+
buffer = buffer.subarray(headerSize);
|
|
85
|
+
writer = await onPart(part);
|
|
86
|
+
state = "body";
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
for await (const chunk of source) {
|
|
90
|
+
if (done) continue;
|
|
91
|
+
buffer = buffer.length === 0 ? Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength) : Buffer.concat([buffer, chunk]);
|
|
92
|
+
await process();
|
|
93
|
+
}
|
|
94
|
+
if (!done) throw new TypeError("Invalid multipart body: unexpected end of body");
|
|
121
95
|
}
|
|
122
96
|
function parsePartHeaders(block, headerSize) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
.toLowerCase();
|
|
146
|
-
if (dispositionType !== 'form-data') {
|
|
147
|
-
throw new TypeError('Invalid multipart body: content-disposition must be form-data');
|
|
148
|
-
}
|
|
149
|
-
const parameters = parseHeaderParameters(contentDisposition);
|
|
150
|
-
const name = parameters.get('name');
|
|
151
|
-
if (name === undefined) {
|
|
152
|
-
throw new TypeError('Invalid multipart body: content-disposition header is missing the name parameter');
|
|
153
|
-
}
|
|
154
|
-
const filename = parameters.get('filename');
|
|
155
|
-
return {
|
|
156
|
-
name: decodeContentDispositionParameter(name),
|
|
157
|
-
filename: filename === undefined ? undefined : decodeContentDispositionParameter(filename),
|
|
158
|
-
type: contentType,
|
|
159
|
-
headerSize,
|
|
160
|
-
};
|
|
97
|
+
let contentDisposition;
|
|
98
|
+
let contentType;
|
|
99
|
+
for (const line of block.split("\r\n")) {
|
|
100
|
+
const colon = line.indexOf(":");
|
|
101
|
+
if (colon === -1) throw new TypeError("Invalid multipart body: malformed part header");
|
|
102
|
+
const name = line.slice(0, colon).trim().toLowerCase();
|
|
103
|
+
if (name === "content-disposition") contentDisposition = line.slice(colon + 1).trim();
|
|
104
|
+
else if (name === "content-type") contentType = line.slice(colon + 1).trim();
|
|
105
|
+
}
|
|
106
|
+
if (contentDisposition === void 0) throw new TypeError("Invalid multipart body: part is missing the content-disposition header");
|
|
107
|
+
const semicolon = contentDisposition.indexOf(";");
|
|
108
|
+
if ((semicolon === -1 ? contentDisposition : contentDisposition.slice(0, semicolon)).trim().toLowerCase() !== "form-data") throw new TypeError("Invalid multipart body: content-disposition must be form-data");
|
|
109
|
+
const parameters = parseHeaderParameters(contentDisposition);
|
|
110
|
+
const name = parameters.get("name");
|
|
111
|
+
if (name === void 0) throw new TypeError("Invalid multipart body: content-disposition header is missing the name parameter");
|
|
112
|
+
const filename = parameters.get("filename");
|
|
113
|
+
return {
|
|
114
|
+
name: decodeContentDispositionParameter(name),
|
|
115
|
+
filename: filename === void 0 ? void 0 : decodeContentDispositionParameter(filename),
|
|
116
|
+
type: contentType,
|
|
117
|
+
headerSize
|
|
118
|
+
};
|
|
161
119
|
}
|
|
162
120
|
/**
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
121
|
+
* The multipart serialization every spec-compliant client uses escapes `"`, `\r`,
|
|
122
|
+
* and `\n` in content-disposition names and filenames as `%22`, `%0D`, and `%0A`,
|
|
123
|
+
* and the standard parser reverses exactly these three.
|
|
124
|
+
*
|
|
125
|
+
* @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart/form-data-encoding-algorithm
|
|
126
|
+
*/
|
|
169
127
|
function decodeContentDispositionParameter(value) {
|
|
170
|
-
|
|
128
|
+
return value.replaceAll("%22", "\"").replaceAll("%0D", "\r").replaceAll("%0A", "\n");
|
|
171
129
|
}
|
|
172
130
|
/**
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
else {
|
|
212
|
-
const semicolon = header.indexOf(';', index);
|
|
213
|
-
value = (semicolon === -1 ? header.slice(index) : header.slice(index, semicolon)).trim();
|
|
214
|
-
index = semicolon;
|
|
215
|
-
}
|
|
216
|
-
if (!parameters.has(key)) {
|
|
217
|
-
parameters.set(key, value);
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
return parameters;
|
|
131
|
+
* Extracts the `key=value` parameters that follow a header's leading token.
|
|
132
|
+
* The first occurrence of a parameter wins.
|
|
133
|
+
*
|
|
134
|
+
* A backslash inside a quoted value is a literal character rather than an
|
|
135
|
+
* escape, matching the standard parser: the multipart serialization escapes
|
|
136
|
+
* `"` as `%22`, so a quote can never occur inside a value, while filenames
|
|
137
|
+
* with literal backslashes are common and must survive verbatim.
|
|
138
|
+
*
|
|
139
|
+
* @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart/form-data-encoding-algorithm
|
|
140
|
+
*/
|
|
141
|
+
function parseHeaderParameters(header) {
|
|
142
|
+
const parameters = /* @__PURE__ */ new Map();
|
|
143
|
+
let index = header.indexOf(";");
|
|
144
|
+
while (index !== -1 && index < header.length) {
|
|
145
|
+
index++;
|
|
146
|
+
while (index < header.length && (header[index] === " " || header[index] === " ")) index++;
|
|
147
|
+
let equals = index;
|
|
148
|
+
while (equals < header.length && header[equals] !== "=" && header[equals] !== ";") equals++;
|
|
149
|
+
if (equals === header.length) break;
|
|
150
|
+
if (header[equals] === ";") {
|
|
151
|
+
index = equals;
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
const key = header.slice(index, equals).trim().toLowerCase();
|
|
155
|
+
index = equals + 1;
|
|
156
|
+
let value;
|
|
157
|
+
if (header[index] === "\"") {
|
|
158
|
+
const closing = header.indexOf("\"", index + 1);
|
|
159
|
+
value = closing === -1 ? header.slice(index + 1) : header.slice(index + 1, closing);
|
|
160
|
+
index = closing === -1 ? -1 : header.indexOf(";", closing + 1);
|
|
161
|
+
} else {
|
|
162
|
+
const semicolon = header.indexOf(";", index);
|
|
163
|
+
value = (semicolon === -1 ? header.slice(index) : header.slice(index, semicolon)).trim();
|
|
164
|
+
index = semicolon;
|
|
165
|
+
}
|
|
166
|
+
if (!parameters.has(key)) parameters.set(key, value);
|
|
167
|
+
}
|
|
168
|
+
return parameters;
|
|
221
169
|
}
|
|
170
|
+
export { parseHeaderParameters, parseMultipart };
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { Context } from "@orpc/server";
|
|
2
|
+
import { StandardHandlerOptions, StandardHandlerPlugin } from "@orpc/server/standard";
|
|
3
3
|
export interface StaticFileHandlerPluginOptions {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
4
|
+
/**
|
|
5
|
+
* The directory files are served from. Resolved against the working
|
|
6
|
+
* directory when relative.
|
|
7
|
+
*/
|
|
8
|
+
rootDir: string;
|
|
9
|
+
/**
|
|
10
|
+
* The URL path files are served under, appended to the handler prefix
|
|
11
|
+
* when one is set.
|
|
12
|
+
*
|
|
13
|
+
* @default '/'
|
|
14
|
+
*/
|
|
15
|
+
path?: `/${string}` | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* The file served when the request path resolves to a directory.
|
|
18
|
+
* Set to `false` to disable directory index files.
|
|
19
|
+
*
|
|
20
|
+
* @default 'index.html'
|
|
21
|
+
*/
|
|
22
|
+
indexFile?: string | false | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* A file served with status 200 when no file matches the request path,
|
|
25
|
+
* relative to `rootDir`. Useful for single-page application routing.
|
|
26
|
+
*
|
|
27
|
+
* @default undefined
|
|
28
|
+
*/
|
|
29
|
+
fallbackFile?: string | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* The `Cache-Control` response header value. Set to `false` to omit the header.
|
|
32
|
+
*
|
|
33
|
+
* @default 'public, max-age=0'
|
|
34
|
+
*/
|
|
35
|
+
cacheControl?: string | false | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Whether files and directories whose name starts with a dot can be served.
|
|
38
|
+
* This is a request path policy, so it does not apply to a configured `indexFile`
|
|
39
|
+
* or `fallbackFile`, nor to the target of a symbolic link.
|
|
40
|
+
* When disabled, names shaped like 8.3 short names, such as `ENV~1`, are refused too,
|
|
41
|
+
* since NTFS and FAT resolve them to dotfiles.
|
|
42
|
+
*
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
dotfiles?: boolean | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Whether precompressed sidecar files (`.br`, `.zst`, `.gz`) can be served
|
|
48
|
+
* when the client accepts their encoding and the content type is compressible.
|
|
49
|
+
*
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
precompressed?: boolean | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Content types keyed by lowercase file extension without the dot, taking precedence over
|
|
55
|
+
* the type detected from the extension. Values are sent verbatim, so a text type needs its
|
|
56
|
+
* own charset. Extensions that neither this nor the detection recognises are served as
|
|
57
|
+
* `application/octet-stream`.
|
|
58
|
+
*/
|
|
59
|
+
mimeTypes?: Record<string, string> | undefined;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
62
|
* Serves static files from a directory: index files, `ETag`/`Last-Modified`
|
|
@@ -66,19 +66,19 @@ export interface StaticFileHandlerPluginOptions {
|
|
|
66
66
|
* @see {@link https://orpc.dev/docs/plugins/static-file | Static File Plugin}
|
|
67
67
|
*/
|
|
68
68
|
export declare class StaticFileHandlerPlugin<T extends Context> implements StandardHandlerPlugin<T> {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
69
|
+
name: string;
|
|
70
|
+
after: string[];
|
|
71
|
+
before: string[];
|
|
72
|
+
private readonly rootDir;
|
|
73
|
+
private readonly path;
|
|
74
|
+
private readonly indexFile;
|
|
75
|
+
private readonly fallbackFilePath;
|
|
76
|
+
private readonly cacheControl;
|
|
77
|
+
private readonly unsafeSegmentRegex;
|
|
78
|
+
private readonly precompressed;
|
|
79
|
+
private readonly mimeTypes;
|
|
80
|
+
constructor(options: StaticFileHandlerPluginOptions);
|
|
81
|
+
init(options: StandardHandlerOptions<T>): StandardHandlerOptions<T>;
|
|
82
|
+
private serve;
|
|
83
|
+
private resolveContentType;
|
|
84
|
+
}
|