Skip to content

Commit

Permalink
refactor: remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
amtrack committed May 17, 2024
1 parent 9569b70 commit a114c35
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/browserforce.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { MyDomainResolver, Org } from '@salesforce/core';
import { Org } from '@salesforce/core';
import { type Ux } from '@salesforce/sf-plugins-core';
import pRetry, { AbortError } from 'p-retry';
import { Browser, Frame, Page, WaitForOptions, launch } from 'puppeteer';
import * as querystring from 'querystring';
import { URL, parse } from 'url';
import { parse } from 'url';

const POST_LOGIN_PATH = 'setup/forcecomHomepage.apexp';

Expand Down Expand Up @@ -42,17 +42,6 @@ export class Browserforce {
return this;
}

public async resolveDomains(): Promise<void> {
// resolve ip addresses of both LEX and classic domains
const salesforceUrls = [this.getInstanceUrl(), this.getLightningUrl()].filter((u) => u);
for (const salesforceUrl of salesforceUrls) {
const resolver = await MyDomainResolver.create({
url: new URL(salesforceUrl)
});
await resolver.resolve();
}
}

public async throwPageErrors(page: Page): Promise<void> {
await throwPageErrors(page);
}
Expand All @@ -62,8 +51,6 @@ export class Browserforce {
let page;
const result = await pRetry(
async () => {
// there seems to be an issue with Enhanced Domains
// await this.resolveDomains();
page = await this.browser.newPage();
page.setDefaultNavigationTimeout(parseInt(process.env.BROWSERFORCE_NAVIGATION_TIMEOUT_MS ?? '90000', 10));
await page.setViewport({ width: 1024, height: 768 });
Expand Down

0 comments on commit a114c35

Please sign in to comment.