@remix_labs/hub-client 2.3350.0-dev → 2.3354.0-dev

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.
Files changed (2) hide show
  1. package/miniwasi.js +8 -6
  2. package/package.json +1 -1
package/miniwasi.js CHANGED
@@ -40,7 +40,6 @@ class MiniWASI {
40
40
  }
41
41
 
42
42
  clock_time_get(id, precision, time) {
43
- this.update();
44
43
  const buffer = new DataView(this.memory.buffer);
45
44
  if (id === 0 /* CLOCKID_REALTIME */) {
46
45
  buffer.setBigUint64(
@@ -74,14 +73,15 @@ class MiniWASI {
74
73
  let buffer, output;
75
74
  switch (fd) {
76
75
  case 1:
77
- buffer = this.stdout;
78
76
  output = console.log;
79
- break;
80
- case 2: // redirect to stdout...
81
77
  buffer = this.stdout;
78
+ break;
79
+ case 2:
82
80
  output = console.error;
81
+ buffer = this.stderr;
83
82
  break;
84
83
  default:
84
+ console.error("[groovebox miniwasi] filesystem not supported");
85
85
  return 8; // EBADF
86
86
  }
87
87
  let num = 0;
@@ -114,7 +114,10 @@ class MiniWASI {
114
114
  }
115
115
 
116
116
  fd_fdstat_get(fd, buf) {
117
- if (fd > 2) return 8; // EBADF
117
+ if (fd > 2) {
118
+ console.error("[groovebox miniwasi] filesystem not supported");
119
+ return 8; // EBADF
120
+ }
118
121
  this.update();
119
122
  // fdstat layout: fs_filetype(u8) + pad(1) + fs_flags(u16) + pad(4) + fs_rights_base(u64) + fs_rights_inheriting(u64)
120
123
  const view = new DataView(this.memory.buffer);
@@ -141,7 +144,6 @@ class MiniWASI {
141
144
  fd_prestat_get(fd, buf) {
142
145
  return 8; // EBADF
143
146
  }
144
-
145
147
  fd_prestat_dir_name(fd, path, path_len) {
146
148
  return 8; // EBADF
147
149
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remix_labs/hub-client",
3
- "version": "2.3350.0-dev",
3
+ "version": "2.3354.0-dev",
4
4
  "description": "talk to the Hub web worker",
5
5
  "main": "node.js",
6
6
  "browser": "index.js",