@hyperfrontend/versioning 0.1.0

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 (353) hide show
  1. package/ARCHITECTURE.md +593 -0
  2. package/CHANGELOG.md +35 -0
  3. package/FUNDING.md +141 -0
  4. package/LICENSE.md +21 -0
  5. package/README.md +195 -0
  6. package/SECURITY.md +82 -0
  7. package/changelog/compare/diff.d.ts +128 -0
  8. package/changelog/compare/diff.d.ts.map +1 -0
  9. package/changelog/compare/index.cjs.js +628 -0
  10. package/changelog/compare/index.cjs.js.map +1 -0
  11. package/changelog/compare/index.d.ts +4 -0
  12. package/changelog/compare/index.d.ts.map +1 -0
  13. package/changelog/compare/index.esm.js +612 -0
  14. package/changelog/compare/index.esm.js.map +1 -0
  15. package/changelog/compare/is-equal.d.ts +114 -0
  16. package/changelog/compare/is-equal.d.ts.map +1 -0
  17. package/changelog/index.cjs.js +6448 -0
  18. package/changelog/index.cjs.js.map +1 -0
  19. package/changelog/index.d.ts +6 -0
  20. package/changelog/index.d.ts.map +1 -0
  21. package/changelog/index.esm.js +6358 -0
  22. package/changelog/index.esm.js.map +1 -0
  23. package/changelog/models/changelog.d.ts +86 -0
  24. package/changelog/models/changelog.d.ts.map +1 -0
  25. package/changelog/models/commit-ref.d.ts +51 -0
  26. package/changelog/models/commit-ref.d.ts.map +1 -0
  27. package/changelog/models/entry.d.ts +84 -0
  28. package/changelog/models/entry.d.ts.map +1 -0
  29. package/changelog/models/index.cjs.js +2043 -0
  30. package/changelog/models/index.cjs.js.map +1 -0
  31. package/changelog/models/index.d.ts +11 -0
  32. package/changelog/models/index.d.ts.map +1 -0
  33. package/changelog/models/index.esm.js +2026 -0
  34. package/changelog/models/index.esm.js.map +1 -0
  35. package/changelog/models/schema.d.ts +68 -0
  36. package/changelog/models/schema.d.ts.map +1 -0
  37. package/changelog/models/section.d.ts +25 -0
  38. package/changelog/models/section.d.ts.map +1 -0
  39. package/changelog/operations/add-entry.d.ts +56 -0
  40. package/changelog/operations/add-entry.d.ts.map +1 -0
  41. package/changelog/operations/add-item.d.ts +18 -0
  42. package/changelog/operations/add-item.d.ts.map +1 -0
  43. package/changelog/operations/filter-by-predicate.d.ts +81 -0
  44. package/changelog/operations/filter-by-predicate.d.ts.map +1 -0
  45. package/changelog/operations/filter-by-range.d.ts +63 -0
  46. package/changelog/operations/filter-by-range.d.ts.map +1 -0
  47. package/changelog/operations/filter-entries.d.ts +9 -0
  48. package/changelog/operations/filter-entries.d.ts.map +1 -0
  49. package/changelog/operations/index.cjs.js +2455 -0
  50. package/changelog/operations/index.cjs.js.map +1 -0
  51. package/changelog/operations/index.d.ts +15 -0
  52. package/changelog/operations/index.d.ts.map +1 -0
  53. package/changelog/operations/index.esm.js +2411 -0
  54. package/changelog/operations/index.esm.js.map +1 -0
  55. package/changelog/operations/merge.d.ts +88 -0
  56. package/changelog/operations/merge.d.ts.map +1 -0
  57. package/changelog/operations/remove-entry.d.ts +45 -0
  58. package/changelog/operations/remove-entry.d.ts.map +1 -0
  59. package/changelog/operations/remove-section.d.ts +50 -0
  60. package/changelog/operations/remove-section.d.ts.map +1 -0
  61. package/changelog/operations/transform.d.ts +143 -0
  62. package/changelog/operations/transform.d.ts.map +1 -0
  63. package/changelog/parse/index.cjs.js +1282 -0
  64. package/changelog/parse/index.cjs.js.map +1 -0
  65. package/changelog/parse/index.d.ts +5 -0
  66. package/changelog/parse/index.d.ts.map +1 -0
  67. package/changelog/parse/index.esm.js +1275 -0
  68. package/changelog/parse/index.esm.js.map +1 -0
  69. package/changelog/parse/line.d.ts +48 -0
  70. package/changelog/parse/line.d.ts.map +1 -0
  71. package/changelog/parse/parser.d.ts +16 -0
  72. package/changelog/parse/parser.d.ts.map +1 -0
  73. package/changelog/parse/tokenizer.d.ts +49 -0
  74. package/changelog/parse/tokenizer.d.ts.map +1 -0
  75. package/changelog/serialize/index.cjs.js +574 -0
  76. package/changelog/serialize/index.cjs.js.map +1 -0
  77. package/changelog/serialize/index.d.ts +6 -0
  78. package/changelog/serialize/index.d.ts.map +1 -0
  79. package/changelog/serialize/index.esm.js +564 -0
  80. package/changelog/serialize/index.esm.js.map +1 -0
  81. package/changelog/serialize/templates.d.ts +81 -0
  82. package/changelog/serialize/templates.d.ts.map +1 -0
  83. package/changelog/serialize/to-json.d.ts +57 -0
  84. package/changelog/serialize/to-json.d.ts.map +1 -0
  85. package/changelog/serialize/to-string.d.ts +30 -0
  86. package/changelog/serialize/to-string.d.ts.map +1 -0
  87. package/commits/index.cjs.js +648 -0
  88. package/commits/index.cjs.js.map +1 -0
  89. package/commits/index.d.ts +3 -0
  90. package/commits/index.d.ts.map +1 -0
  91. package/commits/index.esm.js +629 -0
  92. package/commits/index.esm.js.map +1 -0
  93. package/commits/models/breaking.d.ts +39 -0
  94. package/commits/models/breaking.d.ts.map +1 -0
  95. package/commits/models/commit-type.d.ts +32 -0
  96. package/commits/models/commit-type.d.ts.map +1 -0
  97. package/commits/models/conventional.d.ts +49 -0
  98. package/commits/models/conventional.d.ts.map +1 -0
  99. package/commits/models/index.cjs.js +207 -0
  100. package/commits/models/index.cjs.js.map +1 -0
  101. package/commits/models/index.d.ts +7 -0
  102. package/commits/models/index.d.ts.map +1 -0
  103. package/commits/models/index.esm.js +193 -0
  104. package/commits/models/index.esm.js.map +1 -0
  105. package/commits/parse/body.d.ts +18 -0
  106. package/commits/parse/body.d.ts.map +1 -0
  107. package/commits/parse/footer.d.ts +16 -0
  108. package/commits/parse/footer.d.ts.map +1 -0
  109. package/commits/parse/header.d.ts +15 -0
  110. package/commits/parse/header.d.ts.map +1 -0
  111. package/commits/parse/index.cjs.js +505 -0
  112. package/commits/parse/index.cjs.js.map +1 -0
  113. package/commits/parse/index.d.ts +5 -0
  114. package/commits/parse/index.d.ts.map +1 -0
  115. package/commits/parse/index.esm.js +499 -0
  116. package/commits/parse/index.esm.js.map +1 -0
  117. package/commits/parse/message.d.ts +17 -0
  118. package/commits/parse/message.d.ts.map +1 -0
  119. package/commits/utils/replace-char.d.ts +19 -0
  120. package/commits/utils/replace-char.d.ts.map +1 -0
  121. package/flow/executor/execute.d.ts +72 -0
  122. package/flow/executor/execute.d.ts.map +1 -0
  123. package/flow/executor/index.cjs.js +4402 -0
  124. package/flow/executor/index.cjs.js.map +1 -0
  125. package/flow/executor/index.d.ts +3 -0
  126. package/flow/executor/index.d.ts.map +1 -0
  127. package/flow/executor/index.esm.js +4398 -0
  128. package/flow/executor/index.esm.js.map +1 -0
  129. package/flow/factory.d.ts +58 -0
  130. package/flow/factory.d.ts.map +1 -0
  131. package/flow/index.cjs.js +8506 -0
  132. package/flow/index.cjs.js.map +1 -0
  133. package/flow/index.d.ts +7 -0
  134. package/flow/index.d.ts.map +1 -0
  135. package/flow/index.esm.js +8451 -0
  136. package/flow/index.esm.js.map +1 -0
  137. package/flow/models/flow.d.ts +130 -0
  138. package/flow/models/flow.d.ts.map +1 -0
  139. package/flow/models/index.cjs.js +285 -0
  140. package/flow/models/index.cjs.js.map +1 -0
  141. package/flow/models/index.d.ts +7 -0
  142. package/flow/models/index.d.ts.map +1 -0
  143. package/flow/models/index.esm.js +268 -0
  144. package/flow/models/index.esm.js.map +1 -0
  145. package/flow/models/step.d.ts +108 -0
  146. package/flow/models/step.d.ts.map +1 -0
  147. package/flow/models/types.d.ts +150 -0
  148. package/flow/models/types.d.ts.map +1 -0
  149. package/flow/presets/conventional.d.ts +59 -0
  150. package/flow/presets/conventional.d.ts.map +1 -0
  151. package/flow/presets/independent.d.ts +61 -0
  152. package/flow/presets/independent.d.ts.map +1 -0
  153. package/flow/presets/index.cjs.js +3903 -0
  154. package/flow/presets/index.cjs.js.map +1 -0
  155. package/flow/presets/index.d.ts +4 -0
  156. package/flow/presets/index.d.ts.map +1 -0
  157. package/flow/presets/index.esm.js +3889 -0
  158. package/flow/presets/index.esm.js.map +1 -0
  159. package/flow/presets/synced.d.ts +65 -0
  160. package/flow/presets/synced.d.ts.map +1 -0
  161. package/flow/steps/analyze-commits.d.ts +19 -0
  162. package/flow/steps/analyze-commits.d.ts.map +1 -0
  163. package/flow/steps/calculate-bump.d.ts +27 -0
  164. package/flow/steps/calculate-bump.d.ts.map +1 -0
  165. package/flow/steps/create-commit.d.ts +16 -0
  166. package/flow/steps/create-commit.d.ts.map +1 -0
  167. package/flow/steps/create-tag.d.ts +22 -0
  168. package/flow/steps/create-tag.d.ts.map +1 -0
  169. package/flow/steps/fetch-registry.d.ts +19 -0
  170. package/flow/steps/fetch-registry.d.ts.map +1 -0
  171. package/flow/steps/generate-changelog.d.ts +25 -0
  172. package/flow/steps/generate-changelog.d.ts.map +1 -0
  173. package/flow/steps/index.cjs.js +3523 -0
  174. package/flow/steps/index.cjs.js.map +1 -0
  175. package/flow/steps/index.d.ts +8 -0
  176. package/flow/steps/index.d.ts.map +1 -0
  177. package/flow/steps/index.esm.js +3504 -0
  178. package/flow/steps/index.esm.js.map +1 -0
  179. package/flow/steps/update-packages.d.ts +25 -0
  180. package/flow/steps/update-packages.d.ts.map +1 -0
  181. package/flow/utils/interpolate.d.ts +11 -0
  182. package/flow/utils/interpolate.d.ts.map +1 -0
  183. package/git/factory.d.ts +233 -0
  184. package/git/factory.d.ts.map +1 -0
  185. package/git/index.cjs.js +2863 -0
  186. package/git/index.cjs.js.map +1 -0
  187. package/git/index.d.ts +5 -0
  188. package/git/index.d.ts.map +1 -0
  189. package/git/index.esm.js +2785 -0
  190. package/git/index.esm.js.map +1 -0
  191. package/git/models/commit.d.ts +129 -0
  192. package/git/models/commit.d.ts.map +1 -0
  193. package/git/models/index.cjs.js +755 -0
  194. package/git/models/index.cjs.js.map +1 -0
  195. package/git/models/index.d.ts +7 -0
  196. package/git/models/index.d.ts.map +1 -0
  197. package/git/models/index.esm.js +729 -0
  198. package/git/models/index.esm.js.map +1 -0
  199. package/git/models/ref.d.ts +120 -0
  200. package/git/models/ref.d.ts.map +1 -0
  201. package/git/models/tag.d.ts +141 -0
  202. package/git/models/tag.d.ts.map +1 -0
  203. package/git/operations/commit.d.ts +97 -0
  204. package/git/operations/commit.d.ts.map +1 -0
  205. package/git/operations/head-info.d.ts +29 -0
  206. package/git/operations/head-info.d.ts.map +1 -0
  207. package/git/operations/index.cjs.js +1954 -0
  208. package/git/operations/index.cjs.js.map +1 -0
  209. package/git/operations/index.d.ts +14 -0
  210. package/git/operations/index.d.ts.map +1 -0
  211. package/git/operations/index.esm.js +1903 -0
  212. package/git/operations/index.esm.js.map +1 -0
  213. package/git/operations/log.d.ts +104 -0
  214. package/git/operations/log.d.ts.map +1 -0
  215. package/git/operations/manage-tags.d.ts +60 -0
  216. package/git/operations/manage-tags.d.ts.map +1 -0
  217. package/git/operations/query-tags.d.ts +88 -0
  218. package/git/operations/query-tags.d.ts.map +1 -0
  219. package/git/operations/stage.d.ts +66 -0
  220. package/git/operations/stage.d.ts.map +1 -0
  221. package/git/operations/status.d.ts +173 -0
  222. package/git/operations/status.d.ts.map +1 -0
  223. package/index.cjs.js +16761 -0
  224. package/index.cjs.js.map +1 -0
  225. package/index.d.ts +102 -0
  226. package/index.d.ts.map +1 -0
  227. package/index.esm.js +16427 -0
  228. package/index.esm.js.map +1 -0
  229. package/package.json +200 -0
  230. package/registry/factory.d.ts +18 -0
  231. package/registry/factory.d.ts.map +1 -0
  232. package/registry/index.cjs.js +543 -0
  233. package/registry/index.cjs.js.map +1 -0
  234. package/registry/index.d.ts +5 -0
  235. package/registry/index.d.ts.map +1 -0
  236. package/registry/index.esm.js +535 -0
  237. package/registry/index.esm.js.map +1 -0
  238. package/registry/models/index.cjs.js +69 -0
  239. package/registry/models/index.cjs.js.map +1 -0
  240. package/registry/models/index.d.ts +6 -0
  241. package/registry/models/index.d.ts.map +1 -0
  242. package/registry/models/index.esm.js +66 -0
  243. package/registry/models/index.esm.js.map +1 -0
  244. package/registry/models/package-info.d.ts +55 -0
  245. package/registry/models/package-info.d.ts.map +1 -0
  246. package/registry/models/registry.d.ts +62 -0
  247. package/registry/models/registry.d.ts.map +1 -0
  248. package/registry/models/version-info.d.ts +67 -0
  249. package/registry/models/version-info.d.ts.map +1 -0
  250. package/registry/npm/cache.d.ts +50 -0
  251. package/registry/npm/cache.d.ts.map +1 -0
  252. package/registry/npm/client.d.ts +30 -0
  253. package/registry/npm/client.d.ts.map +1 -0
  254. package/registry/npm/index.cjs.js +456 -0
  255. package/registry/npm/index.cjs.js.map +1 -0
  256. package/registry/npm/index.d.ts +4 -0
  257. package/registry/npm/index.d.ts.map +1 -0
  258. package/registry/npm/index.esm.js +451 -0
  259. package/registry/npm/index.esm.js.map +1 -0
  260. package/semver/compare/compare.d.ts +100 -0
  261. package/semver/compare/compare.d.ts.map +1 -0
  262. package/semver/compare/index.cjs.js +386 -0
  263. package/semver/compare/index.cjs.js.map +1 -0
  264. package/semver/compare/index.d.ts +3 -0
  265. package/semver/compare/index.d.ts.map +1 -0
  266. package/semver/compare/index.esm.js +370 -0
  267. package/semver/compare/index.esm.js.map +1 -0
  268. package/semver/compare/sort.d.ts +36 -0
  269. package/semver/compare/sort.d.ts.map +1 -0
  270. package/semver/format/index.cjs.js +58 -0
  271. package/semver/format/index.cjs.js.map +1 -0
  272. package/semver/format/index.d.ts +2 -0
  273. package/semver/format/index.d.ts.map +1 -0
  274. package/semver/format/index.esm.js +53 -0
  275. package/semver/format/index.esm.js.map +1 -0
  276. package/semver/format/to-string.d.ts +31 -0
  277. package/semver/format/to-string.d.ts.map +1 -0
  278. package/semver/increment/bump.d.ts +37 -0
  279. package/semver/increment/bump.d.ts.map +1 -0
  280. package/semver/increment/index.cjs.js +223 -0
  281. package/semver/increment/index.cjs.js.map +1 -0
  282. package/semver/increment/index.d.ts +2 -0
  283. package/semver/increment/index.d.ts.map +1 -0
  284. package/semver/increment/index.esm.js +219 -0
  285. package/semver/increment/index.esm.js.map +1 -0
  286. package/semver/index.cjs.js +1499 -0
  287. package/semver/index.cjs.js.map +1 -0
  288. package/semver/index.d.ts +6 -0
  289. package/semver/index.d.ts.map +1 -0
  290. package/semver/index.esm.js +1458 -0
  291. package/semver/index.esm.js.map +1 -0
  292. package/semver/models/index.cjs.js +153 -0
  293. package/semver/models/index.cjs.js.map +1 -0
  294. package/semver/models/index.d.ts +5 -0
  295. package/semver/models/index.d.ts.map +1 -0
  296. package/semver/models/index.esm.js +139 -0
  297. package/semver/models/index.esm.js.map +1 -0
  298. package/semver/models/range.d.ts +83 -0
  299. package/semver/models/range.d.ts.map +1 -0
  300. package/semver/models/version.d.ts +78 -0
  301. package/semver/models/version.d.ts.map +1 -0
  302. package/semver/parse/index.cjs.js +799 -0
  303. package/semver/parse/index.cjs.js.map +1 -0
  304. package/semver/parse/index.d.ts +5 -0
  305. package/semver/parse/index.d.ts.map +1 -0
  306. package/semver/parse/index.esm.js +793 -0
  307. package/semver/parse/index.esm.js.map +1 -0
  308. package/semver/parse/range.d.ts +38 -0
  309. package/semver/parse/range.d.ts.map +1 -0
  310. package/semver/parse/version.d.ts +49 -0
  311. package/semver/parse/version.d.ts.map +1 -0
  312. package/workspace/discovery/changelog-path.d.ts +21 -0
  313. package/workspace/discovery/changelog-path.d.ts.map +1 -0
  314. package/workspace/discovery/dependencies.d.ts +145 -0
  315. package/workspace/discovery/dependencies.d.ts.map +1 -0
  316. package/workspace/discovery/discover-changelogs.d.ts +76 -0
  317. package/workspace/discovery/discover-changelogs.d.ts.map +1 -0
  318. package/workspace/discovery/index.cjs.js +2300 -0
  319. package/workspace/discovery/index.cjs.js.map +1 -0
  320. package/workspace/discovery/index.d.ts +13 -0
  321. package/workspace/discovery/index.d.ts.map +1 -0
  322. package/workspace/discovery/index.esm.js +2283 -0
  323. package/workspace/discovery/index.esm.js.map +1 -0
  324. package/workspace/discovery/packages.d.ts +83 -0
  325. package/workspace/discovery/packages.d.ts.map +1 -0
  326. package/workspace/index.cjs.js +4445 -0
  327. package/workspace/index.cjs.js.map +1 -0
  328. package/workspace/index.d.ts +52 -0
  329. package/workspace/index.d.ts.map +1 -0
  330. package/workspace/index.esm.js +4394 -0
  331. package/workspace/index.esm.js.map +1 -0
  332. package/workspace/models/index.cjs.js +284 -0
  333. package/workspace/models/index.cjs.js.map +1 -0
  334. package/workspace/models/index.d.ts +10 -0
  335. package/workspace/models/index.d.ts.map +1 -0
  336. package/workspace/models/index.esm.js +261 -0
  337. package/workspace/models/index.esm.js.map +1 -0
  338. package/workspace/models/project.d.ts +118 -0
  339. package/workspace/models/project.d.ts.map +1 -0
  340. package/workspace/models/workspace.d.ts +139 -0
  341. package/workspace/models/workspace.d.ts.map +1 -0
  342. package/workspace/operations/batch-update.d.ts +99 -0
  343. package/workspace/operations/batch-update.d.ts.map +1 -0
  344. package/workspace/operations/cascade-bump.d.ts +125 -0
  345. package/workspace/operations/cascade-bump.d.ts.map +1 -0
  346. package/workspace/operations/index.cjs.js +2675 -0
  347. package/workspace/operations/index.cjs.js.map +1 -0
  348. package/workspace/operations/index.d.ts +12 -0
  349. package/workspace/operations/index.d.ts.map +1 -0
  350. package/workspace/operations/index.esm.js +2663 -0
  351. package/workspace/operations/index.esm.js.map +1 -0
  352. package/workspace/operations/validate.d.ts +85 -0
  353. package/workspace/operations/validate.d.ts.map +1 -0
