gnosys 5.2.8 → 5.2.11

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/cli.js CHANGED
@@ -4990,5 +4990,31 @@ webCmd
4990
4990
  process.exit(1);
4991
4991
  }
4992
4992
  });
4993
+ // ─── Post-install upgrade nudge ─────────────────────────────────────────
4994
+ // Detects when the CLI version is newer than the last upgrade and shows
4995
+ // a one-time message. Clears itself after `gnosys upgrade` stamps the DB.
4996
+ try {
4997
+ const centralDb = GnosysDB.openCentral();
4998
+ if (centralDb.isAvailable()) {
4999
+ const lastVersion = centralDb.getMeta("app_version");
5000
+ const currentVersion = pkg.version;
5001
+ // Show nudge if: version changed AND this isn't the upgrade command itself
5002
+ const isUpgradeCmd = process.argv.slice(2).some(a => a === "upgrade");
5003
+ if (lastVersion && lastVersion !== currentVersion && !isUpgradeCmd) {
5004
+ console.log("");
5005
+ console.log(` Gnosys updated: v${lastVersion} → v${currentVersion}`);
5006
+ console.log("");
5007
+ console.log(" Run now:");
5008
+ console.log(" gnosys upgrade sync all projects + regenerate dashboard");
5009
+ console.log(" Restart IDE MCP server Cursor: Cmd+Shift+P > MCP: Restart All Servers");
5010
+ console.log(" gnosys status --web open the portfolio dashboard");
5011
+ console.log("");
5012
+ }
5013
+ centralDb.close();
5014
+ }
5015
+ }
5016
+ catch {
5017
+ // non-critical — don't block CLI startup
5018
+ }
4993
5019
  program.parse();
4994
5020
  //# sourceMappingURL=cli.js.map