@trayio/commons 4.4.2 → 4.6.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.
@@ -4,13 +4,12 @@ import * as t from 'io-ts';
4
4
  import { DynamicObject } from '../dynamictype/DynamicType';
5
5
  declare const dynamicSchemaTypeDescriptor: t.BrandC<t.Type<DynamicObject, DynamicObject, unknown>, DynamicSchemaBrand>;
6
6
  export type DynamicSchema = t.TypeOf<typeof dynamicSchemaTypeDescriptor>;
7
- export declare const recursivelyRemoveEmptyRequiredAndAddAdditionalProperties: (schema: DynamicObject, strict: O.Option<boolean>) => void;
8
7
  export interface DynamicSchemaBrand {
9
8
  readonly DynamicSchema: unique symbol;
10
9
  }
11
10
  export interface DynamicSchemaInterface {
12
- fromDynamicObject: (schemaObj: DynamicObject) => E.Either<Error, DynamicSchema>;
13
- validate: (schema: DynamicSchema | DynamicObject, value: DynamicObject, strict: O.Option<boolean>) => E.Either<Error, undefined>;
11
+ fromDynamicObject: (schema: DynamicObject, strict?: O.Option<boolean>) => E.Either<Error, DynamicSchema>;
12
+ validate: (schema: DynamicSchema | DynamicObject, value: DynamicObject, strict?: O.Option<boolean>) => E.Either<Error, undefined>;
14
13
  }
15
14
  export declare const DynamicSchema: DynamicSchemaInterface;
16
15
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"DynamicSchema.d.ts","sourceRoot":"","sources":["../../src/dynamicschema/DynamicSchema.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,KAAK,CAAC,MAAM,OAAO,CAAC;AAG3B,OAAO,EACN,aAAa,EAEb,MAAM,4BAA4B,CAAC;AAqBpC,QAAA,MAAM,2BAA2B,6EAKhC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAMzE,eAAO,MA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aAAa,GAAG,aAAa,EACrC,KAAK,EAAE,aAAa,EACpB,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,KACtB,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;CAChC;AAED,eAAO,MAAM,aAAa,EAAE,sBA8B3B,CAAC"}
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.DynamicSchema = exports.recursivelyRemoveEmptyRequiredAndAddAdditionalProperties = void 0;
29
+ exports.DynamicSchema = void 0;
30
30
  const ajv_draft_04_1 = __importDefault(require("ajv-draft-04"));
31
31
  const ajv_formats_1 = __importDefault(require("ajv-formats"));
32
32
  const E = __importStar(require("fp-ts/Either"));
@@ -54,14 +54,15 @@ const isDynamicSchema = (o) => {
54
54
  };
55
55
  const dynamicSchemaTypeDescriptor = t.brand(DynamicType_1.dynamicObjectTypeDescriptor, (input) => isDynamicSchema(input), 'DynamicSchema');
56
56
  const dynamicSchemaTypeCodec = TypeCodec_1.TypeCodec.fromDescriptor(dynamicSchemaTypeDescriptor);
