@upcoming/bee-js 9.4.0 → 9.4.1

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.
@@ -4,13 +4,6 @@ import { BeeResponseError } from "../index.js";
4
4
  const {
5
5
  AxiosError
6
6
  } = axios;
7
- const originalObjectKeys = Object.keys;
8
- Object.keys = function (o) {
9
- if (typeof Buffer !== 'undefined' && Buffer.isBuffer(o)) {
10
- return ['axios_workaround_for_buffer'];
11
- }
12
- return originalObjectKeys(o);
13
- };
14
7
  const MAX_FAILED_ATTEMPTS = 100000;
15
8
  const DELAY_FAST = 200;
16
9
  const DELAY_SLOW = 1000;
@@ -29,6 +22,9 @@ export const DEFAULT_HTTP_CONFIG = {
29
22
  */
30
23
  export async function http(options, config) {
31
24
  const requestConfig = Objects.deepMerge3(DEFAULT_HTTP_CONFIG, config, options);
25
+ if (requestConfig.data && typeof Buffer !== 'undefined' && Buffer.isBuffer(requestConfig.data)) {
26
+ requestConfig.data = requestConfig.data.buffer;
27
+ }
32
28
  if (requestConfig.params) {
33
29
  const keys = Object.keys(requestConfig.params);
34
30
  for (const key of keys) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@upcoming/bee-js",
3
- "version": "9.4.0",
3
+ "version": "9.4.1",
4
4
  "description": "Javascript client for Bee",
5
5
  "keywords": [
6
6
  "bee",