mirror of
https://github.com/j3ssie/osmedeus.git
synced 2026-10-01 05:55:05 +02:00
feat: improve decision conditions with param-based JS evaluation
- Add stripTemplateVarsForJS() to convert {{var}} outside quotes to bare JS variable names, enabling direct param/export access in condition expressions
- Add normalizeBoolStringsForJS() to convert string 'true'/'false' to actual booleans for correct JS truthiness evaluation
- Auto-classify asset types in db_import_asset_from_file() and default source to 'web' when empty
- Improve table display with terminal auto-width detection via term.GetSize(), custom column weights, and display name aliases (status_code → status)
- Change default --width to 0 (auto-detect) with weighted column distribution and minimum header-based sizing
- Add comprehensive tests for param-based conditions and JSON asset imports
- Update test data to use direct param references in conditions instead of exports
This commit is contained in:
+2
-4
@@ -14,15 +14,13 @@ params:
|
||||
default: "3"
|
||||
|
||||
steps:
|
||||
# Step 1: Single condition match with function
|
||||
# Step 1: Single condition match — uses params directly (no exports needed)
|
||||
- name: check-target
|
||||
type: bash
|
||||
command: echo "Checking target"
|
||||
exports:
|
||||
has_target: "true"
|
||||
decision:
|
||||
conditions:
|
||||
- if: "{{has_target}}"
|
||||
- if: "{{enable_extra}} && {{target}} != ''"
|
||||
function: "log_info('[COND] Target is present')"
|
||||
|
||||
# Step 2: Multiple conditions - all matching ones execute
|
||||
|
||||
Reference in New Issue
Block a user