@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.
- package/api/IBaseRef.js +0 -2
- package/api/IBuildOptions.js +0 -2
- package/api/IClassRef.js +1 -4
- package/api/IEntityRef.js +2 -6
- package/api/IJsonSchema.js +3 -6
- package/api/ILookupRegistry.js +1 -4
- package/api/IPropertyExtentions.js +0 -2
- package/api/IPropertyRef.js +1 -4
- package/api/ISchemaRef.js +0 -2
- package/api/ISerializeSupport.js +3 -6
- package/browser.js +5 -3
- package/decorators/Embeddable.js +1 -4
- package/decorators/Entity.js +1 -4
- package/decorators/Namespace.js +1 -4
- package/decorators/Property.js +1 -4
- package/decorators/PropertyOf.js +1 -4
- package/decorators/Schema.js +1 -4
- package/decorators/validate/Hostname.js +2 -4
- package/decorators/validate/Ip4.js +2 -4
- package/decorators/validate/Ip6.js +2 -4
- package/decorators/validate/IsEmail.js +2 -4
- package/decorators/validate/IsNotEmpty.js +1 -4
- package/decorators/validate/MaxLength.js +1 -4
- package/decorators/validate/MinLength.js +1 -4
- package/decorators/validate/Regex.js +1 -4
- package/decorators/validate/Required.js +1 -4
- package/decorators/validate/index.js +0 -2
- package/index.js +5 -3
- package/lib/AbstractRef.js +0 -2
- package/lib/AnnotationsHelper.js +0 -2
- package/lib/ClassRef.js +0 -2
- package/lib/Constants.d.ts +7 -7
- package/lib/Constants.js +0 -2
- package/lib/DataContainer.js +3 -2
- package/lib/LookupRegistry.js +0 -2
- package/lib/SchemaRef.js +0 -2
- package/lib/SchemaUtils.js +7 -3
- package/lib/functions.js +1 -4
- package/lib/json-schema/Constants.js +0 -2
- package/lib/json-schema/IJsonSchemaSerializeOptions.js +0 -2
- package/lib/json-schema/IJsonSchemaSerializer.js +0 -2
- package/lib/json-schema/IJsonSchemaUnserializeOptions.js +0 -2
- package/lib/json-schema/IJsonSchemaUnserializer.js +0 -2
- package/lib/json-schema/IParseOptions.js +0 -2
- package/lib/json-schema/JsonSchema.d.ts +1 -1
- package/lib/json-schema/JsonSchema.js +2 -4
- package/lib/json-schema/JsonSchema7.d.ts +2 -2
- package/lib/json-schema/JsonSchema7.js +3 -5
- package/lib/json-schema/JsonSchema7Serializer.js +1 -3
- package/lib/json-schema/JsonSchema7Unserializer.d.ts +2 -2
- package/lib/json-schema/JsonSchema7Unserializer.js +9 -10
- package/lib/json-schema/functions.js +2 -5
- package/lib/options/IAbstractOptions.js +0 -2
- package/lib/options/IAttributeOptions.js +0 -2
- package/lib/options/IEntityOptions.js +0 -2
- package/lib/options/INamedOptions.js +0 -2
- package/lib/options/IObjectOptions.js +0 -2
- package/lib/options/IPropertyOptions.js +0 -2
- package/lib/options/ISchemaOptions.js +0 -2
- package/lib/registry/AbstractRegistry.js +0 -2
- package/lib/registry/Binding.js +0 -2
- package/lib/registry/DefaultEntityRef.js +0 -2
- package/lib/registry/DefaultNamespacedRegistry.js +0 -2
- package/lib/registry/DefaultPropertyRef.js +0 -2
- package/lib/registry/IRegistryOptions.js +0 -2
- package/lib/registry/MetadataRegistry.d.ts +0 -1
- package/lib/registry/MetadataRegistry.js +0 -2
- package/lib/registry/RegistryFactory.js +0 -2
- package/lib/serializer/ISerializeOptions.js +0 -2
- package/lib/serializer/ISerializer.js +0 -2
- package/lib/serializer/ISerializerFactory.js +0 -2
- package/lib/serializer/IUnserializeOptions.js +0 -2
- package/lib/serializer/IUnserializer.js +0 -2
- package/lib/serializer/SerializerRegistry.js +0 -2
- package/lib/validation/DefaultValidator.js +1 -2
- package/lib/validation/IValidateOptions.js +0 -2
- package/lib/validation/IValidationError.js +0 -2
- package/lib/validation/IValidationMessage.js +0 -2
- package/lib/validation/IValidationOptions.d.ts +0 -1
- package/lib/validation/IValidationOptions.js +0 -2
- package/lib/validation/IValidationResult.js +0 -2
- package/lib/validation/IValidator.js +0 -2
- package/lib/validation/IValidatorEntry.js +0 -2
- package/lib/validation/IValidatorHandle.js +0 -2
- package/lib/validation/Validator.d.ts +2 -2
- package/lib/validation/Validator.js +0 -2
- package/package.json +7 -9
- package/api/IBaseRef.js.map +0 -1
- package/api/IBuildOptions.js.map +0 -1
- package/api/IClassRef.js.map +0 -1
- package/api/IEntityRef.js.map +0 -1
- package/api/IJsonSchema.js.map +0 -1
- package/api/ILookupRegistry.js.map +0 -1
- package/api/IPropertyExtentions.js.map +0 -1
- package/api/IPropertyRef.js.map +0 -1
- package/api/ISchemaRef.js.map +0 -1
- package/api/ISerializeSupport.js.map +0 -1
- package/browser.js.map +0 -1
- package/decorators/Embeddable.js.map +0 -1
- package/decorators/Entity.js.map +0 -1
- package/decorators/Namespace.js.map +0 -1
- package/decorators/Property.js.map +0 -1
- package/decorators/PropertyOf.js.map +0 -1
- package/decorators/Schema.js.map +0 -1
- package/decorators/validate/Hostname.js.map +0 -1
- package/decorators/validate/Ip4.js.map +0 -1
- package/decorators/validate/Ip6.js.map +0 -1
- package/decorators/validate/IsEmail.js.map +0 -1
- package/decorators/validate/IsNotEmpty.js.map +0 -1
- package/decorators/validate/MaxLength.js.map +0 -1
- package/decorators/validate/MinLength.js.map +0 -1
- package/decorators/validate/Regex.js.map +0 -1
- package/decorators/validate/Required.js.map +0 -1
- package/decorators/validate/index.js.map +0 -1
- package/index.js.map +0 -1
- package/lib/AbstractRef.js.map +0 -1
- package/lib/AnnotationsHelper.js.map +0 -1
- package/lib/ClassRef.js.map +0 -1
- package/lib/Constants.js.map +0 -1
- package/lib/DataContainer.js.map +0 -1
- package/lib/LookupRegistry.js.map +0 -1
- package/lib/SchemaRef.js.map +0 -1
- package/lib/SchemaUtils.js.map +0 -1
- package/lib/functions.js.map +0 -1
- package/lib/json-schema/Constants.js.map +0 -1
- package/lib/json-schema/IJsonSchemaSerializeOptions.js.map +0 -1
- package/lib/json-schema/IJsonSchemaSerializer.js.map +0 -1
- package/lib/json-schema/IJsonSchemaUnserializeOptions.js.map +0 -1
- package/lib/json-schema/IJsonSchemaUnserializer.js.map +0 -1
- package/lib/json-schema/IParseOptions.js.map +0 -1
- package/lib/json-schema/JsonSchema.js.map +0 -1
- package/lib/json-schema/JsonSchema7.js.map +0 -1
- package/lib/json-schema/JsonSchema7Serializer.js.map +0 -1
- package/lib/json-schema/JsonSchema7Unserializer.js.map +0 -1
- package/lib/json-schema/functions.js.map +0 -1
- package/lib/options/IAbstractOptions.js.map +0 -1
- package/lib/options/IAttributeOptions.js.map +0 -1
- package/lib/options/IEntityOptions.js.map +0 -1
- package/lib/options/INamedOptions.js.map +0 -1
- package/lib/options/IObjectOptions.js.map +0 -1
- package/lib/options/IPropertyOptions.js.map +0 -1
- package/lib/options/ISchemaOptions.js.map +0 -1
- package/lib/registry/AbstractRegistry.js.map +0 -1
- package/lib/registry/Binding.js.map +0 -1
- package/lib/registry/DefaultEntityRef.js.map +0 -1
- package/lib/registry/DefaultNamespacedRegistry.js.map +0 -1
- package/lib/registry/DefaultPropertyRef.js.map +0 -1
- package/lib/registry/IRegistryOptions.js.map +0 -1
- package/lib/registry/MetadataRegistry.js.map +0 -1
- package/lib/registry/RegistryFactory.js.map +0 -1
- package/lib/serializer/ISerializeOptions.js.map +0 -1
- package/lib/serializer/ISerializer.js.map +0 -1
- package/lib/serializer/ISerializerFactory.js.map +0 -1
- package/lib/serializer/IUnserializeOptions.js.map +0 -1
- package/lib/serializer/IUnserializer.js.map +0 -1
- package/lib/serializer/SerializerRegistry.js.map +0 -1
- package/lib/validation/DefaultValidator.js.map +0 -1
- package/lib/validation/IValidateOptions.js.map +0 -1
- package/lib/validation/IValidationError.js.map +0 -1
- package/lib/validation/IValidationMessage.js.map +0 -1
- package/lib/validation/IValidationOptions.js.map +0 -1
- package/lib/validation/IValidationResult.js.map +0 -1
- package/lib/validation/IValidator.js.map +0 -1
- package/lib/validation/IValidatorEntry.js.map +0 -1
- package/lib/validation/IValidatorHandle.js.map +0 -1
- package/lib/validation/Validator.js.map +0 -1
package/api/IBaseRef.js
CHANGED
package/api/IBuildOptions.js
CHANGED
package/api/IClassRef.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isClassRef =
|
|
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 =
|
|
3
|
+
exports.isEntityRef = isEntityRef;
|
|
4
4
|
const Constants_1 = require("../lib/Constants");
|
|
5
5
|
function isEntityRef(x) {
|
|
6
|
-
|
|
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
|
package/api/IJsonSchema.js
CHANGED
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
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
|
package/api/ILookupRegistry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isLookupRegistry =
|
|
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
|
package/api/IPropertyRef.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isPropertyRef =
|
|
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
package/api/ISerializeSupport.js
CHANGED
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
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.
|
|
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
|
package/decorators/Embeddable.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Embeddable =
|
|
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
|
package/decorators/Entity.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Entity =
|
|
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
|
package/decorators/Namespace.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Namespace =
|
|
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
|
package/decorators/Property.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Property =
|
|
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
|
package/decorators/PropertyOf.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PropertyOf =
|
|
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
|
package/decorators/Schema.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Schema =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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.
|
|
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
|
package/lib/AbstractRef.js
CHANGED
package/lib/AnnotationsHelper.js
CHANGED
package/lib/ClassRef.js
CHANGED
package/lib/Constants.d.ts
CHANGED
|
@@ -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
|
|
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
|
|
21
|
-
export
|
|
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
|
|
25
|
+
export type ClassType<T> = {
|
|
26
26
|
new (...args: any[]): T;
|
|
27
27
|
};
|
|
28
|
-
export
|
|
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
|
|
48
|
-
export
|
|
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
package/lib/DataContainer.js
CHANGED
|
@@ -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
|
package/lib/LookupRegistry.js
CHANGED
package/lib/SchemaRef.js
CHANGED
package/lib/SchemaUtils.js
CHANGED
|
@@ -121,9 +121,13 @@ class SchemaUtils {
|
|
|
121
121
|
throw new Error('no class found in ' + klass);
|
|
122
122
|
}
|
|
123
123
|
static normValue(value) {
|
|
124
|
-
|
|
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 =
|
|
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
|