@postgres-language-server/cli-aarch64-linux-gnu 0.19.0 → 0.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postgres-language-server/cli-aarch64-linux-gnu",
3
- "version": "0.19.0",
3
+ "version": "0.20.1",
4
4
  "license": "MIT or Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
Binary file
package/schema.json CHANGED
@@ -44,6 +44,17 @@
44
44
  }
45
45
  ]
46
46
  },
47
+ "format": {
48
+ "description": "The configuration for the SQL formatter",
49
+ "anyOf": [
50
+ {
51
+ "$ref": "#/definitions/FormatConfiguration"
52
+ },
53
+ {
54
+ "type": "null"
55
+ }
56
+ ]
57
+ },
47
58
  "linter": {
48
59
  "description": "The configuration for the linter",
49
60
  "anyOf": [
@@ -66,6 +77,17 @@
66
77
  }
67
78
  ]
68
79
  },
80
+ "pglinter": {
81
+ "description": "The configuration for pglinter",
82
+ "anyOf": [
83
+ {
84
+ "$ref": "#/definitions/PglinterConfiguration"
85
+ },
86
+ {
87
+ "type": "null"
88
+ }
89
+ ]
90
+ },
69
91
  "plpgsqlCheck": {
70
92
  "description": "The configuration for type checking",
71
93
  "anyOf": [
@@ -113,6 +135,213 @@
113
135
  },
114
136
  "additionalProperties": false,
115
137
  "definitions": {
138
+ "Base": {
139
+ "description": "A list of rules that belong to this group",
140
+ "type": "object",
141
+ "properties": {
142
+ "all": {
143
+ "description": "It enables ALL rules for this group.",
144
+ "type": [
145
+ "boolean",
146
+ "null"
147
+ ]
148
+ },
149
+ "compositePrimaryKeyTooManyColumns": {
150
+ "description": "CompositePrimaryKeyTooManyColumns (B012): Detect tables with composite primary keys involving more than 4 columns",
151
+ "anyOf": [
152
+ {
153
+ "$ref": "#/definitions/RuleConfiguration"
154
+ },
155
+ {
156
+ "type": "null"
157
+ }
158
+ ]
159
+ },
160
+ "howManyObjectsWithUppercase": {
161
+ "description": "HowManyObjectsWithUppercase (B005): Count number of objects with uppercase in name or in columns.",
162
+ "anyOf": [
163
+ {
164
+ "$ref": "#/definitions/RuleConfiguration"
165
+ },
166
+ {
167
+ "type": "null"
168
+ }
169
+ ]
170
+ },
171
+ "howManyRedudantIndex": {
172
+ "description": "HowManyRedudantIndex (B002): Count number of redundant index vs nb index.",
173
+ "anyOf": [
174
+ {
175
+ "$ref": "#/definitions/RuleConfiguration"
176
+ },
177
+ {
178
+ "type": "null"
179
+ }
180
+ ]
181
+ },
182
+ "howManyTableWithoutIndexOnFk": {
183
+ "description": "HowManyTableWithoutIndexOnFk (B003): Count number of tables without index on foreign key.",
184
+ "anyOf": [
185
+ {
186
+ "$ref": "#/definitions/RuleConfiguration"
187
+ },
188
+ {
189
+ "type": "null"
190
+ }
191
+ ]
192
+ },
193
+ "howManyTableWithoutPrimaryKey": {
194
+ "description": "HowManyTableWithoutPrimaryKey (B001): Count number of tables without primary key.",
195
+ "anyOf": [
196
+ {
197
+ "$ref": "#/definitions/RuleConfiguration"
198
+ },
199
+ {
200
+ "type": "null"
201
+ }
202
+ ]
203
+ },
204
+ "howManyTablesNeverSelected": {
205
+ "description": "HowManyTablesNeverSelected (B006): Count number of table(s) that has never been selected.",
206
+ "anyOf": [
207
+ {
208
+ "$ref": "#/definitions/RuleConfiguration"
209
+ },
210
+ {
211
+ "type": "null"
212
+ }
213
+ ]
214
+ },
215
+ "howManyTablesWithFkMismatch": {
216
+ "description": "HowManyTablesWithFkMismatch (B008): Count number of tables with foreign keys that do not match the key reference type.",
217
+ "anyOf": [
218
+ {
219
+ "$ref": "#/definitions/RuleConfiguration"
220
+ },
221
+ {
222
+ "type": "null"
223
+ }
224
+ ]
225
+ },
226
+ "howManyTablesWithFkOutsideSchema": {
227
+ "description": "HowManyTablesWithFkOutsideSchema (B007): Count number of tables with foreign keys outside their schema.",
228
+ "anyOf": [
229
+ {
230
+ "$ref": "#/definitions/RuleConfiguration"
231
+ },
232
+ {
233
+ "type": "null"
234
+ }
235
+ ]
236
+ },
237
+ "howManyTablesWithReservedKeywords": {
238
+ "description": "HowManyTablesWithReservedKeywords (B010): Count number of database objects using reserved keywords in their names.",
239
+ "anyOf": [
240
+ {
241
+ "$ref": "#/definitions/RuleConfiguration"
242
+ },
243
+ {
244
+ "type": "null"
245
+ }
246
+ ]
247
+ },
248
+ "howManyTablesWithSameTrigger": {
249
+ "description": "HowManyTablesWithSameTrigger (B009): Count number of tables using the same trigger vs nb table with their own triggers.",
250
+ "anyOf": [
251
+ {
252
+ "$ref": "#/definitions/RuleConfiguration"
253
+ },
254
+ {
255
+ "type": "null"
256
+ }
257
+ ]
258
+ },
259
+ "howManyUnusedIndex": {
260
+ "description": "HowManyUnusedIndex (B004): Count number of unused index vs nb index (base on pg_stat_user_indexes, indexes associated to unique constraints are discard.)",
261
+ "anyOf": [
262
+ {
263
+ "$ref": "#/definitions/RuleConfiguration"
264
+ },
265
+ {
266
+ "type": "null"
267
+ }
268
+ ]
269
+ },
270
+ "recommended": {
271
+ "description": "It enables the recommended rules for this group",
272
+ "type": [
273
+ "boolean",
274
+ "null"
275
+ ]
276
+ },
277
+ "severalTableOwnerInSchema": {
278
+ "description": "SeveralTableOwnerInSchema (B011): In a schema there are several tables owned by different owners.",
279
+ "anyOf": [
280
+ {
281
+ "$ref": "#/definitions/RuleConfiguration"
282
+ },
283
+ {
284
+ "type": "null"
285
+ }
286
+ ]
287
+ }
288
+ },
289
+ "additionalProperties": false
290
+ },
291
+ "Cluster": {
292
+ "description": "A list of rules that belong to this group",
293
+ "type": "object",
294
+ "properties": {
295
+ "all": {
296
+ "description": "It enables ALL rules for this group.",
297
+ "type": [
298
+ "boolean",
299
+ "null"
300
+ ]
301
+ },
302
+ "passwordEncryptionIsMd5": {
303
+ "description": "PasswordEncryptionIsMd5 (C003): This configuration is not secure anymore and will prevent an upgrade to Postgres 18. Warning, you will need to reset all passwords after this is changed to scram-sha-256.",
304
+ "anyOf": [
305
+ {
306
+ "$ref": "#/definitions/RuleConfiguration"
307
+ },
308
+ {
309
+ "type": "null"
310
+ }
311
+ ]
312
+ },
313
+ "pgHbaEntriesWithMethodTrustOrPasswordShouldNotExists": {
314
+ "description": "PgHbaEntriesWithMethodTrustOrPasswordShouldNotExists (C002): This configuration is extremely insecure and should only be used in a controlled, non-production environment for testing purposes. In a production environment, you should use more secure authentication methods such as md5, scram-sha-256, or cert, and restrict access to trusted IP addresses only.",
315
+ "anyOf": [
316
+ {
317
+ "$ref": "#/definitions/RuleConfiguration"
318
+ },
319
+ {
320
+ "type": "null"
321
+ }
322
+ ]
323
+ },
324
+ "pgHbaEntriesWithMethodTrustShouldNotExists": {
325
+ "description": "PgHbaEntriesWithMethodTrustShouldNotExists (C001): This configuration is extremely insecure and should only be used in a controlled, non-production environment for testing purposes. In a production environment, you should use more secure authentication methods such as md5, scram-sha-256, or cert, and restrict access to trusted IP addresses only.",
326
+ "anyOf": [
327
+ {
328
+ "$ref": "#/definitions/RuleConfiguration"
329
+ },
330
+ {
331
+ "type": "null"
332
+ }
333
+ ]
334
+ },
335
+ "recommended": {
336
+ "description": "It enables the recommended rules for this group",
337
+ "type": [
338
+ "boolean",
339
+ "null"
340
+ ]
341
+ }
342
+ },
343
+ "additionalProperties": false
344
+ },
116
345
  "DatabaseConfiguration": {
117
346
  "description": "The configuration of the database connection.",
118
347
  "type": "object",
@@ -221,6 +450,142 @@
221
450
  },
222
451
  "additionalProperties": false
223
452
  },
453
+ "FormatConfiguration": {
454
+ "description": "The configuration for SQL formatting.",
455
+ "type": "object",
456
+ "properties": {
457
+ "constantCase": {
458
+ "description": "Constant casing (NULL, TRUE, FALSE): \"upper\" or \"lower\". Default: \"lower\".",
459
+ "anyOf": [
460
+ {
461
+ "$ref": "#/definitions/KeywordCase"
462
+ },
463
+ {
464
+ "type": "null"
465
+ }
466
+ ]
467
+ },
468
+ "enabled": {
469
+ "description": "If `false`, it disables the formatter. `true` by default.",
470
+ "type": [
471
+ "boolean",
472
+ "null"
473
+ ]
474
+ },
475
+ "ignore": {
476
+ "description": "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.",
477
+ "anyOf": [
478
+ {
479
+ "$ref": "#/definitions/StringSet"
480
+ },
481
+ {
482
+ "type": "null"
483
+ }
484
+ ]
485
+ },
486
+ "include": {
487
+ "description": "A list of Unix shell style patterns. The formatter will include files/folders that will match these patterns.",
488
+ "anyOf": [
489
+ {
490
+ "$ref": "#/definitions/StringSet"
491
+ },
492
+ {
493
+ "type": "null"
494
+ }
495
+ ]
496
+ },
497
+ "indentSize": {
498
+ "description": "Number of spaces (or tab width) for indentation. Default: 2.",
499
+ "type": [
500
+ "integer",
501
+ "null"
502
+ ],
503
+ "format": "uint8",
504
+ "minimum": 0.0
505
+ },
506
+ "indentStyle": {
507
+ "description": "Indentation style: \"spaces\" or \"tabs\". Default: \"spaces\".",
508
+ "anyOf": [
509
+ {
510
+ "$ref": "#/definitions/IndentStyle"
511
+ },
512
+ {
513
+ "type": "null"
514
+ }
515
+ ]
516
+ },
517
+ "keywordCase": {
518
+ "description": "Keyword casing: \"upper\" or \"lower\". Default: \"lower\".",
519
+ "anyOf": [
520
+ {
521
+ "$ref": "#/definitions/KeywordCase"
522
+ },
523
+ {
524
+ "type": "null"
525
+ }
526
+ ]
527
+ },
528
+ "lineWidth": {
529
+ "description": "Maximum line width before breaking. Default: 100.",
530
+ "type": [
531
+ "integer",
532
+ "null"
533
+ ],
534
+ "format": "uint16",
535
+ "minimum": 0.0
536
+ },
537
+ "typeCase": {
538
+ "description": "Data type casing (text, varchar, int): \"upper\" or \"lower\". Default: \"lower\".",
539
+ "anyOf": [
540
+ {
541
+ "$ref": "#/definitions/KeywordCase"
542
+ },
543
+ {
544
+ "type": "null"
545
+ }
546
+ ]
547
+ }
548
+ },
549
+ "additionalProperties": false
550
+ },
551
+ "IndentStyle": {
552
+ "description": "Indentation style for the formatter.",
553
+ "oneOf": [
554
+ {
555
+ "description": "Use spaces for indentation (default).",
556
+ "type": "string",
557
+ "enum": [
558
+ "spaces"
559
+ ]
560
+ },
561
+ {
562
+ "description": "Use tabs for indentation.",
563
+ "type": "string",
564
+ "enum": [
565
+ "tabs"
566
+ ]
567
+ }
568
+ ]
569
+ },
570
+ "KeywordCase": {
571
+ "description": "Keyword casing style for the formatter.",
572
+ "oneOf": [
573
+ {
574
+ "description": "Use uppercase keywords (SELECT, FROM, WHERE).",
575
+ "type": "string",
576
+ "enum": [
577
+ "upper"
578
+ ]
579
+ },
580
+ {
581
+ "description": "Use lowercase keywords (select, from, where). Default.",
582
+ "type": "string",
583
+ "enum": [
584
+ "lower"
585
+ ]
586
+ }
587
+ ]
588
+ },
224
589
  "LinterConfiguration": {
225
590
  "type": "object",
226
591
  "properties": {
@@ -418,6 +783,80 @@
418
783
  },
419
784
  "additionalProperties": false
420
785
  },
786
+ "PglinterConfiguration": {
787
+ "type": "object",
788
+ "properties": {
789
+ "enabled": {
790
+ "description": "if `false`, it disables the feature and the linter won't be executed. `true` by default",
791
+ "type": [
792
+ "boolean",
793
+ "null"
794
+ ]
795
+ },
796
+ "rules": {
797
+ "description": "List of rules",
798
+ "anyOf": [
799
+ {
800
+ "$ref": "#/definitions/PglinterRules"
801
+ },
802
+ {
803
+ "type": "null"
804
+ }
805
+ ]
806
+ }
807
+ },
808
+ "additionalProperties": false
809
+ },
810
+ "PglinterRules": {
811
+ "type": "object",
812
+ "properties": {
813
+ "all": {
814
+ "description": "It enables ALL rules. The rules that belong to `nursery` won't be enabled.",
815
+ "type": [
816
+ "boolean",
817
+ "null"
818
+ ]
819
+ },
820
+ "base": {
821
+ "anyOf": [
822
+ {
823
+ "$ref": "#/definitions/Base"
824
+ },
825
+ {
826
+ "type": "null"
827
+ }
828
+ ]
829
+ },
830
+ "cluster": {
831
+ "anyOf": [
832
+ {
833
+ "$ref": "#/definitions/Cluster"
834
+ },
835
+ {
836
+ "type": "null"
837
+ }
838
+ ]
839
+ },
840
+ "recommended": {
841
+ "description": "It enables the lint rules recommended by Postgres Language Server. `true` by default.",
842
+ "type": [
843
+ "boolean",
844
+ "null"
845
+ ]
846
+ },
847
+ "schema": {
848
+ "anyOf": [
849
+ {
850
+ "$ref": "#/definitions/Schema"
851
+ },
852
+ {
853
+ "type": "null"
854
+ }
855
+ ]
856
+ }
857
+ },
858
+ "additionalProperties": false
859
+ },
421
860
  "PlPgSqlCheckConfiguration": {
422
861
  "description": "The configuration for type checking.",
423
862
  "type": "object",
@@ -878,6 +1317,82 @@
878
1317
  },
879
1318
  "additionalProperties": false
880
1319
  },
