@principal-ade/dynamic-file-tree 0.2.7 → 0.2.9
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.mjs
CHANGED
|
@@ -2232,6 +2232,46 @@ var buildTreeDataFromStoryboards = (storyboards, workflowCoverageMap, traceWorkf
|
|
|
2232
2232
|
}
|
|
2233
2233
|
const storyboardId = versionPrefix ? `storyboard:${versionPrefix}:${storyboard.id}` : `storyboard:${storyboard.id}`;
|
|
2234
2234
|
const storyboardCanvasStatus = canvasNodeStatusMap?.[storyboard.canvas.path] ?? canvasNodeStatusMap?.[storyboard.id];
|
|
2235
|
+
const getAggregatedGitStatus = () => {
|
|
2236
|
+
if (!gitStatusMap || gitStatusMap.size === 0)
|
|
2237
|
+
return null;
|
|
2238
|
+
const statusPriority = {
|
|
2239
|
+
M: 1,
|
|
2240
|
+
MM: 1,
|
|
2241
|
+
A: 2,
|
|
2242
|
+
AM: 2,
|
|
2243
|
+
D: 3,
|
|
2244
|
+
"??": 4,
|
|
2245
|
+
U: 5,
|
|
2246
|
+
R: 6,
|
|
2247
|
+
C: 7
|
|
2248
|
+
};
|
|
2249
|
+
let bestStatus = null;
|
|
2250
|
+
let bestPriority = Infinity;
|
|
2251
|
+
const canvasStatus2 = lookupGitStatus(storyboard.canvas.path, gitStatusMap);
|
|
2252
|
+
if (canvasStatus2 && (statusPriority[canvasStatus2] ?? 99) < bestPriority) {
|
|
2253
|
+
bestStatus = canvasStatus2;
|
|
2254
|
+
bestPriority = statusPriority[canvasStatus2] ?? 99;
|
|
2255
|
+
}
|
|
2256
|
+
if (storyboard.canvas.markdownPath) {
|
|
2257
|
+
const mdStatus = lookupGitStatus(storyboard.canvas.markdownPath, gitStatusMap);
|
|
2258
|
+
if (mdStatus && (statusPriority[mdStatus] ?? 99) < bestPriority) {
|
|
2259
|
+
bestStatus = mdStatus;
|
|
2260
|
+
bestPriority = statusPriority[mdStatus] ?? 99;
|
|
2261
|
+
}
|
|
2262
|
+
}
|
|
2263
|
+
for (const workflow of storyboard.workflows) {
|
|
2264
|
+
const wfStatus = lookupGitStatus(workflow.path, gitStatusMap);
|
|
2265
|
+
if (wfStatus && (statusPriority[wfStatus] ?? 99) < bestPriority) {
|
|
2266
|
+
bestStatus = wfStatus;
|
|
2267
|
+
bestPriority = statusPriority[wfStatus] ?? 99;
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
2270
|
+
if (bestStatus) {
|
|
2271
|
+
console.log(`[StoryboardGitStatus] ${storyboard.name}: ${bestStatus}`);
|
|
2272
|
+
}
|
|
2273
|
+
return bestStatus;
|
|
2274
|
+
};
|
|
2235
2275
|
return {
|
|
2236
2276
|
id: storyboardId,
|
|
2237
2277
|
name: storyboard.name,
|
|
@@ -2239,7 +2279,8 @@ var buildTreeDataFromStoryboards = (storyboards, workflowCoverageMap, traceWorkf
|
|
|
2239
2279
|
storyboard,
|
|
2240
2280
|
children,
|
|
2241
2281
|
hasTraces: storyboardHasTracedWorkflows,
|
|
2242
|
-
canvasNodeStatus: storyboardCanvasStatus
|
|
2282
|
+
canvasNodeStatus: storyboardCanvasStatus,
|
|
2283
|
+
gitStatus: getAggregatedGitStatus()
|
|
2243
2284
|
};
|
|
2244
2285
|
};
|
|
2245
2286
|
const hasMultiplePackages = packagesMap.size > 1;
|
|
@@ -2654,7 +2695,7 @@ var StoryboardWorkflowsTreeCore = ({
|
|
|
2654
2695
|
})));
|
|
2655
2696
|
}
|
|
2656
2697
|
}
|
|
2657
|
-
if (data.gitStatus && (data.type === "canvas" || data.type === "overview" || data.type === "workflow")) {
|
|
2698
|
+
if (data.gitStatus && (data.type === "storyboard" || data.type === "canvas" || data.type === "overview" || data.type === "workflow")) {
|
|
2658
2699
|
const gitDisplay = getGitStatusDisplay3(data.gitStatus, theme);
|
|
2659
2700
|
if (gitDisplay) {
|
|
2660
2701
|
indicators.push(/* @__PURE__ */ React13.createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoryboardWorkflowsTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+C,MAAM,OAAO,CAAC;AASpE,OAAO,KAAK,EAEV,4BAA4B,EAQ7B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"StoryboardWorkflowsTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+C,MAAM,OAAO,CAAC;AASpE,OAAO,KAAK,EAEV,4BAA4B,EAQ7B,MAAM,SAAS,CAAC;AAkfjB,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAke9E,CAAC"}
|