yapi-to-typescript2 1.0.0
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/LICENSE +21 -0
- package/README.md +22 -0
- package/lib/cjs/Generator.js +1135 -0
- package/lib/cjs/SwaggerToYApiServer.js +336 -0
- package/lib/cjs/cli.js +285 -0
- package/lib/cjs/helpers.js +230 -0
- package/lib/cjs/index.js +19 -0
- package/lib/cjs/swaggerJsonToYApiData.js +496 -0
- package/lib/cjs/types.js +100 -0
- package/lib/cjs/utils.js +766 -0
- package/lib/esm/Generator.js +1111 -0
- package/lib/esm/SwaggerToYApiServer.js +317 -0
- package/lib/esm/cli.js +257 -0
- package/lib/esm/helpers.js +216 -0
- package/lib/esm/index.d.ts +845 -0
- package/lib/esm/index.js +2 -0
- package/lib/esm/swaggerJsonToYApiData.js +483 -0
- package/lib/esm/types.js +79 -0
- package/lib/esm/utils.js +707 -0
- package/package.json +114 -0
package/package.json
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "yapi-to-typescript2",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "根据 YApi 的接口定义生成 TypeScript/JavaScript 的接口类型及其请求函数代码。",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"yapi",
|
|
7
|
+
"codegen",
|
|
8
|
+
"typescript"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://github.com/fjc0k/yapi-to-typescript",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/fjc0k/yapi-to-typescript/issues"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git@github.com:fjc0k/yapi-to-typescript.git"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"author": {
|
|
20
|
+
"name": "Jay Fong",
|
|
21
|
+
"email": "fjc0kb@gmail.com",
|
|
22
|
+
"url": "https://github.com/fjc0k"
|
|
23
|
+
},
|
|
24
|
+
"sideEffects": false,
|
|
25
|
+
"main": "lib/cjs/index.js",
|
|
26
|
+
"module": "lib/esm/index.js",
|
|
27
|
+
"types": "lib/esm/index.d.ts",
|
|
28
|
+
"bin": {
|
|
29
|
+
"ytt": "lib/cjs/cli.js"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"lib"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "haoma compile",
|
|
36
|
+
"docs": "npm run docs:build && gh-pages --dist docs/dist --dest handbook",
|
|
37
|
+
"docs:build": "dumi build",
|
|
38
|
+
"docs:dev": "dumi dev",
|
|
39
|
+
"release": "yarn testOnly && standard-version -a && yarn build && yarn docs && git push --follow-tags origin master && npm publish",
|
|
40
|
+
"releaseBeta": "yarn testOnly && standard-version -a --release-as patch --prerelease beta && yarn build && git push --follow-tags origin master && npm publish --tag next",
|
|
41
|
+
"test": "jest --coverage",
|
|
42
|
+
"testApi": "ts-node -T src/cli.ts",
|
|
43
|
+
"testOnly": "jest",
|
|
44
|
+
"testUpdateSnapshot": "jest --coverage -u"
|
|
45
|
+
},
|
|
46
|
+
"husky": {
|
|
47
|
+
"hooks": {
|
|
48
|
+
"pre-commit": "lint-staged"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"lint-staged": {
|
|
52
|
+
"*.{css,less,scss,sass,html,htm,vue,yml,yaml,json,md}": [
|
|
53
|
+
"prettier --write"
|
|
54
|
+
],
|
|
55
|
+
"*.{js,jsx,ts,tsx}": [
|
|
56
|
+
"eslint --fix",
|
|
57
|
+
"prettier --write"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"@babel/runtime": "^7.13.10",
|
|
62
|
+
"@types/json-schema": "^7.0.9",
|
|
63
|
+
"change-case": "^3.0.2",
|
|
64
|
+
"consola": "^2.3.0",
|
|
65
|
+
"dayjs": "^1.8.32",
|
|
66
|
+
"form-data": "^3.0.0",
|
|
67
|
+
"fs-extra": "^7.0.1",
|
|
68
|
+
"get-port": "^5.1.1",
|
|
69
|
+
"json-schema-to-typescript": "^10.1.4",
|
|
70
|
+
"json5": "^2.1.0",
|
|
71
|
+
"node-fetch": "^2",
|
|
72
|
+
"ora": "^3.4.0",
|
|
73
|
+
"prettier": "^2.7.1",
|
|
74
|
+
"prompts": "^2.0.4",
|
|
75
|
+
"proxy-agent": "^5.0.0",
|
|
76
|
+
"signal-exit": "^3.0.3",
|
|
77
|
+
"swagger-client": "3.18.4",
|
|
78
|
+
"to-json-schema": "^0.2.5",
|
|
79
|
+
"ts-node": "^8.0.2",
|
|
80
|
+
"typescript": "^4.2.3",
|
|
81
|
+
"vtils": "^4.57.0",
|
|
82
|
+
"yargs": "^16.2.0"
|
|
83
|
+
},
|
|
84
|
+
"devDependencies": {
|
|
85
|
+
"@types/fs-extra": "^5.0.4",
|
|
86
|
+
"@types/json5": "^0.0.30",
|
|
87
|
+
"@types/node": "^10.12.10",
|
|
88
|
+
"@types/node-fetch": "^2.6.2",
|
|
89
|
+
"@types/prompts": "^1.2.0",
|
|
90
|
+
"@types/react": "^16.9.2",
|
|
91
|
+
"@types/signal-exit": "^3.0.0",
|
|
92
|
+
"@types/swagger-schema-official": "^2.0.21",
|
|
93
|
+
"@types/to-json-schema": "^0.2.0",
|
|
94
|
+
"@types/yargs": "^16.0.1",
|
|
95
|
+
"codecov": "^3",
|
|
96
|
+
"dumi": "^1.1.10",
|
|
97
|
+
"eslint": "^7",
|
|
98
|
+
"gh-pages": "^2.0.1",
|
|
99
|
+
"haoma": "^2.31.0",
|
|
100
|
+
"husky": "^4",
|
|
101
|
+
"jest": "^26",
|
|
102
|
+
"lint-staged": "^10",
|
|
103
|
+
"notify-dingtalk": "^1.2.0",
|
|
104
|
+
"openapi-types": "^7.0.1",
|
|
105
|
+
"shx": "^0.3.2",
|
|
106
|
+
"standard-version": "^9.3.2",
|
|
107
|
+
"tempy": "^0.3.0",
|
|
108
|
+
"typedoc": "^0.14.2",
|
|
109
|
+
"typescript-snapshots-plugin": "^1.7.0"
|
|
110
|
+
},
|
|
111
|
+
"engines": {
|
|
112
|
+
"node": ">=10.19.0"
|
|
113
|
+
}
|
|
114
|
+
}
|