diff --git a/README.md b/README.md index 7f51f6a..5ab91f4 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ Access at `http://localhost:3000` to: --- -## 🆕 Account Creator +## 🆕 Account Creator (BETA) Automatically create new Microsoft accounts with referral link support: diff --git a/src/account-creation/AccountCreator.ts b/src/account-creation/AccountCreator.ts index 32ba8cc..0412f7b 100644 --- a/src/account-creation/AccountCreator.ts +++ b/src/account-creation/AccountCreator.ts @@ -1,10 +1,10 @@ -import type { Page, BrowserContext } from 'playwright' -import { log } from '../util/Logger' -import { DataGenerator } from './DataGenerator' -import { CreatedAccount } from './types' import fs from 'fs' import path from 'path' import * as readline from 'readline' +import type { BrowserContext, Page } from 'rebrowser-playwright' +import { log } from '../util/Logger' +import { DataGenerator } from './DataGenerator' +import { CreatedAccount } from './types' export class AccountCreator { private page!: Page diff --git a/src/util/Load.ts b/src/util/Load.ts index df4f4bf..a174652 100644 --- a/src/util/Load.ts +++ b/src/util/Load.ts @@ -362,11 +362,11 @@ export function loadAccounts(): Account[] { if (recoveryRequired) { if (typeof a.recoveryEmail !== 'string') { - throw new Error(`account ${a.email || ''} must include a recoveryEmail string`) + throw new Error(`account ${a.email || ''} must include a recoveryEmail string (or set "recoveryRequired": false)`) } a.recoveryEmail = String(a.recoveryEmail).trim() if (!a.recoveryEmail || !/@/.test(a.recoveryEmail)) { - throw new Error(`account ${a.email} recoveryEmail must be a valid email address`) + throw new Error(`account ${a.email} recoveryEmail must be a valid email address (got: "${a.recoveryEmail}") - set "recoveryRequired": false if not needed`) } } else { if (typeof a.recoveryEmail === 'string' && a.recoveryEmail.trim() !== '') {