@elaraai/east 1.0.70 → 1.0.72

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 (35) hide show
  1. package/dist/src/expr/libs/string.d.ts +15 -2
  2. package/dist/src/expr/libs/string.d.ts.map +1 -1
  3. package/dist/src/expr/libs/string.js +15 -2
  4. package/dist/src/expr/libs/string.js.map +1 -1
  5. package/dist/src/location.d.ts +12 -0
  6. package/dist/src/location.d.ts.map +1 -1
  7. package/dist/src/location.js +15 -3
  8. package/dist/src/location.js.map +1 -1
  9. package/dist/src/serialization/index.d.ts +2 -0
  10. package/dist/src/serialization/index.d.ts.map +1 -1
  11. package/dist/src/serialization/index.js +2 -0
  12. package/dist/src/serialization/index.js.map +1 -1
  13. package/dist/src/serialization/json.d.ts +43 -2
  14. package/dist/src/serialization/json.d.ts.map +1 -1
  15. package/dist/src/serialization/json.js +138 -9
  16. package/dist/src/serialization/json.js.map +1 -1
  17. package/dist/src/serialization/json.spec.js +99 -15
  18. package/dist/src/serialization/json.spec.js.map +1 -1
  19. package/dist/src/serialization/json_schema.d.ts +81 -0
  20. package/dist/src/serialization/json_schema.d.ts.map +1 -0
  21. package/dist/src/serialization/json_schema.js +305 -0
  22. package/dist/src/serialization/json_schema.js.map +1 -0
  23. package/dist/src/serialization/json_schema.spec.d.ts +2 -0
  24. package/dist/src/serialization/json_schema.spec.d.ts.map +1 -0
  25. package/dist/src/serialization/json_schema.spec.js +427 -0
  26. package/dist/src/serialization/json_schema.spec.js.map +1 -0
  27. package/dist/src/serialization/json_schema_to_type.d.ts +76 -0
  28. package/dist/src/serialization/json_schema_to_type.d.ts.map +1 -0
  29. package/dist/src/serialization/json_schema_to_type.js +576 -0
  30. package/dist/src/serialization/json_schema_to_type.js.map +1 -0
  31. package/dist/src/serialization/json_schema_to_type.spec.d.ts +2 -0
  32. package/dist/src/serialization/json_schema_to_type.spec.d.ts.map +1 -0
  33. package/dist/src/serialization/json_schema_to_type.spec.js +428 -0
  34. package/dist/src/serialization/json_schema_to_type.spec.js.map +1 -0
  35. package/package.json +2 -1
