@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.
Files changed (301) hide show
  1. package/LICENSE +23 -0
  2. package/README.md +409 -2
  3. package/THIRD_PARTY_NOTICES.md +310 -0
  4. package/dist/cjs/client/BuildKit.d.ts +176 -0
  5. package/dist/cjs/client/BuildKit.js +536 -0
  6. package/dist/cjs/client/BuildKitMessages.d.ts +35 -0
  7. package/dist/cjs/client/BuildKitMessages.js +123 -0
  8. package/dist/cjs/client/ContainerStore.d.ts +558 -0
  9. package/dist/cjs/client/ContainerStore.js +1384 -0
  10. package/dist/cjs/client/ContainerdClient.d.ts +244 -0
  11. package/dist/cjs/client/ContainerdClient.js +455 -0
  12. package/dist/cjs/client/DockerIgnore.d.ts +44 -0
  13. package/dist/cjs/client/DockerIgnore.js +186 -0
  14. package/dist/cjs/client/Fifo.d.ts +31 -0
  15. package/dist/cjs/client/Fifo.js +66 -0
  16. package/dist/cjs/client/ImageStore.d.ts +258 -0
  17. package/dist/cjs/client/ImageStore.js +636 -0
  18. package/dist/cjs/client/Messages.d.ts +103 -0
  19. package/dist/cjs/client/Messages.js +397 -0
  20. package/dist/cjs/client/Networks.d.ts +221 -0
  21. package/dist/cjs/client/Networks.js +630 -0
  22. package/dist/cjs/client/Platforms.d.ts +53 -0
  23. package/dist/cjs/client/Platforms.js +169 -0
  24. package/dist/cjs/client/Reference.d.ts +33 -0
  25. package/dist/cjs/client/Reference.js +70 -0
  26. package/dist/cjs/client/Registry.d.ts +145 -0
  27. package/dist/cjs/client/Registry.js +272 -0
  28. package/dist/cjs/client/Rootfs.d.ts +83 -0
  29. package/dist/cjs/client/Rootfs.js +245 -0
  30. package/dist/cjs/client/Seccomp.d.ts +36 -0
  31. package/dist/cjs/client/Seccomp.js +156 -0
  32. package/dist/cjs/client/Spec.d.ts +151 -0
  33. package/dist/cjs/client/Spec.js +227 -0
  34. package/dist/cjs/client/Volumes.d.ts +42 -0
  35. package/dist/cjs/client/Volumes.js +80 -0
  36. package/dist/cjs/containerd/Containerd.d.ts +442 -0
  37. package/dist/cjs/containerd/Containerd.js +929 -0
  38. package/dist/cjs/containerd/exceptions/ContainerdConnectionException.d.ts +9 -0
  39. package/dist/cjs/containerd/exceptions/ContainerdConnectionException.js +16 -0
  40. package/dist/cjs/containerd/exceptions/ContainerdContainerNameConflictException.d.ts +8 -0
  41. package/dist/cjs/containerd/exceptions/ContainerdContainerNameConflictException.js +15 -0
  42. package/dist/cjs/containerd/exceptions/ContainerdContainerNotFoundException.d.ts +9 -0
  43. package/dist/cjs/containerd/exceptions/ContainerdContainerNotFoundException.js +16 -0
  44. package/dist/cjs/containerd/exceptions/ContainerdContainerStateException.d.ts +10 -0
  45. package/dist/cjs/containerd/exceptions/ContainerdContainerStateException.js +17 -0
  46. package/dist/cjs/containerd/exceptions/ContainerdImageBuildException.d.ts +9 -0
  47. package/dist/cjs/containerd/exceptions/ContainerdImageBuildException.js +16 -0
  48. package/dist/cjs/containerd/exceptions/ContainerdImageExportException.d.ts +9 -0
  49. package/dist/cjs/containerd/exceptions/ContainerdImageExportException.js +16 -0
  50. package/dist/cjs/containerd/exceptions/ContainerdImageImportException.d.ts +9 -0
  51. package/dist/cjs/containerd/exceptions/ContainerdImageImportException.js +16 -0
  52. package/dist/cjs/containerd/exceptions/ContainerdImageNotFoundException.d.ts +9 -0
  53. package/dist/cjs/containerd/exceptions/ContainerdImageNotFoundException.js +16 -0
  54. package/dist/cjs/containerd/exceptions/ContainerdImagePullException.d.ts +9 -0
  55. package/dist/cjs/containerd/exceptions/ContainerdImagePullException.js +16 -0
  56. package/dist/cjs/containerd/exceptions/ContainerdImagePushException.d.ts +8 -0
  57. package/dist/cjs/containerd/exceptions/ContainerdImagePushException.js +15 -0
  58. package/dist/cjs/containerd/exceptions/ContainerdNetworkConflictException.d.ts +9 -0
  59. package/dist/cjs/containerd/exceptions/ContainerdNetworkConflictException.js +16 -0
  60. package/dist/cjs/containerd/exceptions/ContainerdNetworkNotFoundException.d.ts +9 -0
  61. package/dist/cjs/containerd/exceptions/ContainerdNetworkNotFoundException.js +16 -0
  62. package/dist/cjs/containerd/exceptions/ContainerdPathNotFoundException.d.ts +8 -0
  63. package/dist/cjs/containerd/exceptions/ContainerdPathNotFoundException.js +15 -0
  64. package/dist/cjs/containerd/exceptions/ContainerdPlatformException.d.ts +9 -0
  65. package/dist/cjs/containerd/exceptions/ContainerdPlatformException.js +16 -0
  66. package/dist/cjs/containerd/exceptions/ContainerdVolumeInUseException.d.ts +8 -0
  67. package/dist/cjs/containerd/exceptions/ContainerdVolumeInUseException.js +15 -0
  68. package/dist/cjs/containerd/exceptions/ContainerdVolumeNotFoundException.d.ts +8 -0
  69. package/dist/cjs/containerd/exceptions/ContainerdVolumeNotFoundException.js +15 -0
  70. package/dist/cjs/containerd/lib/ContainerdContainer.d.ts +292 -0
  71. package/dist/cjs/containerd/lib/ContainerdContainer.js +536 -0
  72. package/dist/cjs/containerd/lib/ContainerdContainerTTY.d.ts +116 -0
  73. package/dist/cjs/containerd/lib/ContainerdContainerTTY.js +178 -0
  74. package/dist/cjs/containerd/lib/ContainerdErrors.d.ts +6 -0
  75. package/dist/cjs/containerd/lib/ContainerdErrors.js +37 -0
  76. package/dist/cjs/containerd/lib/ContainerdImage.d.ts +149 -0
  77. package/dist/cjs/containerd/lib/ContainerdImage.js +222 -0
  78. package/dist/cjs/containerd/options/ContainerdPruneOptions.d.ts +44 -0
  79. package/dist/cjs/containerd/options/ContainerdPruneOptions.js +51 -0
  80. package/dist/cjs/containerd/options/ContainerdRegistryAuthOptions.d.ts +32 -0
  81. package/dist/cjs/containerd/options/ContainerdRegistryAuthOptions.js +45 -0
  82. package/dist/cjs/containerd/options/container/ContainerCommitOptions.d.ts +57 -0
  83. package/dist/cjs/containerd/options/container/ContainerCommitOptions.js +66 -0
  84. package/dist/cjs/containerd/options/container/ContainerCreateOptions.d.ts +273 -0
  85. package/dist/cjs/containerd/options/container/ContainerCreateOptions.js +239 -0
  86. package/dist/cjs/containerd/options/container/ContainerExecOptions.d.ts +53 -0
  87. package/dist/cjs/containerd/options/container/ContainerExecOptions.js +63 -0
  88. package/dist/cjs/containerd/options/container/ContainerExportDirectoryOptions.d.ts +32 -0
  89. package/dist/cjs/containerd/options/container/ContainerExportDirectoryOptions.js +45 -0
  90. package/dist/cjs/containerd/options/container/ContainerKillOptions.d.ts +30 -0
  91. package/dist/cjs/containerd/options/container/ContainerKillOptions.js +41 -0
  92. package/dist/cjs/containerd/options/container/ContainerLogsOptions.d.ts +34 -0
  93. package/dist/cjs/containerd/options/container/ContainerLogsOptions.js +44 -0
  94. package/dist/cjs/containerd/options/container/ContainerRemoveOptions.d.ts +22 -0
  95. package/dist/cjs/containerd/options/container/ContainerRemoveOptions.js +34 -0
  96. package/dist/cjs/containerd/options/container/ContainerResourceOptions.d.ts +63 -0
  97. package/dist/cjs/containerd/options/container/ContainerResourceOptions.js +67 -0
  98. package/dist/cjs/containerd/options/container/ContainerStopOptions.d.ts +30 -0
  99. package/dist/cjs/containerd/options/container/ContainerStopOptions.js +41 -0
  100. package/dist/cjs/containerd/options/container/ContainerTTYConsoleSizeOptions.d.ts +26 -0
  101. package/dist/cjs/containerd/options/container/ContainerTTYConsoleSizeOptions.js +40 -0
  102. package/dist/cjs/containerd/options/container/ContainerTTYOptions.d.ts +50 -0
  103. package/dist/cjs/containerd/options/container/ContainerTTYOptions.js +63 -0
  104. package/dist/cjs/containerd/options/image/ImageBuildOptions.d.ts +88 -0
  105. package/dist/cjs/containerd/options/image/ImageBuildOptions.js +95 -0
  106. package/dist/cjs/containerd/options/image/ImageExportOptions.d.ts +25 -0
  107. package/dist/cjs/containerd/options/image/ImageExportOptions.js +39 -0
  108. package/dist/cjs/containerd/options/image/ImageImportOptions.d.ts +38 -0
  109. package/dist/cjs/containerd/options/image/ImageImportOptions.js +47 -0
  110. package/dist/cjs/containerd/options/image/ImagePullOptions.d.ts +53 -0
  111. package/dist/cjs/containerd/options/image/ImagePullOptions.js +66 -0
  112. package/dist/cjs/containerd/options/image/ImagePushOptions.d.ts +44 -0
  113. package/dist/cjs/containerd/options/image/ImagePushOptions.js +58 -0
  114. package/dist/cjs/containerd/options/network/NetworkCreateOptions.d.ts +82 -0
  115. package/dist/cjs/containerd/options/network/NetworkCreateOptions.js +83 -0
  116. package/dist/cjs/containerd/options/volume/VolumeCreateOptions.d.ts +26 -0
  117. package/dist/cjs/containerd/options/volume/VolumeCreateOptions.js +40 -0
  118. package/dist/cjs/containerd/types/ContainerdBind.d.ts +28 -0
  119. package/dist/cjs/containerd/types/ContainerdBind.js +2 -0
  120. package/dist/cjs/containerd/types/ContainerdBuildOutputCallback.d.ts +6 -0
  121. package/dist/cjs/containerd/types/ContainerdBuildOutputCallback.js +2 -0
  122. package/dist/cjs/containerd/types/ContainerdContainerNetwork.d.ts +40 -0
  123. package/dist/cjs/containerd/types/ContainerdContainerNetwork.js +2 -0
  124. package/dist/cjs/containerd/types/ContainerdContainerPort.d.ts +22 -0
  125. package/dist/cjs/containerd/types/ContainerdContainerPort.js +2 -0
  126. package/dist/cjs/containerd/types/ContainerdContainerState.d.ts +42 -0
  127. package/dist/cjs/containerd/types/ContainerdContainerState.js +2 -0
  128. package/dist/cjs/containerd/types/ContainerdContainerStats.d.ts +107 -0
  129. package/dist/cjs/containerd/types/ContainerdContainerStats.js +2 -0
  130. package/dist/cjs/containerd/types/ContainerdDevice.d.ts +25 -0
  131. package/dist/cjs/containerd/types/ContainerdDevice.js +2 -0
  132. package/dist/cjs/containerd/types/ContainerdExecResult.d.ts +18 -0
  133. package/dist/cjs/containerd/types/ContainerdExecResult.js +2 -0
  134. package/dist/cjs/containerd/types/ContainerdImageConfig.d.ts +46 -0
  135. package/dist/cjs/containerd/types/ContainerdImageConfig.js +2 -0
  136. package/dist/cjs/containerd/types/ContainerdNetworkInfo.d.ts +49 -0
  137. package/dist/cjs/containerd/types/ContainerdNetworkInfo.js +2 -0
  138. package/dist/cjs/containerd/types/ContainerdProgressCallback.d.ts +29 -0
  139. package/dist/cjs/containerd/types/ContainerdProgressCallback.js +2 -0
  140. package/dist/cjs/containerd/types/ContainerdPruneResult.d.ts +21 -0
  141. package/dist/cjs/containerd/types/ContainerdPruneResult.js +2 -0
  142. package/dist/cjs/containerd/types/ContainerdRestartPolicy.d.ts +13 -0
  143. package/dist/cjs/containerd/types/ContainerdRestartPolicy.js +2 -0
  144. package/dist/cjs/containerd/types/ContainerdTmpfs.d.ts +20 -0
  145. package/dist/cjs/containerd/types/ContainerdTmpfs.js +2 -0
  146. package/dist/cjs/containerd/types/ContainerdVolume.d.ts +19 -0
  147. package/dist/cjs/containerd/types/ContainerdVolume.js +2 -0
  148. package/dist/cjs/containerd/types/ContainerdVolumeInfo.d.ts +26 -0
  149. package/dist/cjs/containerd/types/ContainerdVolumeInfo.js +2 -0
  150. package/dist/cjs/exports/Containerd.d.ts +69 -0
  151. package/dist/cjs/exports/Containerd.js +87 -0
  152. package/dist/cjs/package.json +1 -0
  153. package/dist/esm/client/BuildKit.js +488 -0
  154. package/dist/esm/client/BuildKitMessages.js +120 -0
  155. package/dist/esm/client/ContainerStore.js +1339 -0
  156. package/dist/esm/client/ContainerdClient.js +416 -0
  157. package/dist/esm/client/DockerIgnore.js +179 -0
  158. package/dist/esm/client/Fifo.js +59 -0
  159. package/dist/esm/client/ImageStore.js +628 -0
  160. package/dist/esm/client/Messages.js +393 -0
  161. package/dist/esm/client/Networks.js +621 -0
  162. package/dist/esm/client/Platforms.js +156 -0
  163. package/dist/esm/client/Reference.js +66 -0
  164. package/dist/esm/client/Registry.js +263 -0
  165. package/dist/esm/client/Rootfs.js +234 -0
  166. package/dist/esm/client/Seccomp.js +152 -0
  167. package/dist/esm/client/Spec.js +220 -0
  168. package/dist/esm/client/Volumes.js +73 -0
  169. package/dist/esm/containerd/Containerd.js +923 -0
  170. package/dist/esm/containerd/exceptions/ContainerdConnectionException.js +12 -0
  171. package/dist/esm/containerd/exceptions/ContainerdContainerNameConflictException.js +11 -0
  172. package/dist/esm/containerd/exceptions/ContainerdContainerNotFoundException.js +12 -0
  173. package/dist/esm/containerd/exceptions/ContainerdContainerStateException.js +13 -0
  174. package/dist/esm/containerd/exceptions/ContainerdImageBuildException.js +12 -0
  175. package/dist/esm/containerd/exceptions/ContainerdImageExportException.js +12 -0
  176. package/dist/esm/containerd/exceptions/ContainerdImageImportException.js +12 -0
  177. package/dist/esm/containerd/exceptions/ContainerdImageNotFoundException.js +12 -0
  178. package/dist/esm/containerd/exceptions/ContainerdImagePullException.js +12 -0
  179. package/dist/esm/containerd/exceptions/ContainerdImagePushException.js +11 -0
  180. package/dist/esm/containerd/exceptions/ContainerdNetworkConflictException.js +12 -0
  181. package/dist/esm/containerd/exceptions/ContainerdNetworkNotFoundException.js +12 -0
  182. package/dist/esm/containerd/exceptions/ContainerdPathNotFoundException.js +11 -0
  183. package/dist/esm/containerd/exceptions/ContainerdPlatformException.js +12 -0
  184. package/dist/esm/containerd/exceptions/ContainerdVolumeInUseException.js +11 -0
  185. package/dist/esm/containerd/exceptions/ContainerdVolumeNotFoundException.js +11 -0
  186. package/dist/esm/containerd/lib/ContainerdContainer.js +533 -0
  187. package/dist/esm/containerd/lib/ContainerdContainerTTY.js +175 -0
  188. package/dist/esm/containerd/lib/ContainerdErrors.js +34 -0
  189. package/dist/esm/containerd/lib/ContainerdImage.js +219 -0
  190. package/dist/esm/containerd/options/ContainerdPruneOptions.js +47 -0
  191. package/dist/esm/containerd/options/ContainerdRegistryAuthOptions.js +41 -0
  192. package/dist/esm/containerd/options/container/ContainerCommitOptions.js +62 -0
  193. package/dist/esm/containerd/options/container/ContainerCreateOptions.js +235 -0
  194. package/dist/esm/containerd/options/container/ContainerExecOptions.js +59 -0
  195. package/dist/esm/containerd/options/container/ContainerExportDirectoryOptions.js +41 -0
  196. package/dist/esm/containerd/options/container/ContainerKillOptions.js +37 -0
  197. package/dist/esm/containerd/options/container/ContainerLogsOptions.js +40 -0
  198. package/dist/esm/containerd/options/container/ContainerRemoveOptions.js +30 -0
  199. package/dist/esm/containerd/options/container/ContainerResourceOptions.js +63 -0
  200. package/dist/esm/containerd/options/container/ContainerStopOptions.js +37 -0
  201. package/dist/esm/containerd/options/container/ContainerTTYConsoleSizeOptions.js +36 -0
  202. package/dist/esm/containerd/options/container/ContainerTTYOptions.js +59 -0
  203. package/dist/esm/containerd/options/image/ImageBuildOptions.js +91 -0
  204. package/dist/esm/containerd/options/image/ImageExportOptions.js +35 -0
  205. package/dist/esm/containerd/options/image/ImageImportOptions.js +43 -0
  206. package/dist/esm/containerd/options/image/ImagePullOptions.js +62 -0
  207. package/dist/esm/containerd/options/image/ImagePushOptions.js +54 -0
  208. package/dist/esm/containerd/options/network/NetworkCreateOptions.js +79 -0
  209. package/dist/esm/containerd/options/volume/VolumeCreateOptions.js +36 -0
  210. package/dist/esm/containerd/types/ContainerdBind.js +1 -0
  211. package/dist/esm/containerd/types/ContainerdBuildOutputCallback.js +1 -0
  212. package/dist/esm/containerd/types/ContainerdContainerNetwork.js +1 -0
  213. package/dist/esm/containerd/types/ContainerdContainerPort.js +1 -0
  214. package/dist/esm/containerd/types/ContainerdContainerState.js +1 -0
  215. package/dist/esm/containerd/types/ContainerdContainerStats.js +1 -0
  216. package/dist/esm/containerd/types/ContainerdDevice.js +1 -0
  217. package/dist/esm/containerd/types/ContainerdExecResult.js +1 -0
  218. package/dist/esm/containerd/types/ContainerdImageConfig.js +1 -0
  219. package/dist/esm/containerd/types/ContainerdNetworkInfo.js +1 -0
  220. package/dist/esm/containerd/types/ContainerdProgressCallback.js +1 -0
  221. package/dist/esm/containerd/types/ContainerdPruneResult.js +1 -0
  222. package/dist/esm/containerd/types/ContainerdRestartPolicy.js +1 -0
  223. package/dist/esm/containerd/types/ContainerdTmpfs.js +1 -0
  224. package/dist/esm/containerd/types/ContainerdVolume.js +1 -0
  225. package/dist/esm/containerd/types/ContainerdVolumeInfo.js +1 -0
  226. package/dist/esm/exports/Containerd.js +68 -0
  227. package/dist/types/client/BuildKit.d.ts +176 -0
  228. package/dist/types/client/BuildKitMessages.d.ts +35 -0
  229. package/dist/types/client/ContainerStore.d.ts +558 -0
  230. package/dist/types/client/ContainerdClient.d.ts +244 -0
  231. package/dist/types/client/DockerIgnore.d.ts +44 -0
  232. package/dist/types/client/Fifo.d.ts +31 -0
  233. package/dist/types/client/ImageStore.d.ts +258 -0
  234. package/dist/types/client/Messages.d.ts +103 -0
  235. package/dist/types/client/Networks.d.ts +221 -0
  236. package/dist/types/client/Platforms.d.ts +53 -0
  237. package/dist/types/client/Reference.d.ts +33 -0
  238. package/dist/types/client/Registry.d.ts +145 -0
  239. package/dist/types/client/Rootfs.d.ts +83 -0
  240. package/dist/types/client/Seccomp.d.ts +36 -0
  241. package/dist/types/client/Spec.d.ts +151 -0
  242. package/dist/types/client/Volumes.d.ts +42 -0
  243. package/dist/types/containerd/Containerd.d.ts +442 -0
  244. package/dist/types/containerd/exceptions/ContainerdConnectionException.d.ts +9 -0
  245. package/dist/types/containerd/exceptions/ContainerdContainerNameConflictException.d.ts +8 -0
  246. package/dist/types/containerd/exceptions/ContainerdContainerNotFoundException.d.ts +9 -0
  247. package/dist/types/containerd/exceptions/ContainerdContainerStateException.d.ts +10 -0
  248. package/dist/types/containerd/exceptions/ContainerdImageBuildException.d.ts +9 -0
  249. package/dist/types/containerd/exceptions/ContainerdImageExportException.d.ts +9 -0
  250. package/dist/types/containerd/exceptions/ContainerdImageImportException.d.ts +9 -0
  251. package/dist/types/containerd/exceptions/ContainerdImageNotFoundException.d.ts +9 -0
  252. package/dist/types/containerd/exceptions/ContainerdImagePullException.d.ts +9 -0
  253. package/dist/types/containerd/exceptions/ContainerdImagePushException.d.ts +8 -0
  254. package/dist/types/containerd/exceptions/ContainerdNetworkConflictException.d.ts +9 -0
  255. package/dist/types/containerd/exceptions/ContainerdNetworkNotFoundException.d.ts +9 -0
  256. package/dist/types/containerd/exceptions/ContainerdPathNotFoundException.d.ts +8 -0
  257. package/dist/types/containerd/exceptions/ContainerdPlatformException.d.ts +9 -0
  258. package/dist/types/containerd/exceptions/ContainerdVolumeInUseException.d.ts +8 -0
  259. package/dist/types/containerd/exceptions/ContainerdVolumeNotFoundException.d.ts +8 -0
  260. package/dist/types/containerd/lib/ContainerdContainer.d.ts +292 -0
  261. package/dist/types/containerd/lib/ContainerdContainerTTY.d.ts +116 -0
  262. package/dist/types/containerd/lib/ContainerdErrors.d.ts +6 -0
  263. package/dist/types/containerd/lib/ContainerdImage.d.ts +149 -0
  264. package/dist/types/containerd/options/ContainerdPruneOptions.d.ts +44 -0
  265. package/dist/types/containerd/options/ContainerdRegistryAuthOptions.d.ts +32 -0
  266. package/dist/types/containerd/options/container/ContainerCommitOptions.d.ts +57 -0
  267. package/dist/types/containerd/options/container/ContainerCreateOptions.d.ts +273 -0
  268. package/dist/types/containerd/options/container/ContainerExecOptions.d.ts +53 -0
  269. package/dist/types/containerd/options/container/ContainerExportDirectoryOptions.d.ts +32 -0
  270. package/dist/types/containerd/options/container/ContainerKillOptions.d.ts +30 -0
  271. package/dist/types/containerd/options/container/ContainerLogsOptions.d.ts +34 -0
  272. package/dist/types/containerd/options/container/ContainerRemoveOptions.d.ts +22 -0
  273. package/dist/types/containerd/options/container/ContainerResourceOptions.d.ts +63 -0
  274. package/dist/types/containerd/options/container/ContainerStopOptions.d.ts +30 -0
  275. package/dist/types/containerd/options/container/ContainerTTYConsoleSizeOptions.d.ts +26 -0
  276. package/dist/types/containerd/options/container/ContainerTTYOptions.d.ts +50 -0
  277. package/dist/types/containerd/options/image/ImageBuildOptions.d.ts +88 -0
  278. package/dist/types/containerd/options/image/ImageExportOptions.d.ts +25 -0
  279. package/dist/types/containerd/options/image/ImageImportOptions.d.ts +38 -0
  280. package/dist/types/containerd/options/image/ImagePullOptions.d.ts +53 -0
  281. package/dist/types/containerd/options/image/ImagePushOptions.d.ts +44 -0
  282. package/dist/types/containerd/options/network/NetworkCreateOptions.d.ts +82 -0
  283. package/dist/types/containerd/options/volume/VolumeCreateOptions.d.ts +26 -0
  284. package/dist/types/containerd/types/ContainerdBind.d.ts +28 -0
  285. package/dist/types/containerd/types/ContainerdBuildOutputCallback.d.ts +6 -0
  286. package/dist/types/containerd/types/ContainerdContainerNetwork.d.ts +40 -0
  287. package/dist/types/containerd/types/ContainerdContainerPort.d.ts +22 -0
  288. package/dist/types/containerd/types/ContainerdContainerState.d.ts +42 -0
  289. package/dist/types/containerd/types/ContainerdContainerStats.d.ts +107 -0
  290. package/dist/types/containerd/types/ContainerdDevice.d.ts +25 -0
  291. package/dist/types/containerd/types/ContainerdExecResult.d.ts +18 -0
  292. package/dist/types/containerd/types/ContainerdImageConfig.d.ts +46 -0
  293. package/dist/types/containerd/types/ContainerdNetworkInfo.d.ts +49 -0
  294. package/dist/types/containerd/types/ContainerdProgressCallback.d.ts +29 -0
  295. package/dist/types/containerd/types/ContainerdPruneResult.d.ts +21 -0
  296. package/dist/types/containerd/types/ContainerdRestartPolicy.d.ts +13 -0
  297. package/dist/types/containerd/types/ContainerdTmpfs.d.ts +20 -0
  298. package/dist/types/containerd/types/ContainerdVolume.d.ts +19 -0
  299. package/dist/types/containerd/types/ContainerdVolumeInfo.d.ts +26 -0
  300. package/dist/types/exports/Containerd.d.ts +69 -0
  301. package/package.json +51 -4
@@ -0,0 +1,221 @@
1
+ /**
2
+ * A network of CNI (a configuration list of /etc/cni/net.d): the ones of nerdctl, the others of the machine
3
+ */
4
+ export type CNINetwork = {
5
+ name: string;
6
+ /**
7
+ * Its identifier (the one of nerdctl, or the digest of its name)
8
+ */
9
+ id: string;
10
+ /**
11
+ * Its configuration list
12
+ */
13
+ file: string;
14
+ labels: Record<string, string>;
15
+ cniVersion: string;
16
+ /**
17
+ * The type of its first plugin (bridge, macvlan, ipvlan…)
18
+ */
19
+ driver: string;
20
+ subnets: string[];
21
+ gateways: string[];
22
+ plugins: Record<string, any>[];
23
+ /**
24
+ * Created by nerdctl (or by this package): removable
25
+ */
26
+ managed: boolean;
27
+ };
28
+ /**
29
+ * The options of the creation of a network
30
+ */
31
+ export type CNINetworkCreateOptions = {
32
+ name: string;
33
+ driver?: 'bridge' | 'macvlan' | 'ipvlan';
34
+ /**
35
+ * Its subnet (CIDR of IPv4), a free one of 10.4.0.0/16 by default
36
+ */
37
+ subnet?: string;
38
+ gateway?: string;
39
+ /**
40
+ * The range of its addresses given to the containers (CIDR in its subnet)
41
+ */
42
+ ipRange?: string;
43
+ /**
44
+ * The interface of the host of a macvlan or ipvlan network
45
+ */
46
+ parent?: string;
47
+ /**
48
+ * Without the gateway and the masquerade of the host (bridge)
49
+ */
50
+ internal?: boolean;
51
+ mtu?: number;
52
+ labels?: Record<string, string>;
53
+ /**
54
+ * Its subnet of IPv6 (CIDR), besides its subnet of IPv4
55
+ */
56
+ ipv6Subnet?: string;
57
+ /**
58
+ * Its gateway of IPv6, the first address of its subnet by default
59
+ */
60
+ ipv6Gateway?: string;
61
+ };
62
+ /**
63
+ * A port of a container published on the host
64
+ */
65
+ export type PortMapping = {
66
+ hostPort: number;
67
+ containerPort: number;
68
+ protocol: 'tcp' | 'udp' | 'sctp';
69
+ hostIP?: string;
70
+ };
71
+ /**
72
+ * An interface of a container on a network (its result of CNI)
73
+ */
74
+ export type ContainerNetworkInterface = {
75
+ network: string;
76
+ interface: string;
77
+ mac?: string;
78
+ ip?: string;
79
+ prefixLength?: number;
80
+ gateway?: string;
81
+ ipv6?: string;
82
+ ipv6Gateway?: string;
83
+ };
84
+ /**
85
+ * A network of a container asked: its name, its address
86
+ */
87
+ export type ContainerNetworkRequest = {
88
+ name: string;
89
+ ip?: string;
90
+ ipv6?: string;
91
+ };
92
+ /**
93
+ * The default network of nerdctl
94
+ */
95
+ export declare const DEFAULT_NETWORK: string;
96
+ /**
97
+ * The script of the networks of the containers, run by runc as their hooks: add (createRuntime, the networks of CNI
98
+ * added to the namespace of the container, its /etc/hosts given its address), del (poststop, the networks deleted, their
99
+ * addresses released). The plugins of each network are chained as libcni chains them (the result of each one is the
100
+ * previous result of the next one); their configurations are the files written for the container
101
+ */
102
+ export declare const HOOK_SCRIPT: string;
103
+ /**
104
+ * The first and the last addresses of a subnet (CIDR of IPv4)
105
+ * @param cidr
106
+ */
107
+ export declare function parseSubnet(cidr: string): {
108
+ network: number;
109
+ broadcast: number;
110
+ prefix: number;
111
+ cidr: string;
112
+ };
113
+ /**
114
+ * A subnet of IPv6 (CIDR): its network, its prefix, its first address
115
+ * @param cidr
116
+ */
117
+ export declare function parseIPv6Subnet(cidr: string): {
118
+ cidr: string;
119
+ first: string;
120
+ network: bigint;
121
+ last: bigint;
122
+ };
123
+ /**
124
+ * The networks of CNI of the machine (the configuration lists of its directory), the ones of nerdctl created and
125
+ * removed, the configurations of the networks of the containers written for their hooks
126
+ */
127
+ export declare class NetworkStore {
128
+ #private;
129
+ readonly confDir: string;
130
+ readonly cniPath: string[];
131
+ constructor(confDir: string, cniPath: string[]);
132
+ /**
133
+ * The directories of the plugins which exist
134
+ */
135
+ pluginDirectories(): string[];
136
+ /**
137
+ * The path of a plugin, undefined when it is not installed
138
+ * @param type
139
+ */
140
+ plugin(type: string): string | undefined;
141
+ /**
142
+ * The version of CNI of the configurations written: the newest one of the plugins (1.0.0, or 0.4.0)
143
+ */
144
+ protected cniVersion(): string;
145
+ /**
146
+ * A network of a configuration list
147
+ * @param file
148
+ * @param content
149
+ */
150
+ protected parse(file: string, content: string): CNINetwork | undefined;
151
+ /**
152
+ * The networks of CNI of the machine
153
+ */
154
+ list(): Promise<CNINetwork[]>;
155
+ /**
156
+ * A network, by its name or its identifier (or a prefix of it); the default one of nerdctl created when it is asked
157
+ * @param nameOrId
158
+ */
159
+ get(nameOrId: string): Promise<CNINetwork | undefined>;
160
+ /**
161
+ * The plugins added after the main one, as nerdctl adds them (the ones installed)
162
+ * @param driver
163
+ * @protected
164
+ */
165
+ protected chainedPlugins(driver: string): Record<string, any>[];
166
+ /**
167
+ * Write a configuration list
168
+ * @param name
169
+ * @param id
170
+ * @param labels
171
+ * @param plugins
172
+ * @protected
173
+ */
174
+ protected write(name: string, id: string, labels: Record<string, string>, plugins: Record<string, any>[]): Promise<CNINetwork>;
175
+ /**
176
+ * Create the default network of nerdctl (bridge, nerdctl0, 10.4.0.0/24)
177
+ * @protected
178
+ */
179
+ protected createDefault(): Promise<CNINetwork>;
180
+ /**
181
+ * A free subnet of 10.4.0.0/16 (the ones of nerdctl)
182
+ * @param used
183
+ * @protected
184
+ */
185
+ protected freeSubnet(used: string[]): string;
186
+ /**
187
+ * Create a network (bridge, macvlan, ipvlan), as nerdctl network create does
188
+ * @param options
189
+ */
190
+ create(options: CNINetworkCreateOptions): Promise<CNINetwork>;
191
+ /**
192
+ * Remove a network (one of nerdctl): its configuration, its bridge and the rules of its firewall, the leases of its
193
+ * addresses, as nerdctl network rm does
194
+ * @param network
195
+ */
196
+ remove(network: CNINetwork): Promise<void>;
197
+ /**
198
+ * Write the configurations of the networks of a container for its hooks (the configurations of their plugins, their
199
+ * runtime configurations: the ports published on the first one)
200
+ * @param stateDir
201
+ * @param containerId
202
+ * @param networks
203
+ * @param ports
204
+ */
205
+ render(stateDir: string, containerId: string, networks: {
206
+ network: CNINetwork;
207
+ ip?: string;
208
+ ipv6?: string;
209
+ }[], ports: PortMapping[]): Promise<void>;
210
+ /**
211
+ * Delete the networks of a container whose hook did not (its task killed with its shim): the hook run as runc runs
212
+ * it
213
+ * @param stateDir
214
+ */
215
+ teardown(stateDir: string): Promise<void>;
216
+ /**
217
+ * The interfaces of a container on its networks (their results of CNI)
218
+ * @param stateDir
219
+ */
220
+ interfaces(stateDir: string): Promise<ContainerNetworkInterface[]>;
221
+ }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * A platform of the images (OCI): its system, its architecture, its variant
3
+ */
4
+ export type Platform = {
5
+ os: string;
6
+ architecture: string;
7
+ variant?: string;
8
+ };
9
+ /**
10
+ * The platforms of the ELF binaries an entry of binfmt_misc runs (by the machine of the ELF header of its magic): the
11
+ * emulators of QEMU, Rosetta, whatever their names
12
+ * @param entry the content of the entry
13
+ */
14
+ export declare function binfmtPlatforms(entry: string): Platform[];
15
+ /**
16
+ * A platform written as OCI writes it (linux/arm64/v8)
17
+ * @param platform
18
+ */
19
+ export declare function formatPlatform(platform: Platform): string;
20
+ /**
21
+ * The variant of an architecture given without it: the one its images are matched to (arm64 is v8, arm v7)
22
+ * @param platform
23
+ */
24
+ export declare function normalizePlatform(platform: Platform): Platform;
25
+ /**
26
+ * Parse a platform: linux/arm64, linux/arm/v7, or an architecture (arm64), on Linux
27
+ * @param value
28
+ */
29
+ export declare function parsePlatform(value: string): Platform;
30
+ /**
31
+ * The platform of the machine running Node.js
32
+ */
33
+ export declare function hostPlatform(): Platform;
34
+ /**
35
+ * Whether a platform of an image runs on a platform: the same system and architecture, a variant up to the one of the
36
+ * platform (an arm/v7 runs the images of arm/v6 and arm/v5)
37
+ * @param image
38
+ * @param platform
39
+ */
40
+ export declare function matchPlatform(image: Platform, platform: Platform): boolean;
41
+ /**
42
+ * How much a platform of an image suits a platform: the exact one first (lower is better), undefined when it does not
43
+ * run there
44
+ * @param image
45
+ * @param platform
46
+ */
47
+ export declare function platformRank(image: Platform, platform: Platform): number | undefined;
48
+ /**
49
+ * The platforms the machine runs the containers of: its own one, and the ones of the emulators registered in
50
+ * binfmt_misc (enabled)
51
+ * @param binfmt the directory of binfmt_misc
52
+ */
53
+ export declare function supportedPlatforms(binfmt?: string): Platform[];
@@ -0,0 +1,33 @@
1
+ /**
2
+ * A reference of an image: its registry, its repository, its tag or its digest
3
+ */
4
+ export type ImageReference = {
5
+ /**
6
+ * The registry, as named by the references (docker.io)
7
+ */
8
+ registry: string;
9
+ /**
10
+ * The host of the API of the registry (registry-1.docker.io for docker.io)
11
+ */
12
+ host: string;
13
+ repository: string;
14
+ tag?: string;
15
+ digest?: string;
16
+ /**
17
+ * The name of the image in containerd, the one of ctr and nerdctl (docker.io/library/busybox:latest)
18
+ */
19
+ name: string;
20
+ };
21
+ /**
22
+ * Parse a reference of an image as Docker (and containerd) normalize it: busybox is docker.io/library/busybox:latest,
23
+ * user/app docker.io/user/app:latest, the first part of a reference is its registry when it has a dot, a port or is
24
+ * localhost
25
+ * @param reference
26
+ */
27
+ export declare function parseReference(reference: string): ImageReference;
28
+ /**
29
+ * The name of an image in containerd of a reference given by the users (busybox → docker.io/library/busybox:latest),
30
+ * the reference itself when it is not one
31
+ * @param reference
32
+ */
33
+ export declare function imageName(reference: string): string;
@@ -0,0 +1,145 @@
1
+ import type { ContentDescriptor } from './ContainerdClient.js';
2
+ import type { ImageReference } from './Reference.js';
3
+ /**
4
+ * The credentials of a registry: a user and its password (or its token), or an identity token
5
+ */
6
+ export type RegistryCredentials = {
7
+ username?: string;
8
+ password?: string;
9
+ identityToken?: string;
10
+ };
11
+ /**
12
+ * The options of the registries: their credentials by their hosts (docker.io, registry.example.com:5000), the ones
13
+ * served over HTTP
14
+ */
15
+ export type RegistryOptions = {
16
+ credentials?: Record<string, RegistryCredentials>;
17
+ insecure?: string[];
18
+ signal?: AbortSignal;
19
+ };
20
+ /**
21
+ * The media types of the manifests and of the indexes (OCI, Docker)
22
+ */
23
+ export declare const MediaTypes: {
24
+ readonly OCI_INDEX: "application/vnd.oci.image.index.v1+json";
25
+ readonly OCI_MANIFEST: "application/vnd.oci.image.manifest.v1+json";
26
+ readonly OCI_CONFIG: "application/vnd.oci.image.config.v1+json";
27
+ readonly OCI_LAYER: "application/vnd.oci.image.layer.v1.tar";
28
+ readonly OCI_LAYER_GZIP: "application/vnd.oci.image.layer.v1.tar+gzip";
29
+ readonly DOCKER_LIST: "application/vnd.docker.distribution.manifest.list.v2+json";
30
+ readonly DOCKER_MANIFEST: "application/vnd.docker.distribution.manifest.v2+json";
31
+ readonly DOCKER_CONFIG: "application/vnd.docker.container.image.v1+json";
32
+ readonly DOCKER_LAYER: "application/vnd.docker.image.rootfs.diff.tar";
33
+ readonly DOCKER_LAYER_GZIP: "application/vnd.docker.image.rootfs.diff.tar.gzip";
34
+ };
35
+ /**
36
+ * Whether a media type is the one of an index (of the manifests of the platforms)
37
+ * @param mediaType
38
+ */
39
+ export declare function isIndex(mediaType: string): boolean;
40
+ /**
41
+ * Whether a media type is the one of a manifest (of an image of a platform)
42
+ * @param mediaType
43
+ */
44
+ export declare function isManifest(mediaType: string): boolean;
45
+ /**
46
+ * The digest of bytes
47
+ * @param data
48
+ */
49
+ export declare function digestOf(data: Uint8Array): string;
50
+ /**
51
+ * The token of a registry for scopes, from its token service (its realm): with the credentials (an identity token by
52
+ * OAuth2, a user and its password by the basic authentication), or anonymous
53
+ * @param params
54
+ * @param credentials
55
+ * @param signal
56
+ */
57
+ export declare function fetchRegistryToken(params: {
58
+ realm: string;
59
+ service?: string;
60
+ scopes: string[];
61
+ }, credentials?: RegistryCredentials, signal?: AbortSignal): Promise<{
62
+ token: string;
63
+ expiresIn?: number;
64
+ issuedAt?: number;
65
+ } | undefined>;
66
+ /**
67
+ * An error of a registry
68
+ */
69
+ export declare class RegistryError extends Error {
70
+ readonly status: number;
71
+ constructor(message: string, status: number);
72
+ }
73
+ /**
74
+ * The client of a repository of a registry (the distribution API of OCI): its manifests and its blobs, the tokens of
75
+ * its authentication requested as its challenges ask (Bearer, Basic), with its credentials or anonymously
76
+ */
77
+ export declare class RegistryClient {
78
+ #private;
79
+ protected readonly reference: ImageReference;
80
+ protected readonly options: RegistryOptions;
81
+ constructor(reference: ImageReference, options?: RegistryOptions);
82
+ /**
83
+ * The credentials of the registry (by its name or by its host)
84
+ */
85
+ protected credentials(): RegistryCredentials | undefined;
86
+ /**
87
+ * The base URL of the repository
88
+ */
89
+ protected base(): string;
90
+ /**
91
+ * The authorization of a challenge: a token of its realm (with the credentials when there are), or the credentials
92
+ * @param challenge
93
+ * @param scope
94
+ */
95
+ protected authorize(challenge: string, scope: string): Promise<string | undefined>;
96
+ /**
97
+ * A request to the repository, authenticated as its registry asks
98
+ * @param path the path under the repository (/manifests/latest), or a URL (the location of an upload)
99
+ * @param init
100
+ * @param actions the actions of its scope: pull, or push and pull
101
+ */
102
+ request(path: string, init?: RequestInit, actions?: string): Promise<Response>;
103
+ /**
104
+ * Fail on an error response
105
+ * @param response
106
+ * @param what
107
+ */
108
+ protected check(response: Response, what: string): Promise<Response>;
109
+ /**
110
+ * Resolve a reference (a tag or a digest): the descriptor of its manifest or of its index, and its bytes
111
+ * @param reference
112
+ */
113
+ resolve(reference: string): Promise<{
114
+ descriptor: ContentDescriptor;
115
+ data: Buffer;
116
+ }>;
117
+ /**
118
+ * Fetch a manifest (or an index) by its descriptor, checked by its digest
119
+ * @param descriptor
120
+ */
121
+ fetchManifest(descriptor: ContentDescriptor): Promise<Buffer>;
122
+ /**
123
+ * Fetch a blob: its bytes streamed (the redirections of the registry to its storage followed)
124
+ * @param descriptor
125
+ */
126
+ fetchBlob(descriptor: ContentDescriptor): Promise<AsyncIterable<Uint8Array>>;
127
+ /**
128
+ * Whether the repository has a blob
129
+ * @param digest
130
+ */
131
+ hasBlob(digest: string): Promise<boolean>;
132
+ /**
133
+ * Push a blob, unless the repository has it: uploaded at once
134
+ * @param descriptor
135
+ * @param data its bytes, or the function giving their stream
136
+ */
137
+ pushBlob(descriptor: ContentDescriptor, data: Uint8Array | (() => AsyncIterable<Uint8Array>)): Promise<void>;
138
+ /**
139
+ * Push a manifest (or an index), by a tag or by its digest
140
+ * @param reference
141
+ * @param mediaType
142
+ * @param data
143
+ */
144
+ pushManifest(reference: string, mediaType: string, data: Uint8Array): Promise<void>;
145
+ }
@@ -0,0 +1,83 @@
1
+ import type { Stats } from 'node:fs';
2
+ import type { SnapshotMount } from './ContainerdClient.js';
3
+ /**
4
+ * The user of a process: its identifiers and its groups
5
+ */
6
+ export type ProcessUser = {
7
+ uid: number;
8
+ gid: number;
9
+ additionalGids: number[];
10
+ home: string;
11
+ };
12
+ /**
13
+ * The directories of the layers of the mounts of a snapshot, the top one first (overlay: its upper directory and its
14
+ * lower ones, bind: its source)
15
+ * @param mounts
16
+ */
17
+ export declare function layerDirectories(mounts: SnapshotMount[]): string[];
18
+ /**
19
+ * Read a file of the root file system of a snapshot from the directories of its layers (the snapshotter of the host,
20
+ * readable by root): the top layer having it first, its deletions (the whiteouts of overlay) honoured, its symbolic
21
+ * links resolved in the root file system
22
+ * @param mounts
23
+ * @param file an absolute path in the root file system
24
+ * @param depth
25
+ */
26
+ export declare function readRootfsFile(mounts: SnapshotMount[], file: string, depth?: number): Promise<Buffer | undefined>;
27
+ /**
28
+ * Resolve the user of a process in a root file system (its /etc/passwd and /etc/group): user, user:group, uid, uid:gid
29
+ * @param mounts
30
+ * @param user empty for root
31
+ */
32
+ export declare function resolveUser(mounts: SnapshotMount[], user: string | undefined): Promise<ProcessUser>;
33
+ /**
34
+ * A file system read from the host: a directory (the root of a process), or the directories of the layers of a snapshot
35
+ */
36
+ export interface FileTree {
37
+ /**
38
+ * A path whose symbolic links are resolved in the file system (not in the one of the host)
39
+ * @param file an absolute path in the file system
40
+ */
41
+ resolve(file: string): Promise<string>;
42
+ /**
43
+ * The stats of a path (its link not followed) and the path of the host to read it, undefined when it does not exist
44
+ * @param file
45
+ */
46
+ lstat(file: string): Promise<{
47
+ stats: Stats;
48
+ path: string;
49
+ } | undefined>;
50
+ /**
51
+ * The names of the entries of a directory, sorted
52
+ * @param directory
53
+ */
54
+ readdir(directory: string): Promise<string[]>;
55
+ }
56
+ /**
57
+ * A file system of a directory of the host (/proc/<pid>/root: the one of a running container, its mounts with it)
58
+ */
59
+ export declare class DirectoryTree implements FileTree {
60
+ protected readonly root: string;
61
+ constructor(root: string);
62
+ resolve(file: string): Promise<string>;
63
+ lstat(file: string): Promise<{
64
+ stats: Stats;
65
+ path: string;
66
+ } | undefined>;
67
+ readdir(directory: string): Promise<string[]>;
68
+ }
69
+ /**
70
+ * A file system of the layers of a snapshot (the directories of overlay, the top one first): the deletions of the upper
71
+ * layers (their whiteouts) hide the entries of the lower ones
72
+ */
73
+ export declare class LayersTree implements FileTree {
74
+ protected readonly layers: string[];
75
+ constructor(layers: string[]);
76
+ resolve(file: string): Promise<string>;
77
+ protected stat(file: string): Promise<Stats | undefined>;
78
+ lstat(file: string): Promise<{
79
+ stats: Stats;
80
+ path: string;
81
+ } | undefined>;
82
+ readdir(directory: string): Promise<string[]>;
83
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * A rule of a profile of seccomp (OCI)
3
+ */
4
+ export type SeccompSyscall = {
5
+ names: string[];
6
+ action: string;
7
+ errnoRet?: number;
8
+ args?: {
9
+ index: number;
10
+ value: number;
11
+ valueTwo?: number;
12
+ op: string;
13
+ }[];
14
+ };
15
+ /**
16
+ * A profile of seccomp (the linux.seccomp of the specification of OCI)
17
+ */
18
+ export type SeccompProfile = {
19
+ defaultAction: string;
20
+ defaultErrnoRet?: number;
21
+ architectures?: string[];
22
+ flags?: string[];
23
+ syscalls?: SeccompSyscall[];
24
+ };
25
+ /**
26
+ * Whether the kernel filters the system calls (the Seccomp field of the status of the processes)
27
+ * @param status the status of a process
28
+ */
29
+ export declare function seccompSupported(status?: string): boolean;
30
+ /**
31
+ * The default profile of seccomp of a container, by its capabilities (its bounding set)
32
+ * @param capabilities
33
+ * @param arch the architecture of the machine, as Node.js names it
34
+ * @param kernel the release of its kernel
35
+ */
36
+ export declare function defaultSeccompProfile(capabilities: string[], arch?: string, kernel?: string): SeccompProfile;