@fuzdev/fuz_gitops 0.77.0 → 0.78.1

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 (162) hide show
  1. package/README.md +25 -5
  2. package/dist/ModulesDetail.svelte +14 -12
  3. package/dist/ModulesDetail.svelte.d.ts.map +1 -1
  4. package/dist/ModulesNav.svelte +6 -6
  5. package/dist/ModulesNav.svelte.d.ts.map +1 -1
  6. package/dist/ModulesPage.svelte +2 -2
  7. package/dist/ModulesPage.svelte.d.ts.map +1 -1
  8. package/dist/PageFooter.svelte +2 -2
  9. package/dist/PageHeader.svelte +5 -5
  10. package/dist/PageHeader.svelte.d.ts +1 -1
  11. package/dist/PageHeader.svelte.d.ts.map +1 -1
  12. package/dist/PullRequestsDetail.svelte +25 -17
  13. package/dist/PullRequestsDetail.svelte.d.ts.map +1 -1
  14. package/dist/PullRequestsPage.svelte +3 -3
  15. package/dist/PullRequestsPage.svelte.d.ts.map +1 -1
  16. package/dist/ReposTable.svelte +24 -15
  17. package/dist/ReposTable.svelte.d.ts.map +1 -1
  18. package/dist/ReposTree.svelte +8 -6
  19. package/dist/ReposTree.svelte.d.ts.map +1 -1
  20. package/dist/ReposTreeNav.svelte +10 -11
  21. package/dist/ReposTreeNav.svelte.d.ts.map +1 -1
  22. package/dist/TablePage.svelte +2 -2
  23. package/dist/TablePage.svelte.d.ts.map +1 -1
  24. package/dist/TreeItemPage.svelte +2 -2
  25. package/dist/TreeItemPage.svelte.d.ts.map +1 -1
  26. package/dist/TreePage.svelte +2 -2
  27. package/dist/TreePage.svelte.d.ts.map +1 -1
  28. package/dist/cargo_toml.d.ts +33 -0
  29. package/dist/cargo_toml.d.ts.map +1 -0
  30. package/dist/cargo_toml.js +74 -0
  31. package/dist/changeset_generator.d.ts +1 -1
  32. package/dist/changeset_generator.d.ts.map +1 -1
  33. package/dist/changeset_generator.js +2 -2
  34. package/dist/changeset_reader.d.ts +1 -1
  35. package/dist/changeset_reader.d.ts.map +1 -1
  36. package/dist/changeset_reader.js +3 -3
  37. package/dist/config_reconcile.d.ts.map +1 -1
  38. package/dist/config_reconcile.js +6 -2
  39. package/dist/dependency_graph.d.ts +2 -2
  40. package/dist/dependency_graph.d.ts.map +1 -1
  41. package/dist/dependency_graph.js +9 -9
  42. package/dist/dependency_updater.d.ts +1 -1
  43. package/dist/dependency_updater.d.ts.map +1 -1
  44. package/dist/dependency_updater.js +8 -8
  45. package/dist/fetch_repo_data.d.ts +2 -2
  46. package/dist/fetch_repo_data.d.ts.map +1 -1
  47. package/dist/fetch_repo_data.js +4 -4
  48. package/dist/fs_fetch_value_cache.d.ts +1 -1
  49. package/dist/fs_fetch_value_cache.d.ts.map +1 -1
  50. package/dist/fs_fetch_value_cache.js +5 -5
  51. package/dist/git_operations.d.ts +1 -1
  52. package/dist/git_operations.d.ts.map +1 -1
  53. package/dist/git_operations.js +2 -2
  54. package/dist/github.d.ts +2 -2
  55. package/dist/github.d.ts.map +1 -1
  56. package/dist/github.js +7 -7
  57. package/dist/github_helpers.d.ts.map +1 -1
  58. package/dist/github_helpers.js +1 -1
  59. package/dist/gitops_analyze.task.d.ts.map +1 -1
  60. package/dist/gitops_analyze.task.js +21 -14
  61. package/dist/gitops_config.d.ts +2 -2
  62. package/dist/gitops_config.d.ts.map +1 -1
  63. package/dist/gitops_config.js +5 -5
  64. package/dist/gitops_plan.task.d.ts.map +1 -1
  65. package/dist/gitops_plan.task.js +8 -8
  66. package/dist/gitops_publish.task.d.ts.map +1 -1
  67. package/dist/gitops_publish.task.js +15 -12
  68. package/dist/gitops_run.task.d.ts.map +1 -1
  69. package/dist/gitops_run.task.js +10 -10
  70. package/dist/gitops_sync.task.d.ts.map +1 -1
  71. package/dist/gitops_sync.task.js +15 -13
  72. package/dist/gitops_task_helpers.d.ts +1 -1
  73. package/dist/gitops_task_helpers.d.ts.map +1 -1
  74. package/dist/gitops_task_helpers.js +4 -4
  75. package/dist/gitops_validate.task.d.ts.map +1 -1
  76. package/dist/gitops_validate.task.js +14 -14
  77. package/dist/graph_validation.d.ts +2 -2
  78. package/dist/graph_validation.d.ts.map +1 -1
  79. package/dist/graph_validation.js +5 -3
  80. package/dist/local_repo.d.ts +21 -7
  81. package/dist/local_repo.d.ts.map +1 -1
  82. package/dist/local_repo.js +64 -16
  83. package/dist/log_helpers.d.ts +1 -1
  84. package/dist/log_helpers.d.ts.map +1 -1
  85. package/dist/multi_repo_publisher.d.ts +3 -3
  86. package/dist/multi_repo_publisher.d.ts.map +1 -1
  87. package/dist/multi_repo_publisher.js +24 -20
  88. package/dist/npm_registry.d.ts +1 -1
  89. package/dist/npm_registry.d.ts.map +1 -1
  90. package/dist/npm_registry.js +4 -4
  91. package/dist/operations.d.ts +4 -4
  92. package/dist/operations.d.ts.map +1 -1
  93. package/dist/operations_defaults.d.ts.map +1 -1
  94. package/dist/operations_defaults.js +16 -16
  95. package/dist/output_helpers.d.ts +1 -1
  96. package/dist/output_helpers.d.ts.map +1 -1
  97. package/dist/preflight_checks.d.ts +2 -2
  98. package/dist/preflight_checks.d.ts.map +1 -1
  99. package/dist/preflight_checks.js +5 -5
  100. package/dist/publish_gate.d.ts.map +1 -1
  101. package/dist/publish_steps.d.ts.map +1 -1
  102. package/dist/publish_steps.js +4 -4
  103. package/dist/publishing_event.d.ts.map +1 -1
  104. package/dist/publishing_event.js +16 -14
  105. package/dist/publishing_event_handler.d.ts.map +1 -1
  106. package/dist/publishing_event_handler.js +6 -6
  107. package/dist/publishing_plan.d.ts +3 -3
  108. package/dist/publishing_plan.d.ts.map +1 -1
  109. package/dist/publishing_plan.js +25 -15
  110. package/dist/publishing_plan_helpers.d.ts.map +1 -1
  111. package/dist/publishing_plan_helpers.js +3 -3
  112. package/dist/publishing_plan_logging.d.ts +1 -1
  113. package/dist/publishing_plan_logging.d.ts.map +1 -1
  114. package/dist/publishing_plan_logging.js +2 -2
  115. package/dist/repo.svelte.d.ts +5 -5
  116. package/dist/repo.svelte.d.ts.map +1 -1
  117. package/dist/repo.svelte.js +2 -2
  118. package/dist/repo_ops.js +2 -2
  119. package/dist/resolved_gitops_config.d.ts.map +1 -1
  120. package/dist/resolved_gitops_config.js +1 -1
  121. package/dist/version_utils.js +1 -1
  122. package/package.json +16 -15
  123. package/src/lib/cargo_toml.ts +82 -0
  124. package/src/lib/changeset_generator.ts +20 -20
  125. package/src/lib/changeset_reader.ts +18 -18
  126. package/src/lib/ci_reconcile.ts +5 -5
  127. package/src/lib/config_reconcile.ts +8 -4
  128. package/src/lib/dependency_graph.ts +28 -28
  129. package/src/lib/dependency_updater.ts +30 -30
  130. package/src/lib/fetch_repo_data.ts +11 -11
  131. package/src/lib/fs_fetch_value_cache.ts +14 -10
  132. package/src/lib/git_operations.ts +31 -31
  133. package/src/lib/github.ts +19 -19
  134. package/src/lib/github_helpers.ts +6 -6
  135. package/src/lib/gitops_analyze.task.ts +56 -48
  136. package/src/lib/gitops_config.ts +14 -14
  137. package/src/lib/gitops_plan.task.ts +32 -32
  138. package/src/lib/gitops_publish.task.ts +52 -49
  139. package/src/lib/gitops_run.task.ts +29 -29
  140. package/src/lib/gitops_sync.task.ts +39 -30
  141. package/src/lib/gitops_task_helpers.ts +21 -21
  142. package/src/lib/gitops_validate.task.ts +38 -38
  143. package/src/lib/graph_validation.ts +14 -13
  144. package/src/lib/local_repo.ts +130 -64
  145. package/src/lib/log_helpers.ts +15 -15
  146. package/src/lib/multi_repo_publisher.ts +75 -74
  147. package/src/lib/npm_registry.ts +13 -13
  148. package/src/lib/operations.ts +50 -39
  149. package/src/lib/operations_defaults.ts +108 -106
  150. package/src/lib/output_helpers.ts +4 -4
  151. package/src/lib/preflight_checks.ts +28 -28
  152. package/src/lib/publish_gate.ts +7 -9
  153. package/src/lib/publish_steps.ts +15 -15
  154. package/src/lib/publishing_event.ts +22 -20
  155. package/src/lib/publishing_event_handler.ts +8 -8
  156. package/src/lib/publishing_plan.ts +69 -57
  157. package/src/lib/publishing_plan_helpers.ts +16 -12
  158. package/src/lib/publishing_plan_logging.ts +23 -23
  159. package/src/lib/repo.svelte.ts +8 -8
  160. package/src/lib/repo_ops.ts +12 -12
  161. package/src/lib/resolved_gitops_config.ts +5 -5
  162. package/src/lib/version_utils.ts +3 -3
