mainflow 0.43.0-alpha.1 → 0.43.0-alpha.2
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 +6 -0
- 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",
|