@tailwindcss/oxide-wasm32-wasi 0.0.0-insiders.d801d8d
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 +3 -0
- package/node_modules/@emnapi/core/LICENSE +21 -0
- package/node_modules/@emnapi/core/README.md +1 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.cjs.js +6661 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.cjs.min.d.ts +363 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.cjs.min.js +1 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.d.mts +363 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.d.ts +365 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.esm-bundler.js +7411 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.js +8390 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.min.d.mts +363 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.min.js +1 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.min.mjs +1 -0
- package/node_modules/@emnapi/core/dist/emnapi-core.mjs +6650 -0
- package/node_modules/@emnapi/core/index.js +5 -0
- package/node_modules/@emnapi/core/package.json +49 -0
- package/node_modules/@emnapi/runtime/LICENSE +21 -0
- package/node_modules/@emnapi/runtime/README.md +1 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.cjs.js +1347 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.cjs.min.d.ts +663 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.cjs.min.js +1 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.d.mts +663 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.d.ts +665 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.esm-bundler.js +1403 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.iife.d.ts +420 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.iife.js +1474 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.js +1475 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.min.d.mts +663 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.min.js +1 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.min.mjs +1 -0
- package/node_modules/@emnapi/runtime/dist/emnapi.mjs +1316 -0
- package/node_modules/@emnapi/runtime/index.js +5 -0
- package/node_modules/@emnapi/runtime/package.json +48 -0
- package/node_modules/@emnapi/wasi-threads/LICENSE +21 -0
- package/node_modules/@emnapi/wasi-threads/README.md +203 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.js +881 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.min.d.ts +214 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.cjs.min.js +1 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.mts +214 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.d.ts +216 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.esm-bundler.js +929 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.js +941 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.d.mts +214 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.js +1 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.min.mjs +1 -0
- package/node_modules/@emnapi/wasi-threads/dist/wasi-threads.mjs +876 -0
- package/node_modules/@emnapi/wasi-threads/index.js +5 -0
- package/node_modules/@emnapi/wasi-threads/package.json +50 -0
- package/node_modules/@napi-rs/wasm-runtime/LICENSE +43 -0
- package/node_modules/@napi-rs/wasm-runtime/dist/fs.js +23712 -0
- package/node_modules/@napi-rs/wasm-runtime/dist/runtime.js +12269 -0
- package/node_modules/@napi-rs/wasm-runtime/fs-proxy.cjs +193 -0
- package/node_modules/@napi-rs/wasm-runtime/package.json +60 -0
- package/node_modules/@napi-rs/wasm-runtime/runtime.cjs +15 -0
- package/node_modules/@tybys/wasm-util/README.md +193 -0
- package/node_modules/@tybys/wasm-util/dist/tsdoc-metadata.json +11 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.d.ts +417 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.esm-bundler.js +2738 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.esm.js +2738 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.esm.min.js +1 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.js +2760 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.min.js +1 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/asyncify.js +158 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/index.js +13 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/jspi.js +46 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/load.js +97 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/memory.js +35 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/error.js +103 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/fd.js +268 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/fs.js +3 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/index.js +194 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/path.js +174 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/preview1.js +1544 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/rights.js +141 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/types.js +220 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/util.js +128 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/webassembly.js +13 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/asyncify.mjs +153 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/index.mjs +9 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/jspi.mjs +39 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/load.mjs +89 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/memory.mjs +28 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/error.mjs +97 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/fd.mjs +256 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/fs.mjs +1 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/index.mjs +188 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/path.mjs +168 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/preview1.mjs +1539 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/rights.mjs +135 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/types.mjs +216 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/util.mjs +113 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/webassembly.mjs +9 -0
- package/node_modules/@tybys/wasm-util/package.json +58 -0
- package/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/node_modules/tslib/LICENSE.txt +12 -0
- package/node_modules/tslib/README.md +164 -0
- package/node_modules/tslib/SECURITY.md +41 -0
- package/node_modules/tslib/modules/index.d.ts +38 -0
- package/node_modules/tslib/modules/index.js +70 -0
- package/node_modules/tslib/modules/package.json +3 -0
- package/node_modules/tslib/package.json +47 -0
- package/node_modules/tslib/tslib.d.ts +460 -0
- package/node_modules/tslib/tslib.es6.html +1 -0
- package/node_modules/tslib/tslib.es6.js +393 -0
- package/node_modules/tslib/tslib.es6.mjs +392 -0
- package/node_modules/tslib/tslib.html +1 -0
- package/node_modules/tslib/tslib.js +475 -0
- package/package.json +45 -0
- package/tailwindcss-oxide.wasi-browser.js +63 -0
- package/tailwindcss-oxide.wasi.cjs +88 -0
- package/tailwindcss-oxide.wasm32-wasi.wasm +0 -0
- package/wasi-worker-browser.mjs +39 -0
- package/wasi-worker.mjs +63 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { WasiError } from "./error.mjs";
|
|
2
|
+
import { WasiErrno, WasiRights, WasiFileType } from "./types.mjs";
|
|
3
|
+
export const RIGHTS_ALL = WasiRights.FD_DATASYNC |
|
|
4
|
+
WasiRights.FD_READ |
|
|
5
|
+
WasiRights.FD_SEEK |
|
|
6
|
+
WasiRights.FD_FDSTAT_SET_FLAGS |
|
|
7
|
+
WasiRights.FD_SYNC |
|
|
8
|
+
WasiRights.FD_TELL |
|
|
9
|
+
WasiRights.FD_WRITE |
|
|
10
|
+
WasiRights.FD_ADVISE |
|
|
11
|
+
WasiRights.FD_ALLOCATE |
|
|
12
|
+
WasiRights.PATH_CREATE_DIRECTORY |
|
|
13
|
+
WasiRights.PATH_CREATE_FILE |
|
|
14
|
+
WasiRights.PATH_LINK_SOURCE |
|
|
15
|
+
WasiRights.PATH_LINK_TARGET |
|
|
16
|
+
WasiRights.PATH_OPEN |
|
|
17
|
+
WasiRights.FD_READDIR |
|
|
18
|
+
WasiRights.PATH_READLINK |
|
|
19
|
+
WasiRights.PATH_RENAME_SOURCE |
|
|
20
|
+
WasiRights.PATH_RENAME_TARGET |
|
|
21
|
+
WasiRights.PATH_FILESTAT_GET |
|
|
22
|
+
WasiRights.PATH_FILESTAT_SET_SIZE |
|
|
23
|
+
WasiRights.PATH_FILESTAT_SET_TIMES |
|
|
24
|
+
WasiRights.FD_FILESTAT_GET |
|
|
25
|
+
WasiRights.FD_FILESTAT_SET_TIMES |
|
|
26
|
+
WasiRights.FD_FILESTAT_SET_SIZE |
|
|
27
|
+
WasiRights.PATH_SYMLINK |
|
|
28
|
+
WasiRights.PATH_UNLINK_FILE |
|
|
29
|
+
WasiRights.PATH_REMOVE_DIRECTORY |
|
|
30
|
+
WasiRights.POLL_FD_READWRITE |
|
|
31
|
+
WasiRights.SOCK_SHUTDOWN |
|
|
32
|
+
WasiRights.SOCK_ACCEPT;
|
|
33
|
+
export const BLOCK_DEVICE_BASE = RIGHTS_ALL;
|
|
34
|
+
export const BLOCK_DEVICE_INHERITING = RIGHTS_ALL;
|
|
35
|
+
export const CHARACTER_DEVICE_BASE = RIGHTS_ALL;
|
|
36
|
+
export const CHARACTER_DEVICE_INHERITING = RIGHTS_ALL;
|
|
37
|
+
export const REGULAR_FILE_BASE = WasiRights.FD_DATASYNC |
|
|
38
|
+
WasiRights.FD_READ |
|
|
39
|
+
WasiRights.FD_SEEK |
|
|
40
|
+
WasiRights.FD_FDSTAT_SET_FLAGS |
|
|
41
|
+
WasiRights.FD_SYNC |
|
|
42
|
+
WasiRights.FD_TELL |
|
|
43
|
+
WasiRights.FD_WRITE |
|
|
44
|
+
WasiRights.FD_ADVISE |
|
|
45
|
+
WasiRights.FD_ALLOCATE |
|
|
46
|
+
WasiRights.FD_FILESTAT_GET |
|
|
47
|
+
WasiRights.FD_FILESTAT_SET_SIZE |
|
|
48
|
+
WasiRights.FD_FILESTAT_SET_TIMES |
|
|
49
|
+
WasiRights.POLL_FD_READWRITE;
|
|
50
|
+
export const REGULAR_FILE_INHERITING = /*#__PURE__*/ BigInt(0);
|
|
51
|
+
export const DIRECTORY_BASE = WasiRights.FD_FDSTAT_SET_FLAGS |
|
|
52
|
+
WasiRights.FD_SYNC |
|
|
53
|
+
WasiRights.FD_ADVISE |
|
|
54
|
+
WasiRights.PATH_CREATE_DIRECTORY |
|
|
55
|
+
WasiRights.PATH_CREATE_FILE |
|
|
56
|
+
WasiRights.PATH_LINK_SOURCE |
|
|
57
|
+
WasiRights.PATH_LINK_TARGET |
|
|
58
|
+
WasiRights.PATH_OPEN |
|
|
59
|
+
WasiRights.FD_READDIR |
|
|
60
|
+
WasiRights.PATH_READLINK |
|
|
61
|
+
WasiRights.PATH_RENAME_SOURCE |
|
|
62
|
+
WasiRights.PATH_RENAME_TARGET |
|
|
63
|
+
WasiRights.PATH_FILESTAT_GET |
|
|
64
|
+
WasiRights.PATH_FILESTAT_SET_SIZE |
|
|
65
|
+
WasiRights.PATH_FILESTAT_SET_TIMES |
|
|
66
|
+
WasiRights.FD_FILESTAT_GET |
|
|
67
|
+
WasiRights.FD_FILESTAT_SET_TIMES |
|
|
68
|
+
WasiRights.PATH_SYMLINK |
|
|
69
|
+
WasiRights.PATH_UNLINK_FILE |
|
|
70
|
+
WasiRights.PATH_REMOVE_DIRECTORY |
|
|
71
|
+
WasiRights.POLL_FD_READWRITE;
|
|
72
|
+
export const DIRECTORY_INHERITING = DIRECTORY_BASE | REGULAR_FILE_BASE;
|
|
73
|
+
export const SOCKET_BASE = (WasiRights.FD_READ |
|
|
74
|
+
WasiRights.FD_FDSTAT_SET_FLAGS |
|
|
75
|
+
WasiRights.FD_WRITE |
|
|
76
|
+
WasiRights.FD_FILESTAT_GET |
|
|
77
|
+
WasiRights.POLL_FD_READWRITE |
|
|
78
|
+
WasiRights.SOCK_SHUTDOWN);
|
|
79
|
+
export const SOCKET_INHERITING = RIGHTS_ALL;
|
|
80
|
+
export const TTY_BASE = WasiRights.FD_READ |
|
|
81
|
+
WasiRights.FD_FDSTAT_SET_FLAGS |
|
|
82
|
+
WasiRights.FD_WRITE |
|
|
83
|
+
WasiRights.FD_FILESTAT_GET |
|
|
84
|
+
WasiRights.POLL_FD_READWRITE;
|
|
85
|
+
export const TTY_INHERITING = /*#__PURE__*/ BigInt(0);
|
|
86
|
+
export function getRights(stdio, fd, flags, type) {
|
|
87
|
+
const ret = {
|
|
88
|
+
base: BigInt(0),
|
|
89
|
+
inheriting: BigInt(0)
|
|
90
|
+
};
|
|
91
|
+
if (type === WasiFileType.UNKNOWN) {
|
|
92
|
+
throw new WasiError('Unknown file type', WasiErrno.EINVAL);
|
|
93
|
+
}
|
|
94
|
+
switch (type) {
|
|
95
|
+
case WasiFileType.REGULAR_FILE:
|
|
96
|
+
ret.base = REGULAR_FILE_BASE;
|
|
97
|
+
ret.inheriting = REGULAR_FILE_INHERITING;
|
|
98
|
+
break;
|
|
99
|
+
case WasiFileType.DIRECTORY:
|
|
100
|
+
ret.base = DIRECTORY_BASE;
|
|
101
|
+
ret.inheriting = DIRECTORY_INHERITING;
|
|
102
|
+
break;
|
|
103
|
+
case WasiFileType.SOCKET_STREAM:
|
|
104
|
+
case WasiFileType.SOCKET_DGRAM:
|
|
105
|
+
ret.base = SOCKET_BASE;
|
|
106
|
+
ret.inheriting = SOCKET_INHERITING;
|
|
107
|
+
break;
|
|
108
|
+
case WasiFileType.CHARACTER_DEVICE:
|
|
109
|
+
if (stdio.indexOf(fd) !== -1) {
|
|
110
|
+
ret.base = TTY_BASE;
|
|
111
|
+
ret.inheriting = TTY_INHERITING;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
ret.base = CHARACTER_DEVICE_BASE;
|
|
115
|
+
ret.inheriting = CHARACTER_DEVICE_INHERITING;
|
|
116
|
+
}
|
|
117
|
+
break;
|
|
118
|
+
case WasiFileType.BLOCK_DEVICE:
|
|
119
|
+
ret.base = BLOCK_DEVICE_BASE;
|
|
120
|
+
ret.inheriting = BLOCK_DEVICE_INHERITING;
|
|
121
|
+
break;
|
|
122
|
+
default:
|
|
123
|
+
ret.base = BigInt(0);
|
|
124
|
+
ret.inheriting = BigInt(0);
|
|
125
|
+
}
|
|
126
|
+
/* Disable read/write bits depending on access mode. */
|
|
127
|
+
const read_or_write_only = flags & (0 | 1 | 2);
|
|
128
|
+
if (read_or_write_only === 0) {
|
|
129
|
+
ret.base &= ~WasiRights.FD_WRITE;
|
|
130
|
+
}
|
|
131
|
+
else if (read_or_write_only === 1) {
|
|
132
|
+
ret.base &= ~WasiRights.FD_READ;
|
|
133
|
+
}
|
|
134
|
+
return ret;
|
|
135
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/* eslint-disable spaced-comment */
|
|
2
|
+
export var WasiErrno;
|
|
3
|
+
(function (WasiErrno) {
|
|
4
|
+
WasiErrno[WasiErrno["ESUCCESS"] = 0] = "ESUCCESS";
|
|
5
|
+
WasiErrno[WasiErrno["E2BIG"] = 1] = "E2BIG";
|
|
6
|
+
WasiErrno[WasiErrno["EACCES"] = 2] = "EACCES";
|
|
7
|
+
WasiErrno[WasiErrno["EADDRINUSE"] = 3] = "EADDRINUSE";
|
|
8
|
+
WasiErrno[WasiErrno["EADDRNOTAVAIL"] = 4] = "EADDRNOTAVAIL";
|
|
9
|
+
WasiErrno[WasiErrno["EAFNOSUPPORT"] = 5] = "EAFNOSUPPORT";
|
|
10
|
+
WasiErrno[WasiErrno["EAGAIN"] = 6] = "EAGAIN";
|
|
11
|
+
WasiErrno[WasiErrno["EALREADY"] = 7] = "EALREADY";
|
|
12
|
+
WasiErrno[WasiErrno["EBADF"] = 8] = "EBADF";
|
|
13
|
+
WasiErrno[WasiErrno["EBADMSG"] = 9] = "EBADMSG";
|
|
14
|
+
WasiErrno[WasiErrno["EBUSY"] = 10] = "EBUSY";
|
|
15
|
+
WasiErrno[WasiErrno["ECANCELED"] = 11] = "ECANCELED";
|
|
16
|
+
WasiErrno[WasiErrno["ECHILD"] = 12] = "ECHILD";
|
|
17
|
+
WasiErrno[WasiErrno["ECONNABORTED"] = 13] = "ECONNABORTED";
|
|
18
|
+
WasiErrno[WasiErrno["ECONNREFUSED"] = 14] = "ECONNREFUSED";
|
|
19
|
+
WasiErrno[WasiErrno["ECONNRESET"] = 15] = "ECONNRESET";
|
|
20
|
+
WasiErrno[WasiErrno["EDEADLK"] = 16] = "EDEADLK";
|
|
21
|
+
WasiErrno[WasiErrno["EDESTADDRREQ"] = 17] = "EDESTADDRREQ";
|
|
22
|
+
WasiErrno[WasiErrno["EDOM"] = 18] = "EDOM";
|
|
23
|
+
WasiErrno[WasiErrno["EDQUOT"] = 19] = "EDQUOT";
|
|
24
|
+
WasiErrno[WasiErrno["EEXIST"] = 20] = "EEXIST";
|
|
25
|
+
WasiErrno[WasiErrno["EFAULT"] = 21] = "EFAULT";
|
|
26
|
+
WasiErrno[WasiErrno["EFBIG"] = 22] = "EFBIG";
|
|
27
|
+
WasiErrno[WasiErrno["EHOSTUNREACH"] = 23] = "EHOSTUNREACH";
|
|
28
|
+
WasiErrno[WasiErrno["EIDRM"] = 24] = "EIDRM";
|
|
29
|
+
WasiErrno[WasiErrno["EILSEQ"] = 25] = "EILSEQ";
|
|
30
|
+
WasiErrno[WasiErrno["EINPROGRESS"] = 26] = "EINPROGRESS";
|
|
31
|
+
WasiErrno[WasiErrno["EINTR"] = 27] = "EINTR";
|
|
32
|
+
WasiErrno[WasiErrno["EINVAL"] = 28] = "EINVAL";
|
|
33
|
+
WasiErrno[WasiErrno["EIO"] = 29] = "EIO";
|
|
34
|
+
WasiErrno[WasiErrno["EISCONN"] = 30] = "EISCONN";
|
|
35
|
+
WasiErrno[WasiErrno["EISDIR"] = 31] = "EISDIR";
|
|
36
|
+
WasiErrno[WasiErrno["ELOOP"] = 32] = "ELOOP";
|
|
37
|
+
WasiErrno[WasiErrno["EMFILE"] = 33] = "EMFILE";
|
|
38
|
+
WasiErrno[WasiErrno["EMLINK"] = 34] = "EMLINK";
|
|
39
|
+
WasiErrno[WasiErrno["EMSGSIZE"] = 35] = "EMSGSIZE";
|
|
40
|
+
WasiErrno[WasiErrno["EMULTIHOP"] = 36] = "EMULTIHOP";
|
|
41
|
+
WasiErrno[WasiErrno["ENAMETOOLONG"] = 37] = "ENAMETOOLONG";
|
|
42
|
+
WasiErrno[WasiErrno["ENETDOWN"] = 38] = "ENETDOWN";
|
|
43
|
+
WasiErrno[WasiErrno["ENETRESET"] = 39] = "ENETRESET";
|
|
44
|
+
WasiErrno[WasiErrno["ENETUNREACH"] = 40] = "ENETUNREACH";
|
|
45
|
+
WasiErrno[WasiErrno["ENFILE"] = 41] = "ENFILE";
|
|
46
|
+
WasiErrno[WasiErrno["ENOBUFS"] = 42] = "ENOBUFS";
|
|
47
|
+
WasiErrno[WasiErrno["ENODEV"] = 43] = "ENODEV";
|
|
48
|
+
WasiErrno[WasiErrno["ENOENT"] = 44] = "ENOENT";
|
|
49
|
+
WasiErrno[WasiErrno["ENOEXEC"] = 45] = "ENOEXEC";
|
|
50
|
+
WasiErrno[WasiErrno["ENOLCK"] = 46] = "ENOLCK";
|
|
51
|
+
WasiErrno[WasiErrno["ENOLINK"] = 47] = "ENOLINK";
|
|
52
|
+
WasiErrno[WasiErrno["ENOMEM"] = 48] = "ENOMEM";
|
|
53
|
+
WasiErrno[WasiErrno["ENOMSG"] = 49] = "ENOMSG";
|
|
54
|
+
WasiErrno[WasiErrno["ENOPROTOOPT"] = 50] = "ENOPROTOOPT";
|
|
55
|
+
WasiErrno[WasiErrno["ENOSPC"] = 51] = "ENOSPC";
|
|
56
|
+
WasiErrno[WasiErrno["ENOSYS"] = 52] = "ENOSYS";
|
|
57
|
+
WasiErrno[WasiErrno["ENOTCONN"] = 53] = "ENOTCONN";
|
|
58
|
+
WasiErrno[WasiErrno["ENOTDIR"] = 54] = "ENOTDIR";
|
|
59
|
+
WasiErrno[WasiErrno["ENOTEMPTY"] = 55] = "ENOTEMPTY";
|
|
60
|
+
WasiErrno[WasiErrno["ENOTRECOVERABLE"] = 56] = "ENOTRECOVERABLE";
|
|
61
|
+
WasiErrno[WasiErrno["ENOTSOCK"] = 57] = "ENOTSOCK";
|
|
62
|
+
WasiErrno[WasiErrno["ENOTSUP"] = 58] = "ENOTSUP";
|
|
63
|
+
WasiErrno[WasiErrno["ENOTTY"] = 59] = "ENOTTY";
|
|
64
|
+
WasiErrno[WasiErrno["ENXIO"] = 60] = "ENXIO";
|
|
65
|
+
WasiErrno[WasiErrno["EOVERFLOW"] = 61] = "EOVERFLOW";
|
|
66
|
+
WasiErrno[WasiErrno["EOWNERDEAD"] = 62] = "EOWNERDEAD";
|
|
67
|
+
WasiErrno[WasiErrno["EPERM"] = 63] = "EPERM";
|
|
68
|
+
WasiErrno[WasiErrno["EPIPE"] = 64] = "EPIPE";
|
|
69
|
+
WasiErrno[WasiErrno["EPROTO"] = 65] = "EPROTO";
|
|
70
|
+
WasiErrno[WasiErrno["EPROTONOSUPPORT"] = 66] = "EPROTONOSUPPORT";
|
|
71
|
+
WasiErrno[WasiErrno["EPROTOTYPE"] = 67] = "EPROTOTYPE";
|
|
72
|
+
WasiErrno[WasiErrno["ERANGE"] = 68] = "ERANGE";
|
|
73
|
+
WasiErrno[WasiErrno["EROFS"] = 69] = "EROFS";
|
|
74
|
+
WasiErrno[WasiErrno["ESPIPE"] = 70] = "ESPIPE";
|
|
75
|
+
WasiErrno[WasiErrno["ESRCH"] = 71] = "ESRCH";
|
|
76
|
+
WasiErrno[WasiErrno["ESTALE"] = 72] = "ESTALE";
|
|
77
|
+
WasiErrno[WasiErrno["ETIMEDOUT"] = 73] = "ETIMEDOUT";
|
|
78
|
+
WasiErrno[WasiErrno["ETXTBSY"] = 74] = "ETXTBSY";
|
|
79
|
+
WasiErrno[WasiErrno["EXDEV"] = 75] = "EXDEV";
|
|
80
|
+
WasiErrno[WasiErrno["ENOTCAPABLE"] = 76] = "ENOTCAPABLE";
|
|
81
|
+
})(WasiErrno || (WasiErrno = {}));
|
|
82
|
+
export var WasiFileType;
|
|
83
|
+
(function (WasiFileType) {
|
|
84
|
+
WasiFileType[WasiFileType["UNKNOWN"] = 0] = "UNKNOWN";
|
|
85
|
+
WasiFileType[WasiFileType["BLOCK_DEVICE"] = 1] = "BLOCK_DEVICE";
|
|
86
|
+
WasiFileType[WasiFileType["CHARACTER_DEVICE"] = 2] = "CHARACTER_DEVICE";
|
|
87
|
+
WasiFileType[WasiFileType["DIRECTORY"] = 3] = "DIRECTORY";
|
|
88
|
+
WasiFileType[WasiFileType["REGULAR_FILE"] = 4] = "REGULAR_FILE";
|
|
89
|
+
WasiFileType[WasiFileType["SOCKET_DGRAM"] = 5] = "SOCKET_DGRAM";
|
|
90
|
+
WasiFileType[WasiFileType["SOCKET_STREAM"] = 6] = "SOCKET_STREAM";
|
|
91
|
+
WasiFileType[WasiFileType["SYMBOLIC_LINK"] = 7] = "SYMBOLIC_LINK";
|
|
92
|
+
})(WasiFileType || (WasiFileType = {}));
|
|
93
|
+
const FD_DATASYNC = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(0));
|
|
94
|
+
const FD_READ = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(1));
|
|
95
|
+
const FD_SEEK = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(2));
|
|
96
|
+
const FD_FDSTAT_SET_FLAGS = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(3));
|
|
97
|
+
const FD_SYNC = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(4));
|
|
98
|
+
const FD_TELL = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(5));
|
|
99
|
+
const FD_WRITE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(6));
|
|
100
|
+
const FD_ADVISE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(7));
|
|
101
|
+
const FD_ALLOCATE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(8));
|
|
102
|
+
const PATH_CREATE_DIRECTORY = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(9));
|
|
103
|
+
const PATH_CREATE_FILE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(10));
|
|
104
|
+
const PATH_LINK_SOURCE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(11));
|
|
105
|
+
const PATH_LINK_TARGET = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(12));
|
|
106
|
+
const PATH_OPEN = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(13));
|
|
107
|
+
const FD_READDIR = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(14));
|
|
108
|
+
const PATH_READLINK = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(15));
|
|
109
|
+
const PATH_RENAME_SOURCE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(16));
|
|
110
|
+
const PATH_RENAME_TARGET = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(17));
|
|
111
|
+
const PATH_FILESTAT_GET = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(18));
|
|
112
|
+
const PATH_FILESTAT_SET_SIZE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(19));
|
|
113
|
+
const PATH_FILESTAT_SET_TIMES = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(20));
|
|
114
|
+
const FD_FILESTAT_GET = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(21));
|
|
115
|
+
const FD_FILESTAT_SET_SIZE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(22));
|
|
116
|
+
const FD_FILESTAT_SET_TIMES = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(23));
|
|
117
|
+
const PATH_SYMLINK = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(24));
|
|
118
|
+
const PATH_REMOVE_DIRECTORY = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(25));
|
|
119
|
+
const PATH_UNLINK_FILE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(26));
|
|
120
|
+
const POLL_FD_READWRITE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(27));
|
|
121
|
+
const SOCK_SHUTDOWN = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(28));
|
|
122
|
+
const SOCK_ACCEPT = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(29));
|
|
123
|
+
export const WasiRights = {
|
|
124
|
+
FD_DATASYNC,
|
|
125
|
+
FD_READ,
|
|
126
|
+
FD_SEEK,
|
|
127
|
+
FD_FDSTAT_SET_FLAGS,
|
|
128
|
+
FD_SYNC,
|
|
129
|
+
FD_TELL,
|
|
130
|
+
FD_WRITE,
|
|
131
|
+
FD_ADVISE,
|
|
132
|
+
FD_ALLOCATE,
|
|
133
|
+
PATH_CREATE_DIRECTORY,
|
|
134
|
+
PATH_CREATE_FILE,
|
|
135
|
+
PATH_LINK_SOURCE,
|
|
136
|
+
PATH_LINK_TARGET,
|
|
137
|
+
PATH_OPEN,
|
|
138
|
+
FD_READDIR,
|
|
139
|
+
PATH_READLINK,
|
|
140
|
+
PATH_RENAME_SOURCE,
|
|
141
|
+
PATH_RENAME_TARGET,
|
|
142
|
+
PATH_FILESTAT_GET,
|
|
143
|
+
PATH_FILESTAT_SET_SIZE,
|
|
144
|
+
PATH_FILESTAT_SET_TIMES,
|
|
145
|
+
FD_FILESTAT_GET,
|
|
146
|
+
FD_FILESTAT_SET_SIZE,
|
|
147
|
+
FD_FILESTAT_SET_TIMES,
|
|
148
|
+
PATH_SYMLINK,
|
|
149
|
+
PATH_REMOVE_DIRECTORY,
|
|
150
|
+
PATH_UNLINK_FILE,
|
|
151
|
+
POLL_FD_READWRITE,
|
|
152
|
+
SOCK_SHUTDOWN,
|
|
153
|
+
SOCK_ACCEPT
|
|
154
|
+
};
|
|
155
|
+
export var WasiWhence;
|
|
156
|
+
(function (WasiWhence) {
|
|
157
|
+
WasiWhence[WasiWhence["SET"] = 0] = "SET";
|
|
158
|
+
WasiWhence[WasiWhence["CUR"] = 1] = "CUR";
|
|
159
|
+
WasiWhence[WasiWhence["END"] = 2] = "END";
|
|
160
|
+
})(WasiWhence || (WasiWhence = {}));
|
|
161
|
+
export var FileControlFlag;
|
|
162
|
+
(function (FileControlFlag) {
|
|
163
|
+
FileControlFlag[FileControlFlag["O_RDONLY"] = 0] = "O_RDONLY";
|
|
164
|
+
FileControlFlag[FileControlFlag["O_WRONLY"] = 1] = "O_WRONLY";
|
|
165
|
+
FileControlFlag[FileControlFlag["O_RDWR"] = 2] = "O_RDWR";
|
|
166
|
+
FileControlFlag[FileControlFlag["O_CREAT"] = 64] = "O_CREAT";
|
|
167
|
+
FileControlFlag[FileControlFlag["O_EXCL"] = 128] = "O_EXCL";
|
|
168
|
+
FileControlFlag[FileControlFlag["O_NOCTTY"] = 256] = "O_NOCTTY";
|
|
169
|
+
FileControlFlag[FileControlFlag["O_TRUNC"] = 512] = "O_TRUNC";
|
|
170
|
+
FileControlFlag[FileControlFlag["O_APPEND"] = 1024] = "O_APPEND";
|
|
171
|
+
FileControlFlag[FileControlFlag["O_DIRECTORY"] = 65536] = "O_DIRECTORY";
|
|
172
|
+
FileControlFlag[FileControlFlag["O_NOATIME"] = 262144] = "O_NOATIME";
|
|
173
|
+
FileControlFlag[FileControlFlag["O_NOFOLLOW"] = 131072] = "O_NOFOLLOW";
|
|
174
|
+
FileControlFlag[FileControlFlag["O_SYNC"] = 1052672] = "O_SYNC";
|
|
175
|
+
FileControlFlag[FileControlFlag["O_DIRECT"] = 16384] = "O_DIRECT";
|
|
176
|
+
FileControlFlag[FileControlFlag["O_NONBLOCK"] = 2048] = "O_NONBLOCK";
|
|
177
|
+
})(FileControlFlag || (FileControlFlag = {}));
|
|
178
|
+
export var WasiFileControlFlag;
|
|
179
|
+
(function (WasiFileControlFlag) {
|
|
180
|
+
WasiFileControlFlag[WasiFileControlFlag["O_CREAT"] = 1] = "O_CREAT";
|
|
181
|
+
WasiFileControlFlag[WasiFileControlFlag["O_DIRECTORY"] = 2] = "O_DIRECTORY";
|
|
182
|
+
WasiFileControlFlag[WasiFileControlFlag["O_EXCL"] = 4] = "O_EXCL";
|
|
183
|
+
WasiFileControlFlag[WasiFileControlFlag["O_TRUNC"] = 8] = "O_TRUNC";
|
|
184
|
+
})(WasiFileControlFlag || (WasiFileControlFlag = {}));
|
|
185
|
+
export var WasiFdFlag;
|
|
186
|
+
(function (WasiFdFlag) {
|
|
187
|
+
WasiFdFlag[WasiFdFlag["APPEND"] = 1] = "APPEND";
|
|
188
|
+
WasiFdFlag[WasiFdFlag["DSYNC"] = 2] = "DSYNC";
|
|
189
|
+
WasiFdFlag[WasiFdFlag["NONBLOCK"] = 4] = "NONBLOCK";
|
|
190
|
+
WasiFdFlag[WasiFdFlag["RSYNC"] = 8] = "RSYNC";
|
|
191
|
+
WasiFdFlag[WasiFdFlag["SYNC"] = 16] = "SYNC";
|
|
192
|
+
})(WasiFdFlag || (WasiFdFlag = {}));
|
|
193
|
+
export var WasiClockid;
|
|
194
|
+
(function (WasiClockid) {
|
|
195
|
+
WasiClockid[WasiClockid["REALTIME"] = 0] = "REALTIME";
|
|
196
|
+
WasiClockid[WasiClockid["MONOTONIC"] = 1] = "MONOTONIC";
|
|
197
|
+
WasiClockid[WasiClockid["PROCESS_CPUTIME_ID"] = 2] = "PROCESS_CPUTIME_ID";
|
|
198
|
+
WasiClockid[WasiClockid["THREAD_CPUTIME_ID"] = 3] = "THREAD_CPUTIME_ID";
|
|
199
|
+
})(WasiClockid || (WasiClockid = {}));
|
|
200
|
+
export var WasiFstFlag;
|
|
201
|
+
(function (WasiFstFlag) {
|
|
202
|
+
WasiFstFlag[WasiFstFlag["SET_ATIM"] = 1] = "SET_ATIM";
|
|
203
|
+
WasiFstFlag[WasiFstFlag["SET_ATIM_NOW"] = 2] = "SET_ATIM_NOW";
|
|
204
|
+
WasiFstFlag[WasiFstFlag["SET_MTIM"] = 4] = "SET_MTIM";
|
|
205
|
+
WasiFstFlag[WasiFstFlag["SET_MTIM_NOW"] = 8] = "SET_MTIM_NOW";
|
|
206
|
+
})(WasiFstFlag || (WasiFstFlag = {}));
|
|
207
|
+
export var WasiEventType;
|
|
208
|
+
(function (WasiEventType) {
|
|
209
|
+
WasiEventType[WasiEventType["CLOCK"] = 0] = "CLOCK";
|
|
210
|
+
WasiEventType[WasiEventType["FD_READ"] = 1] = "FD_READ";
|
|
211
|
+
WasiEventType[WasiEventType["FD_WRITE"] = 2] = "FD_WRITE";
|
|
212
|
+
})(WasiEventType || (WasiEventType = {}));
|
|
213
|
+
export var WasiSubclockflags;
|
|
214
|
+
(function (WasiSubclockflags) {
|
|
215
|
+
WasiSubclockflags[WasiSubclockflags["ABSTIME"] = 1] = "ABSTIME";
|
|
216
|
+
})(WasiSubclockflags || (WasiSubclockflags = {}));
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/* eslint-disable spaced-comment */
|
|
2
|
+
export function validateObject(value, name) {
|
|
3
|
+
if (value === null || typeof value !== 'object') {
|
|
4
|
+
throw new TypeError(`${name} must be an object. Received ${value === null ? 'null' : typeof value}`);
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export function validateArray(value, name) {
|
|
8
|
+
if (!Array.isArray(value)) {
|
|
9
|
+
throw new TypeError(`${name} must be an array. Received ${value === null ? 'null' : typeof value}`);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export function validateBoolean(value, name) {
|
|
13
|
+
if (typeof value !== 'boolean') {
|
|
14
|
+
throw new TypeError(`${name} must be a boolean. Received ${value === null ? 'null' : typeof value}`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export function validateString(value, name) {
|
|
18
|
+
if (typeof value !== 'string') {
|
|
19
|
+
throw new TypeError(`${name} must be a string. Received ${value === null ? 'null' : typeof value}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export function validateFunction(value, name) {
|
|
23
|
+
if (typeof value !== 'function') {
|
|
24
|
+
throw new TypeError(`${name} must be a function. Received ${value === null ? 'null' : typeof value}`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export function validateUndefined(value, name) {
|
|
28
|
+
if (value !== undefined) {
|
|
29
|
+
throw new TypeError(`${name} must be undefined. Received ${value === null ? 'null' : typeof value}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export function validateInt32(value, name, min = -2147483648, max = 2147483647) {
|
|
33
|
+
if (typeof value !== 'number') {
|
|
34
|
+
throw new TypeError(`${name} must be a number. Received ${value === null ? 'null' : typeof value}`);
|
|
35
|
+
}
|
|
36
|
+
if (!Number.isInteger(value)) {
|
|
37
|
+
throw new RangeError(`${name} must be a integer.`);
|
|
38
|
+
}
|
|
39
|
+
if (value < min || value > max) {
|
|
40
|
+
throw new RangeError(`${name} must be >= ${min} && <= ${max}. Received ${value}`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export function isPromiseLike(obj) {
|
|
44
|
+
return !!(obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function');
|
|
45
|
+
}
|
|
46
|
+
export function wrapInstanceExports(exports, mapFn) {
|
|
47
|
+
const newExports = Object.create(null);
|
|
48
|
+
Object.keys(exports).forEach(name => {
|
|
49
|
+
const exportValue = exports[name];
|
|
50
|
+
Object.defineProperty(newExports, name, {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
value: mapFn(exportValue, name)
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
return newExports;
|
|
56
|
+
}
|
|
57
|
+
const _require = /*#__PURE__*/ (function () {
|
|
58
|
+
let nativeRequire;
|
|
59
|
+
if (typeof __webpack_public_path__ !== 'undefined') {
|
|
60
|
+
nativeRequire = (function () {
|
|
61
|
+
return typeof __non_webpack_require__ !== 'undefined' ? __non_webpack_require__ : undefined;
|
|
62
|
+
})();
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
nativeRequire = (function () {
|
|
66
|
+
return typeof __webpack_public_path__ !== 'undefined' ? (typeof __non_webpack_require__ !== 'undefined' ? __non_webpack_require__ : undefined) : (typeof require !== 'undefined' ? require : undefined);
|
|
67
|
+
})();
|
|
68
|
+
}
|
|
69
|
+
return nativeRequire;
|
|
70
|
+
})();
|
|
71
|
+
export const isMainThread = /*#__PURE__*/ (function () {
|
|
72
|
+
let worker_threads;
|
|
73
|
+
try {
|
|
74
|
+
worker_threads = _require('worker_threads');
|
|
75
|
+
}
|
|
76
|
+
catch (_) { }
|
|
77
|
+
if (!worker_threads) {
|
|
78
|
+
return typeof importScripts === 'undefined';
|
|
79
|
+
}
|
|
80
|
+
return worker_threads.isMainThread;
|
|
81
|
+
})();
|
|
82
|
+
export const postMsg = isMainThread
|
|
83
|
+
? () => { }
|
|
84
|
+
: /*#__PURE__*/ (function () {
|
|
85
|
+
let worker_threads;
|
|
86
|
+
try {
|
|
87
|
+
worker_threads = _require('worker_threads');
|
|
88
|
+
}
|
|
89
|
+
catch (_) { }
|
|
90
|
+
if (!worker_threads) {
|
|
91
|
+
return postMessage;
|
|
92
|
+
}
|
|
93
|
+
return function postMessage(data) {
|
|
94
|
+
worker_threads.parentPort.postMessage({ data });
|
|
95
|
+
};
|
|
96
|
+
})();
|
|
97
|
+
export function sleepBreakIf(delay, breakIf) {
|
|
98
|
+
const start = Date.now();
|
|
99
|
+
const end = start + delay;
|
|
100
|
+
let ret = false;
|
|
101
|
+
while (Date.now() < end) {
|
|
102
|
+
if (breakIf()) {
|
|
103
|
+
ret = true;
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return ret;
|
|
108
|
+
}
|
|
109
|
+
export function unsharedSlice(view, start, end) {
|
|
110
|
+
return ((typeof SharedArrayBuffer === 'function' && view.buffer instanceof SharedArrayBuffer) || (Object.prototype.toString.call(view.buffer.constructor) === '[object SharedArrayBuffer]'))
|
|
111
|
+
? view.slice(start, end)
|
|
112
|
+
: view.subarray(start, end);
|
|
113
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const _WebAssembly = typeof WebAssembly !== 'undefined'
|
|
2
|
+
? WebAssembly
|
|
3
|
+
: typeof WXWebAssembly !== 'undefined'
|
|
4
|
+
? WXWebAssembly
|
|
5
|
+
: undefined;
|
|
6
|
+
if (!_WebAssembly) {
|
|
7
|
+
throw new Error('WebAssembly is not supported in this environment');
|
|
8
|
+
}
|
|
9
|
+
export { _WebAssembly };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tybys/wasm-util",
|
|
3
|
+
"version": "0.9.0",
|
|
4
|
+
"description": "WASI polyfill for browser and some wasm util",
|
|
5
|
+
"main": "./lib/cjs/index.js",
|
|
6
|
+
"module": "./dist/wasm-util.esm-bundler.js",
|
|
7
|
+
"types": "./dist/wasm-util.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"module": "./dist/wasm-util.esm-bundler.js",
|
|
11
|
+
"import": "./lib/mjs/index.mjs",
|
|
12
|
+
"require": "./lib/cjs/index.js",
|
|
13
|
+
"types": "./dist/wasm-util.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsgo build",
|
|
18
|
+
"watch": "tsgo watch",
|
|
19
|
+
"test": "jest",
|
|
20
|
+
"lint": "eslint ./src/**/*.{ts,js} --fix",
|
|
21
|
+
"prepare": "npm run build"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"wasm",
|
|
28
|
+
"webassembly",
|
|
29
|
+
"wasi",
|
|
30
|
+
"polyfill"
|
|
31
|
+
],
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "https://github.com/toyobayashi/wasm-util.git"
|
|
35
|
+
},
|
|
36
|
+
"author": "toyobayashi",
|
|
37
|
+
"license": "MIT",
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"tslib": "^2.4.0"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@tybys/ts-transform-module-specifier": "^0.0.2",
|
|
43
|
+
"@tybys/ts-transform-pure-class": "^0.1.1",
|
|
44
|
+
"@tybys/tsgo": "^1.1.0",
|
|
45
|
+
"@types/node": "^14.14.31",
|
|
46
|
+
"@typescript-eslint/eslint-plugin": "^5.40.1",
|
|
47
|
+
"@typescript-eslint/parser": "^5.40.1",
|
|
48
|
+
"eslint": "^8.25.0",
|
|
49
|
+
"eslint-config-standard-with-typescript": "^23.0.0",
|
|
50
|
+
"eslint-plugin-import": "^2.26.0",
|
|
51
|
+
"eslint-plugin-n": "^15.3.0",
|
|
52
|
+
"eslint-plugin-promise": "^6.1.0",
|
|
53
|
+
"memfs-browser": "^3.4.13000",
|
|
54
|
+
"mocha": "^10.1.0",
|
|
55
|
+
"ts-node": "^10.9.1",
|
|
56
|
+
"typescript": "~4.8.3"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Copyright (c) Microsoft Corporation.
|
|
2
|
+
|
|
3
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
4
|
+
purpose with or without fee is hereby granted.
|
|
5
|
+
|
|
6
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
7
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
8
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
9
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
10
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
11
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
12
|
+
PERFORMANCE OF THIS SOFTWARE.
|