@beastmode-develeap/beastmode 0.1.182 → 0.1.184

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/dist/index.js CHANGED
@@ -5114,6 +5114,31 @@ function getBoardRoutes(factoryDir) {
5114
5114
  handler: async (_body, _params, query) => {
5115
5115
  const boardUrl = getBoardUrl2(factoryDir);
5116
5116
  const bq = scopedQuery(query);
5117
+ if (!bq) {
5118
+ const boardsResp = await proxyToBoard(boardUrl, "GET", "/api/boards");
5119
+ const boards = boardsResp && Array.isArray(boardsResp.boards) ? boardsResp.boards : [];
5120
+ const polls = await Promise.all(
5121
+ boards.map(async (b) => {
5122
+ const poll2 = await proxyToBoard(boardUrl, "GET", "/api/poll", void 0, { board: b });
5123
+ return { board: b, poll: poll2 };
5124
+ })
5125
+ );
5126
+ const seen2 = /* @__PURE__ */ new Set();
5127
+ const allItems2 = [];
5128
+ for (const { board: boardName, poll: poll2 } of polls) {
5129
+ for (const [status, items] of Object.entries(poll2)) {
5130
+ if (!Array.isArray(items)) continue;
5131
+ for (const item of items) {
5132
+ const rec = item;
5133
+ const key = boardName + ":" + String(rec.id ?? "");
5134
+ if (seen2.has(key)) continue;
5135
+ seen2.add(key);
5136
+ allItems2.push({ ...rec, status_bucket: status, project_id: boardName });
5137
+ }
5138
+ }
5139
+ }
5140
+ return { items: allItems2 };
5141
+ }
5117
5142
  const poll = await proxyToBoard(boardUrl, "GET", "/api/poll", void 0, bq);
5118
5143
  const seen = /* @__PURE__ */ new Set();
5119
5144
  const allItems = [];