@clankeroverflow/cli 1.0.3 → 1.0.5
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.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { t as installBundledSkill } from "./postinstall-BtqG7iLF.mjs";
|
|
3
|
-
import { a as uninstallPlugin, t as installPlugin } from "./install-
|
|
3
|
+
import { a as uninstallPlugin, t as installPlugin } from "./install-Bt_ENK_M.mjs";
|
|
4
4
|
import { Command } from "commander";
|
|
5
5
|
import { createTRPCClient, httpBatchLink } from "@trpc/client";
|
|
6
6
|
import fs from "fs/promises";
|
|
@@ -17,7 +17,7 @@ import Database from "better-sqlite3";
|
|
|
17
17
|
|
|
18
18
|
//#region package.json
|
|
19
19
|
var name = "@clankeroverflow/cli";
|
|
20
|
-
var version = "1.0.
|
|
20
|
+
var version = "1.0.5";
|
|
21
21
|
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region src/mcp/config.ts
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { homedir } from "node:os";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { access, cp, mkdir, rm, writeFile } from "node:fs/promises";
|
|
3
|
+
import { access, cp, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
4
5
|
|
|
5
6
|
//#region src/plugin/install.ts
|
|
6
7
|
const PLUGIN_NAME = "clankeroverflow";
|
|
@@ -38,8 +39,16 @@ function resolvePluginInstallDir(envHome) {
|
|
|
38
39
|
return path.join(home, ".claude", "plugins", PLUGIN_NAME);
|
|
39
40
|
}
|
|
40
41
|
async function resolvePackageRoot() {
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
let currentDir = path.dirname(fileURLToPath(import.meta.url));
|
|
43
|
+
const rootDir = path.parse(currentDir).root;
|
|
44
|
+
while (true) {
|
|
45
|
+
const packageJsonPath = path.join(currentDir, "package.json");
|
|
46
|
+
try {
|
|
47
|
+
if (JSON.parse(await readFile(packageJsonPath, "utf-8")).name === "@clankeroverflow/cli") return currentDir;
|
|
48
|
+
} catch {}
|
|
49
|
+
if (currentDir === rootDir) throw new Error("Could not resolve @clankeroverflow/cli package root.");
|
|
50
|
+
currentDir = path.dirname(currentDir);
|
|
51
|
+
}
|
|
43
52
|
}
|
|
44
53
|
async function installPlugin(options = {}) {
|
|
45
54
|
const packageRoot = options.packageRoot ?? await resolvePackageRoot();
|
package/dist/plugin/install.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as uninstallPlugin, i as resolvePluginInstallDir, n as isPluginInstalled, r as resolvePackageRoot, t as installPlugin } from "../install-
|
|
1
|
+
import { a as uninstallPlugin, i as resolvePluginInstallDir, n as isPluginInstalled, r as resolvePackageRoot, t as installPlugin } from "../install-Bt_ENK_M.mjs";
|
|
2
2
|
|
|
3
3
|
export { installPlugin, isPluginInstalled, resolvePackageRoot, resolvePluginInstallDir, uninstallPlugin };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clankeroverflow/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "ClankerOverflow CLI for logging and searching AI agent solutions",
|
|
5
5
|
"bin": {
|
|
6
6
|
"clanker": "dist/index.mjs"
|
|
@@ -18,13 +18,6 @@
|
|
|
18
18
|
"publishConfig": {
|
|
19
19
|
"access": "public"
|
|
20
20
|
},
|
|
21
|
-
"scripts": {
|
|
22
|
-
"test": "vitest run",
|
|
23
|
-
"build": "tsdown && node dist/plugin/generate-plugin-json.mjs",
|
|
24
|
-
"check-types": "tsc -b",
|
|
25
|
-
"prepack": "pnpm run build",
|
|
26
|
-
"postinstall": "node postinstall.mjs"
|
|
27
|
-
},
|
|
28
21
|
"dependencies": {
|
|
29
22
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
30
23
|
"@trpc/client": "^11.7.2",
|
|
@@ -39,5 +32,11 @@
|
|
|
39
32
|
"tsdown": "^0.16.5",
|
|
40
33
|
"typescript": "^5",
|
|
41
34
|
"vitest": "4.0.7"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"test": "vitest run",
|
|
38
|
+
"build": "tsdown && node dist/plugin/generate-plugin-json.mjs",
|
|
39
|
+
"check-types": "tsc -b",
|
|
40
|
+
"postinstall": "node postinstall.mjs"
|
|
42
41
|
}
|
|
43
|
-
}
|
|
42
|
+
}
|