Compare commits

...

3 commits

Author SHA1 Message Date
Daniel Bulant
acb173b0dd Update name 2021-12-12 10:33:03 +01:00
Daniel Bulant
18a9079ee6
Add service 2021-11-30 21:05:59 +01:00
Daniel Bulant
748ba3e368
Fix skipping first container in ps command 2021-11-30 21:00:04 +01:00
2 changed files with 10 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{
"name": "docker-compose",
"version": "0.23.14",
"name": "@iceprod/docker-compose",
"version": "0.24.0",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"types": "dist/index.d.ts",
@ -24,7 +24,7 @@
"test",
"test-tools"
],
"author": "Alexander Zeitler <alexander.zeitler@pdmlab.com>",
"author": "Alexander Zeitler <alexander.zeitler@pdmlab.com>, Daniel Bulan <danbulant@danbulant.eu>",
"contributors": [
{
"name": "Ignatiev Mikhail"
@ -75,6 +75,10 @@
},
{
"name": "gautaz"
},
{
"name": "Daniel Bulant",
"url": "https://github.com/danbulant"
}
],
"license": "MIT",

View file

@ -82,11 +82,12 @@ export const mapPsOutput = (output: string): DockerComposePsResult => {
const services = output
.split(`\n`)
.filter(nonEmptyString)
.filter((_, index) => index > 1)
.filter((_, index) => index > 0)
.map((line) => {
const [
nameFragment,
commandFragment,
serviceFragment,
stateFragment,
untypedPortsFragment
] = line.split(/\s{3,}/)
@ -94,6 +95,7 @@ export const mapPsOutput = (output: string): DockerComposePsResult => {
return {
name: nameFragment.trim(),
command: commandFragment.trim(),
service: serviceFragment.trim(),
state: stateFragment.trim(),
ports: mapPorts(untypedPortsFragment.trim())
}