保存工作区合并前的本地开发现场 ledger-migration-typed-54c0587
This commit is contained in:
1 parent
54c05879d5
commit
d18273ac37
82 files changed
+8878
-4757
No files matched your search
@@ -216,6 +216,14 @@ async function run(browser, group, scenario, version) {
|
||||
}
|
||||
if (!fresh && pages.has(role)) return pages.get(role);
|
||||
const p = await contexts.get(role).newPage();
|
||||
if (version === 'new') p.on('response',async res=>{
|
||||
const pathname=new URL(res.url()).pathname;
|
||||
if(res.status()!==200 || !/^\/api\/(?:related-price-locks|price-lock|material-pools)/.test(pathname)) return;
|
||||
const form=res.request();
|
||||
if (!res.headers()['content-type']?.includes('json')) return;
|
||||
try{const body=await res.json();fs.appendFileSync('/tmp/ledger-lock-shapes.ndjson',JSON.stringify({path:pathname,method:form.method(),body})+'\n');}
|
||||
catch(e){if(!p.isClosed())console.error(pathname,e.message);}
|
||||
});
|
||||
await p.clock.setFixedTime(new Date(clockStart));
|
||||
p.on('dialog', dialog => dialog.accept());
|
||||
await p.goto(base + (version === 'old' ? '/' : '/next/'));
|
||||
|
||||
Reference in new issue
Block a user