файл пакета→ .shtukbase/packages/lenses/kit/server/queue.html
kit/server/queue.html
12 строк, 1.0 КБ.
Файл как есть в пакете: код и комментарии в нём не переводятся.
- <!doctype html><meta charset="utf-8"><title>q</title><div id="out">none</div>
- <script>
- const call = (o) => fetch('/_api', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(o) }).then((r) => r.json());
- (async () => {
- const before = (await call({ do: 'records', from: 'questions' })).result.filter((r) => r.status === 'open');
- await call({ do: 'patch', path: before[0].path, set: { status: 'answered', answer: 'option B' } });
- const after = (await call({ do: 'records', from: 'questions' })).result.filter((r) => r.status === 'open');
- const md = (await (await fetch('../notes/readme.md')).text()).trim();
- const out = await call({ do: 'read', path: '../secret.txt' }), dot = await call({ do: 'read', path: '.env' });
- document.getElementById('out').textContent = ['open before ' + before.length, 'open after ' + after.length, 'md: ' + md, 'outside: ' + (out.error || 'LEAK'), 'dot: ' + (dot.error || 'LEAK')].join(' | ');
- })().catch((e) => { document.getElementById('out').textContent = 'ERR ' + e; });
- </script>