@kaluchi/jdtbridge 1.1.0 → 1.2.0
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/package.json +4 -4
- package/src/cli.mjs +8 -0
- package/src/commands/setup.mjs +4 -0
- /package/bin/{jdt.mjs → jdt} +0 -0
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaluchi/jdtbridge",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "CLI for Eclipse JDT Bridge — semantic Java analysis via Eclipse JDT SearchEngine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"jdt": "
|
|
8
|
-
"jdtbridge": "
|
|
7
|
+
"jdt": "bin/jdt",
|
|
8
|
+
"jdtbridge": "bin/jdt"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"bin/",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"author": "kaluchi",
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
32
|
-
"url": "https://github.com/kaluchi/jdtbridge.git",
|
|
32
|
+
"url": "git+https://github.com/kaluchi/jdtbridge.git",
|
|
33
33
|
"directory": "cli"
|
|
34
34
|
},
|
|
35
35
|
"homepage": "https://github.com/kaluchi/jdtbridge/tree/master/cli",
|
package/src/cli.mjs
CHANGED
|
@@ -32,6 +32,9 @@ import {
|
|
|
32
32
|
import { setup, help as setupHelp } from "./commands/setup.mjs";
|
|
33
33
|
import { isConnectionError } from "./client.mjs";
|
|
34
34
|
import { bold, red, dim } from "./color.mjs";
|
|
35
|
+
import { createRequire } from "node:module";
|
|
36
|
+
|
|
37
|
+
const { version } = createRequire(import.meta.url)("../package.json");
|
|
35
38
|
|
|
36
39
|
const commands = {
|
|
37
40
|
projects: { fn: projects, help: projectsHelp },
|
|
@@ -135,6 +138,11 @@ export async function run(argv) {
|
|
|
135
138
|
return;
|
|
136
139
|
}
|
|
137
140
|
|
|
141
|
+
if (command === "--version" || command === "-v") {
|
|
142
|
+
console.log(version);
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
|
|
138
146
|
if (command === "help") {
|
|
139
147
|
const topic = rest[0];
|
|
140
148
|
const resolved = topic ? resolve(topic) : null;
|
package/src/commands/setup.mjs
CHANGED
|
@@ -9,6 +9,9 @@ import { readConfig, writeConfig } from "../home.mjs";
|
|
|
9
9
|
import { discoverInstances } from "../discovery.mjs";
|
|
10
10
|
import { green, red, bold, dim } from "../color.mjs";
|
|
11
11
|
import { parseFlags } from "../args.mjs";
|
|
12
|
+
import { createRequire } from "node:module";
|
|
13
|
+
|
|
14
|
+
const { version: cliVersion } = createRequire(import.meta.url)("../../package.json");
|
|
12
15
|
import {
|
|
13
16
|
eclipseExe,
|
|
14
17
|
isEclipseRunning,
|
|
@@ -79,6 +82,7 @@ function checkMaven() {
|
|
|
79
82
|
|
|
80
83
|
function showPrereqs() {
|
|
81
84
|
console.log(bold("Prerequisites"));
|
|
85
|
+
ok(`CLI ${cliVersion}`);
|
|
82
86
|
const checks = [checkNode(), checkJava(), checkMaven()];
|
|
83
87
|
for (const c of checks) (c.ok ? ok : fail)(c.label);
|
|
84
88
|
return checks.every((c) => c.ok);
|
/package/bin/{jdt.mjs → jdt}
RENAMED
|
File without changes
|