@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.
Files changed (179) hide show
  1. package/README.md +78 -24
  2. package/dist/ModulesDetail.svelte +15 -22
  3. package/dist/ModulesDetail.svelte.d.ts.map +1 -1
  4. package/dist/ModulesNav.svelte +4 -1
  5. package/dist/ModulesPage.svelte +1 -3
  6. package/dist/ModulesPage.svelte.d.ts.map +1 -1
  7. package/dist/PageHeader.svelte +2 -2
  8. package/dist/PageHeader.svelte.d.ts +0 -3
  9. package/dist/PageHeader.svelte.d.ts.map +1 -1
  10. package/dist/PullRequestsDetail.svelte +10 -9
  11. package/dist/PullRequestsDetail.svelte.d.ts.map +1 -1
  12. package/dist/PullRequestsPage.svelte +1 -3
  13. package/dist/PullRequestsPage.svelte.d.ts.map +1 -1
  14. package/dist/ReposTable.svelte +27 -48
  15. package/dist/ReposTable.svelte.d.ts.map +1 -1
  16. package/dist/ReposTree.svelte +5 -19
  17. package/dist/ReposTree.svelte.d.ts.map +1 -1
  18. package/dist/ReposTreeNav.svelte +5 -7
  19. package/dist/ReposTreeNav.svelte.d.ts.map +1 -1
  20. package/dist/TablePage.svelte +1 -3
  21. package/dist/TablePage.svelte.d.ts.map +1 -1
  22. package/dist/TreeItemPage.svelte +1 -3
  23. package/dist/TreeItemPage.svelte.d.ts.map +1 -1
  24. package/dist/TreePage.svelte +1 -3
  25. package/dist/TreePage.svelte.d.ts.map +1 -1
  26. package/dist/ci_reconcile.d.ts +6 -10
  27. package/dist/ci_reconcile.d.ts.map +1 -1
  28. package/dist/ci_reconcile.js +6 -8
  29. package/dist/dependency_graph.d.ts +26 -49
  30. package/dist/dependency_graph.d.ts.map +1 -1
  31. package/dist/dependency_graph.js +37 -80
  32. package/dist/dependency_updater.d.ts +1 -1
  33. package/dist/dependency_updater.d.ts.map +1 -1
  34. package/dist/dependency_updater.js +6 -1
  35. package/dist/fetch_repo_data.d.ts +34 -8
  36. package/dist/fetch_repo_data.d.ts.map +1 -1
  37. package/dist/fetch_repo_data.js +44 -22
  38. package/dist/fs_fetch_value_cache.d.ts +1 -1
  39. package/dist/fs_fetch_value_cache.js +1 -1
  40. package/dist/git_operations.d.ts +6 -49
  41. package/dist/git_operations.d.ts.map +1 -1
  42. package/dist/git_operations.js +13 -126
  43. package/dist/github.d.ts +17 -2
  44. package/dist/github.d.ts.map +1 -1
  45. package/dist/github.js +15 -6
  46. package/dist/github_helpers.d.ts.map +1 -1
  47. package/dist/github_helpers.js +3 -11
  48. package/dist/gitops_analyze.task.d.ts +24 -2
  49. package/dist/gitops_analyze.task.d.ts.map +1 -1
  50. package/dist/gitops_analyze.task.js +43 -30
  51. package/dist/gitops_config.d.ts +34 -79
  52. package/dist/gitops_config.d.ts.map +1 -1
  53. package/dist/gitops_config.js +76 -53
  54. package/dist/gitops_constants.d.ts +6 -4
  55. package/dist/gitops_constants.d.ts.map +1 -1
  56. package/dist/gitops_constants.js +6 -4
  57. package/dist/gitops_plan.task.d.ts +29 -3
  58. package/dist/gitops_plan.task.d.ts.map +1 -1
  59. package/dist/gitops_plan.task.js +80 -58
  60. package/dist/gitops_publish.task.d.ts +62 -2
  61. package/dist/gitops_publish.task.d.ts.map +1 -1
  62. package/dist/gitops_publish.task.js +187 -102
  63. package/dist/gitops_run.task.d.ts +74 -0
  64. package/dist/gitops_run.task.d.ts.map +1 -1
  65. package/dist/gitops_run.task.js +174 -160
  66. package/dist/gitops_sync.task.d.ts +65 -3
  67. package/dist/gitops_sync.task.d.ts.map +1 -1
  68. package/dist/gitops_sync.task.js +154 -30
  69. package/dist/gitops_task_helpers.d.ts +86 -59
  70. package/dist/gitops_task_helpers.d.ts.map +1 -1
  71. package/dist/gitops_task_helpers.js +120 -79
  72. package/dist/gitops_validate.task.d.ts +1 -2
  73. package/dist/gitops_validate.task.d.ts.map +1 -1
  74. package/dist/gitops_validate.task.js +15 -22
  75. package/dist/graph_validation.d.ts +16 -27
  76. package/dist/graph_validation.d.ts.map +1 -1
  77. package/dist/graph_validation.js +23 -64
  78. package/dist/local_repo.d.ts +50 -62
  79. package/dist/local_repo.d.ts.map +1 -1
  80. package/dist/local_repo.js +80 -193
  81. package/dist/log_helpers.d.ts +8 -8
  82. package/dist/log_helpers.d.ts.map +1 -1
  83. package/dist/multi_repo_publisher.d.ts +10 -0
  84. package/dist/multi_repo_publisher.d.ts.map +1 -1
  85. package/dist/multi_repo_publisher.js +115 -51
  86. package/dist/npm_registry.d.ts +23 -19
  87. package/dist/npm_registry.d.ts.map +1 -1
  88. package/dist/npm_registry.js +20 -47
  89. package/dist/operations.d.ts +75 -180
  90. package/dist/operations.d.ts.map +1 -1
  91. package/dist/operations.js +15 -7
  92. package/dist/operations_defaults.d.ts +17 -2
  93. package/dist/operations_defaults.d.ts.map +1 -1
  94. package/dist/operations_defaults.js +104 -121
  95. package/dist/output_helpers.d.ts +36 -0
  96. package/dist/output_helpers.d.ts.map +1 -1
  97. package/dist/output_helpers.js +37 -3
  98. package/dist/preflight_checks.d.ts +20 -27
  99. package/dist/preflight_checks.d.ts.map +1 -1
  100. package/dist/preflight_checks.js +37 -126
  101. package/dist/publish_steps.d.ts +2 -4
  102. package/dist/publish_steps.d.ts.map +1 -1
  103. package/dist/publish_steps.js +2 -6
  104. package/dist/publishing_event.d.ts +2 -8
  105. package/dist/publishing_event.d.ts.map +1 -1
  106. package/dist/publishing_event.js +5 -4
  107. package/dist/publishing_event_handler.d.ts +10 -8
  108. package/dist/publishing_event_handler.d.ts.map +1 -1
  109. package/dist/publishing_event_handler.js +14 -12
  110. package/dist/publishing_plan.d.ts +16 -1
  111. package/dist/publishing_plan.d.ts.map +1 -1
  112. package/dist/publishing_plan.js +328 -250
  113. package/dist/publishing_plan_logging.d.ts +1 -1
  114. package/dist/publishing_plan_logging.d.ts.map +1 -1
  115. package/dist/publishing_plan_logging.js +21 -14
  116. package/dist/repo.svelte.d.ts +7 -0
  117. package/dist/repo.svelte.d.ts.map +1 -1
  118. package/dist/repo.svelte.js +3 -0
  119. package/dist/repo_readiness.d.ts +210 -0
  120. package/dist/repo_readiness.d.ts.map +1 -0
  121. package/dist/repo_readiness.js +516 -0
  122. package/dist/repos_status.d.ts +3340 -0
  123. package/dist/repos_status.d.ts.map +1 -0
  124. package/dist/repos_status.js +555 -0
  125. package/dist/repos_status_load.d.ts +65 -0
  126. package/dist/repos_status_load.d.ts.map +1 -0
  127. package/dist/repos_status_load.js +131 -0
  128. package/package.json +7 -27
  129. package/src/lib/ci_reconcile.ts +7 -11
  130. package/src/lib/dependency_graph.ts +45 -97
  131. package/src/lib/dependency_updater.ts +7 -1
  132. package/src/lib/fetch_repo_data.ts +66 -29
  133. package/src/lib/fs_fetch_value_cache.ts +1 -1
  134. package/src/lib/git_operations.ts +15 -187
  135. package/src/lib/github.ts +20 -8
  136. package/src/lib/github_helpers.ts +5 -12
  137. package/src/lib/gitops_analyze.task.ts +79 -41
  138. package/src/lib/gitops_config.ts +88 -137
  139. package/src/lib/gitops_constants.ts +6 -4
  140. package/src/lib/gitops_plan.task.ts +113 -61
  141. package/src/lib/gitops_publish.task.ts +255 -122
  142. package/src/lib/gitops_run.task.ts +250 -178
  143. package/src/lib/gitops_sync.task.ts +208 -33
  144. package/src/lib/gitops_task_helpers.ts +166 -110
  145. package/src/lib/gitops_validate.task.ts +17 -27
  146. package/src/lib/graph_validation.ts +25 -86
  147. package/src/lib/local_repo.ts +109 -316
  148. package/src/lib/log_helpers.ts +8 -18
  149. package/src/lib/multi_repo_publisher.ts +138 -53
  150. package/src/lib/npm_registry.ts +37 -62
  151. package/src/lib/operations.ts +78 -150
  152. package/src/lib/operations_defaults.ts +108 -154
  153. package/src/lib/output_helpers.ts +55 -3
  154. package/src/lib/preflight_checks.ts +47 -183
  155. package/src/lib/publish_steps.ts +15 -13
  156. package/src/lib/publishing_event.ts +5 -4
  157. package/src/lib/publishing_event_handler.ts +18 -16
  158. package/src/lib/publishing_plan.ts +451 -287
  159. package/src/lib/publishing_plan_logging.ts +32 -23
  160. package/src/lib/repo.svelte.ts +8 -0
  161. package/src/lib/repo_readiness.ts +647 -0
  162. package/src/lib/repos_status.ts +671 -0
  163. package/src/lib/repos_status_load.ts +173 -0
  164. package/dist/config_reconcile.d.ts +0 -46
  165. package/dist/config_reconcile.d.ts.map +0 -1
  166. package/dist/config_reconcile.js +0 -64
  167. package/dist/paths.d.ts +0 -7
  168. package/dist/paths.d.ts.map +0 -1
  169. package/dist/paths.js +0 -6
  170. package/dist/repo_ops.d.ts +0 -59
  171. package/dist/repo_ops.d.ts.map +0 -1
  172. package/dist/repo_ops.js +0 -170
  173. package/dist/resolved_gitops_config.d.ts +0 -9
  174. package/dist/resolved_gitops_config.d.ts.map +0 -1
  175. package/dist/resolved_gitops_config.js +0 -12
  176. package/src/lib/config_reconcile.ts +0 -98
  177. package/src/lib/paths.ts +0 -6
  178. package/src/lib/repo_ops.ts +0 -216
  179. package/src/lib/resolved_gitops_config.ts +0 -27
