Skip to content

Commit 832df69

Browse files
committed
fix: type definition
1 parent 8588759 commit 832df69

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nerdctl",
3-
"version": "0.1.7",
3+
"version": "0.1.8",
44
"main": "dist/index.js",
55
"types": "dist/index.d.ts",
66
"description": "Node wrapper for nerdctl",

src/types/container.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export interface StopCommandFlags extends GlobalFlags {
6969
time?: string;
7070
}
7171

72-
export interface RmCommandFlags extends GlobalFlags {
72+
export interface RemoveCommandFlags extends GlobalFlags {
7373
force?: boolean;
7474
volumes?: boolean;
7575
}

src/types/images.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { GlobalFlags } from "./global";
2+
13
export interface ImageResult {
24
CreatedAt: string;
35
CreatedSince: string;
@@ -9,3 +11,8 @@ export interface ImageResult {
911
BlobSize: string;
1012
Platform: string;
1113
}
14+
15+
export interface RemoveImageCommandFlags extends GlobalFlags {
16+
async?: boolean;
17+
force?: boolean;
18+
}

src/vms/base.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { Architecture, ExecResult } from "@/types";
22
import { ExecOptions, ShellString, exec } from "shelljs";
3+
import { ImageResult, RemoveImageCommandFlags } from "@/types/images";
34
import {
45
LogsCommandFlags,
5-
RmCommandFlags,
6+
RemoveCommandFlags,
67
RunCommandFlags,
78
StopCommandFlags,
89
} from "@/types/container";
910

1011
import { ChildProcess } from "child_process";
1112
import { GlobalFlags } from "@/types/global";
12-
import { ImageResult } from "@/types/images";
1313
import { LoginCommandFlags } from "@/types/registry";
1414
import { paramCase } from "change-case";
1515
import { platform } from "@/utils";
@@ -119,7 +119,7 @@ export default abstract class BaseBackend {
119119

120120
async remove(
121121
container: string | string[],
122-
flags?: RmCommandFlags
122+
flags?: RemoveCommandFlags
123123
): Promise<ShellString> {
124124
const containers = Array.isArray(container)
125125
? container.join(" ")
@@ -168,7 +168,7 @@ export default abstract class BaseBackend {
168168

169169
async removeImage(
170170
image: string | string[],
171-
flags?: RunCommandFlags
171+
flags?: RemoveImageCommandFlags
172172
): Promise<ShellString> {
173173
const images = Array.isArray(image) ? image.join(" ") : image;
174174

0 commit comments

Comments
 (0)