@pxp-nd/flow 1.0.41 → 1.0.43

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.
@@ -19,40 +19,40 @@ const common_1 = require("@pxp-nd/common");
19
19
  let NodeInstance = class NodeInstance extends common_1.PxpEntity {
20
20
  };
21
21
  __decorate([
22
- typeorm_1.PrimaryGeneratedColumn({ name: 'node_instance_id' }),
22
+ (0, typeorm_1.PrimaryGeneratedColumn)({ name: 'node_instance_id' }),
23
23
  __metadata("design:type", Number)
24
24
  ], NodeInstance.prototype, "nodeInstanceId", void 0);
25
25
  __decorate([
26
- typeorm_1.Column({ name: 'node_id', type: 'numeric', nullable: true }),
26
+ (0, typeorm_1.Column)({ name: 'node_id', type: 'numeric', nullable: true }),
27
27
  __metadata("design:type", Number)
28
28
  ], NodeInstance.prototype, "nodeId", void 0);
29
29
  __decorate([
30
- typeorm_1.Column({ name: 'flow_instance_id', type: 'numeric', nullable: true }),
30
+ (0, typeorm_1.Column)({ name: 'flow_instance_id', type: 'numeric', nullable: true }),
31
31
  __metadata("design:type", Number)
32
32
  ], NodeInstance.prototype, "flowInstanceId", void 0);
33
33
  __decorate([
34
- typeorm_1.Column({ name: 'run_time', type: 'timestamp', nullable: false }),
34
+ (0, typeorm_1.Column)({ name: 'run_time', type: 'timestamp', nullable: false }),
35
35
  __metadata("design:type", Date)
36
36
  ], NodeInstance.prototype, "runTime", void 0);
37
37
  __decorate([
38
- typeorm_1.Column({ name: 'schedule', type: 'timestamp', nullable: false }),
38
+ (0, typeorm_1.Column)({ name: 'schedule', type: 'timestamp', nullable: false }),
39
39
  __metadata("design:type", Date)
40
40
  ], NodeInstance.prototype, "schedule", void 0);
41
41
  __decorate([
42
- typeorm_1.Column({ name: 'status', type: 'varchar', nullable: false, length: 50 }),
42
+ (0, typeorm_1.Column)({ name: 'status', type: 'varchar', nullable: false, length: 50 }),
43
43
  __metadata("design:type", String)
44
44
  ], NodeInstance.prototype, "status", void 0);
45
45
  __decorate([
46
- typeorm_1.ManyToOne(() => FlowInstance_1.default, flowInstance => flowInstance.nodeInstances),
47
- typeorm_1.JoinColumn({ name: 'flow_instance_id' }),
46
+ (0, typeorm_1.ManyToOne)(() => FlowInstance_1.default, flowInstance => flowInstance.nodeInstances),
47
+ (0, typeorm_1.JoinColumn)({ name: 'flow_instance_id' }),
48
48
  __metadata("design:type", FlowInstance_1.default)
49
49
  ], NodeInstance.prototype, "flowInstance", void 0);
50
50
  __decorate([
51
- typeorm_1.ManyToOne(() => Node_1.default, node => node.nodeInstances, { eager: true }),
52
- typeorm_1.JoinColumn({ name: 'node_id' }),
51
+ (0, typeorm_1.ManyToOne)(() => Node_1.default, node => node.nodeInstances, { eager: true }),
52
+ (0, typeorm_1.JoinColumn)({ name: 'node_id' }),
53
53
  __metadata("design:type", Node_1.default)
54
54
  ], NodeInstance.prototype, "node", void 0);
55
55
  NodeInstance = __decorate([
56
- typeorm_1.Entity({ name: 'twf_node_instance' })
56
+ (0, typeorm_1.Entity)({ name: 'twf_node_instance' })
57
57
  ], NodeInstance);
58
58
  exports.default = NodeInstance;
@@ -18,26 +18,26 @@ const common_1 = require("@pxp-nd/common");
18
18
  let OriginName = class OriginName extends common_1.PxpEntity {
19
19
  };
20
20
  __decorate([
21
- typeorm_1.PrimaryGeneratedColumn({ name: 'origin_name_id' }),
21
+ (0, typeorm_1.PrimaryGeneratedColumn)({ name: 'origin_name_id' }),
22
22
  __metadata("design:type", Number)
23
23
  ], OriginName.prototype, "originNameId", void 0);
24
24
  __decorate([
25
- typeorm_1.Column({ type: 'varchar', nullable: false, length: 100 }),
25
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: false, length: 100 }),
26
26
  __metadata("design:type", String)
27
27
  ], OriginName.prototype, "name", void 0);
28
28
  __decorate([
29
- typeorm_1.Column({ type: 'text', nullable: false }),
29
+ (0, typeorm_1.Column)({ type: 'text', nullable: false }),
30
30
  __metadata("design:type", String)
31
31
  ], OriginName.prototype, "description", void 0);
32
32
  __decorate([
33
- typeorm_1.Column({ type: 'varchar', nullable: false, length: 150 }),
33
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: false, length: 150 }),
34
34
  __metadata("design:type", String)
35
35
  ], OriginName.prototype, "originKey", void 0);
36
36
  __decorate([
37
- typeorm_1.OneToMany(() => FieldMap_1.default, (fieldMap) => fieldMap.originName),
37
+ (0, typeorm_1.OneToMany)(() => FieldMap_1.default, (fieldMap) => fieldMap.originName),
38
38
  __metadata("design:type", Array)
39
39
  ], OriginName.prototype, "fields", void 0);
40
40
  OriginName = __decorate([
41
- typeorm_1.Entity({ name: 'twf_origin_name' })
41
+ (0, typeorm_1.Entity)({ name: 'twf_origin_name' })
42
42
  ], OriginName);
43
43
  exports.default = OriginName;
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -38,13 +38,13 @@ let Event = class Event {
38
38
  async afterInsert(event) {
39
39
  //todo investigate replace variables into condition
40
40
  const newEvent = event.entity;
41
- const node = await core_1.__(Node_1.default.find({ where: { actionId: newEvent.actionId, isActive: 1 } }));
41
+ const node = await (0, core_1.__)(Node_1.default.find({ where: { actionId: newEvent.actionId, isActive: 1 } }));
42
42
  for (const n of node) {
43
43
  //get data of view
44
44
  const { action: { originName, originKey }, } = n;
45
45
  const executeView = `select * from ${originName} where ${originKey} = ${newEvent.dataId}`;
46
- const resExecuteView = await typeorm_1.getManager().query(executeView);
47
- const flow = await core_1.__(Flow_1.default.findOne({ where: { flowId: n.flowId, isActive: 1 } }));
46
+ const resExecuteView = await (0, typeorm_1.getManager)().query(executeView);
47
+ const flow = await (0, core_1.__)(Flow_1.default.findOne({ where: { flowId: n.flowId, isActive: 1 } }));
48
48
  if (flow && flow.vendorId == resExecuteView[0].vendor_id &&
49
49
  (await this.checkConditions(resExecuteView[0], n.flowId, newEvent.actionId))) {
50
50
  //now check all conditions
@@ -79,6 +79,6 @@ let Event = class Event {
79
79
  }
80
80
  };
81
81
  Event = __decorate([
82
- typeorm_1.EventSubscriber()
82
+ (0, typeorm_1.EventSubscriber)()
83
83
  ], Event);
84
84
  exports.Event = Event;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pxp-nd/flow",
3
- "version": "1.0.41",
3
+ "version": "1.0.43",
4
4
  "description": "Workflow module for pxp-nd framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",