@@ -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 { GitOperations, NpmOperations } from './operations.js';
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
- repo_git_ssh_url: string;
25
- repo_config: GitopsRepoConfig;
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 that has been located on the filesystem (path exists).
32
- * Used before loading - just filesystem/git concerns.
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
- type: 'local_repo_path';
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
- repo_git_ssh_url: string;
40
- repo_config: GitopsRepoConfig;
43
+ /** The repo's registry entry as `repos status --json` reported it. */
44
+ entry: ReposEntryStatus;
41
45
  }
42
46
  /**
43
- * A repo that is missing from the filesystem (needs cloning).
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 interface LocalRepoMissing {
46
- type: 'local_repo_missing';
47
- repo_name: string;
48
- repo_url: string;
49
- repo_git_ssh_url: string;
50
- repo_config: GitopsRepoConfig;
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 repo data, optionally syncing the working tree first.
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
- * When `sync` is `false` (the default for read-only diagnostics like
56
- * `gitops_analyze`/`gitops_plan`), the repo is loaded exactly as it sits on
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
- * When `sync` is `true` (used by `gitops_sync`), the working tree is brought in
62
- * line with the configured branch first:
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
- * Either way it then:
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: _log, git_ops, npm_ops, sync, allow_dirty }: {
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 synced
88
- * and rendered on the dashboard, but excluded from the changeset cascade.
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 local_repos_ensure: ({ resolved_config, repos_dir, gitops_config, download, log, npm_ops }: {
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
@@ -1 +1 @@
1
- {"version":3,"file":"local_repo.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/local_repo.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAK3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBA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C1C,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"}
@@ -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 { default_git_operations, default_npm_operations } from './operations_defaults.js';
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
- * Loads repo data, optionally syncing the working tree first.
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
- * When `sync` is `false` (the default for read-only diagnostics like
18
- * `gitops_analyze`/`gitops_plan`), the repo is loaded exactly as it sits on
19
- * disk — no branch switch, pull, install, or clean-workspace check. This makes
20
- * those commands safe to run on an active workspace with uncommitted changes or
21
- * feature branches checked out.
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 local_repo_load = async ({ local_repo_path, log: _log, git_ops = default_git_operations, npm_ops = default_npm_operations, sync = true, allow_dirty = false }) => {
40
- const { repo_config, repo_dir, repo_name, repo_git_ssh_url } = local_repo_path;
41
- if (sync) {
42
- // Record commit hash before any changes
43
- const commit_before_result = await git_ops.current_commit_hash({ cwd: repo_dir });
44
- if (!commit_before_result.ok) {
45
- throw new TaskError(`Failed to get commit hash in ${repo_dir}: ${commit_before_result.message}`);
46
- }
47
- const commit_before = commit_before_result.value;
48
- // Switch to target branch if needed
49
- const branch_result = await git_ops.current_branch_name({ cwd: repo_dir });
50
- if (!branch_result.ok) {
51
- throw new TaskError(`Failed to get current branch in ${repo_dir}: ${branch_result.message}`);
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 switched_branches = branch_result.value !== repo_config.branch;
54
- if (switched_branches) {
55
- // Guard the switch on a clean workspace unless the caller opts into `allow_dirty`,
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
- // Only pull if remote exists (skip for local-only repos, test fixtures)
72
- const origin_result = await git_ops.has_remote({ remote: 'origin', cwd: repo_dir });
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 (origin_result.value) {
77
- // Pull the configured branch explicitly. Without a branch, `git pull origin`
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
- // Check clean workspace after pull to ensure we're in a good state
86
- // (skipped when `allow_dirty`, since uncommitted changes are expected then)
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
- // Record commit hash after pull
97
- const commit_after_result = await git_ops.current_commit_hash({ cwd: repo_dir });
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
- const commit_after = commit_after_result.value;
102
- // Track if we got new commits
103
- const got_new_commits = commit_before !== commit_after;
104
- // Only install if package.json changed
105
- if (got_new_commits) {
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: _log }));
99
+ ({ library_json, package_json } = await library_load_from_repo(repo_dir, { log }));
135
100
  }
136
101
  catch (err) {
137
- const message = to_error_message(err);
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
- repo_git_ssh_url,
148
- repo_config
110
+ entry
149
111
  };
150
112
  // Extract dependencies from the full package_json
151
113
  if (package_json.dependencies) {
@@ -161,24 +123,24 @@ 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 synced
165
- * and rendered on the dashboard, but excluded from the changeset cascade.
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 configured repo URL, which is
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
139
  const local_repo_load_cargo = async ({ local_repo_path }) => {
178
- const { repo_config, repo_dir, repo_name, repo_url, repo_git_ssh_url } = 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 repo name parsed from
181
- // the URL; the config's `repo_url` is the authoritative `repository`.
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',
@@ -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
- repo_git_ssh_url,
196
- repo_config
157
+ entry
197
158
  };
198
159
  };
199
- export const local_repos_ensure = async ({ resolved_config, repos_dir, gitops_config, download, log, npm_ops = default_npm_operations }) => {
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
- // Sequential loading (original behavior)
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, git_ops, npm_ops, sync, allow_dirty }));
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, git_ops, npm_ops, sync, allow_dirty });
171
+ return local_repo_load({ local_repo_path, log });
240
172
  });
241
173
  // Check for failures and collect successes
242
174
  const loaded = [];
@@ -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
- };
@@ -1,38 +1,38 @@
1
1
  import type { Logger } from '@fuzdev/fuz_util/log.ts';
2
- import type { DependencyGraphBuilder } from './dependency_graph.js';
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: ReturnType<DependencyGraphBuilder["analyze"]>) => Array<string>;
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: ReturnType<DependencyGraphBuilder["analyze"]>) => Array<string>;
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: ReturnType<DependencyGraphBuilder["analyze"]>) => Array<string>;
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: ReturnType<DependencyGraphBuilder["analyze"]>, log: Logger, indent?: string) => void;
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: ReturnType<DependencyGraphBuilder["analyze"]>, log: Logger, indent?: string) => void;
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: ReturnType<DependencyGraphBuilder["analyze"]>, log: Logger, indent?: string) => void;
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: ReturnType<DependencyGraphBuilder["analyze"]>, log: Logger, indent?: string) => void;
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,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAGtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,4BAA4B,GACxC,UAAU,UAAU,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC,KACrD,KAAK,CAAC,MAAM,CAYd,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAC7B,UAAU,UAAU,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC,KACrD,KAAK,CAAC,MAAM,CAed,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GACpC,UAAU,UAAU,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC,KACrD,KAAK,CAAC,MAAM,CAed,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,GACrC,UAAU,UAAU,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC,EACvD,KAAK,MAAM,EACX,eAAW,KACT,IAKF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GAC1B,UAAU,UAAU,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC,EACvD,KAAK,MAAM,EACX,eAAW,KACT,IAKF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GACjC,UAAU,UAAU,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC,EACvD,KAAK,MAAM,EACX,eAAW,KACT,IAKF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GACnC,UAAU,UAAU,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC,EACvD,KAAK,MAAM,EACX,eAAW,KACT,IAIF,CAAC"}
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,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;AAE9B,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,EAG3B,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,sFAAsF;IACtF,MAAM,CAAC,EAAE,sBAAsB,CAAC;CAChC;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,O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