@jaredwray/mockhttp 1.6.0 → 1.6.1
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/dist/index.mjs +7 -1
- package/package.json +17 -26
package/dist/index.mjs
CHANGED
|
@@ -359,6 +359,7 @@ const anythingRoute = (fastify) => {
|
|
|
359
359
|
};
|
|
360
360
|
const noValidation = {
|
|
361
361
|
schema: anythingSchema,
|
|
362
|
+
/* v8 ignore next -- @preserve */
|
|
362
363
|
validatorCompiler: () => () => true
|
|
363
364
|
};
|
|
364
365
|
fastify.get("/anything", noValidation, handler);
|
|
@@ -900,6 +901,7 @@ const delayRoute = (fastify) => {
|
|
|
900
901
|
/* v8 ignore next -- @preserve */
|
|
901
902
|
const host = request.headers.host || "localhost";
|
|
902
903
|
return {
|
|
904
|
+
/* v8 ignore next -- @preserve */
|
|
903
905
|
args: request.query || {},
|
|
904
906
|
data: "",
|
|
905
907
|
files: {},
|
|
@@ -1207,6 +1209,7 @@ const streamRoute = (fastify) => {
|
|
|
1207
1209
|
for (let i = 0; i < lines; i++) {
|
|
1208
1210
|
const data = {
|
|
1209
1211
|
id: i,
|
|
1212
|
+
/* v8 ignore next -- @preserve */
|
|
1210
1213
|
args: request.query || {},
|
|
1211
1214
|
headers: request.headers,
|
|
1212
1215
|
origin: request.ip,
|
|
@@ -2908,7 +2911,7 @@ A simple HTTP server that can be used to mock HTTP responses for testing purpose
|
|
|
2908
2911
|
|
|
2909
2912
|
[mockhttp.org](https://mockhttp.org) is a free service that runs this codebase and allows you to use it for testing purposes. It is a simple way to mock HTTP responses for testing purposes. Ran via [Cloudflare](https://cloudflare.com) and [Google Cloud Run](https://cloud.google.com/run/) across 7 regions globally and can do millions of requests per second.
|
|
2910
2913
|
`,
|
|
2911
|
-
version: "1.6.
|
|
2914
|
+
version: "1.6.1"
|
|
2912
2915
|
},
|
|
2913
2916
|
consumes: ["application/json"],
|
|
2914
2917
|
produces: ["application/json"]
|
|
@@ -2921,14 +2924,17 @@ const registerSwaggerUi = async (fastify) => {
|
|
|
2921
2924
|
deepLinking: false
|
|
2922
2925
|
},
|
|
2923
2926
|
uiHooks: {
|
|
2927
|
+
/* v8 ignore next -- @preserve */
|
|
2924
2928
|
onRequest(_request, _reply, next) {
|
|
2925
2929
|
next();
|
|
2926
2930
|
},
|
|
2931
|
+
/* v8 ignore next -- @preserve */
|
|
2927
2932
|
preHandler(_request, _reply, next) {
|
|
2928
2933
|
next();
|
|
2929
2934
|
}
|
|
2930
2935
|
},
|
|
2931
2936
|
staticCSP: true,
|
|
2937
|
+
/* v8 ignore next -- @preserve */
|
|
2932
2938
|
transformSpecification: (swaggerObject, _request, _reply) => swaggerObject,
|
|
2933
2939
|
transformSpecificationClone: true
|
|
2934
2940
|
});
|
package/package.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jaredwray/mockhttp",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "Mock Http - Easy way to mock http with httpbin replacement",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.mts",
|
|
8
|
+
"packageManager": "pnpm@11.1.3",
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">=22.18.0"
|
|
11
|
+
},
|
|
8
12
|
"directories": {
|
|
9
13
|
"test": "test"
|
|
10
14
|
},
|
|
@@ -53,27 +57,27 @@
|
|
|
53
57
|
},
|
|
54
58
|
"homepage": "https://github.com/jaredwray/mockhttp#readme",
|
|
55
59
|
"devDependencies": {
|
|
56
|
-
"@biomejs/biome": "^2.4.
|
|
57
|
-
"@swc/core": "^1.15.
|
|
60
|
+
"@biomejs/biome": "^2.4.15",
|
|
61
|
+
"@swc/core": "^1.15.33",
|
|
58
62
|
"@types/html-escaper": "^3.0.4",
|
|
59
|
-
"@vitest/coverage-v8": "^4.1.
|
|
63
|
+
"@vitest/coverage-v8": "^4.1.6",
|
|
60
64
|
"rimraf": "^6.1.3",
|
|
61
|
-
"tsdown": "^0.
|
|
65
|
+
"tsdown": "^0.22.0",
|
|
62
66
|
"tsx": "^4.21.0",
|
|
63
|
-
"typescript": "6.0.
|
|
64
|
-
"vitest": "^4.1.
|
|
67
|
+
"typescript": "6.0.3",
|
|
68
|
+
"vitest": "^4.1.6"
|
|
65
69
|
},
|
|
66
70
|
"dependencies": {
|
|
67
71
|
"@fastify/cookie": "^11.0.2",
|
|
68
72
|
"@fastify/helmet": "^13.0.2",
|
|
69
73
|
"@fastify/rate-limit": "^10.3.0",
|
|
70
|
-
"@fastify/static": "^9.1.
|
|
74
|
+
"@fastify/static": "^9.1.3",
|
|
71
75
|
"@fastify/swagger": "^9.7.0",
|
|
72
|
-
"@fastify/swagger-ui": "^5.2.
|
|
73
|
-
"@scalar/api-reference": "^1.
|
|
76
|
+
"@fastify/swagger-ui": "^5.2.6",
|
|
77
|
+
"@scalar/api-reference": "^1.55.3",
|
|
74
78
|
"detect-port": "^2.1.0",
|
|
75
|
-
"fastify": "^5.8.
|
|
76
|
-
"hookified": "^2.
|
|
79
|
+
"fastify": "^5.8.5",
|
|
80
|
+
"hookified": "^2.2.0",
|
|
77
81
|
"html-escaper": "^3.0.3",
|
|
78
82
|
"pino": "^10.3.1",
|
|
79
83
|
"pino-pretty": "^13.1.3"
|
|
@@ -82,18 +86,5 @@
|
|
|
82
86
|
"dist",
|
|
83
87
|
"public",
|
|
84
88
|
"LICENCE"
|
|
85
|
-
]
|
|
86
|
-
"pnpm": {
|
|
87
|
-
"overrides": {
|
|
88
|
-
"set-cookie-parser": "2.7.2"
|
|
89
|
-
},
|
|
90
|
-
"onlyBuiltDependencies": [
|
|
91
|
-
"@swc/core",
|
|
92
|
-
"core-js",
|
|
93
|
-
"esbuild",
|
|
94
|
-
"protobufjs",
|
|
95
|
-
"unrs-resolver",
|
|
96
|
-
"vue-demi"
|
|
97
|
-
]
|
|
98
|
-
}
|
|
89
|
+
]
|
|
99
90
|
}
|