-
Notifications
You must be signed in to change notification settings - Fork 6
/
package.json
313 lines (313 loc) · 10.1 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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
{
"name": "aliyun-oss-uploader",
"displayName": "Aliyun OSS Uploader",
"description": "Focus on uploading image to aliyun OSS.",
"publisher": "fangbinwei",
"repository": {
"type": "git",
"url": "https://github.com/fangbinwei/aliyun-oss-uploader.git"
},
"keywords": [
"aliyun",
"oss",
"image",
"picture",
"upload",
"aliyun oss",
"alibaba cloud",
"image uploader",
"upload image"
],
"version": "1.7.0",
"icon": "resources/logo.png",
"engines": {
"vscode": "^1.40.0"
},
"categories": [
"Other"
],
"activationEvents": [
"onCommand:elan.setOSSConfiguration",
"onCommand:elan.uploadFromClipboard",
"onCommand:elan.uploadFromExplorer",
"onCommand:elan.uploadFromExplorerContext",
"onLanguage:markdown",
"onView:bucketExplorer"
],
"main": "./dist/extension.js",
"contributes": {
"commands": [
{
"command": "elan.setOSSConfiguration",
"title": "Set OSS Configuration",
"category": "Elan"
},
{
"command": "elan.uploadFromClipboard",
"title": "Upload Image from Clipboard",
"category": "Elan"
},
{
"command": "elan.uploadFromExplorer",
"title": "Upload Image from Explorer",
"category": "Elan"
},
{
"command": "elan.uploadFromExplorerContext",
"title": "Elan: Upload Image"
},
{
"command": "elan.bucketExplorer.deleteFromContext",
"title": "Delete"
},
{
"command": "elan.bucketExplorer.uploadFromContext",
"title": "Upload"
},
{
"command": "elan.bucketExplorer.uploadFromClipboard",
"title": "Upload from Clipboard"
},
{
"command": "elan.bucketExplorer.refreshRoot",
"title": "Refresh",
"icon": {
"light": "resources/light/refresh.svg",
"dark": "resources/dark/refresh.svg"
}
},
{
"command": "elan.bucketExplorer.copyLink",
"title": "Copy Link",
"icon": {
"light": "resources/light/link.svg",
"dark": "resources/dark/link.svg"
}
},
{
"command": "elan.bucketExplorer.moveFromContext",
"title": "Move/Rename to"
},
{
"command": "elan.bucketExplorer.copyFromContext",
"title": "Copy to"
}
],
"viewsContainers": {
"activitybar": [
{
"id": "elanView",
"title": "Elan",
"icon": "resources/activitybar.svg"
}
]
},
"views": {
"elanView": [
{
"id": "bucketExplorer",
"name": "Bucket"
}
]
},
"viewsWelcome": [
{
"view": "bucketExplorer",
"contents": "Failed to connect OSS. [Learn more](https://github.com/fangbinwei/aliyun-oss-uploader#configuration/).\n[Set Configuration](command:elan.setOSSConfiguration)",
"when": "elan.state == uninitialized"
}
],
"menus": {
"commandPalette": [
{
"command": "elan.uploadFromExplorerContext",
"when": "false"
},
{
"command": "elan.bucketExplorer.deleteFromContext",
"when": "false"
},
{
"command": "elan.bucketExplorer.uploadFromContext",
"when": "false"
},
{
"command": "elan.bucketExplorer.uploadFromClipboard",
"when": "false"
},
{
"command": "elan.bucketExplorer.copyLink",
"when": "false"
},
{
"command": "elan.bucketExplorer.moveFromContext",
"when": "false"
},
{
"command": "elan.bucketExplorer.copyFromContext",
"when": "false"
}
],
"explorer/context": [
{
"when": "resourceExtname =~/^\\.(png|jpg|jpeg|webp|gif|bmp|tiff|ico|svg)$/i",
"command": "elan.uploadFromExplorerContext",
"group": "5_cutcopypaste"
}
],
"view/title": [
{
"command": "elan.bucketExplorer.refreshRoot",
"when": "view == bucketExplorer",
"group": "navigation"
}
],
"view/item/context": [
{
"command": "elan.bucketExplorer.deleteFromContext",
"when": "view == bucketExplorer && viewItem == elan:object",
"group": "7_modification"
},
{
"command": "elan.bucketExplorer.copyLink",
"when": "view == bucketExplorer && viewItem == elan:object",
"group": "inline"
},
{
"command": "elan.bucketExplorer.uploadFromContext",
"when": "view == bucketExplorer && viewItem == elan:folder || view == bucketExplorer &&viewItem == elan:bucket",
"group": "upload@1"
},
{
"command": "elan.bucketExplorer.uploadFromClipboard",
"when": "view == bucketExplorer && viewItem == elan:folder || view == bucketExplorer &&viewItem == elan:bucket",
"group": "upload@1"
},
{
"command": "elan.bucketExplorer.moveFromContext",
"when": "view == bucketExplorer && viewItem == elan:object",
"group": "5_cutcopypaste"
},
{
"command": "elan.bucketExplorer.copyFromContext",
"when": "view == bucketExplorer && viewItem == elan:object",
"group": "5_cutcopypaste"
}
]
},
"configuration": {
"title": "Elan",
"properties": {
"elan.aliyun.accessKeyId": {
"type": "string",
"description": "Aliyun OSS accessKeyId.",
"default": ""
},
"elan.aliyun.accessKeySecret": {
"type": "string",
"description": "Aliyun OSS accessKeySecret.",
"default": ""
},
"elan.aliyun.bucket": {
"type": "string",
"description": "Aliyun OSS bucket instance.",
"default": ""
},
"elan.aliyun.region": {
"type": "string",
"markdownDescription": "e.g. `oss-cn-shanghai`, [check details](https://github.com/ali-sdk/ali-oss#data-regions).",
"default": ""
},
"elan.aliyun.maxKeys": {
"type": "number",
"description": "Max objects in the same level directory of bucket treeView.",
"default": 100,
"minimum": 1,
"maximum": 1000
},
"elan.aliyun.customDomain": {
"type": "string",
"markdownDescription": "If you want to use HTTPS with `Custom Domain`, you should configure the HTTPS certificate on Aliyun OSS. [Check detail](https://help.aliyun.com/document_detail/97187.html?spm=a2c4g.11186623.2.10.43848bddZaQgmF#section-cu6-eyc-ek6).",
"default": ""
},
"elan.aliyun.secure": {
"type": "boolean",
"markdownDescription": "The protocol of URL. HTTPS (secure: `checked`) or HTTP protocol.",
"default": true
},
"elan.bucketView.onlyShowImages": {
"type": "boolean",
"description": "Only show images in bucket treeView.",
"default": true
},
"elan.uploadName": {
"type": "string",
"markdownDescription": "Object name store on OSS\n- `${fileName}`: Filename of uploaded file.\n-`${ext}`: Filename extension of uploaded file.\n- `${contentHash}`: The hash of image. By default, it's the hex digest of md5 hash. You can specify the length of the hash, e.g. `${contentHash:8}`. \n-`${activeMdFilename}`: Filename of active markdown in text editor.",
"default": "${fileName}_${contentHash:8}${ext}"
},
"elan.outputFormat": {
"type": "string",
"markdownDescription": "- `${fileName}`: Filename of uploaded file.\n- `${uploadName}`: Custom defined config. \n-`${activeMdFilename}`: Filename of markdown in active text editor.\n- `${url}`: After a file is uploaded successfully, the OSS sends a callback request to this URL. \n- `${pathname}`: Pathname of `${url}`. e.g. `${url}` is `https://example.org/path/to/your/image.png`, `${pathname}` is `/path/to/your/image.png`",
"default": "![${fileName}](${url})"
},
"elan.bucketFolder": {
"type": "string",
"markdownDescription": "- `${relativeToVsRootPath}`: The path of the directory where the currently active file is located relative to the workspace root directory. \n- `${activeMdFilename}`: Filename of markdown in active text editor.\n- If today is 1993.2.4.\n- `${year}`: 1993\n- `${month}`: 02\n- `${date}`: 04",
"default": ""
}
}
}
},
"scripts": {
"compile": "yarn run copy && tsc -p ./",
"build": "cross-env NODE_ENV=production webpack --mode production",
"vspack": "vsce package -o aliyun-oss-uploader.vsix",
"release": "standard-version",
"clean": "rm -rf dist out",
"watch": "yarn run copy && tsc --watch -p ./",
"webpack-dev": "webpack --mode development --watch --info-verbosity verbose",
"copy": "cpy ./src/utils/clipboard/* ./out/utils/clipboard/",
"lint": "eslint src --ext ts",
"pretest": "yarn run compile && yarn run lint",
"test": "node ./out/test/runTest.js"
},
"devDependencies": {
"@types/glob": "^7.1.1",
"@types/mocha": "^7.0.2",
"@types/vscode": "^1.40.0",
"@types/webpack": "^4.41.17",
"@typescript-eslint/eslint-plugin": "^2.30.0",
"@typescript-eslint/parser": "^2.30.0",
"builtin-modules": "^3.1.0",
"commitizen": "^4.1.2",
"copy-webpack-plugin": "^6.0.1",
"cpy-cli": "^3.1.1",
"cross-env": "^7.0.2",
"cz-customizable": "^6.2.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
"glob": "^7.1.6",
"mocha": "^7.1.2",
"prettier": "^2.0.5",
"standard-version": "^8.0.1",
"ts-loader": "^7.0.5",
"typescript": "^3.8.3",
"vsce": "^1.75.0",
"vscode-test": "^1.3.0",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11"
},
"dependencies": {
"@types/ali-oss": "^6.0.5",
"ali-oss": "^6.8.0",
"clean-webpack-plugin": "^3.0.0",
"date-fns": "^2.14.0",
"execa": "^4.0.1"
},
"config": {
"commitizen": {
"path": "node_modules/cz-customizable"
}
}
}