-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
287 lines (287 loc) · 10.7 KB
/
Copy pathpackage.json
File metadata and controls
287 lines (287 loc) · 10.7 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
{
"name": "sqlovely",
"displayName": "SQLovely",
"description": "SQL language support for .sql files, with Watcom SQL as the default dialect and a conservative formatter.",
"version": "0.1.8",
"publisher": "MayerTim",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/MayerTim/SQLovely.git"
},
"bugs": {
"url": "https://github.com/MayerTim/SQLovely/issues"
},
"homepage": "https://github.com/MayerTim/SQLovely#readme",
"icon": "./images/logo.png",
"engines": {
"vscode": "^1.75.0"
},
"main": "./dist/extension.js",
"activationEvents": [
"onLanguage:sql",
"onCommand:sqlovely.showActiveDialect",
"onCommand:sqlovely.switchDialect",
"onCommand:sqlovely.formatCurrentFile",
"onCommand:sqlovely.formatSqlFilesInDirectory",
"onCommand:sqlovely.insertOrUpdateMetadataHeader",
"onCommand:sqlovely.applyExtras"
],
"categories": [
"Programming Languages",
"Formatters"
],
"keywords": [
"sql",
"watcom",
"watcom-sql",
"sql-anywhere",
"syntax-highlighting",
"sqlovely",
"formatter",
"formatting",
"mssql",
"sql-server",
"t-sql",
"tsql"
],
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"typecheck": "tsc -p ./ --noEmit",
"lint": "eslint \"src/**/*.ts\" \"test/**/*.js\" \"scripts/**/*.js\"",
"lint:fix": "npm run lint -- --fix",
"format": "prettier --write \"**/*.{ts,js,json,md,yml,yaml}\"",
"format:check": "prettier --check \"**/*.{ts,js,json,md,yml,yaml}\"",
"check": "npm run typecheck && npm run lint && npm run format:check",
"test": "npm run compile && node ./test/runAllTests.js",
"test:metadata": "npm run compile && node ./test/runMetadataHeaderTests.js",
"test:formatter": "npm run compile && node ./test/runFormatterTests.js",
"test:corpus": "npm run compile && node ./test/runFormatterCorpusTests.js",
"test:corpus:helpers": "npm run compile && node ./test/runFormatterCorpusHelperTests.js",
"test:project": "npm run compile && node ./test/runProjectValidationTests.js",
"test:diagnostics": "npm run compile && node ./test/runDiagnosticsTests.js",
"validate": "npm run check && npm test",
"package:vsix": "npm run validate && node ./scripts/packageVsix.js",
"test:extension": "npm run compile && node ./test/extension/runExtensionTests.js"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@types/node": "^16.18.0",
"@types/vscode": "1.75.0",
"@vscode/test-electron": "^3.0.0",
"@vscode/vsce": "^3.9.2",
"eslint": "^10.4.1",
"prettier": "^3.8.4",
"typescript": "^5.8.3",
"typescript-eslint": "^8.61.0"
},
"contributes": {
"languages": [
{
"id": "sql",
"aliases": [
"SQLovely SQL",
"SQLovely",
"Watcom SQL"
],
"extensions": [
".sql"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "sql",
"scopeName": "source.sql.sqlovely",
"path": "./syntaxes/sqlovely.tmLanguage.json"
}
],
"commands": [
{
"command": "sqlovely.showActiveDialect",
"title": "Show Active Dialect",
"category": "SQLovely"
},
{
"command": "sqlovely.switchDialect",
"title": "Switch Dialect",
"category": "SQLovely"
},
{
"command": "sqlovely.formatCurrentFile",
"title": "Format Current SQL File",
"category": "SQLovely",
"enablement": "editorLangId == sql"
},
{
"command": "sqlovely.formatSqlFilesInDirectory",
"title": "Format SQL Files in Directory",
"category": "SQLovely"
},
{
"command": "sqlovely.insertOrUpdateMetadataHeader",
"title": "Insert or Update Metadata Header",
"category": "SQLovely",
"enablement": "editorLangId == sql"
},
{
"command": "sqlovely.applyExtras",
"title": "Apply SQLovely Extras",
"category": "SQLovely",
"enablement": "editorLangId == sql"
}
],
"configuration": {
"title": "SQLovely",
"properties": {
"sqlovely.dialect": {
"type": "string",
"enum": [
"watcom",
"mssql"
],
"enumDescriptions": [
"Watcom SQL, the default SQLovely dialect.",
"Microsoft SQL Server, available as a rudimentary secondary dialect surface."
],
"default": "watcom",
"scope": "resource",
"markdownDescription": "Controls which SQL dialect SQLovely uses for dialect-aware features. Watcom SQL is the default; MSSQL support is intentionally rudimentary."
},
"sqlovely.format.enabled": {
"type": "boolean",
"default": true,
"scope": "resource",
"markdownDescription": "Enables or disables SQLovely document formatting for `.sql` files."
},
"sqlovely.format.keywordCase": {
"type": "string",
"enum": [
"upper",
"lower",
"preserve"
],
"enumDescriptions": [
"Format known SQL keywords and built-in functions in upper case.",
"Format known SQL keywords and built-in functions in lower case.",
"Keep the existing keyword casing."
],
"default": "upper",
"scope": "resource",
"markdownDescription": "Controls how SQLovely formats known SQL keywords and built-in functions. String literals, quoted identifiers and comments are not changed."
},
"sqlovely.format.indentSize": {
"type": "number",
"default": 2,
"minimum": 1,
"maximum": 16,
"scope": "resource",
"markdownDescription": "Controls the indentation width SQLovely uses while formatting `.sql` files. The default is 2 spaces."
},
"sqlovely.format.insertSpaces": {
"type": "boolean",
"default": true,
"scope": "resource",
"markdownDescription": "Controls whether SQLovely uses spaces for indentation while formatting `.sql` files. The default is enabled."
},
"sqlovely.format.maxConsecutiveBlankLines": {
"type": "number",
"default": 1,
"minimum": 0,
"maximum": 10,
"scope": "resource",
"markdownDescription": "Maximum number of consecutive blank lines SQLovely keeps while formatting."
},
"sqlovely.format.ensureFinalNewline": {
"type": "boolean",
"default": true,
"scope": "resource",
"markdownDescription": "Ensures formatted SQL files end with a final newline."
},
"sqlovely.format.safety.enabled": {
"type": "boolean",
"default": true,
"scope": "resource",
"markdownDescription": "Enables SQLovely formatter safety guards. When enabled, expensive Watcom formatting passes are skipped for very large documents to keep VS Code responsive."
},
"sqlovely.format.safety.maxComplexDocumentLength": {
"type": "number",
"default": 1000000,
"minimum": 10000,
"maximum": 10000000,
"scope": "resource",
"markdownDescription": "Maximum document length in characters for expensive Watcom formatting passes. Larger documents still receive safe whitespace, indentation and keyword formatting."
},
"sqlovely.format.safety.maxComplexDocumentLines": {
"type": "number",
"default": 5000,
"minimum": 100,
"maximum": 100000,
"scope": "resource",
"markdownDescription": "Maximum line count for expensive Watcom formatting passes. Larger documents still receive safe whitespace, indentation and keyword formatting."
},
"sqlovely.format.safety.maxComplexLineLength": {
"type": "number",
"default": 5000,
"minimum": 250,
"maximum": 100000,
"scope": "resource",
"markdownDescription": "Maximum single-line length for expensive Watcom formatting passes such as parenthesis, query-clause, CASE and IF-expression splitting."
},
"sqlovely.extras.enabled": {
"type": "boolean",
"default": true,
"scope": "resource",
"markdownDescription": "Enables or disables SQLovely Extras for `.sql` files. Extras are optional features that can update files beyond pure formatting."
},
"sqlovely.extras.applyOnSave": {
"type": "boolean",
"default": false,
"scope": "resource",
"markdownDescription": "Applies enabled SQLovely Extras before saving `.sql` files. This is disabled by default because extras can change file content beyond pure formatting."
},
"sqlovely.extras.applyWithFormatting": {
"type": "boolean",
"default": true,
"scope": "resource",
"markdownDescription": "Applies enabled SQLovely Extras whenever SQLovely formats a `.sql` file. Disable this to keep formatting limited to whitespace, indentation and keyword casing."
},
"sqlovely.extras.metadataHeader.enabled": {
"type": "boolean",
"default": true,
"scope": "resource",
"markdownDescription": "Enables or disables the SQLovely metadata-header extra for procedures, functions and triggers."
},
"sqlovely.diagnostics.enabled": {
"type": "boolean",
"default": true,
"scope": "resource",
"markdownDescription": "Enables or disables SQLovely diagnostics for `.sql` files. Diagnostics are informational checks and do not modify files."
},
"sqlovely.diagnostics.missingMetadataHeader.enabled": {
"type": "boolean",
"default": true,
"scope": "resource",
"markdownDescription": "Shows a warning when a procedure, function or trigger does not have a SQLovely metadata header. The quick fix can insert the missing header."
},
"sqlovely.diagnostics.maxLineLength.enabled": {
"type": "boolean",
"default": true,
"scope": "resource",
"markdownDescription": "Shows an informational diagnostic for SQL lines that exceed the configured SQLovely line-length limit."
},
"sqlovely.diagnostics.maxLineLength.limit": {
"type": "number",
"default": 120,
"minimum": 40,
"maximum": 300,
"scope": "resource",
"markdownDescription": "Maximum SQL line length used by SQLovely style diagnostics. The default is 120 characters."
}
}
}
}
}