@magnetoagents/cli 0.1.0 → 0.1.1

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/cli.js +4 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -658,7 +658,10 @@ function isEntrypoint() {
658
658
  if (!invoked)
659
659
  return false;
660
660
  try {
661
- return path.resolve(invoked) === fileURLToPath(import.meta.url);
661
+ // npm installs bins as SYMLINKS (node_modules/.bin/magneto dist/cli.js);
662
+ // path.resolve() does not follow them, so realpath both sides or the CLI
663
+ // silently no-ops on every installed invocation (0.1.0 regression).
664
+ return fs.realpathSync(invoked) === fs.realpathSync(fileURLToPath(import.meta.url));
662
665
  }
663
666
  catch {
664
667
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magnetoagents/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Magneto CLI — drive computers via sk_live_* keys against /api/v1",
5
5
  "type": "module",
6
6
  "bin": {