@paretools/docker 0.8.5 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/docker-runner.d.ts +1 -1
- package/dist/lib/docker-runner.d.ts.map +1 -1
- package/dist/lib/docker-runner.js +2 -2
- package/dist/lib/docker-runner.js.map +1 -1
- package/dist/lib/formatters.d.ts +62 -21
- package/dist/lib/formatters.d.ts.map +1 -1
- package/dist/lib/formatters.js +369 -52
- package/dist/lib/formatters.js.map +1 -1
- package/dist/lib/parsers.d.ts +50 -23
- package/dist/lib/parsers.d.ts.map +1 -1
- package/dist/lib/parsers.js +852 -129
- package/dist/lib/parsers.js.map +1 -1
- package/dist/schemas/index.d.ts +267 -9
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +186 -7
- package/dist/schemas/index.js.map +1 -1
- package/dist/tools/build.d.ts.map +1 -1
- package/dist/tools/build.js +122 -21
- package/dist/tools/build.js.map +1 -1
- package/dist/tools/compose-build.d.ts.map +1 -1
- package/dist/tools/compose-build.js +67 -8
- package/dist/tools/compose-build.js.map +1 -1
- package/dist/tools/compose-down.d.ts.map +1 -1
- package/dist/tools/compose-down.js +39 -7
- package/dist/tools/compose-down.js.map +1 -1
- package/dist/tools/compose-logs.d.ts.map +1 -1
- package/dist/tools/compose-logs.js +52 -7
- package/dist/tools/compose-logs.js.map +1 -1
- package/dist/tools/compose-ps.d.ts.map +1 -1
- package/dist/tools/compose-ps.js +65 -8
- package/dist/tools/compose-ps.js.map +1 -1
- package/dist/tools/compose-up.d.ts.map +1 -1
- package/dist/tools/compose-up.js +83 -6
- package/dist/tools/compose-up.js.map +1 -1
- package/dist/tools/exec.d.ts.map +1 -1
- package/dist/tools/exec.js +66 -17
- package/dist/tools/exec.js.map +1 -1
- package/dist/tools/images.d.ts.map +1 -1
- package/dist/tools/images.js +33 -11
- package/dist/tools/images.js.map +1 -1
- package/dist/tools/inspect.d.ts.map +1 -1
- package/dist/tools/inspect.js +43 -16
- package/dist/tools/inspect.js.map +1 -1
- package/dist/tools/logs.d.ts.map +1 -1
- package/dist/tools/logs.js +34 -11
- package/dist/tools/logs.js.map +1 -1
- package/dist/tools/network-ls.d.ts.map +1 -1
- package/dist/tools/network-ls.js +23 -10
- package/dist/tools/network-ls.js.map +1 -1
- package/dist/tools/ps.d.ts.map +1 -1
- package/dist/tools/ps.js +21 -6
- package/dist/tools/ps.js.map +1 -1
- package/dist/tools/pull.d.ts.map +1 -1
- package/dist/tools/pull.js +16 -14
- package/dist/tools/pull.js.map +1 -1
- package/dist/tools/run.d.ts.map +1 -1
- package/dist/tools/run.js +107 -10
- package/dist/tools/run.js.map +1 -1
- package/dist/tools/stats.d.ts.map +1 -1
- package/dist/tools/stats.js +21 -6
- package/dist/tools/stats.js.map +1 -1
- package/dist/tools/volume-ls.d.ts.map +1 -1
- package/dist/tools/volume-ls.js +23 -10
- package/dist/tools/volume-ls.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ Add to your MCP client config:
|
|
|
59
59
|
}
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
## All Pare Servers (
|
|
62
|
+
## All Pare Servers (149 tools)
|
|
63
63
|
|
|
64
64
|
| Package | Tools | Wraps |
|
|
65
65
|
| -------------------------------------------------------------------- | --------------------------------------------------------------------------- | ---------------------------------- |
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
3
3
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
4
|
import { registerAllTools } from "./tools/index.js";
|
|
5
5
|
const server = new McpServer({ name: "@paretools/docker", version: "0.8.1" }, {
|
|
6
|
-
instructions: "Structured Docker operations (ps, build, logs, images, run, exec, compose-up, compose-down, compose-build, pull).
|
|
6
|
+
instructions: "Structured Docker operations (ps, build, logs, images, run, exec, compose-up, compose-down, compose-build, pull). Returns typed JSON with structured container, image, and build data.",
|
|
7
7
|
});
|
|
8
8
|
registerAllTools(server);
|
|
9
9
|
const transport = new StdioServerTransport();
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,OAAO,EAAE,EAC/C;IACE,YAAY,EACV,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,OAAO,EAAE,EAC/C;IACE,YAAY,EACV,wLAAwL;CAC3L,CACF,CAAC;AAEF,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAEzB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type RunResult } from "@paretools/shared";
|
|
2
|
-
export declare function docker(args: string[], cwd?: string): Promise<RunResult>;
|
|
2
|
+
export declare function docker(args: string[], cwd?: string, timeout?: number): Promise<RunResult>;
|
|
3
3
|
//# sourceMappingURL=docker-runner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker-runner.d.ts","sourceRoot":"","sources":["../../src/lib/docker-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAExD,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"docker-runner.d.ts","sourceRoot":"","sources":["../../src/lib/docker-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAExD,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAK/F"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { run } from "@paretools/shared";
|
|
2
|
-
export async function docker(args, cwd) {
|
|
2
|
+
export async function docker(args, cwd, timeout) {
|
|
3
3
|
// Docker build/pull/run/compose operations can take minutes; use 5-minute timeout
|
|
4
4
|
const longOps = new Set(["build", "pull", "run", "compose"]);
|
|
5
5
|
const isLong = longOps.has(args[0]);
|
|
6
|
-
return run("docker", args, { cwd, timeout: isLong ? 300_000 : 30_000 });
|
|
6
|
+
return run("docker", args, { cwd, timeout: timeout ?? (isLong ? 300_000 : 30_000) });
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=docker-runner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker-runner.js","sourceRoot":"","sources":["../../src/lib/docker-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAkB,MAAM,mBAAmB,CAAC;AAExD,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,IAAc,EAAE,GAAY;
|
|
1
|
+
{"version":3,"file":"docker-runner.js","sourceRoot":"","sources":["../../src/lib/docker-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAkB,MAAM,mBAAmB,CAAC;AAExD,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,IAAc,EAAE,GAAY,EAAE,OAAgB;IACzE,kFAAkF;IAClF,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;IAC7D,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,OAAO,GAAG,CAAC,QAAQ,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACvF,CAAC"}
|
package/dist/lib/formatters.d.ts
CHANGED
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
import type { DockerPs, DockerBuild, DockerLogs, DockerImages, DockerRun, DockerExec, DockerComposeUp, DockerComposeDown, DockerPull, DockerInspect, DockerNetworkLs, DockerVolumeLs, DockerComposePs, DockerComposeLogs, DockerComposeBuild, DockerStats } from "../schemas/index.js";
|
|
2
2
|
/** Formats structured Docker container data into a human-readable listing with state and ports. */
|
|
3
3
|
export declare function formatPs(data: DockerPs): string;
|
|
4
|
-
/** Formats structured Docker build results into a human-readable success/failure summary.
|
|
4
|
+
/** Formats structured Docker build results into a human-readable success/failure summary.
|
|
5
|
+
* #97: Includes structured error details with line numbers. */
|
|
5
6
|
export declare function formatBuild(data: DockerBuild): string;
|
|
6
|
-
/** Formats structured Docker logs data into a human-readable output with container name and line count.
|
|
7
|
+
/** Formats structured Docker logs data into a human-readable output with container name and line count.
|
|
8
|
+
* #113: Notes when separate stdout/stderr streams are available. */
|
|
7
9
|
export declare function formatLogs(data: DockerLogs): string;
|
|
8
|
-
/** Formats structured Docker image data into a human-readable listing with repository, tag, and size.
|
|
10
|
+
/** Formats structured Docker image data into a human-readable listing with repository, tag, and size.
|
|
11
|
+
* #110: Shows ISO creation timestamp when available. */
|
|
9
12
|
export declare function formatImages(data: DockerImages): string;
|
|
10
|
-
/** Formats structured Docker run output into a human-readable summary.
|
|
13
|
+
/** Formats structured Docker run output into a human-readable summary.
|
|
14
|
+
* #121/#122: Shows exitCode, errorCategory, and stdout/stderr for non-detached runs. */
|
|
11
15
|
export declare function formatRun(data: DockerRun): string;
|
|
12
|
-
/** Formats structured Docker exec output into a human-readable summary.
|
|
16
|
+
/** Formats structured Docker exec output into a human-readable summary.
|
|
17
|
+
* #108: Shows truncation indicator. */
|
|
13
18
|
export declare function formatExec(data: DockerExec): string;
|
|
14
|
-
/** Formats structured Docker Compose up output into a human-readable summary.
|
|
19
|
+
/** Formats structured Docker Compose up output into a human-readable summary.
|
|
20
|
+
* #107: Shows per-service state details when available. */
|
|
15
21
|
export declare function formatComposeUp(data: DockerComposeUp): string;
|
|
16
|
-
/** Formats structured Docker Compose down output into a human-readable summary.
|
|
22
|
+
/** Formats structured Docker Compose down output into a human-readable summary.
|
|
23
|
+
* #100: Shows per-container details.
|
|
24
|
+
* #101: Shows separate volume and network counts. */
|
|
17
25
|
export declare function formatComposeDown(data: DockerComposeDown): string;
|
|
18
|
-
/** Formats structured Docker pull output into a human-readable summary.
|
|
26
|
+
/** Formats structured Docker pull output into a human-readable summary.
|
|
27
|
+
* #120: Shows size when available. */
|
|
19
28
|
export declare function formatPull(data: DockerPull): string;
|
|
20
29
|
/** Compact ps: short containerId, name, image, status only. Drop ports, createdAt, state details. */
|
|
21
30
|
export interface DockerPsCompact {
|
|
@@ -52,6 +61,8 @@ export interface DockerBuildCompact {
|
|
|
52
61
|
imageId?: string;
|
|
53
62
|
duration: number;
|
|
54
63
|
errorCount: number;
|
|
64
|
+
cacheHits?: number;
|
|
65
|
+
cacheMisses?: number;
|
|
55
66
|
}
|
|
56
67
|
export declare function compactBuildMap(data: DockerBuild): DockerBuildCompact;
|
|
57
68
|
export declare function formatBuildCompact(data: DockerBuildCompact): string;
|
|
@@ -65,12 +76,15 @@ export interface DockerLogsCompact {
|
|
|
65
76
|
}
|
|
66
77
|
export declare function compactLogsMap(data: DockerLogs): DockerLogsCompact;
|
|
67
78
|
export declare function formatLogsCompact(data: DockerLogsCompact): string;
|
|
68
|
-
/** Compact pull:
|
|
79
|
+
/** Compact pull: preserve digest and status since they are small and highly actionable. */
|
|
69
80
|
export interface DockerPullCompact {
|
|
70
81
|
[key: string]: unknown;
|
|
71
82
|
image: string;
|
|
72
83
|
tag: string;
|
|
84
|
+
digest?: string;
|
|
85
|
+
status: "pulled" | "up-to-date" | "error";
|
|
73
86
|
success: boolean;
|
|
87
|
+
errorType?: "auth" | "not-found" | "network-timeout" | "rate-limit" | "unknown";
|
|
74
88
|
}
|
|
75
89
|
export declare function compactPullMap(data: DockerPull): DockerPullCompact;
|
|
76
90
|
export declare function formatPullCompact(data: DockerPullCompact): string;
|
|
@@ -88,6 +102,11 @@ export interface DockerExecCompact {
|
|
|
88
102
|
[key: string]: unknown;
|
|
89
103
|
exitCode: number;
|
|
90
104
|
success: boolean;
|
|
105
|
+
duration?: number;
|
|
106
|
+
timedOut?: boolean;
|
|
107
|
+
isTruncated?: boolean;
|
|
108
|
+
stdoutPreview?: string;
|
|
109
|
+
stderrPreview?: string;
|
|
91
110
|
}
|
|
92
111
|
export declare function compactExecMap(data: DockerExec): DockerExecCompact;
|
|
93
112
|
export declare function formatExecCompact(data: DockerExecCompact): string;
|
|
@@ -96,6 +115,8 @@ export interface DockerComposeUpCompact {
|
|
|
96
115
|
[key: string]: unknown;
|
|
97
116
|
success: boolean;
|
|
98
117
|
started: number;
|
|
118
|
+
networksCreated?: number;
|
|
119
|
+
volumesCreated?: number;
|
|
99
120
|
}
|
|
100
121
|
export declare function compactComposeUpMap(data: DockerComposeUp): DockerComposeUpCompact;
|
|
101
122
|
export declare function formatComposeUpCompact(data: DockerComposeUpCompact): string;
|
|
@@ -108,25 +129,33 @@ export interface DockerComposeDownCompact {
|
|
|
108
129
|
}
|
|
109
130
|
export declare function compactComposeDownMap(data: DockerComposeDown): DockerComposeDownCompact;
|
|
110
131
|
export declare function formatComposeDownCompact(data: DockerComposeDownCompact): string;
|
|
111
|
-
/** Formats structured Docker inspect data into a human-readable summary.
|
|
132
|
+
/** Formats structured Docker inspect data into a human-readable summary.
|
|
133
|
+
* Handles both container and image inspect results. */
|
|
112
134
|
export declare function formatInspect(data: DockerInspect): string;
|
|
113
|
-
/** Compact inspect: id, name, status, running. Drop startedAt, platform, created.
|
|
135
|
+
/** Compact inspect: id, name, status, running. Drop startedAt, platform, created.
|
|
136
|
+
* For images: id, name, tags, platform. */
|
|
114
137
|
export interface DockerInspectCompact {
|
|
115
138
|
[key: string]: unknown;
|
|
116
139
|
id: string;
|
|
117
140
|
name: string;
|
|
141
|
+
inspectType?: string;
|
|
118
142
|
status: string;
|
|
119
143
|
running: boolean;
|
|
120
144
|
image: string;
|
|
145
|
+
healthStatus?: string;
|
|
146
|
+
repoTags?: string[];
|
|
121
147
|
}
|
|
122
148
|
export declare function compactInspectMap(data: DockerInspect): DockerInspectCompact;
|
|
123
149
|
export declare function formatInspectCompact(data: DockerInspectCompact): string;
|
|
124
|
-
/** Formats structured Docker network list into a human-readable listing.
|
|
150
|
+
/** Formats structured Docker network list into a human-readable listing.
|
|
151
|
+
* #115: Shows labels when present.
|
|
152
|
+
* #116: Shows boolean flags. */
|
|
125
153
|
export declare function formatNetworkLs(data: DockerNetworkLs): string;
|
|
126
|
-
/** Compact network-ls: name and
|
|
154
|
+
/** Compact network-ls: name, driver, and id for subsequent inspect/rm calls. */
|
|
127
155
|
export interface DockerNetworkLsCompact {
|
|
128
156
|
[key: string]: unknown;
|
|
129
157
|
networks: Array<{
|
|
158
|
+
id?: string;
|
|
130
159
|
name: string;
|
|
131
160
|
driver: string;
|
|
132
161
|
}>;
|
|
@@ -134,22 +163,26 @@ export interface DockerNetworkLsCompact {
|
|
|
134
163
|
}
|
|
135
164
|
export declare function compactNetworkLsMap(data: DockerNetworkLs): DockerNetworkLsCompact;
|
|
136
165
|
export declare function formatNetworkLsCompact(data: DockerNetworkLsCompact): string;
|
|
137
|
-
/** Formats structured Docker volume list into a human-readable listing.
|
|
166
|
+
/** Formats structured Docker volume list into a human-readable listing.
|
|
167
|
+
* #125: Shows labels when present. */
|
|
138
168
|
export declare function formatVolumeLs(data: DockerVolumeLs): string;
|
|
139
|
-
/** Compact volume-ls: name and
|
|
169
|
+
/** Compact volume-ls: name, driver, and mountpoint for verifying mount configurations. */
|
|
140
170
|
export interface DockerVolumeLsCompact {
|
|
141
171
|
[key: string]: unknown;
|
|
142
172
|
volumes: Array<{
|
|
143
173
|
name: string;
|
|
144
174
|
driver: string;
|
|
175
|
+
mountpoint?: string;
|
|
145
176
|
}>;
|
|
146
177
|
total: number;
|
|
147
178
|
}
|
|
148
179
|
export declare function compactVolumeLsMap(data: DockerVolumeLs): DockerVolumeLsCompact;
|
|
149
180
|
export declare function formatVolumeLsCompact(data: DockerVolumeLsCompact): string;
|
|
150
|
-
/** Formats structured Docker Compose build output into a human-readable summary.
|
|
181
|
+
/** Formats structured Docker Compose build output into a human-readable summary.
|
|
182
|
+
* #99: Shows per-service duration. */
|
|
151
183
|
export declare function formatComposeBuild(data: DockerComposeBuild): string;
|
|
152
|
-
/** Formats structured Docker stats data into a human-readable listing with CPU, memory, and I/O.
|
|
184
|
+
/** Formats structured Docker stats data into a human-readable listing with CPU, memory, and I/O.
|
|
185
|
+
* #123/#124: Shows numeric memory and I/O values. */
|
|
153
186
|
export declare function formatStats(data: DockerStats): string;
|
|
154
187
|
/** Compact compose build: success, built, failed, duration. Drop per-service details. */
|
|
155
188
|
export interface DockerComposeBuildCompact {
|
|
@@ -161,13 +194,15 @@ export interface DockerComposeBuildCompact {
|
|
|
161
194
|
}
|
|
162
195
|
export declare function compactComposeBuildMap(data: DockerComposeBuild): DockerComposeBuildCompact;
|
|
163
196
|
export declare function formatComposeBuildCompact(data: DockerComposeBuildCompact): string;
|
|
164
|
-
/** Compact stats: name, cpuPercent, memoryPercent, pids
|
|
197
|
+
/** Compact stats: name, cpuPercent, memoryPercent, memoryUsage, pids. Preserve memoryUsage since absolute memory is often more useful than percentage. */
|
|
165
198
|
export interface DockerStatsCompact {
|
|
166
199
|
[key: string]: unknown;
|
|
167
200
|
containers: Array<{
|
|
168
201
|
id: string;
|
|
169
202
|
name: string;
|
|
203
|
+
state?: string;
|
|
170
204
|
cpuPercent: number;
|
|
205
|
+
memoryUsage?: string;
|
|
171
206
|
memoryPercent: number;
|
|
172
207
|
pids: number;
|
|
173
208
|
}>;
|
|
@@ -175,7 +210,9 @@ export interface DockerStatsCompact {
|
|
|
175
210
|
}
|
|
176
211
|
export declare function compactStatsMap(data: DockerStats): DockerStatsCompact;
|
|
177
212
|
export declare function formatStatsCompact(data: DockerStatsCompact): string;
|
|
178
|
-
/** Formats structured Docker Compose ps data into a human-readable listing.
|
|
213
|
+
/** Formats structured Docker Compose ps data into a human-readable listing.
|
|
214
|
+
* #105: Shows health status.
|
|
215
|
+
* #106: Shows running/stopped counts. */
|
|
179
216
|
export declare function formatComposePs(data: DockerComposePs): string;
|
|
180
217
|
/** Compact compose-ps: name, service, state. Drop status, ports. */
|
|
181
218
|
export interface DockerComposePsCompact {
|
|
@@ -184,14 +221,16 @@ export interface DockerComposePsCompact {
|
|
|
184
221
|
name: string;
|
|
185
222
|
service: string;
|
|
186
223
|
state: string;
|
|
224
|
+
exitCode?: number;
|
|
187
225
|
}>;
|
|
188
226
|
total: number;
|
|
189
227
|
}
|
|
190
228
|
export declare function compactComposePsMap(data: DockerComposePs): DockerComposePsCompact;
|
|
191
229
|
export declare function formatComposePsCompact(data: DockerComposePsCompact): string;
|
|
192
|
-
/** Formats structured Docker Compose logs into a human-readable output grouped by service.
|
|
230
|
+
/** Formats structured Docker Compose logs into a human-readable output grouped by service.
|
|
231
|
+
* #104: Shows log level when available. */
|
|
193
232
|
export declare function formatComposeLogs(data: DockerComposeLogs): string;
|
|
194
|
-
/** Compact compose-logs: service list, total, head/tail entries. */
|
|
233
|
+
/** Compact compose-logs: service list, total, head/tail entries. Preserve timestamps for log correlation. */
|
|
195
234
|
export interface DockerComposeLogsCompact {
|
|
196
235
|
[key: string]: unknown;
|
|
197
236
|
services: string[];
|
|
@@ -199,10 +238,12 @@ export interface DockerComposeLogsCompact {
|
|
|
199
238
|
head: Array<{
|
|
200
239
|
service: string;
|
|
201
240
|
message: string;
|
|
241
|
+
timestamp?: string;
|
|
202
242
|
}>;
|
|
203
243
|
tail: Array<{
|
|
204
244
|
service: string;
|
|
205
245
|
message: string;
|
|
246
|
+
timestamp?: string;
|
|
206
247
|
}>;
|
|
207
248
|
}
|
|
208
249
|
export declare function compactComposeLogsMap(data: DockerComposeLogs): DockerComposeLogsCompact;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../src/lib/formatters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,WAAW,EACX,UAAU,EACV,YAAY,EACZ,SAAS,EACT,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,eAAe,EACf,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACZ,MAAM,qBAAqB,CAAC;AAE7B,mGAAmG;AACnG,wBAAgB,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../src/lib/formatters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,WAAW,EACX,UAAU,EACV,YAAY,EACZ,SAAS,EACT,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,eAAe,E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