@fkn/lib 0.9.24 → 0.9.25
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.cjs +1 -1
- package/account.d.ts +7 -3
- package/account.js +7 -7
- package/api-BCJO3EWi.cjs +3 -0
- package/api-CesI0aMl.d.ts +677 -0
- package/{api-Jq4OSTp1.js → api-DLvscoll.js} +99 -96
- package/api.cjs +1 -0
- package/api.d.ts +3 -0
- package/api.js +2 -0
- package/attach-policy.cjs +1 -0
- package/attach-policy.d.ts +35 -0
- package/attach-policy.js +43 -0
- package/{busy-Bp1E3JPT.js → busy-B189uX--.js} +1 -1
- package/cloud/dgram.cjs +1 -1
- package/cloud/dgram.js +2 -2
- 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/promises.d.ts +7 -6
- package/cloud/fs/promises.js +1 -1
- package/cloud/fs.cjs +1 -1
- package/cloud/fs.d.ts +3 -3
- package/cloud/fs.js +10 -9
- package/cloud/net.cjs +1 -1
- package/cloud/net.d.ts +1 -1
- package/cloud/net.js +3 -3
- package/cloud-B2ZG-0MF.cjs +1 -0
- package/cloud-B7pI3pp1.d.ts +37 -0
- package/{cloud-7rfQ2BRH.js → cloud-DolBoNvR.js} +59 -97
- package/cloud.cjs +1 -1
- package/cloud.d.ts +4 -4
- package/cloud.js +4 -4
- package/{connect-button-Ds9KpXHe.js → connect-button-CN4ZJwT6.js} +1 -1
- package/{connect-button-D8KXSL6s.d.ts → connect-button-DdoEikEd.d.ts} +1 -1
- package/contract-D6ksmIm6.d.ts +394 -0
- package/contract.cjs +0 -0
- package/contract.d.ts +3 -0
- package/contract.js +0 -0
- package/desktop.js +1 -1
- package/dgram.cjs +1 -1
- package/dgram.d.ts +6 -47
- package/dgram.js +406 -2
- package/dns.cjs +1 -1
- package/dns.d.ts +1 -3
- package/dns.js +2 -2
- package/extension-CJUeVRXf.d.ts +361 -0
- package/extension-DBazc3ff.cjs +1 -0
- package/extension-Dw9gzvei.js +84 -0
- package/extension.cjs +1 -1
- package/extension.d.ts +3 -3
- package/extension.js +3 -3
- package/fs/promises.cjs +1 -1
- package/fs/promises.d.ts +8 -9
- package/fs/promises.js +2 -2
- package/fs-DYP7utdw.cjs +1 -0
- package/{fs-CUmugp10.d.ts → fs-DlGE0ZNu.d.ts} +20 -21
- package/{fs-pOQSZfuf.js → fs-d2ANVBkm.js} +8 -8
- package/fs.cjs +1 -1
- package/fs.d.ts +2 -2
- package/fs.js +1 -1
- package/http.cjs +3 -3
- package/http.d.ts +4 -6
- package/http.js +8 -8
- package/{index-CJ0vHTcS.d.ts → index-BQgZVQl7.d.ts} +4 -7
- package/{index-DY8WjklJ.d.ts → index-BhO-wymH.d.ts} +15 -293
- package/{index-BIZeEsNu.d.ts → index-CGJTVju4.d.ts} +52 -46
- package/index.cjs +1 -1
- package/index.d.ts +12 -13
- package/index.js +61 -59
- package/lib-DLM2M3_i.cjs +53 -0
- package/{lib-k3lstfa4.js → lib-duLPF_WZ.js} +328 -277
- package/messages-DvpKMTsY.d.ts +28 -0
- package/messages.cjs +1 -0
- package/messages.d.ts +2 -0
- package/messages.js +4 -0
- package/{net-DaWv81tQ.d.ts → net-DAOcF3Eb.d.ts} +12 -16
- package/net.cjs +1 -1
- package/net.d.ts +1 -1
- package/net.js +318 -3
- package/{node-fs-BZCQUmeE.js → node-fs-C9ECR_9H.js} +2 -2
- package/opfs/promises.d.ts +7 -8
- package/opfs/promises.js +1 -1
- package/{opfs-BibrNGF0.js → opfs-D0goLAQW.js} +1 -1
- package/opfs.d.ts +24 -26
- package/opfs.js +3 -3
- package/package.json +27 -2
- package/packages.cjs +1 -1
- package/packages.d.ts +143 -2
- package/packages.js +15 -15
- package/{proxy-DmMu2_1z.d.ts → proxy-BubvP9sg.d.ts} +3 -3
- package/{proxy-BNdvRifw.cjs → proxy-CefKCs-i.cjs} +1 -1
- package/{proxy-CRbkWS4E.js → proxy-KUfE4cEQ.js} +3 -3
- package/react.d.ts +3 -7
- package/react.js +2 -2
- package/{storage-BNjLc1FV.js → storage-BjGr_vC4.js} +5 -5
- package/storage-DLB4ciMf.cjs +1 -0
- package/utils-BvgGdrgN.cjs +1 -0
- package/{utils-DVlbuXmW.js → utils-C-cAd4r4.js} +2 -3
- package/wire-Gbo-D74t.d.ts +91 -0
- package/wire.cjs +1 -0
- package/wire.d.ts +2 -0
- package/wire.js +4 -0
- package/api-BGYSJVvR.d.ts +0 -789
- package/api-C-TpWHAU.cjs +0 -3
- package/cloud-BqjwL5KM.cjs +0 -1
- package/cloud-DMTkzfcf.d.ts +0 -36
- package/dgram-BLN-mfgq.cjs +0 -1
- package/dgram-DHQcHefn.js +0 -405
- package/extension-B8Y0sUwC.js +0 -78
- package/extension-CMPZjuaV.d.ts +0 -16
- package/extension-CgSGjcSl.cjs +0 -1
- package/fs-BNnozBMU.cjs +0 -1
- package/lib-DbiVHPXE.cjs +0 -53
- package/lookup-BtwWaCZJ.d.ts +0 -7
- package/net-B6RHtWwe.cjs +0 -1
- package/net-yBkobZqK.js +0 -317
- package/packages-Cn8S-Hkn.d.ts +0 -217
- package/storage-qxXFLgTM.d.ts +0 -44
- package/storage-xAeRQQiz.cjs +0 -1
- package/utils-QfNXtEhb.cjs +0 -1
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
import { o as TcpSocketOption, v as UdpSocketOption } from "./wire-Gbo-D74t.js";
|
|
2
|
+
//#region src/contract.d.ts
|
|
3
|
+
/** The signed-in account, or null when nobody is. */
|
|
4
|
+
type Account = {
|
|
5
|
+
name: string;
|
|
6
|
+
image: string | null;
|
|
7
|
+
premium: boolean;
|
|
8
|
+
premiumUntil: string | null;
|
|
9
|
+
};
|
|
10
|
+
/** Metered proxy usage for the account behind the broker. */
|
|
11
|
+
type Quota = {
|
|
12
|
+
overQuota: boolean;
|
|
13
|
+
remaining: number;
|
|
14
|
+
usedBytes: number;
|
|
15
|
+
limitBytes: number;
|
|
16
|
+
premium: boolean;
|
|
17
|
+
bytesPerSecond: number;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Three answers where `available()` has two. `disconnected` is an ANSWER and `unknown` is nobody
|
|
21
|
+
* having been asked; the library's local-first queue drops its cloud obligation only on the first
|
|
22
|
+
* and keeps the write queued on the second.
|
|
23
|
+
*/
|
|
24
|
+
type ConnectAvailability = 'connected' | 'disconnected' | 'unknown';
|
|
25
|
+
type StorageEntry = {
|
|
26
|
+
path: string;
|
|
27
|
+
size: number;
|
|
28
|
+
contentType: string | null;
|
|
29
|
+
updatedAt: string;
|
|
30
|
+
encryption: string | null;
|
|
31
|
+
};
|
|
32
|
+
type StorageQuota = {
|
|
33
|
+
usedBytes: number;
|
|
34
|
+
limitBytes: number;
|
|
35
|
+
remaining: number;
|
|
36
|
+
objects: number;
|
|
37
|
+
maxObjects: number;
|
|
38
|
+
};
|
|
39
|
+
type WriteData = ArrayBuffer | Uint8Array | string;
|
|
40
|
+
/** Encryption state of the account's cloud storage. */
|
|
41
|
+
type EncryptionState = {
|
|
42
|
+
unlocked: boolean;
|
|
43
|
+
enrolled: boolean;
|
|
44
|
+
keyEpoch: number | null;
|
|
45
|
+
};
|
|
46
|
+
type AdoptState = {
|
|
47
|
+
files: number;
|
|
48
|
+
bytes: number;
|
|
49
|
+
};
|
|
50
|
+
type AdoptRequest = {
|
|
51
|
+
files: number;
|
|
52
|
+
bytes: number;
|
|
53
|
+
};
|
|
54
|
+
type ConflictSide = {
|
|
55
|
+
size: number;
|
|
56
|
+
updatedAt: string | null;
|
|
57
|
+
};
|
|
58
|
+
type ConflictRequest = {
|
|
59
|
+
path: string;
|
|
60
|
+
local: ConflictSide;
|
|
61
|
+
cloud: ConflictSide;
|
|
62
|
+
};
|
|
63
|
+
type ConflictChoice = 'local' | 'cloud' | null;
|
|
64
|
+
type AddressLookupResult = {
|
|
65
|
+
address: string;
|
|
66
|
+
family: 0 | 4 | 6;
|
|
67
|
+
};
|
|
68
|
+
type FrameFetchScope = 'frame.fetchRead' | 'frame.fetchWrite';
|
|
69
|
+
type FrameConsentRequest = {
|
|
70
|
+
scope: FrameFetchScope;
|
|
71
|
+
hosts: string[];
|
|
72
|
+
};
|
|
73
|
+
type DisplayCause =
|
|
74
|
+
/** the frame is not being painted at all, so an ancestor is display:none, visibility:hidden or equivalent */
|
|
75
|
+
'not-rendered' |
|
|
76
|
+
/** laid out but outside the visible region, so clipped away or positioned off screen */
|
|
77
|
+
'clipped' |
|
|
78
|
+
/**
|
|
79
|
+
* Rendered and in view, but the browser says it would not be seen.
|
|
80
|
+
*
|
|
81
|
+
* Deliberately not narrower than that. From inside the frame a cover, an ancestor `opacity`, an
|
|
82
|
+
* ancestor `visibility: hidden` and a `filter` are the SAME observation: `isIntersecting` true with
|
|
83
|
+
* `isVisible` false. Naming only one of them sends the reader hunting for something that is not
|
|
84
|
+
* there, so the message lists all of them.
|
|
85
|
+
*/
|
|
86
|
+
'not-shown';
|
|
87
|
+
/** `full` means this engine reported a boolean `isVisible`; `liveness` means we only know it paints */
|
|
88
|
+
type DisplayLevel = 'full' | 'liveness';
|
|
89
|
+
type HiddenSurface = {
|
|
90
|
+
kind: string;
|
|
91
|
+
cause: DisplayCause;
|
|
92
|
+
level: DisplayLevel;
|
|
93
|
+
};
|
|
94
|
+
type PackageQuery = {
|
|
95
|
+
/** package kind, e.g. 'plugin' - becomes the keyword `fkn-type:<type>` */
|
|
96
|
+
type: string;
|
|
97
|
+
/** host app scope, e.g. 'stub' - becomes the keyword `fkn-<type>--<id>` */
|
|
98
|
+
id?: string;
|
|
99
|
+
/** package source; npm is the only origin implemented */
|
|
100
|
+
origin?: 'npm';
|
|
101
|
+
/** free text mixed into the registry query */
|
|
102
|
+
text?: string;
|
|
103
|
+
/** result count, clamped to 1..100 */
|
|
104
|
+
size?: number;
|
|
105
|
+
};
|
|
106
|
+
type PackageResult = {
|
|
107
|
+
/** normalized version-free uri, e.g. 'npm:@banou/stub-plugin-foo' */
|
|
108
|
+
uri: string;
|
|
109
|
+
origin: 'npm';
|
|
110
|
+
name: string;
|
|
111
|
+
/** latest version per the search index - display only, install re-resolves from the packument */
|
|
112
|
+
version: string;
|
|
113
|
+
description: string;
|
|
114
|
+
keywords: string[];
|
|
115
|
+
publisher: string | null;
|
|
116
|
+
downloadsMonthly: number | null;
|
|
117
|
+
links: {
|
|
118
|
+
npm?: string;
|
|
119
|
+
homepage?: string;
|
|
120
|
+
repository?: string;
|
|
121
|
+
};
|
|
122
|
+
/** installed by the calling app */
|
|
123
|
+
installed: boolean;
|
|
124
|
+
};
|
|
125
|
+
type InstalledPackage = {
|
|
126
|
+
uri: string;
|
|
127
|
+
name: string;
|
|
128
|
+
/** null when the handler addresses code directly and has no version to pin, e.g. a dev server */
|
|
129
|
+
version: string | null;
|
|
130
|
+
installedAt: number;
|
|
131
|
+
};
|
|
132
|
+
type PickOptions = {
|
|
133
|
+
/** untrusted, rendered as text in the picker header */
|
|
134
|
+
title?: string;
|
|
135
|
+
multiple?: boolean;
|
|
136
|
+
};
|
|
137
|
+
type InstallOptions = {
|
|
138
|
+
/** exact version to pin; defaults to the packument's latest dist-tag */
|
|
139
|
+
version?: string;
|
|
140
|
+
/** skip the confirm prompt and report the install with a notice instead; the record stays scoped to the calling app */
|
|
141
|
+
noConfirm?: boolean;
|
|
142
|
+
};
|
|
143
|
+
type ConnectOptions = {
|
|
144
|
+
/** opaque contract tag delivered to the package's onConnect, e.g. 'stub-source@1' */
|
|
145
|
+
protocol?: string;
|
|
146
|
+
};
|
|
147
|
+
/** viewport coordinates, the space both the app and the broker frame measure in */
|
|
148
|
+
type SurfaceRect = {
|
|
149
|
+
x: number;
|
|
150
|
+
y: number;
|
|
151
|
+
width: number;
|
|
152
|
+
height: number;
|
|
153
|
+
};
|
|
154
|
+
/** corner radii in css order: top-left, top-right, bottom-right, bottom-left */
|
|
155
|
+
type Radii = [number, number, number, number];
|
|
156
|
+
type Placement = {
|
|
157
|
+
/** where the package frame sits, so its own layout gets the full box */
|
|
158
|
+
rect: SurfaceRect;
|
|
159
|
+
/** the part of `rect` still visible after the placeholder's scroll ancestors clip it */
|
|
160
|
+
clip?: SurfaceRect;
|
|
161
|
+
/** the placeholder's corner radii, so the frame follows a rounded container */
|
|
162
|
+
radius?: Radii;
|
|
163
|
+
};
|
|
164
|
+
type PackagesErrorCode = 'invalid' | 'not-installed' | 'unaddressable' | 'timeout' | 'unavailable' | 'denied';
|
|
165
|
+
type PackagesFail = {
|
|
166
|
+
error: PackagesErrorCode;
|
|
167
|
+
message: string;
|
|
168
|
+
};
|
|
169
|
+
/** Everything an app needs to mount a package's tenant in its OWN document. */
|
|
170
|
+
type MountDescriptor = {
|
|
171
|
+
/** where to point the iframe: the tenant origin plus the package's path */
|
|
172
|
+
url: string;
|
|
173
|
+
/** the tenant origin alone, which is what a `postMessage` to that frame must target */
|
|
174
|
+
origin: string;
|
|
175
|
+
/** the version-free identity, echoed to the package in the port message */
|
|
176
|
+
uri: string;
|
|
177
|
+
name: string;
|
|
178
|
+
version: string | null;
|
|
179
|
+
/** the connecting app, as the BROKER knows it */
|
|
180
|
+
from: string;
|
|
181
|
+
};
|
|
182
|
+
type IpFamily = 'IPv4' | 'IPv6';
|
|
183
|
+
/** Viewport rect plus optional corner radii, as the overlay host reports them. */
|
|
184
|
+
type OverlayRect = {
|
|
185
|
+
x: number;
|
|
186
|
+
y: number;
|
|
187
|
+
width: number;
|
|
188
|
+
height: number;
|
|
189
|
+
radius?: [number, number, number, number];
|
|
190
|
+
};
|
|
191
|
+
/** What the host page pushes to the broker frame so its UI stays clickable through app chrome. */
|
|
192
|
+
type OverlayState = {
|
|
193
|
+
modal: boolean;
|
|
194
|
+
rects: OverlayRect[];
|
|
195
|
+
hidden: HiddenSurface[];
|
|
196
|
+
view: {
|
|
197
|
+
width: number;
|
|
198
|
+
height: number;
|
|
199
|
+
};
|
|
200
|
+
inset: {
|
|
201
|
+
top: number;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
type SetOverlayHost = (push: (state: OverlayState) => unknown, options?: {
|
|
205
|
+
exactClips?: boolean;
|
|
206
|
+
}) => void;
|
|
207
|
+
type DnsLookup = <T extends boolean = false>(hostname: string, options?: {
|
|
208
|
+
all?: T;
|
|
209
|
+
family?: 0 | 4 | 6;
|
|
210
|
+
}) => Promise<T extends true ? AddressLookupResult[] : AddressLookupResult | undefined>;
|
|
211
|
+
type ProxyFetchInput = string | URL | Request;
|
|
212
|
+
type ProxyFetchInit = (RequestInit & {
|
|
213
|
+
render?: boolean;
|
|
214
|
+
}) | undefined;
|
|
215
|
+
type ProxyFetch = (input: ProxyFetchInput, init: ProxyFetchInit) => Promise<Response>;
|
|
216
|
+
type TcpSocketOptions = {
|
|
217
|
+
remoteAddress: string;
|
|
218
|
+
remotePort: number;
|
|
219
|
+
};
|
|
220
|
+
type TcpSocketResult = {
|
|
221
|
+
localAddress: string;
|
|
222
|
+
localFamily: IpFamily;
|
|
223
|
+
localPort: number;
|
|
224
|
+
remoteAddress: string;
|
|
225
|
+
remoteFamily: IpFamily;
|
|
226
|
+
remotePort: number;
|
|
227
|
+
dataReadableStream: ReadableStream<Uint8Array>;
|
|
228
|
+
dataWritableStream: WritableStream<Uint8Array>;
|
|
229
|
+
end: () => Promise<void>;
|
|
230
|
+
destroy: () => Promise<void>;
|
|
231
|
+
destroySoon: () => Promise<void>;
|
|
232
|
+
resetAndDestroy: () => Promise<void>;
|
|
233
|
+
setOption: (option: TcpSocketOption) => Promise<void>;
|
|
234
|
+
};
|
|
235
|
+
type TcpSocketListenerOptions = {
|
|
236
|
+
localAddress: string;
|
|
237
|
+
localPort: number;
|
|
238
|
+
onConnection: (connection: TcpSocketResult) => void | Promise<void>;
|
|
239
|
+
onClose?: (error?: Error) => void | Promise<void>;
|
|
240
|
+
};
|
|
241
|
+
type TcpSocketListenerResult = {
|
|
242
|
+
localAddress: string;
|
|
243
|
+
localFamily: IpFamily;
|
|
244
|
+
localPort: number;
|
|
245
|
+
close: () => Promise<void>;
|
|
246
|
+
};
|
|
247
|
+
type UdpSocketOptions = {
|
|
248
|
+
type: 'udp4' | 'udp6';
|
|
249
|
+
port: number;
|
|
250
|
+
address: string;
|
|
251
|
+
dataPort?: boolean;
|
|
252
|
+
};
|
|
253
|
+
type UdpDatagram = {
|
|
254
|
+
data: ArrayBuffer;
|
|
255
|
+
size: number;
|
|
256
|
+
family: IpFamily;
|
|
257
|
+
address: string;
|
|
258
|
+
port: number;
|
|
259
|
+
};
|
|
260
|
+
type UdpSocketResult = {
|
|
261
|
+
socketId: number;
|
|
262
|
+
dataPort: MessagePort | undefined;
|
|
263
|
+
dataPortAcks: true | undefined;
|
|
264
|
+
closed: Promise<{
|
|
265
|
+
reason: string;
|
|
266
|
+
}>;
|
|
267
|
+
localAddress: string;
|
|
268
|
+
localFamily: IpFamily;
|
|
269
|
+
localPort: number;
|
|
270
|
+
dataReadableStream: ReadableStream<UdpDatagram>;
|
|
271
|
+
connect: (options: {
|
|
272
|
+
remoteAddress: string;
|
|
273
|
+
remotePort: number;
|
|
274
|
+
}) => Promise<{
|
|
275
|
+
local: boolean;
|
|
276
|
+
address: string;
|
|
277
|
+
family: IpFamily;
|
|
278
|
+
port: number;
|
|
279
|
+
}>;
|
|
280
|
+
disconnect: () => Promise<void>;
|
|
281
|
+
send: (options: {
|
|
282
|
+
message: ArrayBuffer;
|
|
283
|
+
address?: string;
|
|
284
|
+
port?: number;
|
|
285
|
+
}) => Promise<void>;
|
|
286
|
+
close: () => Promise<void>;
|
|
287
|
+
setOption: (option: UdpSocketOption) => Promise<void>;
|
|
288
|
+
};
|
|
289
|
+
/**
|
|
290
|
+
* Everything the broker exposes over osra.
|
|
291
|
+
*
|
|
292
|
+
* The flat members at the bottom duplicate members of `cloud` and `overlay`. They predate the
|
|
293
|
+
* namespaced form and are kept because a published consumer may still be calling them: they are
|
|
294
|
+
* contract, not dead code.
|
|
295
|
+
*/
|
|
296
|
+
type Resolvers = {
|
|
297
|
+
cloud: {
|
|
298
|
+
fetch: ProxyFetch;
|
|
299
|
+
quota: () => Promise<Quota>;
|
|
300
|
+
dns: {
|
|
301
|
+
lookup: DnsLookup;
|
|
302
|
+
};
|
|
303
|
+
fs: {
|
|
304
|
+
available: () => Promise<boolean>;
|
|
305
|
+
availability: () => Promise<ConnectAvailability>;
|
|
306
|
+
list: () => Promise<StorageEntry[]>;
|
|
307
|
+
quota: () => Promise<StorageQuota>;
|
|
308
|
+
readFile: (path: string) => Promise<Uint8Array>;
|
|
309
|
+
writeFile: (path: string, data: WriteData, contentType: string | null) => Promise<void>;
|
|
310
|
+
remove: (path: string) => Promise<void>;
|
|
311
|
+
encryption: () => Promise<EncryptionState>;
|
|
312
|
+
unlock: () => Promise<boolean>;
|
|
313
|
+
promptAdopt: (request: AdoptRequest) => Promise<boolean>;
|
|
314
|
+
promptConflict: (request: ConflictRequest) => Promise<ConflictChoice>;
|
|
315
|
+
setAdoptSource: (next: AdoptState | null, run: (() => Promise<void>) | null) => void;
|
|
316
|
+
};
|
|
317
|
+
webvpn: {
|
|
318
|
+
tcpSocket: (options: TcpSocketOptions) => Promise<TcpSocketResult>;
|
|
319
|
+
tcpSocketListener: (options: TcpSocketListenerOptions) => Promise<TcpSocketListenerResult>;
|
|
320
|
+
udpSocket: (options: UdpSocketOptions) => Promise<UdpSocketResult>;
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
overlay: {
|
|
324
|
+
setHost: SetOverlayHost;
|
|
325
|
+
};
|
|
326
|
+
installPrompt: {
|
|
327
|
+
show: (reason?: string) => Promise<void>;
|
|
328
|
+
hide: () => void;
|
|
329
|
+
};
|
|
330
|
+
frameConsent: {
|
|
331
|
+
ensure: (request: FrameConsentRequest) => Promise<boolean>;
|
|
332
|
+
};
|
|
333
|
+
connect: {
|
|
334
|
+
prompt: (consumerOrigin: string) => Promise<boolean>;
|
|
335
|
+
};
|
|
336
|
+
relay: {
|
|
337
|
+
prompt: () => Promise<string>;
|
|
338
|
+
};
|
|
339
|
+
packages: {
|
|
340
|
+
search: (query: PackageQuery) => Promise<PackagesFail | {
|
|
341
|
+
results: PackageResult[];
|
|
342
|
+
}>;
|
|
343
|
+
pick: (query: PackageQuery, options?: PickOptions) => Promise<PackagesFail | {
|
|
344
|
+
results: PackageResult[];
|
|
345
|
+
failed: string[];
|
|
346
|
+
} | {
|
|
347
|
+
declined: true;
|
|
348
|
+
}>;
|
|
349
|
+
install: (uri: string, options?: InstallOptions) => Promise<PackagesFail | {
|
|
350
|
+
installed: InstalledPackage;
|
|
351
|
+
} | {
|
|
352
|
+
declined: true;
|
|
353
|
+
}>;
|
|
354
|
+
frame: (uri: string) => Promise<PackagesFail | MountDescriptor>;
|
|
355
|
+
list: () => Promise<{
|
|
356
|
+
results: InstalledPackage[];
|
|
357
|
+
}>;
|
|
358
|
+
uninstall: (uri: string) => Promise<PackagesFail | {
|
|
359
|
+
ok: true;
|
|
360
|
+
}>;
|
|
361
|
+
connect: (uri: string, options?: ConnectOptions) => Promise<PackagesFail | {
|
|
362
|
+
port: MessagePort;
|
|
363
|
+
closed: Promise<void>;
|
|
364
|
+
}>;
|
|
365
|
+
show: (uri: string, placement: Placement) => Promise<PackagesFail | {
|
|
366
|
+
ok: true;
|
|
367
|
+
}>;
|
|
368
|
+
hide: (uri: string) => Promise<PackagesFail | {
|
|
369
|
+
ok: true;
|
|
370
|
+
}>;
|
|
371
|
+
};
|
|
372
|
+
account: {
|
|
373
|
+
info: () => Promise<Account | null>;
|
|
374
|
+
login: (consumerOrigin: string) => Promise<boolean>;
|
|
375
|
+
logout: () => void;
|
|
376
|
+
onChange: (listener: () => void) => (() => void);
|
|
377
|
+
};
|
|
378
|
+
shell: {
|
|
379
|
+
updateReady: () => Promise<boolean>;
|
|
380
|
+
onUpdate: (callback: () => void) => () => void;
|
|
381
|
+
onUpdateTaken: (callback: () => void) => () => void;
|
|
382
|
+
applyUpdate: () => Promise<boolean>;
|
|
383
|
+
};
|
|
384
|
+
proxyFetch: ProxyFetch;
|
|
385
|
+
webVpnTcpSocket: (options: TcpSocketOptions) => Promise<TcpSocketResult>;
|
|
386
|
+
webVpnTcpSocketListener: (options: TcpSocketListenerOptions) => Promise<TcpSocketListenerResult>;
|
|
387
|
+
webVpnUdpSocket: (options: UdpSocketOptions) => Promise<UdpSocketResult>;
|
|
388
|
+
dnsLookup: DnsLookup;
|
|
389
|
+
setOverlayHost: SetOverlayHost;
|
|
390
|
+
showInstallPrompt: (reason?: string) => Promise<void>;
|
|
391
|
+
hideInstallPrompt: () => void;
|
|
392
|
+
};
|
|
393
|
+
//#endregion
|
|
394
|
+
export { ProxyFetchInit as A, TcpSocketListenerResult as B, PackageQuery as C, PickOptions as D, PackagesFail as E, SetOverlayHost as F, UdpSocketResult as G, TcpSocketResult as H, StorageEntry as I, WriteData as K, StorageQuota as L, Quota as M, Radii as N, Placement as O, Resolvers as P, SurfaceRect as R, OverlayState as S, PackagesErrorCode as T, UdpDatagram as U, TcpSocketOptions as V, UdpSocketOptions as W, InstallOptions as _, ConflictChoice as a, MountDescriptor as b, ConnectAvailability as c, DisplayLevel as d, DnsLookup as f, HiddenSurface as g, FrameFetchScope as h, AdoptState as i, ProxyFetchInput as j, ProxyFetch as k, ConnectOptions as l, FrameConsentRequest as m, AddressLookupResult as n, ConflictRequest as o, EncryptionState as p, AdoptRequest as r, ConflictSide as s, Account as t, DisplayCause as u, InstalledPackage as v, PackageResult as w, OverlayRect as x, IpFamily as y, TcpSocketListenerOptions as z };
|
package/contract.cjs
ADDED
|
File without changes
|
package/contract.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { o as TcpSocketOption, v as UdpSocketOption } from "./wire-Gbo-D74t.js";
|
|
2
|
+
import { A as ProxyFetchInit, B as TcpSocketListenerResult, C as PackageQuery, D as PickOptions, E as PackagesFail, F as SetOverlayHost, G as UdpSocketResult, H as TcpSocketResult, I as StorageEntry, K as WriteData, L as StorageQuota, M as Quota, N as Radii, O as Placement, P as Resolvers, R as SurfaceRect, S as OverlayState, T as PackagesErrorCode, U as UdpDatagram, V as TcpSocketOptions, W as UdpSocketOptions, _ as InstallOptions, a as ConflictChoice, b as MountDescriptor, c as ConnectAvailability, d as DisplayLevel, f as DnsLookup, g as HiddenSurface, h as FrameFetchScope, i as AdoptState, j as ProxyFetchInput, k as ProxyFetch, l as ConnectOptions, m as FrameConsentRequest, n as AddressLookupResult, o as ConflictRequest, p as EncryptionState, r as AdoptRequest, s as ConflictSide, t as Account, u as DisplayCause, v as InstalledPackage, w as PackageResult, x as OverlayRect, y as IpFamily, z as TcpSocketListenerOptions } from "./contract-D6ksmIm6.js";
|
|
3
|
+
export { Account, AddressLookupResult, AdoptRequest, AdoptState, ConflictChoice, ConflictRequest, ConflictSide, ConnectAvailability, ConnectOptions, DisplayCause, DisplayLevel, DnsLookup, EncryptionState, FrameConsentRequest, FrameFetchScope, HiddenSurface, InstallOptions, InstalledPackage, IpFamily, MountDescriptor, OverlayRect, OverlayState, PackageQuery, PackageResult, PackagesErrorCode, PackagesFail, PickOptions, Placement, ProxyFetch, ProxyFetchInit, ProxyFetchInput, Quota, Radii, Resolvers, SetOverlayHost, StorageEntry, StorageQuota, SurfaceRect, TcpSocketListenerOptions, TcpSocketListenerResult, type TcpSocketOption, TcpSocketOptions, TcpSocketResult, UdpDatagram, type UdpSocketOption, UdpSocketOptions, UdpSocketResult, WriteData };
|
package/contract.js
ADDED
|
File without changes
|
package/desktop.js
CHANGED
package/dgram.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./dgram-BLN-mfgq.cjs");exports.Socket=e.t,exports.createSocket=e.n,exports.default=e.r;
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./rolldown-runtime-BIInC43l.cjs"),t=require("./api-BCJO3EWi.cjs"),n=require("./busy-Dv8wzE5M.cjs"),r=require("./utils-BvgGdrgN.cjs");require("./wire.cjs");let i=require("buffer"),a=require("events"),o=require("ip-address");var s=e.t({Socket:()=>c,createSocket:()=>m,default:()=>h}),c=class extends a.EventEmitter{_type;_localAddress;_remoteAddress;_connectedLocally;_connectGeneration=0;_destroyed=!1;_busyRelease;_webVPNUdpSocketPromise;_dataPort;_socketId;_sendQueue=[];_sendQueueBytes=0;_sendFlushScheduled=!1;_peerTailCache=new Map;constructor(e){if(super(e),!e)throw Error(`Missing options`);this._type=e.type,e.connection&&this.__webvpn_udp_socket_init__(e.connection)}_lastRecvBufferSize=0;_lastSendBufferSize=0;_lastTtl=64;_lastMulticastTtl=1;_lastMulticastLoopback=!0;_setUdpOption(e){if(!this._webVPNUdpSocketPromise){this.emit(`error`,Error(`Cannot set socket option before bind`));return}this._webVPNUdpSocketPromise.then(async t=>{if(t)try{await t.setOption(e)}catch(e){this.emit(`error`,e)}})}_dataPortAcks=!1;_dataPortConsumedBytes=0;_dataPortAckedBytes=0;_ackDataPortBatch(e){if(!this._dataPortAcks||!this._dataPort||(this._dataPortConsumedBytes+=e,this._dataPortAckedBytes!==0&&this._dataPortConsumedBytes-this._dataPortAckedBytes<524288))return;this._dataPortAckedBytes=this._dataPortConsumedBytes;let t={type:r.n,consumedBytes:this._dataPortConsumedBytes};this._dataPort.postMessage(t)}_onTransportClosed(e){this._destroyed||(this._destroyed=!0,this._busyRelease?.(),this._dataPort?.close(),this._dataPort=void 0,this.listenerCount(`error`)>0&&this.emit(`error`,Error(e||`WebVPN session closed`)),this.emit(`close`))}_onDataPortBatch(e){let t=new DataView(e),n=!1,r,a=0;for(;a+4<=e.byteLength;){let o=t.getUint32(a);a+=4;let s=a+o;if(s>e.byteLength)break;let c=a+4,l=t.getUint8(c);c+=1;let u,d,p;if(l===2){if(!this._remoteAddress){a=s;continue}u=this._remoteAddress.address,d=this._remoteAddress.family,p=this._remoteAddress.port}else{let n=new Uint8Array(e,c,l===0?4:16);l===0?(d=`IPv4`,u=`${n[0]}.${n[1]}.${n[2]}.${n[3]}`):(d=`IPv6`,u=f(n)),c+=n.byteLength,p=t.getUint16(c),c+=2}let m=t.getUint32(c);c+=4;try{this.emit(`message`,i.Buffer.from(e.slice(c,c+m)),{address:u,family:d,port:p,size:m})}catch(e){n||(n=!0,r=e)}a=s}if(n)throw r}_peerTail(e,t){if(e===void 0||t===void 0)return l;let n=`${e}|${t}`,r=this._peerTailCache.get(n);if(r)return r;let i=o.Address4.isValid(e)?d(e):p(e),a=new Uint8Array(1+i.byteLength+2);return a[0]=i.byteLength===4?0:1,a.set(i,1),new DataView(a.buffer).setUint16(1+i.byteLength,t),this._peerTailCache.size>=4096&&this._peerTailCache.clear(),this._peerTailCache.set(n,a),a}_portSend(e,t,n){let r=this._peerTail(t,n),i=new Uint8Array(8+r.byteLength+4+e.byteLength),a=new DataView(i.buffer);a.setUint32(0,i.byteLength-4),a.setUint32(4,this._socketId),i.set(r,8),a.setUint32(8+r.byteLength,e.byteLength),i.set(e,12+r.byteLength),this._sendQueue.push(i),this._sendQueueBytes+=i.byteLength,!this._sendFlushScheduled&&(this._sendFlushScheduled=!0,queueMicrotask(()=>{this._sendFlushScheduled=!1;let e=this._sendQueue,t=this._sendQueueBytes;if(this._sendQueue=[],this._sendQueueBytes=0,!e.length||!this._dataPort)return;let n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.byteLength;this._dataPort.postMessage(n.buffer,[n.buffer])}))}addMembership(e,t){if(o.Address4.isValid(e)){let n=d(e),r=t&&o.Address4.isValid(t)?d(t):new Uint8Array([0,0,0,0]);this._setUdpOption({type:5,group:n,interface:r})}else if(o.Address6.isValid(e)){let t=p(e);this._setUdpOption({type:7,group:t,ifIndex:0})}else this.emit(`error`,Error(`Invalid multicast address: ${e}`))}address(){if(!this._localAddress)throw Error(`EBADF`);return this._localAddress}bind(...e){let n=r.o(...e),i=this._type===`udp6`?`::`:`0.0.0.0`,a=this.__webvpn_udp_socket_init__(t.o(`a udp socket`).then(e=>e.cloud.webvpn.udpSocket({type:this._type,address:n.address??i,port:n.port,dataPort:!0})));return n.callback&&a.then(e=>{e&&n.callback.call(this)}),this}__webvpn_udp_socket_init__(e,t){return t&&(this._localAddress={address:t.localAddress,family:t.localFamily,port:t.localPort}),this._busyRelease??=n.t(`udp socket`),this._webVPNUdpSocketPromise=e.then(e=>{if(e.dataPort)this._socketId=e.socketId,this._dataPort=e.dataPort,this._dataPortAcks=e.dataPortAcks===!0,this._dataPort.onmessage=e=>{try{this._onDataPortBatch(e.data)}finally{this._ackDataPortBatch(e.data.byteLength)}};else{let t=e.dataReadableStream.getReader();(async()=>{for(;;){let{value:e,done:n}=await t.read();if(n)return;this.emit(`message`,i.Buffer.from(e.data),{address:e.address,family:e.family,port:e.port,size:e.size})}})().catch(e=>this._onTransportClosed(e instanceof Error?e.message:void 0))}return e.closed?.then(e=>this._onTransportClosed(e?.reason)).catch(()=>{}),this._localAddress={address:e.localAddress,family:e.localFamily,port:e.localPort},e}).catch(e=>{this.emit(`error`,e)}),this._webVPNUdpSocketPromise.then(e=>{if(!e){this._busyRelease?.();return}this.emit(`listening`)}),this._webVPNUdpSocketPromise}close(e){if(!this._webVPNUdpSocketPromise)throw Error(`Socket not bound`);return this._webVPNUdpSocketPromise.then(async t=>{if(!t)throw Error(`Socket not bound`);let n=this._destroyed;this._destroyed=!0,this._busyRelease?.(),this._dataPort?.close(),this._dataPort=void 0;try{await t.close()}finally{try{e&&e()}finally{n||this.emit(`close`)}}}).catch(()=>{}),this}connect(...e){if(!this._webVPNUdpSocketPromise)throw Error(`Socket not bound`);this._webVPNUdpSocketPromise.then(async t=>{if(!t)throw Error(`Socket not bound`);let n=e[0],r=this._type===`udp6`?`::1`:`127.0.0.1`,i=typeof e[1]==`string`?e[1]:r,a=typeof e.at(-1)==`function`?e.at(-1):void 0,o=await t.connect({remotePort:n,remoteAddress:i});this._connectedLocally=o?.local===!0,this._remoteAddress=o?.address?{address:o.address,family:o.family,port:o.port}:{address:i,family:this._type===`udp6`?`IPv6`:`IPv4`,port:n},this._connectGeneration+=1,a&&a()}).catch(e=>{this.emit(`error`,e)})}disconnect(){if(!this._webVPNUdpSocketPromise)throw Error(`Socket not bound`);if(!this._remoteAddress)throw Error(`ERR_SOCKET_DGRAM_NOT_CONNECTED`);let e=this._remoteAddress,t=this._connectedLocally,n=this._connectGeneration;this._remoteAddress=void 0,this._connectedLocally=void 0,this._webVPNUdpSocketPromise.then(e=>e?.disconnect?.()).catch(r=>{this._connectGeneration===n&&(this._remoteAddress=e,this._connectedLocally=t),this.emit(`error`,r)})}dropMembership(e,t){if(o.Address4.isValid(e)){let n=d(e),r=t&&o.Address4.isValid(t)?d(t):new Uint8Array([0,0,0,0]);this._setUdpOption({type:6,group:n,interface:r})}else if(o.Address6.isValid(e)){let t=p(e);this._setUdpOption({type:8,group:t,ifIndex:0})}else this.emit(`error`,Error(`Invalid multicast address: ${e}`))}getRecvBufferSize(){return this._lastRecvBufferSize}getSendBufferSize(){return this._lastSendBufferSize}getSendQueueSize(){return 0}getSendQueueCount(){return 0}ref(){return this}remoteAddress(){if(!this._remoteAddress)throw Error(`ERR_SOCKET_DGRAM_NOT_CONNECTED`);return{address:this._remoteAddress.address,family:this._remoteAddress.family,port:this._remoteAddress.port}}send(...e){this._webVPNUdpSocketPromise||this.bind();let t=r.s(...e),n=u(t.message),i=n;if(t.hasRange){let{offset:e,length:r}=t;if(!Number.isInteger(e)||e<0||e>n.byteLength)throw Object.assign(RangeError(`"offset" is outside of buffer bounds`),{code:`ERR_BUFFER_OUT_OF_BOUNDS`});if(!Number.isInteger(r)||r<0||r>n.byteLength-e)throw Object.assign(RangeError(`"length" is outside of buffer bounds`),{code:`ERR_BUFFER_OUT_OF_BOUNDS`});i=n.subarray(e,e+r)}let a=this._type===`udp6`?`::1`:`127.0.0.1`;if(!this._webVPNUdpSocketPromise)throw Error(`Socket not bound`);this._webVPNUdpSocketPromise.then(e=>{if(!e)throw Error(`Socket not bound`);let n=t.callback,r=t.address??a,s=this._remoteAddress!==void 0&&t.address===void 0;if(this._dataPort&&(s||o.Address4.isValid(r)||o.Address6.isValid(r))){this._portSend(i,s?void 0:r,s?void 0:t.port),n?.call(this,null,i.byteLength);return}e.send({port:t.port,address:r,message:i.byteOffset===0&&i.byteLength===i.buffer.byteLength?i.buffer:i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength)}).then(()=>n?.call(this,null,i.byteLength),e=>n?n.call(this,e,0):this.emit(`error`,e))})}setBroadcast(e){this._setUdpOption({type:0,value:e})}setMulticastInterface(e){}setMulticastLoopback(e){return this._setUdpOption({type:3,value:e}),this._setUdpOption({type:4,value:e}),this._lastMulticastLoopback=e,e}setMulticastTTL(e){return this._setUdpOption({type:2,value:e}),this._lastMulticastTtl=e,e}setRecvBufferSize(e){this._setUdpOption({type:10,value:e}),this._lastRecvBufferSize=e}setSendBufferSize(e){this._setUdpOption({type:9,value:e}),this._lastSendBufferSize=e}setTTL(e){return this._setUdpOption({type:1,value:e}),this._lastTtl=e,e}unref(){return this}addSourceSpecificMembership(e,t,n){}dropSourceSpecificMembership(e,t,n){}async[Symbol.asyncDispose](){await new Promise(e=>{this.close(e)})}},l=new Uint8Array([2]),u=e=>{if(typeof e==`string`)return r.l.encode(e);if(e instanceof Uint8Array)return e;if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(Array.isArray(e)){let t=e.map(u),n=new Uint8Array(t.reduce((e,t)=>e+t.byteLength,0)),r=0;for(let e of t)n.set(e,r),r+=e.byteLength;return n}return new Uint8Array(e)},d=e=>{let t=e.split(`.`).map(e=>parseInt(e,10));if(t.length!==4||t.some(e=>Number.isNaN(e)||e<0||e>255))throw Error(`Invalid IPv4 address: ${e}`);return new Uint8Array(t)},f=e=>{let t=[];for(let n=0;n<16;n+=2)t.push(e[n]<<8|e[n+1]);let n=-1,r=1;for(let e=0;e<8;){if(t[e]!==0){e++;continue}let i=e;for(;i<8&&t[i]===0;)i++;i-e>r&&(n=e,r=i-e),e=i}return n===-1?t.map(e=>e.toString(16)).join(`:`):`${t.slice(0,n).map(e=>e.toString(16)).join(`:`)}::${t.slice(n+r).map(e=>e.toString(16)).join(`:`)}`},p=e=>{let t=new o.Address6(e).getBitsBase16(0,128).match(/.{2}/g);if(!t||t.length!==16)throw Error(`Invalid IPv6 address: ${e}`);return new Uint8Array(t.map(e=>parseInt(e,16)))},m=(e,t)=>{let n=new c(typeof e==`string`?{type:e}:e);return t&&n.on(`message`,t),n},h={Socket:c,createSocket:m};exports.Socket=c,exports.createSocket=m,exports.default=h,Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}});
|
package/dgram.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { v as UdpSocketOption } from "./wire-Gbo-D74t.js";
|
|
2
|
+
import { G as UdpSocketResult, P as Resolvers } from "./contract-D6ksmIm6.js";
|
|
3
|
+
import "./api-CesI0aMl.js";
|
|
2
4
|
import { Buffer } from "buffer";
|
|
3
5
|
import { AddressInfo } from "net";
|
|
4
6
|
import { EventEmitter } from "events";
|
|
5
7
|
import { BindOptions, RemoteInfo, Socket as Socket$2, SocketOptions, SocketType } from "dgram";
|
|
6
|
-
|
|
7
|
-
//#region src/lib/webvpn/dgram.d.ts
|
|
8
8
|
declare namespace dgram_d_exports {
|
|
9
9
|
export { Socket, createSocket, _default as default };
|
|
10
10
|
}
|
|
@@ -70,52 +70,11 @@ declare class Socket extends EventEmitter implements Socket$2 {
|
|
|
70
70
|
* address in before it reports a socket as bound.
|
|
71
71
|
*
|
|
72
72
|
* Splitting this out of `bind()` is also what gives a test a seam. Everything a refused bind does
|
|
73
|
-
* lives past `
|
|
73
|
+
* lives past `apiWithin`, so without this the only way to reach it is to mock the resolver, and
|
|
74
74
|
* the guard on that path stayed untested through the whole period the relay could not refuse a
|
|
75
75
|
* bind at all.
|
|
76
76
|
*/
|
|
77
|
-
__webvpn_udp_socket_init__(connection: ReturnType<WebVpnUdpSocket>, endpoints?: Awaited<ReturnType<WebVpnUdpSocket>>): Promise<
|
|
78
|
-
socketId: number;
|
|
79
|
-
dataPort: MessagePort | undefined;
|
|
80
|
-
dataPortAcks: true | undefined;
|
|
81
|
-
closed: Promise<{
|
|
82
|
-
reason: string;
|
|
83
|
-
}>;
|
|
84
|
-
localAddress: string;
|
|
85
|
-
localFamily: "IPv4" | "IPv6";
|
|
86
|
-
localPort: number;
|
|
87
|
-
dataReadableStream: ReadableStream<{
|
|
88
|
-
data: ArrayBuffer;
|
|
89
|
-
size: number;
|
|
90
|
-
family: 'IPv4' | 'IPv6';
|
|
91
|
-
address: string;
|
|
92
|
-
port: number;
|
|
93
|
-
}>;
|
|
94
|
-
connect: ({
|
|
95
|
-
remoteAddress: _remoteAddress,
|
|
96
|
-
remotePort
|
|
97
|
-
}: {
|
|
98
|
-
remoteAddress: string;
|
|
99
|
-
remotePort: number;
|
|
100
|
-
}) => Promise<{
|
|
101
|
-
local: boolean;
|
|
102
|
-
address: string;
|
|
103
|
-
family: "IPv4" | "IPv6";
|
|
104
|
-
port: number;
|
|
105
|
-
}>;
|
|
106
|
-
disconnect: () => Promise<void>;
|
|
107
|
-
send: ({
|
|
108
|
-
message,
|
|
109
|
-
address: _remoteAddress,
|
|
110
|
-
port: remotePort
|
|
111
|
-
}: {
|
|
112
|
-
message: ArrayBuffer;
|
|
113
|
-
address?: string;
|
|
114
|
-
port?: number;
|
|
115
|
-
}) => Promise<void>;
|
|
116
|
-
close: () => Promise<void>;
|
|
117
|
-
setOption: (option: UdpSocketOption) => Promise<void>;
|
|
118
|
-
} | undefined>;
|
|
77
|
+
__webvpn_udp_socket_init__(connection: ReturnType<WebVpnUdpSocket>, endpoints?: Awaited<ReturnType<WebVpnUdpSocket>>): Promise<UdpSocketResult | undefined>;
|
|
119
78
|
close(callback?: (() => void) | undefined): this;
|
|
120
79
|
connect(port: number, address?: string, callback?: () => void): void;
|
|
121
80
|
connect(port: number, callback: () => void): void;
|
|
@@ -156,7 +115,7 @@ declare class Socket extends EventEmitter implements Socket$2 {
|
|
|
156
115
|
declare const createSocket: (options: SocketType | SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void) => Socket;
|
|
157
116
|
declare const _default: {
|
|
158
117
|
Socket: typeof Socket;
|
|
159
|
-
createSocket:
|
|
118
|
+
createSocket: typeof createSocket;
|
|
160
119
|
};
|
|
161
120
|
//#endregion
|
|
162
121
|
export { Socket, createSocket, _default as default, dgram_d_exports as t };
|