@postrun/react 2.2.0 → 2.2.1
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 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -608,6 +608,8 @@ async function uploadBytes(target, file, options = {}) {
|
|
|
608
608
|
}
|
|
609
609
|
|
|
610
610
|
// src/media.ts
|
|
611
|
+
var MEDIA_POLL_INTERVAL_MS = 1500;
|
|
612
|
+
var MEDIA_POLL_TIMEOUT_MS = 30 * 60 * 1e3;
|
|
611
613
|
async function pollUntilSettled(client, id, signal, onTick) {
|
|
612
614
|
let latest;
|
|
613
615
|
await pWaitFor(
|
|
@@ -619,7 +621,7 @@ async function pollUntilSettled(client, id, signal, onTick) {
|
|
|
619
621
|
onTick?.(latest);
|
|
620
622
|
return latest.status === "ready" || latest.status === "failed";
|
|
621
623
|
},
|
|
622
|
-
{ interval:
|
|
624
|
+
{ interval: MEDIA_POLL_INTERVAL_MS, timeout: MEDIA_POLL_TIMEOUT_MS }
|
|
623
625
|
);
|
|
624
626
|
if (!latest) {
|
|
625
627
|
throw new Error("Media polling returned no result.");
|