@fkn/lib 0.9.43 → 0.9.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{api-H1TzWitc.d.ts → api-CFkZVr53.d.ts} +61 -30
- package/api.d.ts +2 -2
- package/attach-policy.d.ts +11 -15
- package/cloud/dns.d.ts +1 -1
- package/cloud/fetch.d.ts +1 -1
- package/cloud/fs/promises.d.ts +1 -1
- package/cloud/fs.d.ts +3 -3
- package/cloud/net.d.ts +1 -1
- package/{cloud-Y0FzWpFT.d.ts → cloud-DyOQPyUB.d.ts} +4 -4
- package/cloud.d.ts +4 -4
- package/{contract-DJxGa8lb.d.ts → contract-6Xfd_qel.d.ts} +108 -21
- package/contract.d.ts +3 -3
- package/dgram.d.ts +7 -14
- package/dns.d.ts +1 -1
- package/{extension-BtDg-F2g.d.ts → extension-BlEtNAYc.d.ts} +19 -37
- package/extension.d.ts +2 -2
- package/fs/promises.d.ts +1 -1
- package/{fs-D0MMRnHC.d.ts → fs-KA1Mgisv.d.ts} +2 -2
- package/fs.d.ts +3 -3
- package/http.d.ts +1 -1
- package/{index-Cgnfjh9o.d.ts → index-BOInGaEl.d.ts} +31 -55
- package/{index-D2lvaQDs.d.ts → index-DKr9L2RI.d.ts} +6 -11
- package/index.d.ts +35 -38
- package/messages-d7pvCXPn.d.ts +34 -0
- package/messages.d.ts +1 -1
- package/{net-BOswhyfE.d.ts → net-CmMZgV2a.d.ts} +3 -19
- package/net.d.ts +1 -1
- package/package.json +1 -1
- package/packages.d.ts +1 -1
- package/{proxy-ylK5lpw8.d.ts → proxy-dOOmiMl4.d.ts} +2 -2
- package/rooms.cjs +1 -1
- package/rooms.d.ts +94 -15
- package/rooms.js +118 -90
- package/{storage-BVr2Rb-d.d.ts → storage-BLBsmkmp.d.ts} +14 -28
- package/{wire-Gbo-D74t.d.ts → wire-BwA4JjZH.d.ts} +6 -12
- package/wire.d.ts +1 -1
- package/messages-CRcziTuC.d.ts +0 -46
package/rooms.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./api--LOXTOpv.cjs"),n=require("./busy-Dv8wzE5M.cjs"),r=require("./contract.cjs");var i=e.t({available:()=>
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./api--LOXTOpv.cjs"),n=require("./busy-Dv8wzE5M.cjs"),r=require("./contract.cjs");var i=e.t({available:()=>h,create:()=>_,join:()=>v,open:()=>g}),a={wrongKey:`rooms: wrong room key`,inviteNoKey:`rooms: the invite carries no key`,badName:`rooms: the name is not one a room can have`,badKeyOption:`rooms: the key is not 32 bytes base64url`,noSuchMember:`rooms: no such member`,noSuchMessage:`rooms: no such message`,roomFull:`rooms: the room is full`,tooManyConnections:`rooms: too many connections`,tooManyBlocks:`rooms: too many blocks`,tooManyClaims:`rooms: too many claims`,mailboxFull:`rooms: the mailbox is full`,outOfStorage:`rooms: the owner is out of storage`,outOfQuota:`rooms: out of daily bandwidth`,blocked:`rooms: you are blocked from this room`,cannotSend:`rooms: you cannot send here`,permissionDenied:`rooms: permission denied`,notOwner:`rooms: not the room owner`,ownerNotRemovable:`rooms: the owner cannot be removed`,ownerKeepsEvery:`rooms: the owner keeps every permission`,removeYourself:`rooms: you cannot remove yourself`,needsAccount:`rooms: claiming needs an account`,needsPremium:`rooms: claiming needs premium`,nameClaimed:`rooms: the name is claimed`,notClaimed:`rooms: the room is not claimed`,noMailbox:`rooms: the room keeps no messages`,badLimit:`rooms: the limit is out of range`,badDescription:`rooms: the description is not one a claim can carry`,notClaimer:`rooms: only the app that claimed the room can describe it`,notReleaser:`rooms: only the app that claimed the room can release it`,notClaimingApp:`rooms: only the app that claimed the room can change it`,badTemporary:`rooms: the temporary duration is not one a claim can carry`,notTemporaryClaimer:`rooms: only the app that claimed the room can set when it expires`,temporaryUnavailable:`rooms: temporary claims are not available`,mailboxUnavailable:`rooms: the mailbox switch is not available`,tooFast:`rooms: sending too fast`,tooLarge:`rooms: the message is too large`,unavailable:`rooms: rooms are unavailable`,notEnabled:`rooms: rooms are not available`,alreadyJoined:`rooms: already joined`,notJoined:`rooms: not joined`,malformed:`rooms: malformed frame`,ended:`rooms: the room has ended`},o=(e,t)=>Object.assign(Error(t),{code:e}),s=e=>e instanceof Error&&typeof e.code==`string`,c={send:!0,receive:!0,maxMessageBytes:262144},l=()=>({messages:0,bytes:0,cap:5e8,archived:!1}),u=async()=>{if(!t.l)return;let e=(await t.s(`a room`).catch(()=>void 0))?.rooms;return typeof e?.open==`function`?e:void 0},d=()=>{throw o(`unavailable`,a.unavailable)},f=e=>e===`blocked`?`blocked`:e===`not-found`?`ended`:`unavailable`,p=e=>{if(e!==void 0&&e!==!1)return e===!0?r.ROOM_TEMPORARY_MS.default:typeof e!=`number`||!Number.isInteger(e)?null:e>=r.ROOM_TEMPORARY_MS.min&&e<=r.ROOM_TEMPORARY_MS.max?e:null},m=async e=>{let r=e.invite,i=e,u=0,d=e.self,m=e.owner,h=e.claimed,g=e.mailbox,_=0,v=await e.defaults().catch(()=>c),y=!1,b=new Set,x=new Set,S=n.t(`room`),C=()=>{},w=()=>{},T=new Promise(e=>{w=e}),E=e=>{let t=[...x];x.clear();for(let n of t)try{n(e)}catch{}},D=e=>{y||(y=!0,C(),b.clear(),S(),E(o(`closed`,a.ended)),w({reason:e}))},O=e=>{if(y)return;let t=e;if(t.type===`defaults`&&(v=t.defaults),t.type===`permissions`&&t.id===d.id&&(d={id:d.id,permissions:t.permissions,maxMessageBytes:t.maxMessageBytes}),t.type===`claim`){_+=1;let e=t.claimed&&t.mailbox!==!1;t={type:`claim`,claimed:t.claimed,owner:t.owner,mailbox:e},h=t.claimed,m=t.owner,g=e?l():null}for(let e of[...b])try{e(t)}catch{}},k=(e,t)=>{Promise.resolve(e.on(O)).catch(()=>{}),Promise.resolve(e.closed).then(e=>{t===u&&D(e.reason)},()=>{})},A=async(e,t)=>{if(typeof e?.join!=`function`)return D(`unavailable`);let n=await e.join(r).catch(()=>void 0);if(y||t!==u)return;if(!n)return D(`unavailable`);if(`error`in n)return D(f(n.error));if(n.self.id!==d.id)return Promise.resolve(n.leave()).catch(()=>{}),D(`unavailable`);i=n,d=n.self,m=n.owner,h=n.claimed,g=n.mailbox,k(n,t);let a=await n.defaults().catch(()=>void 0);a&&!y&&t===u&&(v=a)};C=t.u((e,t)=>{let n=u;u=t,!(y||n===0||n===t)&&(E(o(`unavailable`,a.unavailable)),A(e.rooms,t))}),k(e,u);let j=async e=>{if(y)throw o(`closed`,a.ended);let t=()=>{},n=new Promise((e,n)=>{t=n});x.add(t);try{return await Promise.race([Promise.resolve(e(i)),n])}catch(e){throw s(e)?e:o(`unavailable`,a.unavailable)}finally{x.delete(t)}},M=async e=>{let t=await j(e);if(`error`in t)throw o(t.error,t.message)},N=async e=>{let t=await j(e);if(typeof t==`object`&&t&&`error`in t)throw o(t.error,t.message);return t};return{id:e.id,name:e.name,key:e.key,invite:r,get self(){return d},get owner(){return m},get claimed(){return h},get mailbox(){return g},defaults:()=>v,members:()=>j(e=>e.members()),send:e=>M(t=>t.send(e)),edit:(e,t)=>M(n=>n.edit(e,t)),delete:(e,t)=>M(n=>n.delete(e,t)),backlog:(e,t)=>N(n=>n.backlog(e,t)),setDefault:(e,t)=>M(n=>n.setDefault(e,t)),limit:(e,t)=>M(n=>n.limit(e,t)),grant:(e,t)=>M(n=>n.grant(e,t)),revoke:(e,t)=>M(n=>n.revoke(e,t)),remove:e=>M(t=>t.remove(e)),block:e=>M(t=>t.block(e)),unblock:e=>M(t=>t.unblock(e)),claim:async e=>{let t=e?.description;if(t!==void 0&&typeof t!=`string`)throw o(`invalid`,a.badDescription);let n=p(e?.temporary);if(n===null)throw o(`invalid`,a.badTemporary);let r=e?.mailbox;if(r!==void 0&&typeof r!=`boolean`)throw o(`invalid`,a.malformed);let i={...t===void 0?{}:{description:t},...n===void 0?{}:{temporary:n},...r===void 0?{}:{mailbox:r}};return Object.keys(i).length===0?M(e=>e.claim()):M(e=>{if(n!==void 0&&e.temporaryClaims!==!0)throw o(`unavailable`,a.temporaryUnavailable);if(r===!1&&e.mailboxSwitch!==!0)throw o(`unavailable`,a.mailboxUnavailable);return e.claim(i)})},setMailbox:async e=>{if(typeof e!=`boolean`)throw o(`invalid`,a.malformed);let t=_;await M(t=>{if(t.mailboxSwitch!==!0)throw o(`unavailable`,a.mailboxUnavailable);return t.setMailbox(e)}),_===t&&(e?g===null&&(g=l()):g=null)},release:()=>M(e=>e.release()),usage:async()=>{let e=await N(e=>e.usage());return g=e,e},on:async e=>y?()=>{}:(b.add(e),()=>{b.delete(e)}),leave:async()=>{await Promise.resolve(i.leave()).catch(()=>{}),D(`left`)},closed:T}},h=async()=>{let e=await u();return e?e.available().catch(()=>!1):!1},g=async(e,t)=>{if(typeof e!=`string`||e.length===0||e.length>72)throw o(`invalid`,a.badName);let n=await u();if(!n)throw o(`unavailable`,a.unavailable);let r=await n.open(e,t).catch(d);if(`error`in r)throw o(r.error,r.message);return m(r)},_=async e=>{let t=await u();if(!t)throw o(`unavailable`,a.unavailable);let n=await t.create(e).catch(d);if(`error`in n)throw o(n.error,n.message);return m(n)},v=async(e,t)=>{let n=typeof e==`string`?e.indexOf(`.`):-1;if(n<=0||n===e.length-1)throw o(`invalid`,a.inviteNoKey);let r=await u();if(!r)throw o(`unavailable`,a.unavailable);let i=await r.join(e,t).catch(d);if(`error`in i)throw o(i.error,i.message);return m(i)};exports.available=h,exports.create=_,exports.join=v,exports.open=g,Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
|
package/rooms.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as RoomClaimOptions, Q as RoomEvent, X as RoomDefaults, Y as RoomCreateOptions, Z as RoomEnd, at as RoomPermission, et as RoomJoinOptions, it as RoomOpenOptions, nt as RoomMember, ot as RoomPermissions, q as RoomBacklog, rt as RoomMessage, st as RoomsErrorCode, tt as RoomMailbox } from "./contract-
|
|
1
|
+
import { J as RoomClaimOptions, Q as RoomEvent, X as RoomDefaults, Y as RoomCreateOptions, Z as RoomEnd, at as RoomPermission, et as RoomJoinOptions, it as RoomOpenOptions, nt as RoomMember, ot as RoomPermissions, q as RoomBacklog, rt as RoomMessage, st as RoomsErrorCode, tt as RoomMailbox } from "./contract-6Xfd_qel.js";
|
|
2
2
|
declare namespace rooms_d_exports {
|
|
3
3
|
export { RoomClaimOptions as ClaimOptions, RoomCreateOptions as CreateOptions, RoomJoinOptions as JoinOptions, RoomOpenOptions as OpenOptions, Room, RoomBacklog, RoomDefaults, RoomEnd, RoomEvent, RoomMailbox, RoomMember, RoomMessage, RoomPermission, RoomPermissions, RoomsError, RoomsErrorCode, available, create, join, open };
|
|
4
4
|
}
|
|
@@ -22,44 +22,87 @@ export type Room = {
|
|
|
22
22
|
readonly self: RoomMember;
|
|
23
23
|
/** the owner's member id, or '' while a claimed room's owner has never joined */
|
|
24
24
|
readonly owner: string;
|
|
25
|
-
/** whether a premium account keeps this name
|
|
25
|
+
/** whether a premium account keeps this name. Whether it keeps the messages too is `mailbox`. */
|
|
26
26
|
readonly claimed: boolean;
|
|
27
27
|
/**
|
|
28
|
-
* what the mailbox holds, as the room last said. Null
|
|
29
|
-
*
|
|
30
|
-
*
|
|
28
|
+
* what the mailbox holds, as the room last said. Null while the room keeps no messages: nobody has
|
|
29
|
+
* claimed it, or its claim keeps none. The account can clear the room, unclaim it, turn its messages
|
|
30
|
+
* off or on, or set a lower `cap` from its fkn.app settings, which the app hears as a `deleted` or a
|
|
31
|
+
* `claim` event; `usage()` reads the figures again.
|
|
31
32
|
*/
|
|
32
33
|
readonly mailbox: RoomMailbox | null;
|
|
33
34
|
defaults: () => RoomDefaults;
|
|
34
35
|
members: () => Promise<RoomMember[]>;
|
|
35
36
|
/** sealed before it leaves the browser. Rejects `too-large` past `self.maxMessageBytes` on the wire, never truncates. */
|
|
36
37
|
send: (text: string) => Promise<void>;
|
|
37
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* replaces a stored message's text: one of your own, or any as the owner. On a room claimed under an
|
|
40
|
+
* app's scope, from another app of the claim's account, it is refused `denied` (`rooms: only the app
|
|
41
|
+
* that claimed the room can change it`), the account's own messages included, as `claim` says.
|
|
42
|
+
*/
|
|
38
43
|
edit: (seq: number, text: string) => Promise<void>;
|
|
39
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* drops stored messages: one of your own, or any range as the owner. On a room claimed under an app's
|
|
46
|
+
* scope, from another app of the claim's account, it is refused `denied` (`rooms: only the app that
|
|
47
|
+
* claimed the room can change it`), the account's own messages included, as `claim` says.
|
|
48
|
+
*/
|
|
40
49
|
delete: (from: number, to?: number) => Promise<void>;
|
|
41
50
|
/** replays stored messages above `after` as `message` events marked `replayed`, one page at a time */
|
|
42
51
|
backlog: (after: number, limit?: number) => Promise<RoomBacklog>;
|
|
52
|
+
/**
|
|
53
|
+
* whether a member with no override may send or receive, from the owner only (`denied`, `rooms: not
|
|
54
|
+
* the room owner`). On a room claimed under an app's scope, from another app of the claim's account,
|
|
55
|
+
* it is refused `denied` (`rooms: only the app that claimed the room can change it`), as `claim` says.
|
|
56
|
+
*/
|
|
43
57
|
setDefault: (permission: 'send' | 'receive', value: boolean) => Promise<void>;
|
|
44
58
|
/**
|
|
45
59
|
* the message size cap, from 1 to 33,554,432. With no id it sets the room default, which is always
|
|
46
|
-
* a number. With an id it sets that member's override, and null clears the override.
|
|
60
|
+
* a number. With an id it sets that member's override, and null clears the override. From the owner
|
|
61
|
+
* only (`denied`, `rooms: not the room owner`); on a room claimed under an app's scope, from another
|
|
62
|
+
* app of the claim's account, it is refused `denied` (`rooms: only the app that claimed the room can
|
|
63
|
+
* change it`), as `claim` says.
|
|
47
64
|
*/
|
|
48
65
|
limit: {
|
|
49
66
|
(maxMessageBytes: number, id?: string): Promise<void>;
|
|
50
67
|
(maxMessageBytes: number | null, id: string): Promise<void>;
|
|
51
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* gives a member a permission over the room default, from the owner only (`denied`, `rooms: not the
|
|
71
|
+
* room owner`). On a room claimed under an app's scope, from another app of the claim's account, it is
|
|
72
|
+
* refused `denied` (`rooms: only the app that claimed the room can change it`), as `claim` says.
|
|
73
|
+
*/
|
|
52
74
|
grant: (id: string, permission: RoomPermission) => Promise<void>;
|
|
75
|
+
/**
|
|
76
|
+
* takes a permission from a member over the room default, from the owner only (`denied`, `rooms: not
|
|
77
|
+
* the room owner`). On a room claimed under an app's scope, from another app of the claim's account, it
|
|
78
|
+
* is refused `denied` (`rooms: only the app that claimed the room can change it`), as `claim` says.
|
|
79
|
+
*/
|
|
53
80
|
revoke: (id: string, permission: RoomPermission) => Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* sends a member out of the room, which they may join again, with the `remove` permission (`denied`,
|
|
83
|
+
* `rooms: permission denied`). On a room claimed under an app's scope, from another app of the claim's
|
|
84
|
+
* account, it is refused `denied` (`rooms: only the app that claimed the room can change it`), as
|
|
85
|
+
* `claim` says.
|
|
86
|
+
*/
|
|
54
87
|
remove: (id: string) => Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* sends a member out of the room and keeps them out, with the `block` permission (`denied`, `rooms:
|
|
90
|
+
* permission denied`). On a room claimed under an app's scope, from another app of the claim's account,
|
|
91
|
+
* it is refused `denied` (`rooms: only the app that claimed the room can change it`), as `claim` says.
|
|
92
|
+
*/
|
|
55
93
|
block: (id: string) => Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* lets a blocked member join again, with the `block` permission (`denied`, `rooms: permission denied`).
|
|
96
|
+
* On a room claimed under an app's scope, from another app of the claim's account, it is refused
|
|
97
|
+
* `denied` (`rooms: only the app that claimed the room can change it`), as `claim` says.
|
|
98
|
+
*/
|
|
56
99
|
unblock: (id: string) => Promise<void>;
|
|
57
100
|
/**
|
|
58
|
-
* keeps the name
|
|
59
|
-
* buys. `description` says what the room is for, shown to the account in its
|
|
60
|
-
* permanent claim with an unchanged one on every open is free. Claiming on every
|
|
61
|
-
* room again after the account unclaims it from fkn.app, so claim when the person
|
|
62
|
-
* or make it `temporary`.
|
|
101
|
+
* keeps the name for the signed-in premium account, and a mailbox unless asked not to. The only thing
|
|
102
|
+
* in rooms that premium buys. `description` says what the room is for, shown to the account in its
|
|
103
|
+
* fkn.app settings; a permanent claim with an unchanged one on every open is free. Claiming on every
|
|
104
|
+
* open also claims the room again after the account unclaims it from fkn.app, so claim when the person
|
|
105
|
+
* wants the room kept, or make it `temporary`.
|
|
63
106
|
*
|
|
64
107
|
* `temporary` makes the claim end by itself, in milliseconds (`true` is 7 days), that long after its
|
|
65
108
|
* last claim: a temporary claim goes to the account's ledger every time, which is what restarts its
|
|
@@ -67,6 +110,22 @@ export type Room = {
|
|
|
67
110
|
* from fkn.app, and the stored messages are gone. A broker too old to carry it refuses the call
|
|
68
111
|
* `unavailable` (`rooms: temporary claims are not available`) rather than make the claim permanent.
|
|
69
112
|
*
|
|
113
|
+
* `mailbox: false` keeps the name and stores nothing: the room relays as an unclaimed one does. It is
|
|
114
|
+
* read only when the call starts the claim and ignored on a room the account already holds, so claiming
|
|
115
|
+
* on every open never undoes the owner's choice.
|
|
116
|
+
*
|
|
117
|
+
* Who changes a claimed room depends on its scope. A room under an app's scope, which is every room
|
|
118
|
+
* but a `global` one, is changed by the claim's account only through the app that claimed it (the
|
|
119
|
+
* same app once it is verified): from another app of the account `setDefault`, `limit`, `grant`,
|
|
120
|
+
* `revoke`, `remove`, `block`, `unblock`, `setMailbox`, `edit` and `delete` are refused `denied`
|
|
121
|
+
* (`rooms: only the app that claimed the room can change it`), the account's own messages included,
|
|
122
|
+
* and nothing changes. That other app, which reaches the room through its invite, still joins, reads
|
|
123
|
+
* and sends. A claimed `global` room is changed by any app of the account, which also describes it,
|
|
124
|
+
* sets its `temporary` and releases it. The account changes every room it claimed
|
|
125
|
+
* from its fkn.app settings, whichever app claimed it, and members of other accounts are answered as
|
|
126
|
+
* in any room. While the room cannot tell whether two apps are one, such a change is refused
|
|
127
|
+
* `unavailable` (`rooms: rooms are unavailable`) and can be sent again.
|
|
128
|
+
*
|
|
70
129
|
* Past the account's room limit the call waits while fkn.app shows the person their claimed rooms over
|
|
71
130
|
* your app, with Unclaim on each: it resolves once one is unclaimed and this claim is made, and rejects
|
|
72
131
|
* `full` (`rooms: too many claims`) when they close the card or when fkn.app cannot show it. Nothing
|
|
@@ -74,8 +133,28 @@ export type Room = {
|
|
|
74
133
|
*/
|
|
75
134
|
claim: (options?: RoomClaimOptions) => Promise<void>;
|
|
76
135
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
136
|
+
* turns a claimed room's mailbox off or on, from the room's owner only, which in a claimed room is the
|
|
137
|
+
* claim's account. Off deletes every stored message at once, the archive included, and the room then
|
|
138
|
+
* relays as an unclaimed one does while keeping its claim; whoever is present hears a `claim` event
|
|
139
|
+
* with `mailbox: false` and no `deleted`, so what an app shows stays. On starts an empty mailbox that
|
|
140
|
+
* keeps messages from the next `seq`, and nothing deleted comes back. Turning it on needs premium, as a
|
|
141
|
+
* claim does (`denied`, `rooms: claiming needs premium`); turning it off never does. Setting what it
|
|
142
|
+
* already is changes nothing. Resolves once the room answered, with `mailbox` reading the new state,
|
|
143
|
+
* or a newer one when a release or the account's own switch landed before the answer.
|
|
144
|
+
*
|
|
145
|
+
* Refused `invalid` (`rooms: the room is not claimed`) on an unclaimed room, `denied` (`rooms: not the
|
|
146
|
+
* room owner`) from anyone else, `denied` (`rooms: only the app that claimed the room can change it`)
|
|
147
|
+
* from another app of the claim's account on a room claimed under an app's scope, as `claim` says, and
|
|
148
|
+
* `invalid` (`rooms: malformed frame`) for anything but a boolean. A broker too old to carry it refuses
|
|
149
|
+
* `unavailable` (`rooms: the mailbox switch is not available`). The account can do the same from its
|
|
150
|
+
* fkn.app settings, whichever app claimed the room.
|
|
151
|
+
*/
|
|
152
|
+
setMailbox: (on: boolean) => Promise<void>;
|
|
153
|
+
/**
|
|
154
|
+
* gives the claim back: the mailbox is deleted and whoever is present stays in an ordinary room. On a
|
|
155
|
+
* room under an app's scope, the app that claimed it only (the same app once it is verified), and from
|
|
156
|
+
* another app it is refused `denied` (`rooms: only the app that claimed the room can release it`); on a
|
|
157
|
+
* `global` room, any app of the account. The account can also unclaim it from its fkn.app settings.
|
|
79
158
|
*/
|
|
80
159
|
release: () => Promise<void>;
|
|
81
160
|
usage: () => Promise<RoomMailbox | null>;
|
package/rooms.js
CHANGED
|
@@ -4,10 +4,10 @@ import { t as i } from "./busy-B189uX--.js";
|
|
|
4
4
|
import { ROOM_TEMPORARY_MS as a } from "./contract.js";
|
|
5
5
|
//#region src/rooms.ts
|
|
6
6
|
var o = /* @__PURE__ */ e({
|
|
7
|
-
available: () =>
|
|
8
|
-
create: () =>
|
|
9
|
-
join: () =>
|
|
10
|
-
open: () =>
|
|
7
|
+
available: () => _,
|
|
8
|
+
create: () => y,
|
|
9
|
+
join: () => b,
|
|
10
|
+
open: () => v
|
|
11
11
|
}), s = {
|
|
12
12
|
wrongKey: "rooms: wrong room key",
|
|
13
13
|
inviteNoKey: "rooms: the invite carries no key",
|
|
@@ -38,9 +38,11 @@ var o = /* @__PURE__ */ e({
|
|
|
38
38
|
badDescription: "rooms: the description is not one a claim can carry",
|
|
39
39
|
notClaimer: "rooms: only the app that claimed the room can describe it",
|
|
40
40
|
notReleaser: "rooms: only the app that claimed the room can release it",
|
|
41
|
+
notClaimingApp: "rooms: only the app that claimed the room can change it",
|
|
41
42
|
badTemporary: "rooms: the temporary duration is not one a claim can carry",
|
|
42
43
|
notTemporaryClaimer: "rooms: only the app that claimed the room can set when it expires",
|
|
43
44
|
temporaryUnavailable: "rooms: temporary claims are not available",
|
|
45
|
+
mailboxUnavailable: "rooms: the mailbox switch is not available",
|
|
44
46
|
tooFast: "rooms: sending too fast",
|
|
45
47
|
tooLarge: "rooms: the message is too large",
|
|
46
48
|
unavailable: "rooms: rooms are unavailable",
|
|
@@ -53,73 +55,87 @@ var o = /* @__PURE__ */ e({
|
|
|
53
55
|
send: !0,
|
|
54
56
|
receive: !0,
|
|
55
57
|
maxMessageBytes: 262144
|
|
56
|
-
}, d =
|
|
58
|
+
}, d = () => ({
|
|
59
|
+
messages: 0,
|
|
60
|
+
bytes: 0,
|
|
61
|
+
cap: 5e8,
|
|
62
|
+
archived: !1
|
|
63
|
+
}), f = async () => {
|
|
57
64
|
if (!t) return;
|
|
58
65
|
let e = (await n("a room").catch(() => void 0))?.rooms;
|
|
59
66
|
return typeof e?.open == "function" ? e : void 0;
|
|
60
|
-
},
|
|
67
|
+
}, p = () => {
|
|
61
68
|
throw c("unavailable", s.unavailable);
|
|
62
|
-
},
|
|
69
|
+
}, m = (e) => e === "blocked" ? "blocked" : e === "not-found" ? "ended" : "unavailable", h = (e) => {
|
|
63
70
|
if (e !== void 0 && e !== !1) return e === !0 ? a.default : typeof e != "number" || !Number.isInteger(e) ? null : e >= a.min && e <= a.max ? e : null;
|
|
64
|
-
},
|
|
65
|
-
let t = e.invite, n = e, a = 0, o = e.self,
|
|
66
|
-
|
|
67
|
-
}),
|
|
68
|
-
let t = [...
|
|
69
|
-
|
|
71
|
+
}, g = async (e) => {
|
|
72
|
+
let t = e.invite, n = e, a = 0, o = e.self, f = e.owner, p = e.claimed, g = e.mailbox, _ = 0, v = await e.defaults().catch(() => u), y = !1, b = /* @__PURE__ */ new Set(), x = /* @__PURE__ */ new Set(), S = i("room"), C = () => {}, w = () => {}, T = new Promise((e) => {
|
|
73
|
+
w = e;
|
|
74
|
+
}), E = (e) => {
|
|
75
|
+
let t = [...x];
|
|
76
|
+
x.clear();
|
|
70
77
|
for (let n of t) try {
|
|
71
78
|
n(e);
|
|
72
79
|
} catch {}
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
if (
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
80
|
+
}, D = (e) => {
|
|
81
|
+
y || (y = !0, C(), b.clear(), S(), E(c("closed", s.ended)), w({ reason: e }));
|
|
82
|
+
}, O = (e) => {
|
|
83
|
+
if (y) return;
|
|
84
|
+
let t = e;
|
|
85
|
+
if (t.type === "defaults" && (v = t.defaults), t.type === "permissions" && t.id === o.id && (o = {
|
|
86
|
+
id: o.id,
|
|
87
|
+
permissions: t.permissions,
|
|
88
|
+
maxMessageBytes: t.maxMessageBytes
|
|
89
|
+
}), t.type === "claim") {
|
|
90
|
+
_ += 1;
|
|
91
|
+
let e = t.claimed && t.mailbox !== !1;
|
|
92
|
+
t = {
|
|
93
|
+
type: "claim",
|
|
94
|
+
claimed: t.claimed,
|
|
95
|
+
owner: t.owner,
|
|
96
|
+
mailbox: e
|
|
97
|
+
}, p = t.claimed, f = t.owner, g = e ? d() : null;
|
|
85
98
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
99
|
+
for (let e of [...b]) try {
|
|
100
|
+
e(t);
|
|
101
|
+
} catch {}
|
|
102
|
+
}, k = (e, t) => {
|
|
103
|
+
Promise.resolve(e.on(O)).catch(() => {}), Promise.resolve(e.closed).then((e) => {
|
|
104
|
+
t === a && D(e.reason);
|
|
89
105
|
}, () => {});
|
|
90
|
-
},
|
|
91
|
-
if (typeof e?.join != "function") return
|
|
106
|
+
}, A = async (e, r) => {
|
|
107
|
+
if (typeof e?.join != "function") return D("unavailable");
|
|
92
108
|
let i = await e.join(t).catch(() => void 0);
|
|
93
|
-
if (
|
|
94
|
-
if (!i) return
|
|
95
|
-
if ("error" in i) return
|
|
96
|
-
if (i.self.id !== o.id) return Promise.resolve(i.leave()).catch(() => {}),
|
|
97
|
-
n = i, o = i.self,
|
|
109
|
+
if (y || r !== a) return;
|
|
110
|
+
if (!i) return D("unavailable");
|
|
111
|
+
if ("error" in i) return D(m(i.error));
|
|
112
|
+
if (i.self.id !== o.id) return Promise.resolve(i.leave()).catch(() => {}), D("unavailable");
|
|
113
|
+
n = i, o = i.self, f = i.owner, p = i.claimed, g = i.mailbox, k(i, r);
|
|
98
114
|
let s = await i.defaults().catch(() => void 0);
|
|
99
|
-
s && !
|
|
115
|
+
s && !y && r === a && (v = s);
|
|
100
116
|
};
|
|
101
|
-
|
|
117
|
+
C = r((e, t) => {
|
|
102
118
|
let n = a;
|
|
103
|
-
a = t, !(
|
|
104
|
-
}),
|
|
105
|
-
let
|
|
106
|
-
if (
|
|
119
|
+
a = t, !(y || n === 0 || n === t) && (E(c("unavailable", s.unavailable)), A(e.rooms, t));
|
|
120
|
+
}), k(e, a);
|
|
121
|
+
let j = async (e) => {
|
|
122
|
+
if (y) throw c("closed", s.ended);
|
|
107
123
|
let t = () => {}, r = new Promise((e, n) => {
|
|
108
124
|
t = n;
|
|
109
125
|
});
|
|
110
|
-
|
|
126
|
+
x.add(t);
|
|
111
127
|
try {
|
|
112
128
|
return await Promise.race([Promise.resolve(e(n)), r]);
|
|
113
129
|
} catch (e) {
|
|
114
130
|
throw l(e) ? e : c("unavailable", s.unavailable);
|
|
115
131
|
} finally {
|
|
116
|
-
|
|
132
|
+
x.delete(t);
|
|
117
133
|
}
|
|
118
|
-
},
|
|
119
|
-
let t = await
|
|
134
|
+
}, M = async (e) => {
|
|
135
|
+
let t = await j(e);
|
|
120
136
|
if ("error" in t) throw c(t.error, t.message);
|
|
121
|
-
},
|
|
122
|
-
let t = await
|
|
137
|
+
}, N = async (e) => {
|
|
138
|
+
let t = await j(e);
|
|
123
139
|
if (typeof t == "object" && t && "error" in t) throw c(t.error, t.message);
|
|
124
140
|
return t;
|
|
125
141
|
};
|
|
@@ -132,78 +148,90 @@ var o = /* @__PURE__ */ e({
|
|
|
132
148
|
return o;
|
|
133
149
|
},
|
|
134
150
|
get owner() {
|
|
135
|
-
return
|
|
151
|
+
return f;
|
|
136
152
|
},
|
|
137
153
|
get claimed() {
|
|
138
|
-
return
|
|
154
|
+
return p;
|
|
139
155
|
},
|
|
140
156
|
get mailbox() {
|
|
141
|
-
return
|
|
157
|
+
return g;
|
|
142
158
|
},
|
|
143
|
-
defaults: () =>
|
|
144
|
-
members: () =>
|
|
145
|
-
send: (e) =>
|
|
146
|
-
edit: (e, t) =>
|
|
147
|
-
delete: (e, t) =>
|
|
148
|
-
backlog: (e, t) =>
|
|
149
|
-
setDefault: (e, t) =>
|
|
150
|
-
limit: (e, t) =>
|
|
151
|
-
grant: (e, t) =>
|
|
152
|
-
revoke: (e, t) =>
|
|
153
|
-
remove: (e) =>
|
|
154
|
-
block: (e) =>
|
|
155
|
-
unblock: (e) =>
|
|
159
|
+
defaults: () => v,
|
|
160
|
+
members: () => j((e) => e.members()),
|
|
161
|
+
send: (e) => M((t) => t.send(e)),
|
|
162
|
+
edit: (e, t) => M((n) => n.edit(e, t)),
|
|
163
|
+
delete: (e, t) => M((n) => n.delete(e, t)),
|
|
164
|
+
backlog: (e, t) => N((n) => n.backlog(e, t)),
|
|
165
|
+
setDefault: (e, t) => M((n) => n.setDefault(e, t)),
|
|
166
|
+
limit: (e, t) => M((n) => n.limit(e, t)),
|
|
167
|
+
grant: (e, t) => M((n) => n.grant(e, t)),
|
|
168
|
+
revoke: (e, t) => M((n) => n.revoke(e, t)),
|
|
169
|
+
remove: (e) => M((t) => t.remove(e)),
|
|
170
|
+
block: (e) => M((t) => t.block(e)),
|
|
171
|
+
unblock: (e) => M((t) => t.unblock(e)),
|
|
156
172
|
claim: async (e) => {
|
|
157
173
|
let t = e?.description;
|
|
158
174
|
if (t !== void 0 && typeof t != "string") throw c("invalid", s.badDescription);
|
|
159
|
-
let n =
|
|
175
|
+
let n = h(e?.temporary);
|
|
160
176
|
if (n === null) throw c("invalid", s.badTemporary);
|
|
161
|
-
let r =
|
|
177
|
+
let r = e?.mailbox;
|
|
178
|
+
if (r !== void 0 && typeof r != "boolean") throw c("invalid", s.malformed);
|
|
179
|
+
let i = {
|
|
162
180
|
...t === void 0 ? {} : { description: t },
|
|
163
|
-
...n === void 0 ? {} : { temporary: n }
|
|
181
|
+
...n === void 0 ? {} : { temporary: n },
|
|
182
|
+
...r === void 0 ? {} : { mailbox: r }
|
|
164
183
|
};
|
|
165
|
-
return Object.keys(
|
|
184
|
+
return Object.keys(i).length === 0 ? M((e) => e.claim()) : M((e) => {
|
|
166
185
|
if (n !== void 0 && e.temporaryClaims !== !0) throw c("unavailable", s.temporaryUnavailable);
|
|
167
|
-
|
|
186
|
+
if (r === !1 && e.mailboxSwitch !== !0) throw c("unavailable", s.mailboxUnavailable);
|
|
187
|
+
return e.claim(i);
|
|
168
188
|
});
|
|
169
189
|
},
|
|
170
|
-
|
|
190
|
+
setMailbox: async (e) => {
|
|
191
|
+
if (typeof e != "boolean") throw c("invalid", s.malformed);
|
|
192
|
+
let t = _;
|
|
193
|
+
await M((t) => {
|
|
194
|
+
if (t.mailboxSwitch !== !0) throw c("unavailable", s.mailboxUnavailable);
|
|
195
|
+
return t.setMailbox(e);
|
|
196
|
+
}), _ === t && (e ? g === null && (g = d()) : g = null);
|
|
197
|
+
},
|
|
198
|
+
release: () => M((e) => e.release()),
|
|
171
199
|
usage: async () => {
|
|
172
|
-
let e = await
|
|
173
|
-
return
|
|
200
|
+
let e = await N((e) => e.usage());
|
|
201
|
+
return g = e, e;
|
|
174
202
|
},
|
|
175
|
-
on: async (e) =>
|
|
176
|
-
|
|
203
|
+
on: async (e) => y ? () => {} : (b.add(e), () => {
|
|
204
|
+
b.delete(e);
|
|
177
205
|
}),
|
|
178
206
|
leave: async () => {
|
|
179
|
-
await Promise.resolve(n.leave()).catch(() => {}),
|
|
207
|
+
await Promise.resolve(n.leave()).catch(() => {}), D("left");
|
|
180
208
|
},
|
|
181
|
-
closed:
|
|
209
|
+
closed: T
|
|
182
210
|
};
|
|
183
|
-
},
|
|
184
|
-
let e = await
|
|
211
|
+
}, _ = async () => {
|
|
212
|
+
let e = await f();
|
|
185
213
|
return e ? e.available().catch(() => !1) : !1;
|
|
186
|
-
},
|
|
214
|
+
}, v = async (e, t) => {
|
|
187
215
|
if (typeof e != "string" || e.length === 0 || e.length > 72) throw c("invalid", s.badName);
|
|
188
|
-
let n = await
|
|
216
|
+
let n = await f();
|
|
189
217
|
if (!n) throw c("unavailable", s.unavailable);
|
|
190
|
-
let r = await n.open(e, t).catch(
|
|
218
|
+
let r = await n.open(e, t).catch(p);
|
|
191
219
|
if ("error" in r) throw c(r.error, r.message);
|
|
192
|
-
return
|
|
193
|
-
},
|
|
194
|
-
let t = await
|
|
220
|
+
return g(r);
|
|
221
|
+
}, y = async (e) => {
|
|
222
|
+
let t = await f();
|
|
195
223
|
if (!t) throw c("unavailable", s.unavailable);
|
|
196
|
-
let n = await t.create(e).catch(
|
|
224
|
+
let n = await t.create(e).catch(p);
|
|
197
225
|
if ("error" in n) throw c(n.error, n.message);
|
|
198
|
-
return
|
|
199
|
-
},
|
|
226
|
+
return g(n);
|
|
227
|
+
}, b = async (e, t) => {
|
|
200
228
|
let n = typeof e == "string" ? e.indexOf(".") : -1;
|
|
201
229
|
if (n <= 0 || n === e.length - 1) throw c("invalid", s.inviteNoKey);
|
|
202
|
-
let r = await
|
|
230
|
+
let r = await f();
|
|
203
231
|
if (!r) throw c("unavailable", s.unavailable);
|
|
204
|
-
let i = await r.join(e, t).catch(
|
|
232
|
+
let i = await r.join(e, t).catch(p);
|
|
205
233
|
if ("error" in i) throw c(i.error, i.message);
|
|
206
|
-
return
|
|
234
|
+
return g(i);
|
|
207
235
|
};
|
|
208
236
|
//#endregion
|
|
209
|
-
export {
|
|
237
|
+
export { _ as available, y as create, b as join, v as open, o as t };
|
|
@@ -7,12 +7,10 @@ type FileEntry$1 = {
|
|
|
7
7
|
};
|
|
8
8
|
type WriteData$1 = Blob | ArrayBuffer | Uint8Array | string;
|
|
9
9
|
/**
|
|
10
|
-
* Which account a cloud call belongs to
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* `{ generation }` is a ticket from `captureAccount()`: its calls carry that generation's pin. `{ pin }`
|
|
15
|
-
* is a pin a queued entry was stamped with, sent as is.
|
|
10
|
+
* Which account a cloud call belongs to; library plumbing app code never passes. A multi-call
|
|
11
|
+
* operation (a rename, a mount, a queue drain) captures one at its start so no call lands in an
|
|
12
|
+
* account the realm switched to meanwhile. `{ generation }` is a ticket from `captureAccount()`;
|
|
13
|
+
* `{ pin }` is the pin a queued entry was stamped with, sent as is.
|
|
16
14
|
*/
|
|
17
15
|
type PinFrom = {
|
|
18
16
|
readonly generation: number;
|
|
@@ -61,18 +59,12 @@ declare class StorageLockedError extends Error {
|
|
|
61
59
|
constructor();
|
|
62
60
|
}
|
|
63
61
|
/**
|
|
64
|
-
* There is no object at this path. Test `err.code === STORAGE_NOT_FOUND`, never the message
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* a path with no committed row says "Not found", and a presign that succeeded followed by an object
|
|
68
|
-
* fetch that 404s says "storage: read failed (404)". Neither is a fault, both mean the same thing,
|
|
69
|
-
* and matching either by hand means matching both. Ripple matched only the first, so a missing
|
|
70
|
-
* backup read as a transient failure, retried forever, and a library went un-backed-up for a day
|
|
71
|
-
* without a single error anywhere.
|
|
62
|
+
* There is no object at this path. Test `err.code === STORAGE_NOT_FOUND`, never the message: absence
|
|
63
|
+
* is worded differently by the presign ("Not found") and by the object fetch ("storage: read failed
|
|
64
|
+
* (404)").
|
|
72
65
|
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* backup or destroys a real one.
|
|
66
|
+
* "There is nothing here" is safe to overwrite; "I could not tell you" is not, and a caller that
|
|
67
|
+
* confuses them either never writes a first backup or destroys a real one.
|
|
76
68
|
*/
|
|
77
69
|
declare class StorageNotFoundError extends Error {
|
|
78
70
|
code: string;
|
|
@@ -114,7 +106,6 @@ declare class StorageAccountPinUnsupportedError extends Error {
|
|
|
114
106
|
declare const isAccountChanged: (error: unknown) => boolean;
|
|
115
107
|
/** Whether the api could not read a pin at all (a queued entry's record damaged on the device). */
|
|
116
108
|
declare const isInvalidPin: (error: unknown) => boolean;
|
|
117
|
-
/** One account generation of this realm, captured when an operation started. */
|
|
118
109
|
type AccountTicket = {
|
|
119
110
|
readonly generation: number;
|
|
120
111
|
};
|
|
@@ -145,16 +136,11 @@ type SealedRead = {
|
|
|
145
136
|
/**
|
|
146
137
|
* A cloud read that also reports when the copy was sealed.
|
|
147
138
|
*
|
|
148
|
-
* `sealedAt` is an ISO string, or null
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
* a high-water mark per path and compares. Do not confuse it with the `updatedAt` on a listing,
|
|
154
|
-
* which is the server's hint and is fine for display and nothing else.
|
|
155
|
-
*
|
|
156
|
-
* The bytes and the stamp come from ONE read of ONE envelope, which is what makes the stamp
|
|
157
|
-
* describe the bytes returned beside it. `readFile` is unchanged and unaffected.
|
|
139
|
+
* `sealedAt` is an ISO string, or null for an envelope written before the seal time existed or a
|
|
140
|
+
* data plane older than this call. It is authenticated, so the server can neither forge nor alter
|
|
141
|
+
* it, but it is the WRITER's claim: it does not prove this copy is the newest, so an app that needs
|
|
142
|
+
* that keeps a high-water mark per path. The listing's `updatedAt` is a server hint, for display only.
|
|
143
|
+
* The bytes and the stamp come from one read of one envelope.
|
|
158
144
|
*/
|
|
159
145
|
declare const readFileSealed: (path: string, opts?: PinOptions) => Promise<SealedRead>;
|
|
160
146
|
declare const writeFile: (path: string, data: WriteData, opts?: {
|
|
@@ -2,19 +2,13 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Socket option codes as they appear on the WebVPN wire, and the option shapes built from them.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* `webvpn/net.ts` and `webvpn/dgram.ts`), so the previous arrangement had the published package
|
|
8
|
-
* reaching into `src/api/webvpn/packets/*` for its own vocabulary, which dragged those modules and
|
|
9
|
-
* their imports into the library's type program.
|
|
5
|
+
* Owned by the library so both sides share one source: the packet codecs in
|
|
6
|
+
* `src/api/webvpn/packets/` import from this file, and the library needs nothing from the app.
|
|
10
7
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* TcpSetOption or UdpSetOption client packet (metadata-stream tag 8), and a relay built against
|
|
16
|
-
* these numbers is deployed independently of any browser holding this file. Renumbering one is a
|
|
17
|
-
* wire break, not a refactor. Booleans go on the wire as u8, 0 for false and anything else true.
|
|
8
|
+
* The VALUES are protocol: the u8 discriminant of a tagged union inside a TcpSetOption or
|
|
9
|
+
* UdpSetOption client packet (metadata-stream tag 8). A relay built against these numbers deploys
|
|
10
|
+
* independently of any browser holding this file, so renumbering one is a wire break. Booleans go
|
|
11
|
+
* on the wire as u8, 0 for false and anything else true.
|
|
18
12
|
*/
|
|
19
13
|
declare const TCP_OPTION_NODELAY: 0;
|
|
20
14
|
declare const TCP_OPTION_TTL: 1;
|
package/wire.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as UDP_OPTION_TTL, a as TCP_OPTION_TTL, c as UDP_OPTION_ADD_MEMBERSHIP_V6, d as UDP_OPTION_DROP_MEMBERSHIP_V6, f as UDP_OPTION_MULTICAST_LOOP_V4, g as UDP_OPTION_SEND_BUFFER_SIZE, h as UDP_OPTION_RECV_BUFFER_SIZE, i as TCP_OPTION_SEND_BUFFER_SIZE, l as UDP_OPTION_BROADCAST, m as UDP_OPTION_MULTICAST_TTL_V4, n as TCP_OPTION_NODELAY, o as TcpSocketOption, p as UDP_OPTION_MULTICAST_LOOP_V6, r as TCP_OPTION_RECV_BUFFER_SIZE, s as UDP_OPTION_ADD_MEMBERSHIP_V4, t as TCP_OPTION_KEEPALIVE, u as UDP_OPTION_DROP_MEMBERSHIP_V4, v as UdpSocketOption } from "./wire-
|
|
1
|
+
import { _ as UDP_OPTION_TTL, a as TCP_OPTION_TTL, c as UDP_OPTION_ADD_MEMBERSHIP_V6, d as UDP_OPTION_DROP_MEMBERSHIP_V6, f as UDP_OPTION_MULTICAST_LOOP_V4, g as UDP_OPTION_SEND_BUFFER_SIZE, h as UDP_OPTION_RECV_BUFFER_SIZE, i as TCP_OPTION_SEND_BUFFER_SIZE, l as UDP_OPTION_BROADCAST, m as UDP_OPTION_MULTICAST_TTL_V4, n as TCP_OPTION_NODELAY, o as TcpSocketOption, p as UDP_OPTION_MULTICAST_LOOP_V6, r as TCP_OPTION_RECV_BUFFER_SIZE, s as UDP_OPTION_ADD_MEMBERSHIP_V4, t as TCP_OPTION_KEEPALIVE, u as UDP_OPTION_DROP_MEMBERSHIP_V4, v as UdpSocketOption } from "./wire-BwA4JjZH.js";
|
|
2
2
|
export { TCP_OPTION_KEEPALIVE, TCP_OPTION_NODELAY, TCP_OPTION_RECV_BUFFER_SIZE, TCP_OPTION_SEND_BUFFER_SIZE, TCP_OPTION_TTL, TcpSocketOption, UDP_OPTION_ADD_MEMBERSHIP_V4, UDP_OPTION_ADD_MEMBERSHIP_V6, UDP_OPTION_BROADCAST, UDP_OPTION_DROP_MEMBERSHIP_V4, UDP_OPTION_DROP_MEMBERSHIP_V6, UDP_OPTION_MULTICAST_LOOP_V4, UDP_OPTION_MULTICAST_LOOP_V6, UDP_OPTION_MULTICAST_TTL_V4, UDP_OPTION_RECV_BUFFER_SIZE, UDP_OPTION_SEND_BUFFER_SIZE, UDP_OPTION_TTL, UdpSocketOption };
|