Files
sporel-lib-management.launc…/fsm.lua
Calic 019b18d621 rename to lib-management.launcher-test (was lib-sporel.launcher-test)
Per ADR-0045 (three-tier library naming) the launcher-test migrates
from the retired lib-sporel.* prefix to the new lib-management.* tier.

- manifest.lib id: lib-sporel.launcher-test -> lib-management.launcher-test
- manifest.core id: lib-sporel.launcher-test.core -> lib-management.launcher-test.core
- init.lua engine.module.dir_of("lib-management.launcher-test")
- README + fsm.lua + init.lua comments updated

Gitea repo renamed in lockstep:
sporel/sporel-lib-sporel.launcher-test ->
sporel/sporel-lib-management.launcher-test
2026-05-31 00:21:57 +02:00

26 lines
859 B
Lua

-- Sporel Launcher — pure-Lua finite state machine.
-- No engine.* calls; testable directly by lib-management.launcher-test.
local M = {}
M.STATE_LIST = "list"
M.STATE_QUIT_CONFIRM = "quit_confirm"
M.EXIT = "exit" -- sentinel: caller should engine.exit(0)
-- Events: "esc", "enter", "click_yes", "click_no", "click_module"
function M.next(state, event)
if state == M.STATE_LIST then
if event == "esc" then return M.STATE_QUIT_CONFIRM end
return M.STATE_LIST
elseif state == M.STATE_QUIT_CONFIRM then
if event == "esc" then return M.STATE_LIST end
if event == "enter" then return M.EXIT end
if event == "click_yes" then return M.EXIT end
if event == "click_no" then return M.STATE_LIST end
return M.STATE_QUIT_CONFIRM
end
return state
end
return M