@ethersphere/bee-js 13.0.0-upcoming.ga89553d → 13.0.0-upcoming.gbab2b2e

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.
@@ -35,11 +35,11 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.Data = void 0;
37
37
  const core_sdk_1 = require("@ethersphere/core-sdk");
38
+ const bytes = __importStar(require("../api/bytes"));
39
+ const stewardship = __importStar(require("../api/stewardship"));
38
40
  const resource_locator_1 = require("../utils/resource-locator");
39
41
  const schema_1 = require("../utils/schema");
40
42
  const type_1 = require("../utils/type");
41
- const bytes = __importStar(require("../api/bytes"));
42
- const stewardship = __importStar(require("../api/stewardship"));
43
43
  /**
44
44
  * Raw data operations backed by the `/bytes` endpoint.
45
45
  *
@@ -25,7 +25,9 @@ exports.DEFAULT_HTTP_CONFIG = {
25
25
  * @param config Internal settings and/or Bee settings
26
26
  */
27
27
  async function http(options, config) {
28
- const requestConfig = cafe_utility_1.Objects.deepMerge3(exports.DEFAULT_HTTP_CONFIG, config, options);
28
+ const rawData = config.data;
29
+ const requestConfig = cafe_utility_1.Objects.deepMerge3(exports.DEFAULT_HTTP_CONFIG, { ...config, data: undefined }, options);
30
+ requestConfig.data = rawData;
29
31
  if (options.signal) {
30
32
  requestConfig.signal = options.signal;
31
33
  }
@@ -69,8 +69,8 @@ function isTag(value) {
69
69
  * @throws TypeError if not valid
70
70
  */
71
71
  function assertData(value) {
72
- if (typeof value !== 'string' && !(value instanceof Uint8Array)) {
73
- throw new TypeError('Data must be either string or Uint8Array!');
72
+ if (typeof value !== 'string' && !(value instanceof Uint8Array) && !(value instanceof Blob) && !isReadable(value)) {
73
+ throw new TypeError('Data must be either string, Uint8Array, Blob or Readable!');
74
74
  }
75
75
  }
76
76
  /**