@lvce-editor/shared-process 0.17.3 → 0.17.5

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.
@@ -5,6 +5,8 @@ export const State = {
5
5
  TopLevelContent: 1,
6
6
  InsideDoubleQuoteString: 2,
7
7
  InsideLineComment: 3,
8
+ InsideBacktickString: 4,
9
+ AfterKeywordFunc: 5,
8
10
  }
9
11
 
10
12
  /**
@@ -19,7 +21,7 @@ export const TokenType = {
19
21
  String: 50,
20
22
  Numeric: 30,
21
23
  FunctionName: 112,
22
- TypeNamePrimitive: 36,
24
+ TypePrimitive: 36,
23
25
  Text: 117,
24
26
  PunctuationTag: 228,
25
27
  TagName: 118,
@@ -32,6 +34,8 @@ export const TokenType = {
32
34
  VariableName: 952,
33
35
  LanguageConstant: 953,
34
36
  KeywordControl: 954,
37
+ KeywordImport: 955,
38
+ KeywordReturn: 956,
35
39
  }
36
40
 
37
41
  export const TokenMap = {
@@ -41,8 +45,8 @@ export const TokenMap = {
41
45
  [TokenType.Comment]: 'Comment',
42
46
  [TokenType.String]: 'String',
43
47
  [TokenType.Numeric]: 'Numeric',
44
- [TokenType.FunctionName]: 'FunctionName',
45
- [TokenType.TypeNamePrimitive]: 'TypeNamePrimitive',
48
+ [TokenType.FunctionName]: 'Function',
49
+ [TokenType.TypePrimitive]: 'TypePrimitive',
46
50
  [TokenType.Text]: 'Text',
47
51
  [TokenType.PunctuationTag]: 'PunctuationTag',
48
52
  [TokenType.TagName]: 'TagName',
@@ -55,6 +59,8 @@ export const TokenMap = {
55
59
  [TokenType.VariableName]: 'VariableName',
56
60
  [TokenType.LanguageConstant]: 'LanguageConstant',
57
61
  [TokenType.KeywordControl]: 'KeywordControl',
62
+ [TokenType.KeywordImport]: 'KeywordImport',
63
+ [TokenType.KeywordReturn]: 'KeywordReturn',
58
64
  }
59
65
 
60
66
  const RE_WHITESPACE = /^\s+/
@@ -84,7 +90,7 @@ const RE_ROUND_CLOSE = /^\)/
84
90
  const RE_DOT = /^\./
85
91
  const RE_EQUAL_SIGN = /^=/
86
92
  const RE_SINGLE_QUOTE = /^'/
87
- const RE_PUNCTUATION = /^[\(\)=\+\-><\.,\/\*\^\[\]\{\}\|:\;\%]/
93
+ const RE_PUNCTUATION = /^[\(\)=\+\-><\.,\/\*\^\[\]\{\}\|:\;\%!\&\*]/
88
94
  const RE_ANYTHING_UNTIL_END = /^.+/s
89
95
  const RE_START_OF_FUNCTION = /^( )*\(/
90
96
  const RE_COLON_COLON = /^::/
@@ -94,7 +100,7 @@ const RE_SQUARE_OPEN_SQUARE_OPEN = /^\[\[/
94
100
  const RE_SQUARE_CLOSE_SQUARE_CLOSE = /^\]\]/
95
101
  const RE_STRING_MULTILINE_CONTENT = /^.+?(?=\]\]|$)/s
96
102
  const RE_KEYWORD =
97
- /^(?:var|type|true|switch|struct|select|return|range|package|map|interface|import|if|goto|go|for|func|false|default|continue|const|chan|case|break)\b/
103
+ /^(?:var|type|true|switch|struct|select|return|range|package|map|interface|import|if|goto|go|for|func|false|default|continue|const|chan|case|break|nil|else|string|int64|bool)\b/
98
104
  const RE_TEXT = /^.+/s
99
105
  const RE_QUOTE_SINGLE = /^'/
100
106
  const RE_QUOTE_DOUBLE = /^"/
@@ -141,9 +147,11 @@ export const tokenizeLine = (line, lineState) => {
141
147
  token = TokenType.Whitespace
142
148
  state = State.TopLevelContent
143
149
  } else if ((next = part.match(RE_KEYWORD))) {
150
+ state = State.TopLevelContent
144
151
  switch (next[0]) {
145
152
  case 'true':
146
153
  case 'false':
154
+ case 'nil':
147
155
  token = TokenType.LanguageConstant
148
156
  break
149
157
  case 'as':
@@ -162,11 +170,28 @@ export const tokenizeLine = (line, lineState) => {
162
170
  case 'while':
163
171
  token = TokenType.KeywordControl
164
172
  break
173
+ case 'import':
174
+ token = TokenType.KeywordImport
175
+ break
176
+ case 'return':
177
+ token = TokenType.KeywordReturn
178
+ break
179
+ case 'bool':
180
+ case 'string':
181
+ case 'int64':
182
+ token = TokenType.TypePrimitive
183
+ break
184
+ case 'range':
185
+ token = TokenType.FunctionName
186
+ break
187
+ case 'func':
188
+ token = TokenType.Keyword
189
+ state = State.AfterKeywordFunc
190
+ break
165
191
  default:
166
192
  token = TokenType.Keyword
167
193
  break
168
194
  }
169
- state = State.TopLevelContent
170
195
  } else if ((next = part.match(RE_VARIABLE_NAME))) {
171
196
  token = TokenType.VariableName
172
197
  state = State.TopLevelContent
@@ -182,6 +207,9 @@ export const tokenizeLine = (line, lineState) => {
182
207
  } else if ((next = part.match(RE_QUOTE_DOUBLE))) {
183
208
  token = TokenType.Punctuation
184
209
  state = State.InsideDoubleQuoteString
210
+ } else if ((next = part.match(RE_QUOTE_BACKTICK))) {
211
+ token = TokenType.String
212
+ state = State.InsideBacktickString
185
213
  } else if ((next = part.match(RE_TEXT))) {
186
214
  token = TokenType.Text
187
215
  state = State.TopLevelContent
@@ -207,6 +235,23 @@ export const tokenizeLine = (line, lineState) => {
207
235
  throw new Error('no')
208
236
  }
209
237
  break
238
+ case State.InsideBacktickString:
239
+ if ((next = part.match(RE_QUOTE_BACKTICK))) {
240
+ token = TokenType.Punctuation
241
+ state = State.TopLevelContent
242
+ } else if ((next = part.match(RE_STRING_BACKTICK_QUOTE_CONTENT))) {
243
+ token = TokenType.String
244
+ state = State.InsideBacktickString
245
+ } else if ((next = part.match(RE_STRING_ESCAPE))) {
246
+ token = TokenType.String
247
+ state = State.InsideBacktickString
248
+ } else if ((next = part.match(RE_BACKSLASH))) {
249
+ token = TokenType.String
250
+ state = State.InsideBacktickString
251
+ } else {
252
+ throw new Error('no')
253
+ }
254
+ break
210
255
  case State.InsideLineComment:
211
256
  if ((next = part.match(RE_TEXT))) {
212
257
  token = TokenType.Comment
@@ -215,6 +260,26 @@ export const tokenizeLine = (line, lineState) => {
215
260
  throw new Error('no')
216
261
  }
217
262
  break
263
+ case State.AfterKeywordFunc:
264
+ if ((next = part.match(RE_WHITESPACE))) {
265
+ token = TokenType.Whitespace
266
+ state = State.AfterKeywordFunc
267
+ } else if ((next = part.match(RE_VARIABLE_NAME))) {
268
+ token = TokenType.FunctionName
269
+ state = State.TopLevelContent
270
+ } else if ((next = part.match(RE_LINE_COMMENT))) {
271
+ token = TokenType.Comment
272
+ state = State.AfterKeywordFunc
273
+ } else if ((next = part.match(RE_PUNCTUATION))) {
274
+ token = TokenType.Punctuation
275
+ state = State.TopLevelContent
276
+ } else if ((next = part.match(RE_ANYTHING_UNTIL_END))) {
277
+ token = TokenType.Text
278
+ state = State.TopLevelContent
279
+ } else {
280
+ throw new Error(`no`)
281
+ }
282
+ break
218
283
  default:
219
284
  state
220
285
  throw new Error('no')
@@ -147,7 +147,7 @@ const RE_REGEX =
147
147
  const RE_VARIABLE_NAME_SPECIAL = /\p{L}/u
148
148
  const RE_VARIABLE_NAME_SPECIAL_2 = /./u
149
149
  const RE_BUILTIN_CLASS =
150
- /^(?:Array|Object|Promise|ArrayBuffer|URL|URLSearchParams|WebSocket|FileSystemHandle|Function|StorageEvent|MessageEvent|MessageChannel|Int32Array|Boolean|String|Error|Set|RegExp|Map|WeakMap|RangeError|Date|Headers|Response|Request|Buffer|MessagePort|FileHandle|X509Certificate|Blob|HTMLElement|HTMLFormElement)\b/
150
+ /^(?:Array|Object|Promise|ArrayBuffer|URL|URLSearchParams|WebSocket|FileSystemHandle|Function|StorageEvent|MessageEvent|MessageChannel|Int32Array|Boolean|String|Error|Set|RegExp|Map|WeakMap|RangeError|Date|Headers|Response|Request|Buffer|MessagePort|FileHandle|X509Certificate|Blob|HTMLElement|HTMLFormElement|Symbol|WeakSet|DataView)\b/
151
151
 
152
152
  const RE_PROPERTY_NAME = /^[a-z]\w*(?=\s*\:)/
153
153
  const RE_PROPERTY_NAME_FUNCTION = /^[a-z]\w*(?=\s*\()/
@@ -499,7 +499,7 @@ export const tokenizeLine = (line, lineState) => {
499
499
  state = State.InsideBacktickString
500
500
  } else if ((next = part.match(RE_BACKSLASH))) {
501
501
  token = TokenType.String
502
- state = State.InsideDoubleQuoteString
502
+ state = State.InsideBacktickString
503
503
  } else if ((next = part.match(RE_DOLLAR))) {
504
504
  token = TokenType.String
505
505
  state = State.InsideBacktickString
@@ -49,10 +49,10 @@ const RE_ANYTHING_UNTIL_CLOSE_BRACE = /^[^\}]+/
49
49
  const RE_QUOTE_DOUBLE = /^"/
50
50
  const RE_STRING_DOUBLE_QUOTE_CONTENT = /^[^"]+/
51
51
  const RE_KEYWORD =
52
- /^(?:while|when|var|val|typeof|typealias|try|true|throw|this|super|return|package|object|null|is|interface|in|if|fun|for|false|else|do|continue|class|break|as)\b/
52
+ /^(?:while|when|var|val|typeof|typealias|try|true|throw|this|super|return|package|object|null|is|interface|in|if|fun|for|false|else|do|continue|class|break|as|enum|String)\b/
53
53
 
54
- const RE_VARIABLE_NAME = /^[a-zA-Z]+/
55
- const RE_PUNCTUATION = /^[:,;\{\}\[\]\.=\(\)<>]/
54
+ const RE_VARIABLE_NAME = /^[a-zA-Z\_\$]+/
55
+ const RE_PUNCTUATION = /^[:,;\{\}\[\]\.=\(\)<>\-]/
56
56
  const RE_NUMERIC = /^\d+/
57
57
 
58
58
  export const initialLineState = {
@@ -62,12 +62,19 @@ export const initialLineState = {
62
62
 
63
63
  export const hasArrayReturn = true
64
64
 
65
+ /**
66
+ *
67
+ * @param {any} lineStateA
68
+ * @param {*} lineStateB
69
+ * @returns
70
+ */
65
71
  export const isEqualLineState = (lineStateA, lineStateB) => {
66
72
  return lineStateA.state === lineStateB.state
67
73
  }
