@cosmicdrift/kumiko-framework 0.11.1 → 0.12.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/CHANGELOG.md +12 -0
- package/package.json +2 -2
- package/src/engine/registry.ts +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @cosmicdrift/kumiko-framework
|
|
2
2
|
|
|
3
|
+
## 0.12.0
|
|
4
|
+
|
|
5
|
+
## 0.11.2
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- 92a84f0: `mergeHookListQualified` tolerates undefined hook-slots.
|
|
10
|
+
|
|
11
|
+
`defineFeature` leaves `feature.hooks.preSave`/`postSave`/etc. undefined when no hooks of that type are declared. `createRegistry` called `Object.entries(undefined)` and crashed with `Object.entries requires that input parameter not be null or undefined`.
|
|
12
|
+
|
|
13
|
+
Now `mergeHookListQualified` short-circuits on undefined source. Surfaced in studio's production-bundle boot.
|
|
14
|
+
|
|
3
15
|
## 0.11.1
|
|
4
16
|
|
|
5
17
|
## 0.11.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-framework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Framework core — engine, pipeline, API, DB, and every other bit that makes Kumiko go.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
"zod": "^4.4.3"
|
|
173
173
|
},
|
|
174
174
|
"devDependencies": {
|
|
175
|
-
"@cosmicdrift/kumiko-dispatcher-live": "0.
|
|
175
|
+
"@cosmicdrift/kumiko-dispatcher-live": "0.12.0",
|
|
176
176
|
"@types/uuid": "^11.0.0",
|
|
177
177
|
"bun-types": "^1.3.13",
|
|
178
178
|
"drizzle-kit": "^0.31.10",
|
package/src/engine/registry.ts
CHANGED
|
@@ -285,10 +285,14 @@ export function createRegistry(features: readonly FeatureDefinition[]): Registry
|
|
|
285
285
|
// The hookQnType indicates whether the targeted handler is a write or query handler.
|
|
286
286
|
function mergeHookListQualified<T>(
|
|
287
287
|
map: Map<string, T[]>,
|
|
288
|
-
source: Readonly<Record<string, readonly T[]
|
|
288
|
+
source: Readonly<Record<string, readonly T[]>> | undefined,
|
|
289
289
|
featureName: string,
|
|
290
290
|
hookQnType: QnType,
|
|
291
291
|
): void {
|
|
292
|
+
// skip: optionaler hook-slot — defineFeature lässt das slot undefined
|
|
293
|
+
// wenn das feature keine hooks dieses typs hat. Behandeln wie leeres
|
|
294
|
+
// record statt Object.entries(undefined)-crash.
|
|
295
|
+
if (!source) return;
|
|
292
296
|
for (const [name, fns] of Object.entries(source)) {
|
|
293
297
|
const qualified = qualify(featureName, hookQnType, name);
|
|
294
298
|
const existing = map.get(qualified) ?? [];
|