@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/{chunk-IWGDXLXA.js → chunk-62ELQVIP.js} +2 -2
- package/dist/{chunk-RVOCG6UZ.js → chunk-GNAX2CBF.js} +19 -4
- package/dist/chunk-GNAX2CBF.js.map +1 -0
- package/dist/cli.cjs +78 -5
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +62 -4
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +18 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/neatd.cjs +18 -3
- package/dist/neatd.cjs.map +1 -1
- package/dist/neatd.js +2 -2
- package/dist/server.cjs +18 -3
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-RVOCG6UZ.js.map +0 -1
- /package/dist/{chunk-IWGDXLXA.js.map → chunk-62ELQVIP.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -2914,6 +2914,9 @@ function workspaceGlobs(pkg) {
|
|
|
2914
2914
|
if (Array.isArray(ws.packages)) return ws.packages.length > 0 ? ws.packages : null;
|
|
2915
2915
|
return null;
|
|
2916
2916
|
}
|
|
2917
|
+
async function hasPythonManifest(dir) {
|
|
2918
|
+
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"));
|
|
2919
|
+
}
|
|
2917
2920
|
async function loadGitignore(scanPath) {
|
|
2918
2921
|
const gitignorePath = import_node_path8.default.join(scanPath, ".gitignore");
|
|
2919
2922
|
if (!await exists(gitignorePath)) return null;
|
|
@@ -2980,6 +2983,13 @@ function detectJsFramework(pkg) {
|
|
|
2980
2983
|
if (deps["astro"] !== void 0) return "astro";
|
|
2981
2984
|
return void 0;
|
|
2982
2985
|
}
|
|
2986
|
+
async function detectJsServiceLanguage(dir, pkg) {
|
|
2987
|
+
const deps = { ...pkg.dependencies ?? {}, ...pkg.devDependencies ?? {} };
|
|
2988
|
+
if (deps["typescript"] !== void 0) return "typescript";
|
|
2989
|
+
const entries = await import_node_fs8.promises.readdir(dir).catch(() => []);
|
|
2990
|
+
if (entries.some((name) => /^tsconfig(\..+)?\.json$/.test(name))) return "typescript";
|
|
2991
|
+
return "javascript";
|
|
2992
|
+
}
|
|
2983
2993
|
async function discoverNodeService(scanPath, dir) {
|
|
2984
2994
|
const pkgPath = import_node_path8.default.join(dir, "package.json");
|
|
2985
2995
|
if (!await exists(pkgPath)) return null;
|
|
@@ -2992,11 +3002,12 @@ async function discoverNodeService(scanPath, dir) {
|
|
|
2992
3002
|
}
|
|
2993
3003
|
if (!pkg.name) return null;
|
|
2994
3004
|
const framework = detectJsFramework(pkg);
|
|
3005
|
+
const language = await detectJsServiceLanguage(dir, pkg);
|
|
2995
3006
|
const node = {
|
|
2996
3007
|
id: (0, import_types5.serviceId)(pkg.name),
|
|
2997
3008
|
type: import_types5.NodeType.ServiceNode,
|
|
2998
3009
|
name: pkg.name,
|
|
2999
|
-
language
|
|
3010
|
+
language,
|
|
3000
3011
|
version: pkg.version,
|
|
3001
3012
|
dependencies: pkg.dependencies ?? {},
|
|
3002
3013
|
repoPath: import_node_path8.default.relative(scanPath, dir),
|
|
@@ -3039,7 +3050,11 @@ async function discoverServices(scanPath) {
|
|
|
3039
3050
|
if (wsGlobs) {
|
|
3040
3051
|
candidateDirs.push(...await expandWorkspaceGlobs(scanPath, wsGlobs));
|
|
3041
3052
|
} else {
|
|
3042
|
-
if (rootPkg && rootPkg.name)
|
|
3053
|
+
if (rootPkg && rootPkg.name) {
|
|
3054
|
+
candidateDirs.push(scanPath);
|
|
3055
|
+
} else if (await hasPythonManifest(scanPath)) {
|
|
3056
|
+
candidateDirs.push(scanPath);
|
|
3057
|
+
}
|
|
3043
3058
|
const ig = await loadGitignore(scanPath);
|
|
3044
3059
|
await walkDirs(
|
|
3045
3060
|
scanPath,
|
|
@@ -3048,7 +3063,7 @@ async function discoverServices(scanPath) {
|
|
|
3048
3063
|
async (dir) => {
|
|
3049
3064
|
if (await exists(import_node_path8.default.join(dir, "package.json"))) {
|
|
3050
3065
|
candidateDirs.push(dir);
|
|
3051
|
-
} else if (await
|
|
3066
|
+
} else if (await hasPythonManifest(dir)) {
|
|
3052
3067
|
candidateDirs.push(dir);
|
|
3053
3068
|
}
|
|
3054
3069
|
}
|