@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.
- package/README.md +91 -17
- package/dist/ModulesDetail.svelte +22 -27
- package/dist/ModulesDetail.svelte.d.ts.map +1 -1
- package/dist/ModulesNav.svelte +8 -5
- package/dist/ModulesNav.svelte.d.ts.map +1 -1
- package/dist/ModulesPage.svelte +3 -5
- package/dist/ModulesPage.svelte.d.ts.map +1 -1
- package/dist/PageFooter.svelte +2 -2
- package/dist/PageHeader.svelte +6 -6
- package/dist/PageHeader.svelte.d.ts +0 -3
- package/dist/PageHeader.svelte.d.ts.map +1 -1
- package/dist/PullRequestsDetail.svelte +29 -20
- package/dist/PullRequestsDetail.svelte.d.ts.map +1 -1
- package/dist/PullRequestsPage.svelte +4 -6
- package/dist/PullRequestsPage.svelte.d.ts.map +1 -1
- package/dist/ReposTable.svelte +43 -55
- package/dist/ReposTable.svelte.d.ts.map +1 -1
- package/dist/ReposTree.svelte +9 -21
- package/dist/ReposTree.svelte.d.ts.map +1 -1
- package/dist/ReposTreeNav.svelte +9 -12
- package/dist/ReposTreeNav.svelte.d.ts.map +1 -1
- package/dist/TablePage.svelte +3 -5
- package/dist/TablePage.svelte.d.ts.map +1 -1
- package/dist/TreeItemPage.svelte +3 -5
- package/dist/TreeItemPage.svelte.d.ts.map +1 -1
- package/dist/TreePage.svelte +3 -5
- package/dist/TreePage.svelte.d.ts.map +1 -1
- package/dist/changeset_generator.d.ts.map +1 -1
- package/dist/changeset_generator.js +2 -2
- package/dist/changeset_reader.d.ts.map +1 -1
- package/dist/changeset_reader.js +3 -3
- 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 +40 -83
- package/dist/dependency_updater.d.ts +1 -1
- package/dist/dependency_updater.d.ts.map +1 -1
- package/dist/dependency_updater.js +14 -9
- 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.d.ts.map +1 -1
- package/dist/fs_fetch_value_cache.js +3 -3
- 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 +17 -8
- 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 +47 -34
- 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 +83 -61
- 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 +193 -105
- 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 +176 -162
- 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 +163 -37
- 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 +25 -32
- package/dist/graph_validation.d.ts +16 -27
- package/dist/graph_validation.d.ts.map +1 -1
- package/dist/graph_validation.js +24 -65
- package/dist/local_repo.d.ts +50 -62
- package/dist/local_repo.d.ts.map +1 -1
- package/dist/local_repo.js +83 -196
- 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 +125 -61
- package/dist/npm_registry.d.ts +23 -19
- package/dist/npm_registry.d.ts.map +1 -1
- package/dist/npm_registry.js +21 -48
- 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 +111 -128
- 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_gate.d.ts.map +1 -1
- package/dist/publish_steps.d.ts +2 -4
- package/dist/publish_steps.d.ts.map +1 -1
- package/dist/publish_steps.js +4 -8
- package/dist/publishing_event.d.ts +2 -8
- package/dist/publishing_event.d.ts.map +1 -1
- package/dist/publishing_event.js +20 -17
- 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 +19 -17
- package/dist/publishing_plan.d.ts +16 -1
- package/dist/publishing_plan.d.ts.map +1 -1
- package/dist/publishing_plan.js +332 -254
- package/dist/publishing_plan_helpers.d.ts.map +1 -1
- package/dist/publishing_plan_helpers.js +3 -3
- 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 +22 -15
- 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/dist/version_utils.js +1 -1
- package/package.json +15 -34
- package/src/lib/cargo_toml.ts +3 -3
- package/src/lib/changeset_generator.ts +19 -19
- package/src/lib/changeset_reader.ts +18 -18
- package/src/lib/ci_reconcile.ts +12 -16
- package/src/lib/dependency_graph.ts +61 -113
- package/src/lib/dependency_updater.ts +36 -30
- package/src/lib/fetch_repo_data.ts +71 -34
- package/src/lib/fs_fetch_value_cache.ts +15 -11
- package/src/lib/git_operations.ts +22 -194
- package/src/lib/github.ts +33 -21
- package/src/lib/github_helpers.ts +9 -16
- package/src/lib/gitops_analyze.task.ts +104 -66
- package/src/lib/gitops_config.ts +90 -139
- package/src/lib/gitops_constants.ts +6 -4
- package/src/lib/gitops_plan.task.ts +128 -76
- package/src/lib/gitops_publish.task.ts +280 -144
- package/src/lib/gitops_run.task.ts +265 -193
- package/src/lib/gitops_sync.task.ts +236 -52
- package/src/lib/gitops_task_helpers.ts +170 -114
- package/src/lib/gitops_validate.task.ts +44 -54
- package/src/lib/graph_validation.ts +28 -89
- package/src/lib/local_repo.ts +128 -335
- package/src/lib/log_helpers.ts +18 -28
- package/src/lib/multi_repo_publisher.ts +192 -110
- package/src/lib/npm_registry.ts +42 -67
- package/src/lib/operations.ts +99 -160
- package/src/lib/operations_defaults.ts +157 -201
- package/src/lib/output_helpers.ts +58 -6
- package/src/lib/preflight_checks.ts +52 -188
- package/src/lib/publish_gate.ts +7 -9
- package/src/lib/publish_steps.ts +27 -25
- package/src/lib/publishing_event.ts +26 -23
- package/src/lib/publishing_event_handler.ts +24 -22
- package/src/lib/publishing_plan.ts +474 -310
- package/src/lib/publishing_plan_helpers.ts +16 -12
- package/src/lib/publishing_plan_logging.ts +53 -44
- package/src/lib/repo.svelte.ts +16 -8
- 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/src/lib/version_utils.ts +3 -3
- package/dist/config_reconcile.d.ts +0 -46
- package/dist/config_reconcile.d.ts.map +0 -1
- package/dist/config_reconcile.js +0 -60
- 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 -94
- package/src/lib/paths.ts +0 -6
- package/src/lib/repo_ops.ts +0 -216
- package/src/lib/resolved_gitops_config.ts +0 -27
package/dist/local_repo.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { PackageJson } from '@fuzdev/fuz_util/package_json.ts';
|
|
2
|
+
import type { Result } from '@fuzdev/fuz_util/result.ts';
|
|
2
3
|
import { Library } from '@fuzdev/fuz_ui/library.svelte.ts';
|
|
3
4
|
import type { Logger } from '@fuzdev/fuz_util/log.ts';
|
|
4
|
-
import type {
|
|
5
|
-
import type { GitopsConfig, GitopsRepoConfig } from './gitops_config.js';
|
|
6
|
-
import type { ResolvedGitopsConfig } from './resolved_gitops_config.js';
|
|
5
|
+
import type { ReposEntryStatus, ReposStatusReport } from './repos_status.js';
|
|
7
6
|
/**
|
|
8
7
|
* Fully loaded local repo with `Library` and extracted dependency data.
|
|
9
8
|
* Does not extend `LocalRepoPath` - `Library` is source of truth for name/repo_url/etc.
|
|
@@ -21,93 +20,82 @@ export interface LocalRepo {
|
|
|
21
20
|
/** The repo's full `package.json` (with `dependencies`/`devDependencies`). */
|
|
22
21
|
package_json: PackageJson;
|
|
23
22
|
repo_dir: string;
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
/**
|
|
24
|
+
* The repo's registry entry as `repos status --json` reported it: its
|
|
25
|
+
* `branch`, `visibility`, `ci`, and `archived`, and its git state.
|
|
26
|
+
*/
|
|
27
|
+
entry: ReposEntryStatus;
|
|
26
28
|
dependencies?: Map<string, string>;
|
|
27
29
|
dev_dependencies?: Map<string, string>;
|
|
28
30
|
peer_dependencies?: Map<string, string>;
|
|
29
31
|
}
|
|
30
32
|
/**
|
|
31
|
-
* A repo
|
|
32
|
-
*
|
|
33
|
+
* A configured repo resolved through `repos status`: present on disk, before
|
|
34
|
+
* its library is loaded. See `local_repos_resolve`.
|
|
33
35
|
*/
|
|
34
36
|
export interface LocalRepoPath {
|
|
35
|
-
|
|
37
|
+
/** The repo's registry key (for display/logging before `Library` is loaded). */
|
|
36
38
|
repo_name: string;
|
|
39
|
+
/** The workspace root joined with the entry's `dir`. */
|
|
37
40
|
repo_dir: string;
|
|
41
|
+
/** The registry's HTTPS URL for the repo. */
|
|
38
42
|
repo_url: string;
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
/** The repo's registry entry as `repos status --json` reported it. */
|
|
44
|
+
entry: ReposEntryStatus;
|
|
41
45
|
}
|
|
42
46
|
/**
|
|
43
|
-
*
|
|
47
|
+
* Resolves a gitops config's registry keys against a `repos status` report,
|
|
48
|
+
* in config order. Every key must name an owned repo that's present and was
|
|
49
|
+
* probed; each that doesn't is a problem, and any problem fails the whole
|
|
50
|
+
* resolve, naming them all.
|
|
51
|
+
*
|
|
52
|
+
* @param options.keys - the config's registry keys, in config order
|
|
53
|
+
* @param options.report - `repos status <keys…> --json`'s report
|
|
54
|
+
* @param options.host - the package whose generated data the run writes; when public, a private repo is a problem (`gitops_config_leaked_private_repos`)
|
|
55
|
+
* @param options.registry - the `--registry` the report was made with, repeated in the hints
|
|
56
|
+
* @returns the repos in config order, or a message listing every problem
|
|
44
57
|
*/
|
|
45
|
-
export
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
58
|
+
export declare const local_repos_resolve: (options: {
|
|
59
|
+
keys: ReadonlyArray<string>;
|
|
60
|
+
report: ReposStatusReport;
|
|
61
|
+
host?: {
|
|
62
|
+
name: string;
|
|
63
|
+
private: boolean;
|
|
64
|
+
};
|
|
65
|
+
registry?: string;
|
|
66
|
+
}) => Result<{
|
|
67
|
+
value: Array<LocalRepoPath>;
|
|
68
|
+
}, {
|
|
69
|
+
message: string;
|
|
70
|
+
problems: Array<string>;
|
|
71
|
+
}>;
|
|
52
72
|
/**
|
|
53
|
-
* Loads
|
|
73
|
+
* Loads a resolved repo as its working tree sits (the tasks read where each
|
|
74
|
+
* repo sits from `repos status`, and `repos sync` moves them). Moves no ref;
|
|
75
|
+
* gro caches the library at `.gro/library.json` in the repo, at a clean commit.
|
|
54
76
|
*
|
|
55
|
-
*
|
|
56
|
-
* `
|
|
57
|
-
* disk — no branch switch, pull, install, or clean-workspace check. This makes
|
|
58
|
-
* those commands safe to run on an active workspace with uncommitted changes or
|
|
59
|
-
* feature branches checked out.
|
|
77
|
+
* 1. Loads `library_json` via `library_load_from_repo` (svelte-docinfo analysis)
|
|
78
|
+
* 2. Creates `Library` and extracts dependency maps
|
|
60
79
|
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* 1. Records current commit hash (for detecting changes)
|
|
64
|
-
* 2. Switches to target branch if needed (requires clean workspace unless `allow_dirty`)
|
|
65
|
-
* 3. Pulls latest changes from remote (skipped for local-only repos)
|
|
66
|
-
* 4. Validates workspace is clean after pull (skipped if `allow_dirty`)
|
|
67
|
-
* 5. Auto-installs dependencies if `package.json` changed
|
|
80
|
+
* A repo with no `package.json` but a Rust `Cargo.toml` loads as a
|
|
81
|
+
* dashboard-only `cargo` repo instead.
|
|
68
82
|
*
|
|
69
|
-
*
|
|
70
|
-
* 6. Loads `library_json` via `library_load_from_repo` (svelte-docinfo analysis)
|
|
71
|
-
* 7. Creates `Library` and extracts dependency maps
|
|
72
|
-
*
|
|
73
|
-
* @param sync - sync the working tree to the configured branch before loading (default `true`)
|
|
74
|
-
* @param allow_dirty - when syncing, tolerate uncommitted changes instead of throwing (default `false`)
|
|
75
|
-
* @throws {TaskError} if syncing fails (dirty workspace, branch switch, install) or analysis fails
|
|
83
|
+
* @throws {TaskError} if the analysis fails
|
|
76
84
|
*/
|
|
77
|
-
export declare const local_repo_load: ({ local_repo_path, log
|
|
85
|
+
export declare const local_repo_load: ({ local_repo_path, log }: {
|
|
78
86
|
local_repo_path: LocalRepoPath;
|
|
79
87
|
log?: Logger;
|
|
80
|
-
git_ops?: GitOperations;
|
|
81
|
-
npm_ops?: NpmOperations;
|
|
82
|
-
sync?: boolean;
|
|
83
|
-
allow_dirty?: boolean;
|
|
84
88
|
}) => Promise<LocalRepo>;
|
|
85
89
|
/**
|
|
86
90
|
* Whether a repo is an npm package and so participates in publishing and
|
|
87
|
-
* dependency analysis. Non-npm repos (e.g. Rust `cargo` repos) are still
|
|
88
|
-
*
|
|
91
|
+
* dependency analysis. Non-npm repos (e.g. Rust `cargo` repos) are still
|
|
92
|
+
* rendered on the dashboard, but excluded from the changeset cascade.
|
|
89
93
|
*/
|
|
90
94
|
export declare const repo_is_npm: (repo: LocalRepo) => boolean;
|
|
91
|
-
export declare const
|
|
92
|
-
resolved_config: ResolvedGitopsConfig;
|
|
93
|
-
repos_dir: string;
|
|
94
|
-
gitops_config: GitopsConfig;
|
|
95
|
-
download: boolean;
|
|
96
|
-
log?: Logger;
|
|
97
|
-
npm_ops?: NpmOperations;
|
|
98
|
-
}) => Promise<Array<LocalRepoPath>>;
|
|
99
|
-
export declare const local_repos_load: ({ local_repo_paths, log, git_ops, npm_ops, parallel, concurrency, sync, allow_dirty, }: {
|
|
95
|
+
export declare const local_repos_load: ({ local_repo_paths, log, parallel, concurrency }: {
|
|
100
96
|
local_repo_paths: Array<LocalRepoPath>;
|
|
101
97
|
log?: Logger;
|
|
102
|
-
git_ops?: GitOperations;
|
|
103
|
-
npm_ops?: NpmOperations;
|
|
104
98
|
parallel?: boolean;
|
|
105
99
|
concurrency?: number;
|
|
106
|
-
sync?: boolean;
|
|
107
|
-
allow_dirty?: boolean;
|
|
108
100
|
}) => Promise<Array<LocalRepo>>;
|
|
109
|
-
export declare const local_repo_locate: ({ repo_config, repos_dir, }: {
|
|
110
|
-
repo_config: GitopsRepoConfig;
|
|
111
|
-
repos_dir: string;
|
|
112
|
-
}) => LocalRepoPath | LocalRepoMissing;
|
|
113
101
|
//# sourceMappingURL=local_repo.d.ts.map
|
package/dist/local_repo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local_repo.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/local_repo.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"local_repo.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/local_repo.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAK3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAItD,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAK7E;;;GAGG;AACH,MAAM,WAAW,SAAS;IACzB;;;;;;OAMG;IACH,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,8EAA8E;IAC9E,YAAY,EAAE,WAAW,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,KAAK,EAAE,gBAAgB,CAAC;IACxB,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,iBAAiB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B,gFAAgF;IAChF,SAAS,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,KAAK,EAAE,gBAAgB,CAAC;CACxB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,GAAI,SAAS;IAC5C,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,IAAI,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB,KAAG,MAAM,CAAC;IAAE,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,CAAA;CAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CAAE,CAoDvF,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,GAAU,0BAGnC;IACF,eAAe,EAAE,aAAa,CAAC;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;CACb,KAAG,OAAO,CAAC,SAAS,CA2CpB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,MAAM,SAAS,KAAG,OAA8B,CAAC;AAyC7E,eAAO,MAAM,gBAAgB,GAAU,kDAKpC;IACF,gBAAgB,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IACvC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB,KAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CA2C3B,CAAC"}
|
package/dist/local_repo.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { strip_end } from '@fuzdev/fuz_util/string.ts';
|
|
2
1
|
import { to_error_message } from '@fuzdev/fuz_util/error.ts';
|
|
3
2
|
import { library_json_from_modules } from '@fuzdev/fuz_util/library_json.ts';
|
|
4
3
|
import { Library } from '@fuzdev/fuz_ui/library.svelte.ts';
|
|
@@ -6,120 +5,86 @@ import { existsSync } from 'node:fs';
|
|
|
6
5
|
import { join } from 'node:path';
|
|
7
6
|
import { TaskError } from '@fuzdev/gro';
|
|
8
7
|
import { library_load_from_repo } from '@fuzdev/gro/library_load.ts';
|
|
9
|
-
import { spawn_out } from '@fuzdev/fuz_util/process.ts';
|
|
10
8
|
import { map_concurrent_settled } from '@fuzdev/fuz_util/async.ts';
|
|
11
|
-
import {
|
|
9
|
+
import { gitops_config_leaked_private_repos } from './gitops_config.js';
|
|
12
10
|
import { GITOPS_CONCURRENCY_DEFAULT } from './gitops_constants.js';
|
|
13
11
|
import { cargo_toml_load } from './cargo_toml.js';
|
|
12
|
+
import { to_repos_command } from './repos_status_load.js';
|
|
14
13
|
/**
|
|
15
|
-
*
|
|
14
|
+
* Resolves a gitops config's registry keys against a `repos status` report,
|
|
15
|
+
* in config order. Every key must name an owned repo that's present and was
|
|
16
|
+
* probed; each that doesn't is a problem, and any problem fails the whole
|
|
17
|
+
* resolve, naming them all.
|
|
16
18
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* When `sync` is `true` (used by `gitops_sync`), the working tree is brought in
|
|
24
|
-
* line with the configured branch first:
|
|
25
|
-
* 1. Records current commit hash (for detecting changes)
|
|
26
|
-
* 2. Switches to target branch if needed (requires clean workspace unless `allow_dirty`)
|
|
27
|
-
* 3. Pulls latest changes from remote (skipped for local-only repos)
|
|
28
|
-
* 4. Validates workspace is clean after pull (skipped if `allow_dirty`)
|
|
29
|
-
* 5. Auto-installs dependencies if `package.json` changed
|
|
30
|
-
*
|
|
31
|
-
* Either way it then:
|
|
32
|
-
* 6. Loads `library_json` via `library_load_from_repo` (svelte-docinfo analysis)
|
|
33
|
-
* 7. Creates `Library` and extracts dependency maps
|
|
34
|
-
*
|
|
35
|
-
* @param sync - sync the working tree to the configured branch before loading (default `true`)
|
|
36
|
-
* @param allow_dirty - when syncing, tolerate uncommitted changes instead of throwing (default `false`)
|
|
37
|
-
* @throws {TaskError} if syncing fails (dirty workspace, branch switch, install) or analysis fails
|
|
19
|
+
* @param options.keys - the config's registry keys, in config order
|
|
20
|
+
* @param options.report - `repos status <keys…> --json`'s report
|
|
21
|
+
* @param options.host - the package whose generated data the run writes; when public, a private repo is a problem (`gitops_config_leaked_private_repos`)
|
|
22
|
+
* @param options.registry - the `--registry` the report was made with, repeated in the hints
|
|
23
|
+
* @returns the repos in config order, or a message listing every problem
|
|
38
24
|
*/
|
|
39
|
-
export const
|
|
40
|
-
const {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
25
|
+
export const local_repos_resolve = (options) => {
|
|
26
|
+
const { keys, report, host, registry } = options;
|
|
27
|
+
const repos_command = to_repos_command(registry);
|
|
28
|
+
const by_key = new Map(report.entries.map((e) => [e.key, e]));
|
|
29
|
+
const problems = [];
|
|
30
|
+
const resolved = [];
|
|
31
|
+
for (const key of keys) {
|
|
32
|
+
const entry = by_key.get(key);
|
|
33
|
+
if (!entry) {
|
|
34
|
+
// `repos` also takes a dir name or path as a target, reporting the entry by its key
|
|
35
|
+
const by_dir = report.entries.find((e) => e.dir === key);
|
|
36
|
+
problems.push(by_dir
|
|
37
|
+
? `\`${key}\` is the dir of \`${by_dir.key}\`, not a registry key — list \`${by_dir.key}\``
|
|
38
|
+
: `\`${key}\` isn't in the \`repos status\` report — is it a registry key?`);
|
|
39
|
+
continue;
|
|
52
40
|
}
|
|
53
|
-
const
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
// in which case we let `git checkout` itself fail loudly if it can't proceed.
|
|
57
|
-
if (!allow_dirty) {
|
|
58
|
-
const clean_result = await git_ops.check_clean_workspace({ cwd: repo_dir });
|
|
59
|
-
if (!clean_result.ok) {
|
|
60
|
-
throw new TaskError(`Failed to check workspace in ${repo_dir}: ${clean_result.message}`);
|
|
61
|
-
}
|
|
62
|
-
if (!clean_result.value) {
|
|
63
|
-
throw new TaskError(`Repo ${repo_dir} is not on branch "${repo_config.branch}" and the workspace is unclean, blocking switch`);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
const checkout_result = await git_ops.checkout({ branch: repo_config.branch, cwd: repo_dir });
|
|
67
|
-
if (!checkout_result.ok) {
|
|
68
|
-
throw new TaskError(`Failed to checkout branch "${repo_config.branch}" in ${repo_dir}: ${checkout_result.message}`);
|
|
69
|
-
}
|
|
41
|
+
const repo_dir = join(report.workspace, entry.dir);
|
|
42
|
+
if (entry.kind === 'reference') {
|
|
43
|
+
problems.push(`\`${key}\` is a third-party reference, not an owned repo`);
|
|
70
44
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if (!origin_result.ok) {
|
|
74
|
-
throw new TaskError(`Failed to check for remote in ${repo_dir}: ${origin_result.message}`);
|
|
45
|
+
else if (entry.presence.kind === 'missing') {
|
|
46
|
+
problems.push(`\`${key}\` is missing at ${repo_dir} — \`${repos_command} sync ${key}\` clones it`);
|
|
75
47
|
}
|
|
76
|
-
if (
|
|
77
|
-
|
|
78
|
-
// targets the remote's default branch (origin/HEAD), which for a repo checked
|
|
79
|
-
// out on a non-default branch rebases the wrong branch onto it.
|
|
80
|
-
const pull_result = await git_ops.pull({ branch: repo_config.branch, cwd: repo_dir });
|
|
81
|
-
if (!pull_result.ok) {
|
|
82
|
-
throw new TaskError(`Failed to pull in ${repo_dir}: ${pull_result.message}`);
|
|
83
|
-
}
|
|
48
|
+
else if (entry.presence.kind === 'not_a_repo') {
|
|
49
|
+
problems.push(`\`${key}\`: ${repo_dir} isn't a git repo`);
|
|
84
50
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
if (!allow_dirty) {
|
|
88
|
-
const clean_after_result = await git_ops.check_clean_workspace({ cwd: repo_dir });
|
|
89
|
-
if (!clean_after_result.ok) {
|
|
90
|
-
throw new TaskError(`Failed to check workspace in ${repo_dir}: ${clean_after_result.message}`);
|
|
91
|
-
}
|
|
92
|
-
if (!clean_after_result.value) {
|
|
93
|
-
throw new TaskError(`Workspace ${repo_dir} is unclean after pulling branch "${repo_config.branch}"`);
|
|
94
|
-
}
|
|
51
|
+
else if (entry.probe_error !== null) {
|
|
52
|
+
problems.push(`\`${key}\`: probing ${repo_dir} failed: ${entry.probe_error.message}`);
|
|
95
53
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
if (!commit_after_result.ok) {
|
|
99
|
-
throw new TaskError(`Failed to get commit hash in ${repo_dir}: ${commit_after_result.message}`);
|
|
54
|
+
else {
|
|
55
|
+
resolved.push({ repo_name: key, repo_dir, repo_url: entry.url, entry });
|
|
100
56
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
const changed_result = await git_ops.has_file_changed({
|
|
107
|
-
from_commit: commit_before,
|
|
108
|
-
to_commit: commit_after,
|
|
109
|
-
file_path: 'package.json',
|
|
110
|
-
cwd: repo_dir,
|
|
111
|
-
});
|
|
112
|
-
if (!changed_result.ok) {
|
|
113
|
-
throw new TaskError(`Failed to check if package.json changed in ${repo_dir}: ${changed_result.message}`);
|
|
114
|
-
}
|
|
115
|
-
if (changed_result.value) {
|
|
116
|
-
const install_result = await npm_ops.install({ cwd: repo_dir });
|
|
117
|
-
if (!install_result.ok) {
|
|
118
|
-
throw new TaskError(`Failed to install dependencies in ${repo_dir}: ${install_result.message}${install_result.stderr ? `\n${install_result.stderr}` : ''}`);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
57
|
+
}
|
|
58
|
+
if (host) {
|
|
59
|
+
const configured = keys.map((k) => by_key.get(k)).filter((e) => e !== undefined);
|
|
60
|
+
for (const leaked of gitops_config_leaked_private_repos(configured, host.private)) {
|
|
61
|
+
problems.push(`\`${leaked.key}\` is private, and ${host.name} is a public package whose generated repos.json would publish its metadata`);
|
|
121
62
|
}
|
|
122
63
|
}
|
|
64
|
+
if (problems.length) {
|
|
65
|
+
return {
|
|
66
|
+
ok: false,
|
|
67
|
+
message: `${problems.length === 1 ? 'a configured repo' : 'configured repos'} can't be loaded:\n ${problems.join('\n ')}`,
|
|
68
|
+
problems
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
return { ok: true, value: resolved };
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Loads a resolved repo as its working tree sits (the tasks read where each
|
|
75
|
+
* repo sits from `repos status`, and `repos sync` moves them). Moves no ref;
|
|
76
|
+
* gro caches the library at `.gro/library.json` in the repo, at a clean commit.
|
|
77
|
+
*
|
|
78
|
+
* 1. Loads `library_json` via `library_load_from_repo` (svelte-docinfo analysis)
|
|
79
|
+
* 2. Creates `Library` and extracts dependency maps
|
|
80
|
+
*
|
|
81
|
+
* A repo with no `package.json` but a Rust `Cargo.toml` loads as a
|
|
82
|
+
* dashboard-only `cargo` repo instead.
|
|
83
|
+
*
|
|
84
|
+
* @throws {TaskError} if the analysis fails
|
|
85
|
+
*/
|
|
86
|
+
export const local_repo_load = async ({ local_repo_path, log }) => {
|
|
87
|
+
const { entry, repo_dir, repo_name } = local_repo_path;
|
|
123
88
|
// A repo with no `package.json` but a Rust `Cargo.toml` isn't an npm package and can't be
|
|
124
89
|
// analyzed as a library. Load it as a dashboard-only `cargo` repo (CI, PRs, identity) that
|
|
125
90
|
// publishing/analysis skips. Anything else falls through to the npm loader below, whose
|
|
@@ -131,12 +96,10 @@ export const local_repo_load = async ({ local_repo_path, log: _log, git_ops = de
|
|
|
131
96
|
let library_json;
|
|
132
97
|
let package_json;
|
|
133
98
|
try {
|
|
134
|
-
({ library_json, package_json } = await library_load_from_repo(repo_dir, { log
|
|
99
|
+
({ library_json, package_json } = await library_load_from_repo(repo_dir, { log }));
|
|
135
100
|
}
|
|
136
101
|
catch (err) {
|
|
137
|
-
|
|
138
|
-
_log?.warn(`Failed to load library metadata for repo "${repo_name}" in ${repo_dir}: ${message}`);
|
|
139
|
-
throw new TaskError(`Failed to load library metadata for repo "${repo_name}" in ${repo_dir}: ${message}`);
|
|
102
|
+
throw new TaskError(`Failed to load library metadata for repo "${repo_name}" in ${repo_dir}: ${to_error_message(err)}`);
|
|
140
103
|
}
|
|
141
104
|
const library = new Library(library_json);
|
|
142
105
|
const local_repo = {
|
|
@@ -144,8 +107,7 @@ export const local_repo_load = async ({ local_repo_path, log: _log, git_ops = de
|
|
|
144
107
|
library,
|
|
145
108
|
package_json,
|
|
146
109
|
repo_dir,
|
|
147
|
-
|
|
148
|
-
repo_config,
|
|
110
|
+
entry
|
|
149
111
|
};
|
|
150
112
|
// Extract dependencies from the full package_json
|
|
151
113
|
if (package_json.dependencies) {
|
|
@@ -161,30 +123,30 @@ export const local_repo_load = async ({ local_repo_path, log: _log, git_ops = de
|
|
|
161
123
|
};
|
|
162
124
|
/**
|
|
163
125
|
* Whether a repo is an npm package and so participates in publishing and
|
|
164
|
-
* dependency analysis. Non-npm repos (e.g. Rust `cargo` repos) are still
|
|
165
|
-
*
|
|
126
|
+
* dependency analysis. Non-npm repos (e.g. Rust `cargo` repos) are still
|
|
127
|
+
* rendered on the dashboard, but excluded from the changeset cascade.
|
|
166
128
|
*/
|
|
167
129
|
export const repo_is_npm = (repo) => repo.kind === 'npm';
|
|
168
130
|
/**
|
|
169
131
|
* Loads a non-npm Rust repo as a dashboard-only `LocalRepo`. It has no
|
|
170
132
|
* `package.json`, so there's no `svelte-docinfo` analysis and no npm dependency
|
|
171
133
|
* graph — a lightweight `Library` is synthesized from the repo's `Cargo.toml`
|
|
172
|
-
* (best-effort name/version/description) and its
|
|
134
|
+
* (best-effort name/version/description) and its registry URL, which is
|
|
173
135
|
* what the dashboard renders (CI status, PRs, identity). Marked `private` so it
|
|
174
136
|
* never reads as an npm publish target, and tagged `cargo` so the publishing and
|
|
175
137
|
* analysis paths skip it (see `repo_is_npm`).
|
|
176
138
|
*/
|
|
177
|
-
const local_repo_load_cargo = async ({ local_repo_path
|
|
178
|
-
const {
|
|
139
|
+
const local_repo_load_cargo = async ({ local_repo_path }) => {
|
|
140
|
+
const { entry, repo_dir, repo_name, repo_url } = local_repo_path;
|
|
179
141
|
const cargo = await cargo_toml_load(repo_dir);
|
|
180
|
-
// A Cargo workspace root has no `name`, so fall back to the
|
|
181
|
-
//
|
|
142
|
+
// A Cargo workspace root has no `name` or `repository`, so fall back to the
|
|
143
|
+
// registry key and URL.
|
|
182
144
|
const package_json = {
|
|
183
145
|
name: cargo?.name ?? repo_name,
|
|
184
146
|
version: cargo?.version ?? '0.0.0',
|
|
185
147
|
repository: cargo?.repository ?? repo_url,
|
|
186
148
|
private: true,
|
|
187
|
-
...(cargo?.description ? { description: cargo.description } : null)
|
|
149
|
+
...(cargo?.description ? { description: cargo.description } : null)
|
|
188
150
|
};
|
|
189
151
|
const library = new Library(library_json_from_modules(package_json, []));
|
|
190
152
|
return {
|
|
@@ -192,51 +154,21 @@ const local_repo_load_cargo = async ({ local_repo_path, }) => {
|
|
|
192
154
|
library,
|
|
193
155
|
package_json,
|
|
194
156
|
repo_dir,
|
|
195
|
-
|
|
196
|
-
repo_config,
|
|
157
|
+
entry
|
|
197
158
|
};
|
|
198
159
|
};
|
|
199
|
-
export const
|
|
200
|
-
let local_repo_paths = null;
|
|
201
|
-
if (!resolved_config.local_repos_missing) {
|
|
202
|
-
local_repo_paths = resolved_config.local_repo_paths;
|
|
203
|
-
}
|
|
204
|
-
else {
|
|
205
|
-
if (download) {
|
|
206
|
-
const downloaded = await download_repos({
|
|
207
|
-
repos_dir,
|
|
208
|
-
local_repos_missing: resolved_config.local_repos_missing,
|
|
209
|
-
log,
|
|
210
|
-
npm_ops,
|
|
211
|
-
});
|
|
212
|
-
local_repo_paths = (resolved_config.local_repo_paths ?? [])
|
|
213
|
-
.concat(downloaded)
|
|
214
|
-
.sort((a, b) => gitops_config.repos.findIndex((r) => r.repo_url === a.repo_url) -
|
|
215
|
-
gitops_config.repos.findIndex((r) => r.repo_url === b.repo_url));
|
|
216
|
-
}
|
|
217
|
-
else {
|
|
218
|
-
log?.error(`Failed to resolve local repos in ${repos_dir} - do you need to pass \`--download\` or configure the directory?`, // TODO leaking task impl details
|
|
219
|
-
resolved_config.local_repos_missing.map((r) => r.repo_url));
|
|
220
|
-
throw new TaskError('Failed to resolve local configs');
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
if (!local_repo_paths) {
|
|
224
|
-
throw new TaskError('No repos are configured in `gitops_config.ts`');
|
|
225
|
-
}
|
|
226
|
-
return local_repo_paths;
|
|
227
|
-
};
|
|
228
|
-
export const local_repos_load = async ({ local_repo_paths, log, git_ops = default_git_operations, npm_ops = default_npm_operations, parallel = true, concurrency = GITOPS_CONCURRENCY_DEFAULT, sync = true, allow_dirty = false, }) => {
|
|
160
|
+
export const local_repos_load = async ({ local_repo_paths, log, parallel = true, concurrency = GITOPS_CONCURRENCY_DEFAULT }) => {
|
|
229
161
|
if (!parallel) {
|
|
230
|
-
//
|
|
162
|
+
// sequential loading
|
|
231
163
|
const loaded = [];
|
|
232
164
|
for (const local_repo_path of local_repo_paths) {
|
|
233
|
-
loaded.push(await local_repo_load({ local_repo_path, log
|
|
165
|
+
loaded.push(await local_repo_load({ local_repo_path, log }));
|
|
234
166
|
}
|
|
235
167
|
return loaded;
|
|
236
168
|
}
|
|
237
169
|
// Parallel loading with concurrency limit
|
|
238
170
|
const results = await map_concurrent_settled(local_repo_paths, concurrency, async (local_repo_path) => {
|
|
239
|
-
return local_repo_load({ local_repo_path, log
|
|
171
|
+
return local_repo_load({ local_repo_path, log });
|
|
240
172
|
});
|
|
241
173
|
// Check for failures and collect successes
|
|
242
174
|
const loaded = [];
|
|
@@ -250,7 +182,7 @@ export const local_repos_load = async ({ local_repo_paths, log, git_ops = defaul
|
|
|
250
182
|
const repo_path = local_repo_paths[i];
|
|
251
183
|
errors.push({
|
|
252
184
|
repo_name: repo_path.repo_name,
|
|
253
|
-
error: String(result.reason)
|
|
185
|
+
error: String(result.reason)
|
|
254
186
|
});
|
|
255
187
|
}
|
|
256
188
|
}
|
|
@@ -261,48 +193,3 @@ export const local_repos_load = async ({ local_repo_paths, log, git_ops = defaul
|
|
|
261
193
|
}
|
|
262
194
|
return loaded;
|
|
263
195
|
};
|
|
264
|
-
export const local_repo_locate = ({ repo_config, repos_dir, }) => {
|
|
265
|
-
const { repo_url } = repo_config;
|
|
266
|
-
const repo_name = strip_end(repo_url, '/').split('/').at(-1);
|
|
267
|
-
if (!repo_name)
|
|
268
|
-
throw Error('Invalid `repo_config.repo_url` ' + repo_url);
|
|
269
|
-
const repo_git_ssh_url = to_repo_git_ssh_url(repo_url);
|
|
270
|
-
const repo_dir = repo_config.repo_dir ?? join(repos_dir, repo_name);
|
|
271
|
-
if (!existsSync(repo_dir)) {
|
|
272
|
-
return { type: 'local_repo_missing', repo_name, repo_url, repo_git_ssh_url, repo_config };
|
|
273
|
-
}
|
|
274
|
-
return {
|
|
275
|
-
type: 'local_repo_path',
|
|
276
|
-
repo_name,
|
|
277
|
-
repo_dir,
|
|
278
|
-
repo_url,
|
|
279
|
-
repo_git_ssh_url,
|
|
280
|
-
repo_config,
|
|
281
|
-
};
|
|
282
|
-
};
|
|
283
|
-
const to_repo_git_ssh_url = (repo_url) => {
|
|
284
|
-
const url = new URL(repo_url);
|
|
285
|
-
return `git@${url.hostname}:${url.pathname.substring(1)}`;
|
|
286
|
-
};
|
|
287
|
-
const download_repos = async ({ repos_dir, local_repos_missing, log, npm_ops = default_npm_operations, }) => {
|
|
288
|
-
const resolved = [];
|
|
289
|
-
for (const { repo_config, repo_git_ssh_url } of local_repos_missing) {
|
|
290
|
-
log?.info(`cloning repo ${repo_git_ssh_url} to ${repos_dir}`);
|
|
291
|
-
const clone_result = await spawn_out('git', ['clone', repo_git_ssh_url], { cwd: repos_dir });
|
|
292
|
-
if (!clone_result.result.ok) {
|
|
293
|
-
throw new TaskError(`Failed to clone repo ${repo_git_ssh_url} to ${repos_dir}${clone_result.stderr ? ': ' + clone_result.stderr.trim() : ''}`);
|
|
294
|
-
}
|
|
295
|
-
const local_repo = local_repo_locate({ repo_config, repos_dir });
|
|
296
|
-
if (local_repo.type === 'local_repo_missing') {
|
|
297
|
-
throw new TaskError(`Failed to clone repo ${repo_git_ssh_url} to ${repos_dir}: directory not found after clone`);
|
|
298
|
-
}
|
|
299
|
-
// Always install dependencies after cloning
|
|
300
|
-
log?.info(`installing dependencies for newly cloned repo ${local_repo.repo_dir}`);
|
|
301
|
-
const install_result = await npm_ops.install({ cwd: local_repo.repo_dir });
|
|
302
|
-
if (!install_result.ok) {
|
|
303
|
-
throw new TaskError(`Failed to install dependencies in ${local_repo.repo_dir}: ${install_result.message}${install_result.stderr ? `\n${install_result.stderr}` : ''}`);
|
|
304
|
-
}
|
|
305
|
-
resolved.push(local_repo);
|
|
306
|
-
}
|
|
307
|
-
return resolved;
|
|
308
|
-
};
|
package/dist/log_helpers.d.ts
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import type { Logger } from '@fuzdev/fuz_util/log.ts';
|
|
2
|
-
import type {
|
|
2
|
+
import type { DependencyAnalysis } from './dependency_graph.js';
|
|
3
3
|
/**
|
|
4
4
|
* Formats wildcard dependencies as styled strings.
|
|
5
5
|
* Returns array of lines for inclusion in output.
|
|
6
6
|
*/
|
|
7
|
-
export declare const format_wildcard_dependencies: (analysis:
|
|
7
|
+
export declare const format_wildcard_dependencies: (analysis: DependencyAnalysis) => Array<string>;
|
|
8
8
|
/**
|
|
9
9
|
* Formats dev circular dependencies as styled strings.
|
|
10
10
|
* Returns array of lines for inclusion in output.
|
|
11
11
|
*/
|
|
12
|
-
export declare const format_dev_cycles: (analysis:
|
|
12
|
+
export declare const format_dev_cycles: (analysis: DependencyAnalysis) => Array<string>;
|
|
13
13
|
/**
|
|
14
14
|
* Formats production/peer circular dependencies as styled strings.
|
|
15
15
|
* Returns array of lines for inclusion in output.
|
|
16
16
|
*/
|
|
17
|
-
export declare const format_production_cycles: (analysis:
|
|
17
|
+
export declare const format_production_cycles: (analysis: DependencyAnalysis) => Array<string>;
|
|
18
18
|
/**
|
|
19
19
|
* Logs wildcard dependencies as warnings.
|
|
20
20
|
* Wildcard dependencies require attention and should be reviewed.
|
|
21
21
|
*/
|
|
22
|
-
export declare const log_wildcard_dependencies: (analysis:
|
|
22
|
+
export declare const log_wildcard_dependencies: (analysis: DependencyAnalysis, log: Logger, indent?: string) => void;
|
|
23
23
|
/**
|
|
24
24
|
* Logs dev circular dependencies as info.
|
|
25
25
|
* Dev cycles are normal and non-blocking, so they're informational, not warnings.
|
|
26
26
|
*/
|
|
27
|
-
export declare const log_dev_cycles: (analysis:
|
|
27
|
+
export declare const log_dev_cycles: (analysis: DependencyAnalysis, log: Logger, indent?: string) => void;
|
|
28
28
|
/**
|
|
29
29
|
* Logs production/peer circular dependencies as errors.
|
|
30
30
|
* Production cycles block publishing and must be resolved.
|
|
31
31
|
*/
|
|
32
|
-
export declare const log_production_cycles: (analysis:
|
|
32
|
+
export declare const log_production_cycles: (analysis: DependencyAnalysis, log: Logger, indent?: string) => void;
|
|
33
33
|
/**
|
|
34
34
|
* Logs all dependency analysis results (wildcards, production cycles, dev cycles).
|
|
35
35
|
* Convenience function that calls all three logging functions in order.
|
|
36
36
|
*/
|
|
37
|
-
export declare const log_dependency_analysis: (analysis:
|
|
37
|
+
export declare const log_dependency_analysis: (analysis: DependencyAnalysis, log: Logger, indent?: string) => void;
|
|
38
38
|
//# sourceMappingURL=log_helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/log_helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"log_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/log_helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAGtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,4BAA4B,GAAI,UAAU,kBAAkB,KAAG,KAAK,CAAC,MAAM,CAYvF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,kBAAkB,KAAG,KAAK,CAAC,MAAM,CAe5E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,UAAU,kBAAkB,KAAG,KAAK,CAAC,MAAM,CAenF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,GACrC,UAAU,kBAAkB,EAC5B,KAAK,MAAM,EACX,eAAW,KACT,IAKF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU,kBAAkB,EAAE,KAAK,MAAM,EAAE,eAAW,KAAG,IAKvF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GACjC,UAAU,kBAAkB,EAC5B,KAAK,MAAM,EACX,eAAW,KACT,IAKF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GACnC,UAAU,kBAAkB,EAC5B,KAAK,MAAM,EACX,eAAW,KACT,IAIF,CAAC"}
|
|
@@ -12,8 +12,18 @@ export interface PublishingOptions {
|
|
|
12
12
|
max_wait?: number;
|
|
13
13
|
log?: Logger;
|
|
14
14
|
ops?: GitopsOperations;
|
|
15
|
+
/** A `repos.toml` for the per-repo readiness re-check, when `repos` wouldn't find it from the cwd. */
|
|
16
|
+
registry?: string;
|
|
15
17
|
/** Structured event sink; defaults to capture-only (events surface on the result). */
|
|
16
18
|
events?: PublishingEventHandler;
|
|
19
|
+
/**
|
|
20
|
+
* Where `gro publish` and `gro deploy` show their stdout: ours, or our stderr
|
|
21
|
+
* when our stdout carries a machine-readable stream (`--emit_json`, or a JSON
|
|
22
|
+
* or markdown report written to stdout).
|
|
23
|
+
*
|
|
24
|
+
* @default 'stdout'
|
|
25
|
+
*/
|
|
26
|
+
child_stdout?: 'stdout' | 'stderr';
|
|
17
27
|
}
|
|
18
28
|
export interface PublishedVersion {
|
|
19
29
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi_repo_publisher.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/multi_repo_publisher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"multi_repo_publisher.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/multi_repo_publisher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAKtD,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAGN,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,MAAM,sBAAsB,CAAC;AAI9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGxD,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAEzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACN,KAAK,sBAAsB,EAI3B,MAAM,+BAA+B,CAAC;AAEvC,MAAM,WAAW,iBAAiB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,gBAAgB,CAAC,EAAE,eAAe,CAAC;IACnC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,gBAAgB,CAAC;IACvB,sGAAsG;IACtG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sFAAsF;IACtF,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CACnC;AAED,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,gBAAgB;IAChC,EAAE,EAAE,OAAO,CAAC;IACZ,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACnC,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,MAAM,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IAC/B,8CAA8C;IAC9C,OAAO,EAAE,oBAAoB,CAAC;IAC9B,+FAA+F;IAC/F,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,yEAAyE;IACzE,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAC7B;AAED,eAAO,MAAM,aAAa,GACzB,OAAO,KAAK,CAAC,SAAS,CAAC,EACvB,SAAS,iBAAiB,KACxB,OAAO,CAAC,gBAAgB,CAO1B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GACnC,WAAW,KAAK,CAAC,SAAS,CAAC,EAC3B,MAAM,cAAc,EACpB,SAAS,iBAAiB,KACxB,OAAO,CAAC,gBAAgB,CAwY1B,CAAC;AAwIF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GACpC,SAAS,KAAK,CAAC,gBAAgB,CAAC,EAChC,WAAW,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,EACxC,WAAW,CAAC,MAAM,EAAE,gBAAgB,KAAK,OAAO,KAC9C,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAcjC,CAAC"}
|