@fkn/lib 0.9.56 → 0.9.58
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-generation-D3jlXBbM.js → account-generation-2ZvMy2tZ.js} +1 -1
- package/{account-generation-DkrSMafa.cjs → account-generation-DIsOqkSQ.cjs} +1 -1
- package/{account-storage-C1VL6fpb.cjs → account-storage-CPTct4Vz.cjs} +1 -1
- package/{account-storage-BBL440_m.js → account-storage-Cmzz-67T.js} +2 -2
- package/account.cjs +1 -1
- package/account.d.ts +1 -1
- package/account.js +2 -2
- package/{api-BSpQkgnM.d.ts → api-BD_XUANc.d.ts} +28 -1
- package/{api-DEfkbHGB.js → api-C-N5AVos.js} +77 -74
- package/api-ibGqkmtA.cjs +3 -0
- package/api.cjs +1 -1
- package/api.d.ts +2 -2
- package/api.js +1 -1
- package/cloud/dns.d.ts +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.js +1 -1
- package/cloud/net.d.ts +1 -1
- package/{cloud-DTpFBbBH.js → cloud-B6B2XcRU.js} +205 -184
- package/{cloud-BslRIoKs.d.ts → cloud-BEoUa04G.d.ts} +3 -3
- package/cloud-C0hcBrFd.cjs +1 -0
- package/cloud.cjs +1 -1
- package/cloud.d.ts +3 -3
- package/cloud.js +2 -2
- package/{contract-DFycgFJK.d.ts → contract-B8Rqx5BD.d.ts} +47 -4
- package/contract.cjs +1 -1
- package/contract.d.ts +3 -3
- package/contract.js +2 -2
- package/dgram.cjs +1 -1
- package/dgram.d.ts +10 -5
- package/dgram.js +64 -60
- package/dns.cjs +1 -1
- package/dns.d.ts +1 -1
- package/dns.js +1 -1
- package/extension-AidgSVhb.js +101 -0
- package/{extension-kE9yzbkW.d.ts → extension-C_eOfEjv.d.ts} +3 -2
- package/extension-M8bUhlML.cjs +1 -0
- package/extension.cjs +1 -1
- package/extension.d.ts +3 -3
- package/extension.js +1 -1
- package/fs/promises.cjs +1 -1
- package/fs/promises.js +1 -1
- package/{fs-C7ByWYF9.cjs → fs-BlRxCJQW.cjs} +1 -1
- package/{fs-gryDP9qw.js → fs-C_RmxWk9.js} +2 -2
- package/fs.cjs +1 -1
- package/fs.js +2 -2
- package/http.cjs +1 -1
- package/http.d.ts +4 -1
- package/http.js +2 -1
- package/{index-BQ5OZQhf.d.ts → index-C5DdoMGo.d.ts} +38 -1
- package/index.cjs +1 -1
- package/index.d.ts +7 -5
- package/index.js +53 -51
- package/{net-eEjhJ0AE.d.ts → net-CvJwokcz.d.ts} +14 -7
- package/net.cjs +1 -1
- package/net.d.ts +1 -1
- package/net.js +52 -46
- package/package.json +1 -1
- package/packages.cjs +1 -1
- package/packages.d.ts +1 -1
- package/packages.js +1 -1
- package/proxy-C1RlnrDC.js +61 -0
- package/proxy-CII2NFYV.cjs +1 -0
- package/{proxy-8hIHeEHD.d.ts → proxy-z0Y8IgW7.d.ts} +2 -2
- package/relay-choice-BGwXRC5d.js +14 -0
- package/relay-choice-BmXlqfD2.d.ts +28 -0
- package/relay-choice-JC_JJY_M.cjs +1 -0
- package/rooms.cjs +1 -1
- package/rooms.d.ts +1 -1
- package/rooms.js +1 -1
- package/storage.cjs +1 -1
- package/storage.d.ts +1 -1
- package/storage.js +3 -3
- package/api-BmaUJUUp.cjs +0 -3
- package/cloud-C_EPPfe_.cjs +0 -1
- package/extension-C13d41tq.js +0 -95
- package/extension-DA_Fx3Lx.cjs +0 -1
- package/proxy-Blzm-Dc1.cjs +0 -1
- package/proxy-C2HY5Ybc.js +0 -60
package/dgram.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { s as t } from "./api-
|
|
2
|
+
import { s as t } from "./api-C-N5AVos.js";
|
|
3
3
|
import { t as n } from "./busy-DsMWrSzc.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { t as r } from "./relay-choice-BGwXRC5d.js";
|
|
5
|
+
import { a as i, i as a, s as o } from "./utils-Cyq8uJiy.js";
|
|
6
|
+
import { UDP_PORT_ACK_TYPE as s } from "./wire.js";
|
|
7
|
+
import { Buffer as c } from "buffer";
|
|
8
|
+
import { EventEmitter as l } from "events";
|
|
9
|
+
import { Address4 as u, Address6 as d } from "ip-address";
|
|
9
10
|
//#region src/webvpn/dgram.ts
|
|
10
|
-
var
|
|
11
|
-
Socket: () =>
|
|
12
|
-
createSocket: () =>
|
|
13
|
-
default: () =>
|
|
14
|
-
}),
|
|
11
|
+
var f = /* @__PURE__ */ e({
|
|
12
|
+
Socket: () => p,
|
|
13
|
+
createSocket: () => y,
|
|
14
|
+
default: () => b
|
|
15
|
+
}), p = class extends l {
|
|
15
16
|
_type;
|
|
16
17
|
_localAddress;
|
|
17
18
|
_remoteAddress;
|
|
@@ -26,9 +27,11 @@ var d = /* @__PURE__ */ e({
|
|
|
26
27
|
_sendQueueBytes = 0;
|
|
27
28
|
_sendFlushScheduled = !1;
|
|
28
29
|
_peerTailCache = /* @__PURE__ */ new Map();
|
|
30
|
+
_relayChoice;
|
|
31
|
+
_relay;
|
|
29
32
|
constructor(e) {
|
|
30
33
|
if (super(e), !e) throw Error("Missing options");
|
|
31
|
-
this._type = e.type, e.connection && this.__webvpn_udp_socket_init__(e.connection);
|
|
34
|
+
this._type = e.type, this._relayChoice = e.relay, e.connection && this.__webvpn_udp_socket_init__(e.connection);
|
|
32
35
|
}
|
|
33
36
|
_lastRecvBufferSize = 0;
|
|
34
37
|
_lastSendBufferSize = 0;
|
|
@@ -55,7 +58,7 @@ var d = /* @__PURE__ */ e({
|
|
|
55
58
|
if (!this._dataPortAcks || !this._dataPort || (this._dataPortConsumedBytes += e, this._dataPortAckedBytes !== 0 && this._dataPortConsumedBytes - this._dataPortAckedBytes < 524288)) return;
|
|
56
59
|
this._dataPortAckedBytes = this._dataPortConsumedBytes;
|
|
57
60
|
let t = {
|
|
58
|
-
type:
|
|
61
|
+
type: s,
|
|
59
62
|
consumedBytes: this._dataPortConsumedBytes
|
|
60
63
|
};
|
|
61
64
|
this._dataPort.postMessage(t);
|
|
@@ -70,8 +73,8 @@ var d = /* @__PURE__ */ e({
|
|
|
70
73
|
i += 4;
|
|
71
74
|
let o = i + a;
|
|
72
75
|
if (o > e.byteLength) break;
|
|
73
|
-
let
|
|
74
|
-
|
|
76
|
+
let s = i + 4, l = t.getUint8(s);
|
|
77
|
+
s += 1;
|
|
75
78
|
let u, d, f;
|
|
76
79
|
if (l === 2) {
|
|
77
80
|
if (!this._remoteAddress) {
|
|
@@ -80,13 +83,13 @@ var d = /* @__PURE__ */ e({
|
|
|
80
83
|
}
|
|
81
84
|
u = this._remoteAddress.address, d = this._remoteAddress.family, f = this._remoteAddress.port;
|
|
82
85
|
} else {
|
|
83
|
-
let n = new Uint8Array(e,
|
|
84
|
-
l === 0 ? (d = "IPv4", u = `${n[0]}.${n[1]}.${n[2]}.${n[3]}`) : (d = "IPv6", u =
|
|
86
|
+
let n = new Uint8Array(e, s, l === 0 ? 4 : 16);
|
|
87
|
+
l === 0 ? (d = "IPv4", u = `${n[0]}.${n[1]}.${n[2]}.${n[3]}`) : (d = "IPv6", u = _(n)), s += n.byteLength, f = t.getUint16(s), s += 2;
|
|
85
88
|
}
|
|
86
|
-
let p = t.getUint32(
|
|
87
|
-
|
|
89
|
+
let p = t.getUint32(s);
|
|
90
|
+
s += 4;
|
|
88
91
|
try {
|
|
89
|
-
this.emit("message",
|
|
92
|
+
this.emit("message", c.from(e.slice(s, s + p)), {
|
|
90
93
|
address: u,
|
|
91
94
|
family: d,
|
|
92
95
|
port: f,
|
|
@@ -100,10 +103,10 @@ var d = /* @__PURE__ */ e({
|
|
|
100
103
|
if (n) throw r;
|
|
101
104
|
}
|
|
102
105
|
_peerTail(e, t) {
|
|
103
|
-
if (e === void 0 || t === void 0) return
|
|
106
|
+
if (e === void 0 || t === void 0) return m;
|
|
104
107
|
let n = `${e}|${t}`, r = this._peerTailCache.get(n);
|
|
105
108
|
if (r) return r;
|
|
106
|
-
let i =
|
|
109
|
+
let i = u.isValid(e) ? g(e) : v(e), a = new Uint8Array(1 + i.byteLength + 2);
|
|
107
110
|
return a[0] = i.byteLength === 4 ? 0 : 1, a.set(i, 1), new DataView(a.buffer).setUint16(1 + i.byteLength, t), this._peerTailCache.size >= 4096 && this._peerTailCache.clear(), this._peerTailCache.set(n, a), a;
|
|
108
111
|
}
|
|
109
112
|
_portSend(e, t, n) {
|
|
@@ -118,8 +121,8 @@ var d = /* @__PURE__ */ e({
|
|
|
118
121
|
}));
|
|
119
122
|
}
|
|
120
123
|
addMembership(e, t) {
|
|
121
|
-
if (
|
|
122
|
-
let n =
|
|
124
|
+
if (u.isValid(e)) {
|
|
125
|
+
let n = g(e), r = t && u.isValid(t) ? g(t) : new Uint8Array([
|
|
123
126
|
0,
|
|
124
127
|
0,
|
|
125
128
|
0,
|
|
@@ -130,8 +133,8 @@ var d = /* @__PURE__ */ e({
|
|
|
130
133
|
group: n,
|
|
131
134
|
interface: r
|
|
132
135
|
});
|
|
133
|
-
} else if (
|
|
134
|
-
let t =
|
|
136
|
+
} else if (d.isValid(e)) {
|
|
137
|
+
let t = v(e);
|
|
135
138
|
this._setUdpOption({
|
|
136
139
|
type: 7,
|
|
137
140
|
group: t,
|
|
@@ -144,13 +147,14 @@ var d = /* @__PURE__ */ e({
|
|
|
144
147
|
return this._localAddress;
|
|
145
148
|
}
|
|
146
149
|
bind(...e) {
|
|
147
|
-
let n =
|
|
150
|
+
let n = a(...e), i = this._type === "udp6" ? "::" : "0.0.0.0", o = this._relayChoice, s = this.__webvpn_udp_socket_init__(t("a udp socket").then((e) => (o !== void 0 && r(e, "dgram.createSocket"), e.cloud.webvpn.udpSocket({
|
|
148
151
|
type: this._type,
|
|
149
|
-
address: n.address ??
|
|
152
|
+
address: n.address ?? i,
|
|
150
153
|
port: n.port,
|
|
151
|
-
dataPort: !0
|
|
152
|
-
|
|
153
|
-
|
|
154
|
+
dataPort: !0,
|
|
155
|
+
relay: o
|
|
156
|
+
}))));
|
|
157
|
+
return n.callback && s.then((e) => {
|
|
154
158
|
e && n.callback.call(this);
|
|
155
159
|
}), this;
|
|
156
160
|
}
|
|
@@ -173,7 +177,7 @@ var d = /* @__PURE__ */ e({
|
|
|
173
177
|
for (;;) {
|
|
174
178
|
let { value: e, done: n } = await t.read();
|
|
175
179
|
if (n) return;
|
|
176
|
-
this.emit("message",
|
|
180
|
+
this.emit("message", c.from(e.data), {
|
|
177
181
|
address: e.address,
|
|
178
182
|
family: e.family,
|
|
179
183
|
port: e.port,
|
|
@@ -182,7 +186,7 @@ var d = /* @__PURE__ */ e({
|
|
|
182
186
|
}
|
|
183
187
|
})().catch((e) => this._onTransportClosed(e instanceof Error ? e.message : void 0));
|
|
184
188
|
}
|
|
185
|
-
return e.closed?.then((e) => this._onTransportClosed(e?.reason)).catch(() => {}), this._localAddress = {
|
|
189
|
+
return e.closed?.then((e) => this._onTransportClosed(e?.reason)).catch(() => {}), this._relay = e.relay, this._localAddress = {
|
|
186
190
|
address: e.localAddress,
|
|
187
191
|
family: e.localFamily,
|
|
188
192
|
port: e.localPort
|
|
@@ -244,8 +248,8 @@ var d = /* @__PURE__ */ e({
|
|
|
244
248
|
});
|
|
245
249
|
}
|
|
246
250
|
dropMembership(e, t) {
|
|
247
|
-
if (
|
|
248
|
-
let n =
|
|
251
|
+
if (u.isValid(e)) {
|
|
252
|
+
let n = g(e), r = t && u.isValid(t) ? g(t) : new Uint8Array([
|
|
249
253
|
0,
|
|
250
254
|
0,
|
|
251
255
|
0,
|
|
@@ -256,8 +260,8 @@ var d = /* @__PURE__ */ e({
|
|
|
256
260
|
group: n,
|
|
257
261
|
interface: r
|
|
258
262
|
});
|
|
259
|
-
} else if (
|
|
260
|
-
let t =
|
|
263
|
+
} else if (d.isValid(e)) {
|
|
264
|
+
let t = v(e);
|
|
261
265
|
this._setUdpOption({
|
|
262
266
|
type: 8,
|
|
263
267
|
group: t,
|
|
@@ -290,27 +294,27 @@ var d = /* @__PURE__ */ e({
|
|
|
290
294
|
}
|
|
291
295
|
send(...e) {
|
|
292
296
|
this._webVPNUdpSocketPromise || this.bind();
|
|
293
|
-
let t =
|
|
297
|
+
let t = i(...e), n = h(t.message), r = n;
|
|
294
298
|
if (t.hasRange) {
|
|
295
|
-
let { offset: e, length:
|
|
299
|
+
let { offset: e, length: i } = t;
|
|
296
300
|
if (!Number.isInteger(e) || e < 0 || e > n.byteLength) throw Object.assign(/* @__PURE__ */ RangeError("\"offset\" is outside of buffer bounds"), { code: "ERR_BUFFER_OUT_OF_BOUNDS" });
|
|
297
|
-
if (!Number.isInteger(
|
|
298
|
-
|
|
301
|
+
if (!Number.isInteger(i) || i < 0 || i > n.byteLength - e) throw Object.assign(/* @__PURE__ */ RangeError("\"length\" is outside of buffer bounds"), { code: "ERR_BUFFER_OUT_OF_BOUNDS" });
|
|
302
|
+
r = n.subarray(e, e + i);
|
|
299
303
|
}
|
|
300
304
|
let a = this._type === "udp6" ? "::1" : "127.0.0.1";
|
|
301
305
|
if (!this._webVPNUdpSocketPromise) throw Error("Socket not bound");
|
|
302
306
|
this._webVPNUdpSocketPromise.then((e) => {
|
|
303
307
|
if (!e) throw Error("Socket not bound");
|
|
304
|
-
let n = t.callback,
|
|
305
|
-
if (this._dataPort && (o ||
|
|
306
|
-
this._portSend(
|
|
308
|
+
let n = t.callback, i = t.address ?? a, o = this._remoteAddress !== void 0 && t.address === void 0;
|
|
309
|
+
if (this._dataPort && (o || u.isValid(i) || d.isValid(i))) {
|
|
310
|
+
this._portSend(r, o ? void 0 : i, o ? void 0 : t.port), n?.call(this, null, r.byteLength);
|
|
307
311
|
return;
|
|
308
312
|
}
|
|
309
313
|
e.send({
|
|
310
314
|
port: t.port,
|
|
311
|
-
address:
|
|
312
|
-
message:
|
|
313
|
-
}).then(() => n?.call(this, null,
|
|
315
|
+
address: i,
|
|
316
|
+
message: r.byteOffset === 0 && r.byteLength === r.buffer.byteLength ? r.buffer : r.buffer.slice(r.byteOffset, r.byteOffset + r.byteLength)
|
|
317
|
+
}).then(() => n?.call(this, null, r.byteLength), (e) => n ? n.call(this, e, 0) : this.emit("error", e));
|
|
314
318
|
});
|
|
315
319
|
}
|
|
316
320
|
setBroadcast(e) {
|
|
@@ -363,21 +367,21 @@ var d = /* @__PURE__ */ e({
|
|
|
363
367
|
this.close(e);
|
|
364
368
|
});
|
|
365
369
|
}
|
|
366
|
-
},
|
|
367
|
-
if (typeof e == "string") return
|
|
370
|
+
}, m = new Uint8Array([2]), h = (e) => {
|
|
371
|
+
if (typeof e == "string") return o.encode(e);
|
|
368
372
|
if (e instanceof Uint8Array) return e;
|
|
369
373
|
if (ArrayBuffer.isView(e)) return new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
|
|
370
374
|
if (Array.isArray(e)) {
|
|
371
|
-
let t = e.map(
|
|
375
|
+
let t = e.map(h), n = new Uint8Array(t.reduce((e, t) => e + t.byteLength, 0)), r = 0;
|
|
372
376
|
for (let e of t) n.set(e, r), r += e.byteLength;
|
|
373
377
|
return n;
|
|
374
378
|
}
|
|
375
379
|
return new Uint8Array(e);
|
|
376
|
-
},
|
|
380
|
+
}, g = (e) => {
|
|
377
381
|
let t = e.split(".").map((e) => parseInt(e, 10));
|
|
378
382
|
if (t.length !== 4 || t.some((e) => Number.isNaN(e) || e < 0 || e > 255)) throw Error(`Invalid IPv4 address: ${e}`);
|
|
379
383
|
return new Uint8Array(t);
|
|
380
|
-
},
|
|
384
|
+
}, _ = (e) => {
|
|
381
385
|
let t = [];
|
|
382
386
|
for (let n = 0; n < 16; n += 2) t.push(e[n] << 8 | e[n + 1]);
|
|
383
387
|
let n = -1, r = 1;
|
|
@@ -391,16 +395,16 @@ var d = /* @__PURE__ */ e({
|
|
|
391
395
|
i - e > r && (n = e, r = i - e), e = i;
|
|
392
396
|
}
|
|
393
397
|
return n === -1 ? t.map((e) => e.toString(16)).join(":") : `${t.slice(0, n).map((e) => e.toString(16)).join(":")}::${t.slice(n + r).map((e) => e.toString(16)).join(":")}`;
|
|
394
|
-
},
|
|
395
|
-
let t = new
|
|
398
|
+
}, v = (e) => {
|
|
399
|
+
let t = new d(e).getBitsBase16(0, 128).match(/.{2}/g);
|
|
396
400
|
if (!t || t.length !== 16) throw Error(`Invalid IPv6 address: ${e}`);
|
|
397
401
|
return new Uint8Array(t.map((e) => parseInt(e, 16)));
|
|
398
|
-
},
|
|
399
|
-
let n = new
|
|
402
|
+
}, y = (e, t) => {
|
|
403
|
+
let n = new p(typeof e == "string" ? { type: e } : e);
|
|
400
404
|
return t && n.on("message", t), n;
|
|
401
|
-
},
|
|
402
|
-
Socket:
|
|
403
|
-
createSocket:
|
|
405
|
+
}, b = {
|
|
406
|
+
Socket: p,
|
|
407
|
+
createSocket: y
|
|
404
408
|
};
|
|
405
409
|
//#endregion
|
|
406
|
-
export {
|
|
410
|
+
export { p as Socket, y as createSocket, b as default, f as t };
|
package/dns.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./api-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./api-ibGqkmtA.cjs");var n=e.t({lookup:()=>r}),r=(e,n)=>t.o.then(t=>t.cloud.dns.lookup(e,n));exports.lookup=r,Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return n}});
|
package/dns.d.ts
CHANGED
package/dns.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { o as t } from "./api-
|
|
2
|
+
import { o as t } from "./api-C-N5AVos.js";
|
|
3
3
|
//#region src/dns.ts
|
|
4
4
|
var n = /* @__PURE__ */ e({ lookup: () => r }), r = (e, n) => t.then((t) => t.cloud.dns.lookup(e, n));
|
|
5
5
|
//#endregion
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { $ as t, A as n, B as r, C as i, D as a, E as o, F as s, G as c, H as l, I as u, J as ee, K as te, L as ne, M as re, O as ie, P as ae, Q as oe, R as d, S as f, U as p, V as m, W as h, Y as g, Z as _, _ as v, _t as y, a as b, at as x, b as S, ct as C, d as w, dt as T, et as E, ft as D, g as O, gt as k, ht as A, i as j, it as M, lt as N, mt as P, n as se, nt as F, ot as I, pt as L, q as R, r as z, rt as B, t as V, tt as H, v as U, w as W, x as G, y as K, z as ce } from "./lib-BGAmzIcU.js";
|
|
3
|
+
import { o as le, p as ue } from "./api-C-N5AVos.js";
|
|
4
|
+
import { RELAY_HEADER as de } from "./contract.js";
|
|
5
|
+
import { t as fe } from "./proxy-C1RlnrDC.js";
|
|
6
|
+
import { available as q, fetch as pe } from "./desktop.js";
|
|
7
|
+
//#region ../web-extension/lib/utils/background-stopped.js
|
|
8
|
+
var J = "BackgroundStoppedError", Y = (e) => w(e) && e.name === "BackgroundStoppedError", X = async (e) => {
|
|
9
|
+
if (_("promptInstall", e), typeof window > "u") return !1;
|
|
10
|
+
if (B()) return !0;
|
|
11
|
+
let t = await le, n = null, r = new Promise((e) => {
|
|
12
|
+
n = () => {
|
|
13
|
+
B() && e(!0);
|
|
14
|
+
}, F.addEventListener("statuschange", n);
|
|
15
|
+
}), i = t.installPrompt.show(e).then(() => !1), a = await Promise.race([r, i]);
|
|
16
|
+
return n && F.removeEventListener("statuschange", n), await t.installPrompt.hide().catch(() => {}), a;
|
|
17
|
+
}, Z = null;
|
|
18
|
+
x(() => (Z ||= X().then(() => void 0).finally(() => {
|
|
19
|
+
Z = null;
|
|
20
|
+
}), Z));
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/auto.ts
|
|
23
|
+
var Q = (e) => {
|
|
24
|
+
try {
|
|
25
|
+
e.headers.delete(de);
|
|
26
|
+
} catch {}
|
|
27
|
+
return e;
|
|
28
|
+
}, $ = () => typeof document < "u" && B(), me = async (e, t) => {
|
|
29
|
+
if (ue(e), _("fetch", t?.reason), t?.credentials === "include") {
|
|
30
|
+
if (typeof document > "u") throw Error("fetch with credentials needs the FKN extension, which only exists in window realms");
|
|
31
|
+
return h(e, t).then(Q);
|
|
32
|
+
}
|
|
33
|
+
return $() ? h(e, {
|
|
34
|
+
...t,
|
|
35
|
+
credentials: "omit"
|
|
36
|
+
}).then(Q) : q() ? pe(e, t) : fe(e, t);
|
|
37
|
+
}, he = /* @__PURE__ */ e({
|
|
38
|
+
ATTACH_FRAME_EVENT_KEY: () => j,
|
|
39
|
+
BACKGROUND_STOPPED: () => J,
|
|
40
|
+
CATEGORIES: () => W,
|
|
41
|
+
EXTENSION_ABI: () => 5,
|
|
42
|
+
ExtensionOperationUnsupportedError: () => C,
|
|
43
|
+
ExtensionOutdatedError: () => N,
|
|
44
|
+
FORGEABLE_HEADERS: () => oe,
|
|
45
|
+
FrameWindowBlockedError: () => O,
|
|
46
|
+
FrameWindowRefusedError: () => v,
|
|
47
|
+
LOCATOR_DENIED: () => n,
|
|
48
|
+
LOCATOR_ERROR: () => s,
|
|
49
|
+
LOCATOR_INVALID: () => ne,
|
|
50
|
+
LOCATOR_UNSUPPORTED: () => a,
|
|
51
|
+
MAX_REASON_LENGTH: () => 100,
|
|
52
|
+
PERMISSION_DENIED: () => V,
|
|
53
|
+
REQUIRED_EXTENSION_ABI: () => 0,
|
|
54
|
+
TimeoutError: () => o,
|
|
55
|
+
assertAttachableFrameUrl: () => G,
|
|
56
|
+
assertFetchableUrl: () => p,
|
|
57
|
+
assertForgeableHeaders: () => t,
|
|
58
|
+
assertLockdownApplicable: () => f,
|
|
59
|
+
assertOneCookieIdentity: () => E,
|
|
60
|
+
attachFrame: () => b,
|
|
61
|
+
attachFramePermission: () => U,
|
|
62
|
+
available: () => $,
|
|
63
|
+
box: () => L,
|
|
64
|
+
cookies: () => m,
|
|
65
|
+
createFrame: () => K,
|
|
66
|
+
createVideoElementHandle: () => P,
|
|
67
|
+
events: () => F,
|
|
68
|
+
extension: () => F,
|
|
69
|
+
fetch: () => h,
|
|
70
|
+
fetchCredentialedPermission: () => c,
|
|
71
|
+
fetchLocalPermission: () => te,
|
|
72
|
+
fetchPermission: () => R,
|
|
73
|
+
gotoPermission: () => S,
|
|
74
|
+
handleRevivableModules: () => D,
|
|
75
|
+
hasForgedCookie: () => H,
|
|
76
|
+
isBackgroundStopped: () => Y,
|
|
77
|
+
isBlockedFetchUrl: () => ee,
|
|
78
|
+
isBlockedFrameUrl: () => i,
|
|
79
|
+
isExtensionExposed: () => B,
|
|
80
|
+
isLocalNetworkUrl: () => g,
|
|
81
|
+
isLocatorDenied: () => u,
|
|
82
|
+
isLocatorInvalid: () => re,
|
|
83
|
+
isLocatorUnsupported: () => ie,
|
|
84
|
+
isPermissionDenied: () => se,
|
|
85
|
+
isTerminalError: () => ae,
|
|
86
|
+
isType: () => A,
|
|
87
|
+
modifyRequestHeadersPermission: () => d,
|
|
88
|
+
permissions: () => z,
|
|
89
|
+
promptInstall: () => X,
|
|
90
|
+
readCookiePermission: () => l,
|
|
91
|
+
readExtensionHandshake: () => M,
|
|
92
|
+
removeRequestHeaderRule: () => ce,
|
|
93
|
+
revive: () => k,
|
|
94
|
+
setMissingExtensionHandler: () => x,
|
|
95
|
+
setRequestHeaderRule: () => r,
|
|
96
|
+
supportsOperation: () => T,
|
|
97
|
+
type: () => y,
|
|
98
|
+
waitForExtensionExposure: () => I
|
|
99
|
+
});
|
|
100
|
+
//#endregion
|
|
101
|
+
export { J as a, X as i, me as n, Y as o, $ as r, he as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as Gate, A as WindowFrame, B as CATEGORIES, C as FrameWindowRefusal, D as RelayChoice, E as Locator, F as CategoryRequest, G as RemoteVideoElement, H as PermissionCategory, I as LegacyPermissionRequest, J as createVideoElementHandle, K as VideoElementState, L as PermissionGrant, M as createFrame, N as gotoPermission, O as StorageState, P as CategoryGrant, Q as Executor, R as PermissionRequest, S as FrameWindowOptions, T as GotoOptions, U as handleRevivableModules, V as CategoryMeta, W as BoxedVideoElement, X as revive, Y as isType, Z as type, _ as FrameEventMap, a as AttachCookies, b as FramePostMessageOptions, c as BlankPage, d as CookieMatchWire, et as GateTools, f as Frame, g as FrameEventListener, h as FrameDocumentEvent, i as AddScriptTagOptions, j as attachFramePermission, k as StorageStateCookie, l as ClearCookiesOptions, m as FrameBackendEvent, n as attachFrame, nt as SelectorPart, o as AttachFrameOptions, p as FrameBackend, q as box, s as AttachWindowOptions, t as ATTACH_FRAME_EVENT_KEY, tt as OperationRequest, u as ClearCookiesWire, v as FrameLocator, w as FrameWindowRefusedError, x as FrameWindowBlockedError, y as FrameMessageEvent, z as permissions } from "./index-C5DdoMGo.js";
|
|
2
2
|
//#region ../frame-locator/lib/errors.d.ts
|
|
3
3
|
declare const LOCATOR_ERROR = "LocatorError";
|
|
4
4
|
declare const LOCATOR_UNSUPPORTED = "LocatorUnsupportedError";
|
|
@@ -289,9 +289,10 @@ declare const isExtensionAvailable: () => boolean;
|
|
|
289
289
|
declare const fetch: (input: RequestInfo | URL, init?: RequestInit & {
|
|
290
290
|
reason?: string;
|
|
291
291
|
spread?: boolean;
|
|
292
|
+
relay?: RelayChoice;
|
|
292
293
|
}) => Promise<Response>;
|
|
293
294
|
declare namespace extension_d_exports {
|
|
294
|
-
export { ATTACH_FRAME_EVENT_KEY, AddScriptTagOptions, AttachCookies, AttachFrameOptions, AttachWindowOptions, BACKGROUND_STOPPED, BackgroundStoppedError, BlankPage, BoxedVideoElement, CATEGORIES, CategoryGrant, CategoryMeta, CategoryRequest, ClearCookiesOptions, ClearCookiesWire, CookieDetails, CookieMatchWire, EXTENSION_ABI, Executor, ExtensionHandshake, ExtensionOperationUnsupportedError, ExtensionOutdatedError, FORGEABLE_HEADERS, FetchInit, Frame, FrameBackend, FrameBackendEvent, FrameDocumentEvent, FrameEventListener, FrameEventMap, FrameLocator, FrameMessageEvent, FramePostMessageOptions, FrameWindowBlockedError, FrameWindowOptions, FrameWindowRefusal, FrameWindowRefusedError, Gate, GateTools, GotoOptions, HeaderOperation, LOCATOR_DENIED, LOCATOR_ERROR, LOCATOR_INVALID, LOCATOR_UNSUPPORTED, LegacyPermissionRequest, Locator, MAX_REASON_LENGTH, OperationRequest, PERMISSION_DENIED, PermissionCategory, PermissionDeniedError, PermissionGrant, PermissionRequest, ProxyFetchRequest, REQUIRED_EXTENSION_ABI, RemoteVideoElement, RequestHeaderRule, SelectorPart, SiteCookie, StorageState, StorageStateCookie, TimeoutError, VideoElementState, WindowFrame, assertAttachableFrameUrl, assertFetchableUrl, assertForgeableHeaders, assertLockdownApplicable, assertOneCookieIdentity, attachFrame, attachFramePermission, isExtensionAvailable as available, box, cookies, createFrame, createVideoElementHandle, extension as events, extension, fetch$1 as fetch, fetchCredentialedPermission, fetchLocalPermission, fetchPermission, gotoPermission, handleRevivableModules, hasForgedCookie, isBackgroundStopped, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isLocatorDenied, isLocatorInvalid, isLocatorUnsupported, isPermissionDenied, isTerminalError, isType, modifyRequestHeadersPermission, permissions, promptInstall, readCookiePermission, readExtensionHandshake, removeRequestHeaderRule, revive, setMissingExtensionHandler, setRequestHeaderRule, supportsOperation, type, waitForExtensionExposure };
|
|
295
|
+
export { ATTACH_FRAME_EVENT_KEY, AddScriptTagOptions, AttachCookies, AttachFrameOptions, AttachWindowOptions, BACKGROUND_STOPPED, BackgroundStoppedError, BlankPage, BoxedVideoElement, CATEGORIES, CategoryGrant, CategoryMeta, CategoryRequest, ClearCookiesOptions, ClearCookiesWire, CookieDetails, CookieMatchWire, EXTENSION_ABI, Executor, ExtensionHandshake, ExtensionOperationUnsupportedError, ExtensionOutdatedError, FORGEABLE_HEADERS, FetchInit, Frame, FrameBackend, FrameBackendEvent, FrameDocumentEvent, FrameEventListener, FrameEventMap, FrameLocator, FrameMessageEvent, FramePostMessageOptions, FrameWindowBlockedError, FrameWindowOptions, FrameWindowRefusal, FrameWindowRefusedError, Gate, GateTools, GotoOptions, HeaderOperation, LOCATOR_DENIED, LOCATOR_ERROR, LOCATOR_INVALID, LOCATOR_UNSUPPORTED, LegacyPermissionRequest, Locator, MAX_REASON_LENGTH, OperationRequest, PERMISSION_DENIED, PermissionCategory, PermissionDeniedError, PermissionGrant, PermissionRequest, ProxyFetchRequest, REQUIRED_EXTENSION_ABI, RelayChoice, RemoteVideoElement, RequestHeaderRule, SelectorPart, SiteCookie, StorageState, StorageStateCookie, TimeoutError, VideoElementState, WindowFrame, assertAttachableFrameUrl, assertFetchableUrl, assertForgeableHeaders, assertLockdownApplicable, assertOneCookieIdentity, attachFrame, attachFramePermission, isExtensionAvailable as available, box, cookies, createFrame, createVideoElementHandle, extension as events, extension, fetch$1 as fetch, fetchCredentialedPermission, fetchLocalPermission, fetchPermission, gotoPermission, handleRevivableModules, hasForgedCookie, isBackgroundStopped, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isLocatorDenied, isLocatorInvalid, isLocatorUnsupported, isPermissionDenied, isTerminalError, isType, modifyRequestHeadersPermission, permissions, promptInstall, readCookiePermission, readExtensionHandshake, removeRequestHeaderRule, revive, setMissingExtensionHandler, setRequestHeaderRule, supportsOperation, type, waitForExtensionExposure };
|
|
295
296
|
}
|
|
296
297
|
//#endregion
|
|
297
298
|
export { isLocatorDenied as $, setRequestHeaderRule as A, fetchLocalPermission as B, assertAttachableFrameUrl as C, RequestHeaderRule as D, HeaderOperation as E, FetchInit as F, assertForgeableHeaders as G, isBlockedFetchUrl as H, ProxyFetchRequest as I, LOCATOR_DENIED as J, assertOneCookieIdentity as K, assertFetchableUrl as L, SiteCookie as M, cookies as N, modifyRequestHeadersPermission as O, readCookiePermission as P, TimeoutError as Q, fetch$1 as R, MAX_REASON_LENGTH as S, isBlockedFrameUrl as T, isLocalNetworkUrl as U, fetchPermission as V, FORGEABLE_HEADERS as W, LOCATOR_INVALID as X, LOCATOR_ERROR as Y, LOCATOR_UNSUPPORTED as Z, BackgroundStoppedError as _, extension as a, PermissionDeniedError as b, setMissingExtensionHandler as c, ExtensionHandshake as d, isLocatorInvalid as et, ExtensionOperationUnsupportedError as f, BACKGROUND_STOPPED as g, supportsOperation as h, promptInstall as i, CookieDetails as j, removeRequestHeaderRule as k, waitForExtensionExposure as l, REQUIRED_EXTENSION_ABI as m, fetch as n, isTerminalError as nt, isExtensionExposed as o, ExtensionOutdatedError as p, hasForgedCookie as q, isExtensionAvailable as r, readExtensionHandshake as s, extension_d_exports as t, isLocatorUnsupported as tt, EXTENSION_ABI as u, isBackgroundStopped as v, assertLockdownApplicable as w, isPermissionDenied as x, PERMISSION_DENIED as y, fetchCredentialedPermission as z };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./lib-BiQ6cOZ7.cjs"),n=require("./api-ibGqkmtA.cjs"),r=require("./contract.cjs"),i=require("./proxy-CII2NFYV.cjs"),a=require("./desktop.cjs");var o=`BackgroundStoppedError`,s=e=>t.d(e)&&e.name===`BackgroundStoppedError`,c=async e=>{if(t.Z(`promptInstall`,e),typeof window>`u`)return!1;if(t.rt())return!0;let r=await n.o,i=null,a=new Promise(e=>{i=()=>{t.rt()&&e(!0)},t.nt.addEventListener(`statuschange`,i)}),o=r.installPrompt.show(e).then(()=>!1),s=await Promise.race([a,o]);return i&&t.nt.removeEventListener(`statuschange`,i),await r.installPrompt.hide().catch(()=>{}),s},l=null;t.at(()=>(l||=c().then(()=>void 0).finally(()=>{l=null}),l));var u=e=>{try{e.headers.delete(r.RELAY_HEADER)}catch{}return e},d=()=>typeof document<`u`&&t.rt(),f=async(e,r)=>{if(n.p(e),t.Z(`fetch`,r?.reason),r?.credentials===`include`){if(typeof document>`u`)throw Error(`fetch with credentials needs the FKN extension, which only exists in window realms`);return t.W(e,r).then(u)}return d()?t.W(e,{...r,credentials:`omit`}).then(u):a.available()?a.fetch(e,r):i.t(e,r)},p=e.t({ATTACH_FRAME_EVENT_KEY:()=>t.i,BACKGROUND_STOPPED:()=>o,CATEGORIES:()=>t.w,EXTENSION_ABI:()=>5,ExtensionOperationUnsupportedError:()=>t.ct,ExtensionOutdatedError:()=>t.lt,FORGEABLE_HEADERS:()=>t.Q,FrameWindowBlockedError:()=>t.g,FrameWindowRefusedError:()=>t._,LOCATOR_DENIED:()=>t.A,LOCATOR_ERROR:()=>t.F,LOCATOR_INVALID:()=>t.L,LOCATOR_UNSUPPORTED:()=>t.D,MAX_REASON_LENGTH:()=>100,PERMISSION_DENIED:()=>t.t,REQUIRED_EXTENSION_ABI:()=>0,TimeoutError:()=>t.E,assertAttachableFrameUrl:()=>t.x,assertFetchableUrl:()=>t.U,assertForgeableHeaders:()=>t.$,assertLockdownApplicable:()=>t.S,assertOneCookieIdentity:()=>t.et,attachFrame:()=>t.a,attachFramePermission:()=>t.v,available:()=>d,box:()=>t.pt,cookies:()=>t.V,createFrame:()=>t.y,createVideoElementHandle:()=>t.mt,events:()=>t.nt,extension:()=>t.nt,fetch:()=>t.W,fetchCredentialedPermission:()=>t.G,fetchLocalPermission:()=>t.K,fetchPermission:()=>t.q,gotoPermission:()=>t.b,handleRevivableModules:()=>t.ft,hasForgedCookie:()=>t.tt,isBackgroundStopped:()=>s,isBlockedFetchUrl:()=>t.J,isBlockedFrameUrl:()=>t.C,isExtensionExposed:()=>t.rt,isLocalNetworkUrl:()=>t.Y,isLocatorDenied:()=>t.I,isLocatorInvalid:()=>t.M,isLocatorUnsupported:()=>t.O,isPermissionDenied:()=>t.n,isTerminalError:()=>t.P,isType:()=>t.ht,modifyRequestHeadersPermission:()=>t.R,permissions:()=>t.r,promptInstall:()=>c,readCookiePermission:()=>t.H,readExtensionHandshake:()=>t.it,removeRequestHeaderRule:()=>t.z,revive:()=>t.gt,setMissingExtensionHandler:()=>t.at,setRequestHeaderRule:()=>t.B,supportsOperation:()=>t.dt,type:()=>t._t,waitForExtensionExposure:()=>t.ot});Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return p}});
|
package/extension.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./lib-BiQ6cOZ7.cjs"),t=require("./extension-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./lib-BiQ6cOZ7.cjs"),t=require("./extension-M8bUhlML.cjs");exports.ATTACH_FRAME_EVENT_KEY=e.i,exports.BACKGROUND_STOPPED=t.a,exports.CATEGORIES=e.w,exports.EXTENSION_ABI=e.st,exports.ExtensionOperationUnsupportedError=e.ct,exports.ExtensionOutdatedError=e.lt,exports.FORGEABLE_HEADERS=e.Q,exports.FrameWindowBlockedError=e.g,exports.FrameWindowRefusedError=e._,exports.LOCATOR_DENIED=e.A,exports.LOCATOR_ERROR=e.F,exports.LOCATOR_INVALID=e.L,exports.LOCATOR_UNSUPPORTED=e.D,exports.MAX_REASON_LENGTH=e.X,exports.PERMISSION_DENIED=e.t,exports.REQUIRED_EXTENSION_ABI=e.ut,exports.TimeoutError=e.E,exports.assertAttachableFrameUrl=e.x,exports.assertFetchableUrl=e.U,exports.assertForgeableHeaders=e.$,exports.assertLockdownApplicable=e.S,exports.assertOneCookieIdentity=e.et,exports.attachFrame=e.a,exports.attachFramePermission=e.v,exports.available=t.r,exports.box=e.pt,exports.cookies=e.V,exports.createFrame=e.y,exports.createVideoElementHandle=e.mt,exports.events=e.nt,exports.extension=e.nt,exports.fetch=e.W,exports.fetchCredentialedPermission=e.G,exports.fetchLocalPermission=e.K,exports.fetchPermission=e.q,exports.gotoPermission=e.b,exports.handleRevivableModules=e.ft,exports.hasForgedCookie=e.tt,exports.isBackgroundStopped=t.o,exports.isBlockedFetchUrl=e.J,exports.isBlockedFrameUrl=e.C,exports.isExtensionExposed=e.rt,exports.isLocalNetworkUrl=e.Y,exports.isLocatorDenied=e.I,exports.isLocatorInvalid=e.M,exports.isLocatorUnsupported=e.O,exports.isPermissionDenied=e.n,exports.isTerminalError=e.P,exports.isType=e.ht,exports.modifyRequestHeadersPermission=e.R,exports.permissions=e.r,exports.promptInstall=t.i,exports.readCookiePermission=e.H,exports.readExtensionHandshake=e.it,exports.removeRequestHeaderRule=e.z,exports.revive=e.gt,exports.setMissingExtensionHandler=e.at,exports.setRequestHeaderRule=e.B,exports.supportsOperation=e.dt,exports.type=e._t,exports.waitForExtensionExposure=e.ot;
|
package/extension.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { $ as isLocatorDenied, A as setRequestHeaderRule, B as fetchLocalPermission, C as assertAttachableFrameUrl, D as RequestHeaderRule, E as HeaderOperation, F as FetchInit, G as assertForgeableHeaders, H as isBlockedFetchUrl, I as ProxyFetchRequest, J as LOCATOR_DENIED, K as assertOneCookieIdentity, L as assertFetchableUrl, M as SiteCookie, N as cookies, O as modifyRequestHeadersPermission, P as readCookiePermission, Q as TimeoutError, R as fetch, S as MAX_REASON_LENGTH, T as isBlockedFrameUrl, U as isLocalNetworkUrl, V as fetchPermission, W as FORGEABLE_HEADERS, X as LOCATOR_INVALID, Y as LOCATOR_ERROR, Z as LOCATOR_UNSUPPORTED, _ as BackgroundStoppedError, a as extension, b as PermissionDeniedError, c as setMissingExtensionHandler, d as ExtensionHandshake, et as isLocatorInvalid, f as ExtensionOperationUnsupportedError, g as BACKGROUND_STOPPED, h as supportsOperation, i as promptInstall, j as CookieDetails, k as removeRequestHeaderRule, l as waitForExtensionExposure, m as REQUIRED_EXTENSION_ABI, nt as isTerminalError, o as isExtensionExposed, p as ExtensionOutdatedError, q as hasForgedCookie, r as isExtensionAvailable, s as readExtensionHandshake, tt as isLocatorUnsupported, u as EXTENSION_ABI, v as isBackgroundStopped, w as assertLockdownApplicable, x as isPermissionDenied, y as PERMISSION_DENIED, z as fetchCredentialedPermission } from "./extension-
|
|
3
|
-
export { ATTACH_FRAME_EVENT_KEY, AddScriptTagOptions, AttachCookies, AttachFrameOptions, AttachWindowOptions, BACKGROUND_STOPPED, type BackgroundStoppedError, BlankPage, BoxedVideoElement, CATEGORIES, CategoryGrant, type CategoryMeta, CategoryRequest, ClearCookiesOptions, ClearCookiesWire, CookieDetails, CookieMatchWire, EXTENSION_ABI, type Executor, type ExtensionHandshake, ExtensionOperationUnsupportedError, ExtensionOutdatedError, FORGEABLE_HEADERS, FetchInit, Frame, FrameBackend, FrameBackendEvent, FrameDocumentEvent, FrameEventListener, FrameEventMap, FrameLocator, FrameMessageEvent, FramePostMessageOptions, FrameWindowBlockedError, FrameWindowOptions, FrameWindowRefusal, FrameWindowRefusedError, type Gate, type GateTools, GotoOptions, HeaderOperation, LOCATOR_DENIED, LOCATOR_ERROR, LOCATOR_INVALID, LOCATOR_UNSUPPORTED, LegacyPermissionRequest, Locator, MAX_REASON_LENGTH, type OperationRequest, PERMISSION_DENIED, type PermissionCategory, type PermissionDeniedError, PermissionGrant, PermissionRequest, ProxyFetchRequest, REQUIRED_EXTENSION_ABI, RemoteVideoElement, RequestHeaderRule, type SelectorPart, SiteCookie, StorageState, StorageStateCookie, TimeoutError, VideoElementState, WindowFrame, assertAttachableFrameUrl, assertFetchableUrl, assertForgeableHeaders, assertLockdownApplicable, assertOneCookieIdentity, attachFrame, attachFramePermission, isExtensionAvailable as available, box, cookies, createFrame, createVideoElementHandle, extension as events, extension, fetch, fetchCredentialedPermission, fetchLocalPermission, fetchPermission, gotoPermission, handleRevivableModules, hasForgedCookie, isBackgroundStopped, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isLocatorDenied, isLocatorInvalid, isLocatorUnsupported, isPermissionDenied, isTerminalError, isType, modifyRequestHeadersPermission, permissions, promptInstall, readCookiePermission, readExtensionHandshake, removeRequestHeaderRule, revive, setMissingExtensionHandler, setRequestHeaderRule, supportsOperation, type, waitForExtensionExposure };
|
|
1
|
+
import { $ as Gate, A as WindowFrame, B as CATEGORIES, C as FrameWindowRefusal, D as RelayChoice, E as Locator, F as CategoryRequest, G as RemoteVideoElement, H as PermissionCategory, I as LegacyPermissionRequest, J as createVideoElementHandle, K as VideoElementState, L as PermissionGrant, M as createFrame, N as gotoPermission, O as StorageState, P as CategoryGrant, Q as Executor, R as PermissionRequest, S as FrameWindowOptions, T as GotoOptions, U as handleRevivableModules, V as CategoryMeta, W as BoxedVideoElement, X as revive, Y as isType, Z as type, _ as FrameEventMap, a as AttachCookies, b as FramePostMessageOptions, c as BlankPage, d as CookieMatchWire, et as GateTools, f as Frame, g as FrameEventListener, h as FrameDocumentEvent, i as AddScriptTagOptions, j as attachFramePermission, k as StorageStateCookie, l as ClearCookiesOptions, m as FrameBackendEvent, n as attachFrame, nt as SelectorPart, o as AttachFrameOptions, p as FrameBackend, q as box, s as AttachWindowOptions, t as ATTACH_FRAME_EVENT_KEY, tt as OperationRequest, u as ClearCookiesWire, v as FrameLocator, w as FrameWindowRefusedError, x as FrameWindowBlockedError, y as FrameMessageEvent, z as permissions } from "./index-C5DdoMGo.js";
|
|
2
|
+
import { $ as isLocatorDenied, A as setRequestHeaderRule, B as fetchLocalPermission, C as assertAttachableFrameUrl, D as RequestHeaderRule, E as HeaderOperation, F as FetchInit, G as assertForgeableHeaders, H as isBlockedFetchUrl, I as ProxyFetchRequest, J as LOCATOR_DENIED, K as assertOneCookieIdentity, L as assertFetchableUrl, M as SiteCookie, N as cookies, O as modifyRequestHeadersPermission, P as readCookiePermission, Q as TimeoutError, R as fetch, S as MAX_REASON_LENGTH, T as isBlockedFrameUrl, U as isLocalNetworkUrl, V as fetchPermission, W as FORGEABLE_HEADERS, X as LOCATOR_INVALID, Y as LOCATOR_ERROR, Z as LOCATOR_UNSUPPORTED, _ as BackgroundStoppedError, a as extension, b as PermissionDeniedError, c as setMissingExtensionHandler, d as ExtensionHandshake, et as isLocatorInvalid, f as ExtensionOperationUnsupportedError, g as BACKGROUND_STOPPED, h as supportsOperation, i as promptInstall, j as CookieDetails, k as removeRequestHeaderRule, l as waitForExtensionExposure, m as REQUIRED_EXTENSION_ABI, nt as isTerminalError, o as isExtensionExposed, p as ExtensionOutdatedError, q as hasForgedCookie, r as isExtensionAvailable, s as readExtensionHandshake, tt as isLocatorUnsupported, u as EXTENSION_ABI, v as isBackgroundStopped, w as assertLockdownApplicable, x as isPermissionDenied, y as PERMISSION_DENIED, z as fetchCredentialedPermission } from "./extension-C_eOfEjv.js";
|
|
3
|
+
export { ATTACH_FRAME_EVENT_KEY, AddScriptTagOptions, AttachCookies, AttachFrameOptions, AttachWindowOptions, BACKGROUND_STOPPED, type BackgroundStoppedError, BlankPage, BoxedVideoElement, CATEGORIES, CategoryGrant, type CategoryMeta, CategoryRequest, ClearCookiesOptions, ClearCookiesWire, CookieDetails, CookieMatchWire, EXTENSION_ABI, type Executor, type ExtensionHandshake, ExtensionOperationUnsupportedError, ExtensionOutdatedError, FORGEABLE_HEADERS, FetchInit, Frame, FrameBackend, FrameBackendEvent, FrameDocumentEvent, FrameEventListener, FrameEventMap, FrameLocator, FrameMessageEvent, FramePostMessageOptions, FrameWindowBlockedError, FrameWindowOptions, FrameWindowRefusal, FrameWindowRefusedError, type Gate, type GateTools, GotoOptions, HeaderOperation, LOCATOR_DENIED, LOCATOR_ERROR, LOCATOR_INVALID, LOCATOR_UNSUPPORTED, LegacyPermissionRequest, Locator, MAX_REASON_LENGTH, type OperationRequest, PERMISSION_DENIED, type PermissionCategory, type PermissionDeniedError, PermissionGrant, PermissionRequest, ProxyFetchRequest, REQUIRED_EXTENSION_ABI, RelayChoice, RemoteVideoElement, RequestHeaderRule, type SelectorPart, SiteCookie, StorageState, StorageStateCookie, TimeoutError, VideoElementState, WindowFrame, assertAttachableFrameUrl, assertFetchableUrl, assertForgeableHeaders, assertLockdownApplicable, assertOneCookieIdentity, attachFrame, attachFramePermission, isExtensionAvailable as available, box, cookies, createFrame, createVideoElementHandle, extension as events, extension, fetch, fetchCredentialedPermission, fetchLocalPermission, fetchPermission, gotoPermission, handleRevivableModules, hasForgedCookie, isBackgroundStopped, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isLocatorDenied, isLocatorInvalid, isLocatorUnsupported, isPermissionDenied, isTerminalError, isType, modifyRequestHeadersPermission, permissions, promptInstall, readCookiePermission, readExtensionHandshake, removeRequestHeaderRule, revive, setMissingExtensionHandler, setRequestHeaderRule, supportsOperation, type, waitForExtensionExposure };
|
package/extension.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, O as m, P as h, Q as g, R as _, S as v, U as y, V as b, W as x, X as S, Y as C, _ as w, _t as T, a as E, at as D, b as O, ct as k, dt as ee, et as A, ft as j, g as M, gt as N, ht as P, i as F, it as I, lt as L, mt as R, n as z, nt as B, ot as V, pt as H, q as U, r as W, rt as G, st as K, t as q, tt as J, ut as Y, v as X, w as Z, x as Q, y as $, z as te } from "./lib-BGAmzIcU.js";
|
|
2
|
-
import { a as ne, i as re, o as ie, r as ae } from "./extension-
|
|
2
|
+
import { a as ne, i as re, o as ie, r as ae } from "./extension-AidgSVhb.js";
|
|
3
3
|
export { F as ATTACH_FRAME_EVENT_KEY, ne as BACKGROUND_STOPPED, Z as CATEGORIES, K as EXTENSION_ABI, k as ExtensionOperationUnsupportedError, L as ExtensionOutdatedError, g as FORGEABLE_HEADERS, M as FrameWindowBlockedError, w as FrameWindowRefusedError, t as LOCATOR_DENIED, o as LOCATOR_ERROR, f as LOCATOR_INVALID, i as LOCATOR_UNSUPPORTED, S as MAX_REASON_LENGTH, q as PERMISSION_DENIED, Y as REQUIRED_EXTENSION_ABI, a as TimeoutError, Q as assertAttachableFrameUrl, y as assertFetchableUrl, e as assertForgeableHeaders, v as assertLockdownApplicable, A as assertOneCookieIdentity, E as attachFrame, X as attachFramePermission, ae as available, H as box, b as cookies, $ as createFrame, R as createVideoElementHandle, B as events, B as extension, x as fetch, s as fetchCredentialedPermission, d as fetchLocalPermission, U as fetchPermission, O as gotoPermission, j as handleRevivableModules, J as hasForgedCookie, ie as isBackgroundStopped, u as isBlockedFetchUrl, r as isBlockedFrameUrl, G as isExtensionExposed, C as isLocalNetworkUrl, l as isLocatorDenied, p as isLocatorInvalid, m as isLocatorUnsupported, z as isPermissionDenied, h as isTerminalError, P as isType, _ as modifyRequestHeadersPermission, W as permissions, re as promptInstall, c as readCookiePermission, I as readExtensionHandshake, te as removeRequestHeaderRule, N as revive, D as setMissingExtensionHandler, n as setRequestHeaderRule, ee as supportsOperation, T as type, V 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-BlRxCJQW.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-C_RmxWk9.js";
|
|
2
2
|
//#region src/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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./api-BmaUJUUp.cjs"),n=require("./busy-BXbVH595.cjs"),r=require("./node-fs-vsWuoMGa.cjs"),i=require("./messages.cjs"),a=require("./account-storage-C1VL6fpb.cjs"),o=require("./account.cjs"),s=require("./opfs-CXMESVLc.cjs");var c=e.t({adopt:()=>L,adoptable:()=>z,available:()=>ee,captureAccount:()=>l,list:()=>ye,onConflict:()=>Ce,pending:()=>fe,pendingDeletes:()=>pe,pull:()=>N,readFile:()=>be,readFileSealed:()=>M,remove:()=>Se,replicating:()=>me,writeFile:()=>xe}),l=a.s,u,d=async()=>await(u??=s.t().catch(()=>!1))?!0:(u=void 0,!1),f=()=>a.o().catch(()=>`unknown`),p=async()=>await f()===`connected`,ee=async()=>await d()||await p(),te=`fkn:fs:pending`,ne=`fkn:fs:pending-delete`,re=`fkn:fs:adopt-declined`,m=!0,ie=new Map,ae=null,oe=(e,t)=>{if(e===null)return!1;if(`generation`in e&&`generation`in t)return e.generation===t.generation;let n=e=>`pin`in e?e.pin:a.f(e),r=n(e);return r!==void 0&&r===n(t)},h=(e,t)=>oe(ae,t)?ie.get(e)??null:null,g=e=>e===`write`?te:ne,_=e=>{try{let t=localStorage.getItem(g(e));if(!t)return{};let n=JSON.parse(t);if(Array.isArray(n))return Object.fromEntries(n.filter(e=>typeof e==`string`).map(e=>[e,{base:null,pin:null}]));if(!n||typeof n!=`object`)return{};let r={};for(let[e,t]of Object.entries(n))if(t===null||typeof t==`string`)r[e]={base:t,pin:null};else if(typeof t==`object`){let{base:n,pin:i}=t;r[e]={base:typeof n==`string`?n:null,pin:typeof i==`string`&&i?i:null}}return r}catch{return{}}},v=(e,t)=>{try{Object.keys(t).length?localStorage.setItem(g(e),JSON.stringify(t)):localStorage.removeItem(g(e))}catch{}},se=()=>{try{let e=JSON.parse(localStorage.getItem(re)??`{}`);return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}catch{return{}}},y=new Map,ce=e=>`pin`in e?e.pin:a.f(e)??null,le=(e,t,n,r)=>{let i=_(e),a=i[t],o=ce(r);a&&o!==null&&a.pin===o||(i[t]={base:a?a.base:n,pin:o},v(e,i),o===null&&`generation`in r?y.set(`${e}:${t}`,r):y.delete(`${e}:${t}`))},ue=(e,t)=>{y.delete(`${e}:${t}`);let n=_(e);t in n&&(delete n[t],v(e,n),E()||(O=D))},b=(e,t,n)=>le(`write`,e,t,n),x=e=>ue(`write`,e),de=(e,t)=>le(`delete`,e,h(e,t),t),S=e=>ue(`delete`,e),fe=()=>Object.keys(_(`write`)),pe=()=>Object.keys(_(`delete`)),me=()=>m,C=new Map,he=e=>C.get(e)===a.s().generation,ge=(e,t,n)=>n.pin===null&&!y.has(`${e}:${t}`),w=null,T=!1;n.i(`storage replication`,()=>w!==null||B!==null);var E=()=>[`write`,`delete`].some(e=>Object.entries(_(e)).some(([t,n])=>n.pin===null?!ge(e,t,n):!he(n.pin))),D=6e4,_e=6e5,O=D,k=null,A=()=>{!k&&typeof window<`u`&&E()&&(k=setTimeout(()=>{k=null,j()},O),O=Math.min(O*2,_e))},j=()=>{if(w){T=!0;return}E()&&(w=ke(!1,a.s()).then(e=>{if(!E()){O=D;return}e.failed.length&&A()}).catch(()=>{A()}).finally(()=>{w=null,ve()}))},ve=()=>{T&&(T=!1,j())},ye=async e=>{let t=e?.pin??a.s();U();let n=await f(),r=n===`connected`,[i,o]=await Promise.all([d().then(e=>e?s.n():[]).catch(()=>[]),r?a.p({pin:t}).then(e=>({ok:!0,entries:e}),e=>({ok:!1,entries:[],changed:a.l(e)?e:void 0})):Promise.resolve({ok:n===`disconnected`,entries:[]})]);if(n!==`unknown`&&(m=o.ok),o.ok&&n!==`unknown`&&(ie=new Map(o.entries.map(e=>[e.path,e.updatedAt])),ae=t),o.changed)throw o.changed;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 o.entries)u(e);return o.ok&&r&&(Ie(i,o.entries).catch(()=>{}),E()?j():H({local:i,remote:o.entries,from:t}).catch(()=>{})),[...c.values()]},be=async(e,t)=>{let n=t?.pin??a.s();if(await d())try{return await s.i(e)}catch(e){if(e?.name!==`NotFoundError`)throw e}let r=await a.g(e,{pin:n});return await d()&&s.o(e,r).catch(()=>{}),r},M=async(e,t)=>{let n=t?.pin??a.s();if(await d())try{let t=await s.i(e);return{data:new Uint8Array(await t.arrayBuffer()),sealedAt:null}}catch(e){if(e?.name!==`NotFoundError`)throw e}return a._(e,{pin:n})},xe=async(e,t,n)=>{let r=n?.pin??a.s(),i=n?.contentType,o=i?{contentType:i}:void 0,c=t instanceof Blob?t:new Blob([t],o?{type:o.contentType}:void 0);if(await d()){await s.o(e,c,o),U();let t=h(e,r),n=await f();if(n===`disconnected`)return;if(n===`unknown`||!m){b(e,t,r),A();return}a.b(e,c,{...o,pin:r}).then(()=>x(e)).catch(n=>{b(e,t,r),a.l(n)||A(),console.warn(`fs: cloud replicate failed, queued for adopt()`,n)});return}let l=await f();if(l===`connected`)return a.b(e,c,{...o,pin:r});throw Error(l===`unknown`?`fs: cloud unreachable`:`fs: no storage backend available`)},Se=async(e,t)=>{let n=t?.pin??a.s();U();let r=[];await d()&&r.push(s.a(e).catch(()=>{}));let i=await f();if(i===`connected`?r.push(a.v(e,{pin:n}).then(()=>S(e)).catch(t=>{de(e,n),a.l(t)||A(),console.warn(`fs: cloud delete failed, queued for retry`,t)})):i===`unknown`&&r.length&&h(e,n)!==null&&(de(e,n),A()),!r.length)throw Error(i===`unknown`?`fs: cloud unreachable`:`fs: no storage backend available`);x(e),await Promise.all(r)},N=async e=>{let t=a.s(),n=await a.g(e,{pin:t});return await d()&&await s.o(e,n),n},P=null,Ce=e=>(P=e,()=>{P===e&&(P=null)}),we=async e=>{let n=await(await t.o).cloud.fs.promptConflict({path:e.path,local:e.local,cloud:e.cloud}).catch(()=>null);return n===`local`?e.readLocal():n===`cloud`?e.readCloud():null},Te=async e=>{if(P)try{return await P(e)}catch{return null}return we(e)},F=class extends Error{},I=e=>e instanceof Error?e.message:String(e),Ee=()=>{let e=new Map,t=t=>{let n=e.get(t);return n||e.set(t,n={writes:new Map,deletes:new Map}),n};for(let[e,n]of Object.entries(_(`write`)))t(n.pin).writes.set(e,n.base);for(let[e,n]of Object.entries(_(`delete`)))t(n.pin).deletes.set(e,n.base);return e},De=async()=>{for(let[e,t]of[...y]){let n=e.startsWith(`write:`)?`write`:`delete`,r=e.slice(n.length+1),i;try{i=await a.m(t)}catch(t){a.l(t)&&y.delete(e);continue}if(y.get(e)!==t)continue;y.delete(e);let o=_(n),s=o[r];s&&s.pin===null&&(o[r]={base:s.base,pin:i},v(n,o))}},Oe=async(e,t,n,r,i,o)=>{let c=new Map(t.map(e=>[e.path,e])),l=e=>{if(a.l(e))throw new F};for(let[t,o]of e.deletes){let e=c.get(t);if(!e){S(t);continue}if(r.some(e=>e.path===t)){S(t);continue}if(e.updatedAt!==o){S(t);continue}try{await a.v(t,n),S(t),i.deleted.push(t)}catch(e){l(e),i.failed.push({path:t,error:I(e)})}}for(let t of r){let r=c.get(t.path),u=e.writes.has(t.path);if(!u){if(!o(t))continue;if(r){i.kept.push(t.path);continue}}let d=e.writes.get(t.path)??null;if(u&&r&&r.updatedAt!==d){let e=null,o=null,c=await Te({path:t.path,local:{size:t.size,updatedAt:t.updatedAt},cloud:{size:r.size,updatedAt:r.updatedAt},readLocal:()=>e??=s.i(t.path),readCloud:()=>o??=a.g(t.path,n)});if(c==null){i.unresolved.push(t.path);continue}try{let r=e!==null&&c===await e,l=o!==null&&c===await o;l||await a.b(t.path,c,t.contentType?{contentType:t.contentType,...n}:n),r||await s.o(t.path,c),x(t.path),i.resolved.push({path:t.path,choice:r?`local`:l?`cloud`:`merged`})}catch(e){if(l(e),e?.code===`FKN_E2E_LOCKED`)throw e;i.failed.push({path:t.path,error:I(e)})}continue}try{let e=await s.i(t.path);await a.b(t.path,e,t.contentType?{contentType:t.contentType,...n}:n),x(t.path),i.uploaded.push(t.path)}catch(e){if(u||b(t.path,r?.updatedAt??null,n.pin),l(e),e?.code===`FKN_E2E_LOCKED`)throw e;i.failed.push({path:t.path,error:I(e)})}}},ke=async(e,t)=>{let n={uploaded:[],kept:[],resolved:[],unresolved:[],deleted:[],failed:[]},r=await f();if(r===`unknown`)throw Error(`fs: cloud unreachable`);if(r!==`connected`)throw Error(`fs: this needs a signed-in account`);let i=await d(),o=i?await s.n():[];if(i)for(let e of Object.keys(_(`write`)))o.some(t=>t.path===e)||x(e);await De();for(let[e,r]of Ee()){if(e===null||he(e))continue;let i={pin:{pin:e}},s;try{s=await a.p(i)}catch(n){if(a.l(n)){C.set(e,t.generation);continue}if(a.u(n)){Ae(e);continue}throw n}try{await Oe(r,s,i,o,n,()=>!1)}catch(n){if(!(n instanceof F))throw n;C.set(e,t.generation)}}if(e){let e={pin:t},r=await a.p(e),i=_(`write`),s=Ee().get(null)??{writes:new Map,deletes:new Map},c=new Set([...n.uploaded,...n.resolved.map(({path:e})=>e),...n.unresolved,...n.failed.map(({path:e})=>e)]),l=e=>!(e.path in i)&&!c.has(e.path);try{await Oe(s,r,e,o,n,l)}catch(e){throw e instanceof F?new a.t:e}}return n},Ae=e=>{for(let t of[`write`,`delete`]){let n=_(t),r=!1;for(let t of Object.values(n))t.pin===e&&(t.pin=null,r=!0);r&&v(t,n)}},je=async e=>{for(;w;)await w;let t=ke(!0,e);w=t.then(()=>{},()=>{});try{return await t}finally{w=null,ve()}},L=()=>je(a.s()),R=(e,t)=>{let n=new Set(t.map(e=>e.path)),r=_(`write`);return e.filter(e=>{let t=r[e.path];return t?ge(`write`,e.path,t):!n.has(e.path)})},z=async()=>{let e=a.s();if(!await p()||!await d())return{paths:[],bytes:0};let[t,n]=await Promise.all([s.n(),a.p({pin:e})]),r=R(t,n);return{paths:r.map(e=>e.path),bytes:r.reduce((e,t)=>e+t.size,0)}},Me=()=>new Set(Object.keys(se())),Ne=e=>{let t=se();for(let n of e)t[n]=null;try{localStorage.setItem(re,JSON.stringify(t))}catch{}},B=null,V=!1,H=e=>{if(B)return V=!0,B;let n=e?.from??a.s();return B=(async()=>{if(!await p())return;let r=e??(await d()?{local:await s.n(),remote:await a.p({pin:n})}:null);if(!r)return;let i=Me(),o=R(r.local,r.remote).filter(e=>!i.has(e.path));if(!o.length)return;let c=await t.o,l=o.reduce((e,t)=>e+t.size,0);if(!await c.cloud.fs.promptAdopt({files:o.length,bytes:l}).catch(()=>!1)){Ne(o.map(e=>e.path));return}`generation`in n&&await je(n)})().catch(()=>{}).finally(()=>{B=null,V&&(V=!1,H())}),B},Pe=null,Fe=!1,Ie=async(e,n)=>{let r=R(e,n),i=await t.o,a=async()=>{await L().catch(()=>{});let e=await z().catch(()=>({paths:[],bytes:0}));await i.cloud.fs.setAdoptSource({files:e.paths.length,bytes:e.bytes},a).catch(()=>{})},o={files:r.length,bytes:r.reduce((e,t)=>e+t.size,0)};Pe=()=>{i.cloud.fs.setAdoptSource(o,a).catch(()=>{})},Fe||(Fe=!0,t.u((e,t)=>{t>1&&Pe?.()})),await i.cloud.fs.setAdoptSource(o,a)},Le=!1,U=()=>{Le||typeof window>`u`||(Le=!0,window.addEventListener(`online`,()=>{j()}),o.onChange(()=>{H().catch(()=>{}),j()}).catch(()=>{}))},Re=e.t({STORAGE_ACCOUNT_CHANGED:()=>i.STORAGE_ACCOUNT_CHANGED,STORAGE_ACCOUNT_PIN_UNSUPPORTED:()=>i.STORAGE_ACCOUNT_PIN_UNSUPPORTED,StorageAccountChangedError:()=>a.t,StorageAccountPinUnsupportedError:()=>a.n,adopt:()=>q,adoptable:()=>J,appendFile:()=>tt,appendFileSync:()=>Ue,available:()=>Be,default:()=>$,exists:()=>ct,existsSync:()=>We,flush:()=>W,isAccountChanged:()=>a.l,lstatSync:()=>Ke,mkdir:()=>it,mkdirSync:()=>Je,mount:()=>ut,onConflict:()=>Q,pending:()=>Y,pendingDeletes:()=>X,promises:()=>lt,pull:()=>G,readFile:()=>$e,readFileSealed:()=>K,readFileSync:()=>Ve,readdir:()=>rt,readdirSync:()=>qe,remount:()=>dt,rename:()=>st,renameSync:()=>Qe,replicating:()=>Z,rm:()=>at,rmSync:()=>Ye,rmdirSync:()=>Xe,stat:()=>nt,statSync:()=>Ge,unlink:()=>ot,unlinkSync:()=>Ze,writeFile:()=>et,writeFileSync:()=>He}),ze=r.t(c,{memfs:!0}),{available:Be,readFileSync:Ve,writeFileSync:He,appendFileSync:Ue,existsSync:We,statSync:Ge,lstatSync:Ke,readdirSync:qe,mkdirSync:Je,rmSync:Ye,rmdirSync:Xe,unlinkSync:Ze,renameSync:Qe,readFile:$e,writeFile:et,appendFile:tt,stat:nt,readdir:rt,mkdir:it,rm:at,unlink:ot,rename:st,exists:ct,promises:lt,mount:ut,flush:W,remount:dt}=ze,G=N,K=M,q=L,J=z,Y=fe,X=pe,Z=me,Q=Ce,$={...ze,pull:G,readFileSealed:K,adopt:q,adoptable:J,pending:Y,pendingDeletes:X,replicating:Z,onConflict:Q};Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return rt}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return Qe}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return st}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return et}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return He}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return nt}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return ot}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return $e}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return Ke}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return it}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Ue}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return Xe}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return at}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return ut}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return ct}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return Je}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return tt}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return We}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return lt}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return qe}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return G}});
|
|
1
|
+
const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./api-ibGqkmtA.cjs"),n=require("./busy-BXbVH595.cjs"),r=require("./node-fs-vsWuoMGa.cjs"),i=require("./messages.cjs"),a=require("./account-storage-CPTct4Vz.cjs"),o=require("./account.cjs"),s=require("./opfs-CXMESVLc.cjs");var c=e.t({adopt:()=>L,adoptable:()=>z,available:()=>ee,captureAccount:()=>l,list:()=>ye,onConflict:()=>Ce,pending:()=>fe,pendingDeletes:()=>pe,pull:()=>N,readFile:()=>be,readFileSealed:()=>M,remove:()=>Se,replicating:()=>me,writeFile:()=>xe}),l=a.s,u,d=async()=>await(u??=s.t().catch(()=>!1))?!0:(u=void 0,!1),f=()=>a.o().catch(()=>`unknown`),p=async()=>await f()===`connected`,ee=async()=>await d()||await p(),te=`fkn:fs:pending`,ne=`fkn:fs:pending-delete`,re=`fkn:fs:adopt-declined`,m=!0,ie=new Map,ae=null,oe=(e,t)=>{if(e===null)return!1;if(`generation`in e&&`generation`in t)return e.generation===t.generation;let n=e=>`pin`in e?e.pin:a.f(e),r=n(e);return r!==void 0&&r===n(t)},h=(e,t)=>oe(ae,t)?ie.get(e)??null:null,g=e=>e===`write`?te:ne,_=e=>{try{let t=localStorage.getItem(g(e));if(!t)return{};let n=JSON.parse(t);if(Array.isArray(n))return Object.fromEntries(n.filter(e=>typeof e==`string`).map(e=>[e,{base:null,pin:null}]));if(!n||typeof n!=`object`)return{};let r={};for(let[e,t]of Object.entries(n))if(t===null||typeof t==`string`)r[e]={base:t,pin:null};else if(typeof t==`object`){let{base:n,pin:i}=t;r[e]={base:typeof n==`string`?n:null,pin:typeof i==`string`&&i?i:null}}return r}catch{return{}}},v=(e,t)=>{try{Object.keys(t).length?localStorage.setItem(g(e),JSON.stringify(t)):localStorage.removeItem(g(e))}catch{}},se=()=>{try{let e=JSON.parse(localStorage.getItem(re)??`{}`);return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}catch{return{}}},y=new Map,ce=e=>`pin`in e?e.pin:a.f(e)??null,le=(e,t,n,r)=>{let i=_(e),a=i[t],o=ce(r);a&&o!==null&&a.pin===o||(i[t]={base:a?a.base:n,pin:o},v(e,i),o===null&&`generation`in r?y.set(`${e}:${t}`,r):y.delete(`${e}:${t}`))},ue=(e,t)=>{y.delete(`${e}:${t}`);let n=_(e);t in n&&(delete n[t],v(e,n),E()||(O=D))},b=(e,t,n)=>le(`write`,e,t,n),x=e=>ue(`write`,e),de=(e,t)=>le(`delete`,e,h(e,t),t),S=e=>ue(`delete`,e),fe=()=>Object.keys(_(`write`)),pe=()=>Object.keys(_(`delete`)),me=()=>m,C=new Map,he=e=>C.get(e)===a.s().generation,ge=(e,t,n)=>n.pin===null&&!y.has(`${e}:${t}`),w=null,T=!1;n.i(`storage replication`,()=>w!==null||B!==null);var E=()=>[`write`,`delete`].some(e=>Object.entries(_(e)).some(([t,n])=>n.pin===null?!ge(e,t,n):!he(n.pin))),D=6e4,_e=6e5,O=D,k=null,A=()=>{!k&&typeof window<`u`&&E()&&(k=setTimeout(()=>{k=null,j()},O),O=Math.min(O*2,_e))},j=()=>{if(w){T=!0;return}E()&&(w=ke(!1,a.s()).then(e=>{if(!E()){O=D;return}e.failed.length&&A()}).catch(()=>{A()}).finally(()=>{w=null,ve()}))},ve=()=>{T&&(T=!1,j())},ye=async e=>{let t=e?.pin??a.s();U();let n=await f(),r=n===`connected`,[i,o]=await Promise.all([d().then(e=>e?s.n():[]).catch(()=>[]),r?a.p({pin:t}).then(e=>({ok:!0,entries:e}),e=>({ok:!1,entries:[],changed:a.l(e)?e:void 0})):Promise.resolve({ok:n===`disconnected`,entries:[]})]);if(n!==`unknown`&&(m=o.ok),o.ok&&n!==`unknown`&&(ie=new Map(o.entries.map(e=>[e.path,e.updatedAt])),ae=t),o.changed)throw o.changed;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 o.entries)u(e);return o.ok&&r&&(Ie(i,o.entries).catch(()=>{}),E()?j():H({local:i,remote:o.entries,from:t}).catch(()=>{})),[...c.values()]},be=async(e,t)=>{let n=t?.pin??a.s();if(await d())try{return await s.i(e)}catch(e){if(e?.name!==`NotFoundError`)throw e}let r=await a.g(e,{pin:n});return await d()&&s.o(e,r).catch(()=>{}),r},M=async(e,t)=>{let n=t?.pin??a.s();if(await d())try{let t=await s.i(e);return{data:new Uint8Array(await t.arrayBuffer()),sealedAt:null}}catch(e){if(e?.name!==`NotFoundError`)throw e}return a._(e,{pin:n})},xe=async(e,t,n)=>{let r=n?.pin??a.s(),i=n?.contentType,o=i?{contentType:i}:void 0,c=t instanceof Blob?t:new Blob([t],o?{type:o.contentType}:void 0);if(await d()){await s.o(e,c,o),U();let t=h(e,r),n=await f();if(n===`disconnected`)return;if(n===`unknown`||!m){b(e,t,r),A();return}a.b(e,c,{...o,pin:r}).then(()=>x(e)).catch(n=>{b(e,t,r),a.l(n)||A(),console.warn(`fs: cloud replicate failed, queued for adopt()`,n)});return}let l=await f();if(l===`connected`)return a.b(e,c,{...o,pin:r});throw Error(l===`unknown`?`fs: cloud unreachable`:`fs: no storage backend available`)},Se=async(e,t)=>{let n=t?.pin??a.s();U();let r=[];await d()&&r.push(s.a(e).catch(()=>{}));let i=await f();if(i===`connected`?r.push(a.v(e,{pin:n}).then(()=>S(e)).catch(t=>{de(e,n),a.l(t)||A(),console.warn(`fs: cloud delete failed, queued for retry`,t)})):i===`unknown`&&r.length&&h(e,n)!==null&&(de(e,n),A()),!r.length)throw Error(i===`unknown`?`fs: cloud unreachable`:`fs: no storage backend available`);x(e),await Promise.all(r)},N=async e=>{let t=a.s(),n=await a.g(e,{pin:t});return await d()&&await s.o(e,n),n},P=null,Ce=e=>(P=e,()=>{P===e&&(P=null)}),we=async e=>{let n=await(await t.o).cloud.fs.promptConflict({path:e.path,local:e.local,cloud:e.cloud}).catch(()=>null);return n===`local`?e.readLocal():n===`cloud`?e.readCloud():null},Te=async e=>{if(P)try{return await P(e)}catch{return null}return we(e)},F=class extends Error{},I=e=>e instanceof Error?e.message:String(e),Ee=()=>{let e=new Map,t=t=>{let n=e.get(t);return n||e.set(t,n={writes:new Map,deletes:new Map}),n};for(let[e,n]of Object.entries(_(`write`)))t(n.pin).writes.set(e,n.base);for(let[e,n]of Object.entries(_(`delete`)))t(n.pin).deletes.set(e,n.base);return e},De=async()=>{for(let[e,t]of[...y]){let n=e.startsWith(`write:`)?`write`:`delete`,r=e.slice(n.length+1),i;try{i=await a.m(t)}catch(t){a.l(t)&&y.delete(e);continue}if(y.get(e)!==t)continue;y.delete(e);let o=_(n),s=o[r];s&&s.pin===null&&(o[r]={base:s.base,pin:i},v(n,o))}},Oe=async(e,t,n,r,i,o)=>{let c=new Map(t.map(e=>[e.path,e])),l=e=>{if(a.l(e))throw new F};for(let[t,o]of e.deletes){let e=c.get(t);if(!e){S(t);continue}if(r.some(e=>e.path===t)){S(t);continue}if(e.updatedAt!==o){S(t);continue}try{await a.v(t,n),S(t),i.deleted.push(t)}catch(e){l(e),i.failed.push({path:t,error:I(e)})}}for(let t of r){let r=c.get(t.path),u=e.writes.has(t.path);if(!u){if(!o(t))continue;if(r){i.kept.push(t.path);continue}}let d=e.writes.get(t.path)??null;if(u&&r&&r.updatedAt!==d){let e=null,o=null,c=await Te({path:t.path,local:{size:t.size,updatedAt:t.updatedAt},cloud:{size:r.size,updatedAt:r.updatedAt},readLocal:()=>e??=s.i(t.path),readCloud:()=>o??=a.g(t.path,n)});if(c==null){i.unresolved.push(t.path);continue}try{let r=e!==null&&c===await e,l=o!==null&&c===await o;l||await a.b(t.path,c,t.contentType?{contentType:t.contentType,...n}:n),r||await s.o(t.path,c),x(t.path),i.resolved.push({path:t.path,choice:r?`local`:l?`cloud`:`merged`})}catch(e){if(l(e),e?.code===`FKN_E2E_LOCKED`)throw e;i.failed.push({path:t.path,error:I(e)})}continue}try{let e=await s.i(t.path);await a.b(t.path,e,t.contentType?{contentType:t.contentType,...n}:n),x(t.path),i.uploaded.push(t.path)}catch(e){if(u||b(t.path,r?.updatedAt??null,n.pin),l(e),e?.code===`FKN_E2E_LOCKED`)throw e;i.failed.push({path:t.path,error:I(e)})}}},ke=async(e,t)=>{let n={uploaded:[],kept:[],resolved:[],unresolved:[],deleted:[],failed:[]},r=await f();if(r===`unknown`)throw Error(`fs: cloud unreachable`);if(r!==`connected`)throw Error(`fs: this needs a signed-in account`);let i=await d(),o=i?await s.n():[];if(i)for(let e of Object.keys(_(`write`)))o.some(t=>t.path===e)||x(e);await De();for(let[e,r]of Ee()){if(e===null||he(e))continue;let i={pin:{pin:e}},s;try{s=await a.p(i)}catch(n){if(a.l(n)){C.set(e,t.generation);continue}if(a.u(n)){Ae(e);continue}throw n}try{await Oe(r,s,i,o,n,()=>!1)}catch(n){if(!(n instanceof F))throw n;C.set(e,t.generation)}}if(e){let e={pin:t},r=await a.p(e),i=_(`write`),s=Ee().get(null)??{writes:new Map,deletes:new Map},c=new Set([...n.uploaded,...n.resolved.map(({path:e})=>e),...n.unresolved,...n.failed.map(({path:e})=>e)]),l=e=>!(e.path in i)&&!c.has(e.path);try{await Oe(s,r,e,o,n,l)}catch(e){throw e instanceof F?new a.t:e}}return n},Ae=e=>{for(let t of[`write`,`delete`]){let n=_(t),r=!1;for(let t of Object.values(n))t.pin===e&&(t.pin=null,r=!0);r&&v(t,n)}},je=async e=>{for(;w;)await w;let t=ke(!0,e);w=t.then(()=>{},()=>{});try{return await t}finally{w=null,ve()}},L=()=>je(a.s()),R=(e,t)=>{let n=new Set(t.map(e=>e.path)),r=_(`write`);return e.filter(e=>{let t=r[e.path];return t?ge(`write`,e.path,t):!n.has(e.path)})},z=async()=>{let e=a.s();if(!await p()||!await d())return{paths:[],bytes:0};let[t,n]=await Promise.all([s.n(),a.p({pin:e})]),r=R(t,n);return{paths:r.map(e=>e.path),bytes:r.reduce((e,t)=>e+t.size,0)}},Me=()=>new Set(Object.keys(se())),Ne=e=>{let t=se();for(let n of e)t[n]=null;try{localStorage.setItem(re,JSON.stringify(t))}catch{}},B=null,V=!1,H=e=>{if(B)return V=!0,B;let n=e?.from??a.s();return B=(async()=>{if(!await p())return;let r=e??(await d()?{local:await s.n(),remote:await a.p({pin:n})}:null);if(!r)return;let i=Me(),o=R(r.local,r.remote).filter(e=>!i.has(e.path));if(!o.length)return;let c=await t.o,l=o.reduce((e,t)=>e+t.size,0);if(!await c.cloud.fs.promptAdopt({files:o.length,bytes:l}).catch(()=>!1)){Ne(o.map(e=>e.path));return}`generation`in n&&await je(n)})().catch(()=>{}).finally(()=>{B=null,V&&(V=!1,H())}),B},Pe=null,Fe=!1,Ie=async(e,n)=>{let r=R(e,n),i=await t.o,a=async()=>{await L().catch(()=>{});let e=await z().catch(()=>({paths:[],bytes:0}));await i.cloud.fs.setAdoptSource({files:e.paths.length,bytes:e.bytes},a).catch(()=>{})},o={files:r.length,bytes:r.reduce((e,t)=>e+t.size,0)};Pe=()=>{i.cloud.fs.setAdoptSource(o,a).catch(()=>{})},Fe||(Fe=!0,t.u((e,t)=>{t>1&&Pe?.()})),await i.cloud.fs.setAdoptSource(o,a)},Le=!1,U=()=>{Le||typeof window>`u`||(Le=!0,window.addEventListener(`online`,()=>{j()}),o.onChange(()=>{H().catch(()=>{}),j()}).catch(()=>{}))},Re=e.t({STORAGE_ACCOUNT_CHANGED:()=>i.STORAGE_ACCOUNT_CHANGED,STORAGE_ACCOUNT_PIN_UNSUPPORTED:()=>i.STORAGE_ACCOUNT_PIN_UNSUPPORTED,StorageAccountChangedError:()=>a.t,StorageAccountPinUnsupportedError:()=>a.n,adopt:()=>q,adoptable:()=>J,appendFile:()=>tt,appendFileSync:()=>Ue,available:()=>Be,default:()=>$,exists:()=>ct,existsSync:()=>We,flush:()=>W,isAccountChanged:()=>a.l,lstatSync:()=>Ke,mkdir:()=>it,mkdirSync:()=>Je,mount:()=>ut,onConflict:()=>Q,pending:()=>Y,pendingDeletes:()=>X,promises:()=>lt,pull:()=>G,readFile:()=>$e,readFileSealed:()=>K,readFileSync:()=>Ve,readdir:()=>rt,readdirSync:()=>qe,remount:()=>dt,rename:()=>st,renameSync:()=>Qe,replicating:()=>Z,rm:()=>at,rmSync:()=>Ye,rmdirSync:()=>Xe,stat:()=>nt,statSync:()=>Ge,unlink:()=>ot,unlinkSync:()=>Ze,writeFile:()=>et,writeFileSync:()=>He}),ze=r.t(c,{memfs:!0}),{available:Be,readFileSync:Ve,writeFileSync:He,appendFileSync:Ue,existsSync:We,statSync:Ge,lstatSync:Ke,readdirSync:qe,mkdirSync:Je,rmSync:Ye,rmdirSync:Xe,unlinkSync:Ze,renameSync:Qe,readFile:$e,writeFile:et,appendFile:tt,stat:nt,readdir:rt,mkdir:it,rm:at,unlink:ot,rename:st,exists:ct,promises:lt,mount:ut,flush:W,remount:dt}=ze,G=N,K=M,q=L,J=z,Y=fe,X=pe,Z=me,Q=Ce,$={...ze,pull:G,readFileSealed:K,adopt:q,adoptable:J,pending:Y,pendingDeletes:X,replicating:Z,onConflict:Q};Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return rt}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return Qe}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return st}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return et}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return He}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return nt}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return ot}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return $e}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return Ke}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return it}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return Ue}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return Xe}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return at}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return ut}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return ct}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return Je}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return tt}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return We}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return lt}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return qe}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return G}});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { o as t, u as n } from "./api-
|
|
2
|
+
import { o as t, u as n } from "./api-C-N5AVos.js";
|
|
3
3
|
import { i as r } from "./busy-DsMWrSzc.js";
|
|
4
4
|
import { t as i } from "./node-fs-DY2fO5zd.js";
|
|
5
5
|
import { STORAGE_ACCOUNT_CHANGED as a, STORAGE_ACCOUNT_PIN_UNSUPPORTED as o } from "./messages.js";
|
|
6
|
-
import { _ as s, b as c, f as l, g as u, l as d, m as ee, n as te, o as ne, p as f, s as p, t as re, u as ie, v as ae } from "./account-storage-
|
|
6
|
+
import { _ as s, b as c, f as l, g as u, l as d, m as ee, n as te, o as ne, p as f, s as p, t as re, u as ie, v as ae } from "./account-storage-Cmzz-67T.js";
|
|
7
7
|
import { onChange as oe } from "./account.js";
|
|
8
8
|
import { a as se, i as m, n as h, o as g, t as ce } from "./opfs-D0goLAQW.js";
|
|
9
9
|
//#region src/fs/hybrid.ts
|
package/fs.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./messages.cjs"),t=require("./account-storage-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./messages.cjs"),t=require("./account-storage-CPTct4Vz.cjs"),n=require("./fs-BlRxCJQW.cjs");exports.STORAGE_ACCOUNT_CHANGED=e.STORAGE_ACCOUNT_CHANGED,exports.STORAGE_ACCOUNT_PIN_UNSUPPORTED=e.STORAGE_ACCOUNT_PIN_UNSUPPORTED,exports.StorageAccountChangedError=t.t,exports.StorageAccountPinUnsupportedError=t.n,exports.adopt=n.t,exports.adoptable=n.n,exports.appendFile=n.r,exports.appendFileSync=n.i,exports.available=n.a,exports.default=n.l,exports.exists=n.o,exports.existsSync=n.s,exports.flush=n.c,exports.isAccountChanged=t.l,exports.lstatSync=n.d,exports.mkdir=n.f,exports.mkdirSync=n.p,exports.mount=n.m,exports.onConflict=n.h,exports.pending=n.g,exports.pendingDeletes=n._,exports.promises=n.v,exports.pull=n.y,exports.readFile=n.b,exports.readFileSealed=n.x,exports.readFileSync=n.S,exports.readdir=n.C,exports.readdirSync=n.w,exports.remount=n.T,exports.rename=n.E,exports.renameSync=n.D,exports.replicating=n.O,exports.rm=n.k,exports.rmSync=n.A,exports.rmdirSync=n.j,exports.stat=n.M,exports.statSync=n.N,exports.unlink=n.P,exports.unlinkSync=n.F,exports.writeFile=n.I,exports.writeFileSync=n.L;
|
package/fs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { STORAGE_ACCOUNT_CHANGED as e, STORAGE_ACCOUNT_PIN_UNSUPPORTED as t } from "./messages.js";
|
|
2
|
-
import { l as n, n as r, t as i } from "./account-storage-
|
|
3
|
-
import { A as a, C as o, D as s, E as c, F as l, I as u, L as d, M as f, N as p, O as m, P as h, S as g, T as _, _ as v, a as y, b, c as x, d as S, f as C, g as w, h as T, i as E, j as D, k as O, l as k, m as A, n as j, o as M, p as N, r as P, s as F, t as I, v as L, w as R, x as z, y as B } from "./fs-
|
|
2
|
+
import { l as n, n as r, t as i } from "./account-storage-Cmzz-67T.js";
|
|
3
|
+
import { A as a, C as o, D as s, E as c, F as l, I as u, L as d, M as f, N as p, O as m, P as h, S as g, T as _, _ as v, a as y, b, c as x, d as S, f as C, g as w, h as T, i as E, j as D, k as O, l as k, m as A, n as j, o as M, p as N, r as P, s as F, t as I, v as L, w as R, x as z, y as B } from "./fs-C_RmxWk9.js";
|
|
4
4
|
export { e as STORAGE_ACCOUNT_CHANGED, t as STORAGE_ACCOUNT_PIN_UNSUPPORTED, i as StorageAccountChangedError, r as StorageAccountPinUnsupportedError, I as adopt, j as adoptable, P as appendFile, E as appendFileSync, y as available, k as default, M as exists, F as existsSync, x as flush, n as isAccountChanged, S as lstatSync, C as mkdir, N as mkdirSync, A as mount, T as onConflict, w as pending, v as pendingDeletes, L as promises, B as pull, b as readFile, z as readFileSealed, g as readFileSync, o as readdir, R as readdirSync, _ as remount, c as rename, s as renameSync, m as replicating, O as rm, a as rmSync, D as rmdirSync, f as stat, p as statSync, h as unlink, l as unlinkSync, u as writeFile, d as writeFileSync };
|