@lvce-editor/shared-process 0.17.8 → 0.17.10

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.17.8",
3
+ "version": "0.17.10",
4
4
  "description": "Utility package for @lvce-editor/server",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -17,12 +17,13 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@babel/code-frame": "^7.22.10",
20
- "@lvce-editor/extension-host": "0.17.8",
21
- "@lvce-editor/extension-host-helper-process": "0.17.8",
20
+ "@lvce-editor/extension-host": "0.17.10",
21
+ "@lvce-editor/extension-host-helper-process": "0.17.10",
22
22
  "@lvce-editor/pretty-error": "^1.1.0",
23
- "@lvce-editor/pty-host": "0.17.8",
23
+ "@lvce-editor/pty-host": "0.17.10",
24
+ "@lvce-editor/verror": "^1.0.1",
24
25
  "debug": "^4.3.4",
25
- "execa": "^8.0.0",
26
+ "execa": "^8.0.1",
26
27
  "exit-hook": "^3.2.0",
27
28
  "got": "^13.0.0",
28
29
  "is-object": "^1.0.2",
@@ -175,11 +175,11 @@ export const getSetupName = () => {
175
175
  return 'Lvce-Setup'
176
176
  }
177
177
 
178
- export const version = '0.17.8'
178
+ export const version = '0.17.10'
179
179
 
180
- export const commit = '049dc19'
180
+ export const commit = '4042626'
181
181
 
182
- export const date = '2023-08-19T21:19:14.000Z'
182
+ export const date = '2023-08-22T19:31:13.000Z'
183
183
 
184
184
  export const getVersion = () => {
185
185
  return version
@@ -1,27 +1 @@
1
- import * as MergeStacks from '../MergeStacks/MergeStacks.js'
2
- import * as NormalizeErrorLine from '../NormalizeErrorLine/NormalizeErrorLine.js'
3
-
4
- const getCombinedMessage = (error, message) => {
5
- const stringifiedError = NormalizeErrorLine.normalizeLine(`${error}`)
6
- if (message) {
7
- return `${message}: ${stringifiedError}`
8
- }
9
- return stringifiedError
10
- }
11
-
12
- export class VError extends Error {
13
- constructor(error, message) {
14
- const combinedMessage = getCombinedMessage(error, message)
15
- super(combinedMessage)
16
- this.name = 'VError'
17
- if (error instanceof Error) {
18
- this.stack = MergeStacks.mergeStacks(this.stack, error.stack)
19
- }
20
- if (error.codeFrame) {
21
- this.codeFrame = error.codeFrame
22
- }
23
- if (error.code) {
24
- this.code = error.code
25
- }
26
- }
27
- }
1
+ export * from '@lvce-editor/verror'
@@ -1,20 +0,0 @@
1
- import * as GetNewLineIndex from '../GetNewLineIndex/GetNewLineIndex.js'
2
- import * as NormalizeErrorLine from '../NormalizeErrorLine/NormalizeErrorLine.js'
3
-
4
- export const mergeStacks = (parent, child) => {
5
- if (!child) {
6
- return parent
7
- }
8
- const parentNewLineIndex = GetNewLineIndex.getNewLineIndex(parent)
9
- const childNewLineIndex = GetNewLineIndex.getNewLineIndex(child)
10
- if (childNewLineIndex === -1) {
11
- return parent
12
- }
13
- const parentFirstLine = parent.slice(0, parentNewLineIndex)
14
- const childRest = child.slice(childNewLineIndex)
15
- const childFirstLine = NormalizeErrorLine.normalizeLine(child.slice(0, childNewLineIndex))
16
- if (parentFirstLine.includes(childFirstLine)) {
17
- return parentFirstLine + childRest
18
- }
19
- return child
20
- }
@@ -1,9 +0,0 @@
1
- export const normalizeLine = (line) => {
2
- if (line.startsWith('Error: ')) {
3
- return line.slice(`Error: `.length)
4
- }
5
- if (line.startsWith('VError: ')) {
6
- return line.slice(`VError: `.length)
7
- }
8
- return line
9
- }