🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

docker-compose

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docker-compose - npm Package Compare versions

Comparing version

to
0.23.20-preview.0

dist/v2-map-ports.d.ts

15

CHANGELOG.md

@@ -5,2 +5,17 @@ # Changelog

### [0.23.20-preview.0](https://github.com/PDMLab/docker-compose/compare/v0.23.19...v0.23.20-preview.0) (2023-04-27)
### Features
* support docker compose v2 plugin version ([81e72e9](https://github.com/PDMLab/docker-compose/commit/81e72e9985aba05474463306852501287ad32680))
### Bug Fixes
* expect volume name to match changed folder name ([85c4c15](https://github.com/PDMLab/docker-compose/commit/85c4c150ce5191c95116e98145e2d3c75604a4a4))
* **build:** exclude old tests temporarily ([36d543d](https://github.com/PDMLab/docker-compose/commit/36d543db56822be95c9cd31eaa890a4c46e789a4))
* **lint:** no-useless-escape for \" characters ([fcabbc2](https://github.com/PDMLab/docker-compose/commit/fcabbc2ea7c7d42f15f45a26badab9fe73030a6c))
* **lint:** remove jest plugin reference ([892e6db](https://github.com/PDMLab/docker-compose/commit/892e6db60302ef734e5b42b74da6f583c1fb9e52))
### [0.23.19](https://github.com/PDMLab/docker-compose/compare/v0.23.18...v0.23.19) (2023-02-05)

@@ -7,0 +22,0 @@

64

dist/index.d.ts

@@ -13,10 +13,10 @@ /// <reference types="node" />

}
export declare type DockerComposePortResult = {
export type DockerComposePortResult = {
address: string;
port: number;
};
export declare type DockerComposeVersionResult = {
export type DockerComposeVersionResult = {
version: string;
};
export declare type DockerComposeConfigResult = {
export type DockerComposeConfigResult = {
config: {

@@ -28,6 +28,6 @@ version: Record<string, string>;

};
export declare type DockerComposeConfigServicesResult = {
export type DockerComposeConfigServicesResult = {
services: string[];
};
export declare type DockerComposeConfigVolumesResult = {
export type DockerComposeConfigVolumesResult = {
volumes: string[];

@@ -49,3 +49,3 @@ };

}
export declare type TypedDockerComposeResult<T> = {
export type TypedDockerComposeResult<T> = {
exitCode: number | null;

@@ -56,3 +56,3 @@ out: string;

};
export declare type DockerComposePsResult = {
export type DockerComposePsResult = {
services: Array<{

@@ -74,3 +74,3 @@ name: string;

};
export declare const mapPsOutput: (output: string, options?: IDockerComposeOptions | undefined) => DockerComposePsResult;
export declare const mapPsOutput: (output: string, options?: IDockerComposeOptions) => DockerComposePsResult;
/**

@@ -80,32 +80,32 @@ * Executes docker-compose command with common options

export declare const execCompose: (command: any, args: any, options?: IDockerComposeOptions) => Promise<IDockerComposeResult>;
export declare const upAll: (options?: IDockerComposeOptions | undefined) => Promise<IDockerComposeResult>;
export declare const upMany: (services: string[], options?: IDockerComposeOptions | undefined) => Promise<IDockerComposeResult>;
export declare const upOne: (service: string, options?: IDockerComposeOptions | undefined) => Promise<IDockerComposeResult>;
export declare const down: (options?: IDockerComposeOptions | undefined) => Promise<IDockerComposeResult>;
export declare const stop: (options?: IDockerComposeOptions | undefined) => Promise<IDockerComposeResult>;
export declare const stopOne: (service: string, options?: IDockerComposeOptions | undefined) => Promise<IDockerComposeResult>;
export declare const stopMany: (options?: IDockerComposeOptions | undefined, ...services: string[]) => Promise<IDockerComposeResult>;
export declare const pauseOne: (service: string, options?: IDockerComposeOptions | undefined) => Promise<IDockerComposeResult>;
export declare const unpauseOne: (service: string, options?: IDockerComposeOptions | undefined) => Promise<IDockerComposeResult>;
export declare const kill: (options?: IDockerComposeOptions | undefined) => Promise<IDockerComposeResult>;
export declare const rm: (options?: IDockerComposeOptions | undefined, ...services: string[]) => Promise<IDockerComposeResult>;
export declare const exec: (container: string, command: string | string[], options?: IDockerComposeOptions | undefined) => Promise<IDockerComposeResult>;
export declare const run: (container: string, command: string | string[], options?: IDockerComposeOptions | undefined) => Promise<IDockerComposeResult>;
export declare const upAll: (options?: IDockerComposeOptions) => Promise<IDockerComposeResult>;
export declare const upMany: (services: string[], options?: IDockerComposeOptions) => Promise<IDockerComposeResult>;
export declare const upOne: (service: string, options?: IDockerComposeOptions) => Promise<IDockerComposeResult>;
export declare const down: (options?: IDockerComposeOptions) => Promise<IDockerComposeResult>;
export declare const stop: (options?: IDockerComposeOptions) => Promise<IDockerComposeResult>;
export declare const stopOne: (service: string, options?: IDockerComposeOptions) => Promise<IDockerComposeResult>;
export declare const stopMany: (options?: IDockerComposeOptions, ...services: string[]) => Promise<IDockerComposeResult>;
export declare const pauseOne: (service: string, options?: IDockerComposeOptions) => Promise<IDockerComposeResult>;
export declare const unpauseOne: (service: string, options?: IDockerComposeOptions) => Promise<IDockerComposeResult>;
export declare const kill: (options?: IDockerComposeOptions) => Promise<IDockerComposeResult>;
export declare const rm: (options?: IDockerComposeOptions, ...services: string[]) => Promise<IDockerComposeResult>;
export declare const exec: (container: string, command: string | string[], options?: IDockerComposeOptions) => Promise<IDockerComposeResult>;
export declare const run: (container: string, command: string | string[], options?: IDockerComposeOptions) => Promise<IDockerComposeResult>;
export declare const buildAll: (options?: IDockerComposeBuildOptions) => Promise<IDockerComposeResult>;
export declare const buildMany: (services: string[], options?: IDockerComposeBuildOptions) => Promise<IDockerComposeResult>;
export declare const buildOne: (service: string, options?: IDockerComposeBuildOptions | undefined) => Promise<IDockerComposeResult>;
export declare const buildOne: (service: string, options?: IDockerComposeBuildOptions) => Promise<IDockerComposeResult>;
export declare const pullAll: (options?: IDockerComposeOptions) => Promise<IDockerComposeResult>;
export declare const pullMany: (services: string[], options?: IDockerComposeOptions) => Promise<IDockerComposeResult>;
export declare const pullOne: (service: string, options?: IDockerComposeOptions | undefined) => Promise<IDockerComposeResult>;
export declare const config: (options?: IDockerComposeOptions | undefined) => Promise<TypedDockerComposeResult<DockerComposeConfigResult>>;
export declare const configServices: (options?: IDockerComposeOptions | undefined) => Promise<TypedDockerComposeResult<DockerComposeConfigServicesResult>>;
export declare const configVolumes: (options?: IDockerComposeOptions | undefined) => Promise<TypedDockerComposeResult<DockerComposeConfigVolumesResult>>;
export declare const ps: (options?: IDockerComposeOptions | undefined) => Promise<TypedDockerComposeResult<DockerComposePsResult>>;
export declare const pullOne: (service: string, options?: IDockerComposeOptions) => Promise<IDockerComposeResult>;
export declare const config: (options?: IDockerComposeOptions) => Promise<TypedDockerComposeResult<DockerComposeConfigResult>>;
export declare const configServices: (options?: IDockerComposeOptions) => Promise<TypedDockerComposeResult<DockerComposeConfigServicesResult>>;
export declare const configVolumes: (options?: IDockerComposeOptions) => Promise<TypedDockerComposeResult<DockerComposeConfigVolumesResult>>;
export declare const ps: (options?: IDockerComposeOptions) => Promise<TypedDockerComposeResult<DockerComposePsResult>>;
export declare const push: (options?: IDockerComposePushOptions) => Promise<IDockerComposeResult>;
export declare const restartAll: (options?: IDockerComposeOptions | undefined) => Promise<IDockerComposeResult>;
export declare const restartMany: (services: string[], options?: IDockerComposeOptions | undefined) => Promise<IDockerComposeResult>;
export declare const restartOne: (service: string, options?: IDockerComposeOptions | undefined) => Promise<IDockerComposeResult>;
export declare const restartAll: (options?: IDockerComposeOptions) => Promise<IDockerComposeResult>;
export declare const restartMany: (services: string[], options?: IDockerComposeOptions) => Promise<IDockerComposeResult>;
export declare const restartOne: (service: string, options?: IDockerComposeOptions) => Promise<IDockerComposeResult>;
export declare const logs: (services: string | string[], options?: IDockerComposeLogOptions) => Promise<IDockerComposeResult>;
export declare const port: (service: string, containerPort: string | number, options?: IDockerComposeOptions | undefined) => Promise<TypedDockerComposeResult<DockerComposePortResult>>;
export declare const version: (options?: IDockerComposeOptions | undefined) => Promise<TypedDockerComposeResult<DockerComposeVersionResult>>;
export declare const port: (service: string, containerPort: string | number, options?: IDockerComposeOptions) => Promise<TypedDockerComposeResult<DockerComposePortResult>>;
export declare const version: (options?: IDockerComposeOptions) => Promise<TypedDockerComposeResult<DockerComposeVersionResult>>;
declare const _default: {

@@ -112,0 +112,0 @@ upAll: (options?: IDockerComposeOptions | undefined) => Promise<IDockerComposeResult>;

@@ -28,3 +28,3 @@ "use strict";

if (f) throw new TypeError("Generator is already executing.");
while (_) try {
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;

@@ -50,6 +50,10 @@ if (y = 0, t) op = [op[0] & 2, t.value];

};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};

@@ -91,3 +95,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) {

state: stateFragment.trim(),
ports: map_ports_1.default(untypedPortsFragment.trim())
ports: (0, map_ports_1.default)(untypedPortsFragment.trim())
};

@@ -112,3 +116,3 @@ });

}
throw new Error("Invalid argument supplied: " + config);
throw new Error("Invalid argument supplied: ".concat(config));
};

@@ -204,3 +208,3 @@ /**

var args = shouldUseDefaultNonInteractiveFlag(options) ? ['-d'] : [];
return exports.execCompose('up', args, options);
return (0, exports.execCompose)('up', args, options);
};

@@ -212,3 +216,3 @@ exports.upAll = upAll;

: services;
return exports.execCompose('up', args, options);
return (0, exports.execCompose)('up', args, options);
};

@@ -220,15 +224,15 @@ exports.upMany = upMany;

: [service];
return exports.execCompose('up', args, options);
return (0, exports.execCompose)('up', args, options);
};
exports.upOne = upOne;
var down = function (options) {
return exports.execCompose('down', [], options);
return (0, exports.execCompose)('down', [], options);
};
exports.down = down;
var stop = function (options) {
return exports.execCompose('stop', [], options);
return (0, exports.execCompose)('stop', [], options);
};
exports.stop = stop;
var stopOne = function (service, options) {
return exports.execCompose('stop', [service], options);
return (0, exports.execCompose)('stop', [service], options);
};

@@ -241,15 +245,15 @@ exports.stopOne = stopOne;

}
return exports.execCompose('stop', __spreadArray([], services), options);
return (0, exports.execCompose)('stop', __spreadArray([], services, true), options);
};
exports.stopMany = stopMany;
var pauseOne = function (service, options) {
return exports.execCompose('pause', [service], options);
return (0, exports.execCompose)('pause', [service], options);
};
exports.pauseOne = pauseOne;
var unpauseOne = function (service, options) {
return exports.execCompose('unpause', [service], options);
return (0, exports.execCompose)('unpause', [service], options);
};
exports.unpauseOne = unpauseOne;
var kill = function (options) {
return exports.execCompose('kill', [], options);
return (0, exports.execCompose)('kill', [], options);
};

@@ -262,3 +266,3 @@ exports.kill = kill;

}
return exports.execCompose('rm', __spreadArray(['-f'], services), options);
return (0, exports.execCompose)('rm', __spreadArray(['-f'], services, true), options);
};

@@ -268,3 +272,3 @@ exports.rm = rm;

var args = Array.isArray(command) ? command : command.split(/\s+/);
return exports.execCompose('exec', ['-T', container].concat(args), options);
return (0, exports.execCompose)('exec', ['-T', container].concat(args), options);
};

@@ -274,3 +278,3 @@ exports.exec = exec;

var args = Array.isArray(command) ? command : command.split(/\s+/);
return exports.execCompose('run', ['-T', container].concat(args), options);
return (0, exports.execCompose)('run', ['-T', container].concat(args), options);
};

@@ -280,3 +284,3 @@ exports.run = run;

if (options === void 0) { options = {}; }
return exports.execCompose('build', options.parallel ? ['--parallel'] : [], options);
return (0, exports.execCompose)('build', options.parallel ? ['--parallel'] : [], options);
};

@@ -286,7 +290,7 @@ exports.buildAll = buildAll;

if (options === void 0) { options = {}; }
return exports.execCompose('build', options.parallel ? ['--parallel'].concat(services) : services, options);
return (0, exports.execCompose)('build', options.parallel ? ['--parallel'].concat(services) : services, options);
};
exports.buildMany = buildMany;
var buildOne = function (service, options) {
return exports.execCompose('build', [service], options);
return (0, exports.execCompose)('build', [service], options);
};

@@ -296,3 +300,3 @@ exports.buildOne = buildOne;

if (options === void 0) { options = {}; }
return exports.execCompose('pull', [], options);
return (0, exports.execCompose)('pull', [], options);
};

@@ -302,7 +306,7 @@ exports.pullAll = pullAll;

if (options === void 0) { options = {}; }
return exports.execCompose('pull', services, options);
return (0, exports.execCompose)('pull', services, options);
};
exports.pullMany = pullMany;
var pullOne = function (service, options) {
return exports.execCompose('pull', [service], options);
return (0, exports.execCompose)('pull', [service], options);
};

@@ -317,3 +321,3 @@ exports.pullOne = pullOne;

_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, exports.execCompose('config', [], options)];
return [4 /*yield*/, (0, exports.execCompose)('config', [], options)];
case 1:

@@ -339,3 +343,3 @@ result = _a.sent();

_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, exports.execCompose('config', ['--services'], options)];
return [4 /*yield*/, (0, exports.execCompose)('config', ['--services'], options)];
case 1:

@@ -361,3 +365,3 @@ result = _a.sent();

_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, exports.execCompose('config', ['--volumes'], options)];
return [4 /*yield*/, (0, exports.execCompose)('config', ['--volumes'], options)];
case 1:

@@ -383,6 +387,6 @@ result = _a.sent();

_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, exports.execCompose('ps', [], options)];
return [4 /*yield*/, (0, exports.execCompose)('ps', [], options)];
case 1:
result = _a.sent();
data = exports.mapPsOutput(result.out, options);
data = (0, exports.mapPsOutput)(result.out, options);
return [2 /*return*/, __assign(__assign({}, result), { data: data })];

@@ -400,15 +404,15 @@ case 2:

if (options === void 0) { options = {}; }
return exports.execCompose('push', options.ignorePushFailures ? ['--ignore-push-failures'] : [], options);
return (0, exports.execCompose)('push', options.ignorePushFailures ? ['--ignore-push-failures'] : [], options);
};
exports.push = push;
var restartAll = function (options) {
return exports.execCompose('restart', [], options);
return (0, exports.execCompose)('restart', [], options);
};
exports.restartAll = restartAll;
var restartMany = function (services, options) {
return exports.execCompose('restart', services, options);
return (0, exports.execCompose)('restart', services, options);
};
exports.restartMany = restartMany;
var restartOne = function (service, options) {
return exports.restartMany([service], options);
return (0, exports.restartMany)([service], options);
};

@@ -420,5 +424,5 @@ exports.restartOne = restartOne;

if (options.follow) {
args = __spreadArray(['--follow'], args);
args = __spreadArray(['--follow'], args, true);
}
return exports.execCompose('logs', args, options);
return (0, exports.execCompose)('logs', args, options);
};

@@ -436,3 +440,3 @@ exports.logs = logs;

_b.trys.push([1, 3, , 4]);
return [4 /*yield*/, exports.execCompose('port', args, options)];
return [4 /*yield*/, (0, exports.execCompose)('port', args, options)];
case 2:

@@ -461,3 +465,3 @@ result = _b.sent();

_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, exports.execCompose('version', ['--short'], options)];
return [4 /*yield*/, (0, exports.execCompose)('version', ['--short'], options)];
case 1:

@@ -464,0 +468,0 @@ result = _a.sent();

{
"name": "docker-compose",
"version": "0.23.19",
"version": "0.23.20-preview.0",
"main": "dist/index.js",

@@ -8,3 +8,4 @@ "typings": "dist/index.d.ts",

"scripts": {
"test": "jest test --verbose",
"test-v1": "npx vitest --dir test/v1 --test-timeout=30000",
"test-v2": "npx vitest --dir test/v2 --test-timeout=30000",
"lint": "eslint src/**/*.ts test/**/*.ts",

@@ -87,6 +88,6 @@ "build": "tsc",

"@types/dockerode": "^2.5.27",
"@types/jest": "^26.0.22",
"@types/node": "^12.12.6",
"@typescript-eslint/eslint-plugin": "^4.21.0",
"@typescript-eslint/parser": "^4.21.0",
"@vitest/ui": "^0.30.1",
"dockerode": "^3.2.1",

@@ -96,11 +97,9 @@ "eslint": "^7.24.0",

"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.3.4",
"eslint-plugin-prettier": "^3.3.1",
"eslint-watch": "^7.0.0",
"husky": "^6.0.0",
"jest": "^26.6.3",
"prettier": "^2.2.1",
"standard-version": "9.3.1",
"ts-jest": "^26.5.4",
"typescript": "^4.2.4",
"typescript": "^4.9.5",
"vitest": "^0.30.1",
"vuepress": "^2.0.0-beta.7"

@@ -107,0 +106,0 @@ },

@@ -5,13 +5,15 @@ {

// "incremental": true, /* Enable incremental compilation */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": ["es2015"], /* Specify library files to be included in the compilation. */
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
"lib": [
"es2015"
] /* Specify library files to be included in the compilation. */,
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
"declaration": true, /* Generates corresponding '.d.ts' file. */
"declaration": true /* Generates corresponding '.d.ts' file. */,
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
// "sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
"outDir": "./dist", /* Redirect output structure to the directory. */
"outDir": "./dist" /* Redirect output structure to the directory. */,
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */

@@ -27,4 +29,4 @@ // "composite": true, /* Enable project compilation */

/* Strict Type-Checking Options */
"strict": true, /* Enable all strict type-checking options. */
"noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */
"strict": true /* Enable all strict type-checking options. */,
"noImplicitAny": false /* Raise error on expressions and declarations with an implied 'any' type. */,
// "strictNullChecks": true, /* Enable strict null checks. */

@@ -51,3 +53,3 @@ // "strictFunctionTypes": true, /* Enable strict checking of function types. */

// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */

@@ -66,7 +68,3 @@ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */

},
"exclude": [
"node_modules",
"dist",
"test"
]
"exclude": ["node_modules", "dist", "test", "old"]
}