@wisemen/nestjs-typeorm 0.0.19 → 0.0.21
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.
|
@@ -3,11 +3,8 @@
|
|
|
3
3
|
import { AfterLoad, AfterInsert, AfterUpdate, BeforeInsert, BeforeUpdate } from 'typeorm';
|
|
4
4
|
export function TransformEmbedded(transformer) {
|
|
5
5
|
return (target, propertyKey) => {
|
|
6
|
-
const transformFrom = function (
|
|
7
|
-
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
this[propertyKey] = transformer.from(value);
|
|
6
|
+
const transformFrom = function () {
|
|
7
|
+
this[propertyKey] = transformer.from(this[propertyKey]);
|
|
11
8
|
};
|
|
12
9
|
const transformFromMethodName = `__transform_from_${propertyKey.toString()}`;
|
|
13
10
|
target[transformFromMethodName] = transformFrom;
|
|
@@ -17,11 +14,8 @@ export function TransformEmbedded(transformer) {
|
|
|
17
14
|
afterInsertDecorator(target, transformFromMethodName);
|
|
18
15
|
const afterUpdateDecorator = AfterUpdate();
|
|
19
16
|
afterUpdateDecorator(target, transformFromMethodName);
|
|
20
|
-
const transformTo = function (
|
|
21
|
-
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
this[propertyKey] = transformer.to(value);
|
|
17
|
+
const transformTo = function () {
|
|
18
|
+
this[propertyKey] = transformer.to(this[propertyKey]);
|
|
25
19
|
};
|
|
26
20
|
const transformToMethodNamee = `__transform_to_${propertyKey.toString()}`;
|
|
27
21
|
target[transformToMethodNamee] = transformTo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform-embedded.js","sourceRoot":"","sources":["../../lib/columns/transform-embedded.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,wGAAwG;AACxG,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAoB,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3G,MAAM,UAAU,iBAAiB,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qB,GAAG,YAAY,EAAE,CAAA;QAE5C,qBAAqB,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAA;QAErD,MAAM,qBAAqB,GAAG,YAAY,EAAE,CAAA;QAE5C,qBAAqB,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAA;IACvD,CAAC,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wisemen/nestjs-typeorm",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -15,13 +15,12 @@
|
|
|
15
15
|
"pretest": "npm run clean && npm run build",
|
|
16
16
|
"test": "node --test",
|
|
17
17
|
"prerelease": "npm run build",
|
|
18
|
-
"release": "release-it"
|
|
18
|
+
"release": "pnpx release-it"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@types/node": "^22.
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"eslint": "^9.24.0"
|
|
21
|
+
"@types/node": "^22.15.27",
|
|
22
|
+
"eslint": "^9.27.0",
|
|
23
|
+
"typescript": "^5.8.3"
|
|
25
24
|
},
|
|
26
25
|
"author": "Joren Vandeweyer",
|
|
27
26
|
"license": "GPL",
|
|
@@ -31,8 +30,8 @@
|
|
|
31
30
|
},
|
|
32
31
|
"dependencies": {
|
|
33
32
|
"@nestjs/typeorm": "^11.0.0",
|
|
34
|
-
"@wisemen/
|
|
35
|
-
"@wisemen/
|
|
33
|
+
"@wisemen/coordinates": "^0.0.4",
|
|
34
|
+
"@wisemen/time": "^0.0.22",
|
|
36
35
|
"change-case": "^5.4.4"
|
|
37
36
|
},
|
|
38
37
|
"peerDependencies": {
|