@fkn/lib 0.9.56 → 0.9.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/{account-generation-D3jlXBbM.js → account-generation-2ZvMy2tZ.js} +1 -1
  2. package/{account-generation-DkrSMafa.cjs → account-generation-DIsOqkSQ.cjs} +1 -1
  3. package/{account-storage-C1VL6fpb.cjs → account-storage-CPTct4Vz.cjs} +1 -1
  4. package/{account-storage-BBL440_m.js → account-storage-Cmzz-67T.js} +2 -2
  5. package/account.cjs +1 -1
  6. package/account.d.ts +1 -1
  7. package/account.js +2 -2
  8. package/{api-BSpQkgnM.d.ts → api-BD_XUANc.d.ts} +28 -1
  9. package/{api-DEfkbHGB.js → api-C-N5AVos.js} +77 -74
  10. package/api-ibGqkmtA.cjs +3 -0
  11. package/api.cjs +1 -1
  12. package/api.d.ts +2 -2
  13. package/api.js +1 -1
  14. package/cloud/dns.d.ts +1 -1
  15. package/cloud/fetch.cjs +1 -1
  16. package/cloud/fetch.d.ts +1 -1
  17. package/cloud/fetch.js +1 -1
  18. package/cloud/fs.cjs +1 -1
  19. package/cloud/fs.js +1 -1
  20. package/cloud/net.d.ts +1 -1
  21. package/{cloud-DTpFBbBH.js → cloud-B6B2XcRU.js} +205 -184
  22. package/{cloud-BslRIoKs.d.ts → cloud-BEoUa04G.d.ts} +3 -3
  23. package/cloud-C0hcBrFd.cjs +1 -0
  24. package/cloud.cjs +1 -1
  25. package/cloud.d.ts +3 -3
  26. package/cloud.js +2 -2
  27. package/{contract-DFycgFJK.d.ts → contract-B8Rqx5BD.d.ts} +47 -4
  28. package/contract.cjs +1 -1
  29. package/contract.d.ts +3 -3
  30. package/contract.js +2 -2
  31. package/dgram.cjs +1 -1
  32. package/dgram.d.ts +10 -5
  33. package/dgram.js +64 -60
  34. package/dns.cjs +1 -1
  35. package/dns.d.ts +1 -1
  36. package/dns.js +1 -1
  37. package/extension-AidgSVhb.js +101 -0
  38. package/{extension-kE9yzbkW.d.ts → extension-C_eOfEjv.d.ts} +3 -2
  39. package/extension-M8bUhlML.cjs +1 -0
  40. package/extension.cjs +1 -1
  41. package/extension.d.ts +3 -3
  42. package/extension.js +1 -1
  43. package/fs/promises.cjs +1 -1
  44. package/fs/promises.js +1 -1
  45. package/{fs-C7ByWYF9.cjs → fs-BlRxCJQW.cjs} +1 -1
  46. package/{fs-gryDP9qw.js → fs-C_RmxWk9.js} +2 -2
  47. package/fs.cjs +1 -1
  48. package/fs.js +2 -2
  49. package/http.cjs +1 -1
  50. package/http.d.ts +4 -1
  51. package/http.js +2 -1
  52. package/{index-BQ5OZQhf.d.ts → index-C5DdoMGo.d.ts} +38 -1
  53. package/index.cjs +1 -1
  54. package/index.d.ts +7 -5
  55. package/index.js +53 -51
  56. package/{net-eEjhJ0AE.d.ts → net-CvJwokcz.d.ts} +14 -7
  57. package/net.cjs +1 -1
  58. package/net.d.ts +1 -1
  59. package/net.js +52 -46
  60. package/package.json +1 -1
  61. package/packages.cjs +1 -1
  62. package/packages.d.ts +1 -1
  63. package/packages.js +1 -1
  64. package/proxy-C1RlnrDC.js +61 -0
  65. package/proxy-CII2NFYV.cjs +1 -0
  66. package/{proxy-8hIHeEHD.d.ts → proxy-z0Y8IgW7.d.ts} +2 -2
  67. package/relay-choice-BGwXRC5d.js +14 -0
  68. package/relay-choice-BmXlqfD2.d.ts +28 -0
  69. package/relay-choice-JC_JJY_M.cjs +1 -0
  70. package/rooms.cjs +1 -1
  71. package/rooms.d.ts +1 -1
  72. package/rooms.js +1 -1
  73. package/storage.cjs +1 -1
  74. package/storage.d.ts +1 -1
  75. package/storage.js +3 -3
  76. package/api-BmaUJUUp.cjs +0 -3
  77. package/cloud-C_EPPfe_.cjs +0 -1
  78. package/extension-C13d41tq.js +0 -95
  79. package/extension-DA_Fx3Lx.cjs +0 -1
  80. package/proxy-Blzm-Dc1.cjs +0 -1
  81. package/proxy-C2HY5Ybc.js +0 -60
