@fuzdev/fuz_gitops 0.78.0 → 0.79.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 (196) hide show
  1. package/README.md +91 -17
  2. package/dist/ModulesDetail.svelte +22 -27
  3. package/dist/ModulesDetail.svelte.d.ts.map +1 -1
  4. package/dist/ModulesNav.svelte +8 -5
  5. package/dist/ModulesNav.svelte.d.ts.map +1 -1
  6. package/dist/ModulesPage.svelte +3 -5
  7. package/dist/ModulesPage.svelte.d.ts.map +1 -1
  8. package/dist/PageFooter.svelte +2 -2
  9. package/dist/PageHeader.svelte +6 -6
  10. package/dist/PageHeader.svelte.d.ts +0 -3
  11. package/dist/PageHeader.svelte.d.ts.map +1 -1
  12. package/dist/PullRequestsDetail.svelte +29 -20
  13. package/dist/PullRequestsDetail.svelte.d.ts.map +1 -1
  14. package/dist/PullRequestsPage.svelte +4 -6
  15. package/dist/PullRequestsPage.svelte.d.ts.map +1 -1
  16. package/dist/ReposTable.svelte +43 -55
  17. package/dist/ReposTable.svelte.d.ts.map +1 -1
  18. package/dist/ReposTree.svelte +9 -21
  19. package/dist/ReposTree.svelte.d.ts.map +1 -1
  20. package/dist/ReposTreeNav.svelte +9 -12
  21. package/dist/ReposTreeNav.svelte.d.ts.map +1 -1
  22. package/dist/TablePage.svelte +3 -5
  23. package/dist/TablePage.svelte.d.ts.map +1 -1
  24. package/dist/TreeItemPage.svelte +3 -5
  25. package/dist/TreeItemPage.svelte.d.ts.map +1 -1
  26. package/dist/TreePage.svelte +3 -5
  27. package/dist/TreePage.svelte.d.ts.map +1 -1
  28. package/dist/changeset_generator.d.ts.map +1 -1
  29. package/dist/changeset_generator.js +2 -2
  30. package/dist/changeset_reader.d.ts.map +1 -1
  31. package/dist/changeset_reader.js +3 -3
  32. package/dist/ci_reconcile.d.ts +6 -10
  33. package/dist/ci_reconcile.d.ts.map +1 -1
  34. package/dist/ci_reconcile.js +6 -8
  35. package/dist/dependency_graph.d.ts +26 -49
  36. package/dist/dependency_graph.d.ts.map +1 -1
  37. package/dist/dependency_graph.js +40 -83
  38. package/dist/dependency_updater.d.ts +1 -1
  39. package/dist/dependency_updater.d.ts.map +1 -1
  40. package/dist/dependency_updater.js +14 -9
  41. package/dist/fetch_repo_data.d.ts +34 -8
  42. package/dist/fetch_repo_data.d.ts.map +1 -1
  43. package/dist/fetch_repo_data.js +44 -22
  44. package/dist/fs_fetch_value_cache.d.ts +1 -1
  45. package/dist/fs_fetch_value_cache.d.ts.map +1 -1
  46. package/dist/fs_fetch_value_cache.js +3 -3
  47. package/dist/git_operations.d.ts +6 -49
  48. package/dist/git_operations.d.ts.map +1 -1
  49. package/dist/git_operations.js +13 -126
  50. package/dist/github.d.ts +17 -2
  51. package/dist/github.d.ts.map +1 -1
  52. package/dist/github.js +17 -8
  53. package/dist/github_helpers.d.ts.map +1 -1
  54. package/dist/github_helpers.js +3 -11
  55. package/dist/gitops_analyze.task.d.ts +24 -2
  56. package/dist/gitops_analyze.task.d.ts.map +1 -1
  57. package/dist/gitops_analyze.task.js +47 -34
  58. package/dist/gitops_config.d.ts +34 -79
  59. package/dist/gitops_config.d.ts.map +1 -1
  60. package/dist/gitops_config.js +76 -53
  61. package/dist/gitops_constants.d.ts +6 -4
  62. package/dist/gitops_constants.d.ts.map +1 -1
  63. package/dist/gitops_constants.js +6 -4
  64. package/dist/gitops_plan.task.d.ts +29 -3
  65. package/dist/gitops_plan.task.d.ts.map +1 -1
  66. package/dist/gitops_plan.task.js +83 -61
  67. package/dist/gitops_publish.task.d.ts +62 -2
  68. package/dist/gitops_publish.task.d.ts.map +1 -1
  69. package/dist/gitops_publish.task.js +193 -105
  70. package/dist/gitops_run.task.d.ts +74 -0
  71. package/dist/gitops_run.task.d.ts.map +1 -1
  72. package/dist/gitops_run.task.js +176 -162
  73. package/dist/gitops_sync.task.d.ts +65 -3
  74. package/dist/gitops_sync.task.d.ts.map +1 -1
  75. package/dist/gitops_sync.task.js +163 -37
  76. package/dist/gitops_task_helpers.d.ts +86 -59
  77. package/dist/gitops_task_helpers.d.ts.map +1 -1
  78. package/dist/gitops_task_helpers.js +120 -79
  79. package/dist/gitops_validate.task.d.ts +1 -2
  80. package/dist/gitops_validate.task.d.ts.map +1 -1
  81. package/dist/gitops_validate.task.js +25 -32
  82. package/dist/graph_validation.d.ts +16 -27
  83. package/dist/graph_validation.d.ts.map +1 -1
  84. package/dist/graph_validation.js +24 -65
  85. package/dist/local_repo.d.ts +50 -62
  86. package/dist/local_repo.d.ts.map +1 -1
  87. package/dist/local_repo.js +83 -196
  88. package/dist/log_helpers.d.ts +8 -8
  89. package/dist/log_helpers.d.ts.map +1 -1
  90. package/dist/multi_repo_publisher.d.ts +10 -0
  91. package/dist/multi_repo_publisher.d.ts.map +1 -1
  92. package/dist/multi_repo_publisher.js +125 -61
  93. package/dist/npm_registry.d.ts +23 -19
  94. package/dist/npm_registry.d.ts.map +1 -1
  95. package/dist/npm_registry.js +21 -48
  96. package/dist/operations.d.ts +75 -180
  97. package/dist/operations.d.ts.map +1 -1
  98. package/dist/operations.js +15 -7
  99. package/dist/operations_defaults.d.ts +17 -2
  100. package/dist/operations_defaults.d.ts.map +1 -1
  101. package/dist/operations_defaults.js +111 -128
  102. package/dist/output_helpers.d.ts +36 -0
  103. package/dist/output_helpers.d.ts.map +1 -1
  104. package/dist/output_helpers.js +37 -3
  105. package/dist/preflight_checks.d.ts +20 -27
  106. package/dist/preflight_checks.d.ts.map +1 -1
  107. package/dist/preflight_checks.js +37 -126
  108. package/dist/publish_gate.d.ts.map +1 -1
  109. package/dist/publish_steps.d.ts +2 -4
  110. package/dist/publish_steps.d.ts.map +1 -1
  111. package/dist/publish_steps.js +4 -8
  112. package/dist/publishing_event.d.ts +2 -8
  113. package/dist/publishing_event.d.ts.map +1 -1
  114. package/dist/publishing_event.js +20 -17
  115. package/dist/publishing_event_handler.d.ts +10 -8
  116. package/dist/publishing_event_handler.d.ts.map +1 -1
  117. package/dist/publishing_event_handler.js +19 -17
  118. package/dist/publishing_plan.d.ts +16 -1
  119. package/dist/publishing_plan.d.ts.map +1 -1
  120. package/dist/publishing_plan.js +332 -254
  121. package/dist/publishing_plan_helpers.d.ts.map +1 -1
  122. package/dist/publishing_plan_helpers.js +3 -3
  123. package/dist/publishing_plan_logging.d.ts +1 -1
  124. package/dist/publishing_plan_logging.d.ts.map +1 -1
  125. package/dist/publishing_plan_logging.js +22 -15
  126. package/dist/repo.svelte.d.ts +7 -0
  127. package/dist/repo.svelte.d.ts.map +1 -1
  128. package/dist/repo.svelte.js +3 -0
  129. package/dist/repo_readiness.d.ts +210 -0
  130. package/dist/repo_readiness.d.ts.map +1 -0
  131. package/dist/repo_readiness.js +516 -0
  132. package/dist/repos_status.d.ts +3340 -0
  133. package/dist/repos_status.d.ts.map +1 -0
  134. package/dist/repos_status.js +555 -0
  135. package/dist/repos_status_load.d.ts +65 -0
  136. package/dist/repos_status_load.d.ts.map +1 -0
  137. package/dist/repos_status_load.js +131 -0
  138. package/dist/version_utils.js +1 -1
  139. package/package.json +15 -34
  140. package/src/lib/cargo_toml.ts +3 -3
  141. package/src/lib/changeset_generator.ts +19 -19
  142. package/src/lib/changeset_reader.ts +18 -18
  143. package/src/lib/ci_reconcile.ts +12 -16
  144. package/src/lib/dependency_graph.ts +61 -113
  145. package/src/lib/dependency_updater.ts +36 -30
  146. package/src/lib/fetch_repo_data.ts +71 -34
  147. package/src/lib/fs_fetch_value_cache.ts +15 -11
  148. package/src/lib/git_operations.ts +22 -194
  149. package/src/lib/github.ts +33 -21
  150. package/src/lib/github_helpers.ts +9 -16
  151. package/src/lib/gitops_analyze.task.ts +104 -66
  152. package/src/lib/gitops_config.ts +90 -139
  153. package/src/lib/gitops_constants.ts +6 -4
  154. package/src/lib/gitops_plan.task.ts +128 -76
  155. package/src/lib/gitops_publish.task.ts +280 -144
  156. package/src/lib/gitops_run.task.ts +265 -193
  157. package/src/lib/gitops_sync.task.ts +236 -52
  158. package/src/lib/gitops_task_helpers.ts +170 -114
  159. package/src/lib/gitops_validate.task.ts +44 -54
  160. package/src/lib/graph_validation.ts +28 -89
  161. package/src/lib/local_repo.ts +128 -335
  162. package/src/lib/log_helpers.ts +18 -28
  163. package/src/lib/multi_repo_publisher.ts +192 -110
  164. package/src/lib/npm_registry.ts +42 -67
  165. package/src/lib/operations.ts +99 -160
  166. package/src/lib/operations_defaults.ts +157 -201
  167. package/src/lib/output_helpers.ts +58 -6
  168. package/src/lib/preflight_checks.ts +52 -188
  169. package/src/lib/publish_gate.ts +7 -9
  170. package/src/lib/publish_steps.ts +27 -25
  171. package/src/lib/publishing_event.ts +26 -23
  172. package/src/lib/publishing_event_handler.ts +24 -22
  173. package/src/lib/publishing_plan.ts +474 -310
  174. package/src/lib/publishing_plan_helpers.ts +16 -12
  175. package/src/lib/publishing_plan_logging.ts +53 -44
  176. package/src/lib/repo.svelte.ts +16 -8
  177. package/src/lib/repo_readiness.ts +647 -0
  178. package/src/lib/repos_status.ts +671 -0
  179. package/src/lib/repos_status_load.ts +173 -0
  180. package/src/lib/version_utils.ts +3 -3
  181. package/dist/config_reconcile.d.ts +0 -46
  182. package/dist/config_reconcile.d.ts.map +0 -1
  183. package/dist/config_reconcile.js +0 -60
  184. package/dist/paths.d.ts +0 -7
  185. package/dist/paths.d.ts.map +0 -1
  186. package/dist/paths.js +0 -6
  187. package/dist/repo_ops.d.ts +0 -59
  188. package/dist/repo_ops.d.ts.map +0 -1
  189. package/dist/repo_ops.js +0 -170
  190. package/dist/resolved_gitops_config.d.ts +0 -9
  191. package/dist/resolved_gitops_config.d.ts.map +0 -1
  192. package/dist/resolved_gitops_config.js +0 -12
  193. package/src/lib/config_reconcile.ts +0 -94
  194. package/src/lib/paths.ts +0 -6
  195. package/src/lib/repo_ops.ts +0 -216
  196. package/src/lib/resolved_gitops_config.ts +0 -27
