@satori-sh/cli 0.0.10 → 0.0.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.
Files changed (2) hide show
  1. package/dist/index.js +4 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  // src/index.ts
4
4
  import { Command } from "commander";
5
- import { readFileSync } from "fs";
5
+ import { readFileSync, realpathSync } from "fs";
6
6
  import { dirname, join as join2 } from "path";
7
7
  import { fileURLToPath } from "url";
8
8
  import chalk from "chalk";
@@ -393,7 +393,9 @@ ${memoryContext.instruction}`);
393
393
  });
394
394
  program.parse();
395
395
  }
396
- if (process.argv[1] === fileURLToPath(import.meta.url)) {
396
+ var entryPath = process.argv[1] ? realpathSync(process.argv[1]) : "";
397
+ var modulePath = realpathSync(fileURLToPath(import.meta.url));
398
+ if (entryPath === modulePath) {
397
399
  main();
398
400
  }
399
401
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@satori-sh/cli",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "CLI tool for Satori memory server",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",