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

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/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  routeSpanToProject,
3
3
  startDaemon
4
- } from "./chunk-IWGDXLXA.js";
4
+ } from "./chunk-62ELQVIP.js";
5
5
  import {
6
6
  ProjectNameCollisionError,
7
7
  addProject,
@@ -37,7 +37,7 @@ import {
37
37
  thresholdForEdgeType,
38
38
  touchLastSeen,
39
39
  writeAtomically
40
- } from "./chunk-RVOCG6UZ.js";
40
+ } from "./chunk-GNAX2CBF.js";
41
41
  import {
42
42
  startOtelGrpcReceiver
43
43
  } from "./chunk-MTXF77TN.js";
package/dist/neatd.cjs CHANGED
@@ -2776,6 +2776,9 @@ function workspaceGlobs(pkg) {
2776
2776
  if (Array.isArray(ws.packages)) return ws.packages.length > 0 ? ws.packages : null;
2777
2777
  return null;
2778
2778
  }
2779
+ async function hasPythonManifest(dir) {
2780
+ return await exists(import_node_path8.default.join(dir, "pyproject.toml")) || await exists(import_node_path8.default.join(dir, "requirements.txt")) || await exists(import_node_path8.default.join(dir, "setup.py"));
2781
+ }
2779
2782
  async function loadGitignore(scanPath) {
2780
2783
  const gitignorePath = import_node_path8.default.join(scanPath, ".gitignore");
2781
2784
  if (!await exists(gitignorePath)) return null;
@@ -2842,6 +2845,13 @@ function detectJsFramework(pkg) {
2842
2845
  if (deps["astro"] !== void 0) return "astro";
2843
2846
  return void 0;
2844
2847
  }
2848
+ async function detectJsServiceLanguage(dir, pkg) {
2849
+ const deps = { ...pkg.dependencies ?? {}, ...pkg.devDependencies ?? {} };
2850
+ if (deps["typescript"] !== void 0) return "typescript";
2851
+ const entries = await import_node_fs8.promises.readdir(dir).catch(() => []);
2852
+ if (entries.some((name) => /^tsconfig(\..+)?\.json$/.test(name))) return "typescript";
2853
+ return "javascript";
2854
+ }
2845
2855
  async function discoverNodeService(scanPath, dir) {
2846
2856
  const pkgPath = import_node_path8.default.join(dir, "package.json");
2847
2857
  if (!await exists(pkgPath)) return null;
@@ -2854,11 +2864,12 @@ async function discoverNodeService(scanPath, dir) {
2854
2864
  }
2855
2865
  if (!pkg.name) return null;
2856
2866
  const framework = detectJsFramework(pkg);
2867
+ const language = await detectJsServiceLanguage(dir, pkg);
2857
2868
  const node = {
2858
2869
  id: (0, import_types5.serviceId)(pkg.name),
2859
2870
  type: import_types5.NodeType.ServiceNode,
2860
2871
  name: pkg.name,
2861
- language: "javascript",
2872
+ language,
2862
2873
  version: pkg.version,
2863
2874
  dependencies: pkg.dependencies ?? {},
2864
2875
  repoPath: import_node_path8.default.relative(scanPath, dir),
@@ -2901,7 +2912,11 @@ async function discoverServices(scanPath) {
2901
2912
  if (wsGlobs) {
2902
2913
  candidateDirs.push(...await expandWorkspaceGlobs(scanPath, wsGlobs));
2903
2914
  } else {
2904
- if (rootPkg && rootPkg.name) candidateDirs.push(scanPath);
2915
+ if (rootPkg && rootPkg.name) {
2916
+ candidateDirs.push(scanPath);
2917
+ } else if (await hasPythonManifest(scanPath)) {
2918
+ candidateDirs.push(scanPath);
2919
+ }
2905
2920
  const ig = await loadGitignore(scanPath);
2906
2921
  await walkDirs(
2907
2922
  scanPath,
@@ -2910,7 +2925,7 @@ async function discoverServices(scanPath) {
2910
2925
  async (dir) => {
2911
2926
  if (await exists(import_node_path8.default.join(dir, "package.json"))) {
2912
2927
  candidateDirs.push(dir);
2913
- } else if (await exists(import_node_path8.default.join(dir, "pyproject.toml")) || await exists(import_node_path8.default.join(dir, "requirements.txt")) || await exists(import_node_path8.default.join(dir, "setup.py"))) {
2928
+ } else if (await hasPythonManifest(dir)) {
2914
2929
  candidateDirs.push(dir);
2915
2930
  }
2916
2931
  }