@lvce-editor/shared-process 0.122.4 → 0.122.6

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.122.4",
3
+ "version": "0.122.6",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -23,7 +23,7 @@
23
23
  "@lvce-editor/json-rpc": "8.9.0",
24
24
  "@lvce-editor/jsonc-parser": "1.5.2",
25
25
  "@lvce-editor/pretty-error": "2.0.2",
26
- "@lvce-editor/process-explorer": "3.33.0",
26
+ "@lvce-editor/process-explorer": "3.34.0",
27
27
  "@lvce-editor/rpc-registry": "9.66.0",
28
28
  "@lvce-editor/verror": "1.7.0",
29
29
  "is-object": "^1.0.2",
@@ -40,7 +40,7 @@
40
40
  "@lvce-editor/preview-process": "11.0.0",
41
41
  "@lvce-editor/pty-host": "8.11.2",
42
42
  "@lvce-editor/search-process": "15.11.0",
43
- "@lvce-editor/typescript-compile-process": "5.10.2",
43
+ "@lvce-editor/typescript-compile-process": "5.11.0",
44
44
  "open": "^11.0.4",
45
45
  "tail": "^2.2.6",
46
46
  "tmp-promise": "^3.0.3",
@@ -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', 'a95460a', 'extensions')
6
+ const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', 'fe633ed', 'extensions')
7
7
  return builtinExtensionsPath
8
8
  }
@@ -1,21 +1,49 @@
1
+ import * as BuiltinExtensionsPath from '../BuiltinExtensionsPath/BuiltinExtensionsPath.js'
1
2
  import * as DirentType from '../DirentType/DirentType.js'
2
3
  import * as ExtensionManifest from '../ExtensionManifest/ExtensionManifest.js'
4
+ import * as ExtensionManifestStatus from '../ExtensionManifestStatus/ExtensionManifestStatus.js'
3
5
  import * as FileSystem from '../FileSystem/FileSystem.js'
4
6
  import * as IsEnoentError from '../IsEnoentError/IsEnoentError.js'
7
+ import * as Platform from '../Platform/Platform.js'
5
8
  import * as ToAbsolutePaths from '../ToAbsolutePaths/ToAbsolutePaths.js'
6
9
  import { VError } from '../VError/VError.js'
7
10
 
11
+ let builtinManifests
12
+
13
+ const readExtensionManifests = async (path) => {
14
+ const dirents = await FileSystem.readDirWithFileTypes(path)
15
+ const folderNames = dirents.filter((dirent) => dirent.type === DirentType.Directory).map((dirent) => dirent.name)
16
+ const absolutePaths = ToAbsolutePaths.toAbsolutePaths(path, folderNames)
17
+ return Promise.all(absolutePaths.map(ExtensionManifest.get))
18
+ }
19
+
8
20
  export const getExtensionManifests = async (path) => {
21
+ let cached
9
22
  try {
10
23
  if (!path) {
11
24
  return []
12
25
  }
13
- const dirents = await FileSystem.readDirWithFileTypes(path)
14
- const folderNames = dirents.filter((dirent) => dirent.type === DirentType.Directory).map((dirent) => dirent.name)
15
- const absolutePaths = ToAbsolutePaths.toAbsolutePaths(path, folderNames)
16
- const manifests = await Promise.all(absolutePaths.map(ExtensionManifest.get))
17
- return manifests
26
+ // Packaged builtins are fixed for this process. User and development extensions stay live.
27
+ if (!Platform.isProduction || path !== BuiltinExtensionsPath.getBuiltinExtensionsPath()) {
28
+ return await readExtensionManifests(path)
29
+ }
30
+ if (!builtinManifests || builtinManifests.path !== path) {
31
+ builtinManifests = { path, promise: readExtensionManifests(path) }
32
+ }
33
+ cached = builtinManifests
34
+ const manifests = await cached.promise
35
+ if (manifests.some((manifest) => manifest.status === ExtensionManifestStatus.Rejected)) {
36
+ if (builtinManifests === cached) {
37
+ builtinManifests = undefined
38
+ }
39
+ return manifests
40
+ }
41
+ // Keep request-local metadata and nested contributions independent of the cached values.
42
+ return structuredClone(manifests)
18
43
  } catch (error) {
44
+ if (cached && builtinManifests === cached) {
45
+ builtinManifests = undefined
46
+ }
19
47
  if (IsEnoentError.isEnoentError(error)) {
20
48
  return []
21
49
  }
@@ -142,6 +142,7 @@ export const getModuleId = (commandId) => {
142
142
  case 'FileSystem.readJson':
143
143
  case 'FileSystem.remove':
144
144
  case 'FileSystem.rename':
145
+ case 'FileSystem.statWithMetadata':
145
146
  case 'FileSystem.writeFile':
146
147
  return ModuleId.FileSystem
147
148
  case 'FileSystemDisk.chmod':
@@ -56,11 +56,11 @@ export const getSetupName = () => {
56
56
  return 'Lvce-Setup'
57
57
  }
58
58
 
59
- export const version = '0.122.4'
59
+ export const version = '0.122.6'
60
60
 
61
- export const commit = 'a95460a'
61
+ export const commit = 'fe633ed'
62
62
 
63
- export const date = '2026-10-11T23:31:45.000Z'
63
+ export const date = '2026-10-12T11:39:04.000Z'
64
64
 
65
65
  export const getVersion = () => {
66
66
  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', 'a95460a', 'packages', 'preload', 'dist', 'index.js')
5
+ return join(Root.root, 'static', 'fe633ed', 'packages', 'preload', 'dist', 'index.js')
6
6
  }
@@ -1542,13 +1542,13 @@
1542
1542
  "viewlet": {
1543
1543
  "name": "ProcessExplorer",
1544
1544
  "css": ["/css/parts/MaskIcon.css", "/css/parts/ViewletProcessExplorer.css"],
1545
- "state": { "idKey": "uid", "fields": ["parentUid", "uri", "x", "y", "width", "height"], "contextFields": ["platform", "assetDir"] },
1545
+ "state": { "idKey": "uid", "fields": ["parentUid", "uri", "x", "y", "width", "height"], "contextFields": ["platform", "assetDir", "processExplorerUpdateInterval"] },
1546
1546
  "commandPrefix": "ProcessExplorer",
1547
1547
  "methods": {
1548
1548
  "create": { "name": "ProcessExplorer.create", "parameters": [
1549
1549
  { "source": "state", "name": "uid" }, { "source": "state", "name": "uri" }, { "source": "state", "name": "x" },
1550
1550
  { "source": "state", "name": "y" }, { "source": "state", "name": "width" }, { "source": "state", "name": "height" },
1551
- { "source": "literal", "value": null }, { "source": "state", "name": "parentUid" }, { "source": "state", "name": "platform" },
1551
+ { "source": "context", "name": "processExplorerArgs" }, { "source": "state", "name": "parentUid" }, { "source": "state", "name": "platform" },
1552
1552
  { "source": "state", "name": "assetDir" }
1553
1553
  ] },
1554
1554
  "loadContent": { "name": "ProcessExplorer.loadContent", "parameters": [{ "source": "state", "name": "uid" }, { "source": "argument", "name": "savedState" }] },