@cosmicdrift/kumiko-framework 0.56.0 → 0.56.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.56.0",
3
+ "version": "0.56.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>",
@@ -42,4 +42,46 @@ describe("buildManifestFromRegistry — deterministic codepoint sort (#330)", ()
42
42
  "demo:config:z-flag",
43
43
  ]);
44
44
  });
45
+
46
+ test("featureNames filter — nur genannte Features im Manifest", () => {
47
+ const registry = createRegistry([
48
+ defineFeature("alpha", () => {}),
49
+ defineFeature("beta", () => {}),
50
+ defineFeature("gamma", () => {}),
51
+ ]);
52
+
53
+ const manifest = buildManifestFromRegistry(registry, {
54
+ source: "test",
55
+ featureNames: new Set(["alpha", "gamma"]),
56
+ });
57
+
58
+ expect(manifest.features.map((f) => f.name)).toEqual(["alpha", "gamma"]);
59
+ expect(manifest.featureCount).toBe(2);
60
+ });
61
+
62
+ test("tier-Tagging — per-Feature + top-level im Manifest", () => {
63
+ const registry = createRegistry([
64
+ defineFeature("pro", () => {}),
65
+ defineFeature("free", () => {}),
66
+ ]);
67
+
68
+ const manifest = buildManifestFromRegistry(registry, {
69
+ source: "test",
70
+ tier: "enterprise",
71
+ });
72
+
73
+ expect(manifest.tier).toBe("enterprise");
74
+ for (const feature of manifest.features) {
75
+ expect(feature.tier).toBe("enterprise");
76
+ }
77
+ });
78
+
79
+ test("tier: undefined — weder per-Feature noch top-level vorhanden", () => {
80
+ const registry = createRegistry([defineFeature("basic", () => {})]);
81
+
82
+ const manifest = buildManifestFromRegistry(registry, { source: "test" });
83
+
84
+ expect(manifest.tier).toBeUndefined();
85
+ expect(manifest.features[0]?.tier).toBeUndefined();
86
+ });
45
87
  });