test-entity-library-asm 3.9.31 → 3.9.32
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/entities/CountryHoliday.js +11 -12
- package/dist/index.js +1 -0
- package/package.json +1 -1
- package/src/entities/CountryHoliday.ts +11 -11
- package/src/index.ts +1 -0
|
@@ -30,18 +30,17 @@ __decorate([
|
|
|
30
30
|
(0, typeorm_1.Column)({
|
|
31
31
|
type: "date",
|
|
32
32
|
comment: "Fecha del festivo.",
|
|
33
|
-
transformer: {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
},
|
|
33
|
+
// transformer: {
|
|
34
|
+
// to: (value: string | Date) => value, // guardamos tal cual
|
|
35
|
+
// from: (value: Date | string) => {
|
|
36
|
+
// if (typeof value === "string") return value; // ya es string, devuelve
|
|
37
|
+
// // Convierte Date a YYYY-MM-DD
|
|
38
|
+
// const y = value.getFullYear();
|
|
39
|
+
// const m = (value.getMonth() + 1).toString().padStart(2, "0");
|
|
40
|
+
// const d = value.getDate().toString().padStart(2, "0");
|
|
41
|
+
// return `${y}-${m}-${d}`;
|
|
42
|
+
// },
|
|
43
|
+
// },
|
|
45
44
|
}),
|
|
46
45
|
__metadata("design:type", String)
|
|
47
46
|
], CountryHoliday.prototype, "date", void 0);
|
package/dist/index.js
CHANGED
|
@@ -32,6 +32,7 @@ function createDataBaseSource() {
|
|
|
32
32
|
connection = new typeorm_1.DataSource({
|
|
33
33
|
type: process.env.DB_TYPE,
|
|
34
34
|
// dateStrings: true,
|
|
35
|
+
dateStrings: ["DATE"],
|
|
35
36
|
host: process.env.DB_HOST,
|
|
36
37
|
port: parseInt(process.env.DB_PORT ?? ""),
|
|
37
38
|
username: process.env.DB_USERNAME,
|
package/package.json
CHANGED
|
@@ -24,17 +24,17 @@ export class CountryHoliday {
|
|
|
24
24
|
@Column({
|
|
25
25
|
type: "date",
|
|
26
26
|
comment: "Fecha del festivo.",
|
|
27
|
-
transformer: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
27
|
+
// transformer: {
|
|
28
|
+
// to: (value: string | Date) => value, // guardamos tal cual
|
|
29
|
+
// from: (value: Date | string) => {
|
|
30
|
+
// if (typeof value === "string") return value; // ya es string, devuelve
|
|
31
|
+
// // Convierte Date a YYYY-MM-DD
|
|
32
|
+
// const y = value.getFullYear();
|
|
33
|
+
// const m = (value.getMonth() + 1).toString().padStart(2, "0");
|
|
34
|
+
// const d = value.getDate().toString().padStart(2, "0");
|
|
35
|
+
// return `${y}-${m}-${d}`;
|
|
36
|
+
// },
|
|
37
|
+
// },
|
|
38
38
|
})
|
|
39
39
|
date: string;
|
|
40
40
|
|
package/src/index.ts
CHANGED
|
@@ -20,6 +20,7 @@ export function createDataBaseSource(): DataSource {
|
|
|
20
20
|
connection = new DataSource({
|
|
21
21
|
type: process.env.DB_TYPE as unknown as IType,
|
|
22
22
|
// dateStrings: true,
|
|
23
|
+
dateStrings: ["DATE"],
|
|
23
24
|
host: process.env.DB_HOST,
|
|
24
25
|
port: parseInt(process.env.DB_PORT ?? ""),
|
|
25
26
|
username: process.env.DB_USERNAME,
|