vscode-json-languageservice 4.1.8

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +133 -0
  2. package/LICENSE.md +47 -0
  3. package/README.md +65 -0
  4. package/lib/esm/jsonContributions.d.ts +17 -0
  5. package/lib/esm/jsonContributions.js +1 -0
  6. package/lib/esm/jsonLanguageService.d.ts +28 -0
  7. package/lib/esm/jsonLanguageService.js +65 -0
  8. package/lib/esm/jsonLanguageTypes.d.ts +275 -0
  9. package/lib/esm/jsonLanguageTypes.js +45 -0
  10. package/lib/esm/jsonSchema.d.ts +70 -0
  11. package/lib/esm/jsonSchema.js +1 -0
  12. package/lib/esm/parser/jsonParser.js +1212 -0
  13. package/lib/esm/services/configuration.js +528 -0
  14. package/lib/esm/services/jsonCompletion.js +934 -0
  15. package/lib/esm/services/jsonDocumentSymbols.js +278 -0
  16. package/lib/esm/services/jsonFolding.js +121 -0
  17. package/lib/esm/services/jsonHover.js +112 -0
  18. package/lib/esm/services/jsonLinks.js +73 -0
  19. package/lib/esm/services/jsonSchemaService.js +535 -0
  20. package/lib/esm/services/jsonSelectionRanges.js +61 -0
  21. package/lib/esm/services/jsonValidation.js +146 -0
  22. package/lib/esm/utils/colors.js +69 -0
  23. package/lib/esm/utils/glob.js +124 -0
  24. package/lib/esm/utils/json.js +42 -0
  25. package/lib/esm/utils/objects.js +65 -0
  26. package/lib/esm/utils/strings.js +52 -0
  27. package/lib/umd/jsonContributions.d.ts +17 -0
  28. package/lib/umd/jsonContributions.js +12 -0
  29. package/lib/umd/jsonLanguageService.d.ts +28 -0
  30. package/lib/umd/jsonLanguageService.js +89 -0
  31. package/lib/umd/jsonLanguageTypes.d.ts +275 -0
  32. package/lib/umd/jsonLanguageTypes.js +92 -0
  33. package/lib/umd/jsonSchema.d.ts +70 -0
  34. package/lib/umd/jsonSchema.js +12 -0
  35. package/lib/umd/parser/jsonParser.js +1231 -0
  36. package/lib/umd/services/configuration.js +541 -0
  37. package/lib/umd/services/jsonCompletion.js +947 -0
  38. package/lib/umd/services/jsonDocumentSymbols.js +291 -0
  39. package/lib/umd/services/jsonFolding.js +135 -0
  40. package/lib/umd/services/jsonHover.js +125 -0
  41. package/lib/umd/services/jsonLinks.js +87 -0
  42. package/lib/umd/services/jsonSchemaService.js +548 -0
  43. package/lib/umd/services/jsonSelectionRanges.js +75 -0
  44. package/lib/umd/services/jsonValidation.js +159 -0
  45. package/lib/umd/utils/colors.js +85 -0
  46. package/lib/umd/utils/glob.js +138 -0
  47. package/lib/umd/utils/json.js +56 -0
  48. package/lib/umd/utils/objects.js +83 -0
  49. package/lib/umd/utils/strings.js +70 -0
  50. package/package.json +55 -0
