@selvajs/cli 4.8.0-beta.13 → 4.8.0-beta.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@selvajs/cli",
3
- "version": "4.8.0-beta.13",
3
+ "version": "4.8.0-beta.14",
4
4
  "description": "Scaffold and operate a Selva white-label deployment. `npx @selvajs/cli <dir>` to bootstrap, `selva <cmd>` to manage.",
5
5
  "license": "MIT",
6
6
  "author": "VektorNode",
@@ -280,13 +280,18 @@ function checkPm2Daemon(dir, env) {
280
280
  //
281
281
  // Detected from the filesystem, never by running `pm2 ls`: an invocation with
282
282
  // no live daemon spawns one as a side effect, which doctor must not do (see
283
- // checkPm2Daemon). Installed modules live in `$PM2_HOME/node_modules`.
283
+ // checkPm2Daemon).
284
+ //
285
+ // `$PM2_HOME/modules/<name>`, NOT `node_modules/` — pm2 keeps installed modules
286
+ // in their own tree. Checking the wrong path made this report "not installed"
287
+ // straight after a successful install, so `--fix` offered the same repair every
288
+ // run.
284
289
  function checkPm2LogRotation(dir, env) {
285
290
  const bin = join(dir, 'node_modules', '.bin', env.platform() === 'win32' ? 'pm2.cmd' : 'pm2');
286
291
  if (!env.exists(bin)) return [];
287
292
 
288
293
  const pm2Home = env.env().PM2_HOME ?? join(env.homedir(), '.pm2');
289
- if (env.exists(join(pm2Home, 'node_modules', 'pm2-logrotate'))) {
294
+ if (env.exists(join(pm2Home, 'modules', 'pm2-logrotate'))) {
290
295
  return [green('pm2-logrotate installed — pm2 logs are rotated')];
291
296
  }
292
297