@fkn/lib 0.9.36 → 0.9.38
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/{api-CaFuvyyV.d.ts → api-DF4nHz2Q.d.ts} +7 -7
- package/api.d.ts +2 -2
- package/attach-policy.cjs +1 -1
- package/attach-policy.js +1 -1
- package/cloud/dns.d.ts +1 -1
- package/cloud/fetch.d.ts +1 -1
- package/cloud/net.d.ts +1 -1
- package/cloud-Beg4iCRU.cjs +1 -0
- package/{cloud-Cqdq7Ujd.d.ts → cloud-Bfc6rkF2.d.ts} +3 -3
- package/cloud-EfyYfgVT.js +476 -0
- package/cloud.cjs +1 -1
- package/cloud.d.ts +3 -3
- package/cloud.js +1 -1
- package/{contract-BIHGp6cz.d.ts → contract-InuLU8bI.d.ts} +85 -7
- package/contract.cjs +1 -1
- package/contract.d.ts +2 -2
- package/contract.js +6 -6
- package/dgram.d.ts +2 -2
- package/dns.d.ts +1 -1
- package/extension-B7jDaJVp.cjs +1 -0
- package/{extension-C9BRlqEY.d.ts → extension-Bm5x5R4R.d.ts} +2 -2
- package/extension-sNRjVbET.js +89 -0
- package/extension.cjs +1 -1
- package/extension.d.ts +3 -3
- package/extension.js +3 -3
- package/hosts-9dYv63ud.cjs +1 -0
- package/{hosts-77UAJbm1.js → hosts-BzbzOhG8.js} +31 -19
- package/http.d.ts +1 -1
- package/{index-BWJSnpRB.d.ts → index-DiOxvYoa.d.ts} +170 -1
- package/index.cjs +1 -1
- package/index.d.ts +5 -5
- package/index.js +12 -12
- package/lib-DYKLnpWs.cjs +53 -0
- package/{lib-hd9k5xOX.js → lib-FD1Ssqjt.js} +461 -332
- package/{net-BWFTx3k_.d.ts → net-DnXxFGm8.d.ts} +2 -2
- package/net.d.ts +1 -1
- package/package.json +1 -1
- package/packages.d.ts +1 -1
- package/{proxy-DaljzPSa.d.ts → proxy-BkaVTZAf.d.ts} +2 -2
- package/rooms.cjs +1 -1
- package/rooms.d.ts +26 -8
- package/rooms.js +9 -1
- package/cloud-CDRoRstb.js +0 -428
- package/cloud-DG_-Rt-L.cjs +0 -1
- package/extension-DisWHU7m.cjs +0 -1
- package/extension-jDvl0U_P.js +0 -89
- package/hosts-COiOMjp-.cjs +0 -1
- package/lib-DCPdYk-N.cjs +0 -53
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as SelectorPart, v as GotoOptions } from "./index-DiOxvYoa.js";
|
|
2
2
|
import { o as TcpSocketOption, v as UdpSocketOption } from "./wire-Gbo-D74t.js";
|
|
3
3
|
//#region src/contract.d.ts
|
|
4
4
|
/** The signed-in account, or null when nobody is. */
|
|
@@ -96,6 +96,50 @@ declare const ATTACH_WINDOW_KEY = "fkn-attach-window";
|
|
|
96
96
|
declare const SHELL_CONTROL_KEY = "sdbx-control";
|
|
97
97
|
/** Posted by a shell that could not start, `{ type, message }`, to the middle page framing it. */
|
|
98
98
|
declare const SHELL_ATTACH_ERROR = "sdbx-attach-error";
|
|
99
|
+
/**
|
|
100
|
+
* Posted by a middle page to its app for the Frame's listeners (`FrameMessageRelay`), with the page's
|
|
101
|
+
* ports as the transfer list. Only for a document inside the attachment, and a `message` only when the
|
|
102
|
+
* page addressed it to the app's own origin.
|
|
103
|
+
*/
|
|
104
|
+
declare const FRAME_MESSAGE = "fkn-frame-message";
|
|
105
|
+
/**
|
|
106
|
+
* Posted by the render proxy shell to its middle page (`ShellFrameMessage`), with the page's ports as
|
|
107
|
+
* the transfer list: what the page posted to an origin not its own, and each document's arrival. The
|
|
108
|
+
* shell does not know the app, so the middle page decides what reaches it.
|
|
109
|
+
*/
|
|
110
|
+
declare const SHELL_FRAME_MESSAGE = "sdbx-frame-message";
|
|
111
|
+
/**
|
|
112
|
+
* `origin` is the page's origin as the site knows it, which the shell derives from the browser-set
|
|
113
|
+
* origin of the page's own post, never from anything the page wrote.
|
|
114
|
+
*/
|
|
115
|
+
type FrameMessageRelay = {
|
|
116
|
+
type: typeof FRAME_MESSAGE;
|
|
117
|
+
attach: string;
|
|
118
|
+
kind: 'message';
|
|
119
|
+
origin: string;
|
|
120
|
+
data: unknown;
|
|
121
|
+
} | {
|
|
122
|
+
type: typeof FRAME_MESSAGE;
|
|
123
|
+
attach: string;
|
|
124
|
+
kind: 'document';
|
|
125
|
+
origin: string;
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* `targetOrigin` is the page's own, normalized: what it addressed the message to. `transfer` is what
|
|
129
|
+
* the page moved with it, also the post's transfer list, for the middle page to move on.
|
|
130
|
+
*/
|
|
131
|
+
type ShellFrameMessage = {
|
|
132
|
+
type: typeof SHELL_FRAME_MESSAGE;
|
|
133
|
+
kind: 'message';
|
|
134
|
+
origin: string;
|
|
135
|
+
targetOrigin: string;
|
|
136
|
+
data: unknown;
|
|
137
|
+
transfer: Transferable[];
|
|
138
|
+
} | {
|
|
139
|
+
type: typeof SHELL_FRAME_MESSAGE;
|
|
140
|
+
kind: 'document';
|
|
141
|
+
origin: string;
|
|
142
|
+
};
|
|
99
143
|
/** What an app and its window post to each other, every message carrying the attach id. */
|
|
100
144
|
declare const ATTACH_WINDOW_MESSAGE: {
|
|
101
145
|
/** app to window, repeated until the channel connects */
|
|
@@ -196,7 +240,18 @@ type MiddleControl = {
|
|
|
196
240
|
timeoutMs?: number;
|
|
197
241
|
}): Promise<void>;
|
|
198
242
|
executeLocator(parts: SelectorPart[], operation: string, args: unknown[]): Promise<unknown>;
|
|
243
|
+
/**
|
|
244
|
+
* The host of the document the frame holds now, as the render proxy last reported it, and `''`
|
|
245
|
+
* before the first one. A document outside the attachment boundary answers `'#outside'`, which is
|
|
246
|
+
* no hostname: the library refuses on it with its boundary message and never learns where the
|
|
247
|
+
* frame went. The middle page's own gate keeps checking the real host.
|
|
248
|
+
*/
|
|
199
249
|
documentHost?(): Promise<string>;
|
|
250
|
+
/**
|
|
251
|
+
* Present on a middle page that gates `postMessage` and relays the page's messages
|
|
252
|
+
* (`FRAME_MESSAGE`). Absent from one deployed before messaging, which the library refuses by name.
|
|
253
|
+
*/
|
|
254
|
+
messaging?(): Promise<true>;
|
|
200
255
|
};
|
|
201
256
|
/** What a window's middle page adds to its channel. */
|
|
202
257
|
type WindowMiddleControl = MiddleControl & {
|
|
@@ -351,7 +406,10 @@ type RoomMessage = {
|
|
|
351
406
|
at: number;
|
|
352
407
|
text: string;
|
|
353
408
|
};
|
|
354
|
-
/**
|
|
409
|
+
/**
|
|
410
|
+
* What a claimed room's mailbox holds, as the room last said. Null for a room nobody has claimed.
|
|
411
|
+
* `cap` is the most it stores: 500 MB, or the size limit the account set in its fkn.app settings.
|
|
412
|
+
*/
|
|
355
413
|
type RoomMailbox = {
|
|
356
414
|
messages: number;
|
|
357
415
|
bytes: number;
|
|
@@ -367,7 +425,9 @@ type RoomEvent =
|
|
|
367
425
|
} | {
|
|
368
426
|
type: 'edited';
|
|
369
427
|
message: RoomMessage;
|
|
370
|
-
} |
|
|
428
|
+
} |
|
|
429
|
+
/** stored messages dropped: by a member, or all of them when the account clears the room in its fkn.app settings */
|
|
430
|
+
{
|
|
371
431
|
type: 'deleted';
|
|
372
432
|
from: number;
|
|
373
433
|
to: number;
|
|
@@ -387,7 +447,10 @@ type RoomEvent =
|
|
|
387
447
|
type: 'defaults';
|
|
388
448
|
defaults: RoomDefaults;
|
|
389
449
|
} |
|
|
390
|
-
/**
|
|
450
|
+
/**
|
|
451
|
+
* the room was claimed, released (by its app, or by the account in its fkn.app settings) or
|
|
452
|
+
* dissolved; `owner` is the owner's member id, or '' while a claimed room's owner has never joined
|
|
453
|
+
*/
|
|
391
454
|
{
|
|
392
455
|
type: 'claim';
|
|
393
456
|
claimed: boolean;
|
|
@@ -416,6 +479,18 @@ type RoomCreateOptions = RoomOpenOptions;
|
|
|
416
479
|
type RoomJoinOptions = {
|
|
417
480
|
signal?: AbortSignal;
|
|
418
481
|
};
|
|
482
|
+
/** What a claim carries besides the name. */
|
|
483
|
+
type RoomClaimOptions = {
|
|
484
|
+
/**
|
|
485
|
+
* What the room is for, in the app's own words. The account reads it beside the room in its fkn.app
|
|
486
|
+
* settings, where it can clear or unclaim the room, so say what would be lost. One line of plain text:
|
|
487
|
+
* trimmed, then 1 to 200 characters as `String.length` counts them, with no control character, line or
|
|
488
|
+
* paragraph separator, or bidi control; anything else is refused `invalid`, never cut short. Not sealed:
|
|
489
|
+
* stored with the claim and shown to the account only. Claiming again with one replaces it, from the app
|
|
490
|
+
* that claimed the room only (the same app once it is verified); claiming without one keeps it.
|
|
491
|
+
*/
|
|
492
|
+
description?: string;
|
|
493
|
+
};
|
|
419
494
|
/** What a backlog page answered: the highest seq it sent, and whether another page follows. */
|
|
420
495
|
type RoomBacklog = {
|
|
421
496
|
last: number;
|
|
@@ -478,8 +553,11 @@ type RoomHandle = {
|
|
|
478
553
|
unblock: (id: string) => Promise<RoomsFail | {
|
|
479
554
|
ok: true;
|
|
480
555
|
}>;
|
|
481
|
-
/**
|
|
482
|
-
|
|
556
|
+
/**
|
|
557
|
+
* keeps the name and a mailbox for the signed-in premium account; the only thing in rooms that premium
|
|
558
|
+
* buys. `description` says what the room is for, shown to the account in its fkn.app settings.
|
|
559
|
+
*/
|
|
560
|
+
claim: (options?: RoomClaimOptions) => Promise<RoomsFail | {
|
|
483
561
|
ok: true;
|
|
484
562
|
}>;
|
|
485
563
|
release: () => Promise<RoomsFail | {
|
|
@@ -744,4 +822,4 @@ type Resolvers = {
|
|
|
744
822
|
hideInstallPrompt: () => void;
|
|
745
823
|
};
|
|
746
824
|
//#endregion
|
|
747
|
-
export {
|
|
825
|
+
export { RoomMessage as $, OverlayState as A, Quota as B, InstallOptions as C, UdpSocketOptions as Ct, MiddleControl as D, WINDOW_JAR_MODE_TIMEOUT_MS as Dt, JAR_ANCHOR_MESSAGE as E, WINDOW_HELLO_TIMEOUT_MS as Et, PickOptions as F, RoomCreateOptions as G, Resolvers as H, Placement as I, RoomEvent as J, RoomDefaults as K, ProxyFetch as L, PackageResult as M, PackagesErrorCode as N, MountDescriptor as O, WindowMiddleControl as Ot, PackagesFail as P, RoomMember as Q, ProxyFetchInit as R, HiddenSurface as S, UdpDatagram as St, IpFamily as T, WINDOW_HANDSHAKE_TIMEOUT_MS as Tt, RoomBacklog as U, Radii as V, RoomClaimOptions as W, RoomJoinOptions as X, RoomHandle as Y, RoomMailbox as Z, FRAME_MESSAGE as _, SurfaceRect as _t, AddressLookupResult as a, SHELL_ATTACH_ERROR as at, FrameFetchScope as b, TcpSocketOptions as bt, ConflictChoice as c, SHELL_JAR_MESSAGE as ct, ConnectAvailability as d, ShellControl as dt, RoomOpenOptions as et, ConnectOptions as f, ShellFrameMessage as ft, EncryptionState as g, StorageQuota as gt, DnsLookup as h, StorageEntry as ht, Account as i, RoomsFail as it, PackageQuery as j, OverlayRect as k, WriteData as kt, ConflictRequest as l, SHELL_JAR_UNREACHABLE as lt, DisplayLevel as m, ShellJarUnreachable as mt, ATTACH_WINDOW_KEY as n, RoomPermissions as nt, AdoptRequest as o, SHELL_CONTROL_KEY as ot, DisplayCause as p, ShellGotoOptions as pt, RoomEnd as q, ATTACH_WINDOW_MESSAGE as r, RoomsErrorCode as rt, AdoptState as s, SHELL_FRAME_MESSAGE as st, ATTACH_FRAME_KEY as t, RoomPermission as tt, ConflictSide as u, SetOverlayHost as ut, FrameConsentAnswer as v, TcpSocketListenerOptions as vt, InstalledPackage as w, UdpSocketResult as wt, FrameMessageRelay as x, TcpSocketResult as xt, FrameConsentRequest as y, TcpSocketListenerResult as yt, ProxyFetchInput as z };
|
package/contract.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`fkn-attach-frame`,t=`fkn-attach-window`,n=`sdbx-control`,r=`sdbx-attach-error`,i={hello:`fkn-attach-window`,refused:`fkn-attach-window-refused`,gone:`fkn-attach-window-gone`,detach:`fkn-attach-window-detach`},
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`fkn-attach-frame`,t=`fkn-attach-window`,n=`sdbx-control`,r=`sdbx-attach-error`,i=`fkn-frame-message`,a=`sdbx-frame-message`,o={hello:`fkn-attach-window`,refused:`fkn-attach-window-refused`,gone:`fkn-attach-window-gone`,detach:`fkn-attach-window-detach`},s={request:`sdbx-jar-request`,port:`sdbx-jar-port`,mode:`sdbx-jar-mode`},c=[`bad-attach`,`no-storage`,`bad-jar`,`no-parent`,`no-jar-host`,`no-token`,`no-indexeddb`,`failed`],l={hello:`fkn-jar-hello`,ready:`fkn-jar-ready`,port:`fkn-jar-port`,who:`fkn-jar-who`,host:`fkn-jar-host`},u=2e4,d=3e4,f=6e4;exports.ATTACH_FRAME_KEY=e,exports.ATTACH_WINDOW_KEY=t,exports.ATTACH_WINDOW_MESSAGE=o,exports.FRAME_MESSAGE=i,exports.JAR_ANCHOR_MESSAGE=l,exports.SHELL_ATTACH_ERROR=r,exports.SHELL_CONTROL_KEY=n,exports.SHELL_FRAME_MESSAGE=a,exports.SHELL_JAR_MESSAGE=s,exports.SHELL_JAR_UNREACHABLE=c,exports.WINDOW_HANDSHAKE_TIMEOUT_MS=f,exports.WINDOW_HELLO_TIMEOUT_MS=u,exports.WINDOW_JAR_MODE_TIMEOUT_MS=d;
|
package/contract.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { o as TcpSocketOption, v as UdpSocketOption } from "./wire-Gbo-D74t.js";
|
|
2
|
-
import { $ as
|
|
3
|
-
export { ATTACH_FRAME_KEY, ATTACH_WINDOW_KEY, ATTACH_WINDOW_MESSAGE, Account, AddressLookupResult, AdoptRequest, AdoptState, ConflictChoice, ConflictRequest, ConflictSide, ConnectAvailability, ConnectOptions, DisplayCause, DisplayLevel, DnsLookup, EncryptionState, FrameConsentAnswer, FrameConsentRequest, FrameFetchScope, HiddenSurface, InstallOptions, InstalledPackage, IpFamily, JAR_ANCHOR_MESSAGE, MiddleControl, MountDescriptor, OverlayRect, OverlayState, PackageQuery, PackageResult, PackagesErrorCode, PackagesFail, PickOptions, Placement, ProxyFetch, ProxyFetchInit, ProxyFetchInput, Quota, Radii, Resolvers, RoomBacklog, RoomCreateOptions, RoomDefaults, RoomEnd, RoomEvent, RoomHandle, RoomJoinOptions, RoomMailbox, RoomMember, RoomMessage, RoomOpenOptions, RoomPermission, RoomPermissions, RoomsErrorCode, RoomsFail, SHELL_ATTACH_ERROR, SHELL_CONTROL_KEY, SHELL_JAR_MESSAGE, SHELL_JAR_UNREACHABLE, SetOverlayHost, ShellControl, ShellGotoOptions, ShellJarUnreachable, StorageEntry, StorageQuota, SurfaceRect, TcpSocketListenerOptions, TcpSocketListenerResult, type TcpSocketOption, TcpSocketOptions, TcpSocketResult, UdpDatagram, type UdpSocketOption, UdpSocketOptions, UdpSocketResult, WINDOW_HANDSHAKE_TIMEOUT_MS, WINDOW_HELLO_TIMEOUT_MS, WINDOW_JAR_MODE_TIMEOUT_MS, WindowMiddleControl, WriteData };
|
|
2
|
+
import { $ as RoomMessage, A as OverlayState, B as Quota, C as InstallOptions, Ct as UdpSocketOptions, D as MiddleControl, Dt as WINDOW_JAR_MODE_TIMEOUT_MS, E as JAR_ANCHOR_MESSAGE, Et as WINDOW_HELLO_TIMEOUT_MS, F as PickOptions, G as RoomCreateOptions, H as Resolvers, I as Placement, J as RoomEvent, K as RoomDefaults, L as ProxyFetch, M as PackageResult, N as PackagesErrorCode, O as MountDescriptor, Ot as WindowMiddleControl, P as PackagesFail, Q as RoomMember, R as ProxyFetchInit, S as HiddenSurface, St as UdpDatagram, T as IpFamily, Tt as WINDOW_HANDSHAKE_TIMEOUT_MS, U as RoomBacklog, V as Radii, W as RoomClaimOptions, X as RoomJoinOptions, Y as RoomHandle, Z as RoomMailbox, _ as FRAME_MESSAGE, _t as SurfaceRect, a as AddressLookupResult, at as SHELL_ATTACH_ERROR, b as FrameFetchScope, bt as TcpSocketOptions, c as ConflictChoice, ct as SHELL_JAR_MESSAGE, d as ConnectAvailability, dt as ShellControl, et as RoomOpenOptions, f as ConnectOptions, ft as ShellFrameMessage, g as EncryptionState, gt as StorageQuota, h as DnsLookup, ht as StorageEntry, i as Account, it as RoomsFail, j as PackageQuery, k as OverlayRect, kt as WriteData, l as ConflictRequest, lt as SHELL_JAR_UNREACHABLE, m as DisplayLevel, mt as ShellJarUnreachable, n as ATTACH_WINDOW_KEY, nt as RoomPermissions, o as AdoptRequest, ot as SHELL_CONTROL_KEY, p as DisplayCause, pt as ShellGotoOptions, q as RoomEnd, r as ATTACH_WINDOW_MESSAGE, rt as RoomsErrorCode, s as AdoptState, st as SHELL_FRAME_MESSAGE, t as ATTACH_FRAME_KEY, tt as RoomPermission, u as ConflictSide, ut as SetOverlayHost, v as FrameConsentAnswer, vt as TcpSocketListenerOptions, w as InstalledPackage, wt as UdpSocketResult, x as FrameMessageRelay, xt as TcpSocketResult, y as FrameConsentRequest, yt as TcpSocketListenerResult, z as ProxyFetchInput } from "./contract-InuLU8bI.js";
|
|
3
|
+
export { ATTACH_FRAME_KEY, ATTACH_WINDOW_KEY, ATTACH_WINDOW_MESSAGE, Account, AddressLookupResult, AdoptRequest, AdoptState, ConflictChoice, ConflictRequest, ConflictSide, ConnectAvailability, ConnectOptions, DisplayCause, DisplayLevel, DnsLookup, EncryptionState, FRAME_MESSAGE, FrameConsentAnswer, FrameConsentRequest, FrameFetchScope, FrameMessageRelay, HiddenSurface, InstallOptions, InstalledPackage, IpFamily, JAR_ANCHOR_MESSAGE, MiddleControl, MountDescriptor, OverlayRect, OverlayState, PackageQuery, PackageResult, PackagesErrorCode, PackagesFail, PickOptions, Placement, ProxyFetch, ProxyFetchInit, ProxyFetchInput, Quota, Radii, Resolvers, RoomBacklog, RoomClaimOptions, RoomCreateOptions, RoomDefaults, RoomEnd, RoomEvent, RoomHandle, RoomJoinOptions, RoomMailbox, RoomMember, RoomMessage, RoomOpenOptions, RoomPermission, RoomPermissions, RoomsErrorCode, RoomsFail, SHELL_ATTACH_ERROR, SHELL_CONTROL_KEY, SHELL_FRAME_MESSAGE, SHELL_JAR_MESSAGE, SHELL_JAR_UNREACHABLE, SetOverlayHost, ShellControl, ShellFrameMessage, ShellGotoOptions, ShellJarUnreachable, StorageEntry, StorageQuota, SurfaceRect, TcpSocketListenerOptions, TcpSocketListenerResult, type TcpSocketOption, TcpSocketOptions, TcpSocketResult, UdpDatagram, type UdpSocketOption, UdpSocketOptions, UdpSocketResult, WINDOW_HANDSHAKE_TIMEOUT_MS, WINDOW_HELLO_TIMEOUT_MS, WINDOW_JAR_MODE_TIMEOUT_MS, WindowMiddleControl, WriteData };
|
package/contract.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
//#region src/contract.ts
|
|
2
|
-
var e = "fkn-attach-frame", t = "fkn-attach-window", n = "sdbx-control", r = "sdbx-attach-error", i = {
|
|
2
|
+
var e = "fkn-attach-frame", t = "fkn-attach-window", n = "sdbx-control", r = "sdbx-attach-error", i = "fkn-frame-message", a = "sdbx-frame-message", o = {
|
|
3
3
|
hello: "fkn-attach-window",
|
|
4
4
|
refused: "fkn-attach-window-refused",
|
|
5
5
|
gone: "fkn-attach-window-gone",
|
|
6
6
|
detach: "fkn-attach-window-detach"
|
|
7
|
-
},
|
|
7
|
+
}, s = {
|
|
8
8
|
request: "sdbx-jar-request",
|
|
9
9
|
port: "sdbx-jar-port",
|
|
10
10
|
mode: "sdbx-jar-mode"
|
|
11
|
-
},
|
|
11
|
+
}, c = [
|
|
12
12
|
"bad-attach",
|
|
13
13
|
"no-storage",
|
|
14
14
|
"bad-jar",
|
|
@@ -17,12 +17,12 @@ var e = "fkn-attach-frame", t = "fkn-attach-window", n = "sdbx-control", r = "sd
|
|
|
17
17
|
"no-token",
|
|
18
18
|
"no-indexeddb",
|
|
19
19
|
"failed"
|
|
20
|
-
],
|
|
20
|
+
], l = {
|
|
21
21
|
hello: "fkn-jar-hello",
|
|
22
22
|
ready: "fkn-jar-ready",
|
|
23
23
|
port: "fkn-jar-port",
|
|
24
24
|
who: "fkn-jar-who",
|
|
25
25
|
host: "fkn-jar-host"
|
|
26
|
-
},
|
|
26
|
+
}, u = 2e4, d = 3e4, f = 6e4;
|
|
27
27
|
//#endregion
|
|
28
|
-
export { e as ATTACH_FRAME_KEY, t as ATTACH_WINDOW_KEY,
|
|
28
|
+
export { e as ATTACH_FRAME_KEY, t as ATTACH_WINDOW_KEY, o as ATTACH_WINDOW_MESSAGE, i as FRAME_MESSAGE, l as JAR_ANCHOR_MESSAGE, r as SHELL_ATTACH_ERROR, n as SHELL_CONTROL_KEY, a as SHELL_FRAME_MESSAGE, s as SHELL_JAR_MESSAGE, c as SHELL_JAR_UNREACHABLE, f as WINDOW_HANDSHAKE_TIMEOUT_MS, u as WINDOW_HELLO_TIMEOUT_MS, d as WINDOW_JAR_MODE_TIMEOUT_MS };
|
package/dgram.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { v as UdpSocketOption } from "./wire-Gbo-D74t.js";
|
|
2
|
-
import {
|
|
3
|
-
import "./api-
|
|
2
|
+
import { H as Resolvers, wt as UdpSocketResult } from "./contract-InuLU8bI.js";
|
|
3
|
+
import "./api-DF4nHz2Q.js";
|
|
4
4
|
import { Buffer } from "buffer";
|
|
5
5
|
import { AddressInfo } from "net";
|
|
6
6
|
import { EventEmitter } from "events";
|
package/dns.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./lib-DYKLnpWs.cjs"),n=require("./api-Djf-XdZ4.cjs"),r=require("./proxy-CYcaW5ew.cjs"),i=require("./desktop.cjs");var a=async e=>{if(typeof window>`u`)return!1;if(t.q())return!0;let r=await n.a,i=null,a=new Promise(e=>{i=()=>{t.q()&&e(!0)},t.K.addEventListener(`statuschange`,i)}),o=r.installPrompt.show(e).then(()=>!1),s=await Promise.race([a,o]);return i&&t.K.removeEventListener(`statuschange`,i),await r.installPrompt.hide().catch(()=>{}),s},o=null;t.Y(()=>(o||=a().then(()=>void 0).finally(()=>{o=null}),o));var s=()=>typeof document<`u`&&t.q(),c=async(e,a)=>{if(n.d(e),a?.credentials===`include`){if(typeof document>`u`)throw Error(`fetch with credentials needs the FKN extension, which only exists in window realms`);return t.I(e,a)}return s()?t.I(e,{...a,credentials:`omit`}):i.available()?i.fetch(e,a):r.t(e,a)},l=e.t({ATTACH_FRAME_EVENT_KEY:()=>t.i,CATEGORIES:()=>t.y,EXTENSION_ABI:()=>3,ExtensionOperationUnsupportedError:()=>t.Q,ExtensionOutdatedError:()=>t.$,FORGEABLE_HEADERS:()=>t.H,FrameWindowBlockedError:()=>t.d,FrameWindowRefusedError:()=>t.f,LOCATOR_DENIED:()=>t.w,LOCATOR_ERROR:()=>t.O,LOCATOR_UNSUPPORTED:()=>t.b,PERMISSION_DENIED:()=>t.t,REQUIRED_EXTENSION_ABI:()=>0,assertAttachableFrameUrl:()=>t.g,assertFetchableUrl:()=>t.F,assertForgeableHeaders:()=>t.U,assertLockdownApplicable:()=>t._,assertOneCookieIdentity:()=>t.W,attachFrame:()=>t.a,attachFramePermission:()=>t.p,available:()=>s,box:()=>t.rt,cookies:()=>t.N,createFrame:()=>t.m,createVideoElementHandle:()=>t.it,events:()=>t.K,extension:()=>t.K,fetch:()=>t.I,fetchCredentialedPermission:()=>t.L,fetchLocalPermission:()=>t.R,fetchPermission:()=>t.z,gotoPermission:()=>t.h,handleRevivableModules:()=>t.nt,hasForgedCookie:()=>t.G,isBlockedFetchUrl:()=>t.B,isBlockedFrameUrl:()=>t.v,isExtensionExposed:()=>t.q,isLocalNetworkUrl:()=>t.V,isLocatorDenied:()=>t.k,isLocatorUnsupported:()=>t.x,isPermissionDenied:()=>t.n,isTerminalError:()=>t.D,isType:()=>t.at,modifyRequestHeadersPermission:()=>t.A,permissions:()=>t.r,promptInstall:()=>a,readCookiePermission:()=>t.P,readExtensionHandshake:()=>t.J,removeRequestHeaderRule:()=>t.j,revive:()=>t.ot,setMissingExtensionHandler:()=>t.Y,setRequestHeaderRule:()=>t.M,supportsOperation:()=>t.tt,type:()=>t.st,waitForExtensionExposure:()=>t.X});Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return l}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as CATEGORIES, B as revive, C as gotoPermission, D as PermissionGrant, E as LegacyPermissionRequest, F as RemoteVideoElement, G as OperationRequest, H as Executor, I as VideoElementState, K as SelectorPart, L as box, M as PermissionCategory, N as handleRevivableModules, O as PermissionRequest, P as BoxedVideoElement, R as createVideoElementHandle, S as createFrame, T as CategoryRequest, U as Gate, V as type, W as GateTools, _ as FrameWindowRefusedError, a as AttachWindowOptions, b as WindowFrame, c as FrameBackendEvent, d as FrameEventMap, f as FrameMessageEvent, g as FrameWindowRefusal, h as FrameWindowOptions, i as AttachFrameOptions, j as CategoryMeta, k as permissions, l as FrameDocumentEvent, m as FrameWindowBlockedError, n as attachFrame, o as Frame, p as FramePostMessageOptions, s as FrameBackend, t as ATTACH_FRAME_EVENT_KEY, u as FrameEventListener, v as GotoOptions, w as CategoryGrant, x as attachFramePermission, y as Locator, z as isType } from "./index-DiOxvYoa.js";
|
|
2
2
|
//#region ../frame-locator/lib/errors.d.ts
|
|
3
3
|
declare const LOCATOR_ERROR = "LocatorError";
|
|
4
4
|
declare const LOCATOR_UNSUPPORTED = "LocatorUnsupportedError";
|
|
@@ -234,7 +234,7 @@ declare const fetch: (input: RequestInfo | URL, init?: RequestInit & {
|
|
|
234
234
|
spread?: boolean;
|
|
235
235
|
}) => Promise<Response>;
|
|
236
236
|
declare namespace extension_d_exports {
|
|
237
|
-
export { ATTACH_FRAME_EVENT_KEY, AttachFrameOptions, AttachWindowOptions, BoxedVideoElement, CATEGORIES, CategoryGrant, CategoryMeta, CategoryRequest, CookieDetails, EXTENSION_ABI, Executor, ExtensionHandshake, ExtensionOperationUnsupportedError, ExtensionOutdatedError, FORGEABLE_HEADERS, FetchInit, Frame, FrameBackend, FrameWindowBlockedError, FrameWindowOptions, FrameWindowRefusal, FrameWindowRefusedError, Gate, GateTools, GotoOptions, HeaderOperation, LOCATOR_DENIED, LOCATOR_ERROR, LOCATOR_UNSUPPORTED, LegacyPermissionRequest, Locator, OperationRequest, PERMISSION_DENIED, PermissionCategory, PermissionDeniedError, PermissionGrant, PermissionRequest, ProxyFetchRequest, REQUIRED_EXTENSION_ABI, RemoteVideoElement, RequestHeaderRule, SelectorPart, SiteCookie, 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, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isLocatorDenied, isLocatorUnsupported, isPermissionDenied, isTerminalError, isType, modifyRequestHeadersPermission, permissions, promptInstall, readCookiePermission, readExtensionHandshake, removeRequestHeaderRule, revive, setMissingExtensionHandler, setRequestHeaderRule, supportsOperation, type, waitForExtensionExposure };
|
|
237
|
+
export { ATTACH_FRAME_EVENT_KEY, AttachFrameOptions, AttachWindowOptions, BoxedVideoElement, CATEGORIES, CategoryGrant, CategoryMeta, CategoryRequest, CookieDetails, EXTENSION_ABI, Executor, ExtensionHandshake, ExtensionOperationUnsupportedError, ExtensionOutdatedError, FORGEABLE_HEADERS, FetchInit, Frame, FrameBackend, FrameBackendEvent, FrameDocumentEvent, FrameEventListener, FrameEventMap, FrameMessageEvent, FramePostMessageOptions, FrameWindowBlockedError, FrameWindowOptions, FrameWindowRefusal, FrameWindowRefusedError, Gate, GateTools, GotoOptions, HeaderOperation, LOCATOR_DENIED, LOCATOR_ERROR, LOCATOR_UNSUPPORTED, LegacyPermissionRequest, Locator, OperationRequest, PERMISSION_DENIED, PermissionCategory, PermissionDeniedError, PermissionGrant, PermissionRequest, ProxyFetchRequest, REQUIRED_EXTENSION_ABI, RemoteVideoElement, RequestHeaderRule, SelectorPart, SiteCookie, 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, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isLocatorDenied, isLocatorUnsupported, isPermissionDenied, isTerminalError, isType, modifyRequestHeadersPermission, permissions, promptInstall, readCookiePermission, readExtensionHandshake, removeRequestHeaderRule, revive, setMissingExtensionHandler, setRequestHeaderRule, supportsOperation, type, waitForExtensionExposure };
|
|
238
238
|
}
|
|
239
239
|
//#endregion
|
|
240
240
|
export { readCookiePermission as A, FORGEABLE_HEADERS as B, RequestHeaderRule as C, CookieDetails as D, setRequestHeaderRule as E, fetchCredentialedPermission as F, LOCATOR_ERROR as G, assertOneCookieIdentity as H, fetchLocalPermission as I, isLocatorUnsupported as J, LOCATOR_UNSUPPORTED as K, fetchPermission as L, ProxyFetchRequest as M, assertFetchableUrl as N, SiteCookie as O, fetch$1 as P, isBlockedFetchUrl as R, HeaderOperation as S, removeRequestHeaderRule as T, hasForgedCookie as U, assertForgeableHeaders as V, LOCATOR_DENIED as W, isTerminalError as Y, PermissionDeniedError as _, extension as a, assertLockdownApplicable as b, setMissingExtensionHandler as c, ExtensionHandshake as d, ExtensionOperationUnsupportedError as f, PERMISSION_DENIED as g, supportsOperation as h, promptInstall as i, FetchInit as j, cookies as k, waitForExtensionExposure as l, REQUIRED_EXTENSION_ABI as m, fetch as n, isExtensionExposed as o, ExtensionOutdatedError as p, isLocatorDenied as q, isExtensionAvailable as r, readExtensionHandshake as s, extension_d_exports as t, EXTENSION_ABI as u, isPermissionDenied as v, modifyRequestHeadersPermission as w, isBlockedFrameUrl as x, assertAttachableFrameUrl as y, isLocalNetworkUrl as z };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { $ as t, A as n, B as r, D as i, F as a, G as o, H as s, I as c, J as l, K as u, L as ee, M as te, N as ne, O as d, P as f, Q as p, R as m, U as h, V as g, W as _, X as v, Y as y, _ as b, a as x, at as S, b as C, d as w, f as T, g as E, h as D, i as O, it as k, j as A, k as re, m as j, n as M, nt as N, ot as P, p as F, q as I, r as L, rt as R, st as z, t as B, tt as V, v as H, w as U, x as W, y as G, z as K } from "./lib-FD1Ssqjt.js";
|
|
3
|
+
import { a as q, d as J } from "./api-CtiKFcK3.js";
|
|
4
|
+
import { t as Y } from "./proxy-DDwY3AVG.js";
|
|
5
|
+
import { available as X, fetch as ie } from "./desktop.js";
|
|
6
|
+
//#region src/extension-prompt.ts
|
|
7
|
+
var Z = async (e) => {
|
|
8
|
+
if (typeof window > "u") return !1;
|
|
9
|
+
if (I()) return !0;
|
|
10
|
+
let t = await q, n = null, r = new Promise((e) => {
|
|
11
|
+
n = () => {
|
|
12
|
+
I() && e(!0);
|
|
13
|
+
}, u.addEventListener("statuschange", n);
|
|
14
|
+
}), i = t.installPrompt.show(e).then(() => !1), a = await Promise.race([r, i]);
|
|
15
|
+
return n && u.removeEventListener("statuschange", n), await t.installPrompt.hide().catch(() => {}), a;
|
|
16
|
+
}, Q = null;
|
|
17
|
+
y(() => (Q ||= Z().then(() => void 0).finally(() => {
|
|
18
|
+
Q = null;
|
|
19
|
+
}), Q));
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/auto.ts
|
|
22
|
+
var $ = () => typeof document < "u" && I(), ae = async (e, t) => {
|
|
23
|
+
if (J(e), t?.credentials === "include") {
|
|
24
|
+
if (typeof document > "u") throw Error("fetch with credentials needs the FKN extension, which only exists in window realms");
|
|
25
|
+
return c(e, t);
|
|
26
|
+
}
|
|
27
|
+
return $() ? c(e, {
|
|
28
|
+
...t,
|
|
29
|
+
credentials: "omit"
|
|
30
|
+
}) : X() ? ie(e, t) : Y(e, t);
|
|
31
|
+
}, oe = /* @__PURE__ */ e({
|
|
32
|
+
ATTACH_FRAME_EVENT_KEY: () => O,
|
|
33
|
+
CATEGORIES: () => G,
|
|
34
|
+
EXTENSION_ABI: () => 3,
|
|
35
|
+
ExtensionOperationUnsupportedError: () => p,
|
|
36
|
+
ExtensionOutdatedError: () => t,
|
|
37
|
+
FORGEABLE_HEADERS: () => s,
|
|
38
|
+
FrameWindowBlockedError: () => w,
|
|
39
|
+
FrameWindowRefusedError: () => T,
|
|
40
|
+
LOCATOR_DENIED: () => U,
|
|
41
|
+
LOCATOR_ERROR: () => d,
|
|
42
|
+
LOCATOR_UNSUPPORTED: () => C,
|
|
43
|
+
PERMISSION_DENIED: () => B,
|
|
44
|
+
REQUIRED_EXTENSION_ABI: () => 0,
|
|
45
|
+
assertAttachableFrameUrl: () => E,
|
|
46
|
+
assertFetchableUrl: () => a,
|
|
47
|
+
assertForgeableHeaders: () => h,
|
|
48
|
+
assertLockdownApplicable: () => b,
|
|
49
|
+
assertOneCookieIdentity: () => _,
|
|
50
|
+
attachFrame: () => x,
|
|
51
|
+
attachFramePermission: () => F,
|
|
52
|
+
available: () => $,
|
|
53
|
+
box: () => R,
|
|
54
|
+
cookies: () => ne,
|
|
55
|
+
createFrame: () => j,
|
|
56
|
+
createVideoElementHandle: () => k,
|
|
57
|
+
events: () => u,
|
|
58
|
+
extension: () => u,
|
|
59
|
+
fetch: () => c,
|
|
60
|
+
fetchCredentialedPermission: () => ee,
|
|
61
|
+
fetchLocalPermission: () => m,
|
|
62
|
+
fetchPermission: () => K,
|
|
63
|
+
gotoPermission: () => D,
|
|
64
|
+
handleRevivableModules: () => N,
|
|
65
|
+
hasForgedCookie: () => o,
|
|
66
|
+
isBlockedFetchUrl: () => r,
|
|
67
|
+
isBlockedFrameUrl: () => H,
|
|
68
|
+
isExtensionExposed: () => I,
|
|
69
|
+
isLocalNetworkUrl: () => g,
|
|
70
|
+
isLocatorDenied: () => re,
|
|
71
|
+
isLocatorUnsupported: () => W,
|
|
72
|
+
isPermissionDenied: () => M,
|
|
73
|
+
isTerminalError: () => i,
|
|
74
|
+
isType: () => S,
|
|
75
|
+
modifyRequestHeadersPermission: () => n,
|
|
76
|
+
permissions: () => L,
|
|
77
|
+
promptInstall: () => Z,
|
|
78
|
+
readCookiePermission: () => f,
|
|
79
|
+
readExtensionHandshake: () => l,
|
|
80
|
+
removeRequestHeaderRule: () => A,
|
|
81
|
+
revive: () => P,
|
|
82
|
+
setMissingExtensionHandler: () => y,
|
|
83
|
+
setRequestHeaderRule: () => te,
|
|
84
|
+
supportsOperation: () => V,
|
|
85
|
+
type: () => z,
|
|
86
|
+
waitForExtensionExposure: () => v
|
|
87
|
+
});
|
|
88
|
+
//#endregion
|
|
89
|
+
export { Z as i, ae as n, $ as r, oe as t };
|
package/extension.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./lib-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./lib-DYKLnpWs.cjs"),t=require("./extension-B7jDaJVp.cjs");exports.ATTACH_FRAME_EVENT_KEY=e.i,exports.CATEGORIES=e.y,exports.EXTENSION_ABI=e.Z,exports.ExtensionOperationUnsupportedError=e.Q,exports.ExtensionOutdatedError=e.$,exports.FORGEABLE_HEADERS=e.H,exports.FrameWindowBlockedError=e.d,exports.FrameWindowRefusedError=e.f,exports.LOCATOR_DENIED=e.w,exports.LOCATOR_ERROR=e.O,exports.LOCATOR_UNSUPPORTED=e.b,exports.PERMISSION_DENIED=e.t,exports.REQUIRED_EXTENSION_ABI=e.et,exports.assertAttachableFrameUrl=e.g,exports.assertFetchableUrl=e.F,exports.assertForgeableHeaders=e.U,exports.assertLockdownApplicable=e._,exports.assertOneCookieIdentity=e.W,exports.attachFrame=e.a,exports.attachFramePermission=e.p,exports.available=t.r,exports.box=e.rt,exports.cookies=e.N,exports.createFrame=e.m,exports.createVideoElementHandle=e.it,exports.events=e.K,exports.extension=e.K,exports.fetch=e.I,exports.fetchCredentialedPermission=e.L,exports.fetchLocalPermission=e.R,exports.fetchPermission=e.z,exports.gotoPermission=e.h,exports.handleRevivableModules=e.nt,exports.hasForgedCookie=e.G,exports.isBlockedFetchUrl=e.B,exports.isBlockedFrameUrl=e.v,exports.isExtensionExposed=e.q,exports.isLocalNetworkUrl=e.V,exports.isLocatorDenied=e.k,exports.isLocatorUnsupported=e.x,exports.isPermissionDenied=e.n,exports.isTerminalError=e.D,exports.isType=e.at,exports.modifyRequestHeadersPermission=e.A,exports.permissions=e.r,exports.promptInstall=t.i,exports.readCookiePermission=e.P,exports.readExtensionHandshake=e.J,exports.removeRequestHeaderRule=e.j,exports.revive=e.ot,exports.setMissingExtensionHandler=e.Y,exports.setRequestHeaderRule=e.M,exports.supportsOperation=e.tt,exports.type=e.st,exports.waitForExtensionExposure=e.X;
|
package/extension.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { A as readCookiePermission, B as FORGEABLE_HEADERS, C as RequestHeaderRule, D as CookieDetails, E as setRequestHeaderRule, F as fetchCredentialedPermission, G as LOCATOR_ERROR, H as assertOneCookieIdentity, I as fetchLocalPermission, J as isLocatorUnsupported, K as LOCATOR_UNSUPPORTED, L as fetchPermission, M as ProxyFetchRequest, N as assertFetchableUrl, O as SiteCookie, P as fetch, R as isBlockedFetchUrl, S as HeaderOperation, T as removeRequestHeaderRule, U as hasForgedCookie, V as assertForgeableHeaders, W as LOCATOR_DENIED, Y as isTerminalError, _ as PermissionDeniedError, a as extension, b as assertLockdownApplicable, c as setMissingExtensionHandler, d as ExtensionHandshake, f as ExtensionOperationUnsupportedError, g as PERMISSION_DENIED, h as supportsOperation, i as promptInstall, j as FetchInit, k as cookies, l as waitForExtensionExposure, m as REQUIRED_EXTENSION_ABI, o as isExtensionExposed, p as ExtensionOutdatedError, q as isLocatorDenied, r as isExtensionAvailable, s as readExtensionHandshake, u as EXTENSION_ABI, v as isPermissionDenied, w as modifyRequestHeadersPermission, x as isBlockedFrameUrl, y as assertAttachableFrameUrl, z as isLocalNetworkUrl } from "./extension-
|
|
3
|
-
export { ATTACH_FRAME_EVENT_KEY, AttachFrameOptions, AttachWindowOptions, BoxedVideoElement, CATEGORIES, CategoryGrant, type CategoryMeta, CategoryRequest, CookieDetails, EXTENSION_ABI, type Executor, type ExtensionHandshake, ExtensionOperationUnsupportedError, ExtensionOutdatedError, FORGEABLE_HEADERS, FetchInit, Frame, FrameBackend, FrameWindowBlockedError, FrameWindowOptions, FrameWindowRefusal, FrameWindowRefusedError, type Gate, type GateTools, GotoOptions, HeaderOperation, LOCATOR_DENIED, LOCATOR_ERROR, LOCATOR_UNSUPPORTED, LegacyPermissionRequest, Locator, type OperationRequest, PERMISSION_DENIED, type PermissionCategory, type PermissionDeniedError, PermissionGrant, PermissionRequest, ProxyFetchRequest, REQUIRED_EXTENSION_ABI, RemoteVideoElement, RequestHeaderRule, type SelectorPart, SiteCookie, 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, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isLocatorDenied, isLocatorUnsupported, isPermissionDenied, isTerminalError, isType, modifyRequestHeadersPermission, permissions, promptInstall, readCookiePermission, readExtensionHandshake, removeRequestHeaderRule, revive, setMissingExtensionHandler, setRequestHeaderRule, supportsOperation, type, waitForExtensionExposure };
|
|
1
|
+
import { A as CATEGORIES, B as revive, C as gotoPermission, D as PermissionGrant, E as LegacyPermissionRequest, F as RemoteVideoElement, G as OperationRequest, H as Executor, I as VideoElementState, K as SelectorPart, L as box, M as PermissionCategory, N as handleRevivableModules, O as PermissionRequest, P as BoxedVideoElement, R as createVideoElementHandle, S as createFrame, T as CategoryRequest, U as Gate, V as type, W as GateTools, _ as FrameWindowRefusedError, a as AttachWindowOptions, b as WindowFrame, c as FrameBackendEvent, d as FrameEventMap, f as FrameMessageEvent, g as FrameWindowRefusal, h as FrameWindowOptions, i as AttachFrameOptions, j as CategoryMeta, k as permissions, l as FrameDocumentEvent, m as FrameWindowBlockedError, n as attachFrame, o as Frame, p as FramePostMessageOptions, s as FrameBackend, t as ATTACH_FRAME_EVENT_KEY, u as FrameEventListener, v as GotoOptions, w as CategoryGrant, x as attachFramePermission, y as Locator, z as isType } from "./index-DiOxvYoa.js";
|
|
2
|
+
import { A as readCookiePermission, B as FORGEABLE_HEADERS, C as RequestHeaderRule, D as CookieDetails, E as setRequestHeaderRule, F as fetchCredentialedPermission, G as LOCATOR_ERROR, H as assertOneCookieIdentity, I as fetchLocalPermission, J as isLocatorUnsupported, K as LOCATOR_UNSUPPORTED, L as fetchPermission, M as ProxyFetchRequest, N as assertFetchableUrl, O as SiteCookie, P as fetch, R as isBlockedFetchUrl, S as HeaderOperation, T as removeRequestHeaderRule, U as hasForgedCookie, V as assertForgeableHeaders, W as LOCATOR_DENIED, Y as isTerminalError, _ as PermissionDeniedError, a as extension, b as assertLockdownApplicable, c as setMissingExtensionHandler, d as ExtensionHandshake, f as ExtensionOperationUnsupportedError, g as PERMISSION_DENIED, h as supportsOperation, i as promptInstall, j as FetchInit, k as cookies, l as waitForExtensionExposure, m as REQUIRED_EXTENSION_ABI, o as isExtensionExposed, p as ExtensionOutdatedError, q as isLocatorDenied, r as isExtensionAvailable, s as readExtensionHandshake, u as EXTENSION_ABI, v as isPermissionDenied, w as modifyRequestHeadersPermission, x as isBlockedFrameUrl, y as assertAttachableFrameUrl, z as isLocalNetworkUrl } from "./extension-Bm5x5R4R.js";
|
|
3
|
+
export { ATTACH_FRAME_EVENT_KEY, AttachFrameOptions, AttachWindowOptions, BoxedVideoElement, CATEGORIES, CategoryGrant, type CategoryMeta, CategoryRequest, CookieDetails, EXTENSION_ABI, type Executor, type ExtensionHandshake, ExtensionOperationUnsupportedError, ExtensionOutdatedError, FORGEABLE_HEADERS, FetchInit, Frame, FrameBackend, FrameBackendEvent, FrameDocumentEvent, FrameEventListener, FrameEventMap, FrameMessageEvent, FramePostMessageOptions, FrameWindowBlockedError, FrameWindowOptions, FrameWindowRefusal, FrameWindowRefusedError, type Gate, type GateTools, GotoOptions, HeaderOperation, LOCATOR_DENIED, LOCATOR_ERROR, LOCATOR_UNSUPPORTED, LegacyPermissionRequest, Locator, type OperationRequest, PERMISSION_DENIED, type PermissionCategory, type PermissionDeniedError, PermissionGrant, PermissionRequest, ProxyFetchRequest, REQUIRED_EXTENSION_ABI, RemoteVideoElement, RequestHeaderRule, type SelectorPart, SiteCookie, 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, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isLocatorDenied, 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
|
-
import { $ as e, A as t, B as n, D as r,
|
|
2
|
-
import { i as Q, r as $ } from "./extension-
|
|
3
|
-
export {
|
|
1
|
+
import { $ as e, A as t, B as n, D as r, F as i, G as a, H as o, I as s, J as c, K as l, L as u, M as d, N as f, O as p, P as m, Q as h, R as g, U as _, V as v, W as y, X as b, Y as x, Z as S, _ as C, a as w, at as T, b as E, d as D, et as O, f as k, g as A, h as j, i as M, it as N, j as P, k as F, m as I, n as L, nt as R, ot as z, p as B, q as V, r as H, rt as U, st as W, t as G, tt as K, v as q, w as J, x as Y, y as X, z as Z } from "./lib-FD1Ssqjt.js";
|
|
2
|
+
import { i as Q, r as $ } from "./extension-sNRjVbET.js";
|
|
3
|
+
export { M as ATTACH_FRAME_EVENT_KEY, X as CATEGORIES, S as EXTENSION_ABI, h as ExtensionOperationUnsupportedError, e as ExtensionOutdatedError, o as FORGEABLE_HEADERS, D as FrameWindowBlockedError, k as FrameWindowRefusedError, J as LOCATOR_DENIED, p as LOCATOR_ERROR, E as LOCATOR_UNSUPPORTED, G as PERMISSION_DENIED, O as REQUIRED_EXTENSION_ABI, A as assertAttachableFrameUrl, i as assertFetchableUrl, _ as assertForgeableHeaders, C as assertLockdownApplicable, y as assertOneCookieIdentity, w as attachFrame, B as attachFramePermission, $ as available, U as box, f as cookies, I as createFrame, N as createVideoElementHandle, l as events, l as extension, s as fetch, u as fetchCredentialedPermission, g as fetchLocalPermission, Z as fetchPermission, j as gotoPermission, R as handleRevivableModules, a as hasForgedCookie, n as isBlockedFetchUrl, q as isBlockedFrameUrl, V as isExtensionExposed, v as isLocalNetworkUrl, F as isLocatorDenied, Y as isLocatorUnsupported, L as isPermissionDenied, r as isTerminalError, T as isType, t as modifyRequestHeadersPermission, H as permissions, Q as promptInstall, m as readCookiePermission, c as readExtensionHandshake, P as removeRequestHeaderRule, z as revive, x as setMissingExtensionHandler, d as setRequestHeaderRule, K as supportsOperation, W as type, b as waitForExtensionExposure };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={scope:`read.text`,category:`storage`,severity:1,chip:`read text`,title:`Read text from the page`,description:`Lets the app see the text shown on this page.`},t={scope:`read.info`,category:`storage`,severity:1,chip:`read details`,title:`Read info from the page`,description:`Lets the app read a detail of a part of the page.`},n={scope:`read.visible`,category:`storage`,severity:0,title:`See what’s visible on the page`,description:`Lets the app check which elements are currently on screen.`},r={scope:`read.check`,category:`storage`,severity:0,title:`Check if something is on the page`,description:`Lets the app test whether a specific element exists.`},i={scope:`read.count`,category:`storage`,severity:0,title:`Count items on the page`,description:`Lets the app count how many matching elements are present.`},a={scope:`act.click`,category:`interaction`,severity:3,chip:`click`,title:`Click on the page`,description:`Lets the app press buttons or links for you.`},o={scope:`act.type`,category:`interaction`,severity:1,chip:`type`,title:`Type into a text field`,description:`Lets the app fill in form fields on your behalf.`},s={scope:`act.hover`,category:`interaction`,severity:1,chip:`hover`,title:`Hover over the page`,description:`Lets the app point at things to reveal menus or tooltips.`},c={scope:`media.video`,category:`interaction`,severity:0,title:`Control video playback`,description:`Lets the app play, pause, seek, and read the video on the page.`},l={scope:`media.appear`,category:`interaction`,severity:0,title:`Change page appearance`,description:`Lets the app restyle parts of the page (safely filtered).`},u={scope:`media.appearU`,category:`evaluation`,severity:2,chip:`unfiltered styles`,unsafe:!0,title:`Change page appearance (unsafe)`,description:`Lets the app restyle the page WITHOUT safety filtering. Could be used to leak data over the network.`},d={scope:`frame.evaluate`,category:`evaluation`,severity:3,chip:`run code`,unsafe:!0,title:`Run the app’s code on this site`,description:`Lets the app run its own script inside this site, with full access to the page and the data it shows.`},f={scope:`frame.message`,category:`evaluation`,severity:3,chip:`message the page`,unsafe:!0,title:`Send messages to this site`,description:`Lets the app send messages and open channels into this site, which its scripts receive as their own.`},p=e=>e?.noSanitize?u:l,m={scope:`frame.fetchRead`,category:`network`,severity:3,chip:`load`,unsafe:!0,title:`Read your account data on this site`,description:`Lets the app read pages and data from this site as you, using the session in the frame.`},h={scope:`frame.fetchWrite`,category:`network`,severity:3,chip:`send`,unsafe:!0,title:`Change your account data on this site`,description:`Lets the app send changes to this site as you, using the session in the frame.`},g=new Set([`GET`,`HEAD`,`OPTIONS`]),_=(e,t)=>g.has((t?.method??`GET`).toUpperCase())?m:h,v={click:a,fill:o,hover:s,textContent:e,getAttribute:t,isVisible:n,count:i,exists:r,videoElement:c,addStyleTag:p,fetch:_,evaluate:d},y={postMessage:f};[e,t,n,r,i,a,o,s,c,l,u,m,h,d,f].map(e=>e.scope);var b={...v,...y},x=(e,t)=>{let n=b[e];return n?(typeof n==`function`?n(...t):n).scope:null},S=(e,t)=>{try{return new URL(e,t)}catch{return}},C=e=>{let t=S(e,`https://s.invalid/`),n=S(e,`http://s.invalid/`);if(!t||!n)return{kind:`invalid`};let r=S(e);return!r||r.href!==t.href||r.href!==n.href?{kind:`relative`}:r.protocol!==`https:`&&r.protocol!==`http:`?{kind:`unsupported`,protocol:r.protocol}:{kind:`absolute`,host:r.hostname,protocol:r.protocol}},w=/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/,T=/^\[[0-9a-f:.]+\]$/,E=e=>{try{return new URL(`http://${e}/`).hostname}catch{return}},D=(e,{ipv6:t=!1}={})=>{let n=[];for(let r of e){let e=r.trim().toLowerCase();if(!e||e.length>253)continue;let i=w.test(e)?e:t&&T.test(e)?E(e):void 0;i&&!n.includes(i)&&n.push(i)}return n};Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return n}});
|
|
@@ -80,7 +80,15 @@ var e = {
|
|
|
80
80
|
unsafe: !0,
|
|
81
81
|
title: "Run the app’s code on this site",
|
|
82
82
|
description: "Lets the app run its own script inside this site, with full access to the page and the data it shows."
|
|
83
|
-
}, f =
|
|
83
|
+
}, f = {
|
|
84
|
+
scope: "frame.message",
|
|
85
|
+
category: "evaluation",
|
|
86
|
+
severity: 3,
|
|
87
|
+
chip: "message the page",
|
|
88
|
+
unsafe: !0,
|
|
89
|
+
title: "Send messages to this site",
|
|
90
|
+
description: "Lets the app send messages and open channels into this site, which its scripts receive as their own."
|
|
91
|
+
}, p = (e) => e?.noSanitize ? u : l, m = {
|
|
84
92
|
scope: "frame.fetchRead",
|
|
85
93
|
category: "network",
|
|
86
94
|
severity: 3,
|
|
@@ -88,7 +96,7 @@ var e = {
|
|
|
88
96
|
unsafe: !0,
|
|
89
97
|
title: "Read your account data on this site",
|
|
90
98
|
description: "Lets the app read pages and data from this site as you, using the session in the frame."
|
|
91
|
-
},
|
|
99
|
+
}, h = {
|
|
92
100
|
scope: "frame.fetchWrite",
|
|
93
101
|
category: "network",
|
|
94
102
|
severity: 3,
|
|
@@ -96,11 +104,11 @@ var e = {
|
|
|
96
104
|
unsafe: !0,
|
|
97
105
|
title: "Change your account data on this site",
|
|
98
106
|
description: "Lets the app send changes to this site as you, using the session in the frame."
|
|
99
|
-
},
|
|
107
|
+
}, g = /* @__PURE__ */ new Set([
|
|
100
108
|
"GET",
|
|
101
109
|
"HEAD",
|
|
102
110
|
"OPTIONS"
|
|
103
|
-
]),
|
|
111
|
+
]), _ = (e, t) => g.has((t?.method ?? "GET").toUpperCase()) ? m : h, v = {
|
|
104
112
|
click: a,
|
|
105
113
|
fill: o,
|
|
106
114
|
hover: s,
|
|
@@ -110,10 +118,10 @@ var e = {
|
|
|
110
118
|
count: i,
|
|
111
119
|
exists: r,
|
|
112
120
|
videoElement: c,
|
|
113
|
-
addStyleTag:
|
|
114
|
-
fetch:
|
|
121
|
+
addStyleTag: p,
|
|
122
|
+
fetch: _,
|
|
115
123
|
evaluate: d
|
|
116
|
-
};
|
|
124
|
+
}, y = { postMessage: f };
|
|
117
125
|
[
|
|
118
126
|
e,
|
|
119
127
|
t,
|
|
@@ -126,23 +134,27 @@ var e = {
|
|
|
126
134
|
c,
|
|
127
135
|
l,
|
|
128
136
|
u,
|
|
129
|
-
p,
|
|
130
137
|
m,
|
|
131
|
-
|
|
138
|
+
h,
|
|
139
|
+
d,
|
|
140
|
+
f
|
|
132
141
|
].map((e) => e.scope);
|
|
133
|
-
var
|
|
134
|
-
|
|
142
|
+
var b = {
|
|
143
|
+
...v,
|
|
144
|
+
...y
|
|
145
|
+
}, x = (e, t) => {
|
|
146
|
+
let n = b[e];
|
|
135
147
|
return n ? (typeof n == "function" ? n(...t) : n).scope : null;
|
|
136
|
-
},
|
|
148
|
+
}, S = (e, t) => {
|
|
137
149
|
try {
|
|
138
150
|
return new URL(e, t);
|
|
139
151
|
} catch {
|
|
140
152
|
return;
|
|
141
153
|
}
|
|
142
|
-
},
|
|
143
|
-
let t =
|
|
154
|
+
}, C = (e) => {
|
|
155
|
+
let t = S(e, "https://s.invalid/"), n = S(e, "http://s.invalid/");
|
|
144
156
|
if (!t || !n) return { kind: "invalid" };
|
|
145
|
-
let r =
|
|
157
|
+
let r = S(e);
|
|
146
158
|
return !r || r.href !== t.href || r.href !== n.href ? { kind: "relative" } : r.protocol !== "https:" && r.protocol !== "http:" ? {
|
|
147
159
|
kind: "unsupported",
|
|
148
160
|
protocol: r.protocol
|
|
@@ -151,21 +163,21 @@ var v = _, y = (e, t) => {
|
|
|
151
163
|
host: r.hostname,
|
|
152
164
|
protocol: r.protocol
|
|
153
165
|
};
|
|
154
|
-
},
|
|
166
|
+
}, w = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/, T = /^\[[0-9a-f:.]+\]$/, E = (e) => {
|
|
155
167
|
try {
|
|
156
168
|
return new URL(`http://${e}/`).hostname;
|
|
157
169
|
} catch {
|
|
158
170
|
return;
|
|
159
171
|
}
|
|
160
|
-
},
|
|
172
|
+
}, D = (e, { ipv6: t = !1 } = {}) => {
|
|
161
173
|
let n = [];
|
|
162
174
|
for (let r of e) {
|
|
163
175
|
let e = r.trim().toLowerCase();
|
|
164
176
|
if (!e || e.length > 253) continue;
|
|
165
|
-
let i =
|
|
177
|
+
let i = w.test(e) ? e : t && T.test(e) ? E(e) : void 0;
|
|
166
178
|
i && !n.includes(i) && n.push(i);
|
|
167
179
|
}
|
|
168
180
|
return n;
|
|
169
181
|
};
|
|
170
182
|
//#endregion
|
|
171
|
-
export {
|
|
183
|
+
export { t as _, l as a, _ as c, h as d, c as f, i as g, r as h, o as i, C as l, x as m, a as n, u as o, f as p, s as r, d as s, D as t, m as u, e as v, n as y };
|
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-DnXxFGm8.js";
|
|
2
2
|
import { Buffer } from "buffer";
|
|
3
3
|
import { Stream } from "stream";
|
|
4
4
|
import { IncomingHttpHeaders, OutgoingHttpHeaders, RequestOptions } from "http";
|