@loro-dev/flock 4.1.0 → 4.3.0

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.
@@ -724,63 +724,63 @@ function Option$Some$32$(param0) {
724
724
  this._0 = param0;
725
725
  }
726
726
  Option$Some$32$.prototype.$tag = 1;
727
- function Result$Err$33$(param0) {
727
+ const Option$None$33$ = { $tag: 0 };
728
+ function Option$Some$33$(param0) {
728
729
  this._0 = param0;
729
730
  }
730
- Result$Err$33$.prototype.$tag = 0;
731
- function Result$Ok$33$(param0) {
731
+ Option$Some$33$.prototype.$tag = 1;
732
+ function Result$Err$34$(param0) {
732
733
  this._0 = param0;
733
734
  }
734
- Result$Ok$33$.prototype.$tag = 1;
735
- const Option$None$34$ = { $tag: 0 };
736
- function Option$Some$34$(param0) {
735
+ Result$Err$34$.prototype.$tag = 0;
736
+ function Result$Ok$34$(param0) {
737
737
  this._0 = param0;
738
738
  }
739
- Option$Some$34$.prototype.$tag = 1;
739
+ Result$Ok$34$.prototype.$tag = 1;
740
740
  const Option$None$35$ = { $tag: 0 };
741
741
  function Option$Some$35$(param0) {
742
742
  this._0 = param0;
743
743
  }
744
744
  Option$Some$35$.prototype.$tag = 1;
745
- function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$36$(param0) {
745
+ const Option$None$36$ = { $tag: 0 };
746
+ function Option$Some$36$(param0) {
746
747
  this._0 = param0;
747
748
  }
748
- $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$36$.prototype.$tag = 0;
749
- function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$36$(param0) {
749
+ Option$Some$36$.prototype.$tag = 1;
750
+ function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$37$(param0) {
750
751
  this._0 = param0;
751
752
  }
752
- $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$36$.prototype.$tag = 1;
753
- const $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$36$ = { $tag: 2 };
754
- const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$37$ = { $tag: 0 };
755
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$37$(param0) {
753
+ $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$37$.prototype.$tag = 0;
754
+ function $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$37$(param0) {
756
755
  this._0 = param0;
757
756
  }
758
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$37$.prototype.$tag = 1;
759
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$37$(param0) {
757
+ $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$37$.prototype.$tag = 1;
758
+ const $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$37$ = { $tag: 2 };
759
+ const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$38$ = { $tag: 0 };
760
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$38$(param0) {
760
761
  this._0 = param0;
761
762
  }
762
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$37$.prototype.$tag = 2;
763
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$37$(param0) {
763
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$38$.prototype.$tag = 1;
764
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$38$(param0) {
764
765
  this._0 = param0;
765
766
  }
766
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$37$.prototype.$tag = 3;
767
- function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$37$(param0) {
767
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Return$38$.prototype.$tag = 2;
768
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$38$(param0) {
768
769
  this._0 = param0;
769
770
  }
770
- $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$37$.prototype.$tag = 4;
771
- function Result$Err$38$(param0) {
771
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Error$38$.prototype.$tag = 3;
772
+ function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$38$(param0) {
772
773
  this._0 = param0;
773
774
  }
774
- Result$Err$38$.prototype.$tag = 0;
775
- function Result$Ok$38$(param0) {
775
+ $64$moonbitlang$47$core$47$builtin$46$ForeachResult$JumpOuter$38$.prototype.$tag = 4;
776
+ function Result$Err$39$(param0) {
776
777
  this._0 = param0;
777
778
  }
778
- Result$Ok$38$.prototype.$tag = 1;
779
- const Option$None$39$ = { $tag: 0 };
780
- function Option$Some$39$(param0) {
779
+ Result$Err$39$.prototype.$tag = 0;
780
+ function Result$Ok$39$(param0) {
781
781
  this._0 = param0;
782
782
  }
783
- Option$Some$39$.prototype.$tag = 1;
783
+ Result$Ok$39$.prototype.$tag = 1;
784
784
  const $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$40$ = { $tag: 0 };
785
785
  function $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Break$40$(param0) {
786
786
  this._0 = param0;
@@ -999,10 +999,11 @@ const zxch3n$expect$$yellow$46$constr$47$2738 = 3;
999
999
  const zxch3n$expect$$blue$46$constr$47$2740 = 4;
1000
1000
  const zxch3n$flock$sorted_map$$range$46$tuple$47$3158 = { _0: true, _1: true };
1001
1001
  const zxch3n$flock$sorted_map$$range$46$tuple$47$3159 = { _0: true, _1: true };
1002
- const zxch3n$flock$flock$$from_string$46$42$bind$124$857 = ",";
1002
+ const zxch3n$flock$flock$$from_string$46$42$bind$124$885 = ",";
1003
1003
  const zxch3n$flock$flock$$zero$46$record$47$3245 = { physical_time: 0, logical_counter: 0 };
1004
1004
  const zxch3n$flock$flock$$new$46$42$bind$47$3438 = { physical_time: 0, logical_counter: 0 };
1005
- const zxch3n$flock$flock$$import_json$46$inner$46$constr$47$3759 = new Source$Import("import_json");
1005
+ const zxch3n$flock$flock$$delete$46$inner$46$constr$47$3541 = true;
1006
+ const zxch3n$flock$flock$$import_json$46$inner$46$constr$47$3783 = new Source$Import("import_json");
1006
1007
  (() => {
1007
1008
  Yoorkin$jmop$$ffi_init(Yoorkin$jmop$$convert_thrown_error);
1008
1009
  })();
@@ -12221,7 +12222,7 @@ function zxch3n$flock$flock$$bytes_from_hex(hex) {
12221
12222
  }
12222
12223
  function zxch3n$flock$flock$$validate_peer_key(peer_id) {
12223
12224
  if (peer_id.bytes.length >= 128) {
12224
- moonbitlang$core$builtin$$abort$5$("peer id must be less than 128 bytes", "@zxch3n/flock/flock:flock.mbt:25:5-25:49");
12225
+ moonbitlang$core$builtin$$abort$5$("peer id must be less than 128 bytes", "@zxch3n/flock/flock:flock.mbt:27:5-27:49");
12225
12226
  return;
12226
12227
  } else {
12227
12228
  return;
@@ -12255,7 +12256,7 @@ function zxch3n$flock$flock$$HlcWithPeer$to_string(self) {
12255
12256
  return `${zxch3n$flock$flock$$Hlc$to_string(self.hlc)},${zxch3n$flock$flock$$peer_key_to_string(self.peer)}`;
12256
12257
  }
12257
12258
  function zxch3n$flock$flock$$HlcWithPeer$from_string(s) {
12258
- const parts = moonbitlang$core$builtin$$Iter$collect$15$(moonbitlang$core$string$$StringView$split(s, { str: zxch3n$flock$flock$$from_string$46$42$bind$124$857, start: 0, end: zxch3n$flock$flock$$from_string$46$42$bind$124$857.length }));
12259
+ const parts = moonbitlang$core$builtin$$Iter$collect$15$(moonbitlang$core$string$$StringView$split(s, { str: zxch3n$flock$flock$$from_string$46$42$bind$124$885, start: 0, end: zxch3n$flock$flock$$from_string$46$42$bind$124$885.length }));
12259
12260
  if (parts.length < 3) {
12260
12261
  return undefined;
12261
12262
  }
@@ -12870,7 +12871,7 @@ function zxch3n$flock$flock$$Flock$new(peer_id) {
12870
12871
  const _bind = zxch3n$flock$flock$$peer_id_from_string(peer_id);
12871
12872
  let peer_key;
12872
12873
  if (_bind === undefined) {
12873
- peer_key = moonbitlang$core$builtin$$abort$3$("peer id must be less than 128 bytes", "@zxch3n/flock/flock:flock.mbt:382:13-382:57");
12874
+ peer_key = moonbitlang$core$builtin$$abort$3$("peer id must be less than 128 bytes", "@zxch3n/flock/flock:flock.mbt:384:13-384:57");
12874
12875
  } else {
12875
12876
  const _Some = _bind;
12876
12877
  peer_key = _Some;
@@ -12881,13 +12882,14 @@ function zxch3n$flock$flock$$Flock$new(peer_id) {
12881
12882
  const _bind$4 = zxch3n$flock$sorted_map$$SortedMap$new$90$();
12882
12883
  const _bind$5 = zxch3n$flock$flock$$SubscriberSet$new$91$();
12883
12884
  const _bind$6 = undefined;
12884
- return { peer_id: peer_key, max_hlc: zxch3n$flock$flock$$new$46$42$bind$47$3438, vv: _bind$2, kv: _bind$3, updates: _bind$4, subscribers: _bind$5, digest: _bind$6 };
12885
+ const _bind$7 = Option$None$33$;
12886
+ return { peer_id: peer_key, max_hlc: zxch3n$flock$flock$$new$46$42$bind$47$3438, vv: _bind$2, kv: _bind$3, updates: _bind$4, subscribers: _bind$5, digest: _bind$6, txn_events: _bind$7 };
12885
12887
  }
12886
12888
  function zxch3n$flock$flock$$Flock$set_peer_id(self, peer_id) {
12887
12889
  const _bind = zxch3n$flock$flock$$peer_id_from_string(peer_id);
12888
12890
  let peer_key;
12889
12891
  if (_bind === undefined) {
12890
- peer_key = moonbitlang$core$builtin$$abort$3$("peer id must be less than 128 bytes", "@zxch3n/flock/flock:flock.mbt:400:13-400:57");
12892
+ peer_key = moonbitlang$core$builtin$$abort$3$("peer id must be less than 128 bytes", "@zxch3n/flock/flock:flock.mbt:403:13-403:57");
12891
12893
  } else {
12892
12894
  const _Some = _bind;
12893
12895
  peer_key = _Some;
@@ -12926,13 +12928,29 @@ function zxch3n$flock$flock$$Flock$check_consistency(a, b) {
12926
12928
  return true;
12927
12929
  }
12928
12930
  function zxch3n$flock$flock$$Flock$check_invariants(_self) {}
12929
- function zxch3n$flock$flock$$Flock$put_inner$46$inner(self, key, data, metadata, now, hooks) {
12931
+ function zxch3n$flock$flock$$Flock$put_inner$46$inner(self, key, data, metadata, now, hooks, skip_same_value) {
12930
12932
  const _bind = zxch3n$flock$memcomparable$$encode_json_key(key);
12931
12933
  if (_bind === undefined) {
12932
- return new Result$Err$33$(new Error$zxch3n$47$flock$47$flock$46$PutError$46$InvalidKey(moonbitlang$core$builtin$$ToJson$to_json$63$(key)));
12934
+ return new Result$Err$34$(new Error$zxch3n$47$flock$47$flock$46$PutError$46$InvalidKey(moonbitlang$core$builtin$$ToJson$to_json$63$(key)));
12933
12935
  } else {
12934
12936
  const _Some = _bind;
12935
12937
  const _encoded_key = _Some;
12938
+ if (skip_same_value) {
12939
+ const _bind$2 = zxch3n$flock$sorted_map$$SortedMap$get$75$(self.kv, _encoded_key);
12940
+ if (_bind$2 === undefined) {
12941
+ if (data === undefined) {
12942
+ if (metadata === undefined) {
12943
+ return new Result$Ok$34$(undefined);
12944
+ }
12945
+ }
12946
+ } else {
12947
+ const _Some$2 = _bind$2;
12948
+ const _existing = _Some$2;
12949
+ if (moonbitlang$core$builtin$$Eq$equal$24$(_existing.value.data, data) && moonbitlang$core$builtin$$Eq$equal$64$(_existing.value.metadata, metadata)) {
12950
+ return new Result$Ok$34$(undefined);
12951
+ }
12952
+ }
12953
+ }
12936
12954
  const now$2 = moonbitlang$core$option$$Option$unwrap_or_else$68$(now, () => moonbitlang$core$uint64$$UInt64$to_double(moonbitlang$core$env$$now()));
12937
12955
  if (now$2 > self.max_hlc.physical_time) {
12938
12956
  self.max_hlc = { physical_time: now$2, logical_counter: 0 };
@@ -12969,21 +12987,30 @@ function zxch3n$flock$flock$$Flock$put_inner$46$inner(self, key, data, metadata,
12969
12987
  const final_entry = zxch3n$flock$flock$$make_entry(_encoded_key, final_value);
12970
12988
  const applied = zxch3n$flock$flock$$Flock$apply_entry(self, final_entry, true);
12971
12989
  if (!applied) {
12972
- return new Result$Ok$33$(undefined);
12990
+ return new Result$Ok$34$(undefined);
12973
12991
  }
12974
12992
  const final_clock = final_entry.value.clock.hlc;
12975
12993
  self.max_hlc = final_clock;
12976
12994
  moonbitlang$core$builtin$$Map$set$57$(self.vv, zxch3n$flock$flock$$peer_key_to_string(self.peer_id), final_clock);
12977
- if (!zxch3n$flock$flock$$SubscriberSet$is_empty$91$(self.subscribers)) {
12995
+ const _bind$2 = self.txn_events;
12996
+ if (_bind$2.$tag === 1) {
12997
+ const _Some$2 = _bind$2;
12998
+ const _events = _Some$2._0;
12978
12999
  const event_key = zxch3n$flock$memcomparable$$decode_key_to_json(final_entry.key);
12979
13000
  const event_payload = zxch3n$flock$flock$$clone_raw_value(final_entry.value);
12980
- return new Result$Ok$33$(zxch3n$flock$flock$$SubscriberSet$notify$91$(self.subscribers, { by: Source$Local, events: [{ _0: event_key, _1: event_payload }] }));
13001
+ return new Result$Ok$34$(moonbitlang$core$array$$Array$push$31$(_events, { _0: event_key, _1: event_payload }));
12981
13002
  } else {
12982
- return new Result$Ok$33$(undefined);
13003
+ if (!zxch3n$flock$flock$$SubscriberSet$is_empty$91$(self.subscribers)) {
13004
+ const event_key = zxch3n$flock$memcomparable$$decode_key_to_json(final_entry.key);
13005
+ const event_payload = zxch3n$flock$flock$$clone_raw_value(final_entry.value);
13006
+ return new Result$Ok$34$(zxch3n$flock$flock$$SubscriberSet$notify$91$(self.subscribers, { by: Source$Local, events: [{ _0: event_key, _1: event_payload }] }));
13007
+ } else {
13008
+ return new Result$Ok$34$(undefined);
13009
+ }
12983
13010
  }
12984
13011
  }
12985
13012
  }
12986
- function zxch3n$flock$flock$$Flock$put_inner(self, key, data, metadata$46$opt, now$46$opt, hooks$46$opt) {
13013
+ function zxch3n$flock$flock$$Flock$put_inner(self, key, data, metadata$46$opt, now$46$opt, hooks$46$opt, skip_same_value$46$opt) {
12987
13014
  let metadata;
12988
13015
  if (metadata$46$opt.$tag === 1) {
12989
13016
  const _Some = metadata$46$opt;
@@ -13005,10 +13032,11 @@ function zxch3n$flock$flock$$Flock$put_inner(self, key, data, metadata$46$opt, n
13005
13032
  } else {
13006
13033
  hooks = undefined;
13007
13034
  }
13008
- return zxch3n$flock$flock$$Flock$put_inner$46$inner(self, key, data, metadata, now, hooks);
13035
+ const skip_same_value = skip_same_value$46$opt === -1 ? true : skip_same_value$46$opt;
13036
+ return zxch3n$flock$flock$$Flock$put_inner$46$inner(self, key, data, metadata, now, hooks, skip_same_value);
13009
13037
  }
13010
13038
  function zxch3n$flock$flock$$Flock$put_with_meta$46$inner(self, key, value, metadata, now, hooks) {
13011
- return zxch3n$flock$flock$$Flock$put_inner$46$inner(self, key, value, metadata, now, hooks);
13039
+ return zxch3n$flock$flock$$Flock$put_inner$46$inner(self, key, value, metadata, now, hooks, true);
13012
13040
  }
13013
13041
  function zxch3n$flock$flock$$Flock$put_with_meta(self, key, value, metadata$46$opt, now$46$opt, hooks$46$opt) {
13014
13042
  let metadata;
@@ -13035,10 +13063,55 @@ function zxch3n$flock$flock$$Flock$put_with_meta(self, key, value, metadata$46$o
13035
13063
  return zxch3n$flock$flock$$Flock$put_with_meta$46$inner(self, key, value, metadata, now, hooks);
13036
13064
  }
13037
13065
  function zxch3n$flock$flock$$Flock$put$46$inner(self, key, value, now) {
13038
- return zxch3n$flock$flock$$Flock$put_with_meta(self, key, value, Option$None$34$, now, Option$None$35$);
13066
+ return zxch3n$flock$flock$$Flock$put_with_meta(self, key, value, Option$None$35$, now, Option$None$36$);
13039
13067
  }
13040
13068
  function zxch3n$flock$flock$$Flock$delete$46$inner(self, key, now) {
13041
- return zxch3n$flock$flock$$Flock$put_inner(self, key, undefined, Option$None$34$, now, Option$None$35$);
13069
+ return zxch3n$flock$flock$$Flock$put_inner(self, key, undefined, Option$None$35$, now, Option$None$36$, zxch3n$flock$flock$$delete$46$inner$46$constr$47$3541);
13070
+ }
13071
+ function zxch3n$flock$flock$$Flock$txn_begin(self) {
13072
+ const _bind = self.txn_events;
13073
+ if (_bind.$tag === 0) {
13074
+ self.txn_events = new Option$Some$33$([]);
13075
+ return;
13076
+ } else {
13077
+ moonbitlang$core$builtin$$abort$5$("Nested transactions are not supported", "@zxch3n/flock/flock:flock.mbt:601:5-601:51");
13078
+ return;
13079
+ }
13080
+ }
13081
+ function zxch3n$flock$flock$$Flock$txn_commit(self) {
13082
+ const _bind = self.txn_events;
13083
+ if (_bind.$tag === 1) {
13084
+ const _Some = _bind;
13085
+ const _events = _Some._0;
13086
+ self.txn_events = Option$None$33$;
13087
+ if (_events.length > 0 && !zxch3n$flock$flock$$SubscriberSet$is_empty$91$(self.subscribers)) {
13088
+ zxch3n$flock$flock$$SubscriberSet$notify$91$(self.subscribers, { by: Source$Local, events: _events });
13089
+ return;
13090
+ } else {
13091
+ return;
13092
+ }
13093
+ } else {
13094
+ moonbitlang$core$builtin$$abort$5$("No active transaction to commit", "@zxch3n/flock/flock:flock.mbt:611:5-611:45");
13095
+ return;
13096
+ }
13097
+ }
13098
+ function zxch3n$flock$flock$$Flock$txn_rollback(self) {
13099
+ const _bind = self.txn_events;
13100
+ if (_bind.$tag === 1) {
13101
+ self.txn_events = Option$None$33$;
13102
+ return;
13103
+ } else {
13104
+ moonbitlang$core$builtin$$abort$5$("No active transaction to rollback", "@zxch3n/flock/flock:flock.mbt:625:5-625:47");
13105
+ return;
13106
+ }
13107
+ }
13108
+ function zxch3n$flock$flock$$Flock$is_in_txn(self) {
13109
+ const _bind = self.txn_events;
13110
+ if (_bind.$tag === 1) {
13111
+ return true;
13112
+ } else {
13113
+ return false;
13114
+ }
13042
13115
  }
13043
13116
  function zxch3n$flock$flock$$Flock$get(self, key) {
13044
13117
  const _bind = zxch3n$flock$memcomparable$$encode_json_key(key);
@@ -13109,9 +13182,9 @@ function zxch3n$flock$flock$$prefix_upper_bound_bytes(bytes) {
13109
13182
  }
13110
13183
  return undefined;
13111
13184
  }
13112
- function zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$435(_env, bytes, inclusive) {
13113
- const lower_inclusive = _env._1;
13114
- const lower_bytes = _env._0;
13185
+ function zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$440(_env, bytes, inclusive) {
13186
+ const lower_bytes = _env._1;
13187
+ const lower_inclusive = _env._0;
13115
13188
  const _bind = lower_bytes.val;
13116
13189
  if (_bind === undefined) {
13117
13190
  lower_bytes.val = bytes;
@@ -13135,7 +13208,7 @@ function zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$435(_env, bytes, i
13135
13208
  }
13136
13209
  }
13137
13210
  }
13138
- function zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$447(_env, bytes, inclusive) {
13211
+ function zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$452(_env, bytes, inclusive) {
13139
13212
  const upper_bytes = _env._1;
13140
13213
  const upper_inclusive = _env._0;
13141
13214
  const _bind = upper_bytes.val;
@@ -13192,7 +13265,7 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
13192
13265
  } else {
13193
13266
  const _Some = _bind;
13194
13267
  const _encoded_start = _Some;
13195
- start_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$36$(_encoded_start);
13268
+ start_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$37$(_encoded_start);
13196
13269
  }
13197
13270
  break;
13198
13271
  }
@@ -13205,12 +13278,12 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
13205
13278
  } else {
13206
13279
  const _Some = _bind$2;
13207
13280
  const _encoded_start = _Some;
13208
- start_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$36$(_encoded_start);
13281
+ start_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$37$(_encoded_start);
13209
13282
  }
13210
13283
  break;
13211
13284
  }
13212
13285
  default: {
13213
- start_bound_bytes = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$36$;
13286
+ start_bound_bytes = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$37$;
13214
13287
  }
13215
13288
  }
13216
13289
  let end_bound_bytes;
@@ -13224,7 +13297,7 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
13224
13297
  } else {
13225
13298
  const _Some = _bind$3;
13226
13299
  const _encoded_end = _Some;
13227
- end_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$36$(_encoded_end);
13300
+ end_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Inclusive$37$(_encoded_end);
13228
13301
  }
13229
13302
  break;
13230
13303
  }
@@ -13237,35 +13310,35 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
13237
13310
  } else {
13238
13311
  const _Some = _bind$4;
13239
13312
  const _encoded_end = _Some;
13240
- end_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$36$(_encoded_end);
13313
+ end_bound_bytes = new $64$zxch3n$47$flock$47$sorted_map$46$Bound$Exclusive$37$(_encoded_end);
13241
13314
  }
13242
13315
  break;
13243
13316
  }
13244
13317
  default: {
13245
- end_bound_bytes = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$36$;
13318
+ end_bound_bytes = $64$zxch3n$47$flock$47$sorted_map$46$Bound$Unbounded$37$;
13246
13319
  }
13247
13320
  }
13248
13321
  const lower_bytes = { val: undefined };
13249
13322
  const lower_inclusive = { val: true };
13250
- const _env = { _0: lower_bytes, _1: lower_inclusive };
13323
+ const _env = { _0: lower_inclusive, _1: lower_bytes };
13251
13324
  const _bind$5 = prefix_bytes;
13252
13325
  if (_bind$5 === undefined) {
13253
13326
  } else {
13254
13327
  const _Some = _bind$5;
13255
13328
  const _prefix_key = _Some;
13256
- zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$435(_env, _prefix_key, true);
13329
+ zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$440(_env, _prefix_key, true);
13257
13330
  }
13258
13331
  switch (start_bound_bytes.$tag) {
13259
13332
  case 0: {
13260
13333
  const _Inclusive$3 = start_bound_bytes;
13261
13334
  const _start_key = _Inclusive$3._0;
13262
- zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$435(_env, _start_key, true);
13335
+ zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$440(_env, _start_key, true);
13263
13336
  break;
13264
13337
  }
13265
13338
  case 1: {
13266
13339
  const _Exclusive$3 = start_bound_bytes;
13267
13340
  const _start_key$2 = _Exclusive$3._0;
13268
- zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$435(_env, _start_key$2, false);
13341
+ zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$440(_env, _start_key$2, false);
13269
13342
  break;
13270
13343
  }
13271
13344
  }
@@ -13286,19 +13359,19 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
13286
13359
  } else {
13287
13360
  const _Some = _bind$7;
13288
13361
  const _prefix_upper = _Some;
13289
- zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$447(_env$2, _prefix_upper, false);
13362
+ zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$452(_env$2, _prefix_upper, false);
13290
13363
  }
13291
13364
  switch (end_bound_bytes.$tag) {
13292
13365
  case 0: {
13293
13366
  const _Inclusive$4 = end_bound_bytes;
13294
13367
  const _end_key = _Inclusive$4._0;
13295
- zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$447(_env$2, _end_key, true);
13368
+ zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$452(_env$2, _end_key, true);
13296
13369
  break;
13297
13370
  }
13298
13371
  case 1: {
13299
13372
  const _Exclusive$4 = end_bound_bytes;
13300
13373
  const _end_key$2 = _Exclusive$4._0;
13301
- zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$447(_env$2, _end_key$2, false);
13374
+ zxch3n$flock$flock$$scan$46$inner$46$apply_upper$124$452(_env$2, _end_key$2, false);
13302
13375
  break;
13303
13376
  }
13304
13377
  }
@@ -13533,7 +13606,7 @@ function zxch3n$flock$flock$$Flock$export_json$46$inner(self, from, prune_tombst
13533
13606
  const _Some = from;
13534
13607
  const _f = _Some;
13535
13608
  if (!(_f.size === 0)) {
13536
- let _foreach_result = $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$37$;
13609
+ let _foreach_result = $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$38$;
13537
13610
  const _bind = moonbitlang$core$builtin$$Map$iter2$57$(self.vv);
13538
13611
  _bind((peer, clock) => {
13539
13612
  const _p$3 = moonbitlang$core$builtin$$Map$get$57$(_f, peer);
@@ -13661,17 +13734,27 @@ function zxch3n$flock$flock$$Flock$export_json(self, from, prune_tombstones_befo
13661
13734
  return zxch3n$flock$flock$$Flock$export_json$46$inner(self, from, prune_tombstones_before, peer_id);
13662
13735
  }
13663
13736
  function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
13737
+ const _bind = self.txn_events;
13738
+ if (_bind.$tag === 1) {
13739
+ const _Some = _bind;
13740
+ const _pending_events = _Some._0;
13741
+ self.txn_events = Option$None$33$;
13742
+ if (_pending_events.length > 0 && !zxch3n$flock$flock$$SubscriberSet$is_empty$91$(self.subscribers)) {
13743
+ zxch3n$flock$flock$$SubscriberSet$notify$91$(self.subscribers, { by: Source$Local, events: _pending_events });
13744
+ }
13745
+ return new Result$Err$39$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "import called during transaction - transaction was auto-committed"));
13746
+ }
13664
13747
  if (json.$tag === 6) {
13665
13748
  const _Object = json;
13666
13749
  const _map = _Object._0;
13667
13750
  let version;
13668
13751
  _L: {
13669
13752
  _L$2: {
13670
- const _bind = moonbitlang$core$builtin$$Map$get$56$(_map, "version");
13671
- if (_bind === undefined) {
13672
- return new Result$Err$38$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "The imported json does not contain a version field"));
13753
+ const _bind$2 = moonbitlang$core$builtin$$Map$get$56$(_map, "version");
13754
+ if (_bind$2 === undefined) {
13755
+ return new Result$Err$39$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "The imported json does not contain a version field"));
13673
13756
  } else {
13674
- const _Some = _bind;
13757
+ const _Some = _bind$2;
13675
13758
  const _x = _Some;
13676
13759
  if (_x.$tag === 3) {
13677
13760
  const _Number = _x;
@@ -13688,22 +13771,22 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
13688
13771
  }
13689
13772
  break _L;
13690
13773
  }
13691
- return new Result$Err$38$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, `The imported json uses an unsupported version ${moonbitlang$core$builtin$$Show$to_string$51$(version)}`));
13774
+ return new Result$Err$39$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, `The imported json uses an unsupported version ${moonbitlang$core$builtin$$Show$to_string$51$(version)}`));
13692
13775
  }
13693
- const events = { val: Option$None$39$ };
13776
+ const events = { val: Option$None$33$ };
13694
13777
  if (!zxch3n$flock$flock$$SubscriberSet$is_empty$91$(self.subscribers)) {
13695
- events.val = new Option$Some$39$(moonbitlang$core$array$$Array$new$46$inner$31$(0));
13778
+ events.val = new Option$Some$33$(moonbitlang$core$array$$Array$new$46$inner$31$(0));
13696
13779
  }
13697
13780
  const skipped_entries = moonbitlang$core$array$$Array$new$46$inner$30$(0);
13698
13781
  const accepted = { val: 0 };
13699
13782
  let entries;
13700
13783
  _L$2: {
13701
13784
  _L$3: {
13702
- const _bind = moonbitlang$core$builtin$$Map$get$56$(_map, "entries");
13703
- if (_bind === undefined) {
13785
+ const _bind$2 = moonbitlang$core$builtin$$Map$get$56$(_map, "entries");
13786
+ if (_bind$2 === undefined) {
13704
13787
  break _L$3;
13705
13788
  } else {
13706
- const _Some = _bind;
13789
+ const _Some = _bind$2;
13707
13790
  const _x = _Some;
13708
13791
  if (_x.$tag === 6) {
13709
13792
  const _Object$2 = _x;
@@ -13714,33 +13797,33 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
13714
13797
  }
13715
13798
  break _L$2;
13716
13799
  }
13717
- return new Result$Err$38$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "entries is not an object"));
13800
+ return new Result$Err$39$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "entries is not an object"));
13718
13801
  }
13719
13802
  const _foreach_result = { val: $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$40$ };
13720
- const _bind = moonbitlang$core$builtin$$Map$iter2$56$(entries);
13721
- _bind((raw_key, raw_value_json) => {
13803
+ const _bind$2 = moonbitlang$core$builtin$$Map$iter2$56$(entries);
13804
+ _bind$2((raw_key, raw_value_json) => {
13722
13805
  let _foreach_error;
13723
13806
  _L$3: {
13724
- const _bind$2 = zxch3n$flock$flock$$RawValue$from_json(raw_value_json);
13807
+ const _bind$3 = zxch3n$flock$flock$$RawValue$from_json(raw_value_json);
13725
13808
  let raw_value;
13726
- if (_bind$2 === undefined) {
13809
+ if (_bind$3 === undefined) {
13727
13810
  const _tmp = new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "value is not a raw value");
13728
13811
  _foreach_error = _tmp;
13729
13812
  break _L$3;
13730
13813
  } else {
13731
- const _Some = _bind$2;
13814
+ const _Some = _bind$3;
13732
13815
  raw_value = _Some;
13733
13816
  }
13734
13817
  let key_json;
13735
13818
  let _try_err;
13736
13819
  _L$4: {
13737
13820
  _L$5: {
13738
- const _bind$3 = moonbitlang$core$json$$parse$46$inner({ str: raw_key, start: 0, end: raw_key.length }, 1024);
13739
- if (_bind$3.$tag === 1) {
13740
- const _ok = _bind$3;
13821
+ const _bind$4 = moonbitlang$core$json$$parse$46$inner({ str: raw_key, start: 0, end: raw_key.length }, 1024);
13822
+ if (_bind$4.$tag === 1) {
13823
+ const _ok = _bind$4;
13741
13824
  key_json = _ok._0;
13742
13825
  } else {
13743
- const _err = _bind$3;
13826
+ const _err = _bind$4;
13744
13827
  const _tmp = _err._0;
13745
13828
  _try_err = _tmp;
13746
13829
  break _L$5;
@@ -13764,13 +13847,13 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
13764
13847
  break;
13765
13848
  }
13766
13849
  }
13767
- const _bind$3 = zxch3n$flock$memcomparable$$encode_json_key(key_parts);
13768
- if (_bind$3 === undefined) {
13850
+ const _bind$4 = zxch3n$flock$memcomparable$$encode_json_key(key_parts);
13851
+ if (_bind$4 === undefined) {
13769
13852
  const _tmp$2 = new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "key is not a valid key");
13770
13853
  _foreach_error = _tmp$2;
13771
13854
  break _L$3;
13772
13855
  } else {
13773
- const _Some = _bind$3;
13856
+ const _Some = _bind$4;
13774
13857
  const _encoded_bytes = _Some;
13775
13858
  const encoded_key = _encoded_bytes;
13776
13859
  const entry = zxch3n$flock$flock$$make_entry(encoded_key, raw_value);
@@ -13780,11 +13863,11 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
13780
13863
  } else {
13781
13864
  const _Some$2 = hooks;
13782
13865
  const _preprocess_fn = _Some$2;
13783
- const _bind$4 = _preprocess_fn(entry);
13784
- if (_bind$4.$tag === 0) {
13866
+ const _bind$5 = _preprocess_fn(entry);
13867
+ if (_bind$5.$tag === 0) {
13785
13868
  final_entry = entry;
13786
13869
  } else {
13787
- const _Skip = _bind$4;
13870
+ const _Skip = _bind$5;
13788
13871
  const _reason = _Skip._0;
13789
13872
  moonbitlang$core$array$$Array$push$30$(skipped_entries, { key: moonbitlang$core$array$$Array$copy$13$(key_parts), reason: _reason });
13790
13873
  return 1;
@@ -13798,20 +13881,20 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
13798
13881
  self.max_hlc = clock;
13799
13882
  }
13800
13883
  const peer_id_str = zxch3n$flock$flock$$peer_key_to_string(peer);
13801
- const _bind$4 = moonbitlang$core$builtin$$Map$get$57$(self.vv, peer_id_str);
13802
- if (_bind$4 === undefined) {
13884
+ const _bind$5 = moonbitlang$core$builtin$$Map$get$57$(self.vv, peer_id_str);
13885
+ if (_bind$5 === undefined) {
13803
13886
  moonbitlang$core$builtin$$Map$set$57$(self.vv, peer_id_str, clock);
13804
13887
  } else {
13805
- const _Some$2 = _bind$4;
13888
+ const _Some$2 = _bind$5;
13806
13889
  const _prev_clock = _Some$2;
13807
13890
  if ((_prev_clock.physical_time < clock.physical_time ? -1 : _prev_clock.physical_time > clock.physical_time ? 1 : $compare_int(_prev_clock.logical_counter, clock.logical_counter)) < 0) {
13808
13891
  moonbitlang$core$builtin$$Map$set$57$(self.vv, peer_id_str, clock);
13809
13892
  }
13810
13893
  }
13811
13894
  if (applied) {
13812
- const _bind$5 = events.val;
13813
- if (_bind$5.$tag === 1) {
13814
- const _Some$2 = _bind$5;
13895
+ const _bind$6 = events.val;
13896
+ if (_bind$6.$tag === 1) {
13897
+ const _Some$2 = _bind$6;
13815
13898
  const _events_ = _Some$2._0;
13816
13899
  const event_key = zxch3n$flock$memcomparable$$decode_key_to_json(final_entry.key);
13817
13900
  moonbitlang$core$array$$Array$push$31$(_events_, { _0: event_key, _1: zxch3n$flock$flock$$clone_raw_value(final_entry.value) });
@@ -13840,27 +13923,27 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
13840
13923
  }
13841
13924
  case 2: {
13842
13925
  const _return = _tmp;
13843
- return new Result$Ok$38$(_return._0);
13926
+ return new Result$Ok$39$(_return._0);
13844
13927
  }
13845
13928
  case 3: {
13846
13929
  const _error = _tmp;
13847
- return new Result$Err$38$(_error._0);
13930
+ return new Result$Err$39$(_error._0);
13848
13931
  }
13849
13932
  default: {
13850
13933
  $panic();
13851
13934
  }
13852
13935
  }
13853
- const _bind$2 = events.val;
13854
- if (_bind$2.$tag === 1) {
13855
- const _Some = _bind$2;
13936
+ const _bind$3 = events.val;
13937
+ if (_bind$3.$tag === 1) {
13938
+ const _Some = _bind$3;
13856
13939
  const _events = _Some._0;
13857
13940
  if (_events.length > 0) {
13858
- zxch3n$flock$flock$$SubscriberSet$notify$91$(self.subscribers, { by: zxch3n$flock$flock$$import_json$46$inner$46$constr$47$3759, events: _events });
13941
+ zxch3n$flock$flock$$SubscriberSet$notify$91$(self.subscribers, { by: zxch3n$flock$flock$$import_json$46$inner$46$constr$47$3783, events: _events });
13859
13942
  }
13860
13943
  }
13861
- return new Result$Ok$38$({ accepted: accepted.val, skipped: skipped_entries });
13944
+ return new Result$Ok$39$({ accepted: accepted.val, skipped: skipped_entries });
13862
13945
  } else {
13863
- return new Result$Err$38$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "not an object"));
13946
+ return new Result$Err$39$(new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "not an object"));
13864
13947
  }
13865
13948
  }
13866
13949
  function zxch3n$flock$flock$$Flock$import_json(self, json, hooks$46$opt) {
@@ -13944,11 +14027,11 @@ function zxch3n$flock$flock$$Flock$put_mvr$46$inner(self, key, value, now) {
13944
14027
  }
13945
14028
  case 2: {
13946
14029
  const _return = _tmp;
13947
- return new Result$Ok$33$(_return._0);
14030
+ return new Result$Ok$34$(_return._0);
13948
14031
  }
13949
14032
  case 3: {
13950
14033
  const _error = _tmp;
13951
- return new Result$Err$33$(_error._0);
14034
+ return new Result$Err$34$(_error._0);
13952
14035
  }
13953
14036
  default: {
13954
14037
  $panic();
@@ -13970,12 +14053,12 @@ function zxch3n$flock$flock$$Flock$put_mvr$46$inner(self, key, value, now) {
13970
14053
  }
13971
14054
  break _L;
13972
14055
  }
13973
- return new Result$Err$33$(new Error$zxch3n$47$flock$47$flock$46$PutError$46$InvalidValueForMvr(value));
14056
+ return new Result$Err$34$(new Error$zxch3n$47$flock$47$flock$46$PutError$46$InvalidValueForMvr(value));
13974
14057
  }
13975
14058
  moonbitlang$core$array$$Array$push$13$(key$2, value);
13976
14059
  const _p = true;
13977
14060
  const _tmp$2 = _p ? $64$moonbitlang$47$core$47$builtin$46$Json$True : $64$moonbitlang$47$core$47$builtin$46$Json$False;
13978
- return zxch3n$flock$flock$$Flock$put_inner(self, key$2, _tmp$2, Option$None$34$, now, Option$None$35$);
14061
+ return zxch3n$flock$flock$$Flock$put_inner(self, key$2, _tmp$2, Option$None$35$, now, Option$None$36$, -1);
13979
14062
  }
13980
14063
  function zxch3n$flock$flock$$Flock$get_mvr(self, key) {
13981
14064
  const ans = [];
@@ -14102,7 +14185,7 @@ function zxch3n$flock$flock$$Flock$put_ffi(self, key, value, now) {
14102
14185
  }
14103
14186
  }
14104
14187
  const key_arr$2 = _p;
14105
- const _bind$3 = zxch3n$flock$flock$$Flock$put_inner(self, key_arr$2, value$2, Option$None$34$, new Option$Some$12$(now), Option$None$35$);
14188
+ const _bind$3 = zxch3n$flock$flock$$Flock$put_inner(self, key_arr$2, value$2, Option$None$35$, new Option$Some$12$(now), Option$None$36$, -1);
14106
14189
  if (_bind$3.$tag === 1) {
14107
14190
  const _ok = _bind$3;
14108
14191
  _ok._0;
@@ -14867,7 +14950,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
14867
14950
  now_value = new Option$Some$12$(_tmp$3);
14868
14951
  }
14869
14952
  if (metadata_value === undefined) {
14870
- const _bind$3 = zxch3n$flock$flock$$Flock$put_with_meta(self, key_json, value_json, Option$None$34$, now_value, Option$None$35$);
14953
+ const _bind$3 = zxch3n$flock$flock$$Flock$put_with_meta(self, key_json, value_json, Option$None$35$, now_value, Option$None$36$);
14871
14954
  if (_bind$3.$tag === 1) {
14872
14955
  const _ok = _bind$3;
14873
14956
  _ok._0;
@@ -14881,7 +14964,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
14881
14964
  } else {
14882
14965
  const _Some = metadata_value;
14883
14966
  const _meta = _Some;
14884
- const _bind$3 = zxch3n$flock$flock$$Flock$put_with_meta(self, key_json, value_json, new Option$Some$34$(_meta), now_value, Option$None$35$);
14967
+ const _bind$3 = zxch3n$flock$flock$$Flock$put_with_meta(self, key_json, value_json, new Option$Some$35$(_meta), now_value, Option$None$36$);
14885
14968
  if (_bind$3.$tag === 1) {
14886
14969
  const _ok = _bind$3;
14887
14970
  _ok._0;
@@ -15502,4 +15585,16 @@ function zxch3n$flock$flock$$Flock$subscribe_ffi(self, listener) {
15502
15585
  }
15503
15586
  return $panic();
15504
15587
  }
15505
- export { zxch3n$flock$flock$$Flock$set_peer_id as set_peer_id, zxch3n$flock$flock$$Flock$version as version, zxch3n$flock$flock$$Flock$inclusiveVersion as inclusiveVersion, zxch3n$flock$flock$$Flock$export_json as export_json, zxch3n$flock$flock$$Flock$import_json as import_json, zxch3n$flock$flock$$Flock$merge as merge, zxch3n$flock$flock$$Flock$from_json as from_json, zxch3n$flock$flock$$Flock$newFlock as newFlock, zxch3n$flock$flock$$Flock$put_ffi as put_ffi, zxch3n$flock$flock$$Flock$get_ffi as get_ffi, zxch3n$flock$flock$$Flock$get_entry_ffi as get_entry_ffi, zxch3n$flock$flock$$Flock$export_json_ffi as export_json_ffi, zxch3n$flock$flock$$Flock$import_json_ffi as import_json_ffi, zxch3n$flock$flock$$Flock$import_json_str_ffi as import_json_str_ffi, zxch3n$flock$flock$$Flock$version_ffi as version_ffi, zxch3n$flock$flock$$Flock$inclusiveVersion_ffi as inclusiveVersion_ffi, zxch3n$flock$flock$$check_consistency_ffi as check_consistency_ffi, zxch3n$flock$flock$$Flock$check_invariants_ffi as check_invariants_ffi, zxch3n$flock$flock$$Flock$put_json_ffi as put_json_ffi, zxch3n$flock$flock$$Flock$put_with_meta_ffi as put_with_meta_ffi, zxch3n$flock$flock$$Flock$delete_ffi as delete_ffi, zxch3n$flock$flock$$Flock$get_max_physical_time_ffi as get_max_physical_time_ffi, zxch3n$flock$flock$$Flock$peer_id_ffi as peer_id_ffi, zxch3n$flock$flock$$Flock$kv_to_json_ffi as kv_to_json_ffi, zxch3n$flock$flock$$Flock$digest_hex_ffi as digest_hex_ffi, zxch3n$flock$flock$$Flock$put_mvr_ffi as put_mvr_ffi, zxch3n$flock$flock$$Flock$get_mvr_ffi as get_mvr_ffi, zxch3n$flock$flock$$from_json_ffi as from_json_ffi, zxch3n$flock$flock$$Flock$scan_ffi as scan_ffi, zxch3n$flock$flock$$Flock$subscribe_ffi as subscribe_ffi }
15588
+ function zxch3n$flock$flock$$Flock$txn_begin_ffi(self) {
15589
+ zxch3n$flock$flock$$Flock$txn_begin(self);
15590
+ }
15591
+ function zxch3n$flock$flock$$Flock$txn_commit_ffi(self) {
15592
+ zxch3n$flock$flock$$Flock$txn_commit(self);
15593
+ }
15594
+ function zxch3n$flock$flock$$Flock$txn_rollback_ffi(self) {
15595
+ zxch3n$flock$flock$$Flock$txn_rollback(self);
15596
+ }
15597
+ function zxch3n$flock$flock$$Flock$is_in_txn_ffi(self) {
15598
+ return zxch3n$flock$flock$$Flock$is_in_txn(self);
15599
+ }
15600
+ export { zxch3n$flock$flock$$Flock$set_peer_id as set_peer_id, zxch3n$flock$flock$$Flock$version as version, zxch3n$flock$flock$$Flock$inclusiveVersion as inclusiveVersion, zxch3n$flock$flock$$Flock$export_json as export_json, zxch3n$flock$flock$$Flock$import_json as import_json, zxch3n$flock$flock$$Flock$merge as merge, zxch3n$flock$flock$$Flock$from_json as from_json, zxch3n$flock$flock$$Flock$newFlock as newFlock, zxch3n$flock$flock$$Flock$put_ffi as put_ffi, zxch3n$flock$flock$$Flock$get_ffi as get_ffi, zxch3n$flock$flock$$Flock$get_entry_ffi as get_entry_ffi, zxch3n$flock$flock$$Flock$export_json_ffi as export_json_ffi, zxch3n$flock$flock$$Flock$import_json_ffi as import_json_ffi, zxch3n$flock$flock$$Flock$import_json_str_ffi as import_json_str_ffi, zxch3n$flock$flock$$Flock$version_ffi as version_ffi, zxch3n$flock$flock$$Flock$inclusiveVersion_ffi as inclusiveVersion_ffi, zxch3n$flock$flock$$check_consistency_ffi as check_consistency_ffi, zxch3n$flock$flock$$Flock$check_invariants_ffi as check_invariants_ffi, zxch3n$flock$flock$$Flock$put_json_ffi as put_json_ffi, zxch3n$flock$flock$$Flock$put_with_meta_ffi as put_with_meta_ffi, zxch3n$flock$flock$$Flock$delete_ffi as delete_ffi, zxch3n$flock$flock$$Flock$get_max_physical_time_ffi as get_max_physical_time_ffi, zxch3n$flock$flock$$Flock$peer_id_ffi as peer_id_ffi, zxch3n$flock$flock$$Flock$kv_to_json_ffi as kv_to_json_ffi, zxch3n$flock$flock$$Flock$digest_hex_ffi as digest_hex_ffi, zxch3n$flock$flock$$Flock$put_mvr_ffi as put_mvr_ffi, zxch3n$flock$flock$$Flock$get_mvr_ffi as get_mvr_ffi, zxch3n$flock$flock$$from_json_ffi as from_json_ffi, zxch3n$flock$flock$$Flock$scan_ffi as scan_ffi, zxch3n$flock$flock$$Flock$subscribe_ffi as subscribe_ffi, zxch3n$flock$flock$$Flock$txn_begin_ffi as txn_begin_ffi, zxch3n$flock$flock$$Flock$txn_commit_ffi as txn_commit_ffi, zxch3n$flock$flock$$Flock$txn_rollback_ffi as txn_rollback_ffi, zxch3n$flock$flock$$Flock$is_in_txn_ffi as is_in_txn_ffi }