mirror of
https://github.com/j3ssie/osmedeus.git
synced 2026-09-13 21:27:47 +02:00
feat: add inline module support and improve version output
- Add inline module support to ModuleRef allowing modules to be defined directly in flows without external files - Implement IsInline() and ToWorkflow() methods to convert inline ModuleRef definitions to executable workflows - Update ModuleRef.Clone() to properly duplicate all fields including Steps, Runner, RunnerConfig, and Description - Add field alignment formatting and make path optional for inline modules - Enhance parser validation to allow omitting path for inline modules while requiring at least one step - Update executor's preloadModules() and ExecuteFlow() to handle inline modules during flow execution - Improve version command output with JSON format support via --json flag and enhanced colored terminal output
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
name: test-inline-modules
|
||||
kind: flow
|
||||
description: Simple test flow with inline modules (no path references)
|
||||
|
||||
params:
|
||||
- name: target
|
||||
required: true
|
||||
|
||||
modules:
|
||||
- name: greet-module
|
||||
description: Simple greeting module
|
||||
steps:
|
||||
- name: greet
|
||||
type: bash
|
||||
command: echo "Hello, {{target}}!"
|
||||
exports:
|
||||
greeting: "{{StepOutput}}"
|
||||
|
||||
- name: info-module
|
||||
description: Displays system info
|
||||
depends_on:
|
||||
- greet-module
|
||||
steps:
|
||||
- name: show-info
|
||||
type: bash
|
||||
command: echo "Target is {{target}}, greeting was {{greeting}}"
|
||||
- name: date-step
|
||||
type: bash
|
||||
command: date +%Y-%m-%d
|
||||
exports:
|
||||
current_date: "{{StepOutput}}"
|
||||
|
||||
- name: final-module
|
||||
description: Final summary module
|
||||
depends_on:
|
||||
- info-module
|
||||
steps:
|
||||
- name: summary
|
||||
type: bash
|
||||
command: echo "Flow completed on {{current_date}} for {{target}}"
|
||||
Reference in New Issue
Block a user