@cspell/cspell-types 5.14.0 → 5.15.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/cspell.schema.json +42 -2
- package/dist/CSpellReporter.d.ts +6 -0
- package/dist/CSpellSettingsDef.d.ts +47 -4
- package/dist/configFields.d.ts +7 -0
- package/dist/configFields.js +49 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +4 -2
- package/package.json +4 -4
package/cspell.schema.json
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"additionalProperties": false,
|
|
4
4
|
"definitions": {
|
|
5
|
+
"CacheSettings": {
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"cacheLocation": {
|
|
9
|
+
"$ref": "#/definitions/FSPathResolvable",
|
|
10
|
+
"description": "Path to the cache location. Can be a file or a directory. If none specified `.cspellcache` will be used. Relative paths are relative to the config file in which"
|
|
11
|
+
},
|
|
12
|
+
"cacheStrategy": {
|
|
13
|
+
"$ref": "#/definitions/CacheStrategy",
|
|
14
|
+
"default": "metadata",
|
|
15
|
+
"description": "Strategy to use for detecting changed files, default: metadata"
|
|
16
|
+
},
|
|
17
|
+
"useCache": {
|
|
18
|
+
"default": false,
|
|
19
|
+
"description": "Store the results of processed files in order to only operate on the changed ones.",
|
|
20
|
+
"type": "boolean"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"type": "object"
|
|
24
|
+
},
|
|
25
|
+
"CacheStrategy": {
|
|
26
|
+
"description": "The Strategy to use to detect if a file has changed.\n- `metadata` - uses the file system timestamp and size to detect changes (fastest).\n- `content` - uses a hash of the file content to check file changes (slower - more accurate).",
|
|
27
|
+
"enum": [
|
|
28
|
+
"metadata",
|
|
29
|
+
"content"
|
|
30
|
+
],
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
5
33
|
"CustomDictionaryPath": {
|
|
6
34
|
"description": "A File System Path to a dictionary file.",
|
|
7
35
|
"pattern": "^.*\\.txt$",
|
|
@@ -210,8 +238,12 @@
|
|
|
210
238
|
],
|
|
211
239
|
"description": "Reference to a dictionary by name. One of:\n- {@link DictionaryRef } \n- {@link DictionaryNegRef }"
|
|
212
240
|
},
|
|
241
|
+
"FSPathResolvable": {
|
|
242
|
+
"$ref": "#/definitions/FsPath",
|
|
243
|
+
"description": "A File System Path.\n\nSpecial Properties:\n- `${cwd}` prefix - will be replaced with the current working directory.\n- Relative paths are relative to the configuration file."
|
|
244
|
+
},
|
|
213
245
|
"FsPath": {
|
|
214
|
-
"description": "A File System Path.",
|
|
246
|
+
"description": "A File System Path. Relative paths are relative to the configuration file.",
|
|
215
247
|
"type": "string"
|
|
216
248
|
},
|
|
217
249
|
"Glob": {
|
|
@@ -596,6 +628,8 @@
|
|
|
596
628
|
"PredefinedPatterns": {
|
|
597
629
|
"enum": [
|
|
598
630
|
"Base64",
|
|
631
|
+
"Base64MultiLine",
|
|
632
|
+
"Base64SingleLine",
|
|
599
633
|
"CStyleComment",
|
|
600
634
|
"CStyleHexValue",
|
|
601
635
|
"CSSHexValue",
|
|
@@ -608,7 +642,9 @@
|
|
|
608
642
|
"PhpHereDoc",
|
|
609
643
|
"PublicKey",
|
|
610
644
|
"RsaCert",
|
|
645
|
+
"SshRsa",
|
|
611
646
|
"SHA",
|
|
647
|
+
"HashStrings",
|
|
612
648
|
"SpellCheckerDisable",
|
|
613
649
|
"SpellCheckerDisableBlock",
|
|
614
650
|
"SpellCheckerDisableLine",
|
|
@@ -738,6 +774,10 @@
|
|
|
738
774
|
"description": "True to enable compound word checking.",
|
|
739
775
|
"type": "boolean"
|
|
740
776
|
},
|
|
777
|
+
"cache": {
|
|
778
|
+
"$ref": "#/definitions/CacheSettings",
|
|
779
|
+
"description": "Define cache settings."
|
|
780
|
+
},
|
|
741
781
|
"caseSensitive": {
|
|
742
782
|
"default": false,
|
|
743
783
|
"description": "Determines if words must match case and accent rules.\n\n- `false` - Case is ignored and accents can be missing on the entire word. Incorrect accents or partially missing accents will be marked as incorrect.\n- `true` - Case and accents are enforced.",
|
|
@@ -817,7 +857,7 @@
|
|
|
817
857
|
"description": "Tells the spell checker to searching for `.gitignore` files when it reaches a matching root."
|
|
818
858
|
},
|
|
819
859
|
"globRoot": {
|
|
820
|
-
"$ref": "#/definitions/
|
|
860
|
+
"$ref": "#/definitions/FSPathResolvable",
|
|
821
861
|
"description": "The root to use for glob patterns found in this configuration. Default: location of the configuration file. For compatibility reasons, config files with version 0.1, the glob root will default to be `${cwd}`.\n\nUse `globRoot` to define a different location. `globRoot` can be relative to the location of this configuration file. Defining globRoot, does not impact imported configurations.\n\nSpecial Values:\n- `${cwd}` - will be replaced with the current working directory.\n- `.` - will be the location of the containing configuration file."
|
|
822
862
|
},
|
|
823
863
|
"id": {
|
package/dist/CSpellReporter.d.ts
CHANGED
|
@@ -36,10 +36,16 @@ export interface ProgressFileComplete extends ProgressBase {
|
|
|
36
36
|
}
|
|
37
37
|
export declare type ProgressEmitter = (p: ProgressItem | ProgressFileComplete) => void;
|
|
38
38
|
export interface RunResult {
|
|
39
|
+
/** Number of files processed. */
|
|
39
40
|
files: number;
|
|
41
|
+
/** Set of files where issues were found. */
|
|
40
42
|
filesWithIssues: Set<string>;
|
|
43
|
+
/** Number of issues found. */
|
|
41
44
|
issues: number;
|
|
45
|
+
/** Number of processing errors. */
|
|
42
46
|
errors: number;
|
|
47
|
+
/** Number files that used results from the cache. */
|
|
48
|
+
cachedFiles: number;
|
|
43
49
|
}
|
|
44
50
|
export declare type ResultEmitter = (result: RunResult) => void | Promise<void>;
|
|
45
51
|
export interface CSpellReporter {
|
|
@@ -18,7 +18,7 @@ export interface CSpellSettingsWithSourceTrace extends CSpellSettings {
|
|
|
18
18
|
__importRef?: ImportFileRef;
|
|
19
19
|
__imports?: Map<string, ImportFileRef>;
|
|
20
20
|
}
|
|
21
|
-
export interface FileSettings extends ExtendableSettings {
|
|
21
|
+
export interface FileSettings extends ExtendableSettings, CommandLineSettings {
|
|
22
22
|
/**
|
|
23
23
|
* Configuration format version of the settings file.
|
|
24
24
|
* @default "0.2"
|
|
@@ -43,7 +43,7 @@ export interface FileSettings extends ExtendableSettings {
|
|
|
43
43
|
* - `.` - will be the location of the containing configuration file.
|
|
44
44
|
*
|
|
45
45
|
*/
|
|
46
|
-
globRoot?:
|
|
46
|
+
globRoot?: FSPathResolvable;
|
|
47
47
|
/**
|
|
48
48
|
* Glob patterns of files to be checked.
|
|
49
49
|
* Glob patterns are relative to the `globRoot` of the configuration file that defines them.
|
|
@@ -184,6 +184,39 @@ export interface PnPSettings {
|
|
|
184
184
|
*/
|
|
185
185
|
pnpFiles?: string[];
|
|
186
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* The Strategy to use to detect if a file has changed.
|
|
189
|
+
* - `metadata` - uses the file system timestamp and size to detect changes (fastest).
|
|
190
|
+
* - `content` - uses a hash of the file content to check file changes (slower - more accurate).
|
|
191
|
+
*/
|
|
192
|
+
export declare type CacheStrategy = 'metadata' | 'content';
|
|
193
|
+
export interface CacheSettings {
|
|
194
|
+
/**
|
|
195
|
+
* Store the results of processed files in order to only operate on the changed ones.
|
|
196
|
+
* @default false
|
|
197
|
+
*/
|
|
198
|
+
useCache?: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Path to the cache location. Can be a file or a directory.
|
|
201
|
+
* If none specified `.cspellcache` will be used.
|
|
202
|
+
* Relative paths are relative to the config file in which
|
|
203
|
+
*/
|
|
204
|
+
cacheLocation?: FSPathResolvable;
|
|
205
|
+
/**
|
|
206
|
+
* Strategy to use for detecting changed files, default: metadata
|
|
207
|
+
* @default 'metadata'
|
|
208
|
+
*/
|
|
209
|
+
cacheStrategy?: CacheStrategy;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* These are settings only used by the command line application.
|
|
213
|
+
*/
|
|
214
|
+
export interface CommandLineSettings {
|
|
215
|
+
/**
|
|
216
|
+
* Define cache settings.
|
|
217
|
+
*/
|
|
218
|
+
cache?: CacheSettings;
|
|
219
|
+
}
|
|
187
220
|
/**
|
|
188
221
|
* To prevent the unwanted execution of untrusted code, WorkspaceTrustSettings
|
|
189
222
|
* are use to set the trust levels.
|
|
@@ -439,7 +472,7 @@ export interface LanguageSettingFilterFieldsDeprecated {
|
|
|
439
472
|
/** @hidden */
|
|
440
473
|
declare type InternalRegExp = RegExp;
|
|
441
474
|
export declare type Pattern = string | InternalRegExp;
|
|
442
|
-
export declare type PredefinedPatterns = 'Base64' | 'CStyleComment' | 'CStyleHexValue' | 'CSSHexValue' | 'CommitHash' | 'CommitHashLink' | 'Email' | 'EscapeCharacters' | 'HexValues' | 'href' | 'PhpHereDoc' | 'PublicKey' | 'RsaCert' | 'SHA' | 'SpellCheckerDisable' | 'SpellCheckerDisableBlock' | 'SpellCheckerDisableLine' | 'SpellCheckerDisableNext' | 'SpellCheckerIgnoreInDocSetting' | 'string' | 'UnicodeRef' | 'Urls' | 'UUID' | 'Everything';
|
|
475
|
+
export declare type PredefinedPatterns = 'Base64' | 'Base64MultiLine' | 'Base64SingleLine' | 'CStyleComment' | 'CStyleHexValue' | 'CSSHexValue' | 'CommitHash' | 'CommitHashLink' | 'Email' | 'EscapeCharacters' | 'HexValues' | 'href' | 'PhpHereDoc' | 'PublicKey' | 'RsaCert' | 'SshRsa' | 'SHA' | 'HashStrings' | 'SpellCheckerDisable' | 'SpellCheckerDisableBlock' | 'SpellCheckerDisableLine' | 'SpellCheckerDisableNext' | 'SpellCheckerIgnoreInDocSetting' | 'string' | 'UnicodeRef' | 'Urls' | 'UUID' | 'Everything';
|
|
443
476
|
/** This matches the name in a pattern definition. */
|
|
444
477
|
export declare type PatternId = string;
|
|
445
478
|
/** A PatternRef is a Pattern or PatternId. */
|
|
@@ -541,8 +574,18 @@ export declare type LanguageIdMultiple = string;
|
|
|
541
574
|
*/
|
|
542
575
|
export declare type LanguageIdMultipleNeg = string;
|
|
543
576
|
export declare type LanguageId = LanguageIdSingle | LanguageIdMultiple | LanguageIdMultipleNeg;
|
|
544
|
-
/**
|
|
577
|
+
/**
|
|
578
|
+
* A File System Path. Relative paths are relative to the configuration file.
|
|
579
|
+
*/
|
|
545
580
|
export declare type FsPath = string;
|
|
581
|
+
/**
|
|
582
|
+
* A File System Path.
|
|
583
|
+
*
|
|
584
|
+
* Special Properties:
|
|
585
|
+
* - `${cwd}` prefix - will be replaced with the current working directory.
|
|
586
|
+
* - Relative paths are relative to the configuration file.
|
|
587
|
+
*/
|
|
588
|
+
export declare type FSPathResolvable = FsPath;
|
|
546
589
|
/** Trust Security Level. */
|
|
547
590
|
export declare type TrustLevel = 'trusted' | 'untrusted';
|
|
548
591
|
/**
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CSpellUserSettings } from './CSpellSettingsDef';
|
|
2
|
+
export declare type ConfigKeys = Exclude<keyof CSpellUserSettings, '$schema' | 'version' | 'id'>;
|
|
3
|
+
export declare type CSpellUserSettingsFields = {
|
|
4
|
+
[key in ConfigKeys]: key;
|
|
5
|
+
};
|
|
6
|
+
export declare const ConfigFields: CSpellUserSettingsFields;
|
|
7
|
+
//# sourceMappingURL=configFields.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConfigFields = void 0;
|
|
4
|
+
exports.ConfigFields = {
|
|
5
|
+
allowCompoundWords: 'allowCompoundWords',
|
|
6
|
+
cache: 'cache',
|
|
7
|
+
caseSensitive: 'caseSensitive',
|
|
8
|
+
description: 'description',
|
|
9
|
+
dictionaries: 'dictionaries',
|
|
10
|
+
dictionaryDefinitions: 'dictionaryDefinitions',
|
|
11
|
+
enabled: 'enabled',
|
|
12
|
+
enabledLanguageIds: 'enabledLanguageIds',
|
|
13
|
+
enableFiletypes: 'enableFiletypes',
|
|
14
|
+
enableGlobDot: 'enableGlobDot',
|
|
15
|
+
files: 'files',
|
|
16
|
+
flagWords: 'flagWords',
|
|
17
|
+
gitignoreRoot: 'gitignoreRoot',
|
|
18
|
+
globRoot: 'globRoot',
|
|
19
|
+
ignorePaths: 'ignorePaths',
|
|
20
|
+
ignoreRegExpList: 'ignoreRegExpList',
|
|
21
|
+
ignoreWords: 'ignoreWords',
|
|
22
|
+
import: 'import',
|
|
23
|
+
includeRegExpList: 'includeRegExpList',
|
|
24
|
+
language: 'language',
|
|
25
|
+
languageId: 'languageId',
|
|
26
|
+
languageSettings: 'languageSettings',
|
|
27
|
+
maxDuplicateProblems: 'maxDuplicateProblems',
|
|
28
|
+
maxNumberOfProblems: 'maxNumberOfProblems',
|
|
29
|
+
minWordLength: 'minWordLength',
|
|
30
|
+
name: 'name',
|
|
31
|
+
noConfigSearch: 'noConfigSearch',
|
|
32
|
+
noSuggestDictionaries: 'noSuggestDictionaries',
|
|
33
|
+
numSuggestions: 'numSuggestions',
|
|
34
|
+
overrides: 'overrides',
|
|
35
|
+
patterns: 'patterns',
|
|
36
|
+
pnpFiles: 'pnpFiles',
|
|
37
|
+
readonly: 'readonly',
|
|
38
|
+
reporters: 'reporters',
|
|
39
|
+
showStatus: 'showStatus',
|
|
40
|
+
spellCheckDelayMs: 'spellCheckDelayMs',
|
|
41
|
+
suggestionNumChanges: 'suggestionNumChanges',
|
|
42
|
+
suggestionsTimeout: 'suggestionsTimeout',
|
|
43
|
+
useGitignore: 'useGitignore',
|
|
44
|
+
usePnP: 'usePnP',
|
|
45
|
+
userWords: 'userWords',
|
|
46
|
+
words: 'words',
|
|
47
|
+
};
|
|
48
|
+
// export const ConfigKeysNames = Object.values(ConfigKeysByField);
|
|
49
|
+
//# sourceMappingURL=configFields.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { ConfigFields, type CSpellUserSettingsFields } from './configFields';
|
|
2
2
|
export * from './CSpellReporter';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './CSpellSettingsDef';
|
|
4
|
+
export type { TextDocumentOffset, TextOffset } from './TextOffset';
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
|
|
13
|
+
exports.ConfigFields = void 0;
|
|
14
|
+
var configFields_1 = require("./configFields");
|
|
15
|
+
Object.defineProperty(exports, "ConfigFields", { enumerable: true, get: function () { return configFields_1.ConfigFields; } });
|
|
14
16
|
__exportStar(require("./CSpellReporter"), exports);
|
|
15
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./CSpellSettingsDef"), exports);
|
|
16
18
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "5.
|
|
6
|
+
"version": "5.15.0",
|
|
7
7
|
"description": "Types for cspell and cspell-lib",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"typings": "dist/index.d.ts",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"ajv-cli": "^5.0.0",
|
|
52
|
-
"jest": "^27.4.
|
|
52
|
+
"jest": "^27.4.6",
|
|
53
53
|
"rimraf": "^3.0.2",
|
|
54
54
|
"ts-json-schema-generator": "^0.97.0",
|
|
55
55
|
"typedoc": "^0.22.10",
|
|
56
|
-
"typedoc-plugin-markdown": "^3.11.
|
|
56
|
+
"typedoc-plugin-markdown": "^3.11.9",
|
|
57
57
|
"typescript": "^4.5.4"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "04d61378054cbecd28df100ca704c7322abab8ba"
|
|
60
60
|
}
|