@h-rig/dependency-graph-plugin 0.0.6-alpha.139 → 0.0.6-alpha.140
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/src/index.js +10 -8
- package/dist/src/plugin.js +10 -8
- package/package.json +4 -4
package/dist/src/index.js
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
var __require = import.meta.require;
|
|
3
|
+
|
|
2
4
|
// packages/dependency-graph-plugin/src/plugin.ts
|
|
3
5
|
import { definePlugin } from "@rig/core";
|
|
4
|
-
import {
|
|
5
|
-
classifyWorkspaceBlockers,
|
|
6
|
-
formatDependencyGraphDot,
|
|
7
|
-
getWorkspaceDependencyGraph,
|
|
8
|
-
getWorkspaceRollups,
|
|
9
|
-
listRuns,
|
|
10
|
-
listTasks
|
|
11
|
-
} from "@rig/client";
|
|
12
6
|
var DEPENDENCY_GRAPH_PLUGIN_NAME = "@rig/dependency-graph-plugin";
|
|
13
7
|
var DEPENDENCY_GRAPH_CLI_ID = "dependency-graph.graph";
|
|
14
8
|
var WORKSPACE_STATUS_CLI_ID = "dependency-graph.status";
|
|
@@ -22,6 +16,9 @@ function isRecord(value) {
|
|
|
22
16
|
function panelProjectRoot(context) {
|
|
23
17
|
return isRecord(context) && typeof context.projectRoot === "string" && context.projectRoot.length > 0 ? context.projectRoot : null;
|
|
24
18
|
}
|
|
19
|
+
async function loadDependencyGraphClient() {
|
|
20
|
+
return await import("@rig/client");
|
|
21
|
+
}
|
|
25
22
|
function toDependencyGraphPanelPayload(model) {
|
|
26
23
|
const layoutByTaskId = new Map(model.layout.nodes.map((node) => [node.taskId, node]));
|
|
27
24
|
return {
|
|
@@ -74,6 +71,7 @@ async function produceDependencyGraphPanel(context) {
|
|
|
74
71
|
const projectRoot = panelProjectRoot(context);
|
|
75
72
|
if (!projectRoot)
|
|
76
73
|
return;
|
|
74
|
+
const { getWorkspaceDependencyGraph, classifyWorkspaceBlockers, listRuns, listTasks } = await loadDependencyGraphClient();
|
|
77
75
|
const model = await getWorkspaceDependencyGraph(projectRoot, {
|
|
78
76
|
listTasks,
|
|
79
77
|
listRuns,
|
|
@@ -85,6 +83,7 @@ async function produceWorkspaceRollupsPanel(context) {
|
|
|
85
83
|
const projectRoot = panelProjectRoot(context);
|
|
86
84
|
if (!projectRoot)
|
|
87
85
|
return;
|
|
86
|
+
const { getWorkspaceRollups, classifyWorkspaceBlockers, listRuns, listTasks } = await loadDependencyGraphClient();
|
|
88
87
|
const rollups = await getWorkspaceRollups(projectRoot, {
|
|
89
88
|
listTasks,
|
|
90
89
|
listRuns,
|
|
@@ -138,6 +137,7 @@ async function executeGraph(context, args) {
|
|
|
138
137
|
requireNoExtraArgs(json.rest, "rig graph [--json|--dot]");
|
|
139
138
|
if (dot.value && json.value)
|
|
140
139
|
throw new Error("Pass only one of --json or --dot.");
|
|
140
|
+
const { getWorkspaceDependencyGraph, classifyWorkspaceBlockers, formatDependencyGraphDot, listRuns, listTasks } = await loadDependencyGraphClient();
|
|
141
141
|
const model = await getWorkspaceDependencyGraph(context.projectRoot, {
|
|
142
142
|
listTasks,
|
|
143
143
|
listRuns,
|
|
@@ -158,6 +158,7 @@ async function executeStatus(context, args) {
|
|
|
158
158
|
const json = takeFlag(args, "--json");
|
|
159
159
|
const epic = takeOption(json.rest, "--epic");
|
|
160
160
|
requireNoExtraArgs(epic.rest, "rig status [--epic <key>] [--json]");
|
|
161
|
+
const { getWorkspaceRollups, classifyWorkspaceBlockers, listRuns, listTasks } = await loadDependencyGraphClient();
|
|
161
162
|
const [rollups, blockers, runs] = await Promise.all([
|
|
162
163
|
getWorkspaceRollups(context.projectRoot, { listTasks, listRuns }),
|
|
163
164
|
classifyWorkspaceBlockers(context.projectRoot, { listTasks, listRuns }),
|
|
@@ -189,6 +190,7 @@ async function executeSummary(context, args) {
|
|
|
189
190
|
const json = takeFlag(args, "--json");
|
|
190
191
|
const epicOpt = takeOption(json.rest, "--epic");
|
|
191
192
|
requireNoExtraArgs(epicOpt.rest, "rig summary [--epic <key>] [--json]");
|
|
193
|
+
const { getWorkspaceRollups, listRuns, listTasks } = await loadDependencyGraphClient();
|
|
192
194
|
const rollups = await getWorkspaceRollups(context.projectRoot, { listTasks, listRuns });
|
|
193
195
|
const details = epicOpt.value ? { ...rollups, epics: rollups.epics.filter((epic) => epic.epicKey === epicOpt.value) } : rollups;
|
|
194
196
|
if (context.outputMode === "text") {
|
package/dist/src/plugin.js
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
var __require = import.meta.require;
|
|
3
|
+
|
|
2
4
|
// packages/dependency-graph-plugin/src/plugin.ts
|
|
3
5
|
import { definePlugin } from "@rig/core";
|
|
4
|
-
import {
|
|
5
|
-
classifyWorkspaceBlockers,
|
|
6
|
-
formatDependencyGraphDot,
|
|
7
|
-
getWorkspaceDependencyGraph,
|
|
8
|
-
getWorkspaceRollups,
|
|
9
|
-
listRuns,
|
|
10
|
-
listTasks
|
|
11
|
-
} from "@rig/client";
|
|
12
6
|
var DEPENDENCY_GRAPH_PLUGIN_NAME = "@rig/dependency-graph-plugin";
|
|
13
7
|
var DEPENDENCY_GRAPH_CLI_ID = "dependency-graph.graph";
|
|
14
8
|
var WORKSPACE_STATUS_CLI_ID = "dependency-graph.status";
|
|
@@ -22,6 +16,9 @@ function isRecord(value) {
|
|
|
22
16
|
function panelProjectRoot(context) {
|
|
23
17
|
return isRecord(context) && typeof context.projectRoot === "string" && context.projectRoot.length > 0 ? context.projectRoot : null;
|
|
24
18
|
}
|
|
19
|
+
async function loadDependencyGraphClient() {
|
|
20
|
+
return await import("@rig/client");
|
|
21
|
+
}
|
|
25
22
|
function toDependencyGraphPanelPayload(model) {
|
|
26
23
|
const layoutByTaskId = new Map(model.layout.nodes.map((node) => [node.taskId, node]));
|
|
27
24
|
return {
|
|
@@ -74,6 +71,7 @@ async function produceDependencyGraphPanel(context) {
|
|
|
74
71
|
const projectRoot = panelProjectRoot(context);
|
|
75
72
|
if (!projectRoot)
|
|
76
73
|
return;
|
|
74
|
+
const { getWorkspaceDependencyGraph, classifyWorkspaceBlockers, listRuns, listTasks } = await loadDependencyGraphClient();
|
|
77
75
|
const model = await getWorkspaceDependencyGraph(projectRoot, {
|
|
78
76
|
listTasks,
|
|
79
77
|
listRuns,
|
|
@@ -85,6 +83,7 @@ async function produceWorkspaceRollupsPanel(context) {
|
|
|
85
83
|
const projectRoot = panelProjectRoot(context);
|
|
86
84
|
if (!projectRoot)
|
|
87
85
|
return;
|
|
86
|
+
const { getWorkspaceRollups, classifyWorkspaceBlockers, listRuns, listTasks } = await loadDependencyGraphClient();
|
|
88
87
|
const rollups = await getWorkspaceRollups(projectRoot, {
|
|
89
88
|
listTasks,
|
|
90
89
|
listRuns,
|
|
@@ -138,6 +137,7 @@ async function executeGraph(context, args) {
|
|
|
138
137
|
requireNoExtraArgs(json.rest, "rig graph [--json|--dot]");
|
|
139
138
|
if (dot.value && json.value)
|
|
140
139
|
throw new Error("Pass only one of --json or --dot.");
|
|
140
|
+
const { getWorkspaceDependencyGraph, classifyWorkspaceBlockers, formatDependencyGraphDot, listRuns, listTasks } = await loadDependencyGraphClient();
|
|
141
141
|
const model = await getWorkspaceDependencyGraph(context.projectRoot, {
|
|
142
142
|
listTasks,
|
|
143
143
|
listRuns,
|
|
@@ -158,6 +158,7 @@ async function executeStatus(context, args) {
|
|
|
158
158
|
const json = takeFlag(args, "--json");
|
|
159
159
|
const epic = takeOption(json.rest, "--epic");
|
|
160
160
|
requireNoExtraArgs(epic.rest, "rig status [--epic <key>] [--json]");
|
|
161
|
+
const { getWorkspaceRollups, classifyWorkspaceBlockers, listRuns, listTasks } = await loadDependencyGraphClient();
|
|
161
162
|
const [rollups, blockers, runs] = await Promise.all([
|
|
162
163
|
getWorkspaceRollups(context.projectRoot, { listTasks, listRuns }),
|
|
163
164
|
classifyWorkspaceBlockers(context.projectRoot, { listTasks, listRuns }),
|
|
@@ -189,6 +190,7 @@ async function executeSummary(context, args) {
|
|
|
189
190
|
const json = takeFlag(args, "--json");
|
|
190
191
|
const epicOpt = takeOption(json.rest, "--epic");
|
|
191
192
|
requireNoExtraArgs(epicOpt.rest, "rig summary [--epic <key>] [--json]");
|
|
193
|
+
const { getWorkspaceRollups, listRuns, listTasks } = await loadDependencyGraphClient();
|
|
192
194
|
const rollups = await getWorkspaceRollups(context.projectRoot, { listTasks, listRuns });
|
|
193
195
|
const details = epicOpt.value ? { ...rollups, epics: rollups.epics.filter((epic) => epic.epicKey === epicOpt.value) } : rollups;
|
|
194
196
|
if (context.outputMode === "text") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h-rig/dependency-graph-plugin",
|
|
3
|
-
"version": "0.0.6-alpha.
|
|
3
|
+
"version": "0.0.6-alpha.140",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "First-party dependency graph, workspace status, and rollup capability plugin for Rig.",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"module": "./dist/src/index.js",
|
|
26
26
|
"types": "./dist/src/index.d.ts",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@rig/client": "npm:@h-rig/client@0.0.6-alpha.
|
|
29
|
-
"@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.
|
|
30
|
-
"@rig/core": "npm:@h-rig/core@0.0.6-alpha.
|
|
28
|
+
"@rig/client": "npm:@h-rig/client@0.0.6-alpha.140",
|
|
29
|
+
"@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.140",
|
|
30
|
+
"@rig/core": "npm:@h-rig/core@0.0.6-alpha.140"
|
|
31
31
|
}
|
|
32
32
|
}
|