dev-playbooks 1.7.1 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/devbooks.js +3 -1
- package/package.json +1 -1
package/bin/devbooks.js
CHANGED
|
@@ -1184,13 +1184,15 @@ function loadConfig(projectDir) {
|
|
|
1184
1184
|
const content = fs.readFileSync(configPath, 'utf-8');
|
|
1185
1185
|
|
|
1186
1186
|
// Parse ai_tools
|
|
1187
|
-
|
|
1187
|
+
// Fix: Use more robust regex that matches until next top-level key (non-indented line) or EOF
|
|
1188
|
+
const toolsMatch = content.match(/ai_tools:\s*\n((?:[ \t]+-[ \t]+.+\n?)*)/);
|
|
1188
1189
|
const tools = toolsMatch
|
|
1189
1190
|
? toolsMatch[1]
|
|
1190
1191
|
.split('\n')
|
|
1191
1192
|
.map(line => line.trim())
|
|
1192
1193
|
.filter(line => line.startsWith('-'))
|
|
1193
1194
|
.map(line => line.replace(/^-\s*/, '').trim())
|
|
1195
|
+
.filter(line => line.length > 0)
|
|
1194
1196
|
: [];
|
|
1195
1197
|
|
|
1196
1198
|
// Parse install_scope
|