forked from juanfranblanco/vscode-solidity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
541 lines (541 loc) · 18.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
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
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
{
"name": "solidity",
"description": "Ethereum Solidity Language for Visual Studio Code",
"keywords": [
"solidity",
"ethereum",
"blockchain",
"compiler",
"solium",
"nethereum",
"solhint"
],
"version": "0.0.141",
"publisher": "JuanBlanco",
"license": "MIT",
"engines": {
"vscode": "^1.60.0"
},
"contributors": [
"Juan Blanco"
],
"bugs": {
"url": "https://github.com/juanfranblanco/vscode-solidity/issues"
},
"icon": "images/icon.png",
"repository": {
"type": "git",
"url": "https://github.com/juanfranblanco/vscode-solidity"
},
"categories": [
"Programming Languages",
"Snippets"
],
"activationEvents": [
"onLanguage:solidity",
"onCommand:solidity.compile",
"onCommand:solidity.codegenNethereumCodeGenSettings",
"onCommand:solidity.compile.active",
"onCommand:solidity.codegenCSharpProject",
"onCommand:solidity.codegenVbNetProject",
"onCommand:solidity.codegenFSharpProject",
"onCommand:solidity.codegenCSharpProjectAll",
"onCommand:solidity.codegenVbNetProjectAll",
"onCommand:solidity.codegenFSharpProjectAll",
"onCommand:solidity.fixDocument"
],
"main": "./out/src/extension",
"scripts": {
"vscode:prepublish": "npm run compile",
"package": "vsce package",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"test": "nyc --require ts-node/register --require source-map-support/register mocha test/**/*.spec.ts"
},
"dependencies": {
"ajv": "^6.10.2",
"ajv-keywords": "^3.4.1",
"chai": "^4.2.0",
"find-cache-dir": "^2.1.0",
"fs-extra": "^4.0.3",
"mkdirp": "^0.5.1",
"nethereum-codegen": "^1.0.22",
"prettier": "^2.3.1",
"prettier-plugin-solidity": "1.0.0-beta.17",
"require-from-string": "^2.0.2",
"solc": "^0.8.6",
"solhint": "^3.3.6",
"solium": "^1.2.5",
"solparse-exp-jb": "2.2.23",
"vscode-languageclient": "^7.0.0",
"vscode-languageserver": "^7.0.0",
"vscode-languageserver-textdocument": "^1.0.1",
"vscode-uri": "3.0.2",
"yaml-js": "0.2.3"
},
"devDependencies": {
"@types/node": "^11.15.3",
"ts-node": "^7.0.1",
"tslint": "^5.20.1",
"typescript": "^3.7.3",
"@types/vscode": "^1.60.0",
"vsce": "^2.10.2"
},
"nyc": {
"extension": [
".ts"
],
"include": [
"src/**/*.ts"
],
"exclude": [
"**/*.d.ts",
"out",
"dist"
],
"all": true
},
"contributes": {
"configuration": {
"type": "object",
"title": "Solidity configuration",
"properties": {
"solidity.nodemodulespackage": {
"type": "string",
"default": "solc",
"description": "The node modules package to find the solcjs compiler"
},
"solidity.compileUsingRemoteVersion": {
"type": "string",
"default": "latest",
"description": "Configuration to download a 'remote' solc (js) version binary file from 'https://binaries.soliditylang.org/', for example: 'latest' will always use the latest version, or a specific version like: 'v0.4.3+commit.2353da71', use the command 'Solidity: Get solidity releases' to list all versions available, or just right click in a solidity file and select either `Solidity: Change global compiler version (Remote)` or `Solidity: Change workspace compiler version (Remote)` to use the wizard to set the correct version or setting for either the current workspace or globally"
},
"solidity.compilerOptimization": {
"type": "number",
"default": 200,
"description": "Optimize for how many times you intend to run the code. Lower values will optimize more for initial deployment cost, higher values will optimize more for high-frequency usage."
},
"solidity.compileUsingLocalVersion": {
"type": "string",
"default": "",
"description": "Compile using a local solc (js) binary file, please include the path of the file if wanted: 'C://v0.4.3+commit.2353da71.js'"
},
"solidity.defaultCompiler": {
"type": "string",
"description": "Sets the default compiler and compiler configuration to use. Remote will use the configured compiler using the setting 'compileUsingRemoteVersion' downloaded from https://binaries.soliditylang.org/', `localFile` will use the solc file in the location configured in the setting: `compileUsingLocalVersion`, `localNodeModule` will attempt to find the solc file in the node_modules folder / package configured on 'nodemodulespackage' and 'embedded' which will use the solc version packaged with the extension. The default is 'remote' which is configured as 'latest'",
"enum": [
"remote",
"localFile",
"localNodeModule",
"embedded"
],
"default": "remote"
},
"solidity.linter": {
"type": "string",
"enum": [
"",
"solhint",
"solium"
],
"default": "solhint",
"description": "Enables linting using either solium (ethlint) or solhint. Possible options 'solhint' and 'solium', the default is solhint"
},
"solidity.solhintRules": {
"type": [
"object"
],
"default": null,
"description": "Solhint linting validation rules"
},
"solidity.formatter": {
"type": "string",
"default": "prettier",
"enum": [
"none",
"prettier",
"forge"
],
"description": "Enables / disables the solidity formatter prettier (default) or forge (note it needs to be installed)"
},
"solidity.soliumRules": {
"type": [
"object"
],
"default": {
"imports-on-top": 0,
"variable-declarations": 0,
"indentation": [
"off",
4
],
"quotes": [
"off",
"double"
]
},
"description": "Solium linting validation rules"
},
"solidity.enabledAsYouTypeCompilationErrorCheck": {
"type": "boolean",
"default": true,
"description": "Enables as you type compilation of the document and error highlighting"
},
"solidity.validationDelay": {
"type": "number",
"default": 1500,
"description": "Delay to trigger the validation of the changes of the current document (compilation, solium)"
},
"solidity.packageDefaultDependenciesDirectory": {
"type": "string",
"default": "node_modules",
"description": "Default directory for Packages Dependencies, i.e: 'node_modules', 'lib'. This is used to avoid typing imports with that path prefix"
},
"solidity.packageDefaultDependenciesContractsDirectory": {
"type": "string",
"default": "",
"description": "Default directory where the Package Dependency store its contracts, i.e: 'src', 'contracts', or just a blank string '', this is used to avoid typing imports with subfolder paths"
},
"solidity.remappings": {
"type": "array",
"default": [],
"description": "Remappings to resolve contracts to local files / directories, i.e: [\"@openzeppelin/=lib/openzeppelin-contracts\",\"ds-test/=lib/ds-test/src/\"]"
},
"solidity.remappingsWindows": {
"type": "array",
"default": [],
"description": "Windows Remappings to resolve contracts to local Windows files / directories (Note this overrides the generic remapping settings if the OS is Windows) , i.e: [\"@openzeppelin/=C:/lib/openzeppelin-contracts\",\"ds-test/=C:/lib/ds-test/src/\"]"
},
"solidity.remappingsUnix": {
"type": "array",
"default": [],
"description": "Unix Remappings to resolve contracts to local Unix files / directories (Note this overrides the generic remapping settings if the OS is Unix based), i.e: [\"@openzeppelin/=/opt/lib/openzeppelin-contracts\",\"ds-test/=/opt/lib/ds-test/src/\"]"
}
}
},
"languages": [
{
"id": "solidity",
"aliases": [
"Solidity",
"solidity"
],
"extensions": [
".sol"
],
"configuration": "./solidity.configuration.json"
}
],
"commands": [
{
"command": "solidity.compile.active",
"title": "Solidity: Compile Contract"
},
{
"command": "solidity.compile.activeUsingRemote",
"title": "Solidity: Compile with configured Remote version"
},
{
"command": "solidity.compile.activeUsingLocalFile",
"title": "Solidity: Compile with configured Local solc file"
},
{
"command": "solidity.compile.activeUsingNodeModule",
"title": "Solidity: Compile with configured Node module"
},
{
"command": "solidity.compile",
"title": "Solidity: Compile All"
},
{
"command": "solidity.compilerInfo",
"title": "Solidity: Compiler Information"
},
{
"command": "solidity.solcReleases",
"title": "Solidity: Get solidity releases"
},
{
"command": "solidity.codegenNethereumCodeGenSettings",
"title": "Solidity: Create 'nethereum-gen.settings' with default values at root"
},
{
"command": "solidity.codegenCSharpProject",
"title": "Solidity: Code generate CSharp contract definition"
},
{
"command": "solidity.compileAndCodegenCSharpProject",
"title": "Solidity: Compile and Code generate CSharp contract definition"
},
{
"command": "solidity.codegenVbNetProject",
"title": "Solidity: Code generate VB.Net contract definition"
},
{
"command": "solidity.compileAndCodegenVbNetProject",
"title": "Solidity: Compile and Code generate VB.Net contract definition"
},
{
"command": "solidity.codegenFSharpProject",
"title": "Solidity: Code generate FSharp contract definition"
},
{
"command": "solidity.compileAndCodegenFSharpProject",
"title": "Solidity: Compile and Code generate FSharp contract definition"
},
{
"command": "solidity.codegenCSharpProjectAll",
"title": "Solidity: Code generate CSharp Project from all compiled files"
},
{
"command": "solidity.codegenVbNetProjectAll",
"title": "Solidity: Code generate VB.Net Project from all compiled files"
},
{
"command": "solidity.codegenFSharpProjectAll",
"title": "Solidity: Code generate FSharp Project from all compiled files"
},
{
"command": "solidity.codegenCSharpProjectAllAbiCurrent",
"title": "Solidity: Code generate CSharp Definitions for Abi files in current folder"
},
{
"command": "solidity.codegenVbNetProjectAllAbiCurrent",
"title": "Solidity: Code generate VB.Net Definitions for Abi files in current folder"
},
{
"command": "solidity.codegenFSharpProjectAllAbiCurrent",
"title": "Solidity: Code generate FSharp Definitions for Abi files in current folder"
},
{
"command": "solidity.fixDocument",
"title": "Solidity: Fix document rules using Solium"
},
{
"command": "solidity.selectWorkspaceRemoteSolcVersion",
"title": "Solidity: Change workspace compiler version (Remote)"
},
{
"command": "solidity.selectGlobalRemoteSolcVersion",
"title": "Solidity: Change global compiler version (Remote)"
},
{
"command": "solidity.downloadRemoteSolcVersion",
"title": "Solidity: Download compiler"
},
{
"command": "solidity.downloadRemoteVersionAndSetLocalPathSetting",
"title": "Solidity: Download compiler and set workspace local Path"
},
{
"command": "solidity.changeDefaultCompilerType",
"title": "Solidity: Change the default workspace compiler to Remote, Local, NodeModule, Embedded"
}
],
"menus": {
"commandPalette": [
{
"when": "resourceExtname == .abi || resourceExtname == .json",
"command": "solidity.codegenCSharpProject"
},
{
"when": "resourceExtname == .abi || resourceExtname == .json",
"command": "solidity.codegenVbNetProject"
},
{
"when": "resourceExtname == .abi || resourceExtname == .json",
"command": "solidity.codegenFSharpProject"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compile.active"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compile"
}
],
"editor/context": [
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compile.active",
"group": "1_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compile",
"group": "1_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compilerInfo",
"group": "1_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compile.activeUsingRemote",
"group": "1_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compile.activeUsingLocalFile",
"group": "1_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compile.activeUsingNodeModule",
"group": "1_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.changeDefaultCompilerType",
"group": "2_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.solcReleases",
"group": "2_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.selectGlobalRemoteSolcVersion",
"group": "2_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.selectWorkspaceRemoteSolcVersion",
"group": "2_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.downloadRemoteSolcVersion",
"group": "2_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.downloadRemoteVersionAndSetLocalPathSetting",
"group": "2_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.codegenNethereumCodeGenSettings",
"group": "3_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compileAndCodegenCSharpProject",
"group": "3_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compileAndCodegenVbNetProject",
"group": "3_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compileAndCodegenFSharpProject",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenCSharpProject",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenVbNetProject",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenFSharpProject",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenCSharpProjectAllAbiCurrent",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenVbNetProjectAllAbiCurrent",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenFSharpProjectAllAbiCurrent",
"group": "3_solidity"
}
],
"explorer/context": [
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenCSharpProject",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenVbNetProject",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenFSharpProject",
"group": "3_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compile.active",
"group": "2_solidity"
},
{
"when": "editorLangId == 'solidity'",
"command": "solidity.compile",
"group": "2_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenCSharpProjectAllAbiCurrent",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenVbNetProjectAllAbiCurrent",
"group": "3_solidity"
},
{
"when": "resourceExtname == .abi",
"command": "solidity.codegenFSharpProjectAllAbiCurrent",
"group": "3_solidity"
}
]
},
"keybindings": [
{
"command": "solidity.compile.active",
"key": "f5",
"mac": "f5",
"when": "editorTextFocus && editorLangId == 'solidity'"
},
{
"command": "solidity.compile",
"key": "Ctrl+f5",
"mac": "Cmd+f5",
"when": "editorTextFocus && editorLangId == 'solidity'"
}
],
"snippets": [
{
"language": "solidity",
"path": "./snippets/solidity.json"
}
],
"grammars": [
{
"language": "solidity",
"scopeName": "source.solidity",
"path": "./syntaxes/solidity.json"
}
]
}
}