fix(core): Refactored DockerImageStore constructor to remove DockerHost dependency

This commit is contained in:
Philipp Kunz 2024-10-13 13:14:35 +02:00
parent 8a4e300581
commit a283bbfba0
4 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,11 @@
# Changelog
## 2024-10-13 - 1.2.4 - fix(core)
Refactored DockerImageStore constructor to remove DockerHost dependency
- Adjusted DockerImageStore constructor to remove dependency on DockerHost
- Updated ts/classes.host.ts to align with DockerImageStore's new constructor signature
## 2024-08-21 - 1.2.3 - fix(dependencies)
Update dependencies to the latest versions and fix image export test

View File

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

View File

@ -59,7 +59,7 @@ export class DockerHost {
}
console.log(`using docker sock at ${pathToUse}`);
this.socketPath = pathToUse;
this.imageStore = new DockerImageStore(this, {
this.imageStore = new DockerImageStore({
bucketDir: null,
localDirPath: this.options.imageStoreDir,
})

View File

@ -17,7 +17,7 @@ export interface IDockerImageStoreConstructorOptions {
export class DockerImageStore {
public options: IDockerImageStoreConstructorOptions;
constructor(dockerHost: DockerHost, optionsArg: IDockerImageStoreConstructorOptions) {
constructor(optionsArg: IDockerImageStoreConstructorOptions) {
this.options = optionsArg;
}