@punks/backend-entity-manager 0.0.367 → 0.0.369

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
@@ -165,6 +165,12 @@ exports.EntitySerializationFormat = void 0;
165
165
  EntitySerializationFormat["Xlsx"] = "xlsx";
166
166
  })(exports.EntitySerializationFormat || (exports.EntitySerializationFormat = {}));
167
167
 
168
+ exports.TaskRunType = void 0;
169
+ (function (TaskRunType) {
170
+ TaskRunType["Scheduled"] = "Scheduled";
171
+ TaskRunType["OnDemand"] = "OnDemand";
172
+ })(exports.TaskRunType || (exports.TaskRunType = {}));
173
+
168
174
  exports.EntityVersionOperation = void 0;
169
175
  (function (EntityVersionOperation) {
170
176
  EntityVersionOperation["Create"] = "create";
@@ -4263,11 +4269,11 @@ const WpEntitySnapshotService = (entityName, props = {}) => common.applyDecorato
4263
4269
  }));
4264
4270
 
4265
4271
  const TASK_KEY = "wp_task";
4266
- var TaskConcurrency;
4272
+ exports.TaskConcurrency = void 0;
4267
4273
  (function (TaskConcurrency) {
4268
4274
  TaskConcurrency["Single"] = "single";
4269
4275
  TaskConcurrency["Multiple"] = "multiple";
4270
- })(TaskConcurrency || (TaskConcurrency = {}));
4276
+ })(exports.TaskConcurrency || (exports.TaskConcurrency = {}));
4271
4277
  function WpTask(name, settings) {
4272
4278
  return common.applyDecorators(common.Injectable(), common.SetMetadata(TASK_KEY, {
4273
4279
  name,
@@ -34794,12 +34800,6 @@ exports.JobsModule = JobsModule_1 = __decorate([
34794
34800
  JobsProviderFactory])
34795
34801
  ], exports.JobsModule);
34796
34802
 
34797
- var TaskRunType;
34798
- (function (TaskRunType) {
34799
- TaskRunType["Scheduled"] = "Scheduled";
34800
- TaskRunType["OnDemand"] = "OnDemand";
34801
- })(TaskRunType || (TaskRunType = {}));
34802
-
34803
34803
  const getCronCurrentSchedule = (cronExpression, ref) => {
34804
34804
  const interval = parser$1.parseExpression(cronExpression, {
34805
34805
  currentDate: ref,
@@ -34822,9 +34822,9 @@ let TaskShell = TaskShell_1 = class TaskShell {
34822
34822
  }
34823
34823
  async executeTask(instance, settings) {
34824
34824
  switch (settings.concurrency) {
34825
- case TaskConcurrency.Single:
34825
+ case exports.TaskConcurrency.Single:
34826
34826
  return await this.executeTaskSequential(instance, settings);
34827
- case TaskConcurrency.Multiple:
34827
+ case exports.TaskConcurrency.Multiple:
34828
34828
  return await this.executeTaskParallel(instance, settings);
34829
34829
  default:
34830
34830
  throw new Error(`Unknown task concurrency: ${settings.concurrency}`);
@@ -34853,7 +34853,7 @@ let TaskShell = TaskShell_1 = class TaskShell {
34853
34853
  name: settings.name,
34854
34854
  startedAt: new Date(),
34855
34855
  runId: backendCore.newUuid(),
34856
- runType: TaskRunType.Scheduled,
34856
+ runType: exports.TaskRunType.Scheduled,
34857
34857
  });
34858
34858
  this.logger.info(`Task ${settings.name} -> completed`);
34859
34859
  }