@dxos/echo-pipeline 0.4.6-main.aeca3cc → 0.4.6-main.e47f68d

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.
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_37RERU2L_exports = {};
30
- __export(chunk_37RERU2L_exports, {
29
+ var chunk_YOF3R6KU_exports = {};
30
+ __export(chunk_YOF3R6KU_exports, {
31
31
  AuthExtension: () => AuthExtension,
32
32
  AuthStatus: () => AuthStatus,
33
33
  AutomergeHost: () => AutomergeHost,
@@ -57,7 +57,7 @@ __export(chunk_37RERU2L_exports, {
57
57
  startAfter: () => startAfter,
58
58
  valueEncoding: () => valueEncoding
59
59
  });
60
- module.exports = __toCommonJS(chunk_37RERU2L_exports);
60
+ module.exports = __toCommonJS(chunk_YOF3R6KU_exports);
61
61
  var import_hypercore = require("@dxos/hypercore");
62
62
  var import_protocols = require("@dxos/protocols");
63
63
  var import_invariant = require("@dxos/invariant");
@@ -2059,7 +2059,8 @@ var ControlPipeline = class {
2059
2059
  get pipeline() {
2060
2060
  return this._pipeline;
2061
2061
  }
2062
- setWriteFeed(feed) {
2062
+ async setWriteFeed(feed) {
2063
+ await this._pipeline.addFeed(feed);
2063
2064
  this._pipeline.setWriteFeed(feed);
2064
2065
  }
2065
2066
  async start() {
@@ -2070,7 +2071,7 @@ var ControlPipeline = class {
2070
2071
  tf: snapshot?.timeframe
2071
2072
  }, {
2072
2073
  F: __dxlog_file10,
2073
- L: 110,
2074
+ L: 111,
2074
2075
  S: this,
2075
2076
  C: (f, a) => f(...a)
2076
2077
  });
@@ -2079,7 +2080,7 @@ var ControlPipeline = class {
2079
2080
  }
2080
2081
  (0, import_log10.log)("starting...", void 0, {
2081
2082
  F: __dxlog_file10,
2082
- L: 115,
2083
+ L: 116,
2083
2084
  S: this,
2084
2085
  C: (f, a) => f(...a)
2085
2086
  });
@@ -2089,7 +2090,7 @@ var ControlPipeline = class {
2089
2090
  await this._pipeline.start();
2090
2091
  (0, import_log10.log)("started", void 0, {
2091
2092
  F: __dxlog_file10,
2092
- L: 121,
2093
+ L: 122,
2093
2094
  S: this,
2094
2095
  C: (f, a) => f(...a)
2095
2096
  });
@@ -2106,7 +2107,7 @@ var ControlPipeline = class {
2106
2107
  message
2107
2108
  }, {
2108
2109
  F: __dxlog_file10,
2109
- L: 134,
2110
+ L: 135,
2110
2111
  S: this,
2111
2112
  C: (f, a) => f(...a)
2112
2113
  });
@@ -2128,7 +2129,7 @@ var ControlPipeline = class {
2128
2129
  snapshot
2129
2130
  }, {
2130
2131
  F: __dxlog_file10,
2131
- L: 150,
2132
+ L: 151,
2132
2133
  S: this,
2133
2134
  C: (f, a) => f(...a)
2134
2135
  });
@@ -2143,7 +2144,7 @@ var ControlPipeline = class {
2143
2144
  } catch (err) {
2144
2145
  import_log10.log.catch(err, void 0, {
2145
2146
  F: __dxlog_file10,
2146
- L: 163,
2147
+ L: 164,
2147
2148
  S: this,
2148
2149
  C: (f, a) => f(...a)
2149
2150
  });
@@ -2157,7 +2158,7 @@ var ControlPipeline = class {
2157
2158
  seq: msg.seq
2158
2159
  }, {
2159
2160
  F: __dxlog_file10,
2160
- L: 173,
2161
+ L: 174,
2161
2162
  S: this,
2162
2163
  C: (f, a) => f(...a)
2163
2164
  });
@@ -2172,7 +2173,7 @@ var ControlPipeline = class {
2172
2173
  msg
2173
2174
  }, {
2174
2175
  F: __dxlog_file10,
2175
- L: 182,
2176
+ L: 183,
2176
2177
  S: this,
2177
2178
  C: (f, a) => f(...a)
2178
2179
  });
@@ -2191,7 +2192,7 @@ var ControlPipeline = class {
2191
2192
  async stop() {
2192
2193
  (0, import_log10.log)("stopping...", void 0, {
2193
2194
  F: __dxlog_file10,
2194
- L: 202,
2195
+ L: 203,
2195
2196
  S: this,
2196
2197
  C: (f, a) => f(...a)
2197
2198
  });
@@ -2200,7 +2201,7 @@ var ControlPipeline = class {
2200
2201
  await this._saveTargetTimeframe(this._pipeline.state.timeframe);
2201
2202
  (0, import_log10.log)("stopped", void 0, {
2202
2203
  F: __dxlog_file10,
2203
- L: 206,
2204
+ L: 207,
2204
2205
  S: this,
2205
2206
  C: (f, a) => f(...a)
2206
2207
  });
@@ -2213,7 +2214,7 @@ var ControlPipeline = class {
2213
2214
  } catch (err) {
2214
2215
  (0, import_log10.log)(err, void 0, {
2215
2216
  F: __dxlog_file10,
2216
- L: 215,
2217
+ L: 216,
2217
2218
  S: this,
2218
2219
  C: (f, a) => f(...a)
2219
2220
  });
@@ -2366,7 +2367,7 @@ var Space = class {
2366
2367
  get snapshotManager() {
2367
2368
  return this._snapshotManager;
2368
2369
  }
2369
- setControlFeed(feed) {
2370
+ async setControlFeed(feed) {
2370
2371
  (0, import_invariant9.invariant)(!this._controlFeed, "Control feed already set.", {
2371
2372
  F: __dxlog_file11,
2372
2373
  L: 191,
@@ -2377,10 +2378,10 @@ var Space = class {
2377
2378
  ]
2378
2379
  });
2379
2380
  this._controlFeed = feed;
2380
- this._controlPipeline.setWriteFeed(feed);
2381
+ await this._controlPipeline.setWriteFeed(feed);
2381
2382
  return this;
2382
2383
  }
2383
- setDataFeed(feed) {
2384
+ async setDataFeed(feed) {
2384
2385
  (0, import_invariant9.invariant)(!this._dataFeed, "Data feed already set.", {
2385
2386
  F: __dxlog_file11,
2386
2387
  L: 198,
@@ -2391,6 +2392,7 @@ var Space = class {
2391
2392
  ]
2392
2393
  });
2393
2394
  this._dataFeed = feed;
2395
+ await this._dataPipeline.pipeline?.addFeed(feed);
2394
2396
  this._dataPipeline.pipeline?.setWriteFeed(feed);
2395
2397
  return this;
2396
2398
  }
@@ -2409,7 +2411,7 @@ var Space = class {
2409
2411
  async open(ctx) {
2410
2412
  (0, import_log9.log)("opening...", void 0, {
2411
2413
  F: __dxlog_file11,
2412
- L: 220,
2414
+ L: 221,
2413
2415
  S: this,
2414
2416
  C: (f, a) => f(...a)
2415
2417
  });
@@ -2422,7 +2424,7 @@ var Space = class {
2422
2424
  this._isOpen = true;
2423
2425
  (0, import_log9.log)("opened", void 0, {
2424
2426
  F: __dxlog_file11,
2425
- L: 231,
2427
+ L: 232,
2426
2428
  S: this,
2427
2429
  C: (f, a) => f(...a)
2428
2430
  });
@@ -2432,7 +2434,7 @@ var Space = class {
2432
2434
  key: this._key
2433
2435
  }, {
2434
2436
  F: __dxlog_file11,
2435
- L: 236,
2437
+ L: 237,
2436
2438
  S: this,
2437
2439
  C: (f, a) => f(...a)
2438
2440
  });
@@ -2446,7 +2448,7 @@ var Space = class {
2446
2448
  this._isOpen = false;
2447
2449
  (0, import_log9.log)("closed", void 0, {
2448
2450
  F: __dxlog_file11,
2449
- L: 249,
2451
+ L: 250,
2450
2452
  S: this,
2451
2453
  C: (f, a) => f(...a)
2452
2454
  });
@@ -2454,13 +2456,13 @@ var Space = class {
2454
2456
  async initializeDataPipeline() {
2455
2457
  (0, import_log9.log)("initializeDataPipeline", void 0, {
2456
2458
  F: __dxlog_file11,
2457
- L: 254,
2459
+ L: 255,
2458
2460
  S: this,
2459
2461
  C: (f, a) => f(...a)
2460
2462
  });
2461
2463
  (0, import_invariant9.invariant)(this._isOpen, "Space must be open to initialize data pipeline.", {
2462
2464
  F: __dxlog_file11,
2463
- L: 255,
2465
+ L: 256,
2464
2466
  S: this,
2465
2467
  A: [
2466
2468
  "this._isOpen",
@@ -3284,4 +3286,4 @@ AutomergeHost = _ts_decorate9([
3284
3286
  startAfter,
3285
3287
  valueEncoding
3286
3288
  });
3287
- //# sourceMappingURL=chunk-37RERU2L.cjs.map
3289
+ //# sourceMappingURL=chunk-YOF3R6KU.cjs.map