@fastify/static 8.0.3 → 8.1.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/.github/dependabot.yml +1 -1
- package/README.md +92 -86
- package/eslint.config.js +1 -0
- package/index.js +4 -3
- package/lib/dirList.js +1 -1
- package/package.json +36 -7
- package/test/content-type.test.js +97 -127
- package/test/dir-list.test.js +264 -369
- package/test/static.test.js +1871 -2360
- package/types/index.d.ts +2 -1
- package/types/index.test-d.ts +22 -21
- package/.eslintrc.json +0 -31
- package/.taprc +0 -2
- package/test/static/shallow/no-link +0 -1
- package/test/static-symbolic-link/dir/symlink +0 -1
package/.github/dependabot.yml
CHANGED
package/README.md
CHANGED
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
# @fastify/static
|
|
2
2
|
|
|
3
|
-
](https://github.com/fastify/fastify-static/actions/workflows/ci.yml)
|
|
4
4
|
[](https://www.npmjs.com/package/@fastify/static)
|
|
5
|
-
[](https://github.com/neostandard/neostandard)
|
|
6
6
|
|
|
7
|
-
Plugin for serving static files as fast as possible.
|
|
8
|
-
|
|
9
|
-
| Fastify version | branch |
|
|
10
|
-
| --------------- | -------------------------------------------------------------------- |
|
|
11
|
-
| `^4.x` | This branch |
|
|
12
|
-
| `^3.x` | [`v5.x`](https://github.com/fastify/fastify-static/tree/v5.x) |
|
|
13
|
-
| `^2.x` | [`2.x`](https://github.com/fastify/fastify-static/tree/2.x) |
|
|
14
|
-
| `^1.11.x` | [`1.x`](https://github.com/fastify/fastify-static/tree/1.x) |
|
|
7
|
+
Plugin for serving static files as fast as possible.
|
|
15
8
|
|
|
16
9
|
## Install
|
|
10
|
+
```
|
|
11
|
+
npm i @fastify/static
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### Compatibility
|
|
15
|
+
|
|
16
|
+
| Plugin version | Fastify version |
|
|
17
|
+
| ---------------|-----------------|
|
|
18
|
+
| `^8.x` | `^5.x` |
|
|
19
|
+
| `^7.x` | `^4.x` |
|
|
20
|
+
| `^5.x` | `^3.x` |
|
|
21
|
+
| `^2.x` | `^2.x` |
|
|
22
|
+
| `^1.x` | `^1.x` |
|
|
17
23
|
|
|
18
|
-
|
|
24
|
+
|
|
25
|
+
Please note that if a Fastify version is out of support, then so are the corresponding versions of this plugin
|
|
26
|
+
in the table above.
|
|
27
|
+
See [Fastify's LTS policy](https://github.com/fastify/fastify/blob/main/docs/Reference/LTS.md) for more details.
|
|
19
28
|
|
|
20
29
|
## Usage
|
|
21
30
|
|
|
@@ -106,12 +115,13 @@ fastify.get('/path/without/cache/control', function (req, reply) {
|
|
|
106
115
|
|
|
107
116
|
#### `root` (required)
|
|
108
117
|
|
|
109
|
-
The absolute path of the directory
|
|
110
|
-
The file to serve
|
|
111
|
-
|
|
118
|
+
The absolute path of the directory containing the files to serve.
|
|
119
|
+
The file to serve is determined by combining `req.url` with the
|
|
120
|
+
root directory.
|
|
112
121
|
|
|
113
|
-
|
|
114
|
-
|
|
122
|
+
An array of directories can be provided to serve multiple static directories
|
|
123
|
+
under a single prefix. Files are served in a "first found, first served" manner,
|
|
124
|
+
so list directories in order of priority. Duplicate paths will raise an error.
|
|
115
125
|
|
|
116
126
|
#### `prefix`
|
|
117
127
|
|
|
@@ -123,20 +133,26 @@ A URL path prefix used to create a virtual mount path for the static directory.
|
|
|
123
133
|
|
|
124
134
|
Default: `{}`
|
|
125
135
|
|
|
126
|
-
Constraints
|
|
136
|
+
Constraints to add to registered routes. See Fastify's documentation for
|
|
127
137
|
[route constraints](https://fastify.dev/docs/latest/Reference/Routes/#constraints).
|
|
128
138
|
|
|
139
|
+
#### `logLevel`
|
|
140
|
+
|
|
141
|
+
Default: `info`
|
|
142
|
+
|
|
143
|
+
Set log level for registered routes.
|
|
144
|
+
|
|
129
145
|
#### `prefixAvoidTrailingSlash`
|
|
130
146
|
|
|
131
147
|
Default: `false`
|
|
132
148
|
|
|
133
|
-
If
|
|
149
|
+
If `false`, the prefix gets a trailing "/". If `true`, no trailing "/" is added to the prefix.
|
|
134
150
|
|
|
135
151
|
#### `schemaHide`
|
|
136
152
|
|
|
137
153
|
Default: `true`
|
|
138
154
|
|
|
139
|
-
A flag that
|
|
155
|
+
A flag that defines if the fastify route hide-schema attribute is hidden or not.
|
|
140
156
|
|
|
141
157
|
#### `setHeaders`
|
|
142
158
|
|
|
@@ -144,7 +160,7 @@ Default: `undefined`
|
|
|
144
160
|
|
|
145
161
|
A function to set custom headers on the response. Alterations to the headers
|
|
146
162
|
must be done synchronously. The function is called as `fn(res, path, stat)`,
|
|
147
|
-
|
|
163
|
+
with the arguments:
|
|
148
164
|
|
|
149
165
|
- `res` The response object.
|
|
150
166
|
- `path` The path of the file that is being sent.
|
|
@@ -157,7 +173,7 @@ The following options are also supported and will be passed directly to the
|
|
|
157
173
|
|
|
158
174
|
- [`acceptRanges`](https://www.npmjs.com/package/@fastify/send#acceptranges)
|
|
159
175
|
- [`contentType`](https://www.npmjs.com/package/@fastify/send#contenttype)
|
|
160
|
-
- [`cacheControl`](https://www.npmjs.com/package/@fastify/send#cachecontrol)
|
|
176
|
+
- [`cacheControl`](https://www.npmjs.com/package/@fastify/send#cachecontrol) - Enable or disable setting Cache-Control response header (defaults to `true`). To provide a custom Cache-Control header, set this option to false
|
|
161
177
|
- [`dotfiles`](https://www.npmjs.com/package/@fastify/send#dotfiles)
|
|
162
178
|
- [`etag`](https://www.npmjs.com/package/@fastify/send#etag)
|
|
163
179
|
- [`extensions`](https://www.npmjs.com/package/@fastify/send#extensions)
|
|
@@ -166,7 +182,7 @@ The following options are also supported and will be passed directly to the
|
|
|
166
182
|
- [`lastModified`](https://www.npmjs.com/package/@fastify/send#lastmodified)
|
|
167
183
|
- [`maxAge`](https://www.npmjs.com/package/@fastify/send#maxage)
|
|
168
184
|
|
|
169
|
-
|
|
185
|
+
These options can be altered when calling `reply.sendFile('filename.html', options)` or `reply.sendFile('filename.html', 'otherfilename.html', options)` on each response.
|
|
170
186
|
|
|
171
187
|
#### `redirect`
|
|
172
188
|
|
|
@@ -174,61 +190,56 @@ Default: `false`
|
|
|
174
190
|
|
|
175
191
|
If set to `true`, `@fastify/static` redirects to the directory with a trailing slash.
|
|
176
192
|
|
|
177
|
-
This option cannot be
|
|
178
|
-
with `ignoreTrailingSlash` set to `true`.
|
|
193
|
+
This option cannot be `true` if `wildcard` is `false` and `ignoreTrailingSlash` is `true`.
|
|
179
194
|
|
|
180
|
-
If
|
|
181
|
-
slash will trigger your app's 404 handler using `reply.callNotFound()`.
|
|
195
|
+
If `false`, requesting directories without a trailing slash triggers the app's 404 handler using `reply.callNotFound()`.
|
|
182
196
|
|
|
183
197
|
#### `wildcard`
|
|
184
198
|
|
|
185
199
|
Default: `true`
|
|
186
200
|
|
|
187
|
-
If
|
|
188
|
-
If
|
|
189
|
-
|
|
190
|
-
|
|
201
|
+
If `true`, `@fastify/static` adds a wildcard route to serve files.
|
|
202
|
+
If `false`, it globs the filesystem for all defined files in the
|
|
203
|
+
served folder (`${root}/**/**`) and creates the necessary routes,
|
|
204
|
+
but will not serve newly added files.
|
|
191
205
|
|
|
192
|
-
The default options of https://www.npmjs.com/package/glob
|
|
193
|
-
for getting the file list.
|
|
206
|
+
The default options of [`glob`](https://www.npmjs.com/package/glob)
|
|
207
|
+
are applied for getting the file list.
|
|
194
208
|
|
|
195
|
-
This option cannot be
|
|
196
|
-
with `ignoreTrailingSlash` set to `true`.
|
|
209
|
+
This option cannot be `false` if `redirect` is `true` and `ignoreTrailingSlash` is `true`.
|
|
197
210
|
|
|
198
211
|
#### `allowedPath`
|
|
199
212
|
|
|
200
213
|
Default: `(pathName, root, request) => true`
|
|
201
214
|
|
|
202
|
-
This function
|
|
203
|
-
|
|
204
|
-
If the function returns `false`, Fastify's 404 handler will be called.
|
|
215
|
+
This function filters served files. Using the request object, complex path authentication is possible.
|
|
216
|
+
Returning `true` serves the file; returning `false` calls Fastify's 404 handler.
|
|
205
217
|
|
|
206
218
|
#### `index`
|
|
207
219
|
|
|
208
220
|
Default: `undefined`
|
|
209
221
|
|
|
210
|
-
Under the hood
|
|
211
|
-
To disable this set false or
|
|
222
|
+
Under the hood, [`@fastify/send`](https://www.npmjs.com/package/@fastify/send) supports "index.html" files by default.
|
|
223
|
+
To disable this, set `false`, or supply a new index by passing a string or an array in preferred order.
|
|
212
224
|
|
|
213
225
|
#### `serveDotFiles`
|
|
214
226
|
|
|
215
227
|
Default: `false`
|
|
216
228
|
|
|
217
|
-
|
|
229
|
+
If `true`, serves files in hidden directories (e.g., `.foo`).
|
|
218
230
|
|
|
219
231
|
#### `list`
|
|
220
232
|
|
|
221
233
|
Default: `undefined`
|
|
222
234
|
|
|
223
|
-
If set,
|
|
235
|
+
If set, provides the directory list by calling the directory path.
|
|
236
|
+
Default response is JSON.
|
|
224
237
|
|
|
225
|
-
|
|
238
|
+
Multi-root is not supported within the `list` option.
|
|
226
239
|
|
|
227
|
-
|
|
228
|
-
- Multi-root is not supported within the `list` option.
|
|
229
|
-
- If `dotfiles` option value is `deny` or `ignore`, dotfiles will be excluded.
|
|
240
|
+
If `dotfiles` is `deny` or `ignore`, dotfiles are excluded.
|
|
230
241
|
|
|
231
|
-
|
|
242
|
+
Example:
|
|
232
243
|
|
|
233
244
|
```js
|
|
234
245
|
fastify.register(require('@fastify/static'), {
|
|
@@ -242,7 +253,7 @@ fastify.register(require('@fastify/static'), {
|
|
|
242
253
|
Request
|
|
243
254
|
|
|
244
255
|
```bash
|
|
245
|
-
GET
|
|
256
|
+
GET /public
|
|
246
257
|
```
|
|
247
258
|
|
|
248
259
|
Response
|
|
@@ -257,17 +268,17 @@ Default: `json`
|
|
|
257
268
|
|
|
258
269
|
Options: `html`, `json`
|
|
259
270
|
|
|
260
|
-
Directory list can be
|
|
271
|
+
Directory list can be in `html` format; in that case, `list.render` function is required.
|
|
261
272
|
|
|
262
|
-
|
|
273
|
+
This option can be overridden by the URL parameter `format`. Options are `html` and `json`.
|
|
263
274
|
|
|
264
275
|
```bash
|
|
265
|
-
GET
|
|
276
|
+
GET /public/assets?format=json
|
|
266
277
|
```
|
|
267
278
|
|
|
268
|
-
|
|
279
|
+
Returns the response as JSON, regardless of `list.format`.
|
|
269
280
|
|
|
270
|
-
|
|
281
|
+
Example:
|
|
271
282
|
|
|
272
283
|
```js
|
|
273
284
|
fastify.register(require('@fastify/static'), {
|
|
@@ -294,7 +305,7 @@ fastify.register(require('@fastify/static'), {
|
|
|
294
305
|
Request
|
|
295
306
|
|
|
296
307
|
```bash
|
|
297
|
-
GET
|
|
308
|
+
GET /public
|
|
298
309
|
```
|
|
299
310
|
|
|
300
311
|
Response
|
|
@@ -318,11 +329,11 @@ Response
|
|
|
318
329
|
|
|
319
330
|
Default: `['']`
|
|
320
331
|
|
|
321
|
-
Directory list can respond to different routes
|
|
332
|
+
Directory list can respond to different routes declared in `list.names`.
|
|
322
333
|
|
|
323
|
-
Note:
|
|
334
|
+
> 🛈 Note: If a file with the same name exists, the actual file is sent.
|
|
324
335
|
|
|
325
|
-
|
|
336
|
+
Example:
|
|
326
337
|
|
|
327
338
|
```js
|
|
328
339
|
fastify.register(require('@fastify/static'), {
|
|
@@ -336,20 +347,20 @@ fastify.register(require('@fastify/static'), {
|
|
|
336
347
|
})
|
|
337
348
|
```
|
|
338
349
|
|
|
339
|
-
Dir list respond with the same content to
|
|
350
|
+
Dir list respond with the same content to:
|
|
340
351
|
|
|
341
352
|
```bash
|
|
342
|
-
GET
|
|
343
|
-
GET
|
|
344
|
-
GET
|
|
345
|
-
GET
|
|
353
|
+
GET /public
|
|
354
|
+
GET /public/
|
|
355
|
+
GET /public/index
|
|
356
|
+
GET /public/index.json
|
|
346
357
|
```
|
|
347
358
|
|
|
348
359
|
#### `list.extendedFolderInfo`
|
|
349
360
|
|
|
350
361
|
Default: `undefined`
|
|
351
362
|
|
|
352
|
-
If `true
|
|
363
|
+
If `true`, extended information for folders will be accessible in `list.render` and the JSON response.
|
|
353
364
|
|
|
354
365
|
```js
|
|
355
366
|
render(dirs, files) {
|
|
@@ -363,7 +374,7 @@ render(dirs, files) {
|
|
|
363
374
|
}
|
|
364
375
|
```
|
|
365
376
|
|
|
366
|
-
Warning: This will slightly decrease the performance, especially for deeply nested file structures.
|
|
377
|
+
> ⚠ Warning: This will slightly decrease the performance, especially for deeply nested file structures.
|
|
367
378
|
|
|
368
379
|
#### `list.jsonFormat`
|
|
369
380
|
|
|
@@ -371,7 +382,7 @@ Default: `names`
|
|
|
371
382
|
|
|
372
383
|
Options: `names`, `extended`
|
|
373
384
|
|
|
374
|
-
|
|
385
|
+
Determines the output format when `json` is selected.
|
|
375
386
|
|
|
376
387
|
`names`:
|
|
377
388
|
```json
|
|
@@ -395,13 +406,11 @@ This option determines the output format when `json` is selected.
|
|
|
395
406
|
"name": "dir1",
|
|
396
407
|
"stats": {
|
|
397
408
|
"dev": 2100,
|
|
398
|
-
"size": 4096
|
|
399
|
-
...
|
|
409
|
+
"size": 4096
|
|
400
410
|
},
|
|
401
411
|
"extendedInfo": {
|
|
402
412
|
"fileCount": 4,
|
|
403
|
-
"totalSize": 51233
|
|
404
|
-
...
|
|
413
|
+
"totalSize": 51233
|
|
405
414
|
}
|
|
406
415
|
}
|
|
407
416
|
],
|
|
@@ -410,8 +419,7 @@ This option determines the output format when `json` is selected.
|
|
|
410
419
|
"name": "file1.txt",
|
|
411
420
|
"stats": {
|
|
412
421
|
"dev": 2200,
|
|
413
|
-
"size": 554
|
|
414
|
-
...
|
|
422
|
+
"size": 554
|
|
415
423
|
}
|
|
416
424
|
}
|
|
417
425
|
]
|
|
@@ -422,9 +430,9 @@ This option determines the output format when `json` is selected.
|
|
|
422
430
|
|
|
423
431
|
Default: `false`
|
|
424
432
|
|
|
425
|
-
|
|
433
|
+
First, try to send the brotli encoded asset (if supported by `Accept-Encoding` headers), then gzip, and finally the original `pathname`. Skip compression for smaller files that do not benefit from it.
|
|
426
434
|
|
|
427
|
-
Assume this structure with the compressed asset as a sibling of the
|
|
435
|
+
Assume this structure with the compressed asset as a sibling of the uncompressed counterpart:
|
|
428
436
|
|
|
429
437
|
```
|
|
430
438
|
./public
|
|
@@ -438,22 +446,21 @@ Assume this structure with the compressed asset as a sibling of the un-compresse
|
|
|
438
446
|
|
|
439
447
|
#### Disable serving
|
|
440
448
|
|
|
441
|
-
|
|
449
|
+
To use only the reply decorator without serving directories, pass `{ serve: false }`.
|
|
450
|
+
This prevents the plugin from serving everything under `root`.
|
|
442
451
|
|
|
443
452
|
#### Disabling reply decorator
|
|
444
453
|
|
|
445
|
-
The reply object is decorated with a `sendFile` function by default.
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
decorators.
|
|
454
|
+
The reply object is decorated with a `sendFile` function by default. To disable this,
|
|
455
|
+
pass `{ decorateReply: false }`. If `@fastify/static` is registered to multiple prefixes
|
|
456
|
+
in the same route, only one can initialize reply decorators.
|
|
449
457
|
|
|
450
458
|
#### Handling 404s
|
|
451
459
|
|
|
452
|
-
If a request matches the URL `prefix` but
|
|
453
|
-
|
|
454
|
-
handler with [`fastify.setNotFoundHandler()`](https://fastify.dev/docs/latest/Reference/Server/#setnotfoundhandler).
|
|
460
|
+
If a request matches the URL `prefix` but no file is found, Fastify's 404
|
|
461
|
+
handler is called. Set a custom 404 handler with [`fastify.setNotFoundHandler()`](https://fastify.dev/docs/latest/Reference/Server/#setnotfoundhandler).
|
|
455
462
|
|
|
456
|
-
When registering `@fastify/static` within an encapsulated context, the `wildcard` option may need to be set to `false`
|
|
463
|
+
When registering `@fastify/static` within an encapsulated context, the `wildcard` option may need to be set to `false` to support index resolution and nested not-found-handler:
|
|
457
464
|
|
|
458
465
|
```js
|
|
459
466
|
const app = require('fastify')();
|
|
@@ -474,13 +481,12 @@ This code will send the `index.html` for the paths `docs`, `docs/`, and `docs/in
|
|
|
474
481
|
|
|
475
482
|
### Handling Errors
|
|
476
483
|
|
|
477
|
-
If an error occurs while
|
|
478
|
-
|
|
479
|
-
[`fastify.setErrorHandler()`](https://fastify.dev/docs/latest/Reference/Server/#seterrorhandler).
|
|
484
|
+
If an error occurs while sending a file, it is passed to Fastify's error handler.
|
|
485
|
+
Set a custom handler with [`fastify.setErrorHandler()`](https://fastify.dev/docs/latest/Reference/Server/#seterrorhandler).
|
|
480
486
|
|
|
481
487
|
### Payload `stream.path`
|
|
482
488
|
|
|
483
|
-
|
|
489
|
+
Access the file path inside the `onSend` hook using `payload.path`.
|
|
484
490
|
|
|
485
491
|
```js
|
|
486
492
|
fastify.addHook('onSend', function (req, reply, payload, next) {
|
|
@@ -491,4 +497,4 @@ fastify.addHook('onSend', function (req, reply, payload, next) {
|
|
|
491
497
|
|
|
492
498
|
## License
|
|
493
499
|
|
|
494
|
-
Licensed under [MIT](./LICENSE)
|
|
500
|
+
Licensed under [MIT](./LICENSE).
|
package/eslint.config.js
CHANGED
package/index.js
CHANGED
|
@@ -64,6 +64,7 @@ async function fastifyStatic (fastify, opts) {
|
|
|
64
64
|
schema: {
|
|
65
65
|
hide: opts.schemaHide !== undefined ? opts.schemaHide : true
|
|
66
66
|
},
|
|
67
|
+
logLevel: opts.logLevel,
|
|
67
68
|
errorHandler (error, request, reply) {
|
|
68
69
|
if (error?.code === 'ERR_STREAM_PREMATURE_CLOSE') {
|
|
69
70
|
reply.request.raw.destroy()
|
|
@@ -77,7 +78,7 @@ async function fastifyStatic (fastify, opts) {
|
|
|
77
78
|
if (opts.decorateReply !== false) {
|
|
78
79
|
fastify.decorateReply('sendFile', function (filePath, rootPath, options) {
|
|
79
80
|
const opts = typeof rootPath === 'object' ? rootPath : options
|
|
80
|
-
const root = typeof rootPath === 'string' ? rootPath : opts
|
|
81
|
+
const root = typeof rootPath === 'string' ? rootPath : opts?.root
|
|
81
82
|
pumpSendToReply(
|
|
82
83
|
this.request,
|
|
83
84
|
this,
|
|
@@ -108,7 +109,7 @@ async function fastifyStatic (fastify, opts) {
|
|
|
108
109
|
|
|
109
110
|
if (opts.serve !== false) {
|
|
110
111
|
if (opts.wildcard && typeof opts.wildcard !== 'boolean') {
|
|
111
|
-
throw new
|
|
112
|
+
throw new TypeError('"wildcard" option must be a boolean')
|
|
112
113
|
}
|
|
113
114
|
if (opts.wildcard === undefined || opts.wildcard === true) {
|
|
114
115
|
fastify.route({
|
|
@@ -443,7 +444,7 @@ function checkRootPathForErrors (fastify, rootPath) {
|
|
|
443
444
|
|
|
444
445
|
function checkPath (fastify, rootPath) {
|
|
445
446
|
if (typeof rootPath !== 'string') {
|
|
446
|
-
throw new
|
|
447
|
+
throw new TypeError('"root" option must be a string')
|
|
447
448
|
}
|
|
448
449
|
if (path.isAbsolute(rootPath) === false) {
|
|
449
450
|
throw new Error('"root" option must be an absolute path')
|
package/lib/dirList.js
CHANGED
|
@@ -108,7 +108,7 @@ const dirList = {
|
|
|
108
108
|
*/
|
|
109
109
|
send: async function ({ reply, dir, options, route, prefix, dotfiles }) {
|
|
110
110
|
if (reply.request.query.format === 'html' && typeof options.render !== 'function') {
|
|
111
|
-
throw new
|
|
111
|
+
throw new TypeError('The `list.render` option must be a function and is required with the URL parameter `format=html`')
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
let entries
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fastify/static",
|
|
3
|
-
"version": "8.0
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "Plugin for serving static files as fast as possible.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"types": "types/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"coverage": "
|
|
9
|
+
"coverage": "c8 --reporter html borp --coverage --check-coverage --lines 100",
|
|
10
10
|
"lint": "eslint",
|
|
11
11
|
"lint:fix": "eslint --fix",
|
|
12
12
|
"test": "npm run test:unit && npm run test:typescript",
|
|
13
13
|
"test:typescript": "tsd",
|
|
14
|
-
"test:unit": "
|
|
14
|
+
"test:unit": "borp -C --check-coverage --lines 100",
|
|
15
15
|
"example": "node example/server.js"
|
|
16
16
|
},
|
|
17
17
|
"repository": {
|
|
@@ -23,11 +23,40 @@
|
|
|
23
23
|
"static"
|
|
24
24
|
],
|
|
25
25
|
"author": "Tommaso Allevi - @allevo",
|
|
26
|
+
"contributors": [
|
|
27
|
+
{
|
|
28
|
+
"name": "Matteo Collina",
|
|
29
|
+
"email": "hello@matteocollina.com"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "Manuel Spigolon",
|
|
33
|
+
"email": "behemoth89@gmail.com"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "Aras Abbasi",
|
|
37
|
+
"email": "aras.abbasi@gmail.com"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "Frazer Smith",
|
|
41
|
+
"email": "frazer.dev@icloud.com",
|
|
42
|
+
"url": "https://github.com/fdawgs"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
26
45
|
"license": "MIT",
|
|
27
46
|
"bugs": {
|
|
28
47
|
"url": "https://github.com/fastify/fastify-static/issues"
|
|
29
48
|
},
|
|
30
49
|
"homepage": "https://github.com/fastify/fastify-static",
|
|
50
|
+
"funding": [
|
|
51
|
+
{
|
|
52
|
+
"type": "github",
|
|
53
|
+
"url": "https://github.com/sponsors/fastify"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"type": "opencollective",
|
|
57
|
+
"url": "https://opencollective.com/fastify"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
31
60
|
"dependencies": {
|
|
32
61
|
"@fastify/accept-negotiator": "^2.0.0",
|
|
33
62
|
"@fastify/send": "^3.2.0",
|
|
@@ -40,14 +69,14 @@
|
|
|
40
69
|
"@fastify/compress": "^8.0.0",
|
|
41
70
|
"@fastify/pre-commit": "^2.1.0",
|
|
42
71
|
"@types/node": "^22.0.0",
|
|
72
|
+
"borp": "^0.19.0",
|
|
73
|
+
"c8": "^10.1.3",
|
|
43
74
|
"concat-stream": "^2.0.0",
|
|
44
|
-
"eslint": "^9.
|
|
75
|
+
"eslint": "^9.17.0",
|
|
45
76
|
"fastify": "^5.1.0",
|
|
46
|
-
"neostandard": "^0.
|
|
77
|
+
"neostandard": "^0.12.0",
|
|
47
78
|
"pino": "^9.1.0",
|
|
48
79
|
"proxyquire": "^2.1.3",
|
|
49
|
-
"simple-get": "^4.0.1",
|
|
50
|
-
"tap": "^18.7.1",
|
|
51
80
|
"tsd": "^0.31.0"
|
|
52
81
|
},
|
|
53
82
|
"tsd": {
|