@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/dependency_graph.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Dependency graph data structure and algorithms for multi-repo publishing.
|
|
3
3
|
*
|
|
4
|
-
* Provides `DependencyGraph` class with topological sort
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Provides the `DependencyGraph` class, built from local repos, with topological sort
|
|
5
|
+
* (via `@fuzdev/fuz_util/sort.ts`), cycle detection by dependency type, and
|
|
6
|
+
* wildcard-range analysis.
|
|
7
|
+
* For the publishing order and the analysis workflow, see `graph_validation.ts`.
|
|
7
8
|
*
|
|
8
9
|
* @module
|
|
9
10
|
*/
|
|
@@ -12,33 +13,31 @@ import { topological_sort as topological_sort_generic } from '@fuzdev/fuz_util/s
|
|
|
12
13
|
export const DEPENDENCY_TYPE = {
|
|
13
14
|
PROD: 'prod',
|
|
14
15
|
PEER: 'peer',
|
|
15
|
-
DEV: 'dev'
|
|
16
|
+
DEV: 'dev'
|
|
16
17
|
};
|
|
17
18
|
export class DependencyGraph {
|
|
18
|
-
nodes;
|
|
19
|
-
edges; // pkg -> dependents
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
nodes = new Map();
|
|
20
|
+
edges = new Map(); // pkg -> dependents
|
|
21
|
+
/**
|
|
22
|
+
* Builds the graph from local repos.
|
|
23
|
+
*
|
|
24
|
+
* Two passes: first creates nodes, then builds edges (dependents).
|
|
25
|
+
* Prioritizes prod/peer deps over dev deps when the same package appears in
|
|
26
|
+
* multiple dependency types (the stronger constraint wins).
|
|
27
|
+
*/
|
|
28
|
+
constructor(repos) {
|
|
29
|
+
// first pass: create nodes
|
|
26
30
|
for (const repo of repos) {
|
|
27
31
|
const { library, package_json } = repo;
|
|
28
32
|
const node = {
|
|
29
33
|
name: library.name,
|
|
30
34
|
version: package_json.version || '0.0.0',
|
|
31
|
-
repo,
|
|
32
35
|
dependencies: new Map(),
|
|
33
|
-
dependents: new Set()
|
|
34
|
-
publishable: !package_json.private,
|
|
36
|
+
dependents: new Set()
|
|
35
37
|
};
|
|
36
|
-
// Extract dependencies
|
|
37
38
|
const deps = package_json.dependencies || EMPTY_OBJECT;
|
|
38
39
|
const dev_deps = package_json.devDependencies || EMPTY_OBJECT;
|
|
39
40
|
const peer_deps = package_json.peerDependencies || EMPTY_OBJECT;
|
|
40
|
-
// Add dependencies, prioritizing prod/peer over dev
|
|
41
|
-
// (if a package appears in multiple dep types, use the stronger constraint)
|
|
42
41
|
for (const [name, version] of Object.entries(deps)) {
|
|
43
42
|
node.dependencies.set(name, { type: DEPENDENCY_TYPE.PROD, version });
|
|
44
43
|
}
|
|
@@ -46,7 +45,7 @@ export class DependencyGraph {
|
|
|
46
45
|
node.dependencies.set(name, { type: DEPENDENCY_TYPE.PEER, version });
|
|
47
46
|
}
|
|
48
47
|
for (const [name, version] of Object.entries(dev_deps)) {
|
|
49
|
-
//
|
|
48
|
+
// only add dev deps if not already present as prod/peer
|
|
50
49
|
if (!node.dependencies.has(name)) {
|
|
51
50
|
node.dependencies.set(name, { type: DEPENDENCY_TYPE.DEV, version });
|
|
52
51
|
}
|
|
@@ -54,12 +53,11 @@ export class DependencyGraph {
|
|
|
54
53
|
this.nodes.set(library.name, node);
|
|
55
54
|
this.edges.set(library.name, new Set());
|
|
56
55
|
}
|
|
57
|
-
//
|
|
56
|
+
// second pass: build edges (dependents) for internal dependencies
|
|
58
57
|
for (const node of this.nodes.values()) {
|
|
59
58
|
for (const [dep_name] of node.dependencies) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const dep_node = this.nodes.get(dep_name);
|
|
59
|
+
const dep_node = this.nodes.get(dep_name);
|
|
60
|
+
if (dep_node) {
|
|
63
61
|
dep_node.dependents.add(node.name);
|
|
64
62
|
this.edges.get(dep_name).add(node.name);
|
|
65
63
|
}
|
|
@@ -69,13 +67,6 @@ export class DependencyGraph {
|
|
|
69
67
|
get_node(name) {
|
|
70
68
|
return this.nodes.get(name);
|
|
71
69
|
}
|
|
72
|
-
get_dependents(name) {
|
|
73
|
-
return this.edges.get(name) || new Set();
|
|
74
|
-
}
|
|
75
|
-
get_dependencies(name) {
|
|
76
|
-
const node = this.nodes.get(name);
|
|
77
|
-
return node ? node.dependencies : new Map();
|
|
78
|
-
}
|
|
79
70
|
/**
|
|
80
71
|
* Computes topological sort order for dependency graph.
|
|
81
72
|
*
|
|
@@ -96,7 +87,7 @@ export class DependencyGraph {
|
|
|
96
87
|
return false;
|
|
97
88
|
return this.nodes.has(dep_name);
|
|
98
89
|
})
|
|
99
|
-
.map(([dep_name]) => dep_name)
|
|
90
|
+
.map(([dep_name]) => dep_name)
|
|
100
91
|
}));
|
|
101
92
|
const result = topological_sort_generic(items, 'package');
|
|
102
93
|
if (!result.ok) {
|
|
@@ -120,6 +111,22 @@ export class DependencyGraph {
|
|
|
120
111
|
const dev_cycles = this.#find_cycles((spec) => spec.type === DEPENDENCY_TYPE.DEV);
|
|
121
112
|
return { production_cycles, dev_cycles };
|
|
122
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Reports cycles by type and wildcard (`*`) dependency ranges.
|
|
116
|
+
* Tolerates cycles: it reports them rather than throwing.
|
|
117
|
+
*/
|
|
118
|
+
analyze() {
|
|
119
|
+
const { production_cycles, dev_cycles } = this.detect_cycles_by_type();
|
|
120
|
+
const wildcard_deps = [];
|
|
121
|
+
for (const node of this.nodes.values()) {
|
|
122
|
+
for (const [dep_name, spec] of node.dependencies) {
|
|
123
|
+
if (spec.version === '*') {
|
|
124
|
+
wildcard_deps.push({ pkg: node.name, dep: dep_name, version: spec.version });
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return { production_cycles, dev_cycles, wildcard_deps };
|
|
129
|
+
}
|
|
123
130
|
/** DFS cycle detection following only edges that match the filter. */
|
|
124
131
|
#find_cycles(include) {
|
|
125
132
|
const cycles = [];
|
|
@@ -165,10 +172,9 @@ export class DependencyGraph {
|
|
|
165
172
|
version: node.version,
|
|
166
173
|
dependencies: Array.from(node.dependencies.entries()).map(([name, spec]) => ({
|
|
167
174
|
name,
|
|
168
|
-
spec
|
|
175
|
+
spec
|
|
169
176
|
})),
|
|
170
|
-
dependents: Array.from(node.dependents)
|
|
171
|
-
publishable: node.publishable,
|
|
177
|
+
dependents: Array.from(node.dependents)
|
|
172
178
|
}));
|
|
173
179
|
const edges = [];
|
|
174
180
|
for (const [from, tos] of this.edges) {
|
|
@@ -179,52 +185,3 @@ export class DependencyGraph {
|
|
|
179
185
|
return { nodes, edges };
|
|
180
186
|
}
|
|
181
187
|
}
|
|
182
|
-
/**
|
|
183
|
-
* Builder for creating and analyzing dependency graphs.
|
|
184
|
-
*/
|
|
185
|
-
export class DependencyGraphBuilder {
|
|
186
|
-
/**
|
|
187
|
-
* Constructs dependency graph from local repos.
|
|
188
|
-
*
|
|
189
|
-
* Two-pass algorithm: first creates nodes, then builds edges (dependents).
|
|
190
|
-
* Prioritizes prod/peer deps over dev deps when same package appears in
|
|
191
|
-
* multiple dependency types (stronger constraint wins).
|
|
192
|
-
*
|
|
193
|
-
* @returns fully initialized dependency graph with all nodes and edges
|
|
194
|
-
*/
|
|
195
|
-
build_from_repos(repos) {
|
|
196
|
-
const graph = new DependencyGraph();
|
|
197
|
-
graph.init_from_repos(repos);
|
|
198
|
-
return graph;
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Computes publishing order using topological sort with dev deps excluded.
|
|
202
|
-
*
|
|
203
|
-
* Excludes dev dependencies to break circular dev dependency cycles while
|
|
204
|
-
* preserving production/peer dependency ordering. This allows patterns like
|
|
205
|
-
* shared test utilities that depend on each other for development.
|
|
206
|
-
*
|
|
207
|
-
* @returns package names in safe publishing order (dependencies before dependents)
|
|
208
|
-
* @throws {Error} if production/peer cycles detected (cannot be resolved by exclusion)
|
|
209
|
-
*/
|
|
210
|
-
compute_publishing_order(graph) {
|
|
211
|
-
return graph.topological_sort(true); // Exclude dev dependencies
|
|
212
|
-
}
|
|
213
|
-
analyze(graph) {
|
|
214
|
-
const { production_cycles, dev_cycles } = graph.detect_cycles_by_type();
|
|
215
|
-
const wildcard_deps = [];
|
|
216
|
-
const missing_peers = [];
|
|
217
|
-
for (const node of graph.nodes.values()) {
|
|
218
|
-
for (const [dep_name, spec] of node.dependencies) {
|
|
219
|
-
if (spec.version === '*') {
|
|
220
|
-
wildcard_deps.push({ pkg: node.name, dep: dep_name, version: spec.version });
|
|
221
|
-
}
|
|
222
|
-
if (spec.type === DEPENDENCY_TYPE.PEER && !graph.nodes.has(dep_name)) {
|
|
223
|
-
// External peer dependency
|
|
224
|
-
missing_peers.push({ pkg: node.name, dep: dep_name });
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
return { production_cycles, dev_cycles, wildcard_deps, missing_peers };
|
|
229
|
-
}
|
|
230
|
-
}
|
|
@@ -19,7 +19,7 @@ export interface UpdatePackageJsonOptions {
|
|
|
19
19
|
* 3. Creates auto-changeset if `published_versions` provided (for transitive updates)
|
|
20
20
|
* 4. Commits both `package.json` and changeset with standard message
|
|
21
21
|
*
|
|
22
|
-
* Uses version strategy to determine prefix (exact, caret, tilde) while preserving
|
|
22
|
+
* Uses version strategy to determine prefix (exact, caret, tilde, gte) while preserving
|
|
23
23
|
* existing prefixes when possible.
|
|
24
24
|
*
|
|
25
25
|
* @throws {Error} if file operations or git operations fail
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependency_updater.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/dependency_updater.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"dependency_updater.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/dependency_updater.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAGtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAMlE,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGnE,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,KAAK,CAAC;AAElE,MAAM,WAAW,wBAAwB;IACxC,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,kBAAkB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACnD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,MAAM,CAAC,EAAE,YAAY,CAAC;CACtB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mBAAmB,GAC/B,MAAM,SAAS,EACf,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,UAAS,wBAA6B,KACpC,OAAO,CAAC,IAAI,CAwId,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACrC,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,MAAM,CAAC,EAAE,YAAY,CAAC;CACtB;AAED,eAAO,MAAM,gBAAgB,GAC5B,OAAO,KAAK,CAAC,SAAS,CAAC,EACvB,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,UAAS,qBAA0B,KACjC,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAA;KAAE,CAAC,CAAA;CAAE,CAuD5E,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC/B,MAAM,SAAS,EACf,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KAC5B,GAAG,CACL,MAAM,EACN;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,cAAc,GAAG,iBAAiB,GAAG,kBAAkB,CAAA;CAAE,CAkD/F,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { join } from 'node:path';
|
|
2
|
-
import { create_changeset_for_dependency_updates, create_dependency_updates
|
|
2
|
+
import { create_changeset_for_dependency_updates, create_dependency_updates } from './changeset_generator.js';
|
|
3
3
|
import { needs_update, get_update_prefix } from './version_utils.js';
|
|
4
4
|
import { default_git_operations, default_fs_operations } from './operations_defaults.js';
|
|
5
5
|
/**
|
|
@@ -11,13 +11,13 @@ import { default_git_operations, default_fs_operations } from './operations_defa
|
|
|
11
11
|
* 3. Creates auto-changeset if `published_versions` provided (for transitive updates)
|
|
12
12
|
* 4. Commits both `package.json` and changeset with standard message
|
|
13
13
|
*
|
|
14
|
-
* Uses version strategy to determine prefix (exact, caret, tilde) while preserving
|
|
14
|
+
* Uses version strategy to determine prefix (exact, caret, tilde, gte) while preserving
|
|
15
15
|
* existing prefixes when possible.
|
|
16
16
|
*
|
|
17
17
|
* @throws {Error} if file operations or git operations fail
|
|
18
18
|
*/
|
|
19
19
|
export const update_package_json = async (repo, updates, options = {}) => {
|
|
20
|
-
const { strategy = 'caret', published_versions, log, git_ops = default_git_operations, fs_ops = default_fs_operations
|
|
20
|
+
const { strategy = 'caret', published_versions, log, git_ops = default_git_operations, fs_ops = default_fs_operations } = options;
|
|
21
21
|
if (updates.size === 0)
|
|
22
22
|
return;
|
|
23
23
|
const package_json_path = join(repo.repo_dir, 'package.json');
|
|
@@ -68,11 +68,12 @@ export const update_package_json = async (repo, updates, options = {}) => {
|
|
|
68
68
|
// Write updated package.json
|
|
69
69
|
const write_result = await fs_ops.writeFile({
|
|
70
70
|
path: package_json_path,
|
|
71
|
-
content: JSON.stringify(package_json, null, '\t') + '\n'
|
|
71
|
+
content: JSON.stringify(package_json, null, '\t') + '\n'
|
|
72
72
|
});
|
|
73
73
|
if (!write_result.ok) {
|
|
74
74
|
throw new Error(`Failed to write package.json: ${write_result.message}`);
|
|
75
75
|
}
|
|
76
|
+
const staged = [];
|
|
76
77
|
// Create changeset if we have published version info
|
|
77
78
|
if (published_versions && published_versions.size > 0) {
|
|
78
79
|
// Build dependency updates info for changeset
|
|
@@ -107,6 +108,7 @@ export const update_package_json = async (repo, updates, options = {}) => {
|
|
|
107
108
|
if (!add_result.ok) {
|
|
108
109
|
throw new Error(`Failed to stage changeset: ${add_result.message}`);
|
|
109
110
|
}
|
|
111
|
+
staged.push(changeset_path);
|
|
110
112
|
}
|
|
111
113
|
}
|
|
112
114
|
// Commit the changes (including both package.json and changeset)
|
|
@@ -114,16 +116,19 @@ export const update_package_json = async (repo, updates, options = {}) => {
|
|
|
114
116
|
if (!add_pkg_result.ok) {
|
|
115
117
|
throw new Error(`Failed to stage package.json: ${add_pkg_result.message}`);
|
|
116
118
|
}
|
|
119
|
+
staged.push('package.json');
|
|
120
|
+
// commit only what this staged, so nothing else in the index rides along
|
|
117
121
|
const commit_result = await git_ops.commit({
|
|
118
122
|
message: `update dependencies after publishing`,
|
|
119
|
-
|
|
123
|
+
files: staged,
|
|
124
|
+
cwd: repo.repo_dir
|
|
120
125
|
});
|
|
121
126
|
if (!commit_result.ok) {
|
|
122
127
|
throw new Error(`Failed to commit: ${commit_result.message}`);
|
|
123
128
|
}
|
|
124
129
|
};
|
|
125
130
|
export const update_all_repos = async (repos, published, options = {}) => {
|
|
126
|
-
const { strategy = 'caret', log, git_ops = default_git_operations, fs_ops = default_fs_operations
|
|
131
|
+
const { strategy = 'caret', log, git_ops = default_git_operations, fs_ops = default_fs_operations } = options;
|
|
127
132
|
let updated_count = 0;
|
|
128
133
|
const failed = [];
|
|
129
134
|
for (const repo of repos) {
|
|
@@ -178,7 +183,7 @@ export const find_updates_needed = (repo, published) => {
|
|
|
178
183
|
updates.set(dep_name, {
|
|
179
184
|
current: current_version,
|
|
180
185
|
new: new_version,
|
|
181
|
-
type: 'dependencies'
|
|
186
|
+
type: 'dependencies'
|
|
182
187
|
});
|
|
183
188
|
}
|
|
184
189
|
}
|
|
@@ -191,7 +196,7 @@ export const find_updates_needed = (repo, published) => {
|
|
|
191
196
|
updates.set(dep_name, {
|
|
192
197
|
current: current_version,
|
|
193
198
|
new: new_version,
|
|
194
|
-
type: 'devDependencies'
|
|
199
|
+
type: 'devDependencies'
|
|
195
200
|
});
|
|
196
201
|
}
|
|
197
202
|
}
|
|
@@ -204,7 +209,7 @@ export const find_updates_needed = (repo, published) => {
|
|
|
204
209
|
updates.set(dep_name, {
|
|
205
210
|
current: current_version,
|
|
206
211
|
new: new_version,
|
|
207
|
-
type: 'peerDependencies'
|
|
212
|
+
type: 'peerDependencies'
|
|
208
213
|
});
|
|
209
214
|
}
|
|
210
215
|
}
|
|
@@ -2,18 +2,44 @@ import type { Logger } from '@fuzdev/fuz_util/log.ts';
|
|
|
2
2
|
import type { FetchValueCache } from '@fuzdev/fuz_util/fetch.ts';
|
|
3
3
|
import type { RepoJson } from './repo.svelte.js';
|
|
4
4
|
import type { LocalRepo } from './local_repo.js';
|
|
5
|
+
/**
|
|
6
|
+
* Options for `fetch_repo_data`.
|
|
7
|
+
*/
|
|
8
|
+
export interface FetchRepoDataOptions {
|
|
9
|
+
/** The repos to fetch GitHub metadata for, in order. */
|
|
10
|
+
local_repos: Array<LocalRepo>;
|
|
11
|
+
/** GitHub API token, sent with each request. */
|
|
12
|
+
token?: string;
|
|
13
|
+
/** Response memoization, from `fuz_util`'s `fetch.ts`. */
|
|
14
|
+
cache?: FetchValueCache;
|
|
15
|
+
log?: Logger;
|
|
16
|
+
/** Milliseconds to wait before each API request. Defaults to `33`. */
|
|
17
|
+
delay?: number;
|
|
18
|
+
/** Sent as the `x-github-api-version` header when set. */
|
|
19
|
+
github_api_version?: string;
|
|
20
|
+
/** The `fetch` the API requests go through. Defaults to `globalThis.fetch`. */
|
|
21
|
+
fetch?: typeof globalThis.fetch;
|
|
22
|
+
}
|
|
5
23
|
/**
|
|
6
24
|
* Fetches GitHub metadata (CI status, PRs) for all repos.
|
|
7
25
|
*
|
|
8
|
-
* Fetches sequentially with delay
|
|
9
|
-
* Uses `await_in_loop` intentionally to avoid parallel requests
|
|
26
|
+
* Fetches sequentially with a delay before each request to respect GitHub API
|
|
27
|
+
* rate limits. Uses `await_in_loop` intentionally to avoid parallel requests
|
|
28
|
+
* overwhelming the API. CI status is read for the branch each repo's registry
|
|
29
|
+
* entry follows (`main` when it names none), and that branch is written to
|
|
30
|
+
* `RepoJson.branch`.
|
|
10
31
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
32
|
+
* A repo whose registry entry declares no CI (`ci: false`) isn't asked for
|
|
33
|
+
* check runs, and one with none on its branch isn't a failure: both leave
|
|
34
|
+
* `check_runs` `null` without logging. A failed fetch is logged as an error
|
|
35
|
+
* and leaves `null` for that repo's `check_runs` or `pull_requests`, and the
|
|
36
|
+
* remaining repos still fetch — except a 401 response or a repo URL without a
|
|
37
|
+
* GitHub owner, which throw.
|
|
13
38
|
*
|
|
14
|
-
* @param
|
|
15
|
-
* @
|
|
16
|
-
* @
|
|
39
|
+
* @param options - the repos, credentials, cache, and pacing
|
|
40
|
+
* @returns a `RepoJson` for each repo, in the order given
|
|
41
|
+
* @throws {Error} on a 401 response (check `SECRET_GITHUB_API_TOKEN`) or a
|
|
42
|
+
* repo whose URL has no GitHub owner
|
|
17
43
|
*/
|
|
18
|
-
export declare const fetch_repo_data: (
|
|
44
|
+
export declare const fetch_repo_data: (options: FetchRepoDataOptions) => Promise<Array<RepoJson>>;
|
|
19
45
|
//# sourceMappingURL=fetch_repo_data.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch_repo_data.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/fetch_repo_data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"fetch_repo_data.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/fetch_repo_data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAOjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,wDAAwD;IACxD,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC9B,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+EAA+E;IAC/E,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,eAAe,GAAU,SAAS,oBAAoB,KAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CA+C5F,CAAC"}
|
package/dist/fetch_repo_data.js
CHANGED
|
@@ -3,31 +3,51 @@ import { fetch_github_check_runs, fetch_github_pull_requests } from './github.js
|
|
|
3
3
|
/**
|
|
4
4
|
* Fetches GitHub metadata (CI status, PRs) for all repos.
|
|
5
5
|
*
|
|
6
|
-
* Fetches sequentially with delay
|
|
7
|
-
* Uses `await_in_loop` intentionally to avoid parallel requests
|
|
6
|
+
* Fetches sequentially with a delay before each request to respect GitHub API
|
|
7
|
+
* rate limits. Uses `await_in_loop` intentionally to avoid parallel requests
|
|
8
|
+
* overwhelming the API. CI status is read for the branch each repo's registry
|
|
9
|
+
* entry follows (`main` when it names none), and that branch is written to
|
|
10
|
+
* `RepoJson.branch`.
|
|
8
11
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
12
|
+
* A repo whose registry entry declares no CI (`ci: false`) isn't asked for
|
|
13
|
+
* check runs, and one with none on its branch isn't a failure: both leave
|
|
14
|
+
* `check_runs` `null` without logging. A failed fetch is logged as an error
|
|
15
|
+
* and leaves `null` for that repo's `check_runs` or `pull_requests`, and the
|
|
16
|
+
* remaining repos still fetch — except a 401 response or a repo URL without a
|
|
17
|
+
* GitHub owner, which throw.
|
|
11
18
|
*
|
|
12
|
-
* @param
|
|
13
|
-
* @
|
|
14
|
-
* @
|
|
19
|
+
* @param options - the repos, credentials, cache, and pacing
|
|
20
|
+
* @returns a `RepoJson` for each repo, in the order given
|
|
21
|
+
* @throws {Error} on a 401 response (check `SECRET_GITHUB_API_TOKEN`) or a
|
|
22
|
+
* repo whose URL has no GitHub owner
|
|
15
23
|
*/
|
|
16
|
-
export const fetch_repo_data = async (
|
|
24
|
+
export const fetch_repo_data = async (options) => {
|
|
25
|
+
const { local_repos, token, cache, log, delay = 33, github_api_version, fetch } = options;
|
|
17
26
|
const repos = [];
|
|
18
|
-
for (const { library, package_json,
|
|
27
|
+
for (const { library, package_json, entry } of local_repos) {
|
|
19
28
|
const repo_url = library.repo_url;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
const branch = entry.branch ?? 'main';
|
|
30
|
+
// CI status, for repos the registry says run CI
|
|
31
|
+
let check_runs = null;
|
|
32
|
+
if (entry.ci) {
|
|
33
|
+
await wait(delay);
|
|
34
|
+
const fetched = await fetch_github_check_runs(library, {
|
|
35
|
+
cache,
|
|
36
|
+
log,
|
|
37
|
+
token,
|
|
38
|
+
api_version: github_api_version,
|
|
39
|
+
ref: branch,
|
|
40
|
+
fetch
|
|
41
|
+
});
|
|
42
|
+
if (fetched.ok) {
|
|
43
|
+
check_runs = fetched.value;
|
|
44
|
+
if (!check_runs)
|
|
45
|
+
log?.debug(`no check runs on \`${branch}\`: ${repo_url}`);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
log?.error(`failed to fetch CI status (${fetched.status}): ${repo_url}`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
31
51
|
// pull requests
|
|
32
52
|
await wait(delay);
|
|
33
53
|
const pull_requests = await fetch_github_pull_requests(library, {
|
|
@@ -35,14 +55,16 @@ export const fetch_repo_data = async (resolved_repos, token, cache, log, delay =
|
|
|
35
55
|
log,
|
|
36
56
|
token,
|
|
37
57
|
api_version: github_api_version,
|
|
58
|
+
fetch
|
|
38
59
|
});
|
|
39
60
|
if (!pull_requests)
|
|
40
|
-
log?.error('failed to fetch
|
|
61
|
+
log?.error('failed to fetch pull requests: ' + repo_url);
|
|
41
62
|
repos.push({
|
|
42
63
|
library_json: library.library_json,
|
|
43
64
|
package_json,
|
|
65
|
+
branch,
|
|
44
66
|
check_runs,
|
|
45
|
-
pull_requests
|
|
67
|
+
pull_requests
|
|
46
68
|
});
|
|
47
69
|
}
|
|
48
70
|
return repos;
|
|
@@ -14,7 +14,7 @@ export interface FetchCache {
|
|
|
14
14
|
* cache is cleared (delete file) and starts fresh. This handles format changes.
|
|
15
15
|
*
|
|
16
16
|
* Uses `structuredClone` to track changes - only writes to disk if data modified.
|
|
17
|
-
* Formatted with
|
|
17
|
+
* Formatted with gro's `format_file` before writing for version control friendliness.
|
|
18
18
|
*
|
|
19
19
|
* @param name - cache filename (without .json extension)
|
|
20
20
|
* @param dir - cache directory (defaults to `.gro/build/fetch/`)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs_fetch_value_cache.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/fs_fetch_value_cache.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"fs_fetch_value_cache.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/fs_fetch_value_cache.ts"],"names":[],"mappings":"AAIA,OAAO,EAGN,KAAK,eAAe,EACpB,MAAM,2BAA2B,CAAC;AAKnC,MAAM,WAAW,UAAU;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,eAAe,CAAC;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CAC7B;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,2BAA2B,GACvC,MAAM,MAAM,EACZ,YAAgC,KAC9B,OAAO,CAAC,UAAU,CA2BpB,CAAC"}
|
|
@@ -11,7 +11,7 @@ import { existsSync } from 'node:fs';
|
|
|
11
11
|
* cache is cleared (delete file) and starts fresh. This handles format changes.
|
|
12
12
|
*
|
|
13
13
|
* Uses `structuredClone` to track changes - only writes to disk if data modified.
|
|
14
|
-
* Formatted with
|
|
14
|
+
* Formatted with gro's `format_file` before writing for version control friendliness.
|
|
15
15
|
*
|
|
16
16
|
* @param name - cache filename (without .json extension)
|
|
17
17
|
* @param dir - cache directory (defaults to `.gro/build/fetch/`)
|
|
@@ -42,9 +42,9 @@ export const create_fs_fetch_value_cache = async (name, dir = join(paths.build,
|
|
|
42
42
|
return false; // no changes to save
|
|
43
43
|
}
|
|
44
44
|
await mkdir(dirname(data_path), { recursive: true });
|
|
45
|
-
await writeFile(data_path,
|
|
45
|
+
await writeFile(data_path, format_file(serialize_cache(data), { lang: 'json' }));
|
|
46
46
|
return true;
|
|
47
|
-
}
|
|
47
|
+
}
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
50
|
// TODO this is quick and dirty, but fine because it's only expected to be called during development
|
package/dist/git_operations.d.ts
CHANGED
|
@@ -1,59 +1,16 @@
|
|
|
1
1
|
import type { SpawnOptions } from 'node:child_process';
|
|
2
|
-
import { type GitBranch, type GitOrigin } from '@fuzdev/fuz_util/git.ts';
|
|
3
2
|
/**
|
|
4
3
|
* Adds files to git staging area and throws if anything goes wrong.
|
|
5
4
|
*/
|
|
6
5
|
export declare const git_add: (files: string | Array<string>, options?: SpawnOptions) => Promise<void>;
|
|
7
6
|
/**
|
|
8
|
-
* Commits
|
|
7
|
+
* Commits `files` alone with a message, leaving anything else staged out of
|
|
8
|
+
* the commit, and throws if anything goes wrong. `files` must be non-empty:
|
|
9
|
+
* an empty list would commit the whole index.
|
|
9
10
|
*/
|
|
10
|
-
export declare const git_commit: (message: string, options?: SpawnOptions) => Promise<void>;
|
|
11
|
+
export declare const git_commit: (message: string, files: Array<string>, options?: SpawnOptions) => Promise<void>;
|
|
11
12
|
/**
|
|
12
|
-
*
|
|
13
|
+
* Wrapper for gro's `git_current_commit_hash` that reads `HEAD` and throws if null.
|
|
13
14
|
*/
|
|
14
|
-
export declare const
|
|
15
|
-
/**
|
|
16
|
-
* Creates a git tag and throws if anything goes wrong.
|
|
17
|
-
*/
|
|
18
|
-
export declare const git_tag: (tag_name: string, message?: string, options?: SpawnOptions) => Promise<void>;
|
|
19
|
-
/**
|
|
20
|
-
* Pushes a tag to origin and throws if anything goes wrong.
|
|
21
|
-
*/
|
|
22
|
-
export declare const git_push_tag: (tag_name: string, origin?: GitOrigin, options?: SpawnOptions) => Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* Returns `true` if the working tree has any changes — staged, unstaged, or
|
|
25
|
-
* untracked (`git status --porcelain`). Broader than `git_list_uncommitted_files`,
|
|
26
|
-
* which reports only tracked working-tree changes relative to HEAD.
|
|
27
|
-
*/
|
|
28
|
-
export declare const git_has_changes: (options?: SpawnOptions) => Promise<boolean>;
|
|
29
|
-
/**
|
|
30
|
-
* Lists uncommitted files in the working tree (`git diff --name-only HEAD`).
|
|
31
|
-
*/
|
|
32
|
-
export declare const git_list_uncommitted_files: (options?: SpawnOptions) => Promise<Array<string>>;
|
|
33
|
-
export declare const git_has_file_changed: (from_commit: string, to_commit: string, file_path: string, options?: SpawnOptions) => Promise<boolean>;
|
|
34
|
-
/**
|
|
35
|
-
* Stashes current changes and throws if anything goes wrong.
|
|
36
|
-
*/
|
|
37
|
-
export declare const git_stash: (message?: string, options?: SpawnOptions) => Promise<void>;
|
|
38
|
-
/**
|
|
39
|
-
* Applies stashed changes and throws if anything goes wrong.
|
|
40
|
-
*/
|
|
41
|
-
export declare const git_stash_pop: (options?: SpawnOptions) => Promise<void>;
|
|
42
|
-
/**
|
|
43
|
-
* Switches to a branch with safety checks and throws if workspace is not clean.
|
|
44
|
-
*/
|
|
45
|
-
export declare const git_switch_branch: (branch: GitBranch, pull?: boolean, options?: SpawnOptions) => Promise<void>;
|
|
46
|
-
/**
|
|
47
|
-
* Wrapper for gro's `git_current_branch_name` that throws if null.
|
|
48
|
-
*/
|
|
49
|
-
export declare const git_current_branch_name_required: (options?: SpawnOptions) => Promise<string>;
|
|
50
|
-
/**
|
|
51
|
-
* Wrapper for gro's `git_current_commit_hash` that throws if null.
|
|
52
|
-
*/
|
|
53
|
-
export declare const git_current_commit_hash_required: (branch?: string, options?: SpawnOptions) => Promise<string>;
|
|
54
|
-
/**
|
|
55
|
-
* Wrapper for gro's `git_check_clean_workspace` that returns a boolean.
|
|
56
|
-
*/
|
|
57
|
-
export declare const git_check_clean_workspace_as_boolean: (options?: SpawnOptions) => Promise<boolean>;
|
|
58
|
-
export declare const git_has_remote: (remote?: string, options?: SpawnOptions) => Promise<boolean>;
|
|
15
|
+
export declare const git_current_commit_hash_required: (options?: SpawnOptions) => Promise<string>;
|
|
59
16
|
//# sourceMappingURL=git_operations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git_operations.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/git_operations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"git_operations.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/git_operations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD;;GAEG;AACH,eAAO,MAAM,OAAO,GACnB,OAAO,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,EAC7B,UAAU,YAAY,KACpB,OAAO,CAAC,IAAI,CAQd,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,GACtB,SAAS,MAAM,EACf,OAAO,KAAK,CAAC,MAAM,CAAC,EACpB,UAAU,YAAY,KACpB,OAAO,CAAC,IAAI,CAcd,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gCAAgC,GAAU,UAAU,YAAY,KAAG,OAAO,CAAC,MAAM,CAM7F,CAAC"}
|