@bytecodealliance/preview2-shim 0.0.8 → 0.0.10
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 +1 -0
- package/lib/browser/cli-base.js +48 -0
- package/lib/browser/clocks.js +44 -0
- package/lib/browser/filesystem.js +134 -141
- package/lib/browser/http.js +114 -0
- package/lib/browser/index.js +15 -37
- package/lib/browser/io.js +60 -20
- package/lib/browser/{console.js → logging.js} +7 -5
- package/lib/browser/poll.js +9 -7
- package/lib/browser/random.js +48 -24
- package/lib/browser/sockets.js +200 -0
- package/lib/nodejs/{preopens.js → cli-base.js} +38 -8
- package/lib/nodejs/clocks.js +44 -0
- package/lib/nodejs/filesystem.js +240 -237
- package/lib/nodejs/http.js +114 -0
- package/lib/nodejs/index.js +15 -37
- package/lib/nodejs/io.js +148 -19
- package/lib/nodejs/{console.js → logging.js} +7 -5
- package/lib/nodejs/poll.js +9 -7
- package/lib/nodejs/random.js +27 -13
- package/lib/nodejs/sockets.js +200 -0
- package/package.json +1 -1
- package/types/exports/{HTTP.d.ts → wasi-http-incoming-handler.d.ts} +1 -1
- package/types/imports/environment.d.ts +14 -1
- package/types/imports/exit.d.ts +4 -1
- package/types/imports/filesystem.d.ts +695 -48
- package/types/imports/handler.d.ts +40 -0
- package/types/imports/insecure-seed.d.ts +22 -0
- package/types/imports/insecure.d.ts +20 -0
- package/types/imports/instance-network.d.ts +4 -1
- package/types/imports/ip-name-lookup.d.ts +66 -9
- package/types/imports/monotonic-clock.d.ts +18 -2
- package/types/imports/network.d.ts +171 -9
- package/types/imports/{default-outgoing-HTTP.d.ts → outgoing-handler.d.ts} +1 -1
- package/types/imports/poll.d.ts +38 -2
- package/types/imports/preopens.d.ts +6 -9
- package/types/imports/random.d.ts +19 -2
- package/types/imports/stderr.d.ts +5 -0
- package/types/imports/stdin.d.ts +5 -0
- package/types/imports/stdout.d.ts +5 -0
- package/types/imports/streams.d.ts +161 -4
- package/types/imports/tcp-create-socket.d.ts +27 -3
- package/types/imports/tcp.d.ts +248 -15
- package/types/imports/timezone.d.ts +60 -2
- package/types/imports/types.d.ts +28 -28
- package/types/imports/udp-create-socket.d.ts +27 -3
- package/types/imports/udp.d.ts +195 -12
- package/types/imports/wall-clock.d.ts +24 -1
- package/types/wasi-command.d.ts +23 -0
- package/types/wasi-proxy.d.ts +10 -44
- package/types/wasi-reactor.d.ts +23 -70
- package/lib/browser/default-outgoing-HTTP.js +0 -3
- package/lib/browser/environment.js +0 -17
- package/lib/browser/exit.js +0 -21
- package/lib/browser/instance-network.js +0 -3
- package/lib/browser/ip-name-lookup.js +0 -23
- package/lib/browser/monotonic-clock.js +0 -14
- package/lib/browser/network.js +0 -3
- package/lib/browser/preopens.js +0 -11
- package/lib/browser/stderr.js +0 -4
- package/lib/browser/streams.js +0 -60
- package/lib/browser/tcp-create-socket.js +0 -3
- package/lib/browser/tcp.js +0 -75
- package/lib/browser/timezone.js +0 -12
- package/lib/browser/types.js +0 -99
- package/lib/browser/udp-create-socket.js +0 -3
- package/lib/browser/udp.js +0 -75
- package/lib/browser/wall-clock.js +0 -9
- package/lib/nodejs/default-outgoing-HTTP.js +0 -3
- package/lib/nodejs/environment.js +0 -19
- package/lib/nodejs/exit.js +0 -3
- package/lib/nodejs/instance-network.js +0 -3
- package/lib/nodejs/ip-name-lookup.js +0 -23
- package/lib/nodejs/monotonic-clock.js +0 -14
- package/lib/nodejs/network.js +0 -3
- package/lib/nodejs/stderr.js +0 -4
- package/lib/nodejs/streams.js +0 -97
- package/lib/nodejs/tcp-create-socket.js +0 -3
- package/lib/nodejs/tcp.js +0 -75
- package/lib/nodejs/timezone.js +0 -12
- package/lib/nodejs/types.js +0 -99
- package/lib/nodejs/udp-create-socket.js +0 -3
- package/lib/nodejs/udp.js +0 -75
- package/lib/nodejs/wall-clock.js +0 -9
- package/types/imports/console.d.ts +0 -17
- package/types/index.d.ts +0 -8
package/lib/nodejs/udp.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
export function subscribe () {
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
export function dropUdpSocket () {
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function bind () {
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function connect () {
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export function receive () {
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function send () {
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export function localAddress () {
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function remoteAddress () {
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function addressFamily () {
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export function ipv6Only () {
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export function setIpv6Only () {
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export function unicastHopLimit () {
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export function setUnicastHopLimit () {
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export function receiveBufferSize () {
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export function setReceiveBufferSize () {
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function sendBufferSize () {
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export function setSendBufferSize () {
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export function nonBlocking () {
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export function setNonBlocking () {
|
|
74
|
-
|
|
75
|
-
}
|
package/lib/nodejs/wall-clock.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export namespace Console {
|
|
2
|
-
export function log(level: Level, context: string, message: string): void;
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* # Variants
|
|
6
|
-
*
|
|
7
|
-
* ## `"trace"`
|
|
8
|
-
*
|
|
9
|
-
* ## `"debug"`
|
|
10
|
-
*
|
|
11
|
-
* ## `"info"`
|
|
12
|
-
*
|
|
13
|
-
* ## `"warn"`
|
|
14
|
-
*
|
|
15
|
-
* ## `"error"`
|
|
16
|
-
*/
|
|
17
|
-
export type Level = 'trace' | 'debug' | 'info' | 'warn' | 'error';
|
package/types/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ImportObject as WasiProxyImportObject } from "./wasi-proxy";
|
|
2
|
-
import { ImportObject as WasiReactorImportObject } from "./wasi-reactor";
|
|
3
|
-
|
|
4
|
-
export type ImportObject = WasiProxyImportObject & WasiReactorImportObject;
|
|
5
|
-
|
|
6
|
-
export declare const importObject: ImportObject;
|
|
7
|
-
|
|
8
|
-
export default importObject;
|