@allgemein/schema-api 1.5.32 → 1.5.34

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 (166) hide show
  1. package/api/IBaseRef.js +0 -2
  2. package/api/IBuildOptions.js +0 -2
  3. package/api/IClassRef.js +1 -4
  4. package/api/IEntityRef.js +2 -6
  5. package/api/IJsonSchema.js +3 -6
  6. package/api/ILookupRegistry.js +1 -4
  7. package/api/IPropertyExtentions.js +0 -2
  8. package/api/IPropertyRef.js +1 -4
  9. package/api/ISchemaRef.js +0 -2
  10. package/api/ISerializeSupport.js +3 -6
  11. package/browser.js +5 -3
  12. package/decorators/Embeddable.js +1 -4
  13. package/decorators/Entity.js +1 -4
  14. package/decorators/Namespace.js +1 -4
  15. package/decorators/Property.js +1 -4
  16. package/decorators/PropertyOf.js +1 -4
  17. package/decorators/Schema.js +1 -4
  18. package/decorators/validate/Hostname.js +2 -4
  19. package/decorators/validate/Ip4.js +2 -4
  20. package/decorators/validate/Ip6.js +2 -4
  21. package/decorators/validate/IsEmail.js +2 -4
  22. package/decorators/validate/IsNotEmpty.js +1 -4
  23. package/decorators/validate/MaxLength.js +1 -4
  24. package/decorators/validate/MinLength.js +1 -4
  25. package/decorators/validate/Regex.js +1 -4
  26. package/decorators/validate/Required.js +1 -4
  27. package/decorators/validate/index.js +0 -2
  28. package/index.js +5 -3
  29. package/lib/AbstractRef.js +0 -2
  30. package/lib/AnnotationsHelper.js +0 -2
  31. package/lib/ClassRef.js +0 -2
  32. package/lib/Constants.d.ts +7 -7
  33. package/lib/Constants.js +0 -2
  34. package/lib/DataContainer.js +3 -2
  35. package/lib/LookupRegistry.js +0 -2
  36. package/lib/SchemaRef.js +0 -2
  37. package/lib/SchemaUtils.js +7 -3
  38. package/lib/functions.js +1 -4
  39. package/lib/json-schema/Constants.js +0 -2
  40. package/lib/json-schema/IJsonSchemaSerializeOptions.js +0 -2
  41. package/lib/json-schema/IJsonSchemaSerializer.js +0 -2
  42. package/lib/json-schema/IJsonSchemaUnserializeOptions.js +0 -2
  43. package/lib/json-schema/IJsonSchemaUnserializer.js +0 -2
  44. package/lib/json-schema/IParseOptions.js +0 -2
  45. package/lib/json-schema/JsonSchema.d.ts +1 -1
  46. package/lib/json-schema/JsonSchema.js +2 -4
  47. package/lib/json-schema/JsonSchema7.d.ts +2 -2
  48. package/lib/json-schema/JsonSchema7.js +3 -5
  49. package/lib/json-schema/JsonSchema7Serializer.js +1 -3
  50. package/lib/json-schema/JsonSchema7Unserializer.d.ts +2 -2
  51. package/lib/json-schema/JsonSchema7Unserializer.js +9 -10
  52. package/lib/json-schema/functions.js +2 -5
  53. package/lib/options/IAbstractOptions.js +0 -2
  54. package/lib/options/IAttributeOptions.js +0 -2
  55. package/lib/options/IEntityOptions.js +0 -2
  56. package/lib/options/INamedOptions.js +0 -2
  57. package/lib/options/IObjectOptions.js +0 -2
  58. package/lib/options/IPropertyOptions.js +0 -2
  59. package/lib/options/ISchemaOptions.js +0 -2
  60. package/lib/registry/AbstractRegistry.js +0 -2
  61. package/lib/registry/Binding.js +0 -2
  62. package/lib/registry/DefaultEntityRef.js +0 -2
  63. package/lib/registry/DefaultNamespacedRegistry.js +0 -2
  64. package/lib/registry/DefaultPropertyRef.js +0 -2
  65. package/lib/registry/IRegistryOptions.js +0 -2
  66. package/lib/registry/MetadataRegistry.d.ts +0 -1
  67. package/lib/registry/MetadataRegistry.js +0 -2
  68. package/lib/registry/RegistryFactory.js +0 -2
  69. package/lib/serializer/ISerializeOptions.js +0 -2
  70. package/lib/serializer/ISerializer.js +0 -2
  71. package/lib/serializer/ISerializerFactory.js +0 -2
  72. package/lib/serializer/IUnserializeOptions.js +0 -2
  73. package/lib/serializer/IUnserializer.js +0 -2
  74. package/lib/serializer/SerializerRegistry.js +0 -2
  75. package/lib/validation/DefaultValidator.js +1 -2
  76. package/lib/validation/IValidateOptions.js +0 -2
  77. package/lib/validation/IValidationError.js +0 -2
  78. package/lib/validation/IValidationMessage.js +0 -2
  79. package/lib/validation/IValidationOptions.d.ts +0 -1
  80. package/lib/validation/IValidationOptions.js +0 -2
  81. package/lib/validation/IValidationResult.js +0 -2
  82. package/lib/validation/IValidator.js +0 -2
  83. package/lib/validation/IValidatorEntry.js +0 -2
  84. package/lib/validation/IValidatorHandle.js +0 -2
  85. package/lib/validation/Validator.d.ts +2 -2
  86. package/lib/validation/Validator.js +0 -2
  87. package/package.json +7 -9
  88. package/api/IBaseRef.js.map +0 -1
  89. package/api/IBuildOptions.js.map +0 -1
  90. package/api/IClassRef.js.map +0 -1
  91. package/api/IEntityRef.js.map +0 -1
  92. package/api/IJsonSchema.js.map +0 -1
  93. package/api/ILookupRegistry.js.map +0 -1
  94. package/api/IPropertyExtentions.js.map +0 -1
  95. package/api/IPropertyRef.js.map +0 -1
  96. package/api/ISchemaRef.js.map +0 -1
  97. package/api/ISerializeSupport.js.map +0 -1
  98. package/browser.js.map +0 -1
  99. package/decorators/Embeddable.js.map +0 -1
  100. package/decorators/Entity.js.map +0 -1
  101. package/decorators/Namespace.js.map +0 -1
  102. package/decorators/Property.js.map +0 -1
  103. package/decorators/PropertyOf.js.map +0 -1
  104. package/decorators/Schema.js.map +0 -1
  105. package/decorators/validate/Hostname.js.map +0 -1
  106. package/decorators/validate/Ip4.js.map +0 -1
  107. package/decorators/validate/Ip6.js.map +0 -1
  108. package/decorators/validate/IsEmail.js.map +0 -1
  109. package/decorators/validate/IsNotEmpty.js.map +0 -1
  110. package/decorators/validate/MaxLength.js.map +0 -1
  111. package/decorators/validate/MinLength.js.map +0 -1
  112. package/decorators/validate/Regex.js.map +0 -1
  113. package/decorators/validate/Required.js.map +0 -1
  114. package/decorators/validate/index.js.map +0 -1
  115. package/index.js.map +0 -1
  116. package/lib/AbstractRef.js.map +0 -1
  117. package/lib/AnnotationsHelper.js.map +0 -1
  118. package/lib/ClassRef.js.map +0 -1
  119. package/lib/Constants.js.map +0 -1
  120. package/lib/DataContainer.js.map +0 -1
  121. package/lib/LookupRegistry.js.map +0 -1
  122. package/lib/SchemaRef.js.map +0 -1
  123. package/lib/SchemaUtils.js.map +0 -1
  124. package/lib/functions.js.map +0 -1
  125. package/lib/json-schema/Constants.js.map +0 -1
  126. package/lib/json-schema/IJsonSchemaSerializeOptions.js.map +0 -1
  127. package/lib/json-schema/IJsonSchemaSerializer.js.map +0 -1
  128. package/lib/json-schema/IJsonSchemaUnserializeOptions.js.map +0 -1
  129. package/lib/json-schema/IJsonSchemaUnserializer.js.map +0 -1
  130. package/lib/json-schema/IParseOptions.js.map +0 -1
  131. package/lib/json-schema/JsonSchema.js.map +0 -1
  132. package/lib/json-schema/JsonSchema7.js.map +0 -1
  133. package/lib/json-schema/JsonSchema7Serializer.js.map +0 -1
  134. package/lib/json-schema/JsonSchema7Unserializer.js.map +0 -1
  135. package/lib/json-schema/functions.js.map +0 -1
  136. package/lib/options/IAbstractOptions.js.map +0 -1
  137. package/lib/options/IAttributeOptions.js.map +0 -1
  138. package/lib/options/IEntityOptions.js.map +0 -1
  139. package/lib/options/INamedOptions.js.map +0 -1
  140. package/lib/options/IObjectOptions.js.map +0 -1
  141. package/lib/options/IPropertyOptions.js.map +0 -1
  142. package/lib/options/ISchemaOptions.js.map +0 -1
  143. package/lib/registry/AbstractRegistry.js.map +0 -1
  144. package/lib/registry/Binding.js.map +0 -1
  145. package/lib/registry/DefaultEntityRef.js.map +0 -1
  146. package/lib/registry/DefaultNamespacedRegistry.js.map +0 -1
  147. package/lib/registry/DefaultPropertyRef.js.map +0 -1
  148. package/lib/registry/IRegistryOptions.js.map +0 -1
  149. package/lib/registry/MetadataRegistry.js.map +0 -1
  150. package/lib/registry/RegistryFactory.js.map +0 -1
  151. package/lib/serializer/ISerializeOptions.js.map +0 -1
  152. package/lib/serializer/ISerializer.js.map +0 -1
  153. package/lib/serializer/ISerializerFactory.js.map +0 -1
  154. package/lib/serializer/IUnserializeOptions.js.map +0 -1
  155. package/lib/serializer/IUnserializer.js.map +0 -1
  156. package/lib/serializer/SerializerRegistry.js.map +0 -1
  157. package/lib/validation/DefaultValidator.js.map +0 -1
  158. package/lib/validation/IValidateOptions.js.map +0 -1
  159. package/lib/validation/IValidationError.js.map +0 -1
  160. package/lib/validation/IValidationMessage.js.map +0 -1
  161. package/lib/validation/IValidationOptions.js.map +0 -1
  162. package/lib/validation/IValidationResult.js.map +0 -1
  163. package/lib/validation/IValidator.js.map +0 -1
  164. package/lib/validation/IValidatorEntry.js.map +0 -1
  165. package/lib/validation/IValidatorHandle.js.map +0 -1
  166. package/lib/validation/Validator.js.map +0 -1
