npm package diff
Package: @forge/api
Versions: 5.1.0-next.5 - 5.1.0-next.5-experimental-edac07a
File: package/out/api/remote.js
Index: package/out/api/remote.js
===================================================================
--- package/out/api/remote.js
+++ package/out/api/remote.js
@@ -1,9 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.invokeRemote = void 0;
-const tslib_1 = require("tslib");
-const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
const errors_1 = require("./errors");
const fetch_1 = require("./fetch");
async function invokeRemote(remoteKey, options) {
const { path, ...fetchOptions } = options;
@@ -12,21 +10,12 @@
}
if (!path) {
throw new Error('Missing or empty path provided to invokeRemote');
}
- let response;
- if (global.__forge_fetch__) {
- response = await global.__forge_fetch__({
- type: 'frc',
- remote: remoteKey
- }, path, fetchOptions);
- }
- else {
- const url = (0, fetch_1.createRemoteUrlWithPath)('https://atl-paas.net', path);
- url.searchParams.set('remoteKey', remoteKey);
- const init = (0, fetch_1.addMagicAgent)(fetchOptions, 'FORGE_REMOTE_COMPUTE_REQUEST');
- response = await (0, node_fetch_1.default)(url, init);
- }
+ const response = await global.__forge_fetch__({
+ type: 'frc',
+ remote: remoteKey
+ }, path, fetchOptions);
handleResponseErrors(response, remoteKey);
return response;
}
exports.invokeRemote = invokeRemote;