@@ -0,0 +1,428 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ import { describe, test } from "node:test";
6
+ import assert from "node:assert/strict";
7
+ import { ArrayType, BlobType, BooleanType, DateTimeType, DictType, FloatType, IntegerType, isTypeEqual, MatrixType, NullType, OptionType, printType, RecursiveType, RefType, SetType, StringType, StructType, VariantType, VectorType, } from "../types.js";
8
+ import { jsonSchemaFor } from "./json_schema.js";
9
+ import { JsonSchemaUnsupportedError, typeFromJsonSchema } from "./json_schema_to_type.js";
10
+ const LinkedListType = RecursiveType((self) => VariantType({
11
+ nil: NullType,
12
+ cons: StructType({ head: IntegerType, tail: self }),
13
+ }));
14
+ /** The ordinary linked list: an Option of the struct itself, flat at every depth. */
15
+ const ChainType = RecursiveType((self) => StructType({ head: IntegerType, next: OptionType(self) }));
16
+ /** The corpus both directions are pinned against. */
17
+ const CORPUS = [
18
+ ["Null", NullType],
19
+ ["Boolean", BooleanType],
20
+ ["Integer", IntegerType],
21
+ ["Float", FloatType],
22
+ ["String", StringType],
23
+ ["DateTime", DateTimeType],
24
+ ["Blob", BlobType],
25
+ ["Array<Integer>", ArrayType(IntegerType)],
26
+ ["Set<String>", SetType(StringType)],
27
+ ["Dict<String,Integer>", DictType(StringType, IntegerType)],
28
+ ["Struct", StructType({ a: StringType, b: IntegerType, c: DateTimeType })],
29
+ ["Variant", VariantType({ ok: IntegerType, err: StringType })],
30
+ ["Option<String>", OptionType(StringType)],
31
+ ["Ref<Integer>", RefType(IntegerType)],
32
+ ["Vector<Float>", VectorType(FloatType)],
33
+ ["Matrix<Integer>", MatrixType(IntegerType)],
34
+ ["nested", ArrayType(StructType({
35
+ id: IntegerType,
36
+ tags: SetType(StringType),
37
+ note: OptionType(StringType),
38
+ when: DateTimeType,
39
+ }))],
40
+ ["recursive", LinkedListType],
41
+ ["Array<recursive>", ArrayType(LinkedListType)],
42
+ // Every form an Option takes: flat over each kind of payload, and tagged
43
+ // over the two payloads that can themselves be null.
44
+ ["Option<Integer>", OptionType(IntegerType)],
45
+ ["Option<Float>", OptionType(FloatType)],
46
+ ["Option<Null>", OptionType(NullType)],
47
+ ["Option<Option<String>>", OptionType(OptionType(StringType))],
48
+ ["Option<Variant>", OptionType(VariantType({ ok: NullType, err: StringType }))],
49
+ ["Option<Struct>", OptionType(StructType({ a: IntegerType }))],
50
+ ["Array<Option<String>>", ArrayType(OptionType(StringType))],
51
+ ["Dict<String,Option<Integer>>", DictType(StringType, OptionType(IntegerType))],
52
+ ["Option<recursive>", OptionType(LinkedListType)],
53
+ ["chain", ChainType],
54
+ ["Option<chain>", OptionType(ChainType)],
55
+ ];
56
+ const DRAFTS = ["2020-12", "draft-07", "openapi-3.0"];
57
+ /** Assert a conversion is refused, and that it names the expected pointer. */
58
+ function refuses(schema, message, pointer) {
59
+ try {
60
+ typeFromJsonSchema(schema);
61
+ assert.fail("should have refused the schema");
62
+ }
63
+ catch (e) {
64
+ assert.ok(e instanceof JsonSchemaUnsupportedError, `expected JsonSchemaUnsupportedError, got ${e}`);
65
+ assert.match(e.message, message);
66
+ if (pointer !== undefined)
67
+ assert.equal(e.pointer, pointer);
68
+ }
69
+ }
70
+ describe("typeFromJsonSchema", () => {
71
+ describe("round-trip with jsonSchemaFor", () => {
72
+ for (const draft of DRAFTS) {
73
+ test(`inverts every corpus type exactly (${draft})`, () => {
74
+ for (const [name, type] of CORPUS) {
75
+ const back = typeFromJsonSchema(jsonSchemaFor(type, { draft }));
76
+ assert.ok(isTypeEqual(back, type), `${name}: got ${printType(back)}, want ${printType(type)}`);
77
+ }
78
+ });
79
+ }
80
+ });
81
+ describe("structural mapping for a foreign document", () => {
82
+ test("maps the primitive types", () => {
83
+ assert.ok(isTypeEqual(typeFromJsonSchema({ type: "null" }), NullType));
84
+ assert.ok(isTypeEqual(typeFromJsonSchema({ type: "boolean" }), BooleanType));
85
+ assert.ok(isTypeEqual(typeFromJsonSchema({ type: "string" }), StringType));
86
+ assert.ok(isTypeEqual(typeFromJsonSchema({ type: "number" }), FloatType));
87
+ assert.ok(isTypeEqual(typeFromJsonSchema({ type: "integer" }), IntegerType));
88
+ });
89
+ test("reads OpenAPI 3.0's nullable spelling of null", () => {
90
+ assert.ok(isTypeEqual(typeFromJsonSchema({ nullable: true, enum: [null] }), NullType));
91
+ });
92
+ test("maps an array to an Array of its items", () => {
93
+ assert.ok(isTypeEqual(typeFromJsonSchema({ type: "array", items: { type: "string" } }), ArrayType(StringType)));
94
+ });
95
+ test("maps a closed, fully-required object to a Struct", () => {
96
+ const T = typeFromJsonSchema({
97
+ type: "object",
98
+ properties: { a: { type: "string" }, b: { type: "integer" } },
99
+ required: ["a", "b"],
100
+ additionalProperties: false,
101
+ });
102
+ assert.ok(isTypeEqual(T, StructType({ a: StringType, b: IntegerType })));
103
+ });
104
+ test("maps a tagged oneOf to a Variant, in either tag spelling", () => {
105
+ const withConst = typeFromJsonSchema({
106
+ oneOf: [
107
+ {
108
+ type: "object",
109
+ properties: { type: { const: "ok" }, value: { type: "integer" } },
110
+ required: ["type", "value"], additionalProperties: false,
111
+ },
112
+ ],
113
+ });
114
+ assert.ok(isTypeEqual(withConst, VariantType({ ok: IntegerType })));
115
+ // draft-04 / OpenAPI 3.0 has no `const`.
116
+ const withEnum = typeFromJsonSchema({
117
+ oneOf: [
118
+ {
119
+ type: "object",
120
+ properties: { type: { enum: ["ok"] }, value: { type: "integer" } },
121
+ required: ["type", "value"], additionalProperties: false,
122
+ },
123
+ ],
124
+ });
125
+ assert.ok(isTypeEqual(withEnum, VariantType({ ok: IntegerType })));
126
+ });
127
+ test("without annotations, a Set is indistinguishable from an Array", () => {
128
+ // The documented limit of the best-effort mapping: uniqueItems is
129
+ // not enough to recover Set, so an un-annotated document does not
130
+ // promise to round-trip.
131
+ const T = typeFromJsonSchema({ type: "array", items: { type: "string" }, uniqueItems: true });
132
+ assert.ok(isTypeEqual(T, ArrayType(StringType)));
133
+ });
134
+ test("reads nullable beside a type as an Option of it", () => {
135
+ // East JSON writes a none whose payload cannot be null as null, so
136
+ // the nulls the contract permits are exactly what the reader accepts.
137
+ assert.ok(isTypeEqual(typeFromJsonSchema({ type: "string", nullable: true }), OptionType(StringType)));
138
+ assert.ok(isTypeEqual(typeFromJsonSchema({ type: "array", items: { type: "integer" }, nullable: true }), OptionType(ArrayType(IntegerType))));
139
+ assert.ok(isTypeEqual(typeFromJsonSchema({ $ref: "#/$defs/L", nullable: true, $defs: { L: { type: "string" } } }), OptionType(StringType)));
140
+ assert.ok(isTypeEqual(typeFromJsonSchema({
141
+ nullable: true,
142
+ oneOf: [{
143
+ type: "object", properties: { type: { const: "ok" }, value: { type: "integer" } },
144
+ required: ["type", "value"], additionalProperties: false,
145
+ }],
146
+ }), OptionType(VariantType({ ok: IntegerType }))));
147
+ assert.ok(isTypeEqual(typeFromJsonSchema({ "x-east-type": "Integer", nullable: true }), OptionType(IntegerType)));
148
+ // `nullable: false` asserts nothing.
149
+ assert.ok(isTypeEqual(typeFromJsonSchema({ type: "string", nullable: false }), StringType));
150
+ });
151
+ test("leaves nullable alone beside a spelling that already admits null", () => {
152
+ // Wrapping these would make their nulls a tagged none, which is not
153
+ // what the document says.
154
+ assert.ok(isTypeEqual(typeFromJsonSchema({ type: "null", nullable: true }), NullType));
155
+ assert.ok(isTypeEqual(typeFromJsonSchema({ type: ["string", "null"], nullable: true }), OptionType(StringType)));
156
+ const flat = jsonSchemaFor(OptionType(StringType), { draft: "openapi-3.0" });
157
+ assert.ok(isTypeEqual(typeFromJsonSchema({ ...flat, nullable: true }), OptionType(StringType)));
158
+ });
159
+ test("leaves nullable alone beside a definition or oneOf that already admits null", () => {
160
+ // Judged on the type that was built, not on the node's spelling —
161
+ // a second wrap would make the document's nulls a tagged none.
162
+ assert.ok(isTypeEqual(typeFromJsonSchema({ nullable: true, oneOf: [{ type: "null" }, { type: "string" }] }), OptionType(StringType)));
163
+ assert.ok(isTypeEqual(typeFromJsonSchema({ nullable: true, $ref: "#/$defs/Maybe", $defs: { Maybe: { type: ["string", "null"] } } }), OptionType(StringType)));
164
+ assert.ok(isTypeEqual(typeFromJsonSchema({ nullable: true, $ref: "#/$defs/Nothing", $defs: { Nothing: { type: "null" } } }), NullType));
165
+ assert.ok(isTypeEqual(typeFromJsonSchema({ nullable: true, $ref: "#/$defs/Word", $defs: { Word: { type: "string" } } }), OptionType(StringType)));
166
+ });
167
+ test("reads one type beside null in a type union as an Option of it", () => {
168
+ assert.ok(isTypeEqual(typeFromJsonSchema({ type: ["string", "null"] }), OptionType(StringType)));
169
+ assert.ok(isTypeEqual(typeFromJsonSchema({ type: ["null", "integer"] }), OptionType(IntegerType)));
170
+ assert.ok(isTypeEqual(typeFromJsonSchema({ type: ["object", "null"], properties: { a: { type: "string" } }, required: ["a"], additionalProperties: false }), OptionType(StructType({ a: StringType }))));
171
+ assert.ok(isTypeEqual(typeFromJsonSchema({ type: ["null"] }), NullType));
172
+ });
173
+ test("reads a oneOf of null and one other schema as an Option of it", () => {
174
+ assert.ok(isTypeEqual(typeFromJsonSchema({ oneOf: [{ type: "null" }, { type: "string" }] }), OptionType(StringType)));
175
+ assert.ok(isTypeEqual(typeFromJsonSchema({ oneOf: [{ type: "integer" }, { type: "null" }] }), OptionType(IntegerType)));
176
+ assert.ok(isTypeEqual(typeFromJsonSchema({ oneOf: [{ type: "null" }, { type: "array", items: { type: "string" } }] }), OptionType(ArrayType(StringType))));
177
+ // Two nulls, or none, is not that spelling: it is an untagged union.
178
+ for (const oneOf of [[{ type: "null" }, { type: "null" }], [{ type: "string" }, { type: "integer" }]]) {
179
+ assert.throws(() => typeFromJsonSchema({ oneOf }), /an untagged union is not an East variant/);
180
+ }
181
+ });
182
+ });
183
+ describe("definitions", () => {
184
+ test("resolves a self-referential definition into a RecursiveType", () => {
185
+ const schema = jsonSchemaFor(LinkedListType);
186
+ const back = typeFromJsonSchema(schema);
187
+ assert.equal(back.type, "Recursive");
188
+ assert.ok(isTypeEqual(back, LinkedListType));
189
+ });
190
+ test("reads definitions from either keyword", () => {
191
+ const modern = typeFromJsonSchema({
192
+ $ref: "#/$defs/Leaf",
193
+ $defs: { Leaf: { type: "string" } },
194
+ });
195
+ const legacy = typeFromJsonSchema({
196
+ $ref: "#/definitions/Leaf",
197
+ definitions: { Leaf: { type: "string" } },
198
+ });
199
+ assert.ok(isTypeEqual(modern, StringType));
200
+ assert.ok(isTypeEqual(legacy, StringType));
201
+ });
202
+ test("binds a two-definition cycle on one definition", () => {
203
+ // A → B → A needs one RecursiveType: B is inlined under A's binder.
204
+ const T = typeFromJsonSchema({
205
+ $ref: "#/$defs/A",
206
+ $defs: {
207
+ A: {
208
+ type: "object", properties: { b: { $ref: "#/$defs/B" } },
209
+ required: ["b"], additionalProperties: false,
210
+ },
211
+ B: {
212
+ type: "object", properties: { a: { $ref: "#/$defs/A" } },
213
+ required: ["a"], additionalProperties: false,
214
+ },
215
+ },
216
+ });
217
+ const want = RecursiveType((self) => StructType({ b: StructType({ a: self }) }));
218
+ assert.ok(isTypeEqual(T, want), `got ${printType(T)}`);
219
+ });
220
+ test("binds a cycle through an array alias, the ordinary recursive shape", () => {
221
+ // Node → NodeList → Node is how recursive schemas are usually
222
+ // written (the JSON Schema meta-schemas do it), and it is one East
223
+ // type with the alias inlined.
224
+ const $defs = {
225
+ Node: {
226
+ type: "object", properties: { children: { $ref: "#/$defs/NodeList" } },
227
+ required: ["children"], additionalProperties: false,
228
+ },
229
+ NodeList: { type: "array", items: { $ref: "#/$defs/Node" } },
230
+ };
231
+ const node = RecursiveType((self) => StructType({ children: ArrayType(self) }));
232
+ const T = typeFromJsonSchema({ $ref: "#/$defs/Node", $defs });
233
+ assert.ok(isTypeEqual(T, node), `got ${printType(T)}`);
234
+ // Entered at the alias, the same node is read as an array of it.
235
+ const list = typeFromJsonSchema({ $ref: "#/$defs/NodeList", $defs });
236
+ assert.ok(isTypeEqual(list, ArrayType(node)), `got ${printType(list)}`);
237
+ });
238
+ test("shares a cyclic alias referenced from outside its cycle", () => {
239
+ const T = typeFromJsonSchema({
240
+ $ref: "#/$defs/Root",
241
+ $defs: {
242
+ Root: {
243
+ type: "object",
244
+ properties: { a: { $ref: "#/$defs/NodeList" }, b: { $ref: "#/$defs/Node" } },
245
+ required: ["a", "b"], additionalProperties: false,
246
+ },
247
+ Node: {
248
+ type: "object", properties: { children: { $ref: "#/$defs/NodeList" } },
249
+ required: ["children"], additionalProperties: false,
250
+ },
251
+ NodeList: { type: "array", items: { $ref: "#/$defs/Node" } },
252
+ },
253
+ });
254
+ const node = RecursiveType((self) => StructType({ children: ArrayType(self) }));
255
+ assert.ok(isTypeEqual(T, StructType({ a: ArrayType(node), b: node })), `got ${printType(T)}`);
256
+ });
257
+ test("refuses a cycle group that needs two binders, naming its members", () => {
258
+ // Both definitions loop on themselves and on each other, so no one
259
+ // definition lies on every cycle — East cannot bind that.
260
+ refuses({
261
+ $ref: "#/$defs/A",
262
+ $defs: {
263
+ A: {
264
+ type: "object",
265
+ properties: { a: { $ref: "#/$defs/A" }, b: { $ref: "#/$defs/B" } },
266
+ required: ["a", "b"], additionalProperties: false,
267
+ },
268
+ B: {
269
+ type: "object",
270
+ properties: { a: { $ref: "#/$defs/A" }, b: { $ref: "#/$defs/B" } },
271
+ required: ["a", "b"], additionalProperties: false,
272
+ },
273
+ },
274
+ }, /definitions "A" and "B" are mutually recursive in a way East cannot express/, "/$defs/A");
275
+ });
276
+ test("decides recursion by reachability, never by the order references appear in", () => {
277
+ // Every ordering of the self and cross references is refused the
278
+ // same way, with the same pointer.
279
+ const props = (selfFirst, self, other) => selfFirst
280
+ ? { self: { $ref: `#/$defs/${self}` }, other: { $ref: `#/$defs/${other}` } }
281
+ : { other: { $ref: `#/$defs/${other}` }, self: { $ref: `#/$defs/${self}` } };
282
+ for (const aSelfFirst of [true, false]) {
283
+ for (const bSelfFirst of [true, false]) {
284
+ refuses({
285
+ $ref: "#/$defs/A",
286
+ $defs: {
287
+ A: { type: "object", properties: props(aSelfFirst, "A", "B"), required: ["self", "other"], additionalProperties: false },
288
+ B: { type: "object", properties: props(bSelfFirst, "B", "A"), required: ["self", "other"], additionalProperties: false },
289
+ },
290
+ }, /mutually recursive in a way East cannot express/, "/$defs/A");
291
+ }
292
+ }
293
+ });
294
+ test("treats a definition that is not a schema object as an error at its pointer", () => {
295
+ refuses({ $ref: "#/$defs/L", $defs: { L: null } }, /expected definition "L" to be a schema object/, "/$defs/L");
296
+ });
297
+ test("refuses a reference it cannot resolve", () => {
298
+ refuses({ $ref: "#/$defs/Nope" }, /no such definition/, "/$ref");
299
+ refuses({ $ref: "https://example.com/other.json" }, /only local #\/\$defs\/… references are supported/, "/$ref");
300
+ });
301
+ });
302
+ describe("the declared release", () => {
303
+ test("honours $schema on the releases it emits", () => {
304
+ for (const draft of ["2020-12", "draft-07"]) {
305
+ const schema = jsonSchemaFor(ArrayType(IntegerType), { draft });
306
+ assert.ok(schema["$schema"] !== undefined, `${draft} must stamp $schema`);
307
+ assert.ok(isTypeEqual(typeFromJsonSchema(schema), ArrayType(IntegerType)));
308
+ }
309
+ });
310
+ test("accepts a fragment carrying no $schema", () => {
311
+ // An OpenAPI 3.0 schema object lives inside an OpenAPI document and
312
+ // carries no $schema of its own, so requiring one would reject what
313
+ // jsonSchemaFor emits for that release.
314
+ const schema = jsonSchemaFor(ArrayType(IntegerType), { draft: "openapi-3.0" });
315
+ assert.equal(schema["$schema"], undefined);
316
+ assert.ok(isTypeEqual(typeFromJsonSchema(schema), ArrayType(IntegerType)));
317
+ assert.ok(isTypeEqual(typeFromJsonSchema({ type: "string" }), StringType));
318
+ });
319
+ test("refuses a release it cannot read, rather than guessing", () => {
320
+ refuses({ $schema: "http://json-schema.org/draft-04/schema#", type: "string" }, /cannot read the JSON Schema release/, "/$schema");
321
+ refuses({ $schema: "https://json-schema.org/draft/2019-09/schema", type: "string" }, /cannot read the JSON Schema release/, "/$schema");
322
+ });
323
+ test("ignores the scheme and a trailing # in $schema", () => {
324
+ // Neither is significant in a $schema value, and producers vary.
325
+ for (const uri of [
326
+ "https://json-schema.org/draft/2020-12/schema",
327
+ "http://json-schema.org/draft/2020-12/schema#",
328
+ "http://json-schema.org/draft-07/schema#",
329
+ "https://json-schema.org/draft-07/schema",
330
+ ]) {
331
+ assert.ok(isTypeEqual(typeFromJsonSchema({ $schema: uri, type: "string" }), StringType), uri);
332
+ }
333
+ });
334
+ test("refuses a non-string $schema", () => {
335
+ refuses({ $schema: 7, type: "string" }, /expected "\$schema" to be a string/, "/$schema");
336
+ });
337
+ test("resolves draft-07 definitions even though it declares them", () => {
338
+ const T = typeFromJsonSchema({
339
+ $schema: "http://json-schema.org/draft-07/schema#",
340
+ $ref: "#/definitions/Leaf",
341
+ definitions: { Leaf: { type: "string" } },
342
+ });
343
+ assert.ok(isTypeEqual(T, StringType));
344
+ });
345
+ });
346
+ describe("keywords East cannot express", () => {
347
+ const unsupported = [
348
+ ["allOf", { type: "object", allOf: [{ type: "string" }] }, /have no intersection/, "/allOf"],
349
+ ["not", { not: { type: "string" } }, /have no negation/, "/not"],
350
+ ["anyOf", { anyOf: [{ type: "string" }] }, /variants are discriminated/, "/anyOf"],
351
+ ["if", { if: { type: "string" }, then: { type: "string" } }, /have no conditionals/, "/if"],
352
+ ["patternProperties",
353
+ { type: "object", patternProperties: { "^a": { type: "string" } } },
354
+ /no pattern-keyed record/, "/patternProperties"],
355
+ ["prefixItems",
356
+ { type: "array", prefixItems: [{ type: "string" }] },
357
+ /no tuple type/, "/prefixItems"],
358
+ ];
359
+ for (const [name, schema, message, pointer] of unsupported) {
360
+ test(`refuses ${name}, naming the keyword and its pointer`, () => {
361
+ refuses(schema, message, pointer);
362
+ });
363
+ }
364
+ test("refuses an open record", () => {
365
+ refuses({ type: "object", properties: { a: { type: "string" } }, required: ["a"] }, /East structs are closed/);
366
+ });
367
+ test("refuses an optional property, pointing at it", () => {
368
+ refuses({
369
+ type: "object",
370
+ properties: { a: { type: "string" }, b: { type: "string" } },
371
+ required: ["a"],
372
+ additionalProperties: false,
373
+ }, /"b" is optional.*model it as an Option/, "/properties/b");
374
+ });
375
+ test("refuses a union of more than one type, with or without null", () => {
376
+ // Only one type beside "null" has an East reading, as an Option.
377
+ refuses({ type: ["string", "integer"] }, /East unions are discriminated variants, and only one type beside "null" reads, as an Option/, "/type");
378
+ refuses({ type: ["string", "integer", "null"] }, /cannot express a union of primitive types \[string, integer, null\]/, "/type");
379
+ });
380
+ test("refuses a malformed Option annotation, pointing at its oneOf", () => {
381
+ refuses({ "x-east-type": "Option", oneOf: [{ type: "string" }] }, /needs an Option's "oneOf" to hold exactly two alternatives/, "/oneOf");
382
+ refuses({ "x-east-type": "Option", oneOf: [{ type: "string" }, { type: "integer" }] }, /needs an Option's "oneOf" to hold one null alternative and one payload/, "/oneOf");
383
+ refuses({ "x-east-type": "Option", oneOf: [{ type: "null" }, { type: "null" }] }, /needs an Option's "oneOf" to hold one null alternative and one payload/, "/oneOf");
384
+ refuses({ "x-east-type": "Option", oneOf: [{ type: "null" }, { not: { type: "string" } }] }, /have no negation/, "/oneOf/1/not");
385
+ });
386
+ test("treats an explicit null as present, never as absent", () => {
387
+ // A null is a value the document carries; refusing it at its own
388
+ // pointer is what keeps the two language twins reading alike.
389
+ refuses({ type: "array", items: null }, /expected items to be a schema object/, "/items");
390
+ refuses({ $schema: null, type: "string" }, /expected "\$schema" to be a string/, "/$schema");
391
+ refuses({ type: null }, /does not recognise the type "null"/, "/type");
392
+ refuses({ type: null, nullable: true }, /does not recognise the type "null"/, "/type");
393
+ refuses({ type: "object", properties: null, additionalProperties: false }, /expected properties to be a schema object/, "/properties");
394
+ refuses({
395
+ oneOf: [{
396
+ type: "object", properties: { type: { const: "ok" }, value: null },
397
+ required: ["type", "value"], additionalProperties: false,
398
+ }],
399
+ }, /expected value to be a schema object/, "/oneOf/0/properties/value");
400
+ });
401
+ test("ignores entries of required that are not names", () => {
402
+ refuses({
403
+ type: "object",
404
+ properties: { a: { type: "string" } },
405
+ required: [["a"], 7, null],
406
+ additionalProperties: false,
407
+ }, /"a" is optional/, "/properties/a");
408
+ });
409
+ test("refuses an unconstrained schema", () => {
410
+ refuses({ description: "anything at all" }, /an unconstrained schema has no East type/);
411
+ });
412
+ test("refuses an untagged oneOf", () => {
413
+ refuses({ oneOf: [{ type: "string" }, { type: "number" }] }, /an untagged union is not an East variant/, "/oneOf/0");
414
+ });
415
+ test("points into the document, not just at the root", () => {
416
+ refuses({
417
+ type: "array",
418
+ items: {
419
+ type: "object",
420
+ properties: { inner: { not: { type: "string" } } },
421
+ required: ["inner"],
422
+ additionalProperties: false,
423
+ },
424
+ }, /have no negation/, "/items/properties/inner/not");
425
+ });
426
+ });
427
+ });
428
+ //# sourceMappingURL=json_schema_to_type.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json_schema_to_type.spec.js","sourceRoot":"","sources":["../../../src/serialization/json_schema_to_type.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAExC,OAAO,EACH,SAAS,EACT,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAW,EACX,UAAU,EACV,QAAQ,EACR,UAAU,EACV,SAAS,EACT,aAAa,EACb,OAAO,EACP,OAAO,EACP,UAAU,EACV,UAAU,EACV,WAAW,EACX,UAAU,GAEb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAyC,MAAM,kBAAkB,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE1F,MAAM,cAAc,GAAG,aAAa,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,WAAW,CAAC;IAC5D,GAAG,EAAE,QAAQ;IAC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AC3C,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,iCAAiC,EAAE,GAAG,EAAE;YACzC,OAAO,CAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,EAAE,0CAA0C,CAAC,CAAC;QAC5F,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,2BAA2B,EAAE,GAAG,EAAE;YACnC,OAAO,CACH,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,EACnD,0CAA0C,EAAE,UAAU,CAAC,CAAC;QAChE,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,gDAAgD,EAAE,GAAG,EAAE;YACxD,OAAO,CAAC;gBACJ,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;oBAClD,QAAQ,EAAE,CAAC,OAAO,CAAC;oBACnB,oBAAoB,EAAE,KAAK;iBAC9B;aACJ,EAAE,kBAAkB,EAAE,6BAA6B,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elaraai/east",
3
- "version": "1.0.70",
3
+ "version": "1.0.72",
4
4
  "description": "East is a simple and fast language used by Elara AI Pty Ltd.",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -43,6 +43,7 @@
43
43
  "@types/node": "^22.18.1",
44
44
  "@typescript-eslint/eslint-plugin": "^8.42.0",
45
45
  "@typescript-eslint/parser": "^8.42.0",
46
+ "ajv": "8.18.0",
46
47
  "eslint": "^9.34.0",
47
48
  "eslint-plugin-headers": "^1.3.3",
48
49
  "tsx": "^4.19.2",