@fkn/lib 0.9.64 → 0.9.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/account-Bm7uIcQo.d.ts +39 -0
- package/account-Uh0-1Cbp.js +22 -0
- package/{account-generation-BiZxPztj.cjs → account-generation-ACCBzaI-.cjs} +1 -1
- package/{account-generation-DvRuJDa2.js → account-generation-BKHNe-jL.js} +2 -3
- package/account-m2iCmNui.cjs +1 -0
- package/{account-storage-D8CBG1cv.js → account-storage-BmCVutNL.js} +4 -5
- package/{account-storage-Co9IvkPr.d.ts → account-storage-UmSfF63A.d.ts} +1 -66
- package/{account-storage-DpHBgeX5.cjs → account-storage-dYWDpqsr.cjs} +1 -1
- package/account.cjs +1 -1
- package/account.d.ts +3 -40
- package/account.js +1 -23
- package/{api-xh6lzApn.d.ts → api-0Yp9uZcV.d.ts} +3 -7
- package/{api-BvJu2X1L.js → api-DRglK7ft.js} +19 -21
- package/{api-CrUO33y-.cjs → api-DrvhPN56.cjs} +1 -1
- package/api.cjs +1 -1
- package/api.d.ts +2 -2
- package/api.js +1 -2
- package/attach-policy.d.ts +0 -4
- package/attach-policy.js +2 -3
- package/{broker-frame-B31OXcnH.js → broker-frame-vjSpBa8d.js} +1 -2
- package/broker-frame.d.ts +1 -3
- package/broker-frame.js +1 -2
- package/{busy-DsMWrSzc.js → busy-C1JPjoZ_.js} +1 -2
- package/cloud/dgram.cjs +1 -1
- package/cloud/dgram.d.ts +1 -1
- package/cloud/dgram.js +1 -2
- package/cloud/dns.cjs +1 -1
- package/cloud/dns.d.ts +2 -2
- package/cloud/dns.js +1 -2
- package/cloud/fetch.cjs +1 -1
- package/cloud/fetch.d.ts +1 -1
- package/cloud/fetch.js +1 -2
- package/cloud/fs/promises.cjs +1 -1
- package/cloud/fs/promises.d.ts +3 -5
- package/cloud/fs/promises.js +2 -3
- package/cloud/fs.cjs +1 -1
- package/cloud/fs.d.ts +4 -4
- package/cloud/fs.js +4 -34
- package/cloud/http.cjs +1 -1
- package/cloud/http.d.ts +1 -1
- package/cloud/http.js +1 -2
- package/cloud/net.cjs +1 -1
- package/cloud/net.d.ts +1 -1
- package/cloud/net.js +3 -3
- package/{cloud-CI7FFRMC.d.ts → cloud-BoH54gaM.d.ts} +7 -11
- package/{cloud-FW59_g8F.js → cloud-C7StNncS.js} +15 -16
- package/cloud-TN0eDUy3.cjs +1 -0
- package/cloud.cjs +1 -1
- package/cloud.d.ts +7 -7
- package/cloud.js +7 -7
- package/connect-button-2FmOM8ai.d.ts +2 -0
- package/{connect-button-DtsN3X1J.js → connect-button-C1wKkIhh.js} +1 -2
- package/{contract-BGMJVvTg.d.ts → contract-0rua6Wsh.d.ts} +11 -6
- package/contract.d.ts +3 -3
- package/contract.js +1 -2
- package/desktop-DOubT4ES.d.ts +57 -0
- package/desktop-vXKU4wEK.cjs +1 -0
- package/desktop-xTT7ciGX.js +50 -0
- package/desktop.cjs +1 -1
- package/desktop.d.ts +2 -58
- package/desktop.js +1 -51
- package/dgram-BBbLokVF.js +397 -0
- package/dgram-BYk-QDHW.d.ts +118 -0
- package/dgram-D9ljiUFh.cjs +1 -0
- package/dgram.cjs +1 -1
- package/dgram.d.ts +2 -119
- package/dgram.js +1 -410
- package/dns-2v96zoEh.cjs +1 -0
- package/dns-DyB4K2oE.d.ts +9 -0
- package/dns-o8DLFjP1.js +5 -0
- package/dns.cjs +1 -1
- package/dns.d.ts +3 -10
- package/dns.js +1 -6
- package/extension-BXBjpypy.cjs +1 -0
- package/{extension-Chmpunqf.js → extension-D5UMnEmQ.js} +9 -11
- package/{extension-C1bcizcn.d.ts → extension-D98KM8W7.d.ts} +1 -27
- package/extension.cjs +1 -1
- package/extension.d.ts +2 -2
- package/extension.js +2 -2
- package/fs/promises.cjs +1 -1
- package/fs/promises.d.ts +2 -4
- package/fs/promises.js +2 -3
- package/fs--MLHvMW-.cjs +1 -0
- package/fs-BX_ghRy0.cjs +1 -0
- package/fs-BnWXGRik.js +33 -0
- package/{fs-DCJAYoYy.d.ts → fs-ChOYC6VD.d.ts} +3 -4
- package/{fs-Djuaj5pQ.js → fs-Cw7CcUhx.js} +17 -41
- package/fs.cjs +1 -1
- package/fs.d.ts +4 -4
- package/fs.js +2 -2
- package/{hosts-t7CKGTRz.js → hosts-HUfgMimI.js} +1 -2
- package/http-BE3UBktN.cjs +9 -0
- package/http-CDhG4bUc.d.ts +187 -0
- package/http-DIDjdm08.js +523 -0
- package/http.cjs +1 -9
- package/http.d.ts +2 -188
- package/http.js +1 -542
- package/index-CUWTpQKP.d.ts +87 -0
- package/{index-BQgZVQl7.d.ts → index-CcVwh9yz.d.ts} +0 -2
- package/{index-C5DdoMGo.d.ts → index-Cu5EcdK0.d.ts} +0 -59
- package/{index-57lTXnoe.d.ts → index-D6GPJ4Ow.d.ts} +29 -26
- package/index.cjs +1 -1
- package/index.d.ts +17 -25
- package/index.js +22 -27
- package/lib-Bs-g5jyp.cjs +53 -0
- package/{lib-BrsqpUkv.js → lib-CtJaID_y.js} +7 -31
- package/{messages-AdPfdoLV.d.ts → messages-B9dOXntM.d.ts} +0 -2
- package/messages.d.ts +1 -1
- package/messages.js +1 -2
- package/net-COkJw8lV.js +286 -0
- package/net-Dk2kqtgE.cjs +1 -0
- package/{net-BpyIeQ8r.d.ts → net-mVAYXs8e.d.ts} +5 -7
- package/net.cjs +1 -1
- package/net.d.ts +1 -1
- package/net.js +3 -323
- package/{node-fs-DY2fO5zd.js → node-fs-B4pY08Kc.js} +3 -10
- package/node-fs-DN0ejGTL.cjs +1 -0
- package/opfs/promises.cjs +1 -1
- package/opfs/promises.d.ts +2 -4
- package/opfs/promises.js +2 -3
- package/{opfs-D0goLAQW.js → opfs-CzCfVam3.js} +2 -3
- package/opfs-D3pYzYRc.js +35 -0
- package/opfs-DuXvTgIl.cjs +1 -0
- package/opfs.cjs +1 -1
- package/opfs.d.ts +3 -88
- package/opfs.js +1 -36
- package/package.json +1 -1
- package/packages-BEadIy_h.d.ts +155 -0
- package/packages-Cws_rcgf.js +346 -0
- package/packages-DT8vPB5_.cjs +1 -0
- package/packages.cjs +1 -1
- package/packages.d.ts +3 -156
- package/packages.js +1 -347
- package/{proxy-C4sYkxB5.js → proxy-BBAQxJmP.js} +5 -6
- package/{proxy-Dz60YyYy.d.ts → proxy-BP40IXYD.d.ts} +2 -4
- package/{proxy-jdE5tCwz.cjs → proxy-DVgGp6A8.cjs} +1 -1
- package/react.cjs +1 -1
- package/react.d.ts +16 -4
- package/react.js +96 -7
- package/{relay-choice-BGwXRC5d.js → relay-choice-Bb3oP2gw.js} +1 -2
- package/{relay-choice-5yUPI-tJ.d.ts → relay-choice-DOUttUnL.d.ts} +2 -4
- package/{rolldown-runtime-Dy4uBu1J.js → rolldown-runtime-CGnMp29N.js} +1 -2
- package/rooms-C6mbannC.d.ts +227 -0
- package/rooms-DHFS9cwA.cjs +1 -0
- package/rooms-DP5stTEr.js +300 -0
- package/rooms.cjs +1 -1
- package/rooms.d.ts +3 -228
- package/rooms.js +1 -301
- package/storage-BCjYihUO.cjs +1 -0
- package/storage-BhfImh_2.js +136 -0
- package/storage-DpCLksAa.d.ts +68 -0
- package/storage.cjs +1 -1
- package/storage.d.ts +3 -69
- package/storage.js +1 -137
- package/{utils-Cyq8uJiy.js → utils-DtWP-E9x.js} +1 -2
- package/{wire-Fk5pJaoy.d.ts → wire-DhmLnYEU.d.ts} +0 -2
- package/wire.d.ts +1 -1
- package/wire.js +1 -2
- package/cloud-DcgY8Xfp.cjs +0 -1
- package/connect-button-Cp0NS95-.d.ts +0 -4
- package/extension-I2Ziv2pk.cjs +0 -1
- package/fs-DeyJwJ3w.cjs +0 -1
- package/lib-C_X3WR4G.cjs +0 -53
- package/node-fs-vsWuoMGa.cjs +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BoxBase, Capable, DefaultRevivableModules, RevivableContext, UnderlyingType } from "osra";
|
|
2
|
-
//#region ../frame-locator/lib/types.d.ts
|
|
3
2
|
type ChainKind = 'element' | 'frame';
|
|
4
3
|
type SelectorPart = {
|
|
5
4
|
kind: ChainKind;
|
|
@@ -107,14 +106,10 @@ type Executor = {
|
|
|
107
106
|
highlight: (parts: SelectorPart[], on: boolean) => Promise<void>;
|
|
108
107
|
stale?: Promise<void>;
|
|
109
108
|
};
|
|
110
|
-
//#endregion
|
|
111
|
-
//#region ../frame-locator/lib/add-style-tag.d.ts
|
|
112
109
|
type AddStyleTagOptions$1 = OperationOptions & {
|
|
113
110
|
content: string;
|
|
114
111
|
noSanitize?: boolean;
|
|
115
112
|
};
|
|
116
|
-
//#endregion
|
|
117
|
-
//#region ../frame-locator/lib/fetch.d.ts
|
|
118
113
|
/**
|
|
119
114
|
* A request issued from the realm the chain lands in, so the browser supplies that document's own
|
|
120
115
|
* cookie jar (partitioned, on the extension path), `Origin`, `Referer` and `Sec-Fetch-*`. Nothing here
|
|
@@ -147,41 +142,12 @@ type FrameFetchResult = {
|
|
|
147
142
|
headers: [string, string][];
|
|
148
143
|
body: ArrayBuffer;
|
|
149
144
|
};
|
|
150
|
-
declare namespace operations_d_exports {
|
|
151
|
-
export { PositionOptions$1 as PositionOptions, click, count, exists, fill, getAttribute, hover, isVisible, textContent };
|
|
152
|
-
}
|
|
153
145
|
type PositionOptions$1 = OperationOptions & {
|
|
154
146
|
position?: {
|
|
155
147
|
x?: number;
|
|
156
148
|
y?: number;
|
|
157
149
|
};
|
|
158
150
|
};
|
|
159
|
-
declare const click: {
|
|
160
|
-
readonly resolve: (context: LocatorContext, options?: PositionOptions$1) => void;
|
|
161
|
-
};
|
|
162
|
-
declare const hover: {
|
|
163
|
-
readonly resolve: (context: LocatorContext, options?: PositionOptions$1) => void;
|
|
164
|
-
};
|
|
165
|
-
declare const fill: {
|
|
166
|
-
readonly resolve: (context: LocatorContext, value: string, _options?: OperationOptions) => void;
|
|
167
|
-
};
|
|
168
|
-
declare const textContent: {
|
|
169
|
-
readonly resolve: (context: LocatorContext, _options?: OperationOptions) => string;
|
|
170
|
-
};
|
|
171
|
-
declare const getAttribute: {
|
|
172
|
-
readonly resolve: (context: LocatorContext, name: string, _options?: OperationOptions) => string | null;
|
|
173
|
-
};
|
|
174
|
-
declare const isVisible: {
|
|
175
|
-
readonly resolve: (context: LocatorContext, _options?: OperationOptions) => boolean;
|
|
176
|
-
};
|
|
177
|
-
declare const count: {
|
|
178
|
-
readonly resolve: (context: LocatorContext, _options?: OperationOptions) => number;
|
|
179
|
-
};
|
|
180
|
-
declare const exists: {
|
|
181
|
-
readonly resolve: (context: LocatorContext, _options?: OperationOptions) => boolean;
|
|
182
|
-
};
|
|
183
|
-
//#endregion
|
|
184
|
-
//#region ../frame-locator/lib/modules.d.ts
|
|
185
151
|
declare const defaultModules: {
|
|
186
152
|
readonly element: {
|
|
187
153
|
readonly selectors: {
|
|
@@ -332,8 +298,6 @@ type Extended<B extends Modules, S extends ModulesSpec> = {
|
|
|
332
298
|
element: MergeKind<B['element'], S['element']>;
|
|
333
299
|
frame: MergeKind<B['frame'], S['frame']>;
|
|
334
300
|
};
|
|
335
|
-
//#endregion
|
|
336
|
-
//#region ../frame-locator/lib/chain.d.ts
|
|
337
301
|
type ArgsOf<M> = M extends {
|
|
338
302
|
resolve: (context: never, ...args: infer A) => unknown;
|
|
339
303
|
} ? A : never;
|
|
@@ -360,8 +324,6 @@ type Chain<M extends Modules, K extends ChainKind, R extends Rewrites = {}> = {
|
|
|
360
324
|
};
|
|
361
325
|
type Locator$1<M extends Modules = DefaultModules, R extends Rewrites = {}> = Chain<M, 'element', R>;
|
|
362
326
|
type FrameLocator$1<M extends Modules = DefaultModules, R extends Rewrites = {}> = Chain<M, 'frame', R>;
|
|
363
|
-
//#endregion
|
|
364
|
-
//#region ../web-extension/lib/lib/revivables/fetch-compat.d.ts
|
|
365
327
|
type HeaderEntries = [string, string][];
|
|
366
328
|
declare const headersType: 'headers';
|
|
367
329
|
type BoxedHeaders = BoxBase<typeof headersType> & {
|
|
@@ -443,8 +405,6 @@ declare const createVideoElementHandle: (element: HTMLVideoElement) => RemoteVid
|
|
|
443
405
|
declare const isType: (value: unknown) => value is RemoteVideoElement;
|
|
444
406
|
declare const box: <T extends RemoteVideoElement, T2 extends RevivableContext>(value: T, context: T2) => BoxedVideoElement;
|
|
445
407
|
declare const revive: <T extends BoxedVideoElement, T2 extends RevivableContext>(value: T, context: T2) => T[UnderlyingType];
|
|
446
|
-
//#endregion
|
|
447
|
-
//#region ../web-extension/lib/lib/revivables/index.d.ts
|
|
448
408
|
declare const handleRevivableModules: (defaults: DefaultRevivableModules) => readonly [typeof video_d_exports, {
|
|
449
409
|
type: "headers";
|
|
450
410
|
isType: (value: unknown) => value is Headers;
|
|
@@ -489,8 +449,6 @@ declare const handleRevivableModules: (defaults: DefaultRevivableModules) => rea
|
|
|
489
449
|
readonly box: (_value: never, _context: import("osra").RevivableContext<any>) => import("osra/build/revivables/fallbacks").BoxedUnclonable;
|
|
490
450
|
readonly revive: (_value: import("osra/build/revivables/fallbacks").BoxedUnclonable, _context: import("osra").RevivableContext<any>) => Record<string, never>;
|
|
491
451
|
}];
|
|
492
|
-
//#endregion
|
|
493
|
-
//#region ../web-extension/lib/lib/locator-modules.d.ts
|
|
494
452
|
type LocatorOptions = OperationOptions & {
|
|
495
453
|
/**
|
|
496
454
|
* The app's sentence for the permission prompt this call may raise, at most `MAX_REASON_LENGTH`
|
|
@@ -703,8 +661,6 @@ declare const locatorModules: Extended<{
|
|
|
703
661
|
};
|
|
704
662
|
}>;
|
|
705
663
|
type LocatorModules = typeof locatorModules;
|
|
706
|
-
//#endregion
|
|
707
|
-
//#region ../web-extension/lib/lib/locator-rewrites.d.ts
|
|
708
664
|
declare const locatorRewrites: {
|
|
709
665
|
readonly element: {
|
|
710
666
|
readonly last: {
|
|
@@ -728,8 +684,6 @@ declare const locatorRewrites: {
|
|
|
728
684
|
};
|
|
729
685
|
};
|
|
730
686
|
type LocatorRewrites = typeof locatorRewrites;
|
|
731
|
-
//#endregion
|
|
732
|
-
//#region ../web-extension/lib/permission/shared/permission.d.ts
|
|
733
687
|
/**
|
|
734
688
|
* The four categories a grant is asked and stored under. Every descriptor names one, so a key
|
|
735
689
|
* without a category does not compile. Category ids carry no dot and registry keys always do, so the
|
|
@@ -755,8 +709,6 @@ type CategoryMeta = {
|
|
|
755
709
|
};
|
|
756
710
|
/** The four categories, in display order. The word Storage never appears: it already means FKN account storage. */
|
|
757
711
|
declare const CATEGORIES: readonly CategoryMeta[];
|
|
758
|
-
//#endregion
|
|
759
|
-
//#region ../web-extension/lib/permission/shared/registry.d.ts
|
|
760
712
|
/** Every shipped descriptor. The derived values below read the ACTIVE registry, which is this list unless a test swapped it. */
|
|
761
713
|
declare const PERMISSIONS: readonly [{
|
|
762
714
|
readonly scope: 'read.text';
|
|
@@ -915,8 +867,6 @@ declare const PERMISSIONS: readonly [{
|
|
|
915
867
|
readonly description: 'Lets the app set or remove headers (like Origin and Referer) on this page’s own requests to the listed sites.';
|
|
916
868
|
}];
|
|
917
869
|
type PermissionScope = (typeof PERMISSIONS)[number]['scope'];
|
|
918
|
-
//#endregion
|
|
919
|
-
//#region ../web-extension/lib/permission/shared/category-request.d.ts
|
|
920
870
|
/** What one ask was answered. `key` is set only where the ask named a critical key, which is granted on its own row. */
|
|
921
871
|
type CategoryAnswer = {
|
|
922
872
|
category: PermissionCategory;
|
|
@@ -924,8 +874,6 @@ type CategoryAnswer = {
|
|
|
924
874
|
hosts: string[];
|
|
925
875
|
allow: boolean;
|
|
926
876
|
};
|
|
927
|
-
//#endregion
|
|
928
|
-
//#region ../web-extension/lib/lib/permissions.d.ts
|
|
929
877
|
/**
|
|
930
878
|
* One whole category, asked for at once. The category is the unit the user grants, so accepting it
|
|
931
879
|
* covers every capability in it on the hosts the ask names.
|
|
@@ -985,8 +933,6 @@ declare const permissions: {
|
|
|
985
933
|
*/
|
|
986
934
|
request: (requests: PermissionRequest[]) => Promise<PermissionGrant[]>;
|
|
987
935
|
};
|
|
988
|
-
//#endregion
|
|
989
|
-
//#region ../web-extension/lib/lib/frame-core.d.ts
|
|
990
936
|
/**
|
|
991
937
|
* Elements in an attached frame, found again on every call. Playwright's members where FKN has
|
|
992
938
|
* Playwright's meaning, plus `exists`, `videoElement` and the `reason` option. `last()` is the last
|
|
@@ -1785,15 +1731,11 @@ type FrameBackendEvent = {
|
|
|
1785
1731
|
origin: string;
|
|
1786
1732
|
};
|
|
1787
1733
|
declare const createFrame: (backend: FrameBackend) => Frame;
|
|
1788
|
-
//#endregion
|
|
1789
|
-
//#region ../web-extension/lib/lib/frame-window.d.ts
|
|
1790
1734
|
/** `attachFrame` in both of its shapes: an iframe the app mounted, or a window it opens. */
|
|
1791
1735
|
type AttachFrameFunction = {
|
|
1792
1736
|
(options: AttachWindowOptions): Promise<WindowFrame>;
|
|
1793
1737
|
(options: AttachFrameOptions): Promise<Frame>;
|
|
1794
1738
|
};
|
|
1795
|
-
//#endregion
|
|
1796
|
-
//#region ../web-extension/lib/lib/frame.d.ts
|
|
1797
1739
|
declare const ATTACH_FRAME_EVENT_KEY = "FKN_WEB_EXTENSION_ATTACH_FRAME_EVENT_KEY";
|
|
1798
1740
|
/**
|
|
1799
1741
|
* Attaches through the extension, on `cookies: 'native'` only: the other values, the default
|
|
@@ -1804,5 +1746,4 @@ declare const ATTACH_FRAME_EVENT_KEY = "FKN_WEB_EXTENSION_ATTACH_FRAME_EVENT_KEY
|
|
|
1804
1746
|
* before anything is armed.
|
|
1805
1747
|
*/
|
|
1806
1748
|
declare const attachFrame: AttachFrameFunction;
|
|
1807
|
-
//#endregion
|
|
1808
1749
|
export { Gate as $, WindowFrame as A, CATEGORIES as B, FrameWindowRefusal as C, RelayChoice as D, Locator as E, CategoryRequest as F, RemoteVideoElement as G, PermissionCategory as H, LegacyPermissionRequest as I, createVideoElementHandle as J, VideoElementState as K, PermissionGrant as L, createFrame as M, gotoPermission as N, StorageState as O, CategoryGrant as P, Executor as Q, PermissionRequest as R, FrameWindowOptions as S, GotoOptions as T, handleRevivableModules as U, CategoryMeta as V, BoxedVideoElement as W, revive as X, isType as Y, type as Z, FrameEventMap as _, AttachCookies as a, FramePostMessageOptions as b, BlankPage as c, CookieMatchWire as d, GateTools as et, Frame as f, FrameEventListener as g, FrameDocumentEvent as h, AddScriptTagOptions as i, attachFramePermission as j, StorageStateCookie as k, ClearCookiesOptions as l, FrameBackendEvent as m, attachFrame as n, SelectorPart as nt, AttachFrameOptions as o, FrameBackend as p, box as q, AttachFrameFunction as r, AttachWindowOptions as s, ATTACH_FRAME_EVENT_KEY as t, OperationRequest as tt, ClearCookiesWire as u, FrameLocator as v, FrameWindowRefusedError as w, FrameWindowBlockedError as x, FrameMessageEvent as y, permissions as z };
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import { a as WriteData, i as Stats, n as MakeOptions, o as WriteOptions, r as ReadOptions, t as Callback } from "./index-
|
|
2
|
-
import { a as StorageAccountChangedError,
|
|
3
|
-
import { c as STORAGE_ACCOUNT_CHANGED, l as STORAGE_ACCOUNT_PIN_UNSUPPORTED } from "./messages-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { a as WriteData$1, i as Stats, n as MakeOptions, o as WriteOptions, r as ReadOptions, t as Callback } from "./index-CcVwh9yz.js";
|
|
2
|
+
import { a as StorageAccountChangedError, f as isAccountChanged, i as SealedRead, o as StorageAccountPinUnsupportedError } from "./account-storage-UmSfF63A.js";
|
|
3
|
+
import { c as STORAGE_ACCOUNT_CHANGED, l as STORAGE_ACCOUNT_PIN_UNSUPPORTED } from "./messages-B9dOXntM.js";
|
|
4
|
+
type WriteData = Blob | ArrayBuffer | Uint8Array | string;
|
|
5
|
+
/**
|
|
6
|
+
* Which account a cloud call belongs to; library plumbing app code never passes. A multi-call
|
|
7
|
+
* operation (a rename, a mount, a queue drain) captures one at its start so no call lands in an
|
|
8
|
+
* account the realm switched to meanwhile. `{ generation }` is a ticket from `captureAccount()`;
|
|
9
|
+
* `{ pin }` is the pin a queued entry was stamped with, sent as is.
|
|
10
|
+
*/
|
|
11
|
+
type PinFrom = {
|
|
12
|
+
readonly generation: number;
|
|
13
|
+
} | {
|
|
14
|
+
readonly pin: string;
|
|
15
|
+
};
|
|
16
|
+
type PinOptions = {
|
|
17
|
+
pin?: PinFrom;
|
|
18
|
+
};
|
|
9
19
|
declare const pending$1: () => string[];
|
|
10
20
|
declare const pendingDeletes$1: () => string[];
|
|
11
21
|
declare const replicating$1: () => boolean;
|
|
12
|
-
declare const list: (opts?: PinOptions) => Promise<FileEntry[]>;
|
|
13
|
-
declare const readFile$1: (path: string, opts?: PinOptions) => Promise<Blob>;
|
|
14
22
|
declare const readFileSealed$1: (path: string, opts?: PinOptions) => Promise<SealedRead>;
|
|
15
|
-
declare const writeFile$1: (path: string, data: WriteData$1, opts?: {
|
|
16
|
-
contentType?: string;
|
|
17
|
-
} & PinOptions) => Promise<void>;
|
|
18
|
-
declare const remove: (path: string, opts?: PinOptions) => Promise<void>;
|
|
19
23
|
declare const pull$1: (path: string) => Promise<Blob>;
|
|
20
24
|
type AdoptSummary = {
|
|
21
25
|
uploaded: string[];
|
|
@@ -51,7 +55,7 @@ type FileConflict = {
|
|
|
51
55
|
* that crossed a realm (osra) arrives as a different object, so it reads as a merge: one redundant
|
|
52
56
|
* write, never a wrong file.
|
|
53
57
|
*/
|
|
54
|
-
type ConflictResolution = WriteData
|
|
58
|
+
type ConflictResolution = WriteData | null;
|
|
55
59
|
type ConflictResolver = (conflict: FileConflict) => Promise<ConflictResolution> | ConflictResolution;
|
|
56
60
|
declare const onConflict$1: (next: ConflictResolver) => (() => void);
|
|
57
61
|
/**
|
|
@@ -67,18 +71,18 @@ declare const adoptable$1: () => Promise<{
|
|
|
67
71
|
declare namespace index_d_exports {
|
|
68
72
|
export { AdoptSummary, ConflictResolution, ConflictResolver, ConflictSide, FileConflict, STORAGE_ACCOUNT_CHANGED, STORAGE_ACCOUNT_PIN_UNSUPPORTED, SealedRead, Stats, StorageAccountChangedError, StorageAccountPinUnsupportedError, adopt, adoptable, appendFile, appendFileSync, available, _default as default, exists, existsSync, flush, isAccountChanged, lstatSync, mkdir, mkdirSync, mount, onConflict, pending, pendingDeletes, promises, pull, readFile, readFileSealed, readFileSync, readdir, readdirSync, remount, rename, renameSync, replicating, rm, rmSync, rmdirSync, stat, statSync, unlink, unlinkSync, writeFile, writeFileSync };
|
|
69
73
|
}
|
|
70
|
-
declare const available: () => Promise<boolean>, readFileSync: (path: import("node:fs").PathLike, options?: ReadOptions) => Buffer | string, writeFileSync: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => void, appendFileSync: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => void, existsSync: (path: import("node:fs").PathLike) => boolean, statSync: (path: import("node:fs").PathLike) => Stats, lstatSync: (path: import("node:fs").PathLike) => Stats, readdirSync: (path: import("node:fs").PathLike) => string[], mkdirSync: (path: import("node:fs").PathLike, options?: MakeOptions) => void, rmSync: (path: import("node:fs").PathLike, options?: {
|
|
74
|
+
declare const available: () => Promise<boolean>, readFileSync: (path: import("node:fs").PathLike, options?: ReadOptions) => Buffer | string, writeFileSync: (path: import("node:fs").PathLike, data: WriteData$1, options?: WriteOptions) => void, appendFileSync: (path: import("node:fs").PathLike, data: WriteData$1, options?: WriteOptions) => void, existsSync: (path: import("node:fs").PathLike) => boolean, statSync: (path: import("node:fs").PathLike) => Stats, lstatSync: (path: import("node:fs").PathLike) => Stats, readdirSync: (path: import("node:fs").PathLike) => string[], mkdirSync: (path: import("node:fs").PathLike, options?: MakeOptions) => void, rmSync: (path: import("node:fs").PathLike, options?: {
|
|
71
75
|
recursive?: boolean;
|
|
72
76
|
force?: boolean;
|
|
73
77
|
}) => void, rmdirSync: (path: import("node:fs").PathLike, options?: {
|
|
74
78
|
recursive?: boolean;
|
|
75
|
-
}) => void, unlinkSync: (path: import("node:fs").PathLike) => void, renameSync: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => void, readFile: (path: import("node:fs").PathLike, a: ReadOptions | Callback<Buffer | string>, b?: Callback<Buffer | string>) => void, writeFile: (path: import("node:fs").PathLike, data: WriteData, a: WriteOptions | Callback<void>, b?: Callback<void>) => void, appendFile: (path: import("node:fs").PathLike, data: WriteData, a: WriteOptions | Callback<void>, b?: Callback<void>) => void, stat: (path: import("node:fs").PathLike, callback: Callback<Stats>) => void, readdir: (path: import("node:fs").PathLike, a: unknown, b?: Callback<string[]>) => void, mkdir: (path: import("node:fs").PathLike, a: MakeOptions | Callback<void>, b?: Callback<void>) => void, rm: (path: import("node:fs").PathLike, a: {
|
|
79
|
+
}) => void, unlinkSync: (path: import("node:fs").PathLike) => void, renameSync: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => void, readFile: (path: import("node:fs").PathLike, a: ReadOptions | Callback<Buffer | string>, b?: Callback<Buffer | string>) => void, writeFile: (path: import("node:fs").PathLike, data: WriteData$1, a: WriteOptions | Callback<void>, b?: Callback<void>) => void, appendFile: (path: import("node:fs").PathLike, data: WriteData$1, a: WriteOptions | Callback<void>, b?: Callback<void>) => void, stat: (path: import("node:fs").PathLike, callback: Callback<Stats>) => void, readdir: (path: import("node:fs").PathLike, a: unknown, b?: Callback<string[]>) => void, mkdir: (path: import("node:fs").PathLike, a: MakeOptions | Callback<void>, b?: Callback<void>) => void, rm: (path: import("node:fs").PathLike, a: {
|
|
76
80
|
recursive?: boolean;
|
|
77
81
|
force?: boolean;
|
|
78
82
|
} | Callback<void>, b?: Callback<void>) => void, unlink: (path: import("node:fs").PathLike, callback: Callback<void>) => void, rename: (from: import("node:fs").PathLike, to: import("node:fs").PathLike, callback: Callback<void>) => void, exists: (path: import("node:fs").PathLike, callback: (exists: boolean) => void) => void, promises: {
|
|
79
83
|
readFile: (path: import("node:fs").PathLike, options?: ReadOptions) => Promise<Buffer | string>;
|
|
80
|
-
writeFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>;
|
|
81
|
-
appendFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>;
|
|
84
|
+
writeFile: (path: import("node:fs").PathLike, data: WriteData$1, options?: WriteOptions) => Promise<void>;
|
|
85
|
+
appendFile: (path: import("node:fs").PathLike, data: WriteData$1, options?: WriteOptions) => Promise<void>;
|
|
82
86
|
stat: (path: import("node:fs").PathLike) => Promise<Stats>;
|
|
83
87
|
lstat: (path: import("node:fs").PathLike) => Promise<Stats>;
|
|
84
88
|
readdir: (path: import("node:fs").PathLike) => Promise<string[]>;
|
|
@@ -105,8 +109,8 @@ declare const onConflict: typeof onConflict$1;
|
|
|
105
109
|
declare const _default: {
|
|
106
110
|
available: () => Promise<boolean>;
|
|
107
111
|
readFileSync: (path: import("node:fs").PathLike, options?: ReadOptions) => Buffer | string;
|
|
108
|
-
writeFileSync: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => void;
|
|
109
|
-
appendFileSync: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => void;
|
|
112
|
+
writeFileSync: (path: import("node:fs").PathLike, data: WriteData$1, options?: WriteOptions) => void;
|
|
113
|
+
appendFileSync: (path: import("node:fs").PathLike, data: WriteData$1, options?: WriteOptions) => void;
|
|
110
114
|
existsSync: (path: import("node:fs").PathLike) => boolean;
|
|
111
115
|
statSync: (path: import("node:fs").PathLike) => Stats;
|
|
112
116
|
lstatSync: (path: import("node:fs").PathLike) => Stats;
|
|
@@ -122,8 +126,8 @@ declare const _default: {
|
|
|
122
126
|
unlinkSync: (path: import("node:fs").PathLike) => void;
|
|
123
127
|
renameSync: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => void;
|
|
124
128
|
readFile: (path: import("node:fs").PathLike, a: ReadOptions | Callback<Buffer | string>, b?: Callback<Buffer | string>) => void;
|
|
125
|
-
writeFile: (path: import("node:fs").PathLike, data: WriteData, a: WriteOptions | Callback<void>, b?: Callback<void>) => void;
|
|
126
|
-
appendFile: (path: import("node:fs").PathLike, data: WriteData, a: WriteOptions | Callback<void>, b?: Callback<void>) => void;
|
|
129
|
+
writeFile: (path: import("node:fs").PathLike, data: WriteData$1, a: WriteOptions | Callback<void>, b?: Callback<void>) => void;
|
|
130
|
+
appendFile: (path: import("node:fs").PathLike, data: WriteData$1, a: WriteOptions | Callback<void>, b?: Callback<void>) => void;
|
|
127
131
|
stat: (path: import("node:fs").PathLike, callback: Callback<Stats>) => void;
|
|
128
132
|
readdir: (path: import("node:fs").PathLike, a: unknown, b?: Callback<string[]>) => void;
|
|
129
133
|
mkdir: (path: import("node:fs").PathLike, a: MakeOptions | Callback<void>, b?: Callback<void>) => void;
|
|
@@ -136,8 +140,8 @@ declare const _default: {
|
|
|
136
140
|
exists: (path: import("node:fs").PathLike, callback: (exists: boolean) => void) => void;
|
|
137
141
|
promises: {
|
|
138
142
|
readFile: (path: import("node:fs").PathLike, options?: ReadOptions) => Promise<Buffer | string>;
|
|
139
|
-
writeFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>;
|
|
140
|
-
appendFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>;
|
|
143
|
+
writeFile: (path: import("node:fs").PathLike, data: WriteData$1, options?: WriteOptions) => Promise<void>;
|
|
144
|
+
appendFile: (path: import("node:fs").PathLike, data: WriteData$1, options?: WriteOptions) => Promise<void>;
|
|
141
145
|
stat: (path: import("node:fs").PathLike) => Promise<Stats>;
|
|
142
146
|
lstat: (path: import("node:fs").PathLike) => Promise<Stats>;
|
|
143
147
|
readdir: (path: import("node:fs").PathLike) => Promise<string[]>;
|
|
@@ -165,5 +169,4 @@ declare const _default: {
|
|
|
165
169
|
replicating: typeof replicating$1;
|
|
166
170
|
onConflict: typeof onConflict$1;
|
|
167
171
|
};
|
|
168
|
-
//#endregion
|
|
169
172
|
export { rmSync as A, ConflictResolver as B, readdir as C, renameSync as D, rename as E, unlinkSync as F, FileConflict as H, writeFile as I, writeFileSync as L, stat as M, statSync as N, replicating as O, unlink as P, AdoptSummary as R, readFileSync as S, remount as T, ConflictSide as V, pendingDeletes as _, appendFileSync as a, readFile as b, existsSync as c, lstatSync as d, mkdir as f, pending as g, onConflict as h, appendFile as i, rmdirSync as j, rm as k, flush as l, mount as m, adopt as n, available as o, mkdirSync as p, adoptable as r, exists as s, _default as t, index_d_exports as u, promises as v, readdirSync as w, readFileSealed as x, pull as y, ConflictResolution as z };
|
package/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./lib-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./lib-Bs-g5jyp.cjs"),n=require("./extension-BXBjpypy.cjs"),r=require("./api-DrvhPN56.cjs"),i=require("./busy-BXbVH595.cjs"),a=require("./contract.cjs"),o=require("./relay-choice-JC_JJY_M.cjs"),s=require("./cloud-TN0eDUy3.cjs"),c=require("./dns-2v96zoEh.cjs"),l=require("./net-Dk2kqtgE.cjs"),u=require("./dgram-D9ljiUFh.cjs"),d=require("./http-BE3UBktN.cjs"),f=require("./desktop-vXKU4wEK.cjs"),p=require("./account-m2iCmNui.cjs"),m=require("./fs--MLHvMW-.cjs"),h=require("./opfs-DuXvTgIl.cjs"),g=require("./packages-DT8vPB5_.cjs"),_=require("./rooms-DHFS9cwA.cjs"),v=require("./storage-BCjYihUO.cjs"),y=require("./connect-button-BpXDs7tw.cjs");let b=require("osra");var x=(async e=>{let{kind:n,cookies:r}=t.o(e);if(n===`window`){let n=e;return r===`native`?t.a(n):s.i(n)}let i=e;return r===`native`?S(i):s.i(i)}),S=e=>(s.a(e),t.a(e)),C=`https://fkn.app`,w=async(e,t)=>{if(typeof window>`u`)throw Error(`FKN @fkn/lib: relayWorker must be called from the main thread`);let n=await r.f;if(!n)throw Error(`FKN @fkn/lib: relayWorker found no FKN transport in this realm`);r.d(),i.r(`relayed worker`,t?.unregisterSignal);let a=n.emit instanceof MessagePort?{}:{originA:t?.originA??C,originB:t?.originB??`*`};(0,b.relay)(n,e,{key:`fkn-api`,...a,unregisterSignal:t?.unregisterSignal})},T=async()=>typeof window>`u`?!1:(await r.o).connect.prompt(location.origin).catch(()=>!1),E=async()=>typeof window>`u`?null:(await r.o).relay.prompt().catch(()=>null),D=new Set,O=e=>(D.add(e),()=>{D.delete(e)}),k=()=>{if(D.size===0)return!1;for(let e of[...D])try{e()}catch{}return!0},A=(e,t)=>{if(typeof e?.onUpdateTaken==`function`)return Promise.resolve(e.onUpdateTaken(t))},j=e.t({applyUpdate:()=>W,busyReasons:()=>U,onUpdate:()=>R,onUpdateTaken:()=>z,updateReady:()=>M}),M=async()=>typeof window>`u`?!1:r.o.then(e=>e.shell?.updateReady()).then(e=>e===!0).catch(()=>!1),N=new Set,P=!1,F=()=>{P=!0;for(let e of[...N])try{e()}catch{}},I=0,L=()=>{let e=r.c();e&&N.size!==0&&I!==e.epoch&&(I=e.epoch,P=!1,Promise.resolve(e.remote.shell?.onUpdate(F)).catch(()=>{I===e.epoch&&(I=0)}))};typeof window<`u`&&r.u(L);var R=async e=>{if(typeof window>`u`)return()=>{};if(N.add(e),P)try{e()}catch{}return L(),()=>{N.delete(e)}},z=e=>typeof window>`u`?()=>{}:O(e),B=0,V=!1,H=()=>{if(!k()&&!V){V=!0;try{location.reload()}catch{}}};typeof window<`u`&&r.u(()=>{let e=r.c();if(!e||B===e.epoch)return;B=e.epoch;let t=A(e.remote.shell,H);t?t.catch(()=>{B===e.epoch&&(B=0)}):B=0});var U=()=>i.n(),W=async()=>typeof window>`u`?!1:r.o.then(e=>e.shell?.applyUpdate()).then(e=>e===!0).catch(()=>!1);exports.ATTACH_FRAME_EVENT_KEY=t.i,exports.BACKGROUND_STOPPED=n.a,exports.CATEGORIES=t.w,exports.EXTENSION_ABI=t.st,exports.ExtensionOperationUnsupportedError=t.ct,exports.ExtensionOutdatedError=t.lt,exports.FORGEABLE_HEADERS=t.Q,exports.FrameWindowBlockedError=t.g,exports.FrameWindowRefusedError=t._,exports.LOCATOR_DENIED=t.A,exports.LOCATOR_ERROR=t.F,exports.LOCATOR_INVALID=t.L,exports.LOCATOR_UNSUPPORTED=t.D,exports.MAX_REASON_LENGTH=t.X,exports.PERMISSION_DENIED=t.t,exports.RELAY_UNAVAILABLE=a.RELAY_UNAVAILABLE,exports.REQUIRED_EXTENSION_ABI=t.ut,exports.TimeoutError=t.E,Object.defineProperty(exports,"account",{enumerable:!0,get:function(){return p.t}}),exports.assertAttachableFrameUrl=t.x,exports.assertFetchableUrl=t.U,exports.assertForgeableHeaders=t.$,exports.assertLockdownApplicable=t.S,exports.assertOneCookieIdentity=t.et,exports.attachFrame=x,exports.attachFramePermission=t.v,exports.box=t.pt,Object.defineProperty(exports,"cloud",{enumerable:!0,get:function(){return s.n}}),exports.connect=T,exports.connectButtonUrl=y.t,exports.cookies=t.V,exports.createFrame=t.y,exports.createVideoElementHandle=t.mt,Object.defineProperty(exports,"desktop",{enumerable:!0,get:function(){return f.n}}),Object.defineProperty(exports,"dgram",{enumerable:!0,get:function(){return u.i}}),Object.defineProperty(exports,"dns",{enumerable:!0,get:function(){return c.t}}),Object.defineProperty(exports,"extension",{enumerable:!0,get:function(){return n.t}}),exports.fetch=n.n,exports.fetchCredentialedPermission=t.G,exports.fetchLocalPermission=t.K,exports.fetchPermission=t.q,Object.defineProperty(exports,"fs",{enumerable:!0,get:function(){return m.u}}),exports.gotoPermission=t.b,exports.handleRevivableModules=t.ft,exports.hasForgedCookie=t.tt,Object.defineProperty(exports,"http",{enumerable:!0,get:function(){return d.p}}),exports.isBackgroundStopped=n.o,exports.isBlockedFetchUrl=t.J,exports.isBlockedFrameUrl=t.C,exports.isExtensionExposed=t.rt,exports.isLocalNetworkUrl=t.Y,exports.isLocatorDenied=t.I,exports.isLocatorInvalid=t.M,exports.isLocatorUnsupported=t.O,exports.isPermissionDenied=t.n,exports.isRelayUnavailable=o.n,exports.isTerminalError=t.P,exports.isType=t.ht,exports.modifyRequestHeadersPermission=t.R,Object.defineProperty(exports,"net",{enumerable:!0,get:function(){return l.s}}),Object.defineProperty(exports,"opfs",{enumerable:!0,get:function(){return h.f}}),Object.defineProperty(exports,"packages",{enumerable:!0,get:function(){return g.u}}),exports.permissions=t.r,exports.promptInstall=n.i,exports.promptRelay=E,exports.readCookiePermission=t.H,exports.readExtensionHandshake=t.it,exports.relayOf=o.r,exports.relayWorker=w,exports.removeRequestHeaderRule=t.z,exports.revive=t.gt,Object.defineProperty(exports,"rooms",{enumerable:!0,get:function(){return _.a}}),exports.setMissingExtensionHandler=t.at,exports.setRequestHeaderRule=t.B,Object.defineProperty(exports,"shell",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"storage",{enumerable:!0,get:function(){return v.o}}),exports.supportsOperation=t.dt,exports.type=t._t,exports.waitForExtensionExposure=t.ot;
|
package/index.d.ts
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
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, nt as SelectorPart, o as AttachFrameOptions, p as FrameBackend, q as box, r as AttachFrameFunction, 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-
|
|
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, 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, 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, n as fetch, nt as isTerminalError, o as isExtensionExposed, p as ExtensionOutdatedError, q as hasForgedCookie, s as readExtensionHandshake, t as extension_d_exports, 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
|
-
import { K as RELAY_UNAVAILABLE } from "./contract-
|
|
4
|
-
import {
|
|
5
|
-
import { n as cloud_d_exports } from "./cloud-
|
|
6
|
-
import { t as dns_d_exports } from "./dns.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { t as connectButtonUrl } from "./connect-button-
|
|
18
|
-
//#region src/frame.d.ts
|
|
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, nt as SelectorPart, o as AttachFrameOptions, p as FrameBackend, q as box, r as AttachFrameFunction, 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-Cu5EcdK0.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, 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, 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, n as fetch, nt as isTerminalError, o as isExtensionExposed, p as ExtensionOutdatedError, q as hasForgedCookie, s as readExtensionHandshake, t as extension_d_exports, 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-D98KM8W7.js";
|
|
3
|
+
import { K as RELAY_UNAVAILABLE } from "./contract-0rua6Wsh.js";
|
|
4
|
+
import { n as account_d_exports } from "./account-Bm7uIcQo.js";
|
|
5
|
+
import { n as cloud_d_exports } from "./cloud-BoH54gaM.js";
|
|
6
|
+
import { t as dns_d_exports } from "./dns-DyB4K2oE.js";
|
|
7
|
+
import { u as index_d_exports } from "./index-D6GPJ4Ow.js";
|
|
8
|
+
import { i as relayOf, n as RelayUnavailableError, r as isRelayUnavailable } from "./relay-choice-DOUttUnL.js";
|
|
9
|
+
import { s as net_d_exports } from "./net-mVAYXs8e.js";
|
|
10
|
+
import { i as dgram_d_exports } from "./dgram-BYk-QDHW.js";
|
|
11
|
+
import { _ as http_d_exports } from "./http-CDhG4bUc.js";
|
|
12
|
+
import { n as desktop_d_exports } from "./desktop-DOubT4ES.js";
|
|
13
|
+
import { c as index_d_exports$1 } from "./index-CUWTpQKP.js";
|
|
14
|
+
import { S as packages_d_exports } from "./packages-BEadIy_h.js";
|
|
15
|
+
import { s as rooms_d_exports } from "./rooms-C6mbannC.js";
|
|
16
|
+
import { c as storage_d_exports } from "./storage-DpCLksAa.js";
|
|
17
|
+
import { t as connectButtonUrl } from "./connect-button-2FmOM8ai.js";
|
|
19
18
|
/**
|
|
20
19
|
* Attaches FKN to an iframe the app mounted, or with `{ window }` opens the attachment in a window
|
|
21
20
|
* of its own. `cookies` picks the jar and with it the backend (`AttachCookies`): `'persistent'`, the
|
|
@@ -33,8 +32,6 @@ import { t as connectButtonUrl } from "./connect-button-Cp0NS95-.js";
|
|
|
33
32
|
* waited for, so the same click can still open one on another value.
|
|
34
33
|
*/
|
|
35
34
|
export declare const attachFrame: AttachFrameFunction;
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region src/relay.d.ts
|
|
38
35
|
/**
|
|
39
36
|
* Bridges a worker into the FKN API: once called, the worker can import `@fkn/lib` and use `net` /
|
|
40
37
|
* `dgram` exactly like the main thread. Main thread only.
|
|
@@ -52,11 +49,7 @@ export declare const relayWorker: (worker: Worker, options?: {
|
|
|
52
49
|
originA?: string;
|
|
53
50
|
originB?: string;
|
|
54
51
|
}) => Promise<void>;
|
|
55
|
-
//#endregion
|
|
56
|
-
//#region src/connect.d.ts
|
|
57
52
|
export declare const connect: () => Promise<boolean>;
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region src/relay-prompt.d.ts
|
|
60
53
|
export declare const promptRelay: () => Promise<string | null>;
|
|
61
54
|
declare namespace shell_d_exports {
|
|
62
55
|
export { applyUpdate, busyReasons, onUpdate, onUpdateTaken, updateReady };
|
|
@@ -129,5 +122,4 @@ declare const busyReasons: () => string[];
|
|
|
129
122
|
* safe. Check `busyReasons()` first if the app has no better signal of its own.
|
|
130
123
|
*/
|
|
131
124
|
declare const applyUpdate: () => Promise<boolean>;
|
|
132
|
-
//#endregion
|
|
133
125
|
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, RELAY_UNAVAILABLE, REQUIRED_EXTENSION_ABI, RelayChoice, type RelayUnavailableError, RemoteVideoElement, RequestHeaderRule, type SelectorPart, SiteCookie, StorageState, StorageStateCookie, TimeoutError, VideoElementState, WindowFrame, account_d_exports as account, assertAttachableFrameUrl, assertFetchableUrl, assertForgeableHeaders, assertLockdownApplicable, assertOneCookieIdentity, attachFramePermission, box, cloud_d_exports as cloud, connectButtonUrl, cookies, createFrame, createVideoElementHandle, desktop_d_exports as desktop, dgram_d_exports as dgram, dns_d_exports as dns, extension_d_exports as extension, fetch, fetchCredentialedPermission, fetchLocalPermission, fetchPermission, index_d_exports as fs, gotoPermission, handleRevivableModules, hasForgedCookie, http_d_exports as http, isBackgroundStopped, isBlockedFetchUrl, isBlockedFrameUrl, isExtensionExposed, isLocalNetworkUrl, isLocatorDenied, isLocatorInvalid, isLocatorUnsupported, isPermissionDenied, isRelayUnavailable, isTerminalError, isType, modifyRequestHeadersPermission, net_d_exports as net, index_d_exports$1 as opfs, packages_d_exports as packages, permissions, promptInstall, readCookiePermission, readExtensionHandshake, relayOf, removeRequestHeaderRule, revive, rooms_d_exports as rooms, setMissingExtensionHandler, setRequestHeaderRule, shell_d_exports as shell, storage_d_exports as storage, supportsOperation, type, waitForExtensionExposure };
|
package/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-
|
|
2
|
-
import { $ as t, A as n, B as r, C as i, D as ee, E as te, F as ne, G as re, H as ie, I as ae, J as oe, K as se, L as ce, M as le, O as ue, P as de, Q as fe, R as a, S as o, U as s, V as c, X as l, Y as u, _ as d, _t as f, a as p, at as m, b as h, ct as g, dt as _, et as v, ft as y, g as b, gt as x, ht as S, i as C, it as w, lt as T, mt as E, n as D, o as O, ot as k, pt as A, q as j, r as M, rt as N, st as P, t as F, tt as I, ut as L, v as R, w as z, x as B, y as V, z as pe } from "./lib-
|
|
3
|
-
import { a as H, i as me, n as he, o as ge, t as _e } from "./extension-
|
|
4
|
-
import { c as U, d as ve, f as ye, o as W, u as G } from "./api-
|
|
5
|
-
import { n as be, r as xe } from "./busy-
|
|
1
|
+
import { t as e } from "./rolldown-runtime-CGnMp29N.js";
|
|
2
|
+
import { $ as t, A as n, B as r, C as i, D as ee, E as te, F as ne, G as re, H as ie, I as ae, J as oe, K as se, L as ce, M as le, O as ue, P as de, Q as fe, R as a, S as o, U as s, V as c, X as l, Y as u, _ as d, _t as f, a as p, at as m, b as h, ct as g, dt as _, et as v, ft as y, g as b, gt as x, ht as S, i as C, it as w, lt as T, mt as E, n as D, o as O, ot as k, pt as A, q as j, r as M, rt as N, st as P, t as F, tt as I, ut as L, v as R, w as z, x as B, y as V, z as pe } from "./lib-CtJaID_y.js";
|
|
3
|
+
import { a as H, i as me, n as he, o as ge, t as _e } from "./extension-D5UMnEmQ.js";
|
|
4
|
+
import { c as U, d as ve, f as ye, o as W, u as G } from "./api-DRglK7ft.js";
|
|
5
|
+
import { n as be, r as xe } from "./busy-C1JPjoZ_.js";
|
|
6
6
|
import { RELAY_UNAVAILABLE as Se } from "./contract.js";
|
|
7
|
-
import { n as Ce, r as we } from "./relay-choice-
|
|
8
|
-
import { a as Te, i as K, n as Ee } from "./cloud-
|
|
9
|
-
import { t as De } from "./dns.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { t as Me } from "./account.js";
|
|
15
|
-
import { u as Ne } from "./fs-
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { t as Re } from "./connect-button-
|
|
7
|
+
import { n as Ce, r as we } from "./relay-choice-Bb3oP2gw.js";
|
|
8
|
+
import { a as Te, i as K, n as Ee } from "./cloud-C7StNncS.js";
|
|
9
|
+
import { t as De } from "./dns-o8DLFjP1.js";
|
|
10
|
+
import { s as Oe } from "./net-COkJw8lV.js";
|
|
11
|
+
import { i as ke } from "./dgram-BBbLokVF.js";
|
|
12
|
+
import { p as Ae } from "./http-DIDjdm08.js";
|
|
13
|
+
import { n as je } from "./desktop-xTT7ciGX.js";
|
|
14
|
+
import { t as Me } from "./account-Uh0-1Cbp.js";
|
|
15
|
+
import { u as Ne } from "./fs-Cw7CcUhx.js";
|
|
16
|
+
import { f as Pe } from "./opfs-D3pYzYRc.js";
|
|
17
|
+
import { u as Fe } from "./packages-Cws_rcgf.js";
|
|
18
|
+
import { a as Ie } from "./rooms-DP5stTEr.js";
|
|
19
|
+
import { o as Le } from "./storage-BhfImh_2.js";
|
|
20
|
+
import { t as Re } from "./connect-button-C1wKkIhh.js";
|
|
21
21
|
import { relay as ze } from "osra";
|
|
22
|
-
|
|
22
|
+
// src/frame.ts
|
|
23
23
|
var Be = (async (e) => {
|
|
24
24
|
let { kind: t, cookies: n } = O(e);
|
|
25
25
|
if (t === "window") {
|
|
@@ -91,14 +91,9 @@ typeof window < "u" && G(() => {
|
|
|
91
91
|
if (!e || Q === e.epoch) return;
|
|
92
92
|
Q = e.epoch;
|
|
93
93
|
let t = Je(e.remote.shell, et);
|
|
94
|
-
|
|
95
|
-
Q = 0;
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
t.catch(() => {
|
|
94
|
+
t ? t.catch(() => {
|
|
99
95
|
Q === e.epoch && (Q = 0);
|
|
100
|
-
});
|
|
96
|
+
}) : Q = 0;
|
|
101
97
|
});
|
|
102
98
|
var tt = () => be(), nt = async () => typeof window > "u" ? !1 : W.then((e) => e.shell?.applyUpdate()).then((e) => e === !0).catch(() => !1);
|
|
103
|
-
//#endregion
|
|
104
99
|
export { C as ATTACH_FRAME_EVENT_KEY, H as BACKGROUND_STOPPED, z as CATEGORIES, P as EXTENSION_ABI, g as ExtensionOperationUnsupportedError, T as ExtensionOutdatedError, fe as FORGEABLE_HEADERS, b as FrameWindowBlockedError, d as FrameWindowRefusedError, n as LOCATOR_DENIED, ne as LOCATOR_ERROR, ce as LOCATOR_INVALID, ee as LOCATOR_UNSUPPORTED, l as MAX_REASON_LENGTH, F as PERMISSION_DENIED, Se as RELAY_UNAVAILABLE, L as REQUIRED_EXTENSION_ABI, te as TimeoutError, Me as account, B as assertAttachableFrameUrl, s as assertFetchableUrl, t as assertForgeableHeaders, o as assertLockdownApplicable, v as assertOneCookieIdentity, Be as attachFrame, R as attachFramePermission, A as box, Ee as cloud, We as connect, Re as connectButtonUrl, c as cookies, V as createFrame, E as createVideoElementHandle, je as desktop, ke as dgram, De as dns, _e as extension, he as fetch, re as fetchCredentialedPermission, se as fetchLocalPermission, j as fetchPermission, Ne as fs, h as gotoPermission, y as handleRevivableModules, I as hasForgedCookie, Ae as http, ge as isBackgroundStopped, oe as isBlockedFetchUrl, i as isBlockedFrameUrl, N as isExtensionExposed, u as isLocalNetworkUrl, ae as isLocatorDenied, le as isLocatorInvalid, ue as isLocatorUnsupported, D as isPermissionDenied, Ce as isRelayUnavailable, de as isTerminalError, S as isType, a as modifyRequestHeadersPermission, Oe as net, Pe as opfs, Fe as packages, M as permissions, me as promptInstall, Ge as promptRelay, ie as readCookiePermission, w as readExtensionHandshake, we as relayOf, Ue as relayWorker, pe as removeRequestHeaderRule, x as revive, Ie as rooms, m as setMissingExtensionHandler, r as setRequestHeaderRule, Ye as shell, Le as storage, _ as supportsOperation, f as type, k as waitForExtensionExposure };
|