@io-orkes/conductor-javascript 1.2.0-rc.3 → 1.2.0-rc.4

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.mjs CHANGED
@@ -217,8 +217,14 @@ var require_fetchImplementation = __commonJS({
217
217
  "use strict";
218
218
  var fetchCatchDns2 = (init_fetchCatchDns2(), __toCommonJS(fetchCatchDns_exports)).fetchCatchDns;
219
219
  var fetchImplementation = fetch;
220
- var nodeFetch = __require("node-fetch");
221
- if (nodeFetch) {
220
+ var nodeFetchAvailable = false;
221
+ try {
222
+ __require.resolve("node-fetch");
223
+ nodeFetchAvailable = true;
224
+ } catch (e) {
225
+ }
226
+ if (nodeFetchAvailable) {
227
+ const nodeFetch = __require("node-fetch");
222
228
  const nodeFetchWrapper = async (input, options = {}) => {
223
229
  const res = await fetch(input.toString(), options);
224
230
  return res;