@lvce-editor/text-search-worker 5.4.0 → 5.5.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.
@@ -695,7 +695,8 @@ const splitLines = lines => {
695
695
  return lines.split(NewLine);
696
696
  };
697
697
  const getCurrentStack = () => {
698
- const currentStack = joinLines(splitLines(new Error().stack || '').slice(2));
698
+ const stackLinesToSkip = 3;
699
+ const currentStack = joinLines(splitLines(new Error().stack || '').slice(stackLinesToSkip));
699
700
  return currentStack;
700
701
  };
701
702
  const getNewLineIndex = (string, startIndex = undefined) => {
@@ -966,6 +967,12 @@ const invokeAndTransfer = (ipc, method, ...params) => {
966
967
  return invokeHelper(ipc, method, params, true);
967
968
  };
968
969
 
970
+ class CommandNotFoundError extends Error {
971
+ constructor(command) {
972
+ super(`Command not found ${command}`);
973
+ this.name = 'CommandNotFoundError';
974
+ }
975
+ }
969
976
  const commands = Object.create(null);
970
977
  const register = commandMap => {
971
978
  Object.assign(commands, commandMap);
@@ -976,7 +983,7 @@ const getCommand = key => {
976
983
  const execute = (command, ...args) => {
977
984
  const fn = getCommand(command);
978
985
  if (!fn) {
979
- throw new Error(`command not found ${command}`);
986
+ throw new CommandNotFoundError(command);
980
987
  }
981
988
  return fn(...args);
982
989
  };
@@ -1217,7 +1224,7 @@ const terminate = () => {
1217
1224
  const User = 1;
1218
1225
  const Script = 2;
1219
1226
 
1220
- const Empty$1 = 0;
1227
+ const Empty = 0;
1221
1228
  const FocusIgnoreFiles = 1012;
1222
1229
  const FocusSearch = 1013;
1223
1230
  const FocusSearchExcludeInput = 1008;
@@ -1451,7 +1458,7 @@ const create = (uid, x, y, width, height, workspacePath, assetDir, itemHeight, v
1451
1458
  workspacePath: workspacePath,
1452
1459
  includeValue: '',
1453
1460
  excludeValue: '',
1454
- focus: Empty$1,
1461
+ focus: Empty,
1455
1462
  loaded: false,
1456
1463
  message: '',
1457
1464
  collapsedPaths: [],
@@ -3540,7 +3547,7 @@ const Actions = 'Actions';
3540
3547
  const Badge = 'Badge';
3541
3548
  const Chevron = 'Chevron';
3542
3549
  const CloseMaskIcon = 'MaskIcon MaskIconClose';
3543
- const Empty = '';
3550
+ const Empty$1 = '';
3544
3551
  const FileIcon = 'FileIcon';
3545
3552
  const FocusOutline = 'FocusOutline';
3546
3553
  const Grow = 'Grow';
@@ -3599,7 +3606,7 @@ const ClassNames = {
3599
3606
  Badge,
3600
3607
  Chevron,
3601
3608
  CloseMaskIcon,
3602
- Empty,
3609
+ Empty: Empty$1,
3603
3610
  FileIcon,
3604
3611
  FocusOutline,
3605
3612
  Grow,
@@ -4829,7 +4836,7 @@ const getSearchFocusKey = key => {
4829
4836
  case ToggleReplace:
4830
4837
  return FocusToggleReplace;
4831
4838
  default:
4832
- return Empty$1;
4839
+ return Empty;
4833
4840
  }
4834
4841
  };
4835
4842
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/text-search-worker",
3
- "version": "5.4.0",
3
+ "version": "5.5.0",
4
4
  "description": "Text Search Worker",
5
5
  "keywords": [
6
6
  "text-search"