@ctxo/cli 0.11.3 → 0.11.5
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/README.md +2 -2
- package/dist/{cli-router-2JVPBW4S.js → cli-router-LO2SWFC4.js} +51 -36
- package/dist/cli-router-LO2SWFC4.js.map +1 -0
- package/dist/index.js +1 -1
- package/llms-full.txt +1 -1
- package/llms.txt +1 -1
- package/package.json +17 -17
- package/dist/cli-router-2JVPBW4S.js.map +0 -1
package/README.md
CHANGED
|
@@ -104,13 +104,13 @@ gate:
|
|
|
104
104
|
| TypeScript / JavaScript | `@ctxo/lang-typescript` | full | ts-morph; type-aware cross-file resolution |
|
|
105
105
|
| Go | `@ctxo/lang-go` | syntax | tree-sitter; exported-symbol analysis |
|
|
106
106
|
| C# | `@ctxo/lang-csharp` | full | Roslyn; .NET SDK 8+ for full tier, tree-sitter fallback |
|
|
107
|
-
| Java | `@ctxo/lang-java` | syntax / full | tree-sitter syntax tier built-in; full tier via `@ctxo/lang-java-analyzer` companion (
|
|
107
|
+
| Java | `@ctxo/lang-java` | syntax / full | tree-sitter syntax tier built-in; full tier via `@ctxo/lang-java-analyzer` companion (JRE 11+ required, covers Java 8-21); detected by `pom.xml` / `build.gradle` |
|
|
108
108
|
|
|
109
109
|
Install via the CLI shortcut:
|
|
110
110
|
|
|
111
111
|
```bash
|
|
112
112
|
ctxo install typescript go csharp # syntax or full tier auto-detected
|
|
113
|
-
ctxo install java # installs syntax tier; adds full-tier analyzer when JRE
|
|
113
|
+
ctxo install java # installs syntax tier; adds full-tier analyzer when JRE 11+ detected
|
|
114
114
|
ctxo install java --full-tier # force full-tier analyzer install
|
|
115
115
|
ctxo install java --syntax-only # skip analyzer, syntax tier only
|
|
116
116
|
```
|
|
@@ -401,7 +401,8 @@ function decideNeededLanguages(result, options = {}) {
|
|
|
401
401
|
return [...needed];
|
|
402
402
|
}
|
|
403
403
|
function officialPluginFor(language) {
|
|
404
|
-
|
|
404
|
+
const pkgLang = language === "javascript" ? "typescript" : language;
|
|
405
|
+
return `@ctxo/lang-${pkgLang}`;
|
|
405
406
|
}
|
|
406
407
|
|
|
407
408
|
// src/core/install/package-manager.ts
|
|
@@ -607,7 +608,7 @@ function detectJavaMajor() {
|
|
|
607
608
|
return major;
|
|
608
609
|
}
|
|
609
610
|
function javaRuntimeAvailable() {
|
|
610
|
-
return (detectJavaMajor() ?? 0) >=
|
|
611
|
+
return (detectJavaMajor() ?? 0) >= 11;
|
|
611
612
|
}
|
|
612
613
|
|
|
613
614
|
// src/cli/install-command.ts
|
|
@@ -618,6 +619,24 @@ function resolveJavaPackages(opts) {
|
|
|
618
619
|
if (opts.fullTier || opts.jreAvailable) return [...base, "@ctxo/lang-java-analyzer"];
|
|
619
620
|
return base;
|
|
620
621
|
}
|
|
622
|
+
function buildPluginSpecifiers(languages, opts) {
|
|
623
|
+
const out = [];
|
|
624
|
+
const seen = /* @__PURE__ */ new Set();
|
|
625
|
+
const add = (pkg) => {
|
|
626
|
+
const spec = opts.version ? `${pkg}@${opts.version}` : pkg;
|
|
627
|
+
if (seen.has(spec)) return;
|
|
628
|
+
seen.add(spec);
|
|
629
|
+
out.push(spec);
|
|
630
|
+
};
|
|
631
|
+
for (const lang of languages) {
|
|
632
|
+
if (lang === "java") {
|
|
633
|
+
for (const pkg of resolveJavaPackages(opts)) add(pkg);
|
|
634
|
+
} else {
|
|
635
|
+
add(officialPluginFor(lang));
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
return out;
|
|
639
|
+
}
|
|
621
640
|
var InstallCommand = class {
|
|
622
641
|
constructor(projectRoot) {
|
|
623
642
|
this.projectRoot = projectRoot;
|
|
@@ -651,27 +670,22 @@ var InstallCommand = class {
|
|
|
651
670
|
process.exitCode = 1;
|
|
652
671
|
return;
|
|
653
672
|
}
|
|
654
|
-
const
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
specifiers.push(options.version ? `${pkg}@${options.version}` : pkg);
|
|
671
|
-
}
|
|
672
|
-
} else {
|
|
673
|
-
specifiers.push(options.version ? `${officialPluginFor(lang)}@${options.version}` : officialPluginFor(lang));
|
|
674
|
-
}
|
|
673
|
+
const jreAvailable = resolvedLangs.includes("java") ? javaRuntimeAvailable() : false;
|
|
674
|
+
if (resolvedLangs.includes("java") && !jreAvailable && !options.fullTier && !options.syntaxOnly) {
|
|
675
|
+
console.error('[ctxo] JRE 11+ not found; installing Java syntax tier. Install a JRE (11\u201316 or 17+) then run "ctxo install java --full-tier" for resolved call/use edges.');
|
|
676
|
+
}
|
|
677
|
+
let specifiers;
|
|
678
|
+
try {
|
|
679
|
+
specifiers = buildPluginSpecifiers(resolvedLangs, {
|
|
680
|
+
jreAvailable,
|
|
681
|
+
fullTier: options.fullTier,
|
|
682
|
+
syntaxOnly: options.syntaxOnly,
|
|
683
|
+
version: options.version
|
|
684
|
+
});
|
|
685
|
+
} catch (err) {
|
|
686
|
+
console.error(`[ctxo] ${err.message}`);
|
|
687
|
+
process.exitCode = 1;
|
|
688
|
+
return;
|
|
675
689
|
}
|
|
676
690
|
const invocation = buildInstallCommand(resolution.manager, specifiers, {
|
|
677
691
|
global: options.global,
|
|
@@ -1384,7 +1398,7 @@ var IndexCommand = class {
|
|
|
1384
1398
|
if (tsCount > 0) console.error(`[ctxo] TypeScript/JS: ${tsCount} files (full tier)`);
|
|
1385
1399
|
if (csCount > 0) console.error(`[ctxo] C#: ${csCount} files (${csharpTier} tier${csharpTier === "syntax" ? " - .NET SDK 8+ for full analysis" : ""})`);
|
|
1386
1400
|
if (goCount > 0) console.error(`[ctxo] Go: ${goCount} files (${goTier} tier${goTier === "syntax" ? " - Go 1.22+ for full analysis" : ""})`);
|
|
1387
|
-
if (javaCount > 0) console.error(`[ctxo] Java: ${javaCount} files (${javaTier} tier${javaTier === "syntax" ? ' - JRE
|
|
1401
|
+
if (javaCount > 0) console.error(`[ctxo] Java: ${javaCount} files (${javaTier} tier${javaTier === "syntax" ? ' - JRE 11+ & "ctxo install java --full-tier" for full analysis' : ""})`);
|
|
1388
1402
|
if (roslynAdapter) await roslynAdapter.dispose();
|
|
1389
1403
|
}
|
|
1390
1404
|
async autoInstallMissingPlugins() {
|
|
@@ -2298,7 +2312,7 @@ var InitCommand = class {
|
|
|
2298
2312
|
));
|
|
2299
2313
|
console.error("");
|
|
2300
2314
|
const confirm = await clack.confirm({
|
|
2301
|
-
message: pc.cyan(`Install ${missing.map(officialPluginFor).join(" ")}?`),
|
|
2315
|
+
message: pc.cyan(`Install ${[...new Set(missing.map(officialPluginFor))].join(" ")}?`),
|
|
2302
2316
|
initialValue: true
|
|
2303
2317
|
});
|
|
2304
2318
|
if (clack.isCancel(confirm)) {
|
|
@@ -2394,7 +2408,7 @@ var InitCommand = class {
|
|
|
2394
2408
|
s.stop(pc.dim("Installing language plugins..."));
|
|
2395
2409
|
const installer = new InstallCommand(this.projectRoot);
|
|
2396
2410
|
await installer.run({ languages: pluginsToInstall, yes: true });
|
|
2397
|
-
results.push(`${pc.green("\u2713")} ${pc.bold(pluginsToInstall.map(officialPluginFor).join(", "))} ${pc.dim("language plugins installed")}`);
|
|
2411
|
+
results.push(`${pc.green("\u2713")} ${pc.bold([...new Set(pluginsToInstall.map(officialPluginFor))].join(", "))} ${pc.dim("language plugins installed")}`);
|
|
2398
2412
|
s.start(pc.dim("Finalizing..."));
|
|
2399
2413
|
}
|
|
2400
2414
|
s.stop(pc.green("Done!"));
|
|
@@ -3268,7 +3282,7 @@ var LanguageCoverageCheck = class {
|
|
|
3268
3282
|
message: `plugins installed for: ${summary}`
|
|
3269
3283
|
};
|
|
3270
3284
|
}
|
|
3271
|
-
const packages = missing.map(officialPluginFor).join(" ");
|
|
3285
|
+
const packages = [...new Set(missing.map(officialPluginFor))].join(" ");
|
|
3272
3286
|
const shortList = missing.join(", ");
|
|
3273
3287
|
return {
|
|
3274
3288
|
id: this.id,
|
|
@@ -3299,9 +3313,10 @@ function evaluateJavaTier(i) {
|
|
|
3299
3313
|
if (!i.hasJava) {
|
|
3300
3314
|
return { id, title, status: "pass", message: "no Java sources detected" };
|
|
3301
3315
|
}
|
|
3302
|
-
const jreOk = (i.jreMajor ?? 0) >=
|
|
3316
|
+
const jreOk = (i.jreMajor ?? 0) >= 11;
|
|
3317
|
+
const jarVariant = (i.jreMajor ?? 0) >= 17 ? "java17" : "java11";
|
|
3303
3318
|
if (jreOk && i.analyzerInstalled) {
|
|
3304
|
-
return { id, title, status: "pass", message: `full tier (JRE ${i.jreMajor}, analyzer installed)` };
|
|
3319
|
+
return { id, title, status: "pass", message: `full tier (JRE ${i.jreMajor}, ${jarVariant} analyzer installed)` };
|
|
3305
3320
|
}
|
|
3306
3321
|
if (jreOk && !i.analyzerInstalled) {
|
|
3307
3322
|
return {
|
|
@@ -3317,22 +3332,22 @@ function evaluateJavaTier(i) {
|
|
|
3317
3332
|
id,
|
|
3318
3333
|
title,
|
|
3319
3334
|
status: "warn",
|
|
3320
|
-
message: "syntax tier (analyzer installed but no JRE
|
|
3321
|
-
fix: "Install a JRE
|
|
3335
|
+
message: "syntax tier (analyzer installed but no JRE 11+)",
|
|
3336
|
+
fix: "Install a JRE 11+ and ensure it is on PATH (or set JAVA_HOME)"
|
|
3322
3337
|
};
|
|
3323
3338
|
}
|
|
3324
3339
|
return {
|
|
3325
3340
|
id,
|
|
3326
3341
|
title,
|
|
3327
3342
|
status: "pass",
|
|
3328
|
-
message: 'syntax tier (install JRE
|
|
3343
|
+
message: 'syntax tier (install JRE 11+ and run "ctxo install java --full-tier" for full tier)'
|
|
3329
3344
|
};
|
|
3330
3345
|
}
|
|
3331
3346
|
function analyzerJarPresent() {
|
|
3332
3347
|
try {
|
|
3333
3348
|
const pkgJson = require4.resolve("@ctxo/lang-java-analyzer/package.json");
|
|
3334
|
-
const
|
|
3335
|
-
return existsSync15(
|
|
3349
|
+
const jarDir = join17(dirname7(pkgJson), "jar");
|
|
3350
|
+
return existsSync15(join17(jarDir, "ctxo-jdt-analyzer-11.jar")) || existsSync15(join17(jarDir, "ctxo-jdt-analyzer-17.jar"));
|
|
3336
3351
|
} catch {
|
|
3337
3352
|
return false;
|
|
3338
3353
|
}
|
|
@@ -3914,7 +3929,7 @@ var DoctorCommand = class {
|
|
|
3914
3929
|
this.ctxoRoot = join24(projectRoot, ".ctxo");
|
|
3915
3930
|
}
|
|
3916
3931
|
async run(options = {}) {
|
|
3917
|
-
const { getVersion: getVersion2 } = await import("./cli-router-
|
|
3932
|
+
const { getVersion: getVersion2 } = await import("./cli-router-LO2SWFC4.js");
|
|
3918
3933
|
console.error(`ctxo v${getVersion2()} \u2014 health check
|
|
3919
3934
|
`);
|
|
3920
3935
|
const checks = [
|
|
@@ -5146,4 +5161,4 @@ export {
|
|
|
5146
5161
|
getVersion,
|
|
5147
5162
|
locateGitRoot
|
|
5148
5163
|
};
|
|
5149
|
-
//# sourceMappingURL=cli-router-
|
|
5164
|
+
//# sourceMappingURL=cli-router-LO2SWFC4.js.map
|