dag-ml-wasm 0.3.0 → 0.3.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/dag_ml_wasm.js CHANGED
@@ -801,20 +801,20 @@ export function validate_pipeline_dsl_json(json) {
801
801
  function __wbg_get_imports() {
802
802
  const import0 = {
803
803
  __proto__: null,
804
- __wbg___wbindgen_debug_string_c25d447a39f5578f: function(arg0, arg1) {
804
+ __wbg___wbindgen_debug_string_a57024b9c6e4a48b: function(arg0, arg1) {
805
805
  const ret = debugString(arg1);
806
806
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
807
807
  const len1 = WASM_VECTOR_LEN;
808
808
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
809
809
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
810
810
  },
811
- __wbg___wbindgen_number_get_394265ed1e1b84ee: function(arg0, arg1) {
811
+ __wbg___wbindgen_number_get_136b9679cab35cfb: function(arg0, arg1) {
812
812
  const obj = arg1;
813
813
  const ret = typeof(obj) === 'number' ? obj : undefined;
814
814
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
815
815
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
816
816
  },
817
- __wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
817
+ __wbg___wbindgen_string_get_d154f1e671052120: function(arg0, arg1) {
818
818
  const obj = arg1;
819
819
  const ret = typeof(obj) === 'string' ? obj : undefined;
820
820
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -822,10 +822,10 @@ function __wbg_get_imports() {
822
822
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
823
823
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
824
824
  },
825
- __wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
825
+ __wbg___wbindgen_throw_bb96b2010945f0bc: function(arg0, arg1) {
826
826
  throw new Error(getStringFromWasm0(arg0, arg1));
827
827
  },
828
- __wbg_call_44b7209e1e252e6a: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
828
+ __wbg_call_39f824e18d9d2414: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
829
829
  const ret = arg0.call(arg1, arg2, arg3, arg4);
830
830
  return ret;
831
831
  }, arguments); },
@@ -1046,11 +1046,15 @@ function __wbg_finalize_init(instance, module) {
1046
1046
 
1047
1047
  async function __wbg_load(module, imports) {
1048
1048
  if (typeof Response === 'function' && module instanceof Response) {
1049
+ if (!module.ok) {
1050
+ throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
1051
+ }
1052
+
1049
1053
  if (typeof WebAssembly.instantiateStreaming === 'function') {
1050
1054
  try {
1051
1055
  return await WebAssembly.instantiateStreaming(module, imports);
1052
1056
  } catch (e) {
1053
- const validResponse = module.ok && expectedResponseType(module.type);
1057
+ const validResponse = expectedResponseType(module.type);
1054
1058
 
1055
1059
  if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
1056
1060
  console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "G. Beurier <beurier@cirad.fr>"
6
6
  ],
7
7
  "description": "WASM bindings for DAG-ML JSON contracts.",
8
- "version": "0.3.0",
8
+ "version": "0.3.2",
9
9
  "license": "CECILL-2.1 OR AGPL-3.0-or-later",
10
10
  "repository": {
11
11
  "type": "git",