@ctxo/cli 0.11.3 → 0.11.4
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.
|
@@ -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
|
|
@@ -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 17+ not found; installing Java syntax tier. Install a JRE 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,
|
|
@@ -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,
|
|
@@ -3914,7 +3928,7 @@ var DoctorCommand = class {
|
|
|
3914
3928
|
this.ctxoRoot = join24(projectRoot, ".ctxo");
|
|
3915
3929
|
}
|
|
3916
3930
|
async run(options = {}) {
|
|
3917
|
-
const { getVersion: getVersion2 } = await import("./cli-router-
|
|
3931
|
+
const { getVersion: getVersion2 } = await import("./cli-router-T6OCTM43.js");
|
|
3918
3932
|
console.error(`ctxo v${getVersion2()} \u2014 health check
|
|
3919
3933
|
`);
|
|
3920
3934
|
const checks = [
|
|
@@ -5146,4 +5160,4 @@ export {
|
|
|
5146
5160
|
getVersion,
|
|
5147
5161
|
locateGitRoot
|
|
5148
5162
|
};
|
|
5149
|
-
//# sourceMappingURL=cli-router-
|
|
5163
|
+
//# sourceMappingURL=cli-router-T6OCTM43.js.map
|