@mannyc1/ts-release 0.0.6 → 0.2.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 (639) hide show
  1. package/ARCHITECTURE.md +124 -87
  2. package/CHANGELOG.md +115 -0
  3. package/LICENSE +21 -0
  4. package/README.md +272 -540
  5. package/SPEC.md +206 -305
  6. package/apps/release-ts/README.md +32 -0
  7. package/apps/release-ts/src/cli/command.ts +164 -0
  8. package/apps/release-ts/src/cli/commands.ts +351 -0
  9. package/apps/release-ts/src/cli/main.ts +43 -0
  10. package/apps/release-ts/src/cli/node-main.ts +49 -0
  11. package/apps/ts-release-agents/LICENSE +21 -0
  12. package/apps/ts-release-agents/README.md +21 -0
  13. package/apps/ts-release-agents/evals/cases.json +11 -0
  14. package/apps/ts-release-agents/manifests/claude.json +5 -0
  15. package/apps/ts-release-agents/manifests/codex.json +5 -0
  16. package/apps/ts-release-agents/package.json +11 -0
  17. package/apps/ts-release-agents/skills/release/SKILL.md +48 -0
  18. package/apps/ts-release-agents/skills/release/references/configuration.md +18 -0
  19. package/apps/ts-release-agents/skills/release/references/recovery.md +10 -0
  20. package/apps/ts-release-agents/skills/release/references/staged-workflow.md +12 -0
  21. package/apps/ts-release-agents/skills/release/references/target-selection.md +13 -0
  22. package/apps/ts-release-agents/skills/release/references/verification.md +14 -0
  23. package/apps/ts-release-agents/src/build.ts +105 -0
  24. package/apps/ts-release-agents/src/check.ts +117 -0
  25. package/apps/ts-release-agents/src/install.ts +121 -0
  26. package/apps/ts-release-agents/test/contract.test.ts +56 -0
  27. package/apps/ts-release-agents/tsconfig.json +5 -0
  28. package/dist/api/api.d.ts +15 -0
  29. package/dist/api/api.d.ts.map +1 -0
  30. package/dist/api/api.js +244 -0
  31. package/dist/api/api.js.map +1 -0
  32. package/dist/api/errors.d.ts +39 -0
  33. package/dist/api/errors.d.ts.map +1 -0
  34. package/dist/api/errors.js +32 -0
  35. package/dist/api/errors.js.map +1 -0
  36. package/dist/api/input.d.ts +10 -0
  37. package/dist/api/input.d.ts.map +1 -0
  38. package/dist/api/input.js +73 -0
  39. package/dist/api/input.js.map +1 -0
  40. package/dist/api/runtime.d.ts +18 -0
  41. package/dist/api/runtime.d.ts.map +1 -0
  42. package/dist/api/runtime.js +7 -0
  43. package/dist/api/runtime.js.map +1 -0
  44. package/dist/api/types.d.ts +76 -0
  45. package/dist/api/types.d.ts.map +1 -0
  46. package/dist/api/types.js +17 -0
  47. package/dist/api/types.js.map +1 -0
  48. package/dist/bin/ts-release.js +39239 -0
  49. package/dist/capabilities/bun-targets.d.ts +3 -0
  50. package/dist/capabilities/bun-targets.d.ts.map +1 -0
  51. package/dist/capabilities/bun-targets.js +3 -0
  52. package/dist/capabilities/bun-targets.js.map +1 -0
  53. package/dist/capabilities/field-ownership.d.ts +17 -0
  54. package/dist/capabilities/field-ownership.d.ts.map +1 -0
  55. package/dist/capabilities/field-ownership.js +40 -0
  56. package/dist/capabilities/field-ownership.js.map +1 -0
  57. package/dist/capabilities/module.d.ts +91 -0
  58. package/dist/capabilities/module.d.ts.map +1 -0
  59. package/dist/capabilities/module.js +2 -0
  60. package/dist/capabilities/module.js.map +1 -0
  61. package/dist/capabilities/registry.d.ts +829 -0
  62. package/dist/capabilities/registry.d.ts.map +1 -0
  63. package/dist/capabilities/registry.js +291 -0
  64. package/dist/capabilities/registry.js.map +1 -0
  65. package/dist/config/config.d.ts +6 -0
  66. package/dist/config/config.d.ts.map +1 -0
  67. package/dist/config/config.js +42 -0
  68. package/dist/config/config.js.map +1 -0
  69. package/dist/correction/coordinator.d.ts +248 -0
  70. package/dist/correction/coordinator.d.ts.map +1 -0
  71. package/dist/correction/coordinator.js +274 -0
  72. package/dist/correction/coordinator.js.map +1 -0
  73. package/dist/correction/index.d.ts +3 -0
  74. package/dist/correction/index.d.ts.map +1 -0
  75. package/dist/correction/index.js +3 -0
  76. package/dist/correction/index.js.map +1 -0
  77. package/dist/correction/intent.d.ts +111 -0
  78. package/dist/correction/intent.d.ts.map +1 -0
  79. package/dist/correction/intent.js +146 -0
  80. package/dist/correction/intent.js.map +1 -0
  81. package/dist/drivers/archive.d.ts +8 -0
  82. package/dist/drivers/archive.d.ts.map +1 -0
  83. package/dist/drivers/archive.js +101 -0
  84. package/dist/drivers/archive.js.map +1 -0
  85. package/dist/drivers/contain.d.ts +6 -0
  86. package/dist/drivers/contain.d.ts.map +1 -0
  87. package/dist/drivers/contain.js +17 -0
  88. package/dist/drivers/contain.js.map +1 -0
  89. package/dist/drivers/environment.d.ts +4 -0
  90. package/dist/drivers/environment.d.ts.map +1 -0
  91. package/dist/drivers/environment.js +18 -0
  92. package/dist/drivers/environment.js.map +1 -0
  93. package/dist/drivers/errors.d.ts +9 -0
  94. package/dist/drivers/errors.d.ts.map +1 -0
  95. package/dist/drivers/errors.js +6 -0
  96. package/dist/drivers/errors.js.map +1 -0
  97. package/dist/drivers/glob.d.ts +2 -0
  98. package/dist/drivers/glob.d.ts.map +1 -0
  99. package/dist/drivers/glob.js +162 -0
  100. package/dist/drivers/glob.js.map +1 -0
  101. package/dist/drivers/process.d.ts +48 -0
  102. package/dist/drivers/process.d.ts.map +1 -0
  103. package/dist/drivers/process.js +257 -0
  104. package/dist/drivers/process.js.map +1 -0
  105. package/dist/drivers/redact.d.ts +4 -0
  106. package/dist/drivers/redact.d.ts.map +1 -0
  107. package/dist/drivers/redact.js +24 -0
  108. package/dist/drivers/redact.js.map +1 -0
  109. package/dist/drivers/seccomp-helper-source.d.ts +7 -0
  110. package/dist/drivers/seccomp-helper-source.d.ts.map +1 -0
  111. package/dist/drivers/seccomp-helper-source.js +121 -0
  112. package/dist/drivers/seccomp-helper-source.js.map +1 -0
  113. package/dist/drivers/utils.d.ts +4 -0
  114. package/dist/drivers/utils.d.ts.map +1 -0
  115. package/dist/drivers/utils.js +5 -0
  116. package/dist/drivers/utils.js.map +1 -0
  117. package/dist/drivers/workspace.d.ts +6 -0
  118. package/dist/drivers/workspace.d.ts.map +1 -0
  119. package/dist/drivers/workspace.js +49 -0
  120. package/dist/drivers/workspace.js.map +1 -0
  121. package/dist/extensions/provider-adapter.d.ts +48 -0
  122. package/dist/extensions/provider-adapter.d.ts.map +1 -0
  123. package/dist/extensions/provider-adapter.js +64 -0
  124. package/dist/extensions/provider-adapter.js.map +1 -0
  125. package/dist/host.d.ts +33 -0
  126. package/dist/host.d.ts.map +1 -0
  127. package/dist/host.js +20 -0
  128. package/dist/host.js.map +1 -0
  129. package/dist/index.d.ts +19 -1
  130. package/dist/index.d.ts.map +1 -1
  131. package/dist/index.js +12 -1
  132. package/dist/index.js.map +1 -1
  133. package/dist/model/artifact-collection.d.ts +84 -0
  134. package/dist/model/artifact-collection.d.ts.map +1 -0
  135. package/dist/model/artifact-collection.js +185 -0
  136. package/dist/model/artifact-collection.js.map +1 -0
  137. package/dist/model/authority.d.ts +89 -0
  138. package/dist/model/authority.d.ts.map +1 -0
  139. package/dist/model/authority.js +80 -0
  140. package/dist/model/authority.js.map +1 -0
  141. package/dist/model/bun-targets.d.ts +34 -0
  142. package/dist/model/bun-targets.d.ts.map +1 -0
  143. package/dist/model/bun-targets.js +17 -0
  144. package/dist/model/bun-targets.js.map +1 -0
  145. package/dist/model/canonical.d.ts +8 -0
  146. package/dist/model/canonical.d.ts.map +1 -0
  147. package/dist/model/canonical.js +205 -0
  148. package/dist/model/canonical.js.map +1 -0
  149. package/dist/model/catalog.d.ts +76 -0
  150. package/dist/model/catalog.d.ts.map +1 -0
  151. package/dist/model/catalog.js +174 -0
  152. package/dist/model/catalog.js.map +1 -0
  153. package/dist/model/digest.d.ts +53 -0
  154. package/dist/model/digest.d.ts.map +1 -0
  155. package/dist/model/digest.js +127 -0
  156. package/dist/model/digest.js.map +1 -0
  157. package/dist/model/errors.d.ts +14 -0
  158. package/dist/model/errors.d.ts.map +1 -0
  159. package/dist/model/errors.js +8 -0
  160. package/dist/model/errors.js.map +1 -0
  161. package/dist/model/primitives.d.ts +19 -0
  162. package/dist/model/primitives.d.ts.map +1 -0
  163. package/dist/model/primitives.js +18 -0
  164. package/dist/model/primitives.js.map +1 -0
  165. package/dist/model/pypi.d.ts +12 -0
  166. package/dist/model/pypi.d.ts.map +1 -0
  167. package/dist/model/pypi.js +20 -0
  168. package/dist/model/pypi.js.map +1 -0
  169. package/dist/model/python-distribution.d.ts +33 -0
  170. package/dist/model/python-distribution.d.ts.map +1 -0
  171. package/dist/model/python-distribution.js +367 -0
  172. package/dist/model/python-distribution.js.map +1 -0
  173. package/dist/model/secret-patterns.d.ts +2 -0
  174. package/dist/model/secret-patterns.d.ts.map +1 -0
  175. package/dist/model/secret-patterns.js +12 -0
  176. package/dist/model/secret-patterns.js.map +1 -0
  177. package/dist/platform/bun.d.ts +7 -0
  178. package/dist/platform/bun.d.ts.map +1 -0
  179. package/dist/platform/bun.js +15 -0
  180. package/dist/platform/bun.js.map +1 -0
  181. package/dist/platform/credentials.d.ts +32 -0
  182. package/dist/platform/credentials.d.ts.map +1 -0
  183. package/dist/platform/credentials.js +772 -0
  184. package/dist/platform/credentials.js.map +1 -0
  185. package/dist/platform/host-support.d.ts +2 -0
  186. package/dist/platform/host-support.d.ts.map +1 -0
  187. package/dist/platform/host-support.js +4 -0
  188. package/dist/platform/host-support.js.map +1 -0
  189. package/dist/platform/node.d.ts +7 -0
  190. package/dist/platform/node.d.ts.map +1 -0
  191. package/dist/platform/node.js +15 -0
  192. package/dist/platform/node.js.map +1 -0
  193. package/dist/platform/release-runtime.d.ts +11 -0
  194. package/dist/platform/release-runtime.d.ts.map +1 -0
  195. package/dist/platform/release-runtime.js +34 -0
  196. package/dist/platform/release-runtime.js.map +1 -0
  197. package/dist/platform/services.d.ts +15 -0
  198. package/dist/platform/services.d.ts.map +1 -0
  199. package/dist/platform/services.js +30 -0
  200. package/dist/platform/services.js.map +1 -0
  201. package/dist/platform/source-observer.d.ts +5 -0
  202. package/dist/platform/source-observer.d.ts.map +1 -0
  203. package/dist/platform/source-observer.js +159 -0
  204. package/dist/platform/source-observer.js.map +1 -0
  205. package/dist/provider-sdk.d.ts +14 -0
  206. package/dist/provider-sdk.d.ts.map +1 -0
  207. package/dist/provider-sdk.js +10 -0
  208. package/dist/provider-sdk.js.map +1 -0
  209. package/dist/publication/adapter.d.ts +212 -0
  210. package/dist/publication/adapter.d.ts.map +1 -0
  211. package/dist/publication/adapter.js +83 -0
  212. package/dist/publication/adapter.js.map +1 -0
  213. package/dist/publication/authority.d.ts +137 -0
  214. package/dist/publication/authority.d.ts.map +1 -0
  215. package/dist/publication/authority.js +233 -0
  216. package/dist/publication/authority.js.map +1 -0
  217. package/dist/publication/catalog-git.d.ts +37 -0
  218. package/dist/publication/catalog-git.d.ts.map +1 -0
  219. package/dist/publication/catalog-git.js +451 -0
  220. package/dist/publication/catalog-git.js.map +1 -0
  221. package/dist/publication/claim.d.ts +39 -0
  222. package/dist/publication/claim.d.ts.map +1 -0
  223. package/dist/publication/claim.js +31 -0
  224. package/dist/publication/claim.js.map +1 -0
  225. package/dist/publication/coordinator.d.ts +246 -0
  226. package/dist/publication/coordinator.d.ts.map +1 -0
  227. package/dist/publication/coordinator.js +370 -0
  228. package/dist/publication/coordinator.js.map +1 -0
  229. package/dist/publication/github.d.ts +36 -0
  230. package/dist/publication/github.d.ts.map +1 -0
  231. package/dist/publication/github.js +644 -0
  232. package/dist/publication/github.js.map +1 -0
  233. package/dist/publication/http.d.ts +69 -0
  234. package/dist/publication/http.d.ts.map +1 -0
  235. package/dist/publication/http.js +29 -0
  236. package/dist/publication/http.js.map +1 -0
  237. package/dist/publication/index.d.ts +5 -0
  238. package/dist/publication/index.d.ts.map +1 -0
  239. package/dist/publication/index.js +5 -0
  240. package/dist/publication/index.js.map +1 -0
  241. package/dist/publication/npm.d.ts +40 -0
  242. package/dist/publication/npm.d.ts.map +1 -0
  243. package/dist/publication/npm.js +359 -0
  244. package/dist/publication/npm.js.map +1 -0
  245. package/dist/publication/profiles.d.ts +136 -0
  246. package/dist/publication/profiles.d.ts.map +1 -0
  247. package/dist/publication/profiles.js +90 -0
  248. package/dist/publication/profiles.js.map +1 -0
  249. package/dist/publication/publisher.d.ts +82 -0
  250. package/dist/publication/publisher.d.ts.map +1 -0
  251. package/dist/publication/publisher.js +53 -0
  252. package/dist/publication/publisher.js.map +1 -0
  253. package/dist/publication/pypi.d.ts +45 -0
  254. package/dist/publication/pypi.d.ts.map +1 -0
  255. package/dist/publication/pypi.js +369 -0
  256. package/dist/publication/pypi.js.map +1 -0
  257. package/dist/publication/recovery.d.ts +663 -0
  258. package/dist/publication/recovery.d.ts.map +1 -0
  259. package/dist/publication/recovery.js +252 -0
  260. package/dist/publication/recovery.js.map +1 -0
  261. package/dist/publication/report.d.ts +1061 -0
  262. package/dist/publication/report.d.ts.map +1 -0
  263. package/dist/publication/report.js +441 -0
  264. package/dist/publication/report.js.map +1 -0
  265. package/dist/recipes/config.d.ts +296 -0
  266. package/dist/recipes/config.d.ts.map +1 -0
  267. package/dist/recipes/config.js +325 -0
  268. package/dist/recipes/config.js.map +1 -0
  269. package/dist/release/capabilities.d.ts +12 -0
  270. package/dist/release/capabilities.d.ts.map +1 -0
  271. package/dist/release/capabilities.js +395 -0
  272. package/dist/release/capabilities.js.map +1 -0
  273. package/dist/release/compiler.d.ts +5 -0
  274. package/dist/release/compiler.d.ts.map +1 -0
  275. package/dist/release/compiler.js +19 -0
  276. package/dist/release/compiler.js.map +1 -0
  277. package/dist/release/config.d.ts +5 -0
  278. package/dist/release/config.d.ts.map +1 -0
  279. package/dist/release/config.js +10 -0
  280. package/dist/release/config.js.map +1 -0
  281. package/dist/release/context.d.ts +96 -0
  282. package/dist/release/context.d.ts.map +1 -0
  283. package/dist/release/context.js +168 -0
  284. package/dist/release/context.js.map +1 -0
  285. package/dist/release/graph.d.ts +271 -0
  286. package/dist/release/graph.d.ts.map +1 -0
  287. package/dist/release/graph.js +766 -0
  288. package/dist/release/graph.js.map +1 -0
  289. package/dist/release/inspect.d.ts +88 -0
  290. package/dist/release/inspect.d.ts.map +1 -0
  291. package/dist/release/inspect.js +75 -0
  292. package/dist/release/inspect.js.map +1 -0
  293. package/dist/release/prepare.d.ts +24 -0
  294. package/dist/release/prepare.d.ts.map +1 -0
  295. package/dist/release/prepare.js +1116 -0
  296. package/dist/release/prepare.js.map +1 -0
  297. package/dist/release/prepared-ref.d.ts +60 -0
  298. package/dist/release/prepared-ref.d.ts.map +1 -0
  299. package/dist/release/prepared-ref.js +131 -0
  300. package/dist/release/prepared-ref.js.map +1 -0
  301. package/dist/release/prepared-store.d.ts +90 -0
  302. package/dist/release/prepared-store.d.ts.map +1 -0
  303. package/dist/release/prepared-store.js +337 -0
  304. package/dist/release/prepared-store.js.map +1 -0
  305. package/dist/release/prepared.d.ts +172 -0
  306. package/dist/release/prepared.d.ts.map +1 -0
  307. package/dist/release/prepared.js +268 -0
  308. package/dist/release/prepared.js.map +1 -0
  309. package/dist/release/staging.d.ts +31 -0
  310. package/dist/release/staging.d.ts.map +1 -0
  311. package/dist/release/staging.js +218 -0
  312. package/dist/release/staging.js.map +1 -0
  313. package/dist/resolve/authored.d.ts +53 -0
  314. package/dist/resolve/authored.d.ts.map +1 -0
  315. package/dist/resolve/authored.js +55 -0
  316. package/dist/resolve/authored.js.map +1 -0
  317. package/dist/resolve/encode.d.ts +3 -0
  318. package/dist/resolve/encode.d.ts.map +1 -0
  319. package/dist/resolve/encode.js +21 -0
  320. package/dist/resolve/encode.js.map +1 -0
  321. package/dist/resolve/errors.d.ts +7 -0
  322. package/dist/resolve/errors.d.ts.map +1 -0
  323. package/dist/resolve/errors.js +17 -0
  324. package/dist/resolve/errors.js.map +1 -0
  325. package/dist/resolve/facts.d.ts +12 -0
  326. package/dist/resolve/facts.d.ts.map +1 -0
  327. package/dist/resolve/facts.js +18 -0
  328. package/dist/resolve/facts.js.map +1 -0
  329. package/dist/resolve/resolve.d.ts +10 -0
  330. package/dist/resolve/resolve.d.ts.map +1 -0
  331. package/dist/resolve/resolve.js +242 -0
  332. package/dist/resolve/resolve.js.map +1 -0
  333. package/dist/store.d.ts +11 -0
  334. package/dist/store.d.ts.map +1 -0
  335. package/dist/store.js +9 -0
  336. package/dist/store.js.map +1 -0
  337. package/examples/README.md +20 -30
  338. package/examples/github-release/release.config.json +11 -18
  339. package/examples/homebrew-tap/README.md +11 -0
  340. package/examples/homebrew-tap/release.config.json +40 -28
  341. package/examples/multi-target/release.config.json +28 -53
  342. package/examples/npm-first-publish/release.config.json +23 -25
  343. package/examples/npm-only/release.config.json +22 -30
  344. package/examples/portable-cli/README.md +17 -0
  345. package/examples/portable-cli/artifacts/portable-example-0.1.0-darwin-arm64 +1 -0
  346. package/examples/portable-cli/artifacts/portable-example-0.1.0-darwin-x64 +1 -0
  347. package/examples/portable-cli/artifacts/portable-example-0.1.0-linux-arm64 +1 -0
  348. package/examples/portable-cli/artifacts/portable-example-0.1.0-linux-x64 +1 -0
  349. package/examples/portable-cli/artifacts/portable-example-0.1.0-windows-x64.exe +1 -0
  350. package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-macosx_10_15_x86_64.whl +1 -0
  351. package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-macosx_11_0_arm64.whl +1 -0
  352. package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-manylinux2014_aarch64.whl +1 -0
  353. package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-manylinux2014_x86_64.whl +1 -0
  354. package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-win_amd64.whl +1 -0
  355. package/examples/portable-cli/package.json +9 -0
  356. package/examples/portable-cli/release.config.json +53 -0
  357. package/examples/portable-cli/src/cli.ts +3 -0
  358. package/examples/pypi-registry/README.md +8 -0
  359. package/examples/scoop-bucket/README.md +10 -0
  360. package/examples/scoop-bucket/release.config.json +40 -30
  361. package/package.json +61 -154
  362. package/src/api/api.ts +365 -0
  363. package/src/api/errors.ts +36 -0
  364. package/src/api/input.ts +92 -0
  365. package/src/api/runtime.ts +14 -0
  366. package/src/api/types.ts +103 -0
  367. package/src/capabilities/bun-targets.ts +2 -0
  368. package/src/capabilities/field-ownership.ts +60 -0
  369. package/src/capabilities/module.ts +158 -0
  370. package/src/capabilities/registry.ts +333 -0
  371. package/src/config/config.ts +48 -0
  372. package/src/correction/coordinator.ts +336 -0
  373. package/src/correction/index.ts +2 -0
  374. package/src/correction/intent.ts +172 -0
  375. package/src/drivers/archive.ts +102 -0
  376. package/src/drivers/contain.ts +20 -0
  377. package/src/drivers/environment.ts +28 -0
  378. package/src/drivers/errors.ts +6 -0
  379. package/src/drivers/glob.ts +137 -0
  380. package/src/drivers/process.ts +340 -0
  381. package/src/drivers/redact.ts +31 -0
  382. package/src/drivers/seccomp-helper-source.ts +121 -0
  383. package/src/drivers/utils.ts +10 -0
  384. package/src/drivers/workspace.ts +40 -0
  385. package/src/extensions/provider-adapter.ts +99 -0
  386. package/src/host.ts +140 -0
  387. package/src/index.ts +64 -0
  388. package/src/model/artifact-collection.ts +237 -0
  389. package/src/model/authority.ts +116 -0
  390. package/src/model/bun-targets.ts +34 -0
  391. package/src/model/canonical.ts +205 -0
  392. package/src/model/catalog.ts +220 -0
  393. package/src/model/digest.ts +172 -0
  394. package/src/model/errors.ts +6 -0
  395. package/src/model/primitives.ts +37 -0
  396. package/src/model/pypi.ts +30 -0
  397. package/src/model/python-distribution.ts +360 -0
  398. package/src/model/secret-patterns.ts +11 -0
  399. package/src/platform/bun.ts +38 -0
  400. package/src/platform/credentials.ts +1083 -0
  401. package/src/platform/host-support.ts +4 -0
  402. package/src/platform/node.ts +38 -0
  403. package/src/platform/release-runtime.ts +47 -0
  404. package/src/platform/services.ts +57 -0
  405. package/src/platform/source-observer.ts +193 -0
  406. package/src/provider-sdk.ts +48 -0
  407. package/src/publication/adapter.ts +132 -0
  408. package/src/publication/authority.ts +397 -0
  409. package/src/publication/catalog-git.ts +603 -0
  410. package/src/publication/claim.ts +51 -0
  411. package/src/publication/coordinator.ts +578 -0
  412. package/src/publication/github.ts +954 -0
  413. package/src/publication/http.ts +101 -0
  414. package/src/publication/index.ts +4 -0
  415. package/src/publication/npm.ts +525 -0
  416. package/src/publication/profiles.ts +94 -0
  417. package/src/publication/publisher.ts +130 -0
  418. package/src/publication/pypi.ts +463 -0
  419. package/src/publication/recovery.ts +349 -0
  420. package/src/publication/report.ts +628 -0
  421. package/src/recipes/config.ts +395 -0
  422. package/src/release/capabilities.ts +459 -0
  423. package/src/release/compiler.ts +28 -0
  424. package/src/release/config.ts +12 -0
  425. package/src/release/context.ts +223 -0
  426. package/src/release/graph.ts +866 -0
  427. package/src/release/inspect.ts +83 -0
  428. package/src/release/prepare.ts +1331 -0
  429. package/src/release/prepared-ref.ts +193 -0
  430. package/src/release/prepared-store.ts +377 -0
  431. package/src/release/prepared.ts +299 -0
  432. package/src/release/staging.ts +257 -0
  433. package/src/resolve/authored.ts +64 -0
  434. package/src/resolve/encode.ts +22 -0
  435. package/src/resolve/errors.ts +15 -0
  436. package/src/resolve/facts.ts +18 -0
  437. package/src/resolve/resolve.ts +328 -0
  438. package/src/store.ts +28 -0
  439. package/templates/README.md +55 -59
  440. package/templates/bun-cli-github/README.md +12 -0
  441. package/templates/bun-cli-github/release.config.json +51 -0
  442. package/templates/github-actions/release.yml +57 -0
  443. package/templates/github-actions/reviewed-release.yml +80 -0
  444. package/templates/multi-target-homebrew/README.md +10 -0
  445. package/templates/multi-target-homebrew/release.config.json +43 -60
  446. package/templates/multi-target-scoop/README.md +10 -0
  447. package/templates/multi-target-scoop/release.config.json +43 -62
  448. package/templates/npm-github/release.config.json +25 -38
  449. package/templates/npm-github/reviewed-release.config.json +37 -0
  450. package/templates/npm-only/README.md +10 -0
  451. package/templates/npm-only/release.config.json +15 -30
  452. package/templates/portable-cli/README.md +13 -0
  453. package/templates/portable-cli/release.config.json +53 -0
  454. package/dist/config/errors.d.ts +0 -24
  455. package/dist/config/errors.d.ts.map +0 -1
  456. package/dist/config/errors.js +0 -19
  457. package/dist/config/errors.js.map +0 -1
  458. package/dist/config/load.d.ts +0 -9
  459. package/dist/config/load.d.ts.map +0 -1
  460. package/dist/config/load.js +0 -29
  461. package/dist/config/load.js.map +0 -1
  462. package/dist/config/schema.d.ts +0 -12
  463. package/dist/config/schema.d.ts.map +0 -1
  464. package/dist/config/schema.js +0 -19
  465. package/dist/config/schema.js.map +0 -1
  466. package/dist/domain/artifact.d.ts +0 -36
  467. package/dist/domain/artifact.d.ts.map +0 -1
  468. package/dist/domain/artifact.js +0 -29
  469. package/dist/domain/artifact.js.map +0 -1
  470. package/dist/domain/evidence.d.ts +0 -108
  471. package/dist/domain/evidence.d.ts.map +0 -1
  472. package/dist/domain/evidence.js +0 -96
  473. package/dist/domain/evidence.js.map +0 -1
  474. package/dist/domain/operation.d.ts +0 -153
  475. package/dist/domain/operation.d.ts.map +0 -1
  476. package/dist/domain/operation.js +0 -320
  477. package/dist/domain/operation.js.map +0 -1
  478. package/dist/domain/release.d.ts +0 -141
  479. package/dist/domain/release.d.ts.map +0 -1
  480. package/dist/domain/release.js +0 -127
  481. package/dist/domain/release.js.map +0 -1
  482. package/dist/domain/remote-state.d.ts +0 -85
  483. package/dist/domain/remote-state.d.ts.map +0 -1
  484. package/dist/domain/remote-state.js +0 -77
  485. package/dist/domain/remote-state.js.map +0 -1
  486. package/dist/domain/status.d.ts +0 -43
  487. package/dist/domain/status.d.ts.map +0 -1
  488. package/dist/domain/status.js +0 -51
  489. package/dist/domain/status.js.map +0 -1
  490. package/dist/domain/target.d.ts +0 -135
  491. package/dist/domain/target.d.ts.map +0 -1
  492. package/dist/domain/target.js +0 -137
  493. package/dist/domain/target.js.map +0 -1
  494. package/dist/host/host.d.ts +0 -32
  495. package/dist/host/host.d.ts.map +0 -1
  496. package/dist/host/host.js +0 -24
  497. package/dist/host/host.js.map +0 -1
  498. package/dist/host/http-live.d.ts +0 -6
  499. package/dist/host/http-live.d.ts.map +0 -1
  500. package/dist/host/http-live.js +0 -86
  501. package/dist/host/http-live.js.map +0 -1
  502. package/dist/host/http.d.ts +0 -43
  503. package/dist/host/http.d.ts.map +0 -1
  504. package/dist/host/http.js +0 -59
  505. package/dist/host/http.js.map +0 -1
  506. package/dist/host/platform.d.ts +0 -10
  507. package/dist/host/platform.d.ts.map +0 -1
  508. package/dist/host/platform.js +0 -114
  509. package/dist/host/platform.js.map +0 -1
  510. package/dist/host/test.d.ts +0 -23
  511. package/dist/host/test.d.ts.map +0 -1
  512. package/dist/host/test.js +0 -222
  513. package/dist/host/test.js.map +0 -1
  514. package/dist/internal/workflow-phases.d.ts +0 -3
  515. package/dist/internal/workflow-phases.d.ts.map +0 -1
  516. package/dist/internal/workflow-phases.js +0 -2
  517. package/dist/internal/workflow-phases.js.map +0 -1
  518. package/dist/internal/workspace-path.d.ts +0 -15
  519. package/dist/internal/workspace-path.d.ts.map +0 -1
  520. package/dist/internal/workspace-path.js +0 -36
  521. package/dist/internal/workspace-path.js.map +0 -1
  522. package/dist/planner/artifact-inventory.d.ts +0 -9
  523. package/dist/planner/artifact-inventory.d.ts.map +0 -1
  524. package/dist/planner/artifact-inventory.js +0 -84
  525. package/dist/planner/artifact-inventory.js.map +0 -1
  526. package/dist/planner/create-release-plan.d.ts +0 -5
  527. package/dist/planner/create-release-plan.d.ts.map +0 -1
  528. package/dist/planner/create-release-plan.js +0 -25
  529. package/dist/planner/create-release-plan.js.map +0 -1
  530. package/dist/planner/errors.d.ts +0 -81
  531. package/dist/planner/errors.d.ts.map +0 -1
  532. package/dist/planner/errors.js +0 -70
  533. package/dist/planner/errors.js.map +0 -1
  534. package/dist/planner/evidence-recorder.d.ts +0 -26
  535. package/dist/planner/evidence-recorder.d.ts.map +0 -1
  536. package/dist/planner/evidence-recorder.js +0 -330
  537. package/dist/planner/evidence-recorder.js.map +0 -1
  538. package/dist/planner/executor.d.ts +0 -58
  539. package/dist/planner/executor.d.ts.map +0 -1
  540. package/dist/planner/executor.js +0 -159
  541. package/dist/planner/executor.js.map +0 -1
  542. package/dist/planner/normalize-release.d.ts +0 -16
  543. package/dist/planner/normalize-release.d.ts.map +0 -1
  544. package/dist/planner/normalize-release.js +0 -218
  545. package/dist/planner/normalize-release.js.map +0 -1
  546. package/dist/planner/reconcile.d.ts +0 -17
  547. package/dist/planner/reconcile.d.ts.map +0 -1
  548. package/dist/planner/reconcile.js +0 -261
  549. package/dist/planner/reconcile.js.map +0 -1
  550. package/dist/planner/release-eligibility.d.ts +0 -39
  551. package/dist/planner/release-eligibility.d.ts.map +0 -1
  552. package/dist/planner/release-eligibility.js +0 -578
  553. package/dist/planner/release-eligibility.js.map +0 -1
  554. package/dist/planner/render-plan.d.ts +0 -15
  555. package/dist/planner/render-plan.d.ts.map +0 -1
  556. package/dist/planner/render-plan.js +0 -238
  557. package/dist/planner/render-plan.js.map +0 -1
  558. package/dist/planner/status.d.ts +0 -40
  559. package/dist/planner/status.d.ts.map +0 -1
  560. package/dist/planner/status.js +0 -313
  561. package/dist/planner/status.js.map +0 -1
  562. package/dist/targets/adapter-helpers.d.ts +0 -64
  563. package/dist/targets/adapter-helpers.d.ts.map +0 -1
  564. package/dist/targets/adapter-helpers.js +0 -124
  565. package/dist/targets/adapter-helpers.js.map +0 -1
  566. package/dist/targets/adapter.d.ts +0 -17
  567. package/dist/targets/adapter.d.ts.map +0 -1
  568. package/dist/targets/adapter.js +0 -2
  569. package/dist/targets/adapter.js.map +0 -1
  570. package/dist/targets/github-release.d.ts +0 -25
  571. package/dist/targets/github-release.d.ts.map +0 -1
  572. package/dist/targets/github-release.js +0 -82
  573. package/dist/targets/github-release.js.map +0 -1
  574. package/dist/targets/github.d.ts +0 -11
  575. package/dist/targets/github.d.ts.map +0 -1
  576. package/dist/targets/github.js +0 -125
  577. package/dist/targets/github.js.map +0 -1
  578. package/dist/targets/homebrew.d.ts +0 -11
  579. package/dist/targets/homebrew.d.ts.map +0 -1
  580. package/dist/targets/homebrew.js +0 -97
  581. package/dist/targets/homebrew.js.map +0 -1
  582. package/dist/targets/live.d.ts +0 -5
  583. package/dist/targets/live.d.ts.map +0 -1
  584. package/dist/targets/live.js +0 -50
  585. package/dist/targets/live.js.map +0 -1
  586. package/dist/targets/npm.d.ts +0 -10
  587. package/dist/targets/npm.d.ts.map +0 -1
  588. package/dist/targets/npm.js +0 -118
  589. package/dist/targets/npm.js.map +0 -1
  590. package/dist/targets/pypi.d.ts +0 -11
  591. package/dist/targets/pypi.d.ts.map +0 -1
  592. package/dist/targets/pypi.js +0 -103
  593. package/dist/targets/pypi.js.map +0 -1
  594. package/dist/targets/registry.d.ts +0 -25
  595. package/dist/targets/registry.d.ts.map +0 -1
  596. package/dist/targets/registry.js +0 -34
  597. package/dist/targets/registry.js.map +0 -1
  598. package/dist/targets/scoop.d.ts +0 -11
  599. package/dist/targets/scoop.d.ts.map +0 -1
  600. package/dist/targets/scoop.js +0 -78
  601. package/dist/targets/scoop.js.map +0 -1
  602. package/dist/types/effect-internal.d.ts +0 -5
  603. package/dist/types/effect-internal.d.ts.map +0 -1
  604. package/dist/types/effect-internal.js +0 -2
  605. package/dist/types/effect-internal.js.map +0 -1
  606. package/dist/workflows/config.d.ts +0 -252
  607. package/dist/workflows/config.d.ts.map +0 -1
  608. package/dist/workflows/config.js +0 -465
  609. package/dist/workflows/config.js.map +0 -1
  610. package/dist/workflows/diagnostics.d.ts +0 -62
  611. package/dist/workflows/diagnostics.d.ts.map +0 -1
  612. package/dist/workflows/diagnostics.js +0 -527
  613. package/dist/workflows/diagnostics.js.map +0 -1
  614. package/dist/workflows/evidence.d.ts +0 -26
  615. package/dist/workflows/evidence.d.ts.map +0 -1
  616. package/dist/workflows/evidence.js +0 -44
  617. package/dist/workflows/evidence.js.map +0 -1
  618. package/dist/workflows/index.d.ts +0 -7
  619. package/dist/workflows/index.d.ts.map +0 -1
  620. package/dist/workflows/index.js +0 -6
  621. package/dist/workflows/index.js.map +0 -1
  622. package/dist/workflows/init.d.ts +0 -84
  623. package/dist/workflows/init.d.ts.map +0 -1
  624. package/dist/workflows/init.js +0 -441
  625. package/dist/workflows/init.js.map +0 -1
  626. package/dist/workflows/live.d.ts +0 -9
  627. package/dist/workflows/live.d.ts.map +0 -1
  628. package/dist/workflows/live.js +0 -7
  629. package/dist/workflows/live.js.map +0 -1
  630. package/dist/workflows/options.d.ts +0 -30
  631. package/dist/workflows/options.d.ts.map +0 -1
  632. package/dist/workflows/options.js +0 -16
  633. package/dist/workflows/options.js.map +0 -1
  634. package/examples/non-strict-skips/artifacts/release-example-skips-0.1.0.tgz +0 -1
  635. package/examples/non-strict-skips/release.config.json +0 -31
  636. package/examples/pypi-registry/release.config.json +0 -31
  637. package/templates/github-actions/plan-and-approved-execute.yml +0 -58
  638. package/templates/github-actions/plan-only.yml +0 -33
  639. package/templates/github-actions/trusted-publishing.yml +0 -61