@@ -34,14 +34,14 @@
34
34
  * @module
35
35
  */
36
36
 
37
- import type {Result} from '@fuzdev/fuz_util/result.js';
38
- import type {FsError} from '@fuzdev/fuz_util/fs.js';
39
- import type {Logger} from '@fuzdev/fuz_util/log.js';
40
- import type {LocalRepo} from './local_repo.js';
41
- import type {ChangesetInfo} from './changeset_reader.js';
42
- import type {BumpType} from './version_utils.js';
43
- import type {PreflightOptions, PreflightResult} from './preflight_checks.js';
44
- import type {WaitOptions} from './npm_registry.js';
37
+ import type { Result } from '@fuzdev/fuz_util/result.ts';
38
+ import type { FsError } from '@fuzdev/fuz_util/fs.ts';
39
+ import type { Logger } from '@fuzdev/fuz_util/log.ts';
40
+ import type { LocalRepo } from './local_repo.ts';
41
+ import type { ChangesetInfo } from './changeset_reader.ts';
42
+ import type { BumpType } from './version_utils.ts';
43
+ import type { PreflightOptions, PreflightResult } from './preflight_checks.ts';
44
+ import type { WaitOptions } from './npm_registry.ts';
45
45
 
46
46
  /**
47
47
  * Changeset operations for reading and predicting versions from `.changeset/*.md` files.
@@ -53,7 +53,7 @@ export interface ChangesetOperations {
53
53
  */