package/api/IBaseRef.js CHANGED
@@ -1,4 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
-
4
- //# sourceMappingURL=IBaseRef.js.map
@@ -1,4 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
-
4
- //# sourceMappingURL=IBuildOptions.js.map
package/api/IClassRef.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isClassRef = void 0;
3
+ exports.isClassRef = isClassRef;
4
4
  const Constants_1 = require("../lib/Constants");
5
5
  function isClassRef(x) {
6
6
  if (x !== undefined && x && x.metaType === Constants_1.METATYPE_CLASS_REF) {
@@ -8,6 +8,3 @@ function isClassRef(x) {
8
8
  }
9
9
  return false;
10
10
  }
11
- exports.isClassRef = isClassRef;
12
-
13
- //# sourceMappingURL=IClassRef.js.map
package/api/IEntityRef.js CHANGED
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isEntityRef = void 0;
3
+ exports.isEntityRef = isEntityRef;
4
4
  const Constants_1 = require("../lib/Constants");
5
5
  function isEntityRef(x) {
6
- var _a;
7
- return ((_a = x) === null || _a === void 0 ? void 0 : _a.metaType) === Constants_1.METATYPE_ENTITY;
6
+ return (x === null || x === void 0 ? void 0 : x.metaType) === Constants_1.METATYPE_ENTITY;
8
7
  }
9
- exports.isEntityRef = isEntityRef;
10
-
11
- //# sourceMappingURL=IEntityRef.js.map
@@ -1,26 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.supportsJsonSchema = exports.supportsJsonSchemaImport = exports.supportsJsonSchemaExport = void 0;
3
+ exports.supportsJsonSchemaExport = supportsJsonSchemaExport;
4
+ exports.supportsJsonSchemaImport = supportsJsonSchemaImport;
5
+ exports.supportsJsonSchema = supportsJsonSchema;
4
6
  function supportsJsonSchemaExport(x) {
5
7
  if (x.toJsonSchema) {
6
8
  return true;
7
9
  }
8
10
  return false;
9
11
  }
10
- exports.supportsJsonSchemaExport = supportsJsonSchemaExport;
11
12
  function supportsJsonSchemaImport(x) {
12
13
  if (x.fromJsonSchema) {
13
14
  return true;
14
15
  }
15
16
  return false;
16
17
  }
17
- exports.supportsJsonSchemaImport = supportsJsonSchemaImport;
18
18
  function supportsJsonSchema(x) {
19
19
  if (supportsJsonSchemaExport(x) && supportsJsonSchemaImport(x)) {
20
20
  return true;
21
21
  }
22
22
  return false;
23
23
  }
24
- exports.supportsJsonSchema = supportsJsonSchema;
25
-
26
- //# sourceMappingURL=IJsonSchema.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isLookupRegistry = void 0;
3
+ exports.isLookupRegistry = isLookupRegistry;
4
4
  const lodash_1 = require("lodash");
5
5
  function isLookupRegistry(x) {
6
6
  if (x !== undefined && x &&
@@ -12,6 +12,3 @@ function isLookupRegistry(x) {
12
12
  }
13
13
  return false;
14
14
  }
15
- exports.isLookupRegistry = isLookupRegistry;
16
-
17
- //# sourceMappingURL=ILookupRegistry.js.map
@@ -1,5 +1,3 @@
1
1
  "use strict";
2
2
  // import {METADATA_AND_BIND_TYPE} from './Constants';
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
-
5
- //# sourceMappingURL=IPropertyExtentions.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isPropertyRef = void 0;
3
+ exports.isPropertyRef = isPropertyRef;
4
4
  const Constants_1 = require("../lib/Constants");
5
5
  function isPropertyRef(x) {
6
6
  if (x !== undefined && x && x.metaType === Constants_1.METATYPE_PROPERTY) {
@@ -8,6 +8,3 @@ function isPropertyRef(x) {
8
8
  }
9
9
  return false;
10
10
  }
11
- exports.isPropertyRef = isPropertyRef;
12
-
13
- //# sourceMappingURL=IPropertyRef.js.map
package/api/ISchemaRef.js CHANGED
@@ -1,4 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
-
4
- //# sourceMappingURL=ISchemaRef.js.map
@@ -1,26 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.supportsSerialization = exports.supportsUnserialize = exports.supportsSerialize = void 0;
3
+ exports.supportsSerialize = supportsSerialize;
4
+ exports.supportsUnserialize = supportsUnserialize;
5
+ exports.supportsSerialization = supportsSerialization;
4
6
  function supportsSerialize(x) {
5
7
  if (x.serialize) {
6
8
  return true;
7
9
  }
8
10
  return false;
9
11
  }
10
- exports.supportsSerialize = supportsSerialize;
11
12
  function supportsUnserialize(x) {
12
13
  if (x.unserialize) {
13
14
  return true;
14
15
  }
15
16
  return false;
16
17
  }
17
- exports.supportsUnserialize = supportsUnserialize;
18
18
  function supportsSerialization(x) {
19
19
  if (supportsSerialize(x) && supportsUnserialize(x)) {
20
20
  return true;
21
21
  }
22
22
  return false;
23
23
  }
24
- exports.supportsSerialization = supportsSerialization;
25
-
26
- //# sourceMappingURL=ISerializeSupport.js.map
package/browser.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -106,5 +110,3 @@ var Validator_1 = require("./lib/validation/Validator");
106
110
  Object.defineProperty(exports, "Validator", { enumerable: true, get: function () { return Validator_1.Validator; } });
107
111
  var functions_1 = require("./lib/functions");
108
112
  Object.defineProperty(exports, "getClassName", { enumerable: true, get: function () { return functions_1.getClassName; } });
109
-
110
- //# sourceMappingURL=browser.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Embeddable = void 0;
3
+ exports.Embeddable = Embeddable;
4
4
  const Constants_1 = require("../lib/Constants");
5
5
  const MetadataRegistry_1 = require("../lib/registry/MetadataRegistry");
6
6
  function Embeddable(options = {}) {
@@ -9,6 +9,3 @@ function Embeddable(options = {}) {
9
9
  MetadataRegistry_1.MetadataRegistry.$().add(Constants_1.METATYPE_EMBEDDABLE, options);
10
10
  };
11
11
  }
12
- exports.Embeddable = Embeddable;
13
-
14
- //# sourceMappingURL=Embeddable.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Entity = void 0;
3
+ exports.Entity = Entity;
4
4
  const Constants_1 = require("../lib/Constants");
5
5
  const MetadataRegistry_1 = require("../lib/registry/MetadataRegistry");
6
6
  function Entity(options = {}) {
@@ -9,6 +9,3 @@ function Entity(options = {}) {
9
9
  MetadataRegistry_1.MetadataRegistry.$().add(Constants_1.METATYPE_ENTITY, options);
10
10
  };
11
11
  }
12
- exports.Entity = Entity;
13
-
14
- //# sourceMappingURL=Entity.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Namespace = void 0;
3
+ exports.Namespace = Namespace;
4
4
  const Constants_1 = require("../lib/Constants");
5
5
  const MetadataRegistry_1 = require("../lib/registry/MetadataRegistry");
6
6
  function Namespace(ns) {
@@ -19,6 +19,3 @@ function Namespace(ns) {
19
19
  MetadataRegistry_1.MetadataRegistry.$().add(Constants_1.METATYPE_NAMESPACE, options, false);
20
20
  };
21
21
  }
22
- exports.Namespace = Namespace;
23
-
24
- //# sourceMappingURL=Namespace.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Property = void 0;
3
+ exports.Property = Property;
4
4
  require("reflect-metadata");
5
5
  const lodash_1 = require("lodash");
6
6
  const base_1 = require("@allgemein/base");
@@ -54,6 +54,3 @@ function Property(typeOrOptions = null) {
54
54
  MetadataRegistry_1.MetadataRegistry.$().add(Constants_1.METATYPE_PROPERTY, options);
55
55
  };
56
56
  }
57
- exports.Property = Property;
58
-
59
- //# sourceMappingURL=Property.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PropertyOf = void 0;
3
+ exports.PropertyOf = PropertyOf;
4
4
  const lodash_1 = require("lodash");
5
5
  const MetadataRegistry_1 = require("../lib/registry/MetadataRegistry");
6
6
  const Constants_1 = require("../lib/Constants");
@@ -23,6 +23,3 @@ function PropertyOf(propertyName, entityOrOptions, options = null) {
23
23
  MetadataRegistry_1.MetadataRegistry.$().add(Constants_1.METATYPE_PROPERTY, options);
24
24
  };
25
25
  }
26
- exports.PropertyOf = PropertyOf;
27
-
28
- //# sourceMappingURL=PropertyOf.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Schema = void 0;
3
+ exports.Schema = Schema;
4
4
  const Constants_1 = require("../lib/Constants");
5
5
  const MetadataRegistry_1 = require("../lib/registry/MetadataRegistry");
6
6
  function Schema(options) {
@@ -9,6 +9,3 @@ function Schema(options) {
9
9
  MetadataRegistry_1.MetadataRegistry.$().add(Constants_1.METATYPE_SCHEMA, options);
10
10
  };
11
11
  }
12
- exports.Schema = Schema;
13
-
14
- //# sourceMappingURL=Schema.js.map
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HOSTNAME_RFC1034_REGEX = exports.HOSTNAME_RFC952_REGEX = exports.Hostname = void 0;
3
+ exports.HOSTNAME_RFC1034_REGEX = exports.HOSTNAME_RFC952_REGEX = void 0;
4
+ exports.Hostname = Hostname;
4
5
  const lodash_1 = require("lodash");
5
6
  const AnnotationsHelper_1 = require("../../lib/AnnotationsHelper");
6
7
  const DefaultValidator_1 = require("../../lib/validation/DefaultValidator");
@@ -16,7 +17,6 @@ function Hostname(options) {
16
17
  AnnotationsHelper_1.AnnotationsHelper.forPropertyOn(source.constructor, propertyName, opts, 'merge');
17
18
  };
18
19
  }
