@jaredwray/mockhttp 0.2.0 → 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 CHANGED
@@ -1,4 +1,4 @@
1
- ![public/logo.svg](public/logo.svg)
1
+ [![public/logo.svg](public/logo.svg)](https://mockhttp.org)
2
2
 
3
3
  [![tests](https://github.com/jaredwray/mockhttp/actions/workflows/tests.yaml/badge.svg)](https://github.com/jaredwray/mockhttp/actions/workflows/tests.yaml)
4
4
  [![GitHub license](https://img.shields.io/github/license/jaredwray/mockhttp)](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) => {
@@ -90,7 +91,8 @@ var fastifyConfig = {
90
91
  options: {
91
92
  colorize: true,
92
93
  translateTime: true,
93
- ignore: "pid,hostname"
94
+ ignore: "pid,hostname",
95
+ singleLine: true
94
96
  }
95
97
  }
96
98
  }
@@ -102,7 +104,7 @@ import { fastifySwaggerUi } from "@fastify/swagger-ui";
102
104
  // package.json
103
105
  var package_default = {
104
106
  name: "@jaredwray/mockhttp",
105
- version: "0.2.0",
107
+ version: "0.2.2",
106
108
  description: "Mock Http - Easy way to mock http with httpbin replacement",
107
109
  type: "module",
108
110
  main: "dist/index.js",
@@ -117,6 +119,7 @@ var package_default = {
117
119
  "docker:run": "docker run -p 3000:3000 jaredwray/mockhttp",
118
120
  "docker:push": "docker push jaredwray/mockhttp",
119
121
  "docker:stop": 'docker stop $(docker ps -a -q --filter ancestor=jaredwray/mockhttp --format="{{.ID}}")',
122
+ "docker:readme": "tsx ./scripts/create-docker-readme.ts",
120
123
  prepare: "npm run build",
121
124
  start: "node dist/index.js"
122
125
  },
@@ -148,11 +151,12 @@ var package_default = {
148
151
  xo: "^0.60.0"
149
152
  },
150
153
  dependencies: {
154
+ "@fastify/cors": "^10.0.1",
151
155
  "@fastify/helmet": "^13.0.0",
152
156
  "@fastify/static": "^8.0.3",
153
157
  "@fastify/swagger": "^9.4.0",
154
158
  "@fastify/swagger-ui": "^5.2.0",
155
- "@scalar/api-reference": "^1.25.80",
159
+ "@scalar/api-reference": "^1.25.82",
156
160
  fastify: "^5.1.0",
157
161
  "html-escaper": "^3.0.3",
158
162
  pino: "^9.5.0",
@@ -1053,6 +1057,9 @@ await fastify.register(fastifyStatic, {
1053
1057
  root: path.resolve("./public"),
1054
1058
  decorateReply: false
1055
1059
  });
1060
+ await fastify.register(fastifyCors, {
1061
+ origin: "*"
1062
+ });
1056
1063
  await fastify.register(fastifyHelmet);
1057
1064
  await fastify.register(fastifySwagger, fastifySwaggerConfig);
1058
1065
  await registerSwaggerUi(fastify);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaredwray/mockhttp",
3
- "version": "0.2.0",
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,11 +47,12 @@
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",
52
54
  "@fastify/swagger-ui": "^5.2.0",
53
- "@scalar/api-reference": "^1.25.80",
55
+ "@scalar/api-reference": "^1.25.82",
54
56
  "fastify": "^5.1.0",
55
57
  "html-escaper": "^3.0.3",
56
58
  "pino": "^9.5.0",