vize 0.89.0 → 0.91.0
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/dist/{config-CTXni-Py.d.mts → config-XMCb6V8W.d.mts} +224 -215
- package/dist/config-XMCb6V8W.d.mts.map +1 -0
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +80 -50
- package/dist/config.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/package.json +11 -10
- package/pkl/CompilerConfig.pkl +37 -0
- package/pkl/FormatterConfig.pkl +67 -0
- package/pkl/GlobalTypesConfig.pkl +15 -0
- package/pkl/LanguageServerConfig.pkl +70 -0
- package/pkl/LinterConfig.pkl +17 -0
- package/pkl/LspConfig.pkl +6 -0
- package/pkl/MuseaConfig.pkl +38 -0
- package/pkl/PklProject +16 -0
- package/pkl/PklProject.deps.json +19 -0
- package/pkl/TypeCheckerConfig.pkl +43 -0
- package/pkl/VitePluginConfig.pkl +20 -0
- package/pkl/VizeConfig.pkl +55 -0
- package/pkl/jsonschema/generate.pkl +622 -0
- package/pkl/vize.pkl +12 -1
- package/schemas/vize.config.schema.json +375 -126
- package/src/config.ts +120 -51
- package/src/index.ts +1 -0
- package/src/types/generated.ts +472 -0
- package/src/types/index.ts +19 -10
- package/src/types/rules.ts +1 -1
- package/src/types/{loader.ts → runtime.ts} +15 -20
- package/dist/config-CTXni-Py.d.mts.map +0 -1
- package/src/types/compiler.ts +0 -121
- package/src/types/core.ts +0 -83
- package/src/types/musea.ts +0 -108
- package/src/types/tools.ts +0 -266
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// Vite plugin configuration for Vize.
|
|
2
|
+
module vize.VitePluginConfig
|
|
3
|
+
|
|
4
|
+
class VitePluginConfig {
|
|
5
|
+
/// Files to include in compilation (glob patterns).
|
|
6
|
+
include: Listing<String> = new Listing { "**/*.vue" }
|
|
7
|
+
|
|
8
|
+
/// Files to exclude from compilation (glob patterns).
|
|
9
|
+
exclude: Listing<String> = new Listing { "node_modules/**" }
|
|
10
|
+
|
|
11
|
+
/// Glob patterns to scan for .vue files during pre-compilation.
|
|
12
|
+
scanPatterns: Listing<String> = new Listing { "**/*.vue" }
|
|
13
|
+
|
|
14
|
+
/// Glob patterns to ignore during pre-compilation.
|
|
15
|
+
ignorePatterns: Listing<String> = new Listing {
|
|
16
|
+
"node_modules/**"
|
|
17
|
+
"dist/**"
|
|
18
|
+
".git/**"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/// Root configuration module for Vize.
|
|
2
|
+
///
|
|
3
|
+
/// Usage in `vize.config.pkl`:
|
|
4
|
+
/// ```
|
|
5
|
+
/// amends "node_modules/vize/pkl/VizeConfig.pkl"
|
|
6
|
+
///
|
|
7
|
+
/// formatter {
|
|
8
|
+
/// singleQuote = true
|
|
9
|
+
/// }
|
|
10
|
+
///
|
|
11
|
+
/// languageServer {
|
|
12
|
+
/// completion = false
|
|
13
|
+
/// }
|
|
14
|
+
/// ```
|
|
15
|
+
module vize.VizeConfig
|
|
16
|
+
|
|
17
|
+
import "CompilerConfig.pkl"
|
|
18
|
+
import "VitePluginConfig.pkl"
|
|
19
|
+
import "LinterConfig.pkl"
|
|
20
|
+
import "TypeCheckerConfig.pkl"
|
|
21
|
+
import "FormatterConfig.pkl"
|
|
22
|
+
import "LanguageServerConfig.pkl"
|
|
23
|
+
import "MuseaConfig.pkl"
|
|
24
|
+
import "GlobalTypesConfig.pkl"
|
|
25
|
+
|
|
26
|
+
/// Vue compiler options.
|
|
27
|
+
compiler: CompilerConfig.CompilerConfig = new CompilerConfig.CompilerConfig {}
|
|
28
|
+
|
|
29
|
+
/// Vite plugin options.
|
|
30
|
+
vite: VitePluginConfig.VitePluginConfig = new VitePluginConfig.VitePluginConfig {}
|
|
31
|
+
|
|
32
|
+
/// Linter options.
|
|
33
|
+
linter: LinterConfig.LinterConfig = new LinterConfig.LinterConfig {}
|
|
34
|
+
|
|
35
|
+
/// Type checker options.
|
|
36
|
+
typeChecker: TypeCheckerConfig.TypeCheckerConfig = new TypeCheckerConfig.TypeCheckerConfig {}
|
|
37
|
+
|
|
38
|
+
/// Formatter options.
|
|
39
|
+
formatter: FormatterConfig.FormatterConfig = new FormatterConfig.FormatterConfig {}
|
|
40
|
+
|
|
41
|
+
/// Language server options.
|
|
42
|
+
languageServer: LanguageServerConfig.LanguageServerConfig = new LanguageServerConfig.LanguageServerConfig {}
|
|
43
|
+
|
|
44
|
+
/// Legacy alias for `languageServer`.
|
|
45
|
+
@Deprecated {
|
|
46
|
+
message = "Use languageServer instead."
|
|
47
|
+
replaceWith = "languageServer"
|
|
48
|
+
}
|
|
49
|
+
lsp: LanguageServerConfig.LanguageServerConfig = languageServer
|
|
50
|
+
|
|
51
|
+
/// Musea component gallery options.
|
|
52
|
+
musea: MuseaConfig.MuseaConfig = new MuseaConfig.MuseaConfig {}
|
|
53
|
+
|
|
54
|
+
/// Global type declarations.
|
|
55
|
+
globalTypes: GlobalTypesConfig.GlobalTypesConfig = new GlobalTypesConfig.GlobalTypesConfig {}
|
|
@@ -0,0 +1,622 @@
|
|
|
1
|
+
/// Generates secondary JSON Schema compatibility output from the primary Pkl definitions.
|
|
2
|
+
///
|
|
3
|
+
/// Usage: pkl eval -f json pkl/jsonschema/generate.pkl
|
|
4
|
+
module vize.jsonschema.generate
|
|
5
|
+
|
|
6
|
+
import "@json_schema/JsonSchema.pkl"
|
|
7
|
+
|
|
8
|
+
local ruleSeverityEnum: JsonSchema = new JsonSchema {
|
|
9
|
+
type = "string"
|
|
10
|
+
enum = new Listing { "off"; "warn"; "error" }
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
local lintPresetEnum: JsonSchema = new JsonSchema {
|
|
14
|
+
type = "string"
|
|
15
|
+
enum = new Listing { "happy-path"; "opinionated"; "essential"; "incremental"; "nuxt" }
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
local compilerConfigDef: JsonSchema = new JsonSchema {
|
|
19
|
+
type = "object"
|
|
20
|
+
description = "Vue compiler options"
|
|
21
|
+
properties {
|
|
22
|
+
["mode"] = new JsonSchema {
|
|
23
|
+
type = "string"
|
|
24
|
+
enum = new Listing { "module"; "function" }
|
|
25
|
+
description = "Compilation mode"
|
|
26
|
+
default = "module"
|
|
27
|
+
}
|
|
28
|
+
["vapor"] = new JsonSchema {
|
|
29
|
+
type = "boolean"
|
|
30
|
+
description = "Enable Vapor mode compilation"
|
|
31
|
+
default = false
|
|
32
|
+
}
|
|
33
|
+
["ssr"] = new JsonSchema {
|
|
34
|
+
type = "boolean"
|
|
35
|
+
description = "Enable SSR mode"
|
|
36
|
+
default = false
|
|
37
|
+
}
|
|
38
|
+
["sourceMap"] = new JsonSchema {
|
|
39
|
+
type = "boolean"
|
|
40
|
+
description = "Enable source map generation"
|
|
41
|
+
}
|
|
42
|
+
["prefixIdentifiers"] = new JsonSchema {
|
|
43
|
+
type = "boolean"
|
|
44
|
+
description = "Prefix template identifiers with _ctx"
|
|
45
|
+
default = false
|
|
46
|
+
}
|
|
47
|
+
["hoistStatic"] = new JsonSchema {
|
|
48
|
+
type = "boolean"
|
|
49
|
+
description = "Hoist static nodes"
|
|
50
|
+
default = true
|
|
51
|
+
}
|
|
52
|
+
["cacheHandlers"] = new JsonSchema {
|
|
53
|
+
type = "boolean"
|
|
54
|
+
description = "Cache v-on handlers"
|
|
55
|
+
default = true
|
|
56
|
+
}
|
|
57
|
+
["isTs"] = new JsonSchema {
|
|
58
|
+
type = "boolean"
|
|
59
|
+
description = "Enable TypeScript parsing in <script> blocks"
|
|
60
|
+
default = true
|
|
61
|
+
}
|
|
62
|
+
["scriptExt"] = new JsonSchema {
|
|
63
|
+
type = "string"
|
|
64
|
+
enum = new Listing { "ts"; "js" }
|
|
65
|
+
description = "Script file extension for generated output"
|
|
66
|
+
default = "ts"
|
|
67
|
+
}
|
|
68
|
+
["runtimeModuleName"] = new JsonSchema {
|
|
69
|
+
type = "string"
|
|
70
|
+
description = "Module name for runtime imports"
|
|
71
|
+
default = "vue"
|
|
72
|
+
}
|
|
73
|
+
["runtimeGlobalName"] = new JsonSchema {
|
|
74
|
+
type = "string"
|
|
75
|
+
description = "Global variable name for runtime (IIFE builds)"
|
|
76
|
+
default = "Vue"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
additionalProperties = false
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
local vitePluginConfigDef: JsonSchema = new JsonSchema {
|
|
83
|
+
type = "object"
|
|
84
|
+
description = "Vite plugin options"
|
|
85
|
+
properties {
|
|
86
|
+
["include"] = new JsonSchema {
|
|
87
|
+
description = "Files to include in compilation (glob patterns or strings)"
|
|
88
|
+
oneOf = new Listing {
|
|
89
|
+
new JsonSchema { type = "string" }
|
|
90
|
+
new JsonSchema {
|
|
91
|
+
type = "array"
|
|
92
|
+
items = new JsonSchema { type = "string" }
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
["exclude"] = new JsonSchema {
|
|
97
|
+
description = "Files to exclude from compilation (glob patterns or strings)"
|
|
98
|
+
oneOf = new Listing {
|
|
99
|
+
new JsonSchema { type = "string" }
|
|
100
|
+
new JsonSchema {
|
|
101
|
+
type = "array"
|
|
102
|
+
items = new JsonSchema { type = "string" }
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
["scanPatterns"] = new JsonSchema {
|
|
107
|
+
type = "array"
|
|
108
|
+
items = new JsonSchema { type = "string" }
|
|
109
|
+
description = "Glob patterns to scan for .vue files during pre-compilation"
|
|
110
|
+
}
|
|
111
|
+
["ignorePatterns"] = new JsonSchema {
|
|
112
|
+
type = "array"
|
|
113
|
+
items = new JsonSchema { type = "string" }
|
|
114
|
+
description = "Glob patterns to ignore during pre-compilation"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
additionalProperties = false
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
local linterConfigDef: JsonSchema = new JsonSchema {
|
|
121
|
+
type = "object"
|
|
122
|
+
description = "Linter options"
|
|
123
|
+
properties {
|
|
124
|
+
["enabled"] = new JsonSchema {
|
|
125
|
+
type = "boolean"
|
|
126
|
+
description = "Enable linting"
|
|
127
|
+
}
|
|
128
|
+
["preset"] = new JsonSchema {
|
|
129
|
+
type = lintPresetEnum.type
|
|
130
|
+
enum = lintPresetEnum.enum
|
|
131
|
+
description = "Built-in lint preset"
|
|
132
|
+
default = "happy-path"
|
|
133
|
+
}
|
|
134
|
+
["rules"] = new JsonSchema {
|
|
135
|
+
type = "object"
|
|
136
|
+
description = "Rules to enable/disable"
|
|
137
|
+
additionalProperties = ruleSeverityEnum
|
|
138
|
+
}
|
|
139
|
+
["categories"] = new JsonSchema {
|
|
140
|
+
type = "object"
|
|
141
|
+
description = "Category-level severity overrides"
|
|
142
|
+
properties {
|
|
143
|
+
["correctness"] = ruleSeverityEnum
|
|
144
|
+
["suspicious"] = ruleSeverityEnum
|
|
145
|
+
["style"] = ruleSeverityEnum
|
|
146
|
+
["perf"] = ruleSeverityEnum
|
|
147
|
+
["a11y"] = ruleSeverityEnum
|
|
148
|
+
["security"] = ruleSeverityEnum
|
|
149
|
+
}
|
|
150
|
+
additionalProperties = false
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
additionalProperties = false
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
local typeCheckerConfigDef: JsonSchema = new JsonSchema {
|
|
157
|
+
type = "object"
|
|
158
|
+
description = "Type checker options"
|
|
159
|
+
properties {
|
|
160
|
+
["enabled"] = new JsonSchema {
|
|
161
|
+
type = "boolean"
|
|
162
|
+
description = "Enable type checking"
|
|
163
|
+
default = true
|
|
164
|
+
}
|
|
165
|
+
["strict"] = new JsonSchema {
|
|
166
|
+
type = "boolean"
|
|
167
|
+
description = "Enable strict mode"
|
|
168
|
+
default = false
|
|
169
|
+
}
|
|
170
|
+
["checkProps"] = new JsonSchema {
|
|
171
|
+
type = "boolean"
|
|
172
|
+
description = "Check component props"
|
|
173
|
+
default = true
|
|
174
|
+
}
|
|
175
|
+
["checkEmits"] = new JsonSchema {
|
|
176
|
+
type = "boolean"
|
|
177
|
+
description = "Check component emits"
|
|
178
|
+
default = true
|
|
179
|
+
}
|
|
180
|
+
["checkTemplateBindings"] = new JsonSchema {
|
|
181
|
+
type = "boolean"
|
|
182
|
+
description = "Check template bindings"
|
|
183
|
+
default = true
|
|
184
|
+
}
|
|
185
|
+
["checkReactivity"] = new JsonSchema {
|
|
186
|
+
type = "boolean"
|
|
187
|
+
description = "Check reactivity loss patterns"
|
|
188
|
+
default = true
|
|
189
|
+
}
|
|
190
|
+
["checkSetupContext"] = new JsonSchema {
|
|
191
|
+
type = "boolean"
|
|
192
|
+
description = "Check setup context violations"
|
|
193
|
+
default = true
|
|
194
|
+
}
|
|
195
|
+
["checkInvalidExports"] = new JsonSchema {
|
|
196
|
+
type = "boolean"
|
|
197
|
+
description = "Check invalid exports in <script setup>"
|
|
198
|
+
default = true
|
|
199
|
+
}
|
|
200
|
+
["checkFallthroughAttrs"] = new JsonSchema {
|
|
201
|
+
type = "boolean"
|
|
202
|
+
description = "Check fallthrough attrs on multi-root templates"
|
|
203
|
+
default = true
|
|
204
|
+
}
|
|
205
|
+
["tsconfig"] = new JsonSchema {
|
|
206
|
+
type = "string"
|
|
207
|
+
description = "Path to tsconfig.json"
|
|
208
|
+
}
|
|
209
|
+
["tsgoPath"] = new JsonSchema {
|
|
210
|
+
type = "string"
|
|
211
|
+
description = "Path to tsgo binary"
|
|
212
|
+
}
|
|
213
|
+
["globalsFile"] = new JsonSchema {
|
|
214
|
+
type = "string"
|
|
215
|
+
description = "Path to a .d.ts file that declares template globals"
|
|
216
|
+
}
|
|
217
|
+
["servers"] = new JsonSchema {
|
|
218
|
+
type = "integer"
|
|
219
|
+
description = "Number of parallel Corsa servers to use"
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
additionalProperties = false
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
local formatterConfigDef: JsonSchema = new JsonSchema {
|
|
226
|
+
type = "object"
|
|
227
|
+
description = "Formatter options"
|
|
228
|
+
properties {
|
|
229
|
+
["printWidth"] = new JsonSchema {
|
|
230
|
+
type = "integer"
|
|
231
|
+
description = "Max line width"
|
|
232
|
+
default = 100
|
|
233
|
+
}
|
|
234
|
+
["tabWidth"] = new JsonSchema {
|
|
235
|
+
type = "integer"
|
|
236
|
+
description = "Indentation width"
|
|
237
|
+
default = 2
|
|
238
|
+
}
|
|
239
|
+
["useTabs"] = new JsonSchema {
|
|
240
|
+
type = "boolean"
|
|
241
|
+
description = "Use tabs for indentation"
|
|
242
|
+
default = false
|
|
243
|
+
}
|
|
244
|
+
["semi"] = new JsonSchema {
|
|
245
|
+
type = "boolean"
|
|
246
|
+
description = "Print semicolons"
|
|
247
|
+
default = true
|
|
248
|
+
}
|
|
249
|
+
["singleQuote"] = new JsonSchema {
|
|
250
|
+
type = "boolean"
|
|
251
|
+
description = "Use single quotes"
|
|
252
|
+
default = false
|
|
253
|
+
}
|
|
254
|
+
["jsxSingleQuote"] = new JsonSchema {
|
|
255
|
+
type = "boolean"
|
|
256
|
+
description = "Use single quotes in JSX"
|
|
257
|
+
default = false
|
|
258
|
+
}
|
|
259
|
+
["trailingComma"] = new JsonSchema {
|
|
260
|
+
type = "string"
|
|
261
|
+
enum = new Listing { "all"; "none"; "es5" }
|
|
262
|
+
description = "Trailing commas"
|
|
263
|
+
default = "all"
|
|
264
|
+
}
|
|
265
|
+
["bracketSpacing"] = new JsonSchema {
|
|
266
|
+
type = "boolean"
|
|
267
|
+
description = "Print spaces between brackets in object literals"
|
|
268
|
+
default = true
|
|
269
|
+
}
|
|
270
|
+
["bracketSameLine"] = new JsonSchema {
|
|
271
|
+
type = "boolean"
|
|
272
|
+
description = "Keep > on the last line of multiline tags"
|
|
273
|
+
default = false
|
|
274
|
+
}
|
|
275
|
+
["arrowParens"] = new JsonSchema {
|
|
276
|
+
type = "string"
|
|
277
|
+
enum = new Listing { "always"; "avoid" }
|
|
278
|
+
description = "Arrow parens mode"
|
|
279
|
+
default = "always"
|
|
280
|
+
}
|
|
281
|
+
["endOfLine"] = new JsonSchema {
|
|
282
|
+
type = "string"
|
|
283
|
+
enum = new Listing { "lf"; "crlf"; "cr"; "auto" }
|
|
284
|
+
description = "End-of-line mode"
|
|
285
|
+
default = "lf"
|
|
286
|
+
}
|
|
287
|
+
["quoteProps"] = new JsonSchema {
|
|
288
|
+
type = "string"
|
|
289
|
+
enum = new Listing { "as-needed"; "consistent"; "preserve" }
|
|
290
|
+
description = "Object property quoting mode"
|
|
291
|
+
default = "as-needed"
|
|
292
|
+
}
|
|
293
|
+
["singleAttributePerLine"] = new JsonSchema {
|
|
294
|
+
type = "boolean"
|
|
295
|
+
description = "Force one attribute per line"
|
|
296
|
+
default = false
|
|
297
|
+
}
|
|
298
|
+
["vueIndentScriptAndStyle"] = new JsonSchema {
|
|
299
|
+
type = "boolean"
|
|
300
|
+
description = "Indent script and style blocks"
|
|
301
|
+
default = false
|
|
302
|
+
}
|
|
303
|
+
["sortAttributes"] = new JsonSchema {
|
|
304
|
+
type = "boolean"
|
|
305
|
+
description = "Sort attributes"
|
|
306
|
+
default = true
|
|
307
|
+
}
|
|
308
|
+
["attributeSortOrder"] = new JsonSchema {
|
|
309
|
+
type = "string"
|
|
310
|
+
enum = new Listing { "alphabetical"; "as-written" }
|
|
311
|
+
description = "Attribute ordering strategy"
|
|
312
|
+
default = "alphabetical"
|
|
313
|
+
}
|
|
314
|
+
["mergeBindAndNonBindAttrs"] = new JsonSchema {
|
|
315
|
+
type = "boolean"
|
|
316
|
+
description = "Merge bind and non-bind attrs for sorting"
|
|
317
|
+
default = false
|
|
318
|
+
}
|
|
319
|
+
["maxAttributesPerLine"] = new JsonSchema {
|
|
320
|
+
type = "integer"
|
|
321
|
+
description = "Maximum attributes per line before wrapping"
|
|
322
|
+
}
|
|
323
|
+
["attributeGroups"] = new JsonSchema {
|
|
324
|
+
type = "array"
|
|
325
|
+
description = "Custom attribute groups"
|
|
326
|
+
items = new JsonSchema {
|
|
327
|
+
type = "array"
|
|
328
|
+
items = new JsonSchema { type = "string" }
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
["normalizeDirectiveShorthands"] = new JsonSchema {
|
|
332
|
+
type = "boolean"
|
|
333
|
+
description = "Normalize directive shorthands"
|
|
334
|
+
default = true
|
|
335
|
+
}
|
|
336
|
+
["sortBlocks"] = new JsonSchema {
|
|
337
|
+
type = "boolean"
|
|
338
|
+
description = "Sort SFC blocks in canonical order"
|
|
339
|
+
default = true
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
additionalProperties = false
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
local languageServerConfigDef: JsonSchema = new JsonSchema {
|
|
346
|
+
type = "object"
|
|
347
|
+
description = "Language server options"
|
|
348
|
+
properties {
|
|
349
|
+
["enabled"] = new JsonSchema {
|
|
350
|
+
type = "boolean"
|
|
351
|
+
description = "Enable the language server"
|
|
352
|
+
}
|
|
353
|
+
["lint"] = new JsonSchema {
|
|
354
|
+
type = "boolean"
|
|
355
|
+
description = "Enable lint diagnostics"
|
|
356
|
+
}
|
|
357
|
+
["diagnostics"] = new JsonSchema {
|
|
358
|
+
type = "boolean"
|
|
359
|
+
description = "Deprecated alias for lint"
|
|
360
|
+
}
|
|
361
|
+
["typecheck"] = new JsonSchema {
|
|
362
|
+
type = "boolean"
|
|
363
|
+
description = "Enable project type checking diagnostics"
|
|
364
|
+
}
|
|
365
|
+
["editor"] = new JsonSchema {
|
|
366
|
+
type = "boolean"
|
|
367
|
+
description = "Enable editor-oriented IDE features"
|
|
368
|
+
}
|
|
369
|
+
["completion"] = new JsonSchema {
|
|
370
|
+
type = "boolean"
|
|
371
|
+
description = "Enable completions"
|
|
372
|
+
}
|
|
373
|
+
["hover"] = new JsonSchema {
|
|
374
|
+
type = "boolean"
|
|
375
|
+
description = "Enable hover information"
|
|
376
|
+
}
|
|
377
|
+
["definition"] = new JsonSchema {
|
|
378
|
+
type = "boolean"
|
|
379
|
+
description = "Enable go-to-definition"
|
|
380
|
+
}
|
|
381
|
+
["references"] = new JsonSchema {
|
|
382
|
+
type = "boolean"
|
|
383
|
+
description = "Enable reference search"
|
|
384
|
+
}
|
|
385
|
+
["documentSymbols"] = new JsonSchema {
|
|
386
|
+
type = "boolean"
|
|
387
|
+
description = "Enable document symbols"
|
|
388
|
+
}
|
|
389
|
+
["workspaceSymbols"] = new JsonSchema {
|
|
390
|
+
type = "boolean"
|
|
391
|
+
description = "Enable workspace symbols"
|
|
392
|
+
}
|
|
393
|
+
["formatting"] = new JsonSchema {
|
|
394
|
+
type = "boolean"
|
|
395
|
+
description = "Enable formatting via the language server"
|
|
396
|
+
}
|
|
397
|
+
["codeActions"] = new JsonSchema {
|
|
398
|
+
type = "boolean"
|
|
399
|
+
description = "Enable code actions"
|
|
400
|
+
}
|
|
401
|
+
["rename"] = new JsonSchema {
|
|
402
|
+
type = "boolean"
|
|
403
|
+
description = "Enable rename support"
|
|
404
|
+
}
|
|
405
|
+
["codeLens"] = new JsonSchema {
|
|
406
|
+
type = "boolean"
|
|
407
|
+
description = "Enable code lenses"
|
|
408
|
+
}
|
|
409
|
+
["semanticTokens"] = new JsonSchema {
|
|
410
|
+
type = "boolean"
|
|
411
|
+
description = "Enable semantic tokens"
|
|
412
|
+
}
|
|
413
|
+
["documentLinks"] = new JsonSchema {
|
|
414
|
+
type = "boolean"
|
|
415
|
+
description = "Enable document links"
|
|
416
|
+
}
|
|
417
|
+
["foldingRanges"] = new JsonSchema {
|
|
418
|
+
type = "boolean"
|
|
419
|
+
description = "Enable folding ranges"
|
|
420
|
+
}
|
|
421
|
+
["inlayHints"] = new JsonSchema {
|
|
422
|
+
type = "boolean"
|
|
423
|
+
description = "Enable inlay hints"
|
|
424
|
+
}
|
|
425
|
+
["fileRename"] = new JsonSchema {
|
|
426
|
+
type = "boolean"
|
|
427
|
+
description = "Enable file rename edits"
|
|
428
|
+
}
|
|
429
|
+
["corsa"] = new JsonSchema {
|
|
430
|
+
type = "boolean"
|
|
431
|
+
description = "Enable Corsa-backed IDE features"
|
|
432
|
+
}
|
|
433
|
+
["tsgo"] = new JsonSchema {
|
|
434
|
+
type = "boolean"
|
|
435
|
+
description = "Deprecated alias for corsa"
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
additionalProperties = false
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
local viewportDef: JsonSchema = new JsonSchema {
|
|
442
|
+
type = "object"
|
|
443
|
+
properties {
|
|
444
|
+
["width"] = new JsonSchema {
|
|
445
|
+
type = "integer"
|
|
446
|
+
description = "Viewport width"
|
|
447
|
+
}
|
|
448
|
+
["height"] = new JsonSchema {
|
|
449
|
+
type = "integer"
|
|
450
|
+
description = "Viewport height"
|
|
451
|
+
}
|
|
452
|
+
["name"] = new JsonSchema {
|
|
453
|
+
type = "string"
|
|
454
|
+
description = "Viewport name"
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
required = new Listing { "width"; "height" }
|
|
458
|
+
additionalProperties = false
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
local museaVrtConfigDef: JsonSchema = new JsonSchema {
|
|
462
|
+
type = "object"
|
|
463
|
+
description = "VRT (Visual Regression Testing) configuration"
|
|
464
|
+
properties {
|
|
465
|
+
["threshold"] = new JsonSchema {
|
|
466
|
+
type = "number"
|
|
467
|
+
description = "Threshold for pixel comparison (0-1)"
|
|
468
|
+
default = 0.1
|
|
469
|
+
}
|
|
470
|
+
["outDir"] = new JsonSchema {
|
|
471
|
+
type = "string"
|
|
472
|
+
description = "Output directory for screenshots"
|
|
473
|
+
default = "__musea_snapshots__"
|
|
474
|
+
}
|
|
475
|
+
["viewports"] = new JsonSchema {
|
|
476
|
+
type = "array"
|
|
477
|
+
items = new JsonSchema { `$ref` = "#/definitions/MuseaViewport" }
|
|
478
|
+
description = "Viewport sizes"
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
additionalProperties = false
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
local museaA11yConfigDef: JsonSchema = new JsonSchema {
|
|
485
|
+
type = "object"
|
|
486
|
+
description = "A11y configuration"
|
|
487
|
+
properties {
|
|
488
|
+
["enabled"] = new JsonSchema {
|
|
489
|
+
type = "boolean"
|
|
490
|
+
description = "Enable a11y checking"
|
|
491
|
+
default = false
|
|
492
|
+
}
|
|
493
|
+
["rules"] = new JsonSchema {
|
|
494
|
+
type = "object"
|
|
495
|
+
description = "Axe-core rules to enable/disable"
|
|
496
|
+
additionalProperties = new JsonSchema { type = "boolean" }
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
additionalProperties = false
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
local museaAutogenConfigDef: JsonSchema = new JsonSchema {
|
|
503
|
+
type = "object"
|
|
504
|
+
description = "Autogen configuration"
|
|
505
|
+
properties {
|
|
506
|
+
["enabled"] = new JsonSchema {
|
|
507
|
+
type = "boolean"
|
|
508
|
+
description = "Enable auto-generation of variants"
|
|
509
|
+
default = false
|
|
510
|
+
}
|
|
511
|
+
["maxVariants"] = new JsonSchema {
|
|
512
|
+
type = "integer"
|
|
513
|
+
description = "Max variants to generate per component"
|
|
514
|
+
default = 10
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
additionalProperties = false
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
local museaConfigDef: JsonSchema = new JsonSchema {
|
|
521
|
+
type = "object"
|
|
522
|
+
description = "Musea component gallery options"
|
|
523
|
+
properties {
|
|
524
|
+
["include"] = new JsonSchema {
|
|
525
|
+
type = "array"
|
|
526
|
+
items = new JsonSchema { type = "string" }
|
|
527
|
+
description = "Glob patterns for art files"
|
|
528
|
+
}
|
|
529
|
+
["exclude"] = new JsonSchema {
|
|
530
|
+
type = "array"
|
|
531
|
+
items = new JsonSchema { type = "string" }
|
|
532
|
+
description = "Glob patterns to exclude"
|
|
533
|
+
}
|
|
534
|
+
["basePath"] = new JsonSchema {
|
|
535
|
+
type = "string"
|
|
536
|
+
description = "Base path for gallery"
|
|
537
|
+
default = "/__musea__"
|
|
538
|
+
}
|
|
539
|
+
["storybookCompat"] = new JsonSchema {
|
|
540
|
+
type = "boolean"
|
|
541
|
+
description = "Enable Storybook compatibility"
|
|
542
|
+
default = false
|
|
543
|
+
}
|
|
544
|
+
["inlineArt"] = new JsonSchema {
|
|
545
|
+
type = "boolean"
|
|
546
|
+
description = "Enable inline art detection in .vue files"
|
|
547
|
+
default = false
|
|
548
|
+
}
|
|
549
|
+
["vrt"] = new JsonSchema { `$ref` = "#/definitions/MuseaVrtConfig" }
|
|
550
|
+
["a11y"] = new JsonSchema { `$ref` = "#/definitions/MuseaA11yConfig" }
|
|
551
|
+
["autogen"] = new JsonSchema { `$ref` = "#/definitions/MuseaAutogenConfig" }
|
|
552
|
+
}
|
|
553
|
+
additionalProperties = false
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
local globalTypeDeclarationDef: JsonSchema = new JsonSchema {
|
|
557
|
+
type = "object"
|
|
558
|
+
description = "Global type declaration"
|
|
559
|
+
properties {
|
|
560
|
+
["type"] = new JsonSchema {
|
|
561
|
+
type = "string"
|
|
562
|
+
description = "TypeScript type string"
|
|
563
|
+
}
|
|
564
|
+
["defaultValue"] = new JsonSchema {
|
|
565
|
+
type = "string"
|
|
566
|
+
description = "Default value"
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
required = new Listing { "type" }
|
|
570
|
+
additionalProperties = false
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
local globalTypesConfigDef: JsonSchema = new JsonSchema {
|
|
574
|
+
type = "object"
|
|
575
|
+
description = "Global type declarations"
|
|
576
|
+
additionalProperties = new JsonSchema {
|
|
577
|
+
oneOf = new Listing {
|
|
578
|
+
new JsonSchema { type = "string" }
|
|
579
|
+
new JsonSchema { `$ref` = "#/definitions/GlobalTypeDeclaration" }
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
output {
|
|
585
|
+
value = new JsonSchema {
|
|
586
|
+
`$schema` = "http://json-schema.org/draft-07/schema#"
|
|
587
|
+
title = "VizeConfig"
|
|
588
|
+
description = "Configuration file for vize - High-performance Vue.js toolchain"
|
|
589
|
+
type = "object"
|
|
590
|
+
definitions {
|
|
591
|
+
["CompilerConfig"] = compilerConfigDef
|
|
592
|
+
["VitePluginConfig"] = vitePluginConfigDef
|
|
593
|
+
["LinterConfig"] = linterConfigDef
|
|
594
|
+
["TypeCheckerConfig"] = typeCheckerConfigDef
|
|
595
|
+
["FormatterConfig"] = formatterConfigDef
|
|
596
|
+
["LanguageServerConfig"] = languageServerConfigDef
|
|
597
|
+
["MuseaViewport"] = viewportDef
|
|
598
|
+
["MuseaVrtConfig"] = museaVrtConfigDef
|
|
599
|
+
["MuseaA11yConfig"] = museaA11yConfigDef
|
|
600
|
+
["MuseaAutogenConfig"] = museaAutogenConfigDef
|
|
601
|
+
["MuseaConfig"] = museaConfigDef
|
|
602
|
+
["GlobalTypeDeclaration"] = globalTypeDeclarationDef
|
|
603
|
+
["GlobalTypesConfig"] = globalTypesConfigDef
|
|
604
|
+
}
|
|
605
|
+
properties {
|
|
606
|
+
["$schema"] = new JsonSchema {
|
|
607
|
+
type = "string"
|
|
608
|
+
description = "JSON Schema reference for editor autocompletion"
|
|
609
|
+
}
|
|
610
|
+
["compiler"] = new JsonSchema { `$ref` = "#/definitions/CompilerConfig" }
|
|
611
|
+
["vite"] = new JsonSchema { `$ref` = "#/definitions/VitePluginConfig" }
|
|
612
|
+
["linter"] = new JsonSchema { `$ref` = "#/definitions/LinterConfig" }
|
|
613
|
+
["typeChecker"] = new JsonSchema { `$ref` = "#/definitions/TypeCheckerConfig" }
|
|
614
|
+
["formatter"] = new JsonSchema { `$ref` = "#/definitions/FormatterConfig" }
|
|
615
|
+
["languageServer"] = new JsonSchema { `$ref` = "#/definitions/LanguageServerConfig" }
|
|
616
|
+
["lsp"] = new JsonSchema { `$ref` = "#/definitions/LanguageServerConfig" }
|
|
617
|
+
["musea"] = new JsonSchema { `$ref` = "#/definitions/MuseaConfig" }
|
|
618
|
+
["globalTypes"] = new JsonSchema { `$ref` = "#/definitions/GlobalTypesConfig" }
|
|
619
|
+
}
|
|
620
|
+
additionalProperties = false
|
|
621
|
+
}
|
|
622
|
+
}
|