nexarch 0.8.1 → 0.8.3

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.
@@ -489,24 +489,19 @@ function resolveWorkspaceDirs(rootDir, workspaces) {
489
489
  }
490
490
  return dirs;
491
491
  }
492
- // Collect all package.json paths: root + workspace packages + 2-level fallback
492
+ // Collect all package.json paths: root + workspace packages + fallback scans.
493
493
  function findPackageJsonPaths(rootDir) {
494
494
  const paths = [];
495
+ const seen = new Set();
495
496
  const rootPkgPath = join(rootDir, "package.json");
496
- if (!existsSync(rootPkgPath))
497
- return paths;
498
- paths.push(rootPkgPath);
499
- const rootPkg = readRootPackage(rootPkgPath);
500
- if (rootPkg.workspaces) {
501
- // Workspace monorepo: resolve workspace dirs and find their package.json files
502
- for (const wsDir of resolveWorkspaceDirs(rootDir, rootPkg.workspaces)) {
503
- const pkgPath = join(wsDir, "package.json");
504
- if (existsSync(pkgPath))
505
- paths.push(pkgPath);
506
- }
507
- }
508
- else {
509
- // Non-workspace: scan up to 2 levels deep
497
+ const pushPath = (pkgPath) => {
498
+ const norm = pkgPath.replace(/\\/g, "/");
499
+ if (seen.has(norm))
500
+ return;
501
+ seen.add(norm);
502
+ paths.push(pkgPath);
503
+ };
504
+ const scanTwoLevels = () => {
510
505
  try {
511
506
  for (const l1 of readdirSync(rootDir)) {
512
507
  if (SKIP_DIRS.has(l1) || l1.startsWith("."))
@@ -517,7 +512,7 @@ function findPackageJsonPaths(rootDir) {
517
512
  continue;
518
513
  const l1Pkg = join(l1Path, "package.json");
519
514
  if (existsSync(l1Pkg)) {
520
- paths.push(l1Pkg);
515
+ pushPath(l1Pkg);
521
516
  continue;
522
517
  }
523
518
  for (const l2 of readdirSync(l1Path)) {
@@ -529,7 +524,7 @@ function findPackageJsonPaths(rootDir) {
529
524
  continue;
530
525
  const l2Pkg = join(l2Path, "package.json");
531
526
  if (existsSync(l2Pkg))
532
- paths.push(l2Pkg);
527
+ pushPath(l2Pkg);
533
528
  }
534
529
  catch { }
535
530
  }
@@ -538,7 +533,23 @@ function findPackageJsonPaths(rootDir) {
538
533
  }
539
534
  }
540
535
  catch { }
536
+ };
537
+ if (existsSync(rootPkgPath)) {
538
+ pushPath(rootPkgPath);
539
+ const rootPkg = readRootPackage(rootPkgPath);
540
+ if (rootPkg.workspaces) {
541
+ for (const wsDir of resolveWorkspaceDirs(rootDir, rootPkg.workspaces)) {
542
+ const pkgPath = join(wsDir, "package.json");
543
+ if (existsSync(pkgPath))
544
+ pushPath(pkgPath);
545
+ }
546
+ }
547
+ // Keep fallback in case workspace globs are incomplete.
548
+ scanTwoLevels();
549
+ return paths;
541
550
  }
551
+ // No root package.json: still detect monorepos/components by scanning children.
552
+ scanTwoLevels();
542
553
  return paths;
543
554
  }
544
555
  // ─── Ecosystem scanners ───────────────────────────────────────────────────────
package/dist/lib/mcp.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import https from "https";
2
2
  import { requireCredentials } from "./credentials.js";
3
3
  const MCP_GATEWAY_URL = "https://mcp.nexarch.ai";
4
- const REQUEST_TIMEOUT_MS = 30 * 1000;
4
+ const REQUEST_TIMEOUT_MS = 90 * 1000;
5
5
  async function callMcpRpc(method, params = {}, options = {}) {
6
6
  const creds = requireCredentials();
7
7
  const companyId = options.companyId ?? creds.companyId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexarch",
3
- "version": "0.8.1",
3
+ "version": "0.8.3",
4
4
  "description": "Your architecture workspace for AI delivery.",
5
5
  "keywords": [
6
6
  "nexarch",