@vtj/local 0.8.136 → 0.8.138

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.
Files changed (2) hide show
  1. package/dist/plugin.mjs +12 -3
  2. package/package.json +4 -4
package/dist/plugin.mjs CHANGED
@@ -8,9 +8,18 @@ import bodyParser from "body-parser";
8
8
  import { router } from "./controller.mjs";
9
9
  import { CLIENT_DIR } from "./shared.mjs";
10
10
  const setApis = (server, options) => {
11
- server.middlewares.use(
12
- bodyParser.json({ type: "application/json", limit: "50000kb" })
13
- );
11
+ server.middlewares.use((req, res, next) => {
12
+ const reqUrl = req.url || "";
13
+ if (reqUrl.startsWith(options.baseURL)) {
14
+ bodyParser.json({ type: "application/json", limit: "50000kb" })(
15
+ req,
16
+ res,
17
+ next
18
+ );
19
+ } else {
20
+ next();
21
+ }
22
+ });
14
23
  server.middlewares.use(async (req, res, next) => {
15
24
  const reqUrl = req.url || "";
16
25
  if (reqUrl.startsWith(options.baseURL)) {
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@vtj/local",
3
3
  "private": false,
4
- "version": "0.8.136",
4
+ "version": "0.8.138",
5
5
  "type": "module",
6
6
  "dependencies": {
7
7
  "formidable": "~3.5.1",
8
- "@vtj/coder": "~0.8.136",
9
- "@vtj/core": "~0.8.136",
8
+ "@vtj/coder": "~0.8.138",
9
+ "@vtj/core": "~0.8.138",
10
10
  "@vtj/node": "~0.8.12"
11
11
  },
12
12
  "devDependencies": {
@@ -14,7 +14,7 @@
14
14
  "unbuild": "~2.0.0",
15
15
  "vite": "~5.4.0",
16
16
  "vitest": "~2.1.1",
17
- "@vtj/cli": "~0.8.31"
17
+ "@vtj/cli": "~0.8.33"
18
18
  },
19
19
  "exports": {
20
20
  ".": {