-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
704 lines (704 loc) · 30.8 KB
/
Copy pathpackage.json
File metadata and controls
704 lines (704 loc) · 30.8 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
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
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
{
"name": "postgres-query-booster",
"displayName": "PostgreSQL Query Booster",
"description": "A VS Code extension for browsing, editing, and managing PostgreSQL databases",
"version": "3.0.5",
"publisher": "sirlychee",
"license": "MIT",
"icon": "images/icon.png",
"repository": {
"type": "git",
"url": "https://github.com/MegaCoolBlood/PostgresQueryBuilder.git"
},
"bugs": {
"url": "https://github.com/MegaCoolBlood/PostgresQueryBuilder/issues"
},
"engines": {
"vscode": "^1.85.0",
"node": ">=18"
},
"bin": {
"pgformat": "./dist/cli.js"
},
"categories": [
"Formatters",
"Programming Languages",
"Data Science",
"Other"
],
"keywords": [
"postgres",
"postgresql",
"sql",
"plpgsql",
"database"
],
"activationEvents": [
"onView:postgresTableExplorer",
"onView:postgresTableSearch",
"onView:postgresModifyHistory",
"onView:postgresSavedQueries",
"onStartupFinished"
],
"main": "./dist/extension.js",
"contributes": {
"viewsContainers": {
"activitybar": [
{
"id": "postgresQueryBuilderExplorer",
"title": "PostgreSQL Query Booster",
"icon": "images/postgres_underworld_crown_mono.svg"
}
]
},
"views": {
"postgresQueryBuilderExplorer": [
{
"id": "postgresTableExplorer",
"name": "Tables"
},
{
"id": "postgresTableSearch",
"name": "Search",
"type": "webview"
},
{
"id": "postgresModifyHistory",
"name": "Modify History",
"type": "webview"
},
{
"id": "postgresSavedQueries",
"name": "Bookmarked Queries"
}
]
},
"commands": [
{
"command": "postgresQueryBuilder.connect",
"title": "New Connection",
"category": "PostgreSQL Query Booster",
"icon": "$(add)"
},
{
"command": "postgresQueryBuilder.disconnect",
"title": "Disconnect",
"category": "PostgreSQL Query Booster",
"icon": "$(plug)"
},
{
"command": "postgresQueryBuilder.refreshExplorer",
"title": "Refresh Table Explorer",
"category": "PostgreSQL Query Booster",
"icon": "$(refresh)"
},
{
"command": "postgresQueryBuilder.editSearchPath",
"title": "Show / Edit search_path",
"category": "PostgreSQL Query Booster",
"icon": "$(list-tree)"
},
{
"command": "postgresQueryBuilder.openTable",
"title": "Open Table",
"category": "PostgreSQL Query Booster"
},
{
"command": "postgresQueryBuilder.selectConnection",
"title": "Select Connection",
"category": "PostgreSQL Query Booster",
"icon": "$(database)"
},
{
"command": "postgresQueryBuilder.openSqlEditor",
"title": "Open SQL Editor",
"category": "PostgreSQL Query Booster"
},
{
"command": "postgresQueryBuilder.exportCustomMappings",
"title": "Export Custom Column Mappings...",
"category": "PostgreSQL Query Booster"
},
{
"command": "postgresQueryBuilder.importCustomMappings",
"title": "Import Custom Column Mappings...",
"category": "PostgreSQL Query Booster"
},
{
"command": "postgresQueryBuilder.openCustomMappingsFile",
"title": "Open Workspace Custom Mappings File",
"category": "PostgreSQL Query Booster"
},
{
"command": "postgresQueryBuilder.manageCustomMappings",
"title": "Manage Custom Column Mappings...",
"category": "PostgreSQL Query Booster"
},
{
"command": "postgresQueryBuilder.viewDataFromSelect",
"title": "View Data",
"category": "PostgreSQL Query Booster"
},
{
"command": "postgresQueryBuilder.formatSql",
"title": "Format PL/pgSQL",
"category": "PostgreSQL Query Booster",
"icon": "$(symbol-namespace)"
},
{
"command": "postgresQueryBuilder.exportFormatConfig",
"title": "Export Formatter Settings to .pgformat.json",
"category": "PostgreSQL Query Booster"
},
{
"command": "postgresQueryBuilder.runSavedQuery",
"title": "Run Bookmarked Query...",
"category": "PostgreSQL Query Booster",
"icon": "$(play)"
},
{
"command": "postgresQueryBuilder.refreshSavedQueries",
"title": "Refresh Bookmarked Queries",
"category": "PostgreSQL Query Booster",
"icon": "$(refresh)"
},
{
"command": "postgresQueryBuilder.renameSavedQuery",
"title": "Rename Bookmarked Query...",
"category": "PostgreSQL Query Booster"
},
{
"command": "postgresQueryBuilder.editSavedQuerySql",
"title": "Edit Bookmarked Query SQL...",
"category": "PostgreSQL Query Booster"
},
{
"command": "postgresQueryBuilder.duplicateSavedQuery",
"title": "Duplicate Bookmarked Query",
"category": "PostgreSQL Query Booster"
},
{
"command": "postgresQueryBuilder.deleteSavedQuery",
"title": "Delete Bookmarked Query",
"category": "PostgreSQL Query Booster"
},
{
"command": "postgresQueryBuilder.moveSavedQueryToWorkspace",
"title": "Move Bookmarked Query to Workspace",
"category": "PostgreSQL Query Booster"
},
{
"command": "postgresQueryBuilder.moveSavedQueryToGlobal",
"title": "Move Bookmarked Query to Personal",
"category": "PostgreSQL Query Booster"
},
{
"command": "postgresQueryBuilder.openSavedQueriesFile",
"title": "Open Workspace Bookmarked Queries File",
"category": "PostgreSQL Query Booster",
"icon": "$(go-to-file)"
},
{
"command": "postgresQueryBuilder.saveQueryFromEditor",
"title": "Bookmark Query...",
"category": "PostgreSQL Query Booster",
"icon": "$(add)"
}
],
"menus": {
"view/title": [
{
"command": "postgresQueryBuilder.selectConnection",
"when": "view == postgresTableExplorer",
"group": "navigation@1"
},
{
"command": "postgresQueryBuilder.connect",
"when": "view == postgresTableExplorer",
"group": "navigation@2"
},
{
"command": "postgresQueryBuilder.disconnect",
"when": "view == postgresTableExplorer",
"group": "navigation@3"
},
{
"command": "postgresQueryBuilder.editSearchPath",
"when": "view == postgresTableExplorer",
"group": "navigation@4"
},
{
"command": "postgresQueryBuilder.refreshExplorer",
"when": "view == postgresTableExplorer",
"group": "navigation@5"
},
{
"command": "postgresQueryBuilder.saveQueryFromEditor",
"when": "view == postgresSavedQueries",
"group": "navigation"
},
{
"command": "postgresQueryBuilder.refreshSavedQueries",
"when": "view == postgresSavedQueries",
"group": "navigation"
},
{
"command": "postgresQueryBuilder.openSavedQueriesFile",
"when": "view == postgresSavedQueries",
"group": "navigation"
}
],
"view/item/context": [
{
"command": "postgresQueryBuilder.runSavedQuery",
"when": "view == postgresSavedQueries && viewItem =~ /^savedQuery\\./",
"group": "inline"
},
{
"command": "postgresQueryBuilder.renameSavedQuery",
"when": "view == postgresSavedQueries && viewItem =~ /^savedQuery\\./",
"group": "1_modify@1"
},
{
"command": "postgresQueryBuilder.editSavedQuerySql",
"when": "view == postgresSavedQueries && viewItem =~ /^savedQuery\\./",
"group": "1_modify@2"
},
{
"command": "postgresQueryBuilder.duplicateSavedQuery",
"when": "view == postgresSavedQueries && viewItem =~ /^savedQuery\\./",
"group": "1_modify@3"
},
{
"command": "postgresQueryBuilder.moveSavedQueryToWorkspace",
"when": "view == postgresSavedQueries && viewItem == savedQuery.global",
"group": "2_scope@1"
},
{
"command": "postgresQueryBuilder.moveSavedQueryToGlobal",
"when": "view == postgresSavedQueries && viewItem == savedQuery.workspace",
"group": "2_scope@2"
},
{
"command": "postgresQueryBuilder.deleteSavedQuery",
"when": "view == postgresSavedQueries && viewItem =~ /^savedQuery\\./",
"group": "3_delete@1"
}
],
"editor/context": [
{
"command": "postgresQueryBuilder.viewDataFromSelect",
"when": "editorTextFocus && resourceLangId == sql",
"group": "navigation@9"
},
{
"command": "postgresQueryBuilder.saveQueryFromEditor",
"when": "editorTextFocus && (resourceLangId == sql || resourceLangId == postgres || resourceLangId == pgsql)",
"group": "navigation@10"
},
{
"command": "postgresQueryBuilder.formatSql",
"when": "editorTextFocus && (resourceLangId == sql || resourceLangId == postgres || resourceLangId == pgsql)",
"group": "1_modification@10"
}
]
},
"viewsWelcome": [
{
"view": "postgresTableExplorer",
"contents": "No active PostgreSQL connection.\n[$(database) Select Connection](command:postgresQueryBuilder.selectConnection)\n[$(add) New Connection](command:postgresQueryBuilder.connect)"
},
{
"view": "postgresSavedQueries",
"contents": "No bookmarked queries yet.\nRun a query in the Data Viewer and use \"Bookmark Query\" to store it here. Placeholders written as :name are filled in every time the query runs."
}
],
"configuration": {
"title": "PostgreSQL Query Booster",
"properties": {
"postgresQueryBuilder.defaultHost": {
"type": "string",
"default": "localhost",
"description": "Default host for new connections"
},
"postgresQueryBuilder.defaultPort": {
"type": "number",
"default": 5432,
"description": "Default port for new connections"
},
"postgresQueryBuilder.defaultDatabase": {
"type": "string",
"default": "postgres",
"description": "Default database name for new connections"
},
"postgresQueryBuilder.savedConnections": {
"type": "array",
"default": [],
"description": "Saved connection configurations (passwords stored in SecretStorage)"
},
"postgresQueryBuilder.alwaysQualifySchema": {
"type": "boolean",
"default": false,
"description": "Always include schema in generated SELECT table references"
},
"postgresQueryBuilder.alwaysQuote": {
"type": "boolean",
"default": false,
"description": "Always quote identifiers in generated SELECT statements"
},
"postgresQueryBuilder.thousandSeparator": {
"type": "string",
"default": " ",
"description": "Thousand separator for displaying numbers (e.g. ' ' for 9 999 999,99)"
},
"postgresQueryBuilder.duplicateRowResetDefaults": {
"type": "string",
"enum": [
"volatile",
"all",
"none"
],
"enumDescriptions": [
"Reset identity and generated columns, defaults that call a function such as now() or nextval(), and the context keywords CURRENT_DATE and CURRENT_USER",
"Reset every column that has a default, including constant ones",
"Copy all values, including generated ones"
],
"default": "volatile",
"description": "Which columns are left to their database default when a row is duplicated"
},
"postgresQueryBuilder.customMappingsFile": {
"type": "string",
"default": ".vscode/postgres-query-builder.mappings.json",
"description": "Workspace-relative path to the JSON file used to share custom column mappings via git. Mappings stored here are visible to everyone who opens the workspace; personal mappings remain in VS Code global state."
},
"postgresQueryBuilder.savedQueriesFile": {
"type": "string",
"default": ".vscode/postgres-query-builder.queries.json",
"description": "Workspace-relative path to the JSON file used to share bookmarked queries via git. Queries stored here are visible to everyone who opens the workspace; personal queries remain in VS Code global state."
},
"postgresQueryBuilder.format.enable": {
"type": "boolean",
"default": true,
"description": "Enable the PL/pgSQL formatter (document formatting provider, command and SQL Editor button)."
},
"postgresQueryBuilder.format.configPath": {
"type": "string",
"default": "",
"description": "Path to the JSON file with formatter rules (same schema as .pgformat.json). An absolute path is used as-is; a relative path is resolved against the workspace root. Leave empty to use .pgformat.json in the workspace root."
},
"postgresQueryBuilder.format.formatOnSave": {
"type": "boolean",
"default": false,
"description": "Automatically format SQL/PL/pgSQL files with this extension when they are saved."
},
"postgresQueryBuilder.format.keywordCase": {
"type": "string",
"enum": [
"upper",
"lower",
"preserve"
],
"default": "upper",
"description": "Letter case applied to SQL/PL keywords (SELECT, BEGIN, IF, ...)."
},
"postgresQueryBuilder.format.identifierCase": {
"type": "string",
"enum": [
"preserve",
"lower",
"upper"
],
"default": "preserve",
"description": "Letter case applied to identifiers (table, column and variable names)."
},
"postgresQueryBuilder.format.dataTypeCase": {
"type": "string",
"enum": [
"upper",
"lower",
"preserve"
],
"default": "upper",
"description": "Letter case applied to data type names (integer, varchar, timestamp, ...)."
},
"postgresQueryBuilder.format.indentStyle": {
"type": "string",
"enum": [
"space",
"tab"
],
"default": "space",
"description": "Indentation character used by the formatter."
},
"postgresQueryBuilder.format.indentSize": {
"type": "number",
"default": 2,
"description": "Number of spaces per indentation level (ignored when indentStyle is 'tab')."
},
"postgresQueryBuilder.format.commaStyle": {
"type": "string",
"enum": [
"trailing",
"leading"
],
"default": "trailing",
"description": "Comma placement in multi-line column lists: at the end of the line (trailing) or the start of the next line (leading)."
},
"postgresQueryBuilder.format.blankLines": {
"type": "string",
"enum": [
"preserve",
"collapse"
],
"default": "preserve",
"enumDescriptions": [
"Keep authored blank lines exactly as written (1:1).",
"Collapse runs of blank lines down to a single blank line."
],
"description": "How the formatter handles authored blank lines between statements."
},
"postgresQueryBuilder.format.simpleSelectSingleLine": {
"type": "boolean",
"default": true,
"description": "Keep a simple SELECT (single column, at most one table, at most one WHERE condition, no JOIN/GROUP/ORDER) on a single line."
},
"postgresQueryBuilder.format.preserveSingleLineRoutineHeaders": {
"type": "boolean",
"default": true,
"description": "Keep a one-line CREATE FUNCTION/PROCEDURE header on one line."
},
"postgresQueryBuilder.format.preserveSingleLineIfBlocks": {
"type": "boolean",
"default": true,
"description": "Keep a fully one-line simple IF ... THEN ... END IF block on one line."
},
"postgresQueryBuilder.format.preserveSingleLineSpecialCases": {
"type": "boolean",
"default": true,
"description": "Deprecated umbrella switch for single-line special cases. Use preserveSingleLineRoutineHeaders and preserveSingleLineIfBlocks instead.",
"deprecationMessage": "Deprecated: use postgresQueryBuilder.format.preserveSingleLineRoutineHeaders and postgresQueryBuilder.format.preserveSingleLineIfBlocks."
},
"postgresQueryBuilder.format.normalizeDataTypes": {
"type": "boolean",
"default": true,
"description": "Replace verbose multi-word type names with their short form when formatting (e.g. 'character varying' -> 'varchar', 'timestamp without time zone' -> 'timestamp', 'timestamp with time zone' -> 'timestamptz')."
},
"postgresQueryBuilder.format.dataTypeAliases": {
"type": "object",
"default": {
"timestamp without time zone": "timestamp",
"timestamp with time zone": "timestamptz",
"time without time zone": "time",
"time with time zone": "timetz",
"int2": "smallint",
"int4": "integer",
"int8": "bigint",
"character varying": "varchar",
"bit varying": "varbit"
},
"additionalProperties": {
"type": "string"
},
"description": "Table of phrase replacements used when normalizeDataTypes is enabled: key = verbose type phrase, value = canonical replacement (e.g. 'character varying' -> 'varchar')."
},
"postgresQueryBuilder.format.argumentGroups": {
"type": "object",
"default": {
"json_build_object": "2",
"jsonb_build_object": "2",
"decode": "1+2"
},
"additionalProperties": {
"type": "string"
},
"description": "Functions whose arguments belong together in tuples: key = function name (optionally schema-qualified, e.g. 'oracle.decode'), value = '+'-separated group sizes whose last entry repeats. '2' puts key/value pairs on one line, '1+2' keeps the first argument alone and pairs the rest (DECODE), '1+1+2' gives the first two arguments a line each. A value of '0' switches a built-in entry off."
},
"postgresQueryBuilder.format.listThresholds": {
"type": "object",
"default": {
"createFunction": "0, 1",
"createProcedure": "0, 1",
"createType": "1, 2",
"createTable": "0, 1",
"returnsTable": "1, 4",
"functionCall": "1, 4",
"selectColumns": "1, 3",
"fromTables": "1, 4",
"groupByColumns": "1, 4",
"orderByColumns": "1, 4",
"insertColumns": "2, 10",
"arrayLiterals": "2, 10",
"inLists": "2, 10",
"booleanGroups": "1, 3",
"joinConditions": "1, 3",
"ifConditions": "1, 3",
"caseConditions": "1, 3",
"operatorChains": "1, 6",
"caseWhenThen": "0, 3",
"exceptionWhenThen": "0, 3",
"ifElse": "0, 3"
},
"properties": {
"createFunction": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "CREATE FUNCTION parameter list – \"inlineMax, multilineMin\": single line with at most inlineMax parameters, multi-line from multilineMin parameters on, in between as written in the source. With \"0, 1\" even a single parameter is wrapped. Default: 0, 1."
},
"createProcedure": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "CREATE PROCEDURE parameter list – \"inlineMax, multilineMin\": single line with at most inlineMax parameters, multi-line from multilineMin parameters on, in between as written in the source. With \"0, 1\" even a single parameter is wrapped. Default: 0, 1."
},
"createType": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "CREATE TYPE attribute list (composite types as well as ENUM/RANGE) – \"inlineMax, multilineMin\": single line with at most inlineMax attributes, multi-line from multilineMin attributes on, in between as written in the source. Default: 1, 4."
},
"createTable": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "CREATE TABLE column list – \"inlineMax, multilineMin\": single line with at most inlineMax columns, multi-line from multilineMin columns on, in between as written in the source. Default: 1, 4."
},
"returnsTable": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "RETURNS TABLE(...) column list of a CREATE FUNCTION – \"inlineMax, multilineMin\": single line with at most inlineMax columns, multi-line from multilineMin columns on, in between as written in the source. Default: 1, 4."
},
"functionCall": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "Function/procedure call argument list – \"inlineMax, multilineMin\": single line with at most inlineMax arguments, multi-line from multilineMin arguments on, in between as written in the source. Default: 1, 4."
},
"selectColumns": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "SELECT column list and INTO target list – \"inlineMax, multilineMin\": single line with at most inlineMax columns, multi-line from multilineMin columns on, in between as written in the source. Default: 1, 2."
},
"fromTables": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "FROM table list in comma style (FROM a, b, c) – \"inlineMax, multilineMin\": single line with at most inlineMax tables, multi-line from multilineMin tables on, in between as written in the source. Default: 1, 4."
},
"groupByColumns": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "GROUP BY column list – \"inlineMax, multilineMin\": single line with at most inlineMax columns, multi-line from multilineMin columns on, in between as written in the source. Default: 1, 4."
},
"orderByColumns": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "ORDER BY column list (incl. ASC/DESC/NULLS FIRST/LAST) – \"inlineMax, multilineMin\": single line with at most inlineMax columns, multi-line from multilineMin columns on, in between as written in the source. Default: 1, 4."
},
"insertColumns": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "INSERT column list and VALUES list – \"inlineMax, multilineMin\": single line with at most inlineMax columns, multi-line from multilineMin columns on, in between as written in the source. The column list and the VALUES list always use the same layout. Default: 2, 6."
},
"arrayLiterals": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "ARRAY literals (ARRAY[...] incl. nested element arrays; index accesses arr[i] stay on one line) – \"inlineMax, multilineMin\": single line with at most inlineMax elements, multi-line from multilineMin elements on, in between as written in the source. Default: 4, 12."
},
"inLists": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "IN value lists (IN (...)) – \"inlineMax, multilineMin\": single line with at most inlineMax values, multi-line from multilineMin values on, in between as written in the source. Default: 4, 12."
},
"booleanGroups": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "Boolean groups in parentheses ((a AND b OR c)) – \"inlineMax, multilineMin\": single line with at most inlineMax operands, multi-line from multilineMin operands on, in between as written in the source. Default: 1, 2."
},
"joinConditions": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "JOIN ... ON ... AND ... conditions – \"inlineMax, multilineMin\": single line with at most inlineMax sub-conditions, multi-line from multilineMin sub-conditions on (every AND/OR on its own line), in between as written in the source. Default: 1, 2."
},
"ifConditions": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "IF/ELSIF conditions – \"inlineMax, multilineMin\": single line with at most inlineMax sub-conditions, multi-line from multilineMin sub-conditions on (every AND/OR on its own line), in between as written in the source. Default: 1, 2."
},
"caseConditions": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "CASE ... WHEN conditions (AND/OR inside a WHEN condition) – \"inlineMax, multilineMin\": single line with at most inlineMax sub-conditions, multi-line from multilineMin sub-conditions on, in between as written in the source. Default: 1, 2."
},
"operatorChains": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "Operator chains (+, -, *, /, ||) in an expression – \"inlineMax, multilineMin\": single line with at most inlineMax operands, multi-line from multilineMin operands on (every operator starts a line), in between as written in the source. Default: 1, 8."
},
"caseWhenThen": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "Collapsing a CASE ... WHEN ... THEN ... END CASE block – \"inlineMax, multilineMin\". Only inlineMax takes effect: the block is rendered on one line when its number of statements (;) is <= inlineMax and the body contains no comments or nested blocks. inlineMax 0 = never collapse."
},
"exceptionWhenThen": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "Collapsing an EXCEPTION WHEN ... THEN section – \"inlineMax, multilineMin\". Only inlineMax takes effect: the section is rendered on one line when its number of statements (;) is <= inlineMax and it contains no comments or nested blocks (the END of the BEGIN stays on its own line). inlineMax 0 = never collapse."
},
"ifElse": {
"type": "string",
"pattern": "^\\s*\\d+\\s*[,;: ]\\s*\\d+\\s*$",
"description": "Collapsing an IF ... [ELSE ...] END IF block – \"inlineMax, multilineMin\". Only inlineMax takes effect: the block is rendered on one line when its number of statements (;) is <= inlineMax and the body contains no comments or nested blocks. inlineMax 0 = never collapse."
}
},
"additionalProperties": false,
"markdownDescription": "Multi-line thresholds per construct, as a table. Each value is the pair `\"inlineMax, multilineMin\"`: a list with **at most** `inlineMax` elements always stays on one line, a list with **at least** `multilineMin` elements is always wrapped across lines, and in between the layout in the source decides (one line stays one line, multi-line stays multi-line). For the three structural blocks `caseWhenThen`, `exceptionWhenThen` and `ifElse` only `inlineMax` takes effect: a small block is collapsed onto one line when its number of statements (`;`) is `<= inlineMax` and the body contains no comments or nested blocks (`inlineMax = 0` = never collapse)."
}
}
}
},
"scripts": {
"vscode:prepublish": "npm run package",
"compile": "node esbuild.js",
"compile:test": "tsc -p ./",
"typecheck": "tsc -p ./ --noEmit",
"watch": "node esbuild.js --watch",
"esbuild": "node esbuild.js",
"esbuild:watch": "node esbuild.js --watch",
"package": "node esbuild.js --minify",
"start-server": "node dist/server.js",
"format-cli": "node dist/cli.js",
"lint": "eslint src server cli",
"test": "npm run compile:test && node --test out/src/test/**/*.test.js",
"bump:patch": "npm version patch --no-git-tag-version",
"bump:minor": "npm version minor --no-git-tag-version",
"bump:major": "npm version major --no-git-tag-version",
"patch": "npm run bump:patch",
"minor": "npm run bump:minor",
"major": "npm run bump:major",
"build-cli-exe": "node esbuild.js --minify && pkg dist/cli.js --targets node18-win-x64 --output dist/pgformat.exe",
"build-cli-exe:all": "node esbuild.js --minify && pkg dist/cli.js --targets node18-win-x64,node18-linux-x64,node18-macos-x64 --out-path dist/binaries",
"deploy": "npx --yes @vscode/vsce package && npm run build-cli-exe",
"deploy:patch": "npm run patch && npm run deploy",
"deploy:minor": "npm run minor && npm run deploy",
"deploy:major": "npm run major && npm run deploy",
"d": "npm run deploy",
"d1": "npm run deploy:patch",
"d2": "npm run deploy:minor",
"d3": "npm run deploy:major"
},
"devDependencies": {
"@types/node": "^18.19.0",
"@types/pg": "^8.10.9",
"@types/vscode": "^1.85.0",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"@yao-pkg/pkg": "^5.12.0",
"esbuild": "^0.28.1",
"eslint": "^9.0.0",
"typescript": "^5.3.3",
"vscode-languageserver": "^9.0.1",
"vscode-languageserver-textdocument": "^1.0.12"
},
"dependencies": {
"exceljs": "^4.4.0",
"pg": "^8.11.3"
},
"overrides": {
"uuid": "^11.1.1"
}
}