@pristine-ts/data-mapping 0.0.277
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/LICENSE +201 -0
- package/dist/lib/cjs/builders/builders.js +18 -0
- package/dist/lib/cjs/builders/builders.js.map +1 -0
- package/dist/lib/cjs/builders/data-mapping.builder.js +178 -0
- package/dist/lib/cjs/builders/data-mapping.builder.js.map +1 -0
- package/dist/lib/cjs/data-mapping.module.js +38 -0
- package/dist/lib/cjs/data-mapping.module.js.map +1 -0
- package/dist/lib/cjs/data-mapping.module.keyname.js +5 -0
- package/dist/lib/cjs/data-mapping.module.keyname.js.map +1 -0
- package/dist/lib/cjs/enums/data-mapping-node-type.enum.js +11 -0
- package/dist/lib/cjs/enums/data-mapping-node-type.enum.js.map +1 -0
- package/dist/lib/cjs/enums/enums.js +18 -0
- package/dist/lib/cjs/enums/enums.js.map +1 -0
- package/dist/lib/cjs/errors/array-data-mapping-node-invalid-source-property-type.error.js +20 -0
- package/dist/lib/cjs/errors/array-data-mapping-node-invalid-source-property-type.error.js.map +1 -0
- package/dist/lib/cjs/errors/data-after-mapping-interceptor-already-added.error.js +21 -0
- package/dist/lib/cjs/errors/data-after-mapping-interceptor-already-added.error.js.map +1 -0
- package/dist/lib/cjs/errors/data-before-mapping-interceptor-already-added.error.js +21 -0
- package/dist/lib/cjs/errors/data-before-mapping-interceptor-already-added.error.js.map +1 -0
- package/dist/lib/cjs/errors/data-mapping-interceptor-not-found.error.js +21 -0
- package/dist/lib/cjs/errors/data-mapping-interceptor-not-found.error.js.map +1 -0
- package/dist/lib/cjs/errors/data-mapping-source-property-not-found.error.js +20 -0
- package/dist/lib/cjs/errors/data-mapping-source-property-not-found.error.js.map +1 -0
- package/dist/lib/cjs/errors/data-normalizer-already-added.error.js +21 -0
- package/dist/lib/cjs/errors/data-normalizer-already-added.error.js.map +1 -0
- package/dist/lib/cjs/errors/errors.js +25 -0
- package/dist/lib/cjs/errors/errors.js.map +1 -0
- package/dist/lib/cjs/errors/normalizer-invalid-source-type.error.js +23 -0
- package/dist/lib/cjs/errors/normalizer-invalid-source-type.error.js.map +1 -0
- package/dist/lib/cjs/errors/undefined-source-property.error.js +20 -0
- package/dist/lib/cjs/errors/undefined-source-property.error.js.map +1 -0
- package/dist/lib/cjs/interceptors/default-data-mapping.interceptor.js +44 -0
- package/dist/lib/cjs/interceptors/default-data-mapping.interceptor.js.map +1 -0
- package/dist/lib/cjs/interceptors/interceptors.js +18 -0
- package/dist/lib/cjs/interceptors/interceptors.js.map +1 -0
- package/dist/lib/cjs/interfaces/data-mapping-interceptor.interface.js +3 -0
- package/dist/lib/cjs/interfaces/data-mapping-interceptor.interface.js.map +1 -0
- package/dist/lib/cjs/interfaces/data-normalizer.interface.js +3 -0
- package/dist/lib/cjs/interfaces/data-normalizer.interface.js.map +1 -0
- package/dist/lib/cjs/interfaces/interfaces.js +19 -0
- package/dist/lib/cjs/interfaces/interfaces.js.map +1 -0
- package/dist/lib/cjs/mappers/data.mapper.js +112 -0
- package/dist/lib/cjs/mappers/data.mapper.js.map +1 -0
- package/dist/lib/cjs/mappers/mappers.js +18 -0
- package/dist/lib/cjs/mappers/mappers.js.map +1 -0
- package/dist/lib/cjs/nodes/base-data-mapping.node.js +24 -0
- package/dist/lib/cjs/nodes/base-data-mapping.node.js.map +1 -0
- package/dist/lib/cjs/nodes/data-mapping.leaf.js +184 -0
- package/dist/lib/cjs/nodes/data-mapping.leaf.js.map +1 -0
- package/dist/lib/cjs/nodes/data-mapping.node.js +202 -0
- package/dist/lib/cjs/nodes/data-mapping.node.js.map +1 -0
- package/dist/lib/cjs/nodes/nodes.js +20 -0
- package/dist/lib/cjs/nodes/nodes.js.map +1 -0
- package/dist/lib/cjs/normalizer-options/base-normalizer.options.js +11 -0
- package/dist/lib/cjs/normalizer-options/base-normalizer.options.js.map +1 -0
- package/dist/lib/cjs/normalizer-options/lowercase-normalizer.options.js +11 -0
- package/dist/lib/cjs/normalizer-options/lowercase-normalizer.options.js.map +1 -0
- package/dist/lib/cjs/normalizer-options/normalizer-options.js +19 -0
- package/dist/lib/cjs/normalizer-options/normalizer-options.js.map +1 -0
- package/dist/lib/cjs/normalizers/lowercase.normalizer.js +33 -0
- package/dist/lib/cjs/normalizers/lowercase.normalizer.js.map +1 -0
- package/dist/lib/cjs/normalizers/normalizers.js +18 -0
- package/dist/lib/cjs/normalizers/normalizers.js.map +1 -0
- package/dist/lib/cjs/types/data-mapping-interceptor-unique-key.type.js +3 -0
- package/dist/lib/cjs/types/data-mapping-interceptor-unique-key.type.js.map +1 -0
- package/dist/lib/cjs/types/data-normalizer-unique-key.type.js +3 -0
- package/dist/lib/cjs/types/data-normalizer-unique-key.type.js.map +1 -0
- package/dist/lib/cjs/types/types.js +19 -0
- package/dist/lib/cjs/types/types.js.map +1 -0
- package/dist/lib/esm/builders/builders.js +2 -0
- package/dist/lib/esm/builders/builders.js.map +1 -0
- package/dist/lib/esm/builders/data-mapping.builder.js +174 -0
- package/dist/lib/esm/builders/data-mapping.builder.js.map +1 -0
- package/dist/lib/esm/data-mapping.module.js +21 -0
- package/dist/lib/esm/data-mapping.module.js.map +1 -0
- package/dist/lib/esm/data-mapping.module.keyname.js +2 -0
- package/dist/lib/esm/data-mapping.module.keyname.js.map +1 -0
- package/dist/lib/esm/enums/data-mapping-node-type.enum.js +8 -0
- package/dist/lib/esm/enums/data-mapping-node-type.enum.js.map +1 -0
- package/dist/lib/esm/enums/enums.js +2 -0
- package/dist/lib/esm/enums/enums.js.map +1 -0
- package/dist/lib/esm/errors/array-data-mapping-node-invalid-source-property-type.error.js +16 -0
- package/dist/lib/esm/errors/array-data-mapping-node-invalid-source-property-type.error.js.map +1 -0
- package/dist/lib/esm/errors/data-after-mapping-interceptor-already-added.error.js +17 -0
- package/dist/lib/esm/errors/data-after-mapping-interceptor-already-added.error.js.map +1 -0
- package/dist/lib/esm/errors/data-before-mapping-interceptor-already-added.error.js +17 -0
- package/dist/lib/esm/errors/data-before-mapping-interceptor-already-added.error.js.map +1 -0
- package/dist/lib/esm/errors/data-mapping-interceptor-not-found.error.js +17 -0
- package/dist/lib/esm/errors/data-mapping-interceptor-not-found.error.js.map +1 -0
- package/dist/lib/esm/errors/data-mapping-source-property-not-found.error.js +16 -0
- package/dist/lib/esm/errors/data-mapping-source-property-not-found.error.js.map +1 -0
- package/dist/lib/esm/errors/data-normalizer-already-added.error.js +17 -0
- package/dist/lib/esm/errors/data-normalizer-already-added.error.js.map +1 -0
- package/dist/lib/esm/errors/errors.js +9 -0
- package/dist/lib/esm/errors/errors.js.map +1 -0
- package/dist/lib/esm/errors/normalizer-invalid-source-type.error.js +19 -0
- package/dist/lib/esm/errors/normalizer-invalid-source-type.error.js.map +1 -0
- package/dist/lib/esm/errors/undefined-source-property.error.js +16 -0
- package/dist/lib/esm/errors/undefined-source-property.error.js.map +1 -0
- package/dist/lib/esm/interceptors/default-data-mapping.interceptor.js +41 -0
- package/dist/lib/esm/interceptors/default-data-mapping.interceptor.js.map +1 -0
- package/dist/lib/esm/interceptors/interceptors.js +2 -0
- package/dist/lib/esm/interceptors/interceptors.js.map +1 -0
- package/dist/lib/esm/interfaces/data-mapping-interceptor.interface.js +2 -0
- package/dist/lib/esm/interfaces/data-mapping-interceptor.interface.js.map +1 -0
- package/dist/lib/esm/interfaces/data-normalizer.interface.js +2 -0
- package/dist/lib/esm/interfaces/data-normalizer.interface.js.map +1 -0
- package/dist/lib/esm/interfaces/interfaces.js +3 -0
- package/dist/lib/esm/interfaces/interfaces.js.map +1 -0
- package/dist/lib/esm/mappers/data.mapper.js +109 -0
- package/dist/lib/esm/mappers/data.mapper.js.map +1 -0
- package/dist/lib/esm/mappers/mappers.js +2 -0
- package/dist/lib/esm/mappers/mappers.js.map +1 -0
- package/dist/lib/esm/nodes/base-data-mapping.node.js +20 -0
- package/dist/lib/esm/nodes/base-data-mapping.node.js.map +1 -0
- package/dist/lib/esm/nodes/data-mapping.leaf.js +180 -0
- package/dist/lib/esm/nodes/data-mapping.leaf.js.map +1 -0
- package/dist/lib/esm/nodes/data-mapping.node.js +198 -0
- package/dist/lib/esm/nodes/data-mapping.node.js.map +1 -0
- package/dist/lib/esm/nodes/nodes.js +4 -0
- package/dist/lib/esm/nodes/nodes.js.map +1 -0
- package/dist/lib/esm/normalizer-options/base-normalizer.options.js +7 -0
- package/dist/lib/esm/normalizer-options/base-normalizer.options.js.map +1 -0
- package/dist/lib/esm/normalizer-options/lowercase-normalizer.options.js +7 -0
- package/dist/lib/esm/normalizer-options/lowercase-normalizer.options.js.map +1 -0
- package/dist/lib/esm/normalizer-options/normalizer-options.js +3 -0
- package/dist/lib/esm/normalizer-options/normalizer-options.js.map +1 -0
- package/dist/lib/esm/normalizers/lowercase.normalizer.js +30 -0
- package/dist/lib/esm/normalizers/lowercase.normalizer.js.map +1 -0
- package/dist/lib/esm/normalizers/normalizers.js +2 -0
- package/dist/lib/esm/normalizers/normalizers.js.map +1 -0
- package/dist/lib/esm/types/data-mapping-interceptor-unique-key.type.js +2 -0
- package/dist/lib/esm/types/data-mapping-interceptor-unique-key.type.js.map +1 -0
- package/dist/lib/esm/types/data-normalizer-unique-key.type.js +2 -0
- package/dist/lib/esm/types/data-normalizer-unique-key.type.js.map +1 -0
- package/dist/lib/esm/types/types.js +3 -0
- package/dist/lib/esm/types/types.js.map +1 -0
- package/dist/types/builders/builders.d.ts +1 -0
- package/dist/types/builders/data-mapping.builder.d.ts +110 -0
- package/dist/types/data-mapping.module.d.ts +12 -0
- package/dist/types/data-mapping.module.keyname.d.ts +1 -0
- package/dist/types/enums/data-mapping-node-type.enum.d.ts +6 -0
- package/dist/types/enums/enums.d.ts +1 -0
- package/dist/types/errors/array-data-mapping-node-invalid-source-property-type.error.d.ts +7 -0
- package/dist/types/errors/data-after-mapping-interceptor-already-added.error.d.ts +8 -0
- package/dist/types/errors/data-before-mapping-interceptor-already-added.error.d.ts +8 -0
- package/dist/types/errors/data-mapping-interceptor-not-found.error.d.ts +8 -0
- package/dist/types/errors/data-mapping-source-property-not-found.error.d.ts +7 -0
- package/dist/types/errors/data-normalizer-already-added.error.d.ts +7 -0
- package/dist/types/errors/errors.d.ts +8 -0
- package/dist/types/errors/normalizer-invalid-source-type.error.d.ts +7 -0
- package/dist/types/errors/undefined-source-property.error.d.ts +9 -0
- package/dist/types/interceptors/default-data-mapping.interceptor.d.ts +7 -0
- package/dist/types/interceptors/interceptors.d.ts +1 -0
- package/dist/types/interfaces/data-mapping-interceptor.interface.d.ts +19 -0
- package/dist/types/interfaces/data-normalizer.interface.d.ts +15 -0
- package/dist/types/interfaces/interfaces.d.ts +2 -0
- package/dist/types/mappers/data.mapper.d.ts +28 -0
- package/dist/types/mappers/mappers.d.ts +1 -0
- package/dist/types/nodes/base-data-mapping.node.d.ts +15 -0
- package/dist/types/nodes/data-mapping.leaf.d.ts +92 -0
- package/dist/types/nodes/data-mapping.node.d.ts +94 -0
- package/dist/types/nodes/nodes.d.ts +3 -0
- package/dist/types/normalizer-options/base-normalizer.options.d.ts +4 -0
- package/dist/types/normalizer-options/lowercase-normalizer.options.d.ts +4 -0
- package/dist/types/normalizer-options/normalizer-options.d.ts +2 -0
- package/dist/types/normalizers/lowercase.normalizer.d.ts +7 -0
- package/dist/types/normalizers/normalizers.d.ts +1 -0
- package/dist/types/types/data-mapping-interceptor-unique-key.type.d.ts +1 -0
- package/dist/types/types/data-normalizer-unique-key.type.d.ts +1 -0
- package/dist/types/types/types.d.ts +2 -0
- package/package.json +68 -0
- package/readme.md +1 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DataMappingNode = void 0;
|
|
13
|
+
const data_mapping_node_type_enum_1 = require("../enums/data-mapping-node-type.enum");
|
|
14
|
+
const data_mapping_leaf_1 = require("./data-mapping.leaf");
|
|
15
|
+
const base_data_mapping_node_1 = require("./base-data-mapping.node");
|
|
16
|
+
const data_mapping_source_property_not_found_error_1 = require("../errors/data-mapping-source-property-not-found.error");
|
|
17
|
+
const array_data_mapping_node_invalid_source_property_type_error_1 = require("../errors/array-data-mapping-node-invalid-source-property-type.error");
|
|
18
|
+
class DataMappingNode extends base_data_mapping_node_1.BaseDataMappingNode {
|
|
19
|
+
constructor(root, parent, type = data_mapping_node_type_enum_1.DataMappingNodeTypeEnum.Node) {
|
|
20
|
+
super();
|
|
21
|
+
this.root = root;
|
|
22
|
+
this.parent = parent;
|
|
23
|
+
this.type = type;
|
|
24
|
+
/**
|
|
25
|
+
* This method specified whether it's possible that this element not be present in the `source` object.
|
|
26
|
+
*/
|
|
27
|
+
this.isOptional = false;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* This is a setter for `sourceProperty`.
|
|
31
|
+
* @param sourceProperty
|
|
32
|
+
*/
|
|
33
|
+
setSourceProperty(sourceProperty) {
|
|
34
|
+
this.sourceProperty = sourceProperty;
|
|
35
|
+
return this;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* This is a setter for `destinationProperty`.
|
|
39
|
+
* @param destinationProperty
|
|
40
|
+
*/
|
|
41
|
+
setDestinationProperty(destinationProperty) {
|
|
42
|
+
this.destinationProperty = destinationProperty;
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* This is a setter for `isOptional`.
|
|
47
|
+
* @param isOptional
|
|
48
|
+
*/
|
|
49
|
+
setIsOptional(isOptional) {
|
|
50
|
+
this.isOptional = isOptional;
|
|
51
|
+
return this;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* This property creates a new DataMappingLeaf and returns it. It doesn't add it yet. To do so, the `end()` method
|
|
55
|
+
* must be called.
|
|
56
|
+
*/
|
|
57
|
+
add() {
|
|
58
|
+
return new data_mapping_leaf_1.DataMappingLeaf(this.root, this);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* This method adds a nesting level. This should be used when the property contains an object and you want to map
|
|
62
|
+
* this object into another object.
|
|
63
|
+
*/
|
|
64
|
+
addNestingLevel() {
|
|
65
|
+
return new DataMappingNode(this.root, this);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* This method adds an array of Scalar allowing you to apply the normalizer on each scalar in the array. The
|
|
69
|
+
* `sourceProperty` and `destinationProperty` correspond to the name of the property that is an array. But, the
|
|
70
|
+
* values in the array will be normalized using the normalizer.
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
addArrayOfScalar() {
|
|
74
|
+
return new data_mapping_leaf_1.DataMappingLeaf(this.root, this, data_mapping_node_type_enum_1.DataMappingNodeTypeEnum.ScalarArray);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* This method adds an array of objects allowing to define a node for each property in the object. Each object in
|
|
78
|
+
* the array will be treated as being the same.
|
|
79
|
+
*/
|
|
80
|
+
addArrayOfObjects() {
|
|
81
|
+
return new DataMappingNode(this.root, this, data_mapping_node_type_enum_1.DataMappingNodeTypeEnum.ObjectArray);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* This method adds this node to its parent and returns the parent.
|
|
85
|
+
*/
|
|
86
|
+
end() {
|
|
87
|
+
// todo: Validate that we actually have all the properties needed (sourceProperty and destinationProperty) for example.
|
|
88
|
+
this.parent.addNode(this);
|
|
89
|
+
return this.parent;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* This method maps the `sourceProperty` from the `source` object and maps it to the `destinationProperty` of the
|
|
93
|
+
* `destination` object while applying the normalizers.
|
|
94
|
+
*
|
|
95
|
+
* @param source
|
|
96
|
+
* @param destination
|
|
97
|
+
* @param normalizersMap
|
|
98
|
+
*/
|
|
99
|
+
map(source, destination, normalizersMap) {
|
|
100
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
if (source.hasOwnProperty(this.sourceProperty) === false) {
|
|
102
|
+
if (this.isOptional) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
throw new data_mapping_source_property_not_found_error_1.DataMappingSourcePropertyNotFoundError("The property '" + this.sourceProperty + "' isn't found in the Source object and isn't marked as Optional. If you want to ignore this property, use the 'setIsOptional(true)' method in the builder.", this.sourceProperty);
|
|
106
|
+
}
|
|
107
|
+
const sourceElement = source[this.sourceProperty];
|
|
108
|
+
if (destination[this.destinationProperty] === undefined) {
|
|
109
|
+
if (this.type === data_mapping_node_type_enum_1.DataMappingNodeTypeEnum.ObjectArray) {
|
|
110
|
+
destination[this.destinationProperty] = [];
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
// todo: we need to get the expected Type of the `destination[this.destinationProperty]` and actually instantiate it.
|
|
114
|
+
destination[this.destinationProperty] = {};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
const destinationElement = destination[this.destinationProperty];
|
|
118
|
+
if (this.type === data_mapping_node_type_enum_1.DataMappingNodeTypeEnum.ObjectArray) {
|
|
119
|
+
// This means that the source[propertyKey] contains an array of objects and each object should be mapped
|
|
120
|
+
const array = source[this.sourceProperty];
|
|
121
|
+
if (Array.isArray(array) === false) {
|
|
122
|
+
throw new array_data_mapping_node_invalid_source_property_type_error_1.ArrayDataMappingNodeInvalidSourcePropertyTypeError(`According to your schema, the property '${this.sourceProperty}' in the source object must contain an Array of objects. Instead, it contains: '${typeof array}'.`, this.sourceProperty);
|
|
123
|
+
}
|
|
124
|
+
for (const element of array) {
|
|
125
|
+
// todo: we need to get the expected Type of the object in the array in the Destination object
|
|
126
|
+
const dest = {};
|
|
127
|
+
for (const key in this.nodes) {
|
|
128
|
+
if (this.nodes.hasOwnProperty(key) === false) {
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
const node = this.nodes[key];
|
|
132
|
+
yield node.map(element, dest, normalizersMap);
|
|
133
|
+
}
|
|
134
|
+
destinationElement.push(dest);
|
|
135
|
+
}
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
// When the current node is not an array, we simply iterate
|
|
139
|
+
for (const key in this.nodes) {
|
|
140
|
+
if (this.nodes.hasOwnProperty(key) === false) {
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
const node = this.nodes[key];
|
|
144
|
+
yield node.map(sourceElement, destinationElement, normalizersMap);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* This method imports a schema.
|
|
150
|
+
*
|
|
151
|
+
* @param schema
|
|
152
|
+
*/
|
|
153
|
+
import(schema) {
|
|
154
|
+
this.sourceProperty = schema.sourceProperty;
|
|
155
|
+
this.destinationProperty = schema.destinationProperty;
|
|
156
|
+
this.isOptional = schema.isOptional;
|
|
157
|
+
this.nodes = {};
|
|
158
|
+
const nodes = schema.nodes;
|
|
159
|
+
for (const key in nodes) {
|
|
160
|
+
if (nodes.hasOwnProperty(key) === false) {
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
const nodeInfo = nodes[key];
|
|
164
|
+
const type = nodeInfo["_type"];
|
|
165
|
+
switch (type) {
|
|
166
|
+
case data_mapping_node_type_enum_1.DataMappingNodeTypeEnum.ScalarArray:
|
|
167
|
+
case data_mapping_node_type_enum_1.DataMappingNodeTypeEnum.Leaf:
|
|
168
|
+
const leaf = new data_mapping_leaf_1.DataMappingLeaf(this.root, this, type);
|
|
169
|
+
leaf.import(nodeInfo);
|
|
170
|
+
this.nodes[leaf.sourceProperty] = leaf;
|
|
171
|
+
continue;
|
|
172
|
+
case data_mapping_node_type_enum_1.DataMappingNodeTypeEnum.Node:
|
|
173
|
+
case data_mapping_node_type_enum_1.DataMappingNodeTypeEnum.ObjectArray:
|
|
174
|
+
const node = new DataMappingNode(this.root, this, type);
|
|
175
|
+
node.import(nodeInfo);
|
|
176
|
+
this.nodes[node.sourceProperty] = node;
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* This method exports this node.
|
|
183
|
+
*/
|
|
184
|
+
export() {
|
|
185
|
+
const nodes = this.nodes;
|
|
186
|
+
for (const key in nodes) {
|
|
187
|
+
if (nodes.hasOwnProperty(key) === false) {
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
nodes[key] = nodes[key].export();
|
|
191
|
+
}
|
|
192
|
+
return {
|
|
193
|
+
"_type": this.type,
|
|
194
|
+
"sourceProperty": this.sourceProperty,
|
|
195
|
+
"destinationProperty": this.destinationProperty,
|
|
196
|
+
"isOptional": this.isOptional,
|
|
197
|
+
"nodes": nodes,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
exports.DataMappingNode = DataMappingNode;
|
|
202
|
+
//# sourceMappingURL=data-mapping.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-mapping.node.js","sourceRoot":"","sources":["../../../../src/nodes/data-mapping.node.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sFAA6E;AAC7E,2DAAoD;AAEpD,qEAA6D;AAC7D,yHAA8G;AAG9G,qJAE8E;AAE9E,MAAa,eAAgB,SAAQ,4CAAmB;IAgBpD,YAA4B,IAAwB,EACxB,MAA4C,EAC5C,OAAgC,qDAAuB,CAAC,IAAI;QAEpF,KAAK,EAAE,CAAC;QAJgB,SAAI,GAAJ,IAAI,CAAoB;QACxB,WAAM,GAAN,MA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AAG,IAAI,mCAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;oBACxD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;oBACtB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;oBACvC,SAAS;gBAEb,KAAK,qDAAuB,CAAC,IAAI,CAAC;gBAClC,KAAK,qDAAuB,CAAC,WAAW;oBACpC,MAAM,IAAI,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;oBACxD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;oBACtB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;oBACvC,SAAS;aAChB;SACJ;IACL,CAAC;IAED;;OAEG;IACI,MAAM;QACT,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;YACrB,IAAG,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,KAAK,EAAE;gBACpC,SAAS;aACZ;YAED,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;SACpC;QAED,OAAO;YACH,OAAO,EAAE,IAAI,CAAC,IAAI;YAClB,gBAAgB,EAAE,IAAI,CAAC,cAAc;YACrC,qBAAqB,EAAE,IAAI,CAAC,mBAAmB;YAC/C,YAAY,EAAE,IAAI,CAAC,UAAU;YAC7B,OAAO,EAAE,KAAK;SACjB,CAAA;IACL,CAAC;CACJ;AAnOD,0CAmOC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = 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);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./base-data-mapping.node"), exports);
|
|
18
|
+
__exportStar(require("./data-mapping.leaf"), exports);
|
|
19
|
+
__exportStar(require("./data-mapping.node"), exports);
|
|
20
|
+
//# sourceMappingURL=nodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodes.js","sourceRoot":"","sources":["../../../../src/nodes/nodes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,sDAAoC;AACpC,sDAAoC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseNormalizerOptions = void 0;
|
|
4
|
+
class BaseNormalizerOptions {
|
|
5
|
+
constructor(options) {
|
|
6
|
+
var _a;
|
|
7
|
+
this.shouldThrowIfTypeIsNotString = (_a = options === null || options === void 0 ? void 0 : options.shouldThrowIfTypeIsNotString) !== null && _a !== void 0 ? _a : false;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.BaseNormalizerOptions = BaseNormalizerOptions;
|
|
11
|
+
//# sourceMappingURL=base-normalizer.options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-normalizer.options.js","sourceRoot":"","sources":["../../../../src/normalizer-options/base-normalizer.options.ts"],"names":[],"mappings":";;;AAAA,MAAsB,qBAAqB;IAGvC,YAAmB,OAA+B;;QAC9C,IAAI,CAAC,4BAA4B,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,4BAA4B,mCAAI,KAAK,CAAC;IACvF,CAAC;CACJ;AAND,sDAMC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LowercaseNormalizerOptions = void 0;
|
|
4
|
+
const base_normalizer_options_1 = require("./base-normalizer.options");
|
|
5
|
+
class LowercaseNormalizerOptions extends base_normalizer_options_1.BaseNormalizerOptions {
|
|
6
|
+
constructor(options) {
|
|
7
|
+
super(options);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.LowercaseNormalizerOptions = LowercaseNormalizerOptions;
|
|
11
|
+
//# sourceMappingURL=lowercase-normalizer.options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lowercase-normalizer.options.js","sourceRoot":"","sources":["../../../../src/normalizer-options/lowercase-normalizer.options.ts"],"names":[],"mappings":";;;AAAA,uEAAgE;AAEhE,MAAa,0BAA2B,SAAQ,+CAAqB;IACjE,YAAmB,OAAoC;QACnD,KAAK,CAAC,OAAO,CAAC,CAAC;IACnB,CAAC;CACJ;AAJD,gEAIC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = 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);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./base-normalizer.options"), exports);
|
|
18
|
+
__exportStar(require("./lowercase-normalizer.options"), exports);
|
|
19
|
+
//# sourceMappingURL=normalizer-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizer-options.js","sourceRoot":"","sources":["../../../../src/normalizer-options/normalizer-options.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,iEAA+C"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var LowercaseNormalizer_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.LowercaseNormalizer = void 0;
|
|
11
|
+
const normalizer_invalid_source_type_error_1 = require("../errors/normalizer-invalid-source-type.error");
|
|
12
|
+
const common_1 = require("@pristine-ts/common");
|
|
13
|
+
const tsyringe_1 = require("tsyringe");
|
|
14
|
+
let LowercaseNormalizer = LowercaseNormalizer_1 = class LowercaseNormalizer {
|
|
15
|
+
getUniqueKey() {
|
|
16
|
+
return LowercaseNormalizer_1.name;
|
|
17
|
+
}
|
|
18
|
+
normalize(source, options) {
|
|
19
|
+
if (typeof source !== "string") {
|
|
20
|
+
if (options && options.shouldThrowIfTypeIsNotString) {
|
|
21
|
+
throw new normalizer_invalid_source_type_error_1.NormalizerInvalidSourceTypeError("The 'LowercaseNormalizer' expects the source value to be of type 'string'. Type '" + typeof source + "' was received.", this.getUniqueKey(), options, source, typeof source);
|
|
22
|
+
}
|
|
23
|
+
return source;
|
|
24
|
+
}
|
|
25
|
+
return source.toLowerCase();
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.LowercaseNormalizer = LowercaseNormalizer;
|
|
29
|
+
exports.LowercaseNormalizer = LowercaseNormalizer = LowercaseNormalizer_1 = __decorate([
|
|
30
|
+
(0, common_1.tag)("DataNormalizerInterface"),
|
|
31
|
+
(0, tsyringe_1.injectable)()
|
|
32
|
+
], LowercaseNormalizer);
|
|
33
|
+
//# sourceMappingURL=lowercase.normalizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lowercase.normalizer.js","sourceRoot":"","sources":["../../../../src/normalizers/lowercase.normalizer.ts"],"names":[],"mappings":";;;;;;;;;;AAEA,yGAAgG;AAEhG,gDAAwC;AACxC,uCAAoC;AAI7B,IAAM,mBAAmB,2BAAzB,MAAM,mBAAmB;IAC5B,YAAY;QACR,OAAO,qBAAmB,CAAC,IAAI,CAAC;IACpC,CAAC;IAED,SAAS,CAAC,MAAW,EAAE,OAAoC;QACvD,IAAG,OAAO,MAAM,KAAK,QAAQ,EAAE;YAC3B,IAAG,OAAO,IAAI,OAAO,CAAC,4BAA4B,EAAE;gBAChD,MAAM,IAAI,uEAAgC,CAAC,mFAAmF,GAAG,OAAO,MAAM,GAAE,iBAAiB,EAAE,IAAI,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,MAAM,CAAC,CAAA;aAC1N;YAED,OAAO,MAAM,CAAC;SACjB;QAED,OAAO,MAAM,CAAC,WAAW,EAAE,CAAC;IAChC,CAAC;CACJ,CAAA;AAhBY,kDAAmB;8BAAnB,mBAAmB;IAF/B,IAAA,YAAG,EAAC,yBAAyB,CAAC;IAC9B,IAAA,qBAAU,GAAE;GACA,mBAAmB,CAgB/B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = 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);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./lowercase.normalizer"), exports);
|
|
18
|
+
//# sourceMappingURL=normalizers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizers.js","sourceRoot":"","sources":["../../../../src/normalizers/normalizers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-mapping-interceptor-unique-key.type.js","sourceRoot":"","sources":["../../../../src/types/data-mapping-interceptor-unique-key.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-normalizer-unique-key.type.js","sourceRoot":"","sources":["../../../../src/types/data-normalizer-unique-key.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = 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);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./data-normalizer-unique-key.type"), exports);
|
|
18
|
+
__exportStar(require("./data-mapping-interceptor-unique-key.type"), exports);
|
|
19
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oEAAkD;AAClD,6EAA2D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builders.js","sourceRoot":"","sources":["../../../../src/builders/builders.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { DataMappingNode } from "../nodes/data-mapping.node";
|
|
2
|
+
import { DataNormalizerAlreadyAdded } from "../errors/data-normalizer-already-added.error";
|
|
3
|
+
import { DataBeforeMappingInterceptorAlreadyAddedError } from "../errors/data-before-mapping-interceptor-already-added.error";
|
|
4
|
+
import { DataAfterMappingInterceptorAlreadyAddedError } from "../errors/data-after-mapping-interceptor-already-added.error";
|
|
5
|
+
import { DataMappingLeaf } from "../nodes/data-mapping.leaf";
|
|
6
|
+
import { BaseDataMappingNode } from "../nodes/base-data-mapping.node";
|
|
7
|
+
import { DataMappingNodeTypeEnum } from "../enums/data-mapping-node-type.enum";
|
|
8
|
+
export class DataMappingBuilder extends BaseDataMappingNode {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.normalizers = [];
|
|
12
|
+
this.beforeMappingInterceptors = [];
|
|
13
|
+
this.afterMappingInterceptors = [];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* This method adds a normalizer to the root that will be applied on each node (unless they explicitly exclude to do
|
|
17
|
+
* so).
|
|
18
|
+
*
|
|
19
|
+
* @param normalizerUniqueKey
|
|
20
|
+
* @param options
|
|
21
|
+
*/
|
|
22
|
+
addNormalizer(normalizerUniqueKey, options) {
|
|
23
|
+
if (this.hasNormalizer(normalizerUniqueKey)) {
|
|
24
|
+
throw new DataNormalizerAlreadyAdded("The data normalizer '" + normalizerUniqueKey + "' has already been added to this builder.", normalizerUniqueKey, options);
|
|
25
|
+
}
|
|
26
|
+
this.normalizers.push({
|
|
27
|
+
key: normalizerUniqueKey,
|
|
28
|
+
options,
|
|
29
|
+
});
|
|
30
|
+
return this;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* This method returns whether there's a normalizer for the specified key or not.
|
|
34
|
+
*
|
|
35
|
+
* @param normalizerUniqueKey
|
|
36
|
+
*/
|
|
37
|
+
hasNormalizer(normalizerUniqueKey) {
|
|
38
|
+
return this.normalizers.find(element => element.key === normalizerUniqueKey) !== undefined;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* This method adds an interceptor that will be executed **before** the object is mapped.
|
|
42
|
+
*
|
|
43
|
+
* @param key
|
|
44
|
+
* @param options
|
|
45
|
+
*/
|
|
46
|
+
addBeforeMappingInterceptor(key, options) {
|
|
47
|
+
if (this.hasBeforeMappingInterceptor(key)) {
|
|
48
|
+
throw new DataBeforeMappingInterceptorAlreadyAddedError("The before row transform interceptor has already been added to this Tree.", key, options);
|
|
49
|
+
}
|
|
50
|
+
this.beforeMappingInterceptors.push({
|
|
51
|
+
key,
|
|
52
|
+
options,
|
|
53
|
+
});
|
|
54
|
+
return this;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* This method returns whether a **before** interceptor already exists.
|
|
58
|
+
* @param key
|
|
59
|
+
*/
|
|
60
|
+
hasBeforeMappingInterceptor(key) {
|
|
61
|
+
return this.beforeMappingInterceptors.find(element => element.key === key) !== undefined;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* This method adds an interceptor that will be executed **after** the object is mapped.
|
|
65
|
+
*
|
|
66
|
+
* @param key
|
|
67
|
+
* @param options
|
|
68
|
+
*/
|
|
69
|
+
addAfterMappingInterceptor(key, options) {
|
|
70
|
+
if (this.hasAfterMappingInterceptor(key)) {
|
|
71
|
+
throw new DataAfterMappingInterceptorAlreadyAddedError("The after row transform interceptor has already been added to this Tree.", key, options);
|
|
72
|
+
}
|
|
73
|
+
this.afterMappingInterceptors.push({
|
|
74
|
+
key,
|
|
75
|
+
options,
|
|
76
|
+
});
|
|
77
|
+
return this;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* This method returns whether a **after** interceptor already exists.
|
|
81
|
+
* @param key
|
|
82
|
+
*/
|
|
83
|
+
hasAfterMappingInterceptor(key) {
|
|
84
|
+
return this.afterMappingInterceptors.find(element => element.key === key) !== undefined;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* This property creates a new DataMappingLeaf and returns it. It doesn't add it yet. To do so, the `end()` method
|
|
88
|
+
* must be called.
|
|
89
|
+
*/
|
|
90
|
+
add() {
|
|
91
|
+
return new DataMappingLeaf(this, this);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* This method adds a nesting level. This should be used when the property contains an object and you want to map
|
|
95
|
+
* this object into another object.
|
|
96
|
+
*/
|
|
97
|
+
addNestingLevel() {
|
|
98
|
+
return new DataMappingNode(this, this);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* This method adds an array of Scalar allowing you to apply the normalizer on each scalar in the array. The
|
|
102
|
+
* `sourceProperty` and `destinationProperty` correspond to the name of the property that is an array. But, the
|
|
103
|
+
* values in the array will be normalized using the normalizer.
|
|
104
|
+
*
|
|
105
|
+
*/
|
|
106
|
+
addArrayOfScalar() {
|
|
107
|
+
return new DataMappingLeaf(this, this, DataMappingNodeTypeEnum.ScalarArray);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* This method adds an array of objects allowing to define a node for each property in the object. Each object in
|
|
111
|
+
* the array will be treated as being the same.
|
|
112
|
+
*/
|
|
113
|
+
addArrayOfObjects() {
|
|
114
|
+
return new DataMappingNode(this, this, DataMappingNodeTypeEnum.ObjectArray);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* This method is called at the end just to make it nice since all the nodes will have one, it's nice
|
|
118
|
+
* that the builder has one too.
|
|
119
|
+
*/
|
|
120
|
+
end() {
|
|
121
|
+
return this;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* This method imports a schema.
|
|
125
|
+
*
|
|
126
|
+
* @param schema
|
|
127
|
+
*/
|
|
128
|
+
import(schema) {
|
|
129
|
+
this.normalizers = schema.normalizers;
|
|
130
|
+
this.beforeMappingInterceptors = schema.beforeMappingInterceptors;
|
|
131
|
+
this.afterMappingInterceptors = schema.afterMappingInterceptors;
|
|
132
|
+
const nodes = schema.nodes;
|
|
133
|
+
for (const key in nodes) {
|
|
134
|
+
if (nodes.hasOwnProperty(key) === false) {
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
const nodeInfo = nodes[key];
|
|
138
|
+
const type = nodeInfo["_type"];
|
|
139
|
+
switch (type) {
|
|
140
|
+
case DataMappingNodeTypeEnum.ScalarArray:
|
|
141
|
+
case DataMappingNodeTypeEnum.Leaf:
|
|
142
|
+
const leaf = new DataMappingLeaf(this, this, type);
|
|
143
|
+
leaf.import(nodeInfo);
|
|
144
|
+
this.nodes[leaf.sourceProperty] = leaf;
|
|
145
|
+
continue;
|
|
146
|
+
case DataMappingNodeTypeEnum.Node:
|
|
147
|
+
case DataMappingNodeTypeEnum.ObjectArray:
|
|
148
|
+
const node = new DataMappingNode(this, this, type);
|
|
149
|
+
node.import(nodeInfo);
|
|
150
|
+
this.nodes[node.sourceProperty] = node;
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* This method exports this node.
|
|
157
|
+
*/
|
|
158
|
+
export() {
|
|
159
|
+
const nodes = this.nodes;
|
|
160
|
+
for (const key in nodes) {
|
|
161
|
+
if (nodes.hasOwnProperty(key) === false) {
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
nodes[key] = nodes[key].export();
|
|
165
|
+
}
|
|
166
|
+
return {
|
|
167
|
+
"nodes": nodes,
|
|
168
|
+
"normalizers": this.normalizers,
|
|
169
|
+
"beforeMappingInterceptors": this.beforeMappingInterceptors,
|
|
170
|
+
"afterMappingInterceptors": this.afterMappingInterceptors,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
//# sourceMappingURL=data-mapping.builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-mapping.builder.js","sourceRoot":"","sources":["../../../../src/builders/data-mapping.builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,4BA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;QACT,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;YACrB,IAAG,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,KAAK,EAAE;gBACpC,SAAS;aACZ;YAED,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;SACpC;QAED,OAAO;YACH,OAAO,EAAE,KAAK;YACd,aAAa,EAAC,IAAI,CAAC,WAAW;YAC9B,2BAA2B,EAAE,IAAI,CAAC,yBAAyB;YAC3D,0BAA0B,EAAE,IAAI,CAAC,wBAAwB;SAE5D,CAAA;IACL,CAAC;CACJ"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LoggingModule } from "@pristine-ts/logging";
|
|
2
|
+
import { DataMappingModuleKeyname } from "./data-mapping.module.keyname";
|
|
3
|
+
export * from "./builders/builders";
|
|
4
|
+
export * from "./enums/enums";
|
|
5
|
+
export * from "./errors/errors";
|
|
6
|
+
export * from "./interceptors/interceptors";
|
|
7
|
+
export * from "./interfaces/interfaces";
|
|
8
|
+
export * from "./mappers/mappers";
|
|
9
|
+
export * from "./nodes/nodes";
|
|
10
|
+
export * from "./normalizer-options/normalizer-options";
|
|
11
|
+
export * from "./normalizers/normalizers";
|
|
12
|
+
export * from "./types/types";
|
|
13
|
+
export const DataMappingModule = {
|
|
14
|
+
keyname: DataMappingModuleKeyname,
|
|
15
|
+
importModules: [
|
|
16
|
+
LoggingModule,
|
|
17
|
+
],
|
|
18
|
+
providerRegistrations: [],
|
|
19
|
+
configurationDefinitions: []
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=data-mapping.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-mapping.module.js","sourceRoot":"","sources":["../../../src/data-mapping.module.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAC,wBAAwB,EAAC,MAAM,+BAA+B,CAAC;AAEvE,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,yCAAyC,CAAC;AACxD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAE9B,MAAM,CAAC,MAAM,iBAAiB,GAAoB;IAC9C,OAAO,EAAE,wBAAwB;IACjC,aAAa,EAAE;QACX,aAAa;KAChB;IACD,qBAAqB,EAAE,EACtB;IACD,wBAAwB,EAAE,EACzB;CAEJ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-mapping.module.keyname.js","sourceRoot":"","sources":["../../../src/data-mapping.module.keyname.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAW,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var DataMappingNodeTypeEnum;
|
|
2
|
+
(function (DataMappingNodeTypeEnum) {
|
|
3
|
+
DataMappingNodeTypeEnum["ScalarArray"] = "DATA_MAPPING_NODE_SCALAR_ARRAY";
|
|
4
|
+
DataMappingNodeTypeEnum["ObjectArray"] = "DATA_MAPPING_NODE_OBJECT_ARRAY";
|
|
5
|
+
DataMappingNodeTypeEnum["Node"] = "DATA_MAPPING_NODE";
|
|
6
|
+
DataMappingNodeTypeEnum["Leaf"] = "DATA_MAPPING_LEAF";
|
|
7
|
+
})(DataMappingNodeTypeEnum || (DataMappingNodeTypeEnum = {}));
|
|
8
|
+
//# sourceMappingURL=data-mapping-node-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-mapping-node-type.enum.js","sourceRoot":"","sources":["../../../../src/enums/data-mapping-node-type.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,uBAKX;AALD,WAAY,uBAAuB;IAC/B,yEAA8C,CAAA;IAC9C,yEAA8C,CAAA;IAC9C,qDAA0B,CAAA;IAC1B,qDAA0B,CAAA;AAC9B,CAAC,EALW,uBAAuB,KAAvB,uBAAuB,QAKlC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../../../src/enums/enums.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|