@punks/backend-entity-manager 0.0.370 → 0.0.371

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.
@@ -6,6 +6,7 @@ export declare enum TaskConcurrency {
6
6
  export type TaskSettings = {
7
7
  cronExpression?: string;
8
8
  concurrency: TaskConcurrency;
9
+ description?: string;
9
10
  };
10
11
  export type TaskProps = TaskSettings & {
11
12
  name: string;
@@ -7,4 +7,8 @@ export declare class TasksRegistry {
7
7
  props: TaskProps;
8
8
  instance: ITask;
9
9
  };
10
+ getTasks(): {
11
+ props: TaskProps;
12
+ instance: ITask;
13
+ }[];
10
14
  }
@@ -7,4 +7,8 @@ export declare class TasksService {
7
7
  constructor(jobShell: TaskShell, registry: TasksRegistry);
8
8
  triggerTask(name: string): Promise<void>;
9
9
  invokeTask(name: string): Promise<void>;
10
+ getTasks(): Promise<{
11
+ props: import("../../../../decorators/tasks").TaskProps;
12
+ instance: import("../../../../../../abstractions").ITask;
13
+ }[]>;
10
14
  }
package/dist/esm/index.js CHANGED
@@ -34913,6 +34913,9 @@ let TasksRegistry = class TasksRegistry {
34913
34913
  }
34914
34914
  return task;
34915
34915
  }
34916
+ getTasks() {
34917
+ return Array.from(this.tasks.values());
34918
+ }
34916
34919
  };
34917
34920
  TasksRegistry = __decorate([
34918
34921
  Injectable()
@@ -34984,6 +34987,9 @@ let TasksService = TasksService_1 = class TasksService {
34984
34987
  await this.jobShell.executeTask(task.instance, task.props, TaskRunType.OnDemand);
34985
34988
  this.logger.log(`Manual task ${name} -> completed`);
34986
34989
  }
34990
+ async getTasks() {
34991
+ return this.registry.getTasks();
34992
+ }
34987
34993
  };
34988
34994
  TasksService = TasksService_1 = __decorate([
34989
34995
  Injectable(),