@loro-dev/flock 4.2.0 → 4.4.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,11 +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$872 = ",";
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$$delete$46$inner$46$constr$47$3535 = true;
1006
- const zxch3n$flock$flock$$import_json$46$inner$46$constr$47$3767 = 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");
1007
1007
  (() => {
1008
1008
  Yoorkin$jmop$$ffi_init(Yoorkin$jmop$$convert_thrown_error);
1009
1009
  })();
@@ -12222,7 +12222,7 @@ function zxch3n$flock$flock$$bytes_from_hex(hex) {
12222
12222
  }
12223
12223
  function zxch3n$flock$flock$$validate_peer_key(peer_id) {
12224
12224
  if (peer_id.bytes.length >= 128) {
12225
- 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");
12226
12226
  return;
12227
12227
  } else {
12228
12228
  return;
@@ -12256,7 +12256,7 @@ function zxch3n$flock$flock$$HlcWithPeer$to_string(self) {
12256
12256
  return `${zxch3n$flock$flock$$Hlc$to_string(self.hlc)},${zxch3n$flock$flock$$peer_key_to_string(self.peer)}`;
12257
12257
  }
12258
12258
  function zxch3n$flock$flock$$HlcWithPeer$from_string(s) {
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$872, start: 0, end: zxch3n$flock$flock$$from_string$46$42$bind$124$872.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 }));
12260
12260
  if (parts.length < 3) {
12261
12261
  return undefined;
12262
12262
  }
@@ -12871,7 +12871,7 @@ function zxch3n$flock$flock$$Flock$new(peer_id) {
12871
12871
  const _bind = zxch3n$flock$flock$$peer_id_from_string(peer_id);
12872
12872
  let peer_key;
12873
12873
  if (_bind === undefined) {
12874
- 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");
12875
12875
  } else {
12876
12876
  const _Some = _bind;
12877
12877
  peer_key = _Some;
@@ -12882,13 +12882,14 @@ function zxch3n$flock$flock$$Flock$new(peer_id) {
12882
12882
  const _bind$4 = zxch3n$flock$sorted_map$$SortedMap$new$90$();
12883
12883
  const _bind$5 = zxch3n$flock$flock$$SubscriberSet$new$91$();
12884
12884
  const _bind$6 = undefined;
12885
- 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 };
12886
12887
  }
12887
12888
  function zxch3n$flock$flock$$Flock$set_peer_id(self, peer_id) {
12888
12889
  const _bind = zxch3n$flock$flock$$peer_id_from_string(peer_id);
12889
12890
  let peer_key;
12890
12891
  if (_bind === undefined) {
12891
- 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");
12892
12893
  } else {
12893
12894
  const _Some = _bind;
12894
12895
  peer_key = _Some;
@@ -12930,7 +12931,7 @@ function zxch3n$flock$flock$$Flock$check_invariants(_self) {}
12930
12931
  function zxch3n$flock$flock$$Flock$put_inner$46$inner(self, key, data, metadata, now, hooks, skip_same_value) {
12931
12932
  const _bind = zxch3n$flock$memcomparable$$encode_json_key(key);
12932
12933
  if (_bind === undefined) {
12933
- 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)));
12934
12935
  } else {
12935
12936
  const _Some = _bind;
12936
12937
  const _encoded_key = _Some;
@@ -12939,14 +12940,14 @@ function zxch3n$flock$flock$$Flock$put_inner$46$inner(self, key, data, metadata,
12939
12940
  if (_bind$2 === undefined) {
12940
12941
  if (data === undefined) {
12941
12942
  if (metadata === undefined) {
12942
- return new Result$Ok$33$(undefined);
12943
+ return new Result$Ok$34$(undefined);
12943
12944
  }
12944
12945
  }
12945
12946
  } else {
12946
12947
  const _Some$2 = _bind$2;
12947
12948
  const _existing = _Some$2;
12948
12949
  if (moonbitlang$core$builtin$$Eq$equal$24$(_existing.value.data, data) && moonbitlang$core$builtin$$Eq$equal$64$(_existing.value.metadata, metadata)) {
12949
- return new Result$Ok$33$(undefined);
12950
+ return new Result$Ok$34$(undefined);
12950
12951
  }
12951
12952
  }
12952
12953
  }
@@ -12986,17 +12987,26 @@ function zxch3n$flock$flock$$Flock$put_inner$46$inner(self, key, data, metadata,
12986
12987
  const final_entry = zxch3n$flock$flock$$make_entry(_encoded_key, final_value);
12987
12988
  const applied = zxch3n$flock$flock$$Flock$apply_entry(self, final_entry, true);
12988
12989
  if (!applied) {
12989
- return new Result$Ok$33$(undefined);
12990
+ return new Result$Ok$34$(undefined);
12990
12991
  }
12991
12992
  const final_clock = final_entry.value.clock.hlc;
12992
12993
  self.max_hlc = final_clock;
12993
12994
  moonbitlang$core$builtin$$Map$set$57$(self.vv, zxch3n$flock$flock$$peer_key_to_string(self.peer_id), final_clock);
12994
- 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;
12995
12999
  const event_key = zxch3n$flock$memcomparable$$decode_key_to_json(final_entry.key);
12996
13000
  const event_payload = zxch3n$flock$flock$$clone_raw_value(final_entry.value);
12997
- 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 }));
12998
13002
  } else {
12999
- 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
+ }
13000
13010
  }
