@ethersphere/bee-dashboard 0.36.2 → 0.37.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/README.md +0 -3
- package/build/assets/__vite-browser-external-Gr5Ld13q.js +2 -0
- package/build/assets/{download.browser-CWBk9Xo5.js → download.browser-D7dY7Xjf.js} +1 -1
- package/build/assets/download.node-C_caoQb2.js +1 -0
- package/build/assets/{fs.node-ci1iNMw2.js → fs.node-BJ_fdVQd.js} +2 -2
- package/build/assets/index-BufCo-Bs.js +133 -0
- package/build/assets/upload.browser-OebZUAtX.js +1 -0
- package/build/assets/vendor-ethers-Dh545u0a.js +87 -0
- package/build/index.html +2 -2
- package/lib/{App-CwQdMHYW.mjs → App-B7H4Gpf0.mjs} +16139 -13010
- package/lib/{App-B3D1R6YS.js → App-DePYYc5z.js} +16139 -13010
- package/lib/App.cjs.js +1 -1
- package/lib/App.js +1 -1
- package/lib/assets/data/nodes-db.json.d.ts +2842 -3578
- package/lib/{download.browser-DVvlVttp.js → download.browser-Digctgve.js} +1 -1
- package/lib/{download.browser-1J0WA0ZY.mjs → download.browser-xiVKZT8G.mjs} +1 -1
- package/lib/{download.node-BvTcf4pA.mjs → download.node-By9OGw0L.mjs} +2 -2
- package/lib/{download.node-DNc4t8KE.js → download.node-FjFXjy_9.js} +2 -2
- package/lib/{fs.node-DnKAgPam.js → fs.node-Dirm_VZ-.js} +1 -1
- package/lib/{fs.node-C0eGUtLy.mjs → fs.node-OKThdsyd.mjs} +1 -1
- package/lib/{upload.browser-CN2aC0Ci.mjs → upload.browser-CDVEFDvf.mjs} +3 -3
- package/lib/{upload.browser-LvUP5AqY.js → upload.browser-DBraCRf7.js} +3 -3
- package/lib/{upload.node-BHNhyWDJ.mjs → upload.node-e8znhzCz.mjs} +6 -6
- package/lib/{upload.node-FJ4naJB8.js → upload.node-jidrJtgp.js} +6 -6
- package/package.json +9 -13
- package/build/assets/__vite-browser-external-DHc9oIIQ.js +0 -2
- package/build/assets/download.node-u9UJImpJ.js +0 -1
- package/build/assets/index-QjfIOSmO.js +0 -133
- package/build/assets/upload.browser-g14Y5rh3.js +0 -1
- package/build/assets/vendor-ethers-DdwEM-gK.js +0 -87
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const App = require("./App-
|
|
3
|
+
const App = require("./App-DePYYc5z.js");
|
|
4
4
|
async function downloadReadableFetch(resource, apiUrl, endpoint, options, requestOptions) {
|
|
5
5
|
if (options) {
|
|
6
6
|
options = prepareDownloadOptions(options);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as Types, R as Reference, P as PublicKey } from "./App-
|
|
1
|
+
import { T as Types, R as Reference, P as PublicKey } from "./App-B7H4Gpf0.mjs";
|
|
2
2
|
async function downloadReadableFetch(resource, apiUrl, endpoint, options, requestOptions) {
|
|
3
3
|
if (options) {
|
|
4
4
|
options = prepareDownloadOptions(options);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { s as settlePromises } from "./App-
|
|
1
|
+
import { s as settlePromises } from "./App-B7H4Gpf0.mjs";
|
|
2
2
|
async function downloadNode(bee, resources, options, requestOptions) {
|
|
3
3
|
const dataPromises = [];
|
|
4
4
|
for (const resource of resources) {
|
|
5
|
-
dataPromises.push(bee.
|
|
5
|
+
dataPromises.push(bee.data.download(resource, options, requestOptions));
|
|
6
6
|
}
|
|
7
7
|
const files = [];
|
|
8
8
|
await settlePromises(dataPromises, (value) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const App = require("./App-
|
|
3
|
+
const App = require("./App-DePYYc5z.js");
|
|
4
4
|
async function downloadNode(bee, resources, options, requestOptions) {
|
|
5
5
|
const dataPromises = [];
|
|
6
6
|
for (const resource of resources) {
|
|
7
|
-
dataPromises.push(bee.
|
|
7
|
+
dataPromises.push(bee.data.download(resource, options, requestOptions));
|
|
8
8
|
}
|
|
9
9
|
const files = [];
|
|
10
10
|
await App.settlePromises(dataPromises, (value) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const App = require("./App-
|
|
3
|
+
const App = require("./App-DePYYc5z.js");
|
|
4
4
|
const contentTypes = /* @__PURE__ */ new Map([
|
|
5
5
|
[".mp4", "video/mp4"],
|
|
6
6
|
[".webm", "video/webm"],
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
async function uploadBrowser(bee, batchId, browserOptions, uploadOptions, requestOptions) {
|
|
2
2
|
const streamFilesOpts = uploadOptions ? { ...uploadOptions, act: false, actHistoryAddress: void 0 } : void 0;
|
|
3
|
-
const uploadFilesRes = await bee.
|
|
3
|
+
const uploadFilesRes = await bee.collection.stream(batchId, browserOptions.files, browserOptions.onUploadProgress, streamFilesOpts, requestOptions);
|
|
4
4
|
let uploadPreviewRes;
|
|
5
5
|
if (browserOptions.preview) {
|
|
6
|
-
uploadPreviewRes = await bee.
|
|
6
|
+
uploadPreviewRes = await bee.collection.stream(batchId, [browserOptions.preview], browserOptions.onUploadProgress, streamFilesOpts, requestOptions);
|
|
7
7
|
}
|
|
8
8
|
const wrappedData = {
|
|
9
9
|
uploadFilesRes: uploadFilesRes.reference.toString(),
|
|
10
10
|
uploadPreviewRes: uploadPreviewRes?.reference.toString()
|
|
11
11
|
};
|
|
12
|
-
return await bee.
|
|
12
|
+
return await bee.data.upload(batchId, JSON.stringify(wrappedData), { ...uploadOptions, act: true }, requestOptions);
|
|
13
13
|
}
|
|
14
14
|
async function processUploadBrowser(bee, driveInfo, browserOptions, uploadOptions, requestOptions) {
|
|
15
15
|
if (!browserOptions.files) {
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
async function uploadBrowser(bee, batchId, browserOptions, uploadOptions, requestOptions) {
|
|
4
4
|
const streamFilesOpts = uploadOptions ? { ...uploadOptions, act: false, actHistoryAddress: void 0 } : void 0;
|
|
5
|
-
const uploadFilesRes = await bee.
|
|
5
|
+
const uploadFilesRes = await bee.collection.stream(batchId, browserOptions.files, browserOptions.onUploadProgress, streamFilesOpts, requestOptions);
|
|
6
6
|
let uploadPreviewRes;
|
|
7
7
|
if (browserOptions.preview) {
|
|
8
|
-
uploadPreviewRes = await bee.
|
|
8
|
+
uploadPreviewRes = await bee.collection.stream(batchId, [browserOptions.preview], browserOptions.onUploadProgress, streamFilesOpts, requestOptions);
|
|
9
9
|
}
|
|
10
10
|
const wrappedData = {
|
|
11
11
|
uploadFilesRes: uploadFilesRes.reference.toString(),
|
|
12
12
|
uploadPreviewRes: uploadPreviewRes?.reference.toString()
|
|
13
13
|
};
|
|
14
|
-
return await bee.
|
|
14
|
+
return await bee.data.upload(batchId, JSON.stringify(wrappedData), { ...uploadOptions, act: true }, requestOptions);
|
|
15
15
|
}
|
|
16
16
|
async function processUploadBrowser(bee, driveInfo, browserOptions, uploadOptions, requestOptions) {
|
|
17
17
|
if (!browserOptions.files) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BatchId, F as FileError } from "./App-
|
|
1
|
+
import { B as BatchId, F as FileError } from "./App-B7H4Gpf0.mjs";
|
|
2
2
|
async function uploadNode(bee, batchId, nodeOptions, uploadOptions, requestOptions) {
|
|
3
3
|
const uploadFilesRes = await uploadFileOrDirectory(bee, new BatchId(batchId), nodeOptions.path, { ...uploadOptions, act: false }, requestOptions);
|
|
4
4
|
let uploadPreviewRes;
|
|
@@ -9,10 +9,10 @@ async function uploadNode(bee, batchId, nodeOptions, uploadOptions, requestOptio
|
|
|
9
9
|
uploadFilesRes: uploadFilesRes.reference.toString(),
|
|
10
10
|
uploadPreviewRes: uploadPreviewRes?.reference.toString()
|
|
11
11
|
};
|
|
12
|
-
return await bee.
|
|
12
|
+
return await bee.data.upload(batchId, JSON.stringify(wrappedData), { ...uploadOptions, act: true }, requestOptions);
|
|
13
13
|
}
|
|
14
14
|
async function uploadFileOrDirectory(bee, batchId, resolvedPath, uploadOptions, requestOptions) {
|
|
15
|
-
const { isDir } = await import("./fs.node-
|
|
15
|
+
const { isDir } = await import("./fs.node-OKThdsyd.mjs");
|
|
16
16
|
const isPathDir = await isDir(resolvedPath);
|
|
17
17
|
if (isPathDir) {
|
|
18
18
|
return uploadDirectory(bee, batchId, resolvedPath, uploadOptions, requestOptions);
|
|
@@ -21,9 +21,9 @@ async function uploadFileOrDirectory(bee, batchId, resolvedPath, uploadOptions,
|
|
|
21
21
|
}
|
|
22
22
|
async function uploadFile(bee, batchId, resolvedPath, uploadOptions, requestOptions) {
|
|
23
23
|
try {
|
|
24
|
-
const { readFile } = await import("./fs.node-
|
|
24
|
+
const { readFile } = await import("./fs.node-OKThdsyd.mjs");
|
|
25
25
|
const { data, name, contentType } = await readFile(resolvedPath);
|
|
26
|
-
return await bee.
|
|
26
|
+
return await bee.file.upload(batchId, data, name, {
|
|
27
27
|
...uploadOptions,
|
|
28
28
|
contentType
|
|
29
29
|
}, requestOptions);
|
|
@@ -33,7 +33,7 @@ async function uploadFile(bee, batchId, resolvedPath, uploadOptions, requestOpti
|
|
|
33
33
|
}
|
|
34
34
|
async function uploadDirectory(bee, batchId, resolvedPath, uploadOptions, requestOptions) {
|
|
35
35
|
try {
|
|
36
|
-
return await bee.
|
|
36
|
+
return await bee.collection.uploadFromDirectory(batchId, resolvedPath, uploadOptions, requestOptions);
|
|
37
37
|
} catch (error) {
|
|
38
38
|
throw new FileError(`Failed to upload directory ${resolvedPath}: ${error}`);
|
|
39
39
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const App = require("./App-
|
|
3
|
+
const App = require("./App-DePYYc5z.js");
|
|
4
4
|
async function uploadNode(bee, batchId, nodeOptions, uploadOptions, requestOptions) {
|
|
5
5
|
const uploadFilesRes = await uploadFileOrDirectory(bee, new App.BatchId(batchId), nodeOptions.path, { ...uploadOptions, act: false }, requestOptions);
|
|
6
6
|
let uploadPreviewRes;
|
|
@@ -11,10 +11,10 @@ async function uploadNode(bee, batchId, nodeOptions, uploadOptions, requestOptio
|
|
|
11
11
|
uploadFilesRes: uploadFilesRes.reference.toString(),
|
|
12
12
|
uploadPreviewRes: uploadPreviewRes?.reference.toString()
|
|
13
13
|
};
|
|
14
|
-
return await bee.
|
|
14
|
+
return await bee.data.upload(batchId, JSON.stringify(wrappedData), { ...uploadOptions, act: true }, requestOptions);
|
|
15
15
|
}
|
|
16
16
|
async function uploadFileOrDirectory(bee, batchId, resolvedPath, uploadOptions, requestOptions) {
|
|
17
|
-
const { isDir } = await Promise.resolve().then(() => require("./fs.node-
|
|
17
|
+
const { isDir } = await Promise.resolve().then(() => require("./fs.node-Dirm_VZ-.js"));
|
|
18
18
|
const isPathDir = await isDir(resolvedPath);
|
|
19
19
|
if (isPathDir) {
|
|
20
20
|
return uploadDirectory(bee, batchId, resolvedPath, uploadOptions, requestOptions);
|
|
@@ -23,9 +23,9 @@ async function uploadFileOrDirectory(bee, batchId, resolvedPath, uploadOptions,
|
|
|
23
23
|
}
|
|
24
24
|
async function uploadFile(bee, batchId, resolvedPath, uploadOptions, requestOptions) {
|
|
25
25
|
try {
|
|
26
|
-
const { readFile } = await Promise.resolve().then(() => require("./fs.node-
|
|
26
|
+
const { readFile } = await Promise.resolve().then(() => require("./fs.node-Dirm_VZ-.js"));
|
|
27
27
|
const { data, name, contentType } = await readFile(resolvedPath);
|
|
28
|
-
return await bee.
|
|
28
|
+
return await bee.file.upload(batchId, data, name, {
|
|
29
29
|
...uploadOptions,
|
|
30
30
|
contentType
|
|
31
31
|
}, requestOptions);
|
|
@@ -35,7 +35,7 @@ async function uploadFile(bee, batchId, resolvedPath, uploadOptions, requestOpti
|
|
|
35
35
|
}
|
|
36
36
|
async function uploadDirectory(bee, batchId, resolvedPath, uploadOptions, requestOptions) {
|
|
37
37
|
try {
|
|
38
|
-
return await bee.
|
|
38
|
+
return await bee.collection.uploadFromDirectory(batchId, resolvedPath, uploadOptions, requestOptions);
|
|
39
39
|
} catch (error) {
|
|
40
40
|
throw new App.FileError(`Failed to upload directory ${resolvedPath}: ${error}`);
|
|
41
41
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethersphere/bee-dashboard",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"description": "An app which helps users to setup their Bee node and do actions like cash out cheques",
|
|
5
5
|
"homepage": ".",
|
|
6
6
|
"bin": {
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@emotion/react": "^11.14.0",
|
|
38
38
|
"@emotion/styled": "^11.14.1",
|
|
39
|
-
"@ethersphere/bee-js": "^
|
|
39
|
+
"@ethersphere/bee-js": "^13.0.0",
|
|
40
40
|
"@formbricks/js": "^4.3.0",
|
|
41
41
|
"@mui/icons-material": "^7.3.7",
|
|
42
42
|
"@mui/material": "^7.3.7",
|
|
43
|
-
"@solarpunkltd/file-manager-lib": "^1.0
|
|
43
|
+
"@solarpunkltd/file-manager-lib": "^1.1.0",
|
|
44
44
|
"axios": "^1.16.1",
|
|
45
45
|
"bignumber.js": "^9.3.1",
|
|
46
46
|
"dotted-map": "^2.2.3",
|
|
@@ -58,11 +58,6 @@
|
|
|
58
58
|
"serve-handler": "6.1.7"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@babel/core": "^7.26.10",
|
|
62
|
-
"@babel/plugin-transform-runtime": "^7.26.10",
|
|
63
|
-
"@babel/preset-env": "^7.26.10",
|
|
64
|
-
"@babel/preset-react": "^7.26.3",
|
|
65
|
-
"@babel/preset-typescript": "^7.26.10",
|
|
66
61
|
"@commitlint/cli": "^20.4.1",
|
|
67
62
|
"@commitlint/config-conventional": "^20.4.1",
|
|
68
63
|
"@eslint/js": "^9.39.2",
|
|
@@ -71,7 +66,6 @@
|
|
|
71
66
|
"@types/cors": "^2.8.19",
|
|
72
67
|
"@types/express": "^5.0.6",
|
|
73
68
|
"@types/file-saver": "2.0.5",
|
|
74
|
-
"@types/jest": "30.0.0",
|
|
75
69
|
"@types/react": "^19.2.10",
|
|
76
70
|
"@types/react-dom": "^19.2.3",
|
|
77
71
|
"@types/react-router": "5.1.20",
|
|
@@ -80,6 +74,8 @@
|
|
|
80
74
|
"@typescript-eslint/eslint-plugin": "8.55.0",
|
|
81
75
|
"@typescript-eslint/parser": "8.55.0",
|
|
82
76
|
"@vitejs/plugin-react": "^5.1.2",
|
|
77
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
78
|
+
"@vitest/eslint-plugin": "^1.6.27",
|
|
83
79
|
"cors": "^2.8.5",
|
|
84
80
|
"depcheck": "^1.4.7",
|
|
85
81
|
"env-paths": "^3.0.0",
|
|
@@ -87,7 +83,6 @@
|
|
|
87
83
|
"eslint-config-prettier": "10.1.8",
|
|
88
84
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
89
85
|
"eslint-plugin-import": "2.32.0",
|
|
90
|
-
"eslint-plugin-jest": "29.14.0",
|
|
91
86
|
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
92
87
|
"eslint-plugin-prettier": "5.5.5",
|
|
93
88
|
"eslint-plugin-react": "7.37.5",
|
|
@@ -96,8 +91,7 @@
|
|
|
96
91
|
"eslint-plugin-testing-library": "7.15.4",
|
|
97
92
|
"express": "^5.2.1",
|
|
98
93
|
"husky": "^9.1.7",
|
|
99
|
-
"
|
|
100
|
-
"jest-environment-jsdom": "^30.2.0",
|
|
94
|
+
"jsdom": "^30.0.1",
|
|
101
95
|
"open": "^11.0.0",
|
|
102
96
|
"prettier": "3.8.1",
|
|
103
97
|
"puppeteer": "^24.37.1",
|
|
@@ -108,6 +102,7 @@
|
|
|
108
102
|
"vite": "^7.3.1",
|
|
109
103
|
"vite-plugin-dts": "^4.5.4",
|
|
110
104
|
"vite-plugin-node-polyfills": "^0.25.0",
|
|
105
|
+
"vitest": "^4.1.10",
|
|
111
106
|
"web-vitals": "5.1.0"
|
|
112
107
|
},
|
|
113
108
|
"keywords": [
|
|
@@ -147,7 +142,8 @@
|
|
|
147
142
|
"desktop": "node ./desktop.mjs",
|
|
148
143
|
"build": "rimraf ./build && vite build",
|
|
149
144
|
"build:component": "rimraf ./lib && BUILD_MODE=component vite build",
|
|
150
|
-
"test": "
|
|
145
|
+
"test": "vitest run",
|
|
146
|
+
"test:coverage": "vitest run --coverage",
|
|
151
147
|
"test:ui": "node tests/ui/index.js",
|
|
152
148
|
"serve": "node ./serve.js",
|
|
153
149
|
"depcheck": "depcheck .",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/fs.node-ci1iNMw2.js","assets/vendor-react-mui-tUcmOwCz.js","assets/index-QjfIOSmO.js","assets/vendor-ethers-DdwEM-gK.js","assets/index-DMp5phAM.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as s}from"./vendor-react-mui-tUcmOwCz.js";import{k as l}from"./vendor-ethers-DdwEM-gK.js";import{F as w}from"./index-QjfIOSmO.js";async function f(e,t,r,a,o){const i=await u(e,new l(t),r.path,{...a,act:!1},o);let n;r.previewPath&&(n=await u(e,new l(t),r.previewPath,{...a,act:!1},o));const c={uploadFilesRes:i.reference.toString(),uploadPreviewRes:n?.reference.toString()};return await e.uploadData(t,JSON.stringify(c),{...a,act:!0},o)}async function u(e,t,r,a,o){const{isDir:i}=await s(async()=>{const{isDir:c}=await import("./fs.node-ci1iNMw2.js");return{isDir:c}},__vite__mapDeps([0,1,2,3,4]));return await i(r)?y(e,t,r,a,o):p(e,t,r,a,o)}async function p(e,t,r,a,o){try{const{readFile:i}=await s(async()=>{const{readFile:_}=await import("./fs.node-ci1iNMw2.js");return{readFile:_}},__vite__mapDeps([0,1,2,3,4])),{data:n,name:c,contentType:d}=await i(r);return await e.uploadFile(t,n,c,{...a,contentType:d},o)}catch(i){throw new w(`Failed to upload file ${r}: ${i}`)}}async function y(e,t,r,a,o){try{return await e.uploadFilesFromDirectory(t,r,a,o)}catch(i){throw new w(`Failed to upload directory ${r}: ${i}`)}}async function F(e,t,r,a,o){if(!r.path)throw new Error("File path is required.");const i=await f(e,t.batchId,r,a,o);return{reference:i.reference.toString(),historyRef:i.historyAddress.getOrThrow().toString()}}const h=Object.freeze(Object.defineProperty({__proto__:null,processUploadNode:F},Symbol.toStringTag,{value:"Module"})),S=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{S as _,h as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as i}from"./index-QjfIOSmO.js";import"./vendor-react-mui-tUcmOwCz.js";import"./vendor-ethers-DdwEM-gK.js";async function p(r,a,e,n){const s=[];for(const o of a)s.push(r.downloadData(o,e,n));const t=[];return await i(s,o=>{t.push(o)}),t}export{p as downloadNode};
|