@fuzdev/fuz_gitops 0.77.0 → 0.78.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -5
- package/dist/ModulesDetail.svelte +14 -12
- package/dist/ModulesDetail.svelte.d.ts.map +1 -1
- package/dist/ModulesNav.svelte +6 -6
- package/dist/ModulesNav.svelte.d.ts.map +1 -1
- package/dist/ModulesPage.svelte +2 -2
- package/dist/ModulesPage.svelte.d.ts.map +1 -1
- package/dist/PageFooter.svelte +2 -2
- package/dist/PageHeader.svelte +5 -5
- package/dist/PageHeader.svelte.d.ts +1 -1
- package/dist/PageHeader.svelte.d.ts.map +1 -1
- package/dist/PullRequestsDetail.svelte +25 -17
- package/dist/PullRequestsDetail.svelte.d.ts.map +1 -1
- package/dist/PullRequestsPage.svelte +3 -3
- package/dist/PullRequestsPage.svelte.d.ts.map +1 -1
- package/dist/ReposTable.svelte +24 -15
- package/dist/ReposTable.svelte.d.ts.map +1 -1
- package/dist/ReposTree.svelte +8 -6
- package/dist/ReposTree.svelte.d.ts.map +1 -1
- package/dist/ReposTreeNav.svelte +10 -11
- package/dist/ReposTreeNav.svelte.d.ts.map +1 -1
- package/dist/TablePage.svelte +2 -2
- package/dist/TablePage.svelte.d.ts.map +1 -1
- package/dist/TreeItemPage.svelte +2 -2
- package/dist/TreeItemPage.svelte.d.ts.map +1 -1
- package/dist/TreePage.svelte +2 -2
- package/dist/TreePage.svelte.d.ts.map +1 -1
- package/dist/cargo_toml.d.ts +33 -0
- package/dist/cargo_toml.d.ts.map +1 -0
- package/dist/cargo_toml.js +74 -0
- package/dist/changeset_generator.d.ts +1 -1
- package/dist/changeset_generator.d.ts.map +1 -1
- package/dist/changeset_generator.js +2 -2
- package/dist/changeset_reader.d.ts +1 -1
- package/dist/changeset_reader.d.ts.map +1 -1
- package/dist/changeset_reader.js +3 -3
- package/dist/config_reconcile.d.ts.map +1 -1
- package/dist/config_reconcile.js +6 -2
- package/dist/dependency_graph.d.ts +2 -2
- package/dist/dependency_graph.d.ts.map +1 -1
- package/dist/dependency_graph.js +9 -9
- package/dist/dependency_updater.d.ts +1 -1
- package/dist/dependency_updater.d.ts.map +1 -1
- package/dist/dependency_updater.js +8 -8
- package/dist/fetch_repo_data.d.ts +2 -2
- package/dist/fetch_repo_data.d.ts.map +1 -1
- package/dist/fetch_repo_data.js +4 -4
- 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 +5 -5
- package/dist/git_operations.d.ts +1 -1
- package/dist/git_operations.d.ts.map +1 -1
- package/dist/git_operations.js +2 -2
- package/dist/github.d.ts +2 -2
- package/dist/github.d.ts.map +1 -1
- package/dist/github.js +7 -7
- package/dist/github_helpers.d.ts.map +1 -1
- package/dist/github_helpers.js +1 -1
- package/dist/gitops_analyze.task.d.ts.map +1 -1
- package/dist/gitops_analyze.task.js +21 -14
- package/dist/gitops_config.d.ts +2 -2
- package/dist/gitops_config.d.ts.map +1 -1
- package/dist/gitops_config.js +5 -5
- package/dist/gitops_plan.task.d.ts.map +1 -1
- package/dist/gitops_plan.task.js +8 -8
- package/dist/gitops_publish.task.d.ts.map +1 -1
- package/dist/gitops_publish.task.js +15 -12
- package/dist/gitops_run.task.d.ts.map +1 -1
- package/dist/gitops_run.task.js +10 -10
- package/dist/gitops_sync.task.d.ts.map +1 -1
- package/dist/gitops_sync.task.js +15 -13
- package/dist/gitops_task_helpers.d.ts +1 -1
- package/dist/gitops_task_helpers.d.ts.map +1 -1
- package/dist/gitops_task_helpers.js +4 -4
- package/dist/gitops_validate.task.d.ts.map +1 -1
- package/dist/gitops_validate.task.js +14 -14
- package/dist/graph_validation.d.ts +2 -2
- package/dist/graph_validation.d.ts.map +1 -1
- package/dist/graph_validation.js +5 -3
- package/dist/local_repo.d.ts +21 -7
- package/dist/local_repo.d.ts.map +1 -1
- package/dist/local_repo.js +64 -16
- package/dist/log_helpers.d.ts +1 -1
- package/dist/log_helpers.d.ts.map +1 -1
- package/dist/multi_repo_publisher.d.ts +3 -3
- package/dist/multi_repo_publisher.d.ts.map +1 -1
- package/dist/multi_repo_publisher.js +24 -20
- package/dist/npm_registry.d.ts +1 -1
- package/dist/npm_registry.d.ts.map +1 -1
- package/dist/npm_registry.js +4 -4
- package/dist/operations.d.ts +4 -4
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations_defaults.d.ts.map +1 -1
- package/dist/operations_defaults.js +16 -16
- package/dist/output_helpers.d.ts +1 -1
- package/dist/output_helpers.d.ts.map +1 -1
- package/dist/preflight_checks.d.ts +2 -2
- package/dist/preflight_checks.d.ts.map +1 -1
- package/dist/preflight_checks.js +5 -5
- package/dist/publish_gate.d.ts.map +1 -1
- package/dist/publish_steps.d.ts.map +1 -1
- package/dist/publish_steps.js +4 -4
- package/dist/publishing_event.d.ts.map +1 -1
- package/dist/publishing_event.js +16 -14
- package/dist/publishing_event_handler.d.ts.map +1 -1
- package/dist/publishing_event_handler.js +6 -6
- package/dist/publishing_plan.d.ts +3 -3
- package/dist/publishing_plan.d.ts.map +1 -1
- package/dist/publishing_plan.js +25 -15
- 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 +2 -2
- package/dist/repo.svelte.d.ts +5 -5
- package/dist/repo.svelte.d.ts.map +1 -1
- package/dist/repo.svelte.js +2 -2
- package/dist/repo_ops.js +2 -2
- package/dist/resolved_gitops_config.d.ts.map +1 -1
- package/dist/resolved_gitops_config.js +1 -1
- package/dist/version_utils.js +1 -1
- package/package.json +16 -15
- package/src/lib/cargo_toml.ts +82 -0
- package/src/lib/changeset_generator.ts +20 -20
- package/src/lib/changeset_reader.ts +18 -18
- package/src/lib/ci_reconcile.ts +5 -5
- package/src/lib/config_reconcile.ts +8 -4
- package/src/lib/dependency_graph.ts +28 -28
- package/src/lib/dependency_updater.ts +30 -30
- package/src/lib/fetch_repo_data.ts +11 -11
- package/src/lib/fs_fetch_value_cache.ts +14 -10
- package/src/lib/git_operations.ts +31 -31
- package/src/lib/github.ts +19 -19
- package/src/lib/github_helpers.ts +6 -6
- package/src/lib/gitops_analyze.task.ts +56 -48
- package/src/lib/gitops_config.ts +14 -14
- package/src/lib/gitops_plan.task.ts +32 -32
- package/src/lib/gitops_publish.task.ts +52 -49
- package/src/lib/gitops_run.task.ts +29 -29
- package/src/lib/gitops_sync.task.ts +39 -30
- package/src/lib/gitops_task_helpers.ts +21 -21
- package/src/lib/gitops_validate.task.ts +38 -38
- package/src/lib/graph_validation.ts +14 -13
- package/src/lib/local_repo.ts +130 -64
- package/src/lib/log_helpers.ts +15 -15
- package/src/lib/multi_repo_publisher.ts +75 -74
- package/src/lib/npm_registry.ts +13 -13
- package/src/lib/operations.ts +50 -39
- package/src/lib/operations_defaults.ts +108 -106
- package/src/lib/output_helpers.ts +4 -4
- package/src/lib/preflight_checks.ts +28 -28
- package/src/lib/publish_gate.ts +7 -9
- package/src/lib/publish_steps.ts +15 -15
- package/src/lib/publishing_event.ts +22 -20
- package/src/lib/publishing_event_handler.ts +8 -8
- package/src/lib/publishing_plan.ts +69 -57
- package/src/lib/publishing_plan_helpers.ts +16 -12
- package/src/lib/publishing_plan_logging.ts +23 -23
- package/src/lib/repo.svelte.ts +8 -8
- package/src/lib/repo_ops.ts +12 -12
- package/src/lib/resolved_gitops_config.ts +5 -5
- package/src/lib/version_utils.ts +3 -3
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { styleText as st } from 'node:util';
|
|
3
3
|
import { get_gitops_ready } from './gitops_task_helpers.js';
|
|
4
|
+
import { repo_is_npm } from './local_repo.js';
|
|
4
5
|
import { analyze_repos } from './graph_validation.js';
|
|
5
|
-
import { format_wildcard_dependencies, format_dev_cycles, format_production_cycles
|
|
6
|
+
import { format_wildcard_dependencies, format_dev_cycles, format_production_cycles } from './log_helpers.js';
|
|
6
7
|
import { format_and_output } from './output_helpers.js';
|
|
7
8
|
import { GITOPS_CONFIG_PATH_DEFAULT } from './gitops_constants.js';
|
|
8
9
|
/** @nodocs */
|
|
@@ -23,9 +24,9 @@ export const Args = z.strictObject({
|
|
|
23
24
|
sync: z
|
|
24
25
|
.boolean()
|
|
25
26
|
.meta({
|
|
26
|
-
description: 'sync repos (switch branch, pull, install) before analyzing instead of reading the working tree as-is'
|
|
27
|
+
description: 'sync repos (switch branch, pull, install) before analyzing instead of reading the working tree as-is'
|
|
27
28
|
})
|
|
28
|
-
.default(false)
|
|
29
|
+
.default(false)
|
|
29
30
|
});
|
|
30
31
|
/** @nodocs */
|
|
31
32
|
export const task = {
|
|
@@ -35,23 +36,29 @@ export const task = {
|
|
|
35
36
|
const { config, dir, format, outfile, sync } = args;
|
|
36
37
|
// Get repos ready (without downloading); read the working tree as-is unless `--sync`
|
|
37
38
|
const { local_repos } = await get_gitops_ready({ config, dir, download: false, sync, log });
|
|
39
|
+
// Only npm packages form the dependency graph; note any non-npm repos (e.g. cargo)
|
|
40
|
+
// that are excluded so the omission isn't silent.
|
|
41
|
+
const non_npm_repos = local_repos.filter((r) => !repo_is_npm(r));
|
|
42
|
+
if (non_npm_repos.length > 0) {
|
|
43
|
+
log.info(st('dim', `excluding ${non_npm_repos.length} non-npm repo(s) from analysis (dashboard-only): ` +
|
|
44
|
+
non_npm_repos.map((r) => r.library.name).join(', ')));
|
|
45
|
+
}
|
|
38
46
|
// Build the dependency graph and analyze cycles/wildcards (tolerating cycles)
|
|
39
47
|
const { graph, analysis, publishing_order } = analyze_repos(local_repos);
|
|
40
48
|
// Format and output using output_helpers
|
|
41
49
|
const data = {
|
|
42
|
-
repos: local_repos,
|
|
43
50
|
graph,
|
|
44
51
|
analysis,
|
|
45
|
-
publishing_order
|
|
52
|
+
publishing_order
|
|
46
53
|
};
|
|
47
54
|
await format_and_output(data, create_formatters(), { format, outfile, log });
|
|
48
|
-
}
|
|
55
|
+
}
|
|
49
56
|
};
|
|
50
57
|
// Create formatters for output_helpers
|
|
51
58
|
const create_formatters = () => ({
|
|
52
59
|
json: (data) => format_json(data.graph, data.analysis, data.publishing_order),
|
|
53
|
-
markdown: (data) => format_markdown(data.
|
|
54
|
-
stdout: (data, log) => format_stdout(data.
|
|
60
|
+
markdown: (data) => format_markdown(data.graph, data.analysis, data.publishing_order),
|
|
61
|
+
stdout: (data, log) => format_stdout(data.graph, data.analysis, data.publishing_order, log)
|
|
55
62
|
});
|
|
56
63
|
// Helper to calculate common statistics
|
|
57
64
|
const calculate_stats = (graph) => {
|
|
@@ -63,16 +70,16 @@ const format_json = (graph, analysis, publishing_order) => {
|
|
|
63
70
|
const output = {
|
|
64
71
|
graph: graph.toJSON(),
|
|
65
72
|
analysis,
|
|
66
|
-
publishing_order
|
|
73
|
+
publishing_order
|
|
67
74
|
};
|
|
68
75
|
return JSON.stringify(output, null, 2);
|
|
69
76
|
};
|
|
70
|
-
const format_markdown = (
|
|
77
|
+
const format_markdown = (graph, analysis, publishing_order) => {
|
|
71
78
|
const lines = ['# Dependency Analysis'];
|
|
72
79
|
// Summary stats
|
|
73
80
|
const { total_deps, internal_deps } = calculate_stats(graph);
|
|
74
81
|
lines.push('', '## Summary', '');
|
|
75
|
-
lines.push(`- **Total packages**: ${
|
|
82
|
+
lines.push(`- **Total packages**: ${graph.nodes.size}`);
|
|
76
83
|
lines.push(`- **Total dependencies**: ${total_deps}`);
|
|
77
84
|
lines.push(`- **Internal dependencies**: ${internal_deps}`);
|
|
78
85
|
lines.push(`- **Wildcard dependencies**: ${analysis.wildcard_deps.length}`);
|
|
@@ -127,8 +134,8 @@ const format_markdown = (repos, graph, analysis, publishing_order) => {
|
|
|
127
134
|
}
|
|
128
135
|
return lines;
|
|
129
136
|
};
|
|
130
|
-
const format_stdout = (
|
|
131
|
-
log.info(st('cyan', `📊 Analyzing ${
|
|
137
|
+
const format_stdout = (graph, analysis, publishing_order, log) => {
|
|
138
|
+
log.info(st('cyan', `📊 Analyzing ${graph.nodes.size} repositories...`));
|
|
132
139
|
// Publishing order
|
|
133
140
|
if (publishing_order) {
|
|
134
141
|
log.info(st('yellow', 'Publishing order:'));
|
|
@@ -175,7 +182,7 @@ const format_stdout = (repos, graph, analysis, publishing_order, log) => {
|
|
|
175
182
|
const { total_deps, internal_deps } = calculate_stats(graph);
|
|
176
183
|
log.info('');
|
|
177
184
|
log.info(st('cyan', 'Summary:'));
|
|
178
|
-
log.info(` Total packages: ${
|
|
185
|
+
log.info(` Total packages: ${graph.nodes.size}`);
|
|
179
186
|
log.info(` Total dependencies: ${total_deps}`);
|
|
180
187
|
log.info(` Internal dependencies: ${internal_deps}`);
|
|
181
188
|
log.info(` Wildcard dependencies: ${analysis.wildcard_deps.length}`);
|
package/dist/gitops_config.d.ts
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @module
|
|
12
12
|
*/
|
|
13
|
-
import type { Url } from '@fuzdev/fuz_util/url.
|
|
14
|
-
import type { GitBranch } from '@fuzdev/fuz_util/git.
|
|
13
|
+
import type { Url } from '@fuzdev/fuz_util/url.ts';
|
|
14
|
+
import type { GitBranch } from '@fuzdev/fuz_util/git.ts';
|
|
15
15
|
export interface GitopsConfig {
|
|
16
16
|
repos: Array<GitopsRepoConfig>;
|
|
17
17
|
repos_dir: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitops_config.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/gitops_config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"gitops_config.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/gitops_config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAGnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAIzD,MAAM,WAAW,YAAY;IAC5B,KAAK,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,kBAAkB,GAAG,CAChC,WAAW,EAAE,YAAY,KACrB,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AAEhD,MAAM,WAAW,eAAe;IAC/B,KAAK,CAAC,EAAE,KAAK,CAAC,GAAG,GAAG,mBAAmB,CAAC,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAExD,MAAM,WAAW,gBAAgB;IAChC;;;;;;OAMG;IACH,QAAQ,EAAE,GAAG,CAAC;IAEd;;;;;;;;;;;OAWG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,MAAM,EAAE,SAAS,CAAC;IAElB;;OAEG;IACH,UAAU,EAAE,oBAAoB,CAAC;IAEjC;;;OAGG;IACH,EAAE,EAAE,OAAO,CAAC;IAEZ;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IACnC,QAAQ,EAAE,GAAG,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,kEAAkE;IAClE,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,oFAAoF;IACpF,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,iFAAiF;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,0BAA0B,QAAO,YAG5C,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GAAI,YAAY,eAAe,KAAG,YAUrE,CAAC;AAwBF,MAAM,WAAW,kBAAkB;IAClC,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,kBAAkB,CAAC;CACvD;AAED,eAAO,MAAM,kBAAkB,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAazF,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,CAC3C,aAAa,EAAE,GAAG,EAClB,WAAW,EAAE,MAAM,KACf,OAAO,CAAC,aAAa,IAAI,kBAS7B,CAAC"}
|
package/dist/gitops_config.js
CHANGED
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
* @module
|
|
12
12
|
*/
|
|
13
13
|
import { existsSync } from 'node:fs';
|
|
14
|
-
import { strip_end } from '@fuzdev/fuz_util/string.
|
|
14
|
+
import { strip_end } from '@fuzdev/fuz_util/string.ts';
|
|
15
15
|
import { DEFAULT_REPOS_DIR } from './paths.js';
|
|
16
16
|
export const create_empty_gitops_config = () => ({
|
|
17
17
|
repos: [],
|
|
18
|
-
repos_dir: DEFAULT_REPOS_DIR
|
|
18
|
+
repos_dir: DEFAULT_REPOS_DIR
|
|
19
19
|
});
|
|
20
20
|
/**
|
|
21
21
|
* Transforms a `RawGitopsConfig` to the more strict `GitopsConfig`.
|
|
@@ -29,7 +29,7 @@ export const normalize_gitops_config = (raw_config) => {
|
|
|
29
29
|
return {
|
|
30
30
|
repos: repos ? repos.map((r) => parse_fuz_repo_config(r)) : empty_config.repos,
|
|
31
31
|
// Default to two dirs up from config if not specified
|
|
32
|
-
repos_dir: repos_dir ?? DEFAULT_REPOS_DIR
|
|
32
|
+
repos_dir: repos_dir ?? DEFAULT_REPOS_DIR
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
35
|
const parse_fuz_repo_config = (r) => {
|
|
@@ -40,7 +40,7 @@ const parse_fuz_repo_config = (r) => {
|
|
|
40
40
|
branch: 'main', // TODO @zts use flavored for GitBranch
|
|
41
41
|
visibility: 'public',
|
|
42
42
|
ci: true,
|
|
43
|
-
archived: false
|
|
43
|
+
archived: false
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
const visibility = r.visibility ?? 'public';
|
|
@@ -50,7 +50,7 @@ const parse_fuz_repo_config = (r) => {
|
|
|
50
50
|
branch: r.branch ?? 'main', // TODO @zts use flavored for GitBranch
|
|
51
51
|
visibility,
|
|
52
52
|
ci: r.ci ?? visibility === 'public',
|
|
53
|
-
archived: r.archived ?? false
|
|
53
|
+
archived: r.archived ?? false
|
|
54
54
|
};
|
|
55
55
|
};
|
|
56
56
|
export const load_gitops_config = async (config_path) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitops_plan.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/gitops_plan.task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"gitops_plan.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/gitops_plan.task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,cAAc;AACd,eAAO,MAAM,IAAI;;;;;;;;;;;kBAsBf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CAmC3B,CAAC"}
|
package/dist/gitops_plan.task.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { styleText as st } from 'node:util';
|
|
3
3
|
import { get_gitops_ready } from './gitops_task_helpers.js';
|
|
4
|
-
import { generate_publishing_plan, log_publishing_plan
|
|
4
|
+
import { generate_publishing_plan, log_publishing_plan } from './publishing_plan.js';
|
|
5
5
|
import { format_and_output } from './output_helpers.js';
|
|
6
6
|
import { GITOPS_CONFIG_PATH_DEFAULT } from './gitops_constants.js';
|
|
7
7
|
/** @nodocs */
|
|
@@ -23,9 +23,9 @@ export const Args = z.strictObject({
|
|
|
23
23
|
sync: z
|
|
24
24
|
.boolean()
|
|
25
25
|
.meta({
|
|
26
|
-
description: 'sync repos (switch branch, pull, install) before planning instead of reading the working tree as-is'
|
|
26
|
+
description: 'sync repos (switch branch, pull, install) before planning instead of reading the working tree as-is'
|
|
27
27
|
})
|
|
28
|
-
.default(false)
|
|
28
|
+
.default(false)
|
|
29
29
|
});
|
|
30
30
|
/**
|
|
31
31
|
* Generate a publishing plan showing what would happen during multi-repo publishing.
|
|
@@ -50,7 +50,7 @@ export const task = {
|
|
|
50
50
|
dir,
|
|
51
51
|
download: false, // Don't download if missing
|
|
52
52
|
sync,
|
|
53
|
-
log
|
|
53
|
+
log
|
|
54
54
|
});
|
|
55
55
|
if (local_repos.length === 0) {
|
|
56
56
|
log.error('No local repos found');
|
|
@@ -65,7 +65,7 @@ export const task = {
|
|
|
65
65
|
if (plan.errors.length > 0) {
|
|
66
66
|
throw new Error('Publishing plan found errors that would block publishing');
|
|
67
67
|
}
|
|
68
|
-
}
|
|
68
|
+
}
|
|
69
69
|
};
|
|
70
70
|
const create_plan_formatters = (options = {}) => ({
|
|
71
71
|
json: (plan) => {
|
|
@@ -76,16 +76,16 @@ const create_plan_formatters = (options = {}) => ({
|
|
|
76
76
|
breaking_cascades: Object.fromEntries(plan.breaking_cascades),
|
|
77
77
|
warnings: plan.warnings,
|
|
78
78
|
info: plan.info,
|
|
79
|
-
errors: plan.errors
|
|
79
|
+
errors: plan.errors
|
|
80
80
|
};
|
|
81
81
|
return JSON.stringify(output, null, 2);
|
|
82
82
|
},
|
|
83
83
|
markdown: (plan) => format_plan_as_markdown(plan),
|
|
84
|
-
stdout: (plan, log) => log_publishing_plan(plan, log, options)
|
|
84
|
+
stdout: (plan, log) => log_publishing_plan(plan, log, options)
|
|
85
85
|
});
|
|
86
86
|
const format_plan_as_markdown = (plan) => {
|
|
87
87
|
const lines = [];
|
|
88
|
-
const { publishing_order, version_changes, dependency_updates, breaking_cascades, warnings, info, errors
|
|
88
|
+
const { publishing_order, version_changes, dependency_updates, breaking_cascades, warnings, info, errors } = plan;
|
|
89
89
|
lines.push('# Publishing Plan');
|
|
90
90
|
lines.push('');
|
|
91
91
|
// Errors
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitops_publish.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/gitops_publish.task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"gitops_publish.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/gitops_publish.task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,cAAc;AACd,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;kBA+Cf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC,cAAc;AACd,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CAiH3B,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { createInterface } from 'node:readline/promises';
|
|
3
3
|
import { styleText as st } from 'node:util';
|
|
4
4
|
import { get_gitops_ready } from './gitops_task_helpers.js';
|
|
5
|
-
import { execute_publishing_plan
|
|
5
|
+
import { execute_publishing_plan } from './multi_repo_publisher.js';
|
|
6
6
|
import { stdout_handler } from './publishing_event_handler.js';
|
|
7
7
|
import { generate_publishing_plan, log_publishing_plan } from './publishing_plan.js';
|
|
8
8
|
import { derive_publish_steps, format_publish_steps } from './publish_steps.js';
|
|
@@ -42,24 +42,27 @@ export const Args = z.strictObject({
|
|
|
42
42
|
.meta({ description: 'stream structured publishing events as JSON-lines to stdout' })
|
|
43
43
|
.default(false),
|
|
44
44
|
outfile: z.string().meta({ description: 'write output to file instead of logging' }).optional(),
|
|
45
|
-
verbose: z
|
|
45
|
+
verbose: z
|
|
46
|
+
.boolean()
|
|
47
|
+
.meta({ description: 'show additional details in plan output' })
|
|
48
|
+
.default(false),
|
|
46
49
|
sync: z
|
|
47
50
|
.boolean()
|
|
48
51
|
.meta({
|
|
49
|
-
description: 'sync repos (switch branch, pull, install) before the dry run instead of reading the working tree as-is; always on for --wetrun'
|
|
52
|
+
description: 'sync repos (switch branch, pull, install) before the dry run instead of reading the working tree as-is; always on for --wetrun'
|
|
50
53
|
})
|
|
51
54
|
.default(false),
|
|
52
55
|
preview: z
|
|
53
56
|
.boolean()
|
|
54
57
|
.meta({ description: 'show the ordered side-effects a --wetrun would perform' })
|
|
55
|
-
.default(false)
|
|
58
|
+
.default(false)
|
|
56
59
|
});
|
|
57
60
|
/** @nodocs */
|
|
58
61
|
export const task = {
|
|
59
62
|
summary: 'publish all repos in dependency order',
|
|
60
63
|
Args,
|
|
61
64
|
run: async ({ args, log }) => {
|
|
62
|
-
const { config, dir, peer_strategy, wetrun, format, deploy, plan, max_wait, emit_json, outfile, verbose, sync, preview
|
|
65
|
+
const { config, dir, peer_strategy, wetrun, format, deploy, plan, max_wait, emit_json, outfile, verbose, sync, preview } = args;
|
|
63
66
|
// Load repos. A dry run reads the working tree as-is unless `--sync`;
|
|
64
67
|
// a real publish (`--wetrun`) always syncs so preflight sees the canonical branches.
|
|
65
68
|
const { local_repos: repos } = await get_gitops_ready({
|
|
@@ -67,7 +70,7 @@ export const task = {
|
|
|
67
70
|
dir,
|
|
68
71
|
download: false, // Don't download if missing
|
|
69
72
|
sync: sync || wetrun,
|
|
70
|
-
log
|
|
73
|
+
log
|
|
71
74
|
});
|
|
72
75
|
// Generate the plan once; the executor consumes this exact plan (no second pass).
|
|
73
76
|
const publishing_plan = await generate_publishing_plan(repos, { verbose });
|
|
@@ -110,7 +113,7 @@ export const task = {
|
|
|
110
113
|
max_wait,
|
|
111
114
|
log,
|
|
112
115
|
// Live JSON-lines stream when requested; events also surface on the result.
|
|
113
|
-
events: emit_json ? stdout_handler() : undefined
|
|
116
|
+
events: emit_json ? stdout_handler() : undefined
|
|
114
117
|
};
|
|
115
118
|
// Execute publishing (may throw on fatal errors like circular dependencies)
|
|
116
119
|
let result;
|
|
@@ -130,7 +133,7 @@ export const task = {
|
|
|
130
133
|
events: [],
|
|
131
134
|
summary: { total: 0, published: 0, failed: 1, skipped: 0, duration: 0 },
|
|
132
135
|
plan_errors: publishing_plan.errors,
|
|
133
|
-
plan_warnings: publishing_plan.warnings
|
|
136
|
+
plan_warnings: publishing_plan.warnings
|
|
134
137
|
};
|
|
135
138
|
}
|
|
136
139
|
// Format and output result (always runs, even on fatal errors)
|
|
@@ -139,14 +142,14 @@ export const task = {
|
|
|
139
142
|
await format_and_output({ result, fatal_error, preview_steps }, create_publish_formatters(), {
|
|
140
143
|
format,
|
|
141
144
|
outfile,
|
|
142
|
-
log
|
|
145
|
+
log
|
|
143
146
|
});
|
|
144
147
|
}
|
|
145
148
|
// Exit with error if failed
|
|
146
149
|
if (publish_run_failed(result, fatal_error)) {
|
|
147
150
|
process.exit(1);
|
|
148
151
|
}
|
|
149
|
-
}
|
|
152
|
+
}
|
|
150
153
|
};
|
|
151
154
|
const create_publish_formatters = () => ({
|
|
152
155
|
json: (data) => JSON.stringify(data.preview_steps ? { ...data.result, preview: data.preview_steps } : data.result, null, 2),
|
|
@@ -154,7 +157,7 @@ const create_publish_formatters = () => ({
|
|
|
154
157
|
stdout: () => {
|
|
155
158
|
// stdout format is handled by the executor's logging
|
|
156
159
|
// This should never be called due to early return in task
|
|
157
|
-
}
|
|
160
|
+
}
|
|
158
161
|
});
|
|
159
162
|
/** Logs the ordered side-effect preview to stdout. */
|
|
160
163
|
const log_preview = (steps, log) => {
|
|
@@ -232,7 +235,7 @@ const format_result_markdown = (result, fatal_error, preview_steps) => {
|
|
|
232
235
|
const prompt_for_confirmation = async () => {
|
|
233
236
|
const rl = createInterface({
|
|
234
237
|
input: process.stdin,
|
|
235
|
-
output: process.stdout
|
|
238
|
+
output: process.stdout
|
|
236
239
|
});
|
|
237
240
|
const answer = await rl.question('');
|
|
238
241
|
rl.close();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitops_run.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/gitops_run.task.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"gitops_run.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/gitops_run.task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,IAAI;;;;;;;;;kBAmBf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAaxC,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CAyM3B,CAAC"}
|
package/dist/gitops_run.task.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TaskError } from '@fuzdev/gro';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { map_concurrent_settled } from '@fuzdev/fuz_util/async.
|
|
4
|
-
import { spawn_out } from '@fuzdev/fuz_util/process.
|
|
3
|
+
import { map_concurrent_settled } from '@fuzdev/fuz_util/async.ts';
|
|
4
|
+
import { spawn_out } from '@fuzdev/fuz_util/process.ts';
|
|
5
5
|
import { writeFile } from 'node:fs/promises';
|
|
6
6
|
import { styleText as st } from 'node:util';
|
|
7
7
|
import { resolve } from 'node:path';
|
|
@@ -25,7 +25,7 @@ export const Args = z.strictObject({
|
|
|
25
25
|
outfile: z
|
|
26
26
|
.string()
|
|
27
27
|
.meta({ description: 'with --format json, write clean JSON to this file instead of stdout' })
|
|
28
|
-
.optional()
|
|
28
|
+
.optional()
|
|
29
29
|
});
|
|
30
30
|
export const task = {
|
|
31
31
|
Args,
|
|
@@ -53,7 +53,7 @@ export const task = {
|
|
|
53
53
|
// Parse command into cmd + args for spawn
|
|
54
54
|
// For now, we use shell mode to support pipes/redirects/etc
|
|
55
55
|
const spawned = await spawn_out('sh', ['-c', command], {
|
|
56
|
-
cwd: repo_dir
|
|
56
|
+
cwd: repo_dir
|
|
57
57
|
});
|
|
58
58
|
const duration_ms = performance.now() - repo_start;
|
|
59
59
|
const success = spawned.result.ok;
|
|
@@ -64,7 +64,7 @@ export const task = {
|
|
|
64
64
|
exit_code: spawned.result.kind === 'exited' ? spawned.result.code : 0,
|
|
65
65
|
stdout: spawned.stdout || '',
|
|
66
66
|
stderr: spawned.stderr || '',
|
|
67
|
-
duration_ms
|
|
67
|
+
duration_ms
|
|
68
68
|
};
|
|
69
69
|
return result;
|
|
70
70
|
}
|
|
@@ -78,7 +78,7 @@ export const task = {
|
|
|
78
78
|
stdout: '',
|
|
79
79
|
stderr: '',
|
|
80
80
|
duration_ms,
|
|
81
|
-
error: String(error)
|
|
81
|
+
error: String(error)
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
});
|
|
@@ -107,7 +107,7 @@ export const task = {
|
|
|
107
107
|
stdout: '',
|
|
108
108
|
stderr: '',
|
|
109
109
|
duration_ms: 0,
|
|
110
|
-
error: String(result.reason)
|
|
110
|
+
error: String(result.reason)
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
113
|
}
|
|
@@ -121,8 +121,8 @@ export const task = {
|
|
|
121
121
|
total: repos.length,
|
|
122
122
|
success: successes.length,
|
|
123
123
|
failure: failures.length,
|
|
124
|
-
duration_ms: Math.round(total_duration_ms)
|
|
125
|
-
}
|
|
124
|
+
duration_ms: Math.round(total_duration_ms)
|
|
125
|
+
}
|
|
126
126
|
};
|
|
127
127
|
const json = JSON.stringify(json_output, null, 2);
|
|
128
128
|
if (outfile) {
|
|
@@ -202,5 +202,5 @@ export const task = {
|
|
|
202
202
|
if (failures.length > 0) {
|
|
203
203
|
throw new TaskError(`${failures.length} repos failed`);
|
|
204
204
|
}
|
|
205
|
-
}
|
|
205
|
+
}
|
|
206
206
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitops_sync.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/gitops_sync.task.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"gitops_sync.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/gitops_sync.task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,cAAc;AACd,eAAO,MAAM,IAAI;;;;;;;kBAyBf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CAsG3B,CAAC"}
|
package/dist/gitops_sync.task.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { TaskError } from '@fuzdev/gro';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { readFile, writeFile } from 'node:fs/promises';
|
|
4
|
-
import { format_file } from '@fuzdev/gro/format_file.
|
|
4
|
+
import { format_file } from '@fuzdev/gro/format_file.ts';
|
|
5
5
|
import { basename, resolve } from 'node:path';
|
|
6
|
-
import { print_path } from '@fuzdev/gro/paths.
|
|
7
|
-
import { load_from_env } from '@fuzdev/gro/env.
|
|
8
|
-
import { package_json_load } from '@fuzdev/gro/package_json.
|
|
6
|
+
import { print_path } from '@fuzdev/gro/paths.ts';
|
|
7
|
+
import { load_from_env } from '@fuzdev/gro/env.ts';
|
|
8
|
+
import { package_json_load } from '@fuzdev/gro/package_json.ts';
|
|
9
9
|
import { existsSync } from 'node:fs';
|
|
10
10
|
import { compactReplacer } from 'svelte-docinfo';
|
|
11
11
|
import { fetch_repo_data } from './fetch_repo_data.js';
|
|
@@ -35,9 +35,9 @@ export const Args = z.strictObject({
|
|
|
35
35
|
allow_dirty: z
|
|
36
36
|
.boolean()
|
|
37
37
|
.meta({
|
|
38
|
-
description: 'sync (switch branch, pull) tolerating uncommitted changes instead of failing on a dirty workspace'
|
|
38
|
+
description: 'sync (switch branch, pull) tolerating uncommitted changes instead of failing on a dirty workspace'
|
|
39
39
|
})
|
|
40
|
-
.default(false)
|
|
40
|
+
.default(false)
|
|
41
41
|
});
|
|
42
42
|
/**
|
|
43
43
|
* This is a task not a `.gen.` file because it makes network calls.
|
|
@@ -47,8 +47,10 @@ export const Args = z.strictObject({
|
|
|
47
47
|
export const task = {
|
|
48
48
|
Args,
|
|
49
49
|
summary: 'syncs local repos and generates UI data from repo metadata',
|
|
50
|
-
run: async (
|
|
51
|
-
const {
|
|
50
|
+
run: async (ctx) => {
|
|
51
|
+
const { args, log, invoke_task } = ctx;
|
|
52
|
+
// `ctx.svelte_config` is a lazy getter, so it's only read when `outdir` isn't provided
|
|
53
|
+
const { config, dir, outdir = (await ctx.svelte_config).routes_path, download, check, allow_dirty } = args;
|
|
52
54
|
// `gitops_sync` is the task whose job is to mutate working trees, so it always syncs.
|
|
53
55
|
const { local_repos } = await get_gitops_ready({
|
|
54
56
|
config,
|
|
@@ -56,7 +58,7 @@ export const task = {
|
|
|
56
58
|
download,
|
|
57
59
|
sync: true,
|
|
58
60
|
allow_dirty,
|
|
59
|
-
log
|
|
61
|
+
log
|
|
60
62
|
});
|
|
61
63
|
const outfile_json = resolve(outdir, 'repos.json');
|
|
62
64
|
const outfile_ts = resolve(outdir, 'repos.ts');
|
|
@@ -80,8 +82,8 @@ export const task = {
|
|
|
80
82
|
: '@fuzdev/fuz_gitops/repo.svelte.js';
|
|
81
83
|
log.info(`generating ${outfile_json} and ${outfile_ts}`);
|
|
82
84
|
// Generate repos.json with the raw data
|
|
83
|
-
const json_contents =
|
|
84
|
-
|
|
85
|
+
const json_contents = format_file(JSON.stringify(repos_json, compactReplacer), {
|
|
86
|
+
lang: 'json'
|
|
85
87
|
});
|
|
86
88
|
const existing_json = existsSync(outfile_json) ? await readFile(outfile_json, 'utf8') : '';
|
|
87
89
|
const json_changed = existing_json !== json_contents;
|
|
@@ -107,7 +109,7 @@ export const task = {
|
|
|
107
109
|
export const repos_json: Array<RepoJson> = json as unknown as Array<RepoJson>;
|
|
108
110
|
`;
|
|
109
111
|
// TODO think about possibly using the `gen` functionality in this task, not sure what the API design could look like
|
|
110
|
-
const formatted_ts =
|
|
112
|
+
const formatted_ts = format_file(ts_contents, { filepath: outfile_ts });
|
|
111
113
|
const existing_ts = existsSync(outfile_ts) ? await readFile(outfile_ts, 'utf8') : '';
|
|
112
114
|
if (existing_ts === formatted_ts) {
|
|
113
115
|
log.info(`no changes to ${print_path(outfile_ts)}`);
|
|
@@ -126,5 +128,5 @@ export const task = {
|
|
|
126
128
|
else {
|
|
127
129
|
log.info('repos cache did not change');
|
|
128
130
|
}
|
|
129
|
-
}
|
|
131
|
+
}
|
|
130
132
|
};
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*
|
|
16
16
|
* @module
|
|
17
17
|
*/
|
|
18
|
-
import type { Logger } from '@fuzdev/fuz_util/log.
|
|
18
|
+
import type { Logger } from '@fuzdev/fuz_util/log.ts';
|
|
19
19
|
import { type GitopsConfig } from './gitops_config.js';
|
|
20
20
|
import { type LocalRepo } from './local_repo.js';
|
|
21
21
|
import type { GitOperations, NpmOperations } from './operations.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitops_task_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/gitops_task_helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"gitops_task_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/gitops_task_helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGvF,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEpE,MAAM,WAAW,qBAAqB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,2FAA2F;IAC3F,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,gBAAgB,GAC5B,SAAS,qBAAqB,KAC5B,OAAO,CAAC;IACV,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,YAAY,CAAC;IAC5B,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;CAC9B,CAwCA,CAAC;AAEF,MAAM,WAAW,yBAAyB;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,oBAAoB,GAChC,SAAS,yBAAyB,KAChC;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAc1C,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,YAAY,CAMpF,CAAC"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import { TaskError } from '@fuzdev/gro';
|
|
19
19
|
import { styleText as st } from 'node:util';
|
|
20
20
|
import { resolve, dirname } from 'node:path';
|
|
21
|
-
import { print_path } from '@fuzdev/gro/paths.
|
|
21
|
+
import { print_path } from '@fuzdev/gro/paths.ts';
|
|
22
22
|
import { load_gitops_config } from './gitops_config.js';
|
|
23
23
|
import { local_repos_load, local_repos_ensure } from './local_repo.js';
|
|
24
24
|
import { resolve_gitops_config } from './resolved_gitops_config.js';
|
|
@@ -58,7 +58,7 @@ export const get_gitops_ready = async (options) => {
|
|
|
58
58
|
const repos_dir = resolve_gitops_paths({
|
|
59
59
|
config,
|
|
60
60
|
dir,
|
|
61
|
-
config_repos_dir: gitops_config.repos_dir
|
|
61
|
+
config_repos_dir: gitops_config.repos_dir
|
|
62
62
|
}).repos_dir;
|
|
63
63
|
log?.info(`resolving gitops configs on the filesystem in ${repos_dir}`, gitops_config.repos.map((r) => r.repo_url));
|
|
64
64
|
const resolved_config = resolve_gitops_config(gitops_config, repos_dir);
|
|
@@ -68,7 +68,7 @@ export const get_gitops_ready = async (options) => {
|
|
|
68
68
|
gitops_config,
|
|
69
69
|
download,
|
|
70
70
|
log,
|
|
71
|
-
npm_ops
|
|
71
|
+
npm_ops
|
|
72
72
|
});
|
|
73
73
|
const local_repos = await local_repos_load({
|
|
74
74
|
local_repo_paths,
|
|
@@ -78,7 +78,7 @@ export const get_gitops_ready = async (options) => {
|
|
|
78
78
|
parallel,
|
|
79
79
|
concurrency,
|
|
80
80
|
sync,
|
|
81
|
-
allow_dirty
|
|
81
|
+
allow_dirty
|
|
82
82
|
});
|
|
83
83
|
return { config_path, repos_dir, gitops_config, local_repos };
|
|
84
84
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitops_validate.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/gitops_validate.task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"gitops_validate.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/gitops_validate.task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,cAAc;AACd,eAAO,MAAM,IAAI;;;;;kBAiBf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC,cAAc;AACd,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CA8Q3B,CAAC"}
|