claude-codex-wechat 0.1.37 → 0.1.38
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/mcp/mediaServer.js +12 -7
- package/package.json +1 -1
package/dist/mcp/mediaServer.js
CHANGED
|
@@ -99,17 +99,22 @@ import { homedir } from "node:os";
|
|
|
99
99
|
import { fileURLToPath } from "node:url";
|
|
100
100
|
import { z as z2 } from "zod";
|
|
101
101
|
var BRIDGE_API_URL2 = process.env.BRIDGE_API_URL || "http://localhost:8787";
|
|
102
|
-
function
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
function douyinScriptCandidates(baseDir) {
|
|
103
|
+
return [
|
|
104
|
+
// Source layout: src/mcp/tools -> src/mcp/scripts
|
|
105
|
+
join(baseDir, "..", "scripts", "douyin-download.mjs"),
|
|
106
|
+
// Bundled layout: dist/mcp/mediaServer.js -> dist/mcp/scripts
|
|
107
|
+
join(baseDir, "scripts", "douyin-download.mjs"),
|
|
108
|
+
// Older/alternate dist layout fallback
|
|
109
|
+
join(baseDir, "..", "..", "mcp", "scripts", "douyin-download.mjs"),
|
|
109
110
|
// User skills locations (cross-platform)
|
|
110
111
|
join(homedir(), ".agents", "skills", "douyin-download", "scripts", "douyin-download.mjs"),
|
|
111
112
|
join(homedir(), ".claude", "skills", "douyin-download", "scripts", "douyin-download.mjs")
|
|
112
113
|
];
|
|
114
|
+
}
|
|
115
|
+
function findDouyinScript() {
|
|
116
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
117
|
+
const candidates = douyinScriptCandidates(here);
|
|
113
118
|
for (const p of candidates) {
|
|
114
119
|
const resolved = resolve(p);
|
|
115
120
|
if (existsSync(resolved)) return resolved;
|