Skip to content

Commit c2e10a8

Browse files
committed
chore: upgrade fastify
1 parent 31f8b9e commit c2e10a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1100
-512
lines changed

package-lock.json

Lines changed: 984 additions & 427 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,11 @@
7878
}
7979
},
8080
"dependencies": {
81-
"@fastify/cors": "9.0.1",
82-
"@fastify/formbody": "7.4.0",
83-
"@fastify/http-proxy": "9.5.0",
84-
"@fastify/swagger": "8.15.0",
85-
"@fastify/type-provider-typebox": "4.0.0",
86-
"@sinclair/typebox": "0.32.35",
81+
"@fastify/cors": "11.2.0",
82+
"@fastify/formbody": "8.0.2",
83+
"@fastify/http-proxy": "11.4.1",
84+
"@fastify/swagger": "9.7.0",
85+
"@fastify/type-provider-typebox": "6.1.0",
8786
"@stacks/api-toolkit": "1.12.2",
8887
"@stacks/codec": "1.5.0",
8988
"@stacks/common": "6.10.0",
@@ -102,8 +101,8 @@
102101
"cross-env": "7.0.3",
103102
"ecpair": "2.1.0",
104103
"env-schema": "7.0.0",
105-
"fastify": "4.29.1",
106-
"fastify-metrics": "11.0.0",
104+
"fastify": "5.8.2",
105+
"fastify-metrics": "12.1.0",
107106
"getopts": "2.3.0",
108107
"ioredis": "5.6.1",
109108
"jsonrpc-lite": "2.2.0",
@@ -120,6 +119,7 @@
120119
"strict-event-emitter-types": "2.0.0",
121120
"tiny-secp256k1": "2.2.1",
122121
"ts-unused-exports": "7.0.3",
122+
"typebox": "1.1.6",
123123
"undici": "6.23.0",
124124
"ws": "7.5.10",
125125
"zone-file": "2.0.0-beta.3"

src/api/routes/address.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ import { PgStore } from '../../datastore/pg-store';
2424
import { has0xPrefix, logger } from '@stacks/api-toolkit';
2525

2626
import { FastifyPluginAsync } from 'fastify';
27-
import { Type, TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
27+
import { TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
28+
import { Type } from 'typebox';
2829
import { Server } from 'node:http';
2930
import {
3031
LimitParam,

src/api/routes/block.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { handleChainTipCache } from '../controllers/cache-controller';
66
import { has0xPrefix } from '@stacks/api-toolkit';
77

88
import { FastifyPluginAsync } from 'fastify';
9-
import { Type, TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
9+
import { TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
10+
import { Type } from 'typebox';
1011
import { Server } from 'node:http';
1112
import { LimitParam, OffsetParam } from '../schemas/params';
1213
import { PaginatedResponse } from '../schemas/util';

src/api/routes/bns/addresses.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { handleChainTipCache } from '../../../api/controllers/cache-controller';
22
import { FastifyPluginAsync } from 'fastify';
3-
import { Type, TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
3+
import { TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
4+
import { Type } from 'typebox';
45
import { Server } from 'node:http';
56
import { UnanchoredParamSchema } from '../../schemas/params';
67
import { InvalidRequestError, InvalidRequestErrorType } from '../../../errors';

src/api/routes/bns/names.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { parsePagingQueryInput } from '../../../api/pagination';
22
import { bnsBlockchain, BnsErrors } from '../../../event-stream/bns/bns-constants';
33
import { handleChainTipCache } from '../../../api/controllers/cache-controller';
44
import { FastifyPluginAsync } from 'fastify';
5-
import { Type, TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
5+
import { TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
6+
import { Type } from 'typebox';
67
import { Server } from 'node:http';
78
import { UnanchoredParamSchema } from '../../schemas/params';
89

@@ -339,7 +340,7 @@ export const BnsNameRoutes: FastifyPluginAsync<
339340
if (error instanceof NameRedirectError) {
340341
await reply.redirect(error.message);
341342
} else {
342-
await reply.status(404).send(error);
343+
await reply.status(404 as any).send(error);
343344
}
344345
});
345346
}

src/api/routes/bns/namespaces.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { parsePagingQueryInput } from '../../../api/pagination';
22
import { BnsErrors } from '../../../event-stream/bns/bns-constants';
33
import { handleChainTipCache } from '../../../api/controllers/cache-controller';
44
import { FastifyPluginAsync } from 'fastify';
5-
import { Type, TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
5+
import { TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
6+
import { Type } from 'typebox';
67
import { Server } from 'node:http';
78
import { UnanchoredParamSchema } from '../../schemas/params';
89

@@ -109,7 +110,7 @@ export const BnsNamespaceRoutes: FastifyPluginAsync<
109110
await reply.send(results);
110111
})
111112
.catch(async error => {
112-
await reply.status(400).send(error);
113+
await reply.status(400 as any).send(error);
113114
});
114115
}
115116
);

src/api/routes/bns/pricing.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import { getChainIDNetwork, isValidPrincipal } from './../../../helpers';
1111
import { getBnsContractID, GetStacksNetwork } from '../../../event-stream/bns/bns-helpers';
1212
import { logger } from '@stacks/api-toolkit';
1313
import { FastifyPluginAsync } from 'fastify';
14-
import { Type, TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
14+
import { TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
15+
import { Type } from 'typebox';
1516
import { Server } from 'node:http';
1617
import { handleChainTipCache } from '../../controllers/cache-controller';
1718

src/api/routes/burnchain.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { InvalidRequestError, InvalidRequestErrorType } from '../../errors';
33
import { getPagingQueryLimit, ResourceType } from '../pagination';
44

55
import { FastifyPluginAsync } from 'fastify';
6-
import { Type, TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
6+
import { TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
7+
import { Type } from 'typebox';
78
import { Server } from 'node:http';
89
import { LimitParam, OffsetParam } from '../schemas/params';
910
import { PaginatedResponse } from '../schemas/util';

src/api/routes/contract.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { parseDbEvent } from '../controllers/db-controller';
33
import { handleChainTipCache } from '../controllers/cache-controller';
44

55
import { FastifyPluginAsync } from 'fastify';
6-
import { Type, TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
6+
import { TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
7+
import { Type } from 'typebox';
78
import { Server } from 'node:http';
89
import { LimitParam, OffsetParam } from '../schemas/params';
910
import { InvalidRequestError, InvalidRequestErrorType, NotFoundError } from '../../errors';

0 commit comments

Comments
 (0)