@fuzdev/fuz_gitops 0.78.1 → 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.
- package/README.md +78 -24
- package/dist/ModulesDetail.svelte +15 -22
- package/dist/ModulesDetail.svelte.d.ts.map +1 -1
- package/dist/ModulesNav.svelte +4 -1
- package/dist/ModulesPage.svelte +1 -3
- package/dist/ModulesPage.svelte.d.ts.map +1 -1
- package/dist/PageHeader.svelte +2 -2
- package/dist/PageHeader.svelte.d.ts +0 -3
- package/dist/PageHeader.svelte.d.ts.map +1 -1
- package/dist/PullRequestsDetail.svelte +10 -9
- package/dist/PullRequestsDetail.svelte.d.ts.map +1 -1
- package/dist/PullRequestsPage.svelte +1 -3
- package/dist/PullRequestsPage.svelte.d.ts.map +1 -1
- package/dist/ReposTable.svelte +27 -48
- package/dist/ReposTable.svelte.d.ts.map +1 -1
- package/dist/ReposTree.svelte +5 -19
- package/dist/ReposTree.svelte.d.ts.map +1 -1
- package/dist/ReposTreeNav.svelte +5 -7
- package/dist/ReposTreeNav.svelte.d.ts.map +1 -1
- package/dist/TablePage.svelte +1 -3
- package/dist/TablePage.svelte.d.ts.map +1 -1
- package/dist/TreeItemPage.svelte +1 -3
- package/dist/TreeItemPage.svelte.d.ts.map +1 -1
- package/dist/TreePage.svelte +1 -3
- package/dist/TreePage.svelte.d.ts.map +1 -1
- package/dist/ci_reconcile.d.ts +6 -10
- package/dist/ci_reconcile.d.ts.map +1 -1
- package/dist/ci_reconcile.js +6 -8
- package/dist/dependency_graph.d.ts +26 -49
- package/dist/dependency_graph.d.ts.map +1 -1
- package/dist/dependency_graph.js +37 -80
- package/dist/dependency_updater.d.ts +1 -1
- package/dist/dependency_updater.d.ts.map +1 -1
- package/dist/dependency_updater.js +6 -1
- package/dist/fetch_repo_data.d.ts +34 -8
- package/dist/fetch_repo_data.d.ts.map +1 -1
- package/dist/fetch_repo_data.js +44 -22
- package/dist/fs_fetch_value_cache.d.ts +1 -1
- package/dist/fs_fetch_value_cache.js +1 -1
- package/dist/git_operations.d.ts +6 -49
- package/dist/git_operations.d.ts.map +1 -1
- package/dist/git_operations.js +13 -126
- package/dist/github.d.ts +17 -2
- package/dist/github.d.ts.map +1 -1
- package/dist/github.js +15 -6
- package/dist/github_helpers.d.ts.map +1 -1
- package/dist/github_helpers.js +3 -11
- package/dist/gitops_analyze.task.d.ts +24 -2
- package/dist/gitops_analyze.task.d.ts.map +1 -1
- package/dist/gitops_analyze.task.js +43 -30
- package/dist/gitops_config.d.ts +34 -79
- package/dist/gitops_config.d.ts.map +1 -1
- package/dist/gitops_config.js +76 -53
- package/dist/gitops_constants.d.ts +6 -4
- package/dist/gitops_constants.d.ts.map +1 -1
- package/dist/gitops_constants.js +6 -4
- package/dist/gitops_plan.task.d.ts +29 -3
- package/dist/gitops_plan.task.d.ts.map +1 -1
- package/dist/gitops_plan.task.js +80 -58
- package/dist/gitops_publish.task.d.ts +62 -2
- package/dist/gitops_publish.task.d.ts.map +1 -1
- package/dist/gitops_publish.task.js +187 -102
- package/dist/gitops_run.task.d.ts +74 -0
- package/dist/gitops_run.task.d.ts.map +1 -1
- package/dist/gitops_run.task.js +174 -160
- package/dist/gitops_sync.task.d.ts +65 -3
- package/dist/gitops_sync.task.d.ts.map +1 -1
- package/dist/gitops_sync.task.js +154 -30
- package/dist/gitops_task_helpers.d.ts +86 -59
- package/dist/gitops_task_helpers.d.ts.map +1 -1
- package/dist/gitops_task_helpers.js +120 -79
- package/dist/gitops_validate.task.d.ts +1 -2
- package/dist/gitops_validate.task.d.ts.map +1 -1
- package/dist/gitops_validate.task.js +15 -22
- package/dist/graph_validation.d.ts +16 -27
- package/dist/graph_validation.d.ts.map +1 -1
- package/dist/graph_validation.js +23 -64
- package/dist/local_repo.d.ts +50 -62
- package/dist/local_repo.d.ts.map +1 -1
- package/dist/local_repo.js +80 -193
- package/dist/log_helpers.d.ts +8 -8
- package/dist/log_helpers.d.ts.map +1 -1
- package/dist/multi_repo_publisher.d.ts +10 -0
- package/dist/multi_repo_publisher.d.ts.map +1 -1
- package/dist/multi_repo_publisher.js +115 -51
- package/dist/npm_registry.d.ts +23 -19
- package/dist/npm_registry.d.ts.map +1 -1
- package/dist/npm_registry.js +20 -47
- package/dist/operations.d.ts +75 -180
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +15 -7
- package/dist/operations_defaults.d.ts +17 -2
- package/dist/operations_defaults.d.ts.map +1 -1
- package/dist/operations_defaults.js +104 -121
- package/dist/output_helpers.d.ts +36 -0
- package/dist/output_helpers.d.ts.map +1 -1
- package/dist/output_helpers.js +37 -3
- package/dist/preflight_checks.d.ts +20 -27
- package/dist/preflight_checks.d.ts.map +1 -1
- package/dist/preflight_checks.js +37 -126
- package/dist/publish_steps.d.ts +2 -4
- package/dist/publish_steps.d.ts.map +1 -1
- package/dist/publish_steps.js +2 -6
- package/dist/publishing_event.d.ts +2 -8
- package/dist/publishing_event.d.ts.map +1 -1
- package/dist/publishing_event.js +5 -4
- package/dist/publishing_event_handler.d.ts +10 -8
- package/dist/publishing_event_handler.d.ts.map +1 -1
- package/dist/publishing_event_handler.js +14 -12
- package/dist/publishing_plan.d.ts +16 -1
- package/dist/publishing_plan.d.ts.map +1 -1
- package/dist/publishing_plan.js +328 -250
- package/dist/publishing_plan_logging.d.ts +1 -1
- package/dist/publishing_plan_logging.d.ts.map +1 -1
- package/dist/publishing_plan_logging.js +21 -14
- package/dist/repo.svelte.d.ts +7 -0
- package/dist/repo.svelte.d.ts.map +1 -1
- package/dist/repo.svelte.js +3 -0
- package/dist/repo_readiness.d.ts +210 -0
- package/dist/repo_readiness.d.ts.map +1 -0
- package/dist/repo_readiness.js +516 -0
- package/dist/repos_status.d.ts +3340 -0
- package/dist/repos_status.d.ts.map +1 -0
- package/dist/repos_status.js +555 -0
- package/dist/repos_status_load.d.ts +65 -0
- package/dist/repos_status_load.d.ts.map +1 -0
- package/dist/repos_status_load.js +131 -0
- package/package.json +7 -27
- package/src/lib/ci_reconcile.ts +7 -11
- package/src/lib/dependency_graph.ts +45 -97
- package/src/lib/dependency_updater.ts +7 -1
- package/src/lib/fetch_repo_data.ts +66 -29
- package/src/lib/fs_fetch_value_cache.ts +1 -1
- package/src/lib/git_operations.ts +15 -187
- package/src/lib/github.ts +20 -8
- package/src/lib/github_helpers.ts +5 -12
- package/src/lib/gitops_analyze.task.ts +79 -41
- package/src/lib/gitops_config.ts +88 -137
- package/src/lib/gitops_constants.ts +6 -4
- package/src/lib/gitops_plan.task.ts +113 -61
- package/src/lib/gitops_publish.task.ts +255 -122
- package/src/lib/gitops_run.task.ts +250 -178
- package/src/lib/gitops_sync.task.ts +208 -33
- package/src/lib/gitops_task_helpers.ts +166 -110
- package/src/lib/gitops_validate.task.ts +17 -27
- package/src/lib/graph_validation.ts +25 -86
- package/src/lib/local_repo.ts +109 -316
- package/src/lib/log_helpers.ts +8 -18
- package/src/lib/multi_repo_publisher.ts +138 -53
- package/src/lib/npm_registry.ts +37 -62
- package/src/lib/operations.ts +78 -150
- package/src/lib/operations_defaults.ts +108 -154
- package/src/lib/output_helpers.ts +55 -3
- package/src/lib/preflight_checks.ts +47 -183
- package/src/lib/publish_steps.ts +15 -13
- package/src/lib/publishing_event.ts +5 -4
- package/src/lib/publishing_event_handler.ts +18 -16
- package/src/lib/publishing_plan.ts +451 -287
- package/src/lib/publishing_plan_logging.ts +32 -23
- package/src/lib/repo.svelte.ts +8 -0
- package/src/lib/repo_readiness.ts +647 -0
- package/src/lib/repos_status.ts +671 -0
- package/src/lib/repos_status_load.ts +173 -0
- package/dist/config_reconcile.d.ts +0 -46
- package/dist/config_reconcile.d.ts.map +0 -1
- package/dist/config_reconcile.js +0 -64
- package/dist/paths.d.ts +0 -7
- package/dist/paths.d.ts.map +0 -1
- package/dist/paths.js +0 -6
- package/dist/repo_ops.d.ts +0 -59
- package/dist/repo_ops.d.ts.map +0 -1
- package/dist/repo_ops.js +0 -170
- package/dist/resolved_gitops_config.d.ts +0 -9
- package/dist/resolved_gitops_config.d.ts.map +0 -1
- package/dist/resolved_gitops_config.js +0 -12
- package/src/lib/config_reconcile.ts +0 -98
- package/src/lib/paths.ts +0 -6
- package/src/lib/repo_ops.ts +0 -216
- package/src/lib/resolved_gitops_config.ts +0 -27
|
@@ -9,15 +9,16 @@
|
|
|
9
9
|
import type { Logger } from '@fuzdev/fuz_util/log.ts';
|
|
10
10
|
import { styleText as st } from 'node:util';
|
|
11
11
|
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
import {
|
|
13
|
+
version_change_kind,
|
|
14
|
+
type PublishingPlan,
|
|
15
|
+
type VersionChange,
|
|
16
|
+
type DependencyUpdate,
|
|
17
|
+
type VerboseData,
|
|
18
|
+
type VerboseChangesetDetail,
|
|
19
|
+
type VerboseIteration,
|
|
20
|
+
type VerbosePropagationChain,
|
|
21
|
+
type VerboseGraphSummary
|
|
21
22
|
} from './publishing_plan.ts';
|
|
22
23
|
|
|
23
24
|
export interface LogPlanOptions {
|
|
@@ -78,11 +79,13 @@ const log_version_change_with_diffs = (
|
|
|
78
79
|
const breaking_indicator = change.breaking ? st('red', ' BREAKING') : '';
|
|
79
80
|
const position = st('dim', `[${index + 1}/${total}]`);
|
|
80
81
|
|
|
82
|
+
const kind = version_change_kind(change);
|
|
83
|
+
|
|
81
84
|
// Determine scenario label
|
|
82
85
|
let scenario_label = '';
|
|
83
|
-
if (
|
|
86
|
+
if (kind === 'escalation') {
|
|
84
87
|
scenario_label = st('yellow', ` [${change.existing_bump} → ${change.required_bump}]`);
|
|
85
|
-
} else if (
|
|
88
|
+
} else if (kind === 'auto') {
|
|
86
89
|
scenario_label = st('cyan', ' [auto-changeset]');
|
|
87
90
|
}
|
|
88
91
|
|
|
@@ -93,7 +96,7 @@ const log_version_change_with_diffs = (
|
|
|
93
96
|
);
|
|
94
97
|
|
|
95
98
|
// Show escalation reason
|
|
96
|
-
if (
|
|
99
|
+
if (kind === 'escalation') {
|
|
97
100
|
log.info(
|
|
98
101
|
st(
|
|
99
102
|
'dim',
|
|
@@ -103,7 +106,7 @@ const log_version_change_with_diffs = (
|
|
|
103
106
|
}
|
|
104
107
|
|
|
105
108
|
// Show trigger reason for auto-changesets
|
|
106
|
-
if (
|
|
109
|
+
if (kind === 'auto') {
|
|
107
110
|
// Find what triggered this
|
|
108
111
|
const triggers: Array<string> = [];
|
|
109
112
|
for (const [pkg, affected] of breaking_cascades) {
|
|
@@ -147,6 +150,7 @@ export const log_publishing_plan = (
|
|
|
147
150
|
breaking_cascades,
|
|
148
151
|
warnings,
|
|
149
152
|
info,
|
|
153
|
+
no_changes,
|
|
150
154
|
errors
|
|
151
155
|
} = plan;
|
|
152
156
|
|
|
@@ -175,17 +179,17 @@ export const log_publishing_plan = (
|
|
|
175
179
|
return idx_a - idx_b;
|
|
176
180
|
});
|
|
177
181
|
|
|
178
|
-
// Separate into groups for headers
|
|
179
|
-
const with_changesets = ordered_changes.filter(
|
|
180
|
-
|
|
182
|
+
// Separate into groups for headers; each change lands in exactly one
|
|
183
|
+
const with_changesets = ordered_changes.filter((vc) => version_change_kind(vc) === 'explicit');
|
|
184
|
+
const with_escalation = ordered_changes.filter(
|
|
185
|
+
(vc) => version_change_kind(vc) === 'escalation'
|
|
181
186
|
);
|
|
182
|
-
const
|
|
183
|
-
const with_auto_changesets = ordered_changes.filter((vc) => vc.will_generate_changeset);
|
|
187
|
+
const with_auto_changesets = ordered_changes.filter((vc) => version_change_kind(vc) === 'auto');
|
|
184
188
|
|
|
185
189
|
// A single running counter across all groups so positions read 1..N with no
|
|
186
190
|
// gaps. (Numbering per-group index would make the first group skip the numbers
|
|
187
191
|
// that land in a later group, e.g. jump from `[9/12]` to `[11/12]`.)
|
|
188
|
-
const total =
|
|
192
|
+
const total = ordered_changes.length;
|
|
189
193
|
let position = 0;
|
|
190
194
|
const log_change_group = (
|
|
191
195
|
title: string,
|
|
@@ -251,15 +255,20 @@ export const log_publishing_plan = (
|
|
|
251
255
|
log.info('');
|
|
252
256
|
}
|
|
253
257
|
|
|
254
|
-
// Info
|
|
255
|
-
|
|
256
|
-
log.info(st('dim',
|
|
258
|
+
// Info sentences, then the packages with nothing to publish
|
|
259
|
+
for (const line of info) {
|
|
260
|
+
log.info(st('dim', line));
|
|
261
|
+
}
|
|
262
|
+
if (no_changes.length > 0) {
|
|
263
|
+
log.info(st('dim', `No changes: ${no_changes.join(', ')}`));
|
|
264
|
+
}
|
|
265
|
+
if (info.length > 0 || no_changes.length > 0) {
|
|
257
266
|
log.info('');
|
|
258
267
|
}
|
|
259
268
|
|
|
260
269
|
// Summary
|
|
261
270
|
const major_count = version_changes.filter((vc) => vc.breaking).length;
|
|
262
|
-
const auto_count = version_changes.filter((vc) => vc
|
|
271
|
+
const auto_count = version_changes.filter((vc) => version_change_kind(vc) === 'auto').length;
|
|
263
272
|
log.info(st('cyan', 'Summary:'));
|
|
264
273
|
log.info(` ${version_changes.length} packages to publish`);
|
|
265
274
|
if (auto_count > 0) {
|
package/src/lib/repo.svelte.ts
CHANGED
|
@@ -17,6 +17,11 @@ import { GithubCheckRunsItem, type GithubPullRequest } from './github.ts';
|
|
|
17
17
|
export interface RepoJson {
|
|
18
18
|
library_json: LibraryJson;
|
|
19
19
|
package_json: PackageJson;
|
|
20
|
+
/**
|
|
21
|
+
* The branch the repo's registry entry follows, which `check_runs` was
|
|
22
|
+
* fetched for. `Repo.branch` reads `main` when it's absent.
|
|
23
|
+
*/
|
|
24
|
+
branch?: string;
|
|
20
25
|
check_runs: GithubCheckRunsItem | null;
|
|
21
26
|
pull_requests: Array<GithubPullRequest> | null;
|
|
22
27
|
}
|
|
@@ -31,6 +36,8 @@ export class Repo {
|
|
|
31
36
|
readonly library: Library;
|
|
32
37
|
/** The repo's full `package.json` (with `dependencies`/`devDependencies`). */
|
|
33
38
|
readonly package_json: PackageJson;
|
|
39
|
+
/** The branch CI status was fetched for and the dashboard links to. */
|
|
40
|
+
readonly branch: string;
|
|
34
41
|
check_runs: GithubCheckRunsItem | null;
|
|
35
42
|
pull_requests: Array<GithubPullRequest> | null;
|
|
36
43
|
|
|
@@ -70,6 +77,7 @@ export class Repo {
|
|
|
70
77
|
constructor(repo_json: RepoJson) {
|
|
71
78
|
this.library = new Library(repo_json.library_json);
|
|
72
79
|
this.package_json = repo_json.package_json;
|
|
80
|
+
this.branch = repo_json.branch ?? 'main';
|
|
73
81
|
this.check_runs = repo_json.check_runs;
|
|
74
82
|
this.pull_requests = repo_json.pull_requests;
|
|
75
83
|
}
|