test-entity-library-asm 1.3.6 → 1.3.8

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.
@@ -75,8 +75,8 @@ var Master = /** @class */ (function () {
75
75
  ], Master.prototype, "address", void 0);
76
76
  __decorate([
77
77
  (0, typeorm_1.Column)({
78
- length: 100,
79
- comment: 'Contraseña almacenada tipo MD5 del master.',
78
+ length: 255,
79
+ comment: 'Contraseña almacenada tipo SHA256 del master.',
80
80
  }),
81
81
  __metadata("design:type", String)
82
82
  ], Master.prototype, "password", void 0);
@@ -2,9 +2,9 @@ import { City } from './City';
2
2
  import { Company } from './Company';
3
3
  import { DiscountCodeUser } from './DiscountCodeUser';
4
4
  import { Local } from './Local';
5
- import { TerminalSession } from './TerminalSession';
6
5
  import { PartnerRole } from './PartnerRole';
7
6
  import { Terminal } from './Terminal';
7
+ import { TerminalSession } from './TerminalSession';
8
8
  export declare class Partner {
9
9
  id: number;
10
10
  code: string;
@@ -15,9 +15,9 @@ var City_1 = require("./City");
15
15
  var Company_1 = require("./Company");
16
16
  var DiscountCodeUser_1 = require("./DiscountCodeUser");
17
17
  var Local_1 = require("./Local");
18
- var TerminalSession_1 = require("./TerminalSession");
19
18
  var PartnerRole_1 = require("./PartnerRole");
20
19
  var Terminal_1 = require("./Terminal");
20
+ var TerminalSession_1 = require("./TerminalSession");
21
21
  var Partner = /** @class */ (function () {
22
22
  function Partner() {
23
23
  }
@@ -78,8 +78,8 @@ var Partner = /** @class */ (function () {
78
78
  ], Partner.prototype, "address", void 0);
79
79
  __decorate([
80
80
  (0, typeorm_1.Column)({
81
- length: 100,
82
- comment: 'Contraseña almacenada tipo MD5 del partner.',
81
+ length: 255,
82
+ comment: 'Contraseña almacenada tipo SHA256 del partner.',
83
83
  }),
84
84
  __metadata("design:type", String)
85
85
  ], Partner.prototype, "password", void 0);
@@ -101,8 +101,8 @@ var User = /** @class */ (function () {
101
101
  ], User.prototype, "longitude", void 0);
102
102
  __decorate([
103
103
  (0, typeorm_1.Column)({
104
- length: 50,
105
- comment: 'Contraseña almacenada tipo MD5 del usuario.',
104
+ length: 255,
105
+ comment: 'Contraseña almacenada tipo SHA256 del usuario.',
106
106
  }),
107
107
  __metadata("design:type", String)
108
108
  ], User.prototype, "password", void 0);
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { DataSource } from 'typeorm';
2
2
  export declare function createDataBaseSource(): DataSource;
3
3
  export declare function showEntity(entityName: string): Promise<any>;
4
- export declare function callStoredProcedure(storedProcedure: any): Promise<any>;
4
+ export declare function callStoredProcedure(storedProcedure: any, elements: any): Promise<any>;
package/dist/index.js CHANGED
@@ -87,7 +87,7 @@ function showEntity(entityName) {
87
87
  });
88
88
  }
89
89
  exports.showEntity = showEntity;
90
- function callStoredProcedure(storedProcedure) {
90
+ function callStoredProcedure(storedProcedure, elements) {
91
91
  return __awaiter(this, void 0, void 0, function () {
92
92
  var result, error_1;
93
93
  return __generator(this, function (_a) {
@@ -100,7 +100,7 @@ function callStoredProcedure(storedProcedure) {
100
100
  case 1:
101
101
  _a.sent();
102
102
  _a.label = 2;
103
- case 2: return [4 /*yield*/, connection.query("CALL ".concat(storedProcedure))];
103
+ case 2: return [4 /*yield*/, connection.query("CALL ".concat(storedProcedure), elements)];
104
104
  case 3:
105
105
  result = _a.sent();
106
106
  return [2 /*return*/, result];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "test-entity-library-asm",
3
- "version": "1.3.6",
3
+ "version": "1.3.8",
4
4
  "description": "Entidades de ejemplo para una base de datos",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -65,8 +65,8 @@ export class Master {
65
65
  address: string
66
66
 
67
67
  @Column({
68
- length: 100,
69
- comment: 'Contraseña almacenada tipo MD5 del master.',
68
+ length: 255,
69
+ comment: 'Contraseña almacenada tipo SHA256 del master.',
70
70
  })
71
71
  password: string
72
72
 
@@ -9,20 +9,12 @@ import {
9
9
  PrimaryGeneratedColumn,
10
10
  } from 'typeorm'
11
11
  import { City } from './City'
12
- import { CodeRedemptionHistoryUser } from './CodeRedemptionHistoryUser'
13
12
  import { Company } from './Company'
14
- import { DiscountCodeCompany } from './DiscountCodeCompany'
15
13
  import { DiscountCodeUser } from './DiscountCodeUser'
16
14
  import { Local } from './Local'
17
- import { LocalQualification } from './LocalQualification'
18
- import { Master } from './Master'
19
- import { Plan } from './Plan'
20
- import { Request } from './Request'
21
- import { RequestProduct } from './RequestProduct'
22
- import { RequestProductGroupComplement } from './RequestProductGroupComplement'
23
- import { TerminalSession } from './TerminalSession'
24
15
  import { PartnerRole } from './PartnerRole'
25
16
  import { Terminal } from './Terminal'
17
+ import { TerminalSession } from './TerminalSession'
26
18
 
27
19
  @Entity({
28
20
  comment:
@@ -76,8 +68,8 @@ export class Partner {
76
68
  address: string
77
69
 
78
70
  @Column({
79
- length: 100,
80
- comment: 'Contraseña almacenada tipo MD5 del partner.',
71
+ length: 255,
72
+ comment: 'Contraseña almacenada tipo SHA256 del partner.',
81
73
  })
82
74
  password: string
83
75
 
@@ -86,8 +86,8 @@ export class User {
86
86
  longitude: number
87
87
 
88
88
  @Column({
89
- length: 50,
90
- comment: 'Contraseña almacenada tipo MD5 del usuario.',
89
+ length: 255,
90
+ comment: 'Contraseña almacenada tipo SHA256 del usuario.',
91
91
  })
92
92
  password: string
93
93
 
package/src/index.ts CHANGED
@@ -44,14 +44,14 @@ export async function showEntity(entityName: string): Promise<any> {
44
44
  return connection.getRepository(entityName)
45
45
  }
46
46
 
47
- export async function callStoredProcedure(storedProcedure: any) {
47
+ export async function callStoredProcedure(storedProcedure: any, elements: any) {
48
48
  try {
49
49
  if (!connection) {
50
50
  connection = createDataBaseSource()
51
51
  await connection.initialize()
52
52
  }
53
53
 
54
- const result = await connection.query(`CALL ${storedProcedure}`)
54
+ const result = await connection.query(`CALL ${storedProcedure}`, elements)
55
55
  return result
56
56
  } catch (error) {
57
57
  console.error('Error calling stored procedure:', error)