@bytecodealliance/preview2-shim 0.0.20 → 0.14.0
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 +4 -14
- package/lib/browser/cli.js +77 -12
- package/lib/browser/clocks.js +15 -27
- package/lib/browser/filesystem.js +147 -205
- package/lib/browser/index.js +1 -3
- package/lib/{common → browser}/io.js +8 -4
- package/lib/common/assert.js +7 -0
- package/lib/io/calls.js +64 -0
- package/lib/io/worker-http.js +95 -0
- package/lib/io/worker-io.js +322 -0
- package/lib/io/worker-thread.js +569 -0
- package/lib/nodejs/cli.js +45 -58
- package/lib/nodejs/clocks.js +13 -27
- package/lib/nodejs/filesystem.js +540 -427
- package/lib/nodejs/http.js +441 -175
- package/lib/nodejs/index.js +4 -1
- package/lib/nodejs/io.js +1 -0
- package/lib/nodejs/sockets/socket-common.js +116 -0
- package/lib/nodejs/sockets/socketopts-bindings.js +94 -0
- package/lib/nodejs/sockets/tcp-socket-impl.js +794 -0
- package/lib/nodejs/sockets/udp-socket-impl.js +628 -0
- package/lib/nodejs/sockets/wasi-sockets.js +320 -0
- package/lib/nodejs/sockets.js +11 -200
- package/lib/synckit/index.js +4 -2
- package/package.json +1 -5
- package/types/interfaces/wasi-cli-terminal-input.d.ts +4 -0
- package/types/interfaces/wasi-cli-terminal-output.d.ts +4 -0
- package/types/interfaces/wasi-clocks-monotonic-clock.d.ts +19 -6
- package/types/interfaces/wasi-filesystem-types.d.ts +1 -178
- package/types/interfaces/wasi-http-outgoing-handler.d.ts +2 -2
- package/types/interfaces/wasi-http-types.d.ts +412 -82
- package/types/interfaces/wasi-io-error.d.ts +16 -0
- package/types/interfaces/wasi-io-poll.d.ts +19 -8
- package/types/interfaces/wasi-io-streams.d.ts +26 -46
- package/types/interfaces/wasi-sockets-ip-name-lookup.d.ts +9 -21
- package/types/interfaces/wasi-sockets-network.d.ts +4 -0
- package/types/interfaces/wasi-sockets-tcp.d.ts +75 -18
- package/types/interfaces/wasi-sockets-udp-create-socket.d.ts +1 -1
- package/types/interfaces/wasi-sockets-udp.d.ts +282 -193
- package/types/wasi-cli-command.d.ts +28 -28
- package/types/wasi-http-proxy.d.ts +12 -12
- package/lib/common/make-request.js +0 -30
- package/types/interfaces/wasi-clocks-timezone.d.ts +0 -56
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
export namespace WasiClocksTimezone {
|
|
2
|
-
/**
|
|
3
|
-
* Return information needed to display the given `datetime`. This includes
|
|
4
|
-
* the UTC offset, the time zone name, and a flag indicating whether
|
|
5
|
-
* daylight saving time is active.
|
|
6
|
-
*
|
|
7
|
-
* If the timezone cannot be determined for the given `datetime`, return a
|
|
8
|
-
* `timezone-display` for `UTC` with a `utc-offset` of 0 and no daylight
|
|
9
|
-
* saving time.
|
|
10
|
-
*/
|
|
11
|
-
export function display(when: Datetime): TimezoneDisplay;
|
|
12
|
-
/**
|
|
13
|
-
* The same as `display`, but only return the UTC offset.
|
|
14
|
-
*/
|
|
15
|
-
export function utcOffset(when: Datetime): number;
|
|
16
|
-
}
|
|
17
|
-
import type { Datetime } from '../interfaces/wasi-clocks-wall-clock.js';
|
|
18
|
-
export { Datetime };
|
|
19
|
-
/**
|
|
20
|
-
* Information useful for displaying the timezone of a specific `datetime`.
|
|
21
|
-
*
|
|
22
|
-
* This information may vary within a single `timezone` to reflect daylight
|
|
23
|
-
* saving time adjustments.
|
|
24
|
-
*/
|
|
25
|
-
export interface TimezoneDisplay {
|
|
26
|
-
/**
|
|
27
|
-
* The number of seconds difference between UTC time and the local
|
|
28
|
-
* time of the timezone.
|
|
29
|
-
*
|
|
30
|
-
* The returned value will always be less than 86400 which is the
|
|
31
|
-
* number of seconds in a day (24*60*60).
|
|
32
|
-
*
|
|
33
|
-
* In implementations that do not expose an actual time zone, this
|
|
34
|
-
* should return 0.
|
|
35
|
-
*/
|
|
36
|
-
utcOffset: number,
|
|
37
|
-
/**
|
|
38
|
-
* The abbreviated name of the timezone to display to a user. The name
|
|
39
|
-
* `UTC` indicates Coordinated Universal Time. Otherwise, this should
|
|
40
|
-
* reference local standards for the name of the time zone.
|
|
41
|
-
*
|
|
42
|
-
* In implementations that do not expose an actual time zone, this
|
|
43
|
-
* should be the string `UTC`.
|
|
44
|
-
*
|
|
45
|
-
* In time zones that do not have an applicable name, a formatted
|
|
46
|
-
* representation of the UTC offset may be returned, such as `-04:00`.
|
|
47
|
-
*/
|
|
48
|
-
name: string,
|
|
49
|
-
/**
|
|
50
|
-
* Whether daylight saving time is active.
|
|
51
|
-
*
|
|
52
|
-
* In implementations that do not expose an actual time zone, this
|
|
53
|
-
* should return false.
|
|
54
|
-
*/
|
|
55
|
-
inDaylightSavingTime: boolean,
|
|
56
|
-
}
|