npm package diff

Package: @forge/bridge

Versions: 4.0.0 - 4.0.1-next.0

File: package/out/invoke-remote/invoke-remote.js

Index: package/out/invoke-remote/invoke-remote.js
===================================================================
--- package/out/invoke-remote/invoke-remote.js
+++ package/out/invoke-remote/invoke-remote.js
@@ -1,8 +1,7 @@
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.invokeRemote = void 0;
-const tslib_1 = require("tslib");
 const bridge_1 = require("../bridge");
 const errors_1 = require("../errors");
 const utils_1 = require("../utils");
 const MAX_NUM_OPERATIONS = 500;
@@ -14,19 +13,19 @@
     if (Object.values(payload).some((val) => typeof val === 'function')) {
         throw new errors_1.BridgeAPIError('Passing functions as part of the payload is not supported!');
     }
 };
-const _invokeRemote = (input) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
+const _invokeRemote = async (input) => {
     var _a;
     validatePayload(input);
-    const { success, payload, error } = (_a = (yield callBridge('invoke', input))) !== null && _a !== void 0 ? _a : {};
-    const response = Object.assign({}, (success ? payload : error));
+    const { success, payload, error } = (_a = (await callBridge('invoke', input))) !== null && _a !== void 0 ? _a : {};
+    const response = { ...(success ? payload : error) };
     if (response && response.headers) {
         for (const header in response.headers) {
             if (Array.isArray(response.headers[header])) {
                 response.headers[header] = response.headers[header].join(',');
             }
         }
     }
     return response;
-});
+};
 exports.invokeRemote = (0, utils_1.withRateLimiter)(_invokeRemote, MAX_NUM_OPERATIONS, OPERATION_INTERVAL_MS, 'Remote invocation calls are rate limited at 500req/25s');