@punks/backend-entity-manager 0.0.134 → 0.0.136

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/cjs/index.js CHANGED
@@ -1500,7 +1500,7 @@ class EntitiesServiceLocator {
1500
1500
  this.provider.registerEntityService(EntityServices.Queries.IEntitiesSearchQuery, entityName, instance);
1501
1501
  }
1502
1502
  resolveFindQuery(entityName) {
1503
- return this.provider.resolveEntityService(EntityServices.Queries.IEntitiesSearchQuery, entityName);
1503
+ return this.provider.resolveEntityService(EntityServices.Queries.IEntitiesFindQuery, entityName);
1504
1504
  }
1505
1505
  registerFindQuery(entityName, instance) {
1506
1506
  this.provider.registerEntityService(EntityServices.Queries.IEntitiesFindQuery, entityName, instance);
@@ -21164,6 +21164,7 @@ class PipelineInstance {
21164
21164
  this.input = input;
21165
21165
  this.context = context;
21166
21166
  this.status = exports.PipelineStatus.Initializing;
21167
+ this.logger = backendCore.Log.getLogger(PipelineInstance.name);
21167
21168
  }
21168
21169
  async execute() {
21169
21170
  this.status = exports.PipelineStatus.Running;
@@ -21296,6 +21297,9 @@ class PipelineInstance {
21296
21297
  };
21297
21298
  }
21298
21299
  catch (error) {
21300
+ this.logger.exception(`Pipeline operation error -> operation:${operation.name}`, error, {
21301
+ input,
21302
+ });
21299
21303
  return {
21300
21304
  type: "error",
21301
21305
  input,
@@ -21330,6 +21334,11 @@ class PipelineInstance {
21330
21334
  };
21331
21335
  }
21332
21336
  catch (error) {
21337
+ this.logger.exception(`Pipeline operation rollback error -> rollbackOperation:${rollbackOperation.name}`, error, {
21338
+ operationInput,
21339
+ operationOutput,
21340
+ state,
21341
+ });
21333
21342
  return {
21334
21343
  type: "error",
21335
21344
  error: toPipelineOperationError(error),
@@ -22242,7 +22251,7 @@ class TypeOrmRepository {
22242
22251
  }
22243
22252
  async get(id, options) {
22244
22253
  if (backendCore.isNullOrUndefined(id)) {
22245
- throw new Error("Invalid 'id' parameter.");
22254
+ throw new Error("Missing 'id' parameter.");
22246
22255
  }
22247
22256
  this.logger.debug("Getting entity by id", { id });
22248
22257
  const result = await this.innerRepository.findOne({
@@ -22508,7 +22517,9 @@ class NestPipelineTemplate {
22508
22517
  const instance = await this.controller.createInstance(this.getDefinition(), data.input, data.context);
22509
22518
  const result = await instance.execute();
22510
22519
  if (result.type === "error") {
22511
- this.logger.error(`[ERROR] | ${this.metadata.name} -> ${result.exception?.name}`, {
22520
+ this.logger.error(`[ERROR] | ${this.metadata.name} -> ${result.exception
22521
+ ? `exception: ${result.exception.name}\n${result.exception.stack}`
22522
+ : ""}`, {
22512
22523
  ...logMetadata,
22513
22524
  result,
22514
22525
  });