forked from ashish10alex/vscode-dataform-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
509 lines (509 loc) · 23 KB
/
Copy pathpackage.json
File metadata and controls
509 lines (509 loc) · 23 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
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
{
"name": "sqlanvil-lsp-vscode",
"displayName": "SQLAnvil Tools",
"publisher": "sqlanvil",
"icon": "media/images/dtools.png",
"description": "SQLAnvil Tools for VS Code: compiled query, dry run stats, dependency graphs, inline diagnostics, run and preview models, cost estimation, go-to-definition, auto-completion, formatting using sqlfluff and more.",
"repository": {
"type": "git",
"url": "https://github.com/SQLAnvil/vscode-sqlanvil-tools.git"
},
"version": "0.1.0",
"engines": {
"vscode": "^1.89.0"
},
"categories": [
"Other",
"Programming Languages",
"Snippets",
"Data Science",
"Testing"
],
"extensionDependencies": [
"vscode.git"
],
"activationEvents": [
"workspaceContains:**/*.sqlx",
"workspaceContains:**/workflow_settings.yaml"
],
"main": "./dist/extension.js",
"contributes": {
"viewsContainers": {
"panel": [
{
"id": "queryResultsContainer",
"title": "SQLAnvil Tools",
"icon": ""
}
]
},
"views": {
"queryResultsContainer": [
{
"icon": "",
"type": "webview",
"id": "queryResultsView",
"name": "SQLAnvil Tools"
}
]
},
"snippets": [
{
"language": "sqlx",
"path": "./snippets/dataform.code-snippets.json"
},
{
"language": "sqlx",
"path": "./snippets/bigquery.code-snippets.json"
},
{
"language": "javascript",
"path": "./snippets/dataform.code-snippets.json"
}
],
"commands": [
{
"command": "vscode-sqlanvil-tools.runQuery",
"category": "SQLAnvil",
"title": "Preview query results"
},
{
"command": "vscode-sqlanvil-tools.cancelQuery",
"category": "SQLAnvil",
"title": "Cancel query"
},
{
"command": "vscode-sqlanvil-tools.runFilesTagsWtOptions",
"category": "SQLAnvil",
"title": "Run file(s) / tag(s) with options"
},
{
"command": "vscode-sqlanvil-tools.runFilesTagsWtOptionsApi",
"category": "SQLAnvil",
"title": "Run file(s) / tag(s) with options using API"
},
{
"command": "vscode-sqlanvil-tools.createNewDataformProject",
"category": "SQLAnvil",
"title": "create new SQLAnvil project"
},
{
"command": "vscode-sqlanvil-tools.runTag",
"category": "SQLAnvil",
"title": "Run a tag"
},
{
"command": "vscode-sqlanvil-tools.runTagWtDeps",
"category": "SQLAnvil",
"title": "Run a tag with dependencies"
},
{
"command": "vscode-sqlanvil-tools.runTagWtDownstreamDeps",
"category": "SQLAnvil",
"title": "Run a tag with dependents"
},
{
"command": "vscode-sqlanvil-tools.runTagWtApi",
"category": "SQLAnvil",
"title": "Run a tag using API"
},
{
"command": "vscode-sqlanvil-tools.runTagWtDependenciesApi",
"category": "SQLAnvil",
"title": "Run tag with dependencies using API"
},
{
"command": "vscode-sqlanvil-tools.runTagWtDependentsApi",
"category": "SQLAnvil",
"title": "Run tag with dependents using API"
},
{
"command": "vscode-sqlanvil-tools.runAssertions",
"category": "SQLAnvil",
"title": "Run assertions in the current model"
},
{
"command": "vscode-sqlanvil-tools.runCurrentFileWtDownstreamDeps",
"category": "SQLAnvil",
"title": "Run current file with dependents"
},
{
"command": "vscode-sqlanvil-tools.runCurrentFile",
"category": "SQLAnvil",
"title": "Run current file",
"icon": "$(play)",
"group": "navigation"
},
{
"command": "vscode-sqlanvil-tools.runCurrentFileWtDependenciesApi",
"category": "SQLAnvil",
"title": "Run current file with Dependencies using API",
"group": "navigation"
},
{
"command": "vscode-sqlanvil-tools.runCurrentFileWtDependentsApi",
"category": "SQLAnvil",
"title": "Run current file with Dependents using API",
"group": "navigation"
},
{
"command": "vscode-sqlanvil-tools.runFilesTagsWtOptionsInRemoteWorkspace",
"category": "SQLAnvil",
"title": "Run file(s) / tag(s) with options using API in remote workspace [beta]",
"group": "navigation"
},
{
"command": "vscode-sqlanvil-tools.runCurrentFileWtApi",
"category": "SQLAnvil",
"title": "Run current file with API",
"group": "navigation"
},
{
"command": "vscode-sqlanvil-tools.runCurrentFileWtDeps",
"category": "SQLAnvil",
"title": "Run current file with dependencies"
},
{
"command": "vscode-sqlanvil-tools.showCompiledQueryWtDryRun",
"category": "SQLAnvil",
"title": "Show compiled query in vertical split",
"icon": "$(layout-centered)",
"group": "navigation@3"
},
{
"command": "vscode-sqlanvil-tools.showCompiledQueryInWebView",
"category": "SQLAnvil",
"title": "Show compiled Query in web view"
},
{
"command": "vscode-sqlanvil-tools.dependencyGraphPanel",
"category": "SQLAnvil",
"title": "Show dependency graph"
},
{
"command": "vscode-sqlanvil-tools.dependencyInspector",
"category": "SQLAnvil",
"title": "Open Dependency Inspector"
},
{
"command": "vscode-sqlanvil-tools.formatDocument",
"category": "SQLAnvil",
"title": "Format Document",
"icon": "$(sparkle)",
"group": "navigation@0"
},
{
"command": "vscode-sqlanvil-tools.lintCurrentFile",
"category": "SQLAnvil",
"title": "Lint current file"
},
{
"command": "vscode-sqlanvil-tools.selectWorkspaceFolder",
"category": "SQLAnvil",
"title": "Select workspace folder"
},
{
"command": "vscode-sqlanvil-tools.clearExtensionCache",
"category": "SQLAnvil",
"title": "Clear extension cache"
},
{
"command": "vscode-sqlanvil-tools.runTests",
"category": "SQLAnvil",
"title": "Run all tests"
}
],
"languages": [
{
"id": "sqlx",
"extensions": [
".sqlx"
],
"configuration": "language-configuration.json",
"icon": {
"light": "media/images/sqlx_file_icon.png",
"dark": "media/images/sqlx_file_icon.png"
}
}
],
"grammars": [
{
"language": "sqlx",
"scopeName": "source.sqlx",
"path": "sqlx.grammar.json"
}
],
"codeActions": [
{
"kind": "quickfix",
"languages": [
"sqlx"
]
}
],
"menus": {
"editor/title": [
{
"command": "vscode-sqlanvil-tools.runCurrentFile",
"when": "resourceExtname == .sqlx || resourceExtname == .js",
"group": "navigation"
},
{
"command": "vscode-sqlanvil-tools.showCompiledQueryWtDryRun",
"when": "resourceExtname == .sqlx || resourceExtname == .js",
"group": "navigation@3"
},
{
"command": "vscode-sqlanvil-tools.formatDocument",
"when": "resourceExtname == .sqlx || resourceExtname == .js",
"group": "navigation@0"
}
]
},
"configuration": {
"title": "SQLAnvil",
"properties": {
"vscode-sqlanvil-tools.compilerOptions": {
"type": "string",
"default": "",
"markdownDescription": "Additional compiler options to pass to sqlanvil cli commands e.g. --vars=someKey=someValue,a=b"
},
"vscode-sqlanvil-tools.currencyFoDryRunCost": {
"type": "string",
"enum": [
"USD",
"EUR",
"GBP",
"JPY",
"CAD",
"AUD",
"INR"
],
"default": "USD",
"markdownDescription": "Supported currencies for Dry Run cost estimation. Choose from USD (US Dollar), EUR (Euro), GBP (British Pound), JPY (Japanese Yen), CAD (Canadian Dollar), AUD (Australian Dollar), or INR (Indian Rupee)."
},
"vscode-sqlanvil-tools.showCompiledQueryInVerticalSplitOnSave": {
"type": "boolean",
"default": true,
"markdownDescription": "Shows compiled sql query on veritcal split when `.sqlx` file is saved"
},
"vscode-sqlanvil-tools.defaultSqlanvilCompileTime": {
"type": "string",
"default": "5m",
"pattern": "^(\\d+[sm])+$",
"markdownDescription": "Duration to allow project compilation to complete. Use format like '5m', '60s' etc. Passed to `sqlanvil compile --json --timeout=<value>`"
},
"vscode-sqlanvil-tools.gitRepoName": {
"type": "string",
"default": "",
"markdownDescription": "Override the repository name used by the extension. When set, this value is used instead of the name derived from the git remote URL or directory name."
},
"vscode-sqlanvil-tools.formattingCli": {
"type": "string",
"default": "sqlfluff",
"markdownDescription": "CLI to use for formatting. Choose between `sqlfluff` or `sqlanvil`. NOTE: the `sqlanvil` cli does not support formatting individual files. It formats the entire project",
"enum": [
"sqlfluff",
"sqlanvil"
]
},
"vscode-sqlanvil-tools.sqlfluffConfigPath": {
"type": "string",
"default": ".vscode-sqlanvil-tools/.sqlfluff",
"description": "Path to sqlfluff config file. Please make sure your .sqlfluff is compatible with .sqlx files",
"pattern": "^$|.*\\/\\.sqlfluff$"
},
"vscode-sqlanvil-tools.sqlfluffExecutablePath": {
"type": "string",
"default": "sqlfluff",
"description": "Path to sqlfluff executable",
"pattern": "^$|^.*sqlfluff(?:\\.exe)?$"
},
"vscode-sqlanvil-tools.sourceAutoCompletionPreference": {
"type": "string",
"enum": [
"${ref('table_name')}",
"${ref('dataset_name', 'table_name')}",
"${ref({schema:'dataset_name', name:'table_name'})}"
],
"default": "${ref('table_name')}",
"markdownDescription": "Preferred source autocompletion can be one of `${ref('table_name')}` or `${ref('dataset_name', 'table_name')}` or ${ref({schema:'dataset_name', name:'table_name'})}"
},
"vscode-sqlanvil-tools.sqlanvilCliScope": {
"type": "string",
"enum": [
"global",
"local"
],
"default": "global",
"markdownDescription": "SQLAnvil CLI installation scope to use. Default to `global` which uses the sqlanvil cli installed in global scope when running `npm install -g @sqlanvil/cli`. Selecting `local` scope would mean the sqlanvil cli installation in your workspace folder in `./node_modules/.bin/sqlanvil` will be used. This is created when `npm install @sqlanvil/cli` is ran from the root of the workspace folder."
},
"vscode-sqlanvil-tools.sqlanvilExecutablePath": {
"type": "string",
"default": null,
"markdownDescription": "**Override path to the sqlanvil executable**\n\n⚠️ **Only use this if the extension cannot find sqlanvil automatically**\n\nThe extension automatically searches:\n- System PATH\n- Common tool managers (mise, asdf, nvm, etc.)\n- Standard installation locations\n\nUse this setting for:\n- **Specific versions** for testing: `/path/to/sqlanvil-v1.3.0`\n- **Company-approved versions**: `/opt/company-tools/sqlanvil`\n- **Non-standard locations**: Custom installation paths\n\n**Example**: `/usr/local/bin/sqlanvil`",
"pattern": "^$|^.*sqlanvil(?:\\.cmd|\\.exe)?$"
},
"vscode-sqlanvil-tools.gcloudExecutablePath": {
"type": "string",
"default": null,
"markdownDescription": "**Override path to gcloud executable**\n\n⚠️ **Only use this if the extension cannot find gcloud automatically**\n\nThe extension automatically searches:\n- System PATH\n- Common tool managers (mise, asdf, etc.)\n- Standard gcloud installation locations\n\nUse this setting for:\n- **Specific versions** for testing: `/path/to/gcloud-v530.0.0`\n- **Company-approved versions**: `/opt/company-tools/gcloud`\n- **Non-standard locations**: Custom installation paths\n\n**Example**: `/usr/local/bin/gcloud` or `${HOME}/google-cloud-sdk/bin/gcloud`",
"pattern": "^$|^.*gcloud(?:\\.cmd|\\.exe)?$"
},
"vscode-sqlanvil-tools.compileAndDryRunBeforeFormatting": {
"type": "boolean",
"default": true,
"markdownDescription": "Disable this to experience faster formatting, especially if you have enabled format on save. `::WARNING::` only turn this on if you are confident that your query compiles without errors. Syntax error in config/pre/post operation blocks termination can result in unexpeted results while formatting"
},
"vscode-sqlanvil-tools.bigqueryAuthenticationCheck": {
"type": "boolean",
"default": true,
"markdownDescription": "Uses an interval of 55 minutes to validate the user's BigQuery Credentials. Set this to `false` to only validate the user's credentials when a query or dry run fails"
},
"vscode-sqlanvil-tools.recommendErrorLensExtension": {
"type": "boolean",
"default": true,
"markdownDescription": "Whether to recommend Error Lens extension to show erorrs inline rather than showing them as swigly lines"
},
"vscode-sqlanvil-tools.bigQueryTimeoutMs": {
"type": "number",
"default": 20000,
"minimum": 1000,
"maximum": 3600000,
"markdownDescription": "Timeout in milliseconds for BigQuery queries (max 1 hour)"
},
"vscode-sqlanvil-tools.enableLogging": {
"type": "boolean",
"default": false,
"markdownDescription": "Enable debug logging to help troubleshoot issues. Logs will appear in the 'Dataform Tools' output channel."
},
"vscode-sqlanvil-tools.gcpProjectId": {
"type": "string",
"default": null,
"markdownDescription": "GCP project ID to use for BigQuery queries. When not provided, the project ID will be inferred from your enviroment typically same as `gcloud config list project`",
"pattern": "^$|^[a-z0-9-]+$"
},
"vscode-sqlanvil-tools.gcpLocation": {
"type": "string",
"default": null,
"markdownDescription": "GCP location to use for BigQuery queries. E.g. US, EU, us-central1, europe-west1. Usually you will not need to set this explicity as the location is picked up dynamically by BigQuery client."
},
"vscode-sqlanvil-tools.serviceAccountJsonPath": {
"type": "string",
"default": null,
"markdownDescription": "Path to the json file when the service account exsists"
},
"vscode-sqlanvil-tools.skipPreOpsInDryRun": {
"type": "boolean",
"default": false,
"markdownDescription": "If enabled, pre-operations query will be excluded from the query used for dry run. By default, pre-operations are included. `::WARNING::` any variable used in pre-operations query will not be resolved and will result in an error"
},
"vscode-sqlanvil-tools.skipPreOpsInPreviewQuery": {
"type": "boolean",
"default": false,
"markdownDescription": "If enabled, the pre-operations (and incremental pre-operations) block is excluded from the query run by `Preview Data` / `Run`. Useful to preview a model's output without executing side effects such as `DELETE`/`MERGE` in `pre_operations`. By default, pre-operations are included."
},
"vscode-sqlanvil-tools.formatOrdering": {
"type": "array",
"uniqueItems": true,
"minItems": 4,
"maxItems": 4,
"items": {
"type": "string",
"enum": [
"js",
"preOperations",
"postOperations",
"sql"
]
},
"default": [
"js",
"preOperations",
"postOperations",
"sql"
],
"markdownDescription": "Order of blocks when formatting .sqlx files. The config block will always be first. Default order is `js` -> `preOperations` -> `postOperations` -> `sql`."
}
}
},
"configurationDefaults": {
"[sqlx]": {
"editor.formatOnSave": false
}
}
},
"scripts": {
"vscode:prepublish": "npm run package",
"clean": "rimraf dist",
"compile": "npm run clean && npm run check-types && npm run build:webviews && npm run esbuild",
"watch": "npm run clean && concurrently --raw \"npm run check-types -- --watch\" \"npm run esbuild-watch\" \"npm run webviews:watch\"",
"build:webviews": "vite build",
"build:cli": "npm run build:webviews && node packages/dataform-graph-cli/build.js",
"webviews:watch": "vite build --watch",
"esbuild": "node esbuild.js",
"esbuild-watch": "node esbuild.js --watch",
"package": "npm run check-types && npm run build:webviews && node esbuild.js --production",
"check-types": "tsc -p ./",
"pretest": "npm run compile && npm run lint",
"lint": "eslint src --ext ts",
"test": "rimraf .vscode-test/user-data && vscode-test",
"prerelease": "npm run test && markdownlint-cli2 README.md && standard-version --dry-run"
},
"devDependencies": {
"@inquirer/prompts": "^7.10.1",
"@tanstack/react-table": "^8.21.3",
"@types/dagre": "^0.7.52",
"@types/dompurify": "^3.0.5",
"@types/highlight.js": "^9.12.4",
"@types/jest": "^29.5.14",
"@types/js-beautify": "^1.14.3",
"@types/js-yaml": "^4.0.9",
"@types/mocha": "^10.0.10",
"@types/node": "20.x",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@types/vscode": "^1.89.0",
"@types/vscode-webview": "^1.57.5",
"@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.7.1",
"@vitejs/plugin-react": "^4.2.0",
"@vscode/test-cli": "^0.0.8",
"@vscode/test-electron": "^2.5.2",
"@xyflow/react": "^12.4.3",
"autoprefixer": "^10.4.24",
"clsx": "^2.1.1",
"commander": "^10.0.1",
"concurrently": "^9.1.2",
"dagre": "^0.8.5",
"esbuild": "^0.27.3",
"eslint": "^8.57.0",
"eslint-plugin-react": "^7.37.5",
"html-to-image": "^1.11.13",
"lucide-react": "^0.564.0",
"postcss": "^8.5.6",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"react-select": "^5.10.0",
"react-tabulator": "^0.21.0",
"rimraf": "^6.1.3",
"tailwind-merge": "^3.4.1",
"tailwindcss": "^3.4.19",
"vite": "^5.0.0"
},
"dependencies": {
"@ashishalex/dataform-tools": "^1.2.0",
"@google-cloud/bigquery": "^7.8.0",
"@google-cloud/lineage": "^1.3.0",
"@google-cloud/resource-manager": "^6.2.0",
"@radix-ui/react-tabs": "^1.1.13",
"@vscode/codicons": "^0.0.44",
"comment-parser": "^1.4.1",
"dompurify": "^3.3.1",
"js-beautify": "^1.15.1",
"js-yaml": "^4.1.1",
"prism-react-renderer": "^2.4.1",
"tablemark": "^3.1.0",
"typescript": "^5.7.3"
}
}