19
- exports.Hostname = Hostname;
20
20
  exports.HOSTNAME_RFC952_REGEX = /^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$/;
21
21
  exports.HOSTNAME_RFC1034_REGEX = /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/;
22
22
  DefaultValidator_1.DefaultValidator.define({
@@ -34,5 +34,3 @@ DefaultValidator_1.DefaultValidator.define({
34
34
  message: 'Value of property "%propertyName" must be a valid hostname.'
35
35
  }
36
36
  });
37
-
38
- //# sourceMappingURL=Hostname.js.map
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IP4_REGEX = exports.Ip4 = void 0;
3
+ exports.IP4_REGEX = void 0;
4
+ exports.Ip4 = Ip4;
4
5
  const AnnotationsHelper_1 = require("../../lib/AnnotationsHelper");
5
6
  const DefaultValidator_1 = require("../../lib/validation/DefaultValidator");
6
7
  const lodash_1 = require("lodash");
@@ -16,7 +17,6 @@ function Ip4(options) {
16
17
  AnnotationsHelper_1.AnnotationsHelper.forPropertyOn(source.constructor, propertyName, opts, 'merge');
17
18
  };
18
19
  }
19
- exports.Ip4 = Ip4;
20
20
  exports.IP4_REGEX = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/;
21
21
  DefaultValidator_1.DefaultValidator.define({
22
22
  name: 'ip4',
@@ -33,5 +33,3 @@ DefaultValidator_1.DefaultValidator.define({
33
33
  message: 'Value of property "%propertyName" must be a valid ip4 address.'
34
34
  }
35
35
  });
36
-
37
- //# sourceMappingURL=Ip4.js.map
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IP6_REGEX = exports.Ip6 = void 0;
3
+ exports.IP6_REGEX = void 0;
4
+ exports.Ip6 = Ip6;
4
5
  const AnnotationsHelper_1 = require("../../lib/AnnotationsHelper");
5
6
  const DefaultValidator_1 = require("../../lib/validation/DefaultValidator");
6
7
  const lodash_1 = require("lodash");
@@ -16,7 +17,6 @@ function Ip6(options) {
16
17
  AnnotationsHelper_1.AnnotationsHelper.forPropertyOn(source.constructor, propertyName, opts, 'merge');
17
18
  };
18
19
  }
