@objectstack/core 1.0.7 → 1.0.9
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 +12 -0
- package/dist/index.cjs +5 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/plugin-loader.ts +9 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@objectstack/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
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.9"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"pino": "^8.0.0"
|
package/src/plugin-loader.ts
CHANGED
|
@@ -349,10 +349,15 @@ export class PluginLoader {
|
|
|
349
349
|
// Private helper methods
|
|
350
350
|
|
|
351
351
|
private toPluginMetadata(plugin: Plugin): PluginMetadata {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
352
|
+
// Fix: Do not use object spread {...plugin} as it destroys the prototype chain for Class-based plugins.
|
|
353
|
+
// Instead, cast the original object and inject default values if missing.
|
|
354
|
+
const metadata = plugin as PluginMetadata;
|
|
355
|
+
|
|
356
|
+
if (!metadata.version) {
|
|
357
|
+
metadata.version = '0.0.0';
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
return metadata;
|
|
356
361
|
}
|
|
357
362
|
|
|
358
363
|
private validatePluginStructure(plugin: PluginMetadata): void {
|