@dudousxd/nestjs-durable 0.40.0 → 0.41.0

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.js CHANGED
@@ -419,7 +419,15 @@ var ThinWorkflowRegistrar = class {
419
419
  }
420
420
  onModuleInit() {
421
421
  if (!isPureThinWorker(this.options)) return;
422
- scanWorkflows(this.discovery, (meta, instance) => this.runtime.registerWorkflow(meta.name, (ctx, input) => instance.run(ctx, input)));
422
+ scanWorkflows(this.discovery, (meta, instance, origin) => this.runtime.registerWorkflow(meta.name, (ctx, input) => instance.run(ctx, input), {
423
+ version: meta.version,
424
+ ...meta.requires !== void 0 ? {
425
+ requires: meta.requires
426
+ } : {},
427
+ ...origin !== void 0 ? {
428
+ origin
429
+ } : {}
430
+ }));
423
431
  }
424
432
  };
425
433
  ThinWorkflowRegistrar = _ts_decorate2([
@@ -813,7 +821,15 @@ var InAppWorkerBootstrap = class {
813
821
  }
814
822
  onModuleInit() {
815
823
  if (!isCoLocatedWorker(this.options)) return;
816
- scanWorkflows(this.discovery, (meta, instance) => this.runtime.registerWorkflow(meta.name, (ctx, input) => instance.run(ctx, input)));
824
+ scanWorkflows(this.discovery, (meta, instance, origin) => this.runtime.registerWorkflow(meta.name, (ctx, input) => instance.run(ctx, input), {
825
+ version: meta.version,
826
+ ...meta.requires !== void 0 ? {
827
+ requires: meta.requires
828
+ } : {},
829
+ ...origin !== void 0 ? {
830
+ origin
831
+ } : {}
832
+ }));
817
833
  scanSteps(this.discovery, this.metadataScanner, (meta, handler) => this.runtime.registerStep(meta.name, handler));
818
834
  }
819
835
  async onApplicationBootstrap() {