@objectstack/core 1.0.8 → 1.0.10
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +13 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/kernel.ts +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@objectstack/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Microkernel Core for ObjectStack",
|
|
6
6
|
"type": "module",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"pino": "^10.3.0",
|
|
16
16
|
"pino-pretty": "^13.1.3",
|
|
17
17
|
"zod": "^4.3.6",
|
|
18
|
-
"@objectstack/spec": "1.0.
|
|
18
|
+
"@objectstack/spec": "1.0.10"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"pino": "^8.0.0"
|
package/src/kernel.ts
CHANGED
|
@@ -94,6 +94,9 @@ export class ObjectKernel {
|
|
|
94
94
|
const service = this.pluginLoader.getService(name);
|
|
95
95
|
if (service instanceof Promise) {
|
|
96
96
|
// If we found it in the loader but not in the sync map, it's likely a factory-based service or still loading
|
|
97
|
+
// We must silence any potential rejection from this promise since we are about to throw our own error
|
|
98
|
+
// and abandon the promise. Without this, Node.js will crash with "Unhandled Promise Rejection".
|
|
99
|
+
service.catch(() => {});
|
|
97
100
|
throw new Error(`Service '${name}' is async - use await`);
|
|
98
101
|
}
|
|
99
102
|
return service as T;
|