@greennx/sales-mcp 1.2.0 → 1.3.0

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.
@@ -7,12 +7,22 @@ import { mkdirSync, copyFileSync, existsSync, readFileSync, writeFileSync } from
7
7
  import { join, dirname } from "node:path";
8
8
  import { fileURLToPath } from "node:url";
9
9
  import { homedir, platform } from "node:os";
10
+ import { createInterface } from "node:readline";
10
11
  var here = dirname(fileURLToPath(import.meta.url));
11
12
  var DIST_DIR = join(here, "..");
12
13
  var BUNDLE_SRC = join(DIST_DIR, "bundle.cjs");
13
14
  var IS_WIN = platform() === "win32";
14
15
  var IS_MAC = platform() === "darwin";
15
16
  var CLAUDE_CMD = IS_WIN ? "claude.cmd" : "claude";
17
+ function promptToken() {
18
+ const rl = createInterface({ input: process.stdin, output: process.stdout });
19
+ return new Promise((resolve) => {
20
+ rl.question(` ${bold("Greenn token:")} `, (answer) => {
21
+ rl.close();
22
+ resolve(answer.trim());
23
+ });
24
+ });
25
+ }
16
26
  function expandTilde(p) {
17
27
  if (p === "~") return homedir();
18
28
  if (p.startsWith("~/") || p.startsWith("~\\")) return join(homedir(), p.slice(2));
@@ -243,12 +253,15 @@ if (command === "setup") {
243
253
  },
244
254
  strict: false
245
255
  });
246
- const token = values["token"];
256
+ let token = values["token"];
257
+ if (!token) {
258
+ console.log(`
259
+ ${dim("Tip: paste your token here to avoid shell escaping issues with special characters.")}`);
260
+ token = await promptToken();
261
+ }
247
262
  if (!token) {
248
263
  console.error(`
249
- ${red("error")} --token is required
250
- `);
251
- console.error(` Run ${cyan('"sales-mcp setup --help"')} for more information.
264
+ ${red("error")} token is required
252
265
  `);
253
266
  process.exit(1);
254
267
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greennx/sales-mcp",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "MCP server for AI-generated landing pages on the Greenn Sales platform",
5
5
  "type": "module",
6
6
  "bin": {