54
54
  has_changesets: (options: {
55
55
  repo: LocalRepo;
56
- }) => Promise<Result<{value: boolean}, {message: string}>>;
56
+ }) => Promise<Result<{ value: boolean }, { message: string }>>;
57
57
 
58
58
  /**
59
59
  * Reads all changeset files from a repo.
@@ -62,7 +62,7 @@ export interface ChangesetOperations {
62
62
  read_changesets: (options: {
63
63
  repo: LocalRepo;
64
64
  log?: Logger;
65
- }) => Promise<Result<{value: Array<ChangesetInfo>}, {message: string}>>;
65
+ }) => Promise<Result<{ value: Array<ChangesetInfo> }, { message: string }>>;
66
66
 
67
67
  /**
68
68
  * Predicts the next version based on changesets.
@@ -72,7 +72,7 @@ export interface ChangesetOperations {
72
72
  predict_next_version: (options: {
73
73
  repo: LocalRepo;
74
74
  log?: Logger;
75
- }) => Promise<Result<{version: string; bump_type: BumpType}, {message: string}> | null>;
75
+ }) => Promise<Result<{ version: string; bump_type: BumpType }, { message: string }> | null>;
76
76
  }
77
77
 
78
78
  /**
@@ -85,7 +85,7 @@ export interface GitOperations {
85
85
  */
86
86
  current_branch_name: (options?: {
87
87
  cwd?: string;
88
- }) => Promise<Result<{value: string}, {message: string}>>;
88
+ }) => Promise<Result<{ value: string }, { message: string }>>;
89
89
 
90
90
  /**
91
91
  * Gets the current commit hash.
@@ -93,19 +93,22 @@ export interface GitOperations {
93
93
  current_commit_hash: (options?: {
94
94
  branch?: string;
95
95
  cwd?: string;
96
- }) => Promise<Result<{value: string}, {message: string}>>;
96
+ }) => Promise<Result<{ value: string }, { message: string }>>;
97
97
 
98
98
  /**
99
99
  * Checks if the workspace is clean (no uncommitted changes).
100
100
  */
101
101
  check_clean_workspace: (options?: {
102
102
  cwd?: string;
103
- }) => Promise<Result<{value: boolean}, {message: string}>>;
103
+ }) => Promise<Result<{ value: boolean }, { message: string }>>;
104
104
 
105
105
  /**
106
106
  * Checks out a branch.
107
107
  */
108
- checkout: (options: {branch: string; cwd?: string}) => Promise<Result<object, {message: string}>>;
108
+ checkout: (options: {
109
+ branch: string;
110
+ cwd?: string;
111
+ }) => Promise<Result<object, { message: string }>>;
109
112
 
110
113
  /**
111
114
  * Pulls changes from remote.
@@ -114,7 +117,7 @@ export interface GitOperations {
114
117
  origin?: string;
115
118
  branch?: string;
116
119
  cwd?: string;
117
- }) => Promise<Result<object, {message: string}>>;
120
+ }) => Promise<Result<object, { message: string }>>;
118
121
 
119
122
  /**
120
123
  * Switches to a branch, optionally pulling.
@@ -123,7 +126,7 @@ export interface GitOperations {
123
126
  branch: string;
124
127
  pull?: boolean;
125
128
  cwd?: string;
126
- }) => Promise<Result<object, {message: string}>>;
129
+ }) => Promise<Result<object, { message: string }>>;
127
130
 
128
131
  /**
129
132
  * Checks if a remote exists.
@@ -131,7 +134,7 @@ export interface GitOperations {
131
134
  has_remote: (options?: {
132
135
  remote?: string;
133
136
  cwd?: string;
134
- }) => Promise<Result<{value: boolean}, {message: string}>>;
137
+ }) => Promise<Result<{ value: boolean }, { message: string }>>;
135
138
 
136
139
  /**
137
140
  * Stages files for commit.
@@ -139,12 +142,15 @@ export interface GitOperations {
139
142
  add: (options: {
140
143
  files: string | Array<string>;
141
144
  cwd?: string;
142
- }) => Promise<Result<object, {message: string}>>;
145
+ }) => Promise<Result<object, { message: string }>>;
143
146
 
144
147
  /**
145
148
  * Creates a commit.
146
149
  */
