diff --git a/lib/docker-client.ts b/lib/docker-client.ts index c4bc303..2a1b74a 100644 --- a/lib/docker-client.ts +++ b/lib/docker-client.ts @@ -1103,7 +1103,7 @@ export class DockerClient { outputs?: string; version?: '1' | '2'; }, - ): AsyncGenerator { + ): AsyncGenerator { const headers: Record = {}; headers['Content-Type'] = 'application/x-tar'; @@ -1146,7 +1146,7 @@ export class DockerClient { headers, ); - yield* jsonMessages(response); + yield* jsonMessages(response); } /** @@ -1209,7 +1209,7 @@ export class DockerClient { changes?: Array; platform?: string; inputImage?: string; - }): AsyncGenerator { + }): AsyncGenerator { const headers: Record = {}; if (options?.credentials) { @@ -1233,7 +1233,7 @@ export class DockerClient { undefined, headers, ); - yield* jsonMessages(response); + yield* jsonMessages(response); } /** @@ -1400,11 +1400,11 @@ export class DockerClient { public async *imagePush( name: string, options: { - credentials: AuthConfig; + credentials?: AuthConfig; tag?: string; platform?: Platform; }, - ): AsyncGenerator { + ): AsyncGenerator { const headers: Record = {}; if (options?.credentials) { @@ -1422,7 +1422,7 @@ export class DockerClient { undefined, headers, ); - yield* jsonMessages(response); + yield* jsonMessages(response); } /** diff --git a/lib/types/BuildInfo.ts b/lib/types/JSONMessage.ts similarity index 97% rename from lib/types/BuildInfo.ts rename to lib/types/JSONMessage.ts index c20b2e9..cd22b7b 100644 --- a/lib/types/BuildInfo.ts +++ b/lib/types/JSONMessage.ts @@ -22,7 +22,7 @@ import { type ErrorDetail } from '../types/ErrorDetail.js'; import { type ImageID } from '../types/ImageID.js'; import { type ProgressDetail } from '../types/ProgressDetail.js'; -export interface BuildInfo { +export interface JSONMessage { id?: string; stream?: string; diff --git a/lib/types/index.ts b/lib/types/index.ts index 9074547..e5f5ba3 100644 --- a/lib/types/index.ts +++ b/lib/types/index.ts @@ -22,7 +22,6 @@ export * from './FileInfo.js'; export * from './Address.js'; export * from './AuthConfig.js'; export * from './BuildCache.js'; -export * from './BuildInfo.js'; export * from './BuildPruneResponse.js'; export * from './ChangeType.js'; export * from './ClusterInfo.js'; @@ -117,6 +116,7 @@ export * from './ImagePruneResponse.js'; export * from './ImageSearchResponseItem.js'; export * from './ImageSummary.js'; export * from './IndexInfo.js'; +export * from './JSONMessage.js'; export * from './JoinTokens.js'; export * from './Limit.js'; export * from './LocalNodeState.js'; diff --git a/openapi-config.yaml b/openapi-config.yaml index cc096f0..121184e 100644 --- a/openapi-config.yaml +++ b/openapi-config.yaml @@ -7,6 +7,8 @@ modelPackage: types globalProperties: supportingFiles: types/index.ts models: "" +modelNameMappings: + BuildInfo: JSONMessage files: model/index.mustache: templateType: SupportingFiles