@lvce-editor/shared-process 0.77.11 → 0.78.0

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.77.11",
3
+ "version": "0.78.0",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -18,12 +18,12 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@lvce-editor/assert": "1.5.1",
21
- "@lvce-editor/extension-host-helper-process": "0.77.11",
21
+ "@lvce-editor/extension-host-helper-process": "0.78.0",
22
22
  "@lvce-editor/ipc": "15.0.0",
23
23
  "@lvce-editor/json-rpc": "8.0.0",
24
24
  "@lvce-editor/jsonc-parser": "1.5.0",
25
25
  "@lvce-editor/pretty-error": "2.0.0",
26
- "@lvce-editor/rpc-registry": "9.16.0",
26
+ "@lvce-editor/rpc-registry": "9.17.0",
27
27
  "@lvce-editor/verror": "1.7.0",
28
28
  "is-object": "^1.0.2",
29
29
  "xdg-basedir": "^5.1.0"
@@ -35,7 +35,7 @@
35
35
  "@lvce-editor/network-process": "5.2.0",
36
36
  "@lvce-editor/preload": "1.5.0",
37
37
  "@lvce-editor/preview-process": "11.0.0",
38
- "@lvce-editor/pty-host": "8.0.0",
38
+ "@lvce-editor/pty-host": "8.1.0",
39
39
  "@lvce-editor/search-process": "13.1.0",
40
40
  "@lvce-editor/typescript-compile-process": "5.0.0",
41
41
  "open": "^11.0.0",
@@ -2,6 +2,6 @@ import { join } from 'path';
2
2
  import { fileURLToPath } from 'url';
3
3
  export const getBuiltinExtensionsPath = () => {
4
4
  const staticServerPath = fileURLToPath(import.meta.resolve('@lvce-editor/static-server'));
5
- const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', 'c0b16fe', 'extensions');
5
+ const builtinExtensionsPath = join(staticServerPath, '..', '..', 'static', '5a230ea', 'extensions');
6
6
  return builtinExtensionsPath;
7
7
  };
@@ -8,7 +8,7 @@ export const launchPtyHost = async (method) => {
8
8
  defaultPath: PtyHostPath.ptyHostPath,
9
9
  isElectron: IsElectron.isElectron,
10
10
  name: 'Terminal Process',
11
- settingName: '',
11
+ settingName: 'develop.ptyHostPath',
12
12
  targetRpcId: IpcId.TerminalProcess,
13
13
  });
14
14
  PtyHostState.state.ipc = ipc;
@@ -3,6 +3,8 @@ import * as Assert from '../Assert/Assert.js';
3
3
  /** @type {Record<string, {
4
4
  server: import('node:http').Server | undefined,
5
5
  portPromise: Promise<number> | undefined,
6
+ successHtml: string,
7
+ errorHtml: string,
6
8
  codeQueue: string[],
7
9
  codePromise: Promise<string> | undefined,
8
10
  resolveCode: ((value: string) => void) | undefined,
@@ -14,6 +16,8 @@ const getOrCreateState = (id) => {
14
16
  states[id] = {
15
17
  server: undefined,
16
18
  portPromise: undefined,
19
+ successHtml: '',
20
+ errorHtml: '',
17
21
  codeQueue: [],
18
22
  codePromise: undefined,
19
23
  resolveCode: undefined,
@@ -54,16 +58,22 @@ const getCodeFromRequest = (request) => {
54
58
  };
55
59
  const handleRequest = (id, request, response) => {
56
60
  const state = states[id];
61
+ let html = '';
57
62
  if (state) {
58
63
  const code = getCodeFromRequest(request);
59
64
  if (code) {
60
65
  resolveCode(state, code);
66
+ html = state.successHtml;
67
+ }
68
+ else {
69
+ html = state.errorHtml;
61
70
  }
62
71
  }
63
72
  response.writeHead(200, {
64
- 'Content-Type': 'text/plain; charset=utf-8',
73
+ 'Content-Type': 'text/html; charset=utf-8',
74
+ 'Cache-Control': 'no-store',
65
75
  });
66
- response.end('Authentication completed. You can close this window.');
76
+ response.end(html);
67
77
  };
68
78
  const listen = (server) => {
69
79
  const { promise, resolve, reject } = Promise.withResolvers();
@@ -94,9 +104,13 @@ const getOrCreateCodePromise = (state) => {
94
104
  }
95
105
  return state.codePromise;
96
106
  };
97
- export const create = async (id) => {
107
+ export const create = async (id, successHtml, errorHtml) => {
98
108
  Assert.string(id);
109
+ Assert.string(successHtml);
110
+ Assert.string(errorHtml);
99
111
  const state = getOrCreateState(id);
112
+ state.successHtml = successHtml;
113
+ state.errorHtml = errorHtml;
100
114
  if (state.portPromise) {
101
115
  return state.portPromise;
102
116
  }
@@ -41,9 +41,9 @@ export const getAppImageName = () => {
41
41
  export const getSetupName = () => {
42
42
  return 'Lvce-Setup';
43
43
  };
44
- export const version = '0.77.11';
45
- export const commit = 'c0b16fe';
46
- export const date = '2026-04-06T17:04:59.000Z';
44
+ export const version = '0.78.0';
45
+ export const commit = '5a230ea';
46
+ export const date = '2026-04-09T21:28:44.000Z';
47
47
  export const getVersion = () => {
48
48
  return version;
49
49
  };
@@ -1,5 +1,5 @@
1
1
  import { join } from 'node:path';
2
2
  import * as Root from '../Root/Root.js';
3
3
  export const getPreloadUrl = () => {
4
- return join(Root.root, 'static', 'c0b16fe', 'packages', 'preload', 'dist', 'index.js');
4
+ return join(Root.root, 'static', '5a230ea', 'packages', 'preload', 'dist', 'index.js');
5
5
  };