chore: clean up logs
This commit is contained in:
parent
576d5e5518
commit
b4e4570802
@ -28,7 +28,6 @@ export default async (CDP, evaluate, { browserType, dataPath }) => {
|
|||||||
let produced = [], done = false;
|
let produced = [], done = false;
|
||||||
|
|
||||||
const unhook = CDP.on('Page.compilationCacheProduced', ({ params: { url, data }}) => {
|
const unhook = CDP.on('Page.compilationCacheProduced', ({ params: { url, data }}) => {
|
||||||
// console.log('produced', url);
|
|
||||||
produced.push({ url, data });
|
produced.push({ url, data });
|
||||||
|
|
||||||
process.stdout.write(`v8Cache: caching... (${produced.length}/${urls.length})\r`);
|
process.stdout.write(`v8Cache: caching... (${produced.length}/${urls.length})\r`);
|
||||||
@ -46,7 +45,6 @@ export default async (CDP, evaluate, { browserType, dataPath }) => {
|
|||||||
|
|
||||||
if (reload) {
|
if (reload) {
|
||||||
if (finishOnLoad) CDP.on('Page.frameStoppedLoading', async () => {
|
if (finishOnLoad) CDP.on('Page.frameStoppedLoading', async () => {
|
||||||
// console.log('loaded');
|
|
||||||
await new Promise(res => setTimeout(res, 2000));
|
await new Promise(res => setTimeout(res, 2000));
|
||||||
if (done) return;
|
if (done) return;
|
||||||
|
|
||||||
@ -80,7 +78,6 @@ export default async (CDP, evaluate, { browserType, dataPath }) => {
|
|||||||
const cache = JSON.parse(await readFile(path, 'utf8'));
|
const cache = JSON.parse(await readFile(path, 'utf8'));
|
||||||
|
|
||||||
for (const entry of cache) {
|
for (const entry of cache) {
|
||||||
// console.log('loaded', entry);
|
|
||||||
CDP.send('Page.addCompilationCache', entry);
|
CDP.send('Page.addCompilationCache', entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,8 +8,6 @@ const presets = { // Presets from OpenAsar
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default async ({ browserPath, dataPath }, { url, windowSize, allowHTTP, extensions }, extra) => {
|
export default async ({ browserPath, dataPath }, { url, windowSize, allowHTTP, extensions }, extra) => {
|
||||||
console.log(extensions);
|
|
||||||
|
|
||||||
return await StartBrowser(browserPath, [
|
return await StartBrowser(browserPath, [
|
||||||
`--app=${url}`,
|
`--app=${url}`,
|
||||||
`--user-data-dir=${dataPath}`,
|
`--user-data-dir=${dataPath}`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user