Skip to content

Commit

Permalink
Adding downOne and downMany, renamed down to downAll
Browse files Browse the repository at this point in the history
  • Loading branch information
tombomb authored Feb 19, 2024
1 parent 1f75d78 commit b5581a9
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions src/v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,28 @@ export const upOne = function (
return execCompose('up', args, options)
}

export const down = function (
export const downAll = function (
options?: IDockerComposeOptions
): Promise<IDockerComposeResult> {
return execCompose('down', [], options)
}

export const downMany = function (
services: string[],
options?: IDockerComposeOptions
): Promise<IDockerComposeResult> {
const args = services;

Check failure on line 318 in src/v2.ts

View workflow job for this annotation

GitHub Actions / Lint

Delete `;`
return execCompose('down', args, options);

Check failure on line 319 in src/v2.ts

View workflow job for this annotation

GitHub Actions / Lint

Delete `;`
}

export const downOne = function (
service: string,
options?: IDockerComposeOptions
): Promise<IDockerComposeResult> {
const args = [service];

Check failure on line 326 in src/v2.ts

View workflow job for this annotation

GitHub Actions / Lint

Delete `;`
return execCompose('down', args, options);

Check failure on line 327 in src/v2.ts

View workflow job for this annotation

GitHub Actions / Lint

Delete `;`
}

export const stop = function (
options?: IDockerComposeOptions
): Promise<IDockerComposeResult> {
Expand Down Expand Up @@ -566,7 +582,9 @@ export default {
upAll,
upMany,
upOne,
down,
downAll,
downOne,
downMany,
stop,
stopOne,
stopMany,
Expand Down

0 comments on commit b5581a9

Please sign in to comment.