@hpcc-js/wasm 1.16.1 → 1.16.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.
- package/dist/expat.es6.js +5 -6
- package/dist/expat.es6.js.map +1 -1
- package/dist/expat.js +5 -6
- package/dist/expat.js.map +1 -1
- package/dist/graphviz.es6.js +5 -6
- package/dist/graphviz.es6.js.map +1 -1
- package/dist/graphviz.js +5 -6
- package/dist/graphviz.js.map +1 -1
- package/dist/graphvizlib.wasm +0 -0
- package/dist/index.es6.js +5 -6
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +5 -6
- 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 +5 -6
- package/dist/index.node.es6.js.map +1 -1
- package/dist/index.node.js +5 -6
- package/dist/index.node.js.map +1 -1
- package/package.json +1 -1
- package/types/util.d.ts.map +1 -1
package/dist/graphvizlib.wasm
CHANGED
|
Binary file
|
package/dist/index.es6.js
CHANGED
|
@@ -18,6 +18,7 @@ var expatlib = /*#__PURE__*/Object.freeze({
|
|
|
18
18
|
'default': cpp$1
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
+
var _a, _b, _c, _d;
|
|
21
22
|
function getGlobal() {
|
|
22
23
|
if (typeof self !== "undefined") {
|
|
23
24
|
return self;
|
|
@@ -51,11 +52,8 @@ function trimStart(str, charToRemove) {
|
|
|
51
52
|
}
|
|
52
53
|
return str;
|
|
53
54
|
}
|
|
54
|
-
let scriptDir =
|
|
55
|
-
|
|
56
|
-
typeof document !== 'undefined' && document.currentScript ? document.currentScript.src :
|
|
57
|
-
"";
|
|
58
|
-
scriptDir = scriptDir.substr(0, scriptDir.replace(/[?#].*/, "").lastIndexOf('/') + 1);
|
|
55
|
+
let scriptDir = (_d = (_c = (_b = (_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) === null || _a === void 0 ? void 0 : _a.currentScript) === null || _b === void 0 ? void 0 : _b.src) !== null && _c !== void 0 ? _c : __filename) !== null && _d !== void 0 ? _d : "./dummy.js";
|
|
56
|
+
scriptDir = scriptDir.substring(0, scriptDir.replace(/[?#].*/, "").lastIndexOf('/') + 1);
|
|
59
57
|
async function browserFetch(wasmUrl) {
|
|
60
58
|
return fetch(wasmUrl, { credentials: 'same-origin' }).then(response => {
|
|
61
59
|
if (!response.ok) {
|
|
@@ -77,7 +75,8 @@ async function _loadWasm(_wasmLib, wasmUrl, wasmBinary) {
|
|
|
77
75
|
});
|
|
78
76
|
}
|
|
79
77
|
async function loadWasm(_wasmLib, filename, wf, wasmBinary) {
|
|
80
|
-
|
|
78
|
+
let wasmUrl = `${trimEnd(wf || wasmFolder() || scriptDir, "/")}/${trimStart(`${filename}.wasm`, "/")}`;
|
|
79
|
+
wasmUrl = URL && globalThis.document ? new URL(wasmUrl, document.baseURI).href : wasmUrl;
|
|
81
80
|
if (!g_wasmCache[wasmUrl]) {
|
|
82
81
|
g_wasmCache[wasmUrl] = _loadWasm(_wasmLib, wasmUrl, wasmBinary);
|
|
83
82
|
}
|