okay codium agent
This commit is contained in:
parent
513eea8d14
commit
a1542bcec5
|
@ -42,8 +42,8 @@ const page = await browser.newPage();
|
|||
await page.setUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36");
|
||||
|
||||
async function maybeGetError(handle: JSHandle) {
|
||||
return (handle as JSHandle<Error>)?.getProperty("message")
|
||||
.then(m => m.jsonValue());
|
||||
return (handle as JSHandle<Error>).getProperty("message")
|
||||
.then(m => m?.jsonValue() ?? "Unknown Error");
|
||||
}
|
||||
|
||||
const report = {
|
||||
|
@ -356,7 +356,9 @@ async function runtime(token: string) {
|
|||
// setImmediate to avoid blocking the factory patching execution while checking for lazy chunks
|
||||
setTimeout(() => {
|
||||
let isResolved = false;
|
||||
searchAndLoadLazyChunks(String(factory)).then(() => isResolved = true);
|
||||
searchAndLoadLazyChunks(String(factory))
|
||||
.then(() => isResolved = true)
|
||||
.catch(() => isResolved = true);
|
||||
|
||||
chunksSearchPromises.push(() => isResolved);
|
||||
}, 0);
|
||||
|
@ -364,7 +366,9 @@ async function runtime(token: string) {
|
|||
|
||||
for (const factoryId in wreq.m) {
|
||||
let isResolved = false;
|
||||
searchAndLoadLazyChunks(String(wreq.m[factoryId])).then(() => isResolved = true);
|
||||
searchAndLoadLazyChunks(String(wreq.m[factoryId]))
|
||||
.then(() => isResolved = true)
|
||||
.catch(() => isResolved = true);
|
||||
|
||||
chunksSearchPromises.push(() => isResolved);
|
||||
}
|
||||
|
|
|
@ -76,6 +76,8 @@ export const factoryListeners = new Set<(factory: ModuleFactory) => void>();
|
|||
|
||||
export function _initWebpack(webpackRequire: WebpackRequire) {
|
||||
wreq = webpackRequire;
|
||||
|
||||
if (webpackRequire.c == null) return;
|
||||
cache = webpackRequire.c;
|
||||
|
||||
Reflect.defineProperty(webpackRequire.c, Symbol.toStringTag, {
|
||||
|
@ -507,10 +509,10 @@ export function search(...filters: Array<string | RegExp>) {
|
|||
outer:
|
||||
for (const id in factories) {
|
||||
const factory = factories[id];
|
||||
const str = String(factory);
|
||||
const factoryStr = String(factory);
|
||||
for (const filter of filters) {
|
||||
if (typeof filter === "string" && !str.includes(filter)) continue outer;
|
||||
if (filter instanceof RegExp && !filter.test(str)) continue outer;
|
||||
if (typeof filter === "string" && !factoryStr.includes(factoryStr)) continue outer;
|
||||
if (filter instanceof RegExp && !filter.test(factoryStr)) continue outer;
|
||||
}
|
||||
results[id] = factory;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue