@lvce-editor/shared-process 0.110.10 → 0.110.12
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/config/defaultSettings.json +1 -0
- package/package.json +2 -2
- package/src/parts/BuiltinExtensionsPath/BuiltinExtensionsPath.js +1 -1
- package/src/parts/Module/Module.js +0 -4
- package/src/parts/ModuleId/ModuleId.js +0 -2
- package/src/parts/ModuleMap/ModuleMap.js +0 -8
- package/src/parts/Platform/Platform.js +3 -3
- package/src/parts/PreloadUrl/PreloadUrl.js +1 -1
- package/src/parts/Workers/Workers.json +44 -0
- package/src/parts/ElectronSafeStorage/ElectronSafeStorage.ipc.js +0 -9
- package/src/parts/ElectronSafeStorage/ElectronSafeStorage.js +0 -16
- package/src/parts/SecretStorage/SecretStorage.ipc.js +0 -9
- package/src/parts/SecretStorage/SecretStorage.js +0 -71
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/shared-process",
|
|
3
|
-
"version": "0.110.
|
|
3
|
+
"version": "0.110.12",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"optionalDependencies": {
|
|
32
32
|
"@lvce-editor/auth-process": "1.17.0",
|
|
33
|
-
"@lvce-editor/embeds-process": "4.
|
|
33
|
+
"@lvce-editor/embeds-process": "4.20.0",
|
|
34
34
|
"@lvce-editor/file-system-process": "5.15.1",
|
|
35
35
|
"@lvce-editor/file-watcher-process": "4.14.0",
|
|
36
36
|
"@lvce-editor/network-process": "5.2.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', '
|
|
6
|
+
const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', 'c48848a', 'extensions')
|
|
7
7
|
return builtinExtensionsPath
|
|
8
8
|
}
|
|
@@ -44,8 +44,6 @@ export const load = (moduleId) => {
|
|
|
44
44
|
return import('../ElectronPowerSaveBlocker/ElectronPowerSaveBlocker.ipc.js')
|
|
45
45
|
case ModuleId.ElectronProcess:
|
|
46
46
|
return import('../ElectronProcess/ElectronProcess.ipc.js')
|
|
47
|
-
case ModuleId.ElectronSafeStorage:
|
|
48
|
-
return import('../ElectronSafeStorage/ElectronSafeStorage.ipc.js')
|
|
49
47
|
case ModuleId.ElectronWindowAbout:
|
|
50
48
|
return import('../ElectronWindowAbout/ElectronWindowAbout.ipc.js')
|
|
51
49
|
case ModuleId.ElectronWindowProcessExplorer:
|
|
@@ -140,8 +138,6 @@ export const load = (moduleId) => {
|
|
|
140
138
|
return import('../RecentlyOpened/RecentlyOpened.ipc.js')
|
|
141
139
|
case ModuleId.Screen:
|
|
142
140
|
return import('../Screen/Screen.ipc.js')
|
|
143
|
-
case ModuleId.SecretStorage:
|
|
144
|
-
return import('../SecretStorage/SecretStorage.ipc.js')
|
|
145
141
|
case ModuleId.SendMessagePortToMainProcess:
|
|
146
142
|
return import('../SendMessagePortToMainProcess/SendMessagePortToMainProcess.ipc.js')
|
|
147
143
|
case ModuleId.TemporaryMessagePort:
|
|
@@ -42,7 +42,6 @@ export const ElectronClipBoard = 43
|
|
|
42
42
|
export const ProcessId = 44
|
|
43
43
|
export const ElectronNetLog = 45
|
|
44
44
|
export const OpenExternal = 46
|
|
45
|
-
export const ElectronSafeStorage = 47
|
|
46
45
|
export const ElectronDeveloper = 100
|
|
47
46
|
export const ElectronProcess = 48
|
|
48
47
|
export const ElectronContextMenu = 49
|
|
@@ -76,7 +75,6 @@ export const PlatformPaths = 84
|
|
|
76
75
|
export const HandleMessagePortForAuthProcess = 86
|
|
77
76
|
export const LanguageServer = 87
|
|
78
77
|
export const SendMessagePortToMainProcess = 88
|
|
79
|
-
export const SecretStorage = 89
|
|
80
78
|
export const FirefoxCookieImport = 91
|
|
81
79
|
export const IpcTrace = 92
|
|
82
80
|
export const HandleMessagePortForExtensionNodeProcess = 93
|
|
@@ -73,10 +73,6 @@ export const getModuleId = (commandId) => {
|
|
|
73
73
|
case 'ElectronProcess.writeStderr':
|
|
74
74
|
case 'ElectronProcess.writeStdout':
|
|
75
75
|
return ModuleId.ElectronProcess
|
|
76
|
-
case 'ElectronSafeStorage.decryptString':
|
|
77
|
-
case 'ElectronSafeStorage.encryptString':
|
|
78
|
-
case 'ElectronSafeStorage.isEncryptionAvailable':
|
|
79
|
-
return ModuleId.ElectronSafeStorage
|
|
80
76
|
case 'ElectronWindow.close':
|
|
81
77
|
case 'ElectronWindow.focus':
|
|
82
78
|
case 'ElectronWindow.getZoom':
|
|
@@ -287,10 +283,6 @@ export const getModuleId = (commandId) => {
|
|
|
287
283
|
case 'Screen.getHeight':
|
|
288
284
|
case 'Screen.getWidth':
|
|
289
285
|
return ModuleId.Screen
|
|
290
|
-
case 'SecretStorage.delete':
|
|
291
|
-
case 'SecretStorage.get':
|
|
292
|
-
case 'SecretStorage.store':
|
|
293
|
-
return ModuleId.SecretStorage
|
|
294
286
|
case 'SendMessagePortToMainProcess.sendMessagePortToMainProcess':
|
|
295
287
|
return ModuleId.SendMessagePortToMainProcess
|
|
296
288
|
case 'TemporaryMessagePort.getPortTuple2':
|
|
@@ -61,11 +61,11 @@ export const getSetupName = () => {
|
|
|
61
61
|
return 'Lvce-Setup'
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
export const version = '0.110.
|
|
64
|
+
export const version = '0.110.12'
|
|
65
65
|
|
|
66
|
-
export const commit = '
|
|
66
|
+
export const commit = 'c48848a'
|
|
67
67
|
|
|
68
|
-
export const date = '2026-08-
|
|
68
|
+
export const date = '2026-08-27T16:56:46.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', '
|
|
5
|
+
return join(Root.root, 'static', 'c48848a', 'packages', 'preload', 'dist', 'index.js')
|
|
6
6
|
}
|
|
@@ -1375,6 +1375,50 @@
|
|
|
1375
1375
|
"renderComparison": "emptyCommands"
|
|
1376
1376
|
}
|
|
1377
1377
|
},
|
|
1378
|
+
{
|
|
1379
|
+
"id": "secretsView",
|
|
1380
|
+
"fileName": "secretsViewWorkerMain.js",
|
|
1381
|
+
"contentSecurityPolicy": ["default-src 'none'"],
|
|
1382
|
+
"defaultPath": "/packages/renderer-worker/node_modules/@lvce-editor/secrets-view/dist/secretsViewWorkerMain.js",
|
|
1383
|
+
"productionPath": "/packages/secrets-view/dist/secretsViewWorkerMain.js",
|
|
1384
|
+
"settingName": "develop.secretsViewPath",
|
|
1385
|
+
"hotReloadCommand": "",
|
|
1386
|
+
"viewlet": {
|
|
1387
|
+
"name": "Secrets",
|
|
1388
|
+
"title": "Secrets",
|
|
1389
|
+
"css": ["/css/parts/Button.css", "/css/parts/InputBox.css", "/css/parts/ViewletSecrets.css"],
|
|
1390
|
+
"state": {
|
|
1391
|
+
"idKey": "uid",
|
|
1392
|
+
"fields": ["uri", "x", "y", "width", "height"],
|
|
1393
|
+
"defaults": { "title": "Secrets" }
|
|
1394
|
+
},
|
|
1395
|
+
"commandPrefix": "SecretsView",
|
|
1396
|
+
"methods": {
|
|
1397
|
+
"create": {
|
|
1398
|
+
"name": "SecretsView.create",
|
|
1399
|
+
"parameters": [
|
|
1400
|
+
{ "source": "state", "name": "uid" }, { "source": "state", "name": "uri" }, { "source": "state", "name": "x" },
|
|
1401
|
+
{ "source": "state", "name": "y" }, { "source": "state", "name": "width" }, { "source": "state", "name": "height" }
|
|
1402
|
+
]
|
|
1403
|
+
},
|
|
1404
|
+
"loadContent": { "name": "SecretsView.loadContent", "parameters": [{ "source": "state", "name": "uid" }] },
|
|
1405
|
+
"diff": { "name": "SecretsView.diff2", "parameters": [{ "source": "state", "name": "uid" }] },
|
|
1406
|
+
"render": {
|
|
1407
|
+
"name": "SecretsView.render2",
|
|
1408
|
+
"parameters": [{ "source": "state", "name": "uid" }, { "source": "result", "name": "diff" }]
|
|
1409
|
+
},
|
|
1410
|
+
"dispose": { "name": "SecretsView.dispose", "parameters": [{ "source": "state", "name": "uid" }] },
|
|
1411
|
+
"resize": {
|
|
1412
|
+
"name": "SecretsView.resize",
|
|
1413
|
+
"parameters": [{ "source": "state", "name": "uid" }, { "source": "argument", "name": "dimensions" }]
|
|
1414
|
+
},
|
|
1415
|
+
"getCommandIds": { "name": "SecretsView.getCommandIds", "parameters": [] },
|
|
1416
|
+
"renderEventListeners": { "name": "SecretsView.renderEventListeners", "parameters": [] }
|
|
1417
|
+
},
|
|
1418
|
+
"capabilities": { "directRender": true, "events": true, "render": true, "resize": true, "rootRender": true },
|
|
1419
|
+
"renderComparison": "emptyCommands"
|
|
1420
|
+
}
|
|
1421
|
+
},
|
|
1378
1422
|
{
|
|
1379
1423
|
"id": "settingsView",
|
|
1380
1424
|
"fileName": "settingsViewWorkerMain.js",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as ElectronSafeStorage from './ElectronSafeStorage.js'
|
|
2
|
-
|
|
3
|
-
export const name = 'ElectronSafeStorage'
|
|
4
|
-
|
|
5
|
-
export const Commands = {
|
|
6
|
-
decryptString: ElectronSafeStorage.decryptString,
|
|
7
|
-
encryptString: ElectronSafeStorage.encryptString,
|
|
8
|
-
isEncryptionAvailable: ElectronSafeStorage.isEncryptionAvailable,
|
|
9
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as EncodingType from '../EncodingType/EncodingType.js'
|
|
2
|
-
import * as ParentIpc from '../MainProcess/MainProcess.js'
|
|
3
|
-
|
|
4
|
-
export const isEncryptionAvailable = () => {
|
|
5
|
-
return ParentIpc.invoke('ElectronSafeStorage.isEncryptionAvailable')
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export const encryptString = async (plainText) => {
|
|
9
|
-
const buffer = await ParentIpc.invoke('ElectronSafeStorage.encrypt', plainText)
|
|
10
|
-
return buffer.toString(EncodingType.Base64)
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const decryptString = (encrypted) => {
|
|
14
|
-
const buffer = Buffer.from(encrypted, EncodingType.Base64)
|
|
15
|
-
return ParentIpc.invoke('ElectronSafeStorage.decrypt', buffer)
|
|
16
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import * as ElectronSafeStorage from '../ElectronSafeStorage/ElectronSafeStorage.js'
|
|
2
|
-
import { FileNotFoundError } from '../FileNotFoundError/FileNotFoundError.js'
|
|
3
|
-
import * as JsonFile from '../JsonFile/JsonFile.js'
|
|
4
|
-
import * as Path from '../Path/Path.js'
|
|
5
|
-
import * as PlatformPaths from '../PlatformPaths/PlatformPaths.js'
|
|
6
|
-
import * as Queue from '../Queue/Queue.js'
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const queueKey = 'secret-storage'
|
|
11
|
-
|
|
12
|
-
const getStoragePath = () => {
|
|
13
|
-
return Path.join(PlatformPaths.getConfigDir(), 'secrets.json')
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const readStoredSecrets = async () => {
|
|
17
|
-
try {
|
|
18
|
-
const stored = await JsonFile.readJson(getStoragePath())
|
|
19
|
-
if (!stored || typeof stored !== 'object' || Array.isArray(stored)) {
|
|
20
|
-
return {}
|
|
21
|
-
}
|
|
22
|
-
return stored
|
|
23
|
-
} catch (error) {
|
|
24
|
-
if (error instanceof FileNotFoundError) {
|
|
25
|
-
return {}
|
|
26
|
-
}
|
|
27
|
-
throw error
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export const get = async (extensionId, key) => {
|
|
32
|
-
const stored = await readStoredSecrets()
|
|
33
|
-
const encrypted = stored[extensionId]?.[key]
|
|
34
|
-
if (typeof encrypted !== 'string') {
|
|
35
|
-
return undefined
|
|
36
|
-
}
|
|
37
|
-
return ElectronSafeStorage.decryptString(encrypted)
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export const store = async (extensionId, key, value) => {
|
|
41
|
-
await Queue.add(queueKey, async () => {
|
|
42
|
-
const encrypted = await ElectronSafeStorage.encryptString(value)
|
|
43
|
-
const stored = await readStoredSecrets()
|
|
44
|
-
await JsonFile.writeJson(getStoragePath(), {
|
|
45
|
-
...stored,
|
|
46
|
-
[extensionId]: {
|
|
47
|
-
...stored[extensionId],
|
|
48
|
-
[key]: encrypted,
|
|
49
|
-
},
|
|
50
|
-
})
|
|
51
|
-
})
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export const deleteSecret = async (extensionId, key) => {
|
|
55
|
-
await Queue.add(queueKey, async () => {
|
|
56
|
-
const stored = await readStoredSecrets()
|
|
57
|
-
const extensionSecrets = stored[extensionId]
|
|
58
|
-
if (!extensionSecrets || typeof extensionSecrets[key] !== 'string') {
|
|
59
|
-
return
|
|
60
|
-
}
|
|
61
|
-
const nextExtensionSecrets = { ...extensionSecrets }
|
|
62
|
-
delete nextExtensionSecrets[key]
|
|
63
|
-
const nextStored = { ...stored }
|
|
64
|
-
if (Object.keys(nextExtensionSecrets).length === 0) {
|
|
65
|
-
delete nextStored[extensionId]
|
|
66
|
-
} else {
|
|
67
|
-
nextStored[extensionId] = nextExtensionSecrets
|
|
68
|
-
}
|
|
69
|
-
await JsonFile.writeJson(getStoragePath(), nextStored)
|
|
70
|
-
})
|
|
71
|
-
}
|