@cspell/cspell-types 9.6.1 → 9.6.3
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/cspell.schema.json +111 -0
- package/dist/index.d.mts +114 -2
- package/dist/index.d.ts +114 -2
- package/dist/index.js +6 -4
- package/dist/index.mjs +6 -4
- package/package.json +3 -4
package/cspell.schema.json
CHANGED
|
@@ -3,6 +3,68 @@
|
|
|
3
3
|
"additionalProperties": false,
|
|
4
4
|
"allowTrailingCommas": true,
|
|
5
5
|
"definitions": {
|
|
6
|
+
"CSpellVFS": {
|
|
7
|
+
"additionalProperties": {
|
|
8
|
+
"$ref": "#/definitions/CSpellVFSFileEntry"
|
|
9
|
+
},
|
|
10
|
+
"description": "A declaration of files to add to the CSpell Virtual File System.",
|
|
11
|
+
"markdownDescription": "A declaration of files to add to the CSpell Virtual File System.",
|
|
12
|
+
"propertyNames": {
|
|
13
|
+
"description": "A URL string representing a CSpellVFS file. It should be of the form:\n\n```txt cspell-vfs:///<module>/<path-to-file>/<file-name> ```\n\nExample: `cspell-vfs:///@cspell/dict-en_us/en_US.trie.gz`",
|
|
14
|
+
"markdownDescription": "A URL string representing a CSpellVFS file.\nIt should be of the form:\n\n```txt\ncspell-vfs:///<module>/<path-to-file>/<file-name>\n```\n\nExample: `cspell-vfs:///@cspell/dict-en_us/en_US.trie.gz`",
|
|
15
|
+
"since": "9.7.0"
|
|
16
|
+
},
|
|
17
|
+
"since": "9.7.0",
|
|
18
|
+
"type": "object"
|
|
19
|
+
},
|
|
20
|
+
"CSpellVFSData": {
|
|
21
|
+
"$ref": "#/definitions/CSpellVFSTextData",
|
|
22
|
+
"description": "The data content of a CSpellVFS file.",
|
|
23
|
+
"markdownDescription": "The data content of a CSpellVFS file."
|
|
24
|
+
},
|
|
25
|
+
"CSpellVFSFileEntry": {
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"description": "An entry in the CSpell Virtual File System. It may or may not have a URL.",
|
|
28
|
+
"markdownDescription": "An entry in the CSpell Virtual File System.\nIt may or may not have a URL.",
|
|
29
|
+
"properties": {
|
|
30
|
+
"data": {
|
|
31
|
+
"$ref": "#/definitions/CSpellVFSData",
|
|
32
|
+
"description": "The content data of the file.",
|
|
33
|
+
"markdownDescription": "The content data of the file."
|
|
34
|
+
},
|
|
35
|
+
"encoding": {
|
|
36
|
+
"description": "The encoding of the data. In most cases the encoding is determined from the data type and filename url.",
|
|
37
|
+
"enum": [
|
|
38
|
+
"base64",
|
|
39
|
+
"plaintext",
|
|
40
|
+
"utf8"
|
|
41
|
+
],
|
|
42
|
+
"markdownDescription": "The encoding of the data. In most cases the encoding is determined from the data type and filename url.",
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"url": {
|
|
46
|
+
"$ref": "#/definitions/CSpellVFSFileUrl",
|
|
47
|
+
"description": "The optional file vfs url. It is already part of the CSpellVFS key.",
|
|
48
|
+
"markdownDescription": "The optional file vfs url. It is already part of the CSpellVFS key."
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"required": [
|
|
52
|
+
"data"
|
|
53
|
+
],
|
|
54
|
+
"since": "9.7.0",
|
|
55
|
+
"type": "object"
|
|
56
|
+
},
|
|
57
|
+
"CSpellVFSFileUrl": {
|
|
58
|
+
"description": "A URL string representing a CSpellVFS file. It should be of the form:\n\n```txt cspell-vfs:///<module>/<path-to-file>/<file-name> ```\n\nExample: `cspell-vfs:///@cspell/dict-en_us/en_US.trie.gz`",
|
|
59
|
+
"markdownDescription": "A URL string representing a CSpellVFS file.\nIt should be of the form:\n\n```txt\ncspell-vfs:///<module>/<path-to-file>/<file-name>\n```\n\nExample: `cspell-vfs:///@cspell/dict-en_us/en_US.trie.gz`",
|
|
60
|
+
"since": "9.7.0",
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"CSpellVFSTextData": {
|
|
64
|
+
"description": "Data content stored in a string for CSpellVFS file. It is often encoded (e.g. base64) binary data.",
|
|
65
|
+
"markdownDescription": "Data content stored in a string for CSpellVFS file.\nIt is often encoded (e.g. base64) binary data.",
|
|
66
|
+
"type": "string"
|
|
67
|
+
},
|
|
6
68
|
"CacheFormat": {
|
|
7
69
|
"enum": [
|
|
8
70
|
"legacy",
|
|
@@ -79,6 +141,38 @@
|
|
|
79
141
|
],
|
|
80
142
|
"type": "object"
|
|
81
143
|
},
|
|
144
|
+
"CompatibleEngineVersions": {
|
|
145
|
+
"additionalProperties": {
|
|
146
|
+
"anyOf": [
|
|
147
|
+
{
|
|
148
|
+
"$ref": "#/definitions/SemVersionPredicate"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"not": {}
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"description": "Other engine version predicates.",
|
|
155
|
+
"markdownDescription": "Other engine version predicates."
|
|
156
|
+
},
|
|
157
|
+
"description": "Engine version predicates.\n\nThis allows dictionaries and other components to specify the versions of engines (like cspell) they are compatible with.",
|
|
158
|
+
"markdownDescription": "Engine version predicates.\n\nThis allows dictionaries and other components to specify the versions of engines (like cspell) they are compatible with.",
|
|
159
|
+
"properties": {
|
|
160
|
+
"code-spell-checker": {
|
|
161
|
+
"$ref": "#/definitions/SemVersionPredicate",
|
|
162
|
+
"description": "The VSCode Spell Checker version predicate.",
|
|
163
|
+
"markdownDescription": "The VSCode Spell Checker version predicate.",
|
|
164
|
+
"since": "9.6.3"
|
|
165
|
+
},
|
|
166
|
+
"cspell": {
|
|
167
|
+
"$ref": "#/definitions/SemVersionPredicate",
|
|
168
|
+
"description": "CSpell version predicate.",
|
|
169
|
+
"markdownDescription": "CSpell version predicate.",
|
|
170
|
+
"since": "9.6.3"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"since": "9.6.3",
|
|
174
|
+
"type": "object"
|
|
175
|
+
},
|
|
82
176
|
"CostMapDefInsDel": {
|
|
83
177
|
"additionalProperties": false,
|
|
84
178
|
"properties": {
|
|
@@ -1722,6 +1816,11 @@
|
|
|
1722
1816
|
"description": "Declare a reporter to use.\n\n`default` - is a special name for the default cli reporter.\n\nExamples:\n- `\"default\"` - to use the default reporter\n- `\"@cspell/cspell-json-reporter\"` - use the cspell JSON reporter.\n- `[\"@cspell/cspell-json-reporter\", { \"outFile\": \"out.json\" }]`",
|
|
1723
1817
|
"markdownDescription": "Declare a reporter to use.\n\n`default` - is a special name for the default cli reporter.\n\nExamples:\n- `\"default\"` - to use the default reporter\n- `\"@cspell/cspell-json-reporter\"` - use the cspell JSON reporter.\n- `[\"@cspell/cspell-json-reporter\", { \"outFile\": \"out.json\" }]`"
|
|
1724
1818
|
},
|
|
1819
|
+
"SemVersionPredicate": {
|
|
1820
|
+
"description": "Semantic Version Predicate\n\nExamples:\n- `>=8`",
|
|
1821
|
+
"markdownDescription": "Semantic Version Predicate\n\nExamples:\n- `>=8`",
|
|
1822
|
+
"type": "string"
|
|
1823
|
+
},
|
|
1725
1824
|
"Serializable": {
|
|
1726
1825
|
"anyOf": [
|
|
1727
1826
|
{
|
|
@@ -1891,6 +1990,12 @@
|
|
|
1891
1990
|
"type": "array",
|
|
1892
1991
|
"uniqueItems": true
|
|
1893
1992
|
},
|
|
1993
|
+
"engines": {
|
|
1994
|
+
"$ref": "#/definitions/CompatibleEngineVersions",
|
|
1995
|
+
"description": "Specify compatible engine versions.\n\nThis allows dictionaries and other components to specify the versions of engines (like cspell) they are compatible with.\n\nIt does not enforce compatibility, it is up to the client to use this information as needed.",
|
|
1996
|
+
"markdownDescription": "Specify compatible engine versions.\n\nThis allows dictionaries and other components to specify the versions of engines (like cspell) they are compatible with.\n\nIt does not enforce compatibility, it is up to the client to use this information as needed.",
|
|
1997
|
+
"since": "9.6.3"
|
|
1998
|
+
},
|
|
1894
1999
|
"failFast": {
|
|
1895
2000
|
"default": false,
|
|
1896
2001
|
"description": "Exit with non-zero code as soon as an issue/error is encountered (useful for CI or git hooks)",
|
|
@@ -2189,6 +2294,12 @@
|
|
|
2189
2294
|
"description": "Configuration format version of the settings file.\n\nThis controls how the settings in the configuration file behave.",
|
|
2190
2295
|
"markdownDescription": "Configuration format version of the settings file.\n\nThis controls how the settings in the configuration file behave."
|
|
2191
2296
|
},
|
|
2297
|
+
"vfs": {
|
|
2298
|
+
"$ref": "#/definitions/CSpellVFS",
|
|
2299
|
+
"description": "Files to add to the CSpell Virtual File System.\n\nThey can be referenced using `cspell-vfs:///<module>/<path-to-file>/<file-name>` URLs.\n\nThey can be referenced in the `path` field of dictionary definitions.",
|
|
2300
|
+
"markdownDescription": "Files to add to the CSpell Virtual File System.\n\nThey can be referenced using `cspell-vfs:///<module>/<path-to-file>/<file-name>` URLs.\n\nThey can be referenced in the `path` field of dictionary definitions.",
|
|
2301
|
+
"since": "9.7.0"
|
|
2302
|
+
},
|
|
2192
2303
|
"words": {
|
|
2193
2304
|
"description": "List of words to be considered correct.",
|
|
2194
2305
|
"items": {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,66 @@
|
|
|
1
1
|
import { ParseResult, ParsedText, Parser, ParserName, ParserOptions } from "./Parser/index.mjs";
|
|
2
2
|
|
|
3
|
+
//#region src/cspell-vfs.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Binary data for CSpellVFS file.
|
|
6
|
+
* This can be exported by a JavaScript based CSpell Configuration file.
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
type CSpellVFSBinaryData = Uint8Array;
|
|
10
|
+
/**
|
|
11
|
+
* Data content stored in a string for CSpellVFS file.
|
|
12
|
+
* It is often encoded (e.g. base64) binary data.
|
|
13
|
+
*/
|
|
14
|
+
type CSpellVFSTextData = string;
|
|
15
|
+
/**
|
|
16
|
+
* The data content of a CSpellVFS file.
|
|
17
|
+
*/
|
|
18
|
+
type CSpellVFSData = CSpellVFSBinaryData | CSpellVFSTextData;
|
|
19
|
+
/**
|
|
20
|
+
* An entry in the CSpell Virtual File System.
|
|
21
|
+
* It may or may not have a URL.
|
|
22
|
+
* @since 9.7.0
|
|
23
|
+
*/
|
|
24
|
+
interface CSpellVFSFileEntry {
|
|
25
|
+
/**
|
|
26
|
+
* The optional file vfs url. It is already part of the CSpellVFS key.
|
|
27
|
+
*/
|
|
28
|
+
url?: CSpellVFSFileUrl;
|
|
29
|
+
/**
|
|
30
|
+
* The content data of the file.
|
|
31
|
+
*/
|
|
32
|
+
data: CSpellVFSData;
|
|
33
|
+
/**
|
|
34
|
+
* The encoding of the data. In most cases the encoding is determined from the data type and filename url.
|
|
35
|
+
*/
|
|
36
|
+
encoding?: "base64" | "plaintext" | "utf8";
|
|
37
|
+
}
|
|
38
|
+
interface CSpellVFSFile extends CSpellVFSFileEntry {
|
|
39
|
+
/**
|
|
40
|
+
* The file URL.
|
|
41
|
+
*/
|
|
42
|
+
url: CSpellVFSFileUrl;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A URL string representing a CSpellVFS file.
|
|
46
|
+
* It should be of the form:
|
|
47
|
+
*
|
|
48
|
+
* ```txt
|
|
49
|
+
* cspell-vfs:///<module>/<path-to-file>/<file-name>
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* Example: `cspell-vfs:///@cspell/dict-en_us/en_US.trie.gz`
|
|
53
|
+
*
|
|
54
|
+
* @since 9.7.0
|
|
55
|
+
*/
|
|
56
|
+
type CSpellVFSFileUrl = string;
|
|
57
|
+
/**
|
|
58
|
+
* A declaration of files to add to the CSpell Virtual File System.
|
|
59
|
+
* @since 9.7.0
|
|
60
|
+
* @stability experimental
|
|
61
|
+
*/
|
|
62
|
+
type CSpellVFS = Record<CSpellVFSFileUrl, CSpellVFSFileEntry>;
|
|
63
|
+
//#endregion
|
|
3
64
|
//#region src/SuggestionsConfiguration.d.ts
|
|
4
65
|
interface SuggestionsConfiguration {
|
|
5
66
|
/**
|
|
@@ -108,7 +169,7 @@ interface Issue extends Omit<TextDocumentOffset, "doc"> {
|
|
|
108
169
|
}
|
|
109
170
|
declare enum IssueType {
|
|
110
171
|
spelling = 0,
|
|
111
|
-
directive = 1
|
|
172
|
+
directive = 1
|
|
112
173
|
}
|
|
113
174
|
type MessageType = "Debug" | "Info" | "Warning";
|
|
114
175
|
type MessageTypeLookup = { [key in MessageType]: key };
|
|
@@ -1182,11 +1243,32 @@ interface FileSettings extends ExtendableSettings, CommandLineSettings {
|
|
|
1182
1243
|
*/
|
|
1183
1244
|
validateDirectives?: boolean;
|
|
1184
1245
|
/**
|
|
1246
|
+
* Files to add to the CSpell Virtual File System.
|
|
1247
|
+
*
|
|
1248
|
+
* They can be referenced using `cspell-vfs:///<module>/<path-to-file>/<file-name>` URLs.
|
|
1249
|
+
*
|
|
1250
|
+
* They can be referenced in the `path` field of dictionary definitions.
|
|
1251
|
+
*
|
|
1252
|
+
* @since 9.7.0
|
|
1253
|
+
* @stability experimental
|
|
1254
|
+
*/
|
|
1255
|
+
vfs?: CSpellVFS | undefined;
|
|
1256
|
+
/**
|
|
1185
1257
|
* Configure CSpell features.
|
|
1186
1258
|
*
|
|
1187
1259
|
* @since 5.16.0
|
|
1188
1260
|
*/
|
|
1189
1261
|
features?: Features;
|
|
1262
|
+
/**
|
|
1263
|
+
* Specify compatible engine versions.
|
|
1264
|
+
*
|
|
1265
|
+
* This allows dictionaries and other components to specify the versions of engines (like cspell) they are compatible with.
|
|
1266
|
+
*
|
|
1267
|
+
* It does not enforce compatibility, it is up to the client to use this information as needed.
|
|
1268
|
+
*
|
|
1269
|
+
* @since 9.6.3
|
|
1270
|
+
*/
|
|
1271
|
+
engines?: CompatibleEngineVersions;
|
|
1190
1272
|
}
|
|
1191
1273
|
/**
|
|
1192
1274
|
* In the below JSDoc comment, we helpfully specify an example configuration for the end-user to
|
|
@@ -1804,6 +1886,36 @@ interface ExperimentalBaseSettings {
|
|
|
1804
1886
|
interface Plugin {
|
|
1805
1887
|
parsers?: Parser[];
|
|
1806
1888
|
}
|
|
1889
|
+
/**
|
|
1890
|
+
* Semantic Version Predicate
|
|
1891
|
+
*
|
|
1892
|
+
* Examples:
|
|
1893
|
+
* - `>=8`
|
|
1894
|
+
*/
|
|
1895
|
+
type SemVersionPredicate = string;
|
|
1896
|
+
/**
|
|
1897
|
+
* Engine version predicates.
|
|
1898
|
+
*
|
|
1899
|
+
* This allows dictionaries and other components to specify the versions of engines (like cspell) they are compatible with.
|
|
1900
|
+
*
|
|
1901
|
+
* @since 9.6.3
|
|
1902
|
+
*/
|
|
1903
|
+
interface CompatibleEngineVersions {
|
|
1904
|
+
/**
|
|
1905
|
+
* CSpell version predicate.
|
|
1906
|
+
* @since 9.6.3
|
|
1907
|
+
*/
|
|
1908
|
+
cspell?: SemVersionPredicate | undefined;
|
|
1909
|
+
/**
|
|
1910
|
+
* The VSCode Spell Checker version predicate.
|
|
1911
|
+
* @since 9.6.3
|
|
1912
|
+
*/
|
|
1913
|
+
"code-spell-checker"?: SemVersionPredicate | undefined;
|
|
1914
|
+
/**
|
|
1915
|
+
* Other engine version predicates.
|
|
1916
|
+
*/
|
|
1917
|
+
[engine: string]: SemVersionPredicate | undefined;
|
|
1918
|
+
}
|
|
1807
1919
|
//#endregion
|
|
1808
1920
|
//#region src/configFields.d.ts
|
|
1809
1921
|
type ConfigKeys = Exclude<keyof CSpellUserSettings, "$schema" | "version" | "id">;
|
|
@@ -1853,5 +1965,5 @@ interface TransformedText extends PartialOrUndefined<Mapped> {
|
|
|
1853
1965
|
}
|
|
1854
1966
|
type PartialOrUndefined<T> = { [P in keyof T]?: T[P] | undefined };
|
|
1855
1967
|
//#endregion
|
|
1856
|
-
export { type AdvancedCSpellSettings, type AdvancedCSpellSettingsWithSourceTrace, type BaseSetting, type CSpellPackageSettings, type CSpellReporter, type CSpellReporterEmitters, type CSpellReporterModule, type CSpellSettings, type CSpellSettingsWithSourceTrace, type CSpellUserSettings, type CSpellUserSettingsFields, type CSpellUserSettingsWithComments, type CacheFormat, type CacheSettings, type CacheStrategy, type CharacterSet, type CharacterSetCosts, type CommandLineSettings, ConfigFields, type CustomDictionaryPath, type CustomDictionaryScope, type DebugEmitter, type DictionaryDefinition, type DictionaryDefinitionAlternate, type DictionaryDefinitionAugmented, type DictionaryDefinitionBase, type DictionaryDefinitionCustom, type DictionaryDefinitionInline, type DictionaryDefinitionInlineFlagWords, type DictionaryDefinitionInlineIgnoreWords, type DictionaryDefinitionInlineWords, type DictionaryDefinitionLegacy, type DictionaryDefinitionPreferred, type DictionaryDefinitionSimple, type DictionaryFileTypes, type DictionaryId, type DictionaryInformation, type DictionaryNegRef, type DictionaryPath, type DictionaryRef, type DictionaryReference, type EditCosts, type ErrorEmitter, type ErrorLike, type ExperimentalBaseSettings, type ExperimentalFileSettings, type ExtendableSettings, type FSPathResolvable, type Feature, type Features, type FeaturesSupportedByReporter, type FileSettings, type FileSource, type FsPath, type Glob, type GlobDef, type ImportFileRef, type InMemorySource, type Issue, IssueType, type LanguageId, type LanguageIdMultiple, type LanguageIdMultipleNeg, type LanguageIdSingle, type LanguageSetting, type LanguageSettingFilterFields, type LanguageSettingFilterFieldsDeprecated, type LanguageSettingFilterFieldsPreferred, type LegacySettings, type LocalId, type LocaleId, type MappedText, type MatchingFileType, type MergeSource, type MessageEmitter, type MessageType, type MessageTypeLookup, MessageTypes, type OverrideFilterFields, type OverrideSettings, type ParseResult, type ParsedText, type Parser, type ParserName, type ParserOptions, type Pattern, type PatternId, type PatternRef, type Plugin, type PnPSettings, type PredefinedPatterns, type ProgressBase, type ProgressEmitter, type ProgressFileBase, type ProgressFileBegin, type ProgressFileComplete, type ProgressItem, type ProgressTypes, type RegExpPatternDefinition, type RegExpPatternList, type ReplaceEntry, type ReplaceMap, type ReportIssueOptions, type ReporterConfiguration, type ReporterSettings, type ReportingConfiguration, type ResultEmitter, type RunResult, type Settings, type SimpleGlob, type Source, type SpellingErrorEmitter, type SuggestionCostMapDef, type SuggestionCostsDefs, type SuggestionsConfiguration, type TextDocumentOffset, type TextOffset, type TrustLevel, type UnknownWordsChoices, type UnknownWordsConfiguration, type Version, type VersionLatest, type VersionLegacy, type WorkspaceTrustSettings, defaultCSpellSettings, defineConfig, unknownWordsChoices };
|
|
1968
|
+
export { type AdvancedCSpellSettings, type AdvancedCSpellSettingsWithSourceTrace, type BaseSetting, type CSpellPackageSettings, type CSpellReporter, type CSpellReporterEmitters, type CSpellReporterModule, type CSpellSettings, type CSpellSettingsWithSourceTrace, type CSpellUserSettings, type CSpellUserSettingsFields, type CSpellUserSettingsWithComments, type CSpellVFS, type CSpellVFSBinaryData, type CSpellVFSData, type CSpellVFSFile, type CSpellVFSFileEntry, type CSpellVFSFileUrl, type CSpellVFSTextData, type CacheFormat, type CacheSettings, type CacheStrategy, type CharacterSet, type CharacterSetCosts, type CommandLineSettings, ConfigFields, type CustomDictionaryPath, type CustomDictionaryScope, type DebugEmitter, type DictionaryDefinition, type DictionaryDefinitionAlternate, type DictionaryDefinitionAugmented, type DictionaryDefinitionBase, type DictionaryDefinitionCustom, type DictionaryDefinitionInline, type DictionaryDefinitionInlineFlagWords, type DictionaryDefinitionInlineIgnoreWords, type DictionaryDefinitionInlineWords, type DictionaryDefinitionLegacy, type DictionaryDefinitionPreferred, type DictionaryDefinitionSimple, type DictionaryFileTypes, type DictionaryId, type DictionaryInformation, type DictionaryNegRef, type DictionaryPath, type DictionaryRef, type DictionaryReference, type EditCosts, type ErrorEmitter, type ErrorLike, type ExperimentalBaseSettings, type ExperimentalFileSettings, type ExtendableSettings, type FSPathResolvable, type Feature, type Features, type FeaturesSupportedByReporter, type FileSettings, type FileSource, type FsPath, type Glob, type GlobDef, type ImportFileRef, type InMemorySource, type Issue, IssueType, type LanguageId, type LanguageIdMultiple, type LanguageIdMultipleNeg, type LanguageIdSingle, type LanguageSetting, type LanguageSettingFilterFields, type LanguageSettingFilterFieldsDeprecated, type LanguageSettingFilterFieldsPreferred, type LegacySettings, type LocalId, type LocaleId, type MappedText, type MatchingFileType, type MergeSource, type MessageEmitter, type MessageType, type MessageTypeLookup, MessageTypes, type OverrideFilterFields, type OverrideSettings, type ParseResult, type ParsedText, type Parser, type ParserName, type ParserOptions, type Pattern, type PatternId, type PatternRef, type Plugin, type PnPSettings, type PredefinedPatterns, type ProgressBase, type ProgressEmitter, type ProgressFileBase, type ProgressFileBegin, type ProgressFileComplete, type ProgressItem, type ProgressTypes, type RegExpPatternDefinition, type RegExpPatternList, type ReplaceEntry, type ReplaceMap, type ReportIssueOptions, type ReporterConfiguration, type ReporterSettings, type ReportingConfiguration, type ResultEmitter, type RunResult, type Settings, type SimpleGlob, type Source, type SpellingErrorEmitter, type SuggestionCostMapDef, type SuggestionCostsDefs, type SuggestionsConfiguration, type TextDocumentOffset, type TextOffset, type TrustLevel, type UnknownWordsChoices, type UnknownWordsConfiguration, type Version, type VersionLatest, type VersionLegacy, type WorkspaceTrustSettings, defaultCSpellSettings, defineConfig, unknownWordsChoices };
|
|
1857
1969
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,66 @@
|
|
|
1
1
|
import { ParseResult, ParsedText, Parser, ParserName, ParserOptions } from "./Parser/index.js";
|
|
2
2
|
|
|
3
|
+
//#region src/cspell-vfs.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Binary data for CSpellVFS file.
|
|
6
|
+
* This can be exported by a JavaScript based CSpell Configuration file.
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
type CSpellVFSBinaryData = Uint8Array;
|
|
10
|
+
/**
|
|
11
|
+
* Data content stored in a string for CSpellVFS file.
|
|
12
|
+
* It is often encoded (e.g. base64) binary data.
|
|
13
|
+
*/
|
|
14
|
+
type CSpellVFSTextData = string;
|
|
15
|
+
/**
|
|
16
|
+
* The data content of a CSpellVFS file.
|
|
17
|
+
*/
|
|
18
|
+
type CSpellVFSData = CSpellVFSBinaryData | CSpellVFSTextData;
|
|
19
|
+
/**
|
|
20
|
+
* An entry in the CSpell Virtual File System.
|
|
21
|
+
* It may or may not have a URL.
|
|
22
|
+
* @since 9.7.0
|
|
23
|
+
*/
|
|
24
|
+
interface CSpellVFSFileEntry {
|
|
25
|
+
/**
|
|
26
|
+
* The optional file vfs url. It is already part of the CSpellVFS key.
|
|
27
|
+
*/
|
|
28
|
+
url?: CSpellVFSFileUrl;
|
|
29
|
+
/**
|
|
30
|
+
* The content data of the file.
|
|
31
|
+
*/
|
|
32
|
+
data: CSpellVFSData;
|
|
33
|
+
/**
|
|
34
|
+
* The encoding of the data. In most cases the encoding is determined from the data type and filename url.
|
|
35
|
+
*/
|
|
36
|
+
encoding?: "base64" | "plaintext" | "utf8";
|
|
37
|
+
}
|
|
38
|
+
interface CSpellVFSFile extends CSpellVFSFileEntry {
|
|
39
|
+
/**
|
|
40
|
+
* The file URL.
|
|
41
|
+
*/
|
|
42
|
+
url: CSpellVFSFileUrl;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A URL string representing a CSpellVFS file.
|
|
46
|
+
* It should be of the form:
|
|
47
|
+
*
|
|
48
|
+
* ```txt
|
|
49
|
+
* cspell-vfs:///<module>/<path-to-file>/<file-name>
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* Example: `cspell-vfs:///@cspell/dict-en_us/en_US.trie.gz`
|
|
53
|
+
*
|
|
54
|
+
* @since 9.7.0
|
|
55
|
+
*/
|
|
56
|
+
type CSpellVFSFileUrl = string;
|
|
57
|
+
/**
|
|
58
|
+
* A declaration of files to add to the CSpell Virtual File System.
|
|
59
|
+
* @since 9.7.0
|
|
60
|
+
* @stability experimental
|
|
61
|
+
*/
|
|
62
|
+
type CSpellVFS = Record<CSpellVFSFileUrl, CSpellVFSFileEntry>;
|
|
63
|
+
//#endregion
|
|
3
64
|
//#region src/SuggestionsConfiguration.d.ts
|
|
4
65
|
interface SuggestionsConfiguration {
|
|
5
66
|
/**
|
|
@@ -108,7 +169,7 @@ interface Issue extends Omit<TextDocumentOffset, "doc"> {
|
|
|
108
169
|
}
|
|
109
170
|
declare enum IssueType {
|
|
110
171
|
spelling = 0,
|
|
111
|
-
directive = 1
|
|
172
|
+
directive = 1
|
|
112
173
|
}
|
|
113
174
|
type MessageType = "Debug" | "Info" | "Warning";
|
|
114
175
|
type MessageTypeLookup = { [key in MessageType]: key };
|
|
@@ -1182,11 +1243,32 @@ interface FileSettings extends ExtendableSettings, CommandLineSettings {
|
|
|
1182
1243
|
*/
|
|
1183
1244
|
validateDirectives?: boolean;
|
|
1184
1245
|
/**
|
|
1246
|
+
* Files to add to the CSpell Virtual File System.
|
|
1247
|
+
*
|
|
1248
|
+
* They can be referenced using `cspell-vfs:///<module>/<path-to-file>/<file-name>` URLs.
|
|
1249
|
+
*
|
|
1250
|
+
* They can be referenced in the `path` field of dictionary definitions.
|
|
1251
|
+
*
|
|
1252
|
+
* @since 9.7.0
|
|
1253
|
+
* @stability experimental
|
|
1254
|
+
*/
|
|
1255
|
+
vfs?: CSpellVFS | undefined;
|
|
1256
|
+
/**
|
|
1185
1257
|
* Configure CSpell features.
|
|
1186
1258
|
*
|
|
1187
1259
|
* @since 5.16.0
|
|
1188
1260
|
*/
|
|
1189
1261
|
features?: Features;
|
|
1262
|
+
/**
|
|
1263
|
+
* Specify compatible engine versions.
|
|
1264
|
+
*
|
|
1265
|
+
* This allows dictionaries and other components to specify the versions of engines (like cspell) they are compatible with.
|
|
1266
|
+
*
|
|
1267
|
+
* It does not enforce compatibility, it is up to the client to use this information as needed.
|
|
1268
|
+
*
|
|
1269
|
+
* @since 9.6.3
|
|
1270
|
+
*/
|
|
1271
|
+
engines?: CompatibleEngineVersions;
|
|
1190
1272
|
}
|
|
1191
1273
|
/**
|
|
1192
1274
|
* In the below JSDoc comment, we helpfully specify an example configuration for the end-user to
|
|
@@ -1804,6 +1886,36 @@ interface ExperimentalBaseSettings {
|
|
|
1804
1886
|
interface Plugin {
|
|
1805
1887
|
parsers?: Parser[];
|
|
1806
1888
|
}
|
|
1889
|
+
/**
|
|
1890
|
+
* Semantic Version Predicate
|
|
1891
|
+
*
|
|
1892
|
+
* Examples:
|
|
1893
|
+
* - `>=8`
|
|
1894
|
+
*/
|
|
1895
|
+
type SemVersionPredicate = string;
|
|
1896
|
+
/**
|
|
1897
|
+
* Engine version predicates.
|
|
1898
|
+
*
|
|
1899
|
+
* This allows dictionaries and other components to specify the versions of engines (like cspell) they are compatible with.
|
|
1900
|
+
*
|
|
1901
|
+
* @since 9.6.3
|
|
1902
|
+
*/
|
|
1903
|
+
interface CompatibleEngineVersions {
|
|
1904
|
+
/**
|
|
1905
|
+
* CSpell version predicate.
|
|
1906
|
+
* @since 9.6.3
|
|
1907
|
+
*/
|
|
1908
|
+
cspell?: SemVersionPredicate | undefined;
|
|
1909
|
+
/**
|
|
1910
|
+
* The VSCode Spell Checker version predicate.
|
|
1911
|
+
* @since 9.6.3
|
|
1912
|
+
*/
|
|
1913
|
+
"code-spell-checker"?: SemVersionPredicate | undefined;
|
|
1914
|
+
/**
|
|
1915
|
+
* Other engine version predicates.
|
|
1916
|
+
*/
|
|
1917
|
+
[engine: string]: SemVersionPredicate | undefined;
|
|
1918
|
+
}
|
|
1807
1919
|
//#endregion
|
|
1808
1920
|
//#region src/configFields.d.ts
|
|
1809
1921
|
type ConfigKeys = Exclude<keyof CSpellUserSettings, "$schema" | "version" | "id">;
|
|
@@ -1853,5 +1965,5 @@ interface TransformedText extends PartialOrUndefined<Mapped> {
|
|
|
1853
1965
|
}
|
|
1854
1966
|
type PartialOrUndefined<T> = { [P in keyof T]?: T[P] | undefined };
|
|
1855
1967
|
//#endregion
|
|
1856
|
-
export { type AdvancedCSpellSettings, type AdvancedCSpellSettingsWithSourceTrace, type BaseSetting, type CSpellPackageSettings, type CSpellReporter, type CSpellReporterEmitters, type CSpellReporterModule, type CSpellSettings, type CSpellSettingsWithSourceTrace, type CSpellUserSettings, type CSpellUserSettingsFields, type CSpellUserSettingsWithComments, type CacheFormat, type CacheSettings, type CacheStrategy, type CharacterSet, type CharacterSetCosts, type CommandLineSettings, ConfigFields, type CustomDictionaryPath, type CustomDictionaryScope, type DebugEmitter, type DictionaryDefinition, type DictionaryDefinitionAlternate, type DictionaryDefinitionAugmented, type DictionaryDefinitionBase, type DictionaryDefinitionCustom, type DictionaryDefinitionInline, type DictionaryDefinitionInlineFlagWords, type DictionaryDefinitionInlineIgnoreWords, type DictionaryDefinitionInlineWords, type DictionaryDefinitionLegacy, type DictionaryDefinitionPreferred, type DictionaryDefinitionSimple, type DictionaryFileTypes, type DictionaryId, type DictionaryInformation, type DictionaryNegRef, type DictionaryPath, type DictionaryRef, type DictionaryReference, type EditCosts, type ErrorEmitter, type ErrorLike, type ExperimentalBaseSettings, type ExperimentalFileSettings, type ExtendableSettings, type FSPathResolvable, type Feature, type Features, type FeaturesSupportedByReporter, type FileSettings, type FileSource, type FsPath, type Glob, type GlobDef, type ImportFileRef, type InMemorySource, type Issue, IssueType, type LanguageId, type LanguageIdMultiple, type LanguageIdMultipleNeg, type LanguageIdSingle, type LanguageSetting, type LanguageSettingFilterFields, type LanguageSettingFilterFieldsDeprecated, type LanguageSettingFilterFieldsPreferred, type LegacySettings, type LocalId, type LocaleId, type MappedText, type MatchingFileType, type MergeSource, type MessageEmitter, type MessageType, type MessageTypeLookup, MessageTypes, type OverrideFilterFields, type OverrideSettings, type ParseResult, type ParsedText, type Parser, type ParserName, type ParserOptions, type Pattern, type PatternId, type PatternRef, type Plugin, type PnPSettings, type PredefinedPatterns, type ProgressBase, type ProgressEmitter, type ProgressFileBase, type ProgressFileBegin, type ProgressFileComplete, type ProgressItem, type ProgressTypes, type RegExpPatternDefinition, type RegExpPatternList, type ReplaceEntry, type ReplaceMap, type ReportIssueOptions, type ReporterConfiguration, type ReporterSettings, type ReportingConfiguration, type ResultEmitter, type RunResult, type Settings, type SimpleGlob, type Source, type SpellingErrorEmitter, type SuggestionCostMapDef, type SuggestionCostsDefs, type SuggestionsConfiguration, type TextDocumentOffset, type TextOffset, type TrustLevel, type UnknownWordsChoices, type UnknownWordsConfiguration, type Version, type VersionLatest, type VersionLegacy, type WorkspaceTrustSettings, defaultCSpellSettings, defineConfig, unknownWordsChoices };
|
|
1968
|
+
export { type AdvancedCSpellSettings, type AdvancedCSpellSettingsWithSourceTrace, type BaseSetting, type CSpellPackageSettings, type CSpellReporter, type CSpellReporterEmitters, type CSpellReporterModule, type CSpellSettings, type CSpellSettingsWithSourceTrace, type CSpellUserSettings, type CSpellUserSettingsFields, type CSpellUserSettingsWithComments, type CSpellVFS, type CSpellVFSBinaryData, type CSpellVFSData, type CSpellVFSFile, type CSpellVFSFileEntry, type CSpellVFSFileUrl, type CSpellVFSTextData, type CacheFormat, type CacheSettings, type CacheStrategy, type CharacterSet, type CharacterSetCosts, type CommandLineSettings, ConfigFields, type CustomDictionaryPath, type CustomDictionaryScope, type DebugEmitter, type DictionaryDefinition, type DictionaryDefinitionAlternate, type DictionaryDefinitionAugmented, type DictionaryDefinitionBase, type DictionaryDefinitionCustom, type DictionaryDefinitionInline, type DictionaryDefinitionInlineFlagWords, type DictionaryDefinitionInlineIgnoreWords, type DictionaryDefinitionInlineWords, type DictionaryDefinitionLegacy, type DictionaryDefinitionPreferred, type DictionaryDefinitionSimple, type DictionaryFileTypes, type DictionaryId, type DictionaryInformation, type DictionaryNegRef, type DictionaryPath, type DictionaryRef, type DictionaryReference, type EditCosts, type ErrorEmitter, type ErrorLike, type ExperimentalBaseSettings, type ExperimentalFileSettings, type ExtendableSettings, type FSPathResolvable, type Feature, type Features, type FeaturesSupportedByReporter, type FileSettings, type FileSource, type FsPath, type Glob, type GlobDef, type ImportFileRef, type InMemorySource, type Issue, IssueType, type LanguageId, type LanguageIdMultiple, type LanguageIdMultipleNeg, type LanguageIdSingle, type LanguageSetting, type LanguageSettingFilterFields, type LanguageSettingFilterFieldsDeprecated, type LanguageSettingFilterFieldsPreferred, type LegacySettings, type LocalId, type LocaleId, type MappedText, type MatchingFileType, type MergeSource, type MessageEmitter, type MessageType, type MessageTypeLookup, MessageTypes, type OverrideFilterFields, type OverrideSettings, type ParseResult, type ParsedText, type Parser, type ParserName, type ParserOptions, type Pattern, type PatternId, type PatternRef, type Plugin, type PnPSettings, type PredefinedPatterns, type ProgressBase, type ProgressEmitter, type ProgressFileBase, type ProgressFileBegin, type ProgressFileComplete, type ProgressItem, type ProgressTypes, type RegExpPatternDefinition, type RegExpPatternList, type ReplaceEntry, type ReplaceMap, type ReportIssueOptions, type ReporterConfiguration, type ReporterSettings, type ReportingConfiguration, type ResultEmitter, type RunResult, type Settings, type SimpleGlob, type Source, type SpellingErrorEmitter, type SuggestionCostMapDef, type SuggestionCostsDefs, type SuggestionsConfiguration, type TextDocumentOffset, type TextOffset, type TrustLevel, type UnknownWordsChoices, type UnknownWordsConfiguration, type Version, type VersionLatest, type VersionLegacy, type WorkspaceTrustSettings, defaultCSpellSettings, defineConfig, unknownWordsChoices };
|
|
1857
1969
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -12,6 +12,7 @@ const ConfigFields = {
|
|
|
12
12
|
enableFiletypes: "enableFiletypes",
|
|
13
13
|
enabledFileTypes: "enabledFileTypes",
|
|
14
14
|
enableGlobDot: "enableGlobDot",
|
|
15
|
+
engines: "engines",
|
|
15
16
|
failFast: "failFast",
|
|
16
17
|
features: "features",
|
|
17
18
|
files: "files",
|
|
@@ -52,16 +53,17 @@ const ConfigFields = {
|
|
|
52
53
|
usePnP: "usePnP",
|
|
53
54
|
userWords: "userWords",
|
|
54
55
|
validateDirectives: "validateDirectives",
|
|
56
|
+
vfs: "vfs",
|
|
55
57
|
words: "words",
|
|
56
58
|
parser: "parser"
|
|
57
59
|
};
|
|
58
60
|
|
|
59
61
|
//#endregion
|
|
60
62
|
//#region src/CSpellReporter.ts
|
|
61
|
-
let IssueType = /* @__PURE__ */ function(IssueType
|
|
62
|
-
IssueType
|
|
63
|
-
IssueType
|
|
64
|
-
return IssueType
|
|
63
|
+
let IssueType = /* @__PURE__ */ function(IssueType) {
|
|
64
|
+
IssueType[IssueType["spelling"] = 0] = "spelling";
|
|
65
|
+
IssueType[IssueType["directive"] = 1] = "directive";
|
|
66
|
+
return IssueType;
|
|
65
67
|
}({});
|
|
66
68
|
const MessageTypes = {
|
|
67
69
|
Debug: "Debug",
|
package/dist/index.mjs
CHANGED
|
@@ -11,6 +11,7 @@ const ConfigFields = {
|
|
|
11
11
|
enableFiletypes: "enableFiletypes",
|
|
12
12
|
enabledFileTypes: "enabledFileTypes",
|
|
13
13
|
enableGlobDot: "enableGlobDot",
|
|
14
|
+
engines: "engines",
|
|
14
15
|
failFast: "failFast",
|
|
15
16
|
features: "features",
|
|
16
17
|
files: "files",
|
|
@@ -51,16 +52,17 @@ const ConfigFields = {
|
|
|
51
52
|
usePnP: "usePnP",
|
|
52
53
|
userWords: "userWords",
|
|
53
54
|
validateDirectives: "validateDirectives",
|
|
55
|
+
vfs: "vfs",
|
|
54
56
|
words: "words",
|
|
55
57
|
parser: "parser"
|
|
56
58
|
};
|
|
57
59
|
|
|
58
60
|
//#endregion
|
|
59
61
|
//#region src/CSpellReporter.ts
|
|
60
|
-
let IssueType = /* @__PURE__ */ function(IssueType
|
|
61
|
-
IssueType
|
|
62
|
-
IssueType
|
|
63
|
-
return IssueType
|
|
62
|
+
let IssueType = /* @__PURE__ */ function(IssueType) {
|
|
63
|
+
IssueType[IssueType["spelling"] = 0] = "spelling";
|
|
64
|
+
IssueType[IssueType["directive"] = 1] = "directive";
|
|
65
|
+
return IssueType;
|
|
64
66
|
}({});
|
|
65
67
|
const MessageTypes = {
|
|
66
68
|
Debug: "Debug",
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public",
|
|
5
5
|
"provenance": true
|
|
6
6
|
},
|
|
7
|
-
"version": "9.6.
|
|
7
|
+
"version": "9.6.3",
|
|
8
8
|
"description": "Types for cspell and cspell-lib",
|
|
9
9
|
"type": "commonjs",
|
|
10
10
|
"sideEffects": false,
|
|
@@ -56,8 +56,7 @@
|
|
|
56
56
|
"build-schema": "pnpm build-cspell-schema",
|
|
57
57
|
"clean-build": "pnpm run clean && pnpm run build",
|
|
58
58
|
"coverage": "vitest run --coverage",
|
|
59
|
-
"test": "vitest run"
|
|
60
|
-
"prepare": "echo Skip Building Types"
|
|
59
|
+
"test": "vitest run"
|
|
61
60
|
},
|
|
62
61
|
"repository": {
|
|
63
62
|
"type": "git",
|
|
@@ -86,5 +85,5 @@
|
|
|
86
85
|
"node": ">=20"
|
|
87
86
|
},
|
|
88
87
|
"homepage": "https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell-types#readme",
|
|
89
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "500b996b6c0a6ff025c42ef98db44776f43a9e72"
|
|
90
89
|
}
|