147
- commit: (options: {message: string; cwd?: string}) => Promise<Result<object, {message: string}>>;
150
+ commit: (options: {
151
+ message: string;
152
+ cwd?: string;
153
+ }) => Promise<Result<object, { message: string }>>;
148
154
 
149
155
  /**
150
156
  * Stages files and creates a commit.
@@ -153,14 +159,16 @@ export interface GitOperations {
153
159
  files: string | Array<string>;
154
160
  message: string;
155
161
  cwd?: string;
156
- }) => Promise<Result<object, {message: string}>>;
162
+ }) => Promise<Result<object, { message: string }>>;
157
163
 
158
164
  /**
159
165
  * Checks whether the working tree has any changes — staged, unstaged, or
160
166
  * untracked (`git status --porcelain`). Broader than `list_uncommitted_files`,
161
167
  * which reports only tracked working-tree changes relative to HEAD.
162
168
  */
163
- has_changes: (options?: {cwd?: string}) => Promise<Result<{value: boolean}, {message: string}>>;
169
+ has_changes: (options?: {
170
+ cwd?: string;
171
+ }) => Promise<Result<{ value: boolean }, { message: string }>>;
164
172
 
165
173
  /**
166
174
  * Lists uncommitted files in the working tree (`git diff --name-only HEAD`),
@@ -168,7 +176,7 @@ export interface GitOperations {
168
176
  */
169
177
  list_uncommitted_files: (options?: {
170
178
  cwd?: string;
171
- }) => Promise<Result<{value: Array<string>}, {message: string}>>;
179
+ }) => Promise<Result<{ value: Array<string> }, { message: string }>>;
172
180
 
173
181
  /**
174
182
  * Creates a git tag.
@@ -177,7 +185,7 @@ export interface GitOperations {
177
185
  tag_name: string;
178
186
  message?: string;
179
187
  cwd?: string;
180
- }) => Promise<Result<object, {message: string}>>;
188
+ }) => Promise<Result<object, { message: string }>>;
181
189
 
182
190
  /**
183
191
  * Pushes a tag to remote.
@@ -186,17 +194,20 @@ export interface GitOperations {
186
194
  tag_name: string;
187
195
  origin?: string;
188
196
  cwd?: string;
189
- }) => Promise<Result<object, {message: string}>>;
197
+ }) => Promise<Result<object, { message: string }>>;
190
198
 
191
199
  /**
192
200
  * Stashes uncommitted changes.
193
201
  */
194
- stash: (options?: {message?: string; cwd?: string}) => Promise<Result<object, {message: string}>>;
202
+ stash: (options?: {
203
+ message?: string;
204
+ cwd?: string;
205
+ }) => Promise<Result<object, { message: string }>>;
195
206
 
196
207
  /**
197
208
  * Pops the most recent stash.
198
209
  */
199
- stash_pop: (options?: {cwd?: string}) => Promise<Result<object, {message: string}>>;
210
+ stash_pop: (options?: { cwd?: string }) => Promise<Result<object, { message: string }>>;
200
211
 
