Update generated reference docs with extension API 0.3.3 (Desktop 4.16) (#16520)

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
Guillaume Tardif 2023-01-18 10:16:20 +01:00 committed by GitHub
parent 9589931d27
commit cd58a17552
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 235 additions and 87 deletions

View File

@ -21,6 +21,8 @@ skip_read_time: true
- [Dialog](interfaces/Dialog.md)
- [Docker](interfaces/Docker.md)
- [DockerCommand](interfaces/DockerCommand.md)
- [ExecOptions](interfaces/ExecOptions.md)
- [SpawnOptions](interfaces/SpawnOptions.md)
- [Exec](interfaces/Exec.md)
- [ExecProcess](interfaces/ExecProcess.md)
- [ExecStreamOptions](interfaces/ExecStreamOptions.md)

View File

@ -20,7 +20,9 @@ const output = await window.ddClient.backend.execInContainer(container, cmd);
console.log(output);
```
**`deprecated`** :warning: It will be removed in a future version.
**`Deprecated`**
:warning: It will be removed in a future version.
#### Parameters
@ -49,7 +51,9 @@ window.ddClient.backend
.then((value: any) => console.log(value));
```
**`deprecated`** :warning: It will be removed in a future version. Use [HttpService.get](HttpService.md#get) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [get](HttpService.md#get) instead.
#### Parameters
@ -75,7 +79,9 @@ window.ddClient.backend
.then((value: any) => console.log(value));
```
**`deprecated`** :warning: It will be removed in a future version. Use [HttpService.post](HttpService.md#post) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [post](HttpService.md#post) instead.
#### Parameters
@ -102,7 +108,9 @@ window.ddClient.backend
.then((value: any) => console.log(value));
```
**`deprecated`** :warning: It will be removed in a future version. Use [HttpService.put](HttpService.md#put) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [put](HttpService.md#put) instead.
#### Parameters
@ -129,7 +137,9 @@ window.ddClient.backend
.then((value: any) => console.log(value));
```
**`deprecated`** :warning: It will be removed in a future version. Use [HttpService.patch](HttpService.md#patch) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [patch](HttpService.md#patch) instead.
#### Parameters
@ -156,7 +166,9 @@ window.ddClient.backend
.then((value: any) => console.log(value));
```
**`deprecated`** :warning: It will be removed in a future version. Use [HttpService.delete](HttpService.md#delete) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [delete](HttpService.md#delete) instead.
#### Parameters
@ -182,7 +194,9 @@ window.ddClient.backend
.then((value: any) => console.log(value));
```
**`deprecated`** :warning: It will be removed in a future version. Use [HttpService.head](HttpService.md#head) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [head](HttpService.md#head) instead.
#### Parameters
@ -208,7 +222,9 @@ window.ddClient.backend
.then((value: any) => console.log(value));
```
**`deprecated`** :warning: It will be removed in a future version. Use [HttpService.request](HttpService.md#request) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [request](HttpService.md#request) instead.
#### Parameters
@ -239,7 +255,9 @@ const output = await window.ddClient.backend.execInVMExtension(
console.log(output);
```
**`deprecated`** :warning: It will be removed in a future version. Use [ExtensionCli.exec](ExtensionCli.md#exec) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [exec](ExtensionCli.md#exec) instead.
#### Parameters
@ -273,7 +291,9 @@ window.ddClient.spawnInVMExtension(
);
```
**`deprecated`** :warning: It will be removed in a future version. Use {@link ExtensionCli.spawn} instead.
**`Deprecated`**
:warning: It will be removed in a future version.
#### Parameters

View File

@ -6,7 +6,9 @@ skip_read_time: true
# Interface: DesktopUI
**`since`** 0.2.0
**`Since`**
0.2.0
## Properties

View File

@ -8,7 +8,9 @@ skip_read_time: true
Allows opening native dialog boxes.
**`since`** 0.2.3
**`Since`**
0.2.3
## Methods

View File

@ -6,7 +6,9 @@ skip_read_time: true
# Interface: Docker
**`since`** 0.2.0
**`Since`**
0.2.0
## Properties
@ -81,9 +83,9 @@ const containers = await ddClient.docker.listContainers();
#### Parameters
| Name | Type | Description |
|:-----------|:------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `options?` | `any` | (Optional). A JSON like `{ "all": true, "limit": 10, "size": true, "filters": JSON.stringify({ status: ["exited"] }), }` For more information about the different properties see [the Docker API endpoint documentation](../../../../../../engine/api/v1.37.md#operation/ContainerList). |
| Name | Type | Description |
| :------ | :------ | :------ |
| `options?` | `any` | (Optional). A JSON like `{ "all": true, "limit": 10, "size": true, "filters": JSON.stringify({ status: ["exited"] }), }` For more information about the different properties see [the Docker API endpoint documentation](https://docs.docker.com/engine/api/v1.41/#operation/ContainerList). |
#### Returns
@ -103,9 +105,9 @@ const images = await ddClient.docker.listImages();
#### Parameters
| Name | Type | Description |
|:-----------|:------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `options?` | `any` | (Optional). A JSON like `{ "all": true, "filters": JSON.stringify({ dangling: ["true"] }), "digests": true }` For more information about the different properties see [the Docker API endpoint documentation](../../../../../../engine/api/v1.37.md#tag/Image). |
| Name | Type | Description |
| :------ | :------ | :------ |
| `options?` | `any` | (Optional). A JSON like `{ "all": true, "filters": JSON.stringify({ dangling: ["true"] }), "digests": true * }` * * For more information about the different properties see [the Docker API endpoint documentation](https://docs.docker.com/engine/api/v1.41/#tag/Image). |
#### Returns

View File

@ -6,7 +6,9 @@ skip_read_time: true
# Interface: DockerCommand
**`since`** 0.2.0
**`Since`**
0.2.0
## Properties

View File

@ -20,7 +20,9 @@ The `window.ddClient.backend` object can be used to communicate with the backend
the extension metadata.
The client is already connected to the backend.
**`deprecated`** :warning: It will be removed in a future version. Use [DockerDesktopClient.extension](DockerDesktopClient.md#extension) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [extension](DockerDesktopClient.md#extension) instead.
#### Inherited from
@ -85,13 +87,15 @@ You can use the option `{"all": true}` to list all the running and stopped conta
const containers = await window.ddClient.listContainers();
```
**`deprecated`** :warning: It will be removed in a future version. Use [Docker.listContainers](Docker.md#listcontainers) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [listContainers](Docker.md#listcontainers) instead.
#### Parameters
| Name | Type | Description |
|:----------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `options` | `never` | (Optional). A JSON like `{ "all": true, "limit": 10, "size": true, "filters": JSON.stringify({ status: ["exited"] }), }` For more information about the different properties see [the Docker API endpoint documentation](../../../../../../engine/api/v1.37.md#operation/ContainerList). |
| Name | Type | Description |
| :------ | :------ | :------ |
| `options` | `never` | (Optional). A JSON like `{ "all": true, "limit": 10, "size": true, "filters": JSON.stringify({ status: ["exited"] }), }` For more information about the different properties see [the Docker API endpoint documentation](https://docs.docker.com/engine/api/v1.41/#operation/ContainerList). |
#### Returns
@ -115,13 +119,15 @@ Get the list of images
const images = await window.ddClient.listImages();
```
**`deprecated`** :warning: It will be removed in a future version. Use [Docker.listImages](Docker.md#listimages) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [listImages](Docker.md#listimages) instead.
#### Parameters
| Name | Type | Description |
|:----------|:--------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `options` | `never` | (Optional). A JSON like `{ "all": true, "filters": JSON.stringify({ dangling: ["true"] }), "digests": true }` For more information about the different properties see [the Docker API endpoint documentation](../../../../../../engine/api/v1.37.md#tag/Image). |
| Name | Type | Description |
| :------ | :------ | :------ |
| `options` | `never` | (Optional). A JSON like `{ "all": true, "filters": JSON.stringify({ dangling: ["true"] }), "digests": true }` For more information about the different properties see [the Docker API endpoint documentation](https://docs.docker.com/engine/api/v1.41/#tag/Image). |
#### Returns
@ -144,7 +150,9 @@ Navigate to the containers window in Docker Desktop.
window.ddClient.navigateToContainers();
```
**`deprecated`** :warning: It will be removed in a future version. Use [NavigationIntents.viewContainers](NavigationIntents.md#viewcontainers) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [viewContainers](NavigationIntents.md#viewcontainers) instead.
#### Returns
@ -165,7 +173,9 @@ Navigate to the container window in Docker Desktop.
await window.ddClient.navigateToContainer(id);
```
**`deprecated`** :warning: It will be removed in a future version. Use [NavigationIntents.viewContainer](NavigationIntents.md#viewcontainer) instead.
**`Deprecated`**
:warning: It will be removed in a future version.
#### Parameters
@ -194,7 +204,9 @@ Navigate to the container logs window in Docker Desktop.
await window.ddClient.navigateToContainerLogs(id);
```
**`deprecated`** :warning: It will be removed in a future version. Use {@link DockerDesktopClient.viewContainerLogs} instead.
**`Deprecated`**
:warning: It will be removed in a future version.
#### Parameters
@ -223,7 +235,9 @@ Navigate to the container inspect window in Docker Desktop.
await window.ddClient.navigateToContainerInspect(id);
```
**`deprecated`** :warning: It will be removed in a future version. Use {@link DockerDesktopClient.viewContainerInspect} instead.
**`Deprecated`**
:warning: It will be removed in a future version.
#### Parameters
@ -253,7 +267,9 @@ Navigate to the container stats to see the CPU, memory, disk read/write and netw
await window.ddClient.navigateToContainerStats(id);
```
**`deprecated`** :warning: It will be removed in a future version. Use {@link DockerDesktopClient.viewContainerStats} instead.
**`Deprecated`**
:warning: It will be removed in a future version.
#### Parameters
@ -282,7 +298,9 @@ Navigate to the images window in Docker Desktop.
await window.ddClient.navigateToImages(id);
```
**`deprecated`** :warning: It will be removed in a future version. Use [NavigationIntents.viewImages](NavigationIntents.md#viewimages) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [viewImages](NavigationIntents.md#viewimages) instead.
#### Returns
@ -305,7 +323,9 @@ In this navigation route you can find the image layers, commands, created time a
await window.ddClient.navigateToImage(id, tag);
```
**`deprecated`** :warning: It will be removed in a future version. Use [NavigationIntents.viewImage](NavigationIntents.md#viewimage) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [viewImage](NavigationIntents.md#viewimage) instead.
#### Parameters
@ -336,7 +356,9 @@ Navigate to the volumes window in Docker Desktop.
await window.ddClient.navigateToVolumes();
```
**`deprecated`** :warning: It will be removed in a future version. Use [NavigationIntents.viewVolumes](NavigationIntents.md#viewvolumes) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [viewVolumes](NavigationIntents.md#viewvolumes) instead.
#### Returns
@ -358,7 +380,9 @@ Navigate to a specific volume in Docker Desktop.
window.ddClient.navigateToVolume(volume);
```
**`deprecated`** :warning: It will be removed in a future version. Use [NavigationIntents.viewVolume](NavigationIntents.md#viewvolume) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [viewVolume](NavigationIntents.md#viewvolume) instead.
#### Parameters
@ -386,7 +410,9 @@ Navigate to the Dev Environments window in Docker Desktop.
window.ddClient.navigateToDevEnvironments();
```
**`deprecated`** :warning: It will be removed in a future version. Use [NavigationIntents.viewDevEnvironments](NavigationIntents.md#viewdevenvironments) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [viewDevEnvironments](NavigationIntents.md#viewdevenvironments) instead.
#### Returns
@ -412,7 +438,9 @@ window.ddClient.execHostCmd(`cliShippedOnHost xxx`).then((cmdResult: any) => {
});
```
**`deprecated`** :warning: It will be removed in a future version. Use [ExtensionCli.exec](ExtensionCli.md#exec) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [exec](ExtensionCli.md#exec) instead.
#### Parameters
@ -450,7 +478,9 @@ window.ddClient.spawnHostCmd(
);
```
**`deprecated`** :warning: It will be removed in a future version. Use [ExtensionCli.exec](ExtensionCli.md#exec) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [exec](ExtensionCli.md#exec) instead.
#### Parameters
@ -472,7 +502,7 @@ ___
### execDockerCmd
**execDockerCmd**(`cmd`, ...`args`): `Promise`<[`ExecResultV0`](ExecResultV0.md)\>
**execDockerCmd**(`cmd`, `...args`): `Promise`<[`ExecResultV0`](ExecResultV0.md)\>
You can also directly execute the docker binary.
@ -480,7 +510,9 @@ You can also directly execute the docker binary.
const output = await window.ddClient.execDockerCmd("info");
```
**`deprecated`** :warning: It will be removed in a future version. Use [DockerCommand.exec](DockerCommand.md#exec) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [exec](DockerCommand.md#exec) instead.
#### Parameters
@ -507,7 +539,7 @@ For convenience, the command result object also has methods to easily parse it d
- `output.parseJsonLines(): any[]` parses each output line as a json object.
If the output of the command is too long, or you need to get the output as a stream you can use the
spawnDockerCmd function:
* spawnDockerCmd function:
```typescript
window.ddClient.spawnDockerCmd("logs", ["-f", "..."], (data, error) => {
@ -525,7 +557,9 @@ ___
**spawnDockerCmd**(`cmd`, `args`, `callback`): `void`
**`deprecated`** :warning: It will be removed in a future version. Use [DockerCommand.exec](DockerCommand.md#exec) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [exec](DockerCommand.md#exec) instead.
#### Parameters
@ -555,7 +589,9 @@ Opens an external URL with the system default browser.
window.ddClient.openExternal("https://docker.com");
```
**`deprecated`** :warning: It will be removed in a future version. Use [Host.openExternal](Host.md#openexternal) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [openExternal](Host.md#openexternal) instead.
#### Parameters
@ -585,7 +621,9 @@ Display a toast message of type success.
window.ddClient.toastSuccess("message");
```
**`deprecated`** :warning: It will be removed in a future version. Use [Toast.success](Toast.md#success) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [success](Toast.md#success) instead.
#### Parameters
@ -613,7 +651,9 @@ Display a toast message of type warning.
window.ddClient.toastWarning("message");
```
**`deprecated`** :warning: It will be removed in a future version. Use [Toast.warning](Toast.md#warning) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [warning](Toast.md#warning) instead.
#### Parameters
@ -641,7 +681,9 @@ Display a toast message of type error.
window.ddClient.toastError("message");
```
**`deprecated`** :warning: It will be removed in a future version. Use [Toast.error](Toast.md#error) instead.
**`Deprecated`**
:warning: It will be removed in a future version. Use [error](Toast.md#error) instead.
#### Parameters

View File

@ -14,7 +14,9 @@ skip_read_time: true
Executes a command.
**`since`** 0.2.0
**`Since`**
0.2.0
#### Parameters
@ -38,7 +40,9 @@ Streams the result of a command if `stream` is specified in the `options` parame
Specify the `stream` if the output of your command is too long or if you need to stream things indefinitely (for example container logs).
**`since`** 0.2.2
**`Since`**
0.2.2
#### Parameters

View File

@ -6,7 +6,9 @@ skip_read_time: true
# Interface: ExecOptions
**`since`** 0.3.0
**`Since`**
0.3.0
## Hierarchy

View File

@ -6,7 +6,9 @@ skip_read_time: true
# Interface: ExecProcess
**`since`** 0.2.3
**`Since`**
0.2.3
## Methods

View File

@ -6,7 +6,9 @@ skip_read_time: true
# Interface: ExecResult
**`since`** 0.2.0
**`Since`**
0.2.0
## Hierarchy

View File

@ -6,28 +6,36 @@ skip_read_time: true
# Interface: ExecStreamOptions
**`since`** 0.2.2
**`Since`**
## Methods
0.2.2
## Properties
### onOutput
`Optional` **onOutput**(`data`): `void`
`Optional` **onOutput**: (`data`: { `stdout`: `string` ; `stderr?`: `undefined` } \| { `stdout?`: `undefined` ; `stderr`: `string` }) => `void`
#### Type declaration
▸ (`data`): `void`
Invoked when receiving output from command execution.
By default, the output is split into chunks at arbitrary boundaries.
If you prefer the output to be split into complete lines, set `splitOutputLines`
to true. The callback is then invoked once for each line.
**`since`** 0.2.0
**`Since`**
#### Parameters
0.2.0
##### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `data` | { `stdout`: `string` ; `stderr?`: `undefined` } \| { `stdout?`: `undefined` ; `stderr`: `string` } | output content. Can include either stdout string, or stderr string, one at a time. |
#### Returns
##### Returns
`void`
@ -35,17 +43,21 @@ ___
### onError
`Optional` **onError**(`error`): `void`
`Optional` **onError**: (`error`: `any`) => `void`
#### Type declaration
▸ (`error`): `void`
Invoked to report error if the executed command errors.
#### Parameters
##### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `error` | `any` | the error happening in the executed command |
#### Returns
##### Returns
`void`
@ -53,21 +65,25 @@ ___
### onClose
`Optional` **onClose**(`exitCode`): `void`
`Optional` **onClose**: (`exitCode`: `number`) => `void`
#### Type declaration
▸ (`exitCode`): `void`
Invoked when process exits.
#### Parameters
##### Parameters
| Name | Type | Description |
| :------ | :------ | :------ |
| `exitCode` | `number` | the process exit code |
#### Returns
##### Returns
`void`
## Properties
___
### splitOutputLines

View File

@ -6,7 +6,9 @@ skip_read_time: true
# Interface: Extension
**`since`** 0.2.0
**`Since`**
0.2.0
## Properties
@ -19,3 +21,13 @@ ___
### host
`Optional` `Readonly` **host**: [`ExtensionHost`](ExtensionHost.md)
___
### image
`Readonly` **image**: `string`
**`Since`**
0.3.3

View File

@ -6,7 +6,9 @@ skip_read_time: true
# Interface: ExtensionCli
**`since`** 0.2.0
**`Since`**
0.2.0
## Properties

View File

@ -6,7 +6,9 @@ skip_read_time: true
# Interface: ExtensionHost
**`since`** 0.2.0
**`Since`**
0.2.0
## Properties

View File

@ -6,7 +6,9 @@ skip_read_time: true
# Interface: ExtensionVM
**`since`** 0.2.0
**`Since`**
0.2.0
## Properties
@ -58,11 +60,17 @@ await ddClient.extension.vm.cli.exec("ls", ["-l"], {
});
```
**`param`** Command to execute.
**`Param`**
**`param`** Arguments of the command to execute.
Command to execute.
**`param`** The callback function where to listen from the command output data and errors.
**`Param`**
Arguments of the command to execute.
**`Param`**
The callback function where to listen from the command output data and errors.
___

View File

@ -6,7 +6,9 @@ skip_read_time: true
# Interface: Host
**`since`** 0.2.0
**`Since`**
0.2.0
## Methods
@ -16,7 +18,9 @@ skip_read_time: true
Opens an external URL with the system default browser.
**`since`** 0.2.0
**`Since`**
0.2.0
```typescript
ddClient.host.openExternal("https://docker.com");
@ -40,7 +44,9 @@ ddClient.host.openExternal("https://docker.com");
Returns a string identifying the operating system platform. See https://nodejs.org/api/os.html#osplatform
**`since`** 0.2.2
**`Since`**
0.2.2
___
@ -50,7 +56,9 @@ ___
Returns the operating system CPU architecture. See https://nodejs.org/api/os.html#osarch
**`since`** 0.2.2
**`Since`**
0.2.2
___
@ -60,4 +68,6 @@ ___
Returns the host name of the operating system. See https://nodejs.org/api/os.html#oshostname
**`since`** 0.2.2
**`Since`**
0.2.2

View File

@ -6,7 +6,9 @@ skip_read_time: true
# Interface: HttpService
**`since`** 0.2.0
**`Since`**
0.2.0
## Methods

View File

@ -6,7 +6,9 @@ skip_read_time: true
# Interface: NavigationIntents
**`since`** 0.2.0
**`Since`**
0.2.0
## Container Methods

View File

@ -6,7 +6,9 @@ skip_read_time: true
# Interface: OpenDialogResult
**`since`** 0.2.3
**`Since`**
0.2.3
## Properties

View File

@ -6,7 +6,9 @@ skip_read_time: true
# Interface: RawExecResult
**`since`** 0.2.0
**`Since`**
0.2.0
## Hierarchy

View File

@ -6,7 +6,9 @@ skip_read_time: true
# Interface: RequestConfig
**`since`** 0.2.0
**`Since`**
0.2.0
## Properties

View File

@ -9,7 +9,9 @@ skip_read_time: true
Error thrown when an HTTP response is received with a status code that falls
out to the range of 2xx.
**`since`** 0.2.0
**`Since`**
0.2.0
## Properties

View File

@ -6,7 +6,9 @@ skip_read_time: true
# Interface: SpawnOptions
**`since`** 0.3.0
**`Since`**
0.3.0
## Hierarchy

View File

@ -10,7 +10,9 @@ Toasts provide a brief notification to the user.
They appear temporarily and shouldn't interrupt the user experience.
They also don't require user input to disappear.
**`since`** 0.2.0
**`Since`**
0.2.0
## Methods