@stellar/typescript-wallet-sdk 4.0.0-beta.1786156822907 → 4.0.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.
@@ -6881,6 +6881,61 @@ var ApplicationConfiguration = /** @class */ (function () {
6881
6881
  exports.ApplicationConfiguration = ApplicationConfiguration;
6882
6882
 
6883
6883
 
6884
+ /***/ }),
6885
+
6886
+ /***/ "./src/shims/eventsource.js":
6887
+ /*!**********************************!*\
6888
+ !*** ./src/shims/eventsource.js ***!
6889
+ \**********************************/
6890
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6891
+
6892
+ /**
6893
+ * Lazy `eventsource` facade.
6894
+ *
6895
+ * eventsource v4 subclasses the DOM globals `Event`/`EventTarget` at module
6896
+ * scope, which React Native's Hermes does not provide. Horizon's CallBuilder
6897
+ * requires this module eagerly but only reads it inside `stream()`, so deferring
6898
+ * evaluation to first property access keeps imports working everywhere while
6899
+ * leaving streaming intact wherever those globals exist.
6900
+ *
6901
+ * Aliased in webpack.config.js: `eventsource$` resolves here, `eventsource-real$`
6902
+ * to the real package.
6903
+ */
6904
+ let realModule;
6905
+
6906
+ const load = () => {
6907
+ if (!realModule) {
6908
+ try {
6909
+ // eslint-disable-next-line global-require
6910
+ realModule = __webpack_require__(/*! eventsource-real */ "../../node_modules/eventsource/dist/index.cjs");
6911
+ } catch (cause) {
6912
+ // CallBuilder.stream() catches this and retries on a timer, so make the
6913
+ // error it reports to onerror self-explanatory.
6914
+ throw new Error(
6915
+ "Horizon streaming needs the DOM Event/EventTarget globals and a " +
6916
+ "streaming fetch body, which React Native does not provide. Alias " +
6917
+ '"eventsource" to a native SSE client (e.g. react-native-sse) to use ' +
6918
+ `CallBuilder.stream(). Original error: ${cause.message}`,
6919
+ );
6920
+ }
6921
+ }
6922
+
6923
+ return realModule;
6924
+ };
6925
+
6926
+ Object.defineProperty(exports, "EventSource", ({
6927
+ enumerable: true,
6928
+ configurable: true,
6929
+ get: () => load().EventSource,
6930
+ }));
6931
+
6932
+ Object.defineProperty(exports, "ErrorEvent", ({
6933
+ enumerable: true,
6934
+ configurable: true,
6935
+ get: () => load().ErrorEvent,
6936
+ }));
6937
+
6938
+
6884
6939
  /***/ }),
6885
6940
 
6886
6941
  /***/ "../../node_modules/asn1.js/lib/asn1.js":
@@ -71004,7 +71059,7 @@ exports.AssetsCallBuilder = AssetsCallBuilder;
71004
71059
  "use strict";
71005
71060
 
71006
71061
 
71007
- var eventsource = __webpack_require__(/*! eventsource */ "../../node_modules/eventsource/dist/index.cjs");
71062
+ var eventsource = __webpack_require__(/*! eventsource */ "./src/shims/eventsource.js");
71008
71063
  var network = __webpack_require__(/*! ../errors/network.js */ "../../node_modules/@stellar/stellar-sdk/lib/cjs/errors/network.js");
71009
71064
  var not_found = __webpack_require__(/*! ../errors/not_found.js */ "../../node_modules/@stellar/stellar-sdk/lib/cjs/errors/not_found.js");
71010
71065
  var bad_request = __webpack_require__(/*! ../errors/bad_request.js */ "../../node_modules/@stellar/stellar-sdk/lib/cjs/errors/bad_request.js");