@fkn/lib 0.9.57 → 0.9.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{account-generation-ORsS9Z2F.js → account-generation-2ZvMy2tZ.js} +1 -1
- package/{account-generation-B6qSQaTA.cjs → account-generation-DIsOqkSQ.cjs} +1 -1
- package/{account-storage-Bi47np3p.cjs → account-storage-CPTct4Vz.cjs} +1 -1
- package/{account-storage-CVlvzWav.js → account-storage-Cmzz-67T.js} +2 -2
- package/account.cjs +1 -1
- package/account.d.ts +1 -1
- package/account.js +2 -2
- package/{api-DTJ5gCWb.d.ts → api-BD_XUANc.d.ts} +24 -1
- package/{api-DvS3QcoU.js → api-C-N5AVos.js} +4 -4
- package/{api-CNYWAaFu.cjs → api-ibGqkmtA.cjs} +1 -1
- package/api.cjs +1 -1
- package/api.d.ts +2 -2
- package/api.js +1 -1
- package/cloud/dns.d.ts +1 -1
- package/cloud/fetch.cjs +1 -1
- package/cloud/fetch.d.ts +1 -1
- package/cloud/fetch.js +1 -1
- package/cloud/fs.cjs +1 -1
- package/cloud/fs.js +1 -1
- package/cloud/net.d.ts +1 -1
- package/{cloud-zSEiIhvg.js → cloud-B6B2XcRU.js} +205 -184
- package/{cloud-DdAgVqlV.d.ts → cloud-BEoUa04G.d.ts} +3 -3
- package/cloud-C0hcBrFd.cjs +1 -0
- package/cloud.cjs +1 -1
- package/cloud.d.ts +3 -3
- package/cloud.js +2 -2
- package/{contract-t5YLkrMK.d.ts → contract-B8Rqx5BD.d.ts} +43 -3
- package/contract.cjs +1 -1
- package/contract.d.ts +3 -3
- package/contract.js +2 -2
- package/dgram.cjs +1 -1
- package/dgram.d.ts +10 -5
- package/dgram.js +64 -60
- package/dns.cjs +1 -1
- package/dns.d.ts +1 -1
- package/dns.js +1 -1
- package/extension-AidgSVhb.js +101 -0
- package/{extension-kE9yzbkW.d.ts → extension-C_eOfEjv.d.ts} +3 -2
- package/extension-M8bUhlML.cjs +1 -0
- package/extension.cjs +1 -1
- package/extension.d.ts +3 -3
- package/extension.js +1 -1
- package/fs/promises.cjs +1 -1
- package/fs/promises.js +1 -1
- package/{fs-igMZHzs7.cjs → fs-BlRxCJQW.cjs} +1 -1
- package/{fs-dqvJytOJ.js → fs-C_RmxWk9.js} +2 -2
- package/fs.cjs +1 -1
- package/fs.js +2 -2
- package/http.cjs +1 -1
- package/http.d.ts +4 -1
- package/http.js +2 -1
- package/{index-BQ5OZQhf.d.ts → index-C5DdoMGo.d.ts} +38 -1
- package/index.cjs +1 -1
- package/index.d.ts +7 -5
- package/index.js +53 -51
- package/{net-C94nCjW2.d.ts → net-CvJwokcz.d.ts} +14 -7
- package/net.cjs +1 -1
- package/net.d.ts +1 -1
- package/net.js +52 -46
- package/package.json +1 -1
- package/packages.cjs +1 -1
- package/packages.d.ts +1 -1
- package/packages.js +1 -1
- package/proxy-C1RlnrDC.js +61 -0
- package/proxy-CII2NFYV.cjs +1 -0
- package/{proxy-C-Y5NiAa.d.ts → proxy-z0Y8IgW7.d.ts} +2 -2
- package/relay-choice-BGwXRC5d.js +14 -0
- package/relay-choice-BmXlqfD2.d.ts +28 -0
- package/relay-choice-JC_JJY_M.cjs +1 -0
- package/rooms.cjs +1 -1
- package/rooms.d.ts +1 -1
- package/rooms.js +1 -1
- package/storage.cjs +1 -1
- package/storage.d.ts +1 -1
- package/storage.js +3 -3
- package/cloud-V4wvwQaO.cjs +0 -1
- package/extension-52n-tLJd.cjs +0 -1
- package/extension-DPNgKyHp.js +0 -95
- package/proxy-Cp9iO8Wr.js +0 -60
- package/proxy-D9PZwEZJ.cjs +0 -1
package/proxy-Cp9iO8Wr.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { o as e, p as t } from "./api-DvS3QcoU.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 };
|
package/proxy-D9PZwEZJ.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./api-CNYWAaFu.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}});
|