@bytecodealliance/jco 1.4.1 → 1.4.3

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.
@@ -3792,12 +3792,12 @@ function generate(arg0, arg1) {
3792
3792
  throw new TypeError('invalid variant discriminant for expected');
3793
3793
  }
3794
3794
  }
3795
- if (variant31.tag === 'err') {
3796
- throw new ComponentError(variant31.val);
3797
- }
3798
- const retVal = variant31.val;
3795
+ const retVal = variant31;
3799
3796
  postReturn0(ret);
3800
- return retVal;
3797
+ if (typeof retVal === 'object' && retVal.tag === 'err') {
3798
+ throw new ComponentError(retVal.val);
3799
+ }
3800
+ return retVal.val;
3801
3801
  }
3802
3802
 
3803
3803
  function generateTypes(arg0, arg1) {
@@ -3979,12 +3979,12 @@ function generateTypes(arg0, arg1) {
3979
3979
  throw new TypeError('invalid variant discriminant for expected');
3980
3980
  }
3981
3981
  }
3982
- if (variant25.tag === 'err') {
3983
- throw new ComponentError(variant25.val);
3984
- }
3985
- const retVal = variant25.val;
3982
+ const retVal = variant25;
3986
3983
  postReturn1(ret);
3987
- return retVal;
3984
+ if (typeof retVal === 'object' && retVal.tag === 'err') {
3985
+ throw new ComponentError(retVal.val);
3986
+ }
3987
+ return retVal.val;
3988
3988
  }
3989
3989
 
3990
3990
  let _initialized = false;
package/obj/wasm-tools.js CHANGED
@@ -3587,12 +3587,12 @@ function parse(arg0) {
3587
3587
  throw new TypeError('invalid variant discriminant for expected');
3588
3588
  }
3589
3589
  }
3590
- if (variant3.tag === 'err') {
3591
- throw new ComponentError(variant3.val);
3592
- }
3593
- const retVal = variant3.val;
3590
+ const retVal = variant3;
3594
3591
  postReturn0(ret);
3595
- return retVal;
3592
+ if (typeof retVal === 'object' && retVal.tag === 'err') {
3593
+ throw new ComponentError(retVal.val);
3594
+ }
3595
+ return retVal.val;
3596
3596
  }
3597
3597
 
3598
3598
  function print(arg0) {
@@ -3629,12 +3629,12 @@ function print(arg0) {
3629
3629
  throw new TypeError('invalid variant discriminant for expected');
3630
3630
  }
3631
3631
  }
3632
- if (variant3.tag === 'err') {
3633
- throw new ComponentError(variant3.val);
3634
- }
3635
- const retVal = variant3.val;
3632
+ const retVal = variant3;
3636
3633
  postReturn0(ret);
3637
- return retVal;
3634
+ if (typeof retVal === 'object' && retVal.tag === 'err') {
3635
+ throw new ComponentError(retVal.val);
3636
+ }
3637
+ return retVal.val;
3638
3638
  }
3639
3639
 
3640
3640
  function componentNew(arg0, arg1) {
@@ -3703,12 +3703,12 @@ function componentNew(arg0, arg1) {
3703
3703
  throw new TypeError('invalid variant discriminant for expected');
3704
3704
  }
3705
3705
  }
3706
- if (variant8.tag === 'err') {
3707
- throw new ComponentError(variant8.val);
3708
- }
3709
- const retVal = variant8.val;
3706
+ const retVal = variant8;
3710
3707
  postReturn0(ret);
3711
- return retVal;
3708
+ if (typeof retVal === 'object' && retVal.tag === 'err') {
3709
+ throw new ComponentError(retVal.val);
3710
+ }
3711
+ return retVal.val;
3712
3712
  }
3713
3713
 
3714
3714
  function componentWit(arg0) {
@@ -3745,12 +3745,12 @@ function componentWit(arg0) {
3745
3745
  throw new TypeError('invalid variant discriminant for expected');
3746
3746
  }
3747
3747
  }
3748
- if (variant3.tag === 'err') {
3749
- throw new ComponentError(variant3.val);
3750
- }
3751
- const retVal = variant3.val;
3748
+ const retVal = variant3;
3752
3749
  postReturn0(ret);
3753
- return retVal;
3750
+ if (typeof retVal === 'object' && retVal.tag === 'err') {
3751
+ throw new ComponentError(retVal.val);
3752
+ }
3753
+ return retVal.val;
3754
3754
  }
3755
3755
 
3756
3756
  function componentEmbed(arg0) {
@@ -3941,12 +3941,12 @@ function componentEmbed(arg0) {
3941
3941
  throw new TypeError('invalid variant discriminant for expected');
3942
3942
  }
3943
3943
  }
3944
- if (variant27.tag === 'err') {
3945
- throw new ComponentError(variant27.val);
3946
- }
3947
- const retVal = variant27.val;
3944
+ const retVal = variant27;
3948
3945
  postReturn0(ret);
3949
- return retVal;
3946
+ if (typeof retVal === 'object' && retVal.tag === 'err') {
3947
+ throw new ComponentError(retVal.val);
3948
+ }
3949
+ return retVal.val;
3950
3950
  }
3951
3951
 
3952
3952
  function metadataShow(arg0) {
@@ -4051,12 +4051,12 @@ function metadataShow(arg0) {
4051
4051
  throw new TypeError('invalid variant discriminant for expected');
4052
4052
  }
4053
4053
  }
4054
- if (variant11.tag === 'err') {
4055
- throw new ComponentError(variant11.val);
4056
- }
4057
- const retVal = variant11.val;
4054
+ const retVal = variant11;
4058
4055
  postReturn1(ret);
4059
- return retVal;
4056
+ if (typeof retVal === 'object' && retVal.tag === 'err') {
4057
+ throw new ComponentError(retVal.val);
4058
+ }
4059
+ return retVal.val;
4060
4060
  }
4061
4061
 
4062
4062
  function metadataAdd(arg0, arg1) {
@@ -4121,12 +4121,12 @@ function metadataAdd(arg0, arg1) {
4121
4121
  throw new TypeError('invalid variant discriminant for expected');
4122
4122
  }
4123
4123
  }
4124
- if (variant10.tag === 'err') {
4125
- throw new ComponentError(variant10.val);
4126
- }
4127
- const retVal = variant10.val;
4124
+ const retVal = variant10;
4128
4125
  postReturn0(ret);
4129
- return retVal;
4126
+ if (typeof retVal === 'object' && retVal.tag === 'err') {
4127
+ throw new ComponentError(retVal.val);
4128
+ }
4129
+ return retVal.val;
4130
4130
  }
4131
4131
 
4132
4132
  let _initialized = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytecodealliance/jco",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "JavaScript tooling for working with WebAssembly Components",
5
5
  "author": "Guy Bedford",
6
6
  "bin": {
package/src/jco.js CHANGED
@@ -11,7 +11,7 @@ program
11
11
  .name('jco')
12
12
  .description(c`{bold jco - WebAssembly JS Component Tools}\n JS Component Transpilation Bindgen & Wasm Tools for JS`)
13
13
  .usage('<command> [options]')
14
- .version('1.4.1');
14
+ .version('1.4.3');
15
15
 
16
16
  function myParseInt(value) {
17
17
  return parseInt(value, 10);