@letterstory/cli 0.177.166 → 0.177.167
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/lib/cli.mjs +3 -1
- package/lib/commands/org.mjs +10 -3
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -93,7 +93,7 @@ import {
|
|
|
93
93
|
import { fetchParkedSections, withoutParked } from "./parked.mjs";
|
|
94
94
|
|
|
95
95
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
96
|
-
export const VERSION = "0.177.
|
|
96
|
+
export const VERSION = "0.177.167";
|
|
97
97
|
|
|
98
98
|
/** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
|
|
99
99
|
export const EXIT_PAYMENT_REQUIRED = 3;
|
|
@@ -106,6 +106,8 @@ export const BOOLEAN_FLAGS = new Set([
|
|
|
106
106
|
// repo list: open changes past --limit are listed unless --newest-only.
|
|
107
107
|
"include-open",
|
|
108
108
|
"newest-only",
|
|
109
|
+
// org overview: only what waits on someone (the More menu's closed read).
|
|
110
|
+
"needs-only",
|
|
109
111
|
"include-tests",
|
|
110
112
|
"as-test",
|
|
111
113
|
"discover",
|
package/lib/commands/org.mjs
CHANGED
|
@@ -54,7 +54,11 @@ export const ARGS = {
|
|
|
54
54
|
undo_billing_plan_cancel: {},
|
|
55
55
|
update_billing_card: {},
|
|
56
56
|
list_integrations: {},
|
|
57
|
-
get_workspace_overview: {
|
|
57
|
+
get_workspace_overview: {
|
|
58
|
+
needs_only: {
|
|
59
|
+
value: (flags) => (flags["needs-only"] === undefined ? undefined : flagBool(flags["needs-only"])),
|
|
60
|
+
},
|
|
61
|
+
},
|
|
58
62
|
get_linear_connection: {},
|
|
59
63
|
list_linear_targets: { team_id: { flag: "team" } },
|
|
60
64
|
set_linear_target: {
|
|
@@ -155,8 +159,10 @@ const NEED_WORDS = {
|
|
|
155
159
|
*/
|
|
156
160
|
async function orgOverview(ctx) {
|
|
157
161
|
const { client, flags, io } = ctx;
|
|
158
|
-
refuseUnknownFlags(ctx, {}, []);
|
|
159
|
-
|
|
162
|
+
refuseUnknownFlags(ctx, {}, ["needs-only"]);
|
|
163
|
+
// --needs-only: only what waits on someone, as the app's closed More menu reads it.
|
|
164
|
+
const needsOnly = flagBool(flags["needs-only"]);
|
|
165
|
+
const result = await client.callTool("get_workspace_overview", needsOnly ? { needs_only: true } : {});
|
|
160
166
|
ok(ctx, result.message);
|
|
161
167
|
printResult(io, flags, result, (r) => {
|
|
162
168
|
const needs = r.needs.length
|
|
@@ -166,6 +172,7 @@ async function orgOverview(ctx) {
|
|
|
166
172
|
.filter(([, n]) => n > 0)
|
|
167
173
|
.map(([key, n]) => ` ${key.replace(/^\//, "")}: ${formatCount(n)}`);
|
|
168
174
|
const recent = r.recent.map((x) => ` ${x.name} (${x.kind === "sequence" ? "sequence" : "list"})`);
|
|
175
|
+
if (needsOnly) return needs.join("\n");
|
|
169
176
|
return [...needs, "", "Holds:", ...counts, ...(recent.length ? ["", "Recent:", ...recent] : [])].join("\n");
|
|
170
177
|
});
|
|
171
178
|
return 0;
|