@lvce-editor/shared-process 0.91.21 → 0.91.22
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 +2 -2
- package/src/parts/ApplyCustomWorkerPathCliOverride/ApplyCustomWorkerPathCliOverride.js +23 -0
- package/src/parts/BuiltinExtensionsPath/BuiltinExtensionsPath.js +1 -1
- package/src/parts/Platform/Platform.js +3 -3
- package/src/parts/Preferences/Preferences.js +2 -1
- package/src/parts/PreloadUrl/PreloadUrl.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/shared-process",
|
|
3
|
-
"version": "0.91.
|
|
3
|
+
"version": "0.91.22",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@lvce-editor/assert": "1.7.0",
|
|
21
21
|
"@lvce-editor/auth-process": "1.10.0",
|
|
22
|
-
"@lvce-editor/extension-host-helper-process": "0.91.
|
|
22
|
+
"@lvce-editor/extension-host-helper-process": "0.91.22",
|
|
23
23
|
"@lvce-editor/ipc": "16.4.0",
|
|
24
24
|
"@lvce-editor/json-rpc": "8.3.0",
|
|
25
25
|
"@lvce-editor/jsonc-parser": "1.5.0",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as Process from '../Process/Process.js'
|
|
2
|
+
|
|
3
|
+
const disableCustomWorkerPathsFlag = '--disable-custom-worker-paths'
|
|
4
|
+
|
|
5
|
+
const workerPathSettingsWithoutWorkerInName = new Set(['develop.languageModelsViewPath', 'develop.runningExtensionsViewPath'])
|
|
6
|
+
|
|
7
|
+
const isCustomWorkerPathSetting = (key) => {
|
|
8
|
+
const isDevelopmentSetting = key.startsWith('develop.') || key.startsWith('developer.')
|
|
9
|
+
return isDevelopmentSetting && (key.endsWith('WorkerPath') || workerPathSettingsWithoutWorkerInName.has(key))
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const applyCustomWorkerPathCliOverride = (preferences) => {
|
|
13
|
+
if (!Process.argv.includes(disableCustomWorkerPathsFlag)) {
|
|
14
|
+
return preferences
|
|
15
|
+
}
|
|
16
|
+
const filteredPreferences = { ...preferences }
|
|
17
|
+
for (const key of Object.keys(filteredPreferences)) {
|
|
18
|
+
if (isCustomWorkerPathSetting(key)) {
|
|
19
|
+
delete filteredPreferences[key]
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return filteredPreferences
|
|
23
|
+
}
|
|
@@ -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', '
|
|
6
|
+
const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', '169c488', 'extensions')
|
|
7
7
|
return builtinExtensionsPath
|
|
8
8
|
}
|
|
@@ -61,11 +61,11 @@ export const getSetupName = () => {
|
|
|
61
61
|
return 'Lvce-Setup'
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
export const version = '0.91.
|
|
64
|
+
export const version = '0.91.22'
|
|
65
65
|
|
|
66
|
-
export const commit = '
|
|
66
|
+
export const commit = '169c488'
|
|
67
67
|
|
|
68
|
-
export const date = '2026-07-
|
|
68
|
+
export const date = '2026-07-18T09:02:45.000Z'
|
|
69
69
|
|
|
70
70
|
export const getVersion = () => {
|
|
71
71
|
return version
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as ApplyCustomWorkerPathCliOverride from '../ApplyCustomWorkerPathCliOverride/ApplyCustomWorkerPathCliOverride.js'
|
|
1
2
|
import * as IsEnoentError from '../IsEnoentError/IsEnoentError.js'
|
|
2
3
|
import * as JsoncFile from '../JsoncFile/JsoncFile.js'
|
|
3
4
|
import * as Logger from '../Logger/Logger.js'
|
|
@@ -81,7 +82,7 @@ export const getAll = async () => {
|
|
|
81
82
|
// } catch {
|
|
82
83
|
// // ignore
|
|
83
84
|
// }
|
|
84
|
-
return preferences
|
|
85
|
+
return ApplyCustomWorkerPathCliOverride.applyCustomWorkerPathCliOverride(preferences)
|
|
85
86
|
} catch (error) {
|
|
86
87
|
throw new VError(error, 'Failed to get all preferences')
|
|
87
88
|
}
|
|
@@ -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', '
|
|
5
|
+
return join(Root.root, 'static', '169c488', 'packages', 'preload', 'dist', 'index.js')
|
|
6
6
|
}
|