@zukhruf/docker 0.8.18 → 0.8.20
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 +93 -53
- package/dist/container-process.d.ts +2 -0
- package/dist/container-process.d.ts.map +1 -1
- package/dist/container-process.js +143 -23
- package/dist/container-process.js.map +1 -1
- package/dist/containers.d.ts +12 -2
- package/dist/containers.d.ts.map +1 -1
- package/dist/containers.js +44 -24
- package/dist/containers.js.map +1 -1
- package/dist/docker.d.ts +3 -2
- package/dist/docker.d.ts.map +1 -1
- package/dist/docker.js +3 -2
- package/dist/docker.js.map +1 -1
- package/dist/engine-client.d.ts +0 -2
- package/dist/engine-client.d.ts.map +1 -1
- package/dist/engine-client.js +2 -2
- package/dist/engine-client.js.map +1 -1
- package/dist/errors.d.ts +23 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +32 -2
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/multiplexed-stream.d.ts +4 -3
- package/dist/multiplexed-stream.d.ts.map +1 -1
- package/dist/multiplexed-stream.js +5 -7
- package/dist/multiplexed-stream.js.map +1 -1
- package/dist/ssh-connection.d.ts.map +1 -1
- package/dist/ssh-connection.js +18 -8
- package/dist/ssh-connection.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -69,29 +69,36 @@ A product with its own rule selects from this list. For example, a scan for data
|
|
|
69
69
|
|
|
70
70
|
An error has its own class when a caller does something different after it: start the engine, pull the image, start the container, pick another name ([ADR 0007](./docs/adr/0007-an-error-has-its-own-class-when-the-caller-handles-it-differently.md)). Each class comes from the request and its HTTP status. When one status has two meanings, the package sends one more request to tell them apart.
|
|
71
71
|
|
|
72
|
-
| Class | When
|
|
73
|
-
| -------------------------- |
|
|
74
|
-
| `ConnectionFailedError` | The
|
|
75
|
-
| `UnsupportedEngineError` | The engine's highest API version is lower than the lowest one that the package supports, or than the one that a call needs
|
|
76
|
-
| `UnsupportedHostError` | The host is not `unix://`, `npipe://` or `ssh://`, for example `tcp://`
|
|
77
|
-
| `ContextNotFoundError` | `Docker.connect({ context })` names a context that the context store does not have
|
|
78
|
-
| `ContainerNotFoundError` | A request about a container gets 404, or a start gets 409 and an inspect finds the container gone, removing or dead
|
|
79
|
-
| `ContainerNotRunningError` | An exec or a kill gets 409, or an attach finds the container exited or paused. `state` comes from an inspect: `created`, `exited`, `paused` …
|
|
80
|
-
| `ContainerRunningError` | A removal without `force` gets 409, and an inspect shows that the container runs
|
|
81
|
-
| `NameConflictError` | A create of a container, network or volume finds the name taken
|
|
82
|
-
| `ImageNotFoundError` | A create, a pull or a tag gets 404, or a push reports an error in its progress and an inspect does not find the image
|
|
83
|
-
| `NetworkNotFoundError` | A start or a connect gets 404 (500 on an engine in swarm mode), and a lookup finds the network missing; a request about a network gets 404
|
|
84
|
-
| `VolumeNotFoundError` | A request about a volume gets 404
|
|
85
|
-
| `BindSourceNotFoundError` | A create or a start refuses a bind mount whose `source` does not exist on the engine's host
|
|
86
|
-
| `VolumeInUseError` | A volume removal gets 409
|
|
87
|
-
| `NetworkInUseError` | A network removal gets 403 while running containers are connected
|
|
88
|
-
| `ImageInUseError` | An image removal gets 409
|
|
89
|
-
| `PathNotFoundError` | A file request gets 404 and the container exists
|
|
90
|
-
| `NotAFileError` | `readFile()` finds a directory, a link or another kind of entry. `kind` names it
|
|
91
|
-
| `ReadOnlyPathError` | The engine refuses an extraction, and an inspect shows that the directory is on a read-only root filesystem or in a read-only mount
|
|
72
|
+
| Class | When | What the caller does next |
|
|
73
|
+
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
|
|
74
|
+
| `ConnectionFailedError` | The connection does not open (no socket, a refusal, an `EACCES` denial, no `ssh`), or it dies before the answer (also when `ssh` exits) | Treat the engine as absent, or ask to start Docker |
|
|
75
|
+
| `UnsupportedEngineError` | The engine's highest API version is lower than the lowest one that the package supports, or than the one that a call needs | Ask to update Docker |
|
|
76
|
+
| `UnsupportedHostError` | The host is not `unix://`, `npipe://` or `ssh://`, for example `tcp://` | Skip that context, or give another host |
|
|
77
|
+
| `ContextNotFoundError` | `Docker.connect({ context })` names a context that the context store does not have | Pick another context from `Docker.contexts()` |
|
|
78
|
+
| `ContainerNotFoundError` | A request about a container gets 404, or a start gets 409 and an inspect finds the container gone, removing or dead | Create the container again |
|
|
79
|
+
| `ContainerNotRunningError` | An exec or a kill gets 409, or an attach finds the container exited or paused. `state` comes from an inspect: `created`, `exited`, `paused` … | Start or unpause it, then try again |
|
|
80
|
+
| `ContainerRunningError` | A removal without `force` gets 409, and an inspect shows that the container runs | Stop it first, or remove it with `force` |
|
|
81
|
+
| `NameConflictError` | A create of a container, network or volume finds the name taken | Use `createOrGet()`, or another name |
|
|
82
|
+
| `ImageNotFoundError` | A create, a pull or a tag gets 404, or a push reports an error in its progress and an inspect does not find the image | Pull or build the image; check the name or `auth` |
|
|
83
|
+
| `NetworkNotFoundError` | A start or a connect gets 404 (500 on an engine in swarm mode), and a lookup finds the network missing; a request about a network gets 404 | Create the network first |
|
|
84
|
+
| `VolumeNotFoundError` | A request about a volume gets 404 | Create the volume again |
|
|
85
|
+
| `BindSourceNotFoundError` | A create or a start refuses a bind mount whose `source` does not exist on the engine's host | Tell the user which host path is missing |
|
|
86
|
+
| `VolumeInUseError` | A volume removal gets 409 | Remove its containers first, or wait and try again |
|
|
87
|
+
| `NetworkInUseError` | A network removal gets 403 while running containers are connected | Disconnect them first |
|
|
88
|
+
| `ImageInUseError` | An image removal gets 409 | Remove its containers first, or use `force` |
|
|
89
|
+
| `PathNotFoundError` | A file request gets 404 and the container exists | Use a default, or create the file |
|
|
90
|
+
| `NotAFileError` | `readFile()` finds a directory, a link or another kind of entry. `kind` names it | Use `getArchive()` for the tree |
|
|
91
|
+
| `ReadOnlyPathError` | The engine refuses an extraction, and an inspect shows that the directory is on a read-only root filesystem or in a read-only mount | Write under a writable mount, or use `exec()` |
|
|
92
|
+
| `IncompleteOutputError` | A stdin write of an exec or an attach fails before the output ends, and no output came or the caller did not take it; over SSH, `ssh` exits non-zero before the output ends | Go on, or run it again if that is safe |
|
|
92
93
|
|
|
93
94
|
Each class extends a base class, so a broad catch still works. `DockerError` is the base of every error of the package. `DockerEngineError` is the base of every answer of the engine that is an error. It has `status` and `request` (the `method` and `path` of the request), and its `message` is the message of the engine. The base keeps the request apart in `request`, so `path` on `PathNotFoundError`, `NotAFileError` and `ReadOnlyPathError` is the path in the container. An error with no class of its own, such as an error in the progress of a pull, is a `DockerEngineError`.
|
|
94
95
|
|
|
96
|
+
`ConnectionFailedError` has two messages, and its `cause` is the error of Node or the exit error of `ssh`. `Cannot connect to the engine at <host>.` means that the connection did not open. `Error during the connection to the engine at <host>.` means that the connection opened, or `ssh` started, and then it failed before the answer.
|
|
97
|
+
|
|
98
|
+
A connection that is lost after the answer started is not a `ConnectionFailedError`, and it is not a `DockerError`. The call or the iteration rejects with the error of Node: the message `aborted` and the code `ECONNRESET` for a JSON answer and for a stream such as events, followed logs or the progress of a pull, and the error of the socket for an attach or an exec. The stream does not start again by itself: call the method again. The Go client of Moby has the same rule ([ADR 0011](./docs/adr/0011-only-a-failure-before-the-answer-is-a-connection-failure.md)).
|
|
99
|
+
|
|
100
|
+
For an exec or an attach on a Unix socket or a named pipe, a reset of the connection (`ECONNRESET`) is the end of the output, as in the Podman runtime. The iteration first gives the output that came before the reset. The exit code comes from the engine, as at each end of the output. Thus, when the connection drops in the middle of a run and the engine stays up, the call gives the real exit code with only the output that came before the drop. The call then waits until the command ends, as the Podman runtime waits for the exit. Give a signal to limit that wait. Another error of the socket rejects the iteration after the output that came before it ([ADR 0012](./docs/adr/0012-a-reset-ends-the-output-and-a-failed-write-is-an-error-only-when-output-can-be-lost.md)).
|
|
101
|
+
|
|
95
102
|
```ts
|
|
96
103
|
import {
|
|
97
104
|
ConnectionFailedError,
|
|
@@ -129,12 +136,12 @@ await postgres.exec({ Cmd: ['pg_isready'] }).catch(async (error) => {
|
|
|
129
136
|
|
|
130
137
|
Some answers of the engine are not errors here:
|
|
131
138
|
|
|
132
|
-
| Call
|
|
133
|
-
|
|
|
134
|
-
| `containers.find()`, `volumes.find()`, `networks.find()`, `images.inspect()`
|
|
135
|
-
| `container.stat()` of a missing path
|
|
136
|
-
| `container.start()` of a running container, `container.stop()` of a stopped one
|
|
137
|
-
| `remove()` of a missing container, volume, network or image
|
|
139
|
+
| Call | Engine answer | Result |
|
|
140
|
+
| ---------------------------------------------------------------------------------------------------- | ------------- | ----------- |
|
|
141
|
+
| `containers.find()`, `containers.inspect()`, `volumes.find()`, `networks.find()`, `images.inspect()` | 404 | `undefined` |
|
|
142
|
+
| `container.stat()` of a missing path or a missing container | 404 | `undefined` |
|
|
143
|
+
| `container.start()` of a running container, `container.stop()` of a stopped one | 304 | resolves |
|
|
144
|
+
| `remove()` of a missing container, volume, network or image | 404 | resolves |
|
|
138
145
|
|
|
139
146
|
A removal of a container whose removal is already in progress (409) inspects the container until it is gone, and then resolves. When the other removal fails and the container stays, it sends a forced removal again. The signal stops the wait.
|
|
140
147
|
|
|
@@ -184,7 +191,12 @@ The engine keeps a `DeviceRequests` entry at the create. On a host with no GPU,
|
|
|
184
191
|
|
|
185
192
|
`containers.find()` sends one inspect. It gives a `Container` with the ID of the engine, or `undefined`. A `Container` names its container by that ID, never by a name: when another container takes the name later, the handle still acts on the first one. A `Container` has no disposal, so `await using` on it is a type error. A found container belongs to whoever created it.
|
|
186
193
|
|
|
194
|
+
`containers.inspect()` sends the same request. It gives the inspect answer of the engine, or `undefined` when the engine has no such container. Use it to read a container: its state, its configuration or its network settings. Use `containers.find()` to act on a container: a `Container` can start it, stop it, remove it or run a command in it.
|
|
195
|
+
|
|
187
196
|
```ts
|
|
197
|
+
const info = await docker.containers.inspect('shared-db');
|
|
198
|
+
console.log(info?.State?.Status, info?.Config?.Env);
|
|
199
|
+
|
|
188
200
|
const db = await docker.containers.find('shared-db');
|
|
189
201
|
if (db && !(await db.inspect()).State?.Running) await db.start();
|
|
190
202
|
|
|
@@ -282,7 +294,16 @@ await postgres.exec(
|
|
|
282
294
|
);
|
|
283
295
|
```
|
|
284
296
|
|
|
285
|
-
A command can end before it reads all of its input, such as `head -c1`. The
|
|
297
|
+
A command can end before it reads all of its input, such as `head -c1`. The engine then closes the connection, and the write of the input fails. That failure is not an error of the call: the input that the command did not read is not an error, and the result of the command stands.
|
|
298
|
+
|
|
299
|
+
But after a failed write, Node closes the connection, and output that is still on the way is lost. Thus the call rejects with `IncompleteOutputError` when the write fails before the output ends, in two cases:
|
|
300
|
+
|
|
301
|
+
- No output came. The package cannot know if the command printed output: `true` prints nothing and loses nothing.
|
|
302
|
+
- The caller did not take the output, and the package stopped the reads. `exec()` and `collect()` take each chunk at once, so they get only the first case.
|
|
303
|
+
|
|
304
|
+
Over SSH, the failure is different: `ssh` exits non-zero before the output ends, because `docker system dial-stdio` stops when one of its copies fails. Output that it did not copy is lost. The call then also rejects with `IncompleteOutputError`, and the iteration first gives the output that came before the exit. Its `cause` is the `SshExitError`. The package does not read the standard error of `ssh` to decide this.
|
|
305
|
+
|
|
306
|
+
The error has the exit code of the command, and its `cause` is the error of the write or the `SshExitError`. The output can be incomplete, not certainly incomplete. The caller goes on, or runs the command again when that is safe. The package does not run the command again: the command did run, and some commands are not safe to run two times ([ADR 0012](./docs/adr/0012-a-reset-ends-the-output-and-a-failed-write-is-an-error-only-when-output-can-be-lost.md)).
|
|
286
307
|
|
|
287
308
|
`container.spawn()` gives the container process while the command runs. With `stdin: true`, the container process has a writable `stdin`. Only `stdin.close()` ends the input. The package drops an empty write, so an empty write never ends the input.
|
|
288
309
|
|
|
@@ -297,11 +318,17 @@ await input.close();
|
|
|
297
318
|
const { stdout } = await psql.collect();
|
|
298
319
|
```
|
|
299
320
|
|
|
321
|
+
A command keeps the process running until it ends, as each request in flight does. With `ref: false`, as for `attach()`, it does not. When the process exits, its hijacked connection closes, and the engine ends the input of the command. A holder uses this: one `cat` for each holder process, run in a container whose main process waits until no `cat` is left. Ryuk of Testcontainers counts its connections in the same way.
|
|
322
|
+
|
|
323
|
+
```ts
|
|
324
|
+
await reaper.spawn({ Cmd: ['cat'] }, { stdin: true, ref: false });
|
|
325
|
+
```
|
|
326
|
+
|
|
300
327
|
The end of the input depends on the host. On a Unix socket, the package shuts down the write side of the socket. Over SSH, it closes the standard input of `ssh`, and `docker system dial-stdio` then closes the write side to the engine. On a Windows named pipe, it writes a message of zero bytes, because a pipe has no shutdown of one side: the engine listens on its pipe in message mode and reads that message as the end. `CloseWrite` of go-winio, which the Docker CLI uses, sends the same message.
|
|
301
328
|
|
|
302
329
|
A signal cancels the wait. It does not stop the command: the Engine API has no request that stops an exec. To stop a command, kill the container, or run the command under `timeout` in the container. A signal also cancels an iteration of a container process: the iteration rejects with the reason of the signal, as each cancel does ([the async glossary](../async/CONTEXT.md)).
|
|
303
330
|
|
|
304
|
-
A container or an exec with a TTY (`Tty: true`) gives a raw stream. Then each chunk is `stdout`.
|
|
331
|
+
A container or an exec with a TTY (`Tty: true`) gives a raw stream. Then each chunk is `stdout`. The TTY setting decides, as in the Docker CLI, and not the Content-Type of the answer, which some engines leave out ([ADR 0014](./docs/adr/0014-output-framing-follows-the-tty-setting-as-the-docker-cli-chooses-it.md)).
|
|
305
332
|
|
|
306
333
|
## Read the logs
|
|
307
334
|
|
|
@@ -347,11 +374,12 @@ const stat = await postgres.stat('/srv/run.sh');
|
|
|
347
374
|
|
|
348
375
|
- `writeFiles()` sends one archive. It extracts the archive in the deepest directory that holds each entry and that already exists, which it finds with `stat()`. The engine creates each parent directory that an entry implies below that directory. Thus a container with a read-only root filesystem can still get files in a writable volume: the engine checks only the directory of the extraction.
|
|
349
376
|
- A written entry belongs to its `uid` and `gid`, or to root (0:0) when it has none. The package puts them in the archive, and the engine keeps the owner of each entry in the archive.
|
|
377
|
+
- A parent directory that an entry implies is not in the archive. The engine creates it with mode 0755 and the owner of the root of the container, not with the `uid` and `gid` of the entry, and `copyUIDGID` does not change that (`createImpliedDirectories` and `ImpliedDirectoryMode` in [moby/go-archive](https://github.com/moby/go-archive/blob/6a97244bc508500258d8e984a043d61b138c53da/archive.go#L28-L38)). For another owner or mode, list the directory as an entry: `{ path, directory: true, uid, gid }`. The source of the engine gives the same advice.
|
|
350
378
|
- `putArchive(directory, archive, { copyUIDGID: true })` gives each extracted entry to the user of the container (`Config.User`) in place of the owner in the archive.
|
|
351
379
|
- `writeFiles()` does not replace a directory with a file, or a file with a directory. It rejects with `DockerEngineError`, the directory or file stays, and `message` is the message of the engine. A directory entry onto a symlink to a directory also rejects. The engine extracts entries in order and stops at the conflict, so the entries before it stay written.
|
|
352
380
|
- `putArchive(directory, archive, { noOverwriteDirNonDir: true })` applies the same refusal to an archive. Without this option, the engine replaces the existing entry: a file over a directory deletes the directory tree.
|
|
353
381
|
- `readFile()` gives the bytes of one regular file. A missing path makes it reject with `PathNotFoundError`, and a directory, a link or another kind of entry with `NotAFileError`.
|
|
354
|
-
- `stat()` gives `undefined` for a missing path. A missing container makes
|
|
382
|
+
- `stat()` gives `undefined` for a missing path and for a missing container, in one request. The engine answers both with 404, and an answer to `HEAD` has no body that tells them apart; no leading client sends a second request ([ADR 0013](./docs/adr/0013-a-stat-of-a-missing-path-or-container-is-undefined-in-one-request.md)). A missing container makes `readFile()`, `getArchive()`, `writeFiles()` and `putArchive()` reject with `ContainerNotFoundError`.
|
|
355
383
|
- `getArchive(path)` and `putArchive(directory, archive)` give the tar streams themselves, for a directory or a large tree.
|
|
356
384
|
- The engine cannot reach `/proc`, `/sys`, `/dev`, a tmpfs mount, or a mount made inside the container. For such a path, use `exec()`.
|
|
357
385
|
- When the directory of the extraction is on a read-only root filesystem or in a read-only mount, `writeFiles()` and `putArchive()` reject with `ReadOnlyPathError`.
|
|
@@ -456,7 +484,7 @@ A save with a platform writes only the content of that platform. A load with a p
|
|
|
456
484
|
|
|
457
485
|
## Events
|
|
458
486
|
|
|
459
|
-
`docker.events()` gives the events of the engine as they happen. The iteration ends
|
|
487
|
+
`docker.events()` gives the events of the engine as they happen. The iteration ends when the signal aborts, and then it rejects with the reason of the signal. When the connection is lost, the iteration rejects with the error of Node: call `events()` again. It takes the `since` and `filters` of the Engine API.
|
|
460
488
|
|
|
461
489
|
```ts
|
|
462
490
|
for await (const event of docker.events({
|
|
@@ -516,7 +544,7 @@ The flags come first on the command line. OpenSSH uses the first value that it g
|
|
|
516
544
|
|
|
517
545
|
Without a keepalive, a connection to a machine that stops answering hangs the call, as it hangs the Docker CLI. The call ends only when its signal aborts.
|
|
518
546
|
|
|
519
|
-
With a keepalive, `ssh` exits with 255 when the machine stops answering. A call that waits for its answer rejects with `ConnectionFailedError
|
|
547
|
+
With a keepalive, `ssh` exits with 255 when the machine stops answering. A call that waits for its answer rejects with `ConnectionFailedError`. Its message is `Error during the connection to the engine at <host>.`, and its `cause` has the exit code and the standard error of `ssh`. An open stream, such as followed logs or events, rejects with the error of Node (`aborted`, `ECONNRESET`), which is not a `DockerError`. The `cause` of that error has the same exit code and standard error.
|
|
520
548
|
|
|
521
549
|
Set the keepalive in `~/.ssh/config`:
|
|
522
550
|
|
|
@@ -588,7 +616,7 @@ export class Docker implements AsyncDisposable {
|
|
|
588
616
|
readonly images: Images;
|
|
589
617
|
|
|
590
618
|
info(options?: CancelOptions): Promise<EngineApi.SystemInfo>;
|
|
591
|
-
/** The events of the engine as they happen. An abort of the signal rejects the iteration with its reason. */
|
|
619
|
+
/** The events of the engine as they happen. An abort of the signal rejects the iteration with its reason. A lost connection rejects it with the error of Node. */
|
|
592
620
|
events(
|
|
593
621
|
options?: CancelOptions & { since?: number; filters?: Filters },
|
|
594
622
|
): AsyncIterable<EngineApi.EventMessage>;
|
|
@@ -647,6 +675,11 @@ export interface Containers {
|
|
|
647
675
|
nameOrId: string,
|
|
648
676
|
options?: CancelOptions,
|
|
649
677
|
): Promise<Container | undefined>;
|
|
678
|
+
/** One inspect: the answer of the engine, or undefined for 404. */
|
|
679
|
+
inspect(
|
|
680
|
+
nameOrId: string,
|
|
681
|
+
options?: CancelOptions,
|
|
682
|
+
): Promise<EngineApi.ContainerInspectResponse | undefined>;
|
|
650
683
|
list(
|
|
651
684
|
options?: CancelOptions & { all?: boolean; filters?: Filters },
|
|
652
685
|
): Promise<EngineApi.ContainerSummary[]>;
|
|
@@ -689,23 +722,24 @@ export class Container {
|
|
|
689
722
|
body: EngineApi.ExecConfig,
|
|
690
723
|
options?: CancelOptions & { stdin?: string | Uint8Array },
|
|
691
724
|
): Promise<ExecResult>;
|
|
725
|
+
/** `ref: false`: the command does not keep the process running. */
|
|
692
726
|
spawn(
|
|
693
727
|
body: EngineApi.ExecConfig,
|
|
694
|
-
options?: CancelOptions & { stdin?: boolean },
|
|
728
|
+
options?: CancelOptions & { stdin?: boolean; ref?: boolean },
|
|
695
729
|
): Promise<ContainerProcess>;
|
|
696
730
|
/** Attach before start() to get all output. `ref: false`: the attach does not keep the process running. */
|
|
697
731
|
attach(
|
|
698
732
|
options?: CancelOptions & { stdin?: boolean; ref?: boolean },
|
|
699
733
|
): Promise<ContainerProcess>;
|
|
700
734
|
|
|
701
|
-
/** undefined for 404. */
|
|
735
|
+
/** undefined for 404: a missing path or a missing container. */
|
|
702
736
|
stat(
|
|
703
737
|
path: string,
|
|
704
738
|
options?: CancelOptions,
|
|
705
739
|
): Promise<EngineApi.ContainerPathStat | undefined>;
|
|
706
740
|
/** The bytes of one regular file. */
|
|
707
741
|
readFile(path: string, options?: CancelOptions): Promise<Uint8Array>;
|
|
708
|
-
/** One archive, extracted
|
|
742
|
+
/** One archive, extracted in the deepest directory that exists. */
|
|
709
743
|
writeFiles(files: ContainerFile[], options?: CancelOptions): Promise<void>;
|
|
710
744
|
getArchive(
|
|
711
745
|
path: string,
|
|
@@ -912,6 +946,12 @@ export class UnsupportedEngineError extends DockerError {
|
|
|
912
946
|
readonly minimumVersion: string;
|
|
913
947
|
}
|
|
914
948
|
|
|
949
|
+
/** A write to the standard input failed before the output ended, and output can be lost. */
|
|
950
|
+
export class IncompleteOutputError extends DockerError {
|
|
951
|
+
/** The exit code of the command. */
|
|
952
|
+
readonly exitCode: number;
|
|
953
|
+
}
|
|
954
|
+
|
|
915
955
|
/** The base of every answer of the engine that is an error. */
|
|
916
956
|
export class DockerEngineError extends DockerError {
|
|
917
957
|
/** The HTTP status; undefined for an error in the progress of a pull, a push or a load. */
|
|
@@ -983,24 +1023,24 @@ export type * as EngineApi from './engine-api.ts';
|
|
|
983
1023
|
|
|
984
1024
|
Each call sends these requests of the Engine API:
|
|
985
1025
|
|
|
986
|
-
| Call
|
|
987
|
-
|
|
|
988
|
-
| `Docker.connect()`
|
|
989
|
-
| `docker.info()`, `docker.events()`
|
|
990
|
-
| `containers.create()`, `createOrGet()`
|
|
991
|
-
| `containers.run()`
|
|
992
|
-
| `containers.find()`, `container.inspect()`, `container.port()`
|
|
993
|
-
| `containers.list()`
|
|
994
|
-
| `start()`, `stop()`, `restart()`, `kill()`, `pause()`, `unpause()`, `wait()`
|
|
995
|
-
| `container.remove()`
|
|
996
|
-
| `container.logs()`, `followLogs()`
|
|
997
|
-
| `container.attach()`
|
|
998
|
-
| `container.exec()`, `spawn()`
|
|
999
|
-
| `container.stat()`, `readFile()`, `getArchive()`
|
|
1000
|
-
| `container.writeFiles()`, `putArchive()`
|
|
1001
|
-
| `volumes.*`, `volume.*`
|
|
1002
|
-
| `networks.*`, `network.*`
|
|
1003
|
-
| `images.*`
|
|
1026
|
+
| Call | Request |
|
|
1027
|
+
| -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1028
|
+
| `Docker.connect()` | `GET /_ping` |
|
|
1029
|
+
| `docker.info()`, `docker.events()` | `GET /info`, `GET /events` |
|
|
1030
|
+
| `containers.create()`, `createOrGet()` | `POST /containers/create`, and `GET /containers/{id}/json` after a 409 |
|
|
1031
|
+
| `containers.run()` | `create`, `attach`, `start`, `wait`, `DELETE /containers/{id}` |
|
|
1032
|
+
| `containers.find()`, `containers.inspect()`, `container.inspect()`, `container.port()` | `GET /containers/{id}/json` |
|
|
1033
|
+
| `containers.list()` | `GET /containers/json` |
|
|
1034
|
+
| `start()`, `stop()`, `restart()`, `kill()`, `pause()`, `unpause()`, `wait()` | `POST /containers/{id}/start`, `/stop`, `/restart`, `/kill`, `/pause`, `/unpause`, `/wait` |
|
|
1035
|
+
| `container.remove()` | `DELETE /containers/{id}` |
|
|
1036
|
+
| `container.logs()`, `followLogs()` | `GET /containers/{id}/logs` |
|
|
1037
|
+
| `container.attach()` | `POST /containers/{id}/attach` (hijacked) |
|
|
1038
|
+
| `container.exec()`, `spawn()` | `POST /containers/{id}/exec`, `POST /exec/{id}/start` (hijacked), `GET /exec/{id}/json` |
|
|
1039
|
+
| `container.stat()`, `readFile()`, `getArchive()` | `HEAD`, `GET /containers/{id}/archive` |
|
|
1040
|
+
| `container.writeFiles()`, `putArchive()` | `PUT /containers/{id}/archive` |
|
|
1041
|
+
| `volumes.*`, `volume.*` | `POST /volumes/create`, `GET /volumes/{name}`, `GET /volumes`, `DELETE /volumes/{name}` |
|
|
1042
|
+
| `networks.*`, `network.*` | `POST /networks/create`, `GET /networks/{id}`, `GET /networks`, `POST /networks/{id}/connect`, `/disconnect`, `DELETE /networks/{id}` |
|
|
1043
|
+
| `images.*` | `GET /images/{name}/json`, `GET /images/json`, `POST /images/create`, `POST /images/{name}/tag`, `POST /images/{name}/push`, `GET /images/get`, `POST /images/load`, `DELETE /images/{name}`, `POST /images/prune` |
|
|
1004
1044
|
|
|
1005
1045
|
## What each repository changes
|
|
1006
1046
|
|
|
@@ -4,6 +4,8 @@ import { type ExecResult } from './output.ts';
|
|
|
4
4
|
export interface ContainerProcessOptions {
|
|
5
5
|
/** Gives the process a writable `stdin`. */
|
|
6
6
|
stdin: boolean;
|
|
7
|
+
/** The process has a TTY: its output is a raw stream, not a multiplexed one. */
|
|
8
|
+
tty: boolean;
|
|
7
9
|
/** An abort rejects the iteration with the reason of the signal. It does not stop the command. */
|
|
8
10
|
signal?: AbortSignal | undefined;
|
|
9
11
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-process.d.ts","sourceRoot":"","sources":["../src/container-process.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"container-process.d.ts","sourceRoot":"","sources":["../src/container-process.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,KAAK,UAAU,EAAc,MAAM,aAAa,CAAC;AAG1D,MAAM,WAAW,uBAAuB;IACtC,4CAA4C;IAC5C,KAAK,EAAE,OAAO,CAAC;IACf,gFAAgF;IAChF,GAAG,EAAE,OAAO,CAAC;IACb,kGAAkG;IAClG,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IACjC;;;OAGG;IACH,QAAQ,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3D;AAsID;;;;GAIG;AACH,qBAAa,gBAAiB,YAAW,aAAa,CAAC,WAAW,CAAC;;IACjE,4FAA4F;IAC5F,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC;gBAMrD,UAAU,EAAE,kBAAkB,EAC9B,OAAO,EAAE,uBAAuB;IAwDlC;;;OAGG;IACH,IAAI,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAE9B;IAED,oDAAoD;IACpD,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,WAAW,CAAC;IASpD,6CAA6C;IACvC,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;CAIrC"}
|
|
@@ -1,19 +1,126 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventEmitter, once } from 'node:events';
|
|
2
|
+
import { getDefaultHighWaterMark } from 'node:stream';
|
|
3
|
+
import { DockerError, IncompleteOutputError } from "./errors.js";
|
|
2
4
|
import { outputChunks } from "./multiplexed-stream.js";
|
|
3
5
|
import { readOutput } from "./output.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
import { SshExitError } from "./ssh-connection.js";
|
|
7
|
+
/** The codes of a write to a connection that the engine closed. */
|
|
8
|
+
const WRITE_FAILURES = new Set(['EPIPE', 'ECONNRESET']);
|
|
9
|
+
/**
|
|
10
|
+
* The output bytes of a hijacked connection: the head, then each chunk in
|
|
11
|
+
* order, and how the output ended (ADR 0012). It reads with 'data' events,
|
|
12
|
+
* because the iterator of a destroyed stream drops the chunks that Node
|
|
13
|
+
* already read. It pauses the connection while the caller has not taken the
|
|
14
|
+
* high-water mark of Node, so it reads as fast as the caller iterates.
|
|
15
|
+
*/
|
|
16
|
+
class HijackedOutput {
|
|
17
|
+
#socket;
|
|
18
|
+
#highWaterMark = getDefaultHighWaterMark(false);
|
|
19
|
+
#chunks = [];
|
|
20
|
+
/** Emits 'change' when a chunk comes or the output ends, for the iteration that waits. */
|
|
21
|
+
#arrivals = new EventEmitter();
|
|
22
|
+
#queuedBytes = 0;
|
|
23
|
+
#outputBytes;
|
|
24
|
+
#state = {
|
|
25
|
+
phase: 'reading',
|
|
26
|
+
ending: { kind: 'end' },
|
|
27
|
+
};
|
|
28
|
+
constructor(socket, head) {
|
|
29
|
+
this.#socket = socket;
|
|
30
|
+
this.#outputBytes = head.byteLength;
|
|
31
|
+
if (head.byteLength > 0)
|
|
32
|
+
this.#push(head);
|
|
33
|
+
socket.on('data', this.#onData);
|
|
34
|
+
socket.on('error', (error) => this.#onError(error));
|
|
35
|
+
socket.once('end', () => this.#end());
|
|
36
|
+
socket.once('close', () => this.#end());
|
|
37
|
+
}
|
|
38
|
+
#onData = (chunk) => {
|
|
39
|
+
this.#outputBytes += chunk.byteLength;
|
|
40
|
+
this.#push(chunk);
|
|
41
|
+
};
|
|
42
|
+
#push(chunk) {
|
|
43
|
+
this.#chunks.push(chunk);
|
|
44
|
+
this.#queuedBytes += chunk.byteLength;
|
|
45
|
+
if (this.#queuedBytes >= this.#highWaterMark)
|
|
46
|
+
this.#socket.pause();
|
|
47
|
+
this.#arrivals.emit('change');
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* A reset ends the output, and so does a non-zero exit of `ssh`, after
|
|
51
|
+
* which the output can be incomplete. The error that follows a failed write
|
|
52
|
+
* is the error of that write, which writeFailed() already has.
|
|
53
|
+
*/
|
|
54
|
+
#onError(error) {
|
|
55
|
+
const { phase, ending } = this.#state;
|
|
56
|
+
if (phase === 'ended' || ending.kind !== 'end')
|
|
57
|
+
return;
|
|
58
|
+
if (error.code === 'ECONNRESET')
|
|
59
|
+
return;
|
|
60
|
+
this.#state = {
|
|
61
|
+
phase,
|
|
62
|
+
ending: error instanceof SshExitError
|
|
63
|
+
? { kind: 'ssh exit', error }
|
|
64
|
+
: { kind: 'read error', error },
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/** A destroyed connection still holds the chunks that Node read while it was paused. */
|
|
68
|
+
#end() {
|
|
69
|
+
if (this.#state.phase === 'ended')
|
|
70
|
+
return;
|
|
71
|
+
this.#socket.off('data', this.#onData);
|
|
72
|
+
for (let rest = this.#socket.read(); rest !== null;) {
|
|
73
|
+
if (rest instanceof Uint8Array)
|
|
74
|
+
this.#push(rest);
|
|
75
|
+
rest = this.#socket.read();
|
|
76
|
+
}
|
|
77
|
+
this.#state = { phase: 'ended', ending: this.#state.ending };
|
|
78
|
+
this.#arrivals.emit('change');
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Takes a failed write of the input. Node then destroys the connection with
|
|
82
|
+
* the output that is still in the kernel, so the output can be incomplete
|
|
83
|
+
* when no output had come or the connection was paused.
|
|
84
|
+
*/
|
|
85
|
+
writeFailed(error) {
|
|
86
|
+
const { phase, ending } = this.#state;
|
|
87
|
+
if (phase === 'ended' || ending.kind !== 'end')
|
|
88
|
+
return;
|
|
89
|
+
if (!WRITE_FAILURES.has(error.code ?? ''))
|
|
90
|
+
return;
|
|
91
|
+
const incomplete = this.#outputBytes === 0 || this.#socket.isPaused();
|
|
92
|
+
this.#state = {
|
|
93
|
+
phase,
|
|
94
|
+
ending: { kind: 'failed write', error, incomplete },
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/** The error of the failed write or the exit of `ssh`, when the output can be incomplete. */
|
|
98
|
+
get incompleteBecause() {
|
|
99
|
+
const { ending } = this.#state;
|
|
100
|
+
return ending.kind === 'ssh exit' ||
|
|
101
|
+
(ending.kind === 'failed write' && ending.incomplete)
|
|
102
|
+
? { cause: ending.error }
|
|
103
|
+
: undefined;
|
|
104
|
+
}
|
|
105
|
+
async *chunks() {
|
|
106
|
+
for (;;) {
|
|
107
|
+
const chunk = this.#chunks.shift();
|
|
108
|
+
if (chunk !== undefined) {
|
|
109
|
+
this.#queuedBytes -= chunk.byteLength;
|
|
110
|
+
if (this.#queuedBytes < this.#highWaterMark)
|
|
111
|
+
this.#socket.resume();
|
|
112
|
+
yield chunk;
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
const { phase, ending } = this.#state;
|
|
116
|
+
if (phase === 'ended') {
|
|
117
|
+
if (ending.kind === 'read error')
|
|
118
|
+
throw ending.error;
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
await once(this.#arrivals, 'change');
|
|
122
|
+
}
|
|
10
123
|
}
|
|
11
|
-
}
|
|
12
|
-
/** Writes to the socket and resolves when the socket took the bytes. */
|
|
13
|
-
async function write(socket, chunk) {
|
|
14
|
-
const { promise, resolve, reject } = Promise.withResolvers();
|
|
15
|
-
socket.write(chunk, (error) => (error ? reject(error) : resolve()));
|
|
16
|
-
return promise;
|
|
17
124
|
}
|
|
18
125
|
/**
|
|
19
126
|
* An exec or an attached container: one stream of output chunks in the order
|
|
@@ -27,20 +134,26 @@ export class ContainerProcess {
|
|
|
27
134
|
#unread;
|
|
28
135
|
#exitCode;
|
|
29
136
|
constructor(connection, options) {
|
|
30
|
-
const { socket, head
|
|
137
|
+
const { socket, head } = connection;
|
|
31
138
|
const { signal } = options;
|
|
32
|
-
|
|
33
|
-
socket.on('error', () => undefined);
|
|
139
|
+
const output = new HijackedOutput(socket, head);
|
|
34
140
|
const abort = () => socket.destroy(signal?.reason);
|
|
35
141
|
signal?.addEventListener('abort', abort, { once: true });
|
|
36
142
|
socket.once('close', () => signal?.removeEventListener('abort', abort));
|
|
37
143
|
const outputEnded = Promise.withResolvers();
|
|
38
144
|
outputEnded.promise.catch(() => undefined);
|
|
145
|
+
const exitCode = options.exitCode(outputEnded.promise);
|
|
146
|
+
// A caller that never reads the exit code gets no unhandled rejection.
|
|
147
|
+
exitCode.catch(() => undefined);
|
|
148
|
+
this.#exitCode = () => exitCode;
|
|
39
149
|
async function* read() {
|
|
40
150
|
try {
|
|
41
151
|
signal?.throwIfAborted();
|
|
42
|
-
yield* outputChunks(
|
|
152
|
+
yield* outputChunks(output.chunks(), options.tty);
|
|
43
153
|
outputEnded.resolve();
|
|
154
|
+
const incomplete = output.incompleteBecause;
|
|
155
|
+
if (incomplete)
|
|
156
|
+
throw new IncompleteOutputError(await exitCode, incomplete);
|
|
44
157
|
}
|
|
45
158
|
catch (error) {
|
|
46
159
|
outputEnded.reject(error);
|
|
@@ -52,15 +165,22 @@ export class ContainerProcess {
|
|
|
52
165
|
}
|
|
53
166
|
}
|
|
54
167
|
this.#unread = [read()];
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
this.#exitCode = () => exitCode;
|
|
168
|
+
// With no stdin, the input ends at once, as the Docker CLI ends it (ADR 0005).
|
|
169
|
+
if (!options.stdin)
|
|
170
|
+
connection.endInput();
|
|
59
171
|
this.stdin = options.stdin
|
|
60
172
|
? new WritableStream({
|
|
61
173
|
write: async (chunk) => {
|
|
62
|
-
if (chunk.byteLength
|
|
63
|
-
|
|
174
|
+
if (chunk.byteLength === 0)
|
|
175
|
+
return;
|
|
176
|
+
const { promise, resolve, reject } = Promise.withResolvers();
|
|
177
|
+
socket.write(chunk, (error) => {
|
|
178
|
+
if (!error)
|
|
179
|
+
return resolve();
|
|
180
|
+
output.writeFailed(error);
|
|
181
|
+
reject(error);
|
|
182
|
+
});
|
|
183
|
+
await promise;
|
|
64
184
|
},
|
|
65
185
|
close: () => connection.endInput(),
|
|
66
186
|
abort: () => connection.endInput(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-process.js","sourceRoot":"","sources":["../src/container-process.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"container-process.js","sourceRoot":"","sources":["../src/container-process.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAe,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAGnE,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAoB,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAmB,UAAU,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAgBnD,mEAAmE;AACnE,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC;AAexD;;;;;;GAMG;AACH,MAAM,cAAc;IACT,OAAO,CAAS;IAChB,cAAc,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAC;IAChD,OAAO,GAAiB,EAAE,CAAC;IACpC,0FAA0F;IACjF,SAAS,GAAG,IAAI,YAAY,EAAE,CAAC;IACxC,YAAY,GAAG,CAAC,CAAC;IACjB,YAAY,CAAS;IACrB,MAAM,GAAqE;QACzE,KAAK,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AG,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE;gBAClC,KAAK,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE;aACnC,CAAC;YACJ,CAAC,CAAC,SAAS,CAAC;IAChB,CAAC;IAED;;;OAGG;IACH,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;IAC1B,CAAC;IAED,oDAAoD;IACpD,CAAC,MAAM,CAAC,aAAa,CAAC;QACpB,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;QAClC,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,MAAM,CAAC;QACxC,MAAM,KAAK,GAAG,IAAI,WAAW,CAC3B,8EAA8E,CAC/E,CAAC;QACF,OAAO,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IACrD,CAAC;IAED,6CAA6C;IAC7C,KAAK,CAAC,OAAO;QACX,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,CAAC;QACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC,QAAQ,EAAE,GAAG,MAAM,EAAE,CAAC;IACtD,CAAC;CACF"}
|
package/dist/containers.d.ts
CHANGED
|
@@ -90,9 +90,14 @@ export declare class Container {
|
|
|
90
90
|
exec(body: EngineApi.ExecConfig, options?: CancelOptions & {
|
|
91
91
|
stdin?: string | Uint8Array;
|
|
92
92
|
}): Promise<ExecResult>;
|
|
93
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* Runs a command in the container and gives its container process while it
|
|
95
|
+
* runs. With `ref: false`, the process of the command does not keep this
|
|
96
|
+
* process running, as `attach()` does not.
|
|
97
|
+
*/
|
|
94
98
|
spawn(body: EngineApi.ExecConfig, options?: CancelOptions & {
|
|
95
99
|
stdin?: boolean;
|
|
100
|
+
ref?: boolean;
|
|
96
101
|
}): Promise<ContainerProcess>;
|
|
97
102
|
/**
|
|
98
103
|
* Attaches to the output of the container. For a created container, the
|
|
@@ -107,7 +112,10 @@ export declare class Container {
|
|
|
107
112
|
stdin?: boolean;
|
|
108
113
|
ref?: boolean;
|
|
109
114
|
}): Promise<ContainerProcess>;
|
|
110
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* The path stat of a path in the container: HEAD of the archive. undefined
|
|
117
|
+
* for 404, for a missing path and for a missing container alike (ADR 0013).
|
|
118
|
+
*/
|
|
111
119
|
stat(path: string, options?: CancelOptions): Promise<EngineApi.ContainerPathStat | undefined>;
|
|
112
120
|
/** The bytes of one regular file. A directory, a link and each other kind of entry reject with NotAFileError. */
|
|
113
121
|
readFile(path: string, options?: CancelOptions): Promise<Uint8Array>;
|
|
@@ -162,6 +170,8 @@ export declare class Containers {
|
|
|
162
170
|
}): Promise<Created<'container', OwnedContainer, Container>>;
|
|
163
171
|
/** One inspect: a handle with the ID of the engine, or undefined for 404. */
|
|
164
172
|
find(nameOrId: string, options?: CancelOptions): Promise<Container | undefined>;
|
|
173
|
+
/** One inspect: the answer of the engine, or undefined for 404. */
|
|
174
|
+
inspect(nameOrId: string, options?: CancelOptions): Promise<EngineApi.ContainerInspectResponse | undefined>;
|
|
165
175
|
list(options?: CancelOptions & {
|
|
166
176
|
all?: boolean;
|
|
167
177
|
filters?: Filters;
|
package/dist/containers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containers.d.ts","sourceRoot":"","sources":["../src/containers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,KAAK,SAAS,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACL,KAAK,YAAY,EAIlB,MAAM,oBAAoB,CAAC;AAe5B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAA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