test-entity-library-asm 3.9.29 → 3.9.30

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.
@@ -30,6 +30,10 @@ __decorate([
30
30
  (0, typeorm_1.Column)({
31
31
  type: "date",
32
32
  comment: "Fecha del festivo.",
33
+ transformer: {
34
+ to: (value) => value, // guardamos tal cual
35
+ from: (value) => value, // lo devolvemos como string
36
+ },
33
37
  }),
34
38
  __metadata("design:type", String)
35
39
  ], CountryHoliday.prototype, "date", void 0);
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ function createDataBaseSource() {
31
31
  (0, dotenv_1.config)({ path: (0, path_1.resolve)(process.cwd(), ".env") });
32
32
  connection = new typeorm_1.DataSource({
33
33
  type: process.env.DB_TYPE,
34
- dateStrings: true,
34
+ // dateStrings: true,
35
35
  host: process.env.DB_HOST,
36
36
  port: parseInt(process.env.DB_PORT ?? ""),
37
37
  username: process.env.DB_USERNAME,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "test-entity-library-asm",
3
- "version": "3.9.29",
3
+ "version": "3.9.30",
4
4
  "description": "Entidades de ejemplo para una base de datos",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,6 +24,10 @@ export class CountryHoliday {
24
24
  @Column({
25
25
  type: "date",
26
26
  comment: "Fecha del festivo.",
27
+ transformer: {
28
+ to: (value: string | Date) => value, // guardamos tal cual
29
+ from: (value: string) => value, // lo devolvemos como string
30
+ },
27
31
  })
28
32
  date: string;
29
33
 
package/src/index.ts CHANGED
@@ -19,7 +19,7 @@ export function createDataBaseSource(): DataSource {
19
19
  config({ path: resolve(process.cwd(), ".env") });
20
20
  connection = new DataSource({
21
21
  type: process.env.DB_TYPE as unknown as IType,
22
- dateStrings: true,
22
+ // dateStrings: true,
23
23
  host: process.env.DB_HOST,
24
24
  port: parseInt(process.env.DB_PORT ?? ""),
25
25
  username: process.env.DB_USERNAME,