57
- const recursivelyRemoveEmptyRequiredAndAddAdditionalProperties = (schema, strict) => {
57
+ const preprocessSchema = (schema, strict) => {
58
58
  const hasStrict = O.isSome(strict);
59
+ delete schema.$schema;
59
60
  if (schema.oneOf || schema.anyOf || schema.allOf) {
60
61
  const schemas = (schema.oneOf ||
61
62
  schema.anyOf ||
62
63
  schema.allOf);
63
64
  schemas.forEach((subSchema) => {
64
- (0, exports.recursivelyRemoveEmptyRequiredAndAddAdditionalProperties)(subSchema, strict);
65
+ preprocessSchema(subSchema, strict);
65
66
  });
66
67
  }
67
68
  if (schema.properties) {
@@ -77,20 +78,23 @@ const recursivelyRemoveEmptyRequiredAndAddAdditionalProperties = (schema, strict
77
78
  Object.keys(properties).forEach((key) => {
78
79
  const property = properties[key];
79
80
  if (property.type === 'object' || property.type === 'array') {
80
- (0, exports.recursivelyRemoveEmptyRequiredAndAddAdditionalProperties)(property, strict);
81
+ preprocessSchema(property, strict);
81
82
  }
82
83
  });
83
84
  }
84
85
  if (schema.type === 'array') {
85
- (0, exports.recursivelyRemoveEmptyRequiredAndAddAdditionalProperties)(schema.items, strict);
86
+ preprocessSchema(schema.items, strict);
86
87
  }
87
88
  };
88
- exports.recursivelyRemoveEmptyRequiredAndAddAdditionalProperties = recursivelyRemoveEmptyRequiredAndAddAdditionalProperties;
89
89
  exports.DynamicSchema = {
90
- fromDynamicObject: (schemaObj) => (0, function_1.pipe)(dynamicSchemaTypeCodec.decode(schemaObj), E.mapLeft((e) => new Error(`Failed to create DynamicSchema: ${e}`))),
91
- validate: (schema, value, strict) => {
90
+ fromDynamicObject: (schema, strict = O.none) => {
92
91
  const copiedSchema = (0, deep_copy_ts_1.deepCopy)(schema);
93
- (0, exports.recursivelyRemoveEmptyRequiredAndAddAdditionalProperties)(copiedSchema, strict);
92
+ preprocessSchema(copiedSchema, strict);
93
+ return (0, function_1.pipe)(dynamicSchemaTypeCodec.decode(copiedSchema), E.mapLeft((e) => new Error(`Failed to create DynamicSchema: ${e}`)));
94
+ },
95
+ validate: (schema, value, strict = O.none) => {
96
+ const copiedSchema = (0, deep_copy_ts_1.deepCopy)(schema);
97
+ preprocessSchema(copiedSchema, strict);
94
98
  const validateE = (0, Try_1.tryToEither)(() => ajv.compile(copiedSchema));
95
99
  return (0, function_1.pipe)(validateE, E.chain((validate) => {
96
100
  if (validate(value)) {
@@ -64,7 +64,6 @@ describe('DynamicSchema', () => {
64
64
  describe('fromDynamicObject', () => {
65
65
  it('should return a Right DynamicSchema when given a valid schema object', () => {
66
66
  const result = DynamicSchema_1.DynamicSchema.fromDynamicObject(validSchema);
67
- console.log(JSON.stringify(result));
68
67
  expect(E.isRight(result)).toBe(true);
69
68
  if (E.isRight(result)) {
70
69
  expect(result.right).toEqual(validSchema);
@@ -78,40 +77,35 @@ describe('DynamicSchema', () => {
78
77
  expect(result.left.message).toContain('Failed to create DynamicSchema:');
79
78
  }
80
79
  });
81
- });
82
- describe('validate', () => {
83
- it('should return a Right undefined when the value matches the schema', () => {
84
- const schema = DynamicSchema_1.DynamicSchema.fromDynamicObject(validSchema);
85
- if (E.isRight(schema)) {
86
- const result = DynamicSchema_1.DynamicSchema.validate(schema.right, value, O.none);
87
- expect(E.isRight(result)).toBe(true);
88
- if (E.isRight(result)) {
89
- expect(result.right).toBeUndefined();
90
- }
91
- }
92
- });
93
- it('should return a Right undefined when strict is false and value matches the schema', () => {
94
- const schema = DynamicSchema_1.DynamicSchema.fromDynamicObject(validSchema);
95
- if (E.isRight(schema)) {
96
- const result = DynamicSchema_1.DynamicSchema.validate(schema.right, value, O.some(false));
97
- expect(E.isRight(result)).toBe(true);
98
- if (E.isRight(result)) {
99
- expect(result.right).toBeUndefined();
100
- }
101
- }
102
- });
103
- it('should return a Left Error when the value does not match the schema', () => {
104
- const schema = DynamicSchema_1.DynamicSchema.fromDynamicObject(validSchema);
105
- if (E.isRight(schema)) {
106
- const result = DynamicSchema_1.DynamicSchema.validate(schema.right, invalidSchema, O.none);
107
- expect(E.isLeft(result)).toBe(true);
108
- if (E.isLeft(result)) {
109
- expect(result.left).toBeInstanceOf(Error);
110
- }
111
- }
80
+ it('should remove empty $schema property', () => {
81
+ const schema = {
82
+ type: 'object',
83
+ properties: {
84
+ name: {
85
+ type: 'string',
86
+ },
87
+ age: {
88
+ type: 'number',
89
+ },
90
+ },
91
+ advanced: [],
92
+ $schema: 'http://json-schema.org/draft-07/schema#',
93
+ };
94
+ const expectedSchema = {
95
+ type: 'object',
96
+ properties: {
97
+ name: {
98
+ type: 'string',
99
+ },
100
+ age: {
101
+ type: 'number',
102
+ },
103
+ },
104
+ advanced: [],
105
+ };
106
+ const actualSchemaE = DynamicSchema_1.DynamicSchema.fromDynamicObject(schema, O.none);
107
+ expect(actualSchemaE).toEqual(E.right(expectedSchema));
112
108
  });
113
- });
114
- describe('recursivelyRemoveEmptyRequiredAndAddAdditionalProperties', () => {
115
109
  it('should correctly remove empty required arrays and not add additionalProperties when strict is not set', () => {
116
110
  const schema = {
117
111
  type: 'object',
@@ -138,8 +132,8 @@ describe('DynamicSchema', () => {
138
132
  },
139
133
  advanced: [],
140
134
  };
141
- (0, DynamicSchema_1.recursivelyRemoveEmptyRequiredAndAddAdditionalProperties)(schema, O.none);
142
- expect(schema).toEqual(expectedSchema);
135
+ const actualSchemaE = DynamicSchema_1.DynamicSchema.fromDynamicObject(schema, O.none);
136
+ expect(actualSchemaE).toEqual(E.right(expectedSchema));
143
137
  });
144
138
  it('should correctly keep populated required arrays and not add additionalProperties when strict is not set', () => {
145
139
  const schema = {
@@ -168,8 +162,8 @@ describe('DynamicSchema', () => {
168
162
  required: ['age', 'name'],
169
163
  advanced: [],
170
164
  };
171
- (0, DynamicSchema_1.recursivelyRemoveEmptyRequiredAndAddAdditionalProperties)(schema, O.none);
172
- expect(schema).toEqual(expectedSchema);
165
+ const actualSchemaE = DynamicSchema_1.DynamicSchema.fromDynamicObject(schema, O.none);
166
+ expect(actualSchemaE).toEqual(E.right(expectedSchema));
173
167
  });
174
168
  it('should correctly remove empty required and add additionalProperties=true to object schema when strict is set', () => {
175
169
  const schema = {
@@ -198,8 +192,8 @@ describe('DynamicSchema', () => {
198
192
  advanced: [],
199
193
  additionalProperties: true,
200
194
  };
201
- (0, DynamicSchema_1.recursivelyRemoveEmptyRequiredAndAddAdditionalProperties)(schema, O.some(false));
202
- expect(schema).toEqual(expectedSchema);
195
+ const actualSchemaE = DynamicSchema_1.DynamicSchema.fromDynamicObject(schema, O.some(false));
196
+ expect(actualSchemaE).toEqual(E.right(expectedSchema));
203
197
  });
204
198
  it('should correctly add additionalProperties=false to object schema', () => {
205
199
  const schema = validSchema;
@@ -217,8 +211,8 @@ describe('DynamicSchema', () => {
217
211
  advanced: [],
218
212
  additionalProperties: false,
219
213
  };
220
- (0, DynamicSchema_1.recursivelyRemoveEmptyRequiredAndAddAdditionalProperties)(schema, O.some(true));
221
- expect(schema).toEqual(expectedSchema);
214
+ const actualSchemaE = DynamicSchema_1.DynamicSchema.fromDynamicObject(schema, O.some(true));
215
+ expect(actualSchemaE).toEqual(E.right(expectedSchema));
222
216
  });
223
217
  it('should correctly add additionalProperties=true to complex object schema', () => {
224
218
  const schema = {
@@ -284,15 +278,15 @@ describe('DynamicSchema', () => {
284
278
  },
285
279
  additionalProperties: true,
286
280
  };
287
- (0, DynamicSchema_1.recursivelyRemoveEmptyRequiredAndAddAdditionalProperties)(schema, O.some(false));
288
- expect(schema).toEqual(expectedSchema);
281
+ const actualSchemaE = DynamicSchema_1.DynamicSchema.fromDynamicObject(schema, O.some(false));
282
+ expect(actualSchemaE).toEqual(E.right(expectedSchema));
289
283
  });
290
284
  it('should skip mutation if there is no object type schema', () => {
291
285
  const schema = {
292
286
  type: 'string',
293
287
  };
294
- (0, DynamicSchema_1.recursivelyRemoveEmptyRequiredAndAddAdditionalProperties)(schema, O.some(true));
295
- expect(schema).toEqual(schema);
288
+ const actualSchemaE = DynamicSchema_1.DynamicSchema.fromDynamicObject(schema, O.some(true));
289
+ expect(actualSchemaE).toEqual(E.right(schema));
296
290
  });
297
291
  it('should correctly add additionalProperties=true to oneOf schemas', () => {
298
292
  const schema = {
@@ -339,8 +333,8 @@ describe('DynamicSchema', () => {
339
333
  },
340
334
  ],
341
335
  };
342
- (0, DynamicSchema_1.recursivelyRemoveEmptyRequiredAndAddAdditionalProperties)(schema, O.some(false));
343
- expect(schema).toEqual(expectedSchema);
336
+ const actualSchemaE = DynamicSchema_1.DynamicSchema.fromDynamicObject(schema, O.some(false));
337
+ expect(actualSchemaE).toEqual(E.right(expectedSchema));
344
338
  });
345
339
  it('should correctly add additionalProperties=true to anyOf schemas', () => {
346
340
  const schema = {
@@ -387,8 +381,8 @@ describe('DynamicSchema', () => {
387
381
  },
388
382
  ],
389
383
  };
390
- (0, DynamicSchema_1.recursivelyRemoveEmptyRequiredAndAddAdditionalProperties)(schema, O.some(false));
391
- expect(schema).toEqual(expectedSchema);
384
+ const actualSchemaE = DynamicSchema_1.DynamicSchema.fromDynamicObject(schema, O.some(false));
385
+ expect(actualSchemaE).toEqual(E.right(expectedSchema));
392
386
  });
393
387
  it('should correctly add additionalProperties=true to allOf schemas', () => {
394
388
  const schema = {
@@ -435,8 +429,40 @@ describe('DynamicSchema', () => {
435
429
  },
436
430
  ],
437
431
  };
438
- (0, DynamicSchema_1.recursivelyRemoveEmptyRequiredAndAddAdditionalProperties)(schema, O.some(false));
439
- expect(schema).toEqual(expectedSchema);
432
+ const actualSchemaE = DynamicSchema_1.DynamicSchema.fromDynamicObject(schema, O.some(false));
433
+ expect(actualSchemaE).toEqual(E.right(expectedSchema));
434
+ });
435
+ });
436
+ describe('validate', () => {
437
+ it('should return a Right undefined when the value matches the schema', () => {
438
+ const schema = DynamicSchema_1.DynamicSchema.fromDynamicObject(validSchema);
439
+ if (E.isRight(schema)) {
440
+ const result = DynamicSchema_1.DynamicSchema.validate(schema.right, value, O.none);
441
+ expect(E.isRight(result)).toBe(true);
442
+ if (E.isRight(result)) {
443
+ expect(result.right).toBeUndefined();
444
+ }
445
+ }
446
+ });
447
+ it('should return a Right undefined when strict is false and value matches the schema', () => {
448
+ const schema = DynamicSchema_1.DynamicSchema.fromDynamicObject(validSchema);
449
+ if (E.isRight(schema)) {
450
+ const result = DynamicSchema_1.DynamicSchema.validate(schema.right, value, O.some(false));
451
+ expect(E.isRight(result)).toBe(true);
452
+ if (E.isRight(result)) {
453
+ expect(result.right).toBeUndefined();
454
+ }
455
+ }
456
+ });
457
+ it('should return a Left Error when the value does not match the schema', () => {
458
+ const schema = DynamicSchema_1.DynamicSchema.fromDynamicObject(validSchema);
459
+ if (E.isRight(schema)) {
460
+ const result = DynamicSchema_1.DynamicSchema.validate(schema.right, invalidSchema, O.none);
461
+ expect(E.isLeft(result)).toBe(true);
462
+ if (E.isLeft(result)) {
463
+ expect(result.left).toBeInstanceOf(Error);
464
+ }
465
+ }
440
466
  });
441
467
  });
442
468
  });
@@ -2,7 +2,7 @@ import * as TE from 'fp-ts/TaskEither';
2
2
  import * as E from 'fp-ts/Either';
3
3
  import * as t from 'io-ts';
4
4
  import { Codec } from '../codec/Codec';
5
- export type DynamicType = string | number | boolean | null | undefined | DynamicObject | DynamicArray;
5
+ export type DynamicType = string | number | boolean | null | DynamicObject | DynamicArray;
6
6
  export type DynamicObject = {
7
7
  [x: string]: DynamicType;
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DynamicType.d.ts","sourceRoot":"","sources":["../../src/dynamictype/DynamicType.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAGvC,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAElC,OAAO,KAAK,CAAC,MAAM,OAAO,CAAC;AAE3B,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,MAAM,MAAM,WAAW,GACpB,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,GACT,aAAa,GACb,YAAY,CAAC;AAEhB,MAAM,MAAM,aAAa,GAAG;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;CAAE,CAAC;AAEzD,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC;AAE9C,MAAM,WAAW,oBAAoB;IACpC,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IAC7D,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAC9E,gBAAgB,EAAE,CACjB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,WAAW,KACd,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,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,gBAAgB,EAAE,CACjB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,WAAW,KACd,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IACrC,QAAQ,EAAE,CAAC,CAAC,EACX,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KACX,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;CACxB;AAED,eAAO,MAAM,WAAW,EAAE,oBAuBzB,CAAC;AACF,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAWrD,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAG7D,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,IAAI,CAAC,YAAY,CAG3D,CAAC"}
@@ -42,7 +42,6 @@ exports.dynamicTypeDescriptor = t.recursion('DynamicType', () => t.union([
42
42
  t.number,
43
43
  t.boolean,
44
44
  t.null,
45
- t.undefined,
46
45
  exports.dynamicObjectTypeDescriptor,
47
46
  exports.dynamicArrayTypeDescriptor,
48
47
  ]));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trayio/commons",
3
- "version": "4.4.2",
3
+ "version": "4.6.0",
4
4
  "description": "Extensions to the standard/core libraries and basic features",
5
5
  "exports": {
6
6
  "./*": "./dist/*.js"