npm package diff
Package: @forge/bridge
Versions: 5.7.0-next.9-experimental-04e7c02 - 5.7.0-next.8-experimental-ab371ba
File: package/out/object-store/upload.js
Index: package/out/object-store/upload.js
===================================================================
--- package/out/object-store/upload.js
+++ package/out/object-store/upload.js
@@ -15,21 +15,21 @@
         checksum,
         checksumType
     };
 };
-const upload = async ({ functionKey, objects }) => {
-    if (!functionKey || functionKey.length === 0) {
-        throw new errors_1.BridgeAPIError('functionKey is required to filter and generate presigned URLs');
+const upload = async ({ filterAndGenerateUrls, objects }) => {
+    if (!(filterAndGenerateUrls === null || filterAndGenerateUrls === void 0 ? void 0 : filterAndGenerateUrls.function)) {
+        throw new errors_1.BridgeAPIError('filterAndGenerateUrls.function is required');
     }
     if (!Array.isArray(objects) || objects.length === 0) {
         throw new errors_1.BridgeAPIError('objects array is required and must not be empty');
     }
     const allObjectMetadata = await Promise.all(objects.map((obj) => getObjectMetadata(obj)));
-    const presignedURLsToObjectMetadata = (await (0, invoke_1.invoke)(functionKey, {
+    const presignedURLsToObjectMetadata = (await (0, invoke_1.invoke)(filterAndGenerateUrls.function, {
         allObjectMetadata
     }));
     if (!presignedURLsToObjectMetadata || typeof presignedURLsToObjectMetadata !== 'object') {
-        throw new errors_1.BridgeAPIError('Invalid response from functionKey');
+        throw new errors_1.BridgeAPIError('Invalid response from filterAndGenerateUrls function');
     }
     const checksumToBlobMap = new Map();
     objects.forEach((blob, index) => {
         const metadata = allObjectMetadata[index];
@@ -40,9 +40,9 @@
         const object = checksumToBlobMap.get(checksum);
         if (!object) {
             return {
                 success: false,
-                key: key,
+                objectKey: key,
                 error: `Blob not found for checksum ${checksum}`
             };
         }
         try {
@@ -55,17 +55,17 @@
                 }
             });
             return {
                 success: response.ok,
-                key: key,
+                objectKey: key,
                 status: response.status,
                 error: response.ok ? undefined : `Upload failed with status ${response.status}`
             };
         }
         catch (error) {
             return {
                 success: false,
-                key: key,
+                objectKey: key,
                 status: 503,
                 error: error instanceof Error ? error.message : 'Upload failed'
             };
         }