@neat.is/core 0.4.20-dev.20260621 → 0.4.20-dev.20260622

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.
@@ -18,7 +18,7 @@ import {
18
18
  startPersistLoop,
19
19
  touchLastSeen,
20
20
  writeAtomically
21
- } from "./chunk-RVOCG6UZ.js";
21
+ } from "./chunk-GNAX2CBF.js";
22
22
  import {
23
23
  assertBindAuthority,
24
24
  buildOtelReceiver,
@@ -745,4 +745,4 @@ export {
745
745
  routeSpanToProject,
746
746
  startDaemon
747
747
  };
748
- //# sourceMappingURL=chunk-IWGDXLXA.js.map
748
+ //# sourceMappingURL=chunk-62ELQVIP.js.map
@@ -2288,6 +2288,9 @@ function workspaceGlobs(pkg) {
2288
2288
  if (Array.isArray(ws.packages)) return ws.packages.length > 0 ? ws.packages : null;
2289
2289
  return null;
2290
2290
  }
2291
+ async function hasPythonManifest(dir) {
2292
+ return await exists(path8.join(dir, "pyproject.toml")) || await exists(path8.join(dir, "requirements.txt")) || await exists(path8.join(dir, "setup.py"));
2293
+ }
2291
2294
  async function loadGitignore(scanPath) {
2292
2295
  const gitignorePath = path8.join(scanPath, ".gitignore");
2293
2296
  if (!await exists(gitignorePath)) return null;
@@ -2354,6 +2357,13 @@ function detectJsFramework(pkg) {
2354
2357
  if (deps["astro"] !== void 0) return "astro";
2355
2358
  return void 0;
2356
2359
  }
2360
+ async function detectJsServiceLanguage(dir, pkg) {
2361
+ const deps = { ...pkg.dependencies ?? {}, ...pkg.devDependencies ?? {} };
2362
+ if (deps["typescript"] !== void 0) return "typescript";
2363
+ const entries = await fs8.readdir(dir).catch(() => []);
2364
+ if (entries.some((name) => /^tsconfig(\..+)?\.json$/.test(name))) return "typescript";
2365
+ return "javascript";
2366
+ }
2357
2367
  async function discoverNodeService(scanPath, dir) {
2358
2368
  const pkgPath = path8.join(dir, "package.json");
2359
2369
  if (!await exists(pkgPath)) return null;
@@ -2366,11 +2376,12 @@ async function discoverNodeService(scanPath, dir) {
2366
2376
  }
2367
2377
  if (!pkg.name) return null;
2368
2378
  const framework = detectJsFramework(pkg);
2379
+ const language = await detectJsServiceLanguage(dir, pkg);
2369
2380
  const node = {
2370
2381
  id: serviceId2(pkg.name),
2371
2382
  type: NodeType4.ServiceNode,
2372
2383
  name: pkg.name,
2373
- language: "javascript",
2384
+ language,
2374
2385
  version: pkg.version,
2375
2386
  dependencies: pkg.dependencies ?? {},
2376
2387
  repoPath: path8.relative(scanPath, dir),
@@ -2413,7 +2424,11 @@ async function discoverServices(scanPath) {
2413
2424
  if (wsGlobs) {
2414
2425
  candidateDirs.push(...await expandWorkspaceGlobs(scanPath, wsGlobs));
2415
2426
  } else {
2416
- if (rootPkg && rootPkg.name) candidateDirs.push(scanPath);
2427
+ if (rootPkg && rootPkg.name) {
2428
+ candidateDirs.push(scanPath);
2429
+ } else if (await hasPythonManifest(scanPath)) {
2430
+ candidateDirs.push(scanPath);
2431
+ }
2417
2432
  const ig = await loadGitignore(scanPath);
2418
2433
  await walkDirs(
2419
2434
  scanPath,
@@ -2422,7 +2437,7 @@ async function discoverServices(scanPath) {
2422
2437
  async (dir) => {
2423
2438
  if (await exists(path8.join(dir, "package.json"))) {
2424
2439
  candidateDirs.push(dir);
2425
- } else if (await exists(path8.join(dir, "pyproject.toml")) || await exists(path8.join(dir, "requirements.txt")) || await exists(path8.join(dir, "setup.py"))) {
2440
+ } else if (await hasPythonManifest(dir)) {
2426
2441
  candidateDirs.push(dir);
2427
2442
  }
2428
2443
  }
@@ -6629,4 +6644,4 @@ export {
6629
6644
  pruneRegistry,
6630
6645
  buildApi
6631
6646
  };
6632
- //# sourceMappingURL=chunk-RVOCG6UZ.js.map
6647
+ //# sourceMappingURL=chunk-GNAX2CBF.js.map