webcake-landing-mcp 1.13.6 → 1.13.7

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/README.md CHANGED
@@ -102,18 +102,20 @@ Zero install, always the latest version, needs Node.js 18+. **One line** grabs y
102
102
 
103
103
  ```bash
104
104
  # Opens the browser — click Connect, your installed IDEs are configured (prod)
105
- npx -y webcake-landing-mcp install
105
+ npx -y webcake-landing-mcp@latest install
106
106
 
107
107
  # Developers only — step by step: environment, login or JWT, org, IDE(s)
108
- npx -y webcake-landing-mcp install --dev
108
+ npx -y webcake-landing-mcp@latest install --dev
109
109
 
110
110
  # Scripts and CI — every supported IDE, even ones not installed yet
111
- npx -y webcake-landing-mcp install --ide all --jwt <your-jwt>
111
+ npx -y webcake-landing-mcp@latest install --ide all --jwt <your-jwt>
112
112
 
113
113
  # Remove the server from every IDE config
114
- npx -y webcake-landing-mcp uninstall
114
+ npx -y webcake-landing-mcp@latest uninstall
115
115
  ```
116
116
 
117
+ > **Troubleshooting (Claude Desktop):** compare the path(s) printed by `install` with **Settings → Developer → Edit Config**, and fully quit Claude Desktop (tray icon → Quit) before reopening.
118
+
117
119
  **`install` asks nothing.** It connects to production, opens your browser so you can click *Connect*, then adds the server
118
120
  to every AI app it finds on this computer. Your other servers are kept, and any config file it changes is backed up next to
119
121
  the original as `<file>.webcake-landing-backup`. No AI app found? It says so and exits with an error: install one and run it again,
package/README.vi.md CHANGED
@@ -102,18 +102,20 @@ Không cần cài đặt, luôn bản mới nhất, cần Node.js 18+. **Một d
102
102
 
103
103
  ```bash
104
104
  # Mở trình duyệt — bấm Kết nối, các IDE trên máy được cấu hình tự động (prod)
105
- npx -y webcake-landing-mcp install
105
+ npx -y webcake-landing-mcp@latest install
106
106
 
107
107
  # Chỉ dành cho dev — từng bước: môi trường, đăng nhập hoặc JWT, org, IDE
108
- npx -y webcake-landing-mcp install --dev
108
+ npx -y webcake-landing-mcp@latest install --dev
109
109
 
110
110
  # Script và CI — mọi IDE được hỗ trợ, kể cả IDE chưa cài
111
- npx -y webcake-landing-mcp install --ide all --jwt <your-jwt>
111
+ npx -y webcake-landing-mcp@latest install --ide all --jwt <your-jwt>
112
112
 
113
113
  # Gỡ server khỏi mọi cấu hình IDE
114
- npx -y webcake-landing-mcp uninstall
114
+ npx -y webcake-landing-mcp@latest uninstall
115
115
  ```
116
116
 
117
+ > **Xử lý sự cố (Claude Desktop):** so sánh đường dẫn `install` in ra với **Settings → Developer → Edit Config**, và thoát hẳn Claude Desktop (icon khay → Quit) rồi mở lại.
118
+
117
119
  **`install` không hỏi gì cả.** Lệnh kết nối tới production, mở trình duyệt để bạn bấm *Kết nối*, rồi thêm server vào mọi ứng dụng AI
118
120
  tìm thấy trên máy. Các server khác của bạn được giữ nguyên, và file cấu hình nào bị đổi đều có bản sao lưu ngay cạnh, tên
119
121
  `<file>.webcake-landing-backup`. Không tìm thấy ứng dụng AI nào? Lệnh báo rõ và thoát với lỗi: hãy cài một ứng dụng rồi chạy lại, hoặc chỉ định bằng `--ide`.
@@ -1,4 +1,11 @@
1
1
  [
2
+ {
3
+ "v": "1.13.7",
4
+ "d": "22/11/2026",
5
+ "type": "Fixed",
6
+ "en": "install now writes the Claude Desktop config to every location Claude may read on Windows (Store/MSIX package containers, Claude-Data,…",
7
+ "vi": "install nay ghi config Claude Desktop vào mọi vị trí Claude có thể đọc trên Windows (container gói Store/MSIX, Claude-Data, %APPDATA%\\Claude) thay…"
8
+ },
2
9
  {
3
10
  "v": "1.13.6",
4
11
  "d": "20/11/2026",
@@ -33,12 +40,5 @@
33
40
  "type": "Added",
34
41
  "en": "A new live-comment element (livestream-style scrolling comment feed above a fake input) is now in the catalog, with full docs in…",
35
42
  "vi": "Danh mục có thêm element live-comment (luồng bình luận kiểu livestream cuộn lên trên một ô input giả), kèm tài liệu đầy đủ trong…"
36
- },
37
- {
38
- "v": "1.13.1",
39
- "d": "20/11/2026",
40
- "type": "Fixed",
41
- "en": "update_page, patch_page, add_section (legacy fallback path), and completing a cached draft via create_page/patch_page/update_page with a draft_id…",
42
- "vi": "update_page, patch_page, add_section (đường fallback cho backend cũ), và việc hoàn tất một draft đã cache qua create_page/patch_page/update_page với…"
43
43
  }
44
44
  ]
