poc: Add TypeScript and Go code generation#268
Open
emaarco wants to merge 7 commits into
Open
Conversation
Extends bpmn-to-code with two new output languages delivered via the web module. - Add TYPESCRIPT and GO to OutputLanguage enum - TypeScriptProcessApiBuilder: generates a single exported const object with `as const` / `as const satisfies Record<string, T>` annotations per group, matching the Kotlin access pattern (ProcessApi.Elements.X) - TypeScriptSharedTypesBuilder: generates 5 individual interface files (BpmnTimer, BpmnError, BpmnEscalation, BpmnFlow, BpmnRelations) in a types/ sub-directory - GoProcessApiBuilder: generates package-level const block for process/engine ID and anonymous struct vars per group (Elements, Timers, etc.), giving the `package.Elements.X` access pattern; uses SCREAMING_SNAKE→PascalCase conversion for exported Go field names - GoSharedTypesBuilder: generates a single bpmn_types.go file in the types sub-package containing all 5 struct types - Register both builder pairs in CodeGenerationAdapter - Add TypeScript and Go options to the web frontend language dropdown and syntax-highlight map - Add fixture-based tests for all 4 builders https://claude.ai/code/session_01MSGu2Y3YgZHEMqWa6wdFeM
Add second test to GoProcessApiBuilderTest and TypeScriptProcessApiBuilderTest using a MergedBpmnModel with escalations, mirroring the existing Kotlin/Java pattern. Fixes JaCoCo coverage violations on EscalationsWriter and VariantsWriter inner classes.
- OutputLanguage: add experimental flag (true for TYPESCRIPT and GO) - index.html: add TypeScript & Go options to language dropdown, hero badge - docs/configuration.md: add TS/Go rows with experimental warning - README: drop "JVM projects" from tagline - kotlin.md: rule against top-level functions in files that define classes - styles.css: sync tab-switcher styles from main
9e16df4 to
484c9cb
Compare
Introduce a ProcessApi interface covering the full object shape so generated files use a single 'as const satisfies ProcessApi' instead of repeating as const / satisfies on every section. Also adds blank lines between sections and expands Flows/Relations entries to multi-line format.
Owner
Author
|
Closing for now. Until further requests. However proofs that it could work. Even though println seems kind of unprofessional. And knowingly it will only support web module - as long as it's Java based |
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.
Extends bpmn-to-code with two new output languages delivered via the web module.
as const/as const satisfies Record<string, T>annotations per group, matching the Kotlin access pattern (ProcessApi.Elements.X)package.Elements.Xaccess pattern; uses SCREAMING_SNAKE→PascalCase conversion for exported Go field nameshttps://claude.ai/code/session_01MSGu2Y3YgZHEMqWa6wdFeM