-
-
Notifications
You must be signed in to change notification settings - Fork 79
/
package.json
499 lines (499 loc) · 20.2 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
{
"name": "vscode-bazel",
"displayName": "Bazel",
"description": "Bazel BUILD integration",
"version": "0.10.0",
"publisher": "BazelBuild",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/bazelbuild/vscode-bazel.git"
},
"icon": "media/bazel-logo.png",
"engines": {
"vscode": "^1.88.0"
},
"categories": [
"Programming Languages"
],
"activationEvents": [
"workspaceContains:**/BUILD",
"workspaceContains:**/WORKSPACE",
"workspaceContains:**/WORKSPACE.bazel",
"workspaceContains:**/MODULE.bazel",
"workspaceContains:**/REPO.bazel",
"onCommand:bazel.pickPackage",
"onCommand:bazel.pickTarget",
"onCommand:bazel.getTargetOutput",
"onCommand:bazel.info.bazel-bin",
"onCommand:bazel.info.bazel-genfiles",
"onCommand:bazel.info.bazel-testlogs",
"onCommand:bazel.info.execution_root",
"onCommand:bazel.info.output_base",
"onCommand:bazel.info.output_path",
"onCommand:bazel.info.workspace"
],
"main": "./out/src/extension/extension",
"contributes": {
"breakpoints": [
{
"language": "starlark"
}
],
"commands": [
{
"category": "Bazel",
"command": "bazel.buildTarget",
"title": "Build Target"
},
{
"category": "Bazel",
"command": "bazel.buildTargetWithDebugging",
"title": "Build Target with Starlark Debugger"
},
{
"category": "Bazel",
"command": "bazel.buildAll",
"title": "Build Package"
},
{
"category": "Bazel",
"command": "bazel.runTarget",
"title": "Run Target"
},
{
"category": "Bazel",
"command": "bazel.buildAllRecursive",
"title": "Build Package Recursively"
},
{
"category": "Bazel",
"command": "bazel.testTarget",
"title": "Test Target"
},
{
"category": "Bazel",
"command": "bazel.testAll",
"title": "Test Package"
},
{
"category": "Bazel",
"command": "bazel.testAllRecursive",
"title": "Test Package Recursively"
},
{
"category": "Bazel",
"command": "bazel.clean",
"title": "Clean"
},
{
"category": "Bazel",
"command": "bazel.refreshBazelBuildTargets",
"title": "Refresh Bazel Build Targets",
"icon": {
"dark": "./icons/refresh-dark.svg",
"light": "./icons/refresh-light.svg"
}
},
{
"category": "Bazel",
"command": "bazel.copyTargetToClipboard",
"title": "Copy Label to Clipboard"
},
{
"category": "Bazel",
"command": "bazel.lsp.restart",
"title": "Restart language server",
"when": "bazel.lsp.enabled"
}
],
"configuration": {
"type": "object",
"title": "Bazel",
"properties": {
"bazel.executable": {
"type": "string",
"default": "",
"description": "The name of the Bazel executable. This may be an absolute path, or a simple name that will be searched for on the system path. If empty, \"bazel\" on the system path will be used.",
"scope": "machine-overridable"
},
"bazel.buildifierExecutable": {
"type": "string",
"default": "",
"markdownDescription": "The name of the Buildifier executable. This may be an absolute path, or a simple name that will be searched for on the system path. Paths starting with `@` are interpreted as Bazel targets and are run via `bazel run`. If empty, \"buildifier\" on the system path will be used.\n\nBuildifier can be downloaded from https://github.com/bazelbuild/buildtools/releases.",
"scope": "machine-overridable"
},
"bazel.buildifierConfigJsonPath": {
"type": "string",
"default": "",
"markdownDescription": "The path of the Buildifier config json file, ex: `.buildifier.json`. This may be an absolute path, or a relative path within the workspace. If this option is unset, `buildifier` will automatically look for a `.buildifier.json` file in the workspace.",
"scope": "machine-overridable"
},
"bazel.buildifierFixOnFormat": {
"type": "boolean",
"default": false,
"description": "Whether to automatically apply lint fixes from buildifier when formatting a Bazel file."
},
"bazel.queriesShareServer": {
"type": "boolean",
"default": "true",
"description": "Use the same Bazel server for queries and builds. By default, vscode-bazel uses the same server for queries and builds to make sure this extension works out-of-the-box. However, you may experience degraded performance in Visual Studio Code for operations that require queries. You can disable this setting so that queries and builds can be executed in parallel in some circumstances. See https://github.com/bazelbuild/vscode-bazel?tab=readme-ov-file#using-a-separate-output-base for more information."
},
"bazel.queryOutputBase": {
"type": "string",
"default": null,
"description": "If queriesShareServer is false, this sets the directory in which bazel will create its output_base directory. Defaults to $TMPDIR."
},
"bazel.enableCodeLens": {
"type": "boolean",
"default": false,
"markdownDescription": "Whether to add a CodeLens to `BUILD`/`BUILD.bazel` files to provide actions while browsing the file."
},
"bazel.pathsToIgnore": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true,
"default": [],
"description": "A list of Regexs that when matched cause paths not to be checked for being in a WORKSPACE. This impacts operations that require a workspace, like queries, but syntax highlighting and buildifier work regardless."
},
"bazel.commandLine.startupOptions": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true,
"default": [],
"markdownDescription": "A list of [Bazel startup options](https://docs.bazel.build/versions/master/command-line-reference.html#startup-options) to use when building, running tests, running queries, or cleaning. One option per entry, no shell escaping is needed."
},
"bazel.commandLine.commandArgs": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true,
"default": [],
"markdownDescription": "A list of Bazel command line options to use when building or running tests. From the [common options](https://docs.bazel.build/versions/master/command-line-reference.html#options-common-to-all-commands) and [build options](https://docs.bazel.build/versions/master/command-line-reference.html#build) (`test` honors all `build` options). One option per entry, no shell escaping is needed."
},
"bazel.commandLine.queryExpression": {
"type": "string",
"default": "...:*",
"description": "A [query language expression](https://bazel.build/query/language) which determines the packages displayed in the workspace tree and quick picker. The default inspects the entire workspace, but you could narrow it. For example: `//part/you/want/...:*`"
},
"bazel.lsp.command": {
"type": "string",
"default": "",
"description": "The executable to launch for the LSP (experimental). Providing this disables certain features in the extension on the basis that they'll be provided by this language server."
},
"bazel.lsp.args": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "The arguments to pass to the LSP executable"
}
}
},
"debuggers": [
{
"type": "bazel-launch-build",
"label": "Launch Bazel Build",
"program": "./out/src/debug-adapter/client.js",
"runtime": "node",
"configurationAttributes": {
"launch": {
"properties": {
"args": {
"type": "array",
"description": "Target labels and other command line options passed to the 'bazel build' command.",
"default": []
},
"bazelCommand": {
"type": "string",
"description": "The Bazel command to execute (e.g., build, test, etc.). Defaults to \"build\".",
"default": "build"
},
"bazelExecutablePath": {
"type": "string",
"description": "The name of the Bazel executable. This may be an absolute path, or a simple name that will be searched for on the system path. If empty, \"bazel\" on the system path will be used.",
"default": ""
},
"cwd": {
"type": "string",
"description": "The working directory in which Bazel will be launched.",
"default": ""
},
"port": {
"type": "number",
"description": "The port number of the Bazel debug server.",
"default": 7300
},
"verbose": {
"type": "boolean",
"description": "Show verbose logs for the debugger.",
"default": false
}
},
"required": [
"args",
"cwd"
]
}
}
}
],
"grammars": [
{
"language": "bazelrc",
"scopeName": "source.bazelrc",
"path": "./syntaxes/bazelrc.tmLanguage.json"
},
{
"language": "starlark",
"scopeName": "source.starlark",
"path": "./syntaxes/starlark.tmLanguage.json"
}
],
"languages": [
{
"id": "bazelrc",
"extensions": [
".bazelrc"
],
"filenames": [
".bazelrc",
"bazel.rc"
],
"configuration": "./syntaxes/bazelrc.configuration.json"
},
{
"id": "starlark",
"aliases": [
"Starlark",
"starlark",
"Bazel"
],
"extensions": [
".BUILD",
".WORKSPACE",
".bazel",
".bzl",
".bzlmod",
".sky",
".star"
],
"filenames": [
"BUILD",
"WORKSPACE"
],
"configuration": "./syntaxes/starlark.configuration.json"
}
],
"menus": {
"commandPalette": [
{
"command": "bazel.copyTargetToClipboard",
"when": "false"
},
{
"command": "bazel.buildTarget",
"when": "bazel.haveWorkspace"
},
{
"command": "bazel.buildTargetWithDebugging",
"when": "bazel.haveWorkspace"
},
{
"command": "bazel.buildAll",
"when": "bazel.haveWorkspace"
},
{
"command": "bazel.buildAllRecursive",
"when": "bazel.haveWorkspace"
},
{
"command": "bazel.runTarget",
"when": "bazel.haveWorkspace"
},
{
"command": "bazel.testTarget",
"when": "bazel.haveWorkspace"
},
{
"command": "bazel.testAll",
"when": "bazel.haveWorkspace"
},
{
"command": "bazel.testAllRecursive",
"when": "bazel.haveWorkspace"
},
{
"command": "bazel.clean",
"when": "bazel.haveWorkspace"
}
],
"view/item/context": [
{
"command": "bazel.buildTarget",
"when": "view == bazelWorkspace && viewItem == rule",
"group": "build"
},
{
"command": "bazel.buildTarget",
"when": "view == bazelWorkspace && viewItem == testRule",
"group": "build"
},
{
"command": "bazel.buildTargetWithDebugging",
"when": "view == bazelWorkspace && viewItem == rule",
"group": "build"
},
{
"command": "bazel.buildTargetWithDebugging",
"when": "view == bazelWorkspace && viewItem == testRule",
"group": "build"
},
{
"command": "bazel.buildAll",
"when": "view == bazelWorkspace && viewItem == package",
"group": "build"
},
{
"command": "bazel.buildAllRecursive",
"when": "view == bazelWorkspace && viewItem == package",
"group": "build"
},
{
"command": "bazel.runTarget",
"when": "view == bazelWorkspace && viewItem == rule",
"group": "build"
},
{
"command": "bazel.testTarget",
"when": "view == bazelWorkspace && viewItem == testRule",
"group": "build"
},
{
"command": "bazel.testAll",
"when": "view == bazelWorkspace && viewItem == package",
"group": "build"
},
{
"command": "bazel.testAllRecursive",
"when": "view == bazelWorkspace && viewItem == package",
"group": "build"
},
{
"command": "bazel.copyTargetToClipboard",
"when": "view == bazelWorkspace && viewItem == rule",
"group": "build"
},
{
"command": "bazel.copyTargetToClipboard",
"when": "view == bazelWorkspace && viewItem == testRule",
"group": "build"
}
],
"view/title": [
{
"command": "bazel.refreshBazelBuildTargets",
"when": "view == bazelWorkspace",
"group": "navigation"
}
]
},
"taskDefinitions": [
{
"type": "bazel",
"when": "shellExecutionSupported",
"required": [
"command",
"targets"
],
"properties": {
"command": {
"description": "The Bazel command to execute (\"build\" or \"test\").",
"type": "string",
"enum": [
"build",
"run",
"test",
"coverage",
"clean"
]
},
"targets": {
"description": "The labels of the targets to build or test.",
"type": "array",
"items": {
"type": "string"
}
},
"options": {
"description": "Additional command line parameters to pass to Bazel.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
],
"views": {
"explorer": [
{
"id": "bazelWorkspace",
"name": "Bazel Targets",
"when": "bazel.haveWorkspace"
}
]
},
"viewsWelcome": [
{
"view": "bazelWorkspace",
"contents": "No Bazel targets found.\n[Refresh Target List](command:bazel.refreshBazelBuildTargets)",
"when": "bazel.haveWorkspace"
}
]
},
"scripts": {
"check-lint": "eslint .",
"compile": "./scripts/build.sh",
"pretest": "./scripts/build.sh",
"format-check": "prettier --check .",
"format-fix": "prettier --write .",
"test": "./scripts/test.sh",
"package": "vsce package",
"update-snapshot": "./scripts/test.sh -u",
"vscode:prepublish": "./scripts/build.sh",
"watch": "./scripts/build.sh -watch"
},
"devDependencies": {
"@types/mocha": "^10.0.6",
"@types/node": "^16.11.7",
"@types/vscode": "^1.88.0",
"@types/which": "^3.0.3",
"@vscode/test-cli": "^0.0.9",
"@vscode/test-electron": "^2.3.9",
"@vscode/vsce": "^2.24.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsdoc": "^48.2.2",
"js-yaml": "^4.1.0",
"mocha": "^10.4.0",
"prettier": "^3.2.5",
"typescript": "^5.4.4",
"typescript-eslint": "^7.5.0",
"vscode-tmgrammar-test": "^0.1.3"
},
"dependencies": {
"protobufjs": "^6.8.0",
"vscode-debugadapter": "^1.37.1",
"vscode-debugprotocol": "^1.37.0",
"vscode-languageclient": "^9.0.1",
"vscode-uri": "^3.0.2",
"which": "^4.0.0"
}
}