@marlinjai/email-mcp 1.4.1 → 1.4.3

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.
@@ -56,13 +56,19 @@ async function askChoice(message, choices) {
56
56
  function askPassword(message) {
57
57
  return new Promise((resolve) => {
58
58
  output.write(`${message} `);
59
- if (!input.isTTY || typeof input.setRawMode !== "function") {
59
+ closePrompts();
60
+ let rawModeOk = true;
61
+ try {
62
+ input.setRawMode(true);
63
+ } catch {
64
+ rawModeOk = false;
65
+ }
66
+ if (!rawModeOk) {
60
67
  const rl = getInterface();
61
68
  rl.question("").then(resolve);
62
69
  return;
63
70
  }
64
71
  let value = "";
65
- input.setRawMode(true);
66
72
  input.resume();
67
73
  input.setEncoding("utf8");
68
74
  const cleanup = () => {
@@ -274,7 +280,11 @@ import { OAuth2Client } from "google-auth-library";
274
280
  import crypto2 from "node:crypto";
275
281
  var GMAIL_SCOPES = [
276
282
  "https://mail.google.com/",
277
- "https://www.googleapis.com/auth/gmail.modify"
283
+ "https://www.googleapis.com/auth/gmail.modify",
284
+ // Mailbox content access (above) does NOT cover the Settings API —
285
+ // Google treats them as separate permission domains. Needed for
286
+ // users.settings.filters.* (email_create_block_rule/list/delete).
287
+ "https://www.googleapis.com/auth/gmail.settings.basic"
278
288
  ];
279
289
  var GmailAuth = class {
280
290
  clientId;
@@ -2863,5 +2873,8 @@ main().catch((err) => {
2863
2873
  console.error(`
2864
2874
  Setup failed: ${err.message}`);
2865
2875
  process.exit(1);
2866
- }).finally(closePrompts);
2876
+ }).finally(() => {
2877
+ closePrompts();
2878
+ process.exit(0);
2879
+ });
2867
2880
  //# sourceMappingURL=wizard.js.map