@fuzdev/fuz_gitops 0.78.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 +20 -0
- 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.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/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/config_reconcile.d.ts.map +1 -1
- package/dist/config_reconcile.js +6 -2
- package/dist/dependency_graph.d.ts.map +1 -1
- package/dist/dependency_graph.js +5 -5
- package/dist/dependency_updater.d.ts.map +1 -1
- package/dist/dependency_updater.js +8 -8
- package/dist/fetch_repo_data.d.ts.map +1 -1
- package/dist/fetch_repo_data.js +3 -3
- package/dist/fs_fetch_value_cache.d.ts.map +1 -1
- package/dist/fs_fetch_value_cache.js +2 -2
- package/dist/git_operations.d.ts.map +1 -1
- package/dist/git_operations.js +1 -1
- package/dist/github.d.ts.map +1 -1
- package/dist/github.js +6 -6
- package/dist/github_helpers.d.ts.map +1 -1
- package/dist/gitops_analyze.task.d.ts.map +1 -1
- package/dist/gitops_analyze.task.js +7 -7
- package/dist/gitops_config.d.ts.map +1 -1
- package/dist/gitops_config.js +4 -4
- 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 +8 -8
- package/dist/gitops_sync.task.d.ts.map +1 -1
- package/dist/gitops_sync.task.js +11 -9
- package/dist/gitops_task_helpers.d.ts.map +1 -1
- package/dist/gitops_task_helpers.js +3 -3
- package/dist/gitops_validate.task.d.ts.map +1 -1
- package/dist/gitops_validate.task.js +14 -14
- package/dist/graph_validation.d.ts.map +1 -1
- package/dist/graph_validation.js +2 -2
- package/dist/local_repo.d.ts +4 -4
- package/dist/local_repo.d.ts.map +1 -1
- package/dist/local_repo.js +13 -13
- package/dist/log_helpers.d.ts.map +1 -1
- package/dist/multi_repo_publisher.d.ts.map +1 -1
- package/dist/multi_repo_publisher.js +19 -19
- package/dist/npm_registry.d.ts.map +1 -1
- package/dist/npm_registry.js +2 -2
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations_defaults.d.ts.map +1 -1
- package/dist/operations_defaults.js +12 -12
- package/dist/output_helpers.d.ts.map +1 -1
- package/dist/preflight_checks.d.ts +1 -1
- package/dist/preflight_checks.d.ts.map +1 -1
- package/dist/preflight_checks.js +4 -4
- package/dist/publish_gate.d.ts.map +1 -1
- package/dist/publish_steps.d.ts.map +1 -1
- package/dist/publish_steps.js +3 -3
- 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.map +1 -1
- package/dist/publishing_plan.js +14 -14
- 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.map +1 -1
- package/dist/publishing_plan_logging.js +2 -2
- package/dist/repo.svelte.d.ts.map +1 -1
- 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 +3 -3
- package/src/lib/changeset_generator.ts +19 -19
- 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 +26 -26
- package/src/lib/dependency_updater.ts +29 -29
- 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 +30 -30
- package/src/lib/github.ts +19 -19
- package/src/lib/github_helpers.ts +6 -6
- package/src/lib/gitops_analyze.task.ts +40 -40
- package/src/lib/gitops_config.ts +14 -14
- package/src/lib/gitops_plan.task.ts +31 -31
- package/src/lib/gitops_publish.task.ts +51 -48
- 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 +37 -37
- package/src/lib/graph_validation.ts +13 -13
- package/src/lib/local_repo.ts +70 -70
- package/src/lib/log_helpers.ts +15 -15
- package/src/lib/multi_repo_publisher.ts +67 -70
- package/src/lib/npm_registry.ts +13 -13
- package/src/lib/operations.ts +49 -38
- package/src/lib/operations_defaults.ts +106 -104
- package/src/lib/output_helpers.ts +4 -4
- package/src/lib/preflight_checks.ts +26 -26
- 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 +55 -55
- package/src/lib/publishing_plan_helpers.ts +16 -12
- package/src/lib/publishing_plan_logging.ts +22 -22
- 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
package/dist/gitops_sync.task.js
CHANGED
|
@@ -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
|
};
|
|
@@ -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;;;;;;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U,aAAa,MAAM,KAAG,OAAO,CAAC,YAAY,CAMpF,CAAC"}
|
|
@@ -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"}
|
|
@@ -2,7 +2,7 @@ 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
4
|
import { analyze_repos } from './graph_validation.js';
|
|
5
|
-
import { generate_publishing_plan, log_publishing_plan
|
|
5
|
+
import { generate_publishing_plan, log_publishing_plan } from './publishing_plan.js';
|
|
6
6
|
import { execute_publishing_plan } from './multi_repo_publisher.js';
|
|
7
7
|
import { log_dependency_analysis } from './log_helpers.js';
|
|
8
8
|
import { GITOPS_CONFIG_PATH_DEFAULT } from './gitops_constants.js';
|
|
@@ -21,9 +21,9 @@ export const Args = z.strictObject({
|
|
|
21
21
|
sync: z
|
|
22
22
|
.boolean()
|
|
23
23
|
.meta({
|
|
24
|
-
description: 'sync repos (switch branch, pull, install) before validating instead of reading the working tree as-is'
|
|
24
|
+
description: 'sync repos (switch branch, pull, install) before validating instead of reading the working tree as-is'
|
|
25
25
|
})
|
|
26
|
-
.default(false)
|
|
26
|
+
.default(false)
|
|
27
27
|
});
|
|
28
28
|
/** @nodocs */
|
|
29
29
|
export const task = {
|
|
@@ -65,7 +65,7 @@ export const task = {
|
|
|
65
65
|
duration: analyze_duration,
|
|
66
66
|
warning_details,
|
|
67
67
|
info_details,
|
|
68
|
-
analysis
|
|
68
|
+
analysis
|
|
69
69
|
});
|
|
70
70
|
log.info(st('green', ` ✓ gitops_analyze completed in ${analyze_duration}ms`));
|
|
71
71
|
// Print detailed analysis
|
|
@@ -81,7 +81,7 @@ export const task = {
|
|
|
81
81
|
success: false,
|
|
82
82
|
warnings: 0,
|
|
83
83
|
errors: 1,
|
|
84
|
-
duration: analyze_duration
|
|
84
|
+
duration: analyze_duration
|
|
85
85
|
});
|
|
86
86
|
log.error(st('red', ` ✗ gitops_analyze failed: ${error}`));
|
|
87
87
|
}
|
|
@@ -100,7 +100,7 @@ export const task = {
|
|
|
100
100
|
success: errors === 0,
|
|
101
101
|
warnings,
|
|
102
102
|
errors,
|
|
103
|
-
duration: plan_duration
|
|
103
|
+
duration: plan_duration
|
|
104
104
|
});
|
|
105
105
|
log.info(st('green', ` ✓ gitops_plan completed in ${plan_duration}ms`));
|
|
106
106
|
if (verbose) {
|
|
@@ -120,7 +120,7 @@ export const task = {
|
|
|
120
120
|
success: false,
|
|
121
121
|
warnings: 0,
|
|
122
122
|
errors: 1,
|
|
123
|
-
duration: plan_duration
|
|
123
|
+
duration: plan_duration
|
|
124
124
|
});
|
|
125
125
|
log.error(st('red', ` ✗ gitops_plan failed: ${error}`));
|
|
126
126
|
}
|
|
@@ -130,7 +130,7 @@ export const task = {
|
|
|
130
130
|
try {
|
|
131
131
|
const options = {
|
|
132
132
|
wetrun: false,
|
|
133
|
-
log: undefined
|
|
133
|
+
log: undefined // Silent for validation
|
|
134
134
|
};
|
|
135
135
|
// Reuse the plan from step 2 (regenerate only if that step failed to produce one).
|
|
136
136
|
const result = await execute_publishing_plan(local_repos, publishing_plan ?? (await generate_publishing_plan(local_repos, { verbose })), options);
|
|
@@ -143,7 +143,7 @@ export const task = {
|
|
|
143
143
|
success: result.ok,
|
|
144
144
|
warnings: 0,
|
|
145
145
|
errors,
|
|
146
|
-
duration: dry_duration
|
|
146
|
+
duration: dry_duration
|
|
147
147
|
});
|
|
148
148
|
log.info(st('green', ` ✓ gitops_publish (dry run) completed in ${dry_duration}ms`));
|
|
149
149
|
if (errors > 0) {
|
|
@@ -157,7 +157,7 @@ export const task = {
|
|
|
157
157
|
success: false,
|
|
158
158
|
warnings: 0,
|
|
159
159
|
errors: 1,
|
|
160
|
-
duration: dry_duration
|
|
160
|
+
duration: dry_duration
|
|
161
161
|
});
|
|
162
162
|
log.error(st('red', ` ✗ gitops_publish (dry run) failed: ${error}`));
|
|
163
163
|
}
|
|
@@ -174,7 +174,7 @@ export const task = {
|
|
|
174
174
|
// always `true` today. The gate exists for a future caller that loads a
|
|
175
175
|
// partial set; until then the skip path is inert and untested.
|
|
176
176
|
checkable: true,
|
|
177
|
-
archived: r.repo_config.archived
|
|
177
|
+
archived: r.repo_config.archived
|
|
178
178
|
})));
|
|
179
179
|
const ci_duration = Date.now() - ci_start;
|
|
180
180
|
const drift_details = ci_drift.map((d) => d.kind === 'missing_ci'
|
|
@@ -185,7 +185,7 @@ export const task = {
|
|
|
185
185
|
success: ci_drift.length === 0,
|
|
186
186
|
warnings: 0,
|
|
187
187
|
errors: ci_drift.length,
|
|
188
|
-
duration: ci_duration
|
|
188
|
+
duration: ci_duration
|
|
189
189
|
});
|
|
190
190
|
if (ci_drift.length === 0) {
|
|
191
191
|
log.info(st('green', ` ✓ ci_reconcile completed in ${ci_duration}ms`));
|
|
@@ -204,7 +204,7 @@ export const task = {
|
|
|
204
204
|
success: false,
|
|
205
205
|
warnings: 0,
|
|
206
206
|
errors: 1,
|
|
207
|
-
duration: ci_duration
|
|
207
|
+
duration: ci_duration
|
|
208
208
|
});
|
|
209
209
|
log.error(st('red', ` ✗ ci_reconcile failed: ${error}`));
|
|
210
210
|
}
|
|
@@ -255,5 +255,5 @@ export const task = {
|
|
|
255
255
|
log.error(st('red', '❌ Validation failed - review the errors above.'));
|
|
256
256
|
throw new Error('Validation failed');
|
|
257
257
|
}
|
|
258
|
-
}
|
|
258
|
+
}
|
|
259
259
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph_validation.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/graph_validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"graph_validation.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/graph_validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAItD,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE9D,MAAM,WAAW,qBAAqB;IACrC,KAAK,EAAE,eAAe,CAAC;IACvB,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAChC,iBAAiB,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACxC,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,GACrC,OAAO,KAAK,CAAC,SAAS,CAAC,EACvB,UAAS;IACR,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACf,KACJ,qBA8DF,CAAC;AAEF,6FAA6F;AAC7F,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,sBAAsB,CAAC,SAAS,CAAC,CAAC,CAAC;AAE/E,MAAM,WAAW,YAAY;IAC5B,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,sFAAsF;IACtF,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CACvC;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,KAAK,CAAC,SAAS,CAAC,KAAG,YASvD,CAAC"}
|
package/dist/graph_validation.js
CHANGED
|
@@ -77,7 +77,7 @@ export const validate_dependency_graph = (repos, options = {}) => {
|
|
|
77
77
|
publishing_order,
|
|
78
78
|
production_cycles,
|
|
79
79
|
dev_cycles,
|
|
80
|
-
sort_error
|
|
80
|
+
sort_error
|
|
81
81
|
};
|
|
82
82
|
};
|
|
83
83
|
/**
|
|
@@ -91,7 +91,7 @@ export const analyze_repos = (repos) => {
|
|
|
91
91
|
const { graph, publishing_order: order } = validate_dependency_graph(repos.filter(repo_is_npm), {
|
|
92
92
|
throw_on_prod_cycles: false, // report, don't throw
|
|
93
93
|
log_cycles: false, // callers format their own cycle output
|
|
94
|
-
log_order: false
|
|
94
|
+
log_order: false
|
|
95
95
|
});
|
|
96
96
|
const analysis = new DependencyGraphBuilder().analyze(graph);
|
|
97
97
|
return { graph, analysis, publishing_order: order.length > 0 ? order : null };
|
package/dist/local_repo.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export interface LocalRepoMissing {
|
|
|
74
74
|
* @param allow_dirty - when syncing, tolerate uncommitted changes instead of throwing (default `false`)
|
|
75
75
|
* @throws {TaskError} if syncing fails (dirty workspace, branch switch, install) or analysis fails
|
|
76
76
|
*/
|
|
77
|
-
export declare const local_repo_load: ({ local_repo_path, log: _log, git_ops, npm_ops, sync, allow_dirty
|
|
77
|
+
export declare const local_repo_load: ({ local_repo_path, log: _log, git_ops, npm_ops, sync, allow_dirty }: {
|
|
78
78
|
local_repo_path: LocalRepoPath;
|
|
79
79
|
log?: Logger;
|
|
80
80
|
git_ops?: GitOperations;
|
|
@@ -88,7 +88,7 @@ export declare const local_repo_load: ({ local_repo_path, log: _log, git_ops, np
|
|
|
88
88
|
* and rendered on the dashboard, but excluded from the changeset cascade.
|
|
89
89
|
*/
|
|
90
90
|
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
|
|
91
|
+
export declare const local_repos_ensure: ({ resolved_config, repos_dir, gitops_config, download, log, npm_ops }: {
|
|
92
92
|
resolved_config: ResolvedGitopsConfig;
|
|
93
93
|
repos_dir: string;
|
|
94
94
|
gitops_config: GitopsConfig;
|
|
@@ -96,7 +96,7 @@ export declare const local_repos_ensure: ({ resolved_config, repos_dir, gitops_c
|
|
|
96
96
|
log?: Logger;
|
|
97
97
|
npm_ops?: NpmOperations;
|
|
98
98
|
}) => Promise<Array<LocalRepoPath>>;
|
|
99
|
-
export declare const local_repos_load: ({ local_repo_paths, log, git_ops, npm_ops, parallel, concurrency, sync, allow_dirty
|
|
99
|
+
export declare const local_repos_load: ({ local_repo_paths, log, git_ops, npm_ops, parallel, concurrency, sync, allow_dirty }: {
|
|
100
100
|
local_repo_paths: Array<LocalRepoPath>;
|
|
101
101
|
log?: Logger;
|
|
102
102
|
git_ops?: GitOperations;
|
|
@@ -106,7 +106,7 @@ export declare const local_repos_load: ({ local_repo_paths, log, git_ops, npm_op
|
|
|
106
106
|
sync?: boolean;
|
|
107
107
|
allow_dirty?: boolean;
|
|
108
108
|
}) => Promise<Array<LocalRepo>>;
|
|
109
|
-
export declare const local_repo_locate: ({ repo_config, repos_dir
|
|
109
|
+
export declare const local_repo_locate: ({ repo_config, repos_dir }: {
|
|
110
110
|
repo_config: GitopsRepoConfig;
|
|
111
111
|
repos_dir: string;
|
|
112
112
|
}) => LocalRepoPath | LocalRepoMissing;
|
package/dist/local_repo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local_repo.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/local_repo.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
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,yBAAyB,CAAC;AAGtD,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGpE,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAA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E,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,KAAG,OAAO,CAAC,SAAS,CAgKpB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,MAAM,SAAS,KAAG,OAA8B,CAAC;AA0C7E,eAAO,MAAM,kBAAkB,GAAU,uEAOtC;IACF,eAAe,EAAE,oBAAoB,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,YAAY,CAAC;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,aAAa,CAAC;CACxB,KAAG,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,CAkC/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAU,uFASpC;IACF,gBAAgB,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IACvC,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,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,KAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CA6C3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,4BAG/B;IACF,WAAW,EAAE,gBAAgB,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;CAClB,KAAG,aAAa,GAAG,gBAoBnB,CAAC"}
|
package/dist/local_repo.js
CHANGED
|
@@ -36,7 +36,7 @@ import { cargo_toml_load } from './cargo_toml.js';
|
|
|
36
36
|
* @param allow_dirty - when syncing, tolerate uncommitted changes instead of throwing (default `false`)
|
|
37
37
|
* @throws {TaskError} if syncing fails (dirty workspace, branch switch, install) or analysis fails
|
|
38
38
|
*/
|
|
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
|
|
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
40
|
const { repo_config, repo_dir, repo_name, repo_git_ssh_url } = local_repo_path;
|
|
41
41
|
if (sync) {
|
|
42
42
|
// Record commit hash before any changes
|
|
@@ -107,7 +107,7 @@ export const local_repo_load = async ({ local_repo_path, log: _log, git_ops = de
|
|
|
107
107
|
from_commit: commit_before,
|
|
108
108
|
to_commit: commit_after,
|
|
109
109
|
file_path: 'package.json',
|
|
110
|
-
cwd: repo_dir
|
|
110
|
+
cwd: repo_dir
|
|
111
111
|
});
|
|
112
112
|
if (!changed_result.ok) {
|
|
113
113
|
throw new TaskError(`Failed to check if package.json changed in ${repo_dir}: ${changed_result.message}`);
|
|
@@ -145,7 +145,7 @@ export const local_repo_load = async ({ local_repo_path, log: _log, git_ops = de
|
|
|
145
145
|
package_json,
|
|
146
146
|
repo_dir,
|
|
147
147
|
repo_git_ssh_url,
|
|
148
|
-
repo_config
|
|
148
|
+
repo_config
|
|
149
149
|
};
|
|
150
150
|
// Extract dependencies from the full package_json
|
|
151
151
|
if (package_json.dependencies) {
|
|
@@ -174,7 +174,7 @@ export const repo_is_npm = (repo) => repo.kind === 'npm';
|
|
|
174
174
|
* never reads as an npm publish target, and tagged `cargo` so the publishing and
|
|
175
175
|
* analysis paths skip it (see `repo_is_npm`).
|
|
176
176
|
*/
|
|
177
|
-
const local_repo_load_cargo = async ({ local_repo_path
|
|
177
|
+
const local_repo_load_cargo = async ({ local_repo_path }) => {
|
|
178
178
|
const { repo_config, repo_dir, repo_name, repo_url, repo_git_ssh_url } = local_repo_path;
|
|
179
179
|
const cargo = await cargo_toml_load(repo_dir);
|
|
180
180
|
// A Cargo workspace root has no `name`, so fall back to the repo name parsed from
|
|
@@ -184,7 +184,7 @@ const local_repo_load_cargo = async ({ local_repo_path, }) => {
|
|
|
184
184
|
version: cargo?.version ?? '0.0.0',
|
|
185
185
|
repository: cargo?.repository ?? repo_url,
|
|
186
186
|
private: true,
|
|
187
|
-
...(cargo?.description ? { description: cargo.description } : null)
|
|
187
|
+
...(cargo?.description ? { description: cargo.description } : null)
|
|
188
188
|
};
|
|
189
189
|
const library = new Library(library_json_from_modules(package_json, []));
|
|
190
190
|
return {
|
|
@@ -193,10 +193,10 @@ const local_repo_load_cargo = async ({ local_repo_path, }) => {
|
|
|
193
193
|
package_json,
|
|
194
194
|
repo_dir,
|
|
195
195
|
repo_git_ssh_url,
|
|
196
|
-
repo_config
|
|
196
|
+
repo_config
|
|
197
197
|
};
|
|
198
198
|
};
|
|
199
|
-
export const local_repos_ensure = async ({ resolved_config, repos_dir, gitops_config, download, log, npm_ops = default_npm_operations
|
|
199
|
+
export const local_repos_ensure = async ({ resolved_config, repos_dir, gitops_config, download, log, npm_ops = default_npm_operations }) => {
|
|
200
200
|
let local_repo_paths = null;
|
|
201
201
|
if (!resolved_config.local_repos_missing) {
|
|
202
202
|
local_repo_paths = resolved_config.local_repo_paths;
|
|
@@ -207,7 +207,7 @@ export const local_repos_ensure = async ({ resolved_config, repos_dir, gitops_co
|
|
|
207
207
|
repos_dir,
|
|
208
208
|
local_repos_missing: resolved_config.local_repos_missing,
|
|
209
209
|
log,
|
|
210
|
-
npm_ops
|
|
210
|
+
npm_ops
|
|
211
211
|
});
|
|
212
212
|
local_repo_paths = (resolved_config.local_repo_paths ?? [])
|
|
213
213
|
.concat(downloaded)
|
|
@@ -225,7 +225,7 @@ export const local_repos_ensure = async ({ resolved_config, repos_dir, gitops_co
|
|
|
225
225
|
}
|
|
226
226
|
return local_repo_paths;
|
|
227
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
|
|
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 }) => {
|
|
229
229
|
if (!parallel) {
|
|
230
230
|
// Sequential loading (original behavior)
|
|
231
231
|
const loaded = [];
|
|
@@ -250,7 +250,7 @@ export const local_repos_load = async ({ local_repo_paths, log, git_ops = defaul
|
|
|
250
250
|
const repo_path = local_repo_paths[i];
|
|
251
251
|
errors.push({
|
|
252
252
|
repo_name: repo_path.repo_name,
|
|
253
|
-
error: String(result.reason)
|
|
253
|
+
error: String(result.reason)
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
256
|
}
|
|
@@ -261,7 +261,7 @@ export const local_repos_load = async ({ local_repo_paths, log, git_ops = defaul
|
|
|
261
261
|
}
|
|
262
262
|
return loaded;
|
|
263
263
|
};
|
|
264
|
-
export const local_repo_locate = ({ repo_config, repos_dir
|
|
264
|
+
export const local_repo_locate = ({ repo_config, repos_dir }) => {
|
|
265
265
|
const { repo_url } = repo_config;
|
|
266
266
|
const repo_name = strip_end(repo_url, '/').split('/').at(-1);
|
|
267
267
|
if (!repo_name)
|
|
@@ -277,14 +277,14 @@ export const local_repo_locate = ({ repo_config, repos_dir, }) => {
|
|
|
277
277
|
repo_dir,
|
|
278
278
|
repo_url,
|
|
279
279
|
repo_git_ssh_url,
|
|
280
|
-
repo_config
|
|
280
|
+
repo_config
|
|
281
281
|
};
|
|
282
282
|
};
|
|
283
283
|
const to_repo_git_ssh_url = (repo_url) => {
|
|
284
284
|
const url = new URL(repo_url);
|
|
285
285
|
return `git@${url.hostname}:${url.pathname.substring(1)}`;
|
|
286
286
|
};
|
|
287
|
-
const download_repos = async ({ repos_dir, local_repos_missing, log, npm_ops = default_npm_operations
|
|
287
|
+
const download_repos = async ({ repos_dir, local_repos_missing, log, npm_ops = default_npm_operations }) => {
|
|
288
288
|
const resolved = [];
|
|
289
289
|
for (const { repo_config, repo_git_ssh_url } of local_repos_missing) {
|
|
290
290
|
log?.info(`cloning repo ${repo_git_ssh_url} to ${repos_dir}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/log_helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"log_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/log_helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAGtD,OAAO,KAAK,EAAE,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi_repo_publisher.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/multi_repo_publisher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"multi_repo_publisher.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/multi_repo_publisher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAKtD,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAGN,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,MAAM,sBAAsB,CAAC;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,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@@ -3,11 +3,11 @@ import { join } from 'node:path';
|
|
|
3
3
|
import { styleText as st } from 'node:util';
|
|
4
4
|
import { repo_is_npm } from './local_repo.js';
|
|
5
5
|
import { update_package_json } from './dependency_updater.js';
|
|
6
|
-
import { generate_publishing_plan
|
|
6
|
+
import { generate_publishing_plan } from './publishing_plan.js';
|
|
7
7
|
import { default_gitops_operations } from './operations_defaults.js';
|
|
8
8
|
import { GITOPS_NPM_WAIT_TIMEOUT_DEFAULT } from './gitops_constants.js';
|
|
9
|
-
import { summarize_events
|
|
10
|
-
import { capture_handler, multi_handler
|
|
9
|
+
import { summarize_events } from './publishing_event.js';
|
|
10
|
+
import { capture_handler, multi_handler } from './publishing_event_handler.js';
|
|
11
11
|
export const publish_repos = async (repos, options) => {
|
|
12
12
|
const { log, ops = default_gitops_operations } = options;
|
|
13
13
|
// Convenience entry: generate the plan, then execute it. Callers that already hold a
|
|
@@ -47,7 +47,7 @@ export const execute_publishing_plan = async (all_repos, plan, options) => {
|
|
|
47
47
|
const preflight_options = {
|
|
48
48
|
skip_changesets: false, // Always check for changesets
|
|
49
49
|
required_branch: 'main',
|
|
50
|
-
log
|
|
50
|
+
log
|
|
51
51
|
};
|
|
52
52
|
const preflight = await ops.preflight.run_preflight_checks({
|
|
53
53
|
repos,
|
|
@@ -55,7 +55,7 @@ export const execute_publishing_plan = async (all_repos, plan, options) => {
|
|
|
55
55
|
git_ops: ops.git,
|
|
56
56
|
npm_ops: ops.npm,
|
|
57
57
|
build_ops: ops.build,
|
|
58
|
-
changeset_ops: ops.changeset
|
|
58
|
+
changeset_ops: ops.changeset
|
|
59
59
|
});
|
|
60
60
|
if (!preflight.ok) {
|
|
61
61
|
throw new TaskError(`Preflight checks failed: ${preflight.errors.join(', ')}`);
|
|
@@ -126,7 +126,7 @@ export const execute_publishing_plan = async (all_repos, plan, options) => {
|
|
|
126
126
|
bump_type: version.bump_type,
|
|
127
127
|
breaking: version.breaking,
|
|
128
128
|
commit: version.commit,
|
|
129
|
-
tag: version.tag
|
|
129
|
+
tag: version.tag
|
|
130
130
|
});
|
|
131
131
|
log?.info(wetrun
|
|
132
132
|
? st('green', ` ✅ Published ${pkg_name}@${version.new_version}`)
|
|
@@ -141,9 +141,9 @@ export const execute_publishing_plan = async (all_repos, plan, options) => {
|
|
|
141
141
|
max_attempts: 30,
|
|
142
142
|
initial_delay: 1000,
|
|
143
143
|
max_delay: 60000,
|
|
144
|
-
timeout: options.max_wait ?? GITOPS_NPM_WAIT_TIMEOUT_DEFAULT
|
|
144
|
+
timeout: options.max_wait ?? GITOPS_NPM_WAIT_TIMEOUT_DEFAULT
|
|
145
145
|
},
|
|
146
|
-
log
|
|
146
|
+
log
|
|
147
147
|
});
|
|
148
148
|
if (!wait_result.ok) {
|
|
149
149
|
// Handle inline (don't throw into the generic catch): the npm-wait failure
|
|
@@ -180,7 +180,7 @@ export const execute_publishing_plan = async (all_repos, plan, options) => {
|
|
|
180
180
|
dependency: dep_name,
|
|
181
181
|
version: dep_version,
|
|
182
182
|
dep_type: dependency_update_type(plan, dependent_name, dep_name),
|
|
183
|
-
creates_changeset: republishes
|
|
183
|
+
creates_changeset: republishes
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
186
|
changed_repos.add(dependent_name); // Mark as changed for deployment
|
|
@@ -190,7 +190,7 @@ export const execute_publishing_plan = async (all_repos, plan, options) => {
|
|
|
190
190
|
published_versions: published, // creates the auto-changeset
|
|
191
191
|
log,
|
|
192
192
|
git_ops: ops.git,
|
|
193
|
-
fs_ops: ops.fs
|
|
193
|
+
fs_ops: ops.fs
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
196
|
else {
|
|
@@ -199,7 +199,7 @@ export const execute_publishing_plan = async (all_repos, plan, options) => {
|
|
|
199
199
|
strategy: options.version_strategy || 'caret',
|
|
200
200
|
log,
|
|
201
201
|
git_ops: ops.git,
|
|
202
|
-
fs_ops: ops.fs
|
|
202
|
+
fs_ops: ops.fs
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
205
|
}
|
|
@@ -215,7 +215,7 @@ export const execute_publishing_plan = async (all_repos, plan, options) => {
|
|
|
215
215
|
// TODO: emit a precise code once the npm/process ops return typed errors —
|
|
216
216
|
// today a publish-step cause lives in unstructured stderr, so use the honest
|
|
217
217
|
// coarse bucket rather than guessing 'auth'/'network'/'build' from the message.
|
|
218
|
-
code: 'publish'
|
|
218
|
+
code: 'publish'
|
|
219
219
|
});
|
|
220
220
|
log?.error(st('red', ` ❌ Failed to publish ${pkg_name}: ${err.message}`));
|
|
221
221
|
break; // Always fail fast on error
|
|
@@ -244,7 +244,7 @@ export const execute_publishing_plan = async (all_repos, plan, options) => {
|
|
|
244
244
|
dependency: dep_name,
|
|
245
245
|
version: dep_version,
|
|
246
246
|
dep_type: 'dev',
|
|
247
|
-
creates_changeset: false
|
|
247
|
+
creates_changeset: false // dev-dep updates redeploy without republishing
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
250
|
changed_repos.add(repo_name); // Mark as changed for deployment
|
|
@@ -255,7 +255,7 @@ export const execute_publishing_plan = async (all_repos, plan, options) => {
|
|
|
255
255
|
strategy: options.version_strategy || 'caret',
|
|
256
256
|
log,
|
|
257
257
|
git_ops: ops.git,
|
|
258
|
-
fs_ops: ops.fs
|
|
258
|
+
fs_ops: ops.fs
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
261
|
}
|
|
@@ -278,7 +278,7 @@ export const execute_publishing_plan = async (all_repos, plan, options) => {
|
|
|
278
278
|
const deploy_result = await ops.process.spawn({
|
|
279
279
|
cmd: 'gro',
|
|
280
280
|
args: ['deploy'],
|
|
281
|
-
cwd: repo.repo_dir
|
|
281
|
+
cwd: repo.repo_dir
|
|
282
282
|
});
|
|
283
283
|
if (deploy_result.ok) {
|
|
284
284
|
emit({ event: 'deploy_completed', name: repo.library.name });
|
|
@@ -344,7 +344,7 @@ export const execute_publishing_plan = async (all_repos, plan, options) => {
|
|
|
344
344
|
events: capture.events,
|
|
345
345
|
summary,
|
|
346
346
|
plan_errors: plan.errors,
|
|
347
|
-
plan_warnings: plan.warnings
|
|
347
|
+
plan_warnings: plan.warnings
|
|
348
348
|
};
|
|
349
349
|
};
|
|
350
350
|
/**
|
|
@@ -370,14 +370,14 @@ const publish_single_repo = async (repo, options, ops, planned) => {
|
|
|
370
370
|
bump_type: planned.bump_type,
|
|
371
371
|
breaking: planned.breaking,
|
|
372
372
|
commit: 'simulated',
|
|
373
|
-
tag: `v${planned.to}
|
|
373
|
+
tag: `v${planned.to}`
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
376
|
// Run gro publish with --no-build (builds were validated in preflight checks)
|
|
377
377
|
const publish_result = await ops.process.spawn({
|
|
378
378
|
cmd: 'gro',
|
|
379
379
|
args: ['publish', '--no-build'],
|
|
380
|
-
cwd: repo.repo_dir
|
|
380
|
+
cwd: repo.repo_dir
|
|
381
381
|
});
|
|
382
382
|
if (!publish_result.ok) {
|
|
383
383
|
throw new Error(`Failed to publish ${repo.library.name}: ${publish_result.message}`);
|
|
@@ -405,7 +405,7 @@ const publish_single_repo = async (repo, options, ops, planned) => {
|
|
|
405
405
|
bump_type: planned.bump_type,
|
|
406
406
|
breaking: planned.breaking,
|
|
407
407
|
commit,
|
|
408
|
-
tag: `v${new_version}
|
|
408
|
+
tag: `v${new_version}`
|
|
409
409
|
};
|
|
410
410
|
};
|
|
411
411
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npm_registry.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/npm_registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"npm_registry.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/npm_registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAKtD,MAAM,WAAW,WAAW;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,uBAAuB,GACnC,KAAK,MAAM,EACX,SAAS,MAAM,EACf,UAAS;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,KAC5B,OAAO,CAAC,OAAO,CAiBjB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB,GAC5B,KAAK,MAAM,EACX,SAAS,MAAM,EACf,UAAS,WAAgB,KACvB,OAAO,CAAC,IAAI,CA2Cd,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAC5B,KAAK,MAAM,EACX,UAAS;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,KAC5B,OAAO,CAAC,WAAW,GAAG,IAAI,CAkB5B,CAAC;AAEF,eAAO,MAAM,cAAc,GAC1B,KAAK,MAAM,EACX,UAAS;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,KAC5B,OAAO,CAAC,OAAO,CAGjB,CAAC"}
|
package/dist/npm_registry.js
CHANGED
|
@@ -34,7 +34,7 @@ export const check_package_available = async (pkg, version, options = {}) => {
|
|
|
34
34
|
* @throws {Error} if timeout reached or max attempts exceeded
|
|
35
35
|
*/
|
|
36
36
|
export const wait_for_package = async (pkg, version, options = {}) => {
|
|
37
|
-
const { log, max_attempts = 30, initial_delay = 1000, max_delay = 60000, timeout = 300000
|
|
37
|
+
const { log, max_attempts = 30, initial_delay = 1000, max_delay = 60000, timeout = 300000 // 5 minutes default
|
|
38
38
|
} = options;
|
|
39
39
|
const start_time = Date.now();
|
|
40
40
|
let attempt = 0;
|
|
@@ -79,7 +79,7 @@ export const get_package_info = async (pkg, options = {}) => {
|
|
|
79
79
|
const data = JSON.parse(result.stdout);
|
|
80
80
|
return {
|
|
81
81
|
name: data.name,
|
|
82
|
-
version: data.version
|
|
82
|
+
version: data.version
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
return null;
|