Replace mock functions with production implementations#18
Merged
kayodebristol merged 3 commits intomainfrom Nov 14, 2025
Merged
Replace mock functions with production implementations#18kayodebristol merged 3 commits intomainfrom
kayodebristol merged 3 commits intomainfrom
Conversation
- Replaced Eta template engine with Handlebars to match config syntax - Implemented real FSM parser that extracts machines from TypeScript/JavaScript files - Parser uses runtime imports to extract machine definitions - Supports nested states and transitions - Tested with shopping cart example - successfully generates documentation Co-authored-by: kayodebristol <3579196+kayodebristol@users.noreply.github.com>
- Added writeBinaryFile method to FSLike interface - Implemented writeBinaryFile for both Deno and Node.js - Added PNG export logic in generate.ts (calls toPng when exportPng is enabled) - Created example traffic light machine for testing - Fixed linter issues (unused parameter, import prefix) - Updated .gitignore to exclude test output Co-authored-by: kayodebristol <3579196+kayodebristol@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement mock functions with developed solutions
Replace mock functions with production implementations
Nov 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removed placeholder implementations and integrated production-ready parsers and template rendering. The template engine was using Eta syntax while configs specified Handlebars, and the FSM parser was returning hard-coded demo data.
Type of Change
Changes Made
Template Engine
{{}}instead of<%= %>)FSM Parser
fakeParseMachinesplaceholderBinary File Support
writeBinaryFilemethod toFSLikeinterfacetoPngreturns null per roadmap - PNG export planned for v1.1.0+Example:
Testing
deno task gensuccessfullydeno lint(noted any acceptable errors)deno check mod.tsVerified with traffic light example (simple) and shopping cart example (nested states). Generated documentation includes proper state pages, transitions, and Mermaid diagrams.
Architectural Decision Record (ADR)
docs/adr/docs/adr/README.mdDocumentation
Breaking Changes
None. Maintains backward compatibility with existing configurations.
Related Issues
Fixes #17
Additional Notes
Security: CodeQL scan passed with 0 vulnerabilities
Files Modified:
src/tpl.ts- Handlebars integrationsrc/parser.ts- New FSM parsersrc/generate.ts- Parser integrationruntime.ts- Binary file write supportsrc/fsm/example.machine.ts- Test fixtureChecklist
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.