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.cjs
CHANGED
|
@@ -1150,6 +1150,7 @@ var CrudBase = class {
|
|
|
1150
1150
|
this.crudOptions.relations,
|
|
1151
1151
|
(r) => !r.computed
|
|
1152
1152
|
);
|
|
1153
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1153
1154
|
this.extraGetQuery = this.crudOptions.extraGetQuery || ((qb) => {
|
|
1154
1155
|
});
|
|
1155
1156
|
this.log = new import_common2.ConsoleLogger(`${this.entityClass.name}Service`);
|
|
@@ -1197,7 +1198,7 @@ var CrudBase = class {
|
|
|
1197
1198
|
}
|
|
1198
1199
|
async _batchCreate(ents, beforeCreate, skipErrors = false) {
|
|
1199
1200
|
const entsWithId = ents.filter((ent) => ent.id != null);
|
|
1200
|
-
|
|
1201
|
+
return this.repo.manager.transaction(async (mdb) => {
|
|
1201
1202
|
let skipped = [];
|
|
1202
1203
|
const repo = mdb.getRepository(this.entityClass);
|
|
1203
1204
|
let entsToSave = ents;
|
|
@@ -1298,7 +1299,6 @@ var CrudBase = class {
|
|
|
1298
1299
|
throw new import_nesties8.BlankReturnMessageDto(500, "Internal error").toException();
|
|
1299
1300
|
}
|
|
1300
1301
|
});
|
|
1301
|
-
return result;
|
|
1302
1302
|
}
|
|
1303
1303
|
async create(_ent, beforeCreate) {
|
|
1304
1304
|
if (!_ent) {
|