201
212
  /**
202
213
  * Checks if a specific file changed between two commits.
@@ -206,7 +217,7 @@ export interface GitOperations {
206
217
  to_commit: string;
207
218
  file_path: string;
208
219
  cwd?: string;
209
- }) => Promise<Result<{value: boolean}, {message: string}>>;
220
+ }) => Promise<Result<{ value: boolean }, { message: string }>>;
210
221
  }
211
222
 
212
223
  /**
@@ -220,7 +231,7 @@ export interface ProcessOperations {
220
231
  cmd: string;
221
232
  args: Array<string>;
222
233
  cwd?: string;
223
- }) => Promise<Result<{stdout?: string; stderr?: string}, {message: string; stderr?: string}>>;
234
+ }) => Promise<Result<{ stdout?: string; stderr?: string }, { message: string; stderr?: string }>>;
224
235
  }
225
236
 
226
237
  /**
@@ -233,7 +244,7 @@ export interface BuildOperations {
233
244
  build_package: (options: {
234
245
  repo: LocalRepo;
235
246
  log?: Logger;
236
- }) => Promise<Result<object, {message: string; output?: string}>>;
247
+ }) => Promise<Result<object, { message: string; output?: string }>>;
237
248
  }
238
249
 
239
250
  /**
@@ -250,24 +261,24 @@ export interface NpmOperations {
250
261
  version: string;
251
262
  wait_options?: WaitOptions;
252
263
  log?: Logger;
253
- }) => Promise<Result<object, {message: string; timeout?: boolean}>>;
264
+ }) => Promise<Result<object, { message: string; timeout?: boolean }>>;
254
265
 
255
266
  /**
256
267
  * Checks npm authentication status.
257
268
  */
258
- check_auth: () => Promise<Result<{username: string}, {message: string}>>;
269
+ check_auth: () => Promise<Result<{ username: string }, { message: string }>>;
259
270
 
260
271
  /**
261
272
  * Checks if npm registry is reachable.
262
273
  */
263
- check_registry: () => Promise<Result<object, {message: string}>>;
274
+ check_registry: () => Promise<Result<object, { message: string }>>;
264
275
 
265
276
  /**
266
277
  * Installs npm dependencies.
267
278
  */
268
279
  install: (options?: {
269
280
  cwd?: string;
270
- }) => Promise<Result<object, {message: string; stderr?: string}>>;
281
+ }) => Promise<Result<object, { message: string; stderr?: string }>>;
271
282
  }
272
283
 
273
284
  /**
@@ -293,7 +304,7 @@ export interface PreflightOperations {
293
304
  *
294
305
  * Errors are typed via `FsError` (`not_found | permission_denied |
295
306
  * already_exists | io_error`) so callers can branch on `kind` instead of
296
- * regex-matching `message`. See `@fuzdev/fuz_util/fs.js`.
307
+ * regex-matching `message`. See `@fuzdev/fuz_util/fs.ts`.
297
308
  */
298
309
  export interface FsOperations {
299
310
  /**
@@ -302,22 +313,22 @@ export interface FsOperations {
302
313
  readFile: (options: {
303
314
  path: string;
304
315
  encoding: BufferEncoding;
305
- }) => Promise<Result<{value: string}, FsError>>;
316
+ }) => Promise<Result<{ value: string }, FsError>>;
306
317
 
307
318
  /**
308
319
  * Writes a file to the file system.
309
320
  */
310
- writeFile: (options: {path: string; content: string}) => Promise<Result<object, FsError>>;
321
+ writeFile: (options: { path: string; content: string }) => Promise<Result<object, FsError>>;
311
322
 
312
323
  /**
313
324
  * Creates a directory, optionally with recursive creation.
314
325
  */
315
- mkdir: (options: {path: string; recursive?: boolean}) => Promise<Result<object, FsError>>;
326
+ mkdir: (options: { path: string; recursive?: boolean }) => Promise<Result<object, FsError>>;
316
327
 
317
328
  /**
318
329
  * Checks if a path exists on the file system.
319
330
  */
320
- exists: (options: {path: string}) => Promise<boolean>;
331
+ exists: (options: { path: string }) => Promise<boolean>;
321
332
  }
322
333
 
323
334
  /**