mirror of
https://github.com/danbulant/docker-compose
synced 2026-06-15 04:31:16 +00:00
refactor: improve naming
This commit is contained in:
parent
9443c7ebdc
commit
57f00b36fe
1 changed files with 8 additions and 8 deletions
16
src/index.ts
16
src/index.ts
|
|
@ -109,17 +109,17 @@ export const mapPsOutput = (output: string): DockerComposePsResult => {
|
|||
.filter((_, index) => index > 1)
|
||||
.map((line) => {
|
||||
const [
|
||||
nameString,
|
||||
commandString,
|
||||
stateString,
|
||||
allPortsString
|
||||
nameFragment,
|
||||
commandFragment,
|
||||
stateFragment,
|
||||
untypedPortsFragment
|
||||
] = line.split(/\s{3,}/)
|
||||
|
||||
return {
|
||||
name: nameString.trim(),
|
||||
command: commandString.trim(),
|
||||
state: stateString.trim(),
|
||||
ports: mapPorts(allPortsString.trim())
|
||||
name: nameFragment.trim(),
|
||||
command: commandFragment.trim(),
|
||||
state: stateFragment.trim(),
|
||||
ports: mapPorts(untypedPortsFragment.trim())
|
||||
}
|
||||
})
|
||||
return { services }
|
||||
|
|
|
|||
Loading…
Reference in a new issue