@ethersphere/bee-js 6.7.3 → 6.8.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.
- package/dist/cjs/modules/debug/status.js +1 -1
- package/dist/cjs/utils/http.js +1 -0
- package/dist/cjs/utils/stream.js +1 -1
- package/dist/cjs/utils/type.js +1 -17
- package/dist/index.browser.min.js +1 -1
- package/dist/index.browser.min.js.map +1 -1
- package/dist/mjs/modules/debug/status.js +1 -1
- package/dist/mjs/utils/http.js +1 -0
- package/dist/mjs/utils/stream.js +1 -1
- package/dist/mjs/utils/type.js +1 -17
- package/dist/types/modules/debug/status.d.ts +1 -1
- package/dist/types/utils/error.d.ts +2 -2
- package/dist/types/utils/type.d.ts +1 -10
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import getMajorSemver from 'semver/functions/major.js';
|
|
2
2
|
import { http } from "../../utils/http.js"; // Following lines bellow are automatically updated with GitHub Action when Bee version is updated
|
|
3
3
|
// so if you are changing anything about them change the `update_bee` action accordingly!
|
|
4
|
-
export const SUPPORTED_BEE_VERSION_EXACT = '1.
|
|
4
|
+
export const SUPPORTED_BEE_VERSION_EXACT = '1.18.2-759f56f';
|
|
5
5
|
export const SUPPORTED_API_VERSION = '4.0.0';
|
|
6
6
|
export const SUPPORTED_DEBUG_API_VERSION = '4.0.0';
|
|
7
7
|
export const SUPPORTED_BEE_VERSION = SUPPORTED_BEE_VERSION_EXACT.substring(0, SUPPORTED_BEE_VERSION_EXACT.indexOf('-'));
|
package/dist/mjs/utils/http.js
CHANGED
|
@@ -18,6 +18,7 @@ export async function http(options, config) {
|
|
|
18
18
|
const requestConfig = Objects.deepMerge3(DEFAULT_HTTP_CONFIG, config, options);
|
|
19
19
|
maybeRunOnRequestHook(options, requestConfig);
|
|
20
20
|
const response = await axios(requestConfig);
|
|
21
|
+
// TODO: https://github.com/axios/axios/pull/6253
|
|
21
22
|
return response;
|
|
22
23
|
} catch (e) {
|
|
23
24
|
if (e instanceof AxiosError) {
|
package/dist/mjs/utils/stream.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Readable as NodeReadableNative } from 'stream';
|
|
2
|
-
import { isStrictlyObject } from "./type.js";
|
|
3
2
|
import { ReadableStream } from 'web-streams-polyfill';
|
|
3
|
+
import { isStrictlyObject } from "./type.js";
|
|
4
4
|
const NodeReadable = NodeReadableNative || class {};
|
|
5
5
|
/**
|
|
6
6
|
* Validates if passed object is either browser's ReadableStream
|
package/dist/mjs/utils/type.js
CHANGED
|
@@ -13,16 +13,6 @@ export function isInteger(value) {
|
|
|
13
13
|
export function isObject(value) {
|
|
14
14
|
return value !== null && typeof value === 'object';
|
|
15
15
|
}
|
|
16
|
-
/**
|
|
17
|
-
* Generally it is discouraged to use `object` type, but in this case I think
|
|
18
|
-
* it is best to do so as it is possible to easily convert from `object`to other
|
|
19
|
-
* types, which will be usually the case after asserting that the object is
|
|
20
|
-
* strictly object. With for example Record<string, unknown> you have to first
|
|
21
|
-
* cast it to `unknown` which I think bit defeat the purpose.
|
|
22
|
-
*
|
|
23
|
-
* @param value
|
|
24
|
-
*/
|
|
25
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
26
16
|
export function isStrictlyObject(value) {
|
|
27
17
|
return isObject(value) && !Array.isArray(value);
|
|
28
18
|
}
|
|
@@ -211,13 +201,7 @@ export function isTag(value) {
|
|
|
211
201
|
if (!isStrictlyObject(value)) {
|
|
212
202
|
return false;
|
|
213
203
|
}
|
|
214
|
-
|
|
215
|
-
const numberProperties = ['total', 'processed', 'synced', 'uid'];
|
|
216
|
-
const correctNumberProperties = numberProperties.every(numberProperty => typeof tag[numberProperty] === 'number');
|
|
217
|
-
if (!correctNumberProperties || !tag.startedAt || typeof tag.startedAt !== 'string') {
|
|
218
|
-
return false;
|
|
219
|
-
}
|
|
220
|
-
return true;
|
|
204
|
+
return Boolean(value.uid);
|
|
221
205
|
}
|
|
222
206
|
export function assertTag(value) {
|
|
223
207
|
if (!isStrictlyObject(value)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BeeRequestOptions } from '../../index';
|
|
2
2
|
import type { DebugStatus, Health, NodeInfo } from '../../types/debug';
|
|
3
3
|
import { BeeVersions } from '../../types/debug';
|
|
4
|
-
export declare const SUPPORTED_BEE_VERSION_EXACT = "1.
|
|
4
|
+
export declare const SUPPORTED_BEE_VERSION_EXACT = "1.18.2-759f56f";
|
|
5
5
|
export declare const SUPPORTED_API_VERSION = "4.0.0";
|
|
6
6
|
export declare const SUPPORTED_DEBUG_API_VERSION = "4.0.0";
|
|
7
7
|
export declare const SUPPORTED_BEE_VERSION: string;
|
|
@@ -8,10 +8,10 @@ export declare class BeeArgumentError extends BeeError {
|
|
|
8
8
|
}
|
|
9
9
|
export declare class BeeResponseError extends BeeError {
|
|
10
10
|
code?: string | undefined;
|
|
11
|
-
axiosStatus?:
|
|
11
|
+
axiosStatus?: number | undefined;
|
|
12
12
|
status?: number | undefined;
|
|
13
13
|
config?: AxiosRequestConfig<any> | undefined;
|
|
14
14
|
request?: any;
|
|
15
15
|
response?: AxiosResponse<any, any> | undefined;
|
|
16
|
-
constructor(message: string, code?: string | undefined, axiosStatus?:
|
|
16
|
+
constructor(message: string, code?: string | undefined, axiosStatus?: number | undefined, status?: number | undefined, config?: AxiosRequestConfig<any> | undefined, request?: any, response?: AxiosResponse<any, any> | undefined);
|
|
17
17
|
}
|
|
@@ -3,16 +3,7 @@ import { Address, AddressPrefix, AllTagsOptions, BatchId, BeeRequestOptions, Cas
|
|
|
3
3
|
export declare function isUint8Array(obj: unknown): obj is Uint8Array;
|
|
4
4
|
export declare function isInteger(value: unknown): value is number | NumberString;
|
|
5
5
|
export declare function isObject(value: unknown): value is Record<string, unknown>;
|
|
6
|
-
|
|
7
|
-
* Generally it is discouraged to use `object` type, but in this case I think
|
|
8
|
-
* it is best to do so as it is possible to easily convert from `object`to other
|
|
9
|
-
* types, which will be usually the case after asserting that the object is
|
|
10
|
-
* strictly object. With for example Record<string, unknown> you have to first
|
|
11
|
-
* cast it to `unknown` which I think bit defeat the purpose.
|
|
12
|
-
*
|
|
13
|
-
* @param value
|
|
14
|
-
*/
|
|
15
|
-
export declare function isStrictlyObject(value: unknown): value is object;
|
|
6
|
+
export declare function isStrictlyObject(value: unknown): value is Record<string, unknown>;
|
|
16
7
|
/**
|
|
17
8
|
* Asserts if object is Error
|
|
18
9
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethersphere/bee-js",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.8.0",
|
|
4
4
|
"description": "Javascript client for Bee",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bee",
|
|
@@ -55,13 +55,13 @@
|
|
|
55
55
|
"lint": "eslint --fix \"src/**/*.ts\" \"test/**/*.ts\" && prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
56
56
|
"lint:check": "eslint \"src/**/*.ts\" \"test/**/*.ts\" && prettier --check \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
57
57
|
"depcheck": "depcheck .",
|
|
58
|
-
"bee": "npx
|
|
58
|
+
"bee": "npx fdp-play start --detach --fresh"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@ethersphere/swarm-cid": "^0.1.0",
|
|
62
62
|
"@types/readable-stream": "^2.3.13",
|
|
63
|
-
"axios": "^0.
|
|
64
|
-
"cafe-utility": "^
|
|
63
|
+
"axios": "^0.28.0",
|
|
64
|
+
"cafe-utility": "^15.0.2",
|
|
65
65
|
"elliptic": "^6.5.4",
|
|
66
66
|
"fetch-blob": "2.1.2",
|
|
67
67
|
"isomorphic-ws": "^4.0.1",
|
|
@@ -129,6 +129,6 @@
|
|
|
129
129
|
"npm": ">=6.0.0",
|
|
130
130
|
"beeApiVersion": "4.0.0",
|
|
131
131
|
"beeDebugApiVersion": "4.0.0",
|
|
132
|
-
"bee": "1.
|
|
132
|
+
"bee": "1.18.2-759f56f"
|
|
133
133
|
}
|
|
134
134
|
}
|