@harborppm/cli 0.20.1 → 0.22.0

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.
Files changed (4) hide show
  1. package/README.md +5 -2
  2. package/dist/app.mjs +3598 -2472
  3. package/lib/cli.mjs +21 -7
  4. package/package.json +1 -1
package/lib/cli.mjs CHANGED
@@ -77,7 +77,7 @@ export const HELP = `harbor: Harbor from the terminal
77
77
  [--ends DATE]
78
78
  harbor project "NAME" --program P [--lead me|NAME] [--starts DATE]
79
79
  [--ends DATE] [--budget N]
80
- harbor add "TITLE" --project P [--assignee me|NAME] [--due DATE]
80
+ harbor add "TITLE" --project P [--assignee me|none|NAME] [--due DATE]
81
81
  [--priority low|medium|high|urgent] [--status S]
82
82
  [--over-limit]
83
83
  harbor start TASK | review TASK | done TASK [--confirm] [--over-limit]
@@ -97,6 +97,7 @@ export const HELP = `harbor: Harbor from the terminal
97
97
  harbor risks [words] [--kind risk,issue,decision] [--project P] [--closed]
98
98
  the register, worst first
99
99
  (--closed adds closed ones)
100
+ harbor brief [--portfolio P] the weekly brief, ready to send
100
101
  harbor premortem PROJECT ["WHAT WENT WRONG"] [--start]
101
102
  a project's pre-mortem: start,
102
103
  answer or read it
@@ -490,7 +491,7 @@ export async function run(argv, io = {}) {
490
491
  if (!hasFullAccess(creds)) {
491
492
  out(
492
493
  creds
493
- ? "The full-screen app needs full access, as on the website. Signing in again…"
494
+ ? "This sign-in can only read, and the full-screen app needs full access, as on the website. Signing in again with full access; the commands will have it too (harbor login --read-only goes back to reading only)…"
494
495
  : "Signing in first…",
495
496
  );
496
497
  const code = await run(
@@ -934,11 +935,15 @@ export async function run(argv, io = {}) {
934
935
  return 0;
935
936
  }
936
937
  const as = r.role === "viewer" ? "someone who can view (not change)" : "crew who can edit";
938
+ const again = r.again
939
+ ? `${r.email} was already invited; the earlier link has stopped working and this one replaces it.\n`
940
+ : "";
937
941
  out(
938
942
  plain(
939
- r.sent
940
- ? `Invited ${r.email} to ${r.harbor} as ${as}. Harbor emailed them the invite; they join on the website or with harbor login.`
941
- : `Made an invite for ${r.email} to ${r.harbor} as ${as}, but Harbor didn't email it (it sends invites once your own email address is confirmed). Send them this link yourself:\n\n ${r.link}`,
943
+ again +
944
+ (r.sent
945
+ ? `Invited ${r.email} to ${r.harbor} as ${as}. Harbor emailed them the invite; they join on the website or with harbor login.`
946
+ : `Made an invite for ${r.email} to ${r.harbor} as ${as}, but Harbor didn't email it (it sends invites once your own email address is confirmed). Send them this link yourself:\n\n ${r.link}`),
942
947
  ),
943
948
  );
944
949
  return 0;
@@ -966,7 +971,7 @@ export async function run(argv, io = {}) {
966
971
  }
967
972
  out(
968
973
  plain(
969
- `${values.new ? "A new calendar link" : "Your calendar link"} for ${what}${values.new ? " (the old one has stopped working)" : ""}:\n\n ${r.url}\n\nAdd it to Google, Apple or Outlook calendar as a calendar from a URL. Anyone with the link can see these dates; harbor calendar --new swaps it for a fresh one.`,
974
+ `${values.new ? "A new calendar link" : r.fresh ? "A new calendar link (none was on)" : "Your calendar link"} for ${what}${values.new ? " (the old one has stopped working)" : ""}:\n\n ${r.url}\n\nAdd it to Google, Apple or Outlook calendar as a calendar from a URL. Anyone with the link can see these dates; harbor calendar --new swaps it for a fresh one.`,
970
975
  ),
971
976
  );
972
977
  return 0;
@@ -982,7 +987,8 @@ export async function run(argv, io = {}) {
982
987
  harbor,
983
988
  project: values.project,
984
989
  title: text(positionals, "the task"),
985
- assignee: values.assignee,
990
+ // Yours unless you say otherwise, as with n in the app.
991
+ assignee: values.assignee ?? "me",
986
992
  due: dueDate(values.due),
987
993
  priority: values.priority,
988
994
  status: values.status,
@@ -1009,6 +1015,9 @@ export async function run(argv, io = {}) {
1009
1015
  [
1010
1016
  `${r.updated.title}: ${{ doing: "started", review: "in review", done: "done" }[status]}.`,
1011
1017
  r.queuedNext ? `Next one: ${taskLine(r.queuedNext, opts)}` : "",
1018
+ r.projectFinished
1019
+ ? `That was the last open task in ${r.projectFinished}. Mark the project Done in the app (harbor) or on the website.`
1020
+ : "",
1012
1021
  ]
1013
1022
  .filter(Boolean)
1014
1023
  .join("\n"),
@@ -1099,6 +1108,11 @@ export async function run(argv, io = {}) {
1099
1108
  (r) => raidList(r, positionals.join(" ")),
1100
1109
  );
1101
1110
  }
1111
+ case "brief": {
1112
+ const { positionals, values, harbor } = parse(spec([], ["portfolio"]));
1113
+ none(positionals);
1114
+ return call("weekly_brief", { harbor, portfolio: values.portfolio }, (r) => r.text);
1115
+ }
1102
1116
  case "premortem": {
1103
1117
  const { positionals, values, harbor } = parse(spec(["start"]));
1104
1118
  const [project, ...words] = positionals;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harborppm/cli",
3
- "version": "0.20.1",
3
+ "version": "0.22.0",
4
4
  "description": "Harbor from the terminal: a full-screen app with everything, plus commands for scripts and agents.",
5
5
  "keywords": [
6
6
  "harbor",