Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
chore: move root pm2 to dependencies so npm start survives a production install (#3454)
[._.]/ Adam Eivy70b61f38d70a
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 92a2ee4d00..533b13288d 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -6,6 +6,8 @@- **Three structural cleanups that each removed a way to get something silently wrong.** `buildReviewWithArgs` took seven positionals, with two same-shaped reviewer-name arrays adjacent to each other and two same-shaped per-reviewer lookup maps adjacent to each other — transposing either pair produced a plausible-looking flag string and no error; everything past the reviewer list is now a named options object. The ecosystem-config branch of `streamDetection` nested eight levels deep to probe each PM2 process's vite config, duplicating that loop byte-for-byte in `parseEcosystemFromPath`; both now call the exported `resolveViteConfigPortForProcess`, which owns the gate and the candidate order and has its own tests (the "stray closing brace" flagged in that block turned out to be mis-indentation, not a structural bug). And `client/src/utils/fileUpload.js` no longer re-exports the four network-calling upload helpers it handed off to `services/apiMedia.js` — the real call sites import them from the services module directly, so the pure-helpers module has no reach into the network layer again (#3452).+- **The root `pm2` dependency moved out of the dev-only bucket, because `npm start` launches the production process with it.** The root `start`, `pm2:*` and `dev:stop` scripts all invoke `./node_modules/pm2/bin/pm2`, so an install run with `--omit=dev` (or `NODE_ENV=production`) would have left every one of them with no binary to run. Nothing in the repo installs that way today and `server/package.json` already declares `pm2` as a normal dependency, so this was a latent footgun rather than a live break — but it would have cost someone an afternoon the first time a slimmed Docker or CI install path appeared. The lockfile change is limited to the bucket rename and dropping `"dev": true` from pm2 and its transitives; no versions moved. `scripts/root-runtime-deps.test.js` now derives the rule from the manifest instead of hardcoding pm2 — every package a root script reaches into via `./node_modules/<pkg>/…` has to be a real dependency — so the next root script wired to a dev-only binary fails the suite rather than waiting for a production install path to expose it.+## Fixed- **Replaced a real Tailscale identity with placeholders across tracked files, and added a guard so it can't come back.** A real MagicDNS tailnet suffix, real device names, and a real CGNAT peer IP had been committed across server routes/lib, client lib, several test fixtures, two design-plan docs, and two released changelog entries — ~14 tracked files in a public repo. This violates the repo's own `CLAUDE.md` "Sensitive Data & Privacy" rule, which lists Tailscale node/MagicDNS names and Tailscale/LAN IPs as never-commit categories. Every occurrence is now an obviously-fake placeholder (`example-tailnet.ts.net`, `host-alpha`/`beta`/`gamma`/`delta`, a documented CGNAT test IP), preserving the two-host distinctness some tests relied on. A new `scripts/tailnet-identity-leak.test.js` enumerates *tracked* files via `git grep` and fails the moment a real-looking tailnet host or CGNAT address lands again — whether via a pasted log line, a doc example lifted from a live install, or a copy-pasted test fixture.diff --git a/package-lock.json b/package-lock.jsonindex 32cba674b4..93e65fe2b2 100644--- a/package-lock.json+++ b/package-lock.json@@ -8,7 +8,7 @@"name": "portos","version": "2.38.0","license": "MIT",- "devDependencies": {+ "dependencies": {"pm2": "7.0.3"}},@@ -16,7 +16,6 @@"version": "0.1.81","resolved": "https://registry.npmjs.org/@pm2/blessed/-/blessed-0.1.81.tgz","integrity": "sha512-ZcNHqQjMuNRcQ7Z1zJbFIQZO/BDKV3KbiTckWdfbUaYhj7uNmUwb+FbdDWSCkvxNr9dBJQwvV17o6QBkAvgO0g==",- "dev": true,"license": "MIT","bin": {"blessed": "bin/tput.js"@@ -29,7 +28,6 @@"version": "0.8.1","resolved": "https://registry.npmjs.org/@pm2/js-api/-/js-api-0.8.1.tgz","integrity": "sha512-n9tDOz1ojyDOs05XthEXrLFVQYbbh2oAN19UakLPyEZDrUyEq05h8wIZU8+dNXBQY/KeFlWMLVA76nnX52ofRg==",- "dev": true,"license": "Apache-2","dependencies": {"async": "^2.6.3",@@ -46,7 +44,6 @@"version": "2.6.4","resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz","integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",- "dev": true,"license": "MIT","dependencies": {"lodash": "^4.17.14"@@ -56,7 +53,6 @@"version": "4.3.7","resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz","integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",- "dev": true,"license": "MIT","dependencies": {"ms": "^2.1.3"@@ -74,7 +70,6 @@"version": "1.0.4","resolved": "https://registry.npmjs.org/@pm2/pm2-version-check/-/pm2-version-check-1.0.4.tgz","integrity": "sha512-SXsM27SGH3yTWKc2fKR4SYNxsmnvuBQ9dd6QHtEWmiZ/VqaOYPAIlS8+vMcn27YLtAEBGvNRSh3TPNvtjZgfqA==",- "dev": true,"license": "MIT","dependencies": {"debug": "^4.3.1"@@ -84,14 +79,12 @@"version": "0.23.0","resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz","integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==",- "dev": true,"license": "MIT"},"node_modules/agent-base": {"version": "7.1.4","resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz","integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==",- "dev": true,"license": "MIT","engines": {"node": ">= 14"@@ -101,14 +94,12 @@"version": "0.3.1","resolved": "https://registry.npmjs.org/amp/-/amp-0.3.1.tgz","integrity": "sha512-OwIuC4yZaRogHKiuU5WlMR5Xk/jAcpPtawWL05Gj8Lvm2F6mwoJt4O/bHI+DHwG79vWd+8OFYM4/BzYqyRd3qw==",- "dev": true,"license": "MIT"},"node_modules/amp-message": {"version": "0.1.2","resolved": "https://registry.npmjs.org/amp-message/-/amp-message-0.1.2.tgz","integrity": "sha512-JqutcFwoU1+jhv7ArgW38bqrE+LQdcRv4NxNw0mp0JHQyB6tXesWRjtYKlDgHRY2o3JE5UTaBGUK8kSWUdxWUg==",- "dev": true,"license": "MIT","dependencies": {"amp": "0.3.1"@@ -118,7 +109,6 @@"version": "4.3.0","resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz","integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",- "dev": true,"license": "MIT","dependencies": {"color-convert": "^2.0.1"@@ -134,7 +124,6 @@"version": "4.0.0-node10","resolved": "https://registry.npmjs.org/ansis/-/ansis-4.0.0-node10.tgz","integrity": "sha512-BRrU0Bo1X9dFGw6KgGz6hWrqQuOlVEDOzkb0QSLZY9sXHqA7pNj7yHPVJRz7y/rj4EOJ3d/D5uxH+ee9leYgsg==",- "dev": true,"license": "ISC","engines": {"node": ">=10"@@ -144,7 +133,6 @@"version": "3.1.3","resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz","integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",- "dev": true,"license": "ISC","dependencies": {"normalize-path": "^3.0.0",@@ -158,7 +146,6 @@"version": "2.3.2","resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz","integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",- "dev": true,"license": "MIT","engines": {"node": ">=8.6"@@ -171,14 +158,12 @@"version": "2.0.1","resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz","integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",- "dev": true,"license": "Python-2.0"},"node_modules/ast-types": {"version": "0.13.4","resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz","integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==",- "dev": true,"license": "MIT","dependencies": {"tslib": "^2.0.1"@@ -191,14 +176,12 @@"version": "3.2.6","resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz","integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==",- "dev": true,"license": "MIT"},"node_modules/binary-extensions": {"version": "2.3.0","resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz","integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",- "dev": true,"license": "MIT","engines": {"node": ">=8"@@ -211,7 +194,6 @@"version": "3.0.3","resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz","integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",- "dev": true,"license": "MIT","dependencies": {"fill-range": "^7.1.1"@@ -224,7 +206,6 @@"version": "3.0.0","resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz","integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",- "dev": true,"license": "MIT","dependencies": {"ansi-styles": "^4.1.0",@@ -238,7 +219,6 @@"version": "3.6.0","resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz","integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",- "dev": true,"license": "MIT","dependencies": {"anymatch": "~3.1.2",@@ -263,7 +243,6 @@"version": "2.0.1","resolved": "https://registry.npmjs.org/cli-tableau/-/cli-tableau-2.0.1.tgz","integrity": "sha512-he+WTicka9cl0Fg/y+YyxcN6/bfQ/1O3QmgxRXDhABKqLzvoOSM4fMzp39uMyLBulAFuywD2N7UaoQE7WaADxQ==",- "dev": true,"dependencies": {"chalk": "3.0.0"},@@ -275,7 +254,6 @@"version": "2.0.1","resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz","integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",- "dev": true,"license": "MIT","dependencies": {"color-name": "~1.1.4"@@ -288,28 +266,24 @@"version": "1.1.4","resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz","integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",- "dev": true,"license": "MIT"},"node_modules/commander": {"version": "2.15.1","resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz","integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==",- "dev": true,"license": "MIT"},"node_modules/croner": {"version": "4.1.97","resolved": "https://registry.npmjs.org/croner/-/croner-4.1.97.tgz","integrity": "sha512-/f6gpQuxDaqXu+1kwQYSckUglPaOrHdbIlBAu0YuW8/Cdb45XwXYNUBXg3r/9Mo6n540Kn/smKcZWko5x99KrQ==",- "dev": true,"license": "MIT"},"node_modules/data-uri-to-buffer": {"version": "6.0.2","resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz","integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==",- "dev": true,"license": "MIT","engines": {"node": ">= 14"@@ -319,14 +293,12 @@"version": "1.11.15","resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.15.tgz","integrity": "sha512-MC+DfnSWiM9APs7fpiurHGCoeIx0Gdl6QZBy+5lu8MbYKN5FZEXqOgrundfibdfhGZ15o9hzmZ2xJjZnbvgKXQ==",- "dev": true,"license": "MIT"},"node_modules/debug": {"version": "4.4.3","resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz","integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",- "dev": true,"license": "MIT","dependencies": {"ms": "^2.1.3"@@ -344,7 +316,6 @@"version": "5.0.1","resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz","integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==",- "dev": true,"license": "MIT","dependencies": {"ast-types": "^0.13.4",@@ -359,7 +330,6 @@"version": "2.1.0","resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz","integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==",- "dev": true,"license": "BSD-2-Clause","dependencies": {"esprima": "^4.0.1",@@ -381,7 +351,6 @@"version": "4.0.1","resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz","integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",- "dev": true,"license": "BSD-2-Clause","bin": {"esparse": "bin/esparse.js",@@ -395,7 +364,6 @@"version": "5.3.0","resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz","integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",- "dev": true,"license": "BSD-2-Clause","engines": {"node": ">=4.0"@@ -405,7 +373,6 @@"version": "2.0.3","resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz","integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",- "dev": true,"license": "BSD-2-Clause","engines": {"node": ">=0.10.0"@@ -415,14 +382,12 @@"version": "6.4.9","resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz","integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==",- "dev": true,"license": "MIT"},"node_modules/extrareqp2": {"version": "1.0.0","resolved": "https://registry.npmjs.org/extrareqp2/-/extrareqp2-1.0.0.tgz","integrity": "sha512-Gum0g1QYb6wpPJCVypWP3bbIuaibcFiJcpuPM10YSXp/tzqi84x9PJageob+eN4xVRIOto4wjSGNLyMD54D2xA==",- "dev": true,"license": "MIT","dependencies": {"follow-redirects": "^1.14.0"@@ -432,14 +397,12 @@"version": "3.1.1","resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.1.tgz","integrity": "sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==",- "dev": true,"license": "MIT"},"node_modules/fill-range": {"version": "7.1.1","resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz","integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",- "dev": true,"license": "MIT","dependencies": {"to-regex-range": "^5.0.1"@@ -452,7 +415,6 @@"version": "1.16.0","resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz","integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==",- "dev": true,"funding": [{"type": "individual",@@ -473,7 +435,6 @@"version": "2.3.3","resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz","integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",- "dev": true,"hasInstallScript": true,"license": "MIT","optional": true,@@ -488,7 +449,6 @@"version": "6.0.5","resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.5.tgz","integrity": "sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg==",- "dev": true,"license": "MIT","dependencies": {"basic-ftp": "^5.0.2",@@ -503,7 +463,6 @@"version": "5.3.1","resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.3.1.tgz","integrity": "sha512-bopVNp6ugyA150DDuZfPFdt1KZ5a94ZDiwX4hMgZDzF+GttD80lEy8kj98kbyhLXnPvhtIo93mdnLIjpCAeeOw==",- "dev": true,"license": "MIT","engines": {"node": ">=10.0.0"@@ -513,7 +472,6 @@"version": "5.1.2","resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz","integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",- "dev": true,"license": "ISC","dependencies": {"is-glob": "^4.0.1"@@ -526,7 +484,6 @@"version": "4.0.0","resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz","integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",- "dev": true,"license": "MIT","engines": {"node": ">=8"@@ -536,7 +493,6 @@"version": "7.0.2","resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz","integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==",- "dev": true,"license": "MIT","dependencies": {"agent-base": "^7.1.0",@@ -550,7 +506,6 @@"version": "7.0.6","resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz","integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",- "dev": true,"license": "MIT","dependencies": {"agent-base": "^7.1.2",@@ -564,7 +519,6 @@"version": "10.4.0","resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.4.0.tgz","integrity": "sha512-oSK96Grm3aP6OrS263xVxbNDGVL7rzBtYdpGqlDG8iQdoenDoTs/nkki+DflYbAEE8Xl6o5YxhxlrKvI3nqKXQ==",- "dev": true,"license": "MIT","engines": {"node": ">= 12"@@ -574,7 +528,6 @@"version": "2.1.0","resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz","integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",- "dev": true,"license": "MIT","dependencies": {"binary-extensions": "^2.0.0"@@ -587,7 +540,6 @@"version": "2.1.1","resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz","integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",- "dev": true,"license": "MIT","engines": {"node": ">=0.10.0"@@ -597,7 +549,6 @@"version": "4.0.3","resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz","integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",- "dev": true,"license": "MIT","dependencies": {"is-extglob": "^2.1.1"@@ -610,7 +561,6 @@"version": "7.0.0","resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz","integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",- "dev": true,"license": "MIT","engines": {"node": ">=0.12.0"@@ -620,7 +570,6 @@"version": "4.3.0","resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz","integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==",- "dev": true,"funding": [{"type": "github",@@ -643,21 +592,18 @@"version": "5.0.1","resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz","integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",- "dev": true,"license": "ISC"},"node_modules/lodash": {"version": "4.18.1","resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz","integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==",- "dev": true,"license": "MIT"},"node_modules/lru-cache": {"version": "7.18.3","resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz","integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==",- "dev": true,"license": "ISC","engines": {"node": ">=12"@@ -667,14 +613,12 @@"version": "2.1.3","resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz","integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",- "dev": true,"license": "MIT"},"node_modules/netmask": {"version": "2.1.1","resolved": "https://registry.npmjs.org/netmask/-/netmask-2.1.1.tgz","integrity": "sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA==",- "dev": true,"license": "MIT","engines": {"node": ">= 0.4.0"@@ -684,7 +628,6 @@"version": "3.0.0","resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz","integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",- "dev": true,"license": "MIT","engines": {"node": ">=0.10.0"@@ -694,7 +637,6 @@"version": "7.2.0","resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz","integrity": "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==",- "dev": true,"license": "MIT","dependencies": {"@tootallnate/quickjs-emscripten": "^0.23.0",@@ -714,7 +656,6 @@"version": "7.0.1","resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz","integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==",- "dev": true,"license": "MIT","dependencies": {"degenerator": "^5.0.0",@@ -728,7 +669,6 @@"version": "4.0.1","resolved": "https://registry.npmjs.org/pidusage/-/pidusage-4.0.1.tgz","integrity": "sha512-yCH2dtLHfEBnzlHUJymR/Z1nN2ePG3m392Mv8TFlTP1B0xkpMQNHAnfkY0n2tAi6ceKO6YWhxYfZ96V4vVkh/g==",- "dev": true,"license": "MIT","dependencies": {"safe-buffer": "^5.2.1"@@ -741,7 +681,6 @@"version": "7.0.3","resolved": "https://registry.npmjs.org/pm2/-/pm2-7.0.3.tgz","integrity": "sha512-zRJOdburpb9OEPB0uqoNT8C1Gp7hPJPVy4Kr67XJNuT9UlMQcOt1WXrYQUmwqKPHk8FyauvP1CPhqoCrCaPw0Q==",- "dev": true,"license": "AGPL-3.0","dependencies": {"@pm2/blessed": "0.1.81",@@ -781,7 +720,6 @@"version": "1.0.2","resolved": "https://registry.npmjs.org/pm2-deploy/-/pm2-deploy-1.0.2.tgz","integrity": "sha512-YJx6RXKrVrWaphEYf++EdOOx9EH18vM8RSZN/P1Y+NokTKqYAca/ejXwVLyiEpNju4HPZEk3Y2uZouwMqUlcgg==",- "dev": true,"license": "MIT","dependencies": {"run-series": "^1.1.8",@@ -795,7 +733,6 @@"version": "7.7.2","resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz","integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",- "dev": true,"license": "ISC","bin": {"semver": "bin/semver.js"@@ -808,7 +745,6 @@"version": "6.5.0","resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.5.0.tgz","integrity": "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==",- "dev": true,"license": "MIT","dependencies": {"agent-base": "^7.1.2",@@ -828,14 +764,12 @@"version": "1.1.0","resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz","integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",- "dev": true,"license": "MIT"},"node_modules/readdirp": {"version": "3.6.0","resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz","integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",- "dev": true,"license": "MIT","dependencies": {"picomatch": "^2.2.1"@@ -848,7 +782,6 @@"version": "2.3.2","resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz","integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",- "dev": true,"license": "MIT","engines": {"node": ">=8.6"@@ -861,7 +794,6 @@"version": "1.1.9","resolved": "https://registry.npmjs.org/run-series/-/run-series-1.1.9.tgz","integrity": "sha512-Arc4hUN896vjkqCYrUXquBFtRZdv1PfLbTYP71efP6butxyQ0kWpiNJyAgsxscmQg1cqvHY32/UCBzXedTpU2g==",- "dev": true,"funding": [{"type": "github",@@ -882,7 +814,6 @@"version": "5.2.1","resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz","integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",- "dev": true,"funding": [{"type": "github",@@ -903,7 +834,6 @@"version": "4.2.0","resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz","integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",- "dev": true,"license": "MIT","engines": {"node": ">= 6.0.0",@@ -914,7 +844,6 @@"version": "2.8.8","resolved": "https://registry.npmjs.org/socks/-/socks-2.8.8.tgz","integrity": "sha512-NlGELfPrgX2f1TAAcz0WawlLn+0r3FyhhCRpFFK2CemXenPYvzMWWZINv3eDNo9ucdwme7oCHRY0Jnbs4aIkog==",- "dev": true,"license": "MIT","dependencies": {"ip-address": "^10.1.1",@@ -929,7 +858,6 @@"version": "8.0.5","resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz","integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==",- "dev": true,"license": "MIT","dependencies": {"agent-base": "^7.1.2",@@ -944,7 +872,6 @@"version": "0.6.1","resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz","integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",- "dev": true,"license": "BSD-3-Clause","optional": true,"engines": {@@ -955,7 +882,6 @@"version": "7.2.0","resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz","integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",- "dev": true,"license": "MIT","dependencies": {"has-flag": "^4.0.0"@@ -968,7 +894,6 @@"version": "5.0.1","resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz","integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",- "dev": true,"license": "MIT","dependencies": {"is-number": "^7.0.0"@@ -981,14 +906,12 @@"version": "2.8.1","resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz","integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",- "dev": true,"license": "0BSD"},"node_modules/tv4": {"version": "1.3.0","resolved": "https://registry.npmjs.org/tv4/-/tv4-1.3.0.tgz","integrity": "sha512-afizzfpJgvPr+eDkREK4MxJ/+r8nEEHcmitwgnPUqpaP+FpwQyadnxNoSACbgc/b1LsZYtODGoPiFxQrgJgjvw==",- "dev": true,"license": [{"type": "Public Domain",@@ -1007,7 +930,6 @@"version": "1.0.5","resolved": "https://registry.npmjs.org/tx2/-/tx2-1.0.5.tgz","integrity": "sha512-sJ24w0y03Md/bxzK4FU8J8JveYYUbSs2FViLJ2D/8bytSiyPRbuE3DyL/9UKYXTZlV3yXq0L8GLlhobTnekCVg==",- "dev": true,"license": "MIT","dependencies": {"json-stringify-safe": "^5.0.1"@@ -1017,7 +939,6 @@"version": "8.21.1","resolved": "https://registry.npmjs.org/ws/-/ws-8.21.1.tgz","integrity": "sha512-+0NTnW77fFN/DjQi6k/Sq/Yvk4Sgajw7urW8V+asjXnRgDs9gyGkdb7EzgfhA4goXsRIZKE28fzIXBHEzhuiWw==",- "dev": true,"license": "MIT","engines": {"node": ">=10.0.0"diff --git a/package.json b/package.jsonindex f75d0f4a00..7895787d9e 100644--- a/package.json+++ b/package.json@@ -35,7 +35,7 @@"theme:check": "node scripts/check-themes.js","smoke": "node scripts/smoke-boot.js"},- "devDependencies": {+ "dependencies": {"pm2": "7.0.3"},"overrides": {diff --git a/scripts/root-runtime-deps.test.js b/scripts/root-runtime-deps.test.jsnew file mode 100644index 0000000000..05e2025e15--- /dev/null+++ b/scripts/root-runtime-deps.test.js@@ -0,0 +1,53 @@+import { describe, it, expect } from 'vitest';+import { readFileSync } from 'fs';+import { dirname, join } from 'path';+import { fileURLToPath } from 'url';++// Regression guard for issue #3454: root `pm2` sat in `devDependencies` while+// the root `start` script launched the *production* process with it+// (`node ./node_modules/pm2/bin/pm2 start ecosystem.config.cjs`). An install run+// with `--omit=dev` or `NODE_ENV=production` would have left `npm start`,+// `npm run pm2:*` and `npm run dev:stop` with no binary to execute.+//+// Nothing in this repo installs that way today, so the bug was latent rather+// than live — which is exactly why it needs a guard: the next slimmed Docker+// image or production CI job is where it would surface, far from the commit+// that caused it.+//+// The rule is derived from the manifest rather than hardcoding "pm2": every+// package a root script reaches into via `./node_modules/<pkg>/...` is, by+// definition, needed whenever that script runs, so it must be a real+// `dependency`. Adding a new devDependency-backed root script binary trips this.++const REPO_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');+const rootManifest = JSON.parse(+ readFileSync(join(REPO_ROOT, 'package.json'), 'utf8')+);++// Matches `./node_modules/pkg/...` and `./node_modules/@scope/pkg/...`+const NODE_MODULES_BIN = /\.\/node_modules\/((?:@[^/\s]+\/)?[^/\s]+)/g;++function packagesInvokedByRootScripts() {+ const found = new Set();+ for (const body of Object.values(rootManifest.scripts ?? {})) {+ for (const [, pkg] of body.matchAll(NODE_MODULES_BIN)) found.add(pkg);+ }+ return [...found].sort();+}++describe('root scripts run binaries from `dependencies`, not `devDependencies` (issue #3454)', () => {+ const packages = packagesInvokedByRootScripts();++ it('finds the root-script binaries to verify', () => {+ // Sanity: if the regex stops matching, the assertions below go vacuous.+ expect(packages.length).toBeGreaterThan(0);+ });++ it.each(packages)(+ '%s is a root `dependency` so it survives a production install',+ (pkg) => {+ expect(rootManifest.dependencies ?? {}).toHaveProperty(pkg);+ expect(rootManifest.devDependencies ?? {}).not.toHaveProperty(pkg);+ }+ );+});