@postrun/react 2.2.0 → 2.3.0
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 +35 -22
- package/dist/index.d.ts +35 -22
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -619,6 +619,8 @@ async function uploadBytes(target, file, options = {}) {
|
|
|
619
619
|
}
|
|
620
620
|
|
|
621
621
|
// src/media.ts
|
|
622
|
+
var MEDIA_POLL_INTERVAL_MS = 1500;
|
|
623
|
+
var MEDIA_POLL_TIMEOUT_MS = 30 * 60 * 1e3;
|
|
622
624
|
async function pollUntilSettled(client, id, signal, onTick) {
|
|
623
625
|
let latest;
|
|
624
626
|
await pWaitFor__default.default(
|
|
@@ -630,7 +632,7 @@ async function pollUntilSettled(client, id, signal, onTick) {
|
|
|
630
632
|
onTick?.(latest);
|
|
631
633
|
return latest.status === "ready" || latest.status === "failed";
|
|
632
634
|
},
|
|
633
|
-
{ interval:
|
|
635
|
+
{ interval: MEDIA_POLL_INTERVAL_MS, timeout: MEDIA_POLL_TIMEOUT_MS }
|
|
634
636
|
);
|
|
635
637
|
if (!latest) {
|
|
636
638
|
throw new Error("Media polling returned no result.");
|
|
@@ -642,8 +644,6 @@ async function runUpload(client, file, options, signal, callbacks) {
|
|
|
642
644
|
client,
|
|
643
645
|
body: {
|
|
644
646
|
profile_id: options.profileId,
|
|
645
|
-
kind: options.kind,
|
|
646
|
-
content_type: options.contentType,
|
|
647
647
|
targets: options.targets,
|
|
648
648
|
raw: options.raw,
|
|
649
649
|
alt_text: options.altText,
|