@crvouga/mockingbird-adapter-browser 0.0.0-stage → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +172 -2
- package/TRANSPORT.md +46 -0
- package/dist/assets.d.ts +3 -0
- package/dist/assets.d.ts.map +1 -0
- package/dist/assets.js +3 -0
- package/dist/assets.js.map +1 -0
- package/dist/async-context.d.ts +29 -0
- package/dist/async-context.d.ts.map +1 -0
- package/dist/async-context.js +74 -0
- package/dist/async-context.js.map +1 -0
- package/dist/build.d.ts +25 -0
- package/dist/build.d.ts.map +1 -0
- package/dist/build.js +275 -0
- package/dist/build.js.map +1 -0
- package/dist/child-process-unsupported.d.ts +18 -0
- package/dist/child-process-unsupported.d.ts.map +1 -0
- package/dist/child-process-unsupported.js +13 -0
- package/dist/child-process-unsupported.js.map +1 -0
- package/dist/globals.d.ts +113 -0
- package/dist/globals.d.ts.map +1 -0
- package/dist/globals.js +58 -0
- package/dist/globals.js.map +1 -0
- package/dist/http-client.d.ts +64 -0
- package/dist/http-client.d.ts.map +1 -0
- package/dist/http-client.js +182 -0
- package/dist/http-client.js.map +1 -0
- package/dist/http.d.ts +143 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +349 -0
- package/dist/http.js.map +1 -0
- package/dist/http2-unsupported.d.ts +4 -0
- package/dist/http2-unsupported.d.ts.map +1 -0
- package/dist/http2-unsupported.js +11 -0
- package/dist/http2-unsupported.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/dist/modules.d.ts +8 -0
- package/dist/modules.d.ts.map +1 -0
- package/dist/modules.js +19 -0
- package/dist/modules.js.map +1 -0
- package/dist/net.d.ts +59 -0
- package/dist/net.d.ts.map +1 -0
- package/dist/net.js +273 -0
- package/dist/net.js.map +1 -0
- package/dist/network/diagnostics-channel.d.ts +34 -0
- package/dist/network/diagnostics-channel.d.ts.map +1 -0
- package/dist/network/diagnostics-channel.js +92 -0
- package/dist/network/diagnostics-channel.js.map +1 -0
- package/dist/network/dns.d.ts +12 -0
- package/dist/network/dns.d.ts.map +1 -0
- package/dist/network/dns.js +44 -0
- package/dist/network/dns.js.map +1 -0
- package/dist/network/tls.d.ts +12 -0
- package/dist/network/tls.d.ts.map +1 -0
- package/dist/network/tls.js +14 -0
- package/dist/network/tls.js.map +1 -0
- package/dist/performance.d.ts +9 -0
- package/dist/performance.d.ts.map +1 -0
- package/dist/performance.js +10 -0
- package/dist/performance.js.map +1 -0
- package/dist/runtime.d.ts +249 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +258 -0
- package/dist/runtime.js.map +1 -0
- package/package.json +108 -4
package/dist/net.js
ADDED
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { EventEmitter } from "node:events";
|
|
2
|
+
import { Duplex } from "node:stream";
|
|
3
|
+
const hosts = new Set(["localhost", "127.0.0.1", "0.0.0.0", "::1", "[::1]"]);
|
|
4
|
+
const failure = (code, message) => Object.assign(new Error(message), { code });
|
|
5
|
+
/** A world-local byte transport. No operation opens an operating-system socket. */
|
|
6
|
+
export function createVirtualNetwork(networkOptions = {}) {
|
|
7
|
+
const listeners = new Map();
|
|
8
|
+
const sockets = new Set();
|
|
9
|
+
let nextPort = 40000;
|
|
10
|
+
let disposed = false;
|
|
11
|
+
const port = (value, ephemeral = false) => {
|
|
12
|
+
if (!Number.isInteger(value) || value < 0 || value > 65535 || (!ephemeral && value === 0))
|
|
13
|
+
throw new RangeError("Invalid virtual TCP port");
|
|
14
|
+
if (value)
|
|
15
|
+
return value;
|
|
16
|
+
for (let count = 0; count < 25536; count++) {
|
|
17
|
+
const candidate = nextPort++;
|
|
18
|
+
if (nextPort > 65535)
|
|
19
|
+
nextPort = 40000;
|
|
20
|
+
if (!listeners.has(candidate) && !networkOptions.isPortReserved?.(candidate))
|
|
21
|
+
return candidate;
|
|
22
|
+
}
|
|
23
|
+
throw failure("EADDRINUSE", "No virtual TCP ports available");
|
|
24
|
+
};
|
|
25
|
+
class Socket extends Duplex {
|
|
26
|
+
connecting = false;
|
|
27
|
+
remoteAddress = "127.0.0.1";
|
|
28
|
+
remotePort = 0;
|
|
29
|
+
localAddress = "127.0.0.1";
|
|
30
|
+
localPort = 0;
|
|
31
|
+
remoteFamily = "IPv4";
|
|
32
|
+
pending = true;
|
|
33
|
+
bytesRead = 0;
|
|
34
|
+
bytesWritten = 0;
|
|
35
|
+
peer;
|
|
36
|
+
blocked;
|
|
37
|
+
timeout;
|
|
38
|
+
timeoutMs = 0;
|
|
39
|
+
constructor(options = {}) {
|
|
40
|
+
super({ allowHalfOpen: options.allowHalfOpen ?? false, autoDestroy: true });
|
|
41
|
+
sockets.add(this);
|
|
42
|
+
this.once("close", () => sockets.delete(this));
|
|
43
|
+
}
|
|
44
|
+
connect(...args) {
|
|
45
|
+
const first = args[0];
|
|
46
|
+
const options = typeof first === "object" && first !== null
|
|
47
|
+
? first
|
|
48
|
+
: { port: Number(first), host: typeof args[1] === "string" ? args[1] : undefined };
|
|
49
|
+
const callback = args.find((arg) => typeof arg === "function");
|
|
50
|
+
if (callback)
|
|
51
|
+
this.once("connect", callback);
|
|
52
|
+
if (this.connecting || this.peer)
|
|
53
|
+
throw failure("EISCONN", "Socket is already connected");
|
|
54
|
+
this.connecting = true;
|
|
55
|
+
queueMicrotask(() => {
|
|
56
|
+
if (this.destroyed)
|
|
57
|
+
return;
|
|
58
|
+
try {
|
|
59
|
+
if (disposed)
|
|
60
|
+
throw failure("ECONNREFUSED", "Virtual network is disposed");
|
|
61
|
+
if (!hosts.has(options.host ?? "localhost"))
|
|
62
|
+
throw failure("ENETUNREACH", "Only virtual loopback connections are supported");
|
|
63
|
+
const destination = port(Number(options.port));
|
|
64
|
+
const server = listeners.get(destination);
|
|
65
|
+
if (!server)
|
|
66
|
+
throw failure("ECONNREFUSED", `No virtual TCP server on port ${destination}`);
|
|
67
|
+
const remote = new Socket({ allowHalfOpen: server.allowHalfOpen });
|
|
68
|
+
this.peer = remote;
|
|
69
|
+
remote.peer = this;
|
|
70
|
+
this.remotePort = destination;
|
|
71
|
+
this.localPort = port(0, true);
|
|
72
|
+
remote.localPort = destination;
|
|
73
|
+
remote.remotePort = this.localPort;
|
|
74
|
+
this.connecting = false;
|
|
75
|
+
this.pending = remote.pending = false;
|
|
76
|
+
server.attach(remote);
|
|
77
|
+
this.touch();
|
|
78
|
+
this.emit("connect");
|
|
79
|
+
this.emit("ready");
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
this.connecting = false;
|
|
83
|
+
this.destroy(error instanceof Error ? error : new Error(String(error)));
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
return this;
|
|
87
|
+
}
|
|
88
|
+
touch() {
|
|
89
|
+
if (this.timeout)
|
|
90
|
+
clearTimeout(this.timeout);
|
|
91
|
+
if (this.timeoutMs > 0)
|
|
92
|
+
this.timeout = setTimeout(() => this.emit("timeout"), this.timeoutMs);
|
|
93
|
+
}
|
|
94
|
+
_read() {
|
|
95
|
+
const unblock = this.blocked;
|
|
96
|
+
this.blocked = undefined;
|
|
97
|
+
unblock?.();
|
|
98
|
+
}
|
|
99
|
+
_write(chunk, _encoding, callback) {
|
|
100
|
+
if (this.connecting) {
|
|
101
|
+
const ready = () => {
|
|
102
|
+
this.off("close", closed);
|
|
103
|
+
this._write(chunk, _encoding, callback);
|
|
104
|
+
};
|
|
105
|
+
const closed = () => {
|
|
106
|
+
this.off("connect", ready);
|
|
107
|
+
callback(failure("ECONNRESET", "Socket closed during connect"));
|
|
108
|
+
};
|
|
109
|
+
this.once("connect", ready);
|
|
110
|
+
this.once("close", closed);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const peer = this.peer;
|
|
114
|
+
if (!peer || peer.destroyed)
|
|
115
|
+
return callback(failure("EPIPE", "Virtual socket is closed"));
|
|
116
|
+
this.bytesWritten += chunk.byteLength;
|
|
117
|
+
peer.bytesRead += chunk.byteLength;
|
|
118
|
+
this.touch();
|
|
119
|
+
peer.touch();
|
|
120
|
+
if (peer.push(new Uint8Array(chunk)))
|
|
121
|
+
callback();
|
|
122
|
+
else
|
|
123
|
+
peer.blocked = callback;
|
|
124
|
+
}
|
|
125
|
+
_final(callback) {
|
|
126
|
+
this.peer?.push(null);
|
|
127
|
+
callback();
|
|
128
|
+
}
|
|
129
|
+
_destroy(error, callback) {
|
|
130
|
+
if (this.timeout)
|
|
131
|
+
clearTimeout(this.timeout);
|
|
132
|
+
const peer = this.peer;
|
|
133
|
+
this.peer = undefined;
|
|
134
|
+
const blocked = this.blocked;
|
|
135
|
+
this.blocked = undefined;
|
|
136
|
+
blocked?.(error ?? failure("ECONNRESET", "Virtual socket closed"));
|
|
137
|
+
if (peer) {
|
|
138
|
+
peer.peer = undefined;
|
|
139
|
+
if (!peer.destroyed)
|
|
140
|
+
peer.destroy();
|
|
141
|
+
}
|
|
142
|
+
callback(error);
|
|
143
|
+
}
|
|
144
|
+
setNoDelay() {
|
|
145
|
+
return this;
|
|
146
|
+
}
|
|
147
|
+
setKeepAlive() {
|
|
148
|
+
return this;
|
|
149
|
+
}
|
|
150
|
+
setTimeout(ms, callback) {
|
|
151
|
+
if (!Number.isFinite(ms) || ms < 0)
|
|
152
|
+
throw new RangeError("Invalid timeout");
|
|
153
|
+
if (callback)
|
|
154
|
+
this.once("timeout", callback);
|
|
155
|
+
this.timeoutMs = ms;
|
|
156
|
+
this.touch();
|
|
157
|
+
return this;
|
|
158
|
+
}
|
|
159
|
+
ref() {
|
|
160
|
+
return this;
|
|
161
|
+
}
|
|
162
|
+
unref() {
|
|
163
|
+
return this;
|
|
164
|
+
}
|
|
165
|
+
address() {
|
|
166
|
+
return { address: this.localAddress, family: "IPv4", port: this.localPort };
|
|
167
|
+
}
|
|
168
|
+
get readyState() {
|
|
169
|
+
return this.connecting ? "opening" : this.destroyed ? "closed" : "open";
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
class Server extends EventEmitter {
|
|
173
|
+
listening = false;
|
|
174
|
+
allowHalfOpen = false;
|
|
175
|
+
port = 0;
|
|
176
|
+
connections = new Set();
|
|
177
|
+
constructor(...args) {
|
|
178
|
+
super();
|
|
179
|
+
const options = args[0];
|
|
180
|
+
if (typeof options === "object" && options !== null)
|
|
181
|
+
this.allowHalfOpen = options.allowHalfOpen ?? false;
|
|
182
|
+
const callback = args.find((arg) => typeof arg === "function");
|
|
183
|
+
if (callback)
|
|
184
|
+
this.on("connection", callback);
|
|
185
|
+
}
|
|
186
|
+
attach(socket) {
|
|
187
|
+
this.connections.add(socket);
|
|
188
|
+
socket.once("close", () => this.connections.delete(socket));
|
|
189
|
+
this.emit("connection", socket);
|
|
190
|
+
}
|
|
191
|
+
listen(...args) {
|
|
192
|
+
if (disposed)
|
|
193
|
+
throw failure("ERR_SERVER_NOT_RUNNING", "Virtual network is disposed");
|
|
194
|
+
if (this.listening)
|
|
195
|
+
throw failure("ERR_SERVER_ALREADY_LISTEN", "Server is already listening");
|
|
196
|
+
const first = args[0];
|
|
197
|
+
const options = typeof first === "object" && first !== null
|
|
198
|
+
? first
|
|
199
|
+
: { port: Number(first ?? 0), host: typeof args[1] === "string" ? args[1] : undefined };
|
|
200
|
+
if (!hosts.has(options.host ?? "localhost"))
|
|
201
|
+
throw failure("EADDRNOTAVAIL", "Only loopback listeners are supported");
|
|
202
|
+
this.port = port(options.port ?? 0, true);
|
|
203
|
+
if (listeners.has(this.port) || networkOptions.isPortReserved?.(this.port))
|
|
204
|
+
throw failure("EADDRINUSE", `Virtual TCP port ${this.port} is in use`);
|
|
205
|
+
listeners.set(this.port, this);
|
|
206
|
+
this.listening = true;
|
|
207
|
+
const callback = args.find((arg) => typeof arg === "function");
|
|
208
|
+
if (callback)
|
|
209
|
+
this.once("listening", callback);
|
|
210
|
+
queueMicrotask(() => {
|
|
211
|
+
if (this.listening)
|
|
212
|
+
this.emit("listening");
|
|
213
|
+
});
|
|
214
|
+
return this;
|
|
215
|
+
}
|
|
216
|
+
address() {
|
|
217
|
+
return this.listening ? { address: "127.0.0.1", family: "IPv4", port: this.port } : null;
|
|
218
|
+
}
|
|
219
|
+
close(callback) {
|
|
220
|
+
if (listeners.get(this.port) === this)
|
|
221
|
+
listeners.delete(this.port);
|
|
222
|
+
this.listening = false;
|
|
223
|
+
for (const socket of this.connections)
|
|
224
|
+
socket.destroy();
|
|
225
|
+
queueMicrotask(() => {
|
|
226
|
+
this.emit("close");
|
|
227
|
+
callback?.();
|
|
228
|
+
});
|
|
229
|
+
return this;
|
|
230
|
+
}
|
|
231
|
+
ref() {
|
|
232
|
+
return this;
|
|
233
|
+
}
|
|
234
|
+
unref() {
|
|
235
|
+
return this;
|
|
236
|
+
}
|
|
237
|
+
getConnections(callback) {
|
|
238
|
+
callback(null, this.connections.size);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
const connect = (...args) => new Socket().connect(...args);
|
|
242
|
+
const isIPv4 = (value) => /^(?:\d{1,3}\.){3}\d{1,3}$/.test(value) &&
|
|
243
|
+
value.split(".").every((part) => Number(part) <= 255 && (part === "0" || !part.startsWith("0")));
|
|
244
|
+
const isIPv6 = (value) => {
|
|
245
|
+
try {
|
|
246
|
+
return new URL(`http://[${value}]/`).hostname.startsWith("[");
|
|
247
|
+
}
|
|
248
|
+
catch {
|
|
249
|
+
return false;
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
return {
|
|
253
|
+
Socket,
|
|
254
|
+
Server,
|
|
255
|
+
connect,
|
|
256
|
+
createConnection: connect,
|
|
257
|
+
createServer: (...args) => new Server(...args),
|
|
258
|
+
isIPv4,
|
|
259
|
+
isIPv6,
|
|
260
|
+
isIP: (value) => (isIPv4(value) ? 4 : isIPv6(value) ? 6 : 0),
|
|
261
|
+
hasListener: (port) => listeners.has(port),
|
|
262
|
+
dispose() {
|
|
263
|
+
if (disposed)
|
|
264
|
+
return;
|
|
265
|
+
disposed = true;
|
|
266
|
+
for (const server of listeners.values())
|
|
267
|
+
server.close();
|
|
268
|
+
for (const socket of sockets)
|
|
269
|
+
socket.destroy();
|
|
270
|
+
},
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
//# sourceMappingURL=net.js.map
|
package/dist/net.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"net.js","sourceRoot":"","sources":["../src/net.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAA;AAE5E,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,OAAe,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;AAyC9F,mFAAmF;AACnF,MAAM,UAAU,oBAAoB,CAClC,iBAAiE,EAAE;IAEnE,MAAM,SAAS,GAAG,IAAI,GAAG,EAAkB,CAAA;IAC3C,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAA;IACjC,IAAI,QAAQ,GAAG,KAAK,CAAA;IACpB,IAAI,QAAQ,GAAG,KAAK,CAAA;IACpB,MAAM,IAAI,GAAG,CAAC,KAAa,EAAE,SAAS,GAAG,KAAK,EAAE,EAAE;QAChD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,KAAK,IAAI,CAAC,CAAC,SAAS,IAAI,KAAK,KAAK,CAAC,CAAC;YACvF,MAAM,IAAI,UAAU,CAAC,0BAA0B,CAAC,CAAA;QAClD,IAAI,KAAK;YAAE,OAAO,KAAK,CAAA;QACvB,KAAK,IAAI,KAAK,GAA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I,OAAO;gBAAE,MAAM,CAAC,OAAO,EAAE,CAAA;QAChD,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
type Subscriber = (message: unknown, name: string | symbol) => void;
|
|
2
|
+
type Store = {
|
|
3
|
+
run<Result>(value: unknown, callback: () => Result): Result;
|
|
4
|
+
};
|
|
5
|
+
export declare class Channel {
|
|
6
|
+
readonly name: string | symbol;
|
|
7
|
+
private subscribers;
|
|
8
|
+
private stores;
|
|
9
|
+
constructor(name: string | symbol);
|
|
10
|
+
get hasSubscribers(): boolean;
|
|
11
|
+
subscribe(callback: Subscriber): void;
|
|
12
|
+
unsubscribe(callback: Subscriber): boolean;
|
|
13
|
+
publish(message: unknown): void;
|
|
14
|
+
bindStore(store: Store, transform?: (message: unknown) => unknown): void;
|
|
15
|
+
unbindStore(store: Store): boolean;
|
|
16
|
+
runStores<Args extends unknown[], Result>(message: unknown, callback: (...args: Args) => Result, thisArg?: unknown, ...args: Args): Result;
|
|
17
|
+
}
|
|
18
|
+
export declare const channel: (name: string | symbol) => Channel;
|
|
19
|
+
export declare const hasSubscribers: (name: string | symbol) => boolean;
|
|
20
|
+
export declare const subscribe: (name: string | symbol, callback: Subscriber) => void;
|
|
21
|
+
export declare const unsubscribe: (name: string | symbol, callback: Subscriber) => boolean;
|
|
22
|
+
export declare const tracingChannel: (name: string) => {
|
|
23
|
+
start: Channel;
|
|
24
|
+
end: Channel;
|
|
25
|
+
asyncStart: Channel;
|
|
26
|
+
asyncEnd: Channel;
|
|
27
|
+
error: Channel;
|
|
28
|
+
readonly hasSubscribers: boolean;
|
|
29
|
+
traceSync<Args extends unknown[], Result>(callback: (...args: Args) => Result, context?: Record<string, unknown>, thisArg?: unknown, ...args: Args): Result;
|
|
30
|
+
tracePromise(): never;
|
|
31
|
+
traceCallback(): never;
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=diagnostics-channel.d.ts.map
|
|
@@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,MAAM,WAAW,GAAI,MAAM,MAAM,GAAG,MAAM,EAAE,UAAU,UAAU,YAClC,CAAA;AACrC,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM;;;;;;;cAe7B,IAAI,SAAS,OAAO,EAAE,EAAE,MAAM,YAC5B,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,MAAM,YAC1B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YACtB,OAAO,WACR,IAAI,GACZ,MAAM;oBAeO,KAAK;qBAGJ,KAAK;CAIzB,CAAA"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { UnsupportedRuntimeError } from "../runtime.js";
|
|
2
|
+
const channels = new Map();
|
|
3
|
+
export class Channel {
|
|
4
|
+
name;
|
|
5
|
+
subscribers = new Set();
|
|
6
|
+
stores = new Map();
|
|
7
|
+
constructor(name) {
|
|
8
|
+
this.name = name;
|
|
9
|
+
}
|
|
10
|
+
get hasSubscribers() {
|
|
11
|
+
return this.subscribers.size > 0;
|
|
12
|
+
}
|
|
13
|
+
subscribe(callback) {
|
|
14
|
+
this.subscribers.add(callback);
|
|
15
|
+
}
|
|
16
|
+
unsubscribe(callback) {
|
|
17
|
+
return this.subscribers.delete(callback);
|
|
18
|
+
}
|
|
19
|
+
publish(message) {
|
|
20
|
+
for (const callback of [...this.subscribers])
|
|
21
|
+
callback(message, this.name);
|
|
22
|
+
}
|
|
23
|
+
bindStore(store, transform = (value) => value) {
|
|
24
|
+
this.stores.set(store, transform);
|
|
25
|
+
}
|
|
26
|
+
unbindStore(store) {
|
|
27
|
+
return this.stores.delete(store);
|
|
28
|
+
}
|
|
29
|
+
runStores(message, callback, thisArg, ...args) {
|
|
30
|
+
let run = () => {
|
|
31
|
+
this.publish(message);
|
|
32
|
+
return callback.apply(thisArg, args);
|
|
33
|
+
};
|
|
34
|
+
for (const [store, transform] of [...this.stores].reverse()) {
|
|
35
|
+
const previous = run;
|
|
36
|
+
run = () => store.run(transform(message), previous);
|
|
37
|
+
}
|
|
38
|
+
return run();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export const channel = (name) => {
|
|
42
|
+
let found = channels.get(name);
|
|
43
|
+
if (!found) {
|
|
44
|
+
found = new Channel(name);
|
|
45
|
+
channels.set(name, found);
|
|
46
|
+
}
|
|
47
|
+
return found;
|
|
48
|
+
};
|
|
49
|
+
export const hasSubscribers = (name) => channel(name).hasSubscribers;
|
|
50
|
+
export const subscribe = (name, callback) => channel(name).subscribe(callback);
|
|
51
|
+
export const unsubscribe = (name, callback) => channel(name).unsubscribe(callback);
|
|
52
|
+
export const tracingChannel = (name) => {
|
|
53
|
+
const start = channel(`tracing:${name}:start`);
|
|
54
|
+
const end = channel(`tracing:${name}:end`);
|
|
55
|
+
const asyncStart = channel(`tracing:${name}:asyncStart`);
|
|
56
|
+
const asyncEnd = channel(`tracing:${name}:asyncEnd`);
|
|
57
|
+
const error = channel(`tracing:${name}:error`);
|
|
58
|
+
return {
|
|
59
|
+
start,
|
|
60
|
+
end,
|
|
61
|
+
asyncStart,
|
|
62
|
+
asyncEnd,
|
|
63
|
+
error,
|
|
64
|
+
get hasSubscribers() {
|
|
65
|
+
return [start, end, asyncStart, asyncEnd, error].some((value) => value.hasSubscribers);
|
|
66
|
+
},
|
|
67
|
+
traceSync(callback, context = {}, thisArg, ...args) {
|
|
68
|
+
return start.runStores(context, () => {
|
|
69
|
+
try {
|
|
70
|
+
const value = callback.apply(thisArg, args);
|
|
71
|
+
context.result = value;
|
|
72
|
+
return value;
|
|
73
|
+
}
|
|
74
|
+
catch (cause) {
|
|
75
|
+
context.error = cause;
|
|
76
|
+
error.publish(context);
|
|
77
|
+
throw cause;
|
|
78
|
+
}
|
|
79
|
+
finally {
|
|
80
|
+
end.publish(context);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
tracePromise() {
|
|
85
|
+
throw new UnsupportedRuntimeError("diagnostics_channel.tracePromise");
|
|
86
|
+
},
|
|
87
|
+
traceCallback() {
|
|
88
|
+
throw new UnsupportedRuntimeError("diagnostics_channel.traceCallback");
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=diagnostics-channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostics-channel.js","sourceRoot":"","sources":["../../src/network/diagnostics-channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AAIvD,MAAM,QAAQ,GAAG,IAAI,GAAG,EAA4B,CAAA;AAEpD,MAAM,OAAO,OAAO;IAGG;IAFb,WAAW,GAAG,IAAI,GAAG,EAAc,CAAA;IACnC,MAAM,GAAG,IAAI,GAAG,EAAwC,CAAA;IAChE,YAAqB,IAAqB;QAArB,SAAI,GAAJ,IAAI,CAAiB;IAAG,CAAC;IAC9C,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,GAAG,CAAC,CAAA;IAClC,CAAC;IACD,SAAS,CAAC,QAAoB;QAC5B,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IAChC,CAAC;IACD,WAAW,CAAC,QAAoB;QAC9B,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IAC1C,CAAC;IACD,OAAO,CAAC,OAAgB;QACtB,KAAK,MAAM,QAAQ,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;YAAE,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;IAC5E,CAAC;IACD,SAAS,CAAC,KAAY,EAAE,YAA2C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK;QACjF,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;IACnC,CAAC;IACD,WAAW,CAAC,KAAY;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAA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CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;gBACtB,CAAC;YACH,CAAC,CAAC,CAAA;QACJ,CAAC;QACD,YAAY;YACV,MAAM,IAAI,uBAAuB,CAAC,kCAAkC,CAAC,CAAA;QACvE,CAAC;QACD,aAAa;YACX,MAAM,IAAI,uBAAuB,CAAC,mCAAmC,CAAC,CAAA;QACxE,CAAC;KACF,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type LookupCallback = (error: Error | null, address?: string | {
|
|
2
|
+
address: string;
|
|
3
|
+
family: number;
|
|
4
|
+
}[], family?: number) => void;
|
|
5
|
+
export declare function lookup(host: string, optionsOrCallback: unknown, callback?: LookupCallback): void;
|
|
6
|
+
export declare function resolveSrv(_host: string, callback: (error: Error) => void): void;
|
|
7
|
+
declare const _default: {
|
|
8
|
+
lookup: typeof lookup;
|
|
9
|
+
resolveSrv: typeof resolveSrv;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=dns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dns.d.ts","sourceRoot":"","sources":["../../src/network/dns.ts"],"names":[],"mappings":"AAGA,KAAK,cAAc,GAAG,CACpB,KAAK,EAAE,KAAK,GAAG,IAAI,EACnB,OAAO,CAAC,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAAE,EACxD,MAAM,CAAC,EAAE,MAAM,KACZ,IAAI,CAAA;AAET,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,cAAc,QAsCzF;AACD,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,QAEzE;;;;;AACD,wBAAqC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { UnsupportedRuntimeError } from "../runtime.js";
|
|
2
|
+
export function lookup(host, optionsOrCallback, callback) {
|
|
3
|
+
const done = typeof optionsOrCallback === "function" ? optionsOrCallback : callback;
|
|
4
|
+
if (!done)
|
|
5
|
+
throw new TypeError("dns.lookup requires a callback");
|
|
6
|
+
const options = typeof optionsOrCallback === "number"
|
|
7
|
+
? { family: optionsOrCallback }
|
|
8
|
+
: typeof optionsOrCallback === "object" && optionsOrCallback !== null
|
|
9
|
+
? optionsOrCallback
|
|
10
|
+
: {};
|
|
11
|
+
queueMicrotask(() => {
|
|
12
|
+
for (const key of Object.keys(options)) {
|
|
13
|
+
if (!["family", "all"].includes(key)) {
|
|
14
|
+
done(new UnsupportedRuntimeError(`dns.lookup option ${key}`));
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
if (![undefined, 0, 4, 6].includes(options.family)) {
|
|
19
|
+
done(new TypeError("Invalid DNS address family"));
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
if (!["localhost", "127.0.0.1", "0.0.0.0", "::1", "[::1]"].includes(host)) {
|
|
23
|
+
done(new UnsupportedRuntimeError("external dns.lookup"));
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const family = host === "localhost" ? options.family || 4 : host.includes(":") ? 6 : 4;
|
|
27
|
+
if (options.family && options.family !== family) {
|
|
28
|
+
done(Object.assign(new Error("Loopback address does not match requested family"), {
|
|
29
|
+
code: "EAI_ADDRFAMILY",
|
|
30
|
+
}));
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const address = family === 6 ? "::1" : "127.0.0.1";
|
|
34
|
+
if (options.all)
|
|
35
|
+
done(null, [{ address, family }]);
|
|
36
|
+
else
|
|
37
|
+
done(null, address, family);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
export function resolveSrv(_host, callback) {
|
|
41
|
+
queueMicrotask(() => callback(new UnsupportedRuntimeError("dns.resolveSrv")));
|
|
42
|
+
}
|
|
43
|
+
export default { lookup, resolveSrv };
|
|
44
|
+
//# sourceMappingURL=dns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dns.js","sourceRoot":"","sources":["../../src/network/dns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AASvD,MAAM,UAAU,MAAM,CAAC,IAAY,EAAE,iBAA0B,EAAE,QAAyB;IACxF,MAAM,IAAI,GACR,OAAO,iBAAiB,KAAK,UAAU,CAAC,CAAC,CAAE,iBAAoC,CAAC,CAAC,CAAC,QAAQ,CAAA;IAC5F,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,SAAS,CAAC,gCAAgC,CAAC,CAAA;IAChE,MAAM,OAAO,GACX,OAAO,iBAAiB,KAAK,QAAQ;QACnC,CAAC,CAAC,EAAE,MAAM,EAAE,iBAAiB,EAAE;QAC/B,CAAC,CAAC,OAAO,iBAAiB,KAAK,QAAQ,IAAI,iBAAiB,KAAK,IAAI;YACnE,CAAC,CAAE,iBAAmC;YACtC,CAAC,CAAC,EAAE,CAAA;IACV,cAAc,CAAC,GAAG,EAAE;QAClB,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YACvC,IAAI,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;gBACrC,IAAI,CAAC,IAAI,uBAAuB,CAAC,qBAAqB,GAAG,EAAE,CAAC,CAAC,CAAA;gBAC7D,OAAM;YACR,CAAC;QACH,CAAC;QACD,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YACnD,IAAI,CAAC,IAAI,SAAS,CAAC,4BAA4B,CAAC,CAAC,CAAA;YACjD,OAAM;QACR,CA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+
export declare const createSecureContext: () => never;
|
|
3
|
+
export declare class TLSSocket {
|
|
4
|
+
constructor();
|
|
5
|
+
}
|
|
6
|
+
declare const _default: {
|
|
7
|
+
connect: () => never;
|
|
8
|
+
createSecureContext: () => never;
|
|
9
|
+
TLSSocket: typeof TLSSocket;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=tls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tls.d.ts","sourceRoot":"","sources":["../../src/network/tls.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,QAAO,KAE1B,CAAA;AACD,eAAO,MAAM,mBAAmB,QAAO,KAEtC,CAAA;AACD,qBAAa,SAAS;;CAIrB;;mBAV0B,KAAK;+BAGO,KAAK;;;AAQ5C,wBAA0D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { UnsupportedRuntimeError } from "../runtime.js";
|
|
2
|
+
export const connect = () => {
|
|
3
|
+
throw new UnsupportedRuntimeError("tls.connect");
|
|
4
|
+
};
|
|
5
|
+
export const createSecureContext = () => {
|
|
6
|
+
throw new UnsupportedRuntimeError("tls.createSecureContext");
|
|
7
|
+
};
|
|
8
|
+
export class TLSSocket {
|
|
9
|
+
constructor() {
|
|
10
|
+
throw new UnsupportedRuntimeError("tls.TLSSocket");
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export default { connect, createSecureContext, TLSSocket };
|
|
14
|
+
//# sourceMappingURL=tls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tls.js","sourceRoot":"","sources":["../../src/network/tls.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AAEvD,MAAM,CAAC,MAAM,OAAO,GAAG,GAAU,EAAE;IACjC,MAAM,IAAI,uBAAuB,CAAC,aAAa,CAAC,CAAA;AAClD,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAU,EAAE;IAC7C,MAAM,IAAI,uBAAuB,CAAC,yBAAyB,CAAC,CAAA;AAC9D,CAAC,CAAA;AACD,MAAM,OAAO,SAAS;IACpB;QACE,MAAM,IAAI,uBAAuB,CAAC,eAAe,CAAC,CAAA;IACpD,CAAC;CACF;AACD,eAAe,EAAE,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const performance: Performance;
|
|
2
|
+
export declare const PerformanceObserver: {
|
|
3
|
+
new (callback: PerformanceObserverCallback): PerformanceObserver;
|
|
4
|
+
prototype: PerformanceObserver;
|
|
5
|
+
readonly supportedEntryTypes: ReadonlyArray<string>;
|
|
6
|
+
};
|
|
7
|
+
export declare const monitorEventLoopDelay: () => never;
|
|
8
|
+
export declare const createHistogram: () => never;
|
|
9
|
+
//# sourceMappingURL=performance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../src/performance.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,WAAW,aAAyB,CAAA;AACjD,eAAO,MAAM,mBAAmB;;;;CAAiC,CAAA;AACjE,eAAO,MAAM,qBAAqB,QAAO,KAExC,CAAA;AACD,eAAO,MAAM,eAAe,QAAO,KAElC,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UnsupportedRuntimeError } from "./runtime.js";
|
|
2
|
+
export const performance = globalThis.performance;
|
|
3
|
+
export const PerformanceObserver = globalThis.PerformanceObserver;
|
|
4
|
+
export const monitorEventLoopDelay = () => {
|
|
5
|
+
throw new UnsupportedRuntimeError("perf_hooks.monitorEventLoopDelay");
|
|
6
|
+
};
|
|
7
|
+
export const createHistogram = () => {
|
|
8
|
+
throw new UnsupportedRuntimeError("perf_hooks.createHistogram");
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=performance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"performance.js","sourceRoot":"","sources":["../src/performance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AACtD,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC,WAAW,CAAA;AACjD,MAAM,CAAC,MAAM,mBAAmB,GAAG,UAAU,CAAC,mBAAmB,CAAA;AACjE,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAU,EAAE;IAC/C,MAAM,IAAI,uBAAuB,CAAC,kCAAkC,CAAC,CAAA;AACvE,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,eAAe,GAAG,GAAU,EAAE;IACzC,MAAM,IAAI,uBAAuB,CAAC,4BAA4B,CAAC,CAAA;AACjE,CAAC,CAAA"}
|