dccxx-s3-explorer 1.0.60 → 1.0.61
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/s3-explorer.js
CHANGED
|
@@ -15764,55 +15764,56 @@ const ot = {
|
|
|
15764
15764
|
return (e[t] || []).forEach((o) => {
|
|
15765
15765
|
n.push(o.key), o.isFolder && n.push(...xo(e, o.key));
|
|
15766
15766
|
}), n;
|
|
15767
|
-
}, iR = (e, t, n = [], r, o, i) => {
|
|
15768
|
-
const [
|
|
15767
|
+
}, iR = (e, t, n = [], r, o, i, a) => {
|
|
15768
|
+
const [s, c] = oe({}), [l, u] = oe(!1), [m, g] = oe(null), [p, h] = oe(0), v = Xe(t);
|
|
15769
15769
|
Me(() => {
|
|
15770
|
-
|
|
15770
|
+
v.current = t;
|
|
15771
15771
|
}, [t]);
|
|
15772
|
-
const
|
|
15773
|
-
|
|
15772
|
+
const y = async () => {
|
|
15773
|
+
u(!0);
|
|
15774
15774
|
try {
|
|
15775
|
-
const
|
|
15775
|
+
const w = await he.get(`${e}/api/files`, {
|
|
15776
15776
|
params: {
|
|
15777
15777
|
cache: !1,
|
|
15778
15778
|
displayPrefixes: JSON.stringify(n),
|
|
15779
|
-
prefix:
|
|
15779
|
+
prefix: v.current,
|
|
15780
|
+
excludePrivateFiles: a ? "false" : "true"
|
|
15780
15781
|
},
|
|
15781
15782
|
timeout: 3e5
|
|
15782
15783
|
});
|
|
15783
|
-
|
|
15784
|
-
} catch (
|
|
15785
|
-
|
|
15784
|
+
c(w.data), g(null);
|
|
15785
|
+
} catch (w) {
|
|
15786
|
+
g(w instanceof Error ? w : new Error("Failed to fetch files"));
|
|
15786
15787
|
} finally {
|
|
15787
|
-
|
|
15788
|
+
u(!1), h(0), i("");
|
|
15788
15789
|
}
|
|
15789
|
-
},
|
|
15790
|
-
var
|
|
15790
|
+
}, b = async (w) => {
|
|
15791
|
+
var C, E;
|
|
15791
15792
|
try {
|
|
15792
|
-
if (!
|
|
15793
|
+
if (!w)
|
|
15793
15794
|
return;
|
|
15794
|
-
|
|
15795
|
-
const
|
|
15796
|
-
`${e}/api/search-db?query=${
|
|
15795
|
+
u(!0);
|
|
15796
|
+
const x = await he.get(
|
|
15797
|
+
`${e}/api/search-db?query=${w}&rootPrefix=${t}&offset=${(o - 1) * 20}&limit=20`,
|
|
15797
15798
|
{
|
|
15798
15799
|
timeout: 3e5
|
|
15799
15800
|
}
|
|
15800
15801
|
);
|
|
15801
|
-
return
|
|
15802
|
-
} catch (
|
|
15803
|
-
|
|
15802
|
+
return c({ [t]: ((C = x == null ? void 0 : x.data) == null ? void 0 : C.result) || [] }), h(((E = x == null ? void 0 : x.data) == null ? void 0 : E.estimatedTotalHits) || 0), x;
|
|
15803
|
+
} catch (x) {
|
|
15804
|
+
g(x instanceof Error ? x : new Error("Failed to fetch files"));
|
|
15804
15805
|
} finally {
|
|
15805
|
-
|
|
15806
|
+
u(!1);
|
|
15806
15807
|
}
|
|
15807
15808
|
};
|
|
15808
15809
|
return Me(() => {
|
|
15809
|
-
!r && !
|
|
15810
|
+
!r && !l && y(), r && !l && b(r);
|
|
15810
15811
|
}, [r, o]), {
|
|
15811
|
-
data:
|
|
15812
|
-
isLoading:
|
|
15813
|
-
error:
|
|
15814
|
-
estimatedTotalHits:
|
|
15815
|
-
refetch:
|
|
15812
|
+
data: s,
|
|
15813
|
+
isLoading: l,
|
|
15814
|
+
error: m,
|
|
15815
|
+
estimatedTotalHits: p,
|
|
15816
|
+
refetch: y
|
|
15816
15817
|
};
|
|
15817
15818
|
}, Sr = (e) => {
|
|
15818
15819
|
var r, o, i;
|
|
@@ -15855,7 +15856,8 @@ const ot = {
|
|
|
15855
15856
|
i,
|
|
15856
15857
|
u,
|
|
15857
15858
|
qe,
|
|
15858
|
-
m
|
|
15859
|
+
m,
|
|
15860
|
+
s
|
|
15859
15861
|
), im = qm({
|
|
15860
15862
|
onSuccess: (R) => {
|
|
15861
15863
|
rm(R.access_token), localStorage.setItem("google_access_token", R.access_token), am(R.access_token);
|