@lvce-editor/extension-management-worker 4.86.0 → 4.87.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.
|
@@ -1608,6 +1608,7 @@ const {
|
|
|
1608
1608
|
|
|
1609
1609
|
const {
|
|
1610
1610
|
invoke: invoke$8,
|
|
1611
|
+
invokeAndTransfer: invokeAndTransfer$2,
|
|
1611
1612
|
set: set$b
|
|
1612
1613
|
} = create(19_001);
|
|
1613
1614
|
const getCacheStorageItem = async (request, cacheName, bucketName, bucketOptions) => {
|
|
@@ -3005,6 +3006,10 @@ const storeSecret = async (extensionId, key, value) => {
|
|
|
3005
3006
|
}
|
|
3006
3007
|
};
|
|
3007
3008
|
|
|
3009
|
+
const sendMessagePortToCacheWorker = async (extensionId, port) => {
|
|
3010
|
+
await invokeAndTransfer$2('CacheWorker.handleExtensionMessagePort', port, extensionId);
|
|
3011
|
+
};
|
|
3012
|
+
|
|
3008
3013
|
class CommandNotFoundError extends Error {
|
|
3009
3014
|
constructor(command) {
|
|
3010
3015
|
super(`Command not found ${command}`);
|
|
@@ -3052,6 +3057,7 @@ const createExtensionCommandMap = (extensionId, invokeCommand = invokeGlobalComm
|
|
|
3052
3057
|
'Extensions.executeCommand': (id, ...args) => executeCommand$1(invokeCommand, id, ...args),
|
|
3053
3058
|
'Extensions.getCacheFileHandle': name => invokeCommand('Extensions.getCacheFileHandle', name),
|
|
3054
3059
|
'Extensions.registerFileChangeHandler': () => invokeCommand('Extensions.registerFileChangeHandler'),
|
|
3060
|
+
'Extensions.sendMessagePortToCacheWorker': port => invokeCommand('Extensions.sendMessagePortToCacheWorker', port),
|
|
3055
3061
|
'Extensions.unregisterFileChangeHandler': () => invokeCommand('Extensions.unregisterFileChangeHandler')
|
|
3056
3062
|
};
|
|
3057
3063
|
}
|
|
@@ -3078,6 +3084,9 @@ const createExtensionCommandMap = (extensionId, invokeCommand = invokeGlobalComm
|
|
|
3078
3084
|
'Extensions.registerFileChangeHandler'() {
|
|
3079
3085
|
register(extensionId);
|
|
3080
3086
|
},
|
|
3087
|
+
'Extensions.sendMessagePortToCacheWorker'(port) {
|
|
3088
|
+
return sendMessagePortToCacheWorker(extensionId, port);
|
|
3089
|
+
},
|
|
3081
3090
|
'Extensions.sendMessagePortToElectron'(port, initialCommand) {
|
|
3082
3091
|
if (initialCommand !== allowedElectronPortCommand) {
|
|
3083
3092
|
throw new Error(`Isolated extensions cannot send a port using ${initialCommand}`);
|
|
@@ -3139,6 +3148,9 @@ const createIsolatedExtensionHostWorker = async (extensionId, absolutePath, work
|
|
|
3139
3148
|
if (method === 'Extensions.sendMessagePortToFileSystemWorker') {
|
|
3140
3149
|
return createFileSystemPort(application, args[0], extensionId);
|
|
3141
3150
|
}
|
|
3151
|
+
if (method === 'Extensions.sendMessagePortToCacheWorker') {
|
|
3152
|
+
return sendMessagePortToCacheWorker(extensionId, args[0]);
|
|
3153
|
+
}
|
|
3142
3154
|
if (method === 'Extensions.createWebViewWorkerRpc' || method === 'Extensions.createWebViewWorkerRpc2') {
|
|
3143
3155
|
return createWorker$1(application, args[0], args[1], method === 'Extensions.createWebViewWorkerRpc', extensionId);
|
|
3144
3156
|
}
|