@@ -1,64 +0,0 @@
1
- import * as Effect from "effect/Effect";
2
- import { ArtifactInventoryItem, Checksum } from "../domain/artifact.js";
3
- import { CommandSpec, PublishCommandOperation, ValidateCommandOperation, ValidationNoteOperation } from "../domain/operation.js";
4
- import { ReleaseModel } from "../domain/release.js";
5
- import { TargetAuthSetup, TargetCapabilities, TargetConfig, TargetDryRunSupport, TargetMutability, TargetValidationStrategy } from "../domain/target.js";
6
- import { PlanConstructionError } from "../planner/errors.js";
7
- export type * from "../types/effect-internal.js";
8
- interface DryRunValidationNoteOptions {
9
- readonly id: string;
10
- readonly targetId: string;
11
- readonly dryRunSupport: Exclude<TargetDryRunSupport, "native">;
12
- readonly simulatedDescription: string;
13
- readonly skippedDescription: string;
14
- readonly simulatedMessage: string;
15
- readonly skippedMessage: string;
16
- }
17
- interface ReadOnlyCommandValidationOptions {
18
- readonly id: string;
19
- readonly targetId: string;
20
- readonly description: string;
21
- readonly gateReason: string;
22
- readonly command: CommandSpec;
23
- }
24
- interface DryRunValidationOperationOptions extends Omit<DryRunValidationNoteOptions, "dryRunSupport"> {
25
- readonly dryRunSupport: TargetDryRunSupport;
26
- readonly nativeDescription: string;
27
- readonly nativeGateReason: string;
28
- readonly command: CommandSpec;
29
- }
30
- interface ArtifactErrorReasons {
31
- readonly targetId: string;
32
- readonly directoryReason: string;
33
- readonly checksumReason: string;
34
- }
35
- interface UnsupportedCatalogTokenEnvOptions {
36
- readonly targetId: string;
37
- readonly targetLabel: string;
38
- readonly tokenEnv: string | undefined;
39
- }
40
- interface CatalogGitPushOperationOptions {
41
- readonly id: string;
42
- readonly targetId: string;
43
- readonly description: string;
44
- readonly mutability: TargetMutability;
45
- readonly directory: string | undefined;
46
- readonly irreversibleReason: string;
47
- readonly externallyVisibleReason: string;
48
- }
49
- export declare const noAuthCommand: (executable: string, args: ReadonlyArray<string>) => CommandSpec;
50
- export declare const catalogPathBaseName: (pathName: string) => string;
51
- export declare const rejectUnsupportedCatalogTokenEnv: (options: UnsupportedCatalogTokenEnvOptions) => Effect.Effect<undefined, PlanConstructionError, never>;
52
- export declare const catalogGitPushOperation: (options: CatalogGitPushOperationOptions) => PublishCommandOperation;
53
- export declare const validationStrategyForDryRun: (dryRunSupport: TargetDryRunSupport) => TargetValidationStrategy;
54
- export declare const targetCapabilitiesFor: (target: TargetConfig, validationStrategy: TargetValidationStrategy, authSetup?: TargetAuthSetup | undefined) => TargetCapabilities;
55
- export declare const readOnlyCommandValidationOperation: (options: ReadOnlyCommandValidationOptions) => ValidateCommandOperation;
56
- export declare const validationNoteOperation: (options: DryRunValidationNoteOptions) => ValidationNoteOperation;
57
- export declare const dryRunValidationOperation: (options: DryRunValidationOperationOptions) => ValidateCommandOperation | ValidationNoteOperation;
58
- export declare const rejectNoDryRunInStrictMode: (target: import("../domain/target.js").NpmRegistryTarget | import("../domain/target.js").GitHubReleaseTarget | import("../domain/target.js").HomebrewTapTarget | import("../domain/target.js").PyPiRegistryTarget | import("../domain/target.js").ScoopBucketTarget, model: ReleaseModel, reason: string) => Effect.Effect<undefined, PlanConstructionError, never>;
59
- export declare const findRequiredArtifact: (model: ReleaseModel, targetId: string, artifactId: string, missingReason: string) => Effect.Effect<ArtifactInventoryItem, PlanConstructionError, never>;
60
- export declare const requireSha256FileArtifact: (artifact: ArtifactInventoryItem, reasons: ArtifactErrorReasons) => Effect.Effect<{
61
- artifact: ArtifactInventoryItem;
62
- checksum: Checksum;
63
- }, PlanConstructionError, never>;
64
- //# sourceMappingURL=adapter-helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapter-helpers.d.ts","sourceRoot":"","sources":["../../src/targets/adapter-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AACvE,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EAIxB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EAEzB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAE5D,mBAAmB,6BAA6B,CAAA;AAEhD,UAAU,2BAA2B;IACnC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAA;IAC9D,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAA;IACrC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAA;IACnC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;IACjC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;CAChC;AAED,UAAU,gCAAgC;IACxC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,UA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,GAAI,SAAS,8BAA8B,KAAG,uBAYjF,CAAA;AAED,eAAO,MAAM,2BAA2B,GAAI,eAAe,mBAAmB,KAAG,wBAQhF,CAAA;AAED,eAAO,MAAM,qBAAqB,GAChC,QAAQ,YAAY,EACpB,oBAAoB,wBAAwB,EAC5C,YAAY,eAAe,GAAG,SAAS,KACtC,kBAUC,CAAA;AAEJ,eAAO,MAAM,kCAAkC,GAC7C,SAAS,gCAAgC,KACxC,wBAQC,CAAA;AAEJ,eAAO,MAAM,uBAAuB,GAAI,SAAS,2BAA2B,KAAG,uBAU3E,CAAA;AAEJ,eAAO,MAAM,yBAAyB,GACpC,SAAS,gCAAgC,KACxC,wBAAwB,GAAG,uBAiBxB,CAAA;AAEN,eAAO,MAAM,0BAA0B,qWAarC,CAAA;AAEF,eAAO,MAAM,oBAAoB,0JAgB/B,CAAA;AAEF,eAAO,MAAM,yBAAyB;;;gCAsBpC,CAAA"}
@@ -1,124 +0,0 @@
1
- import * as Effect from "effect/Effect";
2
- import { CommandSpec, PublishCommandOperation, ValidateCommandOperation, ValidationNoteOperation, executeGate, irreversibleGate, noApprovalGate } from "../domain/operation.js";
3
- import { TargetCapabilities, targetAuthRequirement } from "../domain/target.js";
4
- import { PlanConstructionError } from "../planner/errors.js";
5
- export const noAuthCommand = (executable, args) => CommandSpec.make({
6
- executable,
7
- args: [...args],
8
- requiredEnv: [],
9
- redactedEnv: []
10
- });
11
- export const catalogPathBaseName = (pathName) => {
12
- const parts = pathName.replaceAll("\\", "/").split("/");
13
- return parts[parts.length - 1] ?? pathName;
14
- };
15
- export const rejectUnsupportedCatalogTokenEnv = Effect.fn("rejectUnsupportedCatalogTokenEnv")(function* (options) {
16
- if (options.tokenEnv !== undefined) {
17
- return yield* Effect.fail(PlanConstructionError.make({
18
- targetId: options.targetId,
19
- reason: `${options.targetLabel} targets currently publish with plain git push and require Git credentials to be configured outside the release plan; tokenEnv is not supported yet.`
20
- }));
21
- }
22
- });
23
- export const catalogGitPushOperation = (options) => {
24
- const publishRisk = options.mutability === "immutable" ? "irreversible" : "externally-visible";
25
- return PublishCommandOperation.make({
26
- id: options.id,
27
- targetId: options.targetId,
28
- description: options.description,
29
- risk: publishRisk,
30
- gate: publishRisk === "irreversible"
31
- ? irreversibleGate(options.irreversibleReason)
32
- : executeGate(options.externallyVisibleReason),
33
- command: noAuthCommand("git", ["-C", options.directory ?? ".", "push"])
34
- });
35
- };
36
- export const validationStrategyForDryRun = (dryRunSupport) => {
37
- if (dryRunSupport === "native") {
38
- return "native-command";
39
- }
40
- if (dryRunSupport === "simulated") {
41
- return "simulated-plan";
42
- }
43
- return "skipped";
44
- };
45
- export const targetCapabilitiesFor = (target, validationStrategy, authSetup) => TargetCapabilities.make({
46
- targetId: target.id,
47
- targetTag: target._tag,
48
- authRequirement: targetAuthRequirement(target),
49
- dryRunSupport: target.dryRunSupport,
50
- mutability: target.mutability,
51
- recovery: target.recovery,
52
- validationStrategy,
53
- ...(authSetup === undefined ? {} : { authSetup })
54
- });
55
- export const readOnlyCommandValidationOperation = (options) => ValidateCommandOperation.make({
56
- id: options.id,
57
- targetId: options.targetId,
58
- description: options.description,
59
- risk: "read-only",
60
- gate: noApprovalGate(options.gateReason),
61
- command: options.command
62
- });
63
- export const validationNoteOperation = (options) => ValidationNoteOperation.make({
64
- id: options.id,
65
- targetId: options.targetId,
66
- description: options.dryRunSupport === "simulated" ? options.simulatedDescription : options.skippedDescription,
67
- risk: "read-only",
68
- gate: noApprovalGate("Validation notes do not modify local or remote state."),
69
- message: options.dryRunSupport === "simulated" ? options.simulatedMessage : options.skippedMessage,
70
- skipped: options.dryRunSupport === "none",
71
- severity: options.dryRunSupport === "simulated" ? "info" : "warning"
72
- });
73
- export const dryRunValidationOperation = (options) => options.dryRunSupport === "native"
74
- ? readOnlyCommandValidationOperation({
75
- id: options.id,
76
- targetId: options.targetId,
77
- description: options.nativeDescription,
78
- gateReason: options.nativeGateReason,
79
- command: options.command
80
- })
81
- : validationNoteOperation({
82
- id: options.id,
83
- targetId: options.targetId,
84
- dryRunSupport: options.dryRunSupport,
85
- simulatedDescription: options.simulatedDescription,
86
- skippedDescription: options.skippedDescription,
87
- simulatedMessage: options.simulatedMessage,
88
- skippedMessage: options.skippedMessage
89
- });
90
- export const rejectNoDryRunInStrictMode = Effect.fn("rejectNoDryRunInStrictMode")(function* (target, model, reason) {
91
- if (model.strict && target.dryRunSupport === "none") {
92
- return yield* Effect.fail(PlanConstructionError.make({
93
- targetId: target.id,
94
- reason
95
- }));
96
- }
97
- });
98
- export const findRequiredArtifact = Effect.fn("findRequiredArtifact")(function* (model, targetId, artifactId, missingReason) {
99
- const artifact = model.artifacts.find((item) => item.id === artifactId);
100
- if (artifact === undefined) {
101
- return yield* Effect.fail(PlanConstructionError.make({
102
- targetId,
103
- reason: missingReason
104
- }));
105
- }
106
- return artifact;
107
- });
108
- export const requireSha256FileArtifact = Effect.fn("requireSha256FileArtifact")(function* (artifact, reasons) {
109
- if (artifact.format === "directory") {
110
- return yield* Effect.fail(PlanConstructionError.make({
111
- targetId: reasons.targetId,
112
- reason: reasons.directoryReason
113
- }));
114
- }
115
- if (artifact.checksum === undefined || artifact.checksum.algorithm !== "sha256") {
116
- return yield* Effect.fail(PlanConstructionError.make({
117
- targetId: reasons.targetId,
118
- reason: reasons.checksumReason
119
- }));
120
- }
121
- const checksum = artifact.checksum;
122
- return { artifact, checksum };
123
- });
124
- //# sourceMappingURL=adapter-helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapter-helpers.js","sourceRoot":"","sources":["../../src/targets/adapter-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,EACL,WAAW,EACX,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,WAAW,EACX,gBAAgB,EAChB,cAAc,EACf,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EAEL,kBAAkB,EAKlB,qBAAqB,EACtB,MAAM,qBAAqB,CAAA;A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CAAA;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,EAAE,CAAC,2BAA2B,CAAC,CAAC,QAAQ,CAAC,EACvF,QAA+B,EAC/B,OAA6B;IAE7B,IAAI,QAAQ,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;QACpC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CACvB,qBAAqB,CAAC,IAAI,CAAC;YACzB,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,MAAM,EAAE,OAAO,CAAC,eAAe;SAChC,CAAC,CACH,CAAA;IACH,CAAC;IACD,IAAI,QAAQ,CAAC,QAAQ,KAAK,SAAS,IAAI,QAAQ,CAAC,QAAQ,CAAC,SAAS,KAAK,QAAQ,EAAE,CAAC;QAChF,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CACvB,qBAAqB,CAAC,IAAI,CAAC;YACzB,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,MAAM,EAAE,OAAO,CAAC,cAAc;SAC/B,CAAC,CACH,CAAA;IACH,CAAC;IACD,MAAM,QAAQ,GAAa,QAAQ,CAAC,QAAQ,CAAA;IAC5C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAA;AAC/B,CAAC,CAAC,CAAA"}
@@ -1,17 +0,0 @@
1
- import * as Effect from "effect/Effect";
2
- import { Operation } from "../domain/operation.js";
3
- import { ReleaseModel } from "../domain/release.js";
4
- import { GitHubReleaseTarget, HomebrewTapTarget, NpmRegistryTarget, PyPiRegistryTarget, ScoopBucketTarget, TargetCapabilities, TargetConfig } from "../domain/target.js";
5
- import { PlanConstructionError } from "../planner/errors.js";
6
- export type * from "../types/effect-internal.js";
7
- export interface TargetAdapter<Target extends TargetConfig> {
8
- readonly targetTag: Target["_tag"];
9
- readonly capabilities: (target: Target) => TargetCapabilities;
10
- readonly planOperations: (target: Target, model: ReleaseModel) => Effect.Effect<ReadonlyArray<Operation>, PlanConstructionError>;
11
- }
12
- export type NpmTargetAdapter = TargetAdapter<NpmRegistryTarget>;
13
- export type GitHubTargetAdapter = TargetAdapter<GitHubReleaseTarget>;
14
- export type HomebrewTargetAdapter = TargetAdapter<HomebrewTapTarget>;
15
- export type PyPiTargetAdapter = TargetAdapter<PyPiRegistryTarget>;
16
- export type ScoopTargetAdapter = TargetAdapter<ScoopBucketTarget>;
17
- //# sourceMappingURL=adapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/targets/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACb,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAE5D,mBAAmB,6BAA6B,CAAA;AAEhD,MAAM,WAAW,aAAa,CAAC,MAAM,SAAS,YAAY;IACxD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;IAClC,QAAQ,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,kBAAkB,CAAA;IAC7D,QAAQ,CAAC,cAAc,EAAE,CACvB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,YAAY,KAChB,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,EAAE,qBAAqB,CAAC,CAAA;CACpE;AAED,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAA;AAC/D,MAAM,MAAM,mBAAmB,GAAG,aAAa,CAAC,mBAAmB,CAAC,CAAA;AACpE,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAA;AACpE,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC,kBAAkB,CAAC,CAAA;AACjE,MAAM,MAAM,kBAAkB,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=adapter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../src/targets/adapter.ts"],"names":[],"mappings":""}
@@ -1,25 +0,0 @@
1
- import { CommandSpec, HttpEnvHeader, HttpHeader, HttpRequestSpec } from "../domain/operation.js";
2
- import { ReleaseModel, ReleasePlan } from "../domain/release.js";
3
- import { GitHubReleaseTarget } from "../domain/target.js";
4
- export type * from "../types/effect-internal.js";
5
- export interface GitHubReleaseContext {
6
- readonly identity: ReleaseModel["identity"] | ReleasePlan["identity"];
7
- readonly artifacts: ReleaseModel["artifacts"] | ReleasePlan["artifacts"];
8
- }
9
- export declare const githubAuthEnvNames: (target: GitHubReleaseTarget) => ReadonlyArray<string>;
10
- export declare const githubGhCommand: (target: GitHubReleaseTarget, args: ReadonlyArray<string>, includeAuth: boolean) => CommandSpec;
11
- export declare const githubTargetArtifacts: (target: GitHubReleaseTarget, context: GitHubReleaseContext) => import("../domain/artifact.js").ArtifactInventoryItem[];
12
- export declare const githubReleaseAssetName: (pathName: string) => string;
13
- export declare const githubTargetArtifactAssetNames: (target: GitHubReleaseTarget, context: GitHubReleaseContext) => ReadonlyArray<string>;
14
- export declare const githubReleaseTag: (context: GitHubReleaseContext) => string;
15
- export declare const githubReleaseTitle: (context: GitHubReleaseContext) => string;
16
- export declare const githubReleaseCreateArgs: (target: GitHubReleaseTarget, context: GitHubReleaseContext) => ReadonlyArray<string>;
17
- export declare const githubReleaseApiUrl: (target: GitHubReleaseTarget, tag: string) => string;
18
- export declare const githubApiHeaders: () => ReadonlyArray<HttpHeader>;
19
- export declare const githubApiEnvHeaders: (target: GitHubReleaseTarget) => ReadonlyArray<HttpEnvHeader>;
20
- export declare const githubApiGetRequestSpec: (target: GitHubReleaseTarget, url: string) => HttpRequestSpec;
21
- export declare const githubReleaseRequestSpec: (target: GitHubReleaseTarget, tag: string) => HttpRequestSpec;
22
- export declare const githubReleaseCreateCommand: (target: GitHubReleaseTarget, context: GitHubReleaseContext) => CommandSpec;
23
- export declare const githubReleaseViewCommand: (target: GitHubReleaseTarget, context: GitHubReleaseContext) => CommandSpec;
24
- export declare const githubReleasePublishDraftCommand: (target: GitHubReleaseTarget, context: GitHubReleaseContext) => CommandSpec;
25
- //# sourceMappingURL=github-release.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"github-release.d.ts","sourceRoot":"","sources":["../../src/targets/github-release.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,aAAa,EACb,UAAU,EACV,eAAe,EAChB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAEzD,mBAAmB,6BAA6B,CAAA;AAEhD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC,UAAU,CAAC,GAAG,WAAW,CAAC,UAAU,CAAC,CAAA;IACrE,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC,WAAW,CAAC,GAAG,WAAW,CAAC,WAAW,CAAC,CAAA;CACzE;AAED,eAAO,MAAM,kBAAkB,GAAI,QAAQ,mBAAmB,KAAG,aAAa,CAAC,MAAM,CAC7B,CAAA;AAExD,eAAO,MAAM,eAAe,GAC1B,QAAQ,mBAAmB,EAC3B,MAAM,aAAa,CAAC,MAAM,CAAC,EAC3B,aAAa,OAAO,KACnB,WAMC,CAAA;AAEJ,eAAO,MAAM,qBAAqB,GAChC,QAAQ,mBAAmB,EAC3B,SAAS,oBAAoB,4DAEiD,CAAA;AAEhF,eAAO,MAAM,sBAAsB,GAAI,UAAU,MAAM,KAAG,MAGzD,CAAA;AAED,eAAO,MAAM,8BAA8B,GACzC,QAAQ,mBAAmB,EAC3B,SAAS,oBAAoB,KAC5B,aAAa,CAAC,MAAM,CAC0E,CAAA;AAEjG,eAAO,MAAM,gBAAgB,GAAI,SAAS,oBAAoB,KAAG,MACf,CAAA;AAElD,eAAO,MAAM,kBAAkB,GAAI,SAAS,oBAAoB,KAAG,MACX,CAAA;AAExD,eAAO,MAAM,uBAAuB,GAClC,QAAQ,mBAAmB,EAC3B,SAAS,oBAAoB,KAC5B,aAAa,CAAC,MAAM,CAuBtB,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,QAAQ,mBAAmB,EAAE,KAAK,MAAM,KAAG,MACe,CAAA;AAE9F,eAAO,MAAM,gBAAgB,QAAO,aAAa,CAAC,UAAU,CAG3D,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,QAAQ,mBAAmB,KAAG,aAAa,CAAC,aAAa,CASxF,CAAA;AAEL,eAAO,MAAM,uBAAuB,GAClC,QAAQ,mBAAmB,EAC3B,KAAK,MAAM,KACV,eAQC,CAAA;AAEJ,eAAO,MAAM,wBAAwB,GACnC,QAAQ,mBAAmB,EAC3B,KAAK,MAAM,KACV,eACgE,CAAA;AAEnE,eAAO,MAAM,0BAA0B,GACrC,QAAQ,mBAAmB,EAC3B,SAAS,oBAAoB,KAC5B,WACsE,CAAA;AAEzE,eAAO,MAAM,wBAAwB,GACnC,QAAQ,mBAAmB,EAC3B,SAAS,oBAAoB,KAC5B,WAaA,CAAA;AAEH,eAAO,MAAM,gCAAgC,GAC3C,QAAQ,mBAAmB,EAC3B,SAAS,oBAAoB,KAC5B,WAYA,CAAA"}
@@ -1,82 +0,0 @@
1
- import { CommandSpec, HttpEnvHeader, HttpHeader, HttpRequestSpec } from "../domain/operation.js";
2
- export const githubAuthEnvNames = (target) => target.tokenEnv === undefined ? [] : [target.tokenEnv];
3
- export const githubGhCommand = (target, args, includeAuth) => CommandSpec.make({
4
- executable: "gh",
5
- args: [...args],
6
- requiredEnv: includeAuth ? githubAuthEnvNames(target) : [],
7
- redactedEnv: includeAuth ? githubAuthEnvNames(target) : []
8
- });
9
- export const githubTargetArtifacts = (target, context) => context.artifacts.filter((artifact) => artifact.consumers.includes(target.id));
10
- export const githubReleaseAssetName = (pathName) => {
11
- const parts = pathName.replaceAll("\\", "/").split("/");
12
- return parts[parts.length - 1] ?? pathName;
13
- };
14
- export const githubTargetArtifactAssetNames = (target, context) => githubTargetArtifacts(target, context).map((artifact) => githubReleaseAssetName(artifact.path));
15
- export const githubReleaseTag = (context) => context.identity.tag ?? context.identity.version;
16
- export const githubReleaseTitle = (context) => `${context.identity.name} ${context.identity.version}`;
17
- export const githubReleaseCreateArgs = (target, context) => {
18
- const args = [
19
- "release",
20
- "create",
21
- githubReleaseTag(context),
22
- "--repo",
23
- target.repository,
24
- "--title",
25
- githubReleaseTitle(context)
26
- ];
27
- if (target.draft === true) {
28
- args.push("--draft");
29
- }
30
- if (target.prerelease === true) {
31
- args.push("--prerelease");
32
- }
33
- if (context.identity.notes !== undefined) {
34
- args.push("--notes", context.identity.notes);
35
- }
36
- for (const artifact of githubTargetArtifacts(target, context)) {
37
- args.push(artifact.path);
38
- }
39
- return args;
40
- };
41
- export const githubReleaseApiUrl = (target, tag) => `https://api.github.com/repos/${target.repository}/releases/tags/${encodeURIComponent(tag)}`;
42
- export const githubApiHeaders = () => [
43
- HttpHeader.make({ name: "Accept", value: "application/vnd.github+json" }),
44
- HttpHeader.make({ name: "X-GitHub-Api-Version", value: "2022-11-28" })
45
- ];
46
- export const githubApiEnvHeaders = (target) => target.tokenEnv === undefined
47
- ? []
48
- : [
49
- HttpEnvHeader.make({
50
- name: "Authorization",
51
- valueEnv: target.tokenEnv,
52
- prefix: "Bearer "
53
- })
54
- ];
55
- export const githubApiGetRequestSpec = (target, url) => HttpRequestSpec.make({
56
- method: "GET",
57
- url,
58
- headers: githubApiHeaders(),
59
- envHeaders: githubApiEnvHeaders(target),
60
- requiredEnv: githubAuthEnvNames(target),
61
- redactedEnv: githubAuthEnvNames(target)
62
- });
63
- export const githubReleaseRequestSpec = (target, tag) => githubApiGetRequestSpec(target, githubReleaseApiUrl(target, tag));
64
- export const githubReleaseCreateCommand = (target, context) => githubGhCommand(target, githubReleaseCreateArgs(target, context), true);
65
- export const githubReleaseViewCommand = (target, context) => githubGhCommand(target, [
66
- "release",
67
- "view",
68
- githubReleaseTag(context),
69
- "--repo",
70
- target.repository,
71
- "--json",
72
- "tagName,name,isDraft,isPrerelease,assets"
73
- ], true);
74
- export const githubReleasePublishDraftCommand = (target, context) => githubGhCommand(target, [
75
- "release",
76
- "edit",
77
- githubReleaseTag(context),
78
- "--repo",
79
- target.repository,
80
- "--draft=false"
81
- ], true);
82
- //# sourceMappingURL=github-release.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"github-release.js","sourceRoot":"","sources":["../../src/targets/github-release.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,aAAa,EACb,UAAU,EACV,eAAe,EAChB,MAAM,wBAAwB,CAAA;AAW/B,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAA2B,EAAyB,EAAE,CACvF,MAAM,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;AAExD,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,MAA2B,EAC3B,IAA2B,EAC3B,WAAoB,EACP,EAAE,CACf,WAAW,CAAC,IAAI,CAAC;IACf,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;IACf,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;IAC1D,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,E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eAAe;CAChB,EACD,IAAI,CACL,CAAA"}
@@ -1,11 +0,0 @@
1
- import * as Effect from "effect/Effect";
2
- import { PublishCommandOperation, VerifyHttpOperation, VerifyRemoteOperation } from "../domain/operation.js";
3
- import { ReleaseModel } from "../domain/release.js";
4
- import { GitHubReleaseTarget, TargetCapabilities } from "../domain/target.js";
5
- import { PlanConstructionError } from "../planner/errors.js";
6
- import { GitHubTargetAdapter } from "./adapter.js";
7
- export type * from "../types/effect-internal.js";
8
- export declare const githubTargetCapabilities: (target: GitHubReleaseTarget) => TargetCapabilities;
9
- export declare const planGitHubOperations: (target: GitHubReleaseTarget, model: ReleaseModel) => Effect.Effect<(import("../domain/operation.js").RenderFileOperation | import("../domain/operation.js").ValidateCommandOperation | import("../domain/operation.js").ValidationNoteOperation | PublishCommandOperation | VerifyRemoteOperation | VerifyHttpOperation)[], PlanConstructionError, never>;
10
- export declare const GitHubAdapter: GitHubTargetAdapter;
11
- //# sourceMappingURL=github.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../src/targets/github.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAOL,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAGnB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAmBlD,mBAAmB,6BAA6B,CAAA;AAKhD,eAAO,MAAM,wBAAwB,GAAI,QAAQ,mBAAmB,KAAG,kBACN,CAAA;AA6FjE,eAAO,MAAM,oBAAoB,4VAkD/B,CAAA;AAEF,eAAO,MAAM,aAAa,EAAE,mBAI3B,CAAA"}
@@ -1,125 +0,0 @@
1
- import * as Effect from "effect/Effect";
2
- import { executeGate, HttpJsonArrayObjectFieldEqualsCheck, HttpJsonEqualsCheck, irreversibleGate, noApprovalGate, PublishCommandOperation, VerifyHttpOperation, VerifyRemoteOperation } from "../domain/operation.js";
3
- import { PlanConstructionError } from "../planner/errors.js";
4
- import { readOnlyCommandValidationOperation, rejectNoDryRunInStrictMode, targetCapabilitiesFor, validationNoteOperation } from "./adapter-helpers.js";
5
- import { githubGhCommand, githubReleaseAssetName, githubReleaseCreateCommand, githubReleaseRequestSpec, githubReleaseTag, githubReleaseTitle, githubReleaseViewCommand, githubTargetArtifacts } from "./github-release.js";
6
- const githubValidationStrategy = (target) => target.dryRunSupport === "none" ? "skipped" : "simulated-plan";
7
- export const githubTargetCapabilities = (target) => targetCapabilitiesFor(target, githubValidationStrategy(target));
8
- const rejectDirectoryAssets = Effect.fn("github.rejectDirectoryAssets")(function* (target, model) {
9
- const directoryAsset = githubTargetArtifacts(target, model).find((artifact) => artifact.format === "directory");
10
- if (directoryAsset === undefined) {
11
- return;
12
- }
13
- return yield* Effect.fail(PlanConstructionError.make({
14
- targetId: target.id,
15
- reason: "GitHub release assets must be file-like, not directories."
16
- }));
17
- });
18
- const githubVerificationOperations = (target, model) => {
19
- if (target.draft === true) {
20
- return [
21
- VerifyRemoteOperation.make({
22
- id: `${target.id}:github-release-verify-gh`,
23
- targetId: target.id,
24
- description: "Verify the GitHub draft release through the GitHub CLI.",
25
- risk: "read-only",
26
- gate: noApprovalGate("GitHub CLI release verification is read-only."),
27
- command: githubReleaseViewCommand(target, model)
28
- })
29
- ];
30
- }
31
- const tag = githubReleaseTag(model);
32
- const title = githubReleaseTitle(model);
33
- const isPrerelease = target.prerelease === true;
34
- const artifactChecks = githubTargetArtifacts(target, model).map((artifact) => HttpJsonArrayObjectFieldEqualsCheck.make({
35
- path: ["assets"],
36
- field: "name",
37
- expected: githubReleaseAssetName(artifact.path)
38
- }));
39
- return [
40
- VerifyHttpOperation.make({
41
- id: `${target.id}:github-release-verify-http`,
42
- targetId: target.id,
43
- description: "Verify the GitHub release through the GitHub API.",
44
- risk: "read-only",
45
- gate: noApprovalGate("GitHub API release verification is read-only."),
46
- request: githubReleaseRequestSpec(target, tag),
47
- expectedStatus: 200,
48
- checks: [
49
- HttpJsonEqualsCheck.make({
50
- path: ["tag_name"],
51
- expected: tag
52
- }),
53
- HttpJsonEqualsCheck.make({
54
- path: ["name"],
55
- expected: title
56
- }),
57
- HttpJsonEqualsCheck.make({
58
- path: ["draft"],
59
- expected: false
60
- }),
61
- HttpJsonEqualsCheck.make({
62
- path: ["prerelease"],
63
- expected: isPrerelease
64
- }),
65
- ...artifactChecks
66
- ]
67
- })
68
- ];
69
- };
70
- const githubDryRunOperation = (target, dryRunSupport) => validationNoteOperation({
71
- id: `${target.id}:gh-release-dry-run`,
72
- targetId: target.id,
73
- dryRunSupport,
74
- simulatedDescription: "Record simulated GitHub release dry-run validation.",
75
- skippedDescription: "Record skipped GitHub release dry-run validation.",
76
- simulatedMessage: "GitHub release dry-run validation is simulated by the deterministic release plan; gh release create has no native dry-run command.",
77
- skippedMessage: "GitHub release dry-run validation was skipped because this target declares no dry-run support."
78
- });
79
- export const planGitHubOperations = Effect.fn("planGitHubOperations")(function* (target, model) {
80
- const dryRunSupport = target.dryRunSupport;
81
- if (dryRunSupport === "native") {
82
- return yield* Effect.fail(PlanConstructionError.make({
83
- targetId: target.id,
84
- reason: "GitHub release targets do not support native dry-run; use simulated dry-run support."
85
- }));
86
- }
87
- yield* rejectNoDryRunInStrictMode(target, model, "GitHub release target declares no dry-run support in strict mode.");
88
- yield* rejectDirectoryAssets(target, model);
89
- const publishRisk = target.mutability === "immutable" ? "irreversible" : "externally-visible";
90
- const publishGate = publishRisk === "irreversible"
91
- ? irreversibleGate("Creating this GitHub release is externally visible and configured as immutable.")
92
- : executeGate("Creating or updating a GitHub release is externally visible.");
93
- return [
94
- readOnlyCommandValidationOperation({
95
- id: `${target.id}:gh-version`,
96
- targetId: target.id,
97
- description: "Check GitHub CLI availability.",
98
- gateReason: "CLI availability validation is read-only.",
99
- command: githubGhCommand(target, ["--version"], false)
100
- }),
101
- readOnlyCommandValidationOperation({
102
- id: `${target.id}:gh-auth-status`,
103
- targetId: target.id,
104
- description: "Validate GitHub CLI authentication.",
105
- gateReason: "gh auth status checks authentication without publishing.",
106
- command: githubGhCommand(target, ["auth", "status"], true)
107
- }),
108
- githubDryRunOperation(target, dryRunSupport),
109
- PublishCommandOperation.make({
110
- id: `${target.id}:gh-release-create`,
111
- targetId: target.id,
112
- description: `Create GitHub release for ${model.identity.name}@${model.identity.version}.`,
113
- risk: publishRisk,
114
- gate: publishGate,
115
- command: githubReleaseCreateCommand(target, model)
116
- }),
117
- ...githubVerificationOperations(target, model)
118
- ];
119
- });
120
- export const GitHubAdapter = {
121
- targetTag: "GitHubReleaseTarget",
122
- capabilities: githubTargetCapabilities,
123
- planOperations: planGitHubOperations
124
- };
125
- //# sourceMappingURL=github.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"github.js","sourceRoot":"","sources":["../../src/targets/github.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EACL,WAAW,EACX,mCAAmC,EACnC,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EAEd,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,wBAAwB,CAAA;AAQ/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAE5D,OAAO,EACL,kCAAkC,EAClC,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAEL,eAAe,EACf,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,qBAAqB,CAAA;AAI5B,MAAM,wBAAwB,GAAG,CAAC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AAa;YAC7B,QAAQ,EAAE,MAAM,CAAC,EAAE;YACnB,WAAW,EAAE,gCAAgC;YAC7C,UAAU,EAAE,2CAA2C;YACvD,OAAO,EAAE,eAAe,CAAC,MAAM,EAAE,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC;SACvD,CAAC;QACF,kCAAkC,CAAC;YACjC,EAAE,EAAE,GAAG,MAAM,CAAC,EAAE,iBAAiB;YACjC,QAAQ,EAAE,MAAM,CAAC,EAAE;YACnB,WAAW,EAAE,qCAAqC;YAClD,UAAU,EAAE,0DAA0D;YACtE,OAAO,EAAE,eAAe,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,IAAI,CAAC;SAC3D,CAAC;QACF,qBAAqB,CAAC,MAAM,EAAE,aAAa,CAAC;QAC5C,uBAAuB,CAAC,IAAI,CAAC;YAC3B,EAAE,EAAE,GAAG,MAAM,CAAC,EAAE,oBAAoB;YACpC,QAAQ,EAAE,MAAM,CAAC,EAAE;YACnB,WAAW,EAAE,6BAA6B,KAAK,CAAC,QAAQ,CAAC,IAAI,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,GAAG;YAC1F,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,0BAA0B,CAAC,MAAM,EAAE,KAAK,CAAC;SACnD,CAAC;QACF,GAAG,4BAA4B,CAAC,MAAM,EAAE,KAAK,CAAC;KACZ,CAAA;AACtC,CAAC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,aAAa,GAAwB;IAChD,SAAS,EAAE,qBAAqB;IAChC,YAAY,EAAE,wBAAwB;IACtC,cAAc,EAAE,oBAAoB;CACrC,CAAA"}
@@ -1,11 +0,0 @@
1
- import * as Effect from "effect/Effect";
2
- import { RenderFileOperation } from "../domain/operation.js";
3
- import { ReleaseModel } from "../domain/release.js";
4
- import { HomebrewTapTarget, TargetCapabilities } from "../domain/target.js";
5
- import { PlanConstructionError } from "../planner/errors.js";
6
- import { HomebrewTargetAdapter } from "./adapter.js";
7
- export type * from "../types/effect-internal.js";
8
- export declare const homebrewTargetCapabilities: (target: HomebrewTapTarget) => TargetCapabilities;
9
- export declare const planHomebrewOperations: (target: HomebrewTapTarget, model: ReleaseModel) => Effect.Effect<(RenderFileOperation | import("../domain/operation.js").ValidateCommandOperation | import("../domain/operation.js").ValidationNoteOperation | import("../domain/operation.js").PublishCommandOperation | import("../domain/operation.js").VerifyRemoteOperation | import("../domain/operation.js").VerifyHttpOperation)[], PlanConstructionError, never>;
10
- export declare const HomebrewAdapter: HomebrewTargetAdapter;
11
- //# sourceMappingURL=homebrew.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"homebrew.d.ts","sourceRoot":"","sources":["../../src/targets/homebrew.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAGL,mBAAmB,EACpB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAepD,mBAAmB,6BAA6B,CAAA;AAUhD,eAAO,MAAM,0BAA0B,GAAI,QAAQ,iBAAiB,KAAG,kBACW,CAAA;AA6DlF,eAAO,MAAM,sBAAsB,4ZA8CjC,CAAA;AAEF,eAAO,MAAM,eAAe,EAAE,qBAI7B,CAAA"}
@@ -1,97 +0,0 @@
1
- import * as Effect from "effect/Effect";
2
- import { executeGate, RenderFileOperation } from "../domain/operation.js";
3
- import { catalogGitPushOperation, catalogPathBaseName, dryRunValidationOperation, findRequiredArtifact, noAuthCommand, readOnlyCommandValidationOperation, requireSha256FileArtifact, rejectNoDryRunInStrictMode, rejectUnsupportedCatalogTokenEnv, targetCapabilitiesFor, validationStrategyForDryRun } from "./adapter-helpers.js";
4
- const rejectUnsupportedTokenEnv = Effect.fn("rejectUnsupportedHomebrewTokenEnv")(function* (target) {
5
- return yield* rejectUnsupportedCatalogTokenEnv({
6
- targetId: target.id,
7
- targetLabel: "Homebrew tap",
8
- tokenEnv: target.tokenEnv
9
- });
10
- });
11
- export const homebrewTargetCapabilities = (target) => targetCapabilitiesFor(target, validationStrategyForDryRun(target.dryRunSupport));
12
- const rubyString = (value) => JSON.stringify(value);
13
- const formulaClassName = (formulaName) => {
14
- const parts = formulaName.split(/[^A-Za-z0-9]+/).filter((part) => part.length > 0);
15
- const className = parts.map((part) => `${part.slice(0, 1).toUpperCase()}${part.slice(1)}`).join("");
16
- return className.length === 0 ? "GeneratedFormula" : className;
17
- };
18
- const renderFormula = (target, model) => Effect.gen(function* () {
19
- const artifact = yield* findRequiredArtifact(model, target.id, target.artifactId, `Homebrew target references missing artifact ${target.artifactId}.`);
20
- const validated = yield* requireSha256FileArtifact(artifact, {
21
- targetId: target.id,
22
- directoryReason: "Homebrew formula artifacts must be file-like, not directories.",
23
- checksumReason: "Homebrew formula rendering requires a sha256 artifact checksum."
24
- });
25
- const installLines = target.installPath === undefined
26
- ? [" prefix.install Dir[\"*\"]"]
27
- : [` bin.install ${rubyString(target.installPath)} => ${rubyString(target.formulaName)}`];
28
- const homepage = target.homepage ?? `https://github.com/${target.repository}`;
29
- const url = target.url ?? validated.artifact.path;
30
- return [
31
- `class ${formulaClassName(target.formulaName)} < Formula`,
32
- ` desc ${rubyString(`${model.identity.name} ${model.identity.version} release artifact`)}`,
33
- ` homepage ${rubyString(homepage)}`,
34
- ` url ${rubyString(url)}`,
35
- ` sha256 ${rubyString(validated.checksum.value)}`,
36
- ` version ${rubyString(model.identity.version)}`,
37
- "",
38
- " def install",
39
- ...installLines,
40
- " end",
41
- "end",
42
- ""
43
- ].join("\n");
44
- });
45
- const dryRunOperation = (target) => dryRunValidationOperation({
46
- id: `${target.id}:brew-audit`,
47
- targetId: target.id,
48
- dryRunSupport: target.dryRunSupport,
49
- nativeDescription: "Validate generated Homebrew formula with brew audit.",
50
- nativeGateReason: "brew audit validates the generated formula without publishing.",
51
- command: noAuthCommand("brew", ["audit", "--strict", "--formula", target.formulaPath]),
52
- simulatedDescription: "Record simulated Homebrew formula validation.",
53
- skippedDescription: "Record skipped Homebrew formula validation.",
54
- simulatedMessage: "Homebrew formula validation is simulated by the deterministic release plan.",
55
- skippedMessage: "Homebrew formula validation was skipped because this target declares no dry-run support."
56
- });
57
- export const planHomebrewOperations = Effect.fn("planHomebrewOperations")(function* (target, model) {
58
- yield* rejectUnsupportedTokenEnv(target);
59
- yield* rejectNoDryRunInStrictMode(target, model, "Homebrew tap target declares no dry-run support in strict mode.");
60
- const formula = yield* renderFormula(target, model);
61
- const operations = [
62
- RenderFileOperation.make({
63
- id: `${target.id}:homebrew-render-formula`,
64
- targetId: target.id,
65
- description: `Render Homebrew formula ${catalogPathBaseName(target.formulaPath)}.`,
66
- risk: "writes-local",
67
- gate: executeGate("Rendering a Homebrew formula writes a local generated file."),
68
- path: target.formulaPath,
69
- contents: formula
70
- })
71
- ];
72
- if (target.dryRunSupport === "native") {
73
- operations.push(readOnlyCommandValidationOperation({
74
- id: `${target.id}:brew-version`,
75
- targetId: target.id,
76
- description: "Check Homebrew CLI availability.",
77
- gateReason: "CLI availability validation is read-only.",
78
- command: noAuthCommand("brew", ["--version"])
79
- }));
80
- }
81
- operations.push(dryRunOperation(target), catalogGitPushOperation({
82
- id: `${target.id}:homebrew-push`,
83
- targetId: target.id,
84
- description: `Push Homebrew tap update for ${model.identity.name}@${model.identity.version}.`,
85
- mutability: target.mutability,
86
- directory: target.tapDirectory,
87
- irreversibleReason: "Pushing a Homebrew tap update is configured as irreversible.",
88
- externallyVisibleReason: "Pushing a Homebrew tap update is externally visible."
89
- }));
90
- return operations;
91
- });
92
- export const HomebrewAdapter = {
93
- targetTag: "HomebrewTapTarget",
94
- capabilities: homebrewTargetCapabilities,
95
- planOperations: planHomebrewOperations
96
- };
97
- //# sourceMappingURL=homebrew.js.map