Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
248 lines (248 loc) · 7.19 KB
/
Copy pathpackage.json
File metadata and controls
248 lines (248 loc) · 7.19 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
{
"name": "vscode-ggsql",
"displayName": "ggsql",
"description": "Language support for ggsql: render charts directly from SQL in VS Code with dbt support",
"version": "0.4.1",
"publisher": "probstal",
"engines": {
"vscode": "^1.75.0"
},
"main": "./out/extension.js",
"activationEvents": [
"onLanguage:ggsql",
"onLanguage:sql",
"onLanguage:jinja-sql"
],
"categories": [
"Programming Languages",
"Visualization"
],
"keywords": [
"ggsql",
"sql",
"visualization",
"grammar-of-graphics",
"data-viz",
"dbt"
],
"repository": {
"type": "git",
"url": "https://github.com/probstal/vscode-ggsql"
},
"license": "MIT",
"icon": "logo.png",
"contributes": {
"languages": [
{
"id": "ggsql",
"extensions": [
".ggsql",
".ggsql.sql",
".gsql"
],
"configuration": "./language-configuration.json",
"icon": {
"light": "./logo.png",
"dark": "./logo.png"
}
}
],
"grammars": [
{
"language": "ggsql",
"scopeName": "source.ggsql",
"path": "./syntaxes/ggsql.tmLanguage.json"
},
{
"scopeName": "ggsql.injection",
"path": "./syntaxes/ggsql.injection.tmLanguage.json",
"injectTo": [
"source.sql",
"source.sql.jinja"
]
}
],
"commands": [
{
"command": "ggsql.sourceCurrentFile",
"category": "ggsql",
"title": "Run File",
"icon": "$(play)"
},
{
"command": "ggsql.runQuery",
"category": "ggsql",
"title": "Run Query"
},
{
"command": "ggsql.runCellsAbove",
"category": "ggsql",
"title": "Run Cells Above"
},
{
"command": "ggsql.runNextCell",
"category": "ggsql",
"title": "Run Next Cell"
},
{
"command": "ggsql.runCurrentAdvance",
"category": "ggsql",
"title": "Run Query and Advance"
},
{
"command": "ggsql.renderDbtFile",
"category": "ggsql",
"title": "Render ggsql Visualization",
"icon": "$(graph)"
},
{
"command": "ggsql.saveChartAsSvg",
"category": "ggsql",
"title": "Save Chart as SVG..."
},
{
"command": "ggsql.saveChartAsPng",
"category": "ggsql",
"title": "Save Chart as PNG..."
},
{
"command": "ggsql.saveChartAsJson",
"category": "ggsql",
"title": "Save Chart as Vega-Lite JSON..."
}
],
"keybindings": [
{
"command": "ggsql.runCurrentAdvance",
"key": "ctrl+enter",
"mac": "cmd+enter",
"when": "editorTextFocus && editorLangId == ggsql && ggsql.hasCodeCells && !findInputFocussed && !replaceInputFocussed"
},
{
"command": "ggsql.runCurrentAdvance",
"key": "shift+enter",
"when": "editorTextFocus && editorLangId == ggsql && ggsql.hasCodeCells && !findInputFocussed && !replaceInputFocussed"
},
{
"command": "ggsql.runQuery",
"key": "ctrl+shift+enter",
"mac": "cmd+shift+enter",
"when": "editorTextFocus && editorLangId == ggsql && ggsql.hasCodeCells && !findInputFocussed && !replaceInputFocussed"
}
],
"menus": {
"editor/title": [
{
"command": "ggsql.saveChartAsSvg",
"group": "1_export@1",
"when": "activeWebviewPanelId == ggsqlResults"
},
{
"command": "ggsql.saveChartAsPng",
"group": "1_export@2",
"when": "activeWebviewPanelId == ggsqlResults"
},
{
"command": "ggsql.saveChartAsJson",
"group": "1_export@3",
"when": "activeWebviewPanelId == ggsqlResults"
}
],
"commandPalette": [
{
"command": "ggsql.saveChartAsSvg",
"when": "activeWebviewPanelId == ggsqlResults"
},
{
"command": "ggsql.saveChartAsPng",
"when": "activeWebviewPanelId == ggsqlResults"
},
{
"command": "ggsql.saveChartAsJson",
"when": "activeWebviewPanelId == ggsqlResults"
}
],
"editor/title/run": [
{
"command": "ggsql.sourceCurrentFile",
"group": "navigation@0",
"when": "resourceLangId == ggsql && !isInDiffEditor"
},
{
"command": "ggsql.renderDbtFile",
"group": "navigation@1",
"when": "(resourceLangId == sql || resourceLangId == jinja-sql) && ggsql.isDbtVisualiseFile && !isInDiffEditor"
}
]
},
"configuration": {
"type": "object",
"title": "ggsql",
"properties": {
"ggsql.engine": {
"type": "string",
"enum": [
"standalone",
"cli"
],
"enumDescriptions": [
"Uses bundled WebAssembly engines and works out of the box, no installation. SQL runs on DuckDB (full file support: CSV, JSON, Parquet, globs), the VISUALISE clause is rendered by ggsql.",
"Uses the ggsql CLI (see ggsql.executablePath). Required for custom readers (ggsql.reader) such as persistent DuckDB databases or ODBC sources."
],
"default": "standalone",
"description": "How queries are executed."
},
"ggsql.reader": {
"type": "string",
"default": "duckdb://memory",
"description": "Data source connection string passed to the ggsql CLI via --reader (e.g. duckdb://memory, duckdb://path/to.db, sqlite://path/to.db, odbc://...). Only used with the 'cli' engine — the standalone engine always runs in-memory."
},
"ggsql.executablePath": {
"type": "string",
"default": "",
"description": "Path to the ggsql executable ('cli' engine). If empty, uses 'ggsql' from PATH."
},
"ggsql.dbtPath": {
"type": "string",
"default": "",
"description": "Path to the dbt executable used for dbt-project files (e.g. the dbt inside your project's virtualenv). If empty, uses 'dbt' from PATH."
}
}
}
},
"scripts": {
"vscode:prepublish": "npm run package",
"compile": "npm run check-types && node esbuild.js",
"watch": "npm-run-all -p watch:*",
"watch:esbuild": "node esbuild.js --watch",
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
"package": "npm run check-types && node esbuild.js --production",
"check-types": "tsc --noEmit",
"lint": "eslint src --ext ts"
},
"devDependencies": {
"@types/node": "^18.x",
"@types/vscode": "^1.75.0",
"@typescript-eslint/eslint-plugin": "^8.57.1",
"@typescript-eslint/parser": "^8.57.1",
"esbuild": "^0.27.4",
"eslint": "^10.0.3",
"npm-run-all": "^4.1.5",
"tree-sitter-cli": "^0.26.10",
"typescript": "^5.0.0",
"vega": "^6.2.0",
"vega-interpreter": "^2.2.1",
"vega-lite": "^6.4.0",
"web-tree-sitter": "^0.26.10"
},
"overrides": {
"uri-js": "npm:uri-js-replace"
},
"dependencies": {
"@duckdb/duckdb-wasm": "^1.33.1-dev57.0",
"ggsql-wasm": "^0.4.1"
},
"allowScripts": {
"tree-sitter-cli@0.26.10": true
}
}