@xlr-lib/xlr-sdk 0.2.0--canary.2.60 → 0.2.0--canary.4.100
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 +4 -4
- package/src/__tests__/sdk.test.ts +0 -23
package/package.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"types"
|
|
7
7
|
],
|
|
8
8
|
"name": "@xlr-lib/xlr-sdk",
|
|
9
|
-
"version": "0.2.0--canary.
|
|
9
|
+
"version": "0.2.0--canary.4.100",
|
|
10
10
|
"main": "dist/cjs/index.cjs",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@xlr-lib/xlr": "0.2.0--canary.
|
|
13
|
-
"@xlr-lib/xlr-utils": "0.2.0--canary.
|
|
14
|
-
"@xlr-lib/xlr-converters": "0.2.0--canary.
|
|
12
|
+
"@xlr-lib/xlr": "0.2.0--canary.4.100",
|
|
13
|
+
"@xlr-lib/xlr-utils": "0.2.0--canary.4.100",
|
|
14
|
+
"@xlr-lib/xlr-converters": "0.2.0--canary.4.100",
|
|
15
15
|
"@types/fs-extra": "^9.0.13",
|
|
16
16
|
"@types/node": "^18.18.0",
|
|
17
17
|
"fs-extra": "^10.0.0",
|
|
@@ -261,29 +261,6 @@ describe("Or Type Validation", () => {
|
|
|
261
261
|
"Expected: apple | banana | carrot | deli-meat",
|
|
262
262
|
);
|
|
263
263
|
});
|
|
264
|
-
|
|
265
|
-
test("Uses primitive type names over titles", () => {
|
|
266
|
-
const sdk = new XLRSDK();
|
|
267
|
-
sdk.loadDefinitionsFromModule(Types);
|
|
268
|
-
sdk.loadDefinitionsFromModule(ReferenceAssetsWebPluginManifest);
|
|
269
|
-
const validator = new XLRValidator(sdk.getType.bind(sdk));
|
|
270
|
-
|
|
271
|
-
const orType: OrType = {
|
|
272
|
-
type: "or",
|
|
273
|
-
or: [{ type: "string", title: "TextAsset.value" }, { type: "boolean" }],
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
const rootNode = parseTree(`1`);
|
|
277
|
-
if (!rootNode) {
|
|
278
|
-
throw new Error("Expected root node to be parsed");
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
const validationResult = validator.validateType(rootNode, orType);
|
|
282
|
-
|
|
283
|
-
expect(validationResult[0].message).toBe(
|
|
284
|
-
"Does not match any of the types: string | boolean",
|
|
285
|
-
);
|
|
286
|
-
});
|
|
287
264
|
});
|
|
288
265
|
|
|
289
266
|
describe("generateNestedTypesInfo Test", () => {
|