Skip to content

Commit

Permalink
create a script to generate documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarektouati committed Oct 21, 2023
1 parent 7843e66 commit c594afa
Show file tree
Hide file tree
Showing 17 changed files with 1,400 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/.nojekyll
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.
264 changes: 264 additions & 0 deletions docs/classes/Command.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
# Class: Command

## 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
95 changes: 95 additions & 0 deletions docs/classes/InputHandler.md
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)
Loading

0 comments on commit c594afa

Please sign in to comment.