@lvce-editor/editor-worker 7.14.0 → 7.15.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.
@@ -638,7 +638,8 @@ const splitLines$1 = lines => {
638
638
  return lines.split(NewLine$1);
639
639
  };
640
640
  const getCurrentStack = () => {
641
- const currentStack = joinLines$1(splitLines$1(new Error().stack || '').slice(2));
641
+ const stackLinesToSkip = 3;
642
+ const currentStack = joinLines$1(splitLines$1(new Error().stack || '').slice(stackLinesToSkip));
642
643
  return currentStack;
643
644
  };
644
645
  const getNewLineIndex = (string, startIndex = undefined) => {
@@ -909,6 +910,12 @@ const invokeAndTransfer$1 = (ipc, method, ...params) => {
909
910
  return invokeHelper(ipc, method, params, true);
910
911
  };
911
912
 
913
+ class CommandNotFoundError extends Error {
914
+ constructor(command) {
915
+ super(`Command not found ${command}`);
916
+ this.name = 'CommandNotFoundError';
917
+ }
918
+ }
912
919
  const commands = Object.create(null);
913
920
  const register = commandMap => {
914
921
  Object.assign(commands, commandMap);
@@ -919,7 +926,7 @@ const getCommand = key => {
919
926
  const execute$1 = (command, ...args) => {
920
927
  const fn = getCommand(command);
921
928
  if (!fn) {
922
- throw new Error(`command not found ${command}`);
929
+ throw new CommandNotFoundError(command);
923
930
  }
924
931
  return fn(...args);
925
932
  };
@@ -976,7 +983,7 @@ const listen$1 = async (module, options) => {
976
983
  const ipc = module.wrap(rawIpc);
977
984
  return ipc;
978
985
  };
979
- const create$d = async ({
986
+ const create$e = async ({
980
987
  commandMap,
981
988
  messagePort,
982
989
  isMessagePortOpen
@@ -994,7 +1001,7 @@ const create$d = async ({
994
1001
  };
995
1002
  const MessagePortRpcParent = {
996
1003
  __proto__: null,
997
- create: create$d
1004
+ create: create$e
998
1005
  };
999
1006
  const create$5$1 = async ({
1000
1007
  commandMap,
@@ -1095,6 +1102,9 @@ const ErrorWorker$1 = 3308;
1095
1102
  const SyntaxHighlightingWorker$1 = 3309;
1096
1103
  const ClipBoardWorker$1 = 3400;
1097
1104
  const ClipBoardProcess$1 = 3401;
1105
+ const ExtensionDetailWorker = 3402;
1106
+ const ProblemsWorker = 3403;
1107
+ const OutputWorker = 7001;
1098
1108
  const RpcId = {
1099
1109
  __proto__: null,
1100
1110
  ClipBoardProcess: ClipBoardProcess$1,
@@ -1106,11 +1116,14 @@ const RpcId = {
1106
1116
  EmbedsProcess: EmbedsProcess$1,
1107
1117
  EmbedsWorker,
1108
1118
  ErrorWorker: ErrorWorker$1,
1119
+ ExtensionDetailWorker,
1109
1120
  ExtensionHostWorker,
1110
1121
  FileSystemProcess: FileSystemProcess$1,
1111
1122
  FileSystemWorker: FileSystemWorker$1,
1112
1123
  MainProcess: MainProcess$1,
1113
1124
  MarkdownWorker: MarkdownWorker$1,
1125
+ OutputWorker,
1126
+ ProblemsWorker,
1114
1127
  RendererProcess: RendererProcess$1,
1115
1128
  RendererWorker: RendererWorker$1,
1116
1129
  SearchProcess: SearchProcess$1,
@@ -3284,6 +3297,7 @@ const characterLeft = (line, columnIndex) => {
3284
3297
  }
3285
3298
  const segmenter = create$8();
3286
3299
  const last = segmenter.at(line, columnIndex - 1);
3300
+ // @ts-ignore
3287
3301
  return columnIndex - last.index;
3288
3302
  };
3289
3303
  const twoCharactersLeft = () => {
@@ -3295,6 +3309,7 @@ const characterRight = (line, columnIndex) => {
3295
3309
  }
3296
3310
  const segmenter = create$8();
3297
3311
  const next = segmenter.at(line, columnIndex);
3312
+ // @ts-ignore
3298
3313
  return next.segment.length;
3299
3314
  };
3300
3315
  const isWhitespace = char => {
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/editor-worker",
3
- "version": "7.14.0",
4
- "description": "",
3
+ "version": "7.15.0",
5
4
  "license": "MIT",
6
5
  "author": "Lvce Editor",
7
6
  "type": "module",