mycelia-kernel-plugin 1.4.1 → 1.5.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mycelia-kernel-plugin",
3
- "version": "1.4.1",
3
+ "version": "1.5.0",
4
4
  "description": "A sophisticated, framework-agnostic plugin system with transaction safety, lifecycle management, and official bindings for React, Vue 3, Svelte, Angular, Qwik, and Solid.js",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -35,3 +35,5 @@ export function createAngularSystemBuilder(name, configure) {
35
35
  }
36
36
 
37
37
 
38
+
39
+
@@ -100,3 +100,5 @@ export function useEventStream(myceliaService, eventName, options = {}) {
100
100
  }
101
101
 
102
102
 
103
+
104
+
@@ -30,3 +30,5 @@ export function createFacetService(kind) {
30
30
  }
31
31
 
32
32
 
33
+
34
+
@@ -510,12 +510,20 @@ export class FacetManager {
510
510
  }
511
511
 
512
512
  clear() {
513
- // Dispose all facets before clearing
513
+ // Dispose all facets before clearing (synchronous best-effort)
514
+ // Note: dispose() is async, but clear() is synchronous
515
+ // For async disposal, use disposeAll() instead
514
516
  for (const [, facets] of this.#facets.entries()) {
515
517
  if (Array.isArray(facets)) {
516
518
  for (const facet of facets) {
517
519
  try {
518
- facet?.dispose?.(this.#subsystem);
520
+ const disposeResult = facet?.dispose?.(this.#subsystem);
521
+ // If dispose returns a promise, catch any errors to prevent unhandled rejections
522
+ if (disposeResult && typeof disposeResult.catch === 'function') {
523
+ disposeResult.catch(() => {
524
+ // Best-effort disposal - errors are expected and handled
525
+ });
526
+ }
519
527
  } catch {
520
528
  // Best-effort disposal
521
529
  }
@@ -523,7 +531,13 @@ export class FacetManager {
523
531
  } else {
524
532
  // Legacy: single facet
525
533
  try {
526
- facets?.dispose?.(this.#subsystem);
534
+ const disposeResult = facets?.dispose?.(this.#subsystem);
535
+ // If dispose returns a promise, catch any errors to prevent unhandled rejections
536
+ if (disposeResult && typeof disposeResult.catch === 'function') {
537
+ disposeResult.catch(() => {
538
+ // Best-effort disposal - errors are expected and handled
539
+ });
540
+ }
527
541
  } catch {
528
542
  // Best-effort disposal
529
543
  }
@@ -37,3 +37,5 @@ export function createQwikSystemBuilder(name, configure) {
37
37
  }
38
38
 
39
39
 
40
+
41
+
@@ -85,3 +85,5 @@ export function useQueueDrain(options = {}) {
85
85
  }
86
86
 
87
87
 
88
+
89
+
@@ -30,3 +30,5 @@ export function createFacetSignal(kind) {
30
30
  }
31
31
 
32
32
 
33
+
34
+
@@ -175,3 +175,5 @@ See the main [README.md](../../README.md) and [examples](../../examples/) direct
175
175
 
176
176
 
177
177
 
178
+
179
+
@@ -67,3 +67,5 @@ function MyComponent() {
67
67
  - **Automatic Cleanup** - Listeners and effects cleaned up automatically
68
68
  - **Solid Signals** - Reactive state with Solid.js signals
69
69
 
70
+
71
+
@@ -247,8 +247,8 @@ class UseBaseBuilder {
247
247
  // Get existing config for this kind (from pending or system if created)
248
248
  let existingConfig;
249
249
  if (this.#system) {
250
- if (!this.#system.ctx.config || typeof this.#system.ctx.config !== 'object') {
251
- this.#system.ctx.config = {};
250
+ if (!this.#system.ctx.config || typeof this.#system.ctx.config !== 'object') {
251
+ this.#system.ctx.config = {};
252
252
  }
253
253
  existingConfig = this.#system.ctx.config[kind];
254
254
  } else {