From 06ef90dad51fd9ec20097fb8de388ad18b1b2f23 Mon Sep 17 00:00:00 2001 From: Cristian Dominguez <6853656+cristiand391@users.noreply.github.com> Date: Thu, 25 Jan 2024 21:24:11 -0300 Subject: [PATCH] feat: `--body` supports reading from STDIN (#23) If you do `flag.allowStdin: true` then oclif will read from stdin for you if the value is `-`, so there's no way to know if the flag value came from stdin or the user specified a file path (here we need to read the file). I don't like having another specific flag just to read from stdin so I made this a string flag and handle reading from stdin/file in `flag.parse`. also: * made `got` not follow redirects (use `--include` flag and check the `Location` header if need that). * bumped deps --- README.md | 5 +- package.json | 27 +- src/commands/org/api.ts | 37 +- test/commands/org/api.test.ts | 37 +- yarn.lock | 2728 ++++++++++++++++++++++++--------- 5 files changed, 2072 insertions(+), 762 deletions(-) diff --git a/README.md b/README.md index 3c8937d..9d4b4d7 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,9 @@ FLAGS -X, --method=