@lvce-editor/process-explorer 3.3.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.
Files changed (2) hide show
  1. package/dist/index.js +20 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -127,7 +127,10 @@ const getRemoteRootProcessId = async (childProcessId = process.ppid) => {
127
127
  return process.ppid;
128
128
  }
129
129
  };
130
- const getMainProcessId = (includeElectronData = true, childProcessId = process.ppid) => {
130
+ const getMainProcessId = ({
131
+ childProcessId = process.ppid,
132
+ includeElectronData = true
133
+ } = {}) => {
131
134
  if (includeElectronData) {
132
135
  return Promise.resolve(process.ppid);
133
136
  }
@@ -296,6 +299,9 @@ const getFallbackPatternName = cmd => {
296
299
  return fallbackProcessNamePatterns.find(pattern => pattern.matches(cmd))?.name || '';
297
300
  };
298
301
 
302
+ const includesPackagePath = (cmd, packageName) => {
303
+ return cmd.includes(`@lvce-editor/${packageName}/`) || cmd.includes(`@lvce-editor\\${packageName}\\`);
304
+ };
299
305
  const processNamePatterns = [{
300
306
  matches: cmd => cmd.includes('--type=zygote'),
301
307
  name: 'zygote'
@@ -305,12 +311,24 @@ const processNamePatterns = [{
305
311
  }, {
306
312
  matches: cmd => cmd.includes('extensionHostMain.js'),
307
313
  name: 'extension-host'
314
+ }, {
315
+ matches: cmd => includesPackagePath(cmd, 'file-system-process'),
316
+ name: 'file-system-process'
317
+ }, {
318
+ matches: cmd => includesPackagePath(cmd, 'file-watcher-process'),
319
+ name: 'file-watcher-process'
320
+ }, {
321
+ matches: cmd => includesPackagePath(cmd, 'typescript-compile-process'),
322
+ name: 'typescript-compile-process'
308
323
  }, {
309
324
  matches: cmd => cmd.includes('ptyHostMain.js'),
310
325
  name: 'pty-host'
311
326
  }, {
312
- matches: cmd => cmd.includes('--lvce-window-kind=process-explorer'),
327
+ matches: cmd => cmd.includes('--lvce-window-kind=process-explorer') || cmd.includes('processExplorerMain.ts') || cmd.includes('processExplorerMain.js') || cmd.includes('processExplorer.js'),
313
328
  name: 'process-explorer'
329
+ }, {
330
+ matches: cmd => cmd.includes('sharedProcessMain.js'),
331
+ name: 'shared-process'
314
332
  }];
315
333
 
316
334
  const getPatternName = cmd => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/process-explorer",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
4
4
  "description": "Process Explorer",
5
5
  "main": "dist/index.js",
6
6
  "bin": "bin/processExplorer.js",