@garygentry/feature-forge 0.1.3 → 0.1.4
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 +15 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import { parseArgs } from "node:util";
|
|
14
14
|
import process from "node:process";
|
|
15
|
-
import { readFileSync } from "node:fs";
|
|
15
|
+
import { readFileSync, realpathSync } from "node:fs";
|
|
16
16
|
import { pathToFileURL } from "node:url";
|
|
17
17
|
import * as path from "node:path";
|
|
18
18
|
import { AGENT_IDS, AGENT_TARGETS, EXIT, err, ok, } from "./types.js";
|
|
@@ -496,8 +496,21 @@ function readInstallerVersion() {
|
|
|
496
496
|
// 8. Process entry shim
|
|
497
497
|
// ---------------------------------------------------------------------------
|
|
498
498
|
// Only run when invoked as the bin (not when imported by tests / index.ts).
|
|
499
|
+
// npm/npx install the bin as a SYMLINK (…/bin/feature-forge → …/dist/cli.js), so
|
|
500
|
+
// process.argv[1] is the symlink while import.meta.url is the resolved real path —
|
|
501
|
+
// resolve the symlink before comparing, or the entry point silently no-ops under
|
|
502
|
+
// npx / `npm i -g` (the real invocation paths). Fall back to the raw path if argv[1]
|
|
503
|
+
// is not a stat-able file.
|
|
499
504
|
const entry = process.argv[1];
|
|
500
|
-
|
|
505
|
+
function entryHref(p) {
|
|
506
|
+
try {
|
|
507
|
+
return pathToFileURL(realpathSync(p)).href;
|
|
508
|
+
}
|
|
509
|
+
catch {
|
|
510
|
+
return pathToFileURL(p).href;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
if (entry !== undefined && import.meta.url === entryHref(entry)) {
|
|
501
514
|
main(process.argv.slice(2))
|
|
502
515
|
.then((code) => {
|
|
503
516
|
process.exitCode = code;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@garygentry/feature-forge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Cross-agent installer for the feature-forge skill suite — installs the canonical forge pipeline into Claude, Codex, Copilot, Cursor, or Gemini.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|