@postrun/react 2.15.0 → 2.17.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 +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -612,7 +612,10 @@ async function runUpload(client, file, options, signal, callbacks) {
|
|
|
612
612
|
}
|
|
613
613
|
})).data;
|
|
614
614
|
if (created.upload) {
|
|
615
|
-
await js.
|
|
615
|
+
await js.uploadFile(file, {
|
|
616
|
+
mediaId: created.id,
|
|
617
|
+
session: created.upload,
|
|
618
|
+
client,
|
|
616
619
|
onProgress: callbacks.onProgress,
|
|
617
620
|
signal
|
|
618
621
|
});
|
|
@@ -939,9 +942,6 @@ function resourceFor(ref, fallback) {
|
|
|
939
942
|
}
|
|
940
943
|
return fallback?.find((asset) => asset.id === ref.media_id);
|
|
941
944
|
}
|
|
942
|
-
function renditionFor(asset, target) {
|
|
943
|
-
return asset.per_platform[target];
|
|
944
|
-
}
|
|
945
945
|
function resolveVariantMedia(refs, target, fallback) {
|
|
946
946
|
return (refs ?? []).flatMap((ref) => {
|
|
947
947
|
const asset = resourceFor(ref, fallback);
|
|
@@ -955,7 +955,7 @@ function resolveVariantMedia(refs, target, fallback) {
|
|
|
955
955
|
const alt = ref.alt_text_override ?? asset.alt_text ?? void 0;
|
|
956
956
|
const width = asset.source?.width ?? void 0;
|
|
957
957
|
const height = asset.source?.height ?? void 0;
|
|
958
|
-
const rendition =
|
|
958
|
+
const rendition = asset.per_platform[target];
|
|
959
959
|
if (asset.status === "ready" && rendition?.status === "ready" && rendition.url) {
|
|
960
960
|
return [
|
|
961
961
|
{
|