@@ -0,0 +1,150 @@
1
+ import type { Logger } from '@hyperfrontend/logging';
2
+ import type { Tree } from '@hyperfrontend/project-scope';
3
+ import type { ChangelogEntry } from '../../changelog/models/entry';
4
+ import type { ConventionalCommit } from '../../commits/models/conventional';
5
+ import type { GitClient } from '../../git/factory';
6
+ import type { Registry } from '../../registry/models/registry';
7
+ import type { BumpType } from '../../semver/models/version';
8
+ export type { Logger } from '@hyperfrontend/logging';
9
+ /**
10
+ * Accumulated state during flow execution.
11
+ * Each step can read previous state and contribute updates.
12
+ */
13
+ export interface FlowState {
14
+ /** Current/local version from package.json */
15
+ readonly currentVersion?: string;
16
+ /** Published version on registry (null if never published) */
17
+ readonly publishedVersion?: string | null;
18
+ /** Calculated next version */
19
+ readonly nextVersion?: string;
20
+ /** Bump type (major/minor/patch/none) */
21
+ readonly bumpType?: BumpType;
22
+ /** Analyzed commits since last release */
23
+ readonly commits?: readonly ConventionalCommit[];
24
+ /** Tag name that marks the last release */
25
+ readonly lastReleaseTag?: string | null;
26
+ /** Generated changelog entry */
27
+ readonly changelogEntry?: ChangelogEntry;
28
+ /** Files modified during flow execution */
29
+ readonly modifiedFiles?: readonly string[];
30
+ /** Created git commit hash */
31
+ readonly commitHash?: string;
32
+ /** Created git tag name */
33
+ readonly tagName?: string;
34
+ /** Whether this is a first release (no prior versions) */
35
+ readonly isFirstRelease?: boolean;
36
+ /** Additional custom state for extensibility */
37
+ readonly [key: string]: unknown;
38
+ }
39
+ /**
40
+ * Flow configuration options.
41
+ */
42
+ export interface FlowConfig {
43
+ /** Preset name or custom configuration */
44
+ readonly preset?: 'conventional' | 'independent' | 'synced';
45
+ /** Commit types that trigger releases */
46
+ readonly releaseTypes?: readonly string[];
47
+ /** Commit types that trigger minor bumps */
48
+ readonly minorTypes?: readonly string[];
49
+ /** Commit types that trigger patch bumps */
50
+ readonly patchTypes?: readonly string[];
51
+ /** Skip git operations */
52
+ readonly skipGit?: boolean;
53
+ /** Skip tag creation */
54
+ readonly skipTag?: boolean;
55
+ /** Skip changelog update */
56
+ readonly skipChangelog?: boolean;
57
+ /** Dry run mode - preview changes without applying */
58
+ readonly dryRun?: boolean;
59
+ /** Custom commit message template */
60
+ readonly commitMessage?: string;
61
+ /** Custom tag format */
62
+ readonly tagFormat?: string;
63
+ /** Track dependencies for cascade bumps */
64
+ readonly trackDeps?: boolean;
65
+ /** Branch allowed for releases */
66
+ readonly releaseBranch?: string;
67
+ /** Base version for first release */
68
+ readonly firstReleaseVersion?: string;
69
+ /** Allow prerelease versions */
70
+ readonly allowPrerelease?: boolean;
71
+ /** Prerelease identifier (e.g., 'alpha', 'beta') */
72
+ readonly prereleaseId?: string;
73
+ /** Force a specific bump type, bypassing commit analysis */
74
+ readonly releaseAs?: 'major' | 'minor' | 'patch';
75
+ }
76
+ /**
77
+ * Default flow configuration values.
78
+ */
79
+ export declare const DEFAULT_FLOW_CONFIG: Required<FlowConfig>;
80
+ /**
81
+ * Execution context passed to each step.
82
+ * Contains all resources and accumulated state.
83
+ *
84
+ * Note: `state` is mutable within context to allow
85
+ * accumulation, but individual FlowState objects are immutable.
86
+ */
87
+ export interface FlowContext {
88
+ /** Workspace root path */
89
+ readonly workspaceRoot: string;
90
+ /** Target project name */
91
+ readonly projectName: string;
92
+ /** Project root path */
93
+ readonly projectRoot: string;
94
+ /** Package name from package.json */
95
+ readonly packageName: string;
96
+ /** Virtual file system tree */
97
+ readonly tree: Tree;
98
+ /** Registry client */
99
+ readonly registry: Registry;
100
+ /** Git client */
101
+ readonly git: GitClient;
102
+ /** Logger instance */
103
+ readonly logger: Logger;
104
+ /** Flow configuration */
105
+ readonly config: FlowConfig;
106
+ /** Accumulated state from previous steps (mutable reference) */
107
+ state: FlowState;
108
+ }
109
+ /**
110
+ * Result of a single step execution.
111
+ */
112
+ export interface FlowStepResult {
113
+ /** Step outcome */
114
+ readonly status: 'success' | 'skipped' | 'failed';
115
+ /** State updates from this step */
116
+ readonly stateUpdates?: Partial<FlowState>;
117
+ /** Descriptive message */
118
+ readonly message?: string;
119
+ /** Error if failed */
120
+ readonly error?: Error;
121
+ }
122
+ /**
123
+ * Step result with step identification.
124
+ */
125
+ export interface FlowStepResultWithId extends FlowStepResult {
126
+ /** Step identifier */
127
+ readonly stepId: string;
128
+ /** Step display name */
129
+ readonly stepName: string;
130
+ }
131
+ /**
132
+ * Overall flow execution status.
133
+ */
134
+ export type FlowStatus = 'success' | 'partial' | 'failed' | 'skipped';
135
+ /**
136
+ * Complete result of flow execution.
137
+ */
138
+ export interface FlowResult {
139
+ /** Overall flow outcome */
140
+ readonly status: FlowStatus;
141
+ /** Results for each step */
142
+ readonly steps: readonly FlowStepResultWithId[];
143
+ /** Final accumulated state */
144
+ readonly state: FlowState;
145
+ /** Duration in milliseconds */
146
+ readonly duration: number;
147
+ /** Summary message */
148
+ readonly summary: string;
149
+ }
150
+ //# sourceMappingURL=types.d.ts.map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M,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,sBAAsB;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IAEvB,wBAAwB;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAC1B;AAMD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAA;AAErE;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,2BAA2B;IAC3B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;IAE3B,4BAA4B;IAC5B,QAAQ,CAAC,KAAK,EAAE,SAAS,oBAAoB,EAAE,CAAA;IAE/C,8BAA8B;IAC9B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;IAEzB,+BAA+B;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IAEzB,sBAAsB;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB"}
@@ -0,0 +1,59 @@
1
+ import type { VersionFlow } from '../models/flow';
2
+ import type { FlowConfig } from '../models/types';
3
+ /**
4
+ * Default configuration for conventional flow.
5
+ */
6
+ export declare const CONVENTIONAL_FLOW_CONFIG: FlowConfig;
7
+ /**
8
+ * Creates a conventional flow.
9
+ *
10
+ * This flow follows the standard conventional commits workflow:
11
+ * 1. Fetch published version from registry
12
+ * 2. Analyze commits since last release
13
+ * 3. Calculate version bump based on commit types
14
+ * 4. Check if version already published (idempotency)
15
+ * 5. Generate changelog entry
16
+ * 6. Update package.json version
17
+ * 7. Write changelog to file
18
+ * 8. Create git commit (optional)
19
+ * 9. Create git tag (optional, typically after publish)
20
+ *
21
+ * @param config - Optional configuration overrides
22
+ * @returns A VersionFlow configured for conventional commits
23
+ *
24
+ * @example
25
+ * ```typescript
26
+ * import { createConventionalFlow, executeFlow } from '@hyperfrontend/versioning'
27
+ *
28
+ * // Use defaults
29
+ * const flow = createConventionalFlow()
30
+ *
31
+ * // With overrides
32
+ * const customFlow = createConventionalFlow({
33
+ * skipTag: false,
34
+ * releaseTypes: ['feat', 'fix'],
35
+ * })
36
+ *
37
+ * const result = await executeFlow(flow, 'lib-utils', '/workspace')
38
+ * ```
39
+ */
40
+ export declare function createConventionalFlow(config?: Partial<FlowConfig>): VersionFlow;
41
+ /**
42
+ * Creates a minimal flow for quick releases.
43
+ *
44
+ * Skips changelog and tag creation.
45
+ *
46
+ * @param config - Optional configuration overrides
47
+ * @returns A minimal VersionFlow
48
+ */
49
+ export declare function createMinimalFlow(config?: Partial<FlowConfig>): VersionFlow;
50
+ /**
51
+ * Creates a changelog-only flow.
52
+ *
53
+ * Only generates changelog, no version bumps or git operations.
54
+ *
55
+ * @param config - Optional configuration overrides
56
+ * @returns A VersionFlow that only updates changelog
57
+ */
58
+ export declare function createChangelogOnlyFlow(config?: Partial<FlowConfig>): VersionFlow;
59
+ //# sourceMappingURL=conventional.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conventional.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/versioning/src/flow/presets/conventional.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAcjD;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,UAatC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,WAAW,CAsBhF;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,WAAW,CAM3E;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,WAAW,CAqBjF"}
@@ -0,0 +1,61 @@
1
+ import type { VersionFlow } from '../models/flow';
2
+ import type { FlowStep } from '../models/step';
3
+ import type { FlowConfig } from '../models/types';
4
+ /**
5
+ * Default configuration for independent flow.
6
+ */
7
+ export declare const INDEPENDENT_FLOW_CONFIG: FlowConfig;
8
+ /**
9
+ * Creates a step that checks for dependent package bumps.
10
+ *
11
+ * In independent versioning, when a dependency is bumped,
12
+ * dependents may also need version bumps.
13
+ *
14
+ * @returns A FlowStep that checks dependent bumps
15
+ */
16
+ export declare function createCheckDependentBumpsStep(): FlowStep;
17
+ /**
18
+ * Creates an independent versioning flow.
19
+ *
20
+ * This flow is designed for monorepos where each package
21
+ * is versioned independently:
22
+ *
23
+ * 1. Fetch published version from registry
24
+ * 2. Analyze commits since last release
25
+ * 3. Calculate version bump based on commit types
26
+ * 4. Check for dependent package bumps (cascade)
27
+ * 5. Check if version already published (idempotency)
28
+ * 6. Generate changelog entry
29
+ * 7. Update package.json version
30
+ * 8. Cascade dependency updates
31
+ * 9. Write changelog to file
32
+ * 10. Create git commit
33
+ * 11. Create git tag
34
+ *
35
+ * @param config - Optional configuration overrides
36
+ * @returns A VersionFlow configured for independent versioning
37
+ *
38
+ * @example
39
+ * ```typescript
40
+ * import { createIndependentFlow, executeFlow } from '@hyperfrontend/versioning'
41
+ *
42
+ * const flow = createIndependentFlow()
43
+ * const result = await executeFlow(flow, 'lib-utils', '/workspace')
44
+ *
45
+ * // Check which dependents were bumped
46
+ * console.log(result.state.cascadedBumps)
47
+ * ```
48
+ */
49
+ export declare function createIndependentFlow(config?: Partial<FlowConfig>): VersionFlow;
50
+ /**
51
+ * Creates a flow for releasing multiple packages independently.
52
+ *
53
+ * This is a variant that skips commit/tag creation, intended
54
+ * to be used when releasing multiple packages in sequence
55
+ * with a single commit at the end.
56
+ *
57
+ * @param config - Optional configuration overrides
58
+ * @returns A VersionFlow for batch independent releases
59
+ */
60
+ export declare function createBatchReleaseFlow(config?: Partial<FlowConfig>): VersionFlow;
61
+ //# sourceMappingURL=independent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"independent.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/versioning/src/flow/presets/independent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAiBjD;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,UAIrC,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,IAAI,QAAQ,CAkCxD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,WAAW,CAwB/E;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,WAAW,CAuBhF"}