@lvce-editor/api 9.27.0 → 9.27.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.
@@ -2,12 +2,16 @@ import { ExtensionManagementWorker, FileSystemWorker } from '@lvce-editor/rpc-re
2
2
  import { executeCommand } from "../ExecuteCommand/ExecuteCommand.js";
3
3
  import { getPlatform } from "../Platform/Platform.js";
4
4
  const MemfsPrefix = 'memfs://';
5
+ const FilePrefix = 'file://';
5
6
  const isMemory = (uri) => {
6
7
  return uri.startsWith(MemfsPrefix);
7
8
  };
8
9
  const isHttp = (uri) => {
9
10
  return uri.startsWith('http://') || uri.startsWith('https://');
10
11
  };
12
+ const isCustomFileSystemUri = (uri) => {
13
+ return uri.includes('://') && !uri.startsWith(FilePrefix);
14
+ };
11
15
  const getRemoteUrl = (uri) => {
12
16
  const withoutPrefix = uri.startsWith('file://') ? uri.slice('file://'.length) : uri;
13
17
  const normalized = withoutPrefix.replaceAll('\\', '/');
@@ -17,7 +21,7 @@ const getObjectUrl = async (uri) => {
17
21
  if (isHttp(uri)) {
18
22
  return uri;
19
23
  }
20
- if (isMemory(uri)) {
24
+ if (isMemory(uri) || isCustomFileSystemUri(uri)) {
21
25
  return (await executeCommand('Blob.getSrc', uri));
22
26
  }
23
27
  const platform = await getPlatform();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/api",
3
- "version": "9.27.0",
3
+ "version": "9.27.1",
4
4
  "description": "Tree-shakeable extension API for Lvce Editor extensions.",
5
5
  "keywords": [
6
6
  "lvce-editor",