@monolayer/sdk 1.2.0-canary.4

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 (320) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +25 -0
  3. package/dist/bin/cli.js +21609 -0
  4. package/dist/cjs/configuration.d.ts +65 -0
  5. package/dist/cjs/configuration.js +45 -0
  6. package/dist/cjs/index.d.ts +4 -0
  7. package/dist/cjs/index.js +20 -0
  8. package/dist/cjs/introspection.d.ts +2 -0
  9. package/dist/cjs/introspection.js +11 -0
  10. package/dist/cjs/make/broadcast.d.ts +10 -0
  11. package/dist/cjs/make/broadcast.js +37 -0
  12. package/dist/cjs/make/config.d.ts +2 -0
  13. package/dist/cjs/make/config.js +44 -0
  14. package/dist/cjs/make/cron.d.ts +9 -0
  15. package/dist/cjs/make/cron.js +30 -0
  16. package/dist/cjs/make/make.d.ts +6 -0
  17. package/dist/cjs/make/make.js +134 -0
  18. package/dist/cjs/make/manifest.d.ts +202 -0
  19. package/dist/cjs/make/manifest.js +165 -0
  20. package/dist/cjs/make/required-filtes.d.ts +1 -0
  21. package/dist/cjs/make/required-filtes.js +17 -0
  22. package/dist/cjs/make/task.d.ts +9 -0
  23. package/dist/cjs/make/task.js +30 -0
  24. package/dist/cjs/package.json +3 -0
  25. package/dist/cjs/packages/docker/df.d.ts +543 -0
  26. package/dist/cjs/packages/docker/df.js +395 -0
  27. package/dist/cjs/packages/docker/validator.d.ts +7 -0
  28. package/dist/cjs/packages/docker/validator.js +18 -0
  29. package/dist/cjs/packages/utils/create-file.d.ts +1 -0
  30. package/dist/cjs/packages/utils/create-file.js +18 -0
  31. package/dist/cjs/packages/utils/date-string.d.ts +1 -0
  32. package/dist/cjs/packages/utils/date-string.js +12 -0
  33. package/dist/cjs/packages/utils/exception.d.ts +1 -0
  34. package/dist/cjs/packages/utils/exception.js +8 -0
  35. package/dist/cjs/packages/utils/hash-value.d.ts +16 -0
  36. package/dist/cjs/packages/utils/hash-value.js +25 -0
  37. package/dist/cjs/packages/utils/import-default.d.ts +1 -0
  38. package/dist/cjs/packages/utils/import-default.js +14 -0
  39. package/dist/cjs/packages/utils/import-file.d.ts +8 -0
  40. package/dist/cjs/packages/utils/import-file.js +41 -0
  41. package/dist/cjs/packages/utils/log-with-spinner.d.ts +1 -0
  42. package/dist/cjs/packages/utils/log-with-spinner.js +24 -0
  43. package/dist/cjs/packages/utils/path.d.ts +2 -0
  44. package/dist/cjs/packages/utils/path.js +21 -0
  45. package/dist/cjs/packages/utils/playground.d.ts +1 -0
  46. package/dist/cjs/packages/utils/playground.js +35 -0
  47. package/dist/cjs/scaffolding/add-env-var.d.ts +6 -0
  48. package/dist/cjs/scaffolding/add-env-var.js +65 -0
  49. package/dist/cjs/scaffolding/add-import.d.ts +16 -0
  50. package/dist/cjs/scaffolding/add-import.js +43 -0
  51. package/dist/cjs/scaffolding/add-script.d.ts +1 -0
  52. package/dist/cjs/scaffolding/add-script.js +35 -0
  53. package/dist/cjs/scaffolding/broadcast-workload.d.ts +1 -0
  54. package/dist/cjs/scaffolding/broadcast-workload.js +36 -0
  55. package/dist/cjs/scaffolding/bucket-workload.d.ts +6 -0
  56. package/dist/cjs/scaffolding/bucket-workload.js +23 -0
  57. package/dist/cjs/scaffolding/cron-workload.d.ts +6 -0
  58. package/dist/cjs/scaffolding/cron-workload.js +28 -0
  59. package/dist/cjs/scaffolding/drizzle.d.ts +4 -0
  60. package/dist/cjs/scaffolding/drizzle.js +22 -0
  61. package/dist/cjs/scaffolding/lifecycle.d.ts +9 -0
  62. package/dist/cjs/scaffolding/lifecycle.js +61 -0
  63. package/dist/cjs/scaffolding/postgres-database-workload.d.ts +15 -0
  64. package/dist/cjs/scaffolding/postgres-database-workload.js +39 -0
  65. package/dist/cjs/scaffolding/prisma.d.ts +4 -0
  66. package/dist/cjs/scaffolding/prisma.js +40 -0
  67. package/dist/cjs/scaffolding/replace-string.d.ts +10 -0
  68. package/dist/cjs/scaffolding/replace-string.js +37 -0
  69. package/dist/cjs/scaffolding/task-workload.d.ts +6 -0
  70. package/dist/cjs/scaffolding/task-workload.js +30 -0
  71. package/dist/cjs/scaffolding/workload.d.ts +1 -0
  72. package/dist/cjs/scaffolding/workload.js +18 -0
  73. package/dist/cjs/scan/project.d.ts +23 -0
  74. package/dist/cjs/scan/project.js +79 -0
  75. package/dist/cjs/scan/workload-imports.d.ts +21 -0
  76. package/dist/cjs/scan/workload-imports.js +188 -0
  77. package/dist/cjs/test-helpers/postgres.d.ts +13 -0
  78. package/dist/cjs/test-helpers/postgres.js +52 -0
  79. package/dist/cjs/test-helpers/redis.d.ts +13 -0
  80. package/dist/cjs/test-helpers/redis.js +46 -0
  81. package/dist/cjs/test-helpers/task.d.ts +14 -0
  82. package/dist/cjs/test-helpers/task.js +18 -0
  83. package/dist/cjs/test-helpers.d.ts +3 -0
  84. package/dist/cjs/test-helpers.js +10 -0
  85. package/dist/cjs/workloads/app-lifecycle/after-rollout.d.ts +22 -0
  86. package/dist/cjs/workloads/app-lifecycle/after-rollout.js +28 -0
  87. package/dist/cjs/workloads/app-lifecycle/before-rollout.d.ts +22 -0
  88. package/dist/cjs/workloads/app-lifecycle/before-rollout.js +28 -0
  89. package/dist/cjs/workloads/app-lifecycle/bootstrap.d.ts +22 -0
  90. package/dist/cjs/workloads/app-lifecycle/bootstrap.js +28 -0
  91. package/dist/cjs/workloads/app-lifecycle/lifecycle-workload.d.ts +11 -0
  92. package/dist/cjs/workloads/app-lifecycle/lifecycle-workload.js +11 -0
  93. package/dist/cjs/workloads/assertions.d.ts +13 -0
  94. package/dist/cjs/workloads/assertions.js +14 -0
  95. package/dist/cjs/workloads/stateful/bucket.d.ts +82 -0
  96. package/dist/cjs/workloads/stateful/bucket.js +95 -0
  97. package/dist/cjs/workloads/stateful/database.d.ts +25 -0
  98. package/dist/cjs/workloads/stateful/database.js +42 -0
  99. package/dist/cjs/workloads/stateful/postgres-database.d.ts +29 -0
  100. package/dist/cjs/workloads/stateful/postgres-database.js +39 -0
  101. package/dist/cjs/workloads/stateful/redis.d.ts +30 -0
  102. package/dist/cjs/workloads/stateful/redis.js +40 -0
  103. package/dist/cjs/workloads/stateful/stateful-workload.d.ts +25 -0
  104. package/dist/cjs/workloads/stateful/stateful-workload.js +41 -0
  105. package/dist/cjs/workloads/stateless/broadcast/channel-data.d.ts +3 -0
  106. package/dist/cjs/workloads/stateless/broadcast/channel-data.js +6 -0
  107. package/dist/cjs/workloads/stateless/broadcast/client/app-sync-client.d.ts +78 -0
  108. package/dist/cjs/workloads/stateless/broadcast/client/app-sync-client.js +128 -0
  109. package/dist/cjs/workloads/stateless/broadcast/client/app-sync-publisher.d.ts +34 -0
  110. package/dist/cjs/workloads/stateless/broadcast/client/app-sync-publisher.js +78 -0
  111. package/dist/cjs/workloads/stateless/broadcast/client/authenticator.d.ts +28 -0
  112. package/dist/cjs/workloads/stateless/broadcast/client/authenticator.js +43 -0
  113. package/dist/cjs/workloads/stateless/broadcast/client/broadcast-provider.d.ts +17 -0
  114. package/dist/cjs/workloads/stateless/broadcast/client/broadcast-provider.js +34 -0
  115. package/dist/cjs/workloads/stateless/broadcast/client/client.d.ts +8 -0
  116. package/dist/cjs/workloads/stateless/broadcast/client/client.js +28 -0
  117. package/dist/cjs/workloads/stateless/broadcast/client/connectionManager.d.ts +62 -0
  118. package/dist/cjs/workloads/stateless/broadcast/client/connectionManager.js +166 -0
  119. package/dist/cjs/workloads/stateless/broadcast/client/eventEmitter.d.ts +32 -0
  120. package/dist/cjs/workloads/stateless/broadcast/client/eventEmitter.js +53 -0
  121. package/dist/cjs/workloads/stateless/broadcast/client/messageBuilder.d.ts +24 -0
  122. package/dist/cjs/workloads/stateless/broadcast/client/messageBuilder.js +43 -0
  123. package/dist/cjs/workloads/stateless/broadcast/client/parser.d.ts +12 -0
  124. package/dist/cjs/workloads/stateless/broadcast/client/parser.js +22 -0
  125. package/dist/cjs/workloads/stateless/broadcast/client/provider.d.ts +4 -0
  126. package/dist/cjs/workloads/stateless/broadcast/client/provider.js +11 -0
  127. package/dist/cjs/workloads/stateless/broadcast/client/subscriptionManager.d.ts +34 -0
  128. package/dist/cjs/workloads/stateless/broadcast/client/subscriptionManager.js +91 -0
  129. package/dist/cjs/workloads/stateless/broadcast/client/types.d.ts +72 -0
  130. package/dist/cjs/workloads/stateless/broadcast/client/types.js +6 -0
  131. package/dist/cjs/workloads/stateless/broadcast/matcher.d.ts +13 -0
  132. package/dist/cjs/workloads/stateless/broadcast/matcher.js +46 -0
  133. package/dist/cjs/workloads/stateless/broadcast/router.d.ts +103 -0
  134. package/dist/cjs/workloads/stateless/broadcast/router.js +98 -0
  135. package/dist/cjs/workloads/stateless/broadcast/types.d.ts +17 -0
  136. package/dist/cjs/workloads/stateless/broadcast/types.js +2 -0
  137. package/dist/cjs/workloads/stateless/cron.d.ts +49 -0
  138. package/dist/cjs/workloads/stateless/cron.js +55 -0
  139. package/dist/cjs/workloads/stateless/stateless-workload.d.ts +3 -0
  140. package/dist/cjs/workloads/stateless/stateless-workload.js +7 -0
  141. package/dist/cjs/workloads/stateless/task/backoffs.d.ts +9 -0
  142. package/dist/cjs/workloads/stateless/task/backoffs.js +17 -0
  143. package/dist/cjs/workloads/stateless/task/dispatcher.d.ts +3 -0
  144. package/dist/cjs/workloads/stateless/task/dispatcher.js +22 -0
  145. package/dist/cjs/workloads/stateless/task/local.d.ts +14 -0
  146. package/dist/cjs/workloads/stateless/task/local.js +54 -0
  147. package/dist/cjs/workloads/stateless/task/perform-later.d.ts +2 -0
  148. package/dist/cjs/workloads/stateless/task/perform-later.js +7 -0
  149. package/dist/cjs/workloads/stateless/task/perform-now.d.ts +5 -0
  150. package/dist/cjs/workloads/stateless/task/perform-now.js +24 -0
  151. package/dist/cjs/workloads/stateless/task/perform.d.ts +7 -0
  152. package/dist/cjs/workloads/stateless/task/perform.js +10 -0
  153. package/dist/cjs/workloads/stateless/task/task.d.ts +88 -0
  154. package/dist/cjs/workloads/stateless/task/task.js +61 -0
  155. package/dist/cjs/workloads/stateless/task/validate-data-size.d.ts +1 -0
  156. package/dist/cjs/workloads/stateless/task/validate-data-size.js +10 -0
  157. package/dist/cjs/workloads/workload.d.ts +14 -0
  158. package/dist/cjs/workloads/workload.js +16 -0
  159. package/dist/cjs/workloads.d.ts +22 -0
  160. package/dist/cjs/workloads.js +30 -0
  161. package/dist/esm/configuration.d.ts +65 -0
  162. package/dist/esm/configuration.js +15 -0
  163. package/dist/esm/index.d.ts +4 -0
  164. package/dist/esm/index.js +4 -0
  165. package/dist/esm/introspection.d.ts +2 -0
  166. package/dist/esm/introspection.js +2 -0
  167. package/dist/esm/make/broadcast.d.ts +10 -0
  168. package/dist/esm/make/broadcast.js +30 -0
  169. package/dist/esm/make/config.d.ts +2 -0
  170. package/dist/esm/make/config.js +41 -0
  171. package/dist/esm/make/cron.d.ts +9 -0
  172. package/dist/esm/make/cron.js +23 -0
  173. package/dist/esm/make/make.d.ts +6 -0
  174. package/dist/esm/make/make.js +120 -0
  175. package/dist/esm/make/manifest.d.ts +202 -0
  176. package/dist/esm/make/manifest.js +162 -0
  177. package/dist/esm/make/required-filtes.d.ts +1 -0
  178. package/dist/esm/make/required-filtes.js +11 -0
  179. package/dist/esm/make/task.d.ts +9 -0
  180. package/dist/esm/make/task.js +23 -0
  181. package/dist/esm/package.json +3 -0
  182. package/dist/esm/packages/docker/df.d.ts +543 -0
  183. package/dist/esm/packages/docker/df.js +381 -0
  184. package/dist/esm/packages/docker/validator.d.ts +7 -0
  185. package/dist/esm/packages/docker/validator.js +14 -0
  186. package/dist/esm/packages/utils/create-file.d.ts +1 -0
  187. package/dist/esm/packages/utils/create-file.js +11 -0
  188. package/dist/esm/packages/utils/date-string.d.ts +1 -0
  189. package/dist/esm/packages/utils/date-string.js +8 -0
  190. package/dist/esm/packages/utils/exception.d.ts +1 -0
  191. package/dist/esm/packages/utils/exception.js +4 -0
  192. package/dist/esm/packages/utils/hash-value.d.ts +16 -0
  193. package/dist/esm/packages/utils/hash-value.js +20 -0
  194. package/dist/esm/packages/utils/import-default.d.ts +1 -0
  195. package/dist/esm/packages/utils/import-default.js +10 -0
  196. package/dist/esm/packages/utils/import-file.d.ts +8 -0
  197. package/dist/esm/packages/utils/import-file.js +13 -0
  198. package/dist/esm/packages/utils/log-with-spinner.d.ts +1 -0
  199. package/dist/esm/packages/utils/log-with-spinner.js +17 -0
  200. package/dist/esm/packages/utils/path.d.ts +2 -0
  201. package/dist/esm/packages/utils/path.js +17 -0
  202. package/dist/esm/packages/utils/playground.d.ts +1 -0
  203. package/dist/esm/packages/utils/playground.js +11 -0
  204. package/dist/esm/scaffolding/add-env-var.d.ts +6 -0
  205. package/dist/esm/scaffolding/add-env-var.js +57 -0
  206. package/dist/esm/scaffolding/add-import.d.ts +16 -0
  207. package/dist/esm/scaffolding/add-import.js +39 -0
  208. package/dist/esm/scaffolding/add-script.d.ts +1 -0
  209. package/dist/esm/scaffolding/add-script.js +29 -0
  210. package/dist/esm/scaffolding/broadcast-workload.d.ts +1 -0
  211. package/dist/esm/scaffolding/broadcast-workload.js +30 -0
  212. package/dist/esm/scaffolding/bucket-workload.d.ts +6 -0
  213. package/dist/esm/scaffolding/bucket-workload.js +17 -0
  214. package/dist/esm/scaffolding/cron-workload.d.ts +6 -0
  215. package/dist/esm/scaffolding/cron-workload.js +22 -0
  216. package/dist/esm/scaffolding/drizzle.d.ts +4 -0
  217. package/dist/esm/scaffolding/drizzle.js +19 -0
  218. package/dist/esm/scaffolding/lifecycle.d.ts +9 -0
  219. package/dist/esm/scaffolding/lifecycle.js +53 -0
  220. package/dist/esm/scaffolding/postgres-database-workload.d.ts +15 -0
  221. package/dist/esm/scaffolding/postgres-database-workload.js +31 -0
  222. package/dist/esm/scaffolding/prisma.d.ts +4 -0
  223. package/dist/esm/scaffolding/prisma.js +34 -0
  224. package/dist/esm/scaffolding/replace-string.d.ts +10 -0
  225. package/dist/esm/scaffolding/replace-string.js +30 -0
  226. package/dist/esm/scaffolding/task-workload.d.ts +6 -0
  227. package/dist/esm/scaffolding/task-workload.js +24 -0
  228. package/dist/esm/scaffolding/workload.d.ts +1 -0
  229. package/dist/esm/scaffolding/workload.js +12 -0
  230. package/dist/esm/scan/project.d.ts +23 -0
  231. package/dist/esm/scan/project.js +69 -0
  232. package/dist/esm/scan/workload-imports.d.ts +21 -0
  233. package/dist/esm/scan/workload-imports.js +144 -0
  234. package/dist/esm/test-helpers/postgres.d.ts +13 -0
  235. package/dist/esm/test-helpers/postgres.js +26 -0
  236. package/dist/esm/test-helpers/redis.d.ts +13 -0
  237. package/dist/esm/test-helpers/redis.js +20 -0
  238. package/dist/esm/test-helpers/task.d.ts +14 -0
  239. package/dist/esm/test-helpers/task.js +14 -0
  240. package/dist/esm/test-helpers.d.ts +3 -0
  241. package/dist/esm/test-helpers.js +3 -0
  242. package/dist/esm/workloads/app-lifecycle/after-rollout.d.ts +22 -0
  243. package/dist/esm/workloads/app-lifecycle/after-rollout.js +24 -0
  244. package/dist/esm/workloads/app-lifecycle/before-rollout.d.ts +22 -0
  245. package/dist/esm/workloads/app-lifecycle/before-rollout.js +24 -0
  246. package/dist/esm/workloads/app-lifecycle/bootstrap.d.ts +22 -0
  247. package/dist/esm/workloads/app-lifecycle/bootstrap.js +24 -0
  248. package/dist/esm/workloads/app-lifecycle/lifecycle-workload.d.ts +11 -0
  249. package/dist/esm/workloads/app-lifecycle/lifecycle-workload.js +7 -0
  250. package/dist/esm/workloads/assertions.d.ts +13 -0
  251. package/dist/esm/workloads/assertions.js +6 -0
  252. package/dist/esm/workloads/stateful/bucket.d.ts +82 -0
  253. package/dist/esm/workloads/stateful/bucket.js +95 -0
  254. package/dist/esm/workloads/stateful/database.d.ts +25 -0
  255. package/dist/esm/workloads/stateful/database.js +42 -0
  256. package/dist/esm/workloads/stateful/postgres-database.d.ts +29 -0
  257. package/dist/esm/workloads/stateful/postgres-database.js +35 -0
  258. package/dist/esm/workloads/stateful/redis.d.ts +30 -0
  259. package/dist/esm/workloads/stateful/redis.js +36 -0
  260. package/dist/esm/workloads/stateful/stateful-workload.d.ts +25 -0
  261. package/dist/esm/workloads/stateful/stateful-workload.js +41 -0
  262. package/dist/esm/workloads/stateless/broadcast/channel-data.d.ts +3 -0
  263. package/dist/esm/workloads/stateless/broadcast/channel-data.js +2 -0
  264. package/dist/esm/workloads/stateless/broadcast/client/app-sync-client.d.ts +78 -0
  265. package/dist/esm/workloads/stateless/broadcast/client/app-sync-client.js +130 -0
  266. package/dist/esm/workloads/stateless/broadcast/client/app-sync-publisher.d.ts +34 -0
  267. package/dist/esm/workloads/stateless/broadcast/client/app-sync-publisher.js +76 -0
  268. package/dist/esm/workloads/stateless/broadcast/client/authenticator.d.ts +28 -0
  269. package/dist/esm/workloads/stateless/broadcast/client/authenticator.js +39 -0
  270. package/dist/esm/workloads/stateless/broadcast/client/broadcast-provider.d.ts +17 -0
  271. package/dist/esm/workloads/stateless/broadcast/client/broadcast-provider.js +29 -0
  272. package/dist/esm/workloads/stateless/broadcast/client/client.d.ts +8 -0
  273. package/dist/esm/workloads/stateless/broadcast/client/client.js +25 -0
  274. package/dist/esm/workloads/stateless/broadcast/client/connectionManager.d.ts +62 -0
  275. package/dist/esm/workloads/stateless/broadcast/client/connectionManager.js +164 -0
  276. package/dist/esm/workloads/stateless/broadcast/client/eventEmitter.d.ts +32 -0
  277. package/dist/esm/workloads/stateless/broadcast/client/eventEmitter.js +50 -0
  278. package/dist/esm/workloads/stateless/broadcast/client/messageBuilder.d.ts +24 -0
  279. package/dist/esm/workloads/stateless/broadcast/client/messageBuilder.js +39 -0
  280. package/dist/esm/workloads/stateless/broadcast/client/parser.d.ts +12 -0
  281. package/dist/esm/workloads/stateless/broadcast/client/parser.js +19 -0
  282. package/dist/esm/workloads/stateless/broadcast/client/provider.d.ts +4 -0
  283. package/dist/esm/workloads/stateless/broadcast/client/provider.js +8 -0
  284. package/dist/esm/workloads/stateless/broadcast/client/subscriptionManager.d.ts +34 -0
  285. package/dist/esm/workloads/stateless/broadcast/client/subscriptionManager.js +91 -0
  286. package/dist/esm/workloads/stateless/broadcast/client/types.d.ts +72 -0
  287. package/dist/esm/workloads/stateless/broadcast/client/types.js +5 -0
  288. package/dist/esm/workloads/stateless/broadcast/matcher.d.ts +13 -0
  289. package/dist/esm/workloads/stateless/broadcast/matcher.js +43 -0
  290. package/dist/esm/workloads/stateless/broadcast/router.d.ts +103 -0
  291. package/dist/esm/workloads/stateless/broadcast/router.js +93 -0
  292. package/dist/esm/workloads/stateless/broadcast/server/broadcast-server.d.ts +2 -0
  293. package/dist/esm/workloads/stateless/broadcast/server/broadcast-server.js +316 -0
  294. package/dist/esm/workloads/stateless/broadcast/types.d.ts +17 -0
  295. package/dist/esm/workloads/stateless/broadcast/types.js +1 -0
  296. package/dist/esm/workloads/stateless/cron.d.ts +49 -0
  297. package/dist/esm/workloads/stateless/cron.js +52 -0
  298. package/dist/esm/workloads/stateless/stateless-workload.d.ts +3 -0
  299. package/dist/esm/workloads/stateless/stateless-workload.js +8 -0
  300. package/dist/esm/workloads/stateless/task/backoffs.d.ts +9 -0
  301. package/dist/esm/workloads/stateless/task/backoffs.js +14 -0
  302. package/dist/esm/workloads/stateless/task/dispatcher.d.ts +3 -0
  303. package/dist/esm/workloads/stateless/task/dispatcher.js +18 -0
  304. package/dist/esm/workloads/stateless/task/local.d.ts +14 -0
  305. package/dist/esm/workloads/stateless/task/local.js +48 -0
  306. package/dist/esm/workloads/stateless/task/perform-later.d.ts +2 -0
  307. package/dist/esm/workloads/stateless/task/perform-later.js +4 -0
  308. package/dist/esm/workloads/stateless/task/perform-now.d.ts +5 -0
  309. package/dist/esm/workloads/stateless/task/perform-now.js +18 -0
  310. package/dist/esm/workloads/stateless/task/perform.d.ts +7 -0
  311. package/dist/esm/workloads/stateless/task/perform.js +8 -0
  312. package/dist/esm/workloads/stateless/task/task.d.ts +88 -0
  313. package/dist/esm/workloads/stateless/task/task.js +59 -0
  314. package/dist/esm/workloads/stateless/task/validate-data-size.d.ts +1 -0
  315. package/dist/esm/workloads/stateless/task/validate-data-size.js +7 -0
  316. package/dist/esm/workloads/workload.d.ts +14 -0
  317. package/dist/esm/workloads/workload.js +16 -0
  318. package/dist/esm/workloads.d.ts +22 -0
  319. package/dist/esm/workloads.js +13 -0
  320. package/package.json +155 -0
