softwareobservatory 0.1.0 → 0.1.1
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/bin/softwareobservatory.mjs +3 -2
- package/lib/core.mjs +3 -1
- package/lib/mcp.mjs +2 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
CLI_VERSION,
|
|
3
4
|
loadData,
|
|
4
5
|
siteUrl,
|
|
5
6
|
listFamilies,
|
|
@@ -284,9 +285,9 @@ function main() {
|
|
|
284
285
|
const data = loadData();
|
|
285
286
|
emit(
|
|
286
287
|
flags,
|
|
287
|
-
{ cli:
|
|
288
|
+
{ cli: CLI_VERSION, dataset_version: data.version, dataset_generated_at: data.generated_at, sensors: data.sensors.length },
|
|
288
289
|
() => {
|
|
289
|
-
console.log(`softwareobservatory
|
|
290
|
+
console.log(`softwareobservatory ${CLI_VERSION}`);
|
|
290
291
|
console.log(`dataset v${data.version}, generated ${data.generated_at}, ${data.sensors.length} sensors`);
|
|
291
292
|
}
|
|
292
293
|
);
|
package/lib/core.mjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
import path from "node:path";
|
|
4
3
|
|
|
5
4
|
const DATA_PATH = fileURLToPath(new URL("../data/sensors.json", import.meta.url));
|
|
5
|
+
const PACKAGE_PATH = fileURLToPath(new URL("../package.json", import.meta.url));
|
|
6
|
+
|
|
7
|
+
export const CLI_VERSION = JSON.parse(readFileSync(PACKAGE_PATH, "utf8")).version;
|
|
6
8
|
|
|
7
9
|
let cache = null;
|
|
8
10
|
|
package/lib/mcp.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import readline from "node:readline";
|
|
2
2
|
import {
|
|
3
|
+
CLI_VERSION,
|
|
3
4
|
loadData,
|
|
4
5
|
siteUrl,
|
|
5
6
|
listFamilies,
|
|
@@ -12,7 +13,7 @@ import {
|
|
|
12
13
|
} from "./core.mjs";
|
|
13
14
|
|
|
14
15
|
const PROTOCOL_VERSION = "2024-11-05";
|
|
15
|
-
const SERVER_INFO = { name: "softwareobservatory", version:
|
|
16
|
+
const SERVER_INFO = { name: "softwareobservatory", version: CLI_VERSION };
|
|
16
17
|
|
|
17
18
|
const TOOLS = [
|
|
18
19
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "softwareobservatory",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Query the Software Observatory catalog of epistemic sensors for software correctness. Built for humans and agents: every command emits JSON with --json.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"observability",
|