@smplkit/sdk 3.0.10 → 3.0.12
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.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -16725,10 +16725,10 @@ var AuditEventBuffer = class {
|
|
|
16725
16725
|
void this._drainOnce();
|
|
16726
16726
|
}
|
|
16727
16727
|
}
|
|
16728
|
-
/** Block (cooperatively) until the buffer is
|
|
16728
|
+
/** Block (cooperatively) until the buffer is idle or `timeoutMs` elapses. */
|
|
16729
16729
|
async flush(timeoutMs = 5e3) {
|
|
16730
16730
|
const deadline = Date.now() + timeoutMs;
|
|
16731
|
-
while (this._queue.length > 0) {
|
|
16731
|
+
while (this._queue.length > 0 || this._draining) {
|
|
16732
16732
|
if (Date.now() >= deadline) {
|
|
16733
16733
|
console.warn(`[smplkit.audit] flush timed out after ${timeoutMs}ms`);
|
|
16734
16734
|
return;
|
|
@@ -16873,7 +16873,7 @@ var EventsClient = class {
|
|
|
16873
16873
|
* reject those with a 403 (the buffer logs and drops permanent
|
|
16874
16874
|
* failures, so a misuse will silently disappear from the queue).
|
|
16875
16875
|
*/
|
|
16876
|
-
|
|
16876
|
+
record(input) {
|
|
16877
16877
|
const body = {
|
|
16878
16878
|
data: { type: "event", attributes: _attributesFromInput(input) }
|
|
16879
16879
|
};
|