package/dist/install.js CHANGED
@@ -116,7 +116,7 @@ function mergeJson(file, launch, env, key = "mcpServers") {
116
116
  mkdirSync(dirname(file), { recursive: true });
117
117
  let cfg = {};
118
118
  if (existsSync(file)) {
119
- const raw = readFileSync(file, "utf8").trim();
119
+ const raw = readFileSync(file, "utf8").replace(/^\uFEFF/, "").trim();
120
120
  if (raw) {
121
121
  try {
122
122
  cfg = JSON.parse(raw);
@@ -144,7 +144,7 @@ function mergeOpencodeJson(file, launch, env) {
144
144
  mkdirSync(dirname(file), { recursive: true });
145
145
  let cfg = {};
146
146
  if (existsSync(file)) {
147
- const raw = readFileSync(file, "utf8").trim();
147
+ const raw = readFileSync(file, "utf8").replace(/^\uFEFF/, "").trim();
148
148
  if (raw) {
149
149
  try {
150
150
  cfg = JSON.parse(raw);
@@ -182,29 +182,82 @@ function configureCodex(launch, env) {
182
182
  writeConfig(cfg, content.trimEnd() + "\n" + block);
183
183
  }
184
184
  // ── IDE config-file locations ────────────────────────────────────────────────
185
- function claudeDesktopPath() {
185
+ // Every location a Claude Desktop build may read its config from. A machine can have
186
+ // several (MSIX/Store package container, Claude-Data, classic %APPDATA%) and only one is
187
+ // the live one, so on Windows we write to all candidates.
188
+ function findConfigsUnder(dir, depth, out) {
189
+ if (depth < 0)
190
+ return;
191
+ let entries;
192
+ try {
193
+ entries = readdirSync(dir, { withFileTypes: true });
194
+ }
195
+ catch {
196
+ return;
197
+ }
198
+ for (const e of entries) {
199
+ const full = join(dir, e.name);
200
+ if (e.isFile() && e.name.toLowerCase() === "claude_desktop_config.json")
201
+ out.push(full);
202
+ else if (e.isDirectory())
203
+ findConfigsUnder(full, depth - 1, out);
204
+ }
205
+ }
206
+ function claudeDesktopPaths() {
186
207
  if (PLAT === "win32") {
187
- // Microsoft Store build is MSIX-sandboxed: it reads/writes config inside
188
- // its package container, NOT %APPDATA%\Claude. Detect that container first
189
- // (the package name is Claude_<publisher-hash>, e.g. Claude_pzs8sxrjxfjjc)
190
- // so installs land in the file the Store app actually loads.
208
+ const found = [];
191
209
  const packages = join(LOCALAPPDATA, "Packages");
192
- if (existsSync(packages)) {
193
- try {
194
- const pkg = readdirSync(packages).find((n) => /^Claude_/i.test(n));
195
- if (pkg) {
196
- return join(packages, pkg, "LocalCache", "Roaming", "Claude", "claude_desktop_config.json");
210
+ try {
211
+ if (existsSync(packages)) {
212
+ for (const n of readdirSync(packages)) {
213
+ if (!/claude/i.test(n))
214
+ continue;
215
+ const cache = join(packages, n, "LocalCache");
216
+ if (existsSync(cache))
217
+ found.push(join(cache, "Roaming", "Claude", "claude_desktop_config.json"));
197
218
  }
198
219
  }
199
- catch {
200
- /* fall through to the Win32 default */
201
- }
202
220
  }
203
- return join(APPDATA, "Claude", "claude_desktop_config.json");
221
+ catch {
222
+ /* ignore */
223
+ }
224
+ try {
225
+ const data = join(LOCALAPPDATA, "Claude-Data");
226
+ if (existsSync(data))
227
+ findConfigsUnder(data, 4, found);
228
+ }
229
+ catch {
230
+ /* ignore */
231
+ }
232
+ const roaming = join(APPDATA, "Claude");
233
+ if (existsSync(roaming) || found.length === 0)
234
+ found.push(join(roaming, "claude_desktop_config.json"));
235
+ const seen = new Set();
236
+ return found.filter((p) => {
237
+ const k = p.toLowerCase();
238
+ if (seen.has(k))
239
+ return false;
240
+ seen.add(k);
241
+ return true;
242
+ });
204
243
  }
205
244
  const mac = join(HOME, "Library", "Application Support", "Claude");
206
245
  const dir = existsSync(mac) ? mac : join(HOME, ".config", "Claude");
207
- return join(dir, "claude_desktop_config.json");
246
+ return [join(dir, "claude_desktop_config.json")];
247
+ }
248
+ function claudeDesktopRunning() {
249
+ try {
250
+ if (PLAT === "win32") {
251
+ const r = spawnSync("tasklist", ["/FI", "IMAGENAME eq claude.exe", "/NH"], { stdio: "pipe", encoding: "utf8" });
252
+ return /claude\.exe/i.test(String(r.stdout ?? ""));
253
+ }
254
+ if (PLAT === "darwin")
255
+ return spawnSync("pgrep", ["-x", "Claude"], { stdio: "pipe" }).status === 0;
256
+ }
257
+ catch {
258
+ /* ignore */
259
+ }
260
+ return false;
208
261
  }
209
262
  function vscodeUserDir() {
210
263
  if (PLAT === "win32")
@@ -237,7 +290,7 @@ function hasClaudeCli() {
237
290
  // install needs no IDE question and never creates config for an app the user lacks.
238
291
  function detectIdes() {
239
292
  const marks = {
240
- "claude-desktop": dirname(claudeDesktopPath()),
293
+ "claude-desktop": "",
241
294
  "claude-code": claudeJsonPath(),
242
295
  cursor: join(HOME, ".cursor"),
243
296
  windsurf: join(HOME, ".codeium", "windsurf"),
@@ -249,7 +302,7 @@ function detectIdes() {
249
302
  kiro: join(HOME, ".kiro"),
250
303
  opencode: dirname(opencodePath()),
251
304
  };
252
- return Object.keys(marks).filter((id) => existsSync(marks[id]) || (id === "claude-code" && hasClaudeCli()));
305
+ return Object.keys(marks).filter((id) => (id === "claude-desktop" ? claudeDesktopPaths().some((p) => existsSync(dirname(p))) : existsSync(marks[id])) || (id === "claude-code" && hasClaudeCli()));
253
306
  }
254
307
  // ── per-IDE configure ────────────────────────────────────────────────────────
255
308
  function configureClaudeCode(launch, env) {
@@ -269,10 +322,21 @@ function configureClaudeCode(launch, env) {
269
322
  }
270
323
  function configureClaudeDesktop(launch, env) {
271
324
  info("Claude Desktop…");
272
- if (mergeJson(claudeDesktopPath(), launch, env)) {
273
- ok(`Claude Desktop configured (${claudeDesktopPath()})`);
274
- warn("Restart Claude Desktop to load the server.");
325
+ if (claudeDesktopRunning()) {
326
+ warn("Claude Desktop đang chạy — thoát hẳn (chuột phải icon khay → Quit) rồi mở lại để nạp server");
275
327
  }
328
+ const paths = claudeDesktopPaths();
329
+ let wrote = 0;
330
+ for (const p of paths) {
331
+ if (mergeJson(p, launch, env)) {
332
+ ok(`Claude Desktop configured (${p})`);
333
+ wrote++;
334
+ }
335
+ }
336
+ if (paths.length > 1)
337
+ info("Wrote to every location Claude Desktop may read its config from.");
338
+ if (wrote)
339
+ warn("Restart Claude Desktop to load the server.");
276
340
  }
277
341
  function configureCursor(launch, env) {
278
342
  info("Cursor…");
@@ -376,7 +440,7 @@ function removeFromJson(file) {
376
440
  if (!existsSync(file))
377
441
  return;
378
442
  try {
379
- const cfg = JSON.parse(readFileSync(file, "utf8"));
443
+ const cfg = JSON.parse(readFileSync(file, "utf8").replace(/^\uFEFF/, ""));
380
444
  const holders = [cfg.mcpServers, cfg.servers].filter((s) => s && s[NAME]);
381
445
  if (holders.length) {
382
446
  for (const s of holders)
@@ -395,7 +459,7 @@ function uninstall() {
395
459
  spawnSync("claude", ["mcp", "remove", NAME], { stdio: "ignore" });
396
460
  [
397
461
  claudeJsonPath(),
398
- claudeDesktopPath(),
462
+ ...claudeDesktopPaths(),
399
463
  join(HOME, ".config", "Claude", "claude_desktop_config.json"),
400
464
  cursorPath(),
401
465
  windsurfPath(),
@@ -410,7 +474,7 @@ function uninstall() {
410
474
  const oc = opencodePath();
411
475
  if (existsSync(oc)) {
412
476
  try {
413
- const cfg = JSON.parse(readFileSync(oc, "utf8"));
477
+ const cfg = JSON.parse(readFileSync(oc, "utf8").replace(/^\uFEFF/, ""));
414
478
  if (cfg.mcp && cfg.mcp[NAME]) {
415
479
  delete cfg.mcp[NAME];
416
480
  writeFileSync(oc, JSON.stringify(cfg, null, 2) + "\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webcake-landing-mcp",
3
- "version": "1.13.6",
3
+ "version": "1.13.7",
4
4
  "description": "MCP server exposing Webcake landing-page element schemas + AI usage hints, and persisting LLM-generated page sources to a Webcake backend.",
5
5
  "mcpName": "io.github.vuluu2k/webcake-landing-mcp",
6
6
  "type": "module",