@cosmicdrift/kumiko-framework 0.40.0 → 0.40.1
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": "@cosmicdrift/kumiko-framework",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.1",
|
|
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>",
|
|
@@ -1890,6 +1890,56 @@ describe("boot-validator", () => {
|
|
|
1890
1890
|
});
|
|
1891
1891
|
});
|
|
1892
1892
|
|
|
1893
|
+
// --- rowAction payload-Extractor Feld-Referenzen (Tier 2.7e-3) ---
|
|
1894
|
+
// Row-Meta (id, version) ist auf jeder Entity-Row vorhanden ohne ein
|
|
1895
|
+
// Entity-Field zu sein — pick ["id", "version"] ist das Standard-Payload
|
|
1896
|
+
// für optimistic-lock-Lifecycle-Writes und darf den Boot nicht killen
|
|
1897
|
+
// (Prod-Incident publicstatus 2026-06-11: 0.40-Validator lehnte
|
|
1898
|
+
// maintenance-start/cancel/complete ab, CrashLoopBackOff).
|
|
1899
|
+
describe("entityList rowAction payload pick (Tier 2.7e-3)", () => {
|
|
1900
|
+
function makeFeature(pick: readonly string[]) {
|
|
1901
|
+
return defineFeature("shop", (r) => {
|
|
1902
|
+
r.entity("product", createEntity({ fields: { name: createTextField() } }));
|
|
1903
|
+
r.screen({
|
|
1904
|
+
id: "product-list",
|
|
1905
|
+
type: "entityList",
|
|
1906
|
+
entity: "product",
|
|
1907
|
+
columns: ["name"],
|
|
1908
|
+
rowActions: [
|
|
1909
|
+
{
|
|
1910
|
+
id: "archive",
|
|
1911
|
+
label: "actions.archive",
|
|
1912
|
+
handler: "shop:write:archive",
|
|
1913
|
+
payload: { pick: [...pick] },
|
|
1914
|
+
},
|
|
1915
|
+
],
|
|
1916
|
+
});
|
|
1917
|
+
r.writeHandler(
|
|
1918
|
+
"archive",
|
|
1919
|
+
z.object({}),
|
|
1920
|
+
async () => ({ isSuccess: true as const, data: null }),
|
|
1921
|
+
{
|
|
1922
|
+
access: { roles: ["Admin"] },
|
|
1923
|
+
},
|
|
1924
|
+
);
|
|
1925
|
+
});
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1928
|
+
test("pick mit Row-Meta id + version → kein Throw (optimistic-lock-Standard)", () => {
|
|
1929
|
+
expect(() => validateBoot([makeFeature(["id", "version"])])).not.toThrow();
|
|
1930
|
+
});
|
|
1931
|
+
|
|
1932
|
+
test("pick mit Entity-Field → kein Throw", () => {
|
|
1933
|
+
expect(() => validateBoot([makeFeature(["id", "name"])])).not.toThrow();
|
|
1934
|
+
});
|
|
1935
|
+
|
|
1936
|
+
test("pick mit unknown Field → Throw mit klarer Message", () => {
|
|
1937
|
+
expect(() => validateBoot([makeFeature(["id", "ghost"])])).toThrow(
|
|
1938
|
+
/rowAction "archive" payload references unknown field "ghost"/,
|
|
1939
|
+
);
|
|
1940
|
+
});
|
|
1941
|
+
});
|
|
1942
|
+
|
|
1893
1943
|
// --- toolbarAction navigate + writeHandler Validierung (Tier 2.7e-2) ---
|
|
1894
1944
|
describe("entityList toolbarAction navigate (Tier 2.7e-2)", () => {
|
|
1895
1945
|
function makeFeature(targetScreen: string, withTarget: boolean) {
|
|
@@ -48,7 +48,9 @@ function validateActionFieldRefs(
|
|
|
48
48
|
}
|
|
49
49
|
const sources = "pick" in extractor ? extractor.pick : Object.values(extractor.map);
|
|
50
50
|
for (const source of sources) {
|
|
51
|
-
|
|
51
|
+
// Row-Meta ist immer da, ohne Entity-Field zu sein: id (Aggregat-Id)
|
|
52
|
+
// und version (optimistic lock — Standard-pick für Lifecycle-Writes).
|
|
53
|
+
if (source === "id" || source === "version") continue;
|
|
52
54
|
if (!fieldNames.has(source)) {
|
|
53
55
|
throw new Error(
|
|
54
56
|
`[Feature ${featureName}] Screen "${screenId}" ${actionKind} "${actionId}" ` +
|