-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathpackage.json
More file actions
383 lines (383 loc) · 13.2 KB
/
package.json
File metadata and controls
383 lines (383 loc) · 13.2 KB
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
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
{
"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": "4.0.2",
"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"
},
{
"command": "wikitext.restartLsp",
"title": "Restart WikiParser LSP",
"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": "Server & API",
"properties": {
"wikitext.host": {
"order": 0,
"type": "string",
"description": "The host that provides the API, such as 'en.wikipedia.org'.",
"default": "en.wikipedia.org"
},
"wikitext.transferProtocol": {
"order": 1,
"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.apiPath": {
"order": 2,
"type": "string",
"markdownDescription": "Set the base path to access the API / articles. If unsure, please check the 'Special:Version' page of your site.",
"default": "/w/api.php"
},
"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/"
}
}
},
{
"type": "object",
"title": "Account",
"properties": {
"wikitext.userName": {
"order": 0,
"type": "string",
"description": "The username of your Wikimedia account."
},
"wikitext.password": {
"order": 1,
"type": "string",
"description": "The password for your account. It will be stored in plain text in the settings. Please avoid saving this on public or shared devices."
},
"wikitext.autoLogin": {
"order": 2,
"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 authentication."
}
}
},
{
"type": "object",
"title": "Preview",
"properties": {
"wikitext.enableJavascript": {
"order": 0,
"type": "boolean",
"description": "Enable JavaScript support in the previewer. This may impact VSCode's performance and introduce potential security risks.",
"default": false
},
"wikitext.getCss": {
"order": 1,
"type": "boolean",
"description": "Fetch CSS when previewing the page. Note that this feature significantly increases network requests, 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.previewCssStyle": {
"order": 2,
"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%);}"
}
}
},
{
"type": "object",
"title": "Editing",
"properties": {
"wikitext.redirects": {
"order": 0,
"type": "boolean",
"markdownDescription": "Automatically resolve redirects for input pages. Note that posting commands will **not** be redirected.",
"default": true
},
"wikitext.skipEnteringPageTitle": {
"order": 1,
"type": "boolean",
"default": false,
"markdownDescription": "If `PageTitle` is filled in `PAGE_INFO`, skip entering the title when posting."
},
"wikitext.webCiteFormat": {
"order": 2,
"type": "string",
"markdownDescription": "Configure the generation format 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>}}"
}
}
},
{
"type": "object",
"title": "WikiParser",
"properties": {
"wikitext.wikiparser.enable": {
"order": 0,
"type": "boolean",
"default": false,
"description": "Enable WikiParser, a LSP for Wikitext to provide better writing assistance. Restart the WikiParser server via the command palette to apply changes."
},
"wikitext.wikiparser.syncArticlePath": {
"order": 1,
"type": "boolean",
"default": true,
"markdownDescription": "Force update WikiParser's [Article Path](#wikiparser.articlePath) every time WikiParser Server is started."
}
}
}
]
},
"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 ./eslint.config.mjs ./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": "^10.0.0",
"@types/node": "^22.0.0",
"@types/node-fetch": "^2.6.13",
"@types/vscode": "^1.110.0",
"@types/webpack-env": "^1.18.8",
"@typescript-eslint/eslint-plugin": "^8.57.0",
"@typescript-eslint/parser": "^8.57.0",
"@vscode/test-electron": "^2.5.2",
"@vscode/test-web": "^0.0.80",
"@vscode/vsce": "^3.7.1",
"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",
"circular-dependency-plugin": "^5.2.2",
"crypto-browserify": "^3.12.0",
"eslint": "^9.8.0",
"glob": "^7.2.0",
"https-browserify": "^1.0.0",
"js-yaml": "^4.1.1",
"mocha": "^10.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.5.4",
"tslib": "^2.6.3",
"typescript": "^5.9.3",
"url": "^0.11.0",
"vm-browserify": "^1.1.2",
"vscode-languageclient": "^9.0.1",
"webpack": "^5.105.4",
"webpack-cli": "^5.1.0"
},
"dependencies": {
"cheerio": "^1.2.0",
"luxon": "^2.5.2",
"node-fetch": "^2.6.5"
},
"resolutions": {
"eslint/**/strip-ansi": "6.0.1"
}
}