@lvce-editor/extension-host-worker 1.3.1 → 1.4.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.
@@ -2187,6 +2187,7 @@ const getRemoteUrlForWebView = async (uri, options = {}) => {
2187
2187
 
2188
2188
  const Electron = 'electron';
2189
2189
  const Remote = 'remote';
2190
+ const Web = 'web';
2190
2191
  const Test = 'test';
2191
2192
 
2192
2193
  const getPlatform = () => {
@@ -2202,6 +2203,9 @@ const getPlatform = () => {
2202
2203
  if (typeof name !== 'undefined' && name.endsWith('(Electron)')) {
2203
2204
  return Electron;
2204
2205
  }
2206
+ if (typeof name !== 'undefined' && name.endsWith('(Web)')) {
2207
+ return Web;
2208
+ }
2205
2209
  return Remote;
2206
2210
  };
2207
2211
  const platform = getPlatform(); // TODO tree-shake this out in production
@@ -2405,8 +2409,12 @@ const getUrlPrefix = extensionPath => {
2405
2409
  if (extensionPath.startsWith('http://') || extensionPath.startsWith('https://')) {
2406
2410
  return extensionPath;
2407
2411
  }
2408
- return `/remote/${extensionPath}`;
2412
+ if (platform === Web) {
2413
+ return extensionPath;
2414
+ }
2415
+ return `/remote${extensionPath}`;
2409
2416
  };
2417
+
2410
2418
  const handleRpcInfos = extension => {
2411
2419
  try {
2412
2420
  if (!extension) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/extension-host-worker",
3
- "version": "1.3.1",
3
+ "version": "1.4.1",
4
4
  "description": "Webworker for the extension host functionality in Lvce Editor.",
5
5
  "main": "dist/extensionHostWorkerMain.js",
6
6
  "type": "module",