build-strap 4.0.0-dev.46 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -34
- package/dist/src/ant.d.ts +19 -0
- package/dist/src/ant.js +18 -0
- package/dist/src/cert.d.ts +12 -0
- package/dist/src/cert.js +91 -0
- package/dist/src/clean.d.ts +4 -0
- package/dist/src/clean.js +11 -0
- package/dist/src/copy.d.ts +7 -0
- package/dist/src/copy.js +53 -0
- package/dist/src/cp.d.ts +17 -0
- package/dist/src/cp.js +88 -0
- package/dist/src/docker.container.d.ts +73 -0
- package/dist/src/docker.container.js +247 -0
- package/dist/src/docker.d.ts +68 -0
- package/dist/src/docker.js +188 -0
- package/dist/src/docker.network.d.ts +42 -0
- package/dist/src/docker.network.js +85 -0
- package/dist/src/docker.volume.d.ts +26 -0
- package/dist/src/docker.volume.js +62 -0
- package/dist/src/dockerCleanup.d.ts +38 -0
- package/dist/src/dockerCleanup.js +77 -0
- package/dist/src/dockerCompose.d.ts +154 -0
- package/dist/src/dockerCompose.js +439 -0
- package/dist/src/fs.d.ts +5 -0
- package/dist/src/fs.js +38 -0
- package/dist/src/git.d.ts +9 -0
- package/dist/src/git.js +24 -0
- package/dist/src/index.d.ts +20 -0
- package/dist/src/index.js +20 -0
- package/dist/src/maps.d.ts +33 -0
- package/dist/src/maps.js +41 -0
- package/dist/src/npm.d.ts +35 -0
- package/dist/src/npm.js +104 -0
- package/dist/src/pkg.d.ts +33 -0
- package/dist/src/pkg.js +33 -0
- package/dist/src/publish.d.ts +27 -0
- package/dist/src/publish.js +57 -0
- package/dist/src/run.d.ts +13 -0
- package/dist/src/run.js +44 -0
- package/dist/src/tgz.d.ts +13 -0
- package/dist/src/tgz.js +67 -0
- package/dist/src/version.d.ts +34 -0
- package/dist/src/version.js +101 -0
- package/dist/src/yarn.d.ts +26 -0
- package/dist/src/yarn.js +75 -0
- package/package.json +74 -20
- package/ant.js +0 -43
- package/ant.js.flow +0 -42
- package/artifactory.js +0 -617
- package/artifactory.js.flow +0 -616
- package/cert.conf +0 -20
- package/cert.js +0 -153
- package/cert.js.flow +0 -152
- package/clean.js +0 -20
- package/clean.js.flow +0 -19
- package/copy.js +0 -80
- package/copy.js.flow +0 -79
- package/cp.js +0 -173
- package/cp.js.flow +0 -172
- package/docker.container.js +0 -390
- package/docker.container.js.flow +0 -389
- package/docker.js +0 -365
- package/docker.js.flow +0 -364
- package/docker.network.js +0 -160
- package/docker.network.js.flow +0 -159
- package/docker.volume.js +0 -136
- package/docker.volume.js.flow +0 -136
- package/dockerCleanup.js +0 -152
- package/dockerCleanup.js.flow +0 -151
- package/dockerCompose.js +0 -766
- package/dockerCompose.js.flow +0 -765
- package/flow.js +0 -21
- package/flow.js.flow +0 -20
- package/fs.js +0 -95
- package/fs.js.flow +0 -96
- package/git.js +0 -35
- package/git.js.flow +0 -34
- package/hg.js +0 -35
- package/hg.js.flow +0 -34
- package/index.js +0 -27
- package/index.js.flow +0 -26
- package/inline-resources.js +0 -158
- package/inline-resources.js.flow +0 -157
- package/maps.js +0 -112
- package/maps.js.flow +0 -111
- package/npm.js +0 -145
- package/npm.js.flow +0 -144
- package/pkg.js +0 -81
- package/pkg.js.flow +0 -80
- package/publish.js +0 -145
- package/publish.js.flow +0 -144
- package/run.js +0 -90
- package/run.js.flow +0 -89
- package/src/ant.js +0 -42
- package/src/artifactory.js +0 -616
- package/src/cert.conf +0 -20
- package/src/cert.js +0 -152
- package/src/clean.js +0 -19
- package/src/copy.js +0 -79
- package/src/cp.js +0 -172
- package/src/docker.container.js +0 -389
- package/src/docker.js +0 -364
- package/src/docker.network.js +0 -159
- package/src/docker.volume.js +0 -136
- package/src/dockerCleanup.js +0 -151
- package/src/dockerCompose.js +0 -765
- package/src/flow.js +0 -20
- package/src/fs.js +0 -96
- package/src/git.js +0 -34
- package/src/hg.js +0 -34
- package/src/index.js +0 -26
- package/src/inline-resources.js +0 -157
- package/src/maps.js +0 -111
- package/src/npm.js +0 -144
- package/src/pkg.js +0 -80
- package/src/publish.js +0 -144
- package/src/run.js +0 -89
- package/src/test.js +0 -55
- package/src/tgz.js +0 -101
- package/src/version.js +0 -142
- package/src/yarn.js +0 -123
- package/test.js +0 -56
- package/test.js.flow +0 -55
- package/tgz.js +0 -102
- package/tgz.js.flow +0 -101
- package/version.js +0 -143
- package/version.js.flow +0 -142
- package/yarn.js +0 -124
- package/yarn.js.flow +0 -123
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { throttle } from 'lodash-es';
|
|
2
|
+
import { spawn } from './cp.js';
|
|
3
|
+
// calling this function in rapid succession can lead to errors.
|
|
4
|
+
// prefer throttled version
|
|
5
|
+
export async function unthrottledDockerVolumeLs({ filter, } = {}) {
|
|
6
|
+
return (await spawn('docker', ['volume', 'ls', '--format', '{{json .}}'], {
|
|
7
|
+
captureOutput: true,
|
|
8
|
+
})).output
|
|
9
|
+
.split('\n')
|
|
10
|
+
.filter((line) => !!line.trim())
|
|
11
|
+
.map((line) => {
|
|
12
|
+
const { Driver: driver, Labels, Mountpoint: mountPoint, Name: name, Scope: scope, } = JSON.parse(line.trim());
|
|
13
|
+
return {
|
|
14
|
+
driver,
|
|
15
|
+
inspect: async () => (await dockerVolumeInspect(name))?.[0] || null,
|
|
16
|
+
labels: Labels.split(',').map((l) => l.trim()),
|
|
17
|
+
mountPoint,
|
|
18
|
+
name,
|
|
19
|
+
rm: async () => dockerVolumeRm(name),
|
|
20
|
+
scope,
|
|
21
|
+
};
|
|
22
|
+
})
|
|
23
|
+
.filter((v) => v.name && (typeof filter === 'function' ? filter(v) : true));
|
|
24
|
+
}
|
|
25
|
+
export const dockerVolumeLs = throttle(unthrottledDockerVolumeLs, 500, {
|
|
26
|
+
trailing: false,
|
|
27
|
+
});
|
|
28
|
+
export async function dockerVolumeFind(search, options) {
|
|
29
|
+
return ((await dockerVolumeLs(options))?.find((v) => v.name === search || v.name.startsWith(search)) ?? null);
|
|
30
|
+
}
|
|
31
|
+
export async function dockerVolumeCreate(name, { labels = [], driver, driverOpts = {} } = {}) {
|
|
32
|
+
const existing = await dockerVolumeFind(name);
|
|
33
|
+
if (existing)
|
|
34
|
+
return existing;
|
|
35
|
+
await spawn('docker', [
|
|
36
|
+
'volume',
|
|
37
|
+
'create',
|
|
38
|
+
...labels.flatMap((l) => ['--label', l]),
|
|
39
|
+
...(driver ? ['-d', driver] : []),
|
|
40
|
+
...Object.entries(driverOpts).flatMap(([k, v]) => ['-o', `${k}=${v}`]),
|
|
41
|
+
name,
|
|
42
|
+
]);
|
|
43
|
+
return dockerVolumeFind(name);
|
|
44
|
+
}
|
|
45
|
+
export async function dockerVolumeRm(id, ignoreErrors = true) {
|
|
46
|
+
const ids = Array.isArray(id) ? id : [id];
|
|
47
|
+
try {
|
|
48
|
+
await spawn('docker', ['volume', 'rm', ...ids]);
|
|
49
|
+
}
|
|
50
|
+
catch (e) {
|
|
51
|
+
if (!ignoreErrors) {
|
|
52
|
+
throw new Error(`Failed to remove volume(s): ${e.message}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
// calling this function in rapid succession can lead to errors.
|
|
57
|
+
// prefer throttled version
|
|
58
|
+
export async function unthrottledDockerVolumeInspect(id) {
|
|
59
|
+
const ids = Array.isArray(id) ? id : [id];
|
|
60
|
+
return (JSON.parse((await spawn('docker', ['volume', 'inspect', '--format', '{{json .}}', ...ids], { captureOutput: true })).output.trim()) || []);
|
|
61
|
+
}
|
|
62
|
+
export const dockerVolumeInspect = throttle(unthrottledDockerVolumeInspect, 500, { trailing: true });
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
interface CommonDockerCleanupOptions {
|
|
2
|
+
/** print matched items to console instead of deleting */
|
|
3
|
+
dryRun?: boolean;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Purge stopped containers
|
|
7
|
+
*/
|
|
8
|
+
export declare const dockerContainerCleanup: ({ dryRun, }?: CommonDockerCleanupOptions) => Promise<void>;
|
|
9
|
+
interface DockerImageCleanupOptions extends CommonDockerCleanupOptions {
|
|
10
|
+
/** Image ids known to be produced by this build */
|
|
11
|
+
buildImageIds?: string[];
|
|
12
|
+
/** Explicit image names/ids to delete unconditionally */
|
|
13
|
+
images?: string[];
|
|
14
|
+
/**
|
|
15
|
+
* ignore default exclusions of :latest* and images < 1hr old
|
|
16
|
+
* this will delete all images in the given repos
|
|
17
|
+
*/
|
|
18
|
+
purgeAll?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* looks for other builds of the same repos
|
|
21
|
+
* this will still exclude :latest* and images < 1hr old
|
|
22
|
+
* useful to clean up after past builds that failed to clean themselves properly
|
|
23
|
+
*/
|
|
24
|
+
purgeOld?: boolean;
|
|
25
|
+
/** Image repositories to clean (defaults to the one configured in package.json) */
|
|
26
|
+
repos?: string[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Purge docker images created during build process
|
|
30
|
+
*/
|
|
31
|
+
export declare const dockerImageCleanup: ({ repos, buildImageIds, images, purgeAll, purgeOld, dryRun, }?: DockerImageCleanupOptions) => Promise<void>;
|
|
32
|
+
interface DockerCleanupOptions extends DockerImageCleanupOptions, CommonDockerCleanupOptions {
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Purge docker images created during build process
|
|
36
|
+
*/
|
|
37
|
+
export declare const dockerCleanup: ({ dryRun, ...rest }?: DockerCleanupOptions) => Promise<void>;
|
|
38
|
+
export default dockerCleanup;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { uniq } from 'lodash-es';
|
|
2
|
+
import moment from 'moment';
|
|
3
|
+
import { dockerContainerLs } from './docker.container.js';
|
|
4
|
+
import { dockerImages, dockerRmi, getDockerRepo, getDockerTags, getUntaggedDockerIds, } from './docker.js';
|
|
5
|
+
import { buildLog } from './run.js';
|
|
6
|
+
// flattens arrays of promises and/or promises for arrays
|
|
7
|
+
// into a single array of (awaited) values
|
|
8
|
+
async function flatten(input) {
|
|
9
|
+
const result = await input;
|
|
10
|
+
return Array.isArray(result)
|
|
11
|
+
? [].concat(...(await Promise.all(result.map(flatten))))
|
|
12
|
+
: result;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Purge stopped containers
|
|
16
|
+
*/
|
|
17
|
+
export const dockerContainerCleanup = async ({ dryRun = process.argv.includes('--dry-run'), } = {}) => {
|
|
18
|
+
const toClean = await dockerContainerLs({
|
|
19
|
+
all: true,
|
|
20
|
+
filter: (c) => c.exited,
|
|
21
|
+
});
|
|
22
|
+
if (dryRun) {
|
|
23
|
+
if (toClean) {
|
|
24
|
+
buildLog(`Containers to delete (dry run):\n ${toClean
|
|
25
|
+
.map((c) => c.id)
|
|
26
|
+
.join('\n ')}`);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
buildLog('No containers to delete (dry run)');
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
else if (toClean) {
|
|
33
|
+
await Promise.all(toClean.map(async (c) => c.rm(true)));
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Purge docker images created during build process
|
|
38
|
+
*/
|
|
39
|
+
export const dockerImageCleanup = async ({ repos = [getDockerRepo()], buildImageIds = [], images = [], purgeAll = process.argv.includes('--purge-all'), purgeOld = !process.argv.includes('--keep-old'), dryRun = process.argv.includes('--dry-run'), } = {}) => {
|
|
40
|
+
// only match images without a :latest tag
|
|
41
|
+
const filterLatest = (m) => purgeAll || !m.tag.match(/^latest(-\w+)?$/);
|
|
42
|
+
// only match images more than an hour old, AND without a :latest* tag
|
|
43
|
+
const filterOld = (m) => purgeAll ||
|
|
44
|
+
(filterLatest(m) && moment().subtract(1, 'h').isAfter(m.created));
|
|
45
|
+
const uniqueList = uniq([
|
|
46
|
+
// the things that we know were just built by us
|
|
47
|
+
// remove all tags from the given repos with a matching `buildImageIds`, except for :latest*
|
|
48
|
+
...(await flatten(repos.map((r) => buildImageIds.map(async (b) => getDockerTags(b, r, true, filterLatest))))),
|
|
49
|
+
// unconditionally delete explicitly passed images/ids
|
|
50
|
+
...images,
|
|
51
|
+
// images in the given `repos` without a tag, older than 1hr
|
|
52
|
+
...(await flatten(repos.map(async (r) => getUntaggedDockerIds(r, filterOld)))),
|
|
53
|
+
// images with no repo and no tag
|
|
54
|
+
...(await dockerImages(null, (m) => m.repository === '<none>' && m.tag === '<none>' && filterOld(m))).map((m) => m.id),
|
|
55
|
+
// any leftover tags from prior builds (only if purgeAll or purgeOld)
|
|
56
|
+
...(purgeAll || purgeOld
|
|
57
|
+
? await flatten(repos.map(async (r) => getDockerTags(null, r, true, filterOld)))
|
|
58
|
+
: []),
|
|
59
|
+
]);
|
|
60
|
+
if (dryRun) {
|
|
61
|
+
buildLog(`Images to delete (dry run):\n ${uniqueList.join('\n ')}`);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
await dockerRmi(uniqueList, true);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Purge docker images created during build process
|
|
69
|
+
*/
|
|
70
|
+
export const dockerCleanup = async ({ dryRun, ...rest } = {}) => {
|
|
71
|
+
await dockerContainerCleanup({ dryRun });
|
|
72
|
+
await dockerImageCleanup({
|
|
73
|
+
dryRun,
|
|
74
|
+
...rest,
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
export default dockerCleanup;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { DockerContainer } from './docker.container.js';
|
|
2
|
+
import { DockerNetwork, DockerNetworkCreateOptions } from './docker.network.js';
|
|
3
|
+
import { DockerVolume, DockerVolumeCreateOptions } from './docker.volume.js';
|
|
4
|
+
export declare type DockerComposeResourceTracker = {
|
|
5
|
+
cleaning: null | Promise<void>;
|
|
6
|
+
containers: Map<string, DockerContainer>;
|
|
7
|
+
networks: Map<string, DockerNetwork>;
|
|
8
|
+
services: Map<string, DockerComposeService>;
|
|
9
|
+
volumes: Map<string, DockerVolume>;
|
|
10
|
+
};
|
|
11
|
+
export declare const dockerComposeCreateResourceTracker: () => DockerComposeResourceTracker;
|
|
12
|
+
declare type DockerComposeEnvDef = string[] | Record<string, string>;
|
|
13
|
+
declare type DockerComposeULimitDef = number | {
|
|
14
|
+
hard: number;
|
|
15
|
+
soft: number;
|
|
16
|
+
};
|
|
17
|
+
declare type DockerComposeULimitsDef = Record<string, DockerComposeULimitDef>;
|
|
18
|
+
interface DockerComposeServiceDef {
|
|
19
|
+
command?: string[];
|
|
20
|
+
container_name?: string;
|
|
21
|
+
environment?: DockerComposeEnvDef;
|
|
22
|
+
image?: string;
|
|
23
|
+
links?: string[];
|
|
24
|
+
networks?: string[];
|
|
25
|
+
ports?: string[];
|
|
26
|
+
ulimits?: DockerComposeULimitsDef;
|
|
27
|
+
volumes?: string[];
|
|
28
|
+
}
|
|
29
|
+
interface DockerComposeVolumeDef extends DockerVolumeCreateOptions {
|
|
30
|
+
name?: string;
|
|
31
|
+
}
|
|
32
|
+
interface DockerComposeNetworkDef extends DockerNetworkCreateOptions {
|
|
33
|
+
name?: string;
|
|
34
|
+
}
|
|
35
|
+
interface DockerCompose {
|
|
36
|
+
networks?: Record<string, DockerComposeNetworkDef>;
|
|
37
|
+
services?: Record<string, DockerComposeServiceDef>;
|
|
38
|
+
version: string;
|
|
39
|
+
volumes?: Record<string, DockerComposeVolumeDef>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Parse a docker-compose.yml file into a pojo representation
|
|
43
|
+
* @param {string} filePath Path to the docker-compose.yml file
|
|
44
|
+
*/
|
|
45
|
+
export declare const dockerComposeParse: (filePath?: string) => Promise<DockerCompose>;
|
|
46
|
+
/**
|
|
47
|
+
* Get the main docker-compose.yml from the root of the repo
|
|
48
|
+
* @param {boolean} force Force reload from file
|
|
49
|
+
*/
|
|
50
|
+
export declare const dockerComposeGetMain: (force?: boolean) => Promise<DockerCompose>;
|
|
51
|
+
interface PortMap {
|
|
52
|
+
docker: number;
|
|
53
|
+
local: null | number;
|
|
54
|
+
localDefault: number;
|
|
55
|
+
}
|
|
56
|
+
interface UrlMap {
|
|
57
|
+
docker: null | string;
|
|
58
|
+
local: null | string;
|
|
59
|
+
}
|
|
60
|
+
interface ParsedPortInfo {
|
|
61
|
+
ports: PortMap[];
|
|
62
|
+
runArgs: string[];
|
|
63
|
+
}
|
|
64
|
+
interface ParsedVolumeInfo {
|
|
65
|
+
runArgs: string[];
|
|
66
|
+
volumes: string[];
|
|
67
|
+
}
|
|
68
|
+
interface ParsedNetworkInfo {
|
|
69
|
+
networks: string[];
|
|
70
|
+
runArgs: string[];
|
|
71
|
+
}
|
|
72
|
+
export declare const dockerComposeCreateNetworks: (names?: string[] | null | undefined, dockerCompose?: string | DockerCompose | null | undefined, tracker?: DockerComposeResourceTracker) => Promise<void>;
|
|
73
|
+
export declare const dockerComposeCreateVolumes: (names?: string[] | undefined, dockerCompose?: string | DockerCompose | null | undefined, tracker?: DockerComposeResourceTracker) => Promise<void>;
|
|
74
|
+
declare type HealthCheckFn = (result: UpResult) => Promise<void>;
|
|
75
|
+
interface UpOptions {
|
|
76
|
+
avoidConflicts?: boolean;
|
|
77
|
+
cmd?: string[];
|
|
78
|
+
healthCheck?: HealthCheckFn;
|
|
79
|
+
mapPorts?: boolean;
|
|
80
|
+
mapVolumes?: boolean;
|
|
81
|
+
tracker?: DockerComposeResourceTracker;
|
|
82
|
+
}
|
|
83
|
+
interface ServiceNameInfo {
|
|
84
|
+
aliases: string[];
|
|
85
|
+
name: string;
|
|
86
|
+
suffix: string;
|
|
87
|
+
}
|
|
88
|
+
interface UpResult {
|
|
89
|
+
aliases: string[];
|
|
90
|
+
container: DockerContainer;
|
|
91
|
+
containerName: string;
|
|
92
|
+
ports: PortMap[];
|
|
93
|
+
service: DockerComposeService;
|
|
94
|
+
urls: UrlMap[];
|
|
95
|
+
volumes: string[];
|
|
96
|
+
}
|
|
97
|
+
export declare class DockerComposeService {
|
|
98
|
+
#private;
|
|
99
|
+
constructor(name: string, serviceDef: DockerComposeServiceDef, dockerCompose?: null | (DockerCompose | string));
|
|
100
|
+
get name(): string;
|
|
101
|
+
get serviceDef(): DockerComposeServiceDef;
|
|
102
|
+
get image(): null | string;
|
|
103
|
+
get defaultContainerName(): string;
|
|
104
|
+
get cmd(): string[];
|
|
105
|
+
get envArgs(): string[];
|
|
106
|
+
/**
|
|
107
|
+
* Find (available) container name and alias(es)
|
|
108
|
+
* @param {boolean} avoidConflicts if `true`, find a container name that is unused
|
|
109
|
+
* @param {number} max maximum number of names to try
|
|
110
|
+
*/
|
|
111
|
+
getNames(avoidConflicts?: boolean, max?: number): Promise<ServiceNameInfo>;
|
|
112
|
+
getPorts(avoidConflicts?: boolean, mapLocal?: boolean): Promise<ParsedPortInfo>;
|
|
113
|
+
getDefaultPortInfo(): Promise<ParsedPortInfo>;
|
|
114
|
+
getDefaultPorts(): Promise<PortMap[]>;
|
|
115
|
+
getDefaultPortArgs(): Promise<string[]>;
|
|
116
|
+
getDefaultUrls(): Promise<UrlMap[]>;
|
|
117
|
+
getDefaultNetworkInfo(): Promise<ParsedNetworkInfo>;
|
|
118
|
+
getDefaultNetworks(): Promise<string[]>;
|
|
119
|
+
getDefaultNetworkArgs(): Promise<string[]>;
|
|
120
|
+
getDefaultVolumeInfo(): Promise<ParsedVolumeInfo>;
|
|
121
|
+
getDefaultVolumes(): Promise<string[]>;
|
|
122
|
+
getDefaultVolumeArgs(): Promise<string[]>;
|
|
123
|
+
pull(): Promise<void>;
|
|
124
|
+
getBaseRunArgs(): Promise<string[]>;
|
|
125
|
+
assembleRunArgs(containerName?: string, aliases?: string[], additionalArgs?: null | string[]): Promise<string[]>;
|
|
126
|
+
getRunArgs(avoidConflicts?: boolean, mapLocalPorts?: boolean): Promise<string[]>;
|
|
127
|
+
up({ healthCheck, avoidConflicts, mapVolumes, mapPorts, cmd, tracker, }?: UpOptions): Promise<UpResult>;
|
|
128
|
+
down({ includeDefaults, includeNetworks, includeVolumes, }?: {
|
|
129
|
+
includeDefaults?: boolean;
|
|
130
|
+
includeNetworks?: boolean;
|
|
131
|
+
includeVolumes?: boolean;
|
|
132
|
+
}): Promise<void>;
|
|
133
|
+
static parse(name: string, force?: boolean, dockerCompose?: null | (DockerCompose | string)): Promise<null | DockerComposeService>;
|
|
134
|
+
static getUrls(ports: PortMap[], alias: string): UrlMap[];
|
|
135
|
+
}
|
|
136
|
+
export declare function dockerComposeGetAllServices(dockerCompose?: null | (string | DockerCompose)): Promise<Record<string, null | DockerComposeService>>;
|
|
137
|
+
export declare function dockerComposeTeardown({ includeDefaults, includeVolumes, includeNetworks, dockerCompose, tracker, }?: {
|
|
138
|
+
dockerCompose?: null | (string | DockerCompose);
|
|
139
|
+
includeDefaults?: boolean;
|
|
140
|
+
includeNetworks?: boolean;
|
|
141
|
+
includeVolumes?: boolean;
|
|
142
|
+
tracker?: DockerComposeResourceTracker;
|
|
143
|
+
}): Promise<void>;
|
|
144
|
+
export interface DockerContainerInfo extends UpResult {
|
|
145
|
+
dockerPort?: null | number;
|
|
146
|
+
dockerUrl?: null | string;
|
|
147
|
+
id: string;
|
|
148
|
+
image: string;
|
|
149
|
+
name?: null | string;
|
|
150
|
+
port?: null | number;
|
|
151
|
+
url?: null | string;
|
|
152
|
+
}
|
|
153
|
+
export declare function dockerComposeRunService(key: string, upOptions?: UpOptions, dockerCompose?: null | string | DockerCompose): Promise<DockerContainerInfo>;
|
|
154
|
+
export {};
|