@effect/language-service 0.79.0 → 0.80.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/README.md +3 -2
- package/cli.js +179 -5
- package/cli.js.map +1 -1
- package/effect-lsp-patch-utils.js +139 -0
- package/effect-lsp-patch-utils.js.map +1 -1
- package/index.js +139 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/transform.js +139 -0
- package/transform.js.map +1 -1
package/index.js
CHANGED
|
@@ -2205,6 +2205,145 @@ var defaults = {
|
|
|
2205
2205
|
mermaidProvider: "mermaid.live",
|
|
2206
2206
|
skipDisabledOptimization: false
|
|
2207
2207
|
};
|
|
2208
|
+
var booleanSchema = (description, defaultValue) => ({
|
|
2209
|
+
type: "boolean",
|
|
2210
|
+
description,
|
|
2211
|
+
default: defaultValue
|
|
2212
|
+
});
|
|
2213
|
+
var stringArraySchema = (description, defaultValue) => ({
|
|
2214
|
+
type: "array",
|
|
2215
|
+
description,
|
|
2216
|
+
default: defaultValue,
|
|
2217
|
+
items: { type: "string" }
|
|
2218
|
+
});
|
|
2219
|
+
var stringEnumSchema = (description, values2, defaultValue) => ({
|
|
2220
|
+
type: "string",
|
|
2221
|
+
description,
|
|
2222
|
+
enum: values2,
|
|
2223
|
+
default: defaultValue
|
|
2224
|
+
});
|
|
2225
|
+
var languageServicePluginAdditionalPropertiesJsonSchema = {
|
|
2226
|
+
refactors: booleanSchema("Controls Effect refactors.", defaults.refactors),
|
|
2227
|
+
diagnostics: booleanSchema("Controls Effect diagnostics.", defaults.diagnostics),
|
|
2228
|
+
diagnosticsName: booleanSchema(
|
|
2229
|
+
"Controls whether to include the rule name in diagnostic messages.",
|
|
2230
|
+
defaults.diagnosticsName
|
|
2231
|
+
),
|
|
2232
|
+
missingDiagnosticNextLine: stringEnumSchema(
|
|
2233
|
+
"Controls the severity of warnings for unused @effect-diagnostics-next-line comments.",
|
|
2234
|
+
["off", "error", "warning", "message", "suggestion"],
|
|
2235
|
+
defaults.missingDiagnosticNextLine
|
|
2236
|
+
),
|
|
2237
|
+
includeSuggestionsInTsc: booleanSchema(
|
|
2238
|
+
"When patch mode is enabled, reports suggestion diagnostics as messages in TSC with a [suggestion] prefix.",
|
|
2239
|
+
defaults.includeSuggestionsInTsc
|
|
2240
|
+
),
|
|
2241
|
+
ignoreEffectWarningsInTscExitCode: booleanSchema(
|
|
2242
|
+
"When enabled, Effect warnings do not affect the patched tsc exit code.",
|
|
2243
|
+
defaults.ignoreEffectWarningsInTscExitCode
|
|
2244
|
+
),
|
|
2245
|
+
ignoreEffectErrorsInTscExitCode: booleanSchema(
|
|
2246
|
+
"When enabled, Effect errors do not affect the patched tsc exit code.",
|
|
2247
|
+
defaults.ignoreEffectErrorsInTscExitCode
|
|
2248
|
+
),
|
|
2249
|
+
ignoreEffectSuggestionsInTscExitCode: booleanSchema(
|
|
2250
|
+
"When enabled, Effect suggestions do not affect the patched tsc exit code.",
|
|
2251
|
+
defaults.ignoreEffectSuggestionsInTscExitCode
|
|
2252
|
+
),
|
|
2253
|
+
quickinfoEffectParameters: stringEnumSchema(
|
|
2254
|
+
"Controls when Effect quickinfo should include full type parameters.",
|
|
2255
|
+
["always", "never", "whentruncated"],
|
|
2256
|
+
defaults.quickinfoEffectParameters
|
|
2257
|
+
),
|
|
2258
|
+
quickinfo: booleanSchema("Controls Effect quickinfo.", defaults.quickinfo),
|
|
2259
|
+
quickinfoMaximumLength: {
|
|
2260
|
+
type: "number",
|
|
2261
|
+
description: "Controls the maximum quickinfo length. Use -1 to disable truncation.",
|
|
2262
|
+
default: defaults.quickinfoMaximumLength
|
|
2263
|
+
},
|
|
2264
|
+
keyPatterns: {
|
|
2265
|
+
type: "array",
|
|
2266
|
+
description: "Configures key patterns used for generated Effect service and error keys.",
|
|
2267
|
+
default: defaults.keyPatterns,
|
|
2268
|
+
items: {
|
|
2269
|
+
type: "object",
|
|
2270
|
+
properties: {
|
|
2271
|
+
target: stringEnumSchema("The key builder target.", ["service", "error", "custom"], "service"),
|
|
2272
|
+
pattern: stringEnumSchema(
|
|
2273
|
+
"The key generation pattern.",
|
|
2274
|
+
["package-identifier", "default", "default-hashed"],
|
|
2275
|
+
"default"
|
|
2276
|
+
),
|
|
2277
|
+
skipLeadingPath: stringArraySchema("Path prefixes to strip before generating keys.", ["src/"])
|
|
2278
|
+
}
|
|
2279
|
+
}
|
|
2280
|
+
},
|
|
2281
|
+
extendedKeyDetection: booleanSchema(
|
|
2282
|
+
"Enables extended heuristics when detecting key sources.",
|
|
2283
|
+
defaults.extendedKeyDetection
|
|
2284
|
+
),
|
|
2285
|
+
completions: booleanSchema("Controls Effect completions.", defaults.completions),
|
|
2286
|
+
goto: booleanSchema("Controls Effect goto references support.", defaults.goto),
|
|
2287
|
+
inlays: booleanSchema("Controls Effect inlay hints.", defaults.inlays),
|
|
2288
|
+
allowedDuplicatedPackages: stringArraySchema(
|
|
2289
|
+
"Package names that are allowed to duplicate Effect as a peer dependency.",
|
|
2290
|
+
defaults.allowedDuplicatedPackages
|
|
2291
|
+
),
|
|
2292
|
+
namespaceImportPackages: stringArraySchema(
|
|
2293
|
+
"Package names that should prefer namespace imports.",
|
|
2294
|
+
defaults.namespaceImportPackages
|
|
2295
|
+
),
|
|
2296
|
+
topLevelNamedReexports: stringEnumSchema(
|
|
2297
|
+
"For namespaceImportPackages, controls how top-level named re-exports are handled.",
|
|
2298
|
+
["ignore", "follow"],
|
|
2299
|
+
defaults.topLevelNamedReexports
|
|
2300
|
+
),
|
|
2301
|
+
barrelImportPackages: stringArraySchema(
|
|
2302
|
+
"Package names that should prefer imports from their top-level barrel file.",
|
|
2303
|
+
defaults.barrelImportPackages
|
|
2304
|
+
),
|
|
2305
|
+
importAliases: {
|
|
2306
|
+
type: "object",
|
|
2307
|
+
description: "Custom aliases to use for imported identifiers.",
|
|
2308
|
+
default: defaults.importAliases,
|
|
2309
|
+
additionalProperties: {
|
|
2310
|
+
type: "string"
|
|
2311
|
+
}
|
|
2312
|
+
},
|
|
2313
|
+
renames: booleanSchema("Controls Effect rename helpers.", defaults.renames),
|
|
2314
|
+
noExternal: booleanSchema(
|
|
2315
|
+
"Disables features that link to external websites.",
|
|
2316
|
+
defaults.noExternal
|
|
2317
|
+
),
|
|
2318
|
+
pipeableMinArgCount: {
|
|
2319
|
+
type: "number",
|
|
2320
|
+
description: "Minimum argument count required before pipeable suggestions are emitted.",
|
|
2321
|
+
default: defaults.pipeableMinArgCount
|
|
2322
|
+
},
|
|
2323
|
+
effectFn: {
|
|
2324
|
+
type: "array",
|
|
2325
|
+
description: "Configures which Effect.fn variants should be suggested.",
|
|
2326
|
+
default: defaults.effectFn,
|
|
2327
|
+
items: {
|
|
2328
|
+
type: "string",
|
|
2329
|
+
enum: ["untraced", "span", "suggested-span", "inferred-span", "no-span"]
|
|
2330
|
+
}
|
|
2331
|
+
},
|
|
2332
|
+
layerGraphFollowDepth: {
|
|
2333
|
+
type: "number",
|
|
2334
|
+
description: "Controls how deeply layer graph analysis follows dependencies.",
|
|
2335
|
+
default: defaults.layerGraphFollowDepth
|
|
2336
|
+
},
|
|
2337
|
+
mermaidProvider: {
|
|
2338
|
+
type: "string",
|
|
2339
|
+
description: "Controls which Mermaid renderer is used for layer graphs.",
|
|
2340
|
+
default: defaults.mermaidProvider
|
|
2341
|
+
},
|
|
2342
|
+
skipDisabledOptimization: booleanSchema(
|
|
2343
|
+
"When enabled, disabled diagnostics are still processed so comment-based overrides can be honored.",
|
|
2344
|
+
defaults.skipDisabledOptimization
|
|
2345
|
+
)
|
|
2346
|
+
};
|
|
2208
2347
|
function parseKeyPatterns(patterns) {
|
|
2209
2348
|
const result = [];
|
|
2210
2349
|
for (const entry of patterns) {
|