0
0
Fork 0
Codesys-MCP-SP21-plus/tests/unit
Karstein Phobic Nyvold Kvistad b3d7a6fa64 feat(open_project): pre-flight profile-mismatch check using offline .project inspection
Before delegating to CODESYS for the actual open, inspect the
.project's projectinspectiondata.auxiliary (via src/inspect.ts -- pure
offline, ZIP+XML, no CODESYS) and compare its saved SP+patch against
the server's configured --codesys-profile.

Three outcomes:
- exact match -> proceed silently
- same SP, different patch -> proceed with a warning prefix in the
  response (CODESYS will pop its patch-difference dialog)
- SP mismatch -> refuse without opening; suggest the user either pick
  a different MCP server entry or run --print-config --for-project to
  generate one for the project's required SP

If inspection itself fails (file missing, malformed .project, profile
unparseable), pre-flight falls through silently -- the existing CODESYS
open path then produces its original error.
2026-04-27 22:32:53 +02:00
..
detect.test.ts feat(cli): --print-config --for-project <path> picks the install that opens the project 2026-04-27 22:27:31 +02:00
inspect.test.ts feat(cli): --inspect <project> reads CODESYS profile + mandatory libs offline (no CODESYS needed) 2026-04-27 21:47:31 +02:00
ipc.test.ts Initial release: MCP server for CODESYS with persistent UI instance 2026-02-08 18:59:16 +10:00
launcher.test.ts fix(launcher): only refuse double-spawn of the SAME --codesys-path 2026-04-27 20:57:59 +02:00
mirror-paths.test.ts fix(mirror): per-project mirror dir name when multiple .project files share a parent 2026-04-27 22:22:09 +02:00
open-project-preflight.test.ts feat(open_project): pre-flight profile-mismatch check using offline .project inspection 2026-04-27 22:32:53 +02:00
script-manager.test.ts fix(create_folder): try project.create_folder(name, SV_POU) first; drop ScriptManager cache 2026-04-26 17:16:44 +02:00
ssh-version.test.ts feat(ssh): read_running_version_ssh -- read PLC project version over SSH, no CODESYS needed 2026-04-27 22:13:29 +02:00