@1szx1/vite-plugin-swagger2ts 1.0.10 → 1.0.11

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/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@1szx1/vite-plugin-swagger2ts",
3
3
  "description": "fork for https://github.com/1SZX1/vite-plugin-swagger2ts",
4
- "version": "1.0.10",
5
- "main": "dist/index.js",
6
- "module": "dist/index.mjs",
7
- "types": "index.d.ts",
4
+ "version": "1.0.11",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "type": "module",
8
9
  "license": "MIT",
9
10
  "author": "1SZX1 <2414126198@qq.com>",
10
11
  "repository": {
@@ -18,12 +19,12 @@
18
19
  ],
19
20
  "exports": {
20
21
  ".": {
21
- "require": "./dist/index.js",
22
- "import": "./dist/index.mjs"
22
+ "require": "./dist/index.cjs",
23
+ "import": "./dist/index.js"
23
24
  },
24
25
  "./adapters": {
25
- "require": "./dist/adapters/index.js",
26
- "import": "./dist/adapters/index.mjs"
26
+ "require": "./dist/adapters/index.cjs",
27
+ "import": "./dist/adapters/index.js"
27
28
  }
28
29
  },
29
30
  "scripts": {
@@ -1,26 +0,0 @@
1
- import "../chunk-TTFRSOOU.mjs";
2
-
3
- // src/adapters/utils.ts
4
- function mergeUrlParam(url, paths) {
5
- return url.replace(/{(.*?)}/g, (_, key) => paths[key]);
6
- }
7
-
8
- // src/adapters/axios.ts
9
- function axiosAdapter(httpInstance) {
10
- async function request(url, method, param, config) {
11
- if (config?.path)
12
- url = mergeUrlParam(url, config.path);
13
- const response = await httpInstance.request({
14
- url,
15
- method,
16
- params: method === "get" ? param : config?.params,
17
- data: method !== "get" ? param : config?.data,
18
- ...config
19
- });
20
- return response.data;
21
- }
22
- return { request };
23
- }
24
- export {
25
- axiosAdapter
26
- };
File without changes