feat: set peerDependencies

This commit is contained in:
2025-07-07 13:04:31 +02:00
parent 4a97f4d4c6
commit 3c244998f7
14 changed files with 145 additions and 93 deletions

View File

@@ -70,15 +70,17 @@ export class Container {
*
* @param query - Query parameters to send to the request
*/
async logs(query: {
follow?: boolean;
stdout?: boolean;
stderr?: boolean;
since?: number;
until?: number;
timestamps?: boolean;
tail?: number | "all";
} = {}): Promise<Response> {
async logs(
query: {
follow?: boolean;
stdout?: boolean;
stderr?: boolean;
since?: number;
until?: number;
timestamps?: boolean;
tail?: number | "all";
} = {},
): Promise<Response> {
return modem.request({ method: "GET", path: `/containers/${this.id}/logs`, query });
}

View File

@@ -51,9 +51,13 @@ class Modem {
* @param param.body - Request body. _(Ignored for `GET` requests.)_
* @param param.headers - Headers to send with the request.
*/
async request(
{ method, path, query = {}, body, headers = {} }: { method: "POST" | "GET" | "DELETE" } & RequestOptions,
): Promise<Response> {
async request({
method,
path,
query = {},
body,
headers = {},
}: { method: "POST" | "GET" | "DELETE" } & RequestOptions): Promise<Response> {
return this.client.fetch(`http://docker${path}${toSearchParams(query)}`, {
method,
body,