@lvce-editor/shared-process 0.99.9 → 0.99.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/shared-process",
3
- "version": "0.99.9",
3
+ "version": "0.99.11",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@lvce-editor/assert": "1.9.0",
21
- "@lvce-editor/extension-host-helper-process": "0.99.9",
21
+ "@lvce-editor/extension-host-helper-process": "0.99.11",
22
22
  "@lvce-editor/ipc": "16.10.0",
23
23
  "@lvce-editor/json-rpc": "8.6.0",
24
24
  "@lvce-editor/jsonc-parser": "1.5.0",
@@ -3,6 +3,6 @@ import { fileURLToPath } from 'url'
3
3
 
4
4
  export const getBuiltinExtensionsPath = () => {
5
5
  const staticServerPath = fileURLToPath(import.meta.resolve('@lvce-editor/static-server'))
6
- const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', 'b4e39e5', 'extensions')
6
+ const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', '3322d7b', 'extensions')
7
7
  return builtinExtensionsPath
8
8
  }
@@ -111,7 +111,7 @@ export const getExtensions = () => {
111
111
  ...transientLinkedExtensions,
112
112
  {
113
113
  path: PlatformPaths.getLinkedExtensionsPath(),
114
- type: ExtensionManifestInputType.Folder,
114
+ type: ExtensionManifestInputType.LinkedExtensionsFolder,
115
115
  },
116
116
  {
117
117
  path: PlatformPaths.getExtensionsPath(),
@@ -141,7 +141,7 @@ export const getExtensionsEtag = async () => {
141
141
  ...transientLinkedExtensions,
142
142
  {
143
143
  path: PlatformPaths.getLinkedExtensionsPath(),
144
- type: ExtensionManifestInputType.Folder,
144
+ type: ExtensionManifestInputType.LinkedExtensionsFolder,
145
145
  },
146
146
  {
147
147
  path: PlatformPaths.getExtensionsPath(),
@@ -20,13 +20,17 @@ const readSymlinks = (absolutePaths) => {
20
20
  return Promise.all(absolutePaths.map(readSymlink))
21
21
  }
22
22
 
23
+ const isExtensionFolder = (dirent) => {
24
+ return dirent.type === DirentType.Directory || dirent.type === DirentType.Symlink
25
+ }
26
+
23
27
  export const getExtensionManifests = async (path) => {
24
28
  try {
25
29
  if (!path) {
26
30
  return []
27
31
  }
28
32
  const dirents = await FileSystem.readDirWithFileTypes(path)
29
- const folderNames = dirents.filter((dirent) => dirent.type === DirentType.Directory).map((dirent) => dirent.name)
33
+ const folderNames = dirents.filter(isExtensionFolder).map((dirent) => dirent.name)
30
34
  const absolutePaths = ToAbsolutePaths.toAbsolutePaths(path, folderNames)
31
35
  const manifests = await Promise.all(absolutePaths.map(ExtensionManifest.get))
32
36
  const symlinks = await readSymlinks(absolutePaths)
@@ -27,7 +27,8 @@ export const getElectronFileResponseRelativePath = (requestUrl) => {
27
27
  }
28
28
  if (requestUrl.startsWith('/')) {
29
29
  // TODO this should not be supported anymore and could probably be removed
30
- return removeQueryParameters(requestUrl)
30
+ const pathName = removeQueryParameters(requestUrl)
31
+ return decodeURI(pathName)
31
32
  }
32
33
  console.log({ requestUrl })
33
34
  return ''
@@ -35,10 +35,14 @@ const getOnly = async (path) => {
35
35
  return getManifestStats(path)
36
36
  }
37
37
 
38
- const getFolder = async (path) => {
38
+ const isExtensionFolder = (dirent, includeSymlinks) => {
39
+ return dirent.type === DirentType.Directory || (includeSymlinks && dirent.type === DirentType.Symlink)
40
+ }
41
+
42
+ const getFolder = async (path, includeSymlinks = false) => {
39
43
  try {
40
44
  const dirents = await FileSystem.readDirWithFileTypes(path)
41
- const folderNames = dirents.filter((dirent) => dirent.type === DirentType.Directory).map((dirent) => dirent.name)
45
+ const folderNames = dirents.filter((dirent) => isExtensionFolder(dirent, includeSymlinks)).map((dirent) => dirent.name)
42
46
  const stats = await Promise.all(
43
47
  folderNames.map(async (folderName) => {
44
48
  const extensionManifestPath = join(path, folderName, 'extension.json')
@@ -57,9 +61,11 @@ const getFolder = async (path) => {
57
61
  const get = (input) => {
58
62
  switch (input.type) {
59
63
  case ExtensionManifestInputType.Folder:
60
- case ExtensionManifestInputType.LinkedExtensionsFolder:
61
64
  return getFolder(input.path)
62
65
  case ExtensionManifestInputType.LinkedExtension:
66
+ return getOnly(input.path)
67
+ case ExtensionManifestInputType.LinkedExtensionsFolder:
68
+ return getFolder(input.path, true)
63
69
  case ExtensionManifestInputType.OnlyExtension:
64
70
  return getOnly(input.path)
65
71
  default:
@@ -61,11 +61,11 @@ export const getSetupName = () => {
61
61
  return 'Lvce-Setup'
62
62
  }
63
63
 
64
- export const version = '0.99.9'
64
+ export const version = '0.99.11'
65
65
 
66
- export const commit = 'b4e39e5'
66
+ export const commit = '3322d7b'
67
67
 
68
- export const date = '2026-08-05T21:25:08.000Z'
68
+ export const date = '2026-08-05T23:29:18.000Z'
69
69
 
70
70
  export const getVersion = () => {
71
71
  return version
@@ -2,5 +2,5 @@ import { join } from 'node:path'
2
2
  import * as Root from '../Root/Root.js'
3
3
 
4
4
  export const getPreloadUrl = () => {
5
- return join(Root.root, 'static', 'b4e39e5', 'packages', 'preload', 'dist', 'index.js')
5
+ return join(Root.root, 'static', '3322d7b', 'packages', 'preload', 'dist', 'index.js')
6
6
  }