test-entity-library-asm 2.4.8 → 2.5.0

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.
@@ -14,7 +14,7 @@ export declare class Master {
14
14
  city: City;
15
15
  address: string;
16
16
  password: string;
17
- profile: string;
17
+ profile: any;
18
18
  created: Date;
19
19
  updated: Date;
20
20
  status: number;
@@ -90,7 +90,7 @@ var Master = /** @class */ (function () {
90
90
  transformer: jsonTransformer_1.jsonTransformer,
91
91
  comment: 'Campo de tipo JSON donde se guarda información necesaria para el registro.',
92
92
  }),
93
- __metadata("design:type", String)
93
+ __metadata("design:type", Object)
94
94
  ], Master.prototype, "profile", void 0);
95
95
  __decorate([
96
96
  (0, typeorm_1.Column)({
@@ -11,8 +11,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.MasterNotification = void 0;
13
13
  var typeorm_1 = require("typeorm");
14
- var dateTransformer_1 = require("../transformers/dateTransformer");
15
14
  var __1 = require("..");
15
+ var dateTransformer_1 = require("../transformers/dateTransformer");
16
16
  var jsonTransformer_1 = require("../transformers/jsonTransformer");
17
17
  var MasterNotification = /** @class */ (function () {
18
18
  function MasterNotification() {
@@ -8,7 +8,6 @@ var DateTransformer = /** @class */ (function () {
8
8
  }
9
9
  DateTransformer.prototype.to = function (value) {
10
10
  var result = moment(value).format('YYYY-MM-DD HH:mm:ss');
11
- console.log('To Value:', value, 'Transformed to:', result);
12
11
  return result;
13
12
  };
14
13
  DateTransformer.prototype.from = function (value) {
@@ -16,7 +15,6 @@ var DateTransformer = /** @class */ (function () {
16
15
  .utc(value)
17
16
  .tz((0, __1.getTimeZone)())
18
17
  .format('YYYY-MM-DD HH:mm:ss');
19
- console.log('From Value:', value, 'Transformed from:', result);
20
18
  return result;
21
19
  };
22
20
  return DateTransformer;
@@ -11,7 +11,6 @@ exports.jsonTransformer = {
11
11
  return JSON.parse(value);
12
12
  }
13
13
  catch (error) {
14
- console.error('Error parsing JSON:', error);
15
14
  return null;
16
15
  }
17
16
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "test-entity-library-asm",
3
- "version": "2.4.8",
3
+ "version": "2.5.0",
4
4
  "description": "Entidades de ejemplo para una base de datos",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -80,7 +80,7 @@ export class Master {
80
80
  comment:
81
81
  'Campo de tipo JSON donde se guarda información necesaria para el registro.',
82
82
  })
83
- profile: string
83
+ profile: any
84
84
 
85
85
  @Column({
86
86
  type: 'datetime',
@@ -5,9 +5,8 @@ import {
5
5
  ManyToOne,
6
6
  PrimaryGeneratedColumn,
7
7
  } from 'typeorm'
8
- import { Partner } from './Partner'
9
- import { DateTransformer } from '../transformers/dateTransformer'
10
8
  import { Master } from '..'
9
+ import { DateTransformer } from '../transformers/dateTransformer'
11
10
  import { jsonTransformer } from '../transformers/jsonTransformer'
12
11
 
13
12
  @Entity('master_notification', {
@@ -5,7 +5,6 @@ import { getTimeZone } from '..'
5
5
  export class DateTransformer implements ValueTransformer {
6
6
  to(value: Date | string): string {
7
7
  const result = moment(value).format('YYYY-MM-DD HH:mm:ss')
8
- console.log('To Value:', value, 'Transformed to:', result)
9
8
  return result
10
9
  }
11
10
 
@@ -14,7 +13,6 @@ export class DateTransformer implements ValueTransformer {
14
13
  .utc(value)
15
14
  .tz(getTimeZone())
16
15
  .format('YYYY-MM-DD HH:mm:ss')
17
- console.log('From Value:', value, 'Transformed from:', result)
18
16
  return result
19
17
  }
20
18
  }
@@ -7,7 +7,6 @@ export const jsonTransformer = {
7
7
  try {
8
8
  return JSON.parse(value)
9
9
  } catch (error) {
10
- console.error('Error parsing JSON:', error)
11
10
  return null
12
11
  }
13
12
  },