@rubytech/create-maxy 1.0.502 → 1.0.503
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/index.js +5 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -473,9 +473,11 @@ function installNeo4j() {
|
|
|
473
473
|
throw new Error("Automatic Neo4j installation is only supported on Linux. Install Neo4j 5.11+ manually.");
|
|
474
474
|
}
|
|
475
475
|
// Neo4j 5.x supports Java 17 and 21. Debian Bookworm ships 17, Trixie ships 21.
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
476
|
+
// apt-cache policy shows "Candidate: (none)" when no installable version exists.
|
|
477
|
+
const policyResult = spawnSync("apt-cache", ["policy", "openjdk-17-jre-headless"], { stdio: "pipe" });
|
|
478
|
+
const policyOutput = policyResult.stdout?.toString() ?? "";
|
|
479
|
+
const has17 = policyResult.status === 0 && !policyOutput.includes("Candidate: (none)");
|
|
480
|
+
const javaPackage = has17 ? "openjdk-17-jre-headless" : "openjdk-21-jre-headless";
|
|
479
481
|
console.log(` Installing Java (${javaPackage})...`);
|
|
480
482
|
shell("apt-get", ["install", "-y", javaPackage], { sudo: true });
|
|
481
483
|
spawnSync("bash", ["-c", "curl -fsSL https://debian.neo4j.com/neotechnology.gpg.key | sudo gpg --yes --dearmor -o /usr/share/keyrings/neo4j.gpg 2>/dev/null"], { stdio: "inherit" });
|