nicot 1.1.24 → 1.1.25
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.cjs +2 -2
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +2 -2
- package/dist/src/crud-base.d.ts +1 -1
- package/dist/src/restful.d.ts +7 -3
- package/package.json +2 -2
- package/build.js +0 -167
package/dist/index.mjs
CHANGED
|
@@ -1099,6 +1099,7 @@ var CrudBase = class {
|
|
|
1099
1099
|
this.crudOptions.relations,
|
|
1100
1100
|
(r) => !r.computed
|
|
1101
1101
|
);
|
|
1102
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1102
1103
|
this.extraGetQuery = this.crudOptions.extraGetQuery || ((qb) => {
|
|
1103
1104
|
});
|
|
1104
1105
|
this.log = new ConsoleLogger(`${this.entityClass.name}Service`);
|
|
@@ -1146,7 +1147,7 @@ var CrudBase = class {
|
|
|
1146
1147
|
}
|
|
1147
1148
|
async _batchCreate(ents, beforeCreate, skipErrors = false) {
|
|
1148
1149
|
const entsWithId = ents.filter((ent) => ent.id != null);
|
|
1149
|
-
|
|
1150
|
+
return this.repo.manager.transaction(async (mdb) => {
|
|
1150
1151
|
let skipped = [];
|
|
1151
1152
|
const repo = mdb.getRepository(this.entityClass);
|
|
1152
1153
|
let entsToSave = ents;
|
|
@@ -1247,7 +1248,6 @@ var CrudBase = class {
|
|
|
1247
1248
|
throw new BlankReturnMessageDto2(500, "Internal error").toException();
|
|
1248
1249
|
}
|
|
1249
1250
|
});
|
|
1250
|
-
return result;
|
|
1251
1251
|
}
|
|
1252
1252
|
async create(_ent, beforeCreate) {
|
|
1253
1253
|
if (!_ent) {
|