opencodekit 0.6.5 → 0.6.6
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
CHANGED
|
@@ -750,7 +750,7 @@ var cac = (name = "") => new CAC(name);
|
|
|
750
750
|
// package.json
|
|
751
751
|
var package_default = {
|
|
752
752
|
name: "opencodekit",
|
|
753
|
-
version: "0.6.
|
|
753
|
+
version: "0.6.6",
|
|
754
754
|
description: "CLI tool for bootstrapping and managing OpenCodeKit projects",
|
|
755
755
|
type: "module",
|
|
756
756
|
repository: {
|
|
@@ -26,8 +26,12 @@ function getOpenCodeDataDir(): string {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
import { mkdtempSync } from "node:fs";
|
|
30
|
+
import { tmpdir } from "node:os";
|
|
31
|
+
|
|
29
32
|
/**
|
|
30
|
-
* Find OpenCode's bundled jdtls launcher jar
|
|
33
|
+
* Find OpenCode's bundled jdtls launcher jar and build the full command
|
|
34
|
+
* @see https://github.com/eclipse-jdtls/eclipse.jdt.ls
|
|
31
35
|
*/
|
|
32
36
|
function findOpenCodeJdtls(): string[] | null {
|
|
33
37
|
const jdtlsDir = join(getOpenCodeDataDir(), "bin/jdtls");
|
|
@@ -54,12 +58,27 @@ function findOpenCodeJdtls(): string[] | null {
|
|
|
54
58
|
|
|
55
59
|
if (!existsSync(configDir)) return null;
|
|
56
60
|
|
|
61
|
+
// Create a unique data directory for this jdtls instance
|
|
62
|
+
const dataDir = mkdtempSync(join(tmpdir(), "opencodekit-jdtls-data"));
|
|
63
|
+
|
|
57
64
|
return [
|
|
58
65
|
"java",
|
|
66
|
+
// JVM arguments required by jdtls
|
|
67
|
+
"-Declipse.application=org.eclipse.jdt.ls.core.id1",
|
|
68
|
+
"-Dosgi.bundles.defaultStartLevel=4",
|
|
69
|
+
"-Declipse.product=org.eclipse.jdt.ls.core.product",
|
|
70
|
+
"-Dlog.level=ALL",
|
|
71
|
+
"--add-modules=ALL-SYSTEM",
|
|
72
|
+
"--add-opens",
|
|
73
|
+
"java.base/java.util=ALL-UNNAMED",
|
|
74
|
+
"--add-opens",
|
|
75
|
+
"java.base/java.lang=ALL-UNNAMED",
|
|
59
76
|
"-jar",
|
|
60
77
|
join(pluginsDir, launcherJar),
|
|
61
78
|
"-configuration",
|
|
62
79
|
configDir,
|
|
80
|
+
"-data",
|
|
81
|
+
dataDir,
|
|
63
82
|
];
|
|
64
83
|
} catch {
|
|
65
84
|
return null;
|