mol_wire_lib 1.0.1450 → 1.0.1452

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.
package/web.mjs CHANGED
@@ -100,7 +100,7 @@ var $;
100
100
  emit(quant = $mol_wire_cursor.stale) {
101
101
  for (let i = this.sub_from; i < this.data.length; i += 2) {
102
102
  ;
103
- this.data[i].absorb(quant);
103
+ this.data[i].absorb(quant, this.data[i + 1]);
104
104
  }
105
105
  }
106
106
  peer_move(from_pos, to_pos) {
@@ -351,13 +351,24 @@ var $;
351
351
  pub?.complete();
352
352
  }
353
353
  }
354
- absorb(quant = $mol_wire_cursor.stale) {
354
+ absorb(quant = $mol_wire_cursor.stale, pos = -1) {
355
355
  if (this.cursor === $mol_wire_cursor.final)
356
356
  return;
357
357
  if (this.cursor >= quant)
358
358
  return;
359
359
  this.cursor = quant;
360
360
  this.emit($mol_wire_cursor.doubt);
361
+ if (pos >= 0 && pos < this.sub_from - 2) {
362
+ const pub = this.data[pos];
363
+ if (pub instanceof $mol_wire_task)
364
+ return;
365
+ for (let cursor = this.pub_from; cursor < this.sub_from; cursor += 2) {
366
+ const pub = this.data[cursor];
367
+ if (pub instanceof $mol_wire_task) {
368
+ pub.destructor();
369
+ }
370
+ }
371
+ }
361
372
  }
362
373
  [$mol_dev_format_head]() {
363
374
  return $mol_dev_format_native(this);
package/web.test.js CHANGED
@@ -1931,8 +1931,6 @@ var $;
1931
1931
  $mol_wire_sync(this).wait();
1932
1932
  return this.value();
1933
1933
  }
1934
- static test() {
1935
- }
1936
1934
  }
1937
1935
  __decorate([
1938
1936
  $mol_wire_solo
@@ -1943,9 +1941,6 @@ var $;
1943
1941
  __decorate([
1944
1942
  $mol_wire_solo
1945
1943
  ], App, "result", null);
1946
- __decorate([
1947
- $mol_wire_method
1948
- ], App, "test", null);
1949
1944
  $mol_assert_equal(App.result(), 1);
1950
1945
  App.resets(null);
1951
1946
  $mol_wire_fiber.sync();