drops-mcp 0.2.1 → 0.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.
Files changed (2) hide show
  1. package/drop.mjs +3 -1
  2. package/package.json +1 -1
package/drop.mjs CHANGED
@@ -815,7 +815,9 @@ async function saveApiKey(key) {
815
815
  }
816
816
  function openBrowser(url) {
817
817
  const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
818
- try { spawnSync(cmd, [url], { stdio: "ignore", shell: process.platform === "win32" }); } catch {}
818
+ // Detached + non-blocking: spawnSync would HANG the login (and its poll loop) if the
819
+ // opener doesn't return promptly — e.g. on headless machines where xdg-open stalls.
820
+ try { const c = spawn(cmd, [url], { stdio: "ignore", shell: process.platform === "win32", detached: true }); c.unref(); } catch {}
819
821
  }
820
822
  async function cmdLogin(opts) {
821
823
  if (opts.token && opts.token.startsWith("drop_")) { await saveApiKey(opts.token); ok("API key saved"); return cmdWhoami(); }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drops-mcp",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Open-source artifact sharing — publish HTML/Markdown/files as branded, password-protected, zero-knowledge links on your own domain, from any AI agent. CLI + MCP server. The open-source, self-hosted Stacktree alternative.",
5
5
  "type": "module",
6
6
  "bin": {