@@ -0,0 +1,45 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ import { Range, Position, MarkupContent, MarkupKind, Color, ColorInformation, ColorPresentation, FoldingRange, FoldingRangeKind, SelectionRange, Diagnostic, DiagnosticSeverity, CompletionItem, CompletionItemKind, CompletionList, CompletionItemTag, InsertTextFormat, SymbolInformation, SymbolKind, DocumentSymbol, Location, Hover, MarkedString, CodeActionContext, Command, CodeAction, DocumentHighlight, DocumentLink, WorkspaceEdit, TextEdit, CodeActionKind, TextDocumentEdit, VersionedTextDocumentIdentifier, DocumentHighlightKind } from 'vscode-languageserver-types';
6
+ import { TextDocument } from 'vscode-languageserver-textdocument';
7
+ export { TextDocument, Range, Position, MarkupContent, MarkupKind, Color, ColorInformation, ColorPresentation, FoldingRange, FoldingRangeKind, SelectionRange, Diagnostic, DiagnosticSeverity, CompletionItem, CompletionItemKind, CompletionList, CompletionItemTag, InsertTextFormat, SymbolInformation, SymbolKind, DocumentSymbol, Location, Hover, MarkedString, CodeActionContext, Command, CodeAction, DocumentHighlight, DocumentLink, WorkspaceEdit, TextEdit, CodeActionKind, TextDocumentEdit, VersionedTextDocumentIdentifier, DocumentHighlightKind };
8
+ /**
9
+ * Error codes used by diagnostics
10
+ */
11
+ export var ErrorCode;
12
+ (function (ErrorCode) {
13
+ ErrorCode[ErrorCode["Undefined"] = 0] = "Undefined";
14
+ ErrorCode[ErrorCode["EnumValueMismatch"] = 1] = "EnumValueMismatch";
15
+ ErrorCode[ErrorCode["Deprecated"] = 2] = "Deprecated";
16
+ ErrorCode[ErrorCode["UnexpectedEndOfComment"] = 257] = "UnexpectedEndOfComment";
17
+ ErrorCode[ErrorCode["UnexpectedEndOfString"] = 258] = "UnexpectedEndOfString";
18
+ ErrorCode[ErrorCode["UnexpectedEndOfNumber"] = 259] = "UnexpectedEndOfNumber";
19
+ ErrorCode[ErrorCode["InvalidUnicode"] = 260] = "InvalidUnicode";
20
+ ErrorCode[ErrorCode["InvalidEscapeCharacter"] = 261] = "InvalidEscapeCharacter";
21
+ ErrorCode[ErrorCode["InvalidCharacter"] = 262] = "InvalidCharacter";
22
+ ErrorCode[ErrorCode["PropertyExpected"] = 513] = "PropertyExpected";
23
+ ErrorCode[ErrorCode["CommaExpected"] = 514] = "CommaExpected";
24
+ ErrorCode[ErrorCode["ColonExpected"] = 515] = "ColonExpected";
25
+ ErrorCode[ErrorCode["ValueExpected"] = 516] = "ValueExpected";
26
+ ErrorCode[ErrorCode["CommaOrCloseBacketExpected"] = 517] = "CommaOrCloseBacketExpected";
27
+ ErrorCode[ErrorCode["CommaOrCloseBraceExpected"] = 518] = "CommaOrCloseBraceExpected";
28
+ ErrorCode[ErrorCode["TrailingComma"] = 519] = "TrailingComma";
29
+ ErrorCode[ErrorCode["DuplicateKey"] = 520] = "DuplicateKey";
30
+ ErrorCode[ErrorCode["CommentNotPermitted"] = 521] = "CommentNotPermitted";
31
+ ErrorCode[ErrorCode["SchemaResolveError"] = 768] = "SchemaResolveError";
32
+ })(ErrorCode || (ErrorCode = {}));
33
+ export var ClientCapabilities;
34
+ (function (ClientCapabilities) {
35
+ ClientCapabilities.LATEST = {
36
+ textDocument: {
37
+ completion: {
38
+ completionItem: {
39
+ documentationFormat: [MarkupKind.Markdown, MarkupKind.PlainText],
40
+ commitCharactersSupport: true
41
+ }
42
+ }
43
+ }
44
+ };
45
+ })(ClientCapabilities || (ClientCapabilities = {}));
@@ -0,0 +1,70 @@
1
+ export declare type JSONSchemaRef = JSONSchema | boolean;
2
+ export interface JSONSchema {
3
+ id?: string;
4
+ $id?: string;
5
+ $schema?: string;
6
+ type?: string | string[];
7
+ title?: string;
8
+ default?: any;
9
+ definitions?: {
10
+ [name: string]: JSONSchema;
11
+ };
12
+ description?: string;
13
+ properties?: JSONSchemaMap;
14
+ patternProperties?: JSONSchemaMap;
15
+ additionalProperties?: boolean | JSONSchemaRef;
16
+ minProperties?: number;
17
+ maxProperties?: number;
18
+ dependencies?: JSONSchemaMap | {
19
+ [prop: string]: string[];
20
+ };
21
+ items?: JSONSchemaRef | JSONSchemaRef[];
22
+ minItems?: number;
23
+ maxItems?: number;
24
+ uniqueItems?: boolean;
25
+ additionalItems?: boolean | JSONSchemaRef;
26
+ pattern?: string;
27
+ minLength?: number;
28
+ maxLength?: number;
29
+ minimum?: number;
30
+ maximum?: number;
31
+ exclusiveMinimum?: boolean | number;
32
+ exclusiveMaximum?: boolean | number;
33
+ multipleOf?: number;
34
+ required?: string[];
35
+ $ref?: string;
36
+ anyOf?: JSONSchemaRef[];
37
+ allOf?: JSONSchemaRef[];
38
+ oneOf?: JSONSchemaRef[];
39
+ not?: JSONSchemaRef;
40
+ enum?: any[];
41
+ format?: string;
42
+ const?: any;
43
+ contains?: JSONSchemaRef;
44
+ propertyNames?: JSONSchemaRef;
45
+ examples?: any[];
46
+ $comment?: string;
47
+ if?: JSONSchemaRef;
48
+ then?: JSONSchemaRef;
49
+ else?: JSONSchemaRef;
50
+ defaultSnippets?: {
51
+ label?: string;
52
+ description?: string;
53
+ markdownDescription?: string;
54
+ body?: any;
55
+ bodyText?: string;
56
+ }[];
57
+ errorMessage?: string;
58
+ patternErrorMessage?: string;
59
+ deprecationMessage?: string;
60
+ enumDescriptions?: string[];
61
+ markdownEnumDescriptions?: string[];
62
+ markdownDescription?: string;
63
+ doNotSuggest?: boolean;
64
+ suggestSortText?: string;
65
+ allowComments?: boolean;
66
+ allowTrailingCommas?: boolean;
67
+ }
68
+ export interface JSONSchemaMap {
69
+ [name: string]: JSONSchemaRef;
70
+ }
@@ -0,0 +1 @@
1
+ export {};