verteilen-core 1.3.42 → 1.4.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.
@@ -7,6 +7,16 @@ export interface DatabaseConfigTrigger {
7
7
  export interface DataHeader {
8
8
  uuid: string;
9
9
  }
10
+ export interface ShareLevel {
11
+ user: string;
12
+ permission: LocalPermission;
13
+ }
14
+ export interface Shareable {
15
+ owner?: string;
16
+ permission?: LocalPermission;
17
+ acl?: ACLType;
18
+ shared?: Array<ShareLevel>;
19
+ }
10
20
  export interface DataTime {
11
21
  createDate?: string;
12
22
  updateDate?: string;
@@ -32,17 +42,13 @@ export interface Service extends DataHeader, DataTime {
32
42
  type: ServiceMode;
33
43
  timer: string;
34
44
  project: string;
35
- permission?: LocalPermission;
36
- acl?: ACLType;
37
45
  }
38
- export interface Database extends DataHeader, DataTime {
46
+ export interface Database extends DataHeader, DataTime, Shareable {
39
47
  title: string;
40
48
  canWrite: boolean;
41
49
  containers: Array<DatabaseContainer>;
42
- permission?: LocalPermission;
43
- acl?: ACLType;
44
50
  }
45
- export interface Job extends DataHeader, DataTime {
51
+ export interface Job extends DataHeader, DataTime, Shareable {
46
52
  index?: number;
47
53
  title: string;
48
54
  description: string;
@@ -55,8 +61,6 @@ export interface Job extends DataHeader, DataTime {
55
61
  number_args: Array<number>;
56
62
  boolean_args: Array<boolean>;
57
63
  id_args: Array<boolean>;
58
- permission?: LocalPermission;
59
- acl?: ACLType;
60
64
  }
61
65
  export interface TaskBase {
62
66
  properties: Array<Property>;
@@ -73,27 +77,20 @@ export interface TaskOption {
73
77
  multi: boolean;
74
78
  multiKey: string;
75
79
  }
76
- export interface Task extends DataHeader, DataTime, TaskBase, TaskOption {
77
- permission?: LocalPermission;
78
- acl?: ACLType;
80
+ export interface Task extends DataHeader, DataTime, TaskBase, TaskOption, Shareable {
79
81
  }
80
- export interface Project extends DataHeader, DataTime {
81
- owner?: string;
82
+ export interface Project extends DataHeader, DataTime, Shareable {
82
83
  title: string;
83
84
  description?: string;
84
85
  database_uuid: string;
85
86
  database?: Database;
86
87
  tasks: Array<Task>;
87
88
  tasks_uuid: Array<string>;
88
- permission?: LocalPermission;
89
- acl?: ACLType;
90
89
  }
91
- export interface Node extends DataHeader, DataTime {
90
+ export interface Node extends DataHeader, DataTime, Shareable {
92
91
  cluster: boolean;
93
92
  parent?: string;
94
93
  url: string;
95
- permission?: LocalPermission;
96
- acl?: ACLType;
97
94
  }
98
95
  export declare const CreateDefaultProject: () => Project;
99
96
  export declare const CreateDefaultTask: () => Task;
@@ -1,4 +1,4 @@
1
- import { Database, Node, Project } from "./base";
1
+ import { Database, DataHeader, Node, Project, Shareable } from "./base";
2
2
  import { ExecuteState } from "./enum";
3
3
  import { ExecuteData } from "./record";
4
4
  export interface ExecuteRecordTask {
@@ -13,8 +13,7 @@ export interface ExecutionTaskLog {
13
13
  end_timer: number;
14
14
  task_detail: Array<ExecuteRecordTask>;
15
15
  }
16
- export interface ExecutionLog {
17
- uuid: string;
16
+ export interface ExecutionLog extends DataHeader, Shareable {
18
17
  dirty?: boolean;
19
18
  output?: boolean;
20
19
  filename: string;
@@ -1,3 +1,4 @@
1
+ import { DataHeader, Shareable } from "./base";
1
2
  import { ExecuteState } from "./enum";
2
3
  export interface ExecuteData {
3
4
  uuid: string;
@@ -27,8 +28,7 @@ export interface Preference {
27
28
  mode?: number;
28
29
  url?: string;
29
30
  }
30
- export interface Library {
31
- uuid: string;
31
+ export interface Library extends DataHeader, Shareable {
32
32
  name: string;
33
33
  load: boolean;
34
34
  content: string;
@@ -1,3 +1,4 @@
1
+ import { DataHeader, Shareable } from "./base";
1
2
  import { Preference } from "./record";
2
3
  export declare enum ACLType {
3
4
  PUBLIC = 0,
@@ -51,8 +52,7 @@ export interface LocalPermissionContainer2 {
51
52
  uuid2: string;
52
53
  permission: LocalPermission;
53
54
  }
54
- export interface UserProfile {
55
- uuid: string;
55
+ export interface UserProfile extends DataHeader, Shareable {
56
56
  token: string;
57
57
  name: string;
58
58
  email?: string;
@@ -60,7 +60,7 @@ export interface UserProfile {
60
60
  type: UserType;
61
61
  description?: string;
62
62
  password?: string;
63
- permission: GlobalPermission;
63
+ global_permission: GlobalPermission;
64
64
  }
65
65
  export interface UserProfileClient {
66
66
  picture_url: boolean;
@@ -73,7 +73,7 @@ const CreateRootUser = () => {
73
73
  },
74
74
  name: "root",
75
75
  description: "Root User",
76
- permission: (0, exports.CreateRootPermission)()
76
+ global_permission: (0, exports.CreateRootPermission)()
77
77
  };
78
78
  };
79
79
  exports.CreateRootUser = CreateRootUser;
@@ -53,7 +53,6 @@ export interface KeyValue {
53
53
  export interface JWT {
54
54
  user: string;
55
55
  create: number;
56
- expire: number;
57
56
  }
58
57
  export interface SystemLoad_GPU {
59
58
  gpu_name: string;
@@ -1,3 +1,4 @@
1
+ export declare const SERECT: string;
1
2
  export declare const PORT = 12080;
2
3
  export declare const WebPORT = 11080;
3
4
  export declare const WebHookPORT = 15080;
@@ -9,6 +10,7 @@ export declare const SCROLL_LIMIT = 100;
9
10
  export declare const ENV_CHARACTER = "%";
10
11
  export declare const IGNORE_CHARACTER = "^";
11
12
  export declare const DATA_FOLDER = ".verteilen";
13
+ export declare const MONGODB_NAME = "verteilen";
12
14
  export * from './interface/base';
13
15
  export * from './interface/bus';
14
16
  export * from './interface/enum';
package/dist/interface.js CHANGED
@@ -36,7 +36,8 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.UtilServer_Log = exports.UtilServer_Console = exports.Execute_WebhookManager = exports.Execute_SocketManager = exports.Execute_ExecuteManager = exports.Execute_ConsoleServerManager = exports.Execute_ConsoleManager = exports.Execute_PART = exports.I18N = exports.DATA_FOLDER = exports.IGNORE_CHARACTER = exports.ENV_CHARACTER = exports.SCROLL_LIMIT = exports.RENDER_FILE_UPDATETICK = exports.RENDER_UPDATETICK = exports.CLIENT_UPDATETICK = exports.MESSAGE_LIMIT = exports.WebHookPORT = exports.WebPORT = exports.PORT = void 0;
39
+ exports.UtilServer_Log = exports.UtilServer_Console = exports.Execute_WebhookManager = exports.Execute_SocketManager = exports.Execute_ExecuteManager = exports.Execute_ConsoleServerManager = exports.Execute_ConsoleManager = exports.Execute_PART = exports.I18N = exports.MONGODB_NAME = exports.DATA_FOLDER = exports.IGNORE_CHARACTER = exports.ENV_CHARACTER = exports.SCROLL_LIMIT = exports.RENDER_FILE_UPDATETICK = exports.RENDER_UPDATETICK = exports.CLIENT_UPDATETICK = exports.MESSAGE_LIMIT = exports.WebHookPORT = exports.WebPORT = exports.PORT = exports.SERECT = void 0;
40
+ exports.SERECT = process.env.SERECT || "aVdWN1gWTTUsAQ06aZHyyLMXo0kEJYhU";
40
41
  exports.PORT = 12080;
41
42
  exports.WebPORT = 11080;
42
43
  exports.WebHookPORT = 15080;
@@ -48,6 +49,7 @@ exports.SCROLL_LIMIT = 100;
48
49
  exports.ENV_CHARACTER = '%';
49
50
  exports.IGNORE_CHARACTER = '^';
50
51
  exports.DATA_FOLDER = '.verteilen';
52
+ exports.MONGODB_NAME = "verteilen";
51
53
  __exportStar(require("./interface/base"), exports);
52
54
  __exportStar(require("./interface/bus"), exports);
53
55
  __exportStar(require("./interface/enum"), exports);
package/dist/lan/en.json CHANGED
@@ -1,9 +1,15 @@
1
1
  {
2
+ "acl": {
3
+ "success": "Successfully executed",
4
+ "unverify": "Un verify",
5
+ "no-permission-action": "You have no permission"
6
+ },
2
7
  "login": {
3
8
  "title": "Account Login",
4
9
  "submit": "Submit",
5
10
  "account": "Account",
6
- "password": "Password"
11
+ "password": "Password",
12
+ "failed": "Login Failed"
7
13
  },
8
14
  "guides": {
9
15
  "workflow": "Workflow",
@@ -1,9 +1,15 @@
1
1
  {
2
+ "acl": {
3
+ "success": "成功執行",
4
+ "unverify": "尚未驗證",
5
+ "no-permission-action": "你沒有權限做此動作"
6
+ },
2
7
  "login": {
3
8
  "title": "帳號登入",
4
9
  "submit": "登入",
5
10
  "account": "帳號",
6
- "password": "密碼"
11
+ "password": "密碼",
12
+ "failed": "登入失敗"
7
13
  },
8
14
  "guides": {
9
15
  "workflow": "工作流程",
@@ -7,11 +7,17 @@ export declare const i18nDefaultData: {
7
7
  fallbackFormat: string;
8
8
  messages: {
9
9
  en: {
10
+ acl: {
11
+ success: string;
12
+ unverify: string;
13
+ "no-permission-action": string;
14
+ };
10
15
  login: {
11
16
  title: string;
12
17
  submit: string;
13
18
  account: string;
14
19
  password: string;
20
+ failed: string;
15
21
  };
16
22
  guides: {
17
23
  workflow: string;
@@ -451,11 +457,17 @@ export declare const i18nDefaultData: {
451
457
  unzoom: string;
452
458
  };
453
459
  zh_TW: {
460
+ acl: {
461
+ success: string;
462
+ unverify: string;
463
+ "no-permission-action": string;
464
+ };
454
465
  login: {
455
466
  title: string;
456
467
  submit: string;
457
468
  account: string;
458
469
  password: string;
470
+ failed: string;
459
471
  };
460
472
  guides: {
461
473
  workflow: string;
@@ -898,11 +910,17 @@ export declare const i18nDefaultData: {
898
910
  };
899
911
  export declare const i18n: import("vue-i18n").I18n<{
900
912
  en: {
913
+ acl: {
914
+ success: string;
915
+ unverify: string;
916
+ "no-permission-action": string;
917
+ };
901
918
  login: {
902
919
  title: string;
903
920
  submit: string;
904
921
  account: string;
905
922
  password: string;
923
+ failed: string;
906
924
  };
907
925
  guides: {
908
926
  workflow: string;
@@ -1342,11 +1360,17 @@ export declare const i18n: import("vue-i18n").I18n<{
1342
1360
  unzoom: string;
1343
1361
  };
1344
1362
  zh_TW: {
1363
+ acl: {
1364
+ success: string;
1365
+ unverify: string;
1366
+ "no-permission-action": string;
1367
+ };
1345
1368
  login: {
1346
1369
  title: string;
1347
1370
  submit: string;
1348
1371
  account: string;
1349
1372
  password: string;
1373
+ failed: string;
1350
1374
  };
1351
1375
  guides: {
1352
1376
  workflow: string;
@@ -1,3 +1,4 @@
1
+ import { MongoClient } from "mongodb";
1
2
  import { Project, RecordType, Database, UserProfile, Library, ExecutionLog, Node, Task, Job } from "../interface";
2
3
  export interface MemoryData {
3
4
  projects: Array<Project>;
@@ -10,13 +11,12 @@ export interface MemoryData {
10
11
  user: Array<UserProfile>;
11
12
  }
12
13
  export interface RecordIOLoader {
13
- load_all: () => Promise<Array<string>>;
14
- delete_all: () => Promise<void>;
15
- list_all: () => Promise<Array<string>>;
16
- save: (name: string, data: string) => Promise<void>;
17
- load: (name: string, cache: boolean) => Promise<string>;
18
- rename: (name: string, newname: string) => Promise<void>;
19
- delete: (name: string) => Promise<void>;
14
+ load_all: (cache: boolean, token?: string) => Promise<Array<string>>;
15
+ delete_all: (token?: string) => Promise<Array<string>>;
16
+ list_all: (token?: string) => Promise<Array<string>>;
17
+ save: (uuid: string, data: string, token?: string) => Promise<boolean>;
18
+ load: (uuid: string, token?: string) => Promise<string>;
19
+ delete: (uuid: string, token?: string) => Promise<boolean>;
20
20
  }
21
21
  export interface RecordLoader {
22
22
  project: RecordIOLoader;
@@ -41,11 +41,9 @@ export interface RecordIOBase {
41
41
  rm: (path: string) => Promise<void>;
42
42
  cp: (path: string, newpath: string) => Promise<void>;
43
43
  }
44
- export interface RecordMongoBase {
45
- }
46
44
  export declare const _CreateRecordMemoryLoader: (loader: MemoryData, type: RecordType) => RecordIOLoader;
47
- export declare const ObsoleteSupport: (loader: RecordIOBase, type: RecordType, folder: string) => Promise<void>;
48
45
  export declare const _CreateRecordIOLoader: (loader: RecordIOBase, memory: MemoryData, type: RecordType, folder: string, ext?: string) => RecordIOLoader;
46
+ export declare const _CreateRecordMongoLoader: (loader: MongoClient, memory: MemoryData, type: RecordType, db: string, collection: string) => RecordIOLoader;
49
47
  export declare const CreateRecordMemoryLoader: (loader: MemoryData) => RecordLoader;
50
48
  export declare const CreateRecordIOLoader: (loader: RecordIOBase, memory: MemoryData) => RecordLoader;
51
- export declare const CreateRecordMongoLoader: (loader: RecordMongoBase, folder: string, ext?: string) => void;
49
+ export declare const CreateRecordMongoLoader: (url: string, memory: MemoryData) => RecordLoader;