-
-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify cli options and API in README #445
Open
Tarektouati
wants to merge
4
commits into
open-cli-tools:main
Choose a base branch
from
Tarektouati:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,264 @@ | ||
# Class: Command | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved to separate folder Updated links in the |
||
|
||
## Implements | ||
|
||
- `CommandInfo` | ||
|
||
## Table of contents | ||
|
||
### Constructors | ||
|
||
- [constructor](Command.md#constructor) | ||
|
||
### Properties | ||
|
||
- [close](Command.md#close) | ||
- [command](Command.md#command) | ||
- [cwd](Command.md#cwd) | ||
- [env](Command.md#env) | ||
- [error](Command.md#error) | ||
- [exited](Command.md#exited) | ||
- [index](Command.md#index) | ||
- [killProcess](Command.md#killprocess) | ||
- [killed](Command.md#killed) | ||
- [name](Command.md#name) | ||
- [pid](Command.md#pid) | ||
- [prefixColor](Command.md#prefixcolor) | ||
- [process](Command.md#process) | ||
- [spawn](Command.md#spawn) | ||
- [spawnOpts](Command.md#spawnopts) | ||
- [stderr](Command.md#stderr) | ||
- [stdin](Command.md#stdin) | ||
- [stdout](Command.md#stdout) | ||
- [timer](Command.md#timer) | ||
|
||
### Accessors | ||
|
||
- [killable](Command.md#killable) | ||
|
||
### Methods | ||
|
||
- [kill](Command.md#kill) | ||
- [start](Command.md#start) | ||
- [canKill](Command.md#cankill) | ||
|
||
## Constructors | ||
|
||
### constructor | ||
|
||
• **new Command**(`«destructured»`, `spawnOpts`, `spawn`, `killProcess`) | ||
|
||
#### Parameters | ||
|
||
| Name | Type | | ||
| :--------------- | :------------------------------------ | | ||
| `«destructured»` | `CommandInfo` & { `index`: `number` } | | ||
| `spawnOpts` | `SpawnOptions` | | ||
| `spawn` | `SpawnCommand` | | ||
| `killProcess` | `KillProcess` | | ||
|
||
## Properties | ||
|
||
### close | ||
|
||
• `Readonly` **close**: `Subject`<[`CloseEvent`](../interfaces/CloseEvent.md)\> | ||
|
||
--- | ||
|
||
### command | ||
|
||
• `Readonly` **command**: `string` | ||
|
||
**`Inherit Doc`** | ||
|
||
#### Implementation of | ||
|
||
CommandInfo.command | ||
|
||
--- | ||
|
||
### cwd | ||
|
||
• `Optional` `Readonly` **cwd**: `string` | ||
|
||
**`Inherit Doc`** | ||
|
||
#### Implementation of | ||
|
||
CommandInfo.cwd | ||
|
||
--- | ||
|
||
### env | ||
|
||
• `Readonly` **env**: `Record`<`string`, `unknown`\> | ||
|
||
**`Inherit Doc`** | ||
|
||
#### Implementation of | ||
|
||
CommandInfo.env | ||
|
||
--- | ||
|
||
### error | ||
|
||
• `Readonly` **error**: `Subject`<`unknown`\> | ||
|
||
--- | ||
|
||
### exited | ||
|
||
• **exited**: `boolean` = `false` | ||
|
||
--- | ||
|
||
### index | ||
|
||
• `Readonly` **index**: `number` | ||
|
||
--- | ||
|
||
### killProcess | ||
|
||
• `Private` `Readonly` **killProcess**: `KillProcess` | ||
|
||
--- | ||
|
||
### killed | ||
|
||
• **killed**: `boolean` = `false` | ||
|
||
--- | ||
|
||
### name | ||
|
||
• `Readonly` **name**: `string` | ||
|
||
**`Inherit Doc`** | ||
|
||
#### Implementation of | ||
|
||
CommandInfo.name | ||
|
||
--- | ||
|
||
### pid | ||
|
||
• `Optional` **pid**: `number` | ||
|
||
--- | ||
|
||
### prefixColor | ||
|
||
• `Optional` `Readonly` **prefixColor**: `string` | ||
|
||
**`Inherit Doc`** | ||
|
||
#### Implementation of | ||
|
||
CommandInfo.prefixColor | ||
|
||
--- | ||
|
||
### process | ||
|
||
• `Optional` **process**: `ChildProcess` | ||
|
||
--- | ||
|
||
### spawn | ||
|
||
• `Private` `Readonly` **spawn**: `SpawnCommand` | ||
|
||
--- | ||
|
||
### spawnOpts | ||
|
||
• `Private` `Readonly` **spawnOpts**: `SpawnOptions` | ||
|
||
--- | ||
|
||
### stderr | ||
|
||
• `Readonly` **stderr**: `Subject`<`Buffer`\> | ||
|
||
--- | ||
|
||
### stdin | ||
|
||
• `Optional` **stdin**: `Writable` | ||
|
||
--- | ||
|
||
### stdout | ||
|
||
• `Readonly` **stdout**: `Subject`<`Buffer`\> | ||
|
||
--- | ||
|
||
### timer | ||
|
||
• `Readonly` **timer**: `Subject`<[`TimerEvent`](../interfaces/TimerEvent.md)\> | ||
|
||
## Accessors | ||
|
||
### killable | ||
|
||
• `get` **killable**(): `boolean` | ||
|
||
#### Returns | ||
|
||
`boolean` | ||
|
||
**`Deprecated`** | ||
|
||
## Methods | ||
|
||
### kill | ||
|
||
▸ **kill**(`code?`): `void` | ||
|
||
Kills this command, optionally specifying a signal to send to it. | ||
|
||
#### Parameters | ||
|
||
| Name | Type | | ||
| :------ | :------- | | ||
| `code?` | `string` | | ||
|
||
#### Returns | ||
|
||
`void` | ||
|
||
--- | ||
|
||
### start | ||
|
||
▸ **start**(): `void` | ||
|
||
Starts this command, piping output, error and close events onto the corresponding observables. | ||
|
||
#### Returns | ||
|
||
`void` | ||
|
||
--- | ||
|
||
### canKill | ||
|
||
▸ `Static` **canKill**(`command`): command is Command & Object | ||
|
||
Detects whether a command can be killed. | ||
|
||
Also works as a type guard on the input `command`. | ||
|
||
#### Parameters | ||
|
||
| Name | Type | | ||
| :-------- | :---------------------- | | ||
| `command` | [`Command`](Command.md) | | ||
|
||
#### Returns | ||
|
||
command is Command & Object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# Class: InputHandler | ||
|
||
Sends input from concurrently through to commands. | ||
|
||
Input can start with a command identifier, in which case it will be sent to that specific command. | ||
For instance, `0:bla` will send `bla` to command at index `0`, and `server:stop` will send `stop` | ||
to command with name `server`. | ||
|
||
If the input doesn't start with a command identifier, it is then always sent to the default target. | ||
|
||
## Implements | ||
|
||
- [`FlowController`](../interfaces/FlowController.md) | ||
|
||
## Table of contents | ||
|
||
### Constructors | ||
|
||
- [constructor](InputHandler.md#constructor) | ||
|
||
### Properties | ||
|
||
- [defaultInputTarget](InputHandler.md#defaultinputtarget) | ||
- [inputStream](InputHandler.md#inputstream) | ||
- [logger](InputHandler.md#logger) | ||
- [pauseInputStreamOnFinish](InputHandler.md#pauseinputstreamonfinish) | ||
|
||
### Methods | ||
|
||
- [handle](InputHandler.md#handle) | ||
|
||
## Constructors | ||
|
||
### constructor | ||
|
||
• **new InputHandler**(`«destructured»`) | ||
|
||
#### Parameters | ||
|
||
| Name | Type | | ||
| :---------------------------- | :----------------------------------------------------- | | ||
| `«destructured»` | `Object` | | ||
| › `defaultInputTarget?` | [`CommandIdentifier`](../modules.md#commandidentifier) | | ||
| › `inputStream?` | `Readable` | | ||
| › `logger` | [`Logger`](Logger.md) | | ||
| › `pauseInputStreamOnFinish?` | `boolean` | | ||
|
||
## Properties | ||
|
||
### defaultInputTarget | ||
|
||
• `Private` `Readonly` **defaultInputTarget**: [`CommandIdentifier`](../modules.md#commandidentifier) | ||
|
||
--- | ||
|
||
### inputStream | ||
|
||
• `Private` `Optional` `Readonly` **inputStream**: `Readable` | ||
|
||
--- | ||
|
||
### logger | ||
|
||
• `Private` `Readonly` **logger**: [`Logger`](Logger.md) | ||
|
||
--- | ||
|
||
### pauseInputStreamOnFinish | ||
|
||
• `Private` `Readonly` **pauseInputStreamOnFinish**: `boolean` | ||
|
||
## Methods | ||
|
||
### handle | ||
|
||
▸ **handle**(`commands`): `Object` | ||
|
||
#### Parameters | ||
|
||
| Name | Type | | ||
| :--------- | :------------------------ | | ||
| `commands` | [`Command`](Command.md)[] | | ||
|
||
#### Returns | ||
|
||
`Object` | ||
|
||
| Name | Type | | ||
| :---------- | :-------------------------- | | ||
| `commands` | [`Command`](Command.md)[] | | ||
| `onFinish?` | () => `undefined` \| `void` | | ||
|
||
#### Implementation of | ||
|
||
[FlowController](../interfaces/FlowController.md).[handle](../interfaces/FlowController.md#handle) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is generated by
typedoc