BREAKING CHANGE(DockerHost): Rename DockerHost constructor option dockerSockPath to socketPath and update internal socket path handling

This commit is contained in:
2025-11-18 13:34:09 +00:00
parent e9975ba7b8
commit e6432b4ea9
4 changed files with 406 additions and 212 deletions

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@apiclient.xyz/docker',
version: '1.3.6',
version: '2.0.0',
description: 'Provides easy communication with Docker remote API from Node.js, with TypeScript support.'
}

View File

@@ -14,7 +14,7 @@ export interface IAuthData {
}
export interface IDockerHostConstructorOptions {
dockerSockPath?: string;
socketPath?: string;
imageStoreDir?: string;
}
@@ -44,8 +44,8 @@ export class DockerHost {
...optionsArg,
};
let pathToUse: string;
if (optionsArg.dockerSockPath) {
pathToUse = optionsArg.dockerSockPath;
if (optionsArg.socketPath) {
pathToUse = optionsArg.socketPath;
} else if (process.env.DOCKER_HOST) {
pathToUse = process.env.DOCKER_HOST;
} else if (process.env.CI) {