mainflow 0.43.0-alpha.1 → 0.43.0-alpha.3
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/cli.js +12 -0
- package/dist/facts.d.ts +6 -0
- package/dist/facts.js +7 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1556,6 +1556,18 @@ const RUNS = {
|
|
|
1556
1556
|
const count = Object.keys(hubs).length;
|
|
1557
1557
|
return done(`${count} ${count === 1 ? "hub" : "hubs"} registered in ${registryFile()}`);
|
|
1558
1558
|
},
|
|
1559
|
+
"hub which": ({ cwd, opts }) => {
|
|
1560
|
+
const found = resolveHub(cwd, { warn: warnLine });
|
|
1561
|
+
if (!found) return fail(`No registered hub claims ${realPath(cwd) ?? cwd}; register one with: mainflow hub register <name> <path>`);
|
|
1562
|
+
if (opts.json) return done(JSON.stringify({
|
|
1563
|
+
name: found.name,
|
|
1564
|
+
root: found.root,
|
|
1565
|
+
data: found.data
|
|
1566
|
+
}));
|
|
1567
|
+
console.log(`${found.name} ${found.root}`);
|
|
1568
|
+
console.log(` data ${found.data}`);
|
|
1569
|
+
return 0;
|
|
1570
|
+
},
|
|
1559
1571
|
"hub unregister": ({ args }) => done(`unregistered hub ${args[0]} (${unregisterHub(args[0]).root})`),
|
|
1560
1572
|
status: ({ dirs, opts }) => printStatus(loadHub(dirs), opts.all ?? false),
|
|
1561
1573
|
check: ({ dirs }) => {
|
package/dist/facts.d.ts
CHANGED
|
@@ -36,6 +36,12 @@ export declare const COMMAND_SPECS: {
|
|
|
36
36
|
readonly args: 0;
|
|
37
37
|
readonly needsHub: false;
|
|
38
38
|
};
|
|
39
|
+
readonly 'hub which': {
|
|
40
|
+
readonly usage: 'hub which [--json]';
|
|
41
|
+
readonly summary: 'Print the name, repository root and data directory of the hub the current directory belongs to, as hub list finds it. --json prints one object {"name","root","data"}. Outside any registered hub it prints nothing to stdout, one line to stderr, and exits 1. Writes nothing';
|
|
42
|
+
readonly args: 0;
|
|
43
|
+
readonly needsHub: false;
|
|
44
|
+
};
|
|
39
45
|
readonly 'hub unregister': {
|
|
40
46
|
readonly usage: 'hub unregister <name>';
|
|
41
47
|
readonly summary: 'Remove a hub from this machine\'s registry; its files stay';
|
package/dist/facts.js
CHANGED
|
@@ -26,6 +26,12 @@ const COMMAND_SPECS = {
|
|
|
26
26
|
args: 0,
|
|
27
27
|
needsHub: false
|
|
28
28
|
},
|
|
29
|
+
"hub which": {
|
|
30
|
+
usage: "hub which [--json]",
|
|
31
|
+
summary: "Print the name, repository root and data directory of the hub the current directory belongs to, as hub list finds it. --json prints one object {\"name\",\"root\",\"data\"}. Outside any registered hub it prints nothing to stdout, one line to stderr, and exits 1. Writes nothing",
|
|
32
|
+
args: 0,
|
|
33
|
+
needsHub: false
|
|
34
|
+
},
|
|
29
35
|
"hub unregister": {
|
|
30
36
|
usage: "hub unregister <name>",
|
|
31
37
|
summary: "Remove a hub from this machine's registry; its files stay",
|
|
@@ -715,7 +721,7 @@ const FIELDS = {
|
|
|
715
721
|
field("order", false, "在主脈絡內的順序,小的在前"),
|
|
716
722
|
field("dependsOn", false, "開始前必須先完成的任務"),
|
|
717
723
|
field("repo", false, "主要動到的倉庫,名稱需在 config.yaml 登記"),
|
|
718
|
-
field("touches", false, "預計會改到的路徑或 glob 清單,相對於 repo
|
|
724
|
+
field("touches", false, "預計會改到的路徑或 glob 清單,相對於 repo 的根目錄。開場簡報只用它列出兩條進行中主脈絡的未結束任務在同一個 repo 重疊的路徑。check 不警告重疊,重疊由提交時兩邊的會話協調,不必記 depends-on。有 touches 卻沒填 repo 時路徑不會被比對,check 會列警告"),
|
|
719
725
|
field("startedAt", false, "第一次轉為 doing 時由 CLI 寫入"),
|
|
720
726
|
field("checklist", true, "checklist 項目清單,每項的欄位見 checklistItem"),
|
|
721
727
|
field("blockedBy", false, "卡住時的原因、等待對象與繼續的訊號,blocked 時必填;等待對象整串是參照時(例如 m031/t002)會檢查它存在"),
|