forked from SvenZhao/var-translation
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpackage.json
209 lines (209 loc) · 6.45 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
{
"name": "case-translation",
"displayName": "Case Translation",
"description": "一键转换成常用大小驼峰等格式",
"publisher": "IOLOII",
"icon": "images/Snipaste_2023-12-07_00-39-11.png",
"version": "1.0.8",
"engines": {
"vscode": "^1.50.0"
},
"categories": [
"Other"
],
"keywords": [
"translate",
"case",
"camel",
"翻译",
"变量",
"驼峰",
"IOLOII"
],
"activationEvents": [
"*"
],
"main": "./dist/extension.js",
"contributes": {
"keybindings": [
{
"command": "extension.caseTranslation",
"key": "Alt+shift+t",
"mac": "cmd+shift+t"
}
],
"commands": [
{
"command": "extension.caseTranslation",
"title": "Case Translation 🔄",
"when": "editorTextFocus",
"category": "case-translation"
},
{
"command": "extension.caseTranslation.camelCase",
"title": "camelCase 驼峰(小) camelCase",
"when": "editorTextFocus",
"category": "case-translation"
},
{
"command": "extension.caseTranslation.pascalCase",
"title": "pascalCase 驼峰(大) PascalCase",
"when": "editorTextFocus",
"category": "case-translation"
},
{
"command": "extension.caseTranslation.paramCase",
"title": "paramCase 中划线(小) param-case",
"when": "editorTextFocus",
"category": "case-translation"
},
{
"command": "extension.caseTranslation.snakeCase",
"title": "snakeCase 下划线 snake_case",
"when": "editorTextFocus",
"category": "case-translation"
},
{
"command": "extension.caseTranslation.constantCase",
"title": "constantCase 常量 CONSTANT_CASE",
"when": "editorTextFocus",
"category": "case-translation"
},
{
"command": "extension.caseTranslation.capitalCase",
"title": "capitalCase 分词(大) Capital Case",
"when": "editorTextFocus",
"category": "case-translation"
},
{
"command": "extension.caseTranslation.dotCase",
"title": "dotCase 对象属性 dot case",
"when": "editorTextFocus",
"category": "case-translation"
},
{
"command": "extension.caseTranslation.headerCase",
"title": "headerCase 中划线(大) Header-Case",
"when": "editorTextFocus",
"category": "case-translation"
},
{
"command": "extension.caseTranslation.noCase",
"title": "noCase 分词(小) no case",
"when": "editorTextFocus",
"category": "case-translation"
},
{
"command": "extension.caseTranslation.pathCase",
"title": "pathCase 文件路径 path/case",
"when": "editorTextFocus",
"category": "case-translation"
}
],
"menus": {
"editor/context": [
{
"when": "editorTextFocus",
"command": "extension.caseTranslation"
}
]
},
"configuration": {
"type": "object",
"title": "驼峰翻译配置",
"properties": {
"caseTranslation.baiduSecret": {
"type": "string",
"default": "",
"description": "百度翻译密钥 使用逗号隔开例如 appid,scretkey 申请地址看文档"
},
"caseTranslation.tencentSecret": {
"type": "string",
"default": "",
"description": "腾讯翻译君密钥 使用逗号隔开例如 secretId,secretKey 申请地址看文档"
},
"caseTranslation.googleTld": {
"type": "string",
"default": "",
"description": "用于在调用API时使用的谷歌翻译的顶级域名:https://translate.google.{Tld} 默认为com"
},
"caseTranslation.openai.apiKey": {
"type": "string",
"default": "",
"description": "官方ApiKey是sk-开头的字符串"
},
"caseTranslation.openai.apiBaseUrl": {
"type": "string",
"default": "",
"description": "OpenAI API基础URL的可选覆盖。如果您自定义了它,请确保具有相同的格式,例如以https://开头且没有尾随斜杠。补全端点的后缀将在内部添加,例如:${apiBaseUrl}/chat/completions,参考官方路线:https://api.openai.com/v1。"
},
"caseTranslation.translationEngine": {
"type": "string",
"enum": [
"google",
"baidu",
"tencent",
"ChatGpt"
],
"enumDescriptions": [
"谷歌中国",
"百度",
"腾讯翻译君",
"ChatGpt"
],
"default": "google",
"description": "翻译引擎"
}
}
}
},
"scripts": {
"vscode:prepublish": "npm run package",
"compile": "webpack --devtool nosources-source-map --config ./build/node-extension.webpack.config.js",
"watch": "webpack --watch --devtool nosources-source-map --config ./build/node-extension.webpack.config.js",
"package": "webpack --mode production --config ./build/node-extension.webpack.config.js",
"test-compile": "tsc -p ./",
"test-watch": "tsc -watch -p ./",
"pretest": "npm run test-compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "node ./out/test/runTest.js",
"release": "standard-version",
"publish": "npm run package && npm run release && vsce publish",
"f2elint-scan": "f2elint scan",
"f2elint-fix": "f2elint fix"
},
"devDependencies": {
"@types/glob": "^7.1.3",
"@types/google-translate-api": "^2.3.1",
"@types/mocha": "^8.0.4",
"@types/node": "^12.11.7",
"@types/vscode": "^1.50.0",
"f2elint": "^2.2.1",
"glob": "^7.1.6",
"mocha": "^8.1.3",
"standard-version": "^9.1.0",
"ts-loader": "^8.0.11",
"typescript": "^4.1.2",
"vscode-test": "^1.4.1",
"webpack": "^5.10.0",
"webpack-cli": "^4.2.0"
},
"dependencies": {
"@asmagin/google-translate-api": "^8.0.2",
"change-case": "^4.1.2",
"node-baidu-translate": "^0.1.0",
"openai": "^3.3.0",
"tencentcloud-sdk-nodejs": "^4.0.331"
},
"repository": {
"type": "git",
"url": "https://github.com/IOLOII/vscode-plugin-case-translation"
},
"homepage": "https://github.com/IOLOII/vscode-plugin-case-translation/blob/master/README.md",
"husky": {
"hooks": {
"pre-commit": "f2elint commit-file-scan",
"commit-msg": "f2elint commit-msg-scan"
}
}
}