-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
465 lines (465 loc) · 14.6 KB
/
Copy pathpackage.json
File metadata and controls
465 lines (465 loc) · 14.6 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
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
{
"name": "sparql-qlue",
"displayName": "SPARQL Qlue",
"description": "VSCode extension for the SPARQL query language (.rq, .sparql files), using the qlue‑ls language server that provides autocomplete, formatting, syntax highlighting, and integrated query execution.",
"version": "0.0.10",
"publisher": "vemonet",
"license": "MIT",
"icon": "docs/icon.png",
"homepage": "https://github.com/vemonet/sparql-qlue-vsx",
"repository": {
"type": "git",
"url": "https://github.com/vemonet/sparql-qlue-vsx"
},
"bugs": {
"url": "https://github.com/vemonet/sparql-qlue-vsx/issues"
},
"galleryBanner": {
"color": "#002b36",
"theme": "dark"
},
"author": {
"name": "Vincent Emonet",
"email": "vincent.emonet@gmail.com"
},
"maintainers": [
{
"name": "Vincent Emonet",
"email": "vincent.emonet@gmail.com"
}
],
"categories": [
"Programming Languages",
"Formatters",
"Linters"
],
"keywords": [
"SPARQL",
"Language server",
"Qlue-ls",
"Query execution"
],
"engines": {
"vscode": "^1.100.0"
},
"main": "./dist/extension.js",
"browser": "./dist/extension.browser.js",
"contributes": {
"languages": [
{
"id": "sparql",
"aliases": [
"SPARQL",
"sparql"
],
"extensions": [
".rq",
".sparql"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "sparql",
"scopeName": "source.sparql",
"path": "./dist/resources/sparql.tmLanguage.json"
}
],
"viewsContainers": {
"panel": [
{
"id": "sparql-qlue-panel",
"title": "SPARQL Results",
"icon": "$(play)"
}
]
},
"views": {
"sparql-qlue-panel": [
{
"type": "webview",
"id": "sparql-qlue.queryPanel",
"name": "SPARQL Results",
"icon": "$(terminal)"
}
]
},
"commands": [
{
"command": "sparql-qlue.executeQuery",
"title": "Execute SPARQL Query",
"category": "SPARQL Qlue",
"icon": "$(play)"
},
{
"command": "sparql-qlue.showQueryPanel",
"title": "Show Query Panel",
"category": "SPARQL Qlue",
"icon": "$(output)"
},
{
"command": "sparql-qlue.openServerSettings",
"title": "Configure Qlue-ls Language Server",
"category": "SPARQL Qlue",
"icon": "$(settings-gear)"
},
{
"command": "sparql-qlue.newQueryFromExample",
"title": "New SPARQL Query from Example",
"category": "SPARQL Qlue",
"icon": "$(file-add)"
},
{
"command": "sparql-qlue.showExamplesQuickPick",
"title": "Show Examples for Current Endpoint",
"category": "SPARQL Qlue",
"icon": "$(code)"
},
{
"command": "sparql-qlue.addToLocalEndpoint",
"title": "Add to Local SPARQL Endpoint",
"category": "SPARQL Qlue",
"icon": "$(database)"
},
{
"command": "sparql-qlue.resetLocalEndpoint",
"title": "Reset Local SPARQL Endpoint",
"category": "SPARQL Qlue",
"icon": "$(trash)"
}
],
"semanticTokenScopes": [
{
"language": "sparql",
"scopes": {
"keyword": [
"keyword.control.sparql",
"keyword.operator.prefixdecl.sparql"
],
"function": [
"keyword.operator.function.sparql"
],
"variable": [
"variable.other.sparql"
],
"namespace": [
"support.type",
"entity.name.type",
"constant.other.prefixed-name.sparql",
"constant.other.iri.sparql"
],
"string": [
"string.quoted.double.sparql"
],
"number": [
"constant.numeric.integer.sparql"
],
"comment": [
"comment.line.hash.sparql"
],
"operator": [
"keyword.operator.sparql"
]
}
}
],
"menus": {
"editor/title/run": [
{
"command": "sparql-qlue.executeQuery",
"when": "resourceLangId == sparql",
"group": "navigation@1"
},
{
"command": "sparql-qlue.showQueryPanel",
"when": "resourceLangId == sparql",
"group": "navigation@2"
},
{
"command": "sparql-qlue.openServerSettings",
"when": "resourceLangId == sparql",
"group": "navigation@3"
}
],
"editor/context": [
{
"command": "sparql-qlue.executeQuery",
"when": "resourceLangId == sparql",
"group": "1_sparql@1"
},
{
"command": "sparql-qlue.newQueryFromExample",
"when": "resourceLangId == sparql",
"group": "1_sparql@2"
},
{
"command": "sparql-qlue.openServerSettings",
"when": "resourceLangId == sparql",
"group": "1_sparql@3"
}
],
"explorer/context": [
{
"command": "sparql-qlue.executeQuery",
"when": "resourceExtname == .rq || resourceExtname == .sparql",
"group": "1_sparql@1"
},
{
"command": "sparql-qlue.newQueryFromExample",
"when": "resourceExtname == .rq || resourceExtname == .sparql",
"group": "1_sparql@2"
},
{
"command": "sparql-qlue.addToLocalEndpoint",
"when": "resourceExtname == .ttl || resourceExtname == .nt || resourceExtname == .nq || resourceExtname == .trig || resourceExtname == .jsonld || resourceExtname == .json || resourceExtname == .rdf || resourceExtname == .xml",
"group": "1_sparql@1"
},
{
"command": "sparql-qlue.resetLocalEndpoint",
"when": "resourceExtname == .ttl || resourceExtname == .nt || resourceExtname == .nq || resourceExtname == .trig || resourceExtname == .jsonld || resourceExtname == .json || resourceExtname == .rdf || resourceExtname == .xml",
"group": "1_sparql@2"
}
]
},
"keybindings": [
{
"command": "sparql-qlue.executeQuery",
"key": "ctrl+enter",
"mac": "cmd+enter",
"when": "resourceLangId == sparql"
}
],
"languageModelTools": [
{
"name": "sparql-qlue_execute_query",
"displayName": "Execute SPARQL Query",
"toolReferenceName": "executeSparqlQuery",
"canBeReferencedInPrompt": true,
"icon": "$(play)",
"modelDescription": "Executes a SPARQL query against a SPARQL endpoint and returns the raw results (JSON for SELECT/ASK, Turtle for CONSTRUCT/DESCRIBE). Use to retrieve live data from RDF knowledge graphs.",
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The SPARQL query to execute (SELECT, CONSTRUCT, ASK, or DESCRIBE)."
},
"endpoint": {
"type": "string",
"description": "SPARQL endpoint URL (e.g. https://query.wikidata.org/sparql). If omitted, uses the currently active endpoint."
}
},
"required": [
"query"
]
}
},
{
"name": "sparql-qlue_get_examples",
"displayName": "Get relevant SPARQL examples and classes schema",
"toolReferenceName": "sparqlGetExamplesAndClasses",
"canBeReferencedInPrompt": true,
"icon": "$(search)",
"modelDescription": "Searches indexed documentation for a SPARQL endpoint: example queries, and class schemas from VoID descriptions. Use to discover available classes, properties, and query patterns before writing SPARQL.",
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Search terms to find relevant examples or class/property schemas."
},
"endpoint": {
"type": "string",
"description": "SPARQL endpoint URL to search. If omitted, searches the currently active endpoint."
}
},
"required": [
"query"
]
}
}
],
"configuration": {
"title": "SPARQL Qlue",
"properties": {
"sparql-qlue.formatOnSave": {
"type": "boolean",
"default": false,
"description": "Automatically format SPARQL documents via the language server when saving."
},
"sparql-qlue.format.alignPredicates": {
"type": "boolean",
"default": false,
"description": "Align triple predicates in a column."
},
"sparql-qlue.format.alignPrefixes": {
"type": "boolean",
"default": false,
"description": "Align PREFIX declarations in a column."
},
"sparql-qlue.format.separatePrologue": {
"type": "boolean",
"default": true,
"description": "Add a blank line between the prologue and the query body."
},
"sparql-qlue.format.capitalizeKeywords": {
"type": "boolean",
"default": true,
"description": "Uppercase SPARQL keywords (SELECT, WHERE, …)."
},
"sparql-qlue.format.insertSpaces": {
"type": "boolean",
"default": true,
"description": "Indent with spaces (off = tabs)."
},
"sparql-qlue.format.tabSize": {
"type": "integer",
"default": 2,
"description": "Number of spaces per indentation level."
},
"sparql-qlue.format.whereNewLine": {
"type": "boolean",
"default": false,
"description": "Place the WHERE clause on its own line."
},
"sparql-qlue.format.filterSameLine": {
"type": "boolean",
"default": true,
"description": "Keep FILTER on the same line as its block."
},
"sparql-qlue.format.lineLength": {
"type": "integer",
"default": 120,
"description": "Target line length for wrapping."
},
"sparql-qlue.format.contractTriples": {
"type": "boolean",
"default": true,
"description": "Use ; notation to contract triples with the same subject."
},
"sparql-qlue.format.keepEmptyLines": {
"type": "boolean",
"default": false,
"description": "Preserve intentional blank lines from the original source."
},
"sparql-qlue.completion.timeoutMs": {
"type": "integer",
"default": 10000,
"description": "SPARQL query timeout for completion requests (ms)."
},
"sparql-qlue.completion.resultSizeLimit": {
"type": "integer",
"default": 50,
"description": "Maximum number of completion items returned."
},
"sparql-qlue.completion.subjectCompletionTriggerLength": {
"type": "integer",
"default": 3,
"description": "Minimum typed characters before subject completion fires."
},
"sparql-qlue.completion.objectCompletionSuffix": {
"type": "boolean",
"default": true,
"description": "Append a trailing space/dot after inserting an object completion."
},
"sparql-qlue.completion.variableCompletionLimit": {
"type": "integer",
"default": 10,
"description": "Maximum variable completion suggestions."
},
"sparql-qlue.completion.sameSubjectSemicolon": {
"type": "boolean",
"default": true,
"description": "Use semicolon notation when completing predicates for a repeated subject."
},
"sparql-qlue.prefixes.addMissing": {
"type": "boolean",
"default": true,
"description": "Automatically insert missing PREFIX declarations."
},
"sparql-qlue.prefixes.removeUnused": {
"type": "boolean",
"default": false,
"description": "Remove PREFIX declarations that are not used in the query."
},
"sparql-qlue.trace.server": {
"type": "string",
"enum": [
"off",
"messages",
"verbose"
],
"default": "off",
"markdownDescription": "Traces the communication between VSCode and the SPARQL language server."
}
}
}
},
"configurationDefaults": {
"[sparql]": {
"editor.semanticHighlighting.enabled": true
},
"swls.sparql": false
},
"scripts": {
"vscode:prepublish": "npm run package",
"compile": "npm run lint && node esbuild.js",
"package": "npm run lint && node esbuild.js --production",
"package:vsce": "vsce package",
"watch": "npm-run-all -p watch:*",
"watch:esbuild": "node esbuild.js --watch",
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
"pretest": "tsc -p . --outDir out && npm run compile",
"fmt": "prettier --write . && eslint --fix src",
"lint": "tsc --noEmit && eslint src && prettier --check .",
"test": "vscode-test",
"prepare": "husky",
"upgrade": "npx npm-check-updates -u --reject @types/vscode",
"changelog": "git cliff -o CHANGELOG.md --tag v$(npm pkg get version | tr -d \\\")",
"version": "npm run package && npm run changelog && git add CHANGELOG.md",
"postversion": "git push origin v$(npm pkg get version | tr -d \\\") && npm-run-all -p publish:*",
"publish:vsce": "vsce package && vsce publish",
"publish:ovsx": "ovsx publish"
},
"devDependencies": {
"@types/mocha": "^10.0.10",
"@types/node": "25.x",
"@types/vscode": "^1.100.0",
"@vscode/test-cli": "^0.0.12",
"@vscode/test-electron": "^2.5.2",
"@vscode/vsce": "^3.9.1",
"esbuild": "^0.28.0",
"eslint": "^10.4.1",
"git-cliff": "^2.13.1",
"husky": "^9.1.7",
"lint-staged": "^17.0.5",
"npm-run-all": "^4.1.5",
"ovsx": "^1.0.0",
"prettier": "^3.8.3",
"typescript": "^6.0.3",
"typescript-eslint": "^8.60.0"
},
"dependencies": {
"@matdata/yasgui-graph-plugin": "^1.6.2",
"@types/jsonld": "^1.5.15",
"@zazuko/yasr": "^4.6.1",
"jsonld": "^9.0.0",
"oxigraph": "^0.5.8",
"qlue-ls": "^2.8.0",
"vscode-languageclient": "^9.0.1",
"vscode-languageserver-protocol": "^3.17.5",
"yasgui-geo-tg": "^1.1.2"
},
"prettier": {
"useTabs": false,
"singleQuote": true,
"printWidth": 120
},
"lint-staged": {
"*.{ts,tsx,js,mjs,html,md,json,css}": [
"prettier --write",
"eslint --fix"
]
}
}