@ethersphere/bee-dashboard 0.35.2 → 0.36.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.
- package/README.md +21 -5
- package/build/assets/{__vite-browser-external-9jrN1CIx.js → __vite-browser-external-DmQu5B2A.js} +2 -2
- package/build/assets/{download.browser-DkW-1Tu7.js → download.browser-Cpjk6LAy.js} +1 -1
- package/build/assets/{download.node-DYTXAdrY.js → download.node-BhI545cO.js} +1 -1
- package/build/assets/{fs.node-DwBlG7zh.js → fs.node-DsMWLAtR.js} +2 -2
- package/build/assets/index-T9boIyrz.js +133 -0
- package/build/assets/vendor-ethers-DdwEM-gK.js +87 -0
- package/build/assets/vendor-react-mui-tUcmOwCz.js +227 -0
- package/build/index.html +3 -3
- package/lib/{App-C_kvJWIL.js → App-7cAV7lii.js} +11204 -21656
- package/lib/{App-BaED7J22.mjs → App-_sIcw37E.mjs} +11204 -21656
- package/lib/App.cjs.js +1 -1
- package/lib/App.d.ts +5 -1
- package/lib/App.js +1 -1
- package/lib/assets/data/nodes-db.json.d.ts +8670 -47142
- package/lib/components/ChainSync.d.ts +1 -1
- package/lib/components/Flex.d.ts +1 -1
- package/lib/constants.d.ts +4 -0
- package/lib/{download.browser-Brcsou-R.js → download.browser-CkVF14pl.js} +1 -1
- package/lib/{download.browser-CuzNogtF.mjs → download.browser-D4xwSLDm.mjs} +1 -1
- package/lib/{download.node-C_QRIakM.mjs → download.node-CmYlr7RX.mjs} +1 -1
- package/lib/{download.node-Bnd9C4co.js → download.node-sjp1kwLg.js} +1 -1
- package/lib/{fs.node-p28LxQ49.mjs → fs.node-DCqDmotb.mjs} +1 -1
- package/lib/{fs.node-BOfQnDum.js → fs.node-DTMYb9kO.js} +1 -1
- package/lib/modules/filemanager/components/CustomDropdown/CustomDropdown.d.ts +1 -1
- package/lib/modules/filemanager/components/VersionHistoryModal/VersionList/VersionList.d.ts +1 -1
- package/lib/pages/filemanager/SearchContext.d.ts +1 -1
- package/lib/pages/filemanager/ViewContext.d.ts +1 -1
- package/lib/pages/giftCode/index.d.ts +1 -1
- package/lib/pages/info/ChequebookInfoCard.d.ts +1 -1
- package/lib/pages/info/WalletInfoCard.d.ts +1 -1
- package/lib/providers/FileManager.d.ts +1 -1
- package/lib/providers/Settings.d.ts +10 -0
- package/lib/theme.d.ts +1 -1
- package/lib/{upload.node-BsycYU0Z.mjs → upload.node-9Q7y6klc.mjs} +3 -3
- package/lib/{upload.node-BOc26jHW.js → upload.node-DBWX-yGw.js} +3 -3
- package/lib/utils/bee-error.d.ts +22 -0
- package/lib/utils/common.d.ts +1 -0
- package/lib/utils/desktop.d.ts +5 -0
- package/lib/utils/index.d.ts +1 -0
- package/package.json +9 -6
- package/build/assets/index-BWr_7okq.js +0 -126
- package/build/assets/vendor-ethers-Dmh4iz5c.js +0 -87
- package/build/assets/vendor-react-mui-Dv6xxk4a.js +0 -227
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://github.com/feross/standard)
|
|
6
6
|
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fethersphere%2Fbee-dashboard?ref=badge_shield)
|
|
7
7
|

|
|
8
|
-

