openkitt 0.1.7 → 0.1.9

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 +13 -3
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -2800,7 +2800,7 @@ var {
2800
2800
  var import_picocolors4 = __toESM(require_picocolors(), 1);
2801
2801
  import { createInterface, emitKeypressEvents } from "node:readline";
2802
2802
  import { stdin as input, stdout as output } from "node:process";
2803
- import { existsSync as existsSync6, mkdirSync as mkdirSync5, readFileSync as readFileSync6, writeFileSync as writeFileSync5 } from "node:fs";
2803
+ import { existsSync as existsSync6, mkdirSync as mkdirSync5, readFileSync as readFileSync6, writeFileSync as writeFileSync5, realpathSync } from "node:fs";
2804
2804
  import { homedir as homedir3 } from "node:os";
2805
2805
  import { basename, join as join6 } from "node:path";
2806
2806
  import { pathToFileURL } from "node:url";
@@ -3391,7 +3391,7 @@ function readManifest(workspaceDir) {
3391
3391
  // package.json
3392
3392
  var package_default = {
3393
3393
  name: "openkitt",
3394
- version: "0.1.7",
3394
+ version: "0.1.9",
3395
3395
  description: "AI-powered monorepo scaffolding CLI",
3396
3396
  keywords: [
3397
3397
  "cli",
@@ -3780,6 +3780,11 @@ async function startRepl(context) {
3780
3780
  });
3781
3781
  }
3782
3782
  async function main() {
3783
+ if (process.argv.includes("--version") || process.argv.includes("-v")) {
3784
+ process.stdout.write(APP_VERSION + `
3785
+ `, () => process.exit(0));
3786
+ return;
3787
+ }
3783
3788
  const program2 = createProgram();
3784
3789
  program2.parse();
3785
3790
  const options = program2.opts();
@@ -3805,7 +3810,12 @@ function isDirectExecution() {
3805
3810
  if (!entryPoint) {
3806
3811
  return false;
3807
3812
  }
3808
- return import.meta.url === pathToFileURL(entryPoint).href;
3813
+ try {
3814
+ const realEntry = pathToFileURL(realpathSync(entryPoint)).href;
3815
+ return import.meta.url === realEntry;
3816
+ } catch {
3817
+ return import.meta.url === pathToFileURL(entryPoint).href;
3818
+ }
3809
3819
  }
3810
3820
  if (isDirectExecution()) {
3811
3821
  main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openkitt",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "AI-powered monorepo scaffolding CLI",
5
5
  "keywords": [
6
6
  "cli",