@lvce-editor/file-search-worker 3.2.0 → 3.4.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.
@@ -54,27 +54,6 @@ class VError extends Error {
54
54
  }
55
55
  }
56
56
 
57
- const walkValue = (value, transferrables, isTransferrable) => {
58
- if (!value) {
59
- return;
60
- }
61
- if (isTransferrable(value)) {
62
- transferrables.push(value);
63
- return;
64
- }
65
- if (Array.isArray(value)) {
66
- for (const item of value) {
67
- walkValue(item, transferrables, isTransferrable);
68
- }
69
- return;
70
- }
71
- if (typeof value === 'object') {
72
- for (const property of Object.values(value)) {
73
- walkValue(property, transferrables, isTransferrable);
74
- }
75
- return;
76
- }
77
- };
78
57
  const isMessagePort = value => {
79
58
  return value && value instanceof MessagePort;
80
59
  };
@@ -99,6 +78,27 @@ const isTransferrable = value => {
99
78
  }
100
79
  return false;
101
80
  };
81
+ const walkValue = (value, transferrables, isTransferrable) => {
82
+ if (!value) {
83
+ return;
84
+ }
85
+ if (isTransferrable(value)) {
86
+ transferrables.push(value);
87
+ return;
88
+ }
89
+ if (Array.isArray(value)) {
90
+ for (const item of value) {
91
+ walkValue(item, transferrables, isTransferrable);
92
+ }
93
+ return;
94
+ }
95
+ if (typeof value === 'object') {
96
+ for (const property of Object.values(value)) {
97
+ walkValue(property, transferrables, isTransferrable);
98
+ }
99
+ return;
100
+ }
101
+ };
102
102
  const getTransferrables = value => {
103
103
  const transferrables = [];
104
104
  walkValue(value, transferrables, isTransferrable);
@@ -131,30 +131,35 @@ const NewLine$1 = '\n';
131
131
  const joinLines$1 = lines => {
132
132
  return lines.join(NewLine$1);
133
133
  };
134
- const splitLines$2 = lines => {
135
- return lines.split(NewLine$1);
136
- };
137
- const isModuleNotFoundMessage = line => {
138
- return line.includes('[ERR_MODULE_NOT_FOUND]');
134
+ const RE_AT = /^\s+at/;
135
+ const RE_AT_PROMISE_INDEX = /^\s*at async Promise.all \(index \d+\)$/;
136
+ const isNormalStackLine = line => {
137
+ return RE_AT.test(line) && !RE_AT_PROMISE_INDEX.test(line);
139
138
  };
140
- const getModuleNotFoundError = stderr => {
141
- const lines = splitLines$2(stderr);
142
- const messageIndex = lines.findIndex(isModuleNotFoundMessage);
143
- const message = lines[messageIndex];
139
+ const getDetails = lines => {
140
+ const index = lines.findIndex(isNormalStackLine);
141
+ if (index === -1) {
142
+ return {
143
+ actualMessage: joinLines$1(lines),
144
+ rest: []
145
+ };
146
+ }
147
+ let lastIndex = index - 1;
148
+ while (++lastIndex < lines.length) {
149
+ if (!isNormalStackLine(lines[lastIndex])) {
150
+ break;
151
+ }
152
+ }
144
153
  return {
145
- message,
146
- code: ERR_MODULE_NOT_FOUND
154
+ actualMessage: lines[index - 1],
155
+ rest: lines.slice(index, lastIndex)
147
156
  };
148
157
  };
149
- const RE_NATIVE_MODULE_ERROR = /^innerError Error: Cannot find module '.*.node'/;
150
- const RE_NATIVE_MODULE_ERROR_2 = /was compiled against a different Node.js version/;
158
+ const splitLines$2 = lines => {
159
+ return lines.split(NewLine$1);
160
+ };
151
161
  const RE_MESSAGE_CODE_BLOCK_START = /^Error: The module '.*'$/;
152
162
  const RE_MESSAGE_CODE_BLOCK_END = /^\s* at/;
153
- const RE_AT = /^\s+at/;
154
- const RE_AT_PROMISE_INDEX = /^\s*at async Promise.all \(index \d+\)$/;
155
- const isUnhelpfulNativeModuleError = stderr => {
156
- return RE_NATIVE_MODULE_ERROR.test(stderr) && RE_NATIVE_MODULE_ERROR_2.test(stderr);
157
- };
158
163
  const isMessageCodeBlockStartIndex = line => {
159
164
  return RE_MESSAGE_CODE_BLOCK_START.test(line);
160
165
  };
@@ -169,51 +174,46 @@ const getMessageCodeBlock = stderr => {
169
174
  const relevantMessage = relevantLines.join(' ').slice('Error: '.length);
170
175
  return relevantMessage;
171
176
  };
172
- const getNativeModuleErrorMessage = stderr => {
173
- const message = getMessageCodeBlock(stderr);
177
+ const isModuleNotFoundMessage = line => {
178
+ return line.includes('[ERR_MODULE_NOT_FOUND]');
179
+ };
180
+ const getModuleNotFoundError = stderr => {
181
+ const lines = splitLines$2(stderr);
182
+ const messageIndex = lines.findIndex(isModuleNotFoundMessage);
183
+ const message = lines[messageIndex];
174
184
  return {
175
- message: `Incompatible native node module: ${message}`,
176
- code: E_INCOMPATIBLE_NATIVE_MODULE
185
+ message,
186
+ code: ERR_MODULE_NOT_FOUND
177
187
  };
178
188
  };
179
- const isModulesSyntaxError = stderr => {
189
+ const isModuleNotFoundError = stderr => {
180
190
  if (!stderr) {
181
191
  return false;
182
192
  }
183
- return stderr.includes('SyntaxError: Cannot use import statement outside a module');
184
- };
185
- const getModuleSyntaxError = () => {
186
- return {
187
- message: `ES Modules are not supported in electron`,
188
- code: E_MODULES_NOT_SUPPORTED_IN_ELECTRON
189
- };
193
+ return stderr.includes('ERR_MODULE_NOT_FOUND');
190
194
  };
191
- const isModuleNotFoundError = stderr => {
195
+ const isModulesSyntaxError = stderr => {
192
196
  if (!stderr) {
193
197
  return false;
194
198
  }
195
- return stderr.includes('ERR_MODULE_NOT_FOUND');
199
+ return stderr.includes('SyntaxError: Cannot use import statement outside a module');
196
200
  };
197
- const isNormalStackLine = line => {
198
- return RE_AT.test(line) && !RE_AT_PROMISE_INDEX.test(line);
201
+ const RE_NATIVE_MODULE_ERROR = /^innerError Error: Cannot find module '.*.node'/;
202
+ const RE_NATIVE_MODULE_ERROR_2 = /was compiled against a different Node.js version/;
203
+ const isUnhelpfulNativeModuleError = stderr => {
204
+ return RE_NATIVE_MODULE_ERROR.test(stderr) && RE_NATIVE_MODULE_ERROR_2.test(stderr);
199
205
  };
200
- const getDetails = lines => {
201
- const index = lines.findIndex(isNormalStackLine);
202
- if (index === -1) {
203
- return {
204
- actualMessage: joinLines$1(lines),
205
- rest: []
206
- };
207
- }
208
- let lastIndex = index - 1;
209
- while (++lastIndex < lines.length) {
210
- if (!isNormalStackLine(lines[lastIndex])) {
211
- break;
212
- }
213
- }
206
+ const getNativeModuleErrorMessage = stderr => {
207
+ const message = getMessageCodeBlock(stderr);
214
208
  return {
215
- actualMessage: lines[index - 1],
216
- rest: lines.slice(index, lastIndex)
209
+ message: `Incompatible native node module: ${message}`,
210
+ code: E_INCOMPATIBLE_NATIVE_MODULE
211
+ };
212
+ };
213
+ const getModuleSyntaxError = () => {
214
+ return {
215
+ message: `ES Modules are not supported in electron`,
216
+ code: E_MODULES_NOT_SUPPORTED_IN_ELECTRON
217
217
  };
218
218
  };
219
219
  const getHelpfulChildProcessError = (stdout, stderr) => {
@@ -232,7 +232,7 @@ const getHelpfulChildProcessError = (stdout, stderr) => {
232
232
  rest
233
233
  } = getDetails(lines);
234
234
  return {
235
- message: `${actualMessage}`,
235
+ message: actualMessage,
236
236
  code: '',
237
237
  stack: rest
238
238
  };
@@ -267,14 +267,14 @@ const readyMessage = 'ready';
267
267
  const getData$2 = event => {
268
268
  return event.data;
269
269
  };
270
- const listen$6 = () => {
270
+ const listen$7 = () => {
271
271
  // @ts-ignore
272
272
  if (typeof WorkerGlobalScope === 'undefined') {
273
273
  throw new TypeError('module is not in web worker scope');
274
274
  }
275
275
  return globalThis;
276
276
  };
277
- const signal$6 = global => {
277
+ const signal$8 = global => {
278
278
  global.postMessage(readyMessage);
279
279
  };
280
280
  class IpcChildWithModuleWorker extends Ipc {
@@ -300,7 +300,7 @@ class IpcChildWithModuleWorker extends Ipc {
300
300
  this._rawIpc.addEventListener('message', callback);
301
301
  }
302
302
  }
303
- const wrap$d = global => {
303
+ const wrap$f = global => {
304
304
  return new IpcChildWithModuleWorker(global);
305
305
  };
306
306
  const withResolvers = () => {
@@ -309,6 +309,7 @@ const withResolvers = () => {
309
309
  _resolve = resolve;
310
310
  });
311
311
  return {
312
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
312
313
  resolve: _resolve,
313
314
  promise
314
315
  };
@@ -325,10 +326,10 @@ const waitForFirstMessage = async port => {
325
326
  // @ts-ignore
326
327
  return event.data;
327
328
  };
328
- const listen$5 = async () => {
329
- const parentIpcRaw = listen$6();
330
- signal$6(parentIpcRaw);
331
- const parentIpc = wrap$d(parentIpcRaw);
329
+ const listen$6 = async () => {
330
+ const parentIpcRaw = listen$7();
331
+ signal$8(parentIpcRaw);
332
+ const parentIpc = wrap$f(parentIpcRaw);
332
333
  const firstMessage = await waitForFirstMessage(parentIpc);
333
334
  if (firstMessage.method !== 'initialize') {
334
335
  throw new IpcError('unexpected first message');
@@ -347,9 +348,6 @@ const listen$5 = async () => {
347
348
  return globalThis;
348
349
  };
349
350
  class IpcChildWithModuleWorkerAndMessagePort extends Ipc {
350
- constructor(port) {
351
- super(port);
352
- }
353
351
  getData(event) {
354
352
  return getData$2(event);
355
353
  }
@@ -373,13 +371,13 @@ class IpcChildWithModuleWorkerAndMessagePort extends Ipc {
373
371
  this._rawIpc.start();
374
372
  }
375
373
  }
376
- const wrap$c = port => {
374
+ const wrap$e = port => {
377
375
  return new IpcChildWithModuleWorkerAndMessagePort(port);
378
376
  };
379
377
  const IpcChildWithModuleWorkerAndMessagePort$1 = {
380
378
  __proto__: null,
381
- listen: listen$5,
382
- wrap: wrap$c
379
+ listen: listen$6,
380
+ wrap: wrap$e
383
381
  };
384
382
 
385
383
  const Two = '2.0';
@@ -404,9 +402,6 @@ let id = 0;
404
402
  const create$3 = () => {
405
403
  return ++id;
406
404
  };
407
- const warn$1 = (...args) => {
408
- console.warn(...args);
409
- };
410
405
  const registerPromise = () => {
411
406
  const id = create$3();
412
407
  const {
@@ -419,16 +414,6 @@ const registerPromise = () => {
419
414
  promise
420
415
  };
421
416
  };
422
- const resolve = (id, response) => {
423
- const fn = get(id);
424
- if (!fn) {
425
- console.log(response);
426
- warn$1(`callback ${id} may already be disposed`);
427
- return;
428
- }
429
- fn(response);
430
- remove$2(id);
431
- };
432
417
  const create$2 = (method, params) => {
433
418
  const {
434
419
  id,
@@ -576,6 +561,19 @@ const unwrapJsonRpcResult = responseMessage => {
576
561
  }
577
562
  throw new JsonRpcError('unexpected response message');
578
563
  };
564
+ const warn$1 = (...args) => {
565
+ console.warn(...args);
566
+ };
567
+ const resolve = (id, response) => {
568
+ const fn = get(id);
569
+ if (!fn) {
570
+ console.log(response);
571
+ warn$1(`callback ${id} may already be disposed`);
572
+ return;
573
+ }
574
+ fn(response);
575
+ remove$2(id);
576
+ };
579
577
  const E_COMMAND_NOT_FOUND = 'E_COMMAND_NOT_FOUND';
580
578
  const getErrorType = prettyError => {
581
579
  if (prettyError && prettyError.type) {
@@ -745,6 +743,8 @@ const execute$1 = (command, ...args) => {
745
743
 
746
744
  const createRpc = ipc => {
747
745
  const rpc = {
746
+ // @ts-ignore
747
+ ipc,
748
748
  /**
749
749
  * @deprecated
750
750
  */
@@ -771,7 +771,8 @@ const logError = () => {
771
771
  };
772
772
  const handleMessage = event => {
773
773
  const actualRequiresSocket = event?.target?.requiresSocket || requiresSocket;
774
- return handleJsonRpcMessage(event.target, event.data, execute$1, resolve, preparePrettyError, logError, actualRequiresSocket);
774
+ const actualExecute = event?.target?.execute || execute$1;
775
+ return handleJsonRpcMessage(event.target, event.data, actualExecute, resolve, preparePrettyError, logError, actualRequiresSocket);
775
776
  };
776
777
  const handleIpc = ipc => {
777
778
  if ('addEventListener' in ipc) {
@@ -811,6 +812,19 @@ const File$2 = 7;
811
812
 
812
813
  const fileMapUrl = `${assetDir}/config/fileMap.json`;
813
814
 
815
+ const getBlob$2 = async url => {
816
+ try {
817
+ const response = await fetch(url);
818
+ if (!response.ok) {
819
+ throw new Error(response.statusText);
820
+ }
821
+ const text = await response.blob();
822
+ return text;
823
+ } catch (error) {
824
+ throw new VError(error, `Failed to request blob for ${url}`);
825
+ }
826
+ };
827
+
814
828
  const getJson = async url => {
815
829
  try {
816
830
  const response = await fetch(url);
@@ -885,9 +899,9 @@ const readDirWithFileTypes$1 = async uri => {
885
899
  const chmod$1 = () => {
886
900
  throw new Error('[memfs] chmod not implemented');
887
901
  };
888
- const getBlob$1 = async uri => {
889
- const content = await readFile$1(uri);
890
- const blob = new Blob([content]);
902
+ const getBlob$1 = async (uri, type) => {
903
+ const fetchUri = `${assetDir}${uri}`;
904
+ const blob = getBlob$2(fetchUri);
891
905
  return blob;
892
906
  };
893
907
 
@@ -1055,16 +1069,16 @@ const readDirWithFileTypes = uri => {
1055
1069
  }
1056
1070
  return dirents;
1057
1071
  };
1058
- const getBlob = uri => {
1072
+ const getBlob = (uri, type) => {
1059
1073
  const content = readFile(uri);
1060
- const contentType = getContentType(uri);
1074
+ const contentType = type || getContentType(uri);
1061
1075
  const blob = new Blob([content], {
1062
1076
  type: contentType
1063
1077
  });
1064
1078
  return blob;
1065
1079
  };
1066
- const getBlobUrl = uri => {
1067
- const blob = getBlob(uri);
1080
+ const getBlobUrl = (uri, type) => {
1081
+ const blob = getBlob(uri, type);
1068
1082
  const url = URL.createObjectURL(blob);
1069
1083
  return url;
1070
1084
  };
@@ -1654,50 +1668,6 @@ const QuickPickEntriesCustom = {
1654
1668
  state: state$3
1655
1669
  };
1656
1670
 
1657
- const name$7 = 'noop';
1658
- const getPlaceholder$8 = () => {
1659
- return '';
1660
- };
1661
- const getHelpEntries$7 = () => {
1662
- return [];
1663
- };
1664
- const getNoResults$7 = () => {
1665
- return noResults();
1666
- };
1667
- const getPicks$8 = async value => {
1668
- return [];
1669
- };
1670
- const selectPick$8 = async item => {
1671
- return {
1672
- command: Hide
1673
- };
1674
- };
1675
- const getFilterValue$7 = value => {
1676
- return value;
1677
- };
1678
- const getPickFilterValue$3 = pick => {
1679
- return pick;
1680
- };
1681
-
1682
- const QuickPickNoop = {
1683
- __proto__: null,
1684
- getFilterValue: getFilterValue$7,
1685
- getHelpEntries: getHelpEntries$7,
1686
- getNoResults: getNoResults$7,
1687
- getPickFilterValue: getPickFilterValue$3,
1688
- getPicks: getPicks$8,
1689
- getPlaceholder: getPlaceholder$8,
1690
- name: name$7,
1691
- selectPick: selectPick$8
1692
- };
1693
-
1694
- const Command = '>';
1695
- const Symbol$1 = '@';
1696
- const WorkspaceSymbol = '#';
1697
- const GoToLine = ':';
1698
- const View = 'view ';
1699
- const None = '';
1700
-
1701
1671
  const handleError = async (error, notify = true, prefix = '') => {
1702
1672
  console.error(error);
1703
1673
  };
@@ -1713,8 +1683,8 @@ const getAll = () => {
1713
1683
  return state$2.menuEntries;
1714
1684
  };
1715
1685
 
1716
- const name$6 = 'command';
1717
- const getPlaceholder$7 = () => {
1686
+ const name$7 = 'command';
1687
+ const getPlaceholder$8 = () => {
1718
1688
  return typeNameofCommandToRun();
1719
1689
  };
1720
1690
  const helpEntries = () => {
@@ -1726,7 +1696,7 @@ const helpEntries = () => {
1726
1696
  const getLabel$2 = () => {
1727
1697
  return '';
1728
1698
  };
1729
- const getNoResults$6 = () => {
1699
+ const getNoResults$7 = () => {
1730
1700
  return {
1731
1701
  label: noMatchingResults()
1732
1702
  };
@@ -1767,7 +1737,7 @@ const getExtensionPicks = async () => {
1767
1737
 
1768
1738
  // TODO send strings to renderer process only once for next occurrence send uint16array of ids of strings
1769
1739
 
1770
- const getPicks$7 = async () => {
1740
+ const getPicks$8 = async () => {
1771
1741
  const builtinPicks = await getBuiltinPicks();
1772
1742
  const extensionPicks = await getExtensionPicks();
1773
1743
  return [...builtinPicks, ...extensionPicks];
@@ -1804,16 +1774,16 @@ const selectPickExtension = async item => {
1804
1774
  command: Hide
1805
1775
  };
1806
1776
  };
1807
- const selectPick$7 = async item => {
1777
+ const selectPick$8 = async item => {
1808
1778
  if (item.id.startsWith('ext.')) {
1809
1779
  return selectPickExtension(item);
1810
1780
  }
1811
1781
  return selectPickBuiltin(item);
1812
1782
  };
1813
- const getFilterValue$6 = value => {
1783
+ const getFilterValue$7 = value => {
1814
1784
  return value;
1815
1785
  };
1816
- const getPickFilterValue$2 = pick => {
1786
+ const getPickFilterValue$3 = pick => {
1817
1787
  return pick.label;
1818
1788
  };
1819
1789
  const getPickLabel$2 = pick => {
@@ -1825,17 +1795,17 @@ const getPickIcon$2 = () => {
1825
1795
 
1826
1796
  const QuickPickEntriesCommand = {
1827
1797
  __proto__: null,
1828
- getFilterValue: getFilterValue$6,
1798
+ getFilterValue: getFilterValue$7,
1829
1799
  getLabel: getLabel$2,
1830
- getNoResults: getNoResults$6,
1831
- getPickFilterValue: getPickFilterValue$2,
1800
+ getNoResults: getNoResults$7,
1801
+ getPickFilterValue: getPickFilterValue$3,
1832
1802
  getPickIcon: getPickIcon$2,
1833
1803
  getPickLabel: getPickLabel$2,
1834
- getPicks: getPicks$7,
1835
- getPlaceholder: getPlaceholder$7,
1804
+ getPicks: getPicks$8,
1805
+ getPlaceholder: getPlaceholder$8,
1836
1806
  helpEntries,
1837
- name: name$6,
1838
- selectPick: selectPick$7
1807
+ name: name$7,
1808
+ selectPick: selectPick$8
1839
1809
  };
1840
1810
 
1841
1811
  const execute = async (method, ...params) => {
@@ -1911,6 +1881,8 @@ const fromAsync = async asyncIterable => {
1911
1881
  * retrieve the child handles
1912
1882
  *
1913
1883
  */
1884
+
1885
+ // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
1914
1886
  const getChildHandles = async handle => {
1915
1887
  // @ts-ignore
1916
1888
  const handles = await fromAsync(handle.values());
@@ -1948,7 +1920,7 @@ function promisifyRequest(request) {
1948
1920
  request.addEventListener('success', success);
1949
1921
  request.addEventListener('error', error);
1950
1922
  });
1951
- // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This
1923
+ // This mapping exists in reverseTransformCache but doesn't exist in transformCache. This
1952
1924
  // is because we create many promises from a single IDBRequest.
1953
1925
  reverseTransformCache.set(promise, request);
1954
1926
  return promise;
@@ -2279,7 +2251,7 @@ const searchFile$1 = async (path, value, prepare) => {
2279
2251
  const options = {
2280
2252
  ripGrepArgs,
2281
2253
  searchPath: path,
2282
- limit: 9999999
2254
+ limit: 9_999_999
2283
2255
  };
2284
2256
  const stdout = await invoke('SearchFile.searchFile', options);
2285
2257
  const lines = splitLines(stdout);
@@ -2315,8 +2287,8 @@ const searchFile = async (path, value, prepare, assetDir) => {
2315
2287
  return result;
2316
2288
  };
2317
2289
 
2318
- const name$5 = 'file';
2319
- const getPlaceholder$6 = () => {
2290
+ const name$6 = 'file';
2291
+ const getPlaceholder$7 = () => {
2320
2292
  return '';
2321
2293
  };
2322
2294
  const getLabel$1 = () => {
@@ -2324,23 +2296,23 @@ const getLabel$1 = () => {
2324
2296
  };
2325
2297
 
2326
2298
  // TODO help entries should not be here
2327
- const getHelpEntries$6 = () => {
2299
+ const getHelpEntries$7 = () => {
2328
2300
  return [{
2329
2301
  description: goToFile(),
2330
2302
  category: 'global commands'
2331
2303
  }];
2332
2304
  };
2333
- const getNoResults$5 = () => {
2305
+ const getNoResults$6 = () => {
2334
2306
  return {
2335
2307
  label: noMatchingResults()
2336
2308
  };
2337
2309
  };
2338
- const getPicks$6 = async searchValue => {
2310
+ const getPicks$7 = async searchValue => {
2339
2311
  {
2340
2312
  return [];
2341
2313
  }
2342
2314
  };
2343
- const selectPick$6 = async pick => {
2315
+ const selectPick$7 = async pick => {
2344
2316
  if (typeof pick === 'object') {
2345
2317
  pick = pick.pick;
2346
2318
  }
@@ -2351,10 +2323,10 @@ const selectPick$6 = async pick => {
2351
2323
  command: Hide
2352
2324
  };
2353
2325
  };
2354
- const getFilterValue$5 = value => {
2326
+ const getFilterValue$6 = value => {
2355
2327
  return value;
2356
2328
  };
2357
- const getPickFilterValue$1 = pick => {
2329
+ const getPickFilterValue$2 = pick => {
2358
2330
  if (typeof pick === 'object') {
2359
2331
  pick = pick.pick;
2360
2332
  }
@@ -2389,33 +2361,33 @@ const isPrepared$1 = () => {
2389
2361
 
2390
2362
  const QuickPickEntriesFile = {
2391
2363
  __proto__: null,
2392
- getFilterValue: getFilterValue$5,
2393
- getHelpEntries: getHelpEntries$6,
2364
+ getFilterValue: getFilterValue$6,
2365
+ getHelpEntries: getHelpEntries$7,
2394
2366
  getLabel: getLabel$1,
2395
- getNoResults: getNoResults$5,
2367
+ getNoResults: getNoResults$6,
2396
2368
  getPickDescription: getPickDescription$1,
2397
2369
  getPickFileIcon: getPickFileIcon$1,
2398
- getPickFilterValue: getPickFilterValue$1,
2370
+ getPickFilterValue: getPickFilterValue$2,
2399
2371
  getPickIcon: getPickIcon$1,
2400
2372
  getPickLabel: getPickLabel$1,
2401
- getPicks: getPicks$6,
2402
- getPlaceholder: getPlaceholder$6,
2373
+ getPicks: getPicks$7,
2374
+ getPlaceholder: getPlaceholder$7,
2403
2375
  isPrepared: isPrepared$1,
2404
- name: name$5,
2405
- selectPick: selectPick$6
2376
+ name: name$6,
2377
+ selectPick: selectPick$7
2406
2378
  };
2407
2379
 
2408
- const name$4 = 'goToLine';
2409
- const getPlaceholder$5 = () => {
2380
+ const name$5 = 'goToLine';
2381
+ const getPlaceholder$6 = () => {
2410
2382
  return '';
2411
2383
  };
2412
- const getHelpEntries$5 = () => {
2384
+ const getHelpEntries$6 = () => {
2413
2385
  return [];
2414
2386
  };
2415
- const getNoResults$4 = () => {
2387
+ const getNoResults$5 = () => {
2416
2388
  return undefined;
2417
2389
  };
2418
- const getPicks$5 = async () => {
2390
+ const getPicks$6 = async () => {
2419
2391
  const picks = [{
2420
2392
  label: '1'
2421
2393
  }, {
@@ -2431,7 +2403,7 @@ const getPicks$5 = async () => {
2431
2403
  }];
2432
2404
  return picks;
2433
2405
  };
2434
- const selectPick$5 = async item => {
2406
+ const selectPick$6 = async item => {
2435
2407
  const rowIndex = Number.parseInt(item.label);
2436
2408
  const position = {
2437
2409
  rowIndex,
@@ -2443,15 +2415,52 @@ const selectPick$5 = async item => {
2443
2415
  command: Hide
2444
2416
  };
2445
2417
  };
2446
- const getFilterValue$4 = value => {
2418
+ const getFilterValue$5 = value => {
2447
2419
  return value;
2448
2420
  };
2449
2421
 
2450
2422
  const QuickPickEntriesGoToLine = {
2423
+ __proto__: null,
2424
+ getFilterValue: getFilterValue$5,
2425
+ getHelpEntries: getHelpEntries$6,
2426
+ getNoResults: getNoResults$5,
2427
+ getPicks: getPicks$6,
2428
+ getPlaceholder: getPlaceholder$6,
2429
+ name: name$5,
2430
+ selectPick: selectPick$6
2431
+ };
2432
+
2433
+ const name$4 = 'noop';
2434
+ const getPlaceholder$5 = () => {
2435
+ return '';
2436
+ };
2437
+ const getHelpEntries$5 = () => {
2438
+ return [];
2439
+ };
2440
+ const getNoResults$4 = () => {
2441
+ return noResults();
2442
+ };
2443
+ const getPicks$5 = async value => {
2444
+ return [];
2445
+ };
2446
+ const selectPick$5 = async item => {
2447
+ return {
2448
+ command: Hide
2449
+ };
2450
+ };
2451
+ const getFilterValue$4 = value => {
2452
+ return value;
2453
+ };
2454
+ const getPickFilterValue$1 = pick => {
2455
+ return pick;
2456
+ };
2457
+
2458
+ const QuickPickNoop = {
2451
2459
  __proto__: null,
2452
2460
  getFilterValue: getFilterValue$4,
2453
2461
  getHelpEntries: getHelpEntries$5,
2454
2462
  getNoResults: getNoResults$4,
2463
+ getPickFilterValue: getPickFilterValue$1,
2455
2464
  getPicks: getPicks$5,
2456
2465
  getPlaceholder: getPlaceholder$5,
2457
2466
  name: name$4,
@@ -2563,6 +2572,13 @@ const QuickPickEntriesWorkspaceSymbol = {
2563
2572
  selectPick: selectPick$2
2564
2573
  };
2565
2574
 
2575
+ const Command = '>';
2576
+ const Symbol$1 = '@';
2577
+ const WorkspaceSymbol = '#';
2578
+ const GoToLine = ':';
2579
+ const View = 'view ';
2580
+ const None = '';
2581
+
2566
2582
  // TODO avoid global variable
2567
2583
 
2568
2584
  const state = {
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@lvce-editor/file-search-worker",
3
- "version": "3.2.0",
3
+ "version": "3.4.0",
4
4
  "description": "",
5
- "main": "dist/fileSearchWorkerMain.js",
6
- "type": "module",
7
5
  "keywords": [
8
6
  "text-search"
9
7
  ],
10
- "author": "Lvce Editor",
11
- "license": "MIT",
12
8
  "repository": {
13
9
  "type": "git",
14
10
  "url": "git+https://github.com/lvce-editor/file-search-worker.git"
15
- }
11
+ },
12
+ "license": "MIT",
13
+ "author": "Lvce Editor",
14
+ "type": "module",
15
+ "main": "dist/fileSearchWorkerMain.js"
16
16
  }