create-rigorail 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/index.mjs +8 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -9,6 +9,7 @@ import {
9
9
  mkdirSync,
10
10
  readdirSync,
11
11
  readFileSync,
12
+ realpathSync,
12
13
  rmSync,
13
14
  writeFileSync,
14
15
  } from 'node:fs'
@@ -190,10 +191,13 @@ Then open it with your coding agent and start with:
190
191
  Prompts for common tasks: README.md#prompts-for-your-agent`)
191
192
  }
192
193
 
193
- if (
194
- process.argv[1] &&
195
- path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)
196
- )
194
+ // npm runs bins through a node_modules/.bin symlink, so compare real paths.
195
+ const isEntryPoint = (scriptPath) =>
196
+ Boolean(scriptPath) &&
197
+ existsSync(scriptPath) &&
198
+ realpathSync(scriptPath) === realpathSync(fileURLToPath(import.meta.url))
199
+
200
+ if (isEntryPoint(process.argv[1]))
197
201
  main().catch((error) => {
198
202
  console.error(`\n${error instanceof Error ? error.message : error}`)
199
203
  process.exitCode = 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rigorail",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Create a Rigorail project: vibe coding with engineered React frontends for developers and AI coding agents.",
5
5
  "type": "module",
6
6
  "bin": {