@pristine-ts/data-mapping 2.0.10 → 2.0.11
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/dist/lib/cjs/data-mapping.module.js +8 -14
- package/dist/lib/cjs/data-mapping.module.js.map +1 -1
- package/dist/lib/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/lib/esm/data-mapping.module.js +8 -14
- package/dist/lib/esm/data-mapping.module.js.map +1 -1
- package/dist/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/readme.md +345 -1
|
@@ -15,32 +15,22 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.DataMappingModule = void 0;
|
|
18
|
-
const common_1 = require("@pristine-ts/common");
|
|
19
18
|
const data_mapping_module_keyname_1 = require("./data-mapping.module.keyname");
|
|
20
19
|
const data_mapping_common_1 = require("@pristine-ts/data-mapping-common");
|
|
21
20
|
// To facilitate things, this module should re-export everything. Therefore, no one else needs to know that we have two
|
|
22
21
|
// modules unless you specifically just want the raw classes (like in the frontend).
|
|
23
22
|
__exportStar(require("@pristine-ts/data-mapping-common"), exports);
|
|
24
23
|
// The built-in normalizers don't carry the `@tag` decorator themselves (they live in
|
|
25
|
-
// data-mapping-common, which we want to keep frontend-friendly and decorator-light)
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
const
|
|
24
|
+
// data-mapping-common, which we want to keep frontend-friendly and decorator-light). They
|
|
25
|
+
// are aliased here under the "DataNormalizerInterface" tag via providerRegistrations so the
|
|
26
|
+
// registration is tied to module initialization rather than to module-file import order.
|
|
27
|
+
const builtInNormalizers = [
|
|
29
28
|
data_mapping_common_1.StringNormalizer,
|
|
30
29
|
data_mapping_common_1.NumberNormalizer,
|
|
31
30
|
data_mapping_common_1.DateNormalizer,
|
|
32
31
|
data_mapping_common_1.BooleanNormalizer,
|
|
33
32
|
data_mapping_common_1.LowercaseNormalizer,
|
|
34
33
|
];
|
|
35
|
-
normalizers.forEach((normalizer) => {
|
|
36
|
-
common_1.taggedProviderRegistrationsRegistry.push({
|
|
37
|
-
constructor: normalizer,
|
|
38
|
-
providerRegistration: {
|
|
39
|
-
token: "DataNormalizerInterface",
|
|
40
|
-
useToken: normalizer,
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
34
|
exports.DataMappingModule = {
|
|
45
35
|
keyname: data_mapping_module_keyname_1.DataMappingModuleKeyname,
|
|
46
36
|
importModules: [],
|
|
@@ -49,6 +39,10 @@ exports.DataMappingModule = {
|
|
|
49
39
|
token: data_mapping_common_1.AutoDataMappingBuilder,
|
|
50
40
|
useClass: data_mapping_common_1.AutoDataMappingBuilder,
|
|
51
41
|
},
|
|
42
|
+
...builtInNormalizers.map(normalizer => ({
|
|
43
|
+
token: "DataNormalizerInterface",
|
|
44
|
+
useToken: normalizer,
|
|
45
|
+
})),
|
|
52
46
|
{
|
|
53
47
|
token: data_mapping_common_1.DataMapper,
|
|
54
48
|
// ── container.resolve / container.resolveAll, justified ───────────────────
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-mapping.module.js","sourceRoot":"","sources":["../../../src/data-mapping.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"data-mapping.module.js","sourceRoot":"","sources":["../../../src/data-mapping.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,+EAAuE;AACvE,0EAUyC;AAIzC,uHAAuH;AACvH,oFAAoF;AACpF,mEAAiD;AAEjD,qFAAqF;AACrF,0FAA0F;AAC1F,4FAA4F;AAC5F,yFAAyF;AACzF,MAAM,kBAAkB,GAAG;IACzB,sCAAgB;IAChB,sCAAgB;IAChB,oCAAc;IACd,uCAAiB;IACjB,yCAAmB;CACpB,CAAC;AAEW,QAAA,iBAAiB,GAAoB;IAChD,OAAO,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