@tybys/wasm-util 0.5.0 → 0.5.2

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.
@@ -46,7 +46,7 @@ export const REGULAR_FILE_BASE = WasiRights.FD_DATASYNC |
46
46
  WasiRights.FD_FILESTAT_SET_SIZE |
47
47
  WasiRights.FD_FILESTAT_SET_TIMES |
48
48
  WasiRights.POLL_FD_READWRITE;
49
- export const REGULAR_FILE_INHERITING = BigInt(0);
49
+ export const REGULAR_FILE_INHERITING = /*#__PURE__*/ BigInt(0);
50
50
  export const DIRECTORY_BASE = WasiRights.FD_FDSTAT_SET_FLAGS |
51
51
  WasiRights.FD_SYNC |
52
52
  WasiRights.FD_ADVISE |
@@ -81,7 +81,7 @@ export const TTY_BASE = WasiRights.FD_READ |
81
81
  WasiRights.FD_WRITE |
82
82
  WasiRights.FD_FILESTAT_GET |
83
83
  WasiRights.POLL_FD_READWRITE;
84
- export const TTY_INHERITING = BigInt(0);
84
+ export const TTY_INHERITING = /*#__PURE__*/ BigInt(0);
85
85
  export function getRights(stdio, fd, flags, type) {
86
86
  const ret = {
87
87
  base: BigInt(0),
@@ -1,3 +1,4 @@
1
+ /* eslint-disable spaced-comment */
1
2
  export var WasiErrno;
2
3
  (function (WasiErrno) {
3
4
  WasiErrno[WasiErrno["ESUCCESS"] = 0] = "ESUCCESS";
@@ -89,37 +90,67 @@ export var WasiFileType;
89
90
  WasiFileType[WasiFileType["SOCKET_STREAM"] = 6] = "SOCKET_STREAM";
90
91
  WasiFileType[WasiFileType["SYMBOLIC_LINK"] = 7] = "SYMBOLIC_LINK";
91
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));
92
123
  export const WasiRights = {
93
- FD_DATASYNC: (BigInt(1) << BigInt(0)),
94
- FD_READ: (BigInt(1) << BigInt(1)),
95
- FD_SEEK: (BigInt(1) << BigInt(2)),
96
- FD_FDSTAT_SET_FLAGS: (BigInt(1) << BigInt(3)),
97
- FD_SYNC: (BigInt(1) << BigInt(4)),
98
- FD_TELL: (BigInt(1) << BigInt(5)),
99
- FD_WRITE: (BigInt(1) << BigInt(6)),
100
- FD_ADVISE: (BigInt(1) << BigInt(7)),
101
- FD_ALLOCATE: (BigInt(1) << BigInt(8)),
102
- PATH_CREATE_DIRECTORY: (BigInt(1) << BigInt(9)),
103
- PATH_CREATE_FILE: (BigInt(1) << BigInt(10)),
104
- PATH_LINK_SOURCE: (BigInt(1) << BigInt(11)),
105
- PATH_LINK_TARGET: (BigInt(1) << BigInt(12)),
106
- PATH_OPEN: (BigInt(1) << BigInt(13)),
107
- FD_READDIR: (BigInt(1) << BigInt(14)),
108
- PATH_READLINK: (BigInt(1) << BigInt(15)),
109
- PATH_RENAME_SOURCE: (BigInt(1) << BigInt(16)),
110
- PATH_RENAME_TARGET: (BigInt(1) << BigInt(17)),
111
- PATH_FILESTAT_GET: (BigInt(1) << BigInt(18)),
112
- PATH_FILESTAT_SET_SIZE: (BigInt(1) << BigInt(19)),
113
- PATH_FILESTAT_SET_TIMES: (BigInt(1) << BigInt(20)),
114
- FD_FILESTAT_GET: (BigInt(1) << BigInt(21)),
115
- FD_FILESTAT_SET_SIZE: (BigInt(1) << BigInt(22)),
116
- FD_FILESTAT_SET_TIMES: (BigInt(1) << BigInt(23)),
117
- PATH_SYMLINK: (BigInt(1) << BigInt(24)),
118
- PATH_REMOVE_DIRECTORY: (BigInt(1) << BigInt(25)),
119
- PATH_UNLINK_FILE: (BigInt(1) << BigInt(26)),
120
- POLL_FD_READWRITE: (BigInt(1) << BigInt(27)),
121
- SOCK_SHUTDOWN: (BigInt(1) << BigInt(28)),
122
- SOCK_ACCEPT: (BigInt(1) << BigInt(29))
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
123
154
  };
124
155
  export var WasiWhence;
125
156
  (function (WasiWhence) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tybys/wasm-util",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "WASI polyfill for browser and some wasm util",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./dist/wasm-util.esm-bundler.js",