mock-fried 1.0.2 → 1.0.3

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/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.0.0"
6
6
  },
7
- "version": "1.0.2",
7
+ "version": "1.0.3",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
@@ -1,4 +1,4 @@
1
- import { defineEventHandler, getQuery, readBody, createError, getRequestURL } from "h3";
1
+ import { defineEventHandler, getQuery, readBody, createError } from "h3";
2
2
  import { useRuntimeConfig } from "#imports";
3
3
  import { readFileSync } from "node:fs";
4
4
  import yaml from "js-yaml";
@@ -290,9 +290,8 @@ function handleClientPackageRequest(pkg, generator, cursorManager, pageManager,
290
290
  export default defineEventHandler(async (event) => {
291
291
  const config = useRuntimeConfig(event);
292
292
  const mockConfig = config.mock;
293
- const requestUrl = getRequestURL(event);
294
293
  const prefix = mockConfig?.prefix || "/mock";
295
- let path = requestUrl.pathname;
294
+ let path = event.path;
296
295
  if (path.startsWith(prefix)) {
297
296
  path = path.substring(prefix.length) || "/";
298
297
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mock-fried",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Nuxt3 Mock API Module - OpenAPI & Protobuf RPC Mock Server",
5
5
  "repository": {
6
6
  "type": "git",