@punks/backend-entity-manager 0.0.470 → 0.0.471

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
@@ -35596,7 +35596,7 @@ class NestPipelineTemplate {
35596
35596
  return result.output;
35597
35597
  }
35598
35598
  async execute(data) {
35599
- if (this.options?.concurrency === "sequential") {
35599
+ if (this.concurrency === "sequential") {
35600
35600
  return await this.operationsLockService.executeSequential({
35601
35601
  lockUid: this.getConcurrencyKey(data.input),
35602
35602
  operation: async () => {
@@ -35604,7 +35604,7 @@ class NestPipelineTemplate {
35604
35604
  },
35605
35605
  });
35606
35606
  }
35607
- if (this.options?.concurrency === "exclusive") {
35607
+ if (this.concurrency === "exclusive") {
35608
35608
  const result = await this.operationsLockService.executeExclusive({
35609
35609
  lockUid: this.getConcurrencyKey(data.input),
35610
35610
  operation: async () => {
@@ -35622,9 +35622,9 @@ class NestPipelineTemplate {
35622
35622
  context: data.context,
35623
35623
  instanceId,
35624
35624
  };
35625
- this.logger.debug(`[START] | ${this.metadata.name}`, logMetadata);
35625
+ this.logger.debug(`[START] | ${this.metadata.name}`, this.processLogMetadata(logMetadata));
35626
35626
  if (!this.isAuthorized(data.context)) {
35627
- this.logger.debug(`[ERROR] | ${this.metadata.name} -> Unauthorized`, logMetadata);
35627
+ this.logger.debug(`[ERROR] | ${this.metadata.name} -> Unauthorized`, this.processLogMetadata(logMetadata));
35628
35628
  return {
35629
35629
  type: "error",
35630
35630
  errorType: exports.PipelineErrorType.Unauthorized,
@@ -35637,19 +35637,25 @@ class NestPipelineTemplate {
35637
35637
  if (result.type === "error") {
35638
35638
  this.logger.error(`[ERROR] | ${this.metadata.name} -> ${result.exception
35639
35639
  ? `exception: ${result.exception.name}\n${result.exception.stack}`
35640
- : ""}`, {
35640
+ : ""}`, this.processLogMetadata({
35641
35641
  ...logMetadata,
35642
35642
  result,
35643
- });
35643
+ }));
35644
35644
  }
35645
35645
  else {
35646
- this.logger.debug(`[COMPLETED] | ${this.metadata.name}`, {
35646
+ this.logger.debug(`[COMPLETED] | ${this.metadata.name}`, this.processLogMetadata({
35647
35647
  ...logMetadata,
35648
35648
  result,
35649
- });
35649
+ }));
35650
35650
  }
35651
35651
  return result;
35652
35652
  }
35653
+ processLogMetadata(meta) {
35654
+ if (this.metadata.options?.logging?.ignoreMeta) {
35655
+ return undefined;
35656
+ }
35657
+ return meta;
35658
+ }
35653
35659
  getDefinition() {
35654
35660
  if (!this.cachedDefinition) {
35655
35661
  this.cachedDefinition = this.buildDefinition();
@@ -35666,6 +35672,9 @@ class NestPipelineTemplate {
35666
35672
  .resolveAuthenticationContextProvider();
35667
35673
  return (await contextService?.getContext());
35668
35674
  }
35675
+ get concurrency() {
35676
+ return this.options?.concurrency ?? this.metadata.concurrency;
35677
+ }
35669
35678
  get operationsLockService() {
35670
35679
  return this.registry
35671
35680
  .getContainer()