13001
13011
  }
13002
13012
  }
@@ -13053,10 +13063,55 @@ function zxch3n$flock$flock$$Flock$put_with_meta(self, key, value, metadata$46$o
13053
13063
  return zxch3n$flock$flock$$Flock$put_with_meta$46$inner(self, key, value, metadata, now, hooks);
13054
13064
  }
13055
13065
  function zxch3n$flock$flock$$Flock$put$46$inner(self, key, value, now) {
13056
- 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$);
13057
13067
  }
13058
13068
  function zxch3n$flock$flock$$Flock$delete$46$inner(self, key, now) {
13059
- return zxch3n$flock$flock$$Flock$put_inner(self, key, undefined, Option$None$34$, now, Option$None$35$, zxch3n$flock$flock$$delete$46$inner$46$constr$47$3535);
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
+ }
13060
13115
  }
13061
13116
  function zxch3n$flock$flock$$Flock$get(self, key) {
13062
13117
  const _bind = zxch3n$flock$memcomparable$$encode_json_key(key);
@@ -13127,9 +13182,9 @@ function zxch3n$flock$flock$$prefix_upper_bound_bytes(bytes) {
13127
13182
  }
13128
13183
  return undefined;
13129
13184
  }
13130
- function zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$435(_env, bytes, inclusive) {
13131
- const lower_inclusive = _env._1;
13132
- 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;
13133
13188
  const _bind = lower_bytes.val;
13134
13189
  if (_bind === undefined) {
13135
13190
  lower_bytes.val = bytes;
@@ -13153,7 +13208,7 @@ function zxch3n$flock$flock$$scan$46$inner$46$apply_lower$124$435(_env, bytes, i
13153
13208
  }
13154
13209
  }
13155
13210
  }
13156
- 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) {
13157
13212
  const upper_bytes = _env._1;
13158
13213
  const upper_inclusive = _env._0;
13159
13214
  const _bind = upper_bytes.val;
@@ -13210,7 +13265,7 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
13210
13265
  } else {
13211
13266
  const _Some = _bind;
13212
13267
  const _encoded_start = _Some;
13213
- 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);
13214
13269
  }
13215
13270
  break;
13216
13271
  }
@@ -13223,12 +13278,12 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
13223
13278
  } else {
13224
13279
  const _Some = _bind$2;
13225
13280
  const _encoded_start = _Some;
13226
- 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);
13227
13282
  }