19
- exports.Ip6 = Ip6;
20
20
  exports.IP6_REGEX = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
21
21
  DefaultValidator_1.DefaultValidator.define({
22
22
  name: 'ip6',
@@ -33,5 +33,3 @@ DefaultValidator_1.DefaultValidator.define({
33
33
  message: 'Value of property "%propertyName" must be a valid ip6 address.'
34
34
  }
35
35
  });
36
-
37
- //# sourceMappingURL=Ip6.js.map
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MAIL_REGEX = exports.IsEmail = void 0;
3
+ exports.MAIL_REGEX = void 0;
4
+ exports.IsEmail = IsEmail;
4
5
  const lodash_1 = require("lodash");
5
6
  const AnnotationsHelper_1 = require("../../lib/AnnotationsHelper");
6
7
  const DefaultValidator_1 = require("../../lib/validation/DefaultValidator");
@@ -16,7 +17,6 @@ function IsEmail(options = null) {
16
17
  AnnotationsHelper_1.AnnotationsHelper.forPropertyOn(source.constructor, propertyName, opts, 'merge');
17
18
  };
18
19
  }
19
- exports.IsEmail = IsEmail;
20
20
  exports.MAIL_REGEX = /(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/;
21
21
  DefaultValidator_1.DefaultValidator.define({
22
22
  name: 'email',
@@ -33,5 +33,3 @@ DefaultValidator_1.DefaultValidator.define({
33
33
  message: 'Value of property "%propertyName" must be a valid email.'
34
34
  }
35
35
  });
36
-
37
- //# sourceMappingURL=IsEmail.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IsNotEmpty = void 0;
3
+ exports.IsNotEmpty = IsNotEmpty;
4
4
  const lodash_1 = require("lodash");
5
5
  const AnnotationsHelper_1 = require("../../lib/AnnotationsHelper");
6
6
  const DefaultValidator_1 = require("../../lib/validation/DefaultValidator");
@@ -16,7 +16,6 @@ function IsNotEmpty(options) {
16
16
  AnnotationsHelper_1.AnnotationsHelper.forPropertyOn(source.constructor, propertyName, opts, 'merge');
17
17
  };
18
18
  }
19
- exports.IsNotEmpty = IsNotEmpty;
20
19
  DefaultValidator_1.DefaultValidator.define({
21
20
  name: 'isNotEmpty',
22
21
  fn: (value, opts, instance) => {
@@ -32,5 +31,3 @@ DefaultValidator_1.DefaultValidator.define({
32
31
  message: 'Property "%propertyName" must be set and be not empty.'
33
32
  }
34
33
  });
35
-
36
- //# sourceMappingURL=IsNotEmpty.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MaxLength = void 0;
3
+ exports.MaxLength = MaxLength;
4
4
  const lodash_1 = require("lodash");
5
5
  const AnnotationsHelper_1 = require("../../lib/AnnotationsHelper");
6
6
  const DefaultValidator_1 = require("../../lib/validation/DefaultValidator");
@@ -16,7 +16,6 @@ function MaxLength(value, options) {
16
16
  AnnotationsHelper_1.AnnotationsHelper.forPropertyOn(source.constructor, propertyName, opts, 'merge');
17
17
  };
18
18
  }
19
- exports.MaxLength = MaxLength;
20
19
  DefaultValidator_1.DefaultValidator.define({
21
20
  name: 'maxLength',
22
21
  fn: (value, opts, instance) => {
@@ -30,5 +29,3 @@ DefaultValidator_1.DefaultValidator.define({
30
29
  },
31
30
  involveOnOptionKey: 'maxLength'
32
31
  });
33
-
34
- //# sourceMappingURL=MaxLength.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MinLength = void 0;
3
+ exports.MinLength = MinLength;
4
4
  const lodash_1 = require("lodash");
5
5
  const AnnotationsHelper_1 = require("../../lib/AnnotationsHelper");
6
6
  const DefaultValidator_1 = require("../../lib/validation/DefaultValidator");
@@ -16,7 +16,6 @@ function MinLength(value, options) {
16
16
  AnnotationsHelper_1.AnnotationsHelper.forPropertyOn(source.constructor, propertyName, opts, 'merge');
17
17
  };
18
18
  }
19
- exports.MinLength = MinLength;
20
19
  DefaultValidator_1.DefaultValidator.define({
21
20
  name: 'minLength',
22
21
  fn: (value, opts, instance) => {
@@ -30,5 +29,3 @@ DefaultValidator_1.DefaultValidator.define({
30
29
  },
31
30
  involveOnOptionKey: 'minLength'
32
31
  });
33
-
34
- //# sourceMappingURL=MinLength.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Regex = void 0;
3
+ exports.Regex = Regex;
4
4
  const lodash_1 = require("lodash");
5
5
  const AnnotationsHelper_1 = require("../../lib/AnnotationsHelper");
6
6
  const DefaultValidator_1 = require("../../lib/validation/DefaultValidator");
@@ -25,7 +25,6 @@ function Regex(regex, options) {
25
25
  AnnotationsHelper_1.AnnotationsHelper.forPropertyOn(source.constructor, propertyName, opts, 'merge');
26
26
  };
27
27
  }
28
- exports.Regex = Regex;
29
28
  DefaultValidator_1.DefaultValidator.define({
30
29
  name: 'regex',
31
30
  fn: (value, options, instance) => {
@@ -45,5 +44,3 @@ DefaultValidator_1.DefaultValidator.define({
45
44
  },
46
45
  involveOnOptionKey: 'pattern'
47
46
  });
48
-
49
- //# sourceMappingURL=Regex.js.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Required = void 0;
3
+ exports.Required = Required;
4
4
  const lodash_1 = require("lodash");
5
5
  const AnnotationsHelper_1 = require("../../lib/AnnotationsHelper");
6
6
  const DefaultValidator_1 = require("../../lib/validation/DefaultValidator");
@@ -16,7 +16,6 @@ function Required(options) {
16
16
  AnnotationsHelper_1.AnnotationsHelper.forPropertyOn(source.constructor, propertyName, opts, 'merge');
17
17
  };
18
18
  }
19
- exports.Required = Required;
20
19
  DefaultValidator_1.DefaultValidator.define({
21
20
  name: 'required',
22
21
  fn: (value, opts, instance) => {
@@ -30,5 +29,3 @@ DefaultValidator_1.DefaultValidator.define({
30
29
  },
31
30
  involveOnOptionKey: 'required'
32
31
  });
33
-
34
- //# sourceMappingURL=Required.js.map
@@ -17,5 +17,3 @@ const MinLength_1 = require("./MinLength");
17
17
  Object.defineProperty(exports, "MinLength", { enumerable: true, get: function () { return MinLength_1.MinLength; } });
18
18
  const MaxLength_1 = require("./MaxLength");
19
19
  Object.defineProperty(exports, "MaxLength", { enumerable: true, get: function () { return MaxLength_1.MaxLength; } });
20
-
21
- //# sourceMappingURL=index.js.map
package/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -11,5 +15,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
15
  };
12
16
  Object.defineProperty(exports, "__esModule", { value: true });
13
17
  __exportStar(require("./browser"), exports);
14
-
15
- //# sourceMappingURL=index.js.map
@@ -151,5 +151,3 @@ class AbstractRef {
151
151
  }
152
152
  }
153
153
  exports.AbstractRef = AbstractRef;
154
-
155
- //# sourceMappingURL=AbstractRef.js.map
@@ -93,5 +93,3 @@ class AnnotationsHelper {
93
93
  }
94
94
  }
95
95
  exports.AnnotationsHelper = AnnotationsHelper;
96
-
97
- //# sourceMappingURL=AnnotationsHelper.js.map
package/lib/ClassRef.js CHANGED
@@ -314,5 +314,3 @@ class ClassRef extends AbstractRef_1.AbstractRef {
314
314
  }
315
315
  exports.ClassRef = ClassRef;
316
316
  ClassRef.__inc = 0;
317
-
318
- //# sourceMappingURL=ClassRef.js.map
@@ -14,18 +14,18 @@ export declare const METATYPE_NAMESPACE = "namespace";
14
14
  export declare const METATYPE_CLASS_REF = "class_ref";
15
15
  export declare const METATYPE_PROPERTY = "property";
16
16
  export declare const METATYPE_EMBEDDABLE = "object";
17
- export declare type METADATA_TYPE = 'schema' | 'object' | 'entity' | 'property' | 'class_ref' | 'namespace';
17
+ export type METADATA_TYPE = 'schema' | 'object' | 'entity' | 'property' | 'class_ref' | 'namespace';
18
18
  export declare const BINDING_SCHEMA_ENTITY = "schema_entity";
19
19
  export declare const BINDING_SCHEMA_CLASS_REF = "schema_class_ref";
20
- export declare type METADATA_AND_BIND_TYPE = METADATA_TYPE | 'schema_entity' | 'entity_property' | 'property_entity' | 'schema_class_ref';
21
- export declare type XS_DATA_TYPES = 'string' | 'number' | 'boolean' | 'entity' | 'array' | 'any';
20
+ export type METADATA_AND_BIND_TYPE = METADATA_TYPE | 'schema_entity' | 'entity_property' | 'property_entity' | 'schema_class_ref';
21
+ export type XS_DATA_TYPES = 'string' | 'number' | 'boolean' | 'entity' | 'array' | 'any';
22
22
  export declare const XS_ID_SEPARATOR = "--";
23
23
  export declare const XS_DEFAULT_SCHEMA = "default";
24
24
  export declare const METADATA_REGISTRY = "metadata/registry";
25
- export declare type ClassType<T> = {
25
+ export type ClassType<T> = {
26
26
  new (...args: any[]): T;
27
27
  };
28
- export declare type JS_DATA_TYPES = 'string' | 'text' | 'number' | 'boolean' | 'double' | 'json' | 'date' | 'time' | 'datetime' | 'timestamp' | 'byte' | 'object' | 'array' | 'symbol' | 'null' | 'undefined' | 'bigint';
28
+ export type JS_DATA_TYPES = 'string' | 'text' | 'number' | 'boolean' | 'double' | 'json' | 'date' | 'time' | 'datetime' | 'timestamp' | 'byte' | 'object' | 'array' | 'symbol' | 'null' | 'undefined' | 'bigint';
29
29
  export declare const XS_ANNOTATION_OPTIONS_CACHE = "anno_options_cache";
30
30
  export declare const JS_DATA_TYPES: JS_DATA_TYPES[];
31
31
  export declare const JS_PRIMATIVE_TYPES: JS_DATA_TYPES[];
@@ -44,8 +44,8 @@ export declare const OPT_CREAT_AND_COPY = "createAndCopy";
44
44
  export declare const STATE_KEY = "$state";
45
45
  export declare const K_PATTERN_PROPERTY = "patternProperty";
46
46
  export declare const K_TRIGGERED: unique symbol;
47
- export declare type CLASS_TYPE = Function | ClassType<any>;
48
- export declare type MERGE_TYPE = 'default' | 'assign' | 'merge';
47
+ export type CLASS_TYPE = Function | ClassType<any>;
48
+ export type MERGE_TYPE = 'default' | 'assign' | 'merge';
49
49
  export interface IMinMax {
50
50
  min: number;
51
51
  max: number;
package/lib/Constants.js CHANGED
@@ -74,5 +74,3 @@ exports.DEFAULT_KEY_TO_SKIP = [exports.C_TYPE, '$ref', 'target', 'propertyName',
74
74
  */
75
75
  exports.K_ENTITY_BUILT = '_built_';
76
76
  exports.DEFINED_PROPS_TO_OPTS = [exports.K_ENTITY_BUILT];
77
-
78
- //# sourceMappingURL=Constants.js.map
@@ -64,12 +64,15 @@ class DataContainer {
64
64
  const wrap = {};
65
65
  Object.defineProperty(wrap, str, {
66
66
  get: () => {
67
+ // @ts-ignore
67
68
  return this.instance[str];
68
69
  },
69
70
  set: (y) => {
71
+ // @ts-ignore
70
72
  this.instance[str] = y;
71
73
  }
72
74
  });
75
+ // @ts-ignore
73
76
  return wrap[str];
74
77
  }
75
78
  valid(str) {
@@ -144,5 +147,3 @@ DataContainer.keys = [
144
147
  'isSuccessValidated',
145
148
  'errors'
146
149
  ];
147
-
148
- //# sourceMappingURL=DataContainer.js.map
@@ -105,5 +105,3 @@ class LookupRegistry {
105
105
  }
106
106
  exports.LookupRegistry = LookupRegistry;
107
107
  LookupRegistry.$self = {};
108
-
109
- //# sourceMappingURL=LookupRegistry.js.map
package/lib/SchemaRef.js CHANGED
@@ -47,5 +47,3 @@ class SchemaRef extends AbstractRef_1.AbstractRef {
47
47
  }
48
48
  }
49
49
  exports.SchemaRef = SchemaRef;
50
-
51
- //# sourceMappingURL=SchemaRef.js.map
@@ -121,9 +121,13 @@ class SchemaUtils {
121
121
  throw new Error('no class found in ' + klass);
122
122
  }
123
123
  static normValue(value) {
124
- return JSON.parse(JSON.stringify(value));
124
+ try {
125
+ return JSON.parse(JSON.stringify(value));
126
+ }
127
+ catch (err) {
128
+ console.error(err);
129
+ }
130
+ return 'undefined';
125
131
  }
126
132
  }
127
133
  exports.SchemaUtils = SchemaUtils;
128
-
129
- //# sourceMappingURL=SchemaUtils.js.map
package/lib/functions.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getClassName = void 0;
3
+ exports.getClassName = getClassName;
4
4
  const IClassRef_1 = require("../api/IClassRef");
5
5
  const IEntityRef_1 = require("../api/IEntityRef");
6
6
  const base_1 = require("@allgemein/base");
@@ -15,6 +15,3 @@ function getClassName(klass) {
15
15
  return base_1.ClassUtils.getClassName(klass);
16
16
  }
17
17
  }
18
- exports.getClassName = getClassName;
19
-
20
- //# sourceMappingURL=functions.js.map
@@ -4,5 +4,3 @@ exports.C_ONLY_DECORATED = exports.DRAFT_07 = exports.JSON_SCHEMA_SERIALIZER = v
4
4
  exports.JSON_SCHEMA_SERIALIZER = 'json-schema';
5
5
  exports.DRAFT_07 = 'draft-07';
6
6
  exports.C_ONLY_DECORATED = 'onlyDecorated';
7
-
8
- //# sourceMappingURL=Constants.js.map
@@ -1,4 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
-
4
- //# sourceMappingURL=IJsonSchemaSerializeOptions.js.map
@@ -1,4 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
-
4
- //# sourceMappingURL=IJsonSchemaSerializer.js.map