@fkn/lib 0.9.63 → 0.9.65
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 +34 -0
- package/account-Bm7uIcQo.d.ts +39 -0
- package/account-Uh0-1Cbp.js +22 -0
- package/{account-generation-B0cJrpDx.cjs → account-generation-ACCBzaI-.cjs} +1 -1
- package/{account-generation-u31dhamM.js → account-generation-BKHNe-jL.js} +2 -3
- package/account-m2iCmNui.cjs +1 -0
- package/{account-storage-ZkzqZp3A.js → account-storage-BmCVutNL.js} +4 -5
- package/{account-storage-Co9IvkPr.d.ts → account-storage-UmSfF63A.d.ts} +1 -66
- package/{account-storage-BnohkyMJ.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-Di2Ff3jS.js → api-DRglK7ft.js} +115 -156
- package/api-DrvhPN56.cjs +3 -0
- 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-CF4-yXtj.cjs +9 -0
- package/broker-frame-vjSpBa8d.js +51 -0
- package/broker-frame.cjs +1 -0
- package/broker-frame.d.ts +12 -0
- package/broker-frame.js +1 -0
- 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-C6rG_aod.js → cloud-C7StNncS.js} +17 -17
- 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-C3_aJX7C.js → extension-D5UMnEmQ.js} +11 -12
- 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-DgdN2HPt.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 +6 -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-tsVhjcl-.js → proxy-BBAQxJmP.js} +13 -13
- package/{proxy-Dz60YyYy.d.ts → proxy-BP40IXYD.d.ts} +2 -4
- package/proxy-DVgGp6A8.cjs +1 -0
- 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/api-BSk3dc_X.cjs +0 -3
- package/cloud-BoiHKoRZ.cjs +0 -1
- package/connect-button-Cp0NS95-.d.ts +0 -4
- package/extension-Crv4aUAm.cjs +0 -1
- package/fs-CjQTj3FA.cjs +0 -1
- package/lib-C_X3WR4G.cjs +0 -53
- package/node-fs-vsWuoMGa.cjs +0 -1
- package/proxy-BA92hkId.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/busy.ts
|
|
2
2
|
var e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), n = (t) => {
|
|
3
3
|
e.set(t, (e.get(t) ?? 0) + 1);
|
|
4
4
|
let n = !1;
|
|
@@ -23,5 +23,4 @@ var e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set(), n = (t) => {
|
|
|
23
23
|
}
|
|
24
24
|
return [...n];
|
|
25
25
|
};
|
|
26
|
-
//#endregion
|
|
27
26
|
export { i, a as n, r, n as t };
|
package/cloud/dgram.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../dgram.cjs");exports.Socket=e.
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../dgram-D9ljiUFh.cjs");exports.Socket=e.t,exports.createSocket=e.n,exports.default=e.r;
|
package/cloud/dgram.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import _default,
|
|
1
|
+
import { n as _default, r as createSocket, t as Socket } from "../dgram-BYk-QDHW.js";
|
|
2
2
|
export { Socket, createSocket, _default as default };
|
package/cloud/dgram.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { t as Socket, n as createSocket, e as default };
|
|
1
|
+
export { t as Socket, n as createSocket, r as default } from "../dgram-BBbLokVF.js";
|
package/cloud/dns.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../dns.cjs");exports.lookup=e.
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../dns-2v96zoEh.cjs");exports.lookup=e.n;
|
package/cloud/dns.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { s as AddressLookupResult } from "../contract-
|
|
2
|
-
import { lookup } from "../dns.js";
|
|
1
|
+
import { s as AddressLookupResult } from "../contract-0rua6Wsh.js";
|
|
2
|
+
import { n as lookup } from "../dns-DyB4K2oE.js";
|
|
3
3
|
export { type AddressLookupResult, lookup };
|
package/cloud/dns.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as lookup };
|
|
1
|
+
export { n as lookup } from "../dns-o8DLFjP1.js";
|
package/cloud/fetch.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../proxy-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../proxy-DVgGp6A8.cjs");exports.fetch=e.t;
|
package/cloud/fetch.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as cloudFetch } from "../proxy-
|
|
1
|
+
import { t as cloudFetch } from "../proxy-BP40IXYD.js";
|
|
2
2
|
export { cloudFetch as fetch };
|
package/cloud/fetch.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as fetch };
|
|
1
|
+
export { t as fetch } from "../proxy-BBAQxJmP.js";
|
package/cloud/fs/promises.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var{readFile:e,writeFile:t,unlink:n,rename:r,readdir:i,mkdir:a,rm:o,rmdir:s,stat:c,lstat:l,access:u}=require("
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var{readFile:e,writeFile:t,unlink:n,rename:r,readdir:i,mkdir:a,rm:o,rmdir:s,stat:c,lstat:l,access:u}=require("../../fs-BX_ghRy0.cjs").a;exports.access=u,exports.lstat=l,exports.mkdir=a,exports.readFile=e,exports.readdir=i,exports.rename=r,exports.rm=o,exports.rmdir=s,exports.stat=c,exports.unlink=n,exports.writeFile=t;
|
package/cloud/fs/promises.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { a as WriteData, i as Stats, n as MakeOptions, o as WriteOptions, r as ReadOptions } from "../../index-
|
|
2
|
-
import "../../fs-
|
|
3
|
-
//#region src/cloud/fs-promises.d.ts
|
|
1
|
+
import { a as WriteData, i as Stats, n as MakeOptions, o as WriteOptions, r as ReadOptions } from "../../index-CcVwh9yz.js";
|
|
2
|
+
import "../../fs-ChOYC6VD.js";
|
|
4
3
|
export declare const readFile: (path: import("node:fs").PathLike, options?: ReadOptions) => Promise<Buffer | string>, writeFile: (path: import("node:fs").PathLike, data: WriteData, options?: WriteOptions) => Promise<void>, unlink: (path: import("node:fs").PathLike) => Promise<void>, rename: (from: import("node:fs").PathLike, to: import("node:fs").PathLike) => Promise<void>, readdir: (path: import("node:fs").PathLike) => Promise<string[]>, mkdir: (_path?: import("node:fs").PathLike, _options?: MakeOptions) => Promise<void>, rm: (path: import("node:fs").PathLike, options?: {
|
|
5
4
|
recursive?: boolean;
|
|
6
5
|
}) => Promise<void>, rmdir: (path: import("node:fs").PathLike, options?: {
|
|
7
6
|
recursive?: boolean;
|
|
8
|
-
}) => Promise<void>, stat: (path: import("node:fs").PathLike) => Promise<Stats>, lstat: (path: import("node:fs").PathLike) => Promise<Stats>, access: (path: import("node:fs").PathLike) => Promise<void>;
|
|
9
|
-
//#endregion
|
|
7
|
+
}) => Promise<void>, stat: (path: import("node:fs").PathLike) => Promise<Stats>, lstat: (path: import("node:fs").PathLike) => Promise<Stats>, access: (path: import("node:fs").PathLike) => Promise<void>;
|
package/cloud/fs/promises.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { a as e } from "../../fs-BnWXGRik.js";
|
|
2
|
+
// src/cloud/fs-promises.ts
|
|
3
3
|
var { readFile: t, writeFile: n, unlink: r, rename: i, readdir: a, mkdir: o, rm: s, rmdir: c, stat: l, lstat: u, access: d } = e;
|
|
4
|
-
//#endregion
|
|
5
4
|
export { d as access, u as lstat, o as mkdir, t as readFile, a as readdir, i as rename, s as rm, c as rmdir, l as stat, r as unlink, n as writeFile };
|
package/cloud/fs.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../messages.cjs"),t=require("../account-storage-dYWDpqsr.cjs"),n=require("../fs-BX_ghRy0.cjs");exports.STORAGE_ACCOUNT_CHANGED=e.STORAGE_ACCOUNT_CHANGED,exports.STORAGE_ACCOUNT_PIN_UNSUPPORTED=e.STORAGE_ACCOUNT_PIN_UNSUPPORTED,exports.STORAGE_NOT_FOUND=e.STORAGE_NOT_FOUND,exports.StorageAccountChangedError=t.t,exports.StorageAccountPinUnsupportedError=t.n,exports.StorageLockedError=t.r,exports.StorageNotFoundError=t.i,exports.availability=t.o,exports.available=n.t,exports.encryption=t.c,exports.isAccountChanged=t.l,exports.isNotFound=t.d,exports.list=n.r,exports.mkdir=n.i,exports.promises=n.a,exports.quota=t.h,exports.readFile=n.o,exports.readFileSealed=n.s,exports.readdir=n.c,exports.rename=n.l,exports.rm=n.u,exports.stat=n.d,exports.unlink=n.f,exports.unlock=t.y,exports.writeFile=n.p;
|
package/cloud/fs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as Stats } from "../index-
|
|
2
|
-
import {
|
|
3
|
-
import { c as STORAGE_ACCOUNT_CHANGED, l as STORAGE_ACCOUNT_PIN_UNSUPPORTED, u as STORAGE_NOT_FOUND } from "../messages-
|
|
4
|
-
import { a as promises, c as readdir, d as stat, f as unlink, i as mkdir, l as rename, o as readFile, p as writeFile, r as list, s as readFileSealed, t as available, u as rm } from "../fs-
|
|
1
|
+
import { i as Stats } from "../index-CcVwh9yz.js";
|
|
2
|
+
import { a as StorageAccountChangedError, c as StorageNotFoundError, d as encryption, f as isAccountChanged, h as unlock, i as SealedRead, l as StorageQuota, m as quota, n as EncryptionStatus, o as StorageAccountPinUnsupportedError, p as isNotFound, r as FileEntry, s as StorageLockedError, t as CloudAvailability, u as availability } from "../account-storage-UmSfF63A.js";
|
|
3
|
+
import { c as STORAGE_ACCOUNT_CHANGED, l as STORAGE_ACCOUNT_PIN_UNSUPPORTED, u as STORAGE_NOT_FOUND } from "../messages-B9dOXntM.js";
|
|
4
|
+
import { a as promises, c as readdir, d as stat, f as unlink, i as mkdir, l as rename, o as readFile, p as writeFile, r as list, s as readFileSealed, t as available, u as rm } from "../fs-ChOYC6VD.js";
|
|
5
5
|
export { type CloudAvailability, type EncryptionStatus, type FileEntry, STORAGE_ACCOUNT_CHANGED, STORAGE_ACCOUNT_PIN_UNSUPPORTED, STORAGE_NOT_FOUND, type SealedRead, type Stats, StorageAccountChangedError, StorageAccountPinUnsupportedError, StorageLockedError, StorageNotFoundError, type StorageQuota, availability, available, encryption, isAccountChanged, isNotFound, list, mkdir, promises, quota, readFile, readFileSealed, readdir, rename, rm, stat, unlink, unlock, writeFile };
|
package/cloud/fs.js
CHANGED
|
@@ -1,34 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "../
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
//#region src/cloud/fs.ts
|
|
6
|
-
var v = /* @__PURE__ */ e({
|
|
7
|
-
STORAGE_ACCOUNT_CHANGED: () => n,
|
|
8
|
-
STORAGE_ACCOUNT_PIN_UNSUPPORTED: () => r,
|
|
9
|
-
STORAGE_NOT_FOUND: () => i,
|
|
10
|
-
StorageAccountChangedError: () => g,
|
|
11
|
-
StorageAccountPinUnsupportedError: () => f,
|
|
12
|
-
StorageLockedError: () => h,
|
|
13
|
-
StorageNotFoundError: () => u,
|
|
14
|
-
availability: () => p,
|
|
15
|
-
available: () => y,
|
|
16
|
-
encryption: () => s,
|
|
17
|
-
isAccountChanged: () => d,
|
|
18
|
-
isNotFound: () => c,
|
|
19
|
-
list: () => k,
|
|
20
|
-
mkdir: () => T,
|
|
21
|
-
promises: () => O,
|
|
22
|
-
quota: () => l,
|
|
23
|
-
readFile: () => b,
|
|
24
|
-
readFileSealed: () => A,
|
|
25
|
-
readdir: () => w,
|
|
26
|
-
rename: () => C,
|
|
27
|
-
rm: () => E,
|
|
28
|
-
stat: () => D,
|
|
29
|
-
unlink: () => S,
|
|
30
|
-
unlock: () => _,
|
|
31
|
-
writeFile: () => x
|
|
32
|
-
}), { available: y, readFile: b, writeFile: x, unlink: S, rename: C, readdir: w, mkdir: T, rm: E, stat: D, promises: O } = t(o, { memfs: !1 }), k = () => m(), A = (e) => a(e);
|
|
33
|
-
//#endregion
|
|
34
|
-
export { n as STORAGE_ACCOUNT_CHANGED, r as STORAGE_ACCOUNT_PIN_UNSUPPORTED, i as STORAGE_NOT_FOUND, g as StorageAccountChangedError, f as StorageAccountPinUnsupportedError, h as StorageLockedError, u as StorageNotFoundError, p as availability, y as available, s as encryption, d as isAccountChanged, c as isNotFound, k as list, T as mkdir, O as promises, l as quota, b as readFile, A as readFileSealed, w as readdir, C as rename, E as rm, D as stat, v as t, S as unlink, _ as unlock, x as writeFile };
|
|
1
|
+
import { STORAGE_ACCOUNT_CHANGED as e, STORAGE_ACCOUNT_PIN_UNSUPPORTED as t, STORAGE_NOT_FOUND as n } from "../messages.js";
|
|
2
|
+
import { c as r, d as i, h as a, i as o, l as s, n as c, o as l, r as u, t as d, y as f } from "../account-storage-BmCVutNL.js";
|
|
3
|
+
import { a as p, c as m, d as h, f as g, i as _, l as v, o as y, p as b, r as x, s as S, t as C, u as w } from "../fs-BnWXGRik.js";
|
|
4
|
+
export { e as STORAGE_ACCOUNT_CHANGED, t as STORAGE_ACCOUNT_PIN_UNSUPPORTED, n as STORAGE_NOT_FOUND, d as StorageAccountChangedError, c as StorageAccountPinUnsupportedError, u as StorageLockedError, o as StorageNotFoundError, l as availability, C as available, r as encryption, s as isAccountChanged, i as isNotFound, x as list, _ as mkdir, p as promises, a as quota, y as readFile, S as readFileSealed, m as readdir, v as rename, w as rm, h as stat, g as unlink, f as unlock, b as writeFile };
|
package/cloud/http.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../http.cjs");exports.Agent=e.
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../http-BE3UBktN.cjs");exports.Agent=e.t,exports.ClientRequest=e.n,exports.HTTPParser=e.r,exports.IncomingMessage=e.i,exports.METHODS=e.a,exports.STATUS_CODES=e.o,exports.Server=e.s,exports.ServerResponse=e.c,exports._default=e.l,exports.default=e.l,exports.createServer=e.u,exports.get=e.d,exports.globalAgent=e.f,exports.request=e.m;
|
package/cloud/http.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as IncomingMessage, c as RequestListener, d as ServerResponse, f as ServerResponseOptions, g as globalAgent, h as get, i as HTTPParser, l as STATUS_CODES, m as createServer, n as ClientRequest, o as METHODS, p as _default, r as ClientRequestArgs, s as ParsedHead, t as Agent, u as Server, v as request } from "../http-CDhG4bUc.js";
|
|
2
2
|
export { Agent, ClientRequest, ClientRequestArgs, HTTPParser, IncomingMessage, METHODS, ParsedHead, RequestListener, STATUS_CODES, Server, ServerResponse, ServerResponseOptions, _default, _default as default, createServer, get, globalAgent, request };
|
package/cloud/http.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as Agent, t as ClientRequest, n as HTTPParser, r as IncomingMessage, i as METHODS, a as STATUS_CODES, o as Server, s as ServerResponse, c as _default, c as default, l as createServer, u as get, d as globalAgent, f as request };
|
|
1
|
+
export { t as Agent, n as ClientRequest, r as HTTPParser, i as IncomingMessage, a as METHODS, o as STATUS_CODES, s as Server, c as ServerResponse, l as _default, l as default, u as createServer, d as get, f as globalAgent, m as request } from "../http-DIDjdm08.js";
|
package/cloud/net.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../utils-BpHmMkIR.cjs"),t=require("../net.cjs");exports.Server=t.
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../utils-BpHmMkIR.cjs"),t=require("../net-Dk2kqtgE.cjs");exports.Server=t.t,exports.Socket=t.n,exports._default=t.r,exports.default=t.r,exports.connect=t.i,exports.createConnection=t.a,exports.createServer=t.o,exports.isIP=e.t,exports.isIPv4=e.n,exports.isIPv6=e.r;
|
package/cloud/net.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as createConnection, c as isIP, i as connect, l as isIPv4, n as Socket, o as createServer, r as _default, t as Server, u as isIPv6 } from "../net-
|
|
1
|
+
import { a as createConnection, c as isIP, i as connect, l as isIPv4, n as Socket, o as createServer, r as _default, t as Server, u as isIPv6 } from "../net-mVAYXs8e.js";
|
|
2
2
|
export { Server, Socket, _default, _default as default, connect, createConnection, createServer, isIP, isIPv4, isIPv6 };
|
package/cloud/net.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "../utils-
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
1
|
+
import { n as e, r as t, t as n } from "../utils-DtWP-E9x.js";
|
|
2
|
+
import { a as r, i, n as a, o, r as s, t as c } from "../net-COkJw8lV.js";
|
|
3
|
+
export { c as Server, a as Socket, s as _default, s as default, i as connect, r as createConnection, o as createServer, n as isIP, e as isIPv4, t as isIPv6 };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { r as AttachFrameFunction } from "./index-
|
|
2
|
-
import { t as cloudFetch } from "./proxy-
|
|
3
|
-
import { t as dns_d_exports } from "./dns.js";
|
|
4
|
-
import { n as fs_d_exports } from "./fs-
|
|
5
|
-
import { s as net_d_exports } from "./net-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
//#region src/cloud/frame.d.ts
|
|
1
|
+
import { r as AttachFrameFunction } from "./index-Cu5EcdK0.js";
|
|
2
|
+
import { t as cloudFetch } from "./proxy-BP40IXYD.js";
|
|
3
|
+
import { t as dns_d_exports } from "./dns-DyB4K2oE.js";
|
|
4
|
+
import { n as fs_d_exports } from "./fs-ChOYC6VD.js";
|
|
5
|
+
import { s as net_d_exports } from "./net-mVAYXs8e.js";
|
|
6
|
+
import { i as dgram_d_exports } from "./dgram-BYk-QDHW.js";
|
|
7
|
+
import { _ as http_d_exports } from "./http-CDhG4bUc.js";
|
|
9
8
|
/**
|
|
10
9
|
* Attaches the render proxy to an iframe the app mounted, or opens it in a window of its own with
|
|
11
10
|
* `{ window }`. A window opens before the first await, so call this directly in a click handler.
|
|
@@ -13,8 +12,6 @@ import { t as http_d_exports } from "./http.js";
|
|
|
13
12
|
* cookies, is a TypeError before anything is attached or opened (`AttachCookies`).
|
|
14
13
|
*/
|
|
15
14
|
declare const attachFrame: AttachFrameFunction;
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region src/quota.d.ts
|
|
18
15
|
type QuotaStatus = {
|
|
19
16
|
/** the user has a paid subscription, throttle never applies */
|
|
20
17
|
premium: boolean;
|
|
@@ -39,5 +36,4 @@ declare namespace cloud_d_exports {
|
|
|
39
36
|
export { QuotaStatus, attachFrame, available, dgram_d_exports as dgram, dns_d_exports as dns, cloudFetch as fetch, fs_d_exports as fs, http_d_exports as http, net_d_exports as net, quota };
|
|
40
37
|
}
|
|
41
38
|
declare const available: () => boolean;
|
|
42
|
-
//#endregion
|
|
43
39
|
export { attachFrame as a, quota as i, cloud_d_exports as n, QuotaStatus as r, available as t };
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-
|
|
2
|
-
import { D as t, E as n, N as r, O as i, T as a, _ as o, c as s, f as c, ft as l, g as u, h as d, j as f, k as p, l as m, m as h, o as g, p as _, s as v, u as y, x as b, y as x } from "./lib-
|
|
3
|
-
import { c as S, m as C, t as w } from "./hosts-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { t as e } from "./rolldown-runtime-CGnMp29N.js";
|
|
2
|
+
import { D as t, E as n, N as r, O as i, T as a, _ as o, c as s, f as c, ft as l, g as u, h as d, j as f, k as p, l as m, m as h, o as g, p as _, s as v, u as y, x as b, y as x } from "./lib-CtJaID_y.js";
|
|
3
|
+
import { c as S, m as C, t as w } from "./hosts-HUfgMimI.js";
|
|
4
|
+
import { i as T } from "./broker-frame-vjSpBa8d.js";
|
|
5
|
+
import { l as E, n as D, o as O, s as k } from "./api-DRglK7ft.js";
|
|
6
|
+
import { r as A } from "./busy-C1JPjoZ_.js";
|
|
6
7
|
import { ATTACH_FRAME_KEY as j, ATTACH_WINDOW_KEY as ee, ATTACH_WINDOW_MESSAGE as M, RELAY_CHOICE_UNSUPPORTED as N, WINDOW_HANDSHAKE_TIMEOUT_MS as te } from "./contract.js";
|
|
7
|
-
import { a as P, i as F, t as I } from "./relay-choice-
|
|
8
|
-
import { t as L } from "./proxy-
|
|
8
|
+
import { a as P, i as F, t as I } from "./relay-choice-Bb3oP2gw.js";
|
|
9
|
+
import { t as L } from "./proxy-BBAQxJmP.js";
|
|
9
10
|
import { frameFetchVerdict as R } from "./attach-policy.js";
|
|
10
|
-
import { t as ne } from "./dns.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
11
|
+
import { t as ne } from "./dns-o8DLFjP1.js";
|
|
12
|
+
import { n as re } from "./fs-BnWXGRik.js";
|
|
13
|
+
import { s as ie } from "./net-COkJw8lV.js";
|
|
14
|
+
import { i as ae } from "./dgram-BBbLokVF.js";
|
|
15
|
+
import { p as oe } from "./http-DIDjdm08.js";
|
|
15
16
|
import { expose as z } from "osra";
|
|
16
|
-
|
|
17
|
+
// src/cloud/frame-broker.ts
|
|
17
18
|
var se = async () => {
|
|
18
19
|
let e = () => k("frame consent");
|
|
19
20
|
try {
|
|
@@ -448,7 +449,7 @@ var se = async () => {
|
|
|
448
449
|
let n = () => {
|
|
449
450
|
a(), t();
|
|
450
451
|
}, r = e.parentNode, i = new MutationObserver(() => {
|
|
451
|
-
|
|
452
|
+
e.isConnected && e.parentNode === r || (a(), t());
|
|
452
453
|
}), a = () => {
|
|
453
454
|
window.removeEventListener("pagehide", n), i.disconnect();
|
|
454
455
|
};
|
|
@@ -502,7 +503,7 @@ var se = async () => {
|
|
|
502
503
|
h.add(new URL(r || d).origin);
|
|
503
504
|
} catch {}
|
|
504
505
|
let g = De(s), _ = s === void 0 ? void 0 : await g, v = new AbortController(), y = i.referrerPolicy, x = i.allow, S = crypto.randomUUID();
|
|
505
|
-
if (i.referrerPolicy = "origin", i.allow = Qe(
|
|
506
|
+
if (i.referrerPolicy = "origin", i.allow = Qe(T(), i.allow), i.src = Ye({
|
|
506
507
|
target: f,
|
|
507
508
|
blank: r,
|
|
508
509
|
session: p,
|
|
@@ -573,6 +574,5 @@ var se = async () => {
|
|
|
573
574
|
http: () => oe,
|
|
574
575
|
net: () => ie,
|
|
575
576
|
quota: () => ot
|
|
576
|
-
}), ct = () =>
|
|
577
|
-
//#endregion
|
|
577
|
+
}), ct = () => E;
|
|
578
578
|
export { Je as a, it as i, st as n, ot as r, ct as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./lib-Bs-g5jyp.cjs"),n=require("./hosts-GNBhZO3-.cjs"),r=require("./broker-frame-CF4-yXtj.cjs"),i=require("./api-DrvhPN56.cjs"),a=require("./busy-BXbVH595.cjs"),o=require("./contract.cjs"),s=require("./relay-choice-JC_JJY_M.cjs"),c=require("./proxy-DVgGp6A8.cjs"),l=require("./attach-policy.cjs"),u=require("./dns-2v96zoEh.cjs"),d=require("./fs-BX_ghRy0.cjs"),f=require("./net-Dk2kqtgE.cjs"),p=require("./dgram-D9ljiUFh.cjs"),m=require("./http-BE3UBktN.cjs");let h=require("osra");var g=async()=>{let e=()=>i.s(`frame consent`);try{let t=await e();return{request:typeof t.frameConsent.request==`function`?t.frameConsent.request:void 0,ensure:t.frameConsent.ensure}}catch(t){if(!(t instanceof i.n))throw t;return{request:void 0,ensure:t=>e().then(e=>e.frameConsent.ensure(t))}}},_=`frame: this frame no longer holds the document the app attached it to`,v=!1,y=()=>{v||(v=!0,console.warn(`[fkn-frame] this FKN broker is too old to ask for permission categories, so nothing was asked for upfront and each capability is asked for as it is first used. Reloading the page picks up the current broker.`))},b=e=>[...e].flatMap(e=>{try{return[new URL(e).hostname]}catch{return[]}}),x=e=>typeof e?.reason==`string`?{reason:e.reason}:{},S=(e,t,n)=>n===null?`frame.${e}: the user did not grant ${t} here`:`frame.${e}: the user did not grant ${t} on ${n}`,C=e=>{let{assertLive:r,attach:i,consent:a,current:o,declaredHosts:s,documentHost:c,freshBlank:u,session:d,approvedOrigins:f}=e,p=new Set,m=()=>{try{return new URL(o()).hostname}catch{return``}},h=async()=>c?await c():m(),g=()=>n.t([...s,...b(f)]),v=async(e,t)=>(await e([t]))[0]??!1;return{gate:async({operation:e,args:o,phase:c})=>{r();let y=n.m(e,o);if(y===null)return;let b=t.h(y);if(b===void 0||b===`auto`)return;if(e===`fetch`){let e=l.frameFetchVerdict({session:d,declaredHosts:s,approvedOrigins:f},c===`ensure`?void 0:o[0],{classifier:`fetchTarget`});if(c===`ensure`&&!d)throw t.k(e.kind===`refuse`?e.reason:``,`fetch`);if(c!==`ensure`&&e.kind===`refuse`)throw t.k(e.reason,`fetch`);let{request:r,ensure:i}=await a();if(!r){if(e.kind===`refuse`)throw t.k(e.reason,`fetch`);if(!await i({scope:n.c(o[0],o[1]).scope,hosts:e.promptHosts}))throw t.k(`frame.fetch: the user did not grant this`,`fetch`);return}let u=e.kind===`consent`?e.targetHost:await h(),p=n.t([u,...s]);if(!p.length)throw t.k(`frame: navigate the frame before fetch`,`fetch`);if(await v(r,{category:`network`,hosts:p,...x(t.T(o))})===!1)throw t.k(S(`fetch`,`network`,u||null),`fetch`);return}let C=await h();if(!C)throw t.k(`frame: navigate the frame before ${e}`,e);if(!g().includes(C))throw t.k(_,e);let w=t.m(y);if(w===void 0||w===`evaluation`&&C===m()&&await u?.()||b===`critical`&&p.has(`${y} ${C}`))return;let{request:T}=await a();if(!T)return;let E=n.t([C,...s]),D=x(t.T(o)),O=b===`critical`?{key:y,hosts:E,attach:i,...D}:{category:w,hosts:E,...D},k=await v(T,O);if(k===!1)throw t.k(S(e,w,null),e);if(k===`once`&&c!==`ensure`)for(let e of E)p.add(`${y} ${e}`)},requestCategories:async e=>{r(),t.f(`frame.requestPermissions`,e);let o=await h(),c=n.t(o?[o,...s]:s);if(!c.length)throw TypeError(`frame.requestPermissions: navigate the frame or declare domains first`);let l=e.map(e=>{let n=e.key;return n===void 0?{named:void 0,critical:!1,category:e.category}:{named:n,critical:t.h(n)===`critical`,category:t.p(n)}}),u=({named:e,critical:t,category:n},r)=>({category:n,...t?{key:e}:{},hosts:c,allow:r}),{request:d}=await a();if(!d)return y(),l.map(e=>u(e,!1));let f=await d(l.map(({named:t,critical:n,category:r},a)=>{let o=x(e[a]);return n?{key:t,hosts:c,attach:i,...o}:{category:r,hosts:c,...o}}));return l.map((e,t)=>u(e,f[t]!==void 0&&f[t]!==!1))},boundary:g}},w=e=>e,T=5e3,E=new Set([]),D=()=>`https://fkn.app`,O=e=>e===`persistent`?``:`incognito-${crypto.randomUUID()}`,k=(e,n,r)=>{let i,a=new Promise((e,a)=>{i=setTimeout(()=>a(typeof r==`string`?new t.E(r):r()),n)});return Promise.race([e,a]).finally(()=>clearTimeout(i))},A=e=>Object.assign(Error(e),{name:t.D}),j=`frame.postMessage: this FKN page predates frame messaging; reload the app to load the current one`,M=`frame.addScriptTag: this render proxy predates addScriptTag; reload the app`,N=`frame.addScriptTag: no answer within ${t.l}ms; the script may or may not have run`,P=`frame.clearCookies: this FKN page predates clearCookies; reload the app to load the current one`,F=`frame.clearCookies: this attachment reaches no site yet; attach a url, goto one, or declare it in domains`,I=3e4,L=`attachFrame: this FKN page predates storageState; reload the app to load the current one`,R=2e4,z=async(e,n)=>{if(typeof e.seed!=`function`)throw t.N(L,`storageState`,`cloud`);try{await k(e.seed(n),R,`attachFrame: the render proxy did not take the storageState seed`)}catch(e){throw t.O(e)?t.N(L,`storageState`,`cloud`):e}},B=`frame.clearCookies: the render proxy did not answer within ${I}ms; the cookies may or may not be gone, and calling it again is safe`,V=e=>t.O(e)&&e.message===t.j(`addScriptTag`).message,H=!1,ee=()=>{H||(H=!0,console.warn(`[fkn-frame] this FKN page predates frame messaging, so the page's messages and documents are never reported. Reloading the app loads the current one.`))},U=({from:e,origin:t,attach:n,signal:r})=>i=>{let a=r=>{if(r.source===null||r.source!==e()||r.origin!==t)return;let a=r.data;typeof a==`object`&&a&&a.type===`fkn-frame-message`&&a.attach===n&&typeof a.origin==`string`&&(a.kind===`message`?i({type:`message`,data:a.data,origin:a.origin,ports:r.ports}):a.kind===`document`&&i({type:`document`,origin:a.origin}))};return window.addEventListener(`message`,a,{signal:r}),()=>window.removeEventListener(`message`,a)},te=e=>{if(typeof e!=`function`)return()=>Promise.resolve(e);let t=null;return()=>t??=e().catch(e=>{throw t=null,e})},W=({control:e,target:n,blank:r=!1,session:i,declaredHosts:a,approvedOrigins:o,attach:s,assertLive:c,guard:l,consent:u,onNavigated:d,relay:f})=>{let p=n,m=r&&i!==``,h=async()=>{if(!m)return!1;let t=typeof e.blank==`function`?await l(()=>e.blank()):``;return(typeof t!=`string`||t.split(`#`)[0]!==n.split(`#`)[0])&&(m=!1),m},g=Promise.resolve(),{gate:v,requestCategories:y,boundary:b}=C({session:i,declaredHosts:a,approvedOrigins:o,attach:s,assertLive:c,documentHost:typeof e.documentHost==`function`?()=>l(()=>e.documentHost()):void 0,current:()=>p,consent:te(u),freshBlank:h});return t.y({backend:`cloud`,executor:{execute:(n,r,i)=>E.has(r)?Promise.reject(t.j(r,`cloud`)):(c(),l(()=>e.executeLocator(n,r,i))),highlight:async()=>{}},gate:v,requestPermissions:y,evaluate:async(n,r)=>(c(),await v({parts:[],operation:`evaluate`,args:[n],phase:`execute`}),k(l(()=>e.executeLocator([],`evaluate`,[n,r])),t.l,t.u)),addScriptTag:async(n,r)=>{c();let i=[n,r];await v({parts:[],operation:`addScriptTag`,args:i,phase:`execute`});try{await k(l(()=>e.executeLocator([],`addScriptTag`,i)),t.l,N)}catch(e){throw V(e)?t.N(M,`addScriptTag`,`cloud`):e}},clearCookies:async n=>{if(c(),typeof e.clearCookies!=`function`)throw t.N(P,`clearCookies`,`cloud`);if(b().length===0)throw t.k(F,`clearCookies`);await k(l(()=>e.clearCookies(n)),I,B)},postMessage:(n,r,i)=>{if(c(),typeof e.messaging!=`function`)throw t.N(j,`postMessage`,`cloud`);if(r!==`*`&&!b().includes(new URL(r).hostname))throw t.k(_,`postMessage`);let{port1:a,port2:o}=new MessageChannel;a.postMessage({data:n,transfer:i},i);let s=[o,r],u=g.then(async()=>(await v({parts:[],operation:`postMessage`,args:s,phase:`execute`}),{answer:l(()=>e.executeLocator([],`postMessage`,s))}));return g=u.catch(()=>{}),u.then(async({answer:e})=>{await e})},listen:t=>(typeof e.messaging!=`function`&&ee(),f(t)),goto:async(n,{timeout:r,...i}={})=>{let a=new URL(n,location.href).href;c(),m=!1;let s=(()=>{try{return new URL(a).origin}catch{return``}})(),u=s!==``&&!o.has(s);u&&o.add(s);try{await k(l(()=>e.goto(a,r===void 0?i:{...i,timeoutMs:r})),(r??3e4)+T,`cloud.attachFrame: the render proxy did not answer goto; the frame may have been detached or its page reloaded`)}catch(e){throw u&&o.delete(s),t.c(e)}p=a,d()},url:()=>p})},G=async e=>{if(e===void 0){let e=await i.s(`a relay`).catch(()=>void 0);if(typeof e?.relay?.resolve!=`function`)return;let t=await e.relay.resolve().catch(()=>void 0);return t&&`id`in t?t.id:void 0}let t=await i.s(`a relay choice`);s.t(t,`attachFrame`);let n=await t.relay.resolve(e);if(`refused`in n)throw s.i(`attachFrame: ${n.refused}`);return n.id},K=async(e,t)=>{if((typeof e.relay==`function`?await e.relay():``)!==t)throw s.i(`attachFrame: ${o.RELAY_CHOICE_UNSUPPORTED}`)},ne=250,re=500,q=65e3,ie=2e3,ae=2e3,oe=2,se=2e3,ce=2e3,le=({origin:e,target:t,session:n,domains:r,attach:i})=>{let a=new URL(`/attach-window`,e);return a.searchParams.set(`attach`,i),t&&a.searchParams.set(`url`,t),n&&a.searchParams.set(`session`,n),r.length&&a.searchParams.set(`domains`,r.join(`,`)),a.href},ue=(e,t)=>{let n=document.createElement(`iframe`),r=new URL(`/attach-jar`,e);return r.searchParams.set(`attach`,t),n.src=r.href,n.tabIndex=-1,n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`style`,`display:none`),(document.body??document.documentElement).appendChild(n),n},de=(e,t)=>{let n=new MutationObserver(()=>{e.isConnected||t.aborted||(n.disconnect(),console.warn(`cloud.attachFrame: the window's jar anchor was removed from this page, so a sign-in in the window no longer reaches this app's cookie jar`))});e.parentNode&&n.observe(e.parentNode,{childList:!0}),n.observe(document.documentElement,{childList:!0}),t.addEventListener(`abort`,()=>n.disconnect(),{once:!0})},J=()=>A(`cloud.attachFrame: the attached window closed, reloaded or left the page FKN attached; attach a fresh window`),Y=()=>A(`cloud.attachFrame: the attached window stopped answering; attach a fresh window`),fe=()=>A(`cloud.attachFrame: the window went away before it connected; attach a fresh window`),pe=()=>A(`cloud.attachFrame: the window closed before it connected. Either the user closed it, or this page's Cross-Origin-Opener-Policy cut its link to the window`),me=async(e,r,i)=>{if(typeof window>`u`)throw Error(`cloud.attachFrame needs a window realm`);let{domains:c=[],permissions:l,relay:u}=e,{url:d,width:f,height:p}=t.s(e.window);if(window.origin===`null`)throw new t._(`opaque-opener`);let m=D(),g=crypto.randomUUID(),_=O(r),v=n.t(c),y=new Set;d&&y.add(new URL(d).origin);let b=r===`persistent`?ue(m,g):null,x=window.open(le({origin:m,target:i===void 0?d:``,session:_,domains:v,attach:g}),`_blank`,`popup,width=${f},height=${p}`);if(!x)throw b?.remove(),new t.g;let S=new AbortController,C=!1,T=null,E=(e,t=!1)=>{if(T===null){T=e,S.abort(t?Y():J());try{x.closed||x.postMessage({type:o.ATTACH_WINDOW_MESSAGE.detach,attach:g,...t?{unanswered:t}:{}},m)}catch{}b&&setTimeout(()=>b.remove(),ce)}};b&&de(b,S.signal);let A=new Promise((e,t)=>{S.signal.addEventListener(`abort`,()=>t(S.signal.reason),{once:!0})});A.catch(()=>{});let j=A.then(()=>{},()=>{}),M=()=>{if(S.signal.aborted)throw S.signal.reason},N=e=>S.signal.aborted?Promise.reject(S.signal.reason):Promise.race([e(),A]),P=e=>e.source===x&&e.origin===m;window.addEventListener(`message`,e=>{let n=e.source===null&&e.origin===m;if(!P(e)&&!n)return;let r=e.data;typeof r==`object`&&r&&r.attach===g&&(r.type===o.ATTACH_WINDOW_MESSAGE.gone?E(C?J():fe()):r.type===o.ATTACH_WINDOW_MESSAGE.refused&&!n&&E(new t._(r.reason)))},{signal:S.signal}),window.addEventListener(`pagehide`,()=>E(J()),{signal:S.signal});let F=G(u),I,L,R=()=>{let e=()=>{try{x.postMessage({type:o.ATTACH_WINDOW_MESSAGE.hello,attach:g,...I?{relay:I}:{}},m)}catch{}};e(),L=setInterval(e,ne)};u===void 0&&R();let B=setInterval(()=>{x.closed&&E(C?J():pe())},re);S.signal.addEventListener(`abort`,()=>{clearInterval(L),clearInterval(B)},{once:!0});let V=async e=>{try{return await Promise.race([e,A])}catch(e){throw T??e}};try{u!==void 0&&(I=await V(F),R());let e=await V(k((0,h.expose)({},{key:o.ATTACH_WINDOW_KEY,transport:{emit:(e,t)=>x.postMessage(e,m,t??[]),receive:e=>{let t=t=>{P(t)&&e(t.data,{source:t.source,origin:t.origin})};return window.addEventListener(`message`,t),()=>window.removeEventListener(`message`,t)}},unregisterSignal:S.signal,revivableModules:w(t.ft)}),o.WINDOW_HANDSHAKE_TIMEOUT_MS,`cloud.attachFrame: timed out connecting to the window`));C=!0,clearInterval(L);let n=0,r=setInterval(()=>{k(N(()=>e.ping()),ae,`ping`).then(()=>{n=0},()=>{S.signal.aborted||(document.visibilityState===`hidden`?n=0:++n>=oe&&E(Y(),!0))})},ie);S.signal.addEventListener(`abort`,()=>clearInterval(r),{once:!0}),I&&await V(k(K(e,I),q,`cloud.attachFrame: the window never became ready`)),await V(k(e.ready(),q,`cloud.attachFrame: the window never became ready`)),i!==void 0&&await V(z(e,i)),a.r(`attached frame`,S.signal);let c=W({control:e,target:d,session:_,declaredHosts:v,approvedOrigins:y,attach:g,assertLive:M,guard:N,consent:{request:t=>N(()=>e.requestConsent(t)),ensure:t=>N(()=>e.requestConsent([t])).then(([e])=>e!==void 0&&e!==!1)},onNavigated:()=>{},relay:U({from:()=>x,origin:m,attach:g,signal:S.signal})}),f=null,p=Object.assign(c,{close:()=>f??=(async()=>{S.signal.aborted||await k(Promise.allSettled([N(()=>e.flushCookies()),N(()=>e.sweepStorage())]),se,`close`).catch(()=>{});try{x.close()}catch{}E(J())})(),closed:j});return I?s.a(p,I):F.then(e=>s.a(p,e)),i!==void 0&&d&&await V(p.goto(d)),l?.length&&await V(p.requestPermissions(l)),p}catch(e){let n=T??e;if(!(n instanceof t._))try{x.close()}catch{}throw E(n),n}},he=2e4,X=65e3,Z=e=>!e||e===`about:blank`,ge=`cloud.attachFrame: this FKN page predates blank pages; reload the app to load the current one`,_e=`cloud.attachFrame: cookies: 'native' needs the FKN browser extension; the cloud render proxy has no browser cookies`,Q=e=>e.split(`#`)[0]??``,$=({iframe:e,lockdown:n,cookies:r,blank:i})=>{if(i===void 0)return``;if(typeof i!=`object`||!i)throw TypeError(`attachFrame: blank must be an object { url }`);let a=Object.keys(i).find(e=>e!==`url`);if(a!==void 0)throw TypeError(`attachFrame: blank takes { url }, not "${a}"`);let{url:o}=i,s=(()=>{try{return typeof o==`string`?new URL(o):null}catch{return null}})();if(!s||s.protocol!==`http:`&&s.protocol!==`https:`)throw TypeError(`attachFrame: blank.url must be an absolute http or https url, not "${String(o)}"`);let c=e.getAttribute(`src`)??``;if(!Z(c))throw TypeError(`attachFrame: blank needs an iframe with no src; this one has "${c}"`);if(n)throw TypeError(`attachFrame: blank does not combine with lockdown`);if(r===`native`)throw TypeError(`attachFrame: blank runs on the cloud render proxy, which has no browser cookies; pass cookies: 'persistent' or 'ephemeral'`);if(t.x(s.href),!Oe())throw Error(`attachFrame: a blank page is served by the cloud render proxy, which this build does not configure`);return s.href},ve=({target:e,blank:t,session:n,domains:r,attach:i,relay:a})=>{let o=new URL(`/attach-frame`,D());return t?o.searchParams.set(`blank`,t):e&&o.searchParams.set(`url`,e),n&&o.searchParams.set(`session`,n),r.length&&o.searchParams.set(`domains`,r.join(`,`)),o.searchParams.set(`attach`,i),a&&o.searchParams.set(`relay`,a),o.href},ye=(e,t)=>{let n=()=>{a(),t()},r=e.parentNode,i=new MutationObserver(()=>{e.isConnected&&e.parentNode===r||(a(),t())}),a=()=>{window.removeEventListener(`pagehide`,n),i.disconnect()};window.addEventListener(`pagehide`,n,{once:!0}),r&&i.observe(r,{childList:!0}),e.isConnected||(a(),t())},be=()=>A(`cloud.attachFrame: the attached iframe left the document or was reloaded; attach a fresh iframe`),xe=(e,t)=>{let n=[...e.split(`;`),...t.split(`;`)].map(e=>e.trim()).filter(Boolean);return[...new Set(n)].join(`; `)},Se=[300,1200,4e3],Ce=e=>{let t=()=>{if(!e.isConnected)return;let t=e.style.height,n=e.getBoundingClientRect();n.height&&(e.style.height=`${n.height-1}px`,setTimeout(()=>{e.style.height=t},50))};t();for(let e of Se)setTimeout(t,e)},we=e=>{let t=e.getAttribute(`sandbox`);if(t===null)return;let n=new Set(t.toLowerCase().split(/\s+/).filter(Boolean)),r=[`allow-scripts`,`allow-same-origin`].filter(e=>!n.has(e));if(r.length)throw Error(`cloud.attachFrame: the iframe's sandbox attribute must include ${r.join(` and `)} for the render proxy to load`)},Te=async(e,n)=>{let r=typeof e.blank==`function`?await k(e.blank(),X,`cloud.attachFrame: the render proxy never became ready`):``;if(typeof r!=`string`||Q(r)!==Q(n))throw t.N(ge,`blank`,`cloud`)},Ee=async(e,i,c)=>{let l=$(e),{iframe:u,domains:d=[],permissions:f,relay:p}=e;if(typeof window>`u`)throw Error(`cloud.attachFrame needs a window realm`);if(!u.isConnected)throw Error(`cloud.attachFrame: the iframe must be connected to the document before attaching`);we(u);let m=u.getAttribute(`src`)??``,_=(()=>{if(Z(m))return null;try{return new URL(u.src||m,location.href)}catch{throw Error(`cloud.attachFrame: the iframe src is not a valid URL: ${m}`)}})();if(_){let e=new URL(`/attach-frame`,D());if(_.origin===e.origin&&_.pathname===e.pathname)throw Error(`cloud.attachFrame: this iframe is already attached; navigate with the Frame returned by that attach or use a fresh iframe`)}let v=_?.href??``;v&&t.x(v);let y=c===void 0?v:``,b=O(i),x=n.t(d),S=new Set;try{S.add(new URL(l||v).origin)}catch{}let C=G(p),T=p===void 0?void 0:await C,E=new AbortController,A=u.referrerPolicy,j=u.allow,M=crypto.randomUUID();if(u.referrerPolicy=`origin`,u.allow=xe(r.i(),u.allow),u.src=ve({target:y,blank:l,session:b,domains:x,attach:M,relay:T}),!u.contentWindow)throw Error(`cloud.attachFrame: the iframe window is not available`);try{let e=await k((0,h.expose)({},{key:o.ATTACH_FRAME_KEY,origin:D(),transport:{receive:window,emit:u.contentWindow},unregisterSignal:E.signal,revivableModules:w(t.ft)}),he,`cloud.attachFrame: timed out connecting to the render proxy page`);T&&await k(K(e,T),X,`cloud.attachFrame: the render proxy never became ready`),await k(e.ready(),X,`cloud.attachFrame: the render proxy never became ready`),l&&await Te(e,l),c!==void 0&&await z(e,c),(v||l)&&Ce(u),ye(u,()=>E.abort()),a.r(`attached frame`,E.signal);let n=u.contentWindow,r=W({control:e,target:l||v,blank:l!==``,session:b,declaredHosts:x,approvedOrigins:S,attach:M,assertLive:()=>{if(E.signal.aborted||!u.isConnected||u.contentWindow!==n)throw E.abort(),be()},guard:e=>e(),consent:g,onNavigated:()=>Ce(u),relay:U({from:()=>n,origin:D(),attach:M,signal:E.signal})});return T?s.a(r,T):C.then(e=>s.a(r,e)),c!==void 0&&v&&await r.goto(v),f?.length&&await r.requestPermissions(f),r}catch(e){throw E.abort(),u.referrerPolicy=A,u.allow=j,u.src=y||`about:blank`,e}},De=(async e=>{let{kind:n,cookies:r,storageState:i}=t.o(e);if(r===`native`)throw TypeError(_e);return n===`window`?me(e,r,i):Ee(e,r,i)}),Oe=()=>typeof window<`u`&&!0,ke=async()=>{let e=await i.o.then(e=>e.cloud.quota());return{premium:e.premium,overQuota:e.overQuota,throttled:e.overQuota&&!e.premium,usedBytes:e.usedBytes,limitBytes:e.limitBytes,remainingBytes:e.remaining,bytesPerSecond:e.bytesPerSecond,bitsPerSecond:e.bytesPerSecond*8}},Ae=e.t({attachFrame:()=>De,available:()=>je,dgram:()=>p.i,dns:()=>u.t,fetch:()=>c.t,fs:()=>d.n,http:()=>m.p,net:()=>f.s,quota:()=>ke}),je=()=>i.l;Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return je}});
|
package/cloud.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./proxy-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./proxy-DVgGp6A8.cjs"),t=require("./cloud-TN0eDUy3.cjs"),n=require("./dns-2v96zoEh.cjs"),r=require("./fs-BX_ghRy0.cjs"),i=require("./net-Dk2kqtgE.cjs"),a=require("./dgram-D9ljiUFh.cjs"),o=require("./http-BE3UBktN.cjs");exports.attachFrame=t.i,exports.available=t.t,Object.defineProperty(exports,"dgram",{enumerable:!0,get:function(){return a.i}}),Object.defineProperty(exports,"dns",{enumerable:!0,get:function(){return n.t}}),exports.fetch=e.t,Object.defineProperty(exports,"fs",{enumerable:!0,get:function(){return r.n}}),Object.defineProperty(exports,"http",{enumerable:!0,get:function(){return o.p}}),Object.defineProperty(exports,"net",{enumerable:!0,get:function(){return i.s}}),exports.quota=t.r;
|
package/cloud.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as cloudFetch } from "./proxy-
|
|
2
|
-
import { a as attachFrame, i as quota, r as QuotaStatus, t as available } from "./cloud-
|
|
3
|
-
import { t as dns_d_exports } from "./dns.js";
|
|
4
|
-
import { n as fs_d_exports } from "./fs-
|
|
5
|
-
import { s as net_d_exports } from "./net-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { t as cloudFetch } from "./proxy-BP40IXYD.js";
|
|
2
|
+
import { a as attachFrame, i as quota, r as QuotaStatus, t as available } from "./cloud-BoH54gaM.js";
|
|
3
|
+
import { t as dns_d_exports } from "./dns-DyB4K2oE.js";
|
|
4
|
+
import { n as fs_d_exports } from "./fs-ChOYC6VD.js";
|
|
5
|
+
import { s as net_d_exports } from "./net-mVAYXs8e.js";
|
|
6
|
+
import { i as dgram_d_exports } from "./dgram-BYk-QDHW.js";
|
|
7
|
+
import { _ as http_d_exports } from "./http-CDhG4bUc.js";
|
|
8
8
|
export { type QuotaStatus, attachFrame, available, dgram_d_exports as dgram, dns_d_exports as dns, cloudFetch as fetch, fs_d_exports as fs, http_d_exports as http, net_d_exports as net, quota };
|
package/cloud.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as e } from "./proxy-
|
|
2
|
-
import { i as t, r as n, t as r } from "./cloud-
|
|
3
|
-
import { t as i } from "./dns.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { t as e } from "./proxy-BBAQxJmP.js";
|
|
2
|
+
import { i as t, r as n, t as r } from "./cloud-C7StNncS.js";
|
|
3
|
+
import { t as i } from "./dns-o8DLFjP1.js";
|
|
4
|
+
import { n as a } from "./fs-BnWXGRik.js";
|
|
5
|
+
import { s as o } from "./net-COkJw8lV.js";
|
|
6
|
+
import { i as s } from "./dgram-BBbLokVF.js";
|
|
7
|
+
import { p as c } from "./http-DIDjdm08.js";
|
|
8
8
|
export { t as attachFrame, r as available, s as dgram, i as dns, e as fetch, a as fs, c as http, o as net, n as quota };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { D as RelayChoice, O as StorageState, nt as SelectorPart, u as ClearCookiesWire } from "./index-
|
|
2
|
-
import { o as TcpSocketOption, x as UdpSocketOption } from "./wire-
|
|
3
|
-
//#region ../web-extension/lib/lib/storage-state.d.ts
|
|
1
|
+
import { D as RelayChoice, O as StorageState, nt as SelectorPart, u as ClearCookiesWire } from "./index-Cu5EcdK0.js";
|
|
2
|
+
import { o as TcpSocketOption, x as UdpSocketOption } from "./wire-DhmLnYEU.js";
|
|
4
3
|
/**
|
|
5
4
|
* A `storageState` cookie in the cloud jar's own shape (mirage's `Cookie`): `domain` always with
|
|
6
5
|
* its leading dot and `hostOnly` beside it, `expires` in milliseconds or absent for a session
|
|
@@ -28,8 +27,6 @@ type JarSeed = {
|
|
|
28
27
|
}[];
|
|
29
28
|
}[];
|
|
30
29
|
};
|
|
31
|
-
//#endregion
|
|
32
|
-
//#region src/contract.d.ts
|
|
33
30
|
/**
|
|
34
31
|
* What the broker's account change notification says. `switched` is true only when the account the
|
|
35
32
|
* broker acts as changed: another account, a sign-out or a sign-in. A renewal of the same account's
|
|
@@ -322,6 +319,15 @@ type ShellControl = {
|
|
|
322
319
|
clearCookies?(filter: ClearCookiesWire, scope: {
|
|
323
320
|
hosts: string[];
|
|
324
321
|
}): Promise<void>;
|
|
322
|
+
/**
|
|
323
|
+
* A person's reset of the site at `url`: removes every cookie of the url's site from this shell's jar, as
|
|
324
|
+
* `clearCookies` with no options does for that host, and the storage of the url's origin under this shell's
|
|
325
|
+
* namespace (localStorage, sessionStorage, IndexedDB, caches, OPFS), as that origin's `Clear-Site-Data: "storage"`
|
|
326
|
+
* does. The storage the site keeps on its other origins, and everything of other sites, stays. Refuses a url that is
|
|
327
|
+
* not http or https with a TypeError, before anything is removed; rejects in `clearCookies`' words when the jar's
|
|
328
|
+
* store did not take the removal. Absent from a shell that predates it.
|
|
329
|
+
*/
|
|
330
|
+
clearSiteData?(url: string): Promise<void>;
|
|
325
331
|
/**
|
|
326
332
|
* The hosts this shell's extension carrier may send a blank page's own fetch and XHR requests to: the
|
|
327
333
|
* attachment's approved set, each call replacing the last. The shell drops every FKN platform host whatever it
|
|
@@ -1466,5 +1472,4 @@ type Resolvers = {
|
|
|
1466
1472
|
showInstallPrompt: (reason?: string) => Promise<void>;
|
|
1467
1473
|
hideInstallPrompt: () => void;
|
|
1468
1474
|
};
|
|
1469
|
-
//#endregion
|
|
1470
1475
|
export { RoomCreateOptions as $, MiddleGotoOptions as A, StorageFail as At, ProxyFetch as B, TcpSocketListenerResult as Bt, FrameMessageRelay as C, SetOverlayHost as Ct, IpFamily as D, ShellJarUnreachable as Dt, InstalledPackage as E, ShellGotoOptions as Et, PackageResult as F, StoredHandle as Ft, RELAY_HEADER as G, UdpSocketResult as Gt, ProxyFetchInput as H, TcpSocketResult as Ht, PackagesErrorCode as I, StoredObject as It, Radii as J, WINDOW_JAR_MODE_TIMEOUT_MS as Jt, RELAY_UNAVAILABLE as K, WINDOW_HANDSHAKE_TIMEOUT_MS as Kt, PackagesFail as L, StoredPage as Lt, OverlayRect as M, StoragePutOptions as Mt, OverlayState as N, StoragePutWire as Nt, JAR_ANCHOR_MESSAGE as O, StorageEntry as Ot, PackageQuery as P, StorageQuota as Pt, RoomClaimOptions as Q, JarSeedCookie as Qt, PickOptions as R, SurfaceRect as Rt, FrameFetchScope as S, STORAGE_REFUSALS as St, InstallOptions as T, ShellFrameMessage as Tt, Quota as U, UdpDatagram as Ut, ProxyFetchInit as V, TcpSocketOptions as Vt, RELAY_CHOICE_UNSUPPORTED as W, UdpSocketOptions as Wt, Resolvers as X, WriteData as Xt, RelayResolution as Y, WindowMiddleControl as Yt, RoomBacklog as Z, JarSeed as Zt, DnsLookup as _, SHELL_ATTACH_ERROR as _t, AccountChange as a, RoomJoinOptions as at, FrameConsentAnswer as b, SHELL_JAR_MESSAGE as bt, AdoptRequest as c, RoomMember as ct, ConflictRequest as d, RoomPermission as dt, RoomDefaults as et, ConflictSide as f, RoomPermissions as ft, DisplayLevel as g, RoomsFail as gt, DisplayCause as h, RoomsErrorCode as ht, Account as i, RoomHandle as it, MountDescriptor as j, StorageProgress as jt, MiddleControl as k, StorageErrorCode as kt, AdoptState as l, RoomMessage as lt, ConnectOptions as m, RoomType as mt, ATTACH_WINDOW_KEY as n, RoomEnvelope as nt, AccountPinOptions as o, RoomJson as ot, ConnectAvailability as p, RoomSchema as pt, ROOM_TEMPORARY_MS as q, WINDOW_HELLO_TIMEOUT_MS as qt, ATTACH_WINDOW_MESSAGE as r, RoomEvent as rt, AddressLookupResult as s, RoomMailbox as st, ATTACH_FRAME_KEY as t, RoomEnd as tt, ConflictChoice as u, RoomOpenOptions as ut, EncryptionState as v, SHELL_CONTROL_KEY as vt, HiddenSurface as w, ShellControl as wt, FrameConsentRequest as x, SHELL_JAR_UNREACHABLE as xt, FRAME_MESSAGE as y, SHELL_FRAME_MESSAGE as yt, Placement as z, TcpSocketListenerOptions as zt };
|
package/contract.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as RelayChoice, d as CookieMatchWire, u as ClearCookiesWire } from "./index-
|
|
2
|
-
import { $ as RoomCreateOptions, A as MiddleGotoOptions, At as StorageFail, B as ProxyFetch, Bt as TcpSocketListenerResult, C as FrameMessageRelay, Ct as SetOverlayHost, D as IpFamily, Dt as ShellJarUnreachable, E as InstalledPackage, Et as ShellGotoOptions, F as PackageResult, Ft as StoredHandle, G as RELAY_HEADER, Gt as UdpSocketResult, H as ProxyFetchInput, Ht as TcpSocketResult, I as PackagesErrorCode, It as StoredObject, J as Radii, Jt as WINDOW_JAR_MODE_TIMEOUT_MS, K as RELAY_UNAVAILABLE, Kt as WINDOW_HANDSHAKE_TIMEOUT_MS, L as PackagesFail, Lt as StoredPage, M as OverlayRect, Mt as StoragePutOptions, N as OverlayState, Nt as StoragePutWire, O as JAR_ANCHOR_MESSAGE, Ot as StorageEntry, P as PackageQuery, Pt as StorageQuota, Q as RoomClaimOptions, Qt as JarSeedCookie, R as PickOptions, Rt as SurfaceRect, S as FrameFetchScope, St as STORAGE_REFUSALS, T as InstallOptions, Tt as ShellFrameMessage, U as Quota, Ut as UdpDatagram, V as ProxyFetchInit, Vt as TcpSocketOptions, W as RELAY_CHOICE_UNSUPPORTED, Wt as UdpSocketOptions, X as Resolvers, Xt as WriteData, Y as RelayResolution, Yt as WindowMiddleControl, Z as RoomBacklog, Zt as JarSeed, _ as DnsLookup, _t as SHELL_ATTACH_ERROR, a as AccountChange, at as RoomJoinOptions, b as FrameConsentAnswer, bt as SHELL_JAR_MESSAGE, c as AdoptRequest, ct as RoomMember, d as ConflictRequest, dt as RoomPermission, et as RoomDefaults, f as ConflictSide, ft as RoomPermissions, g as DisplayLevel, gt as RoomsFail, h as DisplayCause, ht as RoomsErrorCode, i as Account, it as RoomHandle, j as MountDescriptor, jt as StorageProgress, k as MiddleControl, kt as StorageErrorCode, l as AdoptState, lt as RoomMessage, m as ConnectOptions, mt as RoomType, n as ATTACH_WINDOW_KEY, nt as RoomEnvelope, o as AccountPinOptions, ot as RoomJson, p as ConnectAvailability, pt as RoomSchema, q as ROOM_TEMPORARY_MS, qt as WINDOW_HELLO_TIMEOUT_MS, r as ATTACH_WINDOW_MESSAGE, rt as RoomEvent, s as AddressLookupResult, st as RoomMailbox, t as ATTACH_FRAME_KEY, tt as RoomEnd, u as ConflictChoice, ut as RoomOpenOptions, v as EncryptionState, vt as SHELL_CONTROL_KEY, w as HiddenSurface, wt as ShellControl, x as FrameConsentRequest, xt as SHELL_JAR_UNREACHABLE, y as FRAME_MESSAGE, yt as SHELL_FRAME_MESSAGE, z as Placement, zt as TcpSocketListenerOptions } from "./contract-
|
|
3
|
-
import { o as TcpSocketOption, x as UdpSocketOption } from "./wire-
|
|
1
|
+
import { D as RelayChoice, d as CookieMatchWire, u as ClearCookiesWire } from "./index-Cu5EcdK0.js";
|
|
2
|
+
import { $ as RoomCreateOptions, A as MiddleGotoOptions, At as StorageFail, B as ProxyFetch, Bt as TcpSocketListenerResult, C as FrameMessageRelay, Ct as SetOverlayHost, D as IpFamily, Dt as ShellJarUnreachable, E as InstalledPackage, Et as ShellGotoOptions, F as PackageResult, Ft as StoredHandle, G as RELAY_HEADER, Gt as UdpSocketResult, H as ProxyFetchInput, Ht as TcpSocketResult, I as PackagesErrorCode, It as StoredObject, J as Radii, Jt as WINDOW_JAR_MODE_TIMEOUT_MS, K as RELAY_UNAVAILABLE, Kt as WINDOW_HANDSHAKE_TIMEOUT_MS, L as PackagesFail, Lt as StoredPage, M as OverlayRect, Mt as StoragePutOptions, N as OverlayState, Nt as StoragePutWire, O as JAR_ANCHOR_MESSAGE, Ot as StorageEntry, P as PackageQuery, Pt as StorageQuota, Q as RoomClaimOptions, Qt as JarSeedCookie, R as PickOptions, Rt as SurfaceRect, S as FrameFetchScope, St as STORAGE_REFUSALS, T as InstallOptions, Tt as ShellFrameMessage, U as Quota, Ut as UdpDatagram, V as ProxyFetchInit, Vt as TcpSocketOptions, W as RELAY_CHOICE_UNSUPPORTED, Wt as UdpSocketOptions, X as Resolvers, Xt as WriteData, Y as RelayResolution, Yt as WindowMiddleControl, Z as RoomBacklog, Zt as JarSeed, _ as DnsLookup, _t as SHELL_ATTACH_ERROR, a as AccountChange, at as RoomJoinOptions, b as FrameConsentAnswer, bt as SHELL_JAR_MESSAGE, c as AdoptRequest, ct as RoomMember, d as ConflictRequest, dt as RoomPermission, et as RoomDefaults, f as ConflictSide, ft as RoomPermissions, g as DisplayLevel, gt as RoomsFail, h as DisplayCause, ht as RoomsErrorCode, i as Account, it as RoomHandle, j as MountDescriptor, jt as StorageProgress, k as MiddleControl, kt as StorageErrorCode, l as AdoptState, lt as RoomMessage, m as ConnectOptions, mt as RoomType, n as ATTACH_WINDOW_KEY, nt as RoomEnvelope, o as AccountPinOptions, ot as RoomJson, p as ConnectAvailability, pt as RoomSchema, q as ROOM_TEMPORARY_MS, qt as WINDOW_HELLO_TIMEOUT_MS, r as ATTACH_WINDOW_MESSAGE, rt as RoomEvent, s as AddressLookupResult, st as RoomMailbox, t as ATTACH_FRAME_KEY, tt as RoomEnd, u as ConflictChoice, ut as RoomOpenOptions, v as EncryptionState, vt as SHELL_CONTROL_KEY, w as HiddenSurface, wt as ShellControl, x as FrameConsentRequest, xt as SHELL_JAR_UNREACHABLE, y as FRAME_MESSAGE, yt as SHELL_FRAME_MESSAGE, z as Placement, zt as TcpSocketListenerOptions } from "./contract-0rua6Wsh.js";
|
|
3
|
+
import { o as TcpSocketOption, x as UdpSocketOption } from "./wire-DhmLnYEU.js";
|
|
4
4
|
export { ATTACH_FRAME_KEY, ATTACH_WINDOW_KEY, ATTACH_WINDOW_MESSAGE, Account, AccountChange, AccountPinOptions, AddressLookupResult, AdoptRequest, AdoptState, type ClearCookiesWire, ConflictChoice, ConflictRequest, ConflictSide, ConnectAvailability, ConnectOptions, type CookieMatchWire, DisplayCause, DisplayLevel, DnsLookup, EncryptionState, FRAME_MESSAGE, FrameConsentAnswer, FrameConsentRequest, FrameFetchScope, FrameMessageRelay, HiddenSurface, InstallOptions, InstalledPackage, IpFamily, JAR_ANCHOR_MESSAGE, type JarSeed, type JarSeedCookie, MiddleControl, MiddleGotoOptions, MountDescriptor, OverlayRect, OverlayState, PackageQuery, PackageResult, PackagesErrorCode, PackagesFail, PickOptions, Placement, ProxyFetch, ProxyFetchInit, ProxyFetchInput, Quota, RELAY_CHOICE_UNSUPPORTED, RELAY_HEADER, RELAY_UNAVAILABLE, ROOM_TEMPORARY_MS, Radii, type RelayChoice, RelayResolution, Resolvers, RoomBacklog, RoomClaimOptions, RoomCreateOptions, RoomDefaults, RoomEnd, RoomEnvelope, RoomEvent, RoomHandle, RoomJoinOptions, RoomJson, RoomMailbox, RoomMember, RoomMessage, RoomOpenOptions, RoomPermission, RoomPermissions, RoomSchema, RoomType, RoomsErrorCode, RoomsFail, SHELL_ATTACH_ERROR, SHELL_CONTROL_KEY, SHELL_FRAME_MESSAGE, SHELL_JAR_MESSAGE, SHELL_JAR_UNREACHABLE, STORAGE_REFUSALS, SetOverlayHost, ShellControl, ShellFrameMessage, ShellGotoOptions, ShellJarUnreachable, StorageEntry, StorageErrorCode, StorageFail, StorageProgress, StoragePutOptions, StoragePutWire, StorageQuota, StoredHandle, StoredObject, StoredPage, 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,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/contract.ts
|
|
2
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",
|
|
@@ -97,5 +97,4 @@ var e = "fkn-attach-frame", t = "fkn-attach-window", n = "sdbx-control", r = "sd
|
|
|
97
97
|
message: "storage: storage is unavailable"
|
|
98
98
|
}
|
|
99
99
|
}, h = "fkn-relay", g = "RelayUnavailableError", _ = "this FKN page cannot choose a relay; reload the app to load the current one";
|
|
100
|
-
//#endregion
|
|
101
100
|
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, _ as RELAY_CHOICE_UNSUPPORTED, h as RELAY_HEADER, g as RELAY_UNAVAILABLE, p as ROOM_TEMPORARY_MS, 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, m as STORAGE_REFUSALS, f as WINDOW_HANDSHAKE_TIMEOUT_MS, u as WINDOW_HELLO_TIMEOUT_MS, d as WINDOW_JAR_MODE_TIMEOUT_MS };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
declare namespace desktop_d_exports {
|
|
2
|
+
export { available, dgram, dns, fetch, fs, net };
|
|
3
|
+
}
|
|
4
|
+
/** Typed placeholder for the planned desktop backend. Always false in this release. */
|
|
5
|
+
declare const available: () => boolean;
|
|
6
|
+
/** Planned desktop fetch backend. Throws in this release. */
|
|
7
|
+
declare const fetch: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
8
|
+
/** Planned desktop DNS backend. Every method throws in this release. */
|
|
9
|
+
declare const dns: {
|
|
10
|
+
lookup: (..._args: unknown[]) => never;
|
|
11
|
+
};
|
|
12
|
+
/** Planned desktop TCP backend. Every method throws in this release. */
|
|
13
|
+
declare const net: {
|
|
14
|
+
connect: (..._args: unknown[]) => never;
|
|
15
|
+
createConnection: (..._args: unknown[]) => never;
|
|
16
|
+
createServer: (..._args: unknown[]) => never;
|
|
17
|
+
};
|
|
18
|
+
/** Planned desktop UDP backend. Every method throws in this release. */
|
|
19
|
+
declare const dgram: {
|
|
20
|
+
createSocket: (..._args: unknown[]) => never;
|
|
21
|
+
};
|
|
22
|
+
/** Planned desktop storage backend. available() resolves false; storage operations throw. */
|
|
23
|
+
declare const fs: {
|
|
24
|
+
available: () => Promise<boolean>;
|
|
25
|
+
readFile: (..._args: unknown[]) => never;
|
|
26
|
+
readFileSync: (..._args: unknown[]) => never;
|
|
27
|
+
writeFile: (..._args: unknown[]) => never;
|
|
28
|
+
writeFileSync: (..._args: unknown[]) => never;
|
|
29
|
+
appendFile: (..._args: unknown[]) => never;
|
|
30
|
+
appendFileSync: (..._args: unknown[]) => never;
|
|
31
|
+
existsSync: (..._args: unknown[]) => never;
|
|
32
|
+
stat: (..._args: unknown[]) => never;
|
|
33
|
+
statSync: (..._args: unknown[]) => never;
|
|
34
|
+
readdir: (..._args: unknown[]) => never;
|
|
35
|
+
readdirSync: (..._args: unknown[]) => never;
|
|
36
|
+
mkdir: (..._args: unknown[]) => never;
|
|
37
|
+
mkdirSync: (..._args: unknown[]) => never;
|
|
38
|
+
rm: (..._args: unknown[]) => never;
|
|
39
|
+
rmSync: (..._args: unknown[]) => never;
|
|
40
|
+
unlink: (..._args: unknown[]) => never;
|
|
41
|
+
unlinkSync: (..._args: unknown[]) => never;
|
|
42
|
+
rename: (..._args: unknown[]) => never;
|
|
43
|
+
renameSync: (..._args: unknown[]) => never;
|
|
44
|
+
mount: (..._args: unknown[]) => never;
|
|
45
|
+
flush: (..._args: unknown[]) => never;
|
|
46
|
+
promises: {
|
|
47
|
+
readFile: (..._args: unknown[]) => never;
|
|
48
|
+
writeFile: (..._args: unknown[]) => never;
|
|
49
|
+
unlink: (..._args: unknown[]) => never;
|
|
50
|
+
rename: (..._args: unknown[]) => never;
|
|
51
|
+
readdir: (..._args: unknown[]) => never;
|
|
52
|
+
mkdir: (..._args: unknown[]) => never;
|
|
53
|
+
rm: (..._args: unknown[]) => never;
|
|
54
|
+
stat: (..._args: unknown[]) => never;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export { fetch as a, dns as i, desktop_d_exports as n, fs as o, dgram as r, net as s, available as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=require("./rolldown-runtime-BIInC43l.cjs").t({available:()=>t,dgram:()=>o,dns:()=>i,fetch:()=>r,fs:()=>s,net:()=>a}),t=()=>!1,n=e=>(...t)=>{throw Error(`The FKN desktop app is not connected, desktop.${e} is unavailable`)},r=n(`fetch`),i={lookup:n(`dns.lookup`)},a={connect:n(`net.connect`),createConnection:n(`net.createConnection`),createServer:n(`net.createServer`)},o={createSocket:n(`dgram.createSocket`)},s={available:async()=>!1,readFile:n(`fs.readFile`),readFileSync:n(`fs.readFileSync`),writeFile:n(`fs.writeFile`),writeFileSync:n(`fs.writeFileSync`),appendFile:n(`fs.appendFile`),appendFileSync:n(`fs.appendFileSync`),existsSync:n(`fs.existsSync`),stat:n(`fs.stat`),statSync:n(`fs.statSync`),readdir:n(`fs.readdir`),readdirSync:n(`fs.readdirSync`),mkdir:n(`fs.mkdir`),mkdirSync:n(`fs.mkdirSync`),rm:n(`fs.rm`),rmSync:n(`fs.rmSync`),unlink:n(`fs.unlink`),unlinkSync:n(`fs.unlinkSync`),rename:n(`fs.rename`),renameSync:n(`fs.renameSync`),mount:n(`fs.mount`),flush:n(`fs.flush`),promises:{readFile:n(`fs.promises.readFile`),writeFile:n(`fs.promises.writeFile`),unlink:n(`fs.promises.unlink`),rename:n(`fs.promises.rename`),readdir:n(`fs.promises.readdir`),mkdir:n(`fs.promises.mkdir`),rm:n(`fs.promises.rm`),stat:n(`fs.promises.stat`)}};Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-CGnMp29N.js";
|
|
2
|
+
// src/desktop.ts
|
|
3
|
+
var t = /* @__PURE__ */ e({
|
|
4
|
+
available: () => n,
|
|
5
|
+
dgram: () => s,
|
|
6
|
+
dns: () => a,
|
|
7
|
+
fetch: () => i,
|
|
8
|
+
fs: () => c,
|
|
9
|
+
net: () => o
|
|
10
|
+
}), n = () => !1, r = (e) => (...t) => {
|
|
11
|
+
throw Error(`The FKN desktop app is not connected, desktop.${e} is unavailable`);
|
|
12
|
+
}, i = r("fetch"), a = { lookup: r("dns.lookup") }, o = {
|
|
13
|
+
connect: r("net.connect"),
|
|
14
|
+
createConnection: r("net.createConnection"),
|
|
15
|
+
createServer: r("net.createServer")
|
|
16
|
+
}, s = { createSocket: r("dgram.createSocket") }, c = {
|
|
17
|
+
available: async () => !1,
|
|
18
|
+
readFile: r("fs.readFile"),
|
|
19
|
+
readFileSync: r("fs.readFileSync"),
|
|
20
|
+
writeFile: r("fs.writeFile"),
|
|
21
|
+
writeFileSync: r("fs.writeFileSync"),
|
|
22
|
+
appendFile: r("fs.appendFile"),
|
|
23
|
+
appendFileSync: r("fs.appendFileSync"),
|
|
24
|
+
existsSync: r("fs.existsSync"),
|
|
25
|
+
stat: r("fs.stat"),
|
|
26
|
+
statSync: r("fs.statSync"),
|
|
27
|
+
readdir: r("fs.readdir"),
|
|
28
|
+
readdirSync: r("fs.readdirSync"),
|
|
29
|
+
mkdir: r("fs.mkdir"),
|
|
30
|
+
mkdirSync: r("fs.mkdirSync"),
|
|
31
|
+
rm: r("fs.rm"),
|
|
32
|
+
rmSync: r("fs.rmSync"),
|
|
33
|
+
unlink: r("fs.unlink"),
|
|
34
|
+
unlinkSync: r("fs.unlinkSync"),
|
|
35
|
+
rename: r("fs.rename"),
|
|
36
|
+
renameSync: r("fs.renameSync"),
|
|
37
|
+
mount: r("fs.mount"),
|
|
38
|
+
flush: r("fs.flush"),
|
|
39
|
+
promises: {
|
|
40
|
+
readFile: r("fs.promises.readFile"),
|
|
41
|
+
writeFile: r("fs.promises.writeFile"),
|
|
42
|
+
unlink: r("fs.promises.unlink"),
|
|
43
|
+
rename: r("fs.promises.rename"),
|
|
44
|
+
readdir: r("fs.promises.readdir"),
|
|
45
|
+
mkdir: r("fs.promises.mkdir"),
|
|
46
|
+
rm: r("fs.promises.rm"),
|
|
47
|
+
stat: r("fs.promises.stat")
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
export { i as a, a as i, t as n, c as o, s as r, o as s, n as t };
|
package/desktop.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./desktop-vXKU4wEK.cjs");exports.available=e.t,exports.dgram=e.r,exports.dns=e.i,exports.fetch=e.a,exports.fs=e.o,exports.net=e.s;
|