@lvce-editor/shared-process 0.0.8 → 0.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/shared-process",
3
- "version": "0.0.8",
3
+ "version": "0.0.12",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -32,8 +32,8 @@
32
32
  "verror": "^1.10.1",
33
33
  "ws": "^8.8.0",
34
34
  "xdg-basedir": "^5.1.0",
35
- "@lvce-editor/pty-host": "0.0.8",
36
- "@lvce-editor/extension-host": "0.0.8"
35
+ "@lvce-editor/pty-host": "0.0.12",
36
+ "@lvce-editor/extension-host": "0.0.12"
37
37
  },
38
38
  "optionalDependencies": {
39
39
  "electron-clipboard-ex": "^1.3.3",
@@ -178,6 +178,7 @@ const getModuleId = (commandId) => {
178
178
  case 'Platform.getUserSettingsPath':
179
179
  case 'Platform.getRecentlyOpenedPath':
180
180
  case 'Platform.getCacheDir':
181
+ case 'Platform.setEnvironmentVariables':
181
182
  return MODULE_PLATFORM
182
183
  case 'Terminal.create':
183
184
  case 'Terminal.dispose':
@@ -1,6 +1,7 @@
1
1
  import * as Command from '../Command/Command.js'
2
2
  import * as Platform from '../Platform/Platform.js'
3
3
 
4
+ // prettier-ignore
4
5
  export const __initialize__ = () => {
5
6
  Command.register('Platform.getConfigDir', Platform.getConfigDir)
6
7
  Command.register('Platform.getAppDir', Platform.getAppDir)
@@ -15,4 +16,6 @@ export const __initialize__ = () => {
15
16
  Command.register('Platform.getUserSettingsPath', Platform.getUserSettingsPath)
16
17
  Command.register('Platform.getRecentlyOpenedPath', Platform.getRecentlyOpenedPath)
17
18
  Command.register('Platform.getCacheDir', Platform.getCacheDir)
19
+ Command.register('Platform.getCacheDir', Platform.getCacheDir)
20
+ Command.register('Platform.setEnvironmentVariables', Platform.setEnvironmentVariables)
18
21
  }
@@ -109,5 +109,11 @@ export const getRecentlyOpenedPath = () => {
109
109
  }
110
110
 
111
111
  export const getDefaultSettingsPath = () => {
112
- return Path.join(getAppDir(), 'static', 'config', 'defaultSettings.json')
112
+ return Path.join(Root.root, 'config', 'defaultSettings.json')
113
+ }
114
+
115
+ export const setEnvironmentVariables = (variables) => {
116
+ for (const [key, value] of Object.entries(variables)) {
117
+ process.env[key] = value
118
+ }
113
119
  }