@quanticjs/workflow 2.0.0 → 3.0.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.
@@ -9,7 +9,6 @@ var QuanticWorkflowModule_1;
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.QuanticWorkflowModule = void 0;
11
11
  const common_1 = require("@nestjs/common");
12
- const core_1 = require("@quanticjs/core");
13
12
  const WorkflowBehavior_1 = require("./WorkflowBehavior");
14
13
  let QuanticWorkflowModule = QuanticWorkflowModule_1 = class QuanticWorkflowModule {
15
14
  static forRoot() {
@@ -17,7 +16,6 @@ let QuanticWorkflowModule = QuanticWorkflowModule_1 = class QuanticWorkflowModul
17
16
  module: QuanticWorkflowModule_1,
18
17
  providers: [
19
18
  WorkflowBehavior_1.WorkflowBehavior,
20
- { provide: core_1.PIPELINE_BEHAVIOR, useExisting: WorkflowBehavior_1.WorkflowBehavior, multi: true },
21
19
  ],
22
20
  exports: [
23
21
  WorkflowBehavior_1.WorkflowBehavior,
@@ -1,9 +1,7 @@
1
- import { Result, PipelineBehavior, PipelineScope } from '@quanticjs/core';
1
+ import { Result, PipelineBehavior } from '@quanticjs/core';
2
2
  import type { WorkflowEngine } from '@quanticjs/core';
3
3
  export declare class WorkflowBehavior implements PipelineBehavior {
4
4
  private readonly engine?;
5
- readonly order: 50;
6
- readonly scope: PipelineScope;
7
5
  private readonly logger;
8
6
  constructor(engine?: WorkflowEngine | undefined);
9
7
  execute<T>(command: object, next: () => Promise<Result<T>>): Promise<Result<T>>;
@@ -18,8 +18,6 @@ const common_1 = require("@nestjs/common");
18
18
  const core_1 = require("@quanticjs/core");
19
19
  let WorkflowBehavior = WorkflowBehavior_1 = class WorkflowBehavior {
20
20
  engine;
21
- order = core_1.BehaviorOrder.WORKFLOW;
22
- scope = 'command';
23
21
  logger = new common_1.Logger(WorkflowBehavior_1.name);
24
22
  constructor(engine) {
25
23
  this.engine = engine;
@@ -55,6 +53,7 @@ let WorkflowBehavior = WorkflowBehavior_1 = class WorkflowBehavior {
55
53
  exports.WorkflowBehavior = WorkflowBehavior;
56
54
  exports.WorkflowBehavior = WorkflowBehavior = WorkflowBehavior_1 = __decorate([
57
55
  (0, common_1.Injectable)(),
56
+ (0, core_1.Behavior)({ order: core_1.BehaviorOrder.WORKFLOW, scope: 'command' }),
58
57
  __param(0, (0, common_1.Optional)()),
59
58
  __param(0, (0, common_1.Inject)(core_1.WORKFLOW_ENGINE)),
60
59
  __metadata("design:paramtypes", [Object])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quanticjs/workflow",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "Workflow engine integration for quanticjs — pipeline behavior for external BPM engines",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "clean": "rm -rf dist"
19
19
  },
20
20
  "dependencies": {
21
- "@quanticjs/core": "^2.0.0"
21
+ "@quanticjs/core": "^3.0.0"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "@nestjs/common": "^11.0.0"