@lvce-editor/extension-host-helper-process 0.99.17 → 0.99.19

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/extension-host-helper-process",
3
- "version": "0.99.17",
3
+ "version": "0.99.19",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1,21 +1,11 @@
1
1
  import * as Command from '@lvce-editor/command'
2
2
  import * as Assert from '../Assert/Assert.js'
3
3
  import * as ImportScript from '../ImportScript/ImportScript.js'
4
- import * as CommandMapRef from '../CommandMapRef/CommandMapRef.js'
5
4
  import { VError } from '../VError/VError.js'
6
5
 
7
6
  export const loadFile = async (path) => {
8
7
  try {
9
8
  Assert.string(path)
10
- if (!CommandMapRef.commandMapRef['LoadFile.loadFile']) {
11
- throw new Error('a module has already been loaded')
12
- }
13
- delete CommandMapRef.commandMapRef['LoadFile.loadFile']
14
- Command.register({
15
- 'LoadFile.loadFile'() {
16
- throw new Error('a module has already been loaded')
17
- },
18
- })
19
9
  const module = await ImportScript.importScript(path)
20
10
  if (module && module.commandMap) {
21
11
  const commandMap = module.commandMap