Skip to content

Commit

Permalink
Bumped v10.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Collina <[email protected]>
  • Loading branch information
mcollina committed Sep 6, 2024
1 parent a4c1238 commit 4fe6e79
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fastify/reply-from",
"version": "10.0.0-pre.fv5.2",
"version": "10.0.0",
"description": "forward your HTTP request to another server, for fastify",
"main": "index.js",
"type": "commonjs",
Expand Down Expand Up @@ -29,13 +29,13 @@
},
"homepage": "https://github.com/fastify/fastify-reply-from#readme",
"devDependencies": {
"@fastify/formbody": "^8.0.0-pre.fv5.1",
"@fastify/multipart": "^9.0.0-pre.fv5.1",
"@fastify/formbody": "^8.0.0",
"@fastify/multipart": "^9.0.0",
"@fastify/pre-commit": "^2.1.0",
"@sinonjs/fake-timers": "^13.0.1",
"@types/node": "^22.0.0",
"@types/tap": "^15.0.11",
"fastify": "^5.0.0-alpha.3",
"fastify": "^5.0.0-alpha.4",
"form-data": "^4.0.0",
"got": "^11.8.6",
"h2url": "^0.2.0",
Expand Down
7 changes: 4 additions & 3 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
RawReplyDefaultExpression,
RawServerBase,
RequestGenericInterface,
RouteGenericInterface
} from 'fastify';

import {
Expand Down Expand Up @@ -50,7 +51,7 @@ declare namespace fastifyReplyFrom {
export type RetryDetails = {
err: Error;
req: FastifyRequest<RequestGenericInterface, RawServerBase>;
res: FastifyReply<RawServerBase>;
res: FastifyReply<RouteGenericInterface, RawServerBase>;
attempt: number;
retriesCount: number;
getDefaultDelay: () => number | null;
Expand All @@ -62,11 +63,11 @@ declare namespace fastifyReplyFrom {
retriesCount?: number;
onResponse?: (
request: FastifyRequest<RequestGenericInterface, RawServerBase>,
reply: FastifyReply<RawServerBase>,
reply: FastifyReply<RouteGenericInterface, RawServerBase>,
res: RawReplyDefaultExpression<RawServerBase>
) => void;
onError?: (
reply: FastifyReply<RawServerBase>,
reply: FastifyReply<RouteGenericInterface, RawServerBase>,
error: { error: Error }
) => void;
body?: unknown;
Expand Down
6 changes: 3 additions & 3 deletions types/index.test-d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import fastify, { FastifyReply, FastifyRequest, RawReplyDefaultExpression, RawServerBase, RequestGenericInterface } from "fastify";
import fastify, { FastifyReply, FastifyRequest, RawReplyDefaultExpression, RawServerBase, RequestGenericInterface, RouteGenericInterface } from "fastify";
import * as http from 'http';
import { IncomingHttpHeaders } from "http2";
import * as https from 'https';
Expand Down Expand Up @@ -80,7 +80,7 @@ async function main() {
},
onResponse(request, reply, res) {
expectType<FastifyRequest<RequestGenericInterface, RawServerBase>>(request);
expectType<FastifyReply<RawServerBase>>(reply);
expectType<FastifyReply<RouteGenericInterface, RawServerBase>>(reply);
expectType<RawReplyDefaultExpression<RawServerBase>>(res);
expectType<number>(res.statusCode);
}
Expand Down Expand Up @@ -119,7 +119,7 @@ async function main() {
getUpstream(req, base) {
return base;
},
onError(reply: FastifyReply<RawServerBase>, error) {
onError(reply: FastifyReply<RouteGenericInterface, RawServerBase>, error) {
return reply.send(error.error);
},
queryString(search, reqUrl, request) {
Expand Down

0 comments on commit 4fe6e79

Please sign in to comment.