@lvce-editor/extension-management-worker 4.20.0 → 4.21.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.
|
@@ -1738,9 +1738,10 @@ const isHttpLocation = () => {
|
|
|
1738
1738
|
return Reflect.has(globalThis, 'location') && globalThis.location.protocol.startsWith('http');
|
|
1739
1739
|
};
|
|
1740
1740
|
const getRuntimeContext = async (assetDir, platform) => {
|
|
1741
|
+
const shouldInferPlatform = isMissingPlatform(platform);
|
|
1741
1742
|
const resolvedAssetDir = isMissingAssetDir(assetDir) ? await invoke$3('Layout.getAssetDir') : assetDir;
|
|
1742
|
-
const resolvedPlatform =
|
|
1743
|
-
if (isHttpLocation() && isStaticHttpAssetDir(resolvedAssetDir)) {
|
|
1743
|
+
const resolvedPlatform = shouldInferPlatform ? await invoke$3('Layout.getPlatform') : platform;
|
|
1744
|
+
if (shouldInferPlatform && isHttpLocation() && isStaticHttpAssetDir(resolvedAssetDir)) {
|
|
1744
1745
|
return {
|
|
1745
1746
|
assetDir: resolvedAssetDir,
|
|
1746
1747
|
platform: Web
|
|
@@ -3148,6 +3149,10 @@ const setPreference = async (key, value) => {
|
|
|
3148
3149
|
});
|
|
3149
3150
|
};
|
|
3150
3151
|
|
|
3152
|
+
const sendMessagePortToElectron = async (port, initialCommand) => {
|
|
3153
|
+
await invokeAndTransfer$1('SendMessagePortToElectron.sendMessagePortToElectron', port, initialCommand);
|
|
3154
|
+
};
|
|
3155
|
+
|
|
3151
3156
|
const sendMessagePortToFileSystemWorker = async port => {
|
|
3152
3157
|
await sendMessagePortToFileSystemWorker$1(port, 0);
|
|
3153
3158
|
};
|
|
@@ -3213,6 +3218,7 @@ const commandMap = {
|
|
|
3213
3218
|
'Extensions.renderViewInstance': renderViewInstance,
|
|
3214
3219
|
'Extensions.requestViewRerender': requestViewRerender,
|
|
3215
3220
|
'Extensions.saveViewInstanceState': saveViewInstanceState,
|
|
3221
|
+
'Extensions.sendMessagePortToElectron': sendMessagePortToElectron,
|
|
3216
3222
|
'Extensions.sendMessagePortToFileSystemWorker': sendMessagePortToFileSystemWorker,
|
|
3217
3223
|
'Extensions.setPreference': setPreference,
|
|
3218
3224
|
'Extensions.showViewContextMenu': showViewContextMenu,
|