hammerkit 1.5.1 → 1.6.0-alpha.2

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 (480) hide show
  1. package/.agents/FEEDBACK.md +74 -0
  2. package/.agents/skills/before-commit/SKILL.md +101 -0
  3. package/.agents/skills/do-the-work/SKILL.md +64 -0
  4. package/.agents/skills/fix-ci/SKILL.md +98 -0
  5. package/.agents/skills/speckit-git-commit/SKILL.md +53 -0
  6. package/.agents/skills/speckit-git-feature/SKILL.md +72 -0
  7. package/.agents/skills/speckit-git-initialize/SKILL.md +54 -0
  8. package/.agents/skills/speckit-git-remote/SKILL.md +50 -0
  9. package/.agents/skills/speckit-git-validate/SKILL.md +54 -0
  10. package/.gitbook.yaml +5 -0
  11. package/.specify/extensions/.registry +37 -0
  12. package/.specify/extensions/git/README.md +100 -0
  13. package/.specify/extensions/git/commands/speckit.git.commit.md +48 -0
  14. package/.specify/extensions/git/commands/speckit.git.feature.md +67 -0
  15. package/.specify/extensions/git/commands/speckit.git.initialize.md +49 -0
  16. package/.specify/extensions/git/commands/speckit.git.remote.md +45 -0
  17. package/.specify/extensions/git/commands/speckit.git.validate.md +49 -0
  18. package/.specify/extensions/git/config-template.yml +62 -0
  19. package/.specify/extensions/git/extension.yml +140 -0
  20. package/.specify/extensions/git/git-config.yml +62 -0
  21. package/.specify/extensions.yml +149 -0
  22. package/.specify/feature.json +3 -0
  23. package/.specify/init-options.json +10 -0
  24. package/.specify/integration.json +15 -0
  25. package/.specify/integrations/claude.manifest.json +16 -0
  26. package/.specify/integrations/speckit.manifest.json +17 -0
  27. package/.specify/memory/constitution.md +162 -0
  28. package/.specify/templates/checklist-template.md +40 -0
  29. package/.specify/templates/constitution-template.md +50 -0
  30. package/.specify/templates/plan-template.md +113 -0
  31. package/.specify/templates/spec-template.md +131 -0
  32. package/.specify/templates/tasks-template.md +252 -0
  33. package/.specify/workflows/speckit/workflow.yml +77 -0
  34. package/.specify/workflows/workflow-registry.json +13 -0
  35. package/AGENTS.md +94 -0
  36. package/Dockerfile +3 -3
  37. package/FOLLOWUPS.md +34 -0
  38. package/README.md +9 -7
  39. package/SUMMARY.md +30 -5
  40. package/VALUES.md +53 -0
  41. package/build.schema.json +542 -408
  42. package/dist/cache/auto-pull.spec.js +123 -0
  43. package/dist/cache/backends/local-cache-backend.js +56 -0
  44. package/dist/cache/backends/local-cache-backend.spec.js +72 -0
  45. package/dist/cache/backends/s3-cache-backend.js +124 -0
  46. package/dist/cache/backends/s3-cache-backend.spec.js +118 -0
  47. package/dist/cache/cache-backend-registry.js +21 -0
  48. package/dist/cache/cache-backend-registry.spec.js +22 -0
  49. package/dist/cache/cache-backend.js +3 -0
  50. package/dist/cache/resolve-cache.js +60 -0
  51. package/dist/cache/resolve-cache.spec.js +52 -0
  52. package/dist/cli.js +112 -82
  53. package/dist/cli.spec.js +20 -2
  54. package/dist/console/get-logger.spec.js +23 -0
  55. package/dist/docker/get-default-platform.spec.js +29 -0
  56. package/dist/docker/longest-common-prefix.spec.js +26 -0
  57. package/dist/docker/package.js +283 -0
  58. package/dist/docker/package.spec.js +145 -0
  59. package/dist/docker/pull.js +4 -4
  60. package/dist/docker/remove-container.spec.js +32 -0
  61. package/dist/docker/stream.js +3 -3
  62. package/dist/docker/using-container.js +29 -11
  63. package/dist/docker/using-container.spec.js +90 -0
  64. package/dist/environment/merge-environment-variables.js +21 -0
  65. package/dist/environment/merge-environment-variables.spec.js +24 -0
  66. package/dist/environment/replace-env-variables.js +43 -10
  67. package/dist/environment/replace-env-variables.spec.js +47 -0
  68. package/dist/executer/abort.spec.js +18 -0
  69. package/dist/executer/await-completed-dependencies.js +56 -0
  70. package/dist/executer/cache-metadata.js +11 -0
  71. package/dist/executer/check-readiness.js +1 -1
  72. package/dist/{planner/work-node-port.js → executer/container-bind.js} +1 -1
  73. package/dist/executer/docker-service.js +110 -86
  74. package/dist/executer/docker-task.js +132 -0
  75. package/dist/executer/environment-mock.js +3 -4
  76. package/dist/executer/environment-mock.spec.js +22 -0
  77. package/dist/executer/event-cache.js +60 -127
  78. package/dist/executer/execute-command.js +4 -3
  79. package/dist/executer/execute-docker.js +32 -14
  80. package/dist/executer/execute-work-service.js +61 -0
  81. package/dist/executer/execute-work-task.js +107 -0
  82. package/dist/executer/execute-work-tree.js +27 -0
  83. package/dist/executer/execute.spec.js +14 -10
  84. package/dist/executer/execution-steps.js +47 -31
  85. package/dist/executer/get-container-binds.js +19 -0
  86. package/dist/executer/get-docker-executor.js +12 -12
  87. package/dist/executer/get-scheduler-down-result.js +12 -0
  88. package/dist/executer/get-scheduler-execute-result.js +28 -0
  89. package/dist/executer/get-scheduler-up-result.js +12 -0
  90. package/dist/executer/get-service-containers.js +14 -0
  91. package/dist/executer/get-service-containers.spec.js +59 -0
  92. package/dist/executer/get-service-env-hints.js +35 -0
  93. package/dist/executer/get-service-env-hints.spec.js +65 -0
  94. package/dist/executer/kubernetes-service.js +116 -48
  95. package/dist/executer/label-values.js +29 -46
  96. package/dist/executer/label-values.spec.js +61 -0
  97. package/dist/executer/lazy-resolver.js +16 -0
  98. package/dist/executer/lazy-resolver.spec.js +20 -0
  99. package/dist/executer/local-task.js +44 -0
  100. package/dist/executer/process-manager.js +16 -70
  101. package/dist/executer/process-manager.spec.js +39 -76
  102. package/dist/executer/reset-work-tree.js +30 -0
  103. package/dist/executer/scheduler/check-for-loop.js +17 -7
  104. package/dist/executer/scheduler/{scheduler-state.js → dependency-state.js} +1 -1
  105. package/dist/executer/scheduler/enqueue-next.js +83 -19
  106. package/dist/executer/scheduler/enqueue-next.spec.js +136 -0
  107. package/dist/executer/scheduler/{node-state.js → need-state.js} +1 -1
  108. package/dist/{parser/build-file.js → executer/scheduler/task-state.js} +1 -1
  109. package/dist/executer/set-user-permission.js +1 -1
  110. package/dist/executer/state-resolver.js +61 -0
  111. package/dist/executer/state-resolver.spec.js +37 -0
  112. package/dist/executer/state.js +37 -31
  113. package/dist/executer/state.spec.js +66 -0
  114. package/dist/executer/states.spec.js +14 -0
  115. package/dist/executer/watch-loop.js +68 -0
  116. package/dist/executer/watch-state-key.js +44 -0
  117. package/dist/executer/work-scope.js +1 -5
  118. package/dist/file/get-file-context.js +24 -3
  119. package/dist/file/get-file-context.spec.js +178 -0
  120. package/dist/file/move-files.js +2 -2
  121. package/dist/file/move-files.spec.js +48 -0
  122. package/dist/index.js +7 -8
  123. package/dist/json-schema.js +12 -0
  124. package/dist/kubernetes/apply.js +34 -0
  125. package/dist/kubernetes/await-running-state.js +71 -0
  126. package/dist/kubernetes/ensure-http-route.js +53 -0
  127. package/dist/kubernetes/ensure-http-route.spec.js +70 -0
  128. package/dist/kubernetes/ensure-ingress.js +54 -0
  129. package/dist/kubernetes/ensure-kubernetes-deployment-exists.js +105 -0
  130. package/dist/kubernetes/ensure-kubernetes-persistent-volume-claim-exists.js +40 -0
  131. package/dist/kubernetes/ensure-kubernetes-service-exists.js +36 -0
  132. package/dist/kubernetes/ensure-namespace.js +43 -0
  133. package/dist/kubernetes/ensure-namespace.spec.js +39 -0
  134. package/dist/kubernetes/ensure-persistent-data.js +158 -0
  135. package/dist/kubernetes/get-service-ip.js +11 -0
  136. package/dist/kubernetes/kubernetes-instance.js +48 -0
  137. package/dist/kubernetes/remove-persistent-data.js +19 -0
  138. package/dist/kubernetes/resolve-pod-name.js +42 -0
  139. package/dist/kubernetes/resolve-pod-name.spec.js +81 -0
  140. package/dist/kubernetes/resources.js +12 -0
  141. package/dist/kubernetes/restore-kubernetes-data.js +42 -0
  142. package/dist/kubernetes/store-kubernetes-data.js +39 -0
  143. package/dist/kubernetes/volumes.js +64 -0
  144. package/dist/log.js +69 -69
  145. package/dist/log.spec.js +131 -0
  146. package/dist/logging/grouped-logger.js +17 -15
  147. package/dist/logging/grouped-logger.spec.js +84 -0
  148. package/dist/logging/interactive-logger.js +1 -1
  149. package/dist/logging/interactive-logger.spec.js +57 -0
  150. package/dist/logging/live-logger.js +2 -2
  151. package/dist/logging/live-logger.spec.js +37 -0
  152. package/dist/logging/loggers.spec.js +154 -0
  153. package/dist/optimizer/calculate-checksum.spec.js +34 -0
  154. package/dist/optimizer/get-cache-directory.js +6 -6
  155. package/dist/optimizer/get-cache-directory.spec.js +59 -0
  156. package/dist/optimizer/get-work-cache-stats.js +53 -0
  157. package/dist/optimizer/get-work-cache-stats.spec.js +79 -0
  158. package/dist/{parser/build-file-task.js → optimizer/work-cache-stats.js} +1 -1
  159. package/dist/optimizer/work-task-cache-description.js +25 -0
  160. package/dist/optimizer/work-task-cache-description.spec.js +45 -0
  161. package/dist/parser/default-build-file.js +14 -7
  162. package/dist/parser/default-build-file.spec.js +48 -0
  163. package/dist/parser/parse-label-arguments.spec.js +27 -0
  164. package/dist/parser/read-build-file.js +2 -13
  165. package/dist/parser/read-build-file.spec.js +89 -0
  166. package/dist/parser/read-env-file.js +4 -5
  167. package/dist/parser/read-env-file.spec.js +42 -0
  168. package/dist/planner/utils/append-work-dependencies.js +55 -0
  169. package/dist/planner/utils/append-work-environment.js +22 -0
  170. package/dist/planner/utils/append-work-needs.js +18 -0
  171. package/dist/planner/utils/append-work-service.js +107 -0
  172. package/dist/planner/utils/append-work-service.spec.js +71 -0
  173. package/dist/planner/utils/append-work-task.js +81 -0
  174. package/dist/planner/utils/get-container-user.js +14 -0
  175. package/dist/planner/utils/get-container-user.spec.js +30 -0
  176. package/dist/planner/utils/get-default-kube-config.js +10 -0
  177. package/dist/planner/utils/get-default-kube-config.spec.js +11 -0
  178. package/dist/planner/utils/get-work-runtime.js +44 -0
  179. package/dist/planner/utils/normalize-path.js +1 -1
  180. package/dist/planner/utils/normalize-path.spec.js +24 -0
  181. package/dist/planner/utils/parse-work-command.js +80 -0
  182. package/dist/planner/utils/parse-work-command.spec.js +21 -0
  183. package/dist/planner/utils/parse-work-generate.js +38 -0
  184. package/dist/planner/utils/parse-work-generate.spec.js +45 -0
  185. package/dist/planner/utils/{parse-work-node-mount.js → parse-work-mount.js} +10 -7
  186. package/dist/planner/utils/{parse-work-node-mount.spec.js → parse-work-mount.spec.js} +14 -11
  187. package/dist/planner/utils/parse-work-mounts.js +13 -0
  188. package/dist/planner/utils/parse-work-mounts.spec.js +19 -0
  189. package/dist/planner/utils/{parse-work-node-port.js → parse-work-port.js} +11 -8
  190. package/dist/planner/utils/parse-work-port.spec.js +24 -0
  191. package/dist/planner/utils/parse-work-ports.js +10 -0
  192. package/dist/planner/utils/parse-work-ports.spec.js +24 -0
  193. package/dist/planner/utils/parse-work-source.js +72 -0
  194. package/dist/planner/utils/parse-work-source.spec.js +58 -0
  195. package/dist/planner/utils/parse-work-volume.js +45 -0
  196. package/dist/planner/utils/parse-work-volume.spec.js +18 -0
  197. package/dist/planner/utils/plan-work-tasks.js +41 -0
  198. package/dist/planner/utils/plan-work-tasks.spec.js +30 -0
  199. package/dist/planner/utils/plan-work-volume.js +1 -0
  200. package/dist/planner/utils/plan-work-volume.spec.js +33 -0
  201. package/dist/planner/utils/split-name.js +2 -2
  202. package/dist/planner/utils/split-name.spec.js +16 -0
  203. package/dist/planner/utils/template-value.js +1 -2
  204. package/dist/planner/utils/template-value.spec.js +14 -0
  205. package/dist/planner/validate.js +71 -38
  206. package/dist/planner/validate.spec.js +251 -0
  207. package/dist/planner/work-cache-id.js +12 -0
  208. package/dist/planner/work-cache-id.spec.js +173 -0
  209. package/dist/planner/work-command.js +3 -0
  210. package/dist/planner/work-environment.js +3 -0
  211. package/dist/planner/work-healthcheck.js +3 -0
  212. package/dist/planner/{work-node-status.js → work-item-status.js} +16 -62
  213. package/dist/{parser/build-file-service.js → planner/work-item-validation.js} +1 -1
  214. package/dist/planner/work-item.js +16 -0
  215. package/dist/{optimizer/work-node-cache-stats.js → planner/work-kubernetes-selector.js} +1 -1
  216. package/dist/planner/{work-nodes.js → work-port.js} +1 -1
  217. package/dist/planner/work-runtime-docker.js +224 -0
  218. package/dist/planner/work-runtime-kubernetes.js +264 -0
  219. package/dist/planner/work-runtime-local.js +109 -0
  220. package/dist/planner/work-runtime-local.spec.js +193 -0
  221. package/dist/planner/work-service-id.js +15 -5
  222. package/dist/planner/work-source.js +3 -0
  223. package/dist/planner/work-task.js +8 -0
  224. package/dist/program-commands.spec.js +84 -0
  225. package/dist/program.js +219 -73
  226. package/dist/program.spec.js +34 -11
  227. package/dist/run-program.js +28 -0
  228. package/dist/{executer/process.js → runtime/runtime.js} +1 -1
  229. package/dist/schema/build-file-base-task-schema.js +27 -0
  230. package/dist/schema/build-file-container-service-schema.js +28 -0
  231. package/dist/schema/build-file-container-task-schema.js +13 -0
  232. package/dist/schema/build-file-environment-schema-ingress.js +14 -0
  233. package/dist/schema/build-file-environment-schema.js +23 -0
  234. package/dist/schema/build-file-kubernetes-service-schema.js +17 -0
  235. package/dist/schema/build-file-kubernetes-service-selector-schema.js +9 -0
  236. package/dist/schema/build-file-local-platform-schema.js +9 -0
  237. package/dist/schema/build-file-local-task-schema.js +12 -0
  238. package/dist/schema/build-file-need-schema.js +12 -0
  239. package/dist/schema/build-file-schema.js +23 -0
  240. package/dist/schema/build-file-schema.spec.js +61 -0
  241. package/dist/schema/build-file-service-container-healthcheck.js +8 -0
  242. package/dist/schema/build-file-service-schema.js +15 -0
  243. package/dist/schema/build-file-task-command-schema.js +12 -0
  244. package/dist/schema/build-file-task-schema.js +12 -0
  245. package/dist/schema/build-file-volume-schema.js +14 -0
  246. package/dist/schema/cache-schema.js +31 -0
  247. package/dist/schema/doc-build-files.spec.js +223 -0
  248. package/dist/schema/envs-schema.js +6 -0
  249. package/dist/schema/labels-schema.js +6 -0
  250. package/dist/schema/parse-context.js +3 -0
  251. package/dist/schema/parse-error.js +12 -0
  252. package/dist/schema/parse-error.spec.js +18 -0
  253. package/dist/schema/reference-parser.js +209 -0
  254. package/dist/schema/reference-parser.spec.js +83 -0
  255. package/dist/schema/schema-parser.js +66 -0
  256. package/dist/schema/schema-parser.spec.js +80 -0
  257. package/dist/schema/type-guards.spec.js +23 -0
  258. package/dist/schema/work-scope-parser.js +77 -0
  259. package/dist/schema/work-scope-parser.spec.js +66 -0
  260. package/dist/service/update-service-status.js +11 -0
  261. package/dist/service/update-service-status.spec.js +27 -0
  262. package/dist/testing/ensure-local-registry.js +134 -0
  263. package/dist/testing/example-test-suite.js +16 -18
  264. package/dist/testing/expect.js +46 -22
  265. package/dist/testing/http-get.js +21 -0
  266. package/dist/testing/integration/cache.spec.js +13 -14
  267. package/dist/testing/integration/cancellation.spec.js +14 -9
  268. package/dist/testing/integration/clean.spec.js +14 -11
  269. package/dist/testing/integration/cmd.spec.js +1 -1
  270. package/dist/testing/integration/concurrency.spec.js +3 -3
  271. package/dist/testing/integration/docker-package-registry.spec.js +44 -0
  272. package/dist/testing/integration/docker-service-crash.spec.js +36 -0
  273. package/dist/testing/integration/docker.spec.js +4 -3
  274. package/dist/testing/integration/env.spec.js +9 -8
  275. package/dist/testing/integration/environment.spec.js +97 -0
  276. package/dist/testing/integration/error.spec.js +5 -4
  277. package/dist/testing/integration/export.spec.js +22 -0
  278. package/dist/testing/integration/extend.spec.js +9 -12
  279. package/dist/testing/integration/glob.spec.js +12 -20
  280. package/dist/testing/integration/include.spec.js +3 -3
  281. package/dist/testing/integration/invalid.spec.js +2 -3
  282. package/dist/testing/integration/invalid_loop.spec.js +49 -6
  283. package/dist/testing/integration/k8s-state-cache.spec.js +41 -0
  284. package/dist/testing/integration/kubernetes-service.spec.js +148 -0
  285. package/dist/testing/integration/kubernetes.spec.js +93 -9
  286. package/dist/testing/integration/labels.spec.js +6 -11
  287. package/dist/testing/integration/local.spec.js +1 -1
  288. package/dist/testing/integration/monorepo.spec.js +4 -4
  289. package/dist/testing/integration/multi-line.spec.js +3 -3
  290. package/dist/testing/integration/reference.spec.js +4 -5
  291. package/dist/testing/integration/services.spec.js +22 -4
  292. package/dist/testing/integration/store.spec.js +15 -16
  293. package/dist/testing/integration/unknown.spec.js +20 -18
  294. package/dist/testing/integration/validate.spec.js +143 -26
  295. package/dist/testing/integration/watch-dependency.spec.js +11 -8
  296. package/dist/testing/integration/watch.spec.js +15 -16
  297. package/dist/testing/requires-kubernetes.js +18 -0
  298. package/dist/testing/requires-linux-containers.js +18 -0
  299. package/dist/testing/requires-windows-containers.js +18 -0
  300. package/dist/testing/test-case.js +75 -0
  301. package/dist/testing/test-streams.js +28 -0
  302. package/dist/testing/testing-timeout.js +32 -0
  303. package/dist/utils/abort-event.js +10 -4
  304. package/dist/utils/abort-event.spec.js +46 -0
  305. package/dist/utils/buffer-context.js +44 -0
  306. package/dist/utils/buffer-context.spec.js +38 -0
  307. package/dist/utils/ci.spec.js +53 -0
  308. package/dist/utils/emitter.spec.js +34 -0
  309. package/dist/utils/empty-writable.spec.js +18 -0
  310. package/dist/utils/environment-config.js +4 -1
  311. package/dist/utils/environment-config.spec.js +26 -0
  312. package/dist/utils/fail-never.spec.js +9 -0
  313. package/dist/version.js +9 -0
  314. package/dist/version.spec.js +12 -0
  315. package/package.json +41 -23
  316. package/specs/build-file/caches/spec.md +114 -0
  317. package/specs/build-file/environment-variables/spec.md +82 -0
  318. package/specs/build-file/includes/spec.md +60 -0
  319. package/specs/build-file/references/spec.md +56 -0
  320. package/specs/build-file/spec.md +62 -0
  321. package/specs/cli/clean/spec.md +85 -0
  322. package/specs/cli/down/spec.md +85 -0
  323. package/specs/cli/execute/spec.md +101 -0
  324. package/specs/cli/init/spec.md +64 -0
  325. package/specs/cli/ls/spec.md +66 -0
  326. package/specs/cli/package/spec.md +110 -0
  327. package/specs/cli/spec.md +73 -0
  328. package/specs/cli/store-restore/spec.md +74 -0
  329. package/specs/cli/up/spec.md +80 -0
  330. package/specs/cli/validate/spec.md +70 -0
  331. package/specs/labels/spec.md +91 -0
  332. package/specs/service/container/spec.md +120 -0
  333. package/specs/service/kubernetes/spec.md +97 -0
  334. package/specs/service/spec.md +105 -0
  335. package/specs/task/caching/spec.md +107 -0
  336. package/specs/task/container/spec.md +118 -0
  337. package/specs/task/dependencies/spec.md +70 -0
  338. package/specs/task/extending/spec.md +74 -0
  339. package/specs/task/kubernetes/spec.md +125 -0
  340. package/specs/task/needs/spec.md +59 -0
  341. package/specs/task/spec.md +87 -0
  342. package/specs/task/watching/spec.md +69 -0
  343. package/dist/console/console-context-mock.js +0 -14
  344. package/dist/environment/get-process-env.js +0 -15
  345. package/dist/executer/create-scheduler-state.js +0 -32
  346. package/dist/executer/docker-node.js +0 -123
  347. package/dist/executer/hierarchy-scheduler.js +0 -94
  348. package/dist/executer/local-node.js +0 -57
  349. package/dist/executer/schedule.js +0 -137
  350. package/dist/executer/start-node.js +0 -67
  351. package/dist/executer/watch-node.js +0 -56
  352. package/dist/executer/watch-service.js +0 -54
  353. package/dist/file/get-file-context-mock.js +0 -187
  354. package/dist/file/get-file-context-mock.spec.js +0 -56
  355. package/dist/get-work-context.js +0 -29
  356. package/dist/optimizer/get-work-node-cache-stats.js +0 -104
  357. package/dist/optimizer/read-work-node-cache.js +0 -19
  358. package/dist/optimizer/work-node-cache-description.js +0 -32
  359. package/dist/optimizer/write-work-node-cache.js +0 -21
  360. package/dist/parser/build-file-task-command.js +0 -3
  361. package/dist/parser/build-file-task-platform.js +0 -3
  362. package/dist/parser/build-file-task-source.js +0 -3
  363. package/dist/parser/get-build-file.js +0 -9
  364. package/dist/parser/parse-boolean.js +0 -29
  365. package/dist/parser/parse-boolean.spec.js +0 -48
  366. package/dist/parser/parse-build-file-references.js +0 -35
  367. package/dist/parser/parse-build-file-services.js +0 -58
  368. package/dist/parser/parse-build-file-task-command.js +0 -36
  369. package/dist/parser/parse-build-file-task-source.js +0 -63
  370. package/dist/parser/parse-build-file.js +0 -125
  371. package/dist/parser/parse-context.js +0 -13
  372. package/dist/parser/parse-envs.js +0 -29
  373. package/dist/parser/parse-healthcheck.js +0 -28
  374. package/dist/parser/parse-service-selector.js +0 -39
  375. package/dist/parser/parse-string-array.js +0 -20
  376. package/dist/parser/parse-string-map.js +0 -30
  377. package/dist/parser/parse-string.js +0 -20
  378. package/dist/planner/utils/get-container-mounts.js +0 -24
  379. package/dist/planner/utils/parse-work-service-volume.js +0 -23
  380. package/dist/planner/utils/plan-work-command.js +0 -21
  381. package/dist/planner/utils/plan-work-dependency.js +0 -36
  382. package/dist/planner/utils/plan-work-node.js +0 -293
  383. package/dist/planner/utils/plan-work-nodes.js +0 -78
  384. package/dist/planner/utils/plan-work-tree.js +0 -15
  385. package/dist/planner/work-context.js +0 -23
  386. package/dist/planner/work-node-command.js +0 -3
  387. package/dist/planner/work-node-id.js +0 -12
  388. package/dist/planner/work-node-id.spec.js +0 -106
  389. package/dist/planner/work-node-path.js +0 -2
  390. package/dist/planner/work-node-source.js +0 -3
  391. package/dist/planner/work-node-validation.js +0 -3
  392. package/dist/planner/work-node.js +0 -8
  393. package/dist/planner/work-service-volume.js +0 -3
  394. package/dist/planner/work-services.js +0 -3
  395. package/dist/start-watch-processes.js +0 -28
  396. package/dist/testing/cli.js +0 -73
  397. package/dist/testing/create-build-file.js +0 -9
  398. package/dist/testing/get-logger.js +0 -23
  399. package/dist/testing/get-node.js +0 -12
  400. package/dist/testing/get-test-context.js +0 -19
  401. package/dist/testing/integration/program.spec.js +0 -25
  402. package/dist/testing/lazy.js +0 -17
  403. package/dist/testing/start-watch-processes.js +0 -29
  404. package/dist/testing/test-suite-options.js +0 -3
  405. package/dist/utils/abortable-function.js +0 -71
  406. package/logs/cache-console.log +0 -0
  407. package/logs/cache-status.log +0 -6
  408. package/logs/cache-stout.log +0 -0
  409. package/logs/cancellation-console.log +0 -0
  410. package/logs/cancellation-status.log +0 -3
  411. package/logs/cancellation-stout.log +0 -3
  412. package/logs/clean-console.log +0 -0
  413. package/logs/clean-status.log +0 -37
  414. package/logs/clean-stout.log +0 -95
  415. package/logs/cmd-console.log +0 -0
  416. package/logs/cmd-status.log +0 -8
  417. package/logs/cmd-stout.log +0 -9
  418. package/logs/concurrency-console.log +0 -0
  419. package/logs/concurrency-status.log +0 -14
  420. package/logs/concurrency-stout.log +0 -88
  421. package/logs/docker-console.log +0 -0
  422. package/logs/docker-status.log +0 -14
  423. package/logs/docker-stout.log +0 -39
  424. package/logs/env-console.log +0 -1
  425. package/logs/env-status.log +0 -1
  426. package/logs/env-stout.log +0 -0
  427. package/logs/error-console.log +0 -0
  428. package/logs/error-status.log +0 -10
  429. package/logs/error-stout.log +0 -36
  430. package/logs/extend-console.log +0 -0
  431. package/logs/extend-status.log +0 -1
  432. package/logs/extend-stout.log +0 -0
  433. package/logs/glob-console.log +0 -28
  434. package/logs/glob-status.log +0 -23
  435. package/logs/glob-stout.log +0 -52
  436. package/logs/hello-world-node-console.log +0 -0
  437. package/logs/hello-world-node-status.log +0 -37
  438. package/logs/hello-world-node-stout.log +0 -41
  439. package/logs/include-console.log +0 -0
  440. package/logs/include-status.log +0 -3
  441. package/logs/include-stout.log +0 -0
  442. package/logs/invalid-console.log +0 -0
  443. package/logs/invalid-status.log +0 -1
  444. package/logs/invalid-stout.log +0 -0
  445. package/logs/invalid_loop-console.log +0 -0
  446. package/logs/invalid_loop-status.log +0 -1
  447. package/logs/invalid_loop-stout.log +0 -11
  448. package/logs/labels-console.log +0 -0
  449. package/logs/labels-status.log +0 -1
  450. package/logs/labels-stout.log +0 -0
  451. package/logs/local-console.log +0 -0
  452. package/logs/local-status.log +0 -7
  453. package/logs/local-stout.log +0 -8
  454. package/logs/monorepo-console.log +0 -0
  455. package/logs/monorepo-status.log +0 -152
  456. package/logs/monorepo-stout.log +0 -2354
  457. package/logs/multi-line-console.log +0 -0
  458. package/logs/multi-line-status.log +0 -1
  459. package/logs/multi-line-stout.log +0 -0
  460. package/logs/reference-console.log +0 -0
  461. package/logs/reference-status.log +0 -5
  462. package/logs/reference-stout.log +0 -0
  463. package/logs/services-console.log +0 -0
  464. package/logs/services-status.log +0 -129
  465. package/logs/services-stout.log +0 -639
  466. package/logs/store-restore-console.log +0 -0
  467. package/logs/store-restore-status.log +0 -40
  468. package/logs/store-restore-stout.log +0 -97
  469. package/logs/unknown-console.log +0 -3
  470. package/logs/unknown-status.log +0 -1
  471. package/logs/unknown-stout.log +0 -0
  472. package/logs/validate-console.log +0 -0
  473. package/logs/validate-status.log +0 -2
  474. package/logs/validate-stout.log +0 -0
  475. package/logs/watch-console.log +0 -0
  476. package/logs/watch-dependency-console.log +0 -0
  477. package/logs/watch-dependency-status.log +0 -176
  478. package/logs/watch-dependency-stout.log +0 -779
  479. package/logs/watch-status.log +0 -100
  480. package/logs/watch-stout.log +0 -349
