test-entity-library-asm 2.8.13 → 2.8.14
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/index.js +0 -4
- package/package.json +1 -1
- package/src/index.ts +1 -5
package/dist/index.js
CHANGED
|
@@ -57,7 +57,6 @@ var path_1 = require("path");
|
|
|
57
57
|
var typeorm_1 = require("typeorm");
|
|
58
58
|
var _1 = require(".");
|
|
59
59
|
var moment = require("moment-timezone");
|
|
60
|
-
var entities_views_routes_1 = require("./entities.views.routes");
|
|
61
60
|
__exportStar(require("./entities.views.routes"), exports);
|
|
62
61
|
var asyncLocalStorage = new async_hooks_1.AsyncLocalStorage();
|
|
63
62
|
var connection = null;
|
|
@@ -85,7 +84,6 @@ function createDataBaseSource() {
|
|
|
85
84
|
"/views".concat(process.env.DB_ENTITIES_ROUTE
|
|
86
85
|
? "/".concat(process.env.DB_ENTITIES_ROUTE)
|
|
87
86
|
: "", "/*{.js,.ts}"),
|
|
88
|
-
entities_views_routes_1.PartnerNotifications,
|
|
89
87
|
],
|
|
90
88
|
subscribers: [],
|
|
91
89
|
migrations: [],
|
|
@@ -102,7 +100,6 @@ function showEntityNameEntity(entity) {
|
|
|
102
100
|
switch (_a.label) {
|
|
103
101
|
case 0:
|
|
104
102
|
if (!(!connection || !connection.isInitialized)) return [3 /*break*/, 2];
|
|
105
|
-
console.log("Esperando inicialización del DataSource...");
|
|
106
103
|
connection = createDataBaseSource();
|
|
107
104
|
return [4 /*yield*/, connection.initialize()];
|
|
108
105
|
case 1:
|
|
@@ -150,7 +147,6 @@ function callStoredProcedure(storedProcedure, elements) {
|
|
|
150
147
|
return [2 /*return*/, result];
|
|
151
148
|
case 4:
|
|
152
149
|
error_1 = _a.sent();
|
|
153
|
-
console.error("Error calling stored procedure:", error_1);
|
|
154
150
|
throw error_1;
|
|
155
151
|
case 5: return [2 /*return*/];
|
|
156
152
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -3,10 +3,9 @@ import { config } from "dotenv";
|
|
|
3
3
|
import { NextFunction, Request, Response } from "express";
|
|
4
4
|
import { resolve } from "path";
|
|
5
5
|
import { DataSource, EntityTarget, ObjectLiteral, Repository } from "typeorm";
|
|
6
|
-
import { IType } from "./interfaces";
|
|
7
6
|
import { CustomRepository } from ".";
|
|
7
|
+
import { IType } from "./interfaces";
|
|
8
8
|
import moment = require("moment-timezone");
|
|
9
|
-
import { PartnerNotifications } from "./entities.views.routes";
|
|
10
9
|
export * from "./entities.views.routes";
|
|
11
10
|
|
|
12
11
|
const asyncLocalStorage = new AsyncLocalStorage<Map<string, string>>();
|
|
@@ -40,7 +39,6 @@ export function createDataBaseSource(): DataSource {
|
|
|
40
39
|
? `/${process.env.DB_ENTITIES_ROUTE}`
|
|
41
40
|
: ""
|
|
42
41
|
}/*{.js,.ts}`,
|
|
43
|
-
PartnerNotifications,
|
|
44
42
|
],
|
|
45
43
|
subscribers: [],
|
|
46
44
|
migrations: [],
|
|
@@ -55,7 +53,6 @@ export async function showEntityNameEntity<T extends ObjectLiteral>(
|
|
|
55
53
|
entity: EntityTarget<T>
|
|
56
54
|
): Promise<Repository<T>> {
|
|
57
55
|
if (!connection || !connection.isInitialized) {
|
|
58
|
-
console.log("Esperando inicialización del DataSource...");
|
|
59
56
|
connection = createDataBaseSource();
|
|
60
57
|
await connection.initialize();
|
|
61
58
|
}
|
|
@@ -81,7 +78,6 @@ export async function callStoredProcedure(storedProcedure: any, elements: any) {
|
|
|
81
78
|
const result = await connection.query(`CALL ${storedProcedure}`, elements);
|
|
82
79
|
return result;
|
|
83
80
|
} catch (error) {
|
|
84
|
-
console.error("Error calling stored procedure:", error);
|
|
85
81
|
throw error;
|
|
86
82
|
}
|
|
87
83
|
}
|