@mytegroupinc/myte-core 0.0.29 → 0.0.30
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/package.json
CHANGED
|
@@ -90,14 +90,24 @@ function writePrd(workspace, title, index) {
|
|
|
90
90
|
return filePath;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
function loadFeedbackManifest(workspace) {
|
|
94
|
-
const manifestPath = path.join(workspace, "MyteCommandCenter", "data", "feedback.yml");
|
|
95
|
-
if (!fs.existsSync(manifestPath)) {
|
|
96
|
-
return { items: [] };
|
|
97
|
-
}
|
|
98
|
-
const text = fs.readFileSync(manifestPath, "utf8");
|
|
99
|
-
|
|
100
|
-
|
|
93
|
+
function loadFeedbackManifest(workspace) {
|
|
94
|
+
const manifestPath = path.join(workspace, "MyteCommandCenter", "data", "feedback.yml");
|
|
95
|
+
if (!fs.existsSync(manifestPath)) {
|
|
96
|
+
return { items: [] };
|
|
97
|
+
}
|
|
98
|
+
const text = fs.readFileSync(manifestPath, "utf8");
|
|
99
|
+
try {
|
|
100
|
+
const parsed = JSON.parse(text);
|
|
101
|
+
const items = []
|
|
102
|
+
.concat(Array.isArray(parsed.items) ? parsed.items : [])
|
|
103
|
+
.concat(Array.isArray(parsed.queue) ? parsed.queue : []);
|
|
104
|
+
return { items };
|
|
105
|
+
} catch (_err) {
|
|
106
|
+
// Older local files may still be YAML-like. Keep a small fallback parser so
|
|
107
|
+
// the harness can validate either shape without adding runtime deps.
|
|
108
|
+
}
|
|
109
|
+
const items = [];
|
|
110
|
+
let current = null;
|
|
101
111
|
for (const line of text.split(/\r?\n/)) {
|
|
102
112
|
const feedbackMatch = line.match(/^\s*-\s+feedback_id:\s*["']?([^"'\s]+)["']?\s*$/) || line.match(/^\s*feedback_id:\s*["']?([^"'\s]+)["']?\s*$/);
|
|
103
113
|
if (feedbackMatch) {
|