verteilen-core 1.2.21 → 1.2.22
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/server/detail.js
CHANGED
|
@@ -64,7 +64,7 @@ class ServerDetail {
|
|
|
64
64
|
message: `${x.websocket.url} \n${x.uuid}`
|
|
65
65
|
};
|
|
66
66
|
if (this.feedback.electron) {
|
|
67
|
-
this.feedback.electron('makeToast', p);
|
|
67
|
+
this.feedback.electron()?.send('makeToast', p);
|
|
68
68
|
}
|
|
69
69
|
if (this.feedback.socket && this.backend.Boradcasting) {
|
|
70
70
|
this.backend.Boradcasting('makeToast', p);
|
|
@@ -80,7 +80,7 @@ class ServerDetail {
|
|
|
80
80
|
message: `${x.websocket.url} \n${x.uuid}`
|
|
81
81
|
};
|
|
82
82
|
if (this.feedback.electron) {
|
|
83
|
-
this.feedback.electron('makeToast', p);
|
|
83
|
+
this.feedback.electron()?.send('makeToast', p);
|
|
84
84
|
}
|
|
85
85
|
if (this.feedback.socket && this.backend.Boradcasting) {
|
|
86
86
|
this.backend.Boradcasting('makeToast', p);
|
|
@@ -94,7 +94,7 @@ class ServerDetail {
|
|
|
94
94
|
};
|
|
95
95
|
shellReply = (data, p) => {
|
|
96
96
|
if (this.feedback.electron) {
|
|
97
|
-
this.feedback.electron("shellReply", data);
|
|
97
|
+
this.feedback.electron()?.send("shellReply", data);
|
|
98
98
|
}
|
|
99
99
|
if (this.feedback.socket) {
|
|
100
100
|
if (p == undefined)
|
|
@@ -110,7 +110,7 @@ class ServerDetail {
|
|
|
110
110
|
};
|
|
111
111
|
folderReply = (data, p) => {
|
|
112
112
|
if (this.feedback.electron) {
|
|
113
|
-
this.feedback.electron("folderReply", data);
|
|
113
|
+
this.feedback.electron()?.send("folderReply", data);
|
|
114
114
|
}
|
|
115
115
|
if (this.feedback.socket) {
|
|
116
116
|
if (p == undefined)
|
package/dist/server/plugin.js
CHANGED
|
@@ -133,7 +133,7 @@ const CreatePluginLoader = (loader, memory, socket, feedback) => {
|
|
|
133
133
|
const p = { title: "Import Failed", type: "error", message: `Cannot find the json from url ${url}, or maybe just the wrong token` };
|
|
134
134
|
const h = { name: "makeToast", data: JSON.stringify(p) };
|
|
135
135
|
if (feedback.electron) {
|
|
136
|
-
feedback.electron("makeToast", JSON.stringify(p));
|
|
136
|
+
feedback.electron()?.send("makeToast", JSON.stringify(p));
|
|
137
137
|
}
|
|
138
138
|
if (feedback.socket) {
|
|
139
139
|
feedback.socket(JSON.stringify(h));
|
|
@@ -189,7 +189,7 @@ const CreatePluginLoader = (loader, memory, socket, feedback) => {
|
|
|
189
189
|
const p = { title: x[0], type: "error", message: x[1] };
|
|
190
190
|
const h = { name: "makeToast", data: JSON.stringify(p) };
|
|
191
191
|
if (feedback.electron) {
|
|
192
|
-
feedback.electron("makeToast", JSON.stringify(p));
|
|
192
|
+
feedback.electron()?.send("makeToast", JSON.stringify(p));
|
|
193
193
|
}
|
|
194
194
|
if (feedback.socket) {
|
|
195
195
|
feedback.socket(JSON.stringify(h));
|
|
@@ -237,7 +237,7 @@ const CreatePluginLoader = (loader, memory, socket, feedback) => {
|
|
|
237
237
|
const p = { title: "Import Failed", type: "error", message: `Cannot find the json from url ${url}, or maybe just the wrong token` };
|
|
238
238
|
const h = { name: "makeToast", data: JSON.stringify(p) };
|
|
239
239
|
if (feedback.electron) {
|
|
240
|
-
feedback.electron("makeToast", JSON.stringify(p));
|
|
240
|
+
feedback.electron()?.send("makeToast", JSON.stringify(p));
|
|
241
241
|
}
|
|
242
242
|
if (feedback.socket) {
|
|
243
243
|
feedback.socket(JSON.stringify(h));
|
package/dist/server/server.d.ts
CHANGED
|
@@ -2,13 +2,16 @@ import { Execute_ConsoleServerManager, PluginPageData } from "../interface";
|
|
|
2
2
|
import { ServerDetail } from "./detail";
|
|
3
3
|
import { MemoryData, RecordIOBase, RecordLoader } from "./io";
|
|
4
4
|
import { PluginLoader } from "./plugin";
|
|
5
|
-
export type
|
|
5
|
+
export type Caller_Electron_Send = (channel: string, ...args: any[]) => void;
|
|
6
|
+
export interface Caller_Electron {
|
|
7
|
+
send: Caller_Electron_Send;
|
|
8
|
+
}
|
|
6
9
|
export type Caller_Socket = (data: any) => void;
|
|
7
10
|
export type TypeMap = {
|
|
8
11
|
[key: string]: Function;
|
|
9
12
|
};
|
|
10
13
|
export interface PluginFeedback {
|
|
11
|
-
electron: Caller_Electron | undefined;
|
|
14
|
+
electron: (() => (Caller_Electron | undefined)) | undefined;
|
|
12
15
|
socket: Caller_Socket | undefined;
|
|
13
16
|
}
|
|
14
17
|
export declare class Server {
|
package/package.json
CHANGED
package/src/server/detail.ts
CHANGED
|
@@ -136,7 +136,7 @@ export class ServerDetail {
|
|
|
136
136
|
message: `${x.websocket.url} \n${x.uuid}`
|
|
137
137
|
}
|
|
138
138
|
if(this.feedback.electron){
|
|
139
|
-
this.feedback.electron('makeToast', p)
|
|
139
|
+
this.feedback.electron()?.send('makeToast', p)
|
|
140
140
|
}
|
|
141
141
|
if(this.feedback.socket && this.backend.Boradcasting){
|
|
142
142
|
this.backend.Boradcasting('makeToast', p)
|
|
@@ -153,7 +153,7 @@ export class ServerDetail {
|
|
|
153
153
|
message: `${x.websocket.url} \n${x.uuid}`
|
|
154
154
|
}
|
|
155
155
|
if(this.feedback.electron){
|
|
156
|
-
this.feedback.electron('makeToast', p)
|
|
156
|
+
this.feedback.electron()?.send('makeToast', p)
|
|
157
157
|
}
|
|
158
158
|
if(this.feedback.socket && this.backend.Boradcasting){
|
|
159
159
|
this.backend.Boradcasting('makeToast', p)
|
|
@@ -175,7 +175,7 @@ export class ServerDetail {
|
|
|
175
175
|
*/
|
|
176
176
|
shellReply = (data:Single, p?:WebsocketPack) => {
|
|
177
177
|
if(this.feedback.electron){
|
|
178
|
-
this.feedback.electron("shellReply", data)
|
|
178
|
+
this.feedback.electron()?.send("shellReply", data)
|
|
179
179
|
}
|
|
180
180
|
if(this.feedback.socket){
|
|
181
181
|
if(p == undefined) return
|
|
@@ -196,7 +196,7 @@ export class ServerDetail {
|
|
|
196
196
|
*/
|
|
197
197
|
folderReply = (data:ShellFolder, p?:WebsocketPack) => {
|
|
198
198
|
if(this.feedback.electron){
|
|
199
|
-
this.feedback.electron("folderReply", data)
|
|
199
|
+
this.feedback.electron()?.send("folderReply", data)
|
|
200
200
|
}
|
|
201
201
|
if(this.feedback.socket){
|
|
202
202
|
if(p == undefined) return
|
package/src/server/plugin.ts
CHANGED
|
@@ -166,7 +166,7 @@ export const CreatePluginLoader = (loader:RecordIOBase, memory:PluginPageData, s
|
|
|
166
166
|
const p:ToastData = { title: "Import Failed", type: "error", message: `Cannot find the json from url ${url}, or maybe just the wrong token` }
|
|
167
167
|
const h:Header = { name: "makeToast", data: JSON.stringify(p) }
|
|
168
168
|
if (feedback.electron){
|
|
169
|
-
feedback.electron("makeToast", JSON.stringify(p))
|
|
169
|
+
feedback.electron()?.send("makeToast", JSON.stringify(p))
|
|
170
170
|
}
|
|
171
171
|
if (feedback.socket){
|
|
172
172
|
feedback.socket(JSON.stringify(h))
|
|
@@ -219,7 +219,7 @@ export const CreatePluginLoader = (loader:RecordIOBase, memory:PluginPageData, s
|
|
|
219
219
|
const p:ToastData = { title: x[0], type: "error", message: x[1] }
|
|
220
220
|
const h:Header = { name: "makeToast", data: JSON.stringify(p) }
|
|
221
221
|
if (feedback.electron){
|
|
222
|
-
feedback.electron("makeToast", JSON.stringify(p))
|
|
222
|
+
feedback.electron()?.send("makeToast", JSON.stringify(p))
|
|
223
223
|
}
|
|
224
224
|
if (feedback.socket){
|
|
225
225
|
feedback.socket(JSON.stringify(h))
|
|
@@ -264,7 +264,7 @@ export const CreatePluginLoader = (loader:RecordIOBase, memory:PluginPageData, s
|
|
|
264
264
|
const p:ToastData = { title: "Import Failed", type: "error", message: `Cannot find the json from url ${url}, or maybe just the wrong token` }
|
|
265
265
|
const h:Header = { name: "makeToast", data: JSON.stringify(p) }
|
|
266
266
|
if (feedback.electron){
|
|
267
|
-
feedback.electron("makeToast", JSON.stringify(p))
|
|
267
|
+
feedback.electron()?.send("makeToast", JSON.stringify(p))
|
|
268
268
|
}
|
|
269
269
|
if (feedback.socket){
|
|
270
270
|
feedback.socket(JSON.stringify(h))
|
package/src/server/server.ts
CHANGED
|
@@ -3,12 +3,15 @@ import { ServerDetail } from "./detail";
|
|
|
3
3
|
import { CreateRecordMemoryLoader, MemoryData, RecordIOBase, RecordLoader } from "./io";
|
|
4
4
|
import { PluginLoader } from "./plugin";
|
|
5
5
|
|
|
6
|
-
export type
|
|
6
|
+
export type Caller_Electron_Send = (channel: string, ...args: any[]) => void
|
|
7
|
+
export interface Caller_Electron {
|
|
8
|
+
send: Caller_Electron_Send
|
|
9
|
+
}
|
|
7
10
|
export type Caller_Socket = (data: any) => void
|
|
8
11
|
export type TypeMap = { [key:string]:Function }
|
|
9
12
|
|
|
10
13
|
export interface PluginFeedback {
|
|
11
|
-
electron:Caller_Electron | undefined
|
|
14
|
+
electron:(() => (Caller_Electron | undefined)) | undefined
|
|
12
15
|
socket:Caller_Socket | undefined
|
|
13
16
|
}
|
|
14
17
|
|