@jaredwray/mockhttp 0.2.1 → 0.2.2
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/README.md +1 -1
- package/dist/index.js +7 -1
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-

|
|
1
|
+
[](https://mockhttp.org)
|
|
2
2
|
|
|
3
3
|
[](https://github.com/jaredwray/mockhttp/actions/workflows/tests.yaml)
|
|
4
4
|
[](https://github.com/jaredwray/mockhttp/blob/master/LICENSE)
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import Fastify from "fastify";
|
|
|
8
8
|
import fastifyStatic from "@fastify/static";
|
|
9
9
|
import { fastifySwagger } from "@fastify/swagger";
|
|
10
10
|
import fastifyHelmet from "@fastify/helmet";
|
|
11
|
+
import fastifyCors from "@fastify/cors";
|
|
11
12
|
|
|
12
13
|
// src/routes/index-route.ts
|
|
13
14
|
var indexRoute = /* @__PURE__ */ __name((fastify2) => {
|
|
@@ -103,7 +104,7 @@ import { fastifySwaggerUi } from "@fastify/swagger-ui";
|
|
|
103
104
|
// package.json
|
|
104
105
|
var package_default = {
|
|
105
106
|
name: "@jaredwray/mockhttp",
|
|
106
|
-
version: "0.2.
|
|
107
|
+
version: "0.2.2",
|
|
107
108
|
description: "Mock Http - Easy way to mock http with httpbin replacement",
|
|
108
109
|
type: "module",
|
|
109
110
|
main: "dist/index.js",
|
|
@@ -118,6 +119,7 @@ var package_default = {
|
|
|
118
119
|
"docker:run": "docker run -p 3000:3000 jaredwray/mockhttp",
|
|
119
120
|
"docker:push": "docker push jaredwray/mockhttp",
|
|
120
121
|
"docker:stop": 'docker stop $(docker ps -a -q --filter ancestor=jaredwray/mockhttp --format="{{.ID}}")',
|
|
122
|
+
"docker:readme": "tsx ./scripts/create-docker-readme.ts",
|
|
121
123
|
prepare: "npm run build",
|
|
122
124
|
start: "node dist/index.js"
|
|
123
125
|
},
|
|
@@ -149,6 +151,7 @@ var package_default = {
|
|
|
149
151
|
xo: "^0.60.0"
|
|
150
152
|
},
|
|
151
153
|
dependencies: {
|
|
154
|
+
"@fastify/cors": "^10.0.1",
|
|
152
155
|
"@fastify/helmet": "^13.0.0",
|
|
153
156
|
"@fastify/static": "^8.0.3",
|
|
154
157
|
"@fastify/swagger": "^9.4.0",
|
|
@@ -1054,6 +1057,9 @@ await fastify.register(fastifyStatic, {
|
|
|
1054
1057
|
root: path.resolve("./public"),
|
|
1055
1058
|
decorateReply: false
|
|
1056
1059
|
});
|
|
1060
|
+
await fastify.register(fastifyCors, {
|
|
1061
|
+
origin: "*"
|
|
1062
|
+
});
|
|
1057
1063
|
await fastify.register(fastifyHelmet);
|
|
1058
1064
|
await fastify.register(fastifySwagger, fastifySwaggerConfig);
|
|
1059
1065
|
await registerSwaggerUi(fastify);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jaredwray/mockhttp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Mock Http - Easy way to mock http with httpbin replacement",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"docker:run": "docker run -p 3000:3000 jaredwray/mockhttp",
|
|
16
16
|
"docker:push": "docker push jaredwray/mockhttp",
|
|
17
17
|
"docker:stop": "docker stop $(docker ps -a -q --filter ancestor=jaredwray/mockhttp --format=\"{{.ID}}\")",
|
|
18
|
+
"docker:readme": "tsx ./scripts/create-docker-readme.ts",
|
|
18
19
|
"prepare": "npm run build",
|
|
19
20
|
"start": "node dist/index.js"
|
|
20
21
|
},
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
"xo": "^0.60.0"
|
|
47
48
|
},
|
|
48
49
|
"dependencies": {
|
|
50
|
+
"@fastify/cors": "^10.0.1",
|
|
49
51
|
"@fastify/helmet": "^13.0.0",
|
|
50
52
|
"@fastify/static": "^8.0.3",
|
|
51
53
|
"@fastify/swagger": "^9.4.0",
|