@ethersphere/bee-dashboard 0.36.0 → 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 +5 -5
- package/build/assets/{__vite-browser-external-D_bWAWBK.js → __vite-browser-external-DmQu5B2A.js} +2 -2
- package/build/assets/{download.browser-DiGQFa2N.js → download.browser-Cpjk6LAy.js} +1 -1
- package/build/assets/{download.node-CzjvEswv.js → download.node-BhI545cO.js} +1 -1
- package/build/assets/{fs.node-B87L1gKf.js → fs.node-DsMWLAtR.js} +2 -2
- package/build/assets/index-T9boIyrz.js +133 -0
- package/build/index.html +1 -1
- package/lib/{App-bJc-m8lc.js → App-7cAV7lii.js} +43 -7
- package/lib/{App-DNdxuM_D.mjs → App-_sIcw37E.mjs} +43 -7
- package/lib/App.cjs.js +1 -1
- package/lib/App.js +1 -1
- package/lib/constants.d.ts +4 -0
- package/lib/{download.browser-BtsZfHY2.js → download.browser-CkVF14pl.js} +1 -1
- package/lib/{download.browser-xicfmV_K.mjs → download.browser-D4xwSLDm.mjs} +1 -1
- package/lib/{download.node-Cot8qXzn.mjs → download.node-CmYlr7RX.mjs} +1 -1
- package/lib/{download.node-Bzm4Mzw4.js → download.node-sjp1kwLg.js} +1 -1
- package/lib/{fs.node-6BiRJR_i.mjs → fs.node-DCqDmotb.mjs} +1 -1
- package/lib/{fs.node-CVEodnBo.js → fs.node-DTMYb9kO.js} +1 -1
- package/lib/{upload.node-Do4ZBa7z.mjs → upload.node-9Q7y6klc.mjs} +3 -3
- package/lib/{upload.node-Lj4JAWof.js → upload.node-DBWX-yGw.js} +3 -3
- package/lib/utils/desktop.d.ts +1 -0
- package/package.json +1 -1
- package/build/assets/index-Dd3cxIPS.js +0 -133
package/build/index.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<link rel="apple-touch-icon" href="/logo192.png" />
|
|
10
10
|
<link rel="manifest" href="/manifest.json" />
|
|
11
11
|
<title>Bee Dashboard</title>
|
|
12
|
-
<script type="module" crossorigin src="/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-T9boIyrz.js"></script>
|
|
13
13
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-mui-tUcmOwCz.js">
|
|
14
14
|
<link rel="modulepreload" crossorigin href="/assets/vendor-ethers-DdwEM-gK.js">
|
|
15
15
|
<link rel="stylesheet" crossorigin href="/assets/index-DMp5phAM.css">
|
|
@@ -52453,6 +52453,7 @@ const BEE_DESKTOP_LATEST_RELEASE_PAGE = "https://github.com/ethersphere/bee-desk
|
|
|
52453
52453
|
const BEE_DESKTOP_LATEST_RELEASE_PAGE_API = "https://api.github.com/repos/ethersphere/bee-desktop/releases/latest";
|
|
52454
52454
|
const DEFAULT_BEE_API_HOST = "http://localhost:1633";
|
|
52455
52455
|
const DEFAULT_RPC_URL = "https://xdai.fairdatasociety.org";
|
|
52456
|
+
const DEFAULT_GIFT_WALLET_FEES = { dai: "0.1", bzz: "5" };
|
|
52456
52457
|
const MIN_STAMP_DEPTH = 17;
|
|
52457
52458
|
const MAX_STAMP_DEPTH = 255;
|
|
52458
52459
|
function bind(fn2, thisArg) {
|
|
@@ -55826,6 +55827,15 @@ async function setEnsResolverInDesktop(desktopUrl, value) {
|
|
|
55826
55827
|
"resolver-options": value
|
|
55827
55828
|
});
|
|
55828
55829
|
}
|
|
55830
|
+
const ENS_RESOLVER_URL = /^(?:[a-z0-9-]+:)?(?:0x[0-9a-fA-F]{40}@)?(https?:\/\/.+)$/i;
|
|
55831
|
+
function extractEnsResolverUrl(value) {
|
|
55832
|
+
const urlPart = ENS_RESOLVER_URL.exec(value.trim())?.[1];
|
|
55833
|
+
try {
|
|
55834
|
+
return urlPart && new URL(urlPart).hostname ? urlPart : null;
|
|
55835
|
+
} catch {
|
|
55836
|
+
return null;
|
|
55837
|
+
}
|
|
55838
|
+
}
|
|
55829
55839
|
function getDesktopConfiguration(desktopUrl) {
|
|
55830
55840
|
return getJson(`${desktopUrl}/config`);
|
|
55831
55841
|
}
|
|
@@ -75581,7 +75591,7 @@ function Provider$8({ children, ...propsSettings }) {
|
|
|
75581
75591
|
desktopApiKey,
|
|
75582
75592
|
isDesktop,
|
|
75583
75593
|
desktopUrl,
|
|
75584
|
-
giftWalletFees: propsSettings.giftWalletFees,
|
|
75594
|
+
giftWalletFees: propsSettings.giftWalletFees ?? DEFAULT_GIFT_WALLET_FEES,
|
|
75585
75595
|
rpcProvider,
|
|
75586
75596
|
rpcProviderUrl,
|
|
75587
75597
|
cors: config2?.["cors-allowed-origins"] ?? null,
|
|
@@ -88881,10 +88891,10 @@ P?.name || "";
|
|
|
88881
88891
|
const bytesEndpoint = "bytes";
|
|
88882
88892
|
async function processDownload(bee, resources, options, requestOptions) {
|
|
88883
88893
|
if (O$1) {
|
|
88884
|
-
const { downloadNode } = await Promise.resolve().then(() => require("./download.node-
|
|
88894
|
+
const { downloadNode } = await Promise.resolve().then(() => require("./download.node-sjp1kwLg.js"));
|
|
88885
88895
|
return await downloadNode(bee, Object.values(resources), options, requestOptions);
|
|
88886
88896
|
}
|
|
88887
|
-
const { downloadBrowser } = await Promise.resolve().then(() => require("./download.browser-
|
|
88897
|
+
const { downloadBrowser } = await Promise.resolve().then(() => require("./download.browser-CkVF14pl.js"));
|
|
88888
88898
|
return await downloadBrowser(Object.values(resources), bee.url, bytesEndpoint, options, requestOptions);
|
|
88889
88899
|
}
|
|
88890
88900
|
class EventEmitterBase {
|
|
@@ -88941,7 +88951,7 @@ async function processUpload(bee, driveInfo, fileOptions, uploadOptions, request
|
|
|
88941
88951
|
return processedOptions.file;
|
|
88942
88952
|
}
|
|
88943
88953
|
if (O$1) {
|
|
88944
|
-
const { processUploadNode } = await Promise.resolve().then(() => require("./upload.node-
|
|
88954
|
+
const { processUploadNode } = await Promise.resolve().then(() => require("./upload.node-DBWX-yGw.js"));
|
|
88945
88955
|
const nodeOptions = processedOptions.options;
|
|
88946
88956
|
return processUploadNode(bee, driveInfo, nodeOptions, uploadOptions, requestOptions);
|
|
88947
88957
|
}
|
|
@@ -102561,6 +102571,7 @@ const SYNC_CHECK_INTERVAL_MS = 2e3;
|
|
|
102561
102571
|
function AssetSyncing({ reference: reference2 }) {
|
|
102562
102572
|
const { beeApi } = React.useContext(Context$8);
|
|
102563
102573
|
const syncTimer = React.useRef(null);
|
|
102574
|
+
const retrieveCheckRef = React.useRef(false);
|
|
102564
102575
|
const [isRetrieveChecking, setIsRetrieveChecking] = React.useState(false);
|
|
102565
102576
|
const [syncProgress, setSyncProgress] = React.useState(0);
|
|
102566
102577
|
const syncCheck = React.useCallback(async () => {
|
|
@@ -102578,6 +102589,16 @@ function AssetSyncing({ reference: reference2 }) {
|
|
|
102578
102589
|
if (tag && tag.split > 0) {
|
|
102579
102590
|
const progress = (tag.seen + tag.synced) / tag.split * 100;
|
|
102580
102591
|
setSyncProgress(progress);
|
|
102592
|
+
} else if (!tag && !retrieveCheckRef.current) {
|
|
102593
|
+
retrieveCheckRef.current = true;
|
|
102594
|
+
try {
|
|
102595
|
+
if (await beeApi.isReferenceRetrievable(reference2)) {
|
|
102596
|
+
setSyncProgress(100);
|
|
102597
|
+
}
|
|
102598
|
+
} catch {
|
|
102599
|
+
} finally {
|
|
102600
|
+
retrieveCheckRef.current = false;
|
|
102601
|
+
}
|
|
102581
102602
|
}
|
|
102582
102603
|
}, [beeApi, reference2]);
|
|
102583
102604
|
React.useEffect(() => {
|
|
@@ -103758,7 +103779,7 @@ function Provider({ children }) {
|
|
|
103758
103779
|
function Index$1() {
|
|
103759
103780
|
const { giftWallets, addGiftWallet } = React.useContext(Context$1);
|
|
103760
103781
|
const { rpcProvider, desktopUrl, giftWalletFees } = React.useContext(Context$8);
|
|
103761
|
-
const { balance } = React.useContext(Context);
|
|
103782
|
+
const { balance, refresh: refreshBalance } = React.useContext(Context);
|
|
103762
103783
|
const [loading, setLoading] = React.useState(false);
|
|
103763
103784
|
const [balances, setBalances] = React.useState([]);
|
|
103764
103785
|
const { enqueueSnackbar } = useSnackbar();
|
|
@@ -103796,6 +103817,7 @@ function Index$1() {
|
|
|
103796
103817
|
console.error(error);
|
|
103797
103818
|
enqueueSnackbar(`Failed to fund gift wallet: ${extractBeeApiErrorMessage(error)}`, { variant: "error" });
|
|
103798
103819
|
} finally {
|
|
103820
|
+
await refreshBalance();
|
|
103799
103821
|
setLoading(false);
|
|
103800
103822
|
}
|
|
103801
103823
|
}
|
|
@@ -103839,7 +103861,7 @@ function Index$1() {
|
|
|
103839
103861
|
] })
|
|
103840
103862
|
] });
|
|
103841
103863
|
}
|
|
103842
|
-
const version = "0.36.
|
|
103864
|
+
const version = "0.36.1";
|
|
103843
103865
|
var withoutCountries$1 = { exports: {} };
|
|
103844
103866
|
function globals(defs2) {
|
|
103845
103867
|
defs2("EPSG:4326", "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees");
|
|
@@ -118618,10 +118640,24 @@ function SettingsPage() {
|
|
|
118618
118640
|
}
|
|
118619
118641
|
}
|
|
118620
118642
|
async function handleSetEnsResolverUrl(value) {
|
|
118643
|
+
const resolverUrl = extractEnsResolverUrl(value);
|
|
118644
|
+
if (!resolverUrl) {
|
|
118645
|
+
enqueueSnackbar("Failed to change ENS resolver. Invalid URL format.", { variant: "error" });
|
|
118646
|
+
return;
|
|
118647
|
+
}
|
|
118648
|
+
try {
|
|
118649
|
+
await newGnosisProviderForValidation(resolverUrl).getNetwork();
|
|
118650
|
+
} catch (e2) {
|
|
118651
|
+
console.error(e2);
|
|
118652
|
+
enqueueSnackbar(`Failed to connect to ENS resolver endpoint. ${extractBeeApiErrorMessage(e2)}`, {
|
|
118653
|
+
variant: "error"
|
|
118654
|
+
});
|
|
118655
|
+
return;
|
|
118656
|
+
}
|
|
118621
118657
|
try {
|
|
118622
118658
|
await setEnsResolverInDesktop(desktopUrl, value);
|
|
118623
118659
|
setEnsResolver(value);
|
|
118624
|
-
const snackKey = enqueueSnackbar("ENS resolver
|
|
118660
|
+
const snackKey = enqueueSnackbar("ENS resolver saved, restarting Bee node...", {
|
|
118625
118661
|
variant: "success"
|
|
118626
118662
|
});
|
|
118627
118663
|
await restartBeeNode(desktopUrl);
|
|
@@ -52436,6 +52436,7 @@ const BEE_DESKTOP_LATEST_RELEASE_PAGE = "https://github.com/ethersphere/bee-desk
|
|
|
52436
52436
|
const BEE_DESKTOP_LATEST_RELEASE_PAGE_API = "https://api.github.com/repos/ethersphere/bee-desktop/releases/latest";
|
|
52437
52437
|
const DEFAULT_BEE_API_HOST = "http://localhost:1633";
|
|
52438
52438
|
const DEFAULT_RPC_URL = "https://xdai.fairdatasociety.org";
|
|
52439
|
+
const DEFAULT_GIFT_WALLET_FEES = { dai: "0.1", bzz: "5" };
|
|
52439
52440
|
const MIN_STAMP_DEPTH = 17;
|
|
52440
52441
|
const MAX_STAMP_DEPTH = 255;
|
|
52441
52442
|
function bind(fn2, thisArg) {
|
|
@@ -55809,6 +55810,15 @@ async function setEnsResolverInDesktop(desktopUrl, value) {
|
|
|
55809
55810
|
"resolver-options": value
|
|
55810
55811
|
});
|
|
55811
55812
|
}
|
|
55813
|
+
const ENS_RESOLVER_URL = /^(?:[a-z0-9-]+:)?(?:0x[0-9a-fA-F]{40}@)?(https?:\/\/.+)$/i;
|
|
55814
|
+
function extractEnsResolverUrl(value) {
|
|
55815
|
+
const urlPart = ENS_RESOLVER_URL.exec(value.trim())?.[1];
|
|
55816
|
+
try {
|
|
55817
|
+
return urlPart && new URL(urlPart).hostname ? urlPart : null;
|
|
55818
|
+
} catch {
|
|
55819
|
+
return null;
|
|
55820
|
+
}
|
|
55821
|
+
}
|
|
55812
55822
|
function getDesktopConfiguration(desktopUrl) {
|
|
55813
55823
|
return getJson(`${desktopUrl}/config`);
|
|
55814
55824
|
}
|
|
@@ -75564,7 +75574,7 @@ function Provider$8({ children, ...propsSettings }) {
|
|
|
75564
75574
|
desktopApiKey,
|
|
75565
75575
|
isDesktop,
|
|
75566
75576
|
desktopUrl,
|
|
75567
|
-
giftWalletFees: propsSettings.giftWalletFees,
|
|
75577
|
+
giftWalletFees: propsSettings.giftWalletFees ?? DEFAULT_GIFT_WALLET_FEES,
|
|
75568
75578
|
rpcProvider,
|
|
75569
75579
|
rpcProviderUrl,
|
|
75570
75580
|
cors: config2?.["cors-allowed-origins"] ?? null,
|
|
@@ -88864,10 +88874,10 @@ P?.name || "";
|
|
|
88864
88874
|
const bytesEndpoint = "bytes";
|
|
88865
88875
|
async function processDownload(bee, resources, options, requestOptions) {
|
|
88866
88876
|
if (O$1) {
|
|
88867
|
-
const { downloadNode } = await import("./download.node-
|
|
88877
|
+
const { downloadNode } = await import("./download.node-CmYlr7RX.mjs");
|
|
88868
88878
|
return await downloadNode(bee, Object.values(resources), options, requestOptions);
|
|
88869
88879
|
}
|
|
88870
|
-
const { downloadBrowser } = await import("./download.browser-
|
|
88880
|
+
const { downloadBrowser } = await import("./download.browser-D4xwSLDm.mjs");
|
|
88871
88881
|
return await downloadBrowser(Object.values(resources), bee.url, bytesEndpoint, options, requestOptions);
|
|
88872
88882
|
}
|
|
88873
88883
|
class EventEmitterBase {
|
|
@@ -88924,7 +88934,7 @@ async function processUpload(bee, driveInfo, fileOptions, uploadOptions, request
|
|
|
88924
88934
|
return processedOptions.file;
|
|
88925
88935
|
}
|
|
88926
88936
|
if (O$1) {
|
|
88927
|
-
const { processUploadNode } = await import("./upload.node-
|
|
88937
|
+
const { processUploadNode } = await import("./upload.node-9Q7y6klc.mjs");
|
|
88928
88938
|
const nodeOptions = processedOptions.options;
|
|
88929
88939
|
return processUploadNode(bee, driveInfo, nodeOptions, uploadOptions, requestOptions);
|
|
88930
88940
|
}
|
|
@@ -102544,6 +102554,7 @@ const SYNC_CHECK_INTERVAL_MS = 2e3;
|
|
|
102544
102554
|
function AssetSyncing({ reference: reference2 }) {
|
|
102545
102555
|
const { beeApi } = useContext(Context$8);
|
|
102546
102556
|
const syncTimer = useRef(null);
|
|
102557
|
+
const retrieveCheckRef = useRef(false);
|
|
102547
102558
|
const [isRetrieveChecking, setIsRetrieveChecking] = useState(false);
|
|
102548
102559
|
const [syncProgress, setSyncProgress] = useState(0);
|
|
102549
102560
|
const syncCheck = useCallback(async () => {
|
|
@@ -102561,6 +102572,16 @@ function AssetSyncing({ reference: reference2 }) {
|
|
|
102561
102572
|
if (tag && tag.split > 0) {
|
|
102562
102573
|
const progress = (tag.seen + tag.synced) / tag.split * 100;
|
|
102563
102574
|
setSyncProgress(progress);
|
|
102575
|
+
} else if (!tag && !retrieveCheckRef.current) {
|
|
102576
|
+
retrieveCheckRef.current = true;
|
|
102577
|
+
try {
|
|
102578
|
+
if (await beeApi.isReferenceRetrievable(reference2)) {
|
|
102579
|
+
setSyncProgress(100);
|
|
102580
|
+
}
|
|
102581
|
+
} catch {
|
|
102582
|
+
} finally {
|
|
102583
|
+
retrieveCheckRef.current = false;
|
|
102584
|
+
}
|
|
102564
102585
|
}
|
|
102565
102586
|
}, [beeApi, reference2]);
|
|
102566
102587
|
useEffect(() => {
|
|
@@ -103741,7 +103762,7 @@ function Provider({ children }) {
|
|
|
103741
103762
|
function Index$1() {
|
|
103742
103763
|
const { giftWallets, addGiftWallet } = useContext(Context$1);
|
|
103743
103764
|
const { rpcProvider, desktopUrl, giftWalletFees } = useContext(Context$8);
|
|
103744
|
-
const { balance } = useContext(Context);
|
|
103765
|
+
const { balance, refresh: refreshBalance } = useContext(Context);
|
|
103745
103766
|
const [loading, setLoading] = useState(false);
|
|
103746
103767
|
const [balances, setBalances] = useState([]);
|
|
103747
103768
|
const { enqueueSnackbar } = useSnackbar();
|
|
@@ -103779,6 +103800,7 @@ function Index$1() {
|
|
|
103779
103800
|
console.error(error);
|
|
103780
103801
|
enqueueSnackbar(`Failed to fund gift wallet: ${extractBeeApiErrorMessage(error)}`, { variant: "error" });
|
|
103781
103802
|
} finally {
|
|
103803
|
+
await refreshBalance();
|
|
103782
103804
|
setLoading(false);
|
|
103783
103805
|
}
|
|
103784
103806
|
}
|
|
@@ -103822,7 +103844,7 @@ function Index$1() {
|
|
|
103822
103844
|
] })
|
|
103823
103845
|
] });
|
|
103824
103846
|
}
|
|
103825
|
-
const version = "0.36.
|
|
103847
|
+
const version = "0.36.1";
|
|
103826
103848
|
var withoutCountries$1 = { exports: {} };
|
|
103827
103849
|
function globals(defs2) {
|
|
103828
103850
|
defs2("EPSG:4326", "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees");
|
|
@@ -118601,10 +118623,24 @@ function SettingsPage() {
|
|
|
118601
118623
|
}
|
|
118602
118624
|
}
|
|
118603
118625
|
async function handleSetEnsResolverUrl(value) {
|
|
118626
|
+
const resolverUrl = extractEnsResolverUrl(value);
|
|
118627
|
+
if (!resolverUrl) {
|
|
118628
|
+
enqueueSnackbar("Failed to change ENS resolver. Invalid URL format.", { variant: "error" });
|
|
118629
|
+
return;
|
|
118630
|
+
}
|
|
118631
|
+
try {
|
|
118632
|
+
await newGnosisProviderForValidation(resolverUrl).getNetwork();
|
|
118633
|
+
} catch (e2) {
|
|
118634
|
+
console.error(e2);
|
|
118635
|
+
enqueueSnackbar(`Failed to connect to ENS resolver endpoint. ${extractBeeApiErrorMessage(e2)}`, {
|
|
118636
|
+
variant: "error"
|
|
118637
|
+
});
|
|
118638
|
+
return;
|
|
118639
|
+
}
|
|
118604
118640
|
try {
|
|
118605
118641
|
await setEnsResolverInDesktop(desktopUrl, value);
|
|
118606
118642
|
setEnsResolver(value);
|
|
118607
|
-
const snackKey = enqueueSnackbar("ENS resolver
|
|
118643
|
+
const snackKey = enqueueSnackbar("ENS resolver saved, restarting Bee node...", {
|
|
118608
118644
|
variant: "success"
|
|
118609
118645
|
});
|
|
118610
118646
|
await restartBeeNode(desktopUrl);
|
package/lib/App.cjs.js
CHANGED
package/lib/App.js
CHANGED
package/lib/constants.d.ts
CHANGED
|
@@ -14,5 +14,9 @@ export declare const BEE_DESKTOP_LATEST_RELEASE_PAGE = "https://github.com/ether
|
|
|
14
14
|
export declare const BEE_DESKTOP_LATEST_RELEASE_PAGE_API = "https://api.github.com/repos/ethersphere/bee-desktop/releases/latest";
|
|
15
15
|
export declare const DEFAULT_BEE_API_HOST = "http://localhost:1633";
|
|
16
16
|
export declare const DEFAULT_RPC_URL = "https://xdai.fairdatasociety.org";
|
|
17
|
+
export declare const DEFAULT_GIFT_WALLET_FEES: {
|
|
18
|
+
dai: string;
|
|
19
|
+
bzz: string;
|
|
20
|
+
};
|
|
17
21
|
export declare const MIN_STAMP_DEPTH = 17;
|
|
18
22
|
export declare const MAX_STAMP_DEPTH = 255;
|
|
@@ -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-7cAV7lii.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-_sIcw37E.mjs";
|
|
2
2
|
async function downloadReadableFetch(resource, apiUrl, endpoint, options, requestOptions) {
|
|
3
3
|
if (options) {
|
|
4
4
|
options = prepareDownloadOptions(options);
|
|
@@ -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-7cAV7lii.js");
|
|
4
4
|
async function downloadNode(bee, resources, options, requestOptions) {
|
|
5
5
|
const dataPromises = [];
|
|
6
6
|
for (const resource of resources) {
|
|
@@ -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-7cAV7lii.js");
|
|
4
4
|
const contentTypes = /* @__PURE__ */ new Map([
|
|
5
5
|
[".mp4", "video/mp4"],
|
|
6
6
|
[".webm", "video/webm"],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BatchId, F as FileError } from "./App-
|
|
1
|
+
import { B as BatchId, F as FileError } from "./App-_sIcw37E.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;
|
|
@@ -12,7 +12,7 @@ async function uploadNode(bee, batchId, nodeOptions, uploadOptions, requestOptio
|
|
|
12
12
|
return await bee.uploadData(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-DCqDmotb.mjs");
|
|
16
16
|
const isPathDir = await isDir(resolvedPath);
|
|
17
17
|
if (isPathDir) {
|
|
18
18
|
return uploadDirectory(bee, batchId, resolvedPath, uploadOptions, requestOptions);
|
|
@@ -21,7 +21,7 @@ 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-DCqDmotb.mjs");
|
|
25
25
|
const { data, name, contentType } = await readFile(resolvedPath);
|
|
26
26
|
return await bee.uploadFile(batchId, data, name, {
|
|
27
27
|
...uploadOptions,
|
|
@@ -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-7cAV7lii.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;
|
|
@@ -14,7 +14,7 @@ async function uploadNode(bee, batchId, nodeOptions, uploadOptions, requestOptio
|
|
|
14
14
|
return await bee.uploadData(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-DTMYb9kO.js"));
|
|
18
18
|
const isPathDir = await isDir(resolvedPath);
|
|
19
19
|
if (isPathDir) {
|
|
20
20
|
return uploadDirectory(bee, batchId, resolvedPath, uploadOptions, requestOptions);
|
|
@@ -23,7 +23,7 @@ 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-DTMYb9kO.js"));
|
|
27
27
|
const { data, name, contentType } = await readFile(resolvedPath);
|
|
28
28
|
return await bee.uploadFile(batchId, data, name, {
|
|
29
29
|
...uploadOptions,
|
package/lib/utils/desktop.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare function getBzzPriceAsDai(desktopUrl: string): Promise<DAI>;
|
|
|
19
19
|
export declare function upgradeToLightNode(desktopUrl: string, rpcProvider: string): Promise<BeeConfig>;
|
|
20
20
|
export declare function setJsonRpcInDesktop(desktopUrl: string, value: string): Promise<void>;
|
|
21
21
|
export declare function setEnsResolverInDesktop(desktopUrl: string, value: string): Promise<void>;
|
|
22
|
+
export declare function extractEnsResolverUrl(value: string): string | null;
|
|
22
23
|
export declare function getDesktopConfiguration(desktopUrl: string): Promise<BeeConfig>;
|
|
23
24
|
export declare function restartBeeNode(desktopUrl: string): Promise<void>;
|
|
24
25
|
export declare function createGiftWallet(desktopUrl: string, address: string): Promise<void>;
|