vargai 0.4.0-alpha93 → 0.4.0-alpha95

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/package.json CHANGED
@@ -104,7 +104,7 @@
104
104
  "license": "Apache-2.0",
105
105
  "author": "varg.ai <hello@varg.ai> (https://varg.ai)",
106
106
  "sideEffects": false,
107
- "version": "0.4.0-alpha93",
107
+ "version": "0.4.0-alpha95",
108
108
  "exports": {
109
109
  ".": "./src/index.ts",
110
110
  "./ai": "./src/ai-sdk/index.ts",
@@ -85,6 +85,52 @@ const CREDIT_PACKAGES = [
85
85
  },
86
86
  ];
87
87
 
88
+ // Common disposable email domains for fast client-side rejection.
89
+ // The server enforces a comprehensive 55k+ domain blocklist (mailchecker);
90
+ // this is just for instant UX feedback on the most common offenders.
91
+ const DISPOSABLE_DOMAINS = new Set([
92
+ "guerrillamail.com",
93
+ "guerrillamailblock.com",
94
+ "guerrillamail.net",
95
+ "guerrillamail.org",
96
+ "guerrillamail.de",
97
+ "grr.la",
98
+ "sharklasers.com",
99
+ "guerrilla.ml",
100
+ "yopmail.com",
101
+ "yopmail.fr",
102
+ "yopmail.net",
103
+ "tempmail.com",
104
+ "temp-mail.org",
105
+ "temp-mail.io",
106
+ "mailinator.com",
107
+ "mailinator2.com",
108
+ "throwaway.email",
109
+ "trashmail.com",
110
+ "trashmail.net",
111
+ "trashmail.me",
112
+ "10minutemail.com",
113
+ "10minutemail.net",
114
+ "dispostable.com",
115
+ "maildrop.cc",
116
+ "fakeinbox.com",
117
+ "mailnesia.com",
118
+ "tempail.com",
119
+ "tempr.email",
120
+ "discard.email",
121
+ "discardmail.com",
122
+ "mohmal.com",
123
+ "burpcollaborator.net",
124
+ ]);
125
+
126
+ function isDisposableDomain(domain: string): boolean {
127
+ if (DISPOSABLE_DOMAINS.has(domain)) return true;
128
+ for (const d of DISPOSABLE_DOMAINS) {
129
+ if (domain.endsWith(`.${d}`)) return true;
130
+ }
131
+ return false;
132
+ }
133
+
88
134
  function formatCents(cents: number): string {
89
135
  return `$${(cents / 100).toLocaleString("en-US", { minimumFractionDigits: 0 })}`;
90
136
  }
@@ -228,6 +274,17 @@ async function loginWithEmail(): Promise<LoginResult | null> {
228
274
  return null;
229
275
  }
230
276
 
277
+ // Quick client-side check for common disposable email domains.
278
+ // The server enforces a comprehensive 55k+ domain blocklist (mailchecker);
279
+ // this is just for faster UX feedback on the most common offenders.
280
+ const domain = email.split("@")[1]?.toLowerCase();
281
+ if (domain && isDisposableDomain(domain)) {
282
+ log.error(
283
+ "Disposable email addresses are not allowed. Please use a permanent email address.",
284
+ );
285
+ return null;
286
+ }
287
+
231
288
  // Send OTP
232
289
  console.log();
233
290
  process.stdout.write(