-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
package.json
319 lines (319 loc) · 11.3 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
314
315
316
317
318
319
{
"name": "wikitext",
"displayName": "Wikitext",
"description": "Wikitext is a document written in a wiki markup language. This extension provides functional support for the Wikitext language with MediaWiki such as Wikipedia.",
"version": "3.8.1",
"publisher": "RoweWilsonFrederiskHolme",
"license": "SEE LICENSE IN LICENSE.txt",
"author": {
"name": "Rowe Wilson Frederisk Holme",
"email": "frederisk@outlook.com",
"url": "https://twitter.com/rwfholme"
},
"homepage": "https://github.com/Frederisk/Wikitext-VSCode-Extension/blob/master/README.md",
"icon": "media/wikitext-icon.png",
"repository": {
"type": "git",
"url": "https://github.com/Frederisk/Wikitext-VSCode-Extension.git"
},
"bugs": {
"url": "https://github.com/Frederisk/Wikitext-VSCode-Extension/issues",
"email": "frederisk@outlook.com"
},
"qna": "https://github.com/Frederisk/Wikitext-VSCode-Extension/discussions/categories/q-a",
"engines": {
"vscode": "^1.64.0"
},
"categories": [
"Programming Languages",
"Snippets",
"Visualization",
"Other"
],
"activationEvents": [
"onUri"
],
"main": "./dist/extension-node",
"browser": "./dist/extension-web",
"contributes": {
"commands": [
{
"command": "wikitext.getPreview",
"title": "Get preview",
"category": "Wikitext",
"icon": "$(open-preview)"
},
{
"command": "wikitext.login",
"title": "Login with your account",
"category": "Wikitext"
},
{
"command": "wikitext.logout",
"title": "Logout, if you are already logged in",
"category": "Wikitext"
},
{
"command": "wikitext.readPage",
"title": "Pull page to edit",
"category": "Wikitext"
},
{
"command": "wikitext.writePage",
"title": "Post your edit to the website",
"category": "Wikitext"
},
{
"command": "wikitext.viewPage",
"title": "View the page",
"category": "Wikitext"
},
{
"command": "wikitext.citeWeb",
"title": "Add a web citation",
"category": "Wikitext"
},
{
"command": "wikitext.closeEditor",
"title": "Close this editor without saving",
"category": "Wikitext"
}
],
"menus": {
"editor/title": [
{
"command": "wikitext.getPreview",
"when": "editorLangId == wikitext",
"group": "navigation"
}
],
"commandPalette": [
{
"command": "wikitext.getPreview",
"when": "editorLangId == wikitext",
"group": "navigation"
},
{
"command": "wikitext.login",
"group": "navigation"
},
{
"command": "wikitext.logout",
"group": "navigation"
},
{
"command": "wikitext.readPage",
"group": "navigation"
},
{
"command": "wikitext.writePage",
"group": "navigation"
},
{
"command": "wikitext.viewPage",
"group": "navigation"
},
{
"command": "wikitext.citeWeb",
"group": "navigation",
"when": "editorLangId == wikitext"
},
{
"command": "wikitext.closeEditor",
"group": "navigation",
"when": "editorLangId == wikitext"
}
]
},
"keybindings": [
{
"command": "wikitext.getPreview",
"key": "shift+ctrl+v",
"mac": "shift+cmd+v",
"when": "editorLangId == wikitext"
}
],
"languages": [
{
"id": "wikitext",
"extensions": [
".wikitext",
".wt",
".mediawiki",
".mw",
".wiki"
],
"aliases": [
"Wikitext",
"WikiText"
],
"mimetypes": [
"text/x-wiki"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "wikitext",
"scopeName": "source.wikitext",
"path": "./syntaxes/wikitext.tmLanguage.json",
"embeddedLanguages": {
"source.json": "json",
"text.html.basic": "html",
"text.tex.latex": "latex"
}
}
],
"snippets": [
{
"language": "wikitext",
"path": "./snippets/snippets.json"
}
],
"configuration": {
"type": "object",
"title": "Wikitext",
"properties": {
"wikitext.host": {
"type": "string",
"description": "The host that provides the API, such as 'en.wikipedia.org'."
},
"wikitext.userName": {
"type": "string",
"description": "The user name of wikimedia site."
},
"wikitext.password": {
"type": "string",
"description": "The password of user. It will be fixed in the software settings, please do not fill in the device in public places."
},
"wikitext.redirects": {
"type": "boolean",
"description": "When the input page is a redirect page, jump automatically. Note that posting command will **not** be redirected.",
"default": true
},
"wikitext.apiPath": {
"type": "string",
"markdownDescription": "Set the basic path to obtain the API. If you are not sure, please check the `Special:Version` page of your site.",
"default": "/w/api.php"
},
"wikitext.getCss": {
"type": "boolean",
"description": "Get CSS when previewing the page. Please note that this feature will greatly increase the extended workload, and some rendering effects may conflict with VSCode. To get the correct display, you may need to enable Previewer's JS support.",
"default": false
},
"wikitext.enableJavascript": {
"type": "boolean",
"description": "Enable Previewer's JS support. This feature may affect the performance of VSCode and introduce potential security risks.",
"default": false
},
"wikitext.articlePath": {
"type": "string",
"markdownDescription": "Set the basic path to obtain the article. please check the `Special:Version` page of your site (No need for `$1`).",
"default": "/wiki/"
},
"wikitext.webCiteFormat": {
"type": "string",
"markdownDescription": "Setting the generation of web reference tags. The configuration of this option is similar to the code section of MakeRef in meta wikimedia. The available fields: `url`, `title`, `accessdate`, `website`, `archiveurl` ,and `archivedate`.\n\n**This function is only a preview function, it may change or become a separate new extension in the future. Please pay attention to the changelog of this function every time you update this extension.**",
"default": "{{cite web<!url> |url={$url}</!url><!title> |title={$title}</!title><!accessdate> |access-date={$accessdate}</!accessdate><!website> |website={$website}</!website><!publicationdate> |publication-date={$publicationdate}</!publicationdate><!archiveurl> |archive-url={$archiveurl}</!archiveurl><!archivedate> |archive-date={$archivedate}</!archivedate>}}"
},
"wikitext.transferProtocol": {
"type": "string",
"default": "https://",
"enum": [
"http://",
"https://"
],
"enumDescriptions": [
"HyperText Transfer Protocol",
"HyperText Transfer Protocol Secure"
],
"description": "Select the transfer protocol used when accessing the API."
},
"wikitext.previewCssStyle": {
"type": "string",
"markdownDescription": "CSS attached to Previewer. This content always works, regardless of whether [GetCss](#wikitext.getCss) is enabled or not. To enable CSS for a specific category of themes, you can use the class filter name `vscode-light`, `vscode-dark`, `vscode-high-contrast` etc. See [Extension guides](https://code.visualstudio.com/api/extension-guides/webview#theming-webview-content) to learn more.",
"default": ".vscode-dark img[class^=\"mwe-math-fallback-image\"]{filter: invert(85%);} .vscode-light {} .vscode-high-contrast img[class^=\"mwe-math-fallback-image\"]{background-color: white; filter: invert(100%);}"
},
"wikitext.autoLogin": {
"type": "string",
"default": "Ask me",
"enum": [
"Always",
"Never",
"Ask me"
],
"enumDescriptions": [
"Always log in automatically when I am not logged in",
"Never log in automatically",
"Ask me if I want to log in when I am not logged in"
],
"description": "Whether to automatically log in when performing an action that requires an account to be logged in."
},
"wikitext.skipEnteringPageTitle": {
"type": "boolean",
"default": false,
"markdownDescription": "If `PageTitle` is filled in `PAGE_INFO`, skip entering the title when posting."
}
}
}
},
"scripts": {
"vscode:prepublish": "yarn run compile",
"compile": "yarn run convert && webpack --config webpack.config.js --mode production",
"compile-debug": "yarn run convert && webpack --config webpack.config.js --mode development",
"lint": "eslint -c .eslintrc.yml --ext .ts ./src",
"watch": "yarn run convert && webpack --config webpack.config.js --mode development --watch",
"pretest": "yarn run compile-debug && yarn run lint",
"test": "yarn run test-node && yarn run test-web",
"test-node": "node ./dist/test/runTest.js",
"test-web": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=. --extensionTestsPath=./dist/test/suite/index-web.js",
"convert": "js-yaml snippets/snippets.yaml > snippets/snippets.json && js-yaml syntaxes/wikitext.tmLanguage.yaml > syntaxes/wikitext.tmLanguage.json && js-yaml language-configuration.yaml > language-configuration.json",
"package": "vsce package --yarn"
},
"devDependencies": {
"@types/cheerio": "^0.22.28",
"@types/glob": "^7.2.0",
"@types/luxon": "^2.0.7",
"@types/mocha": "^9.0.0",
"@types/node": "^16.11.10",
"@types/node-fetch": "^2.5.12",
"@types/vscode": "^1.64.0",
"@types/webpack-env": "^1.18.0",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"@vscode/test-electron": "^2.2.0",
"@vscode/test-web": "^0.0.32",
"assert": "^2.0.0",
"async-hook-browser": "^0.0.6",
"browser-request": "^0.3.3",
"browserify-fs": "^1.0.0",
"browserify-zlib": "^0.2.0",
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.0",
"eslint": "^8.3.0",
"glob": "^7.2.0",
"https-browserify": "^1.0.0",
"js-yaml": "^4.1.0",
"mocha": "^9.1.3",
"mwbot": "^2.0.0",
"net": "^1.0.2",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.1",
"process": "^0.11.10",
"querystring-es3": "^0.2.1",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"tls-browserify": "^0.2.2",
"ts-loader": "^9.2.3",
"typescript": "^4.5.2",
"url": "^0.11.0",
"webpack": "^5.76.0",
"webpack-cli": "^4.9.1"
},
"dependencies": {
"cheerio": "^1.0.0-rc.9",
"luxon": "^2.5.2",
"node-fetch": "^2.6.5"
}
}