mirror of
https://github.com/j3ssie/osmedeus.git
synced 2026-09-27 12:04:54 +02:00
feat(cdn): enhance delete with folder support, add sync progress events, and bash() function
- Enhanced cdnDelete to recursively delete folders with per-file tracking and error counts - Added optional 'json' mode parameter to cdnSyncUpload/cdnSyncDownload for output format control - Implemented real-time sync event callbacks for progress visualization with colored terminal output - Added bash() as primary function with exec_cmd() as alias for backward compatibility - Introduced SyncEvent type for action tracking (uploading/downloaded/skipped/deleted/error) - Updated function tests to support new mode parameter
This commit is contained in:
+3
-3
@@ -453,12 +453,12 @@ func runFunctionList(cmd *cobra.Command, args []string) error {
|
||||
// to work the same as "osmedeus eval cdn_ls_tree()"
|
||||
func normalizeScriptExpression(expr string) string {
|
||||
expr = strings.TrimSpace(expr)
|
||||
|
||||
|
||||
// If it already has parentheses, return as-is
|
||||
if strings.Contains(expr, "(") {
|
||||
return expr
|
||||
}
|
||||
|
||||
|
||||
// Check if it's a known function name
|
||||
allFuncs := functions.AllFunctions()
|
||||
for _, fn := range allFuncs {
|
||||
@@ -469,7 +469,7 @@ func normalizeScriptExpression(expr string) string {
|
||||
return expr + "()"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Not a known function, return as-is (could be a variable or expression)
|
||||
return expr
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user