@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.
- package/README.md +8 -6
- package/dist/index.js +17 -4
- package/dist/index.js.map +2 -2
- package/dist/setup/wizard.js +17 -4
- package/dist/setup/wizard.js.map +2 -2
- package/package.json +1 -1
package/dist/setup/wizard.js
CHANGED
|
@@ -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
|
-
|
|
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(
|
|
2876
|
+
}).finally(() => {
|
|
2877
|
+
closePrompts();
|
|
2878
|
+
process.exit(0);
|
|
2879
|
+
});
|
|
2867
2880
|
//# sourceMappingURL=wizard.js.map
|