@garygentry/feature-forge 0.1.2 → 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.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  /**
2
3
  * CLI entry & dispatch (spec 07). The installer's process entry point and orchestration
3
4
  * layer: it parses `process.argv` via `node:util.parseArgs`, resolves the target agent set,
package/dist/cli.js CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  /**
2
3
  * CLI entry & dispatch (spec 07). The installer's process entry point and orchestration
3
4
  * layer: it parses `process.argv` via `node:util.parseArgs`, resolves the target agent set,
@@ -11,7 +12,7 @@
11
12
  */
12
13
  import { parseArgs } from "node:util";
13
14
  import process from "node:process";
14
- import { readFileSync } from "node:fs";
15
+ import { readFileSync, realpathSync } from "node:fs";
15
16
  import { pathToFileURL } from "node:url";
16
17
  import * as path from "node:path";
17
18
  import { AGENT_IDS, AGENT_TARGETS, EXIT, err, ok, } from "./types.js";
@@ -495,8 +496,21 @@ function readInstallerVersion() {
495
496
  // 8. Process entry shim
496
497
  // ---------------------------------------------------------------------------
497
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.
498
504
  const entry = process.argv[1];
499
- if (entry !== undefined && import.meta.url === pathToFileURL(entry).href) {
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)) {
500
514
  main(process.argv.slice(2))
501
515
  .then((code) => {
502
516
  process.exitCode = code;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@garygentry/feature-forge",
3
- "version": "0.1.2",
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",