Skip to content

Commit a7f8771

Browse files
authored
Implement statsContainers command (#255)
1 parent e5180d6 commit a7f8771

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/vscode-container-client/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.2.1 - 11 March 2025
2+
### Added
3+
* Added the container stats command. This would previously always throw a `CommandNotSupportedError`. However, the typing has changed to a `VoidCommandResponse`. [#254](https://github.com/microsoft/vscode-docker-extensibility/issues/254)
4+
15
## 0.2.0 - 10 February 2025
26
### Added
37
* Added a client for Podman. [#221](https://github.com/microsoft/vscode-docker-extensibility/issues/221)

packages/vscode-container-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@microsoft/vscode-container-client",
33
"author": "Microsoft Corporation",
4-
"version": "0.2.0",
4+
"version": "0.2.1",
55
"description": "Extensibility model for implementing container runtime providers (shared by VS and VS Code)",
66
"license": "See LICENSE in the project root for license information.",
77
"repository": {

packages/vscode-container-client/src/clients/DockerClientBase/DockerClientBase.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -990,16 +990,11 @@ export abstract class DockerClientBase extends ConfigurableClient implements ICo
990990
)();
991991
}
992992

993-
protected async parseStatsContainersCommandArgs(
994-
options: ContainersStatsCommandOptions,
995-
output: string,
996-
strict: boolean,
997-
): Promise<string> {
998-
return output;
999-
}
1000-
1001-
async statsContainers(options: ContainersStatsCommandOptions): Promise<PromiseCommandResponse<string>> {
1002-
throw new CommandNotSupportedError('statsContainers is not supported for this runtime');
993+
async statsContainers(options: ContainersStatsCommandOptions): Promise<VoidCommandResponse> {
994+
return {
995+
command: this.commandName,
996+
args: this.getStatsContainersCommandArgs(options),
997+
};
1003998
}
1004999

10051000
//#endregion

packages/vscode-container-client/src/contracts/ContainerClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,7 @@ type ContainersStatsCommand = {
11951195
* Show running container stats
11961196
* @param options Command options
11971197
*/
1198-
statsContainers(options: ContainersStatsCommandOptions): Promise<PromiseCommandResponse<string>>;
1198+
statsContainers(options: ContainersStatsCommandOptions): Promise<VoidCommandResponse>;
11991199
};
12001200

12011201
// #endregion

0 commit comments

Comments
 (0)