Add Prettier and ESLint tooling (Refs #77)

This commit is contained in:
2026-10-09 15:56:13 -04:00
parent 8ed059b8d3
commit 16469e2d43
711 changed files with 99737 additions and 28286 deletions
+11 -4
View File
@@ -6,12 +6,19 @@ let sequence = 0;
/** Live diagnostics only. Durable operation milestones belong in provisioning history. */
export function workerActivity(): WorkerActivity[] {
return [...active.values()].map(value => ({ ...value }));
return [...active.values()].map((value) => ({ ...value }));
}
export async function trackActivity<T>(key: string, label: string, work: () => Promise<T>): Promise<T> {
export async function trackActivity<T>(
key: string,
label: string,
work: () => Promise<T>
): Promise<T> {
if (active.has(key)) key = `${key}:${++sequence}`;
active.set(key, { key, label, startedAt: new Date().toISOString() });
try { return await withOperationSource(currentOperationSource() ?? label, work); }
finally { active.delete(key); }
try {
return await withOperationSource(currentOperationSource() ?? label, work);
} finally {
active.delete(key);
}
}