@lvce-editor/shared-process 0.34.13 → 0.35.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.34.13",
3
+ "version": "0.35.0",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@lvce-editor/assert": "^1.3.0",
21
- "@lvce-editor/extension-host-helper-process": "0.34.13",
21
+ "@lvce-editor/extension-host-helper-process": "0.35.0",
22
22
  "@lvce-editor/ipc": "^11.0.1",
23
23
  "@lvce-editor/json-rpc": "^4.1.0",
24
24
  "@lvce-editor/jsonc-parser": "^1.4.0",
@@ -31,11 +31,11 @@
31
31
  "optionalDependencies": {
32
32
  "@lvce-editor/network-process": "^2.0.0",
33
33
  "@lvce-editor/preload": "^1.4.0",
34
- "@lvce-editor/search-process": "^2.0.0",
34
+ "@lvce-editor/search-process": "^3.0.0",
35
35
  "@lvce-editor/typescript-compile-process": "^1.3.0",
36
36
  "@lvce-editor/pty-host": "^2.0.0",
37
37
  "@lvce-editor/embeds-process": "^1.5.0",
38
- "@lvce-editor/preview-process": "^3.6.0",
38
+ "@lvce-editor/preview-process": "^3.8.1",
39
39
  "open": "^10.1.0",
40
40
  "tail": "^2.2.6",
41
41
  "tmp-promise": "^3.0.3",
@@ -20,6 +20,9 @@ const getManifestSrc = () => {
20
20
  return [`manifest-src 'self'`];
21
21
  };
22
22
  const getFrameAncestors = () => {
23
+ if (IsGitpod.isGitpod) {
24
+ return [`frame-ancestors: *.gitpod.io`];
25
+ }
23
26
  return [`frame-ancestors 'none'`];
24
27
  };
25
28
  export const value = GetContentSecurityPolicy.getContentSecurityPolicy([
@@ -24,6 +24,7 @@ export const Commands = {
24
24
  mkdir: FileSystem.mkdir,
25
25
  readDirWithFileTypes: FileSystem.readDirWithFileTypes,
26
26
  readFile: FileSystem.readFile,
27
+ readFileAsBuffer: FileSystem.readFileAsBuffer,
27
28
  remove: FileSystem.remove,
28
29
  rename: FileSystem.rename,
29
30
  stat: FileSystem.stat,
@@ -51,6 +51,19 @@ export const readFile = async (path, encoding = EncodingType.Utf8) => {
51
51
  throw new VError(error, `Failed to read file "${path}"`);
52
52
  }
53
53
  };
54
+ export const readFileAsBuffer = async (path) => {
55
+ try {
56
+ Assert.string(path);
57
+ const content = await fs.readFile(path);
58
+ return content;
59
+ }
60
+ catch (error) {
61
+ if (IsEnoentError.isEnoentError(error)) {
62
+ throw new FileNotFoundError(path);
63
+ }
64
+ throw new VError(error, `Failed to read file "${path}"`);
65
+ }
66
+ };
54
67
  /**
55
68
  *
56
69
  * @param {string} path
@@ -139,6 +139,7 @@ export const getModuleId = (commandId) => {
139
139
  case 'FileSystem.mkdir':
140
140
  case 'FileSystem.readDirWithFileTypes':
141
141
  case 'FileSystem.readFile':
142
+ case 'FileSystem.readFileAsBuffer':
142
143
  case 'FileSystem.remove':
143
144
  case 'FileSystem.rename':
144
145
  case 'FileSystem.writeFile':
@@ -41,9 +41,9 @@ export const getAppImageName = () => {
41
41
  export const getSetupName = () => {
42
42
  return 'Lvce-Setup';
43
43
  };
44
- export const version = '0.34.13';
45
- export const commit = '1b0e0ab';
46
- export const date = '2024-09-26T20:09:31.000Z';
44
+ export const version = '0.35.0';
45
+ export const commit = '9a56bb4';
46
+ export const date = '2024-09-28T14:52:15.000Z';
47
47
  export const getVersion = () => {
48
48
  return version;
49
49
  };