13228
13283
  break;
13229
13284
  }
13230
13285
  default: {
13231
- 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$;
13232
13287
  }
13233
13288
  }
13234
13289
  let end_bound_bytes;
@@ -13242,7 +13297,7 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
13242
13297
  } else {
13243
13298
  const _Some = _bind$3;
13244
13299
  const _encoded_end = _Some;
13245
- 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);
13246
13301
  }
13247
13302
  break;
13248
13303
  }
@@ -13255,35 +13310,35 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
13255
13310
  } else {
13256
13311
  const _Some = _bind$4;
13257
13312
  const _encoded_end = _Some;
13258
- 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);
13259
13314
  }
13260
13315
  break;
13261
13316
  }
13262
13317
  default: {
13263
- 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$;
13264
13319
  }
13265
13320
  }
13266
13321
  const lower_bytes = { val: undefined };
13267
13322
  const lower_inclusive = { val: true };
13268
- const _env = { _0: lower_bytes, _1: lower_inclusive };
13323
+ const _env = { _0: lower_inclusive, _1: lower_bytes };
13269
13324
  const _bind$5 = prefix_bytes;
13270
13325
  if (_bind$5 === undefined) {
13271
13326
  } else {
13272
13327
  const _Some = _bind$5;
13273
13328
  const _prefix_key = _Some;
13274
- 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);
13275
13330
  }
13276
13331
  switch (start_bound_bytes.$tag) {
13277
13332
  case 0: {
13278
13333
  const _Inclusive$3 = start_bound_bytes;
13279
13334
  const _start_key = _Inclusive$3._0;
13280
- 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);
13281
13336
  break;
13282
13337
  }
13283
13338
  case 1: {
13284
13339
  const _Exclusive$3 = start_bound_bytes;
13285
13340
  const _start_key$2 = _Exclusive$3._0;
13286
- 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);
13287
13342
  break;
13288
13343
  }
13289
13344
  }
@@ -13304,19 +13359,19 @@ function zxch3n$flock$flock$$Flock$scan$46$inner(self, start, end, prefix) {
13304
13359
  } else {
13305
13360
  const _Some = _bind$7;
13306
13361
  const _prefix_upper = _Some;
13307
- 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);
13308
13363
  }
13309
13364
  switch (end_bound_bytes.$tag) {
13310
13365
  case 0: {
13311
13366
  const _Inclusive$4 = end_bound_bytes;
13312
13367
  const _end_key = _Inclusive$4._0;
13313
- 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);
13314
13369
  break;
13315
13370
  }
13316
13371
  case 1: {
13317
13372
  const _Exclusive$4 = end_bound_bytes;
13318
13373
  const _end_key$2 = _Exclusive$4._0;
13319
- 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);
13320
13375
  break;
13321
13376
  }
13322
13377
  }
