@fxri/swagger2api 1.0.1 → 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/index.js +1 -1
- package/package.json +9 -1
package/dist/index.js
CHANGED
|
@@ -54,7 +54,7 @@ function onGenerate(data) {
|
|
|
54
54
|
saveFile(datas.file, JSON.stringify(data));
|
|
55
55
|
// 生成接口
|
|
56
56
|
const param = ["--axios", `-n ${confs.param.name}.ts`, `-o ${confs.param.output}`, `-p ${datas.file}`, ...process.argv.filter((_item, index) => index > 1)];
|
|
57
|
-
console.log("执行:", execSync(
|
|
57
|
+
console.log("执行:", execSync(`${path.resolve(import.meta.dirname, "../node_modules/.bin/swagger-typescript-api")} generate ${param.join(" ")}`).toString());
|
|
58
58
|
// 删除文档
|
|
59
59
|
fs.unlinkSync(datas.file);
|
|
60
60
|
// 保存配置
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fxri/swagger2api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "基于 swagger-typescript-api,将 Swagger 文档自动转为 TypeScript 格式的 API 文件",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -34,6 +34,14 @@
|
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"registry": "https://registry.npmjs.org/"
|
|
36
36
|
},
|
|
37
|
+
"homepage": "https://github.com/fxri-net/fxri-swagger2api#readme",
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "https://github.com/fxri-net/fxri-swagger2api.git"
|
|
41
|
+
},
|
|
42
|
+
"bugs": {
|
|
43
|
+
"url": "https://github.com/fxri-net/fxri-swagger2api/issues"
|
|
44
|
+
},
|
|
37
45
|
"scripts": {
|
|
38
46
|
"dev": "pnpm build && node ./dist/index.js",
|
|
39
47
|
"prebuild": "rimraf dist",
|