68
74
 
69
75
  /**
70
76
  * @param {string} line
77
+ * @param {any} lineState
71
78
  */
72
79
  export const tokenizeLine = (line, lineState) => {
73
80
  let next = null
@@ -75,6 +75,7 @@ export const State = {
75
75
  InsideSingleQuoteString: 16,
76
76
  AfterFunctionNameInsideArguments: 17,
77
77
  AfterKeywordImport: 18,
78
+ AfterLessVariableName: 19,
78
79
  }
79
80
 
80
81
  export const initialLineState = {
@@ -127,6 +128,7 @@ const RE_ANYTHING_BUT_CURLY = /^[^\{\}]+/s
127
128
  const RE_LINE_COMMENT = /\/\/.*/
128
129
  const RE_NESTED_SELECTOR = /^[\w\.\-\s]+(?=\s*(?:\{|,))/
129
130
  const RE_AMPERSAND = /^\&/
131
+ const RE_LESS_VARIABLE_NAME = /^@[\w\-]+(?=\:)/
130
132
 
131
133
  /**
132
134
  * @param {string} line
@@ -167,6 +169,9 @@ export const tokenizeLine = (line, lineState) => {
167
169
  } else if ((next = part.match(RE_SQUARE_OPEN))) {
168
170
  token = TokenType.Punctuation
169
171
  state = State.InsideAttributeSelector
172
+ } else if ((next = part.match(RE_LESS_VARIABLE_NAME))) {
173
+ token = TokenType.Variable
174
+ state = State.AfterLessVariableName
170
175
  } else if ((next = part.match(RE_QUERY))) {
171
176
  switch (next[0]) {
172
177
  case '@font-face':
@@ -565,6 +570,26 @@ export const tokenizeLine = (line, lineState) => {
565
570
  throw new Error('no')
566
571
  }
567
572
  break
573
+ case State.AfterLessVariableName:
574
+ if ((next = part.match(RE_COLON))) {
575
+ token = TokenType.Punctuation
576
+ state = State.AfterLessVariableName
577
+ } else if ((next = part.match(RE_WHITESPACE))) {
578
+ token = TokenType.Whitespace
579
+ state = State.AfterLessVariableName
580
+ } else if ((next = part.match(RE_NUMERIC))) {
581
+ token = TokenType.Numeric
582
+ state = State.AfterLessVariableName
583
+ } else if ((next = part.match(RE_SEMICOLON))) {
584
+ token = TokenType.Punctuation
585
+ state = stack.pop() || State.TopLevelContent
586
+ } else if ((next = part.match(RE_PROPERTY_VALUE))) {
587
+ token = TokenType.CssPropertyValue
588
+ state = State.AfterLessVariableName
589
+ } else {
590
+ throw new Error('no')
591
+ }
592
+ break
568
593
  default:
569
594
  console.log({ state, line })
570
595
  throw new Error('no')
@@ -62,13 +62,15 @@ const RE_ANYTHING_UNTIL_CLOSE_BRACE = /^[^\}]+/
62
62
  const RE_QUOTE_DOUBLE = /^"/
63
63
  const RE_STRING_DOUBLE_QUOTE_CONTENT = /^[^"]+/
64
64
  const RE_KEYWORD =
65
- /^(?:case|continue|default|die|no|else|elsif|eval|exit|for|foreach|given|goto|if|last|next|push|redo|require|return|select|shift|sub|switch|unless|until|use|wait|when|while)\b/
65
+ /^(?:case|continue|default|die|my|no|else|elsif|eval|exit|for|foreach|given|goto|if|last|next|push|print|redo|require|return|select|shift|sub|switch|unless|unshift|until|use|wait|when|while)\b/
66
66
  const RE_STRING_SINGLE_QUOTE_CONTENT = /^[^']+/
67
67
  const RE_VARIABLE_NAME = /^[$a-zA-Z\_@%]+/
68
- const RE_PUNCTUATION = /^[:,;\{\}\[\]\.=\(\)<>\\\-\?]/
68
+ const RE_PUNCTUATION =
69
+ /^[:,;\{\}\[\]\.=\(\)<>\\\-\?~\|\/\[\\*\$\]^!&\+\{\}\(\)]/
69
70
  const RE_NUMERIC = /^\d+/
70
71
  const RE_QUOTE_BACKTICK = /^`/
71
72
  const RE_QUOTE_SINGLE = /^'/
73
+ const RE_FUNCTION_NAME = /^\w+(?=\s*\()/
72
74
 
73
75
  export const initialLineState = {
74
76
  state: State.TopLevelContent,
@@ -120,10 +122,12 @@ export const tokenizeLine = (line, lineState) => {
120
122
  token = TokenType.KeywordReturn
121
123
  break
122
124
  case 'shift':
125
+ case 'unshift':
123
126
  case 'push':
124
127
  case 'eval':
125
128
  case 'exit':
126
129
  case 'die':
130
+ case 'print':
127
131
  token = TokenType.Function
128
132
  break
129
133
  default:
@@ -134,6 +138,9 @@ export const tokenizeLine = (line, lineState) => {
134
138
  } else if ((next = part.match(RE_PUNCTUATION))) {
135
139
  token = TokenType.Punctuation
136
140
  state = State.TopLevelContent
141
+ } else if ((next = part.match(RE_FUNCTION_NAME))) {
142
+ token = TokenType.Function
143
+ state = State.TopLevelContent
137
144
  } else if ((next = part.match(RE_VARIABLE_NAME))) {
138
145
  token = TokenType.VariableName
139
146
  state = State.TopLevelContent
@@ -153,6 +153,7 @@ export const tokenizeLine = (line, lineState) => {
153
153
  case 'break':
154
154
  case 'pass':
155
155
  case 'assert':
156
+ case 'is':
156
157
  token = TokenType.KeywordControl
157
158
  break
158
159
  case 'or':
@@ -74,17 +74,17 @@ const RE_STRING_DOUBLE_QUOTE_CONTENT = /^[^"\\]+/
74
74
  const RE_STRING_SINGLE_QUOTE_CONTENT = /^[^']+/
75
75
  const RE_STRING_BACKTICK_QUOTE_CONTENT = /^[^`]+/
76
76
  const RE_KEYWORD =
77
- /^(?:7z|7za|7zr|Xdialog|alias|anacron|apk|apt-get|ar|asciidoctor|awk|base64|basename|bash|bg|bind|blkid|break|brew|brotli|builtin|bunzip|bunzip2|caller|cargo|case|cat|catdoc|cd|chmod|chown|circleci|clear|cmp|command|compgen|complete|continue|cp|cryptsetup|curl|curl|cut|cygstart|dde-open|defaults|deno|diff|dirname|dirs|disown|do|docker|done|done|dpkg-trigger|dpkg|du|echo|egrep|elif|else|emulate|enable|enlightenment_open|esac|eval|eval_gettext|exec|exit|expr|false|fc|fg|fi|find|for|free|function|fuzzponent|fzf|g\+\+|gatsby|gcc|gcloud|gdbus|getopts|gio|git|gnome-open|google-chrome-beta|google-chrome|grep|groupadd|grub-mount|gs|gulp|gvfs-open|gzip|hash|hdiutil|head|help|hexdump|history|identity|if|ifconfig|in|install-plugin|install|ip|jobs|jq|kbd_mode|kde-open|kdialog|kfmclient|kill|killall|ldconfig|less|let|lha|ln|loadkeys|local|logout|ls|ls|lunzip|lzip|lzma|makepkg|miniunz|miniunzip|mkdir|mktemp|mount|mpicc|mv|node|nohup|npm|npx|open|pacman|pcmanfm|pdftotext|pkg|plutil|pnpm|popd|prezip-bin|printf|println|ps|pushd|pwd|python3|rar|read|readlink|readonly|realpath|return|rm|route|rpm|rsync|sed|set|setfont|sh|sha256sum|shift|shopt|sleep|snap|sort|source|sponge|start-stop-daemon|stty|sudo|suspend|tail|tar|tee|test|texi2dvi|then|times|touch|trap|true|tty|tune2fs|type|ulimit|umask|umask|unalias|unarj|unmkinitramfs|unmount|unrar|unset|unwrapdiff|unzip|unzoo|update-alternatives|update-desktop-database|update-mime-database|useradd|vim|wait|wc|wget|which|while|wp|xargs|xprop|xz|yarn|yum|zenity|zip|zoo|zsh|zstd)\b/
77
+ /^(?:7z|7za|7zr|Xdialog|alias|anacron|apk|apt-get|ar|asciidoctor|awk|base64|basename|bash|bg|bind|blkid|break|brew|brotli|builtin|bunzip|bunzip2|caller|cargo|case|cat|catdoc|cd|chmod|chown|circleci|clear|cmp|command|compgen|complete|composite|continue|convert|cp|cryptsetup|curl|curl|cut|cygstart|dde-open|defaults|deno|diff|dirname|dirs|disown|do|docker|done|done|dpkg-trigger|dpkg|du|echo|egrep|elif|else|emulate|enable|enlightenment_open|esac|eval|eval_gettext|exec|exit|expr|false|fc|fg|fi|find|for|free|function|fuzzponent|fzf|g\+\+|gatsby|gcc|gcloud|gdbus|getopts|gio|git|gnome-open|google-chrome-beta|google-chrome|go|grep|groupadd|grub-mount|gs|gulp|gvfs-open|gzip|hash|hdiutil|head|help|hexdump|history|icotool|identity|if|ifconfig|install-plugin|in|install|ip|jobs|jq|kbd_mode|kde-open|kdialog|kfmclient|kill|killall|killproc|ldconfig|less|let|lha|ln|loadkeys|local|logout|ls|ls|lunzip|lzip|lzma|makepkg|miniunz|miniunzip|mkdir|mktemp|mount|mpicc|mv|node|nohup|npm|npx|open|pacman|paste|pcmanfm|pdftotext|pkg|pkill|plutil|png2icns|pnpm|popd|prezip-bin|print|printf|println|ps|pushd|pwd|python3|rar|read|readlink|readonly|realpath|return|rm|route|rpm|rsvg-convert|rsync|sed|set|setfont|sh|sha256sum|shift|shopt|sleep|snap|sort|source|sponge|start-stop-daemon|stty|sudo|suspend|tail|tar|tee|test|texi2dvi|then|times|touch|trap|true|tty|tune2fs|type|ulimit|umask|umask|unalias|unarj|unmkinitramfs|unmount|unrar|unset|unwrapdiff|unzip|unzoo|update-alternatives|update-desktop-database|update-mime-database|useradd|vim|wait|wc|wget|which|while|wp|xargs|xprop|xunit-viewer|xz|yarn|yum|zenity|zip|zoo|zsh|zstd)\b/
78
78
 
79
79
  const RE_VARIABLE_NAME = /^[a-zA-Z\_\/\-\$][a-zA-Z\_\/\-\$#\d\-]*/
80
80
  const RE_PUNCTUATION = /^[:,;\{\}\[\]\.=\(\)<>\!\|\+\&\>\)]/
81
- const RE_NUMERIC = /^\d+(?=\s|$)/
81
+ const RE_NUMERIC = /^\d+(?=\s|;|$)/
82
82
  const RE_FUNCTION_NAME = /^\w+(?=\s*\()/
83
83
  const RE_EOF_START = /^<<\s*([\w\!]+)/
84
84
  const RE_EOF_CONTENT = /.*/s
85
85
  const RE_STRING_ESCAPE = /^\\./
86
86
  const RE_BACKSLASH_AT_END = /^\\$/
87
- const RE_OR = /\|\|/
87
+ const RE_OR = /^\|\|/
88
88
 
89
89
  export const initialLineState = {
90
90
  state: State.TopLevelContent,
@@ -180,6 +180,8 @@ export const tokenizeLine = (line, lineState) => {
180
180
  case 'command':
181
181
  case 'compgen':
182
182
  case 'complete':
183
+ case 'composite':
184
+ case 'convert':
183
185
  case 'cp':
184
186
  case 'cryptsetup':
185
187
  case 'curl':
@@ -222,6 +224,7 @@ export const tokenizeLine = (line, lineState) => {
222
224
  case 'gio':
223
225
  case 'git':
224
226
  case 'gnome-open':
227
+ case 'go':
225
228
  case 'google-chrome':
226
229
  case 'google-chrome-beta':
227
230
  case 'grep':
@@ -237,6 +240,7 @@ export const tokenizeLine = (line, lineState) => {
237
240
  case 'help':
238
241
  case 'hexdump':
239
242
  case 'history':
243
+ case 'icotool':
240
244
  case 'identity':
241
245
  case 'ifconfig':
242
246
  case 'install':
@@ -250,6 +254,7 @@ export const tokenizeLine = (line, lineState) => {
250
254
  case 'kfmclient':
251
255
  case 'kill':
252
256
  case 'killall':
257
+ case 'killproc':
253
258
  case 'ldconfig':
254
259
  case 'less':
255
260
  case 'lha':
@@ -275,10 +280,13 @@ export const tokenizeLine = (line, lineState) => {
275
280
  case 'npx':
276
281
  case 'open':
277
282
  case 'pacman':
283
+ case 'paste':
278
284
  case 'pcmanfm':
279
285
  case 'pdftotext':
280
286
  case 'pkg':
287
+ case 'pkill':
281
288
  case 'plutil':
289
+ case 'png2icns':
282
290
  case 'pnpm':
283
291
  case 'popd':
284
292
  case 'prezip-bin':
@@ -295,6 +303,7 @@ export const tokenizeLine = (line, lineState) => {
295
303
  case 'rm':
296
304
  case 'route':
297
305
  case 'rpm':
306
+ case 'rsvg-convert':
298
307
  case 'rsync':
299
308
  case 'sed':
300
309
  case 'set':
@@ -346,7 +355,9 @@ export const tokenizeLine = (line, lineState) => {
346
355
  case 'which':
347
356
  case 'wp':
348
357
  case 'xargs':
358
+ case 'Xdialog':
349
359
  case 'xprop':
360
+ case 'xunit-viewer':
350
361
  case 'xz':
351
362
  case 'yarn':
352
363
  case 'yum':
@@ -355,7 +366,7 @@ export const tokenizeLine = (line, lineState) => {
355
366
  case 'zoo':
356
367
  case 'zsh':
357
368
  case 'zstd':
358
- case 'Xdialog':
369
+ case 'print':
359
370
  token = TokenType.Function
360
371
  state = State.AfterFunctionName
361
372
  break
@@ -75,7 +75,8 @@
75
75
  ".tmCommand",
76
76
  ".natvis",
77
77
  ".xcscheme",
78
- ".xcsettings"
78
+ ".xcsettings",
79
+ ".xsl"
79
80
  ],
80
81
  "fileNames": [".project", "resources.grd"],
81
82
  "tokenize": "src/tokenizeXml.js"
@@ -6,8 +6,11 @@
6
6
  "ActivityBarActiveBackground": "#1f2727",
7
7
  "ActivityBarActiveForeground": "rgb(135, 143, 140)",
8
8
 
9
- "BadgeBackground": "#90599b",
10
- "BadgeForeground": "#eeeeee",
9
+ "BadgeBackground": "rgb(160, 63, 155)",
10
+ "BadgeForeground": "#fff",
11
+
12
+ "BadgeSecondaryBackground": "#90599b",
13
+ "BadgeSecondaryForeground": "#eeeeee",
11
14
 
12
15
  "DropDownBackground": "#3c3c3c",
13
16
  "DropDownForeground": "#f0f0f0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/shared-process",
3
- "version": "0.17.3",
3
+ "version": "0.17.5",
4
4
  "description": "Utility package for @lvce-editor/server",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -17,10 +17,10 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@babel/code-frame": "^7.22.10",
20
- "@lvce-editor/extension-host": "0.17.3",
21
- "@lvce-editor/extension-host-helper-process": "0.17.3",
22
- "@lvce-editor/pretty-error": "^0.1.1",
23
- "@lvce-editor/pty-host": "0.17.3",
20
+ "@lvce-editor/extension-host": "0.17.5",
21
+ "@lvce-editor/extension-host-helper-process": "0.17.5",
22
+ "@lvce-editor/pretty-error": "^1.0.0",
23
+ "@lvce-editor/pty-host": "0.17.5",
24
24
  "debug": "^4.3.4",
25
25
  "execa": "^7.2.0",
26
26
  "exit-hook": "^3.2.0",
@@ -162,6 +162,7 @@ export const getModuleId = (commandId) => {
162
162
  case 'Platform.getUserKeyBindingsPath':
163
163
  case 'Platform.getVersion':
164
164
  case 'Platform.setEnvironmentVariables':
165
+ case 'Platform.getProductNameLong':
165
166
  return ModuleId.Platform
166
167
  case 'Preferences.getAll':
167
168
  return ModuleId.Preferences
@@ -25,4 +25,5 @@ export const Commands = {
25
25
  getUserSettingsPath: Platform.getUserSettingsPath,
26
26
  getVersion: Platform.getVersion,
27
27
  setEnvironmentVariables: Platform.setEnvironmentVariables,
28
+ getProductNameLong: Platform.getProductNameLong,
28
29
  }
@@ -169,11 +169,11 @@ export const getSetupName = () => {
169
169
  return 'Lvce-Setup'
170
170
  }
171
171
 
172
- export const version = '0.17.3'
172
+ export const version = '0.17.5'
173
173
 
174
- export const commit = '8dd517b'
174
+ export const commit = '0138fc9'
175
175
 
176
- export const date = '2023-08-12T15:25:18.000Z'
176
+ export const date = '2023-08-16T21:34:45.000Z'
177
177
 
178
178
  export const getVersion = () => {
179
179
  return version
@@ -186,3 +186,9 @@ export const getCommit = () => {
186
186
  export const getDate = () => {
187
187
  return date
188
188
  }
189
+
190
+ export const productNameLong = 'Lvce Editor - OSS'
191
+
192
+ export const getProductNameLong = () => {
193
+ return productNameLong
194
+ }