|
1 | 1 | { |
2 | 2 | "name": "yapi-code", |
3 | 3 | "displayName": "yapi-code", |
4 | | - "description": "", |
| 4 | + "description": "根据 yapi 接口定义快速生成 TypeScript 类型,支持自定义模板", |
| 5 | + "author": "wjkang <ruoxieme@gmail.com>", |
5 | 6 | "version": "0.0.1", |
| 7 | + "icon": "asset/icon.png", |
| 8 | + "publisher": "wjkang", |
6 | 9 | "engines": { |
7 | | - "vscode": "^1.46.0" |
| 10 | + "vscode": "^1.42.0" |
8 | 11 | }, |
9 | 12 | "categories": [ |
10 | 13 | "Other" |
11 | 14 | ], |
| 15 | + "keywords": [ |
| 16 | + "yapi", |
| 17 | + "typescript", |
| 18 | + "generate code", |
| 19 | + "json" |
| 20 | + ], |
12 | 21 | "activationEvents": [ |
13 | | - "onCommand:yapi-code.generateFetchFun", |
14 | | - "onCommand:yapi-code.generateFetchFunByJSON" |
| 22 | + "onCommand:yapi-code.generateCode", |
| 23 | + "onCommand:yapi-code.generateMockCode" |
15 | 24 | ], |
16 | 25 | "main": "./out/extension.js", |
17 | 26 | "contributes": { |
18 | 27 | "commands": [ |
19 | 28 | { |
20 | | - "command": "yapi-code.generateFetchFun", |
21 | | - "title": "新增接口定义" |
| 29 | + "command": "yapi-code.generateCode", |
| 30 | + "title": "YAPI->生成代码" |
| 31 | + }, |
| 32 | + { |
| 33 | + "command": "yapi-code.generateMockCode", |
| 34 | + "title": "YAPI->生成mock代码" |
22 | 35 | } |
23 | 36 | ], |
24 | 37 | "menus": { |
25 | 38 | "editor/context": [ |
26 | 39 | { |
27 | | - "command": "yapi-code.generateFetchFun" |
| 40 | + "command": "yapi-code.generateCode" |
| 41 | + }, |
| 42 | + { |
| 43 | + "command": "yapi-code.generateMockCode" |
28 | 44 | } |
29 | 45 | ] |
30 | 46 | }, |
31 | 47 | "configuration": { |
32 | 48 | "type": "object", |
33 | | - "title": "yapi-code configuration", |
| 49 | + "title": "yapi-code 配置项", |
34 | 50 | "properties": { |
35 | 51 | "yapi.domain": { |
36 | 52 | "type": "string", |
37 | 53 | "default": "", |
38 | | - "description": "api 域名" |
| 54 | + "description": "域名" |
| 55 | + }, |
| 56 | + "yapi.project": { |
| 57 | + "type": "array", |
| 58 | + "default": [], |
| 59 | + "description": "项目列表。eg.[{\"name\": \"项目\",\"token\": \"token\"}]" |
| 60 | + }, |
| 61 | + "yapi.codeTemplate": { |
| 62 | + "type": "array", |
| 63 | + "default": [], |
| 64 | + "description": "模板列表。eg.[{\"name\": \"模板名称\",\"template\": \"模板字符串\"}]" |
39 | 65 | } |
40 | 66 | } |
41 | 67 | } |
|
49 | 75 | "test": "node ./out/test/runTest.js" |
50 | 76 | }, |
51 | 77 | "devDependencies": { |
52 | | - "@types/vscode": "^1.47.0", |
| 78 | + "@types/copy-paste": "^1.1.30", |
53 | 79 | "@types/glob": "^7.1.1", |
54 | 80 | "@types/mocha": "^7.0.2", |
55 | 81 | "@types/node": "^13.11.0", |
56 | | - "eslint": "^6.8.0", |
57 | | - "@typescript-eslint/parser": "^2.30.0", |
| 82 | + "@types/prettier": "^2.0.2", |
| 83 | + "@types/readable-stream": "^2.3.9", |
| 84 | + "@types/urijs": "^1.19.9", |
| 85 | + "@types/vscode": "1.42.0", |
58 | 86 | "@typescript-eslint/eslint-plugin": "^2.30.0", |
| 87 | + "@typescript-eslint/parser": "^2.30.0", |
| 88 | + "eslint": "^6.8.0", |
59 | 89 | "glob": "^7.1.6", |
60 | 90 | "mocha": "^7.1.2", |
61 | 91 | "typescript": "^3.8.3", |
62 | 92 | "vscode-test": "^1.3.0" |
| 93 | + }, |
| 94 | + "dependencies": { |
| 95 | + "axios": "^0.19.2", |
| 96 | + "copy-paste": "^1.3.0", |
| 97 | + "handlebars": "^4.7.6", |
| 98 | + "is-url": "^1.2.4", |
| 99 | + "json-schema-to-typescript": "^9.1.1", |
| 100 | + "quicktype-core": "^6.0.66", |
| 101 | + "strip-comments": "^2.0.1" |
63 | 102 | } |
64 | 103 | } |
0 commit comments