@cmo-so/mcp 0.12.0 → 0.12.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.
Files changed (2) hide show
  1. package/dist/cmo-mcp.mjs +11 -1
  2. package/package.json +1 -1
package/dist/cmo-mcp.mjs CHANGED
@@ -7199,7 +7199,7 @@ var require_dist = __commonJS({
7199
7199
  // package.json
7200
7200
  var package_default = {
7201
7201
  name: "@cmo-so/cli",
7202
- version: "0.12.0",
7202
+ version: "0.12.1",
7203
7203
  description: "CMO.so on the command line: your websites, ideas, blog posts, LinkedIn queue and results, plus a local MCP server for Claude Desktop, Cursor and other MCP clients.",
7204
7204
  type: "module",
7205
7205
  license: "MIT",
@@ -14838,6 +14838,12 @@ async function call(site, req) {
14838
14838
  const r = await site.request(req);
14839
14839
  if (r.status >= 200 && r.status < 300) return r.data;
14840
14840
  const body = r.data;
14841
+ if (r.status >= 300 && r.status < 400)
14842
+ throw new WpError(
14843
+ `WordPress redirected the request (HTTP ${r.status}): use the site's final address (https, with or without www).`,
14844
+ r.status,
14845
+ "redirect"
14846
+ );
14841
14847
  const msg = typeof body === "object" && body?.message ? body.message.replace(/<[^>]+>/g, "") : `HTTP ${r.status}`;
14842
14848
  const code = typeof body === "object" ? body?.code : void 0;
14843
14849
  if (r.status === 409 && code === "wp_not_connected")
@@ -16326,6 +16332,8 @@ var pageTools = [
16326
16332
  meta: meta4
16327
16333
  }
16328
16334
  });
16335
+ if (!created || typeof created.id !== "number")
16336
+ throw new Error("WordPress didn't create the page (no id came back); nothing was saved.");
16329
16337
  let menu = null;
16330
16338
  if (typeof a.menu_parent === "string") {
16331
16339
  menu = await menuSet(site, {
@@ -16496,6 +16504,8 @@ var pageTools = [
16496
16504
  }
16497
16505
  }
16498
16506
  });
16507
+ if (!created || typeof created.id !== "number")
16508
+ throw new Error("WordPress didn't create the page (no id came back); nothing was saved.");
16499
16509
  return {
16500
16510
  created: true,
16501
16511
  id: created.id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmo-so/mcp",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "CMO.so's MCP server for Claude Desktop, Cursor, VS Code and other MCP clients: manage your websites, blog posts, LinkedIn queue and results with Maggie.",
5
5
  "type": "module",
6
6
  "license": "MIT",