@@ -1,15 +1,13 @@
1
- import type {Logger} from '@fuzdev/fuz_util/log.ts';
2
- import {styleText as st} from 'node:util';
1
+ import type { Logger } from '@fuzdev/fuz_util/log.ts';
2
+ import { styleText as st } from 'node:util';
3
3
 
4
- import type {DependencyGraphBuilder} from './dependency_graph.ts';
4
+ import type { DependencyAnalysis } from './dependency_graph.ts';
5
5
 
6
6
  /**
7
7
  * Formats wildcard dependencies as styled strings.
8
8
  * Returns array of lines for inclusion in output.
9
9
  */
10
- export const format_wildcard_dependencies = (
11
- analysis: ReturnType<DependencyGraphBuilder['analyze']>,
12
- ): Array<string> => {
10
+ export const format_wildcard_dependencies = (analysis: DependencyAnalysis): Array<string> => {
13
11
  if (analysis.wildcard_deps.length === 0) return [];
14
12
 
15
13
  const lines: Array<string> = [];
@@ -17,7 +15,7 @@ export const format_wildcard_dependencies = (
17
15
  // a leading `\n` in the header would leave the header line unprefixed.
18
16
  lines.push('');
19
17
  lines.push(st('yellow', `⚠️ Found ${analysis.wildcard_deps.length} wildcard dependencies:`));
20
- for (const {pkg, dep, version} of analysis.wildcard_deps) {
18
+ for (const { pkg, dep, version } of analysis.wildcard_deps) {
21
19
  lines.push(` ${pkg} → ${dep} ${st('red', version)}`);
22
20
  }
23
21
  return lines;
@@ -27,9 +25,7 @@ export const format_wildcard_dependencies = (
27
25
  * Formats dev circular dependencies as styled strings.
28
26
  * Returns array of lines for inclusion in output.
29
27
  */
30
- export const format_dev_cycles = (
31
- analysis: ReturnType<DependencyGraphBuilder['analyze']>,
32
- ): Array<string> => {
28
+ export const format_dev_cycles = (analysis: DependencyAnalysis): Array<string> => {
33
29
  if (analysis.dev_cycles.length === 0) return [];
34
30
 
35
31
  const lines: Array<string> = [];
@@ -37,8 +33,8 @@ export const format_dev_cycles = (
37
33
  lines.push(
38
34
  st(
39
35
  'dim',
40
- `ℹ️ Found ${analysis.dev_cycles.length} dev circular dependencies (normal, non-blocking):`,
41
- ),
36
+ `ℹ️ Found ${analysis.dev_cycles.length} dev circular dependencies (normal, non-blocking):`
37
+ )
42
38
  );
43
39
  for (const cycle of analysis.dev_cycles) {
44
40
  lines.push(st('dim', ` ${cycle.join(' → ')}`));
@@ -50,9 +46,7 @@ export const format_dev_cycles = (
50
46
  * Formats production/peer circular dependencies as styled strings.
51
47
  * Returns array of lines for inclusion in output.
52
48
  */
53
- export const format_production_cycles = (
54
- analysis: ReturnType<DependencyGraphBuilder['analyze']>,
55
- ): Array<string> => {
49
+ export const format_production_cycles = (analysis: DependencyAnalysis): Array<string> => {
56
50
  if (analysis.production_cycles.length === 0) return [];
57
51
 
58
52
  const lines: Array<string> = [];
@@ -60,8 +54,8 @@ export const format_production_cycles = (
60
54
  lines.push(
61
55
  st(
62
56
  'red',
63
- `❌ Found ${analysis.production_cycles.length} production/peer circular dependencies (blocks publishing):`,
64
- ),
57
+ `❌ Found ${analysis.production_cycles.length} production/peer circular dependencies (blocks publishing):`
58
+ )
65
59
  );
66
60
  for (const cycle of analysis.production_cycles) {
67
61
  lines.push(` ${st('red', cycle.join(' → '))}`);
@@ -74,9 +68,9 @@ export const format_production_cycles = (
74
68
  * Wildcard dependencies require attention and should be reviewed.
75
69
  */
76
70
  export const log_wildcard_dependencies = (
77
- analysis: ReturnType<DependencyGraphBuilder['analyze']>,
71
+ analysis: DependencyAnalysis,
78
72
  log: Logger,
79
- indent = '',
73
+ indent = ''
80
74
  ): void => {
81
75
  const lines = format_wildcard_dependencies(analysis);
82
76
  for (const line of lines) {
@@ -88,11 +82,7 @@ export const log_wildcard_dependencies = (
88
82
  * Logs dev circular dependencies as info.
89
83
  * Dev cycles are normal and non-blocking, so they're informational, not warnings.
90
84
  */
91
- export const log_dev_cycles = (
92
- analysis: ReturnType<DependencyGraphBuilder['analyze']>,
93
- log: Logger,
94
- indent = '',
95
- ): void => {
85
+ export const log_dev_cycles = (analysis: DependencyAnalysis, log: Logger, indent = ''): void => {
96
86
  const lines = format_dev_cycles(analysis);
97
87
  for (const line of lines) {
98
88
  log.info(indent + line);
@@ -104,9 +94,9 @@ export const log_dev_cycles = (
104
94
  * Production cycles block publishing and must be resolved.
105
95
  */
106
96
  export const log_production_cycles = (
107
- analysis: ReturnType<DependencyGraphBuilder['analyze']>,
97
+ analysis: DependencyAnalysis,
108
98
  log: Logger,
109
- indent = '',
99
+ indent = ''
110
100
  ): void => {
111
101
  const lines = format_production_cycles(analysis);
112
102
  for (const line of lines) {
@@ -119,9 +109,9 @@ export const log_production_cycles = (
119
109
  * Convenience function that calls all three logging functions in order.
120
110
  */
121
111
  export const log_dependency_analysis = (
122
- analysis: ReturnType<DependencyGraphBuilder['analyze']>,
112
+ analysis: DependencyAnalysis,
123
113
  log: Logger,
124
- indent = '',
114
+ indent = ''
125
115
  ): void => {
126
116
  log_wildcard_dependencies(analysis, log, indent);
127
117
  log_production_cycles(analysis, log, indent);