@lvce-editor/shared-process 0.118.22 → 0.118.23

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.118.22",
3
+ "version": "0.118.23",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -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', '56b33a7', 'extensions')
6
+ const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', '63e81b5', 'extensions')
7
7
  return builtinExtensionsPath
8
8
  }
@@ -10,6 +10,9 @@ import * as Path from '../Path/Path.js'
10
10
 
11
11
  const testFileExtensionRegex = /\.(js|ts)$/
12
12
  const backslashRegex = /\\/g
13
+ const importFromTsRegex = /(from\s+['"][^'"]+)\.ts(['"])/g
14
+ const sideEffectImportTsRegex = /(import\s+['"][^'"]+)\.ts(['"])/g
15
+ const dynamicImportTsRegex = /(import\(\s*['"][^'"]+)\.ts(['"]\s*\))/g
13
16
 
14
17
  const staticContentSecurityPolicy = GetContentSecurityPolicy.getContentSecurityPolicy([
15
18
  `default-src 'none'`,
@@ -529,8 +532,12 @@ const getTestFiles = (testFilesRaw) => {
529
532
  return testFilesRaw.filter(isTestFile).map(getName)
530
533
  }
531
534
 
535
+ const fixImports = (content) => {
536
+ return content.replaceAll(importFromTsRegex, '$1.js$2').replaceAll(sideEffectImportTsRegex, '$1.js$2').replaceAll(dynamicImportTsRegex, '$1.js$2')
537
+ }
538
+
532
539
  export const transpileFile = (content) => {
533
- return stripTypeScriptTypes(content)
540
+ return fixImports(stripTypeScriptTypes(content))
534
541
  }
535
542
 
536
543
  const transpileFiles = async (folder) => {
@@ -56,11 +56,11 @@ export const getSetupName = () => {
56
56
  return 'Lvce-Setup'
57
57
  }
58
58
 
59
- export const version = '0.118.22'
59
+ export const version = '0.118.23'
60
60
 
61
- export const commit = '56b33a7'
61
+ export const commit = '63e81b5'
62
62
 
63
- export const date = '2026-09-29T15:15:25.000Z'
63
+ export const date = '2026-09-29T23:41:14.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', '56b33a7', 'packages', 'preload', 'dist', 'index.js')
5
+ return join(Root.root, 'static', '63e81b5', 'packages', 'preload', 'dist', 'index.js')
6
6
  }