@lakutata/containerd 0.0.0-stage → 3.0.0-beta.1
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/LICENSE +23 -0
- package/README.md +409 -2
- package/THIRD_PARTY_NOTICES.md +310 -0
- package/dist/cjs/client/BuildKit.d.ts +176 -0
- package/dist/cjs/client/BuildKit.js +536 -0
- package/dist/cjs/client/BuildKitMessages.d.ts +35 -0
- package/dist/cjs/client/BuildKitMessages.js +123 -0
- package/dist/cjs/client/ContainerStore.d.ts +558 -0
- package/dist/cjs/client/ContainerStore.js +1384 -0
- package/dist/cjs/client/ContainerdClient.d.ts +244 -0
- package/dist/cjs/client/ContainerdClient.js +455 -0
- package/dist/cjs/client/DockerIgnore.d.ts +44 -0
- package/dist/cjs/client/DockerIgnore.js +186 -0
- package/dist/cjs/client/Fifo.d.ts +31 -0
- package/dist/cjs/client/Fifo.js +66 -0
- package/dist/cjs/client/ImageStore.d.ts +258 -0
- package/dist/cjs/client/ImageStore.js +636 -0
- package/dist/cjs/client/Messages.d.ts +103 -0
- package/dist/cjs/client/Messages.js +397 -0
- package/dist/cjs/client/Networks.d.ts +221 -0
- package/dist/cjs/client/Networks.js +630 -0
- package/dist/cjs/client/Platforms.d.ts +53 -0
- package/dist/cjs/client/Platforms.js +169 -0
- package/dist/cjs/client/Reference.d.ts +33 -0
- package/dist/cjs/client/Reference.js +70 -0
- package/dist/cjs/client/Registry.d.ts +145 -0
- package/dist/cjs/client/Registry.js +272 -0
- package/dist/cjs/client/Rootfs.d.ts +83 -0
- package/dist/cjs/client/Rootfs.js +245 -0
- package/dist/cjs/client/Seccomp.d.ts +36 -0
- package/dist/cjs/client/Seccomp.js +156 -0
- package/dist/cjs/client/Spec.d.ts +151 -0
- package/dist/cjs/client/Spec.js +227 -0
- package/dist/cjs/client/Volumes.d.ts +42 -0
- package/dist/cjs/client/Volumes.js +80 -0
- package/dist/cjs/containerd/Containerd.d.ts +442 -0
- package/dist/cjs/containerd/Containerd.js +929 -0
- package/dist/cjs/containerd/exceptions/ContainerdConnectionException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdConnectionException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdContainerNameConflictException.d.ts +8 -0
- package/dist/cjs/containerd/exceptions/ContainerdContainerNameConflictException.js +15 -0
- package/dist/cjs/containerd/exceptions/ContainerdContainerNotFoundException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdContainerNotFoundException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdContainerStateException.d.ts +10 -0
- package/dist/cjs/containerd/exceptions/ContainerdContainerStateException.js +17 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageBuildException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageBuildException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageExportException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageExportException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageImportException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageImportException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageNotFoundException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdImageNotFoundException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdImagePullException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdImagePullException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdImagePushException.d.ts +8 -0
- package/dist/cjs/containerd/exceptions/ContainerdImagePushException.js +15 -0
- package/dist/cjs/containerd/exceptions/ContainerdNetworkConflictException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdNetworkConflictException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdNetworkNotFoundException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdNetworkNotFoundException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdPathNotFoundException.d.ts +8 -0
- package/dist/cjs/containerd/exceptions/ContainerdPathNotFoundException.js +15 -0
- package/dist/cjs/containerd/exceptions/ContainerdPlatformException.d.ts +9 -0
- package/dist/cjs/containerd/exceptions/ContainerdPlatformException.js +16 -0
- package/dist/cjs/containerd/exceptions/ContainerdVolumeInUseException.d.ts +8 -0
- package/dist/cjs/containerd/exceptions/ContainerdVolumeInUseException.js +15 -0
- package/dist/cjs/containerd/exceptions/ContainerdVolumeNotFoundException.d.ts +8 -0
- package/dist/cjs/containerd/exceptions/ContainerdVolumeNotFoundException.js +15 -0
- package/dist/cjs/containerd/lib/ContainerdContainer.d.ts +292 -0
- package/dist/cjs/containerd/lib/ContainerdContainer.js +536 -0
- package/dist/cjs/containerd/lib/ContainerdContainerTTY.d.ts +116 -0
- package/dist/cjs/containerd/lib/ContainerdContainerTTY.js +178 -0
- package/dist/cjs/containerd/lib/ContainerdErrors.d.ts +6 -0
- package/dist/cjs/containerd/lib/ContainerdErrors.js +37 -0
- package/dist/cjs/containerd/lib/ContainerdImage.d.ts +149 -0
- package/dist/cjs/containerd/lib/ContainerdImage.js +222 -0
- package/dist/cjs/containerd/options/ContainerdPruneOptions.d.ts +44 -0
- package/dist/cjs/containerd/options/ContainerdPruneOptions.js +51 -0
- package/dist/cjs/containerd/options/ContainerdRegistryAuthOptions.d.ts +32 -0
- package/dist/cjs/containerd/options/ContainerdRegistryAuthOptions.js +45 -0
- package/dist/cjs/containerd/options/container/ContainerCommitOptions.d.ts +57 -0
- package/dist/cjs/containerd/options/container/ContainerCommitOptions.js +66 -0
- package/dist/cjs/containerd/options/container/ContainerCreateOptions.d.ts +273 -0
- package/dist/cjs/containerd/options/container/ContainerCreateOptions.js +239 -0
- package/dist/cjs/containerd/options/container/ContainerExecOptions.d.ts +53 -0
- package/dist/cjs/containerd/options/container/ContainerExecOptions.js +63 -0
- package/dist/cjs/containerd/options/container/ContainerExportDirectoryOptions.d.ts +32 -0
- package/dist/cjs/containerd/options/container/ContainerExportDirectoryOptions.js +45 -0
- package/dist/cjs/containerd/options/container/ContainerKillOptions.d.ts +30 -0
- package/dist/cjs/containerd/options/container/ContainerKillOptions.js +41 -0
- package/dist/cjs/containerd/options/container/ContainerLogsOptions.d.ts +34 -0
- package/dist/cjs/containerd/options/container/ContainerLogsOptions.js +44 -0
- package/dist/cjs/containerd/options/container/ContainerRemoveOptions.d.ts +22 -0
- package/dist/cjs/containerd/options/container/ContainerRemoveOptions.js +34 -0
- package/dist/cjs/containerd/options/container/ContainerResourceOptions.d.ts +63 -0
- package/dist/cjs/containerd/options/container/ContainerResourceOptions.js +67 -0
- package/dist/cjs/containerd/options/container/ContainerStopOptions.d.ts +30 -0
- package/dist/cjs/containerd/options/container/ContainerStopOptions.js +41 -0
- package/dist/cjs/containerd/options/container/ContainerTTYConsoleSizeOptions.d.ts +26 -0
- package/dist/cjs/containerd/options/container/ContainerTTYConsoleSizeOptions.js +40 -0
- package/dist/cjs/containerd/options/container/ContainerTTYOptions.d.ts +50 -0
- package/dist/cjs/containerd/options/container/ContainerTTYOptions.js +63 -0
- package/dist/cjs/containerd/options/image/ImageBuildOptions.d.ts +88 -0
- package/dist/cjs/containerd/options/image/ImageBuildOptions.js +95 -0
- package/dist/cjs/containerd/options/image/ImageExportOptions.d.ts +25 -0
- package/dist/cjs/containerd/options/image/ImageExportOptions.js +39 -0
- package/dist/cjs/containerd/options/image/ImageImportOptions.d.ts +38 -0
- package/dist/cjs/containerd/options/image/ImageImportOptions.js +47 -0
- package/dist/cjs/containerd/options/image/ImagePullOptions.d.ts +53 -0
- package/dist/cjs/containerd/options/image/ImagePullOptions.js +66 -0
- package/dist/cjs/containerd/options/image/ImagePushOptions.d.ts +44 -0
- package/dist/cjs/containerd/options/image/ImagePushOptions.js +58 -0
- package/dist/cjs/containerd/options/network/NetworkCreateOptions.d.ts +82 -0
- package/dist/cjs/containerd/options/network/NetworkCreateOptions.js +83 -0
- package/dist/cjs/containerd/options/volume/VolumeCreateOptions.d.ts +26 -0
- package/dist/cjs/containerd/options/volume/VolumeCreateOptions.js +40 -0
- package/dist/cjs/containerd/types/ContainerdBind.d.ts +28 -0
- package/dist/cjs/containerd/types/ContainerdBind.js +2 -0
- package/dist/cjs/containerd/types/ContainerdBuildOutputCallback.d.ts +6 -0
- package/dist/cjs/containerd/types/ContainerdBuildOutputCallback.js +2 -0
- package/dist/cjs/containerd/types/ContainerdContainerNetwork.d.ts +40 -0
- package/dist/cjs/containerd/types/ContainerdContainerNetwork.js +2 -0
- package/dist/cjs/containerd/types/ContainerdContainerPort.d.ts +22 -0
- package/dist/cjs/containerd/types/ContainerdContainerPort.js +2 -0
- package/dist/cjs/containerd/types/ContainerdContainerState.d.ts +42 -0
- package/dist/cjs/containerd/types/ContainerdContainerState.js +2 -0
- package/dist/cjs/containerd/types/ContainerdContainerStats.d.ts +107 -0
- package/dist/cjs/containerd/types/ContainerdContainerStats.js +2 -0
- package/dist/cjs/containerd/types/ContainerdDevice.d.ts +25 -0
- package/dist/cjs/containerd/types/ContainerdDevice.js +2 -0
- package/dist/cjs/containerd/types/ContainerdExecResult.d.ts +18 -0
- package/dist/cjs/containerd/types/ContainerdExecResult.js +2 -0
- package/dist/cjs/containerd/types/ContainerdImageConfig.d.ts +46 -0
- package/dist/cjs/containerd/types/ContainerdImageConfig.js +2 -0
- package/dist/cjs/containerd/types/ContainerdNetworkInfo.d.ts +49 -0
- package/dist/cjs/containerd/types/ContainerdNetworkInfo.js +2 -0
- package/dist/cjs/containerd/types/ContainerdProgressCallback.d.ts +29 -0
- package/dist/cjs/containerd/types/ContainerdProgressCallback.js +2 -0
- package/dist/cjs/containerd/types/ContainerdPruneResult.d.ts +21 -0
- package/dist/cjs/containerd/types/ContainerdPruneResult.js +2 -0
- package/dist/cjs/containerd/types/ContainerdRestartPolicy.d.ts +13 -0
- package/dist/cjs/containerd/types/ContainerdRestartPolicy.js +2 -0
- package/dist/cjs/containerd/types/ContainerdTmpfs.d.ts +20 -0
- package/dist/cjs/containerd/types/ContainerdTmpfs.js +2 -0
- package/dist/cjs/containerd/types/ContainerdVolume.d.ts +19 -0
- package/dist/cjs/containerd/types/ContainerdVolume.js +2 -0
- package/dist/cjs/containerd/types/ContainerdVolumeInfo.d.ts +26 -0
- package/dist/cjs/containerd/types/ContainerdVolumeInfo.js +2 -0
- package/dist/cjs/exports/Containerd.d.ts +69 -0
- package/dist/cjs/exports/Containerd.js +87 -0
- package/dist/cjs/package.json +1 -0
- package/dist/esm/client/BuildKit.js +488 -0
- package/dist/esm/client/BuildKitMessages.js +120 -0
- package/dist/esm/client/ContainerStore.js +1339 -0
- package/dist/esm/client/ContainerdClient.js +416 -0
- package/dist/esm/client/DockerIgnore.js +179 -0
- package/dist/esm/client/Fifo.js +59 -0
- package/dist/esm/client/ImageStore.js +628 -0
- package/dist/esm/client/Messages.js +393 -0
- package/dist/esm/client/Networks.js +621 -0
- package/dist/esm/client/Platforms.js +156 -0
- package/dist/esm/client/Reference.js +66 -0
- package/dist/esm/client/Registry.js +263 -0
- package/dist/esm/client/Rootfs.js +234 -0
- package/dist/esm/client/Seccomp.js +152 -0
- package/dist/esm/client/Spec.js +220 -0
- package/dist/esm/client/Volumes.js +73 -0
- package/dist/esm/containerd/Containerd.js +923 -0
- package/dist/esm/containerd/exceptions/ContainerdConnectionException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdContainerNameConflictException.js +11 -0
- package/dist/esm/containerd/exceptions/ContainerdContainerNotFoundException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdContainerStateException.js +13 -0
- package/dist/esm/containerd/exceptions/ContainerdImageBuildException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdImageExportException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdImageImportException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdImageNotFoundException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdImagePullException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdImagePushException.js +11 -0
- package/dist/esm/containerd/exceptions/ContainerdNetworkConflictException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdNetworkNotFoundException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdPathNotFoundException.js +11 -0
- package/dist/esm/containerd/exceptions/ContainerdPlatformException.js +12 -0
- package/dist/esm/containerd/exceptions/ContainerdVolumeInUseException.js +11 -0
- package/dist/esm/containerd/exceptions/ContainerdVolumeNotFoundException.js +11 -0
- package/dist/esm/containerd/lib/ContainerdContainer.js +533 -0
- package/dist/esm/containerd/lib/ContainerdContainerTTY.js +175 -0
- package/dist/esm/containerd/lib/ContainerdErrors.js +34 -0
- package/dist/esm/containerd/lib/ContainerdImage.js +219 -0
- package/dist/esm/containerd/options/ContainerdPruneOptions.js +47 -0
- package/dist/esm/containerd/options/ContainerdRegistryAuthOptions.js +41 -0
- package/dist/esm/containerd/options/container/ContainerCommitOptions.js +62 -0
- package/dist/esm/containerd/options/container/ContainerCreateOptions.js +235 -0
- package/dist/esm/containerd/options/container/ContainerExecOptions.js +59 -0
- package/dist/esm/containerd/options/container/ContainerExportDirectoryOptions.js +41 -0
- package/dist/esm/containerd/options/container/ContainerKillOptions.js +37 -0
- package/dist/esm/containerd/options/container/ContainerLogsOptions.js +40 -0
- package/dist/esm/containerd/options/container/ContainerRemoveOptions.js +30 -0
- package/dist/esm/containerd/options/container/ContainerResourceOptions.js +63 -0
- package/dist/esm/containerd/options/container/ContainerStopOptions.js +37 -0
- package/dist/esm/containerd/options/container/ContainerTTYConsoleSizeOptions.js +36 -0
- package/dist/esm/containerd/options/container/ContainerTTYOptions.js +59 -0
- package/dist/esm/containerd/options/image/ImageBuildOptions.js +91 -0
- package/dist/esm/containerd/options/image/ImageExportOptions.js +35 -0
- package/dist/esm/containerd/options/image/ImageImportOptions.js +43 -0
- package/dist/esm/containerd/options/image/ImagePullOptions.js +62 -0
- package/dist/esm/containerd/options/image/ImagePushOptions.js +54 -0
- package/dist/esm/containerd/options/network/NetworkCreateOptions.js +79 -0
- package/dist/esm/containerd/options/volume/VolumeCreateOptions.js +36 -0
- package/dist/esm/containerd/types/ContainerdBind.js +1 -0
- package/dist/esm/containerd/types/ContainerdBuildOutputCallback.js +1 -0
- package/dist/esm/containerd/types/ContainerdContainerNetwork.js +1 -0
- package/dist/esm/containerd/types/ContainerdContainerPort.js +1 -0
- package/dist/esm/containerd/types/ContainerdContainerState.js +1 -0
- package/dist/esm/containerd/types/ContainerdContainerStats.js +1 -0
- package/dist/esm/containerd/types/ContainerdDevice.js +1 -0
- package/dist/esm/containerd/types/ContainerdExecResult.js +1 -0
- package/dist/esm/containerd/types/ContainerdImageConfig.js +1 -0
- package/dist/esm/containerd/types/ContainerdNetworkInfo.js +1 -0
- package/dist/esm/containerd/types/ContainerdProgressCallback.js +1 -0
- package/dist/esm/containerd/types/ContainerdPruneResult.js +1 -0
- package/dist/esm/containerd/types/ContainerdRestartPolicy.js +1 -0
- package/dist/esm/containerd/types/ContainerdTmpfs.js +1 -0
- package/dist/esm/containerd/types/ContainerdVolume.js +1 -0
- package/dist/esm/containerd/types/ContainerdVolumeInfo.js +1 -0
- package/dist/esm/exports/Containerd.js +68 -0
- package/dist/types/client/BuildKit.d.ts +176 -0
- package/dist/types/client/BuildKitMessages.d.ts +35 -0
- package/dist/types/client/ContainerStore.d.ts +558 -0
- package/dist/types/client/ContainerdClient.d.ts +244 -0
- package/dist/types/client/DockerIgnore.d.ts +44 -0
- package/dist/types/client/Fifo.d.ts +31 -0
- package/dist/types/client/ImageStore.d.ts +258 -0
- package/dist/types/client/Messages.d.ts +103 -0
- package/dist/types/client/Networks.d.ts +221 -0
- package/dist/types/client/Platforms.d.ts +53 -0
- package/dist/types/client/Reference.d.ts +33 -0
- package/dist/types/client/Registry.d.ts +145 -0
- package/dist/types/client/Rootfs.d.ts +83 -0
- package/dist/types/client/Seccomp.d.ts +36 -0
- package/dist/types/client/Spec.d.ts +151 -0
- package/dist/types/client/Volumes.d.ts +42 -0
- package/dist/types/containerd/Containerd.d.ts +442 -0
- package/dist/types/containerd/exceptions/ContainerdConnectionException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdContainerNameConflictException.d.ts +8 -0
- package/dist/types/containerd/exceptions/ContainerdContainerNotFoundException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdContainerStateException.d.ts +10 -0
- package/dist/types/containerd/exceptions/ContainerdImageBuildException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdImageExportException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdImageImportException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdImageNotFoundException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdImagePullException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdImagePushException.d.ts +8 -0
- package/dist/types/containerd/exceptions/ContainerdNetworkConflictException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdNetworkNotFoundException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdPathNotFoundException.d.ts +8 -0
- package/dist/types/containerd/exceptions/ContainerdPlatformException.d.ts +9 -0
- package/dist/types/containerd/exceptions/ContainerdVolumeInUseException.d.ts +8 -0
- package/dist/types/containerd/exceptions/ContainerdVolumeNotFoundException.d.ts +8 -0
- package/dist/types/containerd/lib/ContainerdContainer.d.ts +292 -0
- package/dist/types/containerd/lib/ContainerdContainerTTY.d.ts +116 -0
- package/dist/types/containerd/lib/ContainerdErrors.d.ts +6 -0
- package/dist/types/containerd/lib/ContainerdImage.d.ts +149 -0
- package/dist/types/containerd/options/ContainerdPruneOptions.d.ts +44 -0
- package/dist/types/containerd/options/ContainerdRegistryAuthOptions.d.ts +32 -0
- package/dist/types/containerd/options/container/ContainerCommitOptions.d.ts +57 -0
- package/dist/types/containerd/options/container/ContainerCreateOptions.d.ts +273 -0
- package/dist/types/containerd/options/container/ContainerExecOptions.d.ts +53 -0
- package/dist/types/containerd/options/container/ContainerExportDirectoryOptions.d.ts +32 -0
- package/dist/types/containerd/options/container/ContainerKillOptions.d.ts +30 -0
- package/dist/types/containerd/options/container/ContainerLogsOptions.d.ts +34 -0
- package/dist/types/containerd/options/container/ContainerRemoveOptions.d.ts +22 -0
- package/dist/types/containerd/options/container/ContainerResourceOptions.d.ts +63 -0
- package/dist/types/containerd/options/container/ContainerStopOptions.d.ts +30 -0
- package/dist/types/containerd/options/container/ContainerTTYConsoleSizeOptions.d.ts +26 -0
- package/dist/types/containerd/options/container/ContainerTTYOptions.d.ts +50 -0
- package/dist/types/containerd/options/image/ImageBuildOptions.d.ts +88 -0
- package/dist/types/containerd/options/image/ImageExportOptions.d.ts +25 -0
- package/dist/types/containerd/options/image/ImageImportOptions.d.ts +38 -0
- package/dist/types/containerd/options/image/ImagePullOptions.d.ts +53 -0
- package/dist/types/containerd/options/image/ImagePushOptions.d.ts +44 -0
- package/dist/types/containerd/options/network/NetworkCreateOptions.d.ts +82 -0
- package/dist/types/containerd/options/volume/VolumeCreateOptions.d.ts +26 -0
- package/dist/types/containerd/types/ContainerdBind.d.ts +28 -0
- package/dist/types/containerd/types/ContainerdBuildOutputCallback.d.ts +6 -0
- package/dist/types/containerd/types/ContainerdContainerNetwork.d.ts +40 -0
- package/dist/types/containerd/types/ContainerdContainerPort.d.ts +22 -0
- package/dist/types/containerd/types/ContainerdContainerState.d.ts +42 -0
- package/dist/types/containerd/types/ContainerdContainerStats.d.ts +107 -0
- package/dist/types/containerd/types/ContainerdDevice.d.ts +25 -0
- package/dist/types/containerd/types/ContainerdExecResult.d.ts +18 -0
- package/dist/types/containerd/types/ContainerdImageConfig.d.ts +46 -0
- package/dist/types/containerd/types/ContainerdNetworkInfo.d.ts +49 -0
- package/dist/types/containerd/types/ContainerdProgressCallback.d.ts +29 -0
- package/dist/types/containerd/types/ContainerdPruneResult.d.ts +21 -0
- package/dist/types/containerd/types/ContainerdRestartPolicy.d.ts +13 -0
- package/dist/types/containerd/types/ContainerdTmpfs.d.ts +20 -0
- package/dist/types/containerd/types/ContainerdVolume.d.ts +19 -0
- package/dist/types/containerd/types/ContainerdVolumeInfo.d.ts +26 -0
- package/dist/types/exports/Containerd.d.ts +69 -0
- package/package.json +51 -4
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import net from 'node:net';
|
|
2
|
+
/**
|
|
3
|
+
* The FIFOs of the standard streams of a process of containerd (the ones of its cio): created by mkfifo, the shim
|
|
4
|
+
* writing (or reading) them, read (or written) from the event loop
|
|
5
|
+
*/
|
|
6
|
+
export declare class ProcessFifo {
|
|
7
|
+
#private;
|
|
8
|
+
readonly path: string;
|
|
9
|
+
protected readonly direction: 'read' | 'write';
|
|
10
|
+
protected constructor(path: string, direction: 'read' | 'write');
|
|
11
|
+
/**
|
|
12
|
+
* Whether the FIFOs can be created (mkfifo of the system: coreutils, busybox)
|
|
13
|
+
*/
|
|
14
|
+
static Supported(): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Create a FIFO, kept open (read and write) for the shim to open its end without waiting
|
|
17
|
+
* @param path
|
|
18
|
+
* @param direction read: the shim writes it (stdout, stderr), write: the shim reads it (stdin)
|
|
19
|
+
*/
|
|
20
|
+
static Create(path: string, direction: 'read' | 'write'): ProcessFifo;
|
|
21
|
+
/**
|
|
22
|
+
* Its end opened, once the shim has opened its own one (after the creation of the process): the one kept closed,
|
|
23
|
+
* the end of the stream is the one of the shim
|
|
24
|
+
*/
|
|
25
|
+
open(): net.Socket;
|
|
26
|
+
protected releaseKeeper(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Close it
|
|
29
|
+
*/
|
|
30
|
+
close(): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ProcessFifo = void 0;
|
|
7
|
+
const node_child_process_1 = require("node:child_process");
|
|
8
|
+
const node_fs_1 = require("node:fs");
|
|
9
|
+
const node_net_1 = __importDefault(require("node:net"));
|
|
10
|
+
/**
|
|
11
|
+
* The FIFOs of the standard streams of a process of containerd (the ones of its cio): created by mkfifo, the shim
|
|
12
|
+
* writing (or reading) them, read (or written) from the event loop
|
|
13
|
+
*/
|
|
14
|
+
class ProcessFifo {
|
|
15
|
+
#keeper;
|
|
16
|
+
#socket;
|
|
17
|
+
constructor(path, direction) {
|
|
18
|
+
this.path = path;
|
|
19
|
+
this.direction = direction;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Whether the FIFOs can be created (mkfifo of the system: coreutils, busybox)
|
|
23
|
+
*/
|
|
24
|
+
static Supported() {
|
|
25
|
+
return (0, node_child_process_1.spawnSync)('mkfifo', ['--help'], { stdio: 'ignore' }).error === undefined;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Create a FIFO, kept open (read and write) for the shim to open its end without waiting
|
|
29
|
+
* @param path
|
|
30
|
+
* @param direction read: the shim writes it (stdout, stderr), write: the shim reads it (stdin)
|
|
31
|
+
*/
|
|
32
|
+
static Create(path, direction) {
|
|
33
|
+
const result = (0, node_child_process_1.spawnSync)('mkfifo', ['-m', '0600', path], { stdio: ['ignore', 'ignore', 'pipe'] });
|
|
34
|
+
if (result.error || result.status !== 0)
|
|
35
|
+
throw new Error(`The FIFO ${path} is not created: ${result.error?.message ?? result.stderr.toString().trim()}`);
|
|
36
|
+
const fifo = new ProcessFifo(path, direction);
|
|
37
|
+
fifo.#keeper = (0, node_fs_1.openSync)(path, node_fs_1.constants.O_RDWR | node_fs_1.constants.O_NONBLOCK);
|
|
38
|
+
return fifo;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Its end opened, once the shim has opened its own one (after the creation of the process): the one kept closed,
|
|
42
|
+
* the end of the stream is the one of the shim
|
|
43
|
+
*/
|
|
44
|
+
open() {
|
|
45
|
+
if (this.#socket)
|
|
46
|
+
return this.#socket;
|
|
47
|
+
const flags = (this.direction === 'read' ? node_fs_1.constants.O_RDONLY : node_fs_1.constants.O_WRONLY) | node_fs_1.constants.O_NONBLOCK;
|
|
48
|
+
this.#socket = new node_net_1.default.Socket({ fd: (0, node_fs_1.openSync)(this.path, flags), readable: this.direction === 'read', writable: this.direction === 'write' });
|
|
49
|
+
this.releaseKeeper();
|
|
50
|
+
return this.#socket;
|
|
51
|
+
}
|
|
52
|
+
releaseKeeper() {
|
|
53
|
+
if (this.#keeper === undefined)
|
|
54
|
+
return;
|
|
55
|
+
(0, node_fs_1.closeSync)(this.#keeper);
|
|
56
|
+
this.#keeper = undefined;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Close it
|
|
60
|
+
*/
|
|
61
|
+
close() {
|
|
62
|
+
this.releaseKeeper();
|
|
63
|
+
this.#socket?.destroy();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.ProcessFifo = ProcessFifo;
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { ContainerdClient, type ContentDescriptor } from './ContainerdClient.js';
|
|
2
|
+
import { type Message } from '@lakutata/grpc';
|
|
3
|
+
import { type Platform } from './Platforms.js';
|
|
4
|
+
import { type RegistryOptions } from './Registry.js';
|
|
5
|
+
/**
|
|
6
|
+
* A manifest of an image (OCI, Docker)
|
|
7
|
+
*/
|
|
8
|
+
export type ImageManifest = {
|
|
9
|
+
schemaVersion: number;
|
|
10
|
+
mediaType?: string;
|
|
11
|
+
config: ContentDescriptor;
|
|
12
|
+
layers: ContentDescriptor[];
|
|
13
|
+
annotations?: Record<string, string>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* An index of the manifests of the platforms of an image
|
|
17
|
+
*/
|
|
18
|
+
export type ImageIndex = {
|
|
19
|
+
schemaVersion: number;
|
|
20
|
+
mediaType?: string;
|
|
21
|
+
manifests: ContentDescriptor[];
|
|
22
|
+
annotations?: Record<string, string>;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* The configuration of an image (OCI): its platform, the configuration of its containers, its layers
|
|
26
|
+
*/
|
|
27
|
+
export type ImageConfigFile = {
|
|
28
|
+
architecture: string;
|
|
29
|
+
os: string;
|
|
30
|
+
variant?: string;
|
|
31
|
+
created?: string;
|
|
32
|
+
config?: {
|
|
33
|
+
Env?: string[];
|
|
34
|
+
Cmd?: string[];
|
|
35
|
+
Entrypoint?: string[];
|
|
36
|
+
WorkingDir?: string;
|
|
37
|
+
User?: string;
|
|
38
|
+
ExposedPorts?: Record<string, object>;
|
|
39
|
+
Volumes?: Record<string, object>;
|
|
40
|
+
Labels?: Record<string, string>;
|
|
41
|
+
StopSignal?: string;
|
|
42
|
+
};
|
|
43
|
+
rootfs: {
|
|
44
|
+
type: string;
|
|
45
|
+
diff_ids: string[];
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* The changes of the configuration of an image committed
|
|
50
|
+
*/
|
|
51
|
+
export type ImageConfigChanges = {
|
|
52
|
+
cmd?: string[];
|
|
53
|
+
entrypoint?: string[];
|
|
54
|
+
/**
|
|
55
|
+
* Its environment variables added or replaced (KEY=value)
|
|
56
|
+
*/
|
|
57
|
+
env?: string[];
|
|
58
|
+
workingDir?: string;
|
|
59
|
+
user?: string;
|
|
60
|
+
labels?: Record<string, string>;
|
|
61
|
+
/**
|
|
62
|
+
* Its ports exposed (80, 53/udp)
|
|
63
|
+
*/
|
|
64
|
+
exposedPorts?: string[];
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* An image of a platform, resolved: its manifest and its configuration
|
|
68
|
+
*/
|
|
69
|
+
export type ResolvedImage = {
|
|
70
|
+
image: Message;
|
|
71
|
+
name: string;
|
|
72
|
+
target: ContentDescriptor;
|
|
73
|
+
manifestDescriptor: ContentDescriptor;
|
|
74
|
+
manifest: ImageManifest;
|
|
75
|
+
config: ImageConfigFile;
|
|
76
|
+
platform: Platform;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* The progress of the transfer of a blob
|
|
80
|
+
*/
|
|
81
|
+
export type TransferProgress = {
|
|
82
|
+
digest: string;
|
|
83
|
+
mediaType: string;
|
|
84
|
+
current: number;
|
|
85
|
+
total: number;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* The options of a pull
|
|
89
|
+
*/
|
|
90
|
+
export type PullOptions = {
|
|
91
|
+
/**
|
|
92
|
+
* The platforms pulled: the one of the machine by default, all with "all"
|
|
93
|
+
*/
|
|
94
|
+
platforms?: Platform[] | 'all';
|
|
95
|
+
registry?: RegistryOptions;
|
|
96
|
+
/**
|
|
97
|
+
* Unpack the layers of the platforms the machine runs (the ones of the store) into its snapshots, true by default
|
|
98
|
+
*/
|
|
99
|
+
unpack?: boolean;
|
|
100
|
+
progress?: (progress: TransferProgress) => void;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* The identifiers of the chain of layers (OCI): the ones of the snapshots of their unpacking
|
|
104
|
+
* @param diffIds
|
|
105
|
+
*/
|
|
106
|
+
export declare function chainIds(diffIds: string[]): string[];
|
|
107
|
+
/**
|
|
108
|
+
* The images of containerd: pulled from the registries, unpacked into the snapshots, pushed, imported and exported
|
|
109
|
+
* (OCI image layouts, the archives of docker save), as ctr and nerdctl do: their content bound by the labels of the
|
|
110
|
+
* garbage collection of containerd, under a lease until the image references it
|
|
111
|
+
*/
|
|
112
|
+
export declare class ImageStore {
|
|
113
|
+
protected readonly client: ContainerdClient;
|
|
114
|
+
readonly snapshotter: string;
|
|
115
|
+
readonly temporary: string;
|
|
116
|
+
readonly runnablePlatforms: () => Platform[];
|
|
117
|
+
/**
|
|
118
|
+
* @param client
|
|
119
|
+
* @param snapshotter
|
|
120
|
+
* @param temporary the directory of the archives extracted (a disk of the machine, not a small tmpfs)
|
|
121
|
+
* @param runnablePlatforms the platforms the machine runs, unpacked by the pulls and the imports (the one of the
|
|
122
|
+
* machine by default)
|
|
123
|
+
*/
|
|
124
|
+
constructor(client: ContainerdClient, snapshotter: string, temporary?: string, runnablePlatforms?: () => Platform[]);
|
|
125
|
+
/**
|
|
126
|
+
* The JSON of a content
|
|
127
|
+
* @param digest
|
|
128
|
+
*/
|
|
129
|
+
protected readJson<T>(digest: string): Promise<T>;
|
|
130
|
+
/**
|
|
131
|
+
* The best manifest of an index for a platform, among the ones the content store has (or all)
|
|
132
|
+
* @param index
|
|
133
|
+
* @param platform
|
|
134
|
+
* @param local
|
|
135
|
+
*/
|
|
136
|
+
protected chooseManifest(index: ImageIndex, platform: Platform, local: boolean): Promise<ContentDescriptor | undefined>;
|
|
137
|
+
/**
|
|
138
|
+
* The image of a name (the reference given or its normalized name), undefined when it does not exist
|
|
139
|
+
* @param name
|
|
140
|
+
*/
|
|
141
|
+
get(name: string): Promise<Message | undefined>;
|
|
142
|
+
/**
|
|
143
|
+
* Resolve an image for a platform: its manifest and its configuration (the manifest of the platform of its index)
|
|
144
|
+
* @param name
|
|
145
|
+
* @param platform the one of the machine by default
|
|
146
|
+
*/
|
|
147
|
+
resolve(name: string, platform?: Platform): Promise<ResolvedImage>;
|
|
148
|
+
/**
|
|
149
|
+
* The platforms of an image the content store has (the ones pulled)
|
|
150
|
+
* @param name
|
|
151
|
+
*/
|
|
152
|
+
platforms(name: string): Promise<Platform[]>;
|
|
153
|
+
/**
|
|
154
|
+
* Unpack the layers of an image into the snapshots of the snapshotter (named by the chain of their identifiers), the
|
|
155
|
+
* configuration bound to the last one
|
|
156
|
+
* @param manifest
|
|
157
|
+
* @param lease
|
|
158
|
+
*/
|
|
159
|
+
unpack(manifest: ImageManifest, lease: string): Promise<string>;
|
|
160
|
+
/**
|
|
161
|
+
* Write a manifest, its configuration and its layers (the blobs given by a source), bound by the labels of the
|
|
162
|
+
* garbage collection
|
|
163
|
+
* @param manifest
|
|
164
|
+
* @param blob the bytes of a blob (its stream)
|
|
165
|
+
* @param lease
|
|
166
|
+
* @param labels the labels of all the content (its source)
|
|
167
|
+
* @param progress
|
|
168
|
+
*/
|
|
169
|
+
protected writeImage(manifest: ImageManifest, blob: (descriptor: ContentDescriptor) => Promise<Uint8Array | AsyncIterable<Uint8Array>>, lease: string, labels: Record<string, string>, progress?: (progress: TransferProgress) => void): Promise<void>;
|
|
170
|
+
/**
|
|
171
|
+
* The labels of a manifest binding its configuration and its layers
|
|
172
|
+
* @param manifest
|
|
173
|
+
*/
|
|
174
|
+
protected manifestLabels(manifest: ImageManifest): Record<string, string>;
|
|
175
|
+
/**
|
|
176
|
+
* Pull an image from its registry: the manifests of the platforms asked (of its index), their configurations and
|
|
177
|
+
* their layers; the image named by its reference (docker.io/library/busybox:latest), unpacked for the machine
|
|
178
|
+
* @param reference
|
|
179
|
+
* @param options
|
|
180
|
+
*/
|
|
181
|
+
pull(reference: string, options?: PullOptions): Promise<string>;
|
|
182
|
+
/**
|
|
183
|
+
* Unpack an image for the platforms the machine runs, among the ones the content store has (its manifests pulled):
|
|
184
|
+
* not the other platforms, nor the attestations (unknown/unknown)
|
|
185
|
+
* @param name
|
|
186
|
+
* @param lease
|
|
187
|
+
*/
|
|
188
|
+
protected unpackFor(name: string, lease: string): Promise<void>;
|
|
189
|
+
/**
|
|
190
|
+
* Push an image to a registry (as another reference): the manifest of the platform asked; without it, the manifests
|
|
191
|
+
* of all the platforms and the index when the content store has all of them, the manifest of the machine's platform
|
|
192
|
+
* otherwise
|
|
193
|
+
* @param name
|
|
194
|
+
* @param options
|
|
195
|
+
*/
|
|
196
|
+
push(name: string, options?: {
|
|
197
|
+
reference?: string;
|
|
198
|
+
platform?: Platform;
|
|
199
|
+
registry?: RegistryOptions;
|
|
200
|
+
progress?: (progress: TransferProgress) => void;
|
|
201
|
+
}): Promise<void>;
|
|
202
|
+
/**
|
|
203
|
+
* Commit the changes of a snapshot (the one of a container) on its image: a layer of their diff, the configuration
|
|
204
|
+
* of the image with its changes, a manifest of the platform, the image named (and unpacked)
|
|
205
|
+
* @param options
|
|
206
|
+
*/
|
|
207
|
+
commit(options: {
|
|
208
|
+
image: string;
|
|
209
|
+
platform: Platform;
|
|
210
|
+
snapshotKey: string;
|
|
211
|
+
name: string;
|
|
212
|
+
changes?: ImageConfigChanges;
|
|
213
|
+
comment?: string;
|
|
214
|
+
author?: string;
|
|
215
|
+
}): Promise<string>;
|
|
216
|
+
/**
|
|
217
|
+
* Name an image again (a tag), its target the same
|
|
218
|
+
* @param name
|
|
219
|
+
* @param reference
|
|
220
|
+
*/
|
|
221
|
+
tag(name: string, reference: string): Promise<string>;
|
|
222
|
+
/**
|
|
223
|
+
* Remove an image (its content and its snapshots are collected by containerd once nothing references them)
|
|
224
|
+
* @param name
|
|
225
|
+
*/
|
|
226
|
+
remove(name: string): Promise<void>;
|
|
227
|
+
/**
|
|
228
|
+
* Import an archive of images: an OCI image layout (nerdctl save, docker save of Docker 25+), or an archive of
|
|
229
|
+
* docker save; the images named by the archive (or by a name given, to an archive of one image), unpacked for the
|
|
230
|
+
* platforms the machine runs
|
|
231
|
+
* @param source a file, or its stream
|
|
232
|
+
* @param options
|
|
233
|
+
*/
|
|
234
|
+
import(source: string | NodeJS.ReadableStream, options?: {
|
|
235
|
+
name?: string;
|
|
236
|
+
unpack?: boolean;
|
|
237
|
+
}): Promise<string[]>;
|
|
238
|
+
/**
|
|
239
|
+
* Write a manifest or an index of an archive, and what it references (the manifests the archive has)
|
|
240
|
+
* @param descriptor
|
|
241
|
+
* @param blob
|
|
242
|
+
* @param lease
|
|
243
|
+
*/
|
|
244
|
+
protected writeTree(descriptor: ContentDescriptor, blob: (descriptor: ContentDescriptor) => Promise<AsyncIterable<Uint8Array>>, lease: string): Promise<void>;
|
|
245
|
+
/**
|
|
246
|
+
* Extract an archive into a directory
|
|
247
|
+
* @param source
|
|
248
|
+
* @param directory
|
|
249
|
+
*/
|
|
250
|
+
protected extract(source: NodeJS.ReadableStream, directory: string): Promise<void>;
|
|
251
|
+
/**
|
|
252
|
+
* Export images into an archive: an OCI image layout (named by io.containerd.image.name), with the manifest.json of
|
|
253
|
+
* docker load (the manifest of the platform of the machine, or the first one)
|
|
254
|
+
* @param names
|
|
255
|
+
* @param destination a file, or its stream
|
|
256
|
+
*/
|
|
257
|
+
export(names: string[], destination: string | NodeJS.WritableStream): Promise<void>;
|
|
258
|
+
}
|