@steerprotocol/app-loader 0.0.9 → 0.1.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/lib/index.js +2 -3
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -76,9 +76,7 @@ function instantiate(module, imports = {}) {
|
|
|
76
76
|
},
|
|
77
77
|
generateCandles(data, candleSize) {
|
|
78
78
|
const _data = __liftString(data >>> 0) || '[]';
|
|
79
|
-
console.log("🧙♂️ 🔎 -> ~ file: index.ts:72 ~ generateCandles ~ _data", _data);
|
|
80
79
|
const _candleSize = __liftString(candleSize >>> 0) || '69m';
|
|
81
|
-
console.log("🧙♂️ 🔎 -> ~ file: index.ts:74 ~ generateCandles ~ _candleSize", _candleSize);
|
|
82
80
|
return __lowerString(JSON.stringify(generateCandles(JSON.parse(_data), _candleSize)));
|
|
83
81
|
}
|
|
84
82
|
}),
|
|
@@ -115,6 +113,7 @@ function instantiate(module, imports = {}) {
|
|
|
115
113
|
return __liftString(exports.transform() >>> 0);
|
|
116
114
|
}
|
|
117
115
|
catch (e) {
|
|
116
|
+
console.error(e);
|
|
118
117
|
throw new Error('Unable to call .transform on wasm module. Are you sure this is a data connector?');
|
|
119
118
|
}
|
|
120
119
|
},
|
|
@@ -290,7 +289,7 @@ const loadWasm = (input, imports = {}) => __awaiter(void 0, void 0, void 0, func
|
|
|
290
289
|
return yield globalThis.WebAssembly.compileStreaming(globalThis.fetch(input));
|
|
291
290
|
}
|
|
292
291
|
catch (_a) {
|
|
293
|
-
return globalThis.WebAssembly.compile(yield (yield Promise.resolve().then(() => __importStar(require('
|
|
292
|
+
return globalThis.WebAssembly.compile(yield (yield Promise.resolve().then(() => __importStar(require('fs/promises')))).readFile(input));
|
|
294
293
|
}
|
|
295
294
|
}
|
|
296
295
|
else {
|