Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $ npm install -g @hackmd/hackmd-cli
$ hackmd-cli COMMAND
running command...
$ hackmd-cli (-v|--version|version)
@hackmd/hackmd-cli/2.0.1 darwin-arm64 node-v17.7.0
@hackmd/hackmd-cli/2.0.2 darwin-arm64 node-v17.7.0
$ hackmd-cli --help [COMMAND]
USAGE
$ hackmd-cli COMMAND
Expand Down Expand Up @@ -131,7 +131,7 @@ EXAMPLE
# A note to be exported
```

_See code: [src/commands/export.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.1/src/commands/export.ts)_
_See code: [src/commands/export.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.2/src/commands/export.ts)_

## `hackmd-cli help [COMMAND]`

Expand Down Expand Up @@ -177,7 +177,7 @@ EXAMPLE
BnC6gN0_TfStV2KKmPPXeg Welcome to your team's workspace null CLI-test
```

_See code: [src/commands/history.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.1/src/commands/history.ts)_
_See code: [src/commands/history.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.2/src/commands/history.ts)_

## `hackmd-cli login`

Expand All @@ -198,7 +198,7 @@ EXAMPLE
Login successfully
```

_See code: [src/commands/login.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.1/src/commands/login.ts)_
_See code: [src/commands/login.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.2/src/commands/login.ts)_

## `hackmd-cli logout`

Expand All @@ -217,7 +217,7 @@ EXAMPLE
You've logged out successfully
```

_See code: [src/commands/logout.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.1/src/commands/logout.ts)_
_See code: [src/commands/logout.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.2/src/commands/logout.ts)_

## `hackmd-cli notes`

Expand Down Expand Up @@ -246,7 +246,7 @@ EXAMPLE
raUuSTetT5uQbqQfLnz9lA CLI test note gvfz2UB5THiKABQJQnLs6Q null
```

_See code: [src/commands/notes/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.1/src/commands/notes/index.ts)_
_See code: [src/commands/notes/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.2/src/commands/notes/index.ts)_

## `hackmd-cli notes:create`

Expand Down Expand Up @@ -281,7 +281,7 @@ EXAMPLES
cat README.md | hackmd-cli notes create
```

_See code: [src/commands/notes/create.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.1/src/commands/notes/create.ts)_
_See code: [src/commands/notes/create.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.2/src/commands/notes/create.ts)_

## `hackmd-cli notes:delete`

Expand All @@ -299,7 +299,7 @@ EXAMPLE
$ hackmd-cli notes delete --noteId=WNkLM6gkS0Cg2cQ8rv7bYA
```

_See code: [src/commands/notes/delete.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.1/src/commands/notes/delete.ts)_
_See code: [src/commands/notes/delete.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.2/src/commands/notes/delete.ts)_

## `hackmd-cli notes:update`

Expand All @@ -318,7 +318,7 @@ EXAMPLE
$ hackmd-cli notes update --noteId=WNkLM6gkS0Cg2cQ8rv7bYA --content='# A new title'
```

_See code: [src/commands/notes/update.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.1/src/commands/notes/update.ts)_
_See code: [src/commands/notes/update.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.2/src/commands/notes/update.ts)_

## `hackmd-cli team-notes`

Expand Down Expand Up @@ -348,7 +348,7 @@ EXAMPLE
BnC6gN0_TfStV2KKmPPXeg Welcome to your team's workspace null CLI-test
```

_See code: [src/commands/team-notes/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.1/src/commands/team-notes/index.ts)_
_See code: [src/commands/team-notes/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.2/src/commands/team-notes/index.ts)_

## `hackmd-cli team-notes:create`

Expand Down Expand Up @@ -385,7 +385,7 @@ EXAMPLES
cat README.md | hackmd-cli notes create --teamPath=CLI-test
```

_See code: [src/commands/team-notes/create.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.1/src/commands/team-notes/create.ts)_
_See code: [src/commands/team-notes/create.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.2/src/commands/team-notes/create.ts)_

## `hackmd-cli team-notes:delete`

Expand All @@ -404,7 +404,7 @@ EXAMPLE
$ hackmd-cli team-notes delete --teamPath=CLI-test --noteId=WNkLM6gkS0Cg2cQ8rv7bYA
```

_See code: [src/commands/team-notes/delete.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.1/src/commands/team-notes/delete.ts)_
_See code: [src/commands/team-notes/delete.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.2/src/commands/team-notes/delete.ts)_

## `hackmd-cli team-notes:update`

Expand All @@ -424,7 +424,7 @@ EXAMPLE
$ hackmd-cli team-notes update --teamPath=CLI-test --noteId=WNkLM6gkS0Cg2cQ8rv7bYA --content='# A new title'
```

_See code: [src/commands/team-notes/update.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.1/src/commands/team-notes/update.ts)_
_See code: [src/commands/team-notes/update.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.2/src/commands/team-notes/update.ts)_

## `hackmd-cli teams`

Expand Down Expand Up @@ -452,7 +452,7 @@ EXAMPLE
f76308a6-d77a-41f6-86d0-8ada426a6fb4 CLI test team CLI-test 82f7f3d9-4079-4c78-8a00-14094272ece9
```

_See code: [src/commands/teams.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.1/src/commands/teams.ts)_
_See code: [src/commands/teams.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.2/src/commands/teams.ts)_

## `hackmd-cli version`

Expand Down Expand Up @@ -489,7 +489,7 @@ EXAMPLE
82f7f3d9-4079-4c78-8a00-14094272ece9 Ming-Hsiu Tsai null gvfz2UB5THiKABQJQnLs6Q
```

_See code: [src/commands/whoami.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.1/src/commands/whoami.ts)_
_See code: [src/commands/whoami.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.0.2/src/commands/whoami.ts)_
<!-- commandsstop -->

## License
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hackmd/hackmd-cli",
"version": "2.0.1",
"version": "2.0.2",
"author": "HackMD Team",
"bin": {
"hackmd-cli": "./bin/run"
Expand Down
4 changes: 2 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export function setAccessTokenConfig(token: string) {

export function safeStdinRead() {
let result
const STDIN_FD = 0
try {
result = fs.readFileSync(process.stdin.fd).toString()
result = fs.readFileSync(STDIN_FD).toString()
} catch {}

return result
}