fastify 3.28.0 → 3.29.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/fastify.d.ts +3 -3
- package/fastify.js +1 -1
- package/lib/errors.js +1 -1
- package/package.json +11 -11
- package/test/types/hooks.test-d.ts +1 -1
- package/test/types/plugin.test-d.ts +1 -1
- package/test/types/route.test-d.ts +1 -1
- package/types/hooks.d.ts +1 -1
- package/types/instance.d.ts +1 -1
- package/types/logger.d.ts +1 -1
- package/types/route.d.ts +1 -1
package/fastify.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { FastifyLoggerInstance, FastifyLoggerOptions } from './types/logger'
|
|
|
9
9
|
import { FastifyInstance } from './types/instance'
|
|
10
10
|
import { FastifyServerFactory } from './types/serverFactory'
|
|
11
11
|
import { Options as AjvOptions } from '@fastify/ajv-compiler'
|
|
12
|
-
import { FastifyError } from 'fastify
|
|
12
|
+
import { FastifyError } from '@fastify/error'
|
|
13
13
|
import { FastifyReply } from './types/reply'
|
|
14
14
|
import { FastifySchemaValidationError } from './types/schema'
|
|
15
15
|
import { ConstructorAction, ProtoAction } from "./types/content-type-parser";
|
|
@@ -163,7 +163,7 @@ export type FastifyServerOptions<
|
|
|
163
163
|
|
|
164
164
|
type TrustProxyFunction = (address: string, hop: number) => boolean
|
|
165
165
|
|
|
166
|
-
declare module 'fastify
|
|
166
|
+
declare module '@fastify/error' {
|
|
167
167
|
interface FastifyError {
|
|
168
168
|
validation?: ValidationResult[];
|
|
169
169
|
}
|
|
@@ -188,7 +188,7 @@ export { FastifyContext, FastifyContextConfig } from './types/context'
|
|
|
188
188
|
export { RouteHandler, RouteHandlerMethod, RouteOptions, RouteShorthandMethod, RouteShorthandOptions, RouteShorthandOptionsWithHandler } from './types/route'
|
|
189
189
|
export * from './types/register'
|
|
190
190
|
export { FastifyBodyParser, FastifyContentTypeParser, AddContentTypeParser, hasContentTypeParser, getDefaultJsonParser, ProtoAction, ConstructorAction } from './types/content-type-parser'
|
|
191
|
-
export { FastifyError } from 'fastify
|
|
191
|
+
export { FastifyError } from '@fastify/error'
|
|
192
192
|
export { FastifySchema, FastifySchemaCompiler } from './types/schema'
|
|
193
193
|
export { HTTPMethods, RawServerBase, RawRequestDefaultExpression, RawReplyDefaultExpression, RawServerDefault, ContextConfigDefault, RequestBodyDefault, RequestQuerystringDefault, RequestParamsDefault, RequestHeadersDefault } from './types/utils'
|
|
194
194
|
export * from './types/hooks'
|
package/fastify.js
CHANGED
package/lib/errors.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fastify",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.29.0",
|
|
4
4
|
"description": "Fast and low overhead web framework, for Node.js",
|
|
5
5
|
"main": "fastify.js",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -127,9 +127,8 @@
|
|
|
127
127
|
"@sinonjs/fake-timers": "^9.1.0",
|
|
128
128
|
"@types/node": "^16.0.0",
|
|
129
129
|
"@types/pino": "^6.0.1",
|
|
130
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
131
|
-
"@typescript-eslint/parser": "^5.
|
|
132
|
-
"JSONStream": "^1.3.5",
|
|
130
|
+
"@typescript-eslint/eslint-plugin": "^5.21.0",
|
|
131
|
+
"@typescript-eslint/parser": "^5.21.0",
|
|
133
132
|
"ajv": "^6.0.0",
|
|
134
133
|
"ajv-errors": "^1.0.1",
|
|
135
134
|
"ajv-formats": "^2.1.1",
|
|
@@ -140,11 +139,11 @@
|
|
|
140
139
|
"cors": "^2.8.5",
|
|
141
140
|
"coveralls": "^3.1.0",
|
|
142
141
|
"dns-prefetch-control": "^0.3.0",
|
|
143
|
-
"eslint": "^8.0
|
|
142
|
+
"eslint": "^8.14.0",
|
|
144
143
|
"eslint-config-standard": "^17.0.0-1",
|
|
145
|
-
"eslint-import-resolver-node": "^0.3.
|
|
146
|
-
"eslint-plugin-import": "^2.
|
|
147
|
-
"eslint-plugin-n": "^
|
|
144
|
+
"eslint-import-resolver-node": "^0.3.6",
|
|
145
|
+
"eslint-plugin-import": "^2.26.0",
|
|
146
|
+
"eslint-plugin-n": "^15.2.0",
|
|
148
147
|
"eslint-plugin-promise": "^6.0.0",
|
|
149
148
|
"fast-json-body": "^1.1.0",
|
|
150
149
|
"fastify-plugin": "^3.0.0",
|
|
@@ -157,6 +156,7 @@
|
|
|
157
156
|
"hsts": "^2.2.0",
|
|
158
157
|
"http-errors": "^2.0.0",
|
|
159
158
|
"ienoopen": "^1.1.0",
|
|
159
|
+
"JSONStream": "^1.3.5",
|
|
160
160
|
"license-checker": "^25.0.1",
|
|
161
161
|
"pem": "^1.14.4",
|
|
162
162
|
"proxyquire": "^2.1.3",
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
"simple-get": "^4.0.0",
|
|
167
167
|
"snazzy": "^9.0.0",
|
|
168
168
|
"split2": "^4.1.0",
|
|
169
|
-
"standard": "^17.0.0
|
|
169
|
+
"standard": "^17.0.0",
|
|
170
170
|
"tap": "^15.1.1",
|
|
171
171
|
"tap-mocha-reporter": "^5.0.1",
|
|
172
172
|
"then-sleep": "^1.0.1",
|
|
@@ -178,15 +178,15 @@
|
|
|
178
178
|
},
|
|
179
179
|
"dependencies": {
|
|
180
180
|
"@fastify/ajv-compiler": "^1.0.0",
|
|
181
|
+
"@fastify/error": "^2.0.0",
|
|
181
182
|
"abstract-logging": "^2.0.0",
|
|
182
183
|
"avvio": "^7.1.2",
|
|
183
184
|
"fast-json-stringify": "^2.5.2",
|
|
184
|
-
"fastify-error": "^0.3.0",
|
|
185
|
-
"process-warning": "^1.0.0",
|
|
186
185
|
"find-my-way": "^4.5.0",
|
|
187
186
|
"flatstr": "^1.0.12",
|
|
188
187
|
"light-my-request": "^4.2.0",
|
|
189
188
|
"pino": "^6.13.0",
|
|
189
|
+
"process-warning": "^1.0.0",
|
|
190
190
|
"proxy-addr": "^2.0.7",
|
|
191
191
|
"rfdc": "^1.1.4",
|
|
192
192
|
"secure-json-parse": "^2.0.0",
|
|
@@ -3,7 +3,7 @@ import * as http from 'http'
|
|
|
3
3
|
import * as https from 'https'
|
|
4
4
|
import { expectType, expectError, expectAssignable } from 'tsd'
|
|
5
5
|
import { FastifyPluginCallback, FastifyPluginAsync } from '../../types/plugin'
|
|
6
|
-
import { FastifyError } from 'fastify
|
|
6
|
+
import { FastifyError } from '@fastify/error'
|
|
7
7
|
|
|
8
8
|
// FastifyPlugin & FastifyRegister
|
|
9
9
|
interface TestOptions extends FastifyPluginOptions {
|
|
@@ -3,7 +3,7 @@ import { expectType, expectError, expectAssignable } from 'tsd'
|
|
|
3
3
|
import { HTTPMethods } from '../../types/utils'
|
|
4
4
|
import * as http from 'http'
|
|
5
5
|
import { RequestPayload } from '../../types/hooks'
|
|
6
|
-
import { FastifyError } from 'fastify
|
|
6
|
+
import { FastifyError } from '@fastify/error'
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
* Testing Fastify HTTP Routes and Route Shorthands.
|
package/types/hooks.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { RouteOptions, RouteGenericInterface } from './route'
|
|
|
4
4
|
import { RawServerBase, RawServerDefault, RawRequestDefaultExpression, RawReplyDefaultExpression, ContextConfigDefault } from './utils'
|
|
5
5
|
import { FastifyRequest } from './request'
|
|
6
6
|
import { FastifyReply } from './reply'
|
|
7
|
-
import { FastifyError } from 'fastify
|
|
7
|
+
import { FastifyError } from '@fastify/error'
|
|
8
8
|
import { FastifyLoggerInstance } from './logger'
|
|
9
9
|
import { RegisterOptions } from './register'
|
|
10
10
|
import { FastifyPluginOptions } from './plugin'
|
package/types/instance.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ import { FastifyRegister } from './register'
|
|
|
13
13
|
import { onRequestHookHandler, preParsingHookHandler, onSendHookHandler, preValidationHookHandler, preHandlerHookHandler, preSerializationHookHandler, onResponseHookHandler, onErrorHookHandler, onRouteHookHandler, onRegisterHookHandler, onCloseHookHandler, onCloseAsyncHookHandler, onReadyHookHandler, onTimeoutHookHandler, preParsingAsyncHookHandler, preValidationAsyncHookHandler, preHandlerAsyncHookHandler, preSerializationAsyncHookHandler, onSendAsyncHookHandler, onResponseAsyncHookHandler, onTimeoutAsyncHookHandler, onErrorAsyncHookHandler, onReadyAsyncHookHandler, onRequestAsyncHookHandler } from './hooks'
|
|
14
14
|
import { FastifyRequest } from './request'
|
|
15
15
|
import { FastifyReply } from './reply'
|
|
16
|
-
import { FastifyError } from 'fastify
|
|
16
|
+
import { FastifyError } from '@fastify/error'
|
|
17
17
|
import { AddContentTypeParser, hasContentTypeParser, getDefaultJsonParser, ProtoAction, ConstructorAction, FastifyBodyParser, removeContentTypeParser, removeAllContentTypeParsers } from './content-type-parser'
|
|
18
18
|
|
|
19
19
|
export interface PrintRoutesOptions {
|
package/types/logger.d.ts
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* https://github.com/fastify/fastify/issues/649
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
import { FastifyError } from 'fastify
|
|
21
|
+
import { FastifyError } from '@fastify/error'
|
|
22
22
|
import { RawServerBase, RawServerDefault, RawRequestDefaultExpression, RawReplyDefaultExpression } from './utils'
|
|
23
23
|
import { RouteGenericInterface } from './route'
|
|
24
24
|
import { FastifyRequest } from './request'
|
package/types/route.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { FastifySchema, FastifySchemaCompiler, FastifySchemaValidationError, Fas
|
|
|
5
5
|
import { HTTPMethods, RawServerBase, RawServerDefault, RawRequestDefaultExpression, RawReplyDefaultExpression, ContextConfigDefault } from './utils'
|
|
6
6
|
import { FastifyLoggerInstance, LogLevel } from './logger'
|
|
7
7
|
import { preValidationHookHandler, preHandlerHookHandler, preSerializationHookHandler, onRequestHookHandler, preParsingHookHandler, onResponseHookHandler, onSendHookHandler, onErrorHookHandler, onTimeoutHookHandler } from './hooks'
|
|
8
|
-
import { FastifyError } from 'fastify
|
|
8
|
+
import { FastifyError } from '@fastify/error'
|
|
9
9
|
import { FastifyContext } from './context'
|
|
10
10
|
|
|
11
11
|
export interface RouteGenericInterface extends RequestGenericInterface, ReplyGenericInterface {}
|