refactor: split bloated state types into State + Actions interfaces (issue #102)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s
- CombatState: split into CombatState (data) + CombatActions + CombatStore - PrestigeState: split into PrestigeState (data) + PrestigeActions + PrestigeStore - ManaState: split into ManaState (data) + ManaActions + ManaStore - GameState: deprecated, removed from barrel exports - crafting-actions: updated to use CraftingState instead of GameState - combat-utils/mana-utils: replaced Pick<GameState,...> with focused interfaces - DisciplineCardProps: split into Definition + Runtime + Callbacks - stores/index.ts: now exports both State and Actions types
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
# Circular Dependencies
|
||||
Generated: 2026-05-20T16:38:29.616Z
|
||||
Found: 3 circular chain(s) — these MUST be fixed before modifying involved files.
|
||||
Generated: 2026-05-20T17:48:45.265Z
|
||||
Found: 4 circular chain(s) — these MUST be fixed before modifying involved files.
|
||||
|
||||
1. Processed 125 files (1.4s) (3 warnings)
|
||||
1. Processed 126 files (1.4s) (3 warnings)
|
||||
2. 1) stores/gameStore.ts > stores/gameActions.ts
|
||||
3. 2) stores/gameStore.ts > stores/gameLoopActions.ts
|
||||
4. 3) stores/gameStore.ts > stores/tick-pipeline.ts
|
||||
|
||||
## How to fix
|
||||
1. Identify which import in the chain can be extracted to a shared types/utils file.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"_meta": {
|
||||
"generated": "2026-05-20T16:38:28.025Z",
|
||||
"generated": "2026-05-20T17:48:43.703Z",
|
||||
"description": "Import dependency graph for src/lib/game. Keys are files, values are arrays of files they import.",
|
||||
"usage": "To find what a file affects, search for its path in the VALUES. To find what a file depends on, look at its KEY entry."
|
||||
},
|
||||
@@ -120,7 +120,7 @@
|
||||
],
|
||||
"crafting-actions/preparation-actions.ts": [
|
||||
"crafting-prep.ts",
|
||||
"types.ts"
|
||||
"stores/craftingStore.types.ts"
|
||||
],
|
||||
"crafting-apply.ts": [
|
||||
"crafting-utils.ts",
|
||||
@@ -403,8 +403,6 @@
|
||||
"constants.ts",
|
||||
"effects/discipline-effects.ts",
|
||||
"stores/combat-state.types.ts",
|
||||
"stores/discipline-slice.ts",
|
||||
"stores/prestigeStore.ts",
|
||||
"types.ts",
|
||||
"utils/index.ts"
|
||||
],
|
||||
@@ -493,6 +491,7 @@
|
||||
"stores/gameLoopActions.ts",
|
||||
"stores/manaStore.ts",
|
||||
"stores/prestigeStore.ts",
|
||||
"stores/tick-pipeline.ts",
|
||||
"stores/uiStore.ts",
|
||||
"utils/index.ts"
|
||||
],
|
||||
@@ -519,6 +518,16 @@
|
||||
"constants.ts",
|
||||
"types.ts"
|
||||
],
|
||||
"stores/tick-pipeline.ts": [
|
||||
"stores/attunementStore.ts",
|
||||
"stores/combat-state.types.ts",
|
||||
"stores/craftingStore.types.ts",
|
||||
"stores/discipline-slice.ts",
|
||||
"stores/gameStore.ts",
|
||||
"stores/manaStore.ts",
|
||||
"stores/prestigeStore.ts",
|
||||
"stores/uiStore.ts"
|
||||
],
|
||||
"stores/uiStore.ts": [],
|
||||
"types.ts": [
|
||||
"data/equipment/types.ts",
|
||||
|
||||
Reference in New Issue
Block a user