This commit is contained in:
sli97
2023-09-21 01:32:11 +08:00
commit 47104caa6e
964 changed files with 62409 additions and 0 deletions

7
dist/runtime/base/Action.js vendored Normal file
View File

@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Action = void 0;
const Node_1 = require("./Node");
class Action extends Node_1.Node {
}
exports.Action = Action;

12
dist/runtime/base/Composite.js vendored Normal file
View File

@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Composite = void 0;
const enum_1 = require("../core/enum");
const ParentNode_1 = require("./ParentNode");
class Composite extends ParentNode_1.ParentNode {
constructor(children = [], abortType = enum_1.AbortType.None) {
super(children);
this.abortType = abortType;
}
}
exports.Composite = Composite;

7
dist/runtime/base/Condition.js vendored Normal file
View File

@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Condition = void 0;
const Node_1 = require("./Node");
class Condition extends Node_1.Node {
}
exports.Condition = Condition;

7
dist/runtime/base/Decorator.js vendored Normal file
View File

@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Decorator = void 0;
const ParentNode_1 = require("./ParentNode");
class Decorator extends ParentNode_1.ParentNode {
}
exports.Decorator = Decorator;

25
dist/runtime/base/Node.js vendored Normal file
View File

@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Node = void 0;
const enum_1 = require("../core/enum");
class Node {
constructor() {
this._status = enum_1.NodeStatus.Inactive;
}
get status() {
return this._status;
}
set status(newStatus) {
this._status = newStatus;
}
onStart() {
this.status = enum_1.NodeStatus.Running;
}
onUpdate() {
return enum_1.NodeStatus.Success;
}
onEnd() {
this.status = enum_1.NodeStatus.Inactive;
}
}
exports.Node = Node;

30
dist/runtime/base/ParentNode.js vendored Normal file
View File

@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ParentNode = void 0;
const Node_1 = require("./Node");
class ParentNode extends Node_1.Node {
get index() {
return this._index;
}
set index(data) {
this._index = data;
}
constructor(children) {
super();
this.children = [];
this._index = 0;
this.children = children;
}
setChildren(children) {
this.children = children;
}
onConditionalAbort(childIndex) { }
decorate(status) {
return status;
}
canRunParallelChildren() {
return false;
}
onChildStarted() { }
}
exports.ParentNode = ParentNode;

22
dist/runtime/base/index.js vendored Normal file
View File

@@ -0,0 +1,22 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./Node"), exports);
__exportStar(require("./Action"), exports);
__exportStar(require("./Composite"), exports);
__exportStar(require("./Condition"), exports);
__exportStar(require("./Decorator"), exports);
__exportStar(require("./ParentNode"), exports);