mirror of
https://github.com/danbulant/docker-compose
synced 2026-06-19 06:31:35 +00:00
Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
acb173b0dd | ||
|
|
18a9079ee6 | ||
|
|
748ba3e368 |
2 changed files with 10 additions and 4 deletions
10
package.json
10
package.json
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "docker-compose",
|
"name": "@iceprod/docker-compose",
|
||||||
"version": "0.23.14",
|
"version": "0.24.0",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
"test",
|
"test",
|
||||||
"test-tools"
|
"test-tools"
|
||||||
],
|
],
|
||||||
"author": "Alexander Zeitler <alexander.zeitler@pdmlab.com>",
|
"author": "Alexander Zeitler <alexander.zeitler@pdmlab.com>, Daniel Bulan <danbulant@danbulant.eu>",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
{
|
{
|
||||||
"name": "Ignatiev Mikhail"
|
"name": "Ignatiev Mikhail"
|
||||||
|
|
@ -75,6 +75,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "gautaz"
|
"name": "gautaz"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Daniel Bulant",
|
||||||
|
"url": "https://github.com/danbulant"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
||||||
|
|
@ -82,11 +82,12 @@ export const mapPsOutput = (output: string): DockerComposePsResult => {
|
||||||
const services = output
|
const services = output
|
||||||
.split(`\n`)
|
.split(`\n`)
|
||||||
.filter(nonEmptyString)
|
.filter(nonEmptyString)
|
||||||
.filter((_, index) => index > 1)
|
.filter((_, index) => index > 0)
|
||||||
.map((line) => {
|
.map((line) => {
|
||||||
const [
|
const [
|
||||||
nameFragment,
|
nameFragment,
|
||||||
commandFragment,
|
commandFragment,
|
||||||
|
serviceFragment,
|
||||||
stateFragment,
|
stateFragment,
|
||||||
untypedPortsFragment
|
untypedPortsFragment
|
||||||
] = line.split(/\s{3,}/)
|
] = line.split(/\s{3,}/)
|
||||||
|
|
@ -94,6 +95,7 @@ export const mapPsOutput = (output: string): DockerComposePsResult => {
|
||||||
return {
|
return {
|
||||||
name: nameFragment.trim(),
|
name: nameFragment.trim(),
|
||||||
command: commandFragment.trim(),
|
command: commandFragment.trim(),
|
||||||
|
service: serviceFragment.trim(),
|
||||||
state: stateFragment.trim(),
|
state: stateFragment.trim(),
|
||||||
ports: mapPorts(untypedPortsFragment.trim())
|
ports: mapPorts(untypedPortsFragment.trim())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue