@lvce-editor/shared-process 0.104.5 → 0.104.7

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/index.js CHANGED
@@ -22,10 +22,10 @@ const toAbsoluteExtensionPath = (root, extensionPath) => {
22
22
  }
23
23
 
24
24
  /**
25
- * @param {{extensionPath?: string, extensionPaths?: string[] | string, testPath?: string, root?: string}} [options]
25
+ * @param {{extensionPath?: string, extensionPaths?: string[] | string, onLoadCommands?: readonly unknown[], testPath?: string, root?: string}} [options]
26
26
  */
27
27
  export const exportStatic = async (options = {}) => {
28
- const { extensionPath, extensionPaths = [], root = '', testPath = '' } = options
28
+ const { extensionPath, extensionPaths = [], onLoadCommands = [], root = '', testPath = '' } = options
29
29
  if (!root) {
30
30
  throw new Error(`root argument is required`)
31
31
  }
@@ -35,5 +35,5 @@ export const exportStatic = async (options = {}) => {
35
35
  const absoluteExtensionPath = toAbsoluteExtensionPath(root, defaultExtensionPath)
36
36
  const absoluteExtensionPaths = extensionPathList.map((extensionPath) => toAbsoluteExtensionPath(root, extensionPath))
37
37
  const pathPrefix = process.env.PATH_PREFIX || ''
38
- return fn.exportStatic({ extensionPath: absoluteExtensionPath, extensionPaths: absoluteExtensionPaths, pathPrefix, root, testPath })
38
+ return fn.exportStatic({ extensionPath: absoluteExtensionPath, extensionPaths: absoluteExtensionPaths, onLoadCommands, pathPrefix, root, testPath })
39
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/shared-process",
3
- "version": "0.104.5",
3
+ "version": "0.104.7",
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.104.5",
21
+ "@lvce-editor/extension-host-helper-process": "0.104.7",
22
22
  "@lvce-editor/ipc": "16.12.0",
23
23
  "@lvce-editor/json-rpc": "8.7.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', 'cd9ab84', 'extensions')
6
+ const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', 'fe65073', 'extensions')
7
7
  return builtinExtensionsPath
8
8
  }
@@ -673,11 +673,12 @@ const getExtensionPaths = (extensionPath, extensionPaths) => {
673
673
 
674
674
  /**
675
675
  *
676
- * @param {{root:string, pathPrefix:string, extensionPath:string, extensionPaths?:string[], testPath:string, useSimpleWebExtensionFile?:boolean, serverStaticPath?:string }} param0
676
+ * @param {{root:string, pathPrefix:string, extensionPath:string, extensionPaths?:string[], onLoadCommands?:readonly unknown[], testPath:string, useSimpleWebExtensionFile?:boolean, serverStaticPath?:string }} param0
677
677
  */
678
678
  export const exportStatic = async ({
679
679
  extensionPath,
680
680
  extensionPaths,
681
+ onLoadCommands = [],
681
682
  pathPrefix,
682
683
  root,
683
684
  serverStaticPath,
@@ -728,6 +729,7 @@ export const exportStatic = async ({
728
729
  console.timeEnd('applyOverrides')
729
730
 
730
731
  await updateExtensionsJson({ commitHash, extraExtensions: [], pathPrefix, root })
732
+ await JsonFile.writeJson(Path.join(root, 'dist', commitHash, 'config', 'onLoadCommands.json'), onLoadCommands)
731
733
 
732
734
  for (const extensionPath of allExtensionPaths) {
733
735
  console.time('addExtension')
@@ -61,11 +61,11 @@ export const getSetupName = () => {
61
61
  return 'Lvce-Setup'
62
62
  }
63
63
 
64
- export const version = '0.104.5'
64
+ export const version = '0.104.7'
65
65
 
66
- export const commit = 'cd9ab84'
66
+ export const commit = 'fe65073'
67
67
 
68
- export const date = '2026-08-18T14:22:15.000Z'
68
+ export const date = '2026-08-18T15:31:56.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', 'cd9ab84', 'packages', 'preload', 'dist', 'index.js')
5
+ return join(Root.root, 'static', 'fe65073', 'packages', 'preload', 'dist', 'index.js')
6
6
  }