@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.
package/dist/neatd.js CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  startDaemon
4
- } from "./chunk-IWGDXLXA.js";
4
+ } from "./chunk-62ELQVIP.js";
5
5
  import {
6
6
  listProjects,
7
7
  registryPath
8
- } from "./chunk-RVOCG6UZ.js";
8
+ } from "./chunk-GNAX2CBF.js";
9
9
  import {
10
10
  BindAuthorityError,
11
11
  __require
package/dist/server.cjs CHANGED
@@ -3339,6 +3339,9 @@ function workspaceGlobs(pkg) {
3339
3339
  if (Array.isArray(ws.packages)) return ws.packages.length > 0 ? ws.packages : null;
3340
3340
  return null;
3341
3341
  }
3342
+ async function hasPythonManifest(dir) {
3343
+ return await exists2(import_node_path10.default.join(dir, "pyproject.toml")) || await exists2(import_node_path10.default.join(dir, "requirements.txt")) || await exists2(import_node_path10.default.join(dir, "setup.py"));
3344
+ }
3342
3345
  async function loadGitignore(scanPath) {
3343
3346
  const gitignorePath = import_node_path10.default.join(scanPath, ".gitignore");
3344
3347
  if (!await exists2(gitignorePath)) return null;
@@ -3405,6 +3408,13 @@ function detectJsFramework(pkg) {
3405
3408
  if (deps["astro"] !== void 0) return "astro";
3406
3409
  return void 0;
3407
3410
  }
3411
+ async function detectJsServiceLanguage(dir, pkg) {
3412
+ const deps = { ...pkg.dependencies ?? {}, ...pkg.devDependencies ?? {} };
3413
+ if (deps["typescript"] !== void 0) return "typescript";
3414
+ const entries = await import_node_fs10.promises.readdir(dir).catch(() => []);
3415
+ if (entries.some((name) => /^tsconfig(\..+)?\.json$/.test(name))) return "typescript";
3416
+ return "javascript";
3417
+ }
3408
3418
  async function discoverNodeService(scanPath, dir) {
3409
3419
  const pkgPath = import_node_path10.default.join(dir, "package.json");
3410
3420
  if (!await exists2(pkgPath)) return null;
@@ -3417,11 +3427,12 @@ async function discoverNodeService(scanPath, dir) {
3417
3427
  }
3418
3428
  if (!pkg.name) return null;
3419
3429
  const framework = detectJsFramework(pkg);
3430
+ const language = await detectJsServiceLanguage(dir, pkg);
3420
3431
  const node = {
3421
3432
  id: (0, import_types6.serviceId)(pkg.name),
3422
3433
  type: import_types6.NodeType.ServiceNode,
3423
3434
  name: pkg.name,
3424
- language: "javascript",
3435
+ language,
3425
3436
  version: pkg.version,
3426
3437
  dependencies: pkg.dependencies ?? {},
3427
3438
  repoPath: import_node_path10.default.relative(scanPath, dir),
@@ -3464,7 +3475,11 @@ async function discoverServices(scanPath) {
3464
3475
  if (wsGlobs) {
3465
3476
  candidateDirs.push(...await expandWorkspaceGlobs(scanPath, wsGlobs));
3466
3477
  } else {
3467
- if (rootPkg && rootPkg.name) candidateDirs.push(scanPath);
3478
+ if (rootPkg && rootPkg.name) {
3479
+ candidateDirs.push(scanPath);
3480
+ } else if (await hasPythonManifest(scanPath)) {
3481
+ candidateDirs.push(scanPath);
3482
+ }
3468
3483
  const ig = await loadGitignore(scanPath);
3469
3484
  await walkDirs(
3470
3485
  scanPath,
@@ -3473,7 +3488,7 @@ async function discoverServices(scanPath) {
3473
3488
  async (dir) => {
3474
3489
  if (await exists2(import_node_path10.default.join(dir, "package.json"))) {
3475
3490
  candidateDirs.push(dir);
3476
- } else if (await exists2(import_node_path10.default.join(dir, "pyproject.toml")) || await exists2(import_node_path10.default.join(dir, "requirements.txt")) || await exists2(import_node_path10.default.join(dir, "setup.py"))) {
3491
+ } else if (await hasPythonManifest(dir)) {
3477
3492
  candidateDirs.push(dir);
3478
3493
  }
3479
3494
  }