@lvce-editor/shared-process 0.15.25 → 0.15.26

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.
@@ -220,6 +220,9 @@ export const tokenizeLine = (line, lineState) => {
220
220
  } else if ((next = part.match(RE_CURLY_OPEN))) {
221
221
  token = TokenType.CurlyOpen
222
222
  state = State.InsideSelector
223
+ } else if ((next = part.match(RE_SELECTOR_CLASS))) {
224
+ token = TokenType.CssSelectorClass
225
+ state = State.AfterSelector
223
226
  } else if ((next = part.match(RE_SELECTOR))) {
224
227
  token = TokenType.CssSelector
225
228
  state = State.AfterSelector
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/shared-process",
3
- "version": "0.15.25",
3
+ "version": "0.15.26",
4
4
  "description": "Utility package for @lvce-editor/server",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -17,9 +17,9 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@babel/code-frame": "^7.21.4",
20
- "@lvce-editor/extension-host": "0.15.25",
21
- "@lvce-editor/extension-host-helper-process": "0.15.25",
22
- "@lvce-editor/pty-host": "0.15.25",
20
+ "@lvce-editor/extension-host": "0.15.26",
21
+ "@lvce-editor/extension-host-helper-process": "0.15.26",
22
+ "@lvce-editor/pty-host": "0.15.26",
23
23
  "debug": "^4.3.4",
24
24
  "execa": "^7.1.1",
25
25
  "exit-hook": "^3.2.0",
@@ -3,9 +3,10 @@ export const CharacterDevice = 2
3
3
  export const Directory = 3
4
4
  export const DirectoryExpanded = 4
5
5
  export const DirectoryExpanding = 5
6
- export const File = 6
7
- export const Socket = 7
8
- export const Symlink = 8
9
- export const SymLinkFile = 9
10
- export const SymLinkFolder = 10
11
- export const Unknown = 11
6
+ export const Fifo = 6
7
+ export const File = 7
8
+ export const Socket = 8
9
+ export const Symlink = 9
10
+ export const SymLinkFile = 10
11
+ export const SymLinkFolder = 11
12
+ export const Unknown = 12
@@ -22,6 +22,8 @@ export const getDirentType = (dirent) => {
22
22
  if (dirent.isCharacterDevice()) {
23
23
  return DirentType.CharacterDevice
24
24
  }
25
- console.log({ dirent })
25
+ if (dirent.isFIFO()) {
26
+ return DirentType.Fifo
27
+ }
26
28
  return DirentType.Unknown
27
29
  }
@@ -0,0 +1,17 @@
1
+ import * as ErrorHandling from '../ErrorHandling/ErrorHandling.js'
2
+ import * as ExitCode from '../ExitCode/ExitCode.js'
3
+ import * as Process from '../Process/Process.js'
4
+
5
+ export const handleDisconnect = () => {
6
+ console.info('[shared process] disconnected')
7
+ Process.exit(ExitCode.Success)
8
+ }
9
+
10
+ export const handleSigTerm = () => {
11
+ console.info('[shared-process] sigterm')
12
+ Process.exit(ExitCode.Success)
13
+ }
14
+
15
+ export const handleUncaughtExceptionMonitor = (error) => {
16
+ ErrorHandling.handleUncaughtExceptionMonitor(error)
17
+ }
@@ -1,34 +1,14 @@
1
1
  import * as Command from './parts/Command/Command.js'
2
- import * as ErrorHandling from './parts/ErrorHandling/ErrorHandling.js'
3
- import * as ExitCode from './parts/ExitCode/ExitCode.js'
4
2
  import * as Module from './parts/Module/Module.js'
5
3
  import * as ParentIpc from './parts/ParentIpc/ParentIpc.js'
6
- import * as Process from './parts/Process/Process.js'
4
+ import * as ProcessListeners from './parts/ProcessListeners/ProcessListeners.js'
7
5
  import * as Signal from './parts/Signal/Signal.js'
8
- // TODO handle structure: one shared process multiple extension hosts
9
-
10
- // TODO use named functions here
11
-
12
- const handleDisconnect = () => {
13
- console.info('[shared process] disconnected')
14
- Process.exit(ExitCode.Success)
15
- }
16
-
17
- // const handleBeforeExit = () => {
18
- // console.info('[shared process] will exit now')
19
- // }
20
-
21
- const handleSigTerm = () => {
22
- console.info('[shared-process] sigterm')
23
- Process.exit(ExitCode.Success)
24
- }
25
6
 
26
7
  const main = async () => {
27
8
  Command.setLoad(Module.load)
28
- // process.on('beforeExit', handleBeforeExit)
29
- process.on('disconnect', handleDisconnect)
30
- process.on(Signal.SIGTERM, handleSigTerm)
31
- process.on('uncaughtExceptionMonitor', ErrorHandling.handleUncaughtExceptionMonitor)
9
+ process.on('disconnect', ProcessListeners.handleDisconnect)
10
+ process.on(Signal.SIGTERM, ProcessListeners.handleSigTerm)
11
+ process.on('uncaughtExceptionMonitor', ProcessListeners.handleUncaughtExceptionMonitor)
32
12
  await ParentIpc.listen()
33
13
  }
34
14