agenttop 0.10.2 → 0.10.4

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.
package/dist/index.js CHANGED
@@ -364,9 +364,14 @@ var getPackageVersion = async () => {
364
364
  return "0.0.0";
365
365
  }
366
366
  };
367
+ var getNpmPath = () => {
368
+ const nodeDir = dirname(process.execPath);
369
+ return join(nodeDir, "npm");
370
+ };
367
371
  var checkForUpdate = () => new Promise((resolve) => {
372
+ const npm = getNpmPath();
368
373
  getPackageVersion().then((current) => {
369
- execFile("npm", ["view", "agenttop", "version"], { encoding: "utf-8", timeout: 5e3 }, (err, stdout) => {
374
+ execFile(npm, ["view", "agenttop", "version"], { encoding: "utf-8", timeout: 5e3 }, (err, stdout) => {
370
375
  if (err || !stdout) {
371
376
  resolve({ current, latest: current, available: false });
372
377
  return;
@@ -381,8 +386,9 @@ var checkForUpdate = () => new Promise((resolve) => {
381
386
  });
382
387
  });
383
388
  var installUpdate = () => {
389
+ const npm = getNpmPath();
384
390
  return new Promise((resolve, reject) => {
385
- exec("npm install -g agenttop@latest", { timeout: 6e4 }, (err, stdout) => {
391
+ exec(`${npm} install -g agenttop@latest`, { timeout: 6e4 }, (err, stdout) => {
386
392
  if (err) {
387
393
  reject(err);
388
394
  } else {
@@ -525,6 +531,7 @@ var SessionList = React2.memo(
525
531
  {
526
532
  flexDirection: "column",
527
533
  width: SIDEBAR_WIDTH,
534
+ flexShrink: 0,
528
535
  borderStyle: "single",
529
536
  borderColor: focused ? colors.primary : colors.border,
530
537
  overflow: "hidden",