verteilen-core 1.2.14 → 1.2.16

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.
@@ -1,7 +1,6 @@
1
1
  import { BusAnalysis, Execute_SocketManager, ExecutePair, ExecuteProxy, ExecuteRecord, ExecuteState, Messager, Preference, Record, ShellFolder, Single, UtilServer_Console, WebsocketPack } from "../interface";
2
2
  import { PluginFeedback } from "./server";
3
3
  import { MemoryData, RecordIOBase } from './io';
4
- export type Translate = (key: string) => string;
5
4
  export interface BackendAction {
6
5
  memory: MemoryData;
7
6
  GetPreference: (uuid?: string) => Preference;
@@ -41,7 +40,7 @@ export declare class ServerDetail {
41
40
  messager_log: Function;
42
41
  updatehandle: any;
43
42
  re: Array<any>;
44
- constructor(loader: RecordIOBase | undefined, backend: BackendAction, feedback: PluginFeedback, message: Messager, messager_log: Function, t: Translate);
43
+ constructor(loader: RecordIOBase | undefined, backend: BackendAction, feedback: PluginFeedback, message: Messager, messager_log: Function);
45
44
  get events(): ServerDetailEvent;
46
45
  NewConnection: (x: WebsocketPack) => void;
47
46
  DisConnection: (x: WebsocketPack) => void;
@@ -17,7 +17,7 @@ class ServerDetail {
17
17
  messager_log;
18
18
  updatehandle;
19
19
  re = [];
20
- constructor(loader, backend, feedback, message, messager_log, t) {
20
+ constructor(loader, backend, feedback, message, messager_log) {
21
21
  this.loader = loader;
22
22
  this.backend = backend;
23
23
  this.feedback = feedback;
@@ -7,8 +7,8 @@ const GetCurrentPlugin = async (loader) => {
7
7
  plugins: [],
8
8
  templates: []
9
9
  };
10
- const root = loader.join(loader.root, 'template');
11
- const root2 = loader.join(loader.root, 'plugin');
10
+ const root = loader.join(loader.root, 'plugin');
11
+ const root2 = loader.join(loader.root, 'template');
12
12
  if (!loader.exists(root))
13
13
  await loader.mkdir(root);
14
14
  if (!loader.exists(root2))
@@ -37,7 +37,7 @@ const GetCurrentPlugin = async (loader) => {
37
37
  url: config.url
38
38
  });
39
39
  }
40
- const files2 = (await loader.read_dir_dir(root2)).filter(x => x.endsWith('.json'));
40
+ const files2 = (await loader.read_dir_file(root2)).filter(x => x.endsWith('.json'));
41
41
  const p_config2 = files2.map(file => {
42
42
  return loader.read_string(loader.join(root2, file), { encoding: 'utf-8' });
43
43
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verteilen-core",
3
- "version": "1.2.14",
3
+ "version": "1.2.16",
4
4
  "license": "MIT",
5
5
  "homepage": "https://verteilen.github.io/wiki/",
6
6
  "author": "Elly",
@@ -28,8 +28,6 @@ import { MemoryData, RecordIOBase } from './io'
28
28
  import { Util_Server_Console_Proxy } from '../util/console_handle'
29
29
  import { Util_Server_Log_Proxy } from '../util/log_handle'
30
30
 
31
- export type Translate = (key:string) => string
32
-
33
31
  export interface BackendAction {
34
32
  memory: MemoryData
35
33
  GetPreference: (uuid?:string) => Preference
@@ -86,8 +84,7 @@ export class ServerDetail {
86
84
  backend:BackendAction,
87
85
  feedback:PluginFeedback,
88
86
  message:Messager,
89
- messager_log:Function,
90
- t:Translate)
87
+ messager_log:Function)
91
88
  {
92
89
  this.loader = loader
93
90
  this.backend = backend
@@ -43,8 +43,8 @@ export const GetCurrentPlugin = async (loader:RecordIOBase):Promise<PluginPageDa
43
43
  plugins: [],
44
44
  templates: []
45
45
  }
46
- const root = loader.join(loader.root, 'template')
47
- const root2 = loader.join(loader.root, 'plugin')
46
+ const root = loader.join(loader.root, 'plugin')
47
+ const root2 = loader.join(loader.root, 'template')
48
48
  if(!loader.exists(root)) await loader.mkdir(root)
49
49
  if(!loader.exists(root2)) await loader.mkdir(root2)
50
50
 
@@ -73,7 +73,7 @@ export const GetCurrentPlugin = async (loader:RecordIOBase):Promise<PluginPageDa
73
73
  })
74
74
  }
75
75
 
76
- const files2 = (await loader.read_dir_dir(root2)).filter(x => x.endsWith('.json'));
76
+ const files2 = (await loader.read_dir_file(root2)).filter(x => x.endsWith('.json'));
77
77
 
78
78
  const p_config2 = files2.map(file => {
79
79
  return loader.read_string(loader.join(root2, file), { encoding: 'utf-8' })