verteilen-core 1.2.3 → 1.2.6
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/index.d.ts +3 -0
- package/dist/jest.config.d.ts +2 -0
- package/dist/src/client/analysis.d.ts +35 -0
- package/dist/src/client/analysis.js +318 -319
- package/dist/src/client/client.d.ts +25 -0
- package/dist/src/client/client.js +162 -168
- package/dist/src/client/cluster.d.ts +1 -0
- package/dist/src/client/cluster.js +1 -2
- package/dist/src/client/database.d.ts +13 -0
- package/dist/src/client/database.js +28 -27
- package/dist/src/client/execute.d.ts +24 -0
- package/dist/src/client/execute.js +61 -51
- package/dist/src/client/http.d.ts +7 -0
- package/dist/src/client/http.js +29 -26
- package/dist/src/client/javascript.d.ts +47 -0
- package/dist/src/client/javascript.js +110 -136
- package/dist/src/client/job_database.d.ts +10 -0
- package/dist/src/client/job_database.js +27 -29
- package/dist/src/client/job_execute.d.ts +20 -0
- package/dist/src/client/job_execute.js +148 -146
- package/dist/src/client/os.d.ts +29 -0
- package/dist/src/client/os.js +131 -136
- package/dist/src/client/resource.d.ts +7 -0
- package/dist/src/client/resource.js +93 -104
- package/dist/src/client/shell.d.ts +16 -0
- package/dist/src/client/shell.js +102 -98
- package/dist/src/computed.d.ts +13 -0
- package/dist/src/interface/base.d.ts +70 -0
- package/dist/src/interface/bus.d.ts +90 -0
- package/dist/src/interface/enum.d.ts +143 -0
- package/dist/src/interface/enum.js +5 -5
- package/dist/src/interface/execute.d.ts +20 -0
- package/dist/src/interface/record.d.ts +93 -0
- package/dist/src/interface/server.d.ts +76 -0
- package/dist/src/interface/struct.d.ts +182 -0
- package/dist/src/interface/table.d.ts +20 -0
- package/dist/src/interface/ui.d.ts +29 -0
- package/dist/src/interface.d.ts +29 -0
- package/dist/src/plugins/i18n.d.ts +1666 -0
- package/dist/src/script/console_manager.d.ts +18 -0
- package/dist/src/script/console_manager.js +97 -91
- package/dist/src/script/console_server_manager.d.ts +13 -0
- package/dist/src/script/console_server_manager.js +29 -26
- package/dist/src/script/execute/base.d.ts +45 -0
- package/dist/src/script/execute/base.js +165 -162
- package/dist/src/script/execute/feedback.d.ts +12 -0
- package/dist/src/script/execute/feedback.js +162 -171
- package/dist/src/script/execute/interface.d.ts +8 -0
- package/dist/src/script/execute/region_job.d.ts +5 -0
- package/dist/src/script/execute/region_job.js +1 -0
- package/dist/src/script/execute/region_project.d.ts +10 -0
- package/dist/src/script/execute/region_project.js +4 -0
- package/dist/src/script/execute/region_subtask.d.ts +5 -0
- package/dist/src/script/execute/region_subtask.js +1 -0
- package/dist/src/script/execute/region_task.d.ts +10 -0
- package/dist/src/script/execute/region_task.js +4 -0
- package/dist/src/script/execute/runner.d.ts +14 -0
- package/dist/src/script/execute/runner.js +129 -139
- package/dist/src/script/execute/util_parser.d.ts +14 -0
- package/dist/src/script/execute/util_parser.js +119 -121
- package/dist/src/script/execute_manager.d.ts +25 -0
- package/dist/src/script/execute_manager.js +266 -278
- package/dist/src/script/socket_manager.d.ts +31 -0
- package/dist/src/script/socket_manager.js +196 -193
- package/dist/src/script/webhook_manager.d.ts +3 -0
- package/dist/src/script/webhook_server_manager.d.ts +13 -0
- package/dist/src/script/webhook_server_manager.js +79 -86
- package/dist/src/server/detail.d.ts +72 -0
- package/dist/src/server/detail.js +401 -378
- package/dist/src/server/io.d.ts +46 -0
- package/dist/src/server/io.js +42 -51
- package/dist/src/server/plugin.d.ts +18 -0
- package/dist/src/server/plugin.js +45 -54
- package/dist/src/server/server.d.ts +27 -0
- package/dist/src/server/server.js +38 -36
- package/dist/src/server.d.ts +4 -0
- package/dist/src/util/console_handle.d.ts +20 -0
- package/dist/src/util/console_handle.js +214 -218
- package/dist/src/util/log_handle.d.ts +23 -0
- package/dist/src/util/log_handle.js +158 -164
- package/dist/test/TEST.d.ts +1 -0
- package/dist/test/TEST.js +37 -54
- package/dist/test/client/execute.test.d.ts +1 -0
- package/dist/test/client/execute.test.js +6 -15
- package/dist/test/client/javascript.test.d.ts +1 -0
- package/dist/test/client/javascript.test.js +21 -30
- package/dist/test/client/server.test.d.ts +1 -0
- package/dist/test/client/task.test.d.ts +1 -0
- package/dist/test/client/task.test.js +1 -1
- package/dist/test/script/parser.test.d.ts +1 -0
- package/dist/test/script/socket.test.d.ts +1 -0
- package/package.json +1 -1
- package/src/interface/enum.ts +1 -1
- package/tsconfig.json +5 -3
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
export declare enum SocketState {
|
|
2
|
+
CONNECTING = 0,
|
|
3
|
+
OPEN = 1,
|
|
4
|
+
CLOSING = 2,
|
|
5
|
+
CLOSED = 3
|
|
6
|
+
}
|
|
7
|
+
export declare enum DataType {
|
|
8
|
+
Boolean = 0,
|
|
9
|
+
Number = 1,
|
|
10
|
+
String = 2,
|
|
11
|
+
Object = 3,
|
|
12
|
+
Expression = 4,
|
|
13
|
+
Textarea = 5,
|
|
14
|
+
Select = 6,
|
|
15
|
+
List = 7
|
|
16
|
+
}
|
|
17
|
+
export declare enum BackendType {
|
|
18
|
+
NONE = 0,
|
|
19
|
+
SERVER = 1,
|
|
20
|
+
CLUSTER = 2,
|
|
21
|
+
NODE = 3
|
|
22
|
+
}
|
|
23
|
+
export declare enum DataTypeBase {
|
|
24
|
+
Boolean = 0,
|
|
25
|
+
Number = 1,
|
|
26
|
+
String = 2
|
|
27
|
+
}
|
|
28
|
+
export declare enum ResourceType {
|
|
29
|
+
ALL = 1023,
|
|
30
|
+
SYSTEM = 1,
|
|
31
|
+
CPU = 2,
|
|
32
|
+
RAM = 4,
|
|
33
|
+
BATTERY = 8,
|
|
34
|
+
LOAD = 16,
|
|
35
|
+
OS = 32,
|
|
36
|
+
GPU = 64,
|
|
37
|
+
DISK = 128,
|
|
38
|
+
NETWORK = 256
|
|
39
|
+
}
|
|
40
|
+
export declare enum FrontendUpdate {
|
|
41
|
+
ALL = 1023,
|
|
42
|
+
PROJECT = 1,
|
|
43
|
+
PARAMETER = 2
|
|
44
|
+
}
|
|
45
|
+
export declare enum JobCategory {
|
|
46
|
+
Condition = 0,
|
|
47
|
+
Execution = 1
|
|
48
|
+
}
|
|
49
|
+
export declare enum ConditionResult {
|
|
50
|
+
None = 0,
|
|
51
|
+
SkipProject = 1,
|
|
52
|
+
ThrowProject = 2,
|
|
53
|
+
SkipTask = 3,
|
|
54
|
+
ThrowTask = 4,
|
|
55
|
+
Pause = 5
|
|
56
|
+
}
|
|
57
|
+
export declare enum JobType {
|
|
58
|
+
COPY_FILE = 0,
|
|
59
|
+
COPY_DIR = 1,
|
|
60
|
+
DELETE_FILE = 2,
|
|
61
|
+
DELETE_DIR = 3,
|
|
62
|
+
CREATE_FILE = 4,
|
|
63
|
+
CREATE_DIR = 5,
|
|
64
|
+
RENAME = 6,
|
|
65
|
+
JAVASCRIPT = 7,
|
|
66
|
+
COMMAND = 8,
|
|
67
|
+
LIB_COMMAND = 9
|
|
68
|
+
}
|
|
69
|
+
export declare enum JobType2 {
|
|
70
|
+
CHECK_PATH = 0,
|
|
71
|
+
JAVASCRIPT = 1
|
|
72
|
+
}
|
|
73
|
+
export declare enum ProjectTemplate {
|
|
74
|
+
DEFAULT = 0,
|
|
75
|
+
DEFAULT_SHORT = 1,
|
|
76
|
+
Blender = 100,
|
|
77
|
+
Blender_Cluster = 101,
|
|
78
|
+
AfterEffect = 200
|
|
79
|
+
}
|
|
80
|
+
export declare enum DatabaseTemplate {
|
|
81
|
+
DEFAULT = 0
|
|
82
|
+
}
|
|
83
|
+
export declare enum ExecuteState {
|
|
84
|
+
NONE = 0,
|
|
85
|
+
RUNNING = 1,
|
|
86
|
+
FINISH = 2,
|
|
87
|
+
ERROR = 3,
|
|
88
|
+
SKIP = 4
|
|
89
|
+
}
|
|
90
|
+
export declare enum RenderUpdateType {
|
|
91
|
+
All = 127,
|
|
92
|
+
Project = 1,
|
|
93
|
+
Node = 2,
|
|
94
|
+
Database = 4
|
|
95
|
+
}
|
|
96
|
+
export declare enum RecordType {
|
|
97
|
+
PROJECT = 0,
|
|
98
|
+
Database = 1,
|
|
99
|
+
NODE = 2,
|
|
100
|
+
LOG = 3,
|
|
101
|
+
LIB = 4,
|
|
102
|
+
USER = 5
|
|
103
|
+
}
|
|
104
|
+
export declare enum JavascriptLib {
|
|
105
|
+
ALL = 127,
|
|
106
|
+
OS = 1,
|
|
107
|
+
ENV = 2,
|
|
108
|
+
MESSAGE = 4,
|
|
109
|
+
HTTP = 8,
|
|
110
|
+
PATH = 16
|
|
111
|
+
}
|
|
112
|
+
export declare enum ServiceMode {
|
|
113
|
+
ONCE = 0,
|
|
114
|
+
CYCLE = 1,
|
|
115
|
+
EVENT = 2
|
|
116
|
+
}
|
|
117
|
+
export declare const DataTypeText: {
|
|
118
|
+
[key: number]: string;
|
|
119
|
+
};
|
|
120
|
+
export declare const ExecuteStateText: {
|
|
121
|
+
[key: number]: string;
|
|
122
|
+
};
|
|
123
|
+
export declare const JobCategoryText: {
|
|
124
|
+
[key: number]: string;
|
|
125
|
+
};
|
|
126
|
+
export declare const ConnectionText: {
|
|
127
|
+
[key: number]: string;
|
|
128
|
+
};
|
|
129
|
+
export declare const JobResultText: {
|
|
130
|
+
[key: number]: string;
|
|
131
|
+
};
|
|
132
|
+
export declare const JobTypeText: {
|
|
133
|
+
[key: number]: string;
|
|
134
|
+
};
|
|
135
|
+
export declare const JobType2Text: {
|
|
136
|
+
[key: number]: string;
|
|
137
|
+
};
|
|
138
|
+
export declare const ProjectTemplateText: {
|
|
139
|
+
[key: number]: string;
|
|
140
|
+
};
|
|
141
|
+
export declare const DatabaseTemplateText: {
|
|
142
|
+
[key: number]: string;
|
|
143
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DatabaseTemplateText = exports.ProjectTemplateText = exports.JobType2Text = exports.JobTypeText = exports.JobResultText = exports.ConnectionText = exports.JobCategoryText = exports.ExecuteStateText = exports.DataTypeText = exports.ServiceMode = exports.JavascriptLib = exports.RecordType = exports.RenderUpdateType = exports.ExecuteState = exports.
|
|
3
|
+
exports.DatabaseTemplateText = exports.ProjectTemplateText = exports.JobType2Text = exports.JobTypeText = exports.JobResultText = exports.ConnectionText = exports.JobCategoryText = exports.ExecuteStateText = exports.DataTypeText = exports.ServiceMode = exports.JavascriptLib = exports.RecordType = exports.RenderUpdateType = exports.ExecuteState = exports.DatabaseTemplate = exports.ProjectTemplate = exports.JobType2 = exports.JobType = exports.ConditionResult = exports.JobCategory = exports.FrontendUpdate = exports.ResourceType = exports.DataTypeBase = exports.BackendType = exports.DataType = exports.SocketState = void 0;
|
|
4
4
|
var SocketState;
|
|
5
5
|
(function (SocketState) {
|
|
6
6
|
SocketState[SocketState["CONNECTING"] = 0] = "CONNECTING";
|
|
@@ -91,10 +91,10 @@ var ProjectTemplate;
|
|
|
91
91
|
ProjectTemplate[ProjectTemplate["Blender_Cluster"] = 101] = "Blender_Cluster";
|
|
92
92
|
ProjectTemplate[ProjectTemplate["AfterEffect"] = 200] = "AfterEffect";
|
|
93
93
|
})(ProjectTemplate || (exports.ProjectTemplate = ProjectTemplate = {}));
|
|
94
|
-
var
|
|
95
|
-
(function (
|
|
96
|
-
|
|
97
|
-
})(
|
|
94
|
+
var DatabaseTemplate;
|
|
95
|
+
(function (DatabaseTemplate) {
|
|
96
|
+
DatabaseTemplate[DatabaseTemplate["DEFAULT"] = 0] = "DEFAULT";
|
|
97
|
+
})(DatabaseTemplate || (exports.DatabaseTemplate = DatabaseTemplate = {}));
|
|
98
98
|
var ExecuteState;
|
|
99
99
|
(function (ExecuteState) {
|
|
100
100
|
ExecuteState[ExecuteState["NONE"] = 0] = "NONE";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ExecuteManager } from "../script/execute_manager";
|
|
2
|
+
import { Job } from "./base";
|
|
3
|
+
import { ExecuteState } from "./enum";
|
|
4
|
+
import { ExecuteRecord } from "./record";
|
|
5
|
+
export interface ExecutePair {
|
|
6
|
+
manager?: ExecuteManager;
|
|
7
|
+
record?: ExecuteRecord;
|
|
8
|
+
meta?: any;
|
|
9
|
+
}
|
|
10
|
+
export interface CronJobState {
|
|
11
|
+
id: number;
|
|
12
|
+
uuid: string;
|
|
13
|
+
work: Array<WorkState>;
|
|
14
|
+
}
|
|
15
|
+
export interface WorkState {
|
|
16
|
+
uuid: string;
|
|
17
|
+
runtime: string;
|
|
18
|
+
state: ExecuteState;
|
|
19
|
+
job: Job;
|
|
20
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Node, Database, Project } from "./base";
|
|
2
|
+
import { ExecuteState } from "./enum";
|
|
3
|
+
export interface ExecuteData {
|
|
4
|
+
uuid: string;
|
|
5
|
+
state: ExecuteState;
|
|
6
|
+
}
|
|
7
|
+
export interface ExecutionTaskLog {
|
|
8
|
+
task_state: ExecuteData;
|
|
9
|
+
start_timer: number;
|
|
10
|
+
end_timer: number;
|
|
11
|
+
task_detail: Array<ExecuteRecordTask>;
|
|
12
|
+
}
|
|
13
|
+
export interface ExecutionLog {
|
|
14
|
+
uuid: string;
|
|
15
|
+
dirty?: boolean;
|
|
16
|
+
output?: boolean;
|
|
17
|
+
filename: string;
|
|
18
|
+
project: Project;
|
|
19
|
+
database: Database;
|
|
20
|
+
start_timer: number;
|
|
21
|
+
end_timer: number;
|
|
22
|
+
state: ExecuteState;
|
|
23
|
+
logs: Array<ExecutionTaskLog>;
|
|
24
|
+
}
|
|
25
|
+
export interface ExecuteRecordTask {
|
|
26
|
+
index: number;
|
|
27
|
+
node: string;
|
|
28
|
+
message: Array<string>;
|
|
29
|
+
state: ExecuteState;
|
|
30
|
+
}
|
|
31
|
+
export interface Log {
|
|
32
|
+
logs: Array<ExecutionLog>;
|
|
33
|
+
}
|
|
34
|
+
export interface Record {
|
|
35
|
+
projects: Array<Project>;
|
|
36
|
+
nodes: Array<Node>;
|
|
37
|
+
}
|
|
38
|
+
export interface RecordHeader {
|
|
39
|
+
projects: Array<string>;
|
|
40
|
+
nodes: Array<string>;
|
|
41
|
+
}
|
|
42
|
+
export interface ExecuteRecord extends Record {
|
|
43
|
+
uuid: string;
|
|
44
|
+
name: string;
|
|
45
|
+
running: boolean;
|
|
46
|
+
stop: boolean;
|
|
47
|
+
process_type: number;
|
|
48
|
+
para: Database | undefined;
|
|
49
|
+
command: Array<Array<any>>;
|
|
50
|
+
project: string;
|
|
51
|
+
useCron: boolean;
|
|
52
|
+
task: string;
|
|
53
|
+
project_index: number;
|
|
54
|
+
task_index: number;
|
|
55
|
+
project_state: Array<ExecuteData>;
|
|
56
|
+
task_state: Array<ExecuteData>;
|
|
57
|
+
task_detail: Array<ExecuteRecordTask>;
|
|
58
|
+
}
|
|
59
|
+
export interface PluginToken {
|
|
60
|
+
name: string;
|
|
61
|
+
token: string;
|
|
62
|
+
}
|
|
63
|
+
export interface Preference_Recover {
|
|
64
|
+
projects: Array<[string | null, string | null]>;
|
|
65
|
+
nodes: Array<string | null>;
|
|
66
|
+
}
|
|
67
|
+
export interface Preference {
|
|
68
|
+
lan: string;
|
|
69
|
+
notification: boolean;
|
|
70
|
+
theme: string;
|
|
71
|
+
font: number;
|
|
72
|
+
log: boolean;
|
|
73
|
+
plugin_token: Array<PluginToken>;
|
|
74
|
+
animation: boolean;
|
|
75
|
+
recover?: Preference_Recover;
|
|
76
|
+
mode?: number;
|
|
77
|
+
url?: string;
|
|
78
|
+
}
|
|
79
|
+
export interface Library {
|
|
80
|
+
uuid: string;
|
|
81
|
+
name: string;
|
|
82
|
+
load: boolean;
|
|
83
|
+
content: string;
|
|
84
|
+
}
|
|
85
|
+
export interface Libraries {
|
|
86
|
+
libs: Array<Library>;
|
|
87
|
+
}
|
|
88
|
+
export interface FileState {
|
|
89
|
+
name: string;
|
|
90
|
+
size: number;
|
|
91
|
+
time: Date;
|
|
92
|
+
}
|
|
93
|
+
export declare const CreatePreference: () => Preference;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Preference } from "./record";
|
|
2
|
+
export declare enum ACLType {
|
|
3
|
+
PUBLIC = 0,
|
|
4
|
+
PROTECTED = 1,
|
|
5
|
+
PRIVATE = 2
|
|
6
|
+
}
|
|
7
|
+
export declare enum UserType {
|
|
8
|
+
ROOT = 0,
|
|
9
|
+
ADMIN = 1,
|
|
10
|
+
GUEST = 2,
|
|
11
|
+
USER = 3
|
|
12
|
+
}
|
|
13
|
+
export declare enum PermissionType {
|
|
14
|
+
ROOT = 0,
|
|
15
|
+
PROJECT = 1,
|
|
16
|
+
Task = 2,
|
|
17
|
+
JOB = 3,
|
|
18
|
+
DATABASE = 4,
|
|
19
|
+
PLUGIN = 5,
|
|
20
|
+
NODE = 6,
|
|
21
|
+
LIB = 7,
|
|
22
|
+
LOG = 8
|
|
23
|
+
}
|
|
24
|
+
export interface Login {
|
|
25
|
+
username: string;
|
|
26
|
+
password: string;
|
|
27
|
+
}
|
|
28
|
+
export interface GlobalPermission {
|
|
29
|
+
project: LocalPermission;
|
|
30
|
+
task: LocalPermission;
|
|
31
|
+
job: LocalPermission;
|
|
32
|
+
database: LocalPermission;
|
|
33
|
+
plugin: LocalPermission;
|
|
34
|
+
node: LocalPermission;
|
|
35
|
+
lib: LocalPermission;
|
|
36
|
+
log: LocalPermission;
|
|
37
|
+
execute_job: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface LocalPermission {
|
|
40
|
+
view: boolean;
|
|
41
|
+
create: boolean;
|
|
42
|
+
edit: boolean;
|
|
43
|
+
delete: boolean;
|
|
44
|
+
}
|
|
45
|
+
export interface LocalPermissionContainer {
|
|
46
|
+
uuid: string;
|
|
47
|
+
permission: LocalPermission;
|
|
48
|
+
}
|
|
49
|
+
export interface LocalPermissionContainer2 {
|
|
50
|
+
uuid: string;
|
|
51
|
+
uuid2: string;
|
|
52
|
+
permission: LocalPermission;
|
|
53
|
+
}
|
|
54
|
+
export interface UserProfile {
|
|
55
|
+
uuid: string;
|
|
56
|
+
token: string;
|
|
57
|
+
name: string;
|
|
58
|
+
email?: string;
|
|
59
|
+
preference: Preference;
|
|
60
|
+
type: UserType;
|
|
61
|
+
description?: string;
|
|
62
|
+
password?: string;
|
|
63
|
+
permission: GlobalPermission;
|
|
64
|
+
}
|
|
65
|
+
export interface UserProfileClient {
|
|
66
|
+
picture_url: boolean;
|
|
67
|
+
name: string;
|
|
68
|
+
type: UserType;
|
|
69
|
+
description?: string;
|
|
70
|
+
permission?: GlobalPermission;
|
|
71
|
+
}
|
|
72
|
+
export interface ServerSetting {
|
|
73
|
+
open_guest: boolean;
|
|
74
|
+
}
|
|
75
|
+
export declare const CreateRootPermission: () => GlobalPermission;
|
|
76
|
+
export declare const CreateRootUser: () => UserProfile;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { DatabaseContainer, Project } from "./base";
|
|
2
|
+
import ws from 'ws';
|
|
3
|
+
import { ServiceMode } from "./enum";
|
|
4
|
+
type ProjectCall = (p: Project) => Project;
|
|
5
|
+
type DatabaseCall = () => Array<DatabaseContainer>;
|
|
6
|
+
export interface WebsocketPack {
|
|
7
|
+
s?: boolean;
|
|
8
|
+
uuid: string;
|
|
9
|
+
parent?: string;
|
|
10
|
+
websocket: WebSocket | ws.WebSocket;
|
|
11
|
+
current_job: Array<string>;
|
|
12
|
+
information?: SystemLoad;
|
|
13
|
+
load?: NodeLoad;
|
|
14
|
+
ms?: number;
|
|
15
|
+
last?: number;
|
|
16
|
+
plugins?: Array<Plugin>;
|
|
17
|
+
children?: Array<WebsocketPack>;
|
|
18
|
+
}
|
|
19
|
+
export interface CronWebsocketPack {
|
|
20
|
+
websocket: WebsocketPack;
|
|
21
|
+
}
|
|
22
|
+
export interface Header {
|
|
23
|
+
name: string;
|
|
24
|
+
token?: string;
|
|
25
|
+
meta?: string;
|
|
26
|
+
message?: string;
|
|
27
|
+
channel?: string;
|
|
28
|
+
data?: any;
|
|
29
|
+
}
|
|
30
|
+
export interface Single {
|
|
31
|
+
data: any;
|
|
32
|
+
}
|
|
33
|
+
export interface OnePath {
|
|
34
|
+
path: string;
|
|
35
|
+
}
|
|
36
|
+
export interface TwoPath {
|
|
37
|
+
from: string;
|
|
38
|
+
to: string;
|
|
39
|
+
}
|
|
40
|
+
export interface Setter {
|
|
41
|
+
key: string;
|
|
42
|
+
value: any;
|
|
43
|
+
}
|
|
44
|
+
export interface FeedBack {
|
|
45
|
+
node_uuid?: string;
|
|
46
|
+
index?: number;
|
|
47
|
+
job_uuid: string;
|
|
48
|
+
runtime_uuid: string;
|
|
49
|
+
meta: number;
|
|
50
|
+
message: string;
|
|
51
|
+
}
|
|
52
|
+
export interface KeyValue {
|
|
53
|
+
key: any;
|
|
54
|
+
value: any;
|
|
55
|
+
}
|
|
56
|
+
export interface JWT {
|
|
57
|
+
user: string;
|
|
58
|
+
create: number;
|
|
59
|
+
expire: number;
|
|
60
|
+
}
|
|
61
|
+
export interface SystemLoad_GPU {
|
|
62
|
+
gpu_name: string;
|
|
63
|
+
}
|
|
64
|
+
export interface SystemLoad_Network {
|
|
65
|
+
net_name: string;
|
|
66
|
+
upload: number;
|
|
67
|
+
download: number;
|
|
68
|
+
}
|
|
69
|
+
export interface SystemLoad_Disk {
|
|
70
|
+
disk_name: string;
|
|
71
|
+
disk_type: string;
|
|
72
|
+
disk_usage: number;
|
|
73
|
+
disk_free: number;
|
|
74
|
+
disk_total: number;
|
|
75
|
+
disk_percentage: number;
|
|
76
|
+
}
|
|
77
|
+
export interface SystemLoad {
|
|
78
|
+
system_name: string;
|
|
79
|
+
virtual: boolean;
|
|
80
|
+
platform: string;
|
|
81
|
+
arch: string;
|
|
82
|
+
hostname: string;
|
|
83
|
+
cpu_name: string;
|
|
84
|
+
cpu_core: number;
|
|
85
|
+
cpu_usage: number;
|
|
86
|
+
ram_usage: number;
|
|
87
|
+
ram_free: number;
|
|
88
|
+
ram_total: number;
|
|
89
|
+
battery: number;
|
|
90
|
+
charging: boolean;
|
|
91
|
+
gpu: Array<SystemLoad_GPU>;
|
|
92
|
+
disk: Array<SystemLoad_Disk>;
|
|
93
|
+
net: Array<SystemLoad_Network>;
|
|
94
|
+
pid_usage: number;
|
|
95
|
+
}
|
|
96
|
+
export interface NodeLoad {
|
|
97
|
+
workers: number;
|
|
98
|
+
}
|
|
99
|
+
export interface ShellFolder {
|
|
100
|
+
path: string;
|
|
101
|
+
cwd: string;
|
|
102
|
+
files: Array<string>;
|
|
103
|
+
folders: Array<string>;
|
|
104
|
+
}
|
|
105
|
+
export interface TemplateGroup {
|
|
106
|
+
value: number;
|
|
107
|
+
group: string;
|
|
108
|
+
title?: string;
|
|
109
|
+
filename?: string;
|
|
110
|
+
template?: ProjectCall;
|
|
111
|
+
}
|
|
112
|
+
export interface TemplateGroup2 {
|
|
113
|
+
value: number;
|
|
114
|
+
group: string;
|
|
115
|
+
title?: string;
|
|
116
|
+
filename?: string;
|
|
117
|
+
template?: DatabaseCall;
|
|
118
|
+
}
|
|
119
|
+
export interface PluginContent {
|
|
120
|
+
filename: string;
|
|
121
|
+
url: string;
|
|
122
|
+
platform: NodeJS.Platform;
|
|
123
|
+
arch: NodeJS.Architecture;
|
|
124
|
+
}
|
|
125
|
+
export interface Plugin {
|
|
126
|
+
name: string;
|
|
127
|
+
description: string;
|
|
128
|
+
version?: string;
|
|
129
|
+
progress?: number;
|
|
130
|
+
contents: Array<PluginContent>;
|
|
131
|
+
}
|
|
132
|
+
export interface PluginWithToken extends Plugin {
|
|
133
|
+
token: Array<string>;
|
|
134
|
+
}
|
|
135
|
+
export interface PluginList {
|
|
136
|
+
title?: string;
|
|
137
|
+
url?: string;
|
|
138
|
+
plugins: Array<Plugin>;
|
|
139
|
+
}
|
|
140
|
+
export interface PluginState {
|
|
141
|
+
name: string;
|
|
142
|
+
url: string;
|
|
143
|
+
installed: boolean;
|
|
144
|
+
supported: boolean;
|
|
145
|
+
}
|
|
146
|
+
export interface PluginPageTemplate {
|
|
147
|
+
name: string;
|
|
148
|
+
project: Array<TemplateGroup>;
|
|
149
|
+
database: Array<TemplateGroup2>;
|
|
150
|
+
url?: string;
|
|
151
|
+
}
|
|
152
|
+
export interface PluginPageData {
|
|
153
|
+
plugins: Array<PluginList>;
|
|
154
|
+
templates: Array<PluginPageTemplate>;
|
|
155
|
+
}
|
|
156
|
+
export interface TemplateDataProject {
|
|
157
|
+
title: string;
|
|
158
|
+
filename: string;
|
|
159
|
+
group: string;
|
|
160
|
+
}
|
|
161
|
+
export interface TemplateDataDatabase {
|
|
162
|
+
title: string;
|
|
163
|
+
filename: string;
|
|
164
|
+
group: string;
|
|
165
|
+
}
|
|
166
|
+
export interface TemplateData {
|
|
167
|
+
url?: string;
|
|
168
|
+
projects: Array<TemplateDataProject>;
|
|
169
|
+
databases: Array<TemplateDataDatabase>;
|
|
170
|
+
}
|
|
171
|
+
export interface BuildinAssetsContent {
|
|
172
|
+
name: string;
|
|
173
|
+
description: string;
|
|
174
|
+
url: string;
|
|
175
|
+
}
|
|
176
|
+
export interface BuildinAssets {
|
|
177
|
+
data: Array<BuildinAssetsContent>;
|
|
178
|
+
}
|
|
179
|
+
export interface ServiceConfig {
|
|
180
|
+
mode: ServiceMode;
|
|
181
|
+
}
|
|
182
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Node, Database, Project, Task } from './base';
|
|
2
|
+
import { Plugin, SystemLoad } from './struct';
|
|
3
|
+
export interface DatabaseTable extends Database {
|
|
4
|
+
s: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface NodeTable extends Node {
|
|
7
|
+
s: boolean;
|
|
8
|
+
state: number;
|
|
9
|
+
connection_rate?: number;
|
|
10
|
+
plugins?: Array<Plugin>;
|
|
11
|
+
system?: SystemLoad;
|
|
12
|
+
}
|
|
13
|
+
export interface TaskTable extends Task {
|
|
14
|
+
s: boolean;
|
|
15
|
+
jobCount: number;
|
|
16
|
+
}
|
|
17
|
+
export interface ProjectTable extends Project {
|
|
18
|
+
s: boolean;
|
|
19
|
+
taskCount: number;
|
|
20
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BackendType } from "./enum";
|
|
2
|
+
export interface AppConfig {
|
|
3
|
+
isExpress: boolean;
|
|
4
|
+
isElectron: boolean;
|
|
5
|
+
isAdmin: boolean;
|
|
6
|
+
haveBackend: boolean;
|
|
7
|
+
login: boolean;
|
|
8
|
+
backendType: BackendType;
|
|
9
|
+
}
|
|
10
|
+
export interface IMessage {
|
|
11
|
+
ison: boolean;
|
|
12
|
+
timer: number;
|
|
13
|
+
variant: any;
|
|
14
|
+
title: string;
|
|
15
|
+
content: string;
|
|
16
|
+
stack: Array<string>;
|
|
17
|
+
}
|
|
18
|
+
export interface ClientLog {
|
|
19
|
+
s: boolean;
|
|
20
|
+
tag: string;
|
|
21
|
+
title: string;
|
|
22
|
+
text: Array<string>;
|
|
23
|
+
}
|
|
24
|
+
export interface ToastData {
|
|
25
|
+
type: string;
|
|
26
|
+
title: string;
|
|
27
|
+
message: string;
|
|
28
|
+
stack?: Array<string>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const PORT = 12080;
|
|
2
|
+
export declare const WebPORT = 11080;
|
|
3
|
+
export declare const WebHookPORT = 15080;
|
|
4
|
+
export declare const MESSAGE_LIMIT = 500;
|
|
5
|
+
export declare const CLIENT_UPDATETICK = 3000;
|
|
6
|
+
export declare const RENDER_UPDATETICK = 30;
|
|
7
|
+
export declare const RENDER_FILE_UPDATETICK = 5000;
|
|
8
|
+
export declare const SCROLL_LIMIT = 100;
|
|
9
|
+
export declare const ENV_CHARACTER = "%";
|
|
10
|
+
export declare const IGNORE_CHARACTER = "^";
|
|
11
|
+
export declare const DATA_FOLDER = ".verteilen";
|
|
12
|
+
export * from './interface/base';
|
|
13
|
+
export * from './interface/bus';
|
|
14
|
+
export * from './interface/enum';
|
|
15
|
+
export * from './interface/execute';
|
|
16
|
+
export * from './interface/record';
|
|
17
|
+
export * from './interface/server';
|
|
18
|
+
export * from './interface/struct';
|
|
19
|
+
export * from './interface/table';
|
|
20
|
+
export * from './interface/ui';
|
|
21
|
+
export * as I18N from './plugins/i18n';
|
|
22
|
+
export * as Execute_PART from './script/execute/interface';
|
|
23
|
+
export * as Execute_ConsoleManager from './script/console_manager';
|
|
24
|
+
export * as Execute_ConsoleServerManager from './script/console_server_manager';
|
|
25
|
+
export * as Execute_ExecuteManager from './script/execute_manager';
|
|
26
|
+
export * as Execute_SocketManager from './script/socket_manager';
|
|
27
|
+
export * as Execute_WebhookManager from './script/webhook_manager';
|
|
28
|
+
export * as UtilServer_Console from './util/console_handle';
|
|
29
|
+
export * as UtilServer_Log from './util/log_handle';
|