connected-spaces-platform.web 5.14.0 → 5.14.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.
- package/ConnectedSpacesPlatform_WASM.d.ts +2 -0
- package/Debug/ConnectedSpacesPlatform_WASM.js +12 -128
- package/Debug/ConnectedSpacesPlatform_WASM.wasm +0 -0
- package/Debug/ConnectedSpacesPlatform_WASM.wasm.debug.wasm +0 -0
- package/Debug/ConnectedSpacesPlatform_WASM.worker.js +0 -40
- package/README.md +1 -1
- package/Release/ConnectedSpacesPlatform_WASM.js +2 -2
- package/Release/ConnectedSpacesPlatform_WASM.wasm +0 -0
- package/Release/ConnectedSpacesPlatform_WASM.worker.js +1 -1
- package/connectedspacesplatform.d.ts +12438 -12438
- package/connectedspacesplatform.js +29918 -29918
- package/connectedspacesplatform.js.map +1 -1
- package/connectedspacesplatform.ts +1 -4
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ var createModule = (() => {
|
|
|
3
3
|
var _scriptDir = import.meta.url;
|
|
4
4
|
|
|
5
5
|
return (
|
|
6
|
-
|
|
6
|
+
function(createModule = {}) {
|
|
7
7
|
|
|
8
8
|
// Support for growable heap + pthreads, where the buffer may change, so JS views
|
|
9
9
|
// must be updated.
|
|
@@ -109,60 +109,7 @@ function locateFile(path) {
|
|
|
109
109
|
|
|
110
110
|
var read_, readAsync, readBinary, setWindowTitle;
|
|
111
111
|
|
|
112
|
-
if (
|
|
113
|
-
if (typeof process == "undefined" || !process.release || process.release.name !== "node") throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");
|
|
114
|
-
var nodeVersion = process.versions.node;
|
|
115
|
-
var numericVersion = nodeVersion.split(".").slice(0, 3);
|
|
116
|
-
numericVersion = numericVersion[0] * 1e4 + numericVersion[1] * 100 + numericVersion[2].split("-")[0] * 1;
|
|
117
|
-
var minVersion = 101900;
|
|
118
|
-
if (numericVersion < 101900) {
|
|
119
|
-
throw new Error("This emscripten-generated code requires node v10.19.19.0 (detected v" + nodeVersion + ")");
|
|
120
|
-
}
|
|
121
|
-
const {createRequire: createRequire} = await import("module");
|
|
122
|
-
var require = createRequire(import.meta.url);
|
|
123
|
-
var fs = require("fs");
|
|
124
|
-
var nodePath = require("path");
|
|
125
|
-
if (ENVIRONMENT_IS_WORKER) {
|
|
126
|
-
scriptDirectory = nodePath.dirname(scriptDirectory) + "/";
|
|
127
|
-
} else {
|
|
128
|
-
scriptDirectory = require("url").fileURLToPath(new URL("./", import.meta.url));
|
|
129
|
-
}
|
|
130
|
-
read_ = (filename, binary) => {
|
|
131
|
-
filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename);
|
|
132
|
-
return fs.readFileSync(filename, binary ? undefined : "utf8");
|
|
133
|
-
};
|
|
134
|
-
readBinary = filename => {
|
|
135
|
-
var ret = read_(filename, true);
|
|
136
|
-
if (!ret.buffer) {
|
|
137
|
-
ret = new Uint8Array(ret);
|
|
138
|
-
}
|
|
139
|
-
assert(ret.buffer);
|
|
140
|
-
return ret;
|
|
141
|
-
};
|
|
142
|
-
readAsync = (filename, onload, onerror, binary = true) => {
|
|
143
|
-
filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename);
|
|
144
|
-
fs.readFile(filename, binary ? undefined : "utf8", (err, data) => {
|
|
145
|
-
if (err) onerror(err); else onload(binary ? data.buffer : data);
|
|
146
|
-
});
|
|
147
|
-
};
|
|
148
|
-
if (!Module["thisProgram"] && process.argv.length > 1) {
|
|
149
|
-
thisProgram = process.argv[1].replace(/\\/g, "/");
|
|
150
|
-
}
|
|
151
|
-
arguments_ = process.argv.slice(2);
|
|
152
|
-
quit_ = (status, toThrow) => {
|
|
153
|
-
process.exitCode = status;
|
|
154
|
-
throw toThrow;
|
|
155
|
-
};
|
|
156
|
-
Module["inspect"] = () => "[Emscripten Module object]";
|
|
157
|
-
let nodeWorkerThreads;
|
|
158
|
-
try {
|
|
159
|
-
nodeWorkerThreads = require("worker_threads");
|
|
160
|
-
} catch (e) {
|
|
161
|
-
console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?');
|
|
162
|
-
throw e;
|
|
163
|
-
}
|
|
164
|
-
global.Worker = nodeWorkerThreads.Worker;
|
|
165
|
-
} else if (ENVIRONMENT_IS_SHELL) {
|
|
112
|
+
if (ENVIRONMENT_IS_SHELL) {
|
|
166
113
|
if (typeof process == "object" && typeof require === "function" || typeof window == "object" || typeof importScripts == "function") throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");
|
|
167
114
|
if (typeof read != "undefined") {
|
|
168
115
|
read_ = f => {
|
|
@@ -224,7 +171,7 @@ if (ENVIRONMENT_IS_NODE) {
|
|
|
224
171
|
scriptDirectory = "";
|
|
225
172
|
}
|
|
226
173
|
if (!(typeof window == "object" || typeof importScripts == "function")) throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");
|
|
227
|
-
|
|
174
|
+
{
|
|
228
175
|
read_ = url => {
|
|
229
176
|
var xhr = new XMLHttpRequest();
|
|
230
177
|
xhr.open("GET", url, false);
|
|
@@ -260,24 +207,9 @@ if (ENVIRONMENT_IS_NODE) {
|
|
|
260
207
|
throw new Error("environment detection error");
|
|
261
208
|
}
|
|
262
209
|
|
|
263
|
-
|
|
264
|
-
if (typeof performance == "undefined") {
|
|
265
|
-
global.performance = require("perf_hooks").performance;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
var defaultPrint = console.log.bind(console);
|
|
270
|
-
|
|
271
|
-
var defaultPrintErr = console.error.bind(console);
|
|
272
|
-
|
|
273
|
-
if (ENVIRONMENT_IS_NODE) {
|
|
274
|
-
defaultPrint = (...args) => fs.writeSync(1, args.join(" ") + "\n");
|
|
275
|
-
defaultPrintErr = (...args) => fs.writeSync(2, args.join(" ") + "\n");
|
|
276
|
-
}
|
|
210
|
+
var out = console.log.bind(console);
|
|
277
211
|
|
|
278
|
-
var
|
|
279
|
-
|
|
280
|
-
var err = defaultPrintErr;
|
|
212
|
+
var err = console.error.bind(console);
|
|
281
213
|
|
|
282
214
|
Object.assign(Module, moduleOverrides);
|
|
283
215
|
|
|
@@ -327,6 +259,8 @@ var NODEFS = "NODEFS is no longer included by default; build with -lnodefs.js";
|
|
|
327
259
|
|
|
328
260
|
assert(ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER || ENVIRONMENT_IS_NODE, "Pthreads do not work in this environment yet (need Web Workers, or an alternative to them)");
|
|
329
261
|
|
|
262
|
+
assert(!ENVIRONMENT_IS_NODE, "node environment detected but not enabled at build time. Add 'node' to `-sENVIRONMENT` to enable.");
|
|
263
|
+
|
|
330
264
|
assert(!ENVIRONMENT_IS_SHELL, "shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable.");
|
|
331
265
|
|
|
332
266
|
var wasmBinary;
|
|
@@ -665,7 +599,7 @@ function instantiateArrayBuffer(binaryFile, imports, receiver) {
|
|
|
665
599
|
}
|
|
666
600
|
|
|
667
601
|
function instantiateAsync(binary, binaryFile, imports, callback) {
|
|
668
|
-
if (!binary && typeof WebAssembly.instantiateStreaming == "function" && !isDataURI(binaryFile) &&
|
|
602
|
+
if (!binary && typeof WebAssembly.instantiateStreaming == "function" && !isDataURI(binaryFile) && typeof fetch == "function") {
|
|
669
603
|
return fetch(binaryFile, Module["fetchSettings"] || {
|
|
670
604
|
credentials: "same-origin"
|
|
671
605
|
}).then(response => {
|
|
@@ -789,9 +723,7 @@ function unexportedRuntimeSymbol(sym) {
|
|
|
789
723
|
}
|
|
790
724
|
|
|
791
725
|
function dbg(text) {
|
|
792
|
-
|
|
793
|
-
fs.writeSync(2, Array.from(arguments).join(" ") + "\n");
|
|
794
|
-
} else console.warn.apply(console, arguments);
|
|
726
|
+
console.warn.apply(console, arguments);
|
|
795
727
|
}
|
|
796
728
|
|
|
797
729
|
function get_device_id() {
|
|
@@ -874,9 +806,6 @@ function spawnThread(threadParams) {
|
|
|
874
806
|
"arg": threadParams.arg,
|
|
875
807
|
"pthread_ptr": threadParams.pthread_ptr
|
|
876
808
|
};
|
|
877
|
-
if (ENVIRONMENT_IS_NODE) {
|
|
878
|
-
worker.unref();
|
|
879
|
-
}
|
|
880
809
|
worker.postMessage(msg, threadParams.transferList);
|
|
881
810
|
return 0;
|
|
882
811
|
}
|
|
@@ -950,18 +879,7 @@ function initRandomFill() {
|
|
|
950
879
|
if (typeof crypto == "object" && typeof crypto["getRandomValues"] == "function") {
|
|
951
880
|
return view => (view.set(crypto.getRandomValues(new Uint8Array(view.byteLength))),
|
|
952
881
|
view);
|
|
953
|
-
} else if (
|
|
954
|
-
try {
|
|
955
|
-
var crypto_module = require("crypto");
|
|
956
|
-
var randomFillSync = crypto_module["randomFillSync"];
|
|
957
|
-
if (randomFillSync) {
|
|
958
|
-
return view => crypto_module["randomFillSync"](view);
|
|
959
|
-
}
|
|
960
|
-
var randomBytes = crypto_module["randomBytes"];
|
|
961
|
-
return view => (view.set(randomBytes(view.byteLength)), view);
|
|
962
|
-
} catch (e) {}
|
|
963
|
-
}
|
|
964
|
-
abort("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };");
|
|
882
|
+
} else abort("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };");
|
|
965
883
|
}
|
|
966
884
|
|
|
967
885
|
function randomFill(view) {
|
|
@@ -1190,21 +1108,7 @@ var TTY = {
|
|
|
1190
1108
|
get_char: function(tty) {
|
|
1191
1109
|
if (!tty.input.length) {
|
|
1192
1110
|
var result = null;
|
|
1193
|
-
if (
|
|
1194
|
-
var BUFSIZE = 256;
|
|
1195
|
-
var buf = Buffer.alloc(BUFSIZE);
|
|
1196
|
-
var bytesRead = 0;
|
|
1197
|
-
try {
|
|
1198
|
-
bytesRead = fs.readSync(process.stdin.fd, buf, 0, BUFSIZE, -1);
|
|
1199
|
-
} catch (e) {
|
|
1200
|
-
if (e.toString().includes("EOF")) bytesRead = 0; else throw e;
|
|
1201
|
-
}
|
|
1202
|
-
if (bytesRead > 0) {
|
|
1203
|
-
result = buf.slice(0, bytesRead).toString("utf-8");
|
|
1204
|
-
} else {
|
|
1205
|
-
result = null;
|
|
1206
|
-
}
|
|
1207
|
-
} else if (typeof window != "undefined" && typeof window.prompt == "function") {
|
|
1111
|
+
if (typeof window != "undefined" && typeof window.prompt == "function") {
|
|
1208
1112
|
result = window.prompt("Input: ");
|
|
1209
1113
|
if (result !== null) {
|
|
1210
1114
|
result += "\n";
|
|
@@ -3509,16 +3413,6 @@ var PThread = {
|
|
|
3509
3413
|
err(message + " " + e.filename + ":" + e.lineno + ": " + e.message);
|
|
3510
3414
|
throw e;
|
|
3511
3415
|
};
|
|
3512
|
-
if (ENVIRONMENT_IS_NODE) {
|
|
3513
|
-
worker.on("message", function(data) {
|
|
3514
|
-
worker.onmessage({
|
|
3515
|
-
data: data
|
|
3516
|
-
});
|
|
3517
|
-
});
|
|
3518
|
-
worker.on("error", function(e) {
|
|
3519
|
-
worker.onerror(e);
|
|
3520
|
-
});
|
|
3521
|
-
}
|
|
3522
3416
|
assert(wasmMemory instanceof WebAssembly.Memory, "WebAssembly memory should have been loaded by now!");
|
|
3523
3417
|
assert(wasmModule instanceof WebAssembly.Module, "WebAssembly Module should have been loaded by now!");
|
|
3524
3418
|
var handlers = [];
|
|
@@ -3743,7 +3637,6 @@ function warnOnce(text) {
|
|
|
3743
3637
|
if (!warnOnce.shown) warnOnce.shown = {};
|
|
3744
3638
|
if (!warnOnce.shown[text]) {
|
|
3745
3639
|
warnOnce.shown[text] = 1;
|
|
3746
|
-
if (ENVIRONMENT_IS_NODE) text = "warning: " + text;
|
|
3747
3640
|
err(text);
|
|
3748
3641
|
}
|
|
3749
3642
|
}
|
|
@@ -4137,11 +4030,7 @@ function __emscripten_set_offscreencanvas_size(target, width, height) {
|
|
|
4137
4030
|
return -1;
|
|
4138
4031
|
}
|
|
4139
4032
|
|
|
4140
|
-
function __emscripten_thread_set_strongref(thread) {
|
|
4141
|
-
if (ENVIRONMENT_IS_NODE) {
|
|
4142
|
-
PThread.pthreads[thread].ref();
|
|
4143
|
-
}
|
|
4144
|
-
}
|
|
4033
|
+
function __emscripten_thread_set_strongref(thread) {}
|
|
4145
4034
|
|
|
4146
4035
|
function readI53FromI64(ptr) {
|
|
4147
4036
|
return GROWABLE_HEAP_U32()[ptr >> 2] + GROWABLE_HEAP_I32()[ptr + 4 >> 2] * 4294967296;
|
|
@@ -4233,7 +4122,6 @@ function _abort() {
|
|
|
4233
4122
|
}
|
|
4234
4123
|
|
|
4235
4124
|
function _emscripten_check_blocking_allowed() {
|
|
4236
|
-
if (ENVIRONMENT_IS_NODE) return;
|
|
4237
4125
|
if (ENVIRONMENT_IS_WORKER) return;
|
|
4238
4126
|
warnOnce("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread");
|
|
4239
4127
|
}
|
|
@@ -4253,10 +4141,6 @@ function _emscripten_exit_with_live_runtime() {
|
|
|
4253
4141
|
|
|
4254
4142
|
var _emscripten_get_now;
|
|
4255
4143
|
|
|
4256
|
-
if (ENVIRONMENT_IS_NODE) {
|
|
4257
|
-
global.performance = require("perf_hooks").performance;
|
|
4258
|
-
}
|
|
4259
|
-
|
|
4260
4144
|
_emscripten_get_now = () => performance.timeOrigin + performance.now();
|
|
4261
4145
|
|
|
4262
4146
|
function proxyToMainThread(index, sync) {
|
|
Binary file
|
|
Binary file
|
|
@@ -12,41 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
var Module = {};
|
|
14
14
|
|
|
15
|
-
// Node.js support
|
|
16
|
-
var ENVIRONMENT_IS_NODE = typeof process == 'object' && typeof process.versions == 'object' && typeof process.versions.node == 'string';
|
|
17
|
-
if (ENVIRONMENT_IS_NODE) {
|
|
18
|
-
// Create as web-worker-like an environment as we can.
|
|
19
|
-
|
|
20
|
-
var nodeWorkerThreads = require('worker_threads');
|
|
21
|
-
|
|
22
|
-
var parentPort = nodeWorkerThreads.parentPort;
|
|
23
|
-
|
|
24
|
-
parentPort.on('message', (data) => onmessage({ data: data }));
|
|
25
|
-
|
|
26
|
-
var fs = require('fs');
|
|
27
|
-
|
|
28
|
-
Object.assign(global, {
|
|
29
|
-
self: global,
|
|
30
|
-
require: require,
|
|
31
|
-
Module: Module,
|
|
32
|
-
location: {
|
|
33
|
-
href: __filename
|
|
34
|
-
},
|
|
35
|
-
Worker: nodeWorkerThreads.Worker,
|
|
36
|
-
importScripts: function(f) {
|
|
37
|
-
(0, eval)(fs.readFileSync(f, 'utf8') + '//# sourceURL=' + f);
|
|
38
|
-
},
|
|
39
|
-
postMessage: function(msg) {
|
|
40
|
-
parentPort.postMessage(msg);
|
|
41
|
-
},
|
|
42
|
-
performance: global.performance || {
|
|
43
|
-
now: function() {
|
|
44
|
-
return Date.now();
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
|
|
50
15
|
// Thread-local guard variable for one-time init of the JS state
|
|
51
16
|
var initializedJS = false;
|
|
52
17
|
|
|
@@ -56,11 +21,6 @@ function assert(condition, text) {
|
|
|
56
21
|
|
|
57
22
|
function threadPrintErr() {
|
|
58
23
|
var text = Array.prototype.slice.call(arguments).join(' ');
|
|
59
|
-
// See https://github.com/emscripten-core/emscripten/issues/14804
|
|
60
|
-
if (ENVIRONMENT_IS_NODE) {
|
|
61
|
-
fs.writeSync(2, text + '\n');
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
24
|
console.error(text);
|
|
65
25
|
}
|
|
66
26
|
function threadAlert() {
|
package/README.md
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
## Built from changelist ID:
|
|
1
|
+
## Built from changelist ID: 2660163b3d2ffc3cef2cb304d1e22d61772def68
|
|
2
2
|
The Release Notes for this package can be found [here](https://github.com/magnopus-opensource/connected-spaces-platform/releases).
|