@dxos/client-services 0.7.4 → 0.7.5-main.499c70c

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.
@@ -397,7 +397,7 @@ import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
397
397
  import { TRACE_PROCESSOR } from "@dxos/tracing";
398
398
 
399
399
  // packages/sdk/client-services/src/version.ts
400
- var DXOS_VERSION = "0.7.4";
400
+ var DXOS_VERSION = "0.7.5-main.499c70c";
401
401
 
402
402
  // packages/sdk/client-services/src/packlets/services/platform.ts
403
403
  import { Platform } from "@dxos/protocols/proto/dxos/client/services";
@@ -1036,21 +1036,20 @@ var EdgeFeedReplicator = class extends Resource {
1036
1036
  });
1037
1037
  return;
1038
1038
  }
1039
- const logPayload = message.type === "data" ? {
1040
- feedKey: message.feedKey,
1041
- blocks: message.blocks.map((b) => b.index)
1042
- } : {
1043
- message
1044
- };
1045
- log4.info("sending message", logPayload, {
1046
- F: __dxlog_file6,
1047
- L: 152,
1048
- S: this,
1049
- C: (f, a) => f(...a)
1050
- });
1039
+ if (message.type === "data") {
1040
+ log4.info("sending blocks", {
1041
+ feedKey: message.feedKey,
1042
+ blocks: message.blocks.map((b) => b.index)
1043
+ }, {
1044
+ F: __dxlog_file6,
1045
+ L: 151,
1046
+ S: this,
1047
+ C: (f, a) => f(...a)
1048
+ });
1049
+ }
1051
1050
  invariant2(message.feedKey, void 0, {
1052
1051
  F: __dxlog_file6,
1053
- L: 154,
1052
+ L: 157,
1054
1053
  S: this,
1055
1054
  A: [
1056
1055
  "message.feedKey",
@@ -1062,7 +1061,7 @@ var EdgeFeedReplicator = class extends Resource {
1062
1061
  type: message.type
1063
1062
  }, {
1064
1063
  F: __dxlog_file6,
1065
- L: 157,
1064
+ L: 160,
1066
1065
  S: this,
1067
1066
  C: (f, a) => f(...a)
1068
1067
  });
@@ -1081,7 +1080,7 @@ var EdgeFeedReplicator = class extends Resource {
1081
1080
  if (!this._connectionCtx) {
1082
1081
  log4.warn("received message after connection context was disposed", void 0, {
1083
1082
  F: __dxlog_file6,
1084
- L: 172,
1083
+ L: 175,
1085
1084
  S: this,
1086
1085
  C: (f, a) => f(...a)
1087
1086
  });
@@ -1092,14 +1091,6 @@ var EdgeFeedReplicator = class extends Resource {
1092
1091
  case "metadata": {
1093
1092
  try {
1094
1093
  var _usingCtx = _using_ctx();
1095
- log4.info("received metadata", {
1096
- message
1097
- }, {
1098
- F: __dxlog_file6,
1099
- L: 178,
1100
- S: this,
1101
- C: (f, a) => f(...a)
1102
- });
1103
1094
  const feedKey = PublicKey3.fromHex(message.feedKey);
1104
1095
  const feed = this._feeds.get(feedKey);
1105
1096
  if (!feed) {
@@ -1107,7 +1098,7 @@ var EdgeFeedReplicator = class extends Resource {
1107
1098
  feedKey
1108
1099
  }, {
1109
1100
  F: __dxlog_file6,
1110
- L: 183,
1101
+ L: 184,
1111
1102
  S: this,
1112
1103
  C: (f, a) => f(...a)
1113
1104
  });
@@ -1115,7 +1106,18 @@ var EdgeFeedReplicator = class extends Resource {
1115
1106
  }
1116
1107
  const _guard = _usingCtx.u(await this._getPushMutex(feed.key).acquire());
1117
1108
  this._remoteLength.set(feedKey, message.length);
1109
+ const logMeta = {
1110
+ localLength: feed.length,
1111
+ remoteLength: message.length,
1112
+ feedKey
1113
+ };
1118
1114
  if (message.length > feed.length) {
1115
+ log4.info("requesting missing blocks", logMeta, {
1116
+ F: __dxlog_file6,
1117
+ L: 194,
1118
+ S: this,
1119
+ C: (f, a) => f(...a)
1120
+ });
1119
1121
  await this._sendMessage({
1120
1122
  type: "request",
1121
1123
  feedKey: feedKey.toHex(),
@@ -1125,6 +1127,12 @@ var EdgeFeedReplicator = class extends Resource {
1125
1127
  }
1126
1128
  });
1127
1129
  } else if (message.length < feed.length) {
1130
+ log4.info("pushing blocks to remote", logMeta, {
1131
+ F: __dxlog_file6,
1132
+ L: 202,
1133
+ S: this,
1134
+ C: (f, a) => f(...a)
1135
+ });
1128
1136
  await this._pushBlocks(feed, message.length, feed.length);
1129
1137
  }
1130
1138
  break;
@@ -1140,7 +1148,7 @@ var EdgeFeedReplicator = class extends Resource {
1140
1148
  blocks: message.blocks.map((b) => b.index)
1141
1149
  }, {
1142
1150
  F: __dxlog_file6,
1143
- L: 205,
1151
+ L: 211,
1144
1152
  S: this,
1145
1153
  C: (f, a) => f(...a)
1146
1154
  });
@@ -1151,7 +1159,7 @@ var EdgeFeedReplicator = class extends Resource {
1151
1159
  feedKey
1152
1160
  }, {
1153
1161
  F: __dxlog_file6,
1154
- L: 210,
1162
+ L: 216,
1155
1163
  S: this,
1156
1164
  C: (f, a) => f(...a)
1157
1165
  });
@@ -1165,7 +1173,7 @@ var EdgeFeedReplicator = class extends Resource {
1165
1173
  ...message
1166
1174
  }, {
1167
1175
  F: __dxlog_file6,
1168
- L: 219,
1176
+ L: 225,
1169
1177
  S: this,
1170
1178
  C: (f, a) => f(...a)
1171
1179
  });
@@ -1180,7 +1188,7 @@ var EdgeFeedReplicator = class extends Resource {
1180
1188
  to
1181
1189
  }, {
1182
1190
  F: __dxlog_file6,
1183
- L: 226,
1191
+ L: 232,
1184
1192
  S: this,
1185
1193
  C: (f, a) => f(...a)
1186
1194
  });
@@ -1190,7 +1198,7 @@ var EdgeFeedReplicator = class extends Resource {
1190
1198
  });
1191
1199
  invariant2(data instanceof Uint8Array, void 0, {
1192
1200
  F: __dxlog_file6,
1193
- L: 231,
1201
+ L: 237,
1194
1202
  S: this,
1195
1203
  A: [
1196
1204
  "data instanceof Uint8Array",
@@ -1218,7 +1226,7 @@ var EdgeFeedReplicator = class extends Resource {
1218
1226
  blocks: blocks.length
1219
1227
  }, {
1220
1228
  F: __dxlog_file6,
1221
- L: 252,
1229
+ L: 258,
1222
1230
  S: this,
1223
1231
  C: (f, a) => f(...a)
1224
1232
  });
@@ -1240,7 +1248,7 @@ var EdgeFeedReplicator = class extends Resource {
1240
1248
  if (!this._remoteLength.has(feed.key)) {
1241
1249
  log4("blocks not pushed because remote length is unknown", void 0, {
1242
1250
  F: __dxlog_file6,
1243
- L: 273,
1251
+ L: 279,
1244
1252
  S: this,
1245
1253
  C: (f, a) => f(...a)
1246
1254
  });
@@ -1265,7 +1273,7 @@ var EdgeFeedReplicator = class extends Resource {
1265
1273
  if (err instanceof EdgeIdentityChangedError || err instanceof EdgeConnectionClosedError) {
1266
1274
  log4("resetting on reconnect", void 0, {
1267
1275
  F: __dxlog_file6,
1268
- L: 290,
1276
+ L: 296,
1269
1277
  S: this,
1270
1278
  C: (f, a) => f(...a)
1271
1279
  });
@@ -1276,7 +1284,7 @@ var EdgeFeedReplicator = class extends Resource {
1276
1284
  }
1277
1285
  }, {
1278
1286
  F: __dxlog_file6,
1279
- L: 284
1287
+ L: 290
1280
1288
  });
1281
1289
  return connectionCtx;
1282
1290
  }
@@ -7891,7 +7899,7 @@ var ServiceContext = class extends Resource7 {
7891
7899
  let edgeIdentity;
7892
7900
  const identity = this.identityManager.identity;
7893
7901
  if (identity) {
7894
- log24.info("Setting identity on edge connection", {
7902
+ log24("setting identity on edge connection", {
7895
7903
  identity: identity.identityKey.toHex(),
7896
7904
  swarms: this.networkManager.topics
7897
7905
  }, {
@@ -7910,7 +7918,7 @@ var ServiceContext = class extends Resource7 {
7910
7918
  });
7911
7919
  invariant20(identity.deviceCredentialChain, void 0, {
7912
7920
  F: __dxlog_file28,
7913
- L: 401,
7921
+ L: 402,
7914
7922
  S: this,
7915
7923
  A: [
7916
7924
  "identity.deviceCredentialChain",
@@ -9053,4 +9061,4 @@ export {
9053
9061
  importProfileData,
9054
9062
  ClientServicesHost
9055
9063
  };
9056
- //# sourceMappingURL=chunk-423GRVVV.mjs.map
9064
+ //# sourceMappingURL=chunk-BXVZXTZM.mjs.map