Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sharepoint branch updated to work on M1/M2 macs #490

Open
wants to merge 3 commits into
base: sharepoint
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fixing a couple of issues here...
src/LoginModules.ts:14:20 - error TS2503: Cannot find namespace 'puppeteer'.
src/TokenCache.ts:60:20 - error TS2503: Cannot find namespace 'puppeteer'.
and...
src/TokenCache.ts:99:24 - error TS2339: Property 'waitFor' does not exist on type 'Page'.

These are fixed by simple oneliner changes.
  • Loading branch information
hakt0-r committed Jun 24, 2023
commit c46f219e08f13cd0148bcee635959cba78547be8
2 changes: 1 addition & 1 deletion src/LoginModules.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { logger } from './Logger';
import puppeteer from 'puppeteer';
import * as puppeteer from 'puppeteer';
import { getPuppeteerChromiumPath } from './PuppeteerHelper';
import { chromeCacheFolder } from './destreamer';
import { argv } from './CommandLineParser';
Expand Down
4 changes: 2 additions & 2 deletions src/TokenCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { StreamSession } from './Types';

import fs from 'fs';
import jwtDecode from 'jwt-decode';
import puppeteer from 'puppeteer';
import * as puppeteer from 'puppeteer';


export class TokenCache {
Expand Down Expand Up @@ -96,7 +96,7 @@ export async function refreshSession(url: string): Promise<StreamSession> {

session = null;
tries++;
await page.waitFor(3000);
await page.waitForTimeout(3000);
}
}
browser.close();
Expand Down