@fkn/lib 0.9.17 → 0.9.19
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/account.cjs +1 -1
- package/account.js +1 -1
- package/{api-X8SBbrBZ.js → api-DQ-V4Lls.js} +73 -67
- package/{api-Dhc2hNCz.d.ts → api-DnO1DsJC.d.ts} +19 -2
- package/api-kHMHDGar.cjs +3 -0
- package/cloud/dgram.cjs +1 -1
- package/cloud/dgram.js +1 -1
- package/cloud/fetch.cjs +1 -1
- package/cloud/fetch.d.ts +1 -1
- package/cloud/fetch.js +1 -1
- package/cloud/fs.cjs +1 -1
- package/cloud/fs.d.ts +2 -2
- package/cloud/fs.js +1 -1
- package/cloud/net.cjs +1 -1
- package/cloud/net.d.ts +1 -1
- package/cloud/net.js +1 -1
- package/{cloud-CcKsidlt.cjs → cloud-BQoppUw4.cjs} +1 -1
- package/{cloud-DohLHbg2.js → cloud-C8CeqUht.js} +4 -4
- package/{cloud-CvEqxYM6.d.ts → cloud-uE4g-WqI.d.ts} +3 -3
- package/cloud.cjs +1 -1
- package/cloud.d.ts +4 -4
- package/cloud.js +4 -4
- package/{dgram-CW53Betg.cjs → dgram-D2Or5f2e.cjs} +1 -1
- package/{dgram-qpKjZosS.js → dgram-DlGl_ho1.js} +1 -1
- package/dgram.cjs +1 -1
- package/dgram.d.ts +1 -1
- package/dgram.js +1 -1
- package/dns.cjs +1 -1
- package/dns.js +1 -1
- package/{extension-1l_UXQsi.cjs → extension-4BM5hKrn.cjs} +1 -1
- package/{extension-DQcp_LKK.js → extension-DVO10P3i.js} +2 -2
- package/extension.cjs +1 -1
- package/extension.js +1 -1
- package/fs/promises.cjs +1 -1
- package/fs/promises.js +1 -1
- package/fs-BW5mVMmu.js +340 -0
- package/{fs-D5LFP4_n.d.ts → fs-CUmugp10.d.ts} +1 -1
- package/fs-DJm0bhjg.cjs +1 -0
- package/fs.cjs +1 -1
- package/fs.js +1 -1
- package/http.cjs +1 -1
- package/http.d.ts +1 -1
- package/http.js +1 -1
- package/index.cjs +1 -1
- package/index.d.ts +34 -3
- package/index.js +38 -27
- package/{net-B-LNnKps.js → net-BbmQeMpt.js} +1 -1
- package/{net-luhw3yr7.cjs → net-COzDDBnS.cjs} +1 -1
- package/{net-BtdN07IP.d.ts → net-l7JVHsIR.d.ts} +1 -1
- package/net.cjs +1 -1
- package/net.d.ts +1 -1
- package/net.js +1 -1
- package/package.json +1 -1
- package/packages.cjs +1 -1
- package/packages.js +1 -1
- package/{proxy-etZJARWe.d.ts → proxy-7ib45Uo-.d.ts} +1 -1
- package/{proxy-B0W1qzCo.cjs → proxy-B0gNjT8-.cjs} +1 -1
- package/{proxy-CtS_JiZL.js → proxy-BpqvCJmA.js} +1 -1
- package/storage-BW-jDLUL.cjs +1 -0
- package/storage-C8hBot2f.js +51 -0
- package/storage-qxXFLgTM.d.ts +44 -0
- package/api-DLGGoSnx.cjs +0 -3
- package/fs-B-NZzzSX.js +0 -315
- package/fs-C5L6CqmF.cjs +0 -1
- package/storage-CXIXrIxB.d.ts +0 -38
- package/storage-D2a8SsY5.cjs +0 -1
- package/storage-XKGhInxm.js +0 -37
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
2
|
import { A as t, B as n, C as r, D as i, E as a, F as o, H as s, I as c, L as l, M as u, N as d, O as f, P as p, R as m, S as h, T as g, V as _, _ as v, a as y, b, c as x, d as S, g as C, h as w, i as T, j as E, k as D, l as O, m as k, n as A, o as j, p as M, r as N, s as P, t as F, u as I, v as L, w as R, x as z, y as B, z as V } from "./lib-CegQxwDI.js";
|
|
3
|
-
import { t as H } from "./api-
|
|
4
|
-
import { n as U, t as W } from "./proxy-
|
|
3
|
+
import { t as H } from "./api-DQ-V4Lls.js";
|
|
4
|
+
import { n as U, t as W } from "./proxy-BpqvCJmA.js";
|
|
5
5
|
import { available as G, fetch as K } from "./desktop.js";
|
|
6
6
|
//#region src/lib/extension-prompt.ts
|
|
7
7
|
var q = async (e) => {
|
package/extension.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./lib-ulyxIbTr.cjs"),t=require("./extension-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./lib-ulyxIbTr.cjs"),t=require("./extension-4BM5hKrn.cjs");exports.ATTACH_FRAME_EVENT_KEY=e.n,exports.FORGEABLE_HEADERS=e.k,exports.LOCATOR_DENIED=e.g,exports.LOCATOR_ERROR=e.u,exports.LOCATOR_UNSUPPORTED=e.h,exports.assertAttachableFrameUrl=e.s,exports.assertFetchableUrl=e.S,exports.assertForgeableHeaders=e.A,exports.assertLockdownApplicable=e.c,exports.assertOneCookieIdentity=e.j,exports.attachFrame=e.r,exports.attachFramePermission=e.i,exports.available=t.r,exports.box=e.R,exports.cookies=e.b,exports.createFrame=e.a,exports.createVideoElementHandle=e.z,exports.events=e.N,exports.extension=e.N,exports.fetch=e.C,exports.fetchCredentialedPermission=e.w,exports.fetchLocalPermission=e.T,exports.fetchPermission=e.E,exports.gotoPermission=e.o,exports.handleRevivableModules=e.L,exports.hasForgedCookie=e.M,exports.isBlockedFetchUrl=e.D,exports.isBlockedFrameUrl=e.l,exports.isExtensionExposed=e.P,exports.isLocalNetworkUrl=e.O,exports.isLocatorDenied=e.d,exports.isLocatorUnsupported=e.m,exports.isTerminalError=e.p,exports.isType=e.B,exports.modifyRequestHeadersPermission=e._,exports.permissions=e.t,exports.promptInstall=t.i,exports.readCookiePermission=e.x,exports.removeRequestHeaderRule=e.v,exports.revive=e.V,exports.setMissingExtensionHandler=e.F,exports.setRequestHeaderRule=e.y,exports.type=e.H,exports.waitForExtensionExposure=e.I;
|
package/extension.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { A as e, B as t, C as n, D as r, E as i, F as a, H as o, I as s, L as c, M as l, N as u, O as d, P as f, R as p, S as m, T as h, V as g, _, a as v, b as y, c as b, d as x, g as S, h as C, i as w, j as T, k as E, l as D, m as O, n as k, o as A, p as j, r as M, s as N, t as P, u as F, v as I, w as L, x as R, y as z, z as B } from "./lib-CegQxwDI.js";
|
|
2
|
-
import { i as V, r as H } from "./extension-
|
|
2
|
+
import { i as V, r as H } from "./extension-DVO10P3i.js";
|
|
3
3
|
export { k as ATTACH_FRAME_EVENT_KEY, E as FORGEABLE_HEADERS, S as LOCATOR_DENIED, F as LOCATOR_ERROR, C as LOCATOR_UNSUPPORTED, N as assertAttachableFrameUrl, m as assertFetchableUrl, e as assertForgeableHeaders, b as assertLockdownApplicable, T as assertOneCookieIdentity, M as attachFrame, w as attachFramePermission, H as available, p as box, y as cookies, v as createFrame, B as createVideoElementHandle, u as events, u as extension, n as fetch, L as fetchCredentialedPermission, h as fetchLocalPermission, i as fetchPermission, A as gotoPermission, c as handleRevivableModules, l as hasForgedCookie, r as isBlockedFetchUrl, D as isBlockedFrameUrl, f as isExtensionExposed, d as isLocalNetworkUrl, x as isLocatorDenied, O as isLocatorUnsupported, j as isTerminalError, t as isType, _ as modifyRequestHeadersPermission, P as permissions, V as promptInstall, R as readCookiePermission, I as removeRequestHeaderRule, g as revive, a as setMissingExtensionHandler, z as setRequestHeaderRule, o as type, s as waitForExtensionExposure };
|
package/fs/promises.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../fs-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../fs-DJm0bhjg.cjs");var{readFile:t,writeFile:n,appendFile:r,unlink:i,rename:a,readdir:o,mkdir:s,rm:c,rmdir:l,stat:u,lstat:d,access:f}=e.v,p=e.v;exports.access=f,exports.appendFile=r,exports.default=p,exports.lstat=d,exports.mkdir=s,exports.readFile=t,exports.readdir=o,exports.rename=a,exports.rm=c,exports.rmdir=l,exports.stat=u,exports.unlink=i,exports.writeFile=n;
|
package/fs/promises.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { v as e } from "../fs-
|
|
1
|
+
import { v as e } from "../fs-BW5mVMmu.js";
|
|
2
2
|
//#region src/lib/fs/promises.ts
|
|
3
3
|
var { readFile: t, writeFile: n, appendFile: r, unlink: i, rename: a, readdir: o, mkdir: s, rm: c, rmdir: l, stat: u, lstat: d, access: f } = e, p = e;
|
|
4
4
|
//#endregion
|
package/fs-BW5mVMmu.js
ADDED
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { t } from "./node-fs-DKfokOlh.js";
|
|
3
|
+
import { c as n, f as r, l as i, o as a, r as o } from "./storage-C8hBot2f.js";
|
|
4
|
+
import { a as s, i as c, n as l, o as u, t as d } from "./opfs-BibrNGF0.js";
|
|
5
|
+
//#region src/lib/fs/hybrid.ts
|
|
6
|
+
var ee = /* @__PURE__ */ e({
|
|
7
|
+
adopt: () => V,
|
|
8
|
+
adoptable: () => H,
|
|
9
|
+
available: () => te,
|
|
10
|
+
list: () => oe,
|
|
11
|
+
onConflict: () => z,
|
|
12
|
+
pending: () => O,
|
|
13
|
+
pendingDeletes: () => k,
|
|
14
|
+
pull: () => ue,
|
|
15
|
+
readFile: () => se,
|
|
16
|
+
remove: () => le,
|
|
17
|
+
replicating: () => re,
|
|
18
|
+
writeFile: () => ce
|
|
19
|
+
}), f, p = async () => await (f ??= d().catch(() => !1)) ? !0 : (f = void 0, !1), m = () => o().catch(() => "unknown"), h = async () => await m() === "connected", te = async () => await p() || await h(), g = "fkn:fs:pending", _ = "fkn:fs:pending-delete", v = "fkn:fs:adopt-declined", y = !0, b = /* @__PURE__ */ new Map(), x = (e) => {
|
|
20
|
+
try {
|
|
21
|
+
let t = localStorage.getItem(e);
|
|
22
|
+
if (!t) return {};
|
|
23
|
+
let n = JSON.parse(t);
|
|
24
|
+
return Array.isArray(n) ? Object.fromEntries(n.filter((e) => typeof e == "string").map((e) => [e, null])) : n && typeof n == "object" ? n : {};
|
|
25
|
+
} catch {
|
|
26
|
+
return {};
|
|
27
|
+
}
|
|
28
|
+
}, S = (e, t) => {
|
|
29
|
+
try {
|
|
30
|
+
Object.keys(t).length ? localStorage.setItem(e, JSON.stringify(t)) : localStorage.removeItem(e);
|
|
31
|
+
} catch {}
|
|
32
|
+
}, C = () => x(g), w = (e, t) => {
|
|
33
|
+
let n = C();
|
|
34
|
+
e in n || (n[e] = t === void 0 ? b.get(e) ?? null : t, S(g, n));
|
|
35
|
+
}, T = (e) => {
|
|
36
|
+
let t = C();
|
|
37
|
+
e in t && (delete t[e], S(g, t), j() || (N = M));
|
|
38
|
+
}, E = () => x(_), ne = (e) => {
|
|
39
|
+
let t = E();
|
|
40
|
+
e in t || (t[e] = b.get(e) ?? null, S(_, t));
|
|
41
|
+
}, D = (e) => {
|
|
42
|
+
let t = E();
|
|
43
|
+
e in t && (delete t[e], S(_, t), j() || (N = M));
|
|
44
|
+
}, O = () => Object.keys(C()), k = () => Object.keys(E()), re = () => y, A = null, j = () => Object.keys(C()).length > 0 || Object.keys(E()).length > 0, M = 6e4, ie = 10 * 6e4, N = M, P = null, F = () => {
|
|
45
|
+
P || typeof window > "u" || !j() || (P = setTimeout(() => {
|
|
46
|
+
P = null, I();
|
|
47
|
+
}, N), N = Math.min(N * 2, ie));
|
|
48
|
+
}, I = () => {
|
|
49
|
+
A || !j() || (A = B(!1).then((e) => {
|
|
50
|
+
if (!j()) {
|
|
51
|
+
N = M;
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
e.failed.length && F();
|
|
55
|
+
}).catch(() => {
|
|
56
|
+
F();
|
|
57
|
+
}).finally(() => {
|
|
58
|
+
A = null;
|
|
59
|
+
}));
|
|
60
|
+
}, ae = null, L = () => ae ??= import("./api-DQ-V4Lls.js").then((e) => e.n).then((e) => e.apiPromise), oe = async () => {
|
|
61
|
+
G();
|
|
62
|
+
let e = await m(), t = e === "connected", [n, r] = await Promise.all([p().then((e) => e ? l() : []).catch(() => []), t ? a().then((e) => ({
|
|
63
|
+
ok: !0,
|
|
64
|
+
entries: e
|
|
65
|
+
})).catch(() => ({
|
|
66
|
+
ok: !1,
|
|
67
|
+
entries: []
|
|
68
|
+
})) : Promise.resolve({
|
|
69
|
+
ok: e === "disconnected",
|
|
70
|
+
entries: []
|
|
71
|
+
})]);
|
|
72
|
+
e !== "unknown" && (y = r.ok), r.ok && e !== "unknown" && (b = new Map(r.entries.map((e) => [e.path, e.updatedAt])));
|
|
73
|
+
let i = /* @__PURE__ */ new Map(), o = (e) => {
|
|
74
|
+
let t = Date.parse(e.updatedAt ?? "");
|
|
75
|
+
return Number.isFinite(t) ? t : 0;
|
|
76
|
+
}, s = (e) => {
|
|
77
|
+
let t = i.get(e.path);
|
|
78
|
+
(!t || o(e) >= o(t)) && i.set(e.path, e);
|
|
79
|
+
};
|
|
80
|
+
for (let e of n) s(e);
|
|
81
|
+
for (let e of r.entries) s(e);
|
|
82
|
+
return r.ok && t && (he(n, r.entries).catch(() => {}), j() ? I() : W({
|
|
83
|
+
local: n,
|
|
84
|
+
remote: r.entries
|
|
85
|
+
}).catch(() => {})), [...i.values()];
|
|
86
|
+
}, se = async (e) => {
|
|
87
|
+
if (await p()) try {
|
|
88
|
+
return await c(e);
|
|
89
|
+
} catch (e) {
|
|
90
|
+
if (e?.name !== "NotFoundError") throw e;
|
|
91
|
+
}
|
|
92
|
+
let t = await n(e);
|
|
93
|
+
return await p() && u(e, t).catch(() => {}), t;
|
|
94
|
+
}, ce = async (e, t, n) => {
|
|
95
|
+
let i = t instanceof Blob ? t : new Blob([t], n?.contentType ? { type: n.contentType } : void 0);
|
|
96
|
+
if (await p()) {
|
|
97
|
+
await u(e, i, n), G();
|
|
98
|
+
let t = b.get(e) ?? null, a = await m();
|
|
99
|
+
if (a === "disconnected") return;
|
|
100
|
+
if (a === "unknown" || !y) {
|
|
101
|
+
w(e, t), F();
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
r(e, i, n).then(() => T(e)).catch((n) => {
|
|
105
|
+
w(e, t), F(), console.warn("fs: cloud replicate failed, queued for adopt()", n);
|
|
106
|
+
});
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
let a = await m();
|
|
110
|
+
if (a === "connected") return r(e, i, n);
|
|
111
|
+
throw Error(a === "unknown" ? "fs: cloud unreachable" : "fs: no storage backend available");
|
|
112
|
+
}, le = async (e) => {
|
|
113
|
+
G();
|
|
114
|
+
let t = [];
|
|
115
|
+
await p() && t.push(s(e).catch(() => {}));
|
|
116
|
+
let n = await m();
|
|
117
|
+
if (n === "connected" ? t.push(i(e).then(() => D(e)).catch((t) => {
|
|
118
|
+
ne(e), F(), console.warn("fs: cloud delete failed, queued for retry", t);
|
|
119
|
+
})) : n === "unknown" && t.length && b.has(e) && (ne(e), F()), !t.length) throw Error(n === "unknown" ? "fs: cloud unreachable" : "fs: no storage backend available");
|
|
120
|
+
T(e), await Promise.all(t);
|
|
121
|
+
}, ue = async (e) => {
|
|
122
|
+
let t = await n(e);
|
|
123
|
+
return await p() && await u(e, t), t;
|
|
124
|
+
}, R = null, z = (e) => (R = e, () => {
|
|
125
|
+
R === e && (R = null);
|
|
126
|
+
}), de = async (e) => (await L()).cloud.fs.promptConflict({
|
|
127
|
+
path: e.path,
|
|
128
|
+
local: e.local,
|
|
129
|
+
cloud: e.cloud
|
|
130
|
+
}).catch(() => null), fe = async (e) => {
|
|
131
|
+
if (R) try {
|
|
132
|
+
return await R(e);
|
|
133
|
+
} catch {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
return de(e);
|
|
137
|
+
}, B = async (e) => {
|
|
138
|
+
let t = {
|
|
139
|
+
uploaded: [],
|
|
140
|
+
kept: [],
|
|
141
|
+
resolved: [],
|
|
142
|
+
unresolved: [],
|
|
143
|
+
deleted: [],
|
|
144
|
+
failed: []
|
|
145
|
+
}, o = await m();
|
|
146
|
+
if (o === "unknown") throw Error("fs: cloud unreachable");
|
|
147
|
+
if (o !== "connected") throw Error("fs: this needs a signed-in account");
|
|
148
|
+
let s = await p(), [d, ee] = await Promise.all([s ? l() : Promise.resolve([]), a()]), f = new Map(ee.map((e) => [e.path, e])), h = C();
|
|
149
|
+
if (s) for (let e of Object.keys(h)) d.some((t) => t.path === e) || T(e);
|
|
150
|
+
for (let [e, n] of Object.entries(E())) {
|
|
151
|
+
let r = f.get(e);
|
|
152
|
+
if (!r) {
|
|
153
|
+
D(e);
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
if (d.some((t) => t.path === e)) {
|
|
157
|
+
D(e);
|
|
158
|
+
continue;
|
|
159
|
+
}
|
|
160
|
+
if (r.updatedAt !== n) {
|
|
161
|
+
D(e);
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
try {
|
|
165
|
+
await i(e), D(e), t.deleted.push(e);
|
|
166
|
+
} catch (n) {
|
|
167
|
+
t.failed.push({
|
|
168
|
+
path: e,
|
|
169
|
+
error: n instanceof Error ? n.message : String(n)
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
for (let i of d) {
|
|
174
|
+
let a = f.get(i.path), o = i.path in h;
|
|
175
|
+
if (!o && (a || !e)) {
|
|
176
|
+
a && t.kept.push(i.path);
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
if (o && a && a.updatedAt !== h[i.path]) {
|
|
180
|
+
let e = await fe({
|
|
181
|
+
path: i.path,
|
|
182
|
+
local: {
|
|
183
|
+
size: i.size,
|
|
184
|
+
updatedAt: i.updatedAt
|
|
185
|
+
},
|
|
186
|
+
cloud: {
|
|
187
|
+
size: a.size,
|
|
188
|
+
updatedAt: a.updatedAt
|
|
189
|
+
},
|
|
190
|
+
readLocal: () => c(i.path),
|
|
191
|
+
readCloud: () => n(i.path)
|
|
192
|
+
});
|
|
193
|
+
if (!e) {
|
|
194
|
+
t.unresolved.push(i.path);
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
197
|
+
try {
|
|
198
|
+
if (e === "cloud") await u(i.path, await n(i.path));
|
|
199
|
+
else {
|
|
200
|
+
let t = e === "local" ? await c(i.path) : e.merged;
|
|
201
|
+
await r(i.path, t, i.contentType ? { contentType: i.contentType } : void 0), e !== "local" && await u(i.path, t);
|
|
202
|
+
}
|
|
203
|
+
T(i.path), t.resolved.push({
|
|
204
|
+
path: i.path,
|
|
205
|
+
choice: e === "local" || e === "cloud" ? e : "merged"
|
|
206
|
+
});
|
|
207
|
+
} catch (e) {
|
|
208
|
+
if (e?.code === "FKN_E2E_LOCKED") throw e;
|
|
209
|
+
t.failed.push({
|
|
210
|
+
path: i.path,
|
|
211
|
+
error: e instanceof Error ? e.message : String(e)
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
continue;
|
|
215
|
+
}
|
|
216
|
+
try {
|
|
217
|
+
let e = await c(i.path);
|
|
218
|
+
await r(i.path, e, i.contentType ? { contentType: i.contentType } : void 0), T(i.path), t.uploaded.push(i.path);
|
|
219
|
+
} catch (e) {
|
|
220
|
+
if (w(i.path), e?.code === "FKN_E2E_LOCKED") throw e;
|
|
221
|
+
t.failed.push({
|
|
222
|
+
path: i.path,
|
|
223
|
+
error: e instanceof Error ? e.message : String(e)
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return t;
|
|
228
|
+
}, V = async () => {
|
|
229
|
+
for (; A;) await A;
|
|
230
|
+
let e = B(!0);
|
|
231
|
+
A = e.then(() => {}, () => {});
|
|
232
|
+
try {
|
|
233
|
+
return await e;
|
|
234
|
+
} finally {
|
|
235
|
+
A = null;
|
|
236
|
+
}
|
|
237
|
+
}, H = async () => {
|
|
238
|
+
if (!await h() || !await p()) return {
|
|
239
|
+
paths: [],
|
|
240
|
+
bytes: 0
|
|
241
|
+
};
|
|
242
|
+
let [e, t] = await Promise.all([l(), a()]), n = new Set(t.map((e) => e.path)), r = e.filter((e) => !n.has(e.path));
|
|
243
|
+
return {
|
|
244
|
+
paths: r.map((e) => e.path),
|
|
245
|
+
bytes: r.reduce((e, t) => e + t.size, 0)
|
|
246
|
+
};
|
|
247
|
+
}, pe = () => new Set(Object.keys(x(v))), me = (e) => {
|
|
248
|
+
let t = x(v);
|
|
249
|
+
for (let n of e) t[n] = null;
|
|
250
|
+
S(v, t);
|
|
251
|
+
}, U = null, W = (e) => U || (U = (async () => {
|
|
252
|
+
if (!await h()) return;
|
|
253
|
+
let t = e ?? (await p() ? {
|
|
254
|
+
local: await l(),
|
|
255
|
+
remote: await a()
|
|
256
|
+
} : null);
|
|
257
|
+
if (!t) return;
|
|
258
|
+
let n = new Set(t.remote.map((e) => e.path)), r = pe(), i = t.local.filter((e) => !n.has(e.path) && !r.has(e.path));
|
|
259
|
+
if (!i.length) return;
|
|
260
|
+
let o = await L(), s = i.reduce((e, t) => e + t.size, 0);
|
|
261
|
+
if (!await o.cloud.fs.promptAdopt({
|
|
262
|
+
files: i.length,
|
|
263
|
+
bytes: s
|
|
264
|
+
}).catch(() => !1)) {
|
|
265
|
+
me(i.map((e) => e.path));
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
await V();
|
|
269
|
+
})().catch(() => {}).finally(() => {
|
|
270
|
+
U = null;
|
|
271
|
+
}), U), he = async (e, t) => {
|
|
272
|
+
let n = new Set(t.map((e) => e.path)), r = e.filter((e) => !n.has(e.path)), i = await L(), a = async () => {
|
|
273
|
+
await V().catch(() => {});
|
|
274
|
+
let e = await H().catch(() => ({
|
|
275
|
+
paths: [],
|
|
276
|
+
bytes: 0
|
|
277
|
+
}));
|
|
278
|
+
await i.cloud.fs.setAdoptSource({
|
|
279
|
+
files: e.paths.length,
|
|
280
|
+
bytes: e.bytes
|
|
281
|
+
}, a).catch(() => {});
|
|
282
|
+
};
|
|
283
|
+
await i.cloud.fs.setAdoptSource({
|
|
284
|
+
files: r.length,
|
|
285
|
+
bytes: r.reduce((e, t) => e + t.size, 0)
|
|
286
|
+
}, a);
|
|
287
|
+
}, ge = !1, G = () => {
|
|
288
|
+
ge || typeof window > "u" || (ge = !0, window.addEventListener("online", () => {
|
|
289
|
+
I();
|
|
290
|
+
}), import("./account.js").then((e) => e.onChange(() => {
|
|
291
|
+
W().catch(() => {}), I();
|
|
292
|
+
})).catch(() => {}));
|
|
293
|
+
}, _e = /* @__PURE__ */ e({
|
|
294
|
+
adopt: () => J,
|
|
295
|
+
adoptable: () => Y,
|
|
296
|
+
appendFile: () => Pe,
|
|
297
|
+
appendFileSync: () => Se,
|
|
298
|
+
available: () => ye,
|
|
299
|
+
default: () => Ge,
|
|
300
|
+
exists: () => Ve,
|
|
301
|
+
existsSync: () => Ce,
|
|
302
|
+
flush: () => Ue,
|
|
303
|
+
lstatSync: () => Te,
|
|
304
|
+
mkdir: () => Le,
|
|
305
|
+
mkdirSync: () => De,
|
|
306
|
+
mount: () => He,
|
|
307
|
+
onConflict: () => $,
|
|
308
|
+
pending: () => X,
|
|
309
|
+
pendingDeletes: () => Z,
|
|
310
|
+
promises: () => K,
|
|
311
|
+
pull: () => q,
|
|
312
|
+
readFile: () => Me,
|
|
313
|
+
readFileSync: () => be,
|
|
314
|
+
readdir: () => Ie,
|
|
315
|
+
readdirSync: () => Ee,
|
|
316
|
+
remount: () => We,
|
|
317
|
+
rename: () => Be,
|
|
318
|
+
renameSync: () => je,
|
|
319
|
+
replicating: () => Q,
|
|
320
|
+
rm: () => Re,
|
|
321
|
+
rmSync: () => Oe,
|
|
322
|
+
rmdirSync: () => ke,
|
|
323
|
+
stat: () => Fe,
|
|
324
|
+
statSync: () => we,
|
|
325
|
+
unlink: () => ze,
|
|
326
|
+
unlinkSync: () => Ae,
|
|
327
|
+
writeFile: () => Ne,
|
|
328
|
+
writeFileSync: () => xe
|
|
329
|
+
}), ve = t(ee, { memfs: !0 }), { available: ye, readFileSync: be, writeFileSync: xe, appendFileSync: Se, existsSync: Ce, statSync: we, lstatSync: Te, readdirSync: Ee, mkdirSync: De, rmSync: Oe, rmdirSync: ke, unlinkSync: Ae, renameSync: je, readFile: Me, writeFile: Ne, appendFile: Pe, stat: Fe, readdir: Ie, mkdir: Le, rm: Re, unlink: ze, rename: Be, exists: Ve, promises: K, mount: He, flush: Ue, remount: We } = ve, q = ue, J = V, Y = H, X = O, Z = k, Q = re, $ = z, Ge = {
|
|
330
|
+
...ve,
|
|
331
|
+
pull: q,
|
|
332
|
+
adopt: J,
|
|
333
|
+
adoptable: Y,
|
|
334
|
+
pending: X,
|
|
335
|
+
pendingDeletes: Z,
|
|
336
|
+
replicating: Q,
|
|
337
|
+
onConflict: $
|
|
338
|
+
};
|
|
339
|
+
//#endregion
|
|
340
|
+
export { ke as A, Ee as C, Q as D, je as E, Ne as F, xe as I, we as M, ze as N, Re as O, Ae as P, Ie as S, Be as T, Z as _, ye as a, Me as b, Ue as c, Te as d, Le as f, X as g, $ as h, Se as i, Fe as j, Oe as k, Ge as l, He as m, Y as n, Ve as o, De as p, Pe as r, Ce as s, J as t, _e as u, K as v, We as w, be as x, q as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as STORAGE_NOT_FOUND } from "./storage-
|
|
1
|
+
import { n as STORAGE_NOT_FOUND } from "./storage-qxXFLgTM.js";
|
|
2
2
|
import { a as Stats, i as ReadOptions, n as Callback, o as WriteData, r as MakeOptions, s as WriteOptions } from "./index-CJ0vHTcS.js";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/storage.d.ts
|
package/fs-DJm0bhjg.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./node-fs-BMR2yCEt.cjs"),n=require("./storage-BW-jDLUL.cjs"),r=require("./opfs-CXMESVLc.cjs");var i=e.t({adopt:()=>F,adoptable:()=>I,available:()=>l,list:()=>re,onConflict:()=>ce,pending:()=>C,pendingDeletes:()=>w,pull:()=>se,readFile:()=>ie,remove:()=>oe,replicating:()=>ee,writeFile:()=>ae}),a,o=async()=>await(a??=r.t().catch(()=>!1))?!0:(a=void 0,!1),s=()=>n.r().catch(()=>`unknown`),c=async()=>await s()===`connected`,l=async()=>await o()||await c(),u=`fkn:fs:pending`,d=`fkn:fs:pending-delete`,f=`fkn:fs:adopt-declined`,p=!0,m=new Map,h=e=>{try{let t=localStorage.getItem(e);if(!t)return{};let n=JSON.parse(t);return Array.isArray(n)?Object.fromEntries(n.filter(e=>typeof e==`string`).map(e=>[e,null])):n&&typeof n==`object`?n:{}}catch{return{}}},g=(e,t)=>{try{Object.keys(t).length?localStorage.setItem(e,JSON.stringify(t)):localStorage.removeItem(e)}catch{}},_=()=>h(u),v=(e,t)=>{let n=_();e in n||(n[e]=t===void 0?m.get(e)??null:t,g(u,n))},y=e=>{let t=_();e in t&&(delete t[e],g(u,t),E()||(O=D))},b=()=>h(d),x=e=>{let t=b();e in t||(t[e]=m.get(e)??null,g(d,t))},S=e=>{let t=b();e in t&&(delete t[e],g(d,t),E()||(O=D))},C=()=>Object.keys(_()),w=()=>Object.keys(b()),ee=()=>p,T=null,E=()=>Object.keys(_()).length>0||Object.keys(b()).length>0,D=6e4,te=10*6e4,O=D,k=null,A=()=>{k||typeof window>`u`||!E()||(k=setTimeout(()=>{k=null,j()},O),O=Math.min(O*2,te))},j=()=>{T||!E()||(T=P(!1).then(e=>{if(!E()){O=D;return}e.failed.length&&A()}).catch(()=>{A()}).finally(()=>{T=null}))},ne=null,M=()=>ne??=Promise.resolve().then(()=>require("./api-kHMHDGar.cjs")).then(e=>e.n).then(e=>e.apiPromise),re=async()=>{B();let e=await s(),t=e===`connected`,[i,a]=await Promise.all([o().then(e=>e?r.n():[]).catch(()=>[]),t?n.o().then(e=>({ok:!0,entries:e})).catch(()=>({ok:!1,entries:[]})):Promise.resolve({ok:e===`disconnected`,entries:[]})]);e!==`unknown`&&(p=a.ok),a.ok&&e!==`unknown`&&(m=new Map(a.entries.map(e=>[e.path,e.updatedAt])));let c=new Map,l=e=>{let t=Date.parse(e.updatedAt??``);return Number.isFinite(t)?t:0},u=e=>{let t=c.get(e.path);(!t||l(e)>=l(t))&&c.set(e.path,e)};for(let e of i)u(e);for(let e of a.entries)u(e);return a.ok&&t&&(pe(i,a.entries).catch(()=>{}),E()?j():R({local:i,remote:a.entries}).catch(()=>{})),[...c.values()]},ie=async e=>{if(await o())try{return await r.i(e)}catch(e){if(e?.name!==`NotFoundError`)throw e}let t=await n.c(e);return await o()&&r.o(e,t).catch(()=>{}),t},ae=async(e,t,i)=>{let a=t instanceof Blob?t:new Blob([t],i?.contentType?{type:i.contentType}:void 0);if(await o()){await r.o(e,a,i),B();let t=m.get(e)??null,o=await s();if(o===`disconnected`)return;if(o===`unknown`||!p){v(e,t),A();return}n.f(e,a,i).then(()=>y(e)).catch(n=>{v(e,t),A(),console.warn(`fs: cloud replicate failed, queued for adopt()`,n)});return}let c=await s();if(c===`connected`)return n.f(e,a,i);throw Error(c===`unknown`?`fs: cloud unreachable`:`fs: no storage backend available`)},oe=async e=>{B();let t=[];await o()&&t.push(r.a(e).catch(()=>{}));let i=await s();if(i===`connected`?t.push(n.l(e).then(()=>S(e)).catch(t=>{x(e),A(),console.warn(`fs: cloud delete failed, queued for retry`,t)})):i===`unknown`&&t.length&&m.has(e)&&(x(e),A()),!t.length)throw Error(i===`unknown`?`fs: cloud unreachable`:`fs: no storage backend available`);y(e),await Promise.all(t)},se=async e=>{let t=await n.c(e);return await o()&&await r.o(e,t),t},N=null,ce=e=>(N=e,()=>{N===e&&(N=null)}),le=async e=>(await M()).cloud.fs.promptConflict({path:e.path,local:e.local,cloud:e.cloud}).catch(()=>null),ue=async e=>{if(N)try{return await N(e)}catch{return null}return le(e)},P=async e=>{let t={uploaded:[],kept:[],resolved:[],unresolved:[],deleted:[],failed:[]},i=await s();if(i===`unknown`)throw Error(`fs: cloud unreachable`);if(i!==`connected`)throw Error(`fs: this needs a signed-in account`);let a=await o(),[c,l]=await Promise.all([a?r.n():Promise.resolve([]),n.o()]),u=new Map(l.map(e=>[e.path,e])),d=_();if(a)for(let e of Object.keys(d))c.some(t=>t.path===e)||y(e);for(let[e,r]of Object.entries(b())){let i=u.get(e);if(!i){S(e);continue}if(c.some(t=>t.path===e)){S(e);continue}if(i.updatedAt!==r){S(e);continue}try{await n.l(e),S(e),t.deleted.push(e)}catch(n){t.failed.push({path:e,error:n instanceof Error?n.message:String(n)})}}for(let i of c){let a=u.get(i.path),o=i.path in d;if(!o&&(a||!e)){a&&t.kept.push(i.path);continue}if(o&&a&&a.updatedAt!==d[i.path]){let e=await ue({path:i.path,local:{size:i.size,updatedAt:i.updatedAt},cloud:{size:a.size,updatedAt:a.updatedAt},readLocal:()=>r.i(i.path),readCloud:()=>n.c(i.path)});if(!e){t.unresolved.push(i.path);continue}try{if(e===`cloud`)await r.o(i.path,await n.c(i.path));else{let t=e===`local`?await r.i(i.path):e.merged;await n.f(i.path,t,i.contentType?{contentType:i.contentType}:void 0),e!==`local`&&await r.o(i.path,t)}y(i.path),t.resolved.push({path:i.path,choice:e===`local`||e===`cloud`?e:`merged`})}catch(e){if(e?.code===`FKN_E2E_LOCKED`)throw e;t.failed.push({path:i.path,error:e instanceof Error?e.message:String(e)})}continue}try{let e=await r.i(i.path);await n.f(i.path,e,i.contentType?{contentType:i.contentType}:void 0),y(i.path),t.uploaded.push(i.path)}catch(e){if(v(i.path),e?.code===`FKN_E2E_LOCKED`)throw e;t.failed.push({path:i.path,error:e instanceof Error?e.message:String(e)})}}return t},F=async()=>{for(;T;)await T;let e=P(!0);T=e.then(()=>{},()=>{});try{return await e}finally{T=null}},I=async()=>{if(!await c()||!await o())return{paths:[],bytes:0};let[e,t]=await Promise.all([r.n(),n.o()]),i=new Set(t.map(e=>e.path)),a=e.filter(e=>!i.has(e.path));return{paths:a.map(e=>e.path),bytes:a.reduce((e,t)=>e+t.size,0)}},de=()=>new Set(Object.keys(h(f))),fe=e=>{let t=h(f);for(let n of e)t[n]=null;g(f,t)},L=null,R=e=>L||(L=(async()=>{if(!await c())return;let t=e??(await o()?{local:await r.n(),remote:await n.o()}:null);if(!t)return;let i=new Set(t.remote.map(e=>e.path)),a=de(),s=t.local.filter(e=>!i.has(e.path)&&!a.has(e.path));if(!s.length)return;let l=await M(),u=s.reduce((e,t)=>e+t.size,0);if(!await l.cloud.fs.promptAdopt({files:s.length,bytes:u}).catch(()=>!1)){fe(s.map(e=>e.path));return}await F()})().catch(()=>{}).finally(()=>{L=null}),L),pe=async(e,t)=>{let n=new Set(t.map(e=>e.path)),r=e.filter(e=>!n.has(e.path)),i=await M(),a=async()=>{await F().catch(()=>{});let e=await I().catch(()=>({paths:[],bytes:0}));await i.cloud.fs.setAdoptSource({files:e.paths.length,bytes:e.bytes},a).catch(()=>{})};await i.cloud.fs.setAdoptSource({files:r.length,bytes:r.reduce((e,t)=>e+t.size,0)},a)},z=!1,B=()=>{z||typeof window>`u`||(z=!0,window.addEventListener(`online`,()=>{j()}),Promise.resolve().then(()=>require("./account.cjs")).then(e=>e.onChange(()=>{R().catch(()=>{}),j()})).catch(()=>{}))},me=e.t({adopt:()=>J,adoptable:()=>Y,appendFile:()=>Ee,appendFileSync:()=>G,available:()=>H,default:()=>Le,exists:()=>Ne,existsSync:()=>he,flush:()=>Fe,lstatSync:()=>_e,mkdir:()=>ke,mkdirSync:()=>ye,mount:()=>K,onConflict:()=>$,pending:()=>X,pendingDeletes:()=>Z,promises:()=>Pe,pull:()=>q,readFile:()=>we,readFileSync:()=>U,readdir:()=>Oe,readdirSync:()=>ve,remount:()=>Ie,rename:()=>Me,renameSync:()=>Ce,replicating:()=>Q,rm:()=>Ae,rmSync:()=>be,rmdirSync:()=>xe,stat:()=>De,statSync:()=>ge,unlink:()=>je,unlinkSync:()=>Se,writeFile:()=>Te,writeFileSync:()=>W}),V=t.t(i,{memfs:!0}),{available:H,readFileSync:U,writeFileSync:W,appendFileSync:G,existsSync:he,statSync:ge,lstatSync:_e,readdirSync:ve,mkdirSync:ye,rmSync:be,rmdirSync:xe,unlinkSync:Se,renameSync:Ce,readFile:we,writeFile:Te,appendFile:Ee,stat:De,readdir:Oe,mkdir:ke,rm:Ae,unlink:je,rename:Me,exists:Ne,promises:Pe,mount:K,flush:Fe,remount:Ie}=V,q=se,J=F,Y=I,X=C,Z=w,Q=ee,$=ce,Le={...V,pull:q,adopt:J,adoptable:Y,pending:X,pendingDeletes:Z,replicating:Q,onConflict:$};Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return Te}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return we}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Ee}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return q}});
|
package/fs.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./fs-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./fs-DJm0bhjg.cjs");exports.adopt=e.t,exports.adoptable=e.n,exports.appendFile=e.r,exports.appendFileSync=e.i,exports.available=e.a,exports.default=e.l,exports.exists=e.o,exports.existsSync=e.s,exports.flush=e.c,exports.lstatSync=e.d,exports.mkdir=e.f,exports.mkdirSync=e.p,exports.mount=e.m,exports.onConflict=e.h,exports.pending=e.g,exports.pendingDeletes=e._,exports.promises=e.v,exports.pull=e.y,exports.readFile=e.b,exports.readFileSync=e.x,exports.readdir=e.S,exports.readdirSync=e.C,exports.remount=e.w,exports.rename=e.T,exports.renameSync=e.E,exports.replicating=e.D,exports.rm=e.O,exports.rmSync=e.k,exports.rmdirSync=e.A,exports.stat=e.j,exports.statSync=e.M,exports.unlink=e.N,exports.unlinkSync=e.P,exports.writeFile=e.F,exports.writeFileSync=e.I;
|
package/fs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, E as r, F as i, I as a, M as o, N as s, O as c, P as l, S as u, T as d, _ as f, a as p, b as m, c as h, d as g, f as _, g as v, h as y, i as b, j as x, k as S, l as C, m as w, n as T, o as E, p as D, r as O, s as k, t as A, v as j, w as M, x as N, y as P } from "./fs-
|
|
1
|
+
import { A as e, C as t, D as n, E as r, F as i, I as a, M as o, N as s, O as c, P as l, S as u, T as d, _ as f, a as p, b as m, c as h, d as g, f as _, g as v, h as y, i as b, j as x, k as S, l as C, m as w, n as T, o as E, p as D, r as O, s as k, t as A, v as j, w as M, x as N, y as P } from "./fs-BW5mVMmu.js";
|
|
2
2
|
export { A as adopt, T as adoptable, O as appendFile, b as appendFileSync, p as available, C as default, E as exists, k as existsSync, h as flush, g as lstatSync, _ as mkdir, D as mkdirSync, w as mount, y as onConflict, v as pending, f as pendingDeletes, j as promises, P as pull, m as readFile, N as readFileSync, u as readdir, t as readdirSync, M as remount, d as rename, r as renameSync, n as replicating, c as rm, S as rmSync, e as rmdirSync, x as stat, o as statSync, s as unlink, l as unlinkSync, i as writeFile, a as writeFileSync };
|
package/http.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./net-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./net-COzDDBnS.cjs");let n=require("buffer"),r=require("stream");var i=e.t({Agent:()=>T,ClientRequest:()=>S,HTTPParser:()=>g,IncomingMessage:()=>v,METHODS:()=>o,STATUS_CODES:()=>s,Server:()=>w,ServerResponse:()=>b,_default:()=>A,createServer:()=>k,default:()=>A,get:()=>O,globalAgent:()=>E,request:()=>D}),a=new TextDecoder(`latin1`),o=`ACL.BIND.CHECKOUT.CONNECT.COPY.DELETE.GET.HEAD.LINK.LOCK.M-SEARCH.MERGE.MKACTIVITY.MKCALENDAR.MKCOL.MOVE.NOTIFY.OPTIONS.PATCH.POST.PROPFIND.PROPPATCH.PURGE.PUT.REBIND.REPORT.SEARCH.SOURCE.SUBSCRIBE.TRACE.UNBIND.UNLINK.UNLOCK.UNSUBSCRIBE`.split(`.`),s={100:`Continue`,101:`Switching Protocols`,102:`Processing`,103:`Early Hints`,200:`OK`,201:`Created`,202:`Accepted`,203:`Non-Authoritative Information`,204:`No Content`,205:`Reset Content`,206:`Partial Content`,207:`Multi-Status`,208:`Already Reported`,226:`IM Used`,300:`Multiple Choices`,301:`Moved Permanently`,302:`Found`,303:`See Other`,304:`Not Modified`,305:`Use Proxy`,307:`Temporary Redirect`,308:`Permanent Redirect`,400:`Bad Request`,401:`Unauthorized`,402:`Payment Required`,403:`Forbidden`,404:`Not Found`,405:`Method Not Allowed`,406:`Not Acceptable`,407:`Proxy Authentication Required`,408:`Request Timeout`,409:`Conflict`,410:`Gone`,411:`Length Required`,412:`Precondition Failed`,413:`Payload Too Large`,414:`URI Too Long`,415:`Unsupported Media Type`,416:`Range Not Satisfiable`,417:`Expectation Failed`,418:`I'm a Teapot`,421:`Misdirected Request`,422:`Unprocessable Entity`,423:`Locked`,424:`Failed Dependency`,425:`Too Early`,426:`Upgrade Required`,428:`Precondition Required`,429:`Too Many Requests`,431:`Request Header Fields Too Large`,451:`Unavailable For Legal Reasons`,500:`Internal Server Error`,501:`Not Implemented`,502:`Bad Gateway`,503:`Service Unavailable`,504:`Gateway Timeout`,505:`HTTP Version Not Supported`,506:`Variant Also Negotiates`,507:`Insufficient Storage`,508:`Loop Detected`,509:`Bandwidth Limit Exceeded`,510:`Not Extended`,511:`Network Authentication Required`},c=new Set([`content-type`,`content-length`,`user-agent`,`referer`,`host`,`authorization`,`proxy-authorization`,`if-modified-since`,`if-unmodified-since`,`from`,`location`,`max-forwards`,`retry-after`,`etag`,`last-modified`,`server`,`age`,`expires`]),l=13,u=10,d=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/,f=(e,t)=>(e.code=t,e),p=(e,t)=>{if(e.length===0)return t;if(t.length===0)return e;let n=new Uint8Array(e.length+t.length);return n.set(e,0),n.set(t,e.length),n},m=(e,t)=>{for(let n=t;n+1<e.length;n++)if(e[n]===l&&e[n+1]===u)return n;return-1},h=e=>{for(let t=0;t+3<e.length;t++)if(e[t]===l&&e[t+1]===u&&e[t+2]===l&&e[t+3]===u)return t;return-1},g=class{mode;handlers;buf=new Uint8Array;state=`HEAD`;framing=`none`;bodyRemaining=0;chunkState=`size`;skipBody=!1;constructor(e,t){this.mode=e,this.handlers=t}execute(e){this.buf=p(this.buf,e);let t=!0;for(;t;)if(t=!1,this.state===`HEAD`){let e=h(this.buf);if(e===-1)return;let n=this.buf.subarray(0,e);this.buf=this.buf.subarray(e+4);let r=this.parseHead(n);this.handlers.onHeaders(r),this.setupBody(r),this.framing===`none`?(this.handlers.onComplete(),this.reset(),t=this.buf.length>0):(this.state=`BODY`,t=!0)}else this.consumeBody()&&(this.handlers.onComplete(),this.reset(),t=this.buf.length>0)}finish(){this.state===`BODY`&&this.framing===`eof`&&(this.handlers.onComplete(),this.reset())}reset(){this.state=`HEAD`,this.framing=`none`,this.bodyRemaining=0,this.chunkState=`size`,this.skipBody=!1}parseHead(e){let t=a.decode(e).split(`\r
|
|
2
2
|
`),n=t.shift()??``,r=[];for(let e of t)(e.startsWith(` `)||e.startsWith(` `))&&r.length>0?r[r.length-1]+=` `+e.trim():r.push(e);let i=[],o={};for(let e of r){if(!e)continue;let t=e.indexOf(`:`);if(t===-1)continue;let n=e.slice(0,t).trim(),r=e.slice(t+1).trim();i.push(n,r),this.addHeader(o,n,r)}let s={httpVersionMajor:1,httpVersionMinor:1,httpVersion:`1.1`,headers:o,rawHeaders:i};if(this.mode===`request`){let[e,t,r]=n.split(` `);s.method=(e??`GET`).toUpperCase(),s.url=t??`/`,this.applyVersion(s,r)}else{let e=n.indexOf(` `),t=n.slice(0,e),r=n.slice(e+1),i=r.indexOf(` `),a=i===-1?r:r.slice(0,i);s.statusCode=parseInt(a,10)||0,s.statusMessage=i===-1?``:r.slice(i+1),this.applyVersion(s,t)}return s}applyVersion(e,t){let n=/HTTP\/(\d)\.(\d)/i.exec(t??``);n&&(e.httpVersionMajor=parseInt(n[1],10),e.httpVersionMinor=parseInt(n[2],10),e.httpVersion=`${e.httpVersionMajor}.${e.httpVersionMinor}`)}addHeader(e,t,n){let r=t.toLowerCase();if(r===`set-cookie`){let t=e[`set-cookie`];Array.isArray(t)?t.push(n):e[`set-cookie`]=[n];return}let i=e[r];i===void 0?e[r]=n:c.has(r)||(e[r]=`${i}, ${n}`)}setupBody(e){if(this.skipBody){this.framing=`none`;return}let t=e.headers[`transfer-encoding`];if(typeof t==`string`&&t.toLowerCase().includes(`chunked`)){this.framing=`chunked`,this.chunkState=`size`;return}let n=e.headers[`content-length`];if(typeof n==`string`&&n!==``){let e=parseInt(n,10);e>0?(this.framing=`length`,this.bodyRemaining=e):this.framing=`none`;return}if(this.mode===`response`){let t=e.statusCode??0;t>=100&&t<200||t===204||t===304?this.framing=`none`:this.framing=`eof`}else this.framing=`none`}consumeBody(){if(this.framing===`length`){if(this.buf.length===0)return!1;let e=Math.min(this.bodyRemaining,this.buf.length);return this.handlers.onBody(this.buf.subarray(0,e)),this.buf=this.buf.subarray(e),this.bodyRemaining-=e,this.bodyRemaining===0}return this.framing===`eof`?(this.buf.length>0&&(this.handlers.onBody(this.buf),this.buf=new Uint8Array),!1):this.framing===`chunked`?this.consumeChunked():!0}consumeChunked(){for(;;)if(this.chunkState===`size`){let e=m(this.buf,0);if(e===-1)return!1;let t=a.decode(this.buf.subarray(0,e)),n=parseInt(t.split(`;`)[0].trim(),16);if(this.buf=this.buf.subarray(e+2),Number.isNaN(n))return!0;n===0?this.chunkState=`trailer`:(this.bodyRemaining=n,this.chunkState=`data`)}else if(this.chunkState===`data`){if(this.buf.length===0)return!1;let e=Math.min(this.bodyRemaining,this.buf.length);this.handlers.onBody(this.buf.subarray(0,e)),this.buf=this.buf.subarray(e),this.bodyRemaining-=e,this.bodyRemaining===0&&(this.chunkState=`dataCRLF`)}else if(this.chunkState===`dataCRLF`){if(this.buf.length<2)return!1;this.buf=this.buf.subarray(2),this.chunkState=`size`}else{let e=m(this.buf,0);if(e===-1)return!1;let t=e===0;if(this.buf=this.buf.subarray(e+2),t)return!0}}},_=(e,t)=>n.Buffer.isBuffer(e)?e:typeof e==`string`?n.Buffer.from(e,t??`utf8`):e instanceof Uint8Array?n.Buffer.from(e):e instanceof ArrayBuffer?n.Buffer.from(new Uint8Array(e)):n.Buffer.from(String(e)),v=class extends r.Stream.Readable{httpVersion=`1.1`;httpVersionMajor=1;httpVersionMinor=1;headers={};rawHeaders=[];trailers={};rawTrailers=[];method;url;statusCode;statusMessage;complete=!1;socket;constructor(e){super(),this.socket=e}get connection(){return this.socket}_applyHead(e){this.httpVersion=e.httpVersion,this.httpVersionMajor=e.httpVersionMajor,this.httpVersionMinor=e.httpVersionMinor,this.headers=e.headers,this.rawHeaders=e.rawHeaders,this.method=e.method,this.url=e.url,this.statusCode=e.statusCode,this.statusMessage=e.statusMessage}_read(){}setTimeout(e,t){return this.socket.setTimeout(e,t),this}},y=class extends r.Stream.Writable{_headerStore=new Map;headersSent=!1;chunkedEncoding=!1;finished=!1;_bodyWritten=!1;setHeader(e,t){if(this.headersSent)throw f(Error(`Cannot set headers after they are sent to the client`),`ERR_HTTP_HEADERS_SENT`);if(typeof e!=`string`||!d.test(e))throw f(TypeError(`Header name must be a valid HTTP token [${JSON.stringify(String(e))}]`),`ERR_INVALID_HTTP_TOKEN`);if(t===void 0)throw f(TypeError(`Invalid value "undefined" for header "${e}"`),`ERR_HTTP_INVALID_HEADER_VALUE`);return this._headerStore.set(e.toLowerCase(),[e,Array.isArray(t)?[...t]:t]),this}getHeader(e){return this._headerStore.get(e.toLowerCase())?.[1]}getHeaderNames(){return[...this._headerStore.values()].map(([e])=>e)}getHeaders(){let e={};for(let[t,n]of this._headerStore.values())e[t]=n;return e}hasHeader(e){return this._headerStore.has(e.toLowerCase())}removeHeader(e){if(this.headersSent)throw Error(`Cannot remove headers after they are sent to the client`);this._headerStore.delete(e.toLowerCase())}_storeHeader(e){let t=this.hasHeader(`content-length`),n=this.getHeader(`transfer-encoding`);typeof n==`string`&&n.toLowerCase().includes(`chunked`)?this.chunkedEncoding=!0:!t&&this._shouldSendBody()&&(this.chunkedEncoding=!0,this.setHeader(`Transfer-Encoding`,`chunked`));let r=e+`\r
|
|
3
3
|
`;for(let[e,t]of this._headerStore.values())if(Array.isArray(t))for(let n of t)r+=`${e}: ${n}\r\n`;else r+=`${e}: ${t}\r\n`;return r+=`\r
|
|
4
4
|
`,r}_writeToSocket(e,t){if(!this.socket){t(Error(`Socket is not available`));return}this.socket.write(e,t)}write(e,t,n){return this._bodyWritten=!0,super.write(e,t,n)}_write(e,t,r){let i=_(e),a=[];if(this.headersSent||=(this._implicitHeader(),a.push(n.Buffer.from(this._headBlock,`latin1`)),!0),this.chunkedEncoding?i.length>0&&(a.push(n.Buffer.from(`${i.length.toString(16)}\r\n`,`latin1`)),a.push(i),a.push(n.Buffer.from(`\r
|
package/http.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as Socket, t as Server$1 } from "./net-
|
|
1
|
+
import { n as Socket, t as Server$1 } from "./net-l7JVHsIR.js";
|
|
2
2
|
import { Buffer } from "buffer";
|
|
3
3
|
import { Stream } from "stream";
|
|
4
4
|
import { IncomingHttpHeaders, OutgoingHttpHeaders, RequestOptions } from "http";
|
package/http.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { n as t, t as n } from "./net-
|
|
2
|
+
import { n as t, t as n } from "./net-BbmQeMpt.js";
|
|
3
3
|
import { Buffer as r } from "buffer";
|
|
4
4
|
import { Stream as i } from "stream";
|
|
5
5
|
//#region src/lib/webvpn/http.ts
|
package/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./lib-ulyxIbTr.cjs"),
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./lib-ulyxIbTr.cjs"),n=require("./api-kHMHDGar.cjs"),r=require("./cloud-BQoppUw4.cjs"),i=require("./dns.cjs"),a=require("./net-COzDDBnS.cjs"),o=require("./dgram-D2Or5f2e.cjs"),s=require("./http.cjs"),c=require("./extension-4BM5hKrn.cjs"),l=require("./desktop.cjs"),u=require("./fs-DJm0bhjg.cjs"),d=require("./opfs.cjs"),f=require("./packages.cjs"),p=require("./account.cjs"),m=require("./connect-button-BBEjXzB3.cjs");let h=require("osra");var g=1e4,_=150,v=()=>new Promise(e=>{if(t.P())return e(!0);let n,r=setTimeout(()=>i(t.P()),g),i=t=>{clearTimeout(n),clearTimeout(r),o.disconnect(),document.removeEventListener(`readystatechange`,s),e(t)},a=()=>{clearTimeout(n),n=setTimeout(()=>i(t.P()),_)},o=new MutationObserver(()=>{t.P()&&i(!0)}),s=()=>{document.readyState===`complete`&&!t.P()&&a()};o.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-fkn-extension`]}),document.addEventListener(`readystatechange`,s),document.readyState===`complete`&&a()}),y=async e=>c.r()||e.lockdown||!r.a()||await v()?t.r(e):r.i(e),b=`https://fkn.app`,x=async(e,t)=>{if(typeof window>`u`)throw Error(`FKN @fkn/lib: relayWorker must be called from the main thread`);let r=await n.i;if(!r)throw Error(`FKN @fkn/lib: relayWorker found no FKN transport in this realm`);(0,h.relay)(r,e,{key:`fkn-api`,...r.emit instanceof MessagePort?{}:{originA:t?.originA??b,originB:t?.originB??`*`},unregisterSignal:t?.unregisterSignal})},S=async()=>typeof window>`u`?!1:(await n.t).connect.prompt(location.origin).catch(()=>!1),C=async()=>typeof window>`u`?null:(await n.t).relay.prompt().catch(()=>null),w=e.t({applyUpdate:()=>D,onUpdate:()=>E,updateReady:()=>T}),T=async()=>typeof window>`u`?!1:n.t.then(e=>e.shell?.updateReady()).then(e=>e===!0).catch(()=>!1),E=async e=>{if(typeof window>`u`)return()=>{};let t=await n.t.catch(()=>null);if(!t||typeof t.shell?.onUpdate!=`function`)return()=>{};let r=await t.shell.onUpdate(e).catch(()=>null);return typeof r==`function`?r:()=>{}},D=async()=>typeof window>`u`?!1:n.t.then(e=>e.shell?.applyUpdate()).then(e=>e===!0).catch(()=>!1);exports.ATTACH_FRAME_EVENT_KEY=t.n,exports.FORGEABLE_HEADERS=t.k,exports.LOCATOR_DENIED=t.g,exports.LOCATOR_ERROR=t.u,exports.LOCATOR_UNSUPPORTED=t.h,Object.defineProperty(exports,"account",{enumerable:!0,get:function(){return p.t}}),exports.assertAttachableFrameUrl=t.s,exports.assertFetchableUrl=t.S,exports.assertForgeableHeaders=t.A,exports.assertLockdownApplicable=t.c,exports.assertOneCookieIdentity=t.j,exports.attachFrame=y,exports.attachFramePermission=t.i,exports.box=t.R,Object.defineProperty(exports,"cloud",{enumerable:!0,get:function(){return r.n}}),exports.connect=S,exports.connectButtonUrl=m.t,exports.cookies=t.b,exports.createFrame=t.a,exports.createVideoElementHandle=t.z,Object.defineProperty(exports,"desktop",{enumerable:!0,get:function(){return l.t}}),Object.defineProperty(exports,"dgram",{enumerable:!0,get:function(){return o.i}}),Object.defineProperty(exports,"dns",{enumerable:!0,get:function(){return i.t}}),Object.defineProperty(exports,"extension",{enumerable:!0,get:function(){return c.t}}),exports.fetch=c.n,exports.fetchCredentialedPermission=t.w,exports.fetchLocalPermission=t.T,exports.fetchPermission=t.E,Object.defineProperty(exports,"fs",{enumerable:!0,get:function(){return u.u}}),exports.gotoPermission=t.o,exports.handleRevivableModules=t.L,exports.hasForgedCookie=t.M,Object.defineProperty(exports,"http",{enumerable:!0,get:function(){return s.t}}),exports.isBlockedFetchUrl=t.D,exports.isBlockedFrameUrl=t.l,exports.isExtensionExposed=t.P,exports.isLocalNetworkUrl=t.O,exports.isLocatorDenied=t.d,exports.isLocatorUnsupported=t.m,exports.isTerminalError=t.p,exports.isType=t.B,exports.modifyRequestHeadersPermission=t._,Object.defineProperty(exports,"net",{enumerable:!0,get:function(){return a.s}}),Object.defineProperty(exports,"opfs",{enumerable:!0,get:function(){return d.t}}),Object.defineProperty(exports,"packages",{enumerable:!0,get:function(){return f.t}}),exports.permissions=t.t,exports.promptInstall=c.i,exports.promptRelay=C,exports.readCookiePermission=t.x,exports.relayWorker=x,exports.removeRequestHeaderRule=t.v,exports.revive=t.V,exports.setMissingExtensionHandler=t.F,exports.setRequestHeaderRule=t.y,Object.defineProperty(exports,"shell",{enumerable:!0,get:function(){return w}}),exports.type=t.H,exports.waitForExtensionExposure=t.I;
|
package/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as account_d_exports } from "./account.js";
|
|
2
2
|
import { S as packages_d_exports } from "./packages-vX-1yfRK.js";
|
|
3
3
|
import { A as LOCATOR_DENIED, B as SelectorPart, C as RemoteVideoElement, D as isType, E as createVideoElementHandle, F as isTerminalError, G as setRequestHeaderRule, H as RequestHeaderRule, I as Executor, J as cookies, K as CookieDetails, L as Gate, M as LOCATOR_UNSUPPORTED, N as isLocatorDenied, O as revive, P as isLocatorUnsupported, Q as assertFetchableUrl, R as GateTools, S as BoxedVideoElement, T as box, U as modifyRequestHeadersPermission, V as HeaderOperation, W as removeRequestHeaderRule, X as FetchInit, Y as readCookiePermission, Z as ProxyFetchRequest, _ as gotoPermission, a as PermissionGrant, at as FORGEABLE_HEADERS, b as isBlockedFrameUrl, c as ATTACH_FRAME_EVENT_KEY, ct as hasForgedCookie, d as Frame, et as fetchCredentialedPermission, f as FrameBackend, g as createFrame, h as attachFramePermission, i as waitForExtensionExposure, it as isLocalNetworkUrl, j as LOCATOR_ERROR, k as type, m as Locator, n as isExtensionExposed, nt as fetchPermission, o as PermissionRequest, ot as assertForgeableHeaders, p as GotoOptions, q as SiteCookie, r as setMissingExtensionHandler, rt as isBlockedFetchUrl, s as permissions, st as assertOneCookieIdentity, tt as fetchLocalPermission, u as AttachFrameOptions, v as assertAttachableFrameUrl, w as VideoElementState, x as handleRevivableModules, y as assertLockdownApplicable, z as OperationRequest } from "./index-DLaonjpx.js";
|
|
4
|
-
import { n as cloud_d_exports } from "./cloud-
|
|
4
|
+
import { n as cloud_d_exports } from "./cloud-uE4g-WqI.js";
|
|
5
5
|
import { t as dns_d_exports } from "./dns.js";
|
|
6
|
-
import { s as net_d_exports } from "./net-
|
|
6
|
+
import { s as net_d_exports } from "./net-l7JVHsIR.js";
|
|
7
7
|
import { t as dgram_d_exports } from "./dgram.js";
|
|
8
8
|
import { t as http_d_exports } from "./http.js";
|
|
9
9
|
import { t as desktop_d_exports } from "./desktop.js";
|
|
@@ -27,5 +27,36 @@ declare const connect: () => Promise<boolean>;
|
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region src/lib/relay-prompt.d.ts
|
|
29
29
|
declare const promptRelay: () => Promise<string | null>;
|
|
30
|
+
declare namespace shell_d_exports {
|
|
31
|
+
export { applyUpdate, onUpdate, updateReady };
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The FKN shell's update surface, for apps that want a say in when the platform frame reloads.
|
|
35
|
+
*
|
|
36
|
+
* The broker downloads updates behind the page and never applies one on its own authority,
|
|
37
|
+
* because only the app knows what a reload costs right now (a torrent mid-download is the case
|
|
38
|
+
* that matters). An app that subscribes here learns when a newer shell is ready and calls
|
|
39
|
+
* applyUpdate() at a moment of its choosing; the reload covers ONLY the FKN frame, and whether
|
|
40
|
+
* the app then reloads its own page is its own decision. Apps that ignore this module entirely
|
|
41
|
+
* keep today's behavior: the shell offers the update in its own header instead.
|
|
42
|
+
*/
|
|
43
|
+
/** Whether a newer FKN shell is downloaded and ready to apply. */
|
|
44
|
+
declare const updateReady: () => Promise<boolean>;
|
|
45
|
+
/**
|
|
46
|
+
* Subscribe to "a newer FKN shell is ready". Fires immediately when an update is already
|
|
47
|
+
* waiting at subscribe time, so a late subscriber misses nothing. Returns an unsubscribe;
|
|
48
|
+
* a shell without this surface yields a noop unsubscribe rather than an error.
|
|
49
|
+
*/
|
|
50
|
+
declare const onUpdate: (callback: () => void) => Promise<() => void>;
|
|
51
|
+
/**
|
|
52
|
+
* Apply a ready update by reloading the FKN frame this page mounted. Resolves true when the
|
|
53
|
+
* reload was taken, false when there is nothing to apply or this caller does not own the frame.
|
|
54
|
+
*
|
|
55
|
+
* The page's FKN connection does NOT survive the frame reload: calling this means "now is a
|
|
56
|
+
* safe moment", and reloading your own page right after (which remounts the frame fresh) is the
|
|
57
|
+
* expected next step. An app that never calls this keeps today's behavior, where the shell
|
|
58
|
+
* offers the update in its own header instead.
|
|
59
|
+
*/
|
|
60
|
+
declare const applyUpdate: () => Promise<boolean>;
|
|
30
61
|
//#endregion
|
|
31
|
-
export { ATTACH_FRAME_EVENT_KEY, AttachFrameOptions, BoxedVideoElement, CookieDetails, type Executor, FORGEABLE_HEADERS, FetchInit, Frame, FrameBackend, type Gate, type GateTools, GotoOptions, HeaderOperation, LOCATOR_DENIED, LOCATOR_ERROR, LOCATOR_UNSUPPORTED, Locator, type OperationRequest, PermissionGrant, PermissionRequest, ProxyFetchRequest, RemoteVideoElement, RequestHeaderRule, type SelectorPart, SiteCookie, VideoElementState, account_d_exports as account, assertAttachableFrameUrl, assertFetchableUrl, assertForgeableHeaders, assertLockdownApplicable, assertOneCookieIdentity, attachFrame, attachFramePermission, box, cloud_d_exports as cloud, connect, connectButtonUrl, cookies, createFrame, createVideoElementHandle, desktop_d_exports as desktop, dgram_d_exports as dgram, dns_d_exports as dns, extension_d_exports as extension, fetch, fetchCredentialedPermission, fetchLocalPermission, fetchPermission, index_d_exports as fs, gotoPermission, handleRevivableModules, hasForgedCookie, http_d_exports as http, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isLocatorDenied, isLocatorUnsupported, isTerminalError, isType, modifyRequestHeadersPermission, net_d_exports as net, index_d_exports$1 as opfs, packages_d_exports as packages, permissions, promptInstall, promptRelay, readCookiePermission, relayWorker, removeRequestHeaderRule, revive, setMissingExtensionHandler, setRequestHeaderRule, type, waitForExtensionExposure };
|
|
62
|
+
export { ATTACH_FRAME_EVENT_KEY, AttachFrameOptions, BoxedVideoElement, CookieDetails, type Executor, FORGEABLE_HEADERS, FetchInit, Frame, FrameBackend, type Gate, type GateTools, GotoOptions, HeaderOperation, LOCATOR_DENIED, LOCATOR_ERROR, LOCATOR_UNSUPPORTED, Locator, type OperationRequest, PermissionGrant, PermissionRequest, ProxyFetchRequest, RemoteVideoElement, RequestHeaderRule, type SelectorPart, SiteCookie, VideoElementState, account_d_exports as account, assertAttachableFrameUrl, assertFetchableUrl, assertForgeableHeaders, assertLockdownApplicable, assertOneCookieIdentity, attachFrame, attachFramePermission, box, cloud_d_exports as cloud, connect, connectButtonUrl, cookies, createFrame, createVideoElementHandle, desktop_d_exports as desktop, dgram_d_exports as dgram, dns_d_exports as dns, extension_d_exports as extension, fetch, fetchCredentialedPermission, fetchLocalPermission, fetchPermission, index_d_exports as fs, gotoPermission, handleRevivableModules, hasForgedCookie, http_d_exports as http, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isLocatorDenied, isLocatorUnsupported, isTerminalError, isType, modifyRequestHeadersPermission, net_d_exports as net, index_d_exports$1 as opfs, packages_d_exports as packages, permissions, promptInstall, promptRelay, readCookiePermission, relayWorker, removeRequestHeaderRule, revive, setMissingExtensionHandler, setRequestHeaderRule, shell_d_exports as shell, type, waitForExtensionExposure };
|