@1szx1/vite-plugin-swagger2ts 1.3.17 → 1.3.18

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/index.cjs CHANGED
@@ -294,14 +294,14 @@ async function loadSwaggerSource(options) {
294
294
  }
295
295
  if (typeof jsonUrl === "string") {
296
296
  const swaggerJson = await fetchUrl(jsonUrl);
297
- loadSwaggerJson(swaggerJson);
297
+ await loadSwaggerJson(swaggerJson);
298
298
  }
299
299
  if (jsonLoader)
300
- loadSwaggerJson(await jsonLoader());
300
+ await loadSwaggerJson(await jsonLoader());
301
301
  if (typeof jsonPath === "string") {
302
302
  const _jsonPath = path.resolve(process.cwd(), jsonPath);
303
303
  const swaggerJson = JSON.parse(fs.readFileSync(_jsonPath, { encoding: "utf-8" }));
304
- loadSwaggerJson(swaggerJson);
304
+ await loadSwaggerJson(swaggerJson);
305
305
  }
306
306
  return { sources: sources2, interfaces: interfaces2 };
307
307
  }
package/dist/index.mjs CHANGED
@@ -285,14 +285,14 @@ async function loadSwaggerSource(options) {
285
285
  }
286
286
  if (typeof jsonUrl === "string") {
287
287
  const swaggerJson = await fetchUrl(jsonUrl);
288
- loadSwaggerJson(swaggerJson);
288
+ await loadSwaggerJson(swaggerJson);
289
289
  }
290
290
  if (jsonLoader)
291
- loadSwaggerJson(await jsonLoader());
291
+ await loadSwaggerJson(await jsonLoader());
292
292
  if (typeof jsonPath === "string") {
293
293
  const _jsonPath = resolve(process.cwd(), jsonPath);
294
294
  const swaggerJson = JSON.parse(readFileSync(_jsonPath, { encoding: "utf-8" }));
295
- loadSwaggerJson(swaggerJson);
295
+ await loadSwaggerJson(swaggerJson);
296
296
  }
297
297
  return { sources: sources2, interfaces: interfaces2 };
298
298
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@1szx1/vite-plugin-swagger2ts",
3
3
  "description": "forked from https://github.com/morelearn1990/vite-plugin-swagger2ts",
4
- "version": "1.3.17",
4
+ "version": "1.3.18",
5
5
  "license": "MIT",
6
6
  "author": "1SZX1 <2414126198@qq.com>",
7
7
  "repository": {