@karry.sun/yapi-gen 0.2.6 → 0.2.7

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/run.js +2 -2
  2. package/package.json +1 -1
package/dist/run.js CHANGED
@@ -57,8 +57,8 @@ const { defineConfig } = require('yapi-to-typescript');
57
57
  const { resolveConfig } = require('${packageName}');
58
58
  const { createRequire } = require('module');
59
59
 
60
- const require = createRequire(__filename);
61
- const userConfig = require(${configPathEscaped});
60
+ const req = createRequire(__filename);
61
+ const userConfig = req(${configPathEscaped});
62
62
  const raw = userConfig.default ?? userConfig;
63
63
  const configList = Array.isArray(raw) ? raw : [raw];
64
64
  const resolvedList = configList.map((c) => resolveConfig(c, process.cwd()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@karry.sun/yapi-gen",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "基于 yapi-to-typescript 的 YApi 前端代码生成 CLI,支持可配置的请求适配器与多项目复用",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",