@@ -13551,7 +13606,7 @@ function zxch3n$flock$flock$$Flock$export_json$46$inner(self, from, prune_tombst
13551
13606
  const _Some = from;
13552
13607
  const _f = _Some;
13553
13608
  if (!(_f.size === 0)) {
13554
- 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$;
13555
13610
  const _bind = moonbitlang$core$builtin$$Map$iter2$57$(self.vv);
13556
13611
  _bind((peer, clock) => {
13557
13612
  const _p$3 = moonbitlang$core$builtin$$Map$get$57$(_f, peer);
@@ -13679,17 +13734,27 @@ function zxch3n$flock$flock$$Flock$export_json(self, from, prune_tombstones_befo
13679
13734
  return zxch3n$flock$flock$$Flock$export_json$46$inner(self, from, prune_tombstones_before, peer_id);
13680
13735
  }
13681
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
+ }
13682
13747
  if (json.$tag === 6) {
13683
13748
  const _Object = json;
13684
13749
  const _map = _Object._0;
13685
13750
  let version;
13686
13751
  _L: {
13687
13752
  _L$2: {
13688
- const _bind = moonbitlang$core$builtin$$Map$get$56$(_map, "version");
13689
- if (_bind === undefined) {
13690
- 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"));
13691
13756
  } else {
13692
- const _Some = _bind;
13757
+ const _Some = _bind$2;
13693
13758
  const _x = _Some;
13694
13759
  if (_x.$tag === 3) {
13695
13760
  const _Number = _x;
@@ -13706,22 +13771,22 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
13706
13771
  }
13707
13772
  break _L;
13708
13773
  }
13709
- 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)}`));
13710
13775
  }
13711
- const events = { val: Option$None$39$ };
13776
+ const events = { val: Option$None$33$ };
13712
13777
  if (!zxch3n$flock$flock$$SubscriberSet$is_empty$91$(self.subscribers)) {
13713
- 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));
13714
13779
  }
13715
13780
  const skipped_entries = moonbitlang$core$array$$Array$new$46$inner$30$(0);
13716
13781
  const accepted = { val: 0 };
13717
13782
  let entries;
13718
13783
  _L$2: {
13719
13784
  _L$3: {
13720
- const _bind = moonbitlang$core$builtin$$Map$get$56$(_map, "entries");
13721
- if (_bind === undefined) {
13785
+ const _bind$2 = moonbitlang$core$builtin$$Map$get$56$(_map, "entries");
13786
+ if (_bind$2 === undefined) {
13722
13787
  break _L$3;
13723
13788
  } else {
13724
- const _Some = _bind;
13789
+ const _Some = _bind$2;
13725
13790
  const _x = _Some;
13726
13791
  if (_x.$tag === 6) {
13727
13792
  const _Object$2 = _x;
@@ -13732,33 +13797,33 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
13732
13797
  }
13733
13798
  break _L$2;
13734
13799
  }
13735
- 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"));
13736
13801
  }
13737
13802
  const _foreach_result = { val: $64$moonbitlang$47$core$47$builtin$46$ForeachResult$Continue$40$ };
13738
- const _bind = moonbitlang$core$builtin$$Map$iter2$56$(entries);
13739
- _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) => {
13740
13805
  let _foreach_error;
13741
13806
  _L$3: {
13742
- 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);
13743
13808
  let raw_value;
13744
- if (_bind$2 === undefined) {
13809
+ if (_bind$3 === undefined) {
13745
13810
  const _tmp = new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "value is not a raw value");
13746
13811
  _foreach_error = _tmp;
13747
13812
  break _L$3;
13748
13813
  } else {
13749
- const _Some = _bind$2;
13814
+ const _Some = _bind$3;
13750
13815
  raw_value = _Some;
13751
13816
  }
13752
13817
  let key_json;
13753
13818
  let _try_err;
13754
13819
  _L$4: {
13755
13820
  _L$5: {
13756
- const _bind$3 = moonbitlang$core$json$$parse$46$inner({ str: raw_key, start: 0, end: raw_key.length }, 1024);
13757
- if (_bind$3.$tag === 1) {
13758
- 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;
13759
13824
  key_json = _ok._0;
13760
13825
  } else {
13761
- const _err = _bind$3;
13826
+ const _err = _bind$4;
13762
13827
  const _tmp = _err._0;
13763
13828
  _try_err = _tmp;
13764
13829
  break _L$5;
@@ -13782,13 +13847,13 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
13782
13847
  break;
13783
13848
  }
13784
13849
  }
13785
- const _bind$3 = zxch3n$flock$memcomparable$$encode_json_key(key_parts);
13786
- if (_bind$3 === undefined) {
13850
+ const _bind$4 = zxch3n$flock$memcomparable$$encode_json_key(key_parts);
13851
+ if (_bind$4 === undefined) {
13787
13852
  const _tmp$2 = new Error$zxch3n$47$flock$47$flock$46$ImportError$46$InvalidJson(json, "key is not a valid key");
13788
13853
  _foreach_error = _tmp$2;
13789
13854
  break _L$3;
13790
13855
  } else {
13791
- const _Some = _bind$3;
13856
+ const _Some = _bind$4;
13792
13857
  const _encoded_bytes = _Some;
13793
13858
  const encoded_key = _encoded_bytes;
13794
13859
  const entry = zxch3n$flock$flock$$make_entry(encoded_key, raw_value);
@@ -13798,11 +13863,11 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
13798
13863
  } else {
13799
13864
  const _Some$2 = hooks;
13800
13865
  const _preprocess_fn = _Some$2;
13801
- const _bind$4 = _preprocess_fn(entry);
13802
- if (_bind$4.$tag === 0) {
13866
+ const _bind$5 = _preprocess_fn(entry);
13867
+ if (_bind$5.$tag === 0) {
13803
13868
  final_entry = entry;
13804
13869
  } else {
13805
- const _Skip = _bind$4;
13870
+ const _Skip = _bind$5;
13806
13871
  const _reason = _Skip._0;
13807
13872
  moonbitlang$core$array$$Array$push$30$(skipped_entries, { key: moonbitlang$core$array$$Array$copy$13$(key_parts), reason: _reason });
13808
13873
  return 1;
@@ -13816,20 +13881,20 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
13816
13881
  self.max_hlc = clock;
13817
13882
  }
13818
13883
  const peer_id_str = zxch3n$flock$flock$$peer_key_to_string(peer);
13819
- const _bind$4 = moonbitlang$core$builtin$$Map$get$57$(self.vv, peer_id_str);
13820
- if (_bind$4 === undefined) {
13884
+ const _bind$5 = moonbitlang$core$builtin$$Map$get$57$(self.vv, peer_id_str);
13885
+ if (_bind$5 === undefined) {
13821
13886
  moonbitlang$core$builtin$$Map$set$57$(self.vv, peer_id_str, clock);
13822
13887
  } else {
13823
- const _Some$2 = _bind$4;
13888
+ const _Some$2 = _bind$5;
13824
13889
  const _prev_clock = _Some$2;
13825
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) {
13826
13891
  moonbitlang$core$builtin$$Map$set$57$(self.vv, peer_id_str, clock);
13827
13892
  }
13828
13893
  }
13829
13894
  if (applied) {
13830
- const _bind$5 = events.val;
13831
- if (_bind$5.$tag === 1) {
13832
- const _Some$2 = _bind$5;
13895
+ const _bind$6 = events.val;
13896
+ if (_bind$6.$tag === 1) {
13897
+ const _Some$2 = _bind$6;
13833
13898
  const _events_ = _Some$2._0;
13834
13899
  const event_key = zxch3n$flock$memcomparable$$decode_key_to_json(final_entry.key);
13835
13900
  moonbitlang$core$array$$Array$push$31$(_events_, { _0: event_key, _1: zxch3n$flock$flock$$clone_raw_value(final_entry.value) });
@@ -13858,27 +13923,27 @@ function zxch3n$flock$flock$$Flock$import_json$46$inner(self, json, hooks) {
13858
13923
  }
13859
13924
  case 2: {
13860
13925
  const _return = _tmp;
13861
- return new Result$Ok$38$(_return._0);
13926
+ return new Result$Ok$39$(_return._0);
13862
13927
  }
13863
13928
  case 3: {
13864
13929
  const _error = _tmp;
13865
- return new Result$Err$38$(_error._0);
13930
+ return new Result$Err$39$(_error._0);
13866
13931
  }
13867
13932
  default: {
13868
13933
  $panic();
13869
13934
  }
13870
13935
  }
13871
- const _bind$2 = events.val;
13872
- if (_bind$2.$tag === 1) {
13873
- const _Some = _bind$2;
13936
+ const _bind$3 = events.val;
13937
+ if (_bind$3.$tag === 1) {
13938
+ const _Some = _bind$3;
13874
13939
  const _events = _Some._0;
13875
13940
  if (_events.length > 0) {
13876
- zxch3n$flock$flock$$SubscriberSet$notify$91$(self.subscribers, { by: zxch3n$flock$flock$$import_json$46$inner$46$constr$47$3767, 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 });
13877
13942
  }
13878
13943
  }
13879
- return new Result$Ok$38$({ accepted: accepted.val, skipped: skipped_entries });
13944
+ return new Result$Ok$39$({ accepted: accepted.val, skipped: skipped_entries });
13880
13945
  } else {
13881
- 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"));
13882
13947
  }
13883
13948
  }
13884
13949
  function zxch3n$flock$flock$$Flock$import_json(self, json, hooks$46$opt) {
@@ -13962,11 +14027,11 @@ function zxch3n$flock$flock$$Flock$put_mvr$46$inner(self, key, value, now) {
13962
14027
  }
13963
14028
  case 2: {
13964
14029
  const _return = _tmp;
13965
- return new Result$Ok$33$(_return._0);
14030
+ return new Result$Ok$34$(_return._0);
13966
14031
  }
13967
14032
  case 3: {
13968
14033
  const _error = _tmp;
13969
- return new Result$Err$33$(_error._0);
14034
+ return new Result$Err$34$(_error._0);
13970
14035
  }
13971
14036
  default: {
13972
14037
  $panic();
@@ -13988,12 +14053,12 @@ function zxch3n$flock$flock$$Flock$put_mvr$46$inner(self, key, value, now) {
13988
14053
  }
13989
14054
  break _L;
13990
14055
  }
13991
- 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));
13992
14057
  }
13993
14058
  moonbitlang$core$array$$Array$push$13$(key$2, value);
13994
14059
  const _p = true;
13995
14060
  const _tmp$2 = _p ? $64$moonbitlang$47$core$47$builtin$46$Json$True : $64$moonbitlang$47$core$47$builtin$46$Json$False;
13996
- return zxch3n$flock$flock$$Flock$put_inner(self, key$2, _tmp$2, Option$None$34$, now, Option$None$35$, -1);
14061
+ return zxch3n$flock$flock$$Flock$put_inner(self, key$2, _tmp$2, Option$None$35$, now, Option$None$36$, -1);
13997
14062
  }
13998
14063
  function zxch3n$flock$flock$$Flock$get_mvr(self, key) {
13999
14064
  const ans = [];
@@ -14120,7 +14185,7 @@ function zxch3n$flock$flock$$Flock$put_ffi(self, key, value, now) {
14120
14185
  }
14121
14186
  }
14122
14187
  const key_arr$2 = _p;
14123
- 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$, -1);
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);
14124
14189
  if (_bind$3.$tag === 1) {
14125
14190
  const _ok = _bind$3;
14126
14191
  _ok._0;
@@ -14885,7 +14950,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
14885
14950
  now_value = new Option$Some$12$(_tmp$3);
14886
14951
  }
14887
14952
  if (metadata_value === undefined) {
14888
- 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$);
14889
14954
  if (_bind$3.$tag === 1) {
14890
14955
  const _ok = _bind$3;
14891
14956
  _ok._0;
@@ -14899,7 +14964,7 @@ function zxch3n$flock$flock$$Flock$put_with_meta_ffi(self, key, value, metadata,
14899
14964
  } else {
14900
14965
  const _Some = metadata_value;
14901
14966
  const _meta = _Some;
14902
- 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$);
14903
14968
  if (_bind$3.$tag === 1) {
14904
14969
  const _ok = _bind$3;
14905
14970
  _ok._0;
@@ -15520,4 +15585,16 @@ function zxch3n$flock$flock$$Flock$subscribe_ffi(self, listener) {
15520
15585
  }
15521
15586
  return $panic();
15522
15587
  }
15523
- 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 }