@stemy/ngx-utils 13.3.0 → 13.3.1
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.
|
@@ -5322,26 +5322,20 @@ function loadConfig(config) {
|
|
|
5322
5322
|
return config.load;
|
|
5323
5323
|
}
|
|
5324
5324
|
|
|
5325
|
-
const WASI_ESUCCESS = 0;
|
|
5326
|
-
const WASI_EBADF = 8;
|
|
5327
|
-
const WASI_EINVAL = 28;
|
|
5328
|
-
const WASI_ENOSYS = 52;
|
|
5329
|
-
const WASI_STDOUT_FILENO = 1;
|
|
5330
|
-
const wasi_fns = [
|
|
5331
|
-
"emscripten_notify_memory_growth",
|
|
5332
|
-
"proc_exit",
|
|
5333
|
-
"environ_get",
|
|
5334
|
-
"environ_sizes_get",
|
|
5335
|
-
"fd_close",
|
|
5336
|
-
"fd_write",
|
|
5337
|
-
"fd_read",
|
|
5338
|
-
"fd_seek",
|
|
5339
|
-
];
|
|
5340
5325
|
class Wasi {
|
|
5341
5326
|
constructor() {
|
|
5342
5327
|
this.env = {};
|
|
5343
5328
|
this.instantiated = false;
|
|
5344
|
-
this.wasi =
|
|
5329
|
+
this.wasi = [
|
|
5330
|
+
"emscripten_notify_memory_growth",
|
|
5331
|
+
"proc_exit",
|
|
5332
|
+
"environ_get",
|
|
5333
|
+
"environ_sizes_get",
|
|
5334
|
+
"fd_close",
|
|
5335
|
+
"fd_write",
|
|
5336
|
+
"fd_read",
|
|
5337
|
+
"fd_seek",
|
|
5338
|
+
].reduce((res, key) => {
|
|
5345
5339
|
if (typeof this[key] === "function") {
|
|
5346
5340
|
res[key] = this[key].bind(this);
|
|
5347
5341
|
}
|
|
@@ -5447,27 +5441,33 @@ class Wasi {
|
|
|
5447
5441
|
bufSize += string.length + 1;
|
|
5448
5442
|
});
|
|
5449
5443
|
HEAPU32[penviron_buf_size >> 2] = bufSize;
|
|
5444
|
+
// WASI_ESUCCESS
|
|
5450
5445
|
return 0;
|
|
5451
5446
|
}
|
|
5452
5447
|
fd_close(fd) {
|
|
5453
|
-
|
|
5448
|
+
// WASI_ESUCCESS
|
|
5449
|
+
return 0;
|
|
5454
5450
|
}
|
|
5455
5451
|
fd_write(fd, iovs, iovs_len, nwritten) {
|
|
5456
|
-
if (fd !==
|
|
5457
|
-
|
|
5452
|
+
if (fd !== 1) {
|
|
5453
|
+
// WASI_EBADF
|
|
5454
|
+
return 8;
|
|
5458
5455
|
}
|
|
5459
5456
|
if (iovs_len !== 1) {
|
|
5460
|
-
|
|
5457
|
+
// WASI_ENOSYS
|
|
5458
|
+
return 52;
|
|
5461
5459
|
}
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
return
|
|
5460
|
+
this.wasm.HEAPU32[nwritten >> 2] = this.wasm.HEAPU32[iovs + 4 >> 2];
|
|
5461
|
+
// WASI_ESUCCESS
|
|
5462
|
+
return 0;
|
|
5465
5463
|
}
|
|
5466
5464
|
fd_read(fd, iovs, iovs_len, nread) {
|
|
5467
|
-
|
|
5465
|
+
// WASI_EINVAL
|
|
5466
|
+
return 28;
|
|
5468
5467
|
}
|
|
5469
5468
|
fd_seek(fd, offset, whence, newOffset) {
|
|
5470
|
-
|
|
5469
|
+
// WASI_EINVAL
|
|
5470
|
+
return 28;
|
|
5471
5471
|
}
|
|
5472
5472
|
}
|
|
5473
5473
|
Wasi.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: Wasi, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|