@hpcc-js/wasm 1.16.4 → 1.16.5
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/dist/expat.es6.js +6 -5
- package/dist/expat.es6.js.map +1 -1
- package/dist/expat.js +6 -5
- package/dist/expat.js.map +1 -1
- package/dist/graphviz.es6.js +6 -5
- package/dist/graphviz.es6.js.map +1 -1
- package/dist/graphviz.js +6 -5
- package/dist/graphviz.js.map +1 -1
- package/dist/graphvizlib.wasm +0 -0
- package/dist/index.es6.js +6 -5
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.node.es6.js +6 -5
- package/dist/index.node.es6.js.map +1 -1
- package/dist/index.node.js +6 -5
- package/dist/index.node.js.map +1 -1
- package/package.json +1 -1
- package/types/util.d.ts.map +1 -1
package/dist/graphviz.js
CHANGED
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
'default': cpp
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
var _a, _b, _c, _d;
|
|
28
27
|
function getGlobal() {
|
|
29
28
|
if (typeof self !== "undefined") {
|
|
30
29
|
return self;
|
|
@@ -58,8 +57,11 @@
|
|
|
58
57
|
}
|
|
59
58
|
return str;
|
|
60
59
|
}
|
|
61
|
-
let scriptDir =
|
|
62
|
-
|
|
60
|
+
let scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src :
|
|
61
|
+
typeof __filename !== 'undefined' ? __filename :
|
|
62
|
+
typeof document !== 'undefined' && document.currentScript ? document.currentScript.src :
|
|
63
|
+
"";
|
|
64
|
+
scriptDir = scriptDir.substr(0, scriptDir.replace(/[?#].*/, "").lastIndexOf('/') + 1);
|
|
63
65
|
async function browserFetch(wasmUrl) {
|
|
64
66
|
return fetch(wasmUrl, { credentials: 'same-origin' }).then(response => {
|
|
65
67
|
if (!response.ok) {
|
|
@@ -81,8 +83,7 @@
|
|
|
81
83
|
});
|
|
82
84
|
}
|
|
83
85
|
async function loadWasm(_wasmLib, filename, wf, wasmBinary) {
|
|
84
|
-
|
|
85
|
-
wasmUrl = URL && globalThis.document ? new URL(wasmUrl, document.baseURI).href : wasmUrl;
|
|
86
|
+
const wasmUrl = `${trimEnd(wf || wasmFolder() || scriptDir || ".", "/")}/${trimStart(`${filename}.wasm`, "/")}`;
|
|
86
87
|
if (!g_wasmCache[wasmUrl]) {
|
|
87
88
|
g_wasmCache[wasmUrl] = _loadWasm(_wasmLib, wasmUrl, wasmBinary);
|
|
88
89
|
}
|