gitnexus 1.5.0 → 1.5.2
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/_shared/graph/types.d.ts +65 -0
- package/dist/_shared/graph/types.d.ts.map +1 -0
- package/dist/_shared/graph/types.js +8 -0
- package/dist/_shared/graph/types.js.map +1 -0
- package/dist/_shared/index.d.ts +7 -0
- package/dist/_shared/index.d.ts.map +1 -0
- package/dist/_shared/index.js +6 -0
- package/dist/_shared/index.js.map +1 -0
- package/dist/_shared/language-detection.d.ts +23 -0
- package/dist/_shared/language-detection.d.ts.map +1 -0
- package/dist/_shared/language-detection.js +137 -0
- package/dist/_shared/language-detection.js.map +1 -0
- package/dist/_shared/languages.d.ts +25 -0
- package/dist/_shared/languages.d.ts.map +1 -0
- package/dist/_shared/languages.js +26 -0
- package/dist/_shared/languages.js.map +1 -0
- package/dist/_shared/lbug/schema-constants.d.ts +16 -0
- package/dist/_shared/lbug/schema-constants.d.ts.map +1 -0
- package/dist/_shared/lbug/schema-constants.js +64 -0
- package/dist/_shared/lbug/schema-constants.js.map +1 -0
- package/dist/_shared/pipeline.d.ts +16 -0
- package/dist/_shared/pipeline.d.ts.map +1 -0
- package/dist/_shared/pipeline.js +5 -0
- package/dist/_shared/pipeline.js.map +1 -0
- package/dist/config/supported-languages.d.ts +1 -1
- package/dist/config/supported-languages.js +1 -1
- package/dist/core/graph/types.d.ts +2 -2
- package/dist/core/ingestion/call-processor.js +1 -1
- package/dist/core/ingestion/cobol-processor.js +1 -1
- package/dist/core/ingestion/entry-point-scoring.d.ts +1 -1
- package/dist/core/ingestion/entry-point-scoring.js +1 -1
- package/dist/core/ingestion/field-extractor.d.ts +1 -1
- package/dist/core/ingestion/field-extractors/configs/c-cpp.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/csharp.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/dart.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/go.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/jvm.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/php.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/python.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/ruby.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/rust.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/swift.js +1 -1
- package/dist/core/ingestion/field-extractors/configs/typescript-javascript.js +1 -1
- package/dist/core/ingestion/field-extractors/generic.d.ts +1 -1
- package/dist/core/ingestion/field-extractors/typescript.d.ts +1 -1
- package/dist/core/ingestion/field-extractors/typescript.js +1 -1
- package/dist/core/ingestion/field-types.d.ts +1 -1
- package/dist/core/ingestion/framework-detection.d.ts +1 -1
- package/dist/core/ingestion/framework-detection.js +1 -1
- package/dist/core/ingestion/heritage-processor.d.ts +1 -1
- package/dist/core/ingestion/heritage-processor.js +1 -1
- package/dist/core/ingestion/import-processor.js +1 -1
- package/dist/core/ingestion/import-resolvers/csharp.js +1 -1
- package/dist/core/ingestion/import-resolvers/dart.js +1 -1
- package/dist/core/ingestion/import-resolvers/go.js +1 -1
- package/dist/core/ingestion/import-resolvers/jvm.js +1 -1
- package/dist/core/ingestion/import-resolvers/python.js +1 -1
- package/dist/core/ingestion/import-resolvers/rust.js +1 -1
- package/dist/core/ingestion/import-resolvers/standard.d.ts +1 -1
- package/dist/core/ingestion/import-resolvers/standard.js +1 -1
- package/dist/core/ingestion/language-provider.d.ts +2 -2
- package/dist/core/ingestion/languages/c-cpp.js +1 -1
- package/dist/core/ingestion/languages/cobol.js +1 -1
- package/dist/core/ingestion/languages/csharp.js +1 -1
- package/dist/core/ingestion/languages/dart.js +1 -1
- package/dist/core/ingestion/languages/go.js +1 -1
- package/dist/core/ingestion/languages/index.d.ts +1 -1
- package/dist/core/ingestion/languages/index.js +1 -1
- package/dist/core/ingestion/languages/java.js +1 -1
- package/dist/core/ingestion/languages/kotlin.js +1 -1
- package/dist/core/ingestion/languages/php.js +1 -1
- package/dist/core/ingestion/languages/python.js +1 -1
- package/dist/core/ingestion/languages/ruby.js +1 -1
- package/dist/core/ingestion/languages/rust.js +1 -1
- package/dist/core/ingestion/languages/swift.js +1 -1
- package/dist/core/ingestion/languages/typescript.js +1 -1
- package/dist/core/ingestion/method-extractors/configs/csharp.js +1 -1
- package/dist/core/ingestion/method-extractors/configs/jvm.js +1 -1
- package/dist/core/ingestion/method-types.d.ts +1 -1
- package/dist/core/ingestion/mro-processor.d.ts +1 -1
- package/dist/core/ingestion/parsing-processor.js +1 -1
- package/dist/core/ingestion/pipeline.d.ts +1 -1
- package/dist/core/ingestion/pipeline.js +1 -1
- package/dist/core/ingestion/process-processor.js +1 -1
- package/dist/core/ingestion/symbol-table.d.ts +1 -1
- package/dist/core/ingestion/tree-sitter-queries.d.ts +1 -1
- package/dist/core/ingestion/tree-sitter-queries.js +1 -1
- package/dist/core/ingestion/type-env.d.ts +2 -2
- package/dist/core/ingestion/utils/ast-helpers.d.ts +1 -1
- package/dist/core/ingestion/workers/parse-worker.d.ts +2 -2
- package/dist/core/ingestion/workers/parse-worker.js +2 -2
- package/dist/core/lbug/schema.d.ts +2 -2
- package/dist/core/lbug/schema.js +1 -1
- package/dist/core/tree-sitter/parser-loader.d.ts +1 -1
- package/dist/core/tree-sitter/parser-loader.js +1 -1
- package/dist/server/api.js +1 -1
- package/package.json +5 -5
- package/scripts/build.js +73 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gitnexus",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "Graph-powered code intelligence for AI agents. Index any codebase, query via MCP or CLI.",
|
|
5
5
|
"author": "Abhigyan Patwari",
|
|
6
6
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"vendor"
|
|
39
39
|
],
|
|
40
40
|
"scripts": {
|
|
41
|
-
"build": "
|
|
41
|
+
"build": "node scripts/build.js",
|
|
42
42
|
"serve": "tsx src/cli/index.ts serve",
|
|
43
43
|
"dev": "tsx watch src/cli/index.ts",
|
|
44
44
|
"test": "vitest run",
|
|
@@ -46,11 +46,10 @@
|
|
|
46
46
|
"test:integration": "vitest run test/integration",
|
|
47
47
|
"test:watch": "vitest",
|
|
48
48
|
"test:coverage": "vitest run --coverage",
|
|
49
|
-
"prepare": "
|
|
50
|
-
"prepack": "
|
|
49
|
+
"prepare": "node scripts/build.js",
|
|
50
|
+
"prepack": "node scripts/build.js"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"gitnexus-shared": "file:../gitnexus-shared",
|
|
54
53
|
"@huggingface/transformers": "^3.0.0",
|
|
55
54
|
"@ladybugdb/core": "^0.15.2",
|
|
56
55
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
@@ -87,6 +86,7 @@
|
|
|
87
86
|
"tree-sitter-swift": "^0.6.0"
|
|
88
87
|
},
|
|
89
88
|
"devDependencies": {
|
|
89
|
+
"gitnexus-shared": "file:../gitnexus-shared",
|
|
90
90
|
"@types/cli-progress": "^3.11.6",
|
|
91
91
|
"@types/cors": "^2.8.17",
|
|
92
92
|
"@types/express": "^4.17.21",
|
package/scripts/build.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Build script that compiles gitnexus and inlines gitnexus-shared into the dist.
|
|
4
|
+
*
|
|
5
|
+
* Steps:
|
|
6
|
+
* 1. Build gitnexus-shared (tsc)
|
|
7
|
+
* 2. Build gitnexus (tsc)
|
|
8
|
+
* 3. Copy gitnexus-shared/dist → dist/_shared
|
|
9
|
+
* 4. Rewrite bare 'gitnexus-shared' specifiers → relative paths
|
|
10
|
+
*/
|
|
11
|
+
import { execSync } from 'node:child_process';
|
|
12
|
+
import fs from 'node:fs';
|
|
13
|
+
import path from 'node:path';
|
|
14
|
+
import { fileURLToPath } from 'node:url';
|
|
15
|
+
|
|
16
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
17
|
+
const ROOT = path.resolve(__dirname, '..');
|
|
18
|
+
const SHARED_ROOT = path.resolve(ROOT, '..', 'gitnexus-shared');
|
|
19
|
+
const DIST = path.join(ROOT, 'dist');
|
|
20
|
+
const SHARED_DEST = path.join(DIST, '_shared');
|
|
21
|
+
|
|
22
|
+
// ── 1. Build gitnexus-shared ───────────────────────────────────────
|
|
23
|
+
console.log('[build] compiling gitnexus-shared…');
|
|
24
|
+
execSync('npx tsc', { cwd: SHARED_ROOT, stdio: 'inherit' });
|
|
25
|
+
|
|
26
|
+
// ── 2. Build gitnexus ──────────────────────────────────────────────
|
|
27
|
+
console.log('[build] compiling gitnexus…');
|
|
28
|
+
execSync('npx tsc', { cwd: ROOT, stdio: 'inherit' });
|
|
29
|
+
|
|
30
|
+
// ── 3. Copy shared dist ────────────────────────────────────────────
|
|
31
|
+
console.log('[build] copying shared module into dist/_shared…');
|
|
32
|
+
fs.cpSync(path.join(SHARED_ROOT, 'dist'), SHARED_DEST, { recursive: true });
|
|
33
|
+
|
|
34
|
+
// ── 4. Rewrite imports ─────────────────────────────────────────────
|
|
35
|
+
console.log('[build] rewriting gitnexus-shared imports…');
|
|
36
|
+
let rewritten = 0;
|
|
37
|
+
|
|
38
|
+
function rewriteFile(filePath) {
|
|
39
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
40
|
+
if (!content.includes('gitnexus-shared')) return;
|
|
41
|
+
|
|
42
|
+
const relDir = path.relative(path.dirname(filePath), SHARED_DEST);
|
|
43
|
+
// Always use posix separators and point to the package index
|
|
44
|
+
const relImport = relDir.split(path.sep).join('/') + '/index.js';
|
|
45
|
+
|
|
46
|
+
const updated = content
|
|
47
|
+
.replace(/from\s+['"]gitnexus-shared['"]/g, `from '${relImport}'`)
|
|
48
|
+
.replace(/import\(\s*['"]gitnexus-shared['"]\s*\)/g, `import('${relImport}')`);
|
|
49
|
+
|
|
50
|
+
if (updated !== content) {
|
|
51
|
+
fs.writeFileSync(filePath, updated);
|
|
52
|
+
rewritten++;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function walk(dir, extensions, cb) {
|
|
57
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
58
|
+
const full = path.join(dir, entry.name);
|
|
59
|
+
if (entry.isDirectory()) {
|
|
60
|
+
walk(full, extensions, cb);
|
|
61
|
+
} else if (extensions.some((ext) => entry.name.endsWith(ext))) {
|
|
62
|
+
cb(full);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
walk(DIST, ['.js', '.d.ts'], rewriteFile);
|
|
68
|
+
|
|
69
|
+
// ── 5. Make CLI entry executable ────────────────────────────────────
|
|
70
|
+
const cliEntry = path.join(DIST, 'cli', 'index.js');
|
|
71
|
+
if (fs.existsSync(cliEntry)) fs.chmodSync(cliEntry, 0o755);
|
|
72
|
+
|
|
73
|
+
console.log(`[build] done — rewrote ${rewritten} files.`);
|