1320
+ "Schema": {
1321
+ "description": "A list of rules that belong to this group",
1322
+ "type": "object",
1323
+ "properties": {
1324
+ "all": {
1325
+ "description": "It enables ALL rules for this group.",
1326
+ "type": [
1327
+ "boolean",
1328
+ "null"
1329
+ ]
1330
+ },
1331
+ "ownerSchemaIsInternalRole": {
1332
+ "description": "OwnerSchemaIsInternalRole (S004): Owner of schema should not be any internal pg roles, or owner is a superuser (not sure it is necesary).",
1333
+ "anyOf": [
1334
+ {
1335
+ "$ref": "#/definitions/RuleConfiguration"
1336
+ },
1337
+ {
1338
+ "type": "null"
1339
+ }
1340
+ ]
1341
+ },
1342
+ "recommended": {
1343
+ "description": "It enables the recommended rules for this group",
1344
+ "type": [
1345
+ "boolean",
1346
+ "null"
1347
+ ]
1348
+ },
1349
+ "schemaOwnerDoNotMatchTableOwner": {
1350
+ "description": "SchemaOwnerDoNotMatchTableOwner (S005): The schema owner and tables in the schema do not match.",
1351
+ "anyOf": [
1352
+ {
1353
+ "$ref": "#/definitions/RuleConfiguration"
1354
+ },
1355
+ {
1356
+ "type": "null"
1357
+ }
1358
+ ]
1359
+ },
1360
+ "schemaPrefixedOrSuffixedWithEnvt": {
1361
+ "description": "SchemaPrefixedOrSuffixedWithEnvt (S002): The schema is prefixed with one of staging,stg,preprod,prod,sandbox,sbox string. Means that when you refresh your preprod, staging environments from production, you have to rename the target schema from prod_ to stg_ or something like. It is possible, but it is never easy.",
1362
+ "anyOf": [
1363
+ {
1364
+ "$ref": "#/definitions/RuleConfiguration"
1365
+ },
1366
+ {
1367
+ "type": "null"
1368
+ }
1369
+ ]
1370
+ },
1371
+ "schemaWithDefaultRoleNotGranted": {
1372
+ "description": "SchemaWithDefaultRoleNotGranted (S001): The schema has no default role. Means that futur table will not be granted through a role. So you will have to re-execute grants on it.",
1373
+ "anyOf": [
1374
+ {
1375
+ "$ref": "#/definitions/RuleConfiguration"
1376
+ },
1377
+ {
1378
+ "type": "null"
1379
+ }
1380
+ ]
1381
+ },
1382
+ "unsecuredPublicSchema": {
1383
+ "description": "UnsecuredPublicSchema (S003): Only authorized users should be allowed to create objects.",
1384
+ "anyOf": [
1385
+ {
1386
+ "$ref": "#/definitions/RuleConfiguration"
1387
+ },
1388
+ {
1389
+ "type": "null"
1390
+ }
1391
+ ]
1392
+ }
1393
+ },
1394
+ "additionalProperties": false
1395
+ },
881
1396
  "Security": {
882
1397
  "description": "A list of rules that belong to this group",
883
1398
  "type": "object",
@@ -1063,6 +1578,17 @@
1063
1578
  "null"
1064
1579
  ]
1065
1580
  },
1581
+ "ignore": {
1582
+ "description": "A list of glob patterns for database objects to ignore across all rules. Patterns use Unix-style globs where `*` matches any sequence of characters. Format: `schema.object_name`, e.g., \"public.my_table\", \"audit.*\"",
1583
+ "anyOf": [
1584
+ {
1585
+ "$ref": "#/definitions/StringSet"
1586
+ },
1587
+ {
1588
+ "type": "null"
1589
+ }
1590
+ ]
1591
+ },
1066
1592
  "rules": {
1067
1593
  "description": "List of rules",
1068
1594
  "anyOf": [