From 792832c61d7c3da7f08e7a977bf71be5e30dfdda Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:41:58 +0100 Subject: [PATCH] Workflow Trigger --- src/elements/Container.lua | 2 ++ src/elements/List.lua | 2 ++ tools/generate-config.lua | 13 ++++++++++--- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/elements/Container.lua b/src/elements/Container.lua index c8e8581..47554fc 100644 --- a/src/elements/Container.lua +++ b/src/elements/Container.lua @@ -2,6 +2,8 @@ local elementManager = require("elementManager") local VisualElement = elementManager.getElement("VisualElement") local expect = require("libraries/expect") local split = require("libraries/utils").split +---@configDescription The container class. It is a visual element that can contain other elements. It is the base class for all containers +---@configDefault true --- The container class. It is a visual element that can contain other elements. It is the base class for all containers, --- like Frames, BaseFrames, and more. diff --git a/src/elements/List.lua b/src/elements/List.lua index d164b82..0bf145e 100644 --- a/src/elements/List.lua +++ b/src/elements/List.lua @@ -1,4 +1,6 @@ local VisualElement = require("elements/VisualElement") +---@configDescription A scrollable list of selectable items +---@configDefault true --- This is the list class. It provides a scrollable list of selectable items with support for --- custom item rendering, separators, and selection handling. diff --git a/tools/generate-config.lua b/tools/generate-config.lua index ea36994..e5405c2 100644 --- a/tools/generate-config.lua +++ b/tools/generate-config.lua @@ -77,9 +77,15 @@ end local function scanDirectory(baseDir, relativePath) local files = {} - -- Nutze io.popen um Verzeichnis zu scannen - local cmd = os.execute('dir "' .. baseDir .. '/' .. relativePath .. '" /b /s') - for path in io.popen(cmd):lines() do + -- Nutze direkt io.popen für das Directory Listing + local cmd = 'dir "' .. baseDir .. '/' .. relativePath .. '" /b /s' + local pipe = io.popen(cmd) + if not pipe then + error("Failed to execute directory scan command") + return files + end + + for path in pipe:lines() do if path:match("%.lua$") then local config = parseFile(path) if config then @@ -90,6 +96,7 @@ local function scanDirectory(baseDir, relativePath) end end + pipe:close() return files end