@dxos/echo-pipeline 0.3.11-main.c95bc86 → 0.3.11-main.cb8120f

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.
@@ -2784,7 +2784,7 @@ var AutomergeHost = class {
2784
2784
  }
2785
2785
  const doc = this._repo.handles[documentId]?.docSync();
2786
2786
  if (!doc) {
2787
- log13.warn("doc not found for share policy check", {
2787
+ log13("doc not found for share policy check", {
2788
2788
  peerId,
2789
2789
  documentId
2790
2790
  }, {
@@ -2796,6 +2796,18 @@ var AutomergeHost = class {
2796
2796
  return false;
2797
2797
  }
2798
2798
  try {
2799
+ if (!doc.experimental_spaceKey) {
2800
+ log13.warn("space key not found for share policy check", {
2801
+ peerId,
2802
+ documentId
2803
+ }, {
2804
+ F: __dxlog_file14,
2805
+ L: 71,
2806
+ S: this,
2807
+ C: (f, a) => f(...a)
2808
+ });
2809
+ return false;
2810
+ }
2799
2811
  const spaceKey = PublicKey8.from(doc.experimental_spaceKey);
2800
2812
  const authorizedDevices = this._authorizedDevices.get(spaceKey);
2801
2813
  const deviceKeyHex = this.repo.peerMetadataByPeerId[peerId]?.dxos_deviceKey;
@@ -2805,7 +2817,7 @@ var AutomergeHost = class {
2805
2817
  documentId
2806
2818
  }, {
2807
2819
  F: __dxlog_file14,
2808
- L: 76,
2820
+ L: 81,
2809
2821
  S: this,
2810
2822
  C: (f, a) => f(...a)
2811
2823
  });
@@ -2821,7 +2833,7 @@ var AutomergeHost = class {
2821
2833
  isAuthorized
2822
2834
  }, {
2823
2835
  F: __dxlog_file14,
2824
- L: 82,
2836
+ L: 87,
2825
2837
  S: this,
2826
2838
  C: (f, a) => f(...a)
2827
2839
  });
@@ -2829,7 +2841,7 @@ var AutomergeHost = class {
2829
2841
  } catch (err) {
2830
2842
  log13.catch(err, void 0, {
2831
2843
  F: __dxlog_file14,
2832
- L: 85,
2844
+ L: 90,
2833
2845
  S: this,
2834
2846
  C: (f, a) => f(...a)
2835
2847
  });
@@ -2891,7 +2903,7 @@ var LocalHostNetworkAdapter = class extends NetworkAdapter {
2891
2903
  const peer = this._peers.get(message.targetId);
2892
2904
  invariant10(peer, "Peer not found.", {
2893
2905
  F: __dxlog_file14,
2894
- L: 165,
2906
+ L: 170,
2895
2907
  S: this,
2896
2908
  A: [
2897
2909
  "peer",
@@ -2911,7 +2923,7 @@ var LocalHostNetworkAdapter = class extends NetworkAdapter {
2911
2923
  return new Stream2(({ next, close }) => {
2912
2924
  invariant10(!this._peers.has(peerId), "Peer already connected.", {
2913
2925
  F: __dxlog_file14,
2914
- L: 183,
2926
+ L: 188,
2915
2927
  S: this,
2916
2928
  A: [
2917
2929
  "!this._peers.has(peerId)",
@@ -2942,7 +2954,7 @@ var LocalHostNetworkAdapter = class extends NetworkAdapter {
2942
2954
  });
2943
2955
  }).catch((err) => log13.catch(err, void 0, {
2944
2956
  F: __dxlog_file14,
2945
- L: 208,
2957
+ L: 213,
2946
2958
  S: this,
2947
2959
  C: (f, a) => f(...a)
2948
2960
  }));
@@ -2961,7 +2973,7 @@ var LocalHostNetworkAdapter = class extends NetworkAdapter {
2961
2973
  });
2962
2974
  invariant10(this.peerId, "Peer id not set.", {
2963
2975
  F: __dxlog_file14,
2964
- L: 220,
2976
+ L: 225,
2965
2977
  S: this,
2966
2978
  A: [
2967
2979
  "this.peerId",
@@ -2997,7 +3009,7 @@ var MeshNetworkAdapter = class extends NetworkAdapter {
2997
3009
  const extension = this._extensions.get(receiverId);
2998
3010
  invariant10(extension, "Extension not found.", {
2999
3011
  F: __dxlog_file14,
3000
- L: 255,
3012
+ L: 260,
3001
3013
  S: this,
3002
3014
  A: [
3003
3015
  "extension",
@@ -3008,7 +3020,7 @@ var MeshNetworkAdapter = class extends NetworkAdapter {
3008
3020
  payload: cbor.encode(message)
3009
3021
  }).catch((err) => log13.catch(err, void 0, {
3010
3022
  F: __dxlog_file14,
3011
- L: 256,
3023
+ L: 261,
3012
3024
  S: this,
3013
3025
  C: (f, a) => f(...a)
3014
3026
  }));
@@ -3018,7 +3030,7 @@ var MeshNetworkAdapter = class extends NetworkAdapter {
3018
3030
  createExtension() {
3019
3031
  invariant10(this.peerId, "Peer id not set.", {
3020
3032
  F: __dxlog_file14,
3021
- L: 264,
3033
+ L: 269,
3022
3034
  S: this,
3023
3035
  A: [
3024
3036
  "this.peerId",
@@ -3162,4 +3174,4 @@ export {
3162
3174
  SpaceManager,
3163
3175
  AutomergeHost
3164
3176
  };
3165
- //# sourceMappingURL=chunk-JBCUDOBI.mjs.map
3177
+ //# sourceMappingURL=chunk-PB5T4DLC.mjs.map