package/build.schema.json CHANGED
@@ -1,434 +1,568 @@
1
1
  {
2
- "$comment": "https://no0dles.gitbook.io",
3
- "$schema": "http://json-schema.org/draft-07/schema#",
4
- "additionalProperties": false,
2
+ "$ref": "#/definitions/hammerkit",
5
3
  "definitions": {
6
- "buildFileEnvs": {
7
- "title": "environment variables",
8
- "description": "Environment values for the current build task\nhttps://no0dles.gitbook.io/hammerkit/build-file/environment-variables",
4
+ "hammerkit": {
9
5
  "type": "object",
10
- "additionalProperties": {
11
- "type": "string"
12
- }
13
- },
14
- "buildFileTasks": {
15
- "title": "tasks",
16
- "description": "Task for the current build file\nhttps://no0dles.gitbook.io/hammerkit/task",
17
- "type": "object",
18
- "additionalProperties": {
19
- "$ref": "#/definitions/task"
20
- }
21
- },
22
- "buildFileServices": {
23
- "title": "services",
24
- "description": "Services for the current build file\nhttps://no0dles.gitbook.io/hammerkit/service",
25
- "type": "object",
26
- "additionalProperties": {
27
- "$ref": "#/definitions/service"
28
- }
29
- },
30
- "buildFileIncludes": {
31
- "title": "includes",
32
- "description": "Includes to other build files\nhttps://no0dles.gitbook.io/hammerkit/build-file/includes",
33
- "type": "object",
34
- "additionalProperties": {
35
- "$ref": "https://json.schemastore.org/base.json#/definitions/path"
36
- }
37
- },
38
- "buildFileReferences": {
39
- "title": "references",
40
- "description": "References to other build files\nhttps://no0dles.gitbook.io/hammerkit/build-file/references",
41
- "type": "object",
42
- "additionalProperties": {
43
- "$ref": "https://json.schemastore.org/base.json#/definitions/path"
44
- }
45
- },
46
- "task": {
47
- "title": "task",
48
- "description": "Task for the current build file\nhttps://no0dles.gitbook.io/hammerkit/task",
49
- "anyOf": [
50
- {
51
- "$ref": "#/definitions/containerTask"
52
- },
53
- {
54
- "$ref": "#/definitions/localTask"
55
- }
56
- ]
57
- },
58
- "localTask": {
59
- "title": "local task",
60
- "description": "Task that gets executed in the local shell in the current directory",
61
- "type": "object",
62
- "additionalProperties": false,
63
- "required": ["cmds"],
64
6
  "properties": {
65
- "description": {
66
- "$ref": "#/definitions/taskCommand"
67
- },
68
- "extend": {
69
- "$ref": "#/definitions/taskExtend"
70
- },
71
- "cache": {
72
- "$ref": "#/definitions/taskCache"
73
- },
74
- "continuous": {
75
- "$ref": "#/definitions/taskContinuous"
76
- },
77
7
  "envs": {
78
- "$ref": "#/definitions/taskEnvs"
79
- },
80
- "needs": {
81
- "$ref": "#/definitions/taskNeeds"
82
- },
83
- "deps": {
84
- "$ref": "#/definitions/taskDeps"
85
- },
86
- "src": {
87
- "$ref": "#/definitions/taskSrc"
88
- },
89
- "generates": {
90
- "$ref": "#/definitions/taskGenerates"
91
- },
92
- "cmds": {
93
- "title": "task commands",
94
- "description": "Commands for the current task",
95
- "type": "array",
96
- "items": {
97
- "$ref": "#/definitions/taskCommand"
98
- }
99
- }
100
- }
101
- },
102
- "containerTask": {
103
- "title": "container task",
104
- "description": "Container task for the current build file\nhttps://no0dles.gitbook.io/hammerkit/task/container",
105
- "type": "object",
106
- "required": ["image", "cmds"],
107
- "additionalProperties": false,
108
- "properties": {
109
- "description": {
110
- "$ref": "#/definitions/taskCommand"
111
- },
112
- "extend": {
113
- "$ref": "#/definitions/taskExtend"
114
- },
115
- "cache": {
116
- "$ref": "#/definitions/taskCache"
117
- },
118
- "continuous": {
119
- "$ref": "#/definitions/taskContinuous"
120
- },
121
- "envs": {
122
- "$ref": "#/definitions/taskEnvs"
123
- },
124
- "needs": {
125
- "$ref": "#/definitions/taskNeeds"
126
- },
127
- "deps": {
128
- "$ref": "#/definitions/taskDeps"
129
- },
130
- "src": {
131
- "$ref": "#/definitions/taskSrc"
132
- },
133
- "generates": {
134
- "$ref": "#/definitions/taskGenerates"
135
- },
136
- "cmds": {
137
- "title": "task commands",
138
- "description": "Commands for the current task",
139
- "type": "array",
140
- "items": {
141
- "$ref": "#/definitions/taskCommand"
142
- }
143
- },
144
- "shell": {
145
- "title": "task shell",
146
- "description": "Define which shell is used to execute the commands",
147
- "type": "string"
148
- },
149
- "image": {
150
- "title": "task image",
151
- "description": "Container image for the current task to run commands in",
152
- "type": "string"
153
- },
154
- "ports": {
155
- "title": "task ports",
156
- "description": "A list of ports that get exposed on the host from the container <localPort>:<targetPort>",
157
- "type": "array",
158
- "uniqueItems": true,
159
- "items": {
160
- "description": "<localPort>:<targetPort>",
161
- "type": "string",
162
- "pattern": "\\d+:\\d+"
163
- }
164
- },
165
- "mounts": {
166
- "title": "task mount",
167
- "description": "File paths that get mounted into the container\nhttps://no0dles.gitbook.io/hammerkit/task/container#adding-mounts",
168
- "type": "array",
169
- "uniqueItems": true,
170
- "items": {
171
- "type": "string",
172
- "pattern": "\\d+:\\d+"
173
- }
174
- }
175
- }
176
- },
177
- "taskCommand": {
178
- "anyOf": [
179
- {
180
- "title": "command",
181
- "description": "Command to be executed for the current task",
182
- "type": "string"
183
- },
184
- {
185
- "title": "task command with path extension",
186
- "description": "Command to be executed in sub directory for the current task",
187
8
  "type": "object",
188
- "additionalProperties": false,
189
- "required": ["cmd"],
190
- "properties": {
191
- "cmd": {
192
- "title": "command",
193
- "description": "Command to be executed for the task",
194
- "type": "string"
195
- },
196
- "path": {
197
- "title": "command path",
198
- "description": "Path below build file path",
199
- "$ref": "https://json.schemastore.org/base.json#/definitions/path"
200
- }
201
- }
202
- }
203
- ]
204
- },
205
- "taskDescription": {
206
- "title": "task description",
207
- "description": "Description for the current task",
208
- "type": "string"
209
- },
210
- "taskExtend": {
211
- "title": "task extension",
212
- "description": "Extension task as a base template\nhttps://no0dles.gitbook.io/hammerkit/task/extending",
213
- "type": "string"
214
- },
215
- "taskCache": {
216
- "title": "task cache",
217
- "description": "compare type for detecting changes in source files\nhttps://no0dles.gitbook.io/hammerkit/task/caching",
218
- "type": "string",
219
- "enum": ["checksum", "modify-date", "none"]
220
- },
221
- "taskContinuous": {
222
- "title": "task continuous",
223
- "description": "The task runs continuous and does not end without cancellation\nhttps://no0dles.gitbook.io/hammerkit/task/watching#continuous-tasks",
224
- "type": "boolean"
225
- },
226
- "taskLabels": {
227
- "title": "label options",
228
- "description": "A map of label values for the current task\nhttps://no0dles.gitbook.io/hammerkit/labels",
229
- "type": "object",
230
- "additionalProperties": { "type": "string" }
231
- },
232
- "taskEnvs": {
233
- "title": "task environment variables",
234
- "description": "Environment values for the current build file\nhttps://no0dles.gitbook.io/hammerkit/build-file/environment-variables",
235
- "type": "object",
236
- "additionalProperties": {
237
- "type": "string"
238
- }
239
- },
240
- "taskNeeds": {
241
- "title": "task service needs",
242
- "description": "Service needs that need to get ready before the current task\nhttps://no0dles.gitbook.io/hammerkit/task/needs",
243
- "type": "array",
244
- "uniqueItems": true,
245
- "items": {
246
- "type": "string"
247
- }
248
- },
249
- "taskDeps": {
250
- "title": "task dependencies",
251
- "description": "Task dependencies that get executed before the current task\nhttps://no0dles.gitbook.io/hammerkit/task/dependencies",
252
- "type": "array",
253
- "uniqueItems": true,
254
- "items": {
255
- "type": "string"
256
- }
257
- },
258
- "taskSrc": {
259
- "title": "task source",
260
- "description": "Source files and folders for the current task\nhttps://no0dles.gitbook.io/hammerkit/task#source",
261
- "type": "array",
262
- "uniqueItems": true,
263
- "items": {
264
- "$ref": "https://json.schemastore.org/base.json#/definitions/path"
265
- }
266
- },
267
- "taskGenerates": {
268
- "title": "task generate",
269
- "description": "Generated files and folders for the current task\n\nhttps://no0dles.gitbook.io/hammerkit/task#generate",
270
- "type": "array",
271
- "uniqueItems": true,
272
- "items": {
273
- "$ref": "https://json.schemastore.org/base.json#/definitions/path"
274
- }
275
- },
276
- "service": {
277
- "title": "service",
278
- "description": "A daemon in the background",
279
- "anyOf": [
280
- {
281
- "$ref": "#/definitions/containerService"
282
- },
283
- {
284
- "$ref": "#/definitions/kubernetesService"
285
- }
286
- ]
287
- },
288
- "kubernetesService": {
289
- "title": "kubernetes service",
290
- "description": "Kubernetes service for the current build file\nhttps://no0dles.gitbook.io/hammerkit/service/kubernetes",
291
- "type": "object",
292
- "required": ["context", "selector", "ports"],
293
- "additionalProperties": false,
294
- "properties": {
295
- "kubeconfig": {
296
- "title": "service kube config",
297
- "description": "Kubernetes context for the current service\nhttps://no0dles.gitbook.io/hammerkit/service/kubernetes#config",
298
- "type": "string"
299
- },
300
- "context": {
301
- "title": "service context",
302
- "description": "Kubernetes context for the current service\nhttps://no0dles.gitbook.io/hammerkit/service/kubernetes#config",
303
- "type": "string"
304
- },
305
- "ports": {
306
- "title": "service ports",
307
- "description": "A list of ports that get exposed on the host from the service <localPort>:<targetPort>",
308
- "type": "array",
309
- "uniqueItems": true,
310
- "items": {
311
- "description": "<localPort>:<targetPort>",
312
- "type": "string",
313
- "pattern": "\\d+:\\d+"
9
+ "additionalProperties": {
10
+ "type": [
11
+ "string",
12
+ "number"
13
+ ]
14
+ },
15
+ "description": "Environment values for the current build task\nhttps://no0dles.gitbook.io/hammerkit/build-file/environment-variables"
16
+ },
17
+ "tasks": {
18
+ "type": "object",
19
+ "additionalProperties": {
20
+ "anyOf": [
21
+ {
22
+ "type": "object",
23
+ "properties": {
24
+ "deps": {
25
+ "type": "array",
26
+ "items": {
27
+ "type": "string"
28
+ }
29
+ },
30
+ "needs": {
31
+ "type": "array",
32
+ "items": {
33
+ "anyOf": [
34
+ {
35
+ "type": "string"
36
+ },
37
+ {
38
+ "type": "object",
39
+ "properties": {
40
+ "service": {
41
+ "type": "string"
42
+ },
43
+ "name": {
44
+ "type": "string"
45
+ }
46
+ },
47
+ "required": [
48
+ "service",
49
+ "name"
50
+ ],
51
+ "additionalProperties": false
52
+ }
53
+ ]
54
+ }
55
+ },
56
+ "description": {
57
+ "type": "string"
58
+ },
59
+ "extend": {
60
+ "type": "string"
61
+ },
62
+ "envs": {
63
+ "$ref": "#/definitions/hammerkit/properties/envs",
64
+ "description": "Environment values for the current build task\nhttps://no0dles.gitbook.io/hammerkit/build-file/environment-variables"
65
+ },
66
+ "labels": {
67
+ "type": "object",
68
+ "additionalProperties": {
69
+ "type": [
70
+ "string",
71
+ "number"
72
+ ]
73
+ }
74
+ },
75
+ "cache": {
76
+ "anyOf": [
77
+ {
78
+ "type": "string",
79
+ "enum": [
80
+ "checksum",
81
+ "modify-date",
82
+ "none"
83
+ ]
84
+ },
85
+ {
86
+ "type": "object",
87
+ "properties": {
88
+ "name": {
89
+ "type": "string"
90
+ },
91
+ "method": {
92
+ "$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/cache/anyOf/0"
93
+ }
94
+ },
95
+ "required": [
96
+ "name"
97
+ ],
98
+ "additionalProperties": false
99
+ }
100
+ ]
101
+ },
102
+ "cmds": {
103
+ "type": "array",
104
+ "items": {
105
+ "anyOf": [
106
+ {
107
+ "type": "string"
108
+ },
109
+ {
110
+ "type": "object",
111
+ "properties": {
112
+ "cmd": {
113
+ "type": "string"
114
+ },
115
+ "path": {
116
+ "type": "string"
117
+ }
118
+ },
119
+ "required": [
120
+ "cmd"
121
+ ],
122
+ "additionalProperties": false
123
+ }
124
+ ]
125
+ }
126
+ },
127
+ "src": {
128
+ "type": "array",
129
+ "items": {
130
+ "type": "string"
131
+ }
132
+ },
133
+ "generates": {
134
+ "type": "array",
135
+ "items": {
136
+ "anyOf": [
137
+ {
138
+ "type": "string"
139
+ },
140
+ {
141
+ "type": "object",
142
+ "properties": {
143
+ "export": {
144
+ "type": "boolean"
145
+ },
146
+ "resetOnChange": {
147
+ "type": "boolean"
148
+ },
149
+ "path": {
150
+ "type": "string"
151
+ },
152
+ "name": {
153
+ "type": "string"
154
+ }
155
+ },
156
+ "required": [
157
+ "path"
158
+ ],
159
+ "additionalProperties": false
160
+ }
161
+ ]
162
+ }
163
+ },
164
+ "shell": {
165
+ "type": "string"
166
+ },
167
+ "image": {
168
+ "type": "string"
169
+ },
170
+ "mounts": {
171
+ "type": "array",
172
+ "items": {
173
+ "type": "string"
174
+ }
175
+ }
176
+ },
177
+ "required": [
178
+ "image"
179
+ ],
180
+ "additionalProperties": false,
181
+ "description": "container task"
182
+ },
183
+ {
184
+ "type": "object",
185
+ "properties": {
186
+ "deps": {
187
+ "$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/deps"
188
+ },
189
+ "needs": {
190
+ "$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/needs"
191
+ },
192
+ "description": {
193
+ "$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/description"
194
+ },
195
+ "extend": {
196
+ "$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/extend"
197
+ },
198
+ "envs": {
199
+ "$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/envs"
200
+ },
201
+ "labels": {
202
+ "$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/labels"
203
+ },
204
+ "cache": {
205
+ "$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/cache"
206
+ },
207
+ "cmds": {
208
+ "$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/cmds"
209
+ },
210
+ "src": {
211
+ "$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/src"
212
+ },
213
+ "generates": {
214
+ "$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/generates"
215
+ },
216
+ "shell": {
217
+ "$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/shell"
218
+ },
219
+ "platform": {
220
+ "type": "object",
221
+ "properties": {
222
+ "os": {
223
+ "type": "string",
224
+ "enum": [
225
+ "win",
226
+ "macos",
227
+ "linux"
228
+ ]
229
+ },
230
+ "arch": {
231
+ "type": "string",
232
+ "enum": [
233
+ "arm64",
234
+ "arm"
235
+ ]
236
+ }
237
+ },
238
+ "additionalProperties": false
239
+ }
240
+ },
241
+ "additionalProperties": false,
242
+ "description": "local task"
243
+ }
244
+ ]
314
245
  }
315
246
  },
316
- "selector": {
317
- "title": "service selector",
318
- "description": "Selector to specify which resource gets forwarded to\nhttps://no0dles.gitbook.io/hammerkit/service/kubernetes",
247
+ "services": {
319
248
  "type": "object",
320
- "required": ["type", "name"],
321
- "additionalProperties": false,
322
- "properties": {
323
- "type": {
324
- "title": "selector resource type",
325
- "description": "resource type for the current service",
326
- "type": "string",
327
- "enum": ["deployment", "service", "pod"]
328
- },
329
- "name": {
330
- "title": "selector resource name",
331
- "description": "resource name for the kubernetes resource",
332
- "type": "string"
333
- }
249
+ "additionalProperties": {
250
+ "anyOf": [
251
+ {
252
+ "type": "object",
253
+ "properties": {
254
+ "image": {
255
+ "type": "string"
256
+ },
257
+ "description": {
258
+ "type": "string"
259
+ },
260
+ "ports": {
261
+ "type": "array",
262
+ "items": {
263
+ "type": [
264
+ "string",
265
+ "number"
266
+ ]
267
+ }
268
+ },
269
+ "envs": {
270
+ "$ref": "#/definitions/hammerkit/properties/envs",
271
+ "description": "Environment values for the current build task\nhttps://no0dles.gitbook.io/hammerkit/build-file/environment-variables"
272
+ },
273
+ "mounts": {
274
+ "type": "array",
275
+ "items": {
276
+ "type": "string"
277
+ }
278
+ },
279
+ "deps": {
280
+ "type": "array",
281
+ "items": {
282
+ "type": "string"
283
+ }
284
+ },
285
+ "src": {
286
+ "type": "array",
287
+ "items": {
288
+ "type": "string"
289
+ }
290
+ },
291
+ "needs": {
292
+ "type": "array",
293
+ "items": {
294
+ "$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/needs/items"
295
+ }
296
+ },
297
+ "cmd": {
298
+ "type": "string"
299
+ },
300
+ "volumes": {
301
+ "type": "array",
302
+ "items": {
303
+ "type": "string"
304
+ }
305
+ },
306
+ "labels": {
307
+ "$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/labels"
308
+ },
309
+ "continuous": {
310
+ "type": "boolean"
311
+ },
312
+ "healthcheck": {
313
+ "type": "object",
314
+ "properties": {
315
+ "cmd": {
316
+ "type": "string"
317
+ }
318
+ },
319
+ "required": [
320
+ "cmd"
321
+ ],
322
+ "additionalProperties": false
323
+ }
324
+ },
325
+ "required": [
326
+ "image",
327
+ "ports"
328
+ ],
329
+ "additionalProperties": false,
330
+ "description": "container service"
331
+ },
332
+ {
333
+ "type": "object",
334
+ "properties": {
335
+ "kubeconfig": {
336
+ "type": "string"
337
+ },
338
+ "deps": {
339
+ "type": "array",
340
+ "items": {
341
+ "type": "string"
342
+ }
343
+ },
344
+ "description": {
345
+ "type": "string"
346
+ },
347
+ "context": {
348
+ "type": "string"
349
+ },
350
+ "namespace": {
351
+ "type": "string"
352
+ },
353
+ "selector": {
354
+ "type": "object",
355
+ "properties": {
356
+ "type": {
357
+ "type": "string"
358
+ },
359
+ "name": {
360
+ "type": "string"
361
+ }
362
+ },
363
+ "required": [
364
+ "type",
365
+ "name"
366
+ ],
367
+ "additionalProperties": false
368
+ },
369
+ "labels": {
370
+ "$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/labels"
371
+ },
372
+ "ports": {
373
+ "type": "array",
374
+ "items": {
375
+ "type": [
376
+ "string",
377
+ "number"
378
+ ]
379
+ }
380
+ }
381
+ },
382
+ "required": [
383
+ "selector",
384
+ "ports"
385
+ ],
386
+ "additionalProperties": false
387
+ }
388
+ ],
389
+ "description": "service"
334
390
  }
335
- }
336
- }
337
- },
338
- "containerService": {
339
- "title": "container service",
340
- "description": "Container service for the current build file\nhttps://no0dles.gitbook.io/hammerkit/service/kubernetes",
341
- "type": "object",
342
- "required": ["image"],
343
- "additionalProperties": false,
344
- "properties": {
345
- "labels": {
346
- "title": "label options",
347
- "description": "A map of label values for the current service\nhttps://no0dles.gitbook.io/hammerkit/labels",
348
- "type": "object",
349
- "additionalProperties": { "type": "string" }
350
391
  },
351
- "envs": {
352
- "title": "service environment variables",
353
- "description": "Environment values for the current service\nhttps://no0dles.gitbook.io/hammerkit/build-file/environment-variables",
392
+ "references": {
354
393
  "type": "object",
355
394
  "additionalProperties": {
356
395
  "type": "string"
357
396
  }
358
397
  },
359
- "healthcheck": {
360
- "title": "service healthcheck",
361
- "description": "Check to detect if the service is started and ready\nhttps://no0dles.gitbook.io/hammerkit/service/container#healthcheck",
398
+ "includes": {
362
399
  "type": "object",
363
- "required": ["cmd"],
364
- "additionalProperties": false,
365
- "properties": {
366
- "cmd": {
367
- "title": "command",
368
- "description": "task to check if the service is healthy",
369
- "type": "string"
370
- }
400
+ "additionalProperties": {
401
+ "type": "string"
371
402
  }
372
403
  },
373
- "image": {
374
- "title": "service image",
375
- "description": "Container image for the current service to run commands in",
376
- "type": "string"
377
- },
378
- "ports": {
379
- "title": "service ports",
380
- "description": "A list of ports that get exposed on the host from the container <localPort>:<targetPort>\nhttps://no0dles.gitbook.io/hammerkit/service/container#mounts",
381
- "type": "array",
382
- "uniqueItems": true,
383
- "items": {
384
- "description": "<localPort>:<targetPort>",
385
- "type": "string",
386
- "pattern": "\\d+:\\d+"
404
+ "environments": {
405
+ "type": "object",
406
+ "additionalProperties": {
407
+ "anyOf": [
408
+ {
409
+ "type": "object",
410
+ "properties": {
411
+ "kubernetes": {
412
+ "type": "object",
413
+ "properties": {
414
+ "namespace": {
415
+ "type": "string"
416
+ },
417
+ "context": {
418
+ "type": "string"
419
+ },
420
+ "kubeconfig": {
421
+ "type": "string"
422
+ },
423
+ "ingresses": {
424
+ "type": "array",
425
+ "items": {
426
+ "type": "object",
427
+ "properties": {
428
+ "kind": {
429
+ "type": "string",
430
+ "enum": [
431
+ "ingress",
432
+ "httproute"
433
+ ]
434
+ },
435
+ "host": {
436
+ "type": "string"
437
+ },
438
+ "service": {
439
+ "type": "string"
440
+ },
441
+ "servicePort": {
442
+ "type": "number"
443
+ },
444
+ "path": {
445
+ "type": "string"
446
+ },
447
+ "gateway": {
448
+ "type": "string"
449
+ },
450
+ "gatewayNamespace": {
451
+ "type": "string"
452
+ }
453
+ },
454
+ "required": [
455
+ "host",
456
+ "service"
457
+ ],
458
+ "additionalProperties": false
459
+ }
460
+ }
461
+ },
462
+ "required": [
463
+ "context"
464
+ ],
465
+ "additionalProperties": false
466
+ }
467
+ },
468
+ "required": [
469
+ "kubernetes"
470
+ ],
471
+ "additionalProperties": false
472
+ },
473
+ {
474
+ "type": "object",
475
+ "properties": {
476
+ "docker": {
477
+ "type": "object",
478
+ "properties": {
479
+ "host": {
480
+ "type": "string"
481
+ }
482
+ },
483
+ "additionalProperties": false
484
+ }
485
+ },
486
+ "required": [
487
+ "docker"
488
+ ],
489
+ "additionalProperties": false
490
+ }
491
+ ]
387
492
  }
388
493
  },
389
- "volumes": {
390
- "title": "service volumes",
391
- "description": "A list of volumes that get attached to the container <name>:<containerPath>\nhttps://no0dles.gitbook.io/hammerkit/service/container#mounts",
392
- "type": "array",
393
- "uniqueItems": true,
394
- "items": {
395
- "description": "<name>:<containerPath>",
396
- "type": "string",
397
- "pattern": "\\d+:\\d+"
494
+ "caches": {
495
+ "type": "object",
496
+ "additionalProperties": {
497
+ "type": "object",
498
+ "properties": {
499
+ "method": {
500
+ "$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/cache/anyOf/0"
501
+ },
502
+ "backend": {
503
+ "anyOf": [
504
+ {
505
+ "type": "object",
506
+ "properties": {
507
+ "type": {
508
+ "type": "string",
509
+ "const": "local"
510
+ },
511
+ "path": {
512
+ "type": "string"
513
+ }
514
+ },
515
+ "required": [
516
+ "type"
517
+ ],
518
+ "additionalProperties": false
519
+ },
520
+ {
521
+ "type": "object",
522
+ "properties": {
523
+ "type": {
524
+ "type": "string",
525
+ "const": "s3"
526
+ },
527
+ "bucket": {
528
+ "type": "string"
529
+ },
530
+ "region": {
531
+ "type": "string"
532
+ },
533
+ "endpoint": {
534
+ "type": "string"
535
+ },
536
+ "prefix": {
537
+ "type": "string"
538
+ },
539
+ "forcePathStyle": {
540
+ "type": "boolean"
541
+ }
542
+ },
543
+ "required": [
544
+ "type",
545
+ "bucket"
546
+ ],
547
+ "additionalProperties": false
548
+ }
549
+ ]
550
+ }
551
+ },
552
+ "required": [
553
+ "method",
554
+ "backend"
555
+ ],
556
+ "additionalProperties": false
398
557
  }
399
558
  },
400
- "mounts": {
401
- "title": "service mount",
402
- "description": "File paths that get mounted into the container <localPath>:<containerPath>\nhttps://no0dles.gitbook.io/hammerkit/service/container#mounts",
403
- "type": "array",
404
- "uniqueItems": true,
405
- "items": {
406
- "type": "string",
407
- "description": "<localPath>:<containerPath>",
408
- "pattern": "\\d+:\\d+"
409
- }
559
+ "labels": {
560
+ "$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/labels"
410
561
  }
411
- }
412
- }
413
- },
414
- "description": "Build tool with support for containerization\nhttps://no0dles.gitbook.io/hammerkit/build-file",
415
- "properties": {
416
- "envs": {
417
- "$ref": "#/definitions/buildFileEnvs"
418
- },
419
- "tasks": {
420
- "$ref": "#/definitions/buildFileTasks"
421
- },
422
- "services": {
423
- "$ref": "#/definitions/buildFileServices"
424
- },
425
- "includes": {
426
- "$ref": "#/definitions/buildFileIncludes"
427
- },
428
- "references": {
429
- "$ref": "#/definitions/buildFileReferences"
562
+ },
563
+ "additionalProperties": false,
564
+ "description": "Build file with support for containerization\nhttps://no0dles.gitbook.io/hammerkit/build-file"
430
565
  }
431
566
  },
432
- "title": "JSON Schema for hammerkit's build file",
433
- "type": "object"
434
- }
567
+ "$schema": "http://json-schema.org/draft-07/schema#"
568
+ }