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 +1 -1
- package/src/angular/builders.js +2 -0
- package/src/angular/helpers.js +2 -0
- package/src/angular/services.js +2 -0
- package/src/manager/facet-manager.js +17 -3
- package/src/qwik/builders.js +2 -0
- package/src/qwik/queues.js +2 -0
- package/src/qwik/signals.js +2 -0
- package/src/react/README.md +2 -0
- package/src/solid/README.md +2 -0
- package/src/utils/use-base.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mycelia-kernel-plugin",
|
|
3
|
-
"version": "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",
|
package/src/angular/builders.js
CHANGED
package/src/angular/helpers.js
CHANGED
package/src/angular/services.js
CHANGED
|
@@ -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
|
}
|
package/src/qwik/builders.js
CHANGED
package/src/qwik/queues.js
CHANGED
package/src/qwik/signals.js
CHANGED
package/src/react/README.md
CHANGED
package/src/solid/README.md
CHANGED
package/src/utils/use-base.js
CHANGED
|
@@ -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
|
-
|
|
251
|
-
|
|
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 {
|