@workover/cli 0.11.1 → 0.12.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 (2) hide show
  1. package/bin/workover.mjs +7 -1
  2. package/package.json +1 -1
package/bin/workover.mjs CHANGED
@@ -759,6 +759,7 @@ const DOC_USAGE = [
759
759
  ' [--file <path> | piped stdin] [--json]',
760
760
  ' propose <docId> [--note "<why>"] suggest a rewrite for review',
761
761
  ' [--file <path> | piped stdin] [--json] [--tab <tabId>]',
762
+ ' [--why "<what was wrong>"] recorded as its reasoning',
762
763
  ' write <docId> [--note "<why>"] REPLACE the body, no review step',
763
764
  ' [--file <path> | piped stdin] [--json] [--tab <tabId>]',
764
765
  ' needs `workover login --write`; use it only when asked to',
@@ -1021,7 +1022,8 @@ async function docCommand() {
1021
1022
  }
1022
1023
 
1023
1024
  if (sub === 'propose') {
1024
- const usage = 'workover doc propose <docId> --file <path> [--note "<why>"]';
1025
+ const usage =
1026
+ 'workover doc propose <docId> --file <path> [--note "<summary>"] [--why "<what was wrong>"]';
1025
1027
  const docId = docIdArg(positionals, usage);
1026
1028
  const markdown = (await readBody(flags)).trim();
1027
1029
  if (!markdown) {
@@ -1036,6 +1038,10 @@ async function docCommand() {
1036
1038
  note: typeof flags.note === 'string' ? flags.note : undefined,
1037
1039
  source: 'Workover CLI',
1038
1040
  ...(tabId === null ? {} : { tabId }),
1041
+ // "Why this change": what was wrong, shown to the reviewer beside the suggestion. Optional.
1042
+ ...(typeof flags.why === 'string' && flags.why.trim()
1043
+ ? { rationale: { problem: flags.why.trim() } }
1044
+ : {}),
1039
1045
  });
1040
1046
  if (asJson) return console.log(JSON.stringify(res, null, 2));
1041
1047
  console.log(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workover/cli",
3
- "version": "0.11.1",
3
+ "version": "0.12.0",
4
4
  "description": "Workover command line — sign in and cowork on your documents from the terminal.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "ScaleMath",