@rxap/ngx-pub-sub 18.0.3-dev.1 → 18.0.3

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/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [18.0.3](https://gitlab.com/rxap/packages/compare/@rxap/ngx-pub-sub@18.0.3-dev.2...@rxap/ngx-pub-sub@18.0.3) (2024-06-28)
7
+
8
+ **Note:** Version bump only for package @rxap/ngx-pub-sub
9
+
10
+ ## [18.0.3-dev.2](https://gitlab.com/rxap/packages/compare/@rxap/ngx-pub-sub@18.0.3-dev.1...@rxap/ngx-pub-sub@18.0.3-dev.2) (2024-06-26)
11
+
12
+ ### Bug Fixes
13
+
14
+ - auto init the garbage collation ([58f2da8](https://gitlab.com/rxap/packages/commit/58f2da80e4f5a5b9f163fa20847c4dc210fda38b))
15
+
6
16
  ## [18.0.3-dev.1](https://gitlab.com/rxap/packages/compare/@rxap/ngx-pub-sub@18.0.3-dev.0...@rxap/ngx-pub-sub@18.0.3-dev.1) (2024-06-21)
7
17
 
8
18
  **Note:** Version bump only for package @rxap/ngx-pub-sub
@@ -85,6 +85,13 @@
85
85
  <h1>Change Log</h1>
86
86
  <p>All notable changes to this project will be documented in this file.
87
87
  See <a href="https://conventionalcommits.org">Conventional Commits</a> for commit guidelines.</p>
88
+ <h2><a href="https://gitlab.com/rxap/packages/compare/@rxap/ngx-pub-sub@18.0.3-dev.2...@rxap/ngx-pub-sub@18.0.3">18.0.3</a> (2024-06-28)</h2>
89
+ <p><strong>Note:</strong> Version bump only for package @rxap/ngx-pub-sub</p>
90
+ <h2><a href="https://gitlab.com/rxap/packages/compare/@rxap/ngx-pub-sub@18.0.3-dev.1...@rxap/ngx-pub-sub@18.0.3-dev.2">18.0.3-dev.2</a> (2024-06-26)</h2>
91
+ <h3>Bug Fixes</h3>
92
+ <ul>
93
+ <li>auto init the garbage collation (<a href="https://gitlab.com/rxap/packages/commit/58f2da80e4f5a5b9f163fa20847c4dc210fda38b">58f2da8</a>)</li>
94
+ </ul>
88
95
  <h2><a href="https://gitlab.com/rxap/packages/compare/@rxap/ngx-pub-sub@18.0.3-dev.0...@rxap/ngx-pub-sub@18.0.3-dev.1">18.0.3-dev.1</a> (2024-06-21)</h2>
89
96
  <p><strong>Note:</strong> Version bump only for package @rxap/ngx-pub-sub</p>
90
97
  <h2><a href="https://gitlab.com/rxap/packages/compare/@rxap/ngx-pub-sub@18.0.2...@rxap/ngx-pub-sub@18.0.3-dev.0">18.0.3-dev.0</a> (2024-06-20)</h2>
@@ -221,8 +221,8 @@
221
221
 
222
222
  <tr>
223
223
  <td class="col-md-4">
224
- <div class="io-line">Defined in <a href="" data-line="193"
225
- class="link-to-prism">src/lib/pub-sub.service.ts:193</a></div>
224
+ <div class="io-line">Defined in <a href="" data-line="199"
225
+ class="link-to-prism">src/lib/pub-sub.service.ts:199</a></div>
226
226
  </td>
227
227
  </tr>
228
228
 
@@ -325,8 +325,8 @@
325
325
 
326
326
  <tr>
327
327
  <td class="col-md-4">
328
- <div class="io-line">Defined in <a href="" data-line="139"
329
- class="link-to-prism">src/lib/pub-sub.service.ts:139</a></div>
328
+ <div class="io-line">Defined in <a href="" data-line="143"
329
+ class="link-to-prism">src/lib/pub-sub.service.ts:143</a></div>
330
330
  </td>
331
331
  </tr>
332
332
 
@@ -439,8 +439,8 @@
439
439
 
440
440
  <tr>
441
441
  <td class="col-md-4">
442
- <div class="io-line">Defined in <a href="" data-line="73"
443
- class="link-to-prism">src/lib/pub-sub.service.ts:73</a></div>
442
+ <div class="io-line">Defined in <a href="" data-line="77"
443
+ class="link-to-prism">src/lib/pub-sub.service.ts:77</a></div>
444
444
  </td>
445
445
  </tr>
446
446
 
@@ -586,8 +586,8 @@
586
586
 
587
587
  <tr>
588
588
  <td class="col-md-4">
589
- <div class="io-line">Defined in <a href="" data-line="85"
590
- class="link-to-prism">src/lib/pub-sub.service.ts:85</a></div>
589
+ <div class="io-line">Defined in <a href="" data-line="89"
590
+ class="link-to-prism">src/lib/pub-sub.service.ts:89</a></div>
591
591
  </td>
592
592
  </tr>
593
593
 
@@ -625,8 +625,8 @@
625
625
 
626
626
  <tr>
627
627
  <td class="col-md-4">
628
- <div class="io-line">Defined in <a href="" data-line="168"
629
- class="link-to-prism">src/lib/pub-sub.service.ts:168</a></div>
628
+ <div class="io-line">Defined in <a href="" data-line="173"
629
+ class="link-to-prism">src/lib/pub-sub.service.ts:173</a></div>
630
630
  </td>
631
631
  </tr>
632
632
 
@@ -724,8 +724,8 @@
724
724
 
725
725
  <tr>
726
726
  <td class="col-md-4">
727
- <div class="io-line">Defined in <a href="" data-line="101"
728
- class="link-to-prism">src/lib/pub-sub.service.ts:101</a></div>
727
+ <div class="io-line">Defined in <a href="" data-line="105"
728
+ class="link-to-prism">src/lib/pub-sub.service.ts:105</a></div>
729
729
  </td>
730
730
  </tr>
731
731
 
@@ -887,6 +887,10 @@ export class PubSubService implements OnDestroy {
887
887
 
888
888
  public startGarbageCollector() {
889
889
  this.garbageCollectorInitialized &#x3D; true;
890
+ if (this.garbageCollectorInitialized) {
891
+ console.warn(&#x27;Garbage collector is already initialized&#x27;);
892
+ return;
893
+ }
890
894
  if (this.disableGarbageCollector || this.disableCache) {
891
895
  console.warn(&#x27;Garbage collector is disabled&#x27;);
892
896
  return;
@@ -969,8 +973,9 @@ export class PubSubService implements OnDestroy {
969
973
  public publish&lt;T &#x3D; unknown&gt;(topic: string, data?: T, retention?: number): void {
970
974
 
971
975
  if (!this.garbageCollectorInitialized) {
972
- throw new Error(
976
+ console.error(
973
977
  &#x27;Garbage collector is not initialized. Ensure the ProvidePubSub function is called in the app config object&#x27;);
978
+ this.startGarbageCollector();
974
979
  }
975
980
 
976
981
  if (!topic.trim().length) {
@@ -1002,8 +1007,9 @@ export class PubSubService implements OnDestroy {
1002
1007
  }
1003
1008
 
1004
1009
  if (!this.garbageCollectorInitialized) {
1005
- throw new Error(
1010
+ console.error(
1006
1011
  &#x27;Garbage collector is not initialized. Ensure the ProvidePubSub function is called in the app config object&#x27;);
1012
+ this.startGarbageCollector();
1007
1013
  }
1008
1014
 
1009
1015
  const fromCache &#x3D; replayCount &amp;&amp; replayCount &gt; 0 ? this.getFromCache&lt;T&gt;(topic, replayCount ?? 0) : [];
@@ -1023,8 +1029,9 @@ export class PubSubService implements OnDestroy {
1023
1029
  public getFromCache&lt;T &#x3D; unknown&gt;(topic: string, limit &#x3D; 0): Array&lt;MessageMetaData&lt;T&gt;&gt; {
1024
1030
 
1025
1031
  if (!this.garbageCollectorInitialized) {
1026
- throw new Error(
1032
+ console.error(
1027
1033
  &#x27;Garbage collector is not initialized. Ensure the ProvidePubSub function is called in the app config object&#x27;);
1034
+ this.startGarbageCollector();
1028
1035
  }
1029
1036
 
1030
1037
  const messages: Array&lt;MessageMetaData&lt;T&gt;&gt; &#x3D; [];