@@ -1,95 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { $ as t, A as n, B as r, C as i, D as a, E as o, F as s, G as c, H as l, I as u, J as ee, K as te, L as ne, M as re, O as ie, P as ae, Q as d, R as f, S as p, U as m, V as h, W as g, Y as _, Z as v, _ as y, _t as b, a as x, at as S, b as C, ct as w, d as T, dt as E, et as D, ft as O, g as k, gt as A, ht as j, i as M, it as N, lt as P, mt as oe, n as F, nt as I, ot as L, pt as R, q as z, r as B, rt as V, t as H, tt as U, v as W, w as G, x as K, y as q, z as se } from "./lib-BGAmzIcU.js";
3
- import { o as ce, p as le } from "./api-DEfkbHGB.js";
4
- import { t as ue } from "./proxy-C2HY5Ybc.js";
5
- import { available as de, fetch as J } from "./desktop.js";
6
- //#region ../web-extension/lib/utils/background-stopped.js
7
- var Y = "BackgroundStoppedError", X = (e) => T(e) && e.name === "BackgroundStoppedError", Z = async (e) => {
8
- if (v("promptInstall", e), typeof window > "u") return !1;
9
- if (V()) return !0;
10
- let t = await ce, n = null, r = new Promise((e) => {
11
- n = () => {
12
- V() && e(!0);
13
- }, I.addEventListener("statuschange", n);
14
- }), i = t.installPrompt.show(e).then(() => !1), a = await Promise.race([r, i]);
15
- return n && I.removeEventListener("statuschange", n), await t.installPrompt.hide().catch(() => {}), a;
16
- }, Q = null;
17
- S(() => (Q ||= Z().then(() => void 0).finally(() => {
18
- Q = null;
19
- }), Q));
20
- //#endregion
21
- //#region src/auto.ts
22
- var $ = () => typeof document < "u" && V(), fe = async (e, t) => {
23
- if (le(e), v("fetch", t?.reason), t?.credentials === "include") {
24
- if (typeof document > "u") throw Error("fetch with credentials needs the FKN extension, which only exists in window realms");
25
- return g(e, t);
26
- }
27
- return $() ? g(e, {
28
- ...t,
29
- credentials: "omit"
30
- }) : de() ? J(e, t) : ue(e, t);
31
- }, pe = /* @__PURE__ */ e({
32
- ATTACH_FRAME_EVENT_KEY: () => M,
33
- BACKGROUND_STOPPED: () => Y,
34
- CATEGORIES: () => G,
35
- EXTENSION_ABI: () => 5,
36
- ExtensionOperationUnsupportedError: () => w,
37
- ExtensionOutdatedError: () => P,
38
- FORGEABLE_HEADERS: () => d,
39
- FrameWindowBlockedError: () => k,
40
- FrameWindowRefusedError: () => y,
41
- LOCATOR_DENIED: () => n,
42
- LOCATOR_ERROR: () => s,
43
- LOCATOR_INVALID: () => ne,
44
- LOCATOR_UNSUPPORTED: () => a,
45
- MAX_REASON_LENGTH: () => 100,
46
- PERMISSION_DENIED: () => H,
47
- REQUIRED_EXTENSION_ABI: () => 0,
48
- TimeoutError: () => o,
49
- assertAttachableFrameUrl: () => K,
50
- assertFetchableUrl: () => m,
51
- assertForgeableHeaders: () => t,
52
- assertLockdownApplicable: () => p,
53
- assertOneCookieIdentity: () => D,
54
- attachFrame: () => x,
55
- attachFramePermission: () => W,
56
- available: () => $,
57
- box: () => R,
58
- cookies: () => h,
59
- createFrame: () => q,
60
- createVideoElementHandle: () => oe,
61
- events: () => I,
62
- extension: () => I,
63
- fetch: () => g,
64
- fetchCredentialedPermission: () => c,
65
- fetchLocalPermission: () => te,
66
- fetchPermission: () => z,
67
- gotoPermission: () => C,
68
- handleRevivableModules: () => O,
69
- hasForgedCookie: () => U,
70
- isBackgroundStopped: () => X,
71
- isBlockedFetchUrl: () => ee,
72
- isBlockedFrameUrl: () => i,
73
- isExtensionExposed: () => V,
74
- isLocalNetworkUrl: () => _,
75
- isLocatorDenied: () => u,
76
- isLocatorInvalid: () => re,
77
- isLocatorUnsupported: () => ie,
78
- isPermissionDenied: () => F,
79
- isTerminalError: () => ae,
80
- isType: () => j,
81
- modifyRequestHeadersPermission: () => f,
82
- permissions: () => B,
83
- promptInstall: () => Z,
84
- readCookiePermission: () => l,
85
- readExtensionHandshake: () => N,
86
- removeRequestHeaderRule: () => se,
87
- revive: () => A,
88
- setMissingExtensionHandler: () => S,
89
- setRequestHeaderRule: () => r,
90
- supportsOperation: () => E,
91
- type: () => b,
92
- waitForExtensionExposure: () => L
93
- });
94
- //#endregion
95
- export { Y as a, Z as i, fe as n, X as o, $ as r, pe as t };
@@ -1 +0,0 @@
1
- const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./lib-BiQ6cOZ7.cjs"),n=require("./api-BmaUJUUp.cjs"),r=require("./proxy-Blzm-Dc1.cjs"),i=require("./desktop.cjs");var a=`BackgroundStoppedError`,o=e=>t.d(e)&&e.name===`BackgroundStoppedError`,s=async e=>{if(t.Z(`promptInstall`,e),typeof window>`u`)return!1;if(t.rt())return!0;let r=await n.o,i=null,a=new Promise(e=>{i=()=>{t.rt()&&e(!0)},t.nt.addEventListener(`statuschange`,i)}),o=r.installPrompt.show(e).then(()=>!1),s=await Promise.race([a,o]);return i&&t.nt.removeEventListener(`statuschange`,i),await r.installPrompt.hide().catch(()=>{}),s},c=null;t.at(()=>(c||=s().then(()=>void 0).finally(()=>{c=null}),c));var l=()=>typeof document<`u`&&t.rt(),u=async(e,a)=>{if(n.p(e),t.Z(`fetch`,a?.reason),a?.credentials===`include`){if(typeof document>`u`)throw Error(`fetch with credentials needs the FKN extension, which only exists in window realms`);return t.W(e,a)}return l()?t.W(e,{...a,credentials:`omit`}):i.available()?i.fetch(e,a):r.t(e,a)},d=e.t({ATTACH_FRAME_EVENT_KEY:()=>t.i,BACKGROUND_STOPPED:()=>a,CATEGORIES:()=>t.w,EXTENSION_ABI:()=>5,ExtensionOperationUnsupportedError:()=>t.ct,ExtensionOutdatedError:()=>t.lt,FORGEABLE_HEADERS:()=>t.Q,FrameWindowBlockedError:()=>t.g,FrameWindowRefusedError:()=>t._,LOCATOR_DENIED:()=>t.A,LOCATOR_ERROR:()=>t.F,LOCATOR_INVALID:()=>t.L,LOCATOR_UNSUPPORTED:()=>t.D,MAX_REASON_LENGTH:()=>100,PERMISSION_DENIED:()=>t.t,REQUIRED_EXTENSION_ABI:()=>0,TimeoutError:()=>t.E,assertAttachableFrameUrl:()=>t.x,assertFetchableUrl:()=>t.U,assertForgeableHeaders:()=>t.$,assertLockdownApplicable:()=>t.S,assertOneCookieIdentity:()=>t.et,attachFrame:()=>t.a,attachFramePermission:()=>t.v,available:()=>l,box:()=>t.pt,cookies:()=>t.V,createFrame:()=>t.y,createVideoElementHandle:()=>t.mt,events:()=>t.nt,extension:()=>t.nt,fetch:()=>t.W,fetchCredentialedPermission:()=>t.G,fetchLocalPermission:()=>t.K,fetchPermission:()=>t.q,gotoPermission:()=>t.b,handleRevivableModules:()=>t.ft,hasForgedCookie:()=>t.tt,isBackgroundStopped:()=>o,isBlockedFetchUrl:()=>t.J,isBlockedFrameUrl:()=>t.C,isExtensionExposed:()=>t.rt,isLocalNetworkUrl:()=>t.Y,isLocatorDenied:()=>t.I,isLocatorInvalid:()=>t.M,isLocatorUnsupported:()=>t.O,isPermissionDenied:()=>t.n,isTerminalError:()=>t.P,isType:()=>t.ht,modifyRequestHeadersPermission:()=>t.R,permissions:()=>t.r,promptInstall:()=>s,readCookiePermission:()=>t.H,readExtensionHandshake:()=>t.it,removeRequestHeaderRule:()=>t.z,revive:()=>t.gt,setMissingExtensionHandler:()=>t.at,setRequestHeaderRule:()=>t.B,supportsOperation:()=>t.dt,type:()=>t._t,waitForExtensionExposure:()=>t.ot});Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return d}});
@@ -1 +0,0 @@
1
- const e=require("./api-BmaUJUUp.cjs"),t=require("./busy-BXbVH595.cjs");var n=typeof FinalizationRegistry>`u`?void 0:new FinalizationRegistry(e=>e()),r=e=>{let r=e.body;if(!r)return e;let i=t.t(`streamed response`),a=r.getReader(),o=new ReadableStream({pull:async e=>{try{let{done:t,value:n}=await a.read();if(t){i(),e.close();return}e.enqueue(n)}catch(t){i(),e.error(t)}},cancel:async e=>{i(),await a.cancel(e).catch(()=>{})}}),s=new Response(o,{status:e.status,statusText:e.statusText,headers:e.headers});return n?.register(s,i),s},i=async e=>{if(e!=null)return typeof e==`string`||e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e:new Request(`https://body.invalid/`,{method:`POST`,body:e,duplex:`half`}).arrayBuffer()},a=async e=>{if(e.method===`GET`||e.method===`HEAD`)return;let t=await e.clone().arrayBuffer();return t.byteLength?t:void 0},o=async(t,n)=>{if(e.p(t),typeof t==`object`&&t&&!(t instanceof URL)&&typeof t.url==`string`){let o=t,s={};o.headers.forEach((e,t)=>{s[t]=e});let c=await i(n?.body===void 0?await a(o):n.body);return e.o.then(e=>e.cloud.fetch(o.url,{...n,method:n?.method??o.method,headers:n?.headers??s,body:c})).then(r)}let o=t instanceof URL?t.href:t,s=await i(n?.body);return e.o.then(e=>e.cloud.fetch(o,n?.body===void 0?n:{...n,body:s})).then(r)};Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
package/proxy-C2HY5Ybc.js DELETED
@@ -1,60 +0,0 @@
1
- import { o as e, p as t } from "./api-DEfkbHGB.js";
2
- import { t as n } from "./busy-DsMWrSzc.js";
3
- //#region src/proxy.ts
4
- var r = typeof FinalizationRegistry > "u" ? void 0 : new FinalizationRegistry((e) => e()), i = (e) => {
5
- let t = e.body;
6
- if (!t) return e;
7
- let i = n("streamed response"), a = t.getReader(), o = new ReadableStream({
8
- pull: async (e) => {
9
- try {
10
- let { done: t, value: n } = await a.read();
11
- if (t) {
12
- i(), e.close();
13
- return;
14
- }
15
- e.enqueue(n);
16
- } catch (t) {
17
- i(), e.error(t);
18
- }
19
- },
20
- cancel: async (e) => {
21
- i(), await a.cancel(e).catch(() => {});
22
- }
23
- }), s = new Response(o, {
24
- status: e.status,
25
- statusText: e.statusText,
26
- headers: e.headers
27
- });
28
- return r?.register(s, i), s;
29
- }, a = async (e) => {
30
- if (e != null) return typeof e == "string" || e instanceof ArrayBuffer || ArrayBuffer.isView(e) ? e : new Request("https://body.invalid/", {
31
- method: "POST",
32
- body: e,
33
- duplex: "half"
34
- }).arrayBuffer();
35
- }, o = async (e) => {
36
- if (e.method === "GET" || e.method === "HEAD") return;
37
- let t = await e.clone().arrayBuffer();
38
- return t.byteLength ? t : void 0;
39
- }, s = async (n, r) => {
40
- if (t(n), typeof n == "object" && n && !(n instanceof URL) && typeof n.url == "string") {
41
- let t = n, s = {};
42
- t.headers.forEach((e, t) => {
43
- s[t] = e;
44
- });
45
- let c = await a(r?.body === void 0 ? await o(t) : r.body);
46
- return e.then((e) => e.cloud.fetch(t.url, {
47
- ...r,
48
- method: r?.method ?? t.method,
49
- headers: r?.headers ?? s,
50
- body: c
51
- })).then(i);
52
- }
53
- let s = n instanceof URL ? n.href : n, c = await a(r?.body);
54
- return e.then((e) => e.cloud.fetch(s, r?.body === void 0 ? r : {
55
- ...r,
56
- body: c
57
- })).then(i);
58
- };
59
- //#endregion
60
- export { s as t };