@absolutejs/voice 0.0.22-beta.174 → 0.0.22-beta.175
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +26 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11917,11 +11917,33 @@ var renderVoiceDeliveryRuntimeHTML = (report, options = {}) => {
|
|
|
11917
11917
|
const title = options.title ?? "AbsoluteJS Voice Delivery Runtime";
|
|
11918
11918
|
const tickForm = options.tickPath === false ? "" : `<form method="post" action="${escapeHtml16(options.tickPath ?? "/api/voice-delivery-runtime/tick")}"><button type="submit">Tick delivery workers</button></form>`;
|
|
11919
11919
|
const requeueForm = options.requeueDeadLettersPath === false ? "" : `<form method="post" action="${escapeHtml16(options.requeueDeadLettersPath ?? "/api/voice-delivery-runtime/requeue-dead-letters")}"><button type="submit">Requeue dead letters</button></form>`;
|
|
11920
|
-
|
|
11920
|
+
const snippet = escapeHtml16(`const deliveryRuntime = createVoiceDeliveryRuntime(
|
|
11921
|
+
createVoiceDeliveryRuntimePresetConfig({
|
|
11922
|
+
audit: {
|
|
11923
|
+
deliveries: runtimeStorage.auditDeliveries,
|
|
11924
|
+
leases: runtimeStorage.auditDeliveryLeases,
|
|
11925
|
+
sinks: [auditSink],
|
|
11926
|
+
workerId: 'voice-audit-delivery'
|
|
11927
|
+
},
|
|
11928
|
+
trace: {
|
|
11929
|
+
deliveries: runtimeStorage.traceDeliveries,
|
|
11930
|
+
leases: runtimeStorage.traceDeliveryLeases,
|
|
11931
|
+
sinks: [traceSink],
|
|
11932
|
+
workerId: 'voice-trace-delivery'
|
|
11933
|
+
}
|
|
11934
|
+
})
|
|
11935
|
+
);
|
|
11936
|
+
|
|
11937
|
+
app.use(createVoiceDeliveryRuntimeRoutes({ runtime: deliveryRuntime }));
|
|
11921
11938
|
|
|
11922
|
-
|
|
11923
|
-
|
|
11924
|
-
|
|
11939
|
+
app.use(
|
|
11940
|
+
createVoiceProductionReadinessRoutes({
|
|
11941
|
+
deliveryRuntime,
|
|
11942
|
+
auditDeliveries: runtimeStorage.auditDeliveries,
|
|
11943
|
+
traceDeliveries: runtimeStorage.traceDeliveries
|
|
11944
|
+
})
|
|
11945
|
+
);`);
|
|
11946
|
+
return `<!doctype html><html lang="en"><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title>${escapeHtml16(title)}</title><style>body{background:#0f1411;color:#f7f2df;font-family:ui-sans-serif,system-ui,sans-serif;margin:0}main{margin:auto;max-width:1080px;padding:32px}a{color:#86efac;text-decoration:none}.hero{background:linear-gradient(135deg,rgba(34,197,94,.18),rgba(14,165,233,.13));border:1px solid #263a30;border-radius:28px;margin-bottom:18px;padding:28px}.eyebrow{color:#86efac;font-weight:900;letter-spacing:.12em;text-transform:uppercase}h1{font-size:clamp(2.2rem,5vw,4.8rem);line-height:.92;margin:.2rem 0 1rem}.status{border:1px solid #64748b;border-radius:999px;display:inline-flex;font-weight:900;padding:8px 12px}.status.running{border-color:rgba(34,197,94,.7);color:#bbf7d0}.muted{color:#b9c3b4}.grid{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));margin:18px 0}article,.card{background:#151d18;border:1px solid #263a30;border-radius:22px;padding:18px}.primitive{background:#111a15;border-color:#41604a}article span{color:#b9c3b4;display:block;font-weight:800}article strong{display:block;font-size:2.3rem;margin-top:8px}.actions{display:flex;flex-wrap:wrap;gap:10px}button{background:#86efac;border:0;border-radius:999px;color:#07120b;cursor:pointer;font-weight:900;margin-top:12px;padding:10px 14px}pre{background:#09100c;border:1px solid #263a30;border-radius:18px;color:#dcfce7;overflow:auto;padding:16px}.primitive p{color:#c8d8ca;line-height:1.55}.primitive code{color:#bbf7d0}</style></head><body><main><p><a href="/delivery-sinks">Delivery sinks</a></p><section class="hero"><p class="eyebrow">Worker control plane</p><h1>${escapeHtml16(title)}</h1><p class="muted">Inspect queue summaries, manually tick failed/pending audit and trace deliveries, and requeue dead letters after operator review.</p><p class="status ${report.isRunning ? "running" : ""}">${report.isRunning ? "Running" : "Stopped"}</p><p class="muted">Checked ${escapeHtml16(new Date(report.checkedAt).toLocaleString())}</p><div class="actions">${tickForm}${requeueForm}</div></section><section class="grid">${renderSummaryCard("Audit", report.summary.audit)}${renderSummaryCard("Trace", report.summary.trace)}</section><section class="card primitive"><p class="eyebrow">Copy into your app</p><h2><code>createVoiceDeliveryRuntimeRoutes(...)</code> builds this control plane</h2><p>Own the audit and trace delivery queues in your app, mount one runtime route group, and pass the same runtime into production readiness so failed or dead-lettered exports block deploys.</p><pre><code>${snippet}</code></pre></section></main></body></html>`;
|
|
11925
11947
|
};
|
|
11926
11948
|
var createVoiceDeliveryRuntimeRoutes = (options) => {
|
|
11927
11949
|
const path = options.path ?? "/api/voice-delivery-runtime";
|