|
|
9
9
|
|
|
10
10
|
> An app which helps users to setup their Bee node and do actions like cash out cheques, upload and download files or
|
|
11
11
|
> manage your postage stamps.
|
|
@@ -28,9 +28,9 @@ Stay up to date by joining the [official Discord](https://discord.gg/GU22h2utj6)
|
|
|
28
28
|
- [Usage](#usage)
|
|
29
29
|
- [Terminal](#terminal)
|
|
30
30
|
- [Docker](#docker)
|
|
31
|
-
- [
|
|
32
|
-
- [Development](#development)
|
|
31
|
+
- [Development](#development)
|
|
33
32
|
- [File Manager](#file-manager)
|
|
33
|
+
- [Contribute](#contribute)
|
|
34
34
|
- [Maintainers](#maintainers)
|
|
35
35
|
- [License](#license)
|
|
36
36
|
|
|
@@ -101,11 +101,11 @@ pnpm run init:husky
|
|
|
101
101
|
pnpm start
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
-
The Bee Dashboard runs in development mode on [http://localhost:
|
|
104
|
+
The Bee Dashboard runs in development mode on [http://localhost:3002/](http://localhost:3002/)
|
|
105
105
|
|
|
106
106
|
#### Environmental variables
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
Vite supports specifying "environmental variables" during build time which are then hardcoded into the served static
|
|
109
109
|
files. We support following variables:
|
|
110
110
|
|
|
111
111
|
- `VITE_BEE_DESKTOP_ENABLED` (`boolean`) that toggles if the Dashboard is in Desktop mode or not.
|
|
@@ -133,6 +133,22 @@ pnpm start
|
|
|
133
133
|
pnpm run desktop # This will inject the API key to the Dashboard
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
+
#### Mock Bee proxy
|
|
137
|
+
|
|
138
|
+
To manually test error handling without breaking a real node, `utils/mock-bee-proxy.js` proxies all requests to a local
|
|
139
|
+
Bee node (`http://localhost:1633`) and can override selected endpoints with failure responses:
|
|
140
|
+
|
|
141
|
+
- `pnpm mock:bee` — base script; pass-through by default, configurable via env variables
|
|
142
|
+
- `pnpm mock:bee:nofunds` — preset: `POST /stamps/*` fails with `400 "out of funds"`
|
|
143
|
+
- `pnpm mock:bee:poor` — preset: `GET /wallet` reports near-zero xBZZ/xDAI balances
|
|
144
|
+
|
|
145
|
+
The proxy listens on `http://localhost:11633` — point the dashboard's Bee API endpoint (Settings page) there.
|
|
146
|
+
For cases not covered by the presets, set the env variables (`STATUS`, `MESSAGE`, `POOR_WALLET`, `PLUR`, `WEI`) directly:
|
|
147
|
+
|
|
148
|
+
```sh
|
|
149
|
+
STATUS=507 MESSAGE='batch too large' pnpm mock:bee
|
|
150
|
+
```
|
|
151
|
+
|
|
136
152
|
## File Manager
|
|
137
153
|
|
|
138
154
|
The File Manager module provides intuitive decentralized file storage and management.
|
package/build/assets/{__vite-browser-external-9jrN1CIx.js → __vite-browser-external-DmQu5B2A.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/fs.node-
|
|
2
|
-
import{_ as s}from"./vendor-react-mui-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/fs.node-DsMWLAtR.js","assets/vendor-react-mui-tUcmOwCz.js","assets/index-T9boIyrz.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-T9boIyrz.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-DsMWLAtR.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-DsMWLAtR.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 +1 @@
|
|
|
1
|
-
import{R as d,P as m}from"./vendor-ethers-
|
|
1
|
+
import{R as d,P as m}from"./vendor-ethers-DdwEM-gK.js";import{T as e}from"./index-T9boIyrz.js";import"./vendor-react-mui-tUcmOwCz.js";async function u(r,t,a,s,o){s&&(s=f(s));const n=await fetch(`${t}/${a}/${r.toString()}`,{method:"GET",headers:{...o?.headers,...l(s)},signal:o?.signal});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);if(!n.body)throw new Error("ReadableStream is not supported in this environment.");return n.body}function l(r){const t={};if(!r)return t;const a=e.asObject(r);return a.redundancyStrategy&&(t["swarm-redundancy-strategy"]=String(a.redundancyStrategy)),e.isBoolean(a.fallback)&&(t["swarm-redundancy-fallback-mode"]=a.fallback.toString()),a.timeoutMs&&(t["swarm-chunk-retrieval-timeout"]=String(a.timeoutMs)),t}function f(r){const t=e.asObject(r,{name:"DownloadOptions"});return{redundancyStrategy:e.asOptional(a=>e.asInteger(a,{name:"redundancyStrategy"}),t.redundancyStrategy),fallback:e.asOptional(a=>e.asBoolean(a,{name:"fallback"}),t.fallback),timeoutMs:e.asOptional(a=>e.asInteger(a,{name:"timeoutMs",min:0}),t.timeoutMs),actPublisher:e.asOptional(a=>new m(a),t.actPublisher),actHistoryAddress:e.asOptional(a=>new d(a),t.actHistoryAddress),actTimestamp:e.asOptional(a=>e.asNumber(a,{name:"actTimestamp"}),t.actTimestamp)}}async function w(r,t,a,s,o){const n=[];for(const i of r){const c=await u(i,t,a,s,o);n.push(c)}return n}export{w as downloadBrowser};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as i}from"./index-
|
|
1
|
+
import{s as i}from"./index-T9boIyrz.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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-
|
|
2
|
-
import{_ as i}from"./vendor-react-mui-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/__vite-browser-external-DmQu5B2A.js","assets/vendor-react-mui-tUcmOwCz.js","assets/vendor-ethers-DdwEM-gK.js","assets/index-T9boIyrz.js","assets/index-DMp5phAM.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as i}from"./vendor-react-mui-tUcmOwCz.js";import{F as m}from"./index-T9boIyrz.js";import"./vendor-ethers-DdwEM-gK.js";const p=new Map([[".mp4","video/mp4"],[".webm","video/webm"],[".ogv","video/ogg"],[".mp3","audio/mpeg"],[".m4a","audio/mp4"],[".aac","audio/aac"],[".wav","audio/wav"],[".ogg","audio/ogg"],[".png","image/png"],[".jpg","image/jpeg"],[".jpeg","image/jpeg"],[".gif","image/gif"],[".webp","image/webp"],[".avif","image/avif"],[".svg","image/svg+xml"],[".pdf","application/pdf"],[".txt","text/plain"],[".md","text/markdown"],[".json","application/json"],[".csv","text/csv"],[".html","text/html"],[".htm","text/html"]]);async function g(t){const{extname:e}=await i(async()=>{const{extname:n}=await import("./__vite-browser-external-DmQu5B2A.js").then(o=>o._);return{extname:n}},__vite__mapDeps([0,1,2,3,4])),a=e(t).toLowerCase();return p.get(a)||"application/octet-stream"}async function u(t){const{existsSync:e,lstatSync:a}=await i(async()=>{const{existsSync:n,lstatSync:o}=await import("./__vite-browser-external-DmQu5B2A.js").then(r=>r._);return{existsSync:n,lstatSync:o}},__vite__mapDeps([0,1,2,3,4]));if(!e(t))throw new m(`Path ${t} does not exist!`);return a(t).isDirectory()}async function v(t){const{createReadStream:e}=await i(async()=>{const{createReadStream:s}=await import("./__vite-browser-external-DmQu5B2A.js").then(c=>c._);return{createReadStream:s}},__vite__mapDeps([0,1,2,3,4])),{basename:a}=await i(async()=>{const{basename:s}=await import("./__vite-browser-external-DmQu5B2A.js").then(c=>c._);return{basename:s}},__vite__mapDeps([0,1,2,3,4])),n=e(t),o=a(t),r=await g(t);return{data:n,name:o,contentType:r}}export{g as getContentType,u as isDir,v as readFile};
|