@gethmy/mcp 2.2.0 → 2.2.2

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/http.js CHANGED
@@ -26,6 +26,7 @@ var __export = (target, all) => {
26
26
  set: (newValue) => all[name] = () => newValue
27
27
  });
28
28
  };
29
+ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
29
30
  var __require = import.meta.require;
30
31
 
31
32
  // src/http.ts
@@ -1637,7 +1638,7 @@ var cors = (options) => {
1637
1638
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
1638
1639
  import { homedir } from "os";
1639
1640
  import { join } from "path";
1640
- var DEFAULT_API_URL = "https://gethmy.com/api";
1641
+ var DEFAULT_API_URL = "https://app.gethmy.com/api";
1641
1642
  var LOCAL_CONFIG_FILENAME = ".harmony-mcp.json";
1642
1643
  function getConfigDir() {
1643
1644
  return join(homedir(), ".harmony-mcp");
@@ -1730,7 +1731,7 @@ function hasLocalConfig(cwd) {
1730
1731
  function getApiKey() {
1731
1732
  const config = loadConfig();
1732
1733
  if (!config.apiKey) {
1733
- throw new Error(`Not configured. Run "harmony-mcp configure" to set your API key.
1734
+ throw new Error(`Not configured. Run "npx @gethmy/mcp setup" to set your API key.
1734
1735
  ` + "You can generate an API key at https://gethmy.com \u2192 Settings \u2192 API Keys.");
1735
1736
  }
1736
1737
  return config.apiKey;
@@ -1823,6 +1824,7 @@ var app = new Hono2;
1823
1824
  app.use("/*", cors({
1824
1825
  origin: [
1825
1826
  "https://gethmy.com",
1827
+ "https://app.gethmy.com",
1826
1828
  "http://localhost:8080",
1827
1829
  "http://localhost:3000"
1828
1830
  ],
@@ -1841,7 +1843,7 @@ async function forwardToApi(method, path, authHeader, apiKey, body) {
1841
1843
  if (apiKey) {
1842
1844
  headers["X-API-Key"] = apiKey;
1843
1845
  } else if (authHeader) {
1844
- headers["Authorization"] = authHeader;
1846
+ headers.Authorization = authHeader;
1845
1847
  } else {
1846
1848
  throw new Error("Unauthorized: Missing API key or Authorization header");
1847
1849
  }
@@ -1899,7 +1901,7 @@ async function handleRequest(c, method, path) {
1899
1901
  try {
1900
1902
  const authHeader = c.req.header("Authorization");
1901
1903
  const apiKey = c.req.header("X-API-Key");
1902
- let body = undefined;
1904
+ let body;
1903
1905
  if (["POST", "PATCH", "PUT"].includes(method)) {
1904
1906
  try {
1905
1907
  body = await c.json();