From 138798695aa0763a8897eff531a7dc5e439ac412 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Sat, 7 Feb 2026 15:18:49 +0100 Subject: [PATCH] Setup Client --- packages/effect-docker/src/BaseClient.ts | 15 +++++++++++++++ packages/effect-docker/src/Client.ts | 3 --- packages/effect-docker/src/Client153.ts | 17 +++++++++++++++++ packages/effect-docker/src/gen/v1.53/index.ts | 6 +++--- 4 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 packages/effect-docker/src/BaseClient.ts delete mode 100644 packages/effect-docker/src/Client.ts create mode 100644 packages/effect-docker/src/Client153.ts diff --git a/packages/effect-docker/src/BaseClient.ts b/packages/effect-docker/src/BaseClient.ts new file mode 100644 index 0000000..3e2e971 --- /dev/null +++ b/packages/effect-docker/src/BaseClient.ts @@ -0,0 +1,15 @@ +import type { HttpClient } from "@effect/platform" + + +export const BaseClientTypeId: unique symbol = Symbol.for("@effect-docker/BaseClient/BaseClient") +export type BaseClientTypeId = typeof BaseClientTypeId + +export interface BaseClient { + readonly [BaseClientTypeId]: BaseClientTypeId + readonly httpClient: HttpClient.HttpClient +} + +export abstract class BaseClientImpl implements BaseClient { + readonly [BaseClientTypeId]: BaseClientTypeId = BaseClientTypeId + constructor(readonly httpClient: HttpClient.HttpClient) {} +} diff --git a/packages/effect-docker/src/Client.ts b/packages/effect-docker/src/Client.ts deleted file mode 100644 index 19ae039..0000000 --- a/packages/effect-docker/src/Client.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface Client { - -} diff --git a/packages/effect-docker/src/Client153.ts b/packages/effect-docker/src/Client153.ts new file mode 100644 index 0000000..e75f7b2 --- /dev/null +++ b/packages/effect-docker/src/Client153.ts @@ -0,0 +1,17 @@ +import { type BaseClient, BaseClientImpl } from "./BaseClient.js" + + +export * from "./gen/v1.53/index.js" + +export const Client153TypeId: unique symbol = Symbol.for("@effect-docker/Client153/Client153") +export type Client153TypeId = typeof Client153TypeId + +export interface Client153 extends BaseClient { + readonly [Client153TypeId]: Client153TypeId + + +} + +export class Client153Impl extends BaseClientImpl implements Client153 { + readonly [Client153TypeId]: Client153TypeId = Client153TypeId +} diff --git a/packages/effect-docker/src/gen/v1.53/index.ts b/packages/effect-docker/src/gen/v1.53/index.ts index 85a0158..36e2075 100644 --- a/packages/effect-docker/src/gen/v1.53/index.ts +++ b/packages/effect-docker/src/gen/v1.53/index.ts @@ -1,7 +1,7 @@ /* Generated on 2026-02-06T17:37:09.236Z from Docker Engine API version 1.53 */ -import { pipe, Option, Schema as S } from 'effect'; +import { Option, pipe, Schema as S } from 'effect'; /* Topology */ /** @@ -4756,7 +4756,7 @@ export type MountPointEncoded = S.Schema.Encoded; export const ContainerInspectResponse = S.Struct({ /** The ID of this container as a 128-bit (64-character) hexadecimal string (32 bytes). */ Id: S.optional( - pipe(S.String, S.pattern(new RegExp('^[0-9a-fA-F]{64}$')), S.minLength(64), S.maxLength(64)), + pipe(S.String, S.pattern(/^[0-9a-fA-F]{64}$/), S.minLength(64), S.maxLength(64)), ), /** * Date and time at which the container was created, formatted in [RFC @@ -4870,7 +4870,7 @@ export type PortSummaryEncoded = S.Schema.Encoded; export const ContainerSummary = S.Struct({ /** The ID of this container as a 128-bit (64-character) hexadecimal string (32 bytes). */ Id: S.optional( - pipe(S.String, S.pattern(new RegExp('^[0-9a-fA-F]{64}$')), S.minLength(64), S.maxLength(64)), + pipe(S.String, S.pattern(/^[0-9a-fA-F]{64}$/), S.minLength(64), S.maxLength(64)), ), /** * The names associated with this container. Most containers have a single name, but when using