gitnexus 1.6.6-rc.61 → 1.6.6-rc.62

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/package.json +1 -1
  2. package/scripts/build.js +16 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitnexus",
3
- "version": "1.6.6-rc.61",
3
+ "version": "1.6.6-rc.62",
4
4
  "description": "Graph-powered code intelligence for AI agents. Index any codebase, query via MCP or CLI.",
5
5
  "author": "Abhigyan Patwari",
6
6
  "license": "PolyForm-Noncommercial-1.0.0",
package/scripts/build.js CHANGED
@@ -35,6 +35,22 @@ function getBuildTimeoutMs() {
35
35
 
36
36
  const BUILD_TIMEOUT_MS = getBuildTimeoutMs();
37
37
 
38
+ // Published-package guard: when installed from the npm registry the
39
+ // monorepo sibling `gitnexus-shared` does not exist and `dist/` is
40
+ // already pre-built. Skip the build to avoid a misleading ENOENT
41
+ // crash (#1795).
42
+ if (!fs.existsSync(SHARED_ROOT)) {
43
+ if (fs.existsSync(DIST)) {
44
+ console.log('[build] skipping — dist/ already present (published package).');
45
+ process.exit(0);
46
+ }
47
+ console.error(
48
+ `[build] gitnexus-shared not found at ${SHARED_ROOT} and no dist/ exists.\n` +
49
+ 'Are you running from the monorepo checkout? Run `npm install` from the repo root first.',
50
+ );
51
+ process.exit(1);
52
+ }
53
+
38
54
  // ── 1. Build gitnexus-shared ───────────────────────────────────────
39
55
  console.log('[build] compiling gitnexus-shared…');
40
56
  const tscCmd =