-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
130 lines (130 loc) · 4.21 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
{
"name": "alibaba-cloud-api-to-typescript",
"displayName": "Alibaba Cloud API To Typescript",
"description": "将阿里云OpenAPI的传参和响应参数转换为TypeScript的工具。",
"version": "1.0.2",
"author": {
"email": "[email protected]",
"name": "JonnyChen",
"url": "https://github.com/Jonny-china/"
},
"repository": {
"type": "github",
"url": "https://github.com/Jonny-china/vscode-alibaba-cloud-api-to-typescript"
},
"publisher": "JonnyChen",
"engines": {
"vscode": "^1.92.0"
},
"categories": [
"Snippets",
"Other"
],
"activationEvents": [
"onCommand:alibaba-cloud-api-to-typescript.AlibabaCloudAPIToTypescript"
],
"icon": "images/logo.png",
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "alibaba-cloud-api-to-typescript.AlibabaCloudAPIToTypescript",
"title": "Alibaba Cloud API To Typescript"
}
],
"configuration": {
"type": "object",
"title": "Alibaba Cloud API To Typescript Configuration",
"properties": {
"alibaba-cloud-api-to-typescript.scope.produce": {
"type": "string",
"default": "",
"description": "获取对应产品下的 OpenAPI 数据,同时需要添加下方版本(Version)字段"
},
"alibaba-cloud-api-to-typescript.scope.version": {
"type": "string",
"default": "",
"description": "获取对应产品版本下的 OpenAPI 数据,同时需要添加上方产品Code(Product)字段"
},
"alibaba-cloud-api-to-typescript.useExport": {
"type": "boolean",
"default": true,
"description": "是否使用 export interface,导出接口"
},
"alibaba-cloud-api-to-typescript.comments.disabled": {
"type": "boolean",
"default": false,
"description": "禁止生成字段注释"
},
"alibaba-cloud-api-to-typescript.comments.insertExample": {
"type": "boolean",
"default": false,
"description": "字段注释中,是否插入JS Docs的 @example 示例"
},
"alibaba-cloud-api-to-typescript.propertyFormat": {
"type": "string",
"default": "auto",
"description": "字段名称格式化,首字母小写还是大写。",
"enum": [
"auto",
"lowerFirst",
"upperFirst"
],
"enumDescriptions": [
"自动,根据阿里云OpenAPI文档中字段名称的格式显示不做任何转换(目前默认是首字母大写)",
"首字母小写",
"首字母大写"
]
},
"alibaba-cloud-api-to-typescript.interfaceNamePrefix": {
"type": "string",
"default": "",
"description": "interface 名称前缀(部分项目需要在接口名称前加`I`)"
},
"alibaba-cloud-api-to-typescript.unionToEnum": {
"type": "boolean",
"default": true,
"description": "是否将联合类型生成枚举,如`CallType: 'INBOUND' | 'OUTBOUND' | ...`生成枚举类型 `enum CallTypeEnum { INBOUND='INBOUND',OUTBOUND='OUTBOUND', ... }`"
}
}
}
},
"scripts": {
"vscode:prepublish": "pnpm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"pretest": "pnpm run compile && pnpm run lint",
"lint": "eslint src --ext ts",
"test": "vscode-test",
"prepare": "husky"
},
"devDependencies": {
"@commitlint/cli": "^19.4.0",
"@commitlint/config-conventional": "^19.2.2",
"@eslint/js": "^9.9.1",
"@types/eslint__js": "^8.42.3",
"@types/lodash": "^4.17.7",
"@types/mocha": "^10.0.7",
"@types/node": "20.x",
"@types/vscode": "^1.92.0",
"@vscode/test-cli": "^0.0.10",
"@vscode/test-electron": "^2.4.0",
"eslint": "^9.9.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"globals": "^15.9.0",
"husky": "^9.1.5",
"lint-staged": "^15.2.9",
"prettier": "3.3.3",
"typescript": "^5.4.5",
"typescript-eslint": "^8.2.0"
},
"dependencies": {
"lodash": "^4.17.21"
},
"lint-staged": {
"*.ts": [
"eslint --fix"
]
}
}