@player-tools/json-language-service 0.13.0-next.3 → 0.13.0-next.5

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/package.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "types"
7
7
  ],
8
8
  "name": "@player-tools/json-language-service",
9
- "version": "0.13.0-next.3",
9
+ "version": "0.13.0-next.5",
10
10
  "main": "dist/cjs/index.cjs",
11
11
  "dependencies": {
12
- "@player-tools/xlr": "0.13.0-next.3",
13
- "@player-tools/xlr-sdk": "0.13.0-next.3",
14
- "@player-tools/xlr-utils": "0.13.0-next.3",
12
+ "@player-tools/xlr": "0.13.0-next.5",
13
+ "@player-tools/xlr-sdk": "0.13.0-next.5",
14
+ "@player-tools/xlr-utils": "0.13.0-next.5",
15
15
  "@player-ui/player": "0.12.0-next.1",
16
16
  "change-case": "^4.1.1",
17
17
  "cross-fetch": "^3.0.5",
@@ -58,6 +58,10 @@ exports[`player language service > completion > basic value completions 1`] = `
58
58
  "kind": 12,
59
59
  "label": "ACTION",
60
60
  },
61
+ {
62
+ "kind": 12,
63
+ "label": "ASYNC_ACTION",
64
+ },
61
65
  {
62
66
  "kind": 12,
63
67
  "label": "EXTERNAL",
@@ -111,20 +115,6 @@ exports[`player language service > hover > basic hover docs 3`] = `
111
115
 
112
116
  exports[`player language service > validation > throws AssetWrapper errors 1`] = `
113
117
  [
114
- {
115
- "message": "Content Validation Error - type: Expected type "string" but got "null"",
116
- "range": {
117
- "end": {
118
- "character": 28,
119
- "line": 20,
120
- },
121
- "start": {
122
- "character": 16,
123
- "line": 20,
124
- },
125
- },
126
- "severity": 1,
127
- },
128
118
  {
129
119
  "message": "Content Validation Error - missing: Property "BEGIN" missing from type "Navigation"",
130
120
  "range": {
@@ -182,7 +172,7 @@ exports[`player language service > validation > throws AssetWrapper errors 1`] =
182
172
  "severity": 1,
183
173
  },
184
174
  {
185
- "message": "Expected: AssetWrapper & object literal | StaticSwitch & object literal | DynamicSwitch & object literal",
175
+ "message": "Expected: AssetWrapper & object literal | StaticSwitch<T> & object literal | DynamicSwitch<T> & object literal",
186
176
  "range": {
187
177
  "end": {
188
178
  "character": 16,
@@ -71,34 +71,7 @@ describe("player language service", () => {
71
71
  "data": {},
72
72
  "navigation": {},
73
73
  "schema": {
74
- "ROOT": {
75
- "application": {
76
- "type": null
77
- },
78
- "foo": {
79
- "type": "fooType"
80
- }
81
- },
82
- "fooType": {
83
- "bar": {
84
- "type": "barType",
85
- "validation": [
86
- {
87
- "type": "required",
88
- "severity": "error"
89
- }
90
- ]
91
- },
92
- "baz": {
93
- "type": "bazType",
94
- "validation": [
95
- {
96
- "type": "required",
97
- "message": "this is my own message"
98
- }
99
- ]
100
- }
101
- }
74
+ "ROOT": {}
102
75
  }
103
76
  }
104
77
  `,
package/src/constants.ts CHANGED
@@ -5,6 +5,7 @@ import type { PlayerLanguageServicePlugin } from ".";
5
5
  import { AssetWrapperArrayPlugin } from "./plugins/asset-wrapper-array-plugin";
6
6
  import { SchemaInfoPlugin } from "./plugins/binding-schema-plugin";
7
7
  import { XLRPlugin } from "./plugins/xlr-plugin";
8
+ import { SchemaValidationPlugin } from "./plugins/schema-validation-plugin";
8
9
  import { DuplicateIDPlugin } from "./plugins/duplicate-id-plugin";
9
10
  import { MissingAssetWrapperPlugin } from "./plugins/missing-asset-wrapper-plugin";
10
11
  import { NavStatePlugin } from "./plugins/nav-state-plugin";
@@ -20,6 +21,7 @@ export const PLUGINS: Array<PlayerLanguageServicePlugin> = [
20
21
  new DuplicateIDPlugin(),
21
22
  new ViewNodePlugin(),
22
23
  new SchemaInfoPlugin(),
24
+ new SchemaValidationPlugin(),
23
25
  new AssetWrapperArrayPlugin(),
24
26
  new NavStatePlugin(),
25
27
  new MissingAssetWrapperPlugin(),
@@ -57,7 +57,7 @@ describe("asset-wrapper-array-plugin", () => {
57
57
  expect(diags?.map((d) => d.message)).toMatchInlineSnapshot(`
58
58
  [
59
59
  "View Validation Error - value: Does not match any of the expected types for type: 'AssetWrapperOrSwitch'",
60
- "Expected: AssetWrapper & object literal | StaticSwitch & object literal | DynamicSwitch & object literal",
60
+ "Expected: AssetWrapper & object literal | StaticSwitch<T> & object literal | DynamicSwitch<T> & object literal",
61
61
  "Implicit Array -> "collection" assets is not supported.",
62
62
  ]
63
63
  `);
@@ -79,7 +79,7 @@ describe("asset-wrapper-array-plugin", () => {
79
79
  "severity": 1,
80
80
  },
81
81
  {
82
- "message": "Expected: AssetWrapper & object literal | StaticSwitch & object literal | DynamicSwitch & object literal",
82
+ "message": "Expected: AssetWrapper & object literal | StaticSwitch<T> & object literal | DynamicSwitch<T> & object literal",
83
83
  "range": {
84
84
  "end": {
85
85
  "character": 7,
@@ -60,7 +60,7 @@ describe("missing-asset-wrapper", () => {
60
60
  expect(validations?.map((v) => v.message)).toMatchInlineSnapshot(`
61
61
  [
62
62
  "View Validation Error - value: Does not match any of the expected types for type: 'AssetWrapperOrSwitch'",
63
- "Expected: AssetWrapper & object literal | StaticSwitch & object literal | DynamicSwitch & object literal",
63
+ "Expected: AssetWrapper & object literal | StaticSwitch<T> & object literal | DynamicSwitch<T> & object literal",
64
64
  ]
65
65
  `);
66
66
  });
@@ -87,7 +87,7 @@ describe("missing-asset-wrapper", () => {
87
87
  "severity": 1,
88
88
  },
89
89
  {
90
- "message": "Expected: AssetWrapper & object literal | StaticSwitch & object literal | DynamicSwitch & object literal",
90
+ "message": "Expected: AssetWrapper & object literal | StaticSwitch<T> & object literal | DynamicSwitch<T> & object literal",
91
91
  "range": {
92
92
  "end": {
93
93
  "character": 7,