@lvce-editor/auth-worker 3.17.0 → 3.18.1
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/authWorkerMain.js +27 -24
- package/package.json +1 -1
package/dist/authWorkerMain.js
CHANGED
|
@@ -1140,28 +1140,6 @@ const sendMessagePortToOpenerWorker$1 = async (port, rpcId) => {
|
|
|
1140
1140
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToOpenerWorker', port, command, rpcId);
|
|
1141
1141
|
};
|
|
1142
1142
|
|
|
1143
|
-
const sendMessagePortToAuthProcess = async port => {
|
|
1144
|
-
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToSharedProcess', port, 'HandleMessagePortForAuthProcess.handleMessagePortForAuthProcess');
|
|
1145
|
-
};
|
|
1146
|
-
const initializeAuthProcess = async () => {
|
|
1147
|
-
const rpc = await create$2({
|
|
1148
|
-
commandMap: {},
|
|
1149
|
-
send: sendMessagePortToAuthProcess
|
|
1150
|
-
});
|
|
1151
|
-
set$2(rpc);
|
|
1152
|
-
};
|
|
1153
|
-
|
|
1154
|
-
const sendMessagePortToMainProcess = async port => {
|
|
1155
|
-
await invokeAndTransfer('SendMessagePortToMainProcess.sendMessagePortToMainProcess', port, 'HandleElectronMessagePort.handleElectronMessagePort', 0);
|
|
1156
|
-
};
|
|
1157
|
-
const initializeMainProcess = async () => {
|
|
1158
|
-
const rpc = await create$2({
|
|
1159
|
-
commandMap: {},
|
|
1160
|
-
send: sendMessagePortToMainProcess
|
|
1161
|
-
});
|
|
1162
|
-
set$1(rpc);
|
|
1163
|
-
};
|
|
1164
|
-
|
|
1165
1143
|
const sendMessagePortToOpenerWorker = async port => {
|
|
1166
1144
|
await sendMessagePortToOpenerWorker$1(port, 0);
|
|
1167
1145
|
};
|
|
@@ -3521,9 +3499,34 @@ const syncBackendAuth = async backendUrl => initialize({
|
|
|
3521
3499
|
backendUrl
|
|
3522
3500
|
});
|
|
3523
3501
|
|
|
3524
|
-
const
|
|
3502
|
+
const sendMessagePortToAuthProcess = async port => {
|
|
3503
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToSharedProcess', port, 'HandleMessagePortForAuthProcess.handleMessagePortForAuthProcess');
|
|
3504
|
+
};
|
|
3505
|
+
const initializeAuthProcess = async () => {
|
|
3506
|
+
const rpc = await create$2({
|
|
3507
|
+
commandMap: {},
|
|
3508
|
+
send: sendMessagePortToAuthProcess
|
|
3509
|
+
});
|
|
3510
|
+
set$2(rpc);
|
|
3511
|
+
};
|
|
3512
|
+
|
|
3513
|
+
const sendMessagePortToMainProcess = async port => {
|
|
3514
|
+
await invokeAndTransfer('SendMessagePortToMainProcess.sendMessagePortToMainProcess', port, 'HandleElectronMessagePort.handleElectronMessagePort', 0);
|
|
3515
|
+
};
|
|
3516
|
+
const initializeMainProcess = async () => {
|
|
3517
|
+
const rpc = await create$2({
|
|
3518
|
+
commandMap: {},
|
|
3519
|
+
send: sendMessagePortToMainProcess
|
|
3520
|
+
});
|
|
3521
|
+
set$1(rpc);
|
|
3522
|
+
};
|
|
3523
|
+
|
|
3524
|
+
const configure = async options => {
|
|
3525
3525
|
setAuthBackendUrl(options.backendUrl);
|
|
3526
3526
|
setAuthPlatform(options.platform);
|
|
3527
|
+
if (options.platform === Electron) {
|
|
3528
|
+
await Promise.all([initializeAuthProcess(), initializeMainProcess()]);
|
|
3529
|
+
}
|
|
3527
3530
|
};
|
|
3528
3531
|
|
|
3529
3532
|
const handleMessagePort = async (port, rpcId) => {
|
|
@@ -3567,7 +3570,7 @@ const initializeRendererWorker = async () => {
|
|
|
3567
3570
|
};
|
|
3568
3571
|
|
|
3569
3572
|
const listen = async () => {
|
|
3570
|
-
await Promise.all([initializeRendererWorker(), initializeOpenerWorker()
|
|
3573
|
+
await Promise.all([initializeRendererWorker(), initializeOpenerWorker()]);
|
|
3571
3574
|
};
|
|
3572
3575
|
|
|
3573
3576
|
const main = async () => {
|