@@ -0,0 +1,543 @@
1
+ export declare class Dockerfile {
2
+ #private;
3
+ /**
4
+ * Merge multiple Dockerfile instances into one.
5
+ *
6
+ * Returns a new Dockerfile instance.
7
+ */
8
+ static merge(dockerfiles: Dockerfile[]): Dockerfile;
9
+ constructor(df?: Dockerfile);
10
+ /**
11
+ * Instruction that initializes a new build stage and sets the base image for
12
+ * subsequent instructions.
13
+ *
14
+ * @see
15
+ *
16
+ * [Docker Docs](https://docs.docker.com/engine/reference/builder/#from)
17
+ */
18
+ FROM(
19
+ /**
20
+ * Image name.
21
+ *
22
+ * Formats: `<image>`, `<image>[:<tag>]`, `<image>[@<digest>]`
23
+ */
24
+ image: string, options?: {
25
+ /**
26
+ * Build stage name.
27
+ */
28
+ as?: string;
29
+ /**
30
+ * Platform of the image in case `FROM` references a multi-platform image.
31
+ */
32
+ platform?: string;
33
+ }): this;
34
+ /**
35
+ * Sets the environment variable `<key>` to the value `<value>`.
36
+ * This value will be in the environment for all subsequent instructions
37
+ * in the build stage.
38
+ *
39
+ * @see
40
+ *
41
+ * [Docker Docs](https://docs.docker.com/engine/reference/builder/#env)
42
+ */
43
+ ENV(key: string, value: string, options?: OnBuildOption): this;
44
+ /**
45
+ * Adds metadata to an image. A `LABEL` is a key-pair.
46
+ *
47
+ * @see
48
+ *
49
+ * [Docker Docs](https://docs.docker.com/engine/reference/builder/#label)
50
+ */
51
+ LABEL(pair: {
52
+ key: string;
53
+ value: string;
54
+ }, options?: OnBuildOption): this;
55
+ LABEL(pairs: {
56
+ key: string;
57
+ value: string;
58
+ }[], options?: OnBuildOption): this;
59
+ /**
60
+ * Sets the working directory for any `RUN`, `CMD`, `ENTRYPOINT`, `COPY` and `ADD` instructions
61
+ * that follow it in the Dockerfile.
62
+ *
63
+ * @see
64
+ *
65
+ * [Docker Docs](https://docs.docker.com/engine/reference/builder/#workdir)
66
+ */
67
+ WORKDIR(dir: string, options?: OnBuildOption): this;
68
+ /**
69
+ * Execute any commands to create a new layer on top of the current image.
70
+ *
71
+ * @see
72
+ *
73
+ * [Docker Docs](https://docs.docker.com/engine/reference/builder/#run)
74
+ */
75
+ RUN(command: string | string[], options?: {
76
+ /**
77
+ * Create filesystem mounts that the build can access. This can be used to:
78
+ * - Create bind mount to the host filesystem or other build stages.
79
+ * - Access build secrets or ssh-agent sockets.
80
+ * - Use a persistent package management cache to speed up your build.
81
+ */
82
+ mount?: MountType | MountType[];
83
+ /**
84
+ * Control over which networking environment the command is run in.
85
+ */
86
+ network?: "default" | "none" | "host";
87
+ } & OnBuildOption): this;
88
+ /**
89
+ * Copies new files or directories from `<src>` and adds them to the filesystem of the image
90
+ * at the path `<dest>`. Files and directories can be copied from the build context,
91
+ * build stage, named context, or an image.
92
+ *
93
+ * @see
94
+ *
95
+ * [Docker Docs](https://docs.docker.com/engine/reference/builder/#copy)
96
+ */
97
+ COPY(source: string[], destination: Directory, options?: CopyOptions): this;
98
+ COPY(source: string, destination: string, options?: CopyOptions): this;
99
+ /**
100
+ * Sets the command to be executed when running a container from an image.
101
+ *
102
+ * @see
103
+ *
104
+ * [Docker Docs](https://docs.docker.com/engine/reference/builder/#cmd)
105
+ */
106
+ CMD(params?: string[]): this;
107
+ CMD(executable: string, params?: string[]): this;
108
+ /**
109
+ * Configures a container that will run as an executable.
110
+ *
111
+ * @see
112
+ *
113
+ * [Docker Docs](https://docs.docker.com/engine/reference/builder/#entrypoint)
114
+ */
115
+ ENTRYPOINT(executable: string, parameters?: string[]): this;
116
+ /**
117
+ * Overrides the default shell used for the shell form of commands.
118
+ *
119
+ * The default shell on Linux is `["/bin/sh", "-c"]`,
120
+ * and on Windows is `["cmd", "/S", "/C"]`.
121
+ *
122
+ * @see
123
+ *
124
+ * [Docker Docs](https://docs.docker.com/engine/reference/builder/#shell)
125
+ */
126
+ SHELL(executable: string, parameters: string[], options?: OnBuildOption): this;
127
+ /**
128
+ * Informs Docker that the container listens on the specified network ports at runtime.
129
+ *
130
+ * You can specify whether the port listens on TCP or UDP,
131
+ * and the default is TCP if you don't specify a protocol.
132
+ *
133
+ * @see
134
+ *
135
+ * [Docker Docs](https://docs.docker.com/engine/reference/builder/#expose)
136
+ */
137
+ EXPOSE(port: (number | Interpolation | PortRange)[] | {
138
+ port: number | Interpolation | PortRange;
139
+ protocol: "tcp" | "udp";
140
+ }[], options?: OnBuildOption): this;
141
+ EXPOSE(port: (number | Interpolation | PortRange) | {
142
+ port: number | Interpolation | PortRange;
143
+ protocol: "tcp" | "udp";
144
+ }, options?: OnBuildOption): this;
145
+ /**
146
+ * Sets the user name (or UID) and optionally the user group (or GID) to use
147
+ * as the default user and group for the remainder of the current stage.
148
+ *
149
+ * The specified user is used for RUN instructions and at runtime,
150
+ * runs the relevant `ENTRYPOINT` and `CMD` commands.
151
+ *
152
+ * @see
153
+ *
154
+ * [Docker Docs](https://docs.docker.com/engine/reference/builder/#user)
155
+ */
156
+ USER(user: {
157
+ name: string;
158
+ group?: string;
159
+ } | {
160
+ uid: number;
161
+ gid?: number;
162
+ }, options?: OnBuildOption): this;
163
+ /**
164
+ * Creates a mount point with the specified name and
165
+ * marks it as holding externally mounted volumes from native host or other containers.
166
+ *
167
+ * @see
168
+ *
169
+ * [Docker Docs](https://docs.docker.com/engine/reference/builder/#volume)
170
+ */
171
+ VOLUME(names: string | string[], options?: OnBuildOption): this;
172
+ /**
173
+ * Sets the system call signal that will be sent to the container to exit.
174
+ *
175
+ * @see
176
+ *
177
+ * [Docker Docs](https://docs.docker.com/engine/reference/builder/#stopsignal)
178
+ */
179
+ STOPSIGNAL(signal: NodeJS.Signals | number, options?: OnBuildOption): this;
180
+ /**
181
+ * Defines a variable that users can pass at build-time to the builder
182
+ * with the docker build command using the `--build-arg <varname>=<value>` flag.
183
+ *
184
+ * @see
185
+ *
186
+ * [Docker Docs](https://docs.docker.com/engine/reference/builder/#arg)
187
+ */
188
+ ARG(name: string, options?: {
189
+ default?: string;
190
+ } & OnBuildOption): this;
191
+ /**
192
+ * Copies new files or directories from `<src>` and adds them to the filesystem
193
+ * of the image at the path `<dest>`.
194
+ *
195
+ * Files and directories can be copied from the build context,
196
+ * a remote URL, or a Git repository.
197
+ *
198
+ * @see
199
+ *
200
+ * [Docker Docs](https://docs.docker.com/engine/reference/builder/#add)
201
+ */
202
+ ADD(source: string, destination: string, options?: AddOptions): this;
203
+ ADD(source: string[], destination: Directory, options?: AddOptions): this;
204
+ /**
205
+ * Tells Docker how to test a container to check that it's still working.
206
+ *
207
+ * @see
208
+ *
209
+ * [Docker Docs](https://docs.docker.com/engine/reference/builder/#healthcheck)
210
+ */
211
+ HEALTHCHECK(command: "NONE"): this;
212
+ HEALTHCHECK(command: string, options?: HealthCheckOptions & OnBuildOption): this;
213
+ /**
214
+ * Adds a comment.
215
+ */
216
+ comment(content: string): this;
217
+ /**
218
+ * Adds a banner comment
219
+ */
220
+ banner(content: string): this;
221
+ /**
222
+ * Adds an empty line.
223
+ */
224
+ blank(): this;
225
+ /**
226
+ * Groups instructions by omitting blank lines between them.
227
+ */
228
+ group(callback: () => void): this;
229
+ /**
230
+ * Returns the Dockerfile string.
231
+ */
232
+ toString(): string;
233
+ /**
234
+ * Saves the Dockerfile.
235
+ */
236
+ save(filePath: string): void;
237
+ /**
238
+ * Appends the contents of a Dockerfile instance.
239
+ */
240
+ append(dockerfile: Dockerfile): this;
241
+ }
242
+ export type MountType = BindMountType | CacheMountType | TmpfsMountType | SecretMountType | SshMountType;
243
+ /**
244
+ * This mount type allows binding files or directories to the build container.
245
+ * A bind mount is read-only by default.
246
+ */
247
+ export interface BindMountType {
248
+ type: "bind";
249
+ /**
250
+ * Mount path.
251
+ */
252
+ target: string;
253
+ /**
254
+ * Source path in the from.
255
+ *
256
+ * @defaultValue root of {@link BindMountType.from | from }
257
+ */
258
+ source?: string;
259
+ /**
260
+ * Build stage, context, or image name for the root of the source.
261
+ *
262
+ * @defaultValue build context.
263
+ */
264
+ from?: string;
265
+ /**
266
+ * Allow writes on the mount. Written data will be discarded.
267
+ */
268
+ readwrite?: true;
269
+ }
270
+ /**
271
+ * This mount type allows the build container to cache directories
272
+ * for compilers and package managers.
273
+ */
274
+ export interface CacheMountType {
275
+ type: "cache";
276
+ /**
277
+ * ID to identify separate/different caches.
278
+ *
279
+ * @defaultValue value of {@link CacheMountType.target | target}
280
+ */
281
+ id?: string;
282
+ /**
283
+ * Mount path.
284
+ */
285
+ target: string;
286
+ /**
287
+ * Read-only if set.
288
+ */
289
+ readonly?: string;
290
+ /**
291
+ * A shared cache mount can be used concurrently by multiple writers.
292
+ *
293
+ * - `private` creates a new mount if there are multiple writers.
294
+ * - `locked` pauses the second writer until the first one releases the mount.
295
+ *
296
+ * @defaultValue shared.
297
+ */
298
+ sharing?: "shared" | "private" | "locked";
299
+ /**
300
+ * Build stage, context, or image name to use as a base of the cache mount.
301
+ *
302
+ * @defaultValue empty directory.
303
+ */
304
+ from?: string;
305
+ /**
306
+ * Subpath in the `from` to mount.
307
+ *
308
+ * @defaultValue root of {@link CacheMountType.from | from}
309
+ */
310
+ source?: string;
311
+ /**
312
+ * File mode for new cache directory in octal.
313
+ *
314
+ * @defaultValue 0755
315
+ */
316
+ mode?: string;
317
+ /**
318
+ * User ID for new cache directory.
319
+ *
320
+ * @defaultValue 0
321
+ */
322
+ uid?: string;
323
+ /**
324
+ * Group ID for new cache directory.
325
+ *
326
+ * @defaultValue 0
327
+ */
328
+ gid?: string;
329
+ }
330
+ /**
331
+ * Mount type that allows mounting tmpfs in the build container.
332
+ */
333
+ export interface TmpfsMountType {
334
+ type: "tmpfs";
335
+ /**
336
+ * Mount path.
337
+ */
338
+ target: string;
339
+ /**
340
+ * Specify an upper limit on the size of the filesystem.
341
+ */
342
+ size?: string;
343
+ }
344
+ /**
345
+ * This mount type allows the build container to access secret values,
346
+ * such as tokens or private keys, without baking them into the image.
347
+ *
348
+ * By default, the secret is mounted as a file.
349
+ *
350
+ * You can also mount the secret as an environment variable by setting the env option.
351
+ */
352
+ export interface SecretMountType {
353
+ type: "secret";
354
+ /**
355
+ * ID of the secret.
356
+ *
357
+ * @defaultValue basename of {@link SecretMountType.target | target }
358
+ */
359
+ id?: string;
360
+ /**
361
+ * Mount the secret to the specified path.
362
+ *
363
+ * @defaultValue /run/secrets/${id} if unset and if env is also unset
364
+ */
365
+ target?: string;
366
+ /**
367
+ * Mount the secret to an environment variable instead of a file, or both.
368
+ *
369
+ * @since Dockerfile v1.10.0
370
+ */
371
+ env?: string;
372
+ /**
373
+ * If set to true, the instruction errors out when the secret is unavailable.
374
+ *
375
+ * @defaultValue false
376
+ */
377
+ required?: boolean;
378
+ /**
379
+ * File mode for secret file in octal.
380
+ *
381
+ * @defaultValue 0400
382
+ */
383
+ mode?: string;
384
+ /**
385
+ * User ID for secret file.
386
+ *
387
+ * @defaultValue 0
388
+ */
389
+ uid?: string;
390
+ /**
391
+ * Group ID for secret file.
392
+ *
393
+ * @defaultValue 0
394
+ */
395
+ gid?: string;
396
+ }
397
+ export interface SshMountType {
398
+ type: "ssh";
399
+ /**
400
+ * ID of SSH agent socket or key.
401
+ *
402
+ * @defaultValue default
403
+ */
404
+ id?: string;
405
+ /**
406
+ * SSH agent socket path.
407
+ *
408
+ * @defaultValue /run/buildkit/ssh_agent.${N}
409
+ */
410
+ target?: string;
411
+ /**
412
+ * If set to true, the instruction errors out when the key is unavailable.
413
+ *
414
+ * @defaultValue false.
415
+ */
416
+ required?: string;
417
+ /**
418
+ * File mode for socket in octal.
419
+ *
420
+ * @defaultValue 0600
421
+ */
422
+ mode?: string;
423
+ /**
424
+ * User ID for socket.
425
+ *
426
+ * @defaultValue 0.
427
+ */
428
+ uid?: string;
429
+ /**
430
+ * Group ID for socket.
431
+ *
432
+ * @defaultValue 0
433
+ */
434
+ gid?: string;
435
+ }
436
+ export interface SharedCopyAddOptions {
437
+ /**
438
+ * Owner of the copied content: username, groupname, or UID/GID combination.
439
+ */
440
+ chown?: string;
441
+ /**
442
+ * Permission bits of the copied content
443
+ *
444
+ * @since Dockerfile v1.2
445
+ */
446
+ chmod?: string;
447
+ /**
448
+ * Copy files that remain independent on their own layer and don't get invalidated
449
+ * when commands on previous layers are changed.
450
+ *
451
+ * Source files are copied into an empty destination directory.
452
+ * That directory is turned into a layer that is linked on top of your previous state.
453
+ *
454
+ * @since Dockerfile v1.4
455
+ */
456
+ link?: boolean;
457
+ }
458
+ export interface CopyOptions extends SharedCopyAddOptions, OnBuildOption {
459
+ /**
460
+ * Copy files from an image, a build stage, or a named context.
461
+ */
462
+ from?: string;
463
+ }
464
+ export interface AddOptions extends SharedCopyAddOptions, OnBuildOption {
465
+ /**
466
+ * Preserve the .git directory when `<src>` is the
467
+ * HTTP or SSH address of a remote Git repository.
468
+ *
469
+ * @since Dockerfile v1.1
470
+ */
471
+ keepGitDir?: boolean;
472
+ /**
473
+ * Cerify the checksum of a remote resource.
474
+ *
475
+ * The checksum is formatted as `<algorithm>:<hash>`.
476
+ *
477
+ * The supported algorithms are sha256, sha384, and sha512.
478
+ * @since Dockerfile v1.6
479
+ */
480
+ checksum?: `${"sha256" | "sha384" | "sha512"}:${string}`;
481
+ }
482
+ /**
483
+ * A string in the form of {value}{unit}.
484
+ * The supported units are us (microseconds), ms (milliseconds), s (seconds),
485
+ * m (minutes) and h (hours). Values can combine multiple values without separator.
486
+ *
487
+ * Examples:
488
+ * - `10ms`
489
+ * - `40s`
490
+ * - `1m30s`
491
+ * - `1h5m30s20ms`
492
+ */
493
+ type Duration = string;
494
+ export interface HealthCheckOptions {
495
+ /**
496
+ * The health check will first run interval seconds after the container is started,
497
+ * and then again interval seconds after each previous check completes.
498
+ *
499
+ * @defaultValue 30s
500
+ */
501
+ interval?: Duration;
502
+ /**
503
+ *
504
+ * Timeout in seconds after a single run of the check is considered to have failed.
505
+ *
506
+ * @defaultValue 30s
507
+ */
508
+ timeout?: Duration;
509
+ /**
510
+ * Provides initialization time for containers that need time to bootstrap.
511
+ * Probe failure during that period will not be counted towards
512
+ * the maximum number of retries.
513
+ *
514
+ * However, if a health check succeeds during the start period, the container is considered started and all consecutive failures will be counted towards the maximum number of retries.
515
+ *
516
+ * @defaultValue 0s
517
+ */
518
+ startPeriod?: Duration;
519
+ /**
520
+ * Time between health checks during the start period.
521
+ *
522
+ * @defaultValue 5s
523
+ * @since Docker Engine v25.0
524
+ */
525
+ startInterval?: Duration;
526
+ /**
527
+ * Consecutive failures of the health check for the container to be considered unhealthy.
528
+ *
529
+ * @defaultValue 3
530
+ */
531
+ retries?: number;
532
+ }
533
+ type Directory = `${string}${"/"}`;
534
+ type PortRange = `${string}${"-"}${string}`;
535
+ type Interpolation = `${"${"}${string}${"}"}`;
536
+ export interface OnBuildOption {
537
+ /**
538
+ * Adds a trigger instruction to be executed at a later time,
539
+ * when the image is used as the base for another build.
540
+ */
541
+ onBuild?: boolean;
542
+ }
543
+ export {};