backend-plus 2.5.2-betha.21 → 2.5.2-betha.22
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/lib/backend-plus.js +8 -3
- package/package.json +4 -4
package/lib/backend-plus.js
CHANGED
|
@@ -1317,17 +1317,22 @@ AppBackend.prototype.checkDatabaseStructure = async function checkDatabaseStruct
|
|
|
1317
1317
|
`;
|
|
1318
1318
|
throw new Error(message);
|
|
1319
1319
|
}
|
|
1320
|
-
var {rows: sql_routines} = await client.query(`SELECT routine_name, routine_schema, routine_definition
|
|
1320
|
+
var {rows: sql_routines} = await client.query(`SELECT routine_name, routine_schema, routine_type, routine_definition
|
|
1321
1321
|
FROM information_schema.routines
|
|
1322
1322
|
WHERE routine_schema in (${be.config.db.search_path.map(path => be.db.quoteLiteral(path)).join(', ')})
|
|
1323
1323
|
`).fetchAll();
|
|
1324
|
-
var sqlRoutines = likeAr.
|
|
1324
|
+
var sqlRoutines = likeAr.createIndex(sql_routines, 'routine_name');
|
|
1325
|
+
console.log(sqlRoutines)
|
|
1326
|
+
var set_app_user_RoutineType = sqlRoutines.set_app_user?.routine_type || 'inexsistente';
|
|
1327
|
+
if (set_app_user_RoutineType != 'PROCEDURE') {
|
|
1328
|
+
throw new Error('ERROR en la DB: set_app_user no es un PROCEDURE es ' + set_app_user_RoutineType);
|
|
1329
|
+
}
|
|
1325
1330
|
var message = ''
|
|
1326
1331
|
likeAr(AppBackend.prototype.sql_routines).forEach((routine_name, def) => {
|
|
1327
1332
|
if (sqlRoutines[routine_name] && def.dump.includes(sqlRoutines[routine_name].routine_definition)) {
|
|
1328
1333
|
message += `
|
|
1329
1334
|
----- hay que crear o actualizar la rutina ${routine_name}:
|
|
1330
|
-
${dump}
|
|
1335
|
+
${def.dump}
|
|
1331
1336
|
`;
|
|
1332
1337
|
}
|
|
1333
1338
|
})
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "backend-plus",
|
|
3
3
|
"description": "Backend for the anti Pareto rule",
|
|
4
|
-
"version": "2.5.2-betha.
|
|
4
|
+
"version": "2.5.2-betha.22",
|
|
5
5
|
"author": "Codenautas <codenautas@googlegroups.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": "codenautas/backend-plus",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@types/js-yaml": "^4.0.9",
|
|
86
86
|
"@types/mocha": "^10.0.10",
|
|
87
87
|
"@types/multiparty": "~4.2.1",
|
|
88
|
-
"@types/node": "^24.
|
|
88
|
+
"@types/node": "^24.4.0",
|
|
89
89
|
"@types/nodemailer": "^7.0.1",
|
|
90
90
|
"@types/numeral": "~2.0.5",
|
|
91
91
|
"@types/session-file-store": "^1.2.5",
|
|
@@ -100,9 +100,9 @@
|
|
|
100
100
|
"karma-ie-launcher": "^1.0.0",
|
|
101
101
|
"karma-mocha": "^2.0.1",
|
|
102
102
|
"kill-9": "~0.4.3",
|
|
103
|
-
"mocha": "^11.7.
|
|
103
|
+
"mocha": "^11.7.2",
|
|
104
104
|
"nyc": "^17.1.0",
|
|
105
|
-
"puppeteer": "^24.
|
|
105
|
+
"puppeteer": "^24.20.0",
|
|
106
106
|
"sinon": "^21.0.0",
|
|
107
107
|
"supertest": "^7.1.4",
|
|
108
108
|
"types.d.ts": "~0.6.22",
|