From a283bbfba07cdeb6fe30e06a94aa0ba3ca29fe18 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Sun, 13 Oct 2024 13:14:35 +0200 Subject: [PATCH] fix(core): Refactored DockerImageStore constructor to remove DockerHost dependency --- changelog.md | 6 ++++++ ts/00_commitinfo_data.ts | 2 +- ts/classes.host.ts | 2 +- ts/classes.imagestore.ts | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index f690bd4..4aa7ce2 100644 --- a/changelog.md +++ b/changelog.md @@ -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 diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 4c00c0c..7ac8ed2 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -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.' } diff --git a/ts/classes.host.ts b/ts/classes.host.ts index 4a73db7..d8c6358 100644 --- a/ts/classes.host.ts +++ b/ts/classes.host.ts @@ -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, }) diff --git a/ts/classes.imagestore.ts b/ts/classes.imagestore.ts index b2bf3d9..e9f202c 100644 --- a/ts/classes.imagestore.ts +++ b/ts/classes.imagestore.ts @@ -17,7 +17,7 @@ export interface IDockerImageStoreConstructorOptions { export class DockerImageStore { public options: IDockerImageStoreConstructorOptions; - constructor(dockerHost: DockerHost, optionsArg: IDockerImageStoreConstructorOptions) { + constructor(optionsArg: IDockerImageStoreConstructorOptions) { this.options = optionsArg; }