@fuzdev/fuz_gitops 0.68.0 → 0.70.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 +3 -3
- package/dist/ModulesDetail.svelte +14 -14
- package/dist/ModulesNav.svelte +2 -2
- package/dist/PageFooter.svelte +1 -1
- package/dist/ReposTable.svelte +1 -1
- package/dist/ReposTree.svelte +7 -7
- package/dist/TablePage.svelte +1 -7
- package/dist/TreeItemPage.svelte +3 -3
- package/dist/TreePage.svelte +3 -3
- package/dist/changeset_generator.d.ts +4 -4
- package/dist/changeset_generator.js +5 -5
- package/dist/changeset_reader.d.ts +6 -4
- package/dist/changeset_reader.d.ts.map +1 -1
- package/dist/changeset_reader.js +7 -5
- package/dist/dependency_graph.d.ts +3 -3
- package/dist/dependency_graph.js +3 -3
- package/dist/dependency_updater.d.ts +4 -4
- package/dist/dependency_updater.js +5 -5
- package/dist/fetch_repo_data.d.ts +4 -4
- package/dist/fetch_repo_data.d.ts.map +1 -1
- package/dist/fetch_repo_data.js +4 -5
- package/dist/fs_fetch_value_cache.d.ts +4 -4
- package/dist/fs_fetch_value_cache.js +4 -4
- package/dist/git_operations.d.ts +5 -5
- package/dist/git_operations.d.ts.map +1 -1
- package/dist/git_operations.js +18 -18
- package/dist/github.d.ts +1 -1
- package/dist/github.js +0 -1
- package/dist/gitops_analyze.task.d.ts +1 -1
- package/dist/gitops_plan.task.d.ts +4 -4
- package/dist/gitops_plan.task.js +3 -3
- package/dist/gitops_publish.task.d.ts +1 -1
- package/dist/gitops_run.task.d.ts +1 -1
- package/dist/gitops_run.task.js +2 -2
- package/dist/gitops_task_helpers.d.ts +5 -5
- package/dist/gitops_task_helpers.js +5 -5
- package/dist/graph_validation.d.ts +5 -5
- package/dist/graph_validation.js +5 -5
- package/dist/local_repo.d.ts +6 -6
- package/dist/local_repo.d.ts.map +1 -1
- package/dist/local_repo.js +22 -26
- package/dist/multi_repo_publisher.d.ts.map +1 -1
- package/dist/multi_repo_publisher.js +4 -4
- package/dist/npm_install_helpers.d.ts +3 -3
- package/dist/npm_install_helpers.js +3 -3
- package/dist/npm_registry.d.ts +4 -4
- package/dist/npm_registry.js +5 -6
- package/dist/operations.d.ts +19 -17
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +1 -1
- package/dist/operations_defaults.d.ts.map +1 -1
- package/dist/operations_defaults.js +49 -14
- package/dist/output_helpers.d.ts +2 -2
- package/dist/output_helpers.js +2 -2
- package/dist/paths.d.ts +1 -1
- package/dist/paths.js +1 -1
- package/dist/preflight_checks.d.ts +2 -2
- package/dist/preflight_checks.js +7 -7
- package/dist/publishing_plan.js +4 -4
- package/dist/publishing_plan_helpers.d.ts +1 -1
- package/dist/publishing_plan_helpers.js +1 -1
- package/dist/repo.svelte.d.ts +4 -5
- package/dist/repo.svelte.d.ts.map +1 -1
- package/dist/repo.svelte.js +2 -2
- package/dist/repo_ops.d.ts +6 -6
- package/dist/repo_ops.js +7 -7
- package/dist/version_utils.d.ts +2 -2
- package/dist/version_utils.js +2 -2
- package/package.json +18 -16
- package/src/lib/changeset_generator.ts +5 -5
- package/src/lib/changeset_reader.ts +7 -5
- package/src/lib/dependency_graph.ts +3 -3
- package/src/lib/dependency_updater.ts +5 -5
- package/src/lib/fetch_repo_data.ts +4 -6
- package/src/lib/fs_fetch_value_cache.ts +4 -4
- package/src/lib/git_operations.ts +32 -18
- package/src/lib/github.ts +1 -2
- package/src/lib/gitops_plan.task.ts +3 -3
- package/src/lib/gitops_run.task.ts +2 -2
- package/src/lib/gitops_task_helpers.ts +5 -5
- package/src/lib/graph_validation.ts +5 -5
- package/src/lib/local_repo.ts +28 -30
- package/src/lib/multi_repo_publisher.ts +4 -6
- package/src/lib/npm_install_helpers.ts +3 -3
- package/src/lib/npm_registry.ts +6 -6
- package/src/lib/operations.ts +19 -17
- package/src/lib/operations_defaults.ts +47 -16
- package/src/lib/output_helpers.ts +2 -2
- package/src/lib/paths.ts +1 -1
- package/src/lib/preflight_checks.ts +7 -7
- package/src/lib/publishing_plan.ts +4 -4
- package/src/lib/publishing_plan_helpers.ts +1 -1
- package/src/lib/repo.svelte.ts +4 -5
- package/src/lib/repo_ops.ts +7 -7
- package/src/lib/version_utils.ts +2 -2
package/dist/operations.d.ts
CHANGED
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
* ```
|
|
30
30
|
*
|
|
31
31
|
* See `operations_defaults.ts` for real implementations.
|
|
32
|
-
* See test files (
|
|
32
|
+
* See test files (`*.test.ts`) for mock implementations.
|
|
33
33
|
*
|
|
34
34
|
* @module
|
|
35
35
|
*/
|
|
36
36
|
import type { Result } from '@fuzdev/fuz_util/result.js';
|
|
37
|
+
import type { FsError } from '@fuzdev/fuz_util/fs.js';
|
|
37
38
|
import type { Logger } from '@fuzdev/fuz_util/log.js';
|
|
38
|
-
import type { SpawnOptions } from 'node:child_process';
|
|
39
39
|
import type { LocalRepo } from './local_repo.js';
|
|
40
40
|
import type { ChangesetInfo } from './changeset_reader.js';
|
|
41
41
|
import type { BumpType } from './semver.js';
|
|
@@ -71,7 +71,7 @@ export interface ChangesetOperations {
|
|
|
71
71
|
/**
|
|
72
72
|
* Predicts the next version based on changesets.
|
|
73
73
|
* Returns null if no changesets found (expected, not an error).
|
|
74
|
-
* Returns error Result if changesets exist but can't be read/parsed.
|
|
74
|
+
* Returns error `Result` if changesets exist but can't be read/parsed.
|
|
75
75
|
*/
|
|
76
76
|
predict_next_version: (options: {
|
|
77
77
|
repo: LocalRepo;
|
|
@@ -198,9 +198,13 @@ export interface GitOperations {
|
|
|
198
198
|
message: string;
|
|
199
199
|
}>>;
|
|
200
200
|
/**
|
|
201
|
-
*
|
|
201
|
+
* Lists uncommitted files in the working tree (`git diff --name-only HEAD`).
|
|
202
|
+
*
|
|
203
|
+
* Renamed from `get_changed_files` in 2026-04 because "changed files" collided
|
|
204
|
+
* with mageguild's `get_changed_files` which diffs two refs. This one reports
|
|
205
|
+
* uncommitted working-tree changes relative to HEAD.
|
|
202
206
|
*/
|
|
203
|
-
|
|
207
|
+
list_uncommitted_files: (options?: {
|
|
204
208
|
cwd?: string;
|
|
205
209
|
}) => Promise<Result<{
|
|
206
210
|
value: Array<string>;
|
|
@@ -268,7 +272,7 @@ export interface ProcessOperations {
|
|
|
268
272
|
spawn: (options: {
|
|
269
273
|
cmd: string;
|
|
270
274
|
args: Array<string>;
|
|
271
|
-
|
|
275
|
+
cwd?: string;
|
|
272
276
|
}) => Promise<Result<{
|
|
273
277
|
stdout?: string;
|
|
274
278
|
stderr?: string;
|
|
@@ -282,7 +286,7 @@ export interface ProcessOperations {
|
|
|
282
286
|
*/
|
|
283
287
|
export interface BuildOperations {
|
|
284
288
|
/**
|
|
285
|
-
* Builds a package using gro build
|
|
289
|
+
* Builds a package using `gro build`.
|
|
286
290
|
*/
|
|
287
291
|
build_package: (options: {
|
|
288
292
|
repo: LocalRepo;
|
|
@@ -372,6 +376,10 @@ export interface PreflightOperations {
|
|
|
372
376
|
}
|
|
373
377
|
/**
|
|
374
378
|
* File system operations for reading and writing files.
|
|
379
|
+
*
|
|
380
|
+
* Errors are typed via `FsError` (`not_found | permission_denied |
|
|
381
|
+
* already_exists | io_error`) so callers can branch on `kind` instead of
|
|
382
|
+
* regex-matching `message`. See `@fuzdev/fuz_util/fs.js`.
|
|
375
383
|
*/
|
|
376
384
|
export interface FsOperations {
|
|
377
385
|
/**
|
|
@@ -382,33 +390,27 @@ export interface FsOperations {
|
|
|
382
390
|
encoding: BufferEncoding;
|
|
383
391
|
}) => Promise<Result<{
|
|
384
392
|
value: string;
|
|
385
|
-
},
|
|
386
|
-
message: string;
|
|
387
|
-
}>>;
|
|
393
|
+
}, FsError>>;
|
|
388
394
|
/**
|
|
389
395
|
* Writes a file to the file system.
|
|
390
396
|
*/
|
|
391
397
|
writeFile: (options: {
|
|
392
398
|
path: string;
|
|
393
399
|
content: string;
|
|
394
|
-
}) => Promise<Result<object,
|
|
395
|
-
message: string;
|
|
396
|
-
}>>;
|
|
400
|
+
}) => Promise<Result<object, FsError>>;
|
|
397
401
|
/**
|
|
398
402
|
* Creates a directory, optionally with recursive creation.
|
|
399
403
|
*/
|
|
400
404
|
mkdir: (options: {
|
|
401
405
|
path: string;
|
|
402
406
|
recursive?: boolean;
|
|
403
|
-
}) => Promise<Result<object,
|
|
404
|
-
message: string;
|
|
405
|
-
}>>;
|
|
407
|
+
}) => Promise<Result<object, FsError>>;
|
|
406
408
|
/**
|
|
407
409
|
* Checks if a path exists on the file system.
|
|
408
410
|
*/
|
|
409
411
|
exists: (options: {
|
|
410
412
|
path: string;
|
|
411
|
-
}) => boolean
|
|
413
|
+
}) => Promise<boolean>;
|
|
412
414
|
}
|
|
413
415
|
/**
|
|
414
416
|
* Combined operations interface grouping all gitops functionality.
|
package/dist/operations.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAC,
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AAC1C,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/lib/","sources":["../src/lib/operations_defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA4BH,OAAO,KAAK,EACX,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,MAAM,iBAAiB,CAAC;AA0BzB,eAAO,MAAM,4BAA4B,EAAE,mBAuB1C,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,
|
|
1
|
+
{"version":3,"file":"operations_defaults.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/operations_defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA4BH,OAAO,KAAK,EACX,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,MAAM,iBAAiB,CAAC;AA0BzB,eAAO,MAAM,4BAA4B,EAAE,mBAuB1C,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,aA0GpC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,iBAsBxC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,aAqEpC,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,mBAI1C,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,YAuCnC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,eAmBtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,gBAQvC,CAAC"}
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
10
|
-
import { readFile, writeFile, mkdir } from 'node:fs/promises';
|
|
11
|
-
import { existsSync } from 'node:fs';
|
|
9
|
+
import { spawn_out } from '@fuzdev/fuz_util/process.js';
|
|
10
|
+
import { readFile, writeFile, mkdir, stat } from 'node:fs/promises';
|
|
12
11
|
import { git_checkout } from '@fuzdev/fuz_util/git.js';
|
|
12
|
+
import { fs_classify_error } from '@fuzdev/fuz_util/fs.js';
|
|
13
13
|
import { EMPTY_OBJECT } from '@fuzdev/fuz_util/object.js';
|
|
14
14
|
import { has_changesets, read_changesets, predict_next_version } from './changeset_reader.js';
|
|
15
15
|
import { wait_for_package, check_package_available } from './npm_registry.js';
|
|
16
16
|
import { run_preflight_checks } from './preflight_checks.js';
|
|
17
|
-
import { git_add, git_commit, git_add_and_commit, git_tag, git_push_tag, git_has_changes,
|
|
17
|
+
import { git_add, git_commit, git_add_and_commit, git_tag, git_push_tag, git_has_changes, git_list_uncommitted_files, git_has_file_changed, git_stash, git_stash_pop, git_switch_branch, git_current_branch_name_required, git_current_commit_hash_required, git_check_clean_workspace_as_boolean, git_has_remote, } from './git_operations.js';
|
|
18
18
|
/** Wrap an async function that returns a value */
|
|
19
19
|
const wrap_with_value = async (fn) => {
|
|
20
20
|
try {
|
|
@@ -79,7 +79,18 @@ export const default_git_operations = {
|
|
|
79
79
|
},
|
|
80
80
|
pull: async (options) => {
|
|
81
81
|
const { origin, branch, cwd } = options ?? EMPTY_OBJECT;
|
|
82
|
-
|
|
82
|
+
try {
|
|
83
|
+
const spawned = await spawn_out('git', ['pull', origin || 'origin', branch || ''], cwd ? { cwd } : undefined);
|
|
84
|
+
if (spawned.result.ok) {
|
|
85
|
+
return { ok: true };
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
return { ok: false, message: spawned.stderr || 'Pull failed' };
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
return { ok: false, message: String(error) };
|
|
93
|
+
}
|
|
83
94
|
},
|
|
84
95
|
switch_branch: async (options) => {
|
|
85
96
|
const { branch, pull, cwd } = options;
|
|
@@ -106,9 +117,9 @@ export const default_git_operations = {
|
|
|
106
117
|
const { cwd } = options ?? EMPTY_OBJECT;
|
|
107
118
|
return wrap_with_value(() => git_has_changes(cwd ? { cwd } : undefined));
|
|
108
119
|
},
|
|
109
|
-
|
|
120
|
+
list_uncommitted_files: async (options) => {
|
|
110
121
|
const { cwd } = options ?? EMPTY_OBJECT;
|
|
111
|
-
return wrap_with_value(() =>
|
|
122
|
+
return wrap_with_value(() => git_list_uncommitted_files(cwd ? { cwd } : undefined));
|
|
112
123
|
},
|
|
113
124
|
// Tagging
|
|
114
125
|
tag: async (options) => {
|
|
@@ -136,9 +147,9 @@ export const default_git_operations = {
|
|
|
136
147
|
};
|
|
137
148
|
export const default_process_operations = {
|
|
138
149
|
spawn: async (options) => {
|
|
139
|
-
const { cmd, args,
|
|
150
|
+
const { cmd, args, cwd } = options;
|
|
140
151
|
try {
|
|
141
|
-
const spawned = await spawn_out(cmd, args,
|
|
152
|
+
const spawned = await spawn_out(cmd, args, cwd ? { cwd } : undefined);
|
|
142
153
|
if (spawned.result.ok) {
|
|
143
154
|
return {
|
|
144
155
|
ok: true,
|
|
@@ -239,18 +250,42 @@ export const default_preflight_operations = {
|
|
|
239
250
|
export const default_fs_operations = {
|
|
240
251
|
readFile: async (options) => {
|
|
241
252
|
const { path, encoding } = options;
|
|
242
|
-
|
|
253
|
+
try {
|
|
254
|
+
const value = await readFile(path, encoding);
|
|
255
|
+
return { ok: true, value };
|
|
256
|
+
}
|
|
257
|
+
catch (error) {
|
|
258
|
+
return { ok: false, ...fs_classify_error(error) };
|
|
259
|
+
}
|
|
243
260
|
},
|
|
244
261
|
writeFile: async (options) => {
|
|
245
262
|
const { path, content } = options;
|
|
246
|
-
|
|
263
|
+
try {
|
|
264
|
+
await writeFile(path, content);
|
|
265
|
+
return { ok: true };
|
|
266
|
+
}
|
|
267
|
+
catch (error) {
|
|
268
|
+
return { ok: false, ...fs_classify_error(error) };
|
|
269
|
+
}
|
|
247
270
|
},
|
|
248
271
|
mkdir: async (options) => {
|
|
249
272
|
const { path, recursive } = options;
|
|
250
|
-
|
|
273
|
+
try {
|
|
274
|
+
await mkdir(path, { recursive });
|
|
275
|
+
return { ok: true };
|
|
276
|
+
}
|
|
277
|
+
catch (error) {
|
|
278
|
+
return { ok: false, ...fs_classify_error(error) };
|
|
279
|
+
}
|
|
251
280
|
},
|
|
252
|
-
exists: (options) => {
|
|
253
|
-
|
|
281
|
+
exists: async (options) => {
|
|
282
|
+
try {
|
|
283
|
+
await stat(options.path);
|
|
284
|
+
return true;
|
|
285
|
+
}
|
|
286
|
+
catch {
|
|
287
|
+
return false;
|
|
288
|
+
}
|
|
254
289
|
},
|
|
255
290
|
};
|
|
256
291
|
export const default_build_operations = {
|
package/dist/output_helpers.d.ts
CHANGED
|
@@ -17,11 +17,11 @@ export interface OutputFormatters<T> {
|
|
|
17
17
|
* Formats data and outputs to file or stdout based on options.
|
|
18
18
|
*
|
|
19
19
|
* Supports three formats:
|
|
20
|
-
* - stdout: Uses logger for colored/styled output (cannot use with
|
|
20
|
+
* - stdout: Uses logger for colored/styled output (cannot use with `--outfile`)
|
|
21
21
|
* - json: Stringified JSON
|
|
22
22
|
* - markdown: Formatted markdown text
|
|
23
23
|
*
|
|
24
|
-
* @throws {Error} if stdout format used with outfile
|
|
24
|
+
* @throws {Error} if stdout format used with `outfile`, or if logger missing for stdout
|
|
25
25
|
*/
|
|
26
26
|
export declare const format_and_output: <T>(data: T, formatters: OutputFormatters<T>, options: OutputOptions) => Promise<void>;
|
|
27
27
|
//# sourceMappingURL=output_helpers.d.ts.map
|
package/dist/output_helpers.js
CHANGED
|
@@ -3,11 +3,11 @@ import { writeFile } from 'node:fs/promises';
|
|
|
3
3
|
* Formats data and outputs to file or stdout based on options.
|
|
4
4
|
*
|
|
5
5
|
* Supports three formats:
|
|
6
|
-
* - stdout: Uses logger for colored/styled output (cannot use with
|
|
6
|
+
* - stdout: Uses logger for colored/styled output (cannot use with `--outfile`)
|
|
7
7
|
* - json: Stringified JSON
|
|
8
8
|
* - markdown: Formatted markdown text
|
|
9
9
|
*
|
|
10
|
-
* @throws {Error} if stdout format used with outfile
|
|
10
|
+
* @throws {Error} if stdout format used with `outfile`, or if logger missing for stdout
|
|
11
11
|
*/
|
|
12
12
|
export const format_and_output = async (data, formatters, options) => {
|
|
13
13
|
const { format, outfile, log } = options;
|
package/dist/paths.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const GITOPS_OUTPUT_DIR = ".gro/fuz_gitops";
|
|
|
5
5
|
/**
|
|
6
6
|
* Default repos directory relative to gitops config file.
|
|
7
7
|
* Resolves to the parent of the directory with the config
|
|
8
|
-
* (e.g.,
|
|
8
|
+
* (e.g., `~/dev/repo/gitops.config.ts` resolves to `~/dev/`).
|
|
9
9
|
*/
|
|
10
10
|
export declare const DEFAULT_REPOS_DIR = "..";
|
|
11
11
|
//# sourceMappingURL=paths.d.ts.map
|
package/dist/paths.js
CHANGED
|
@@ -5,6 +5,6 @@ export const GITOPS_OUTPUT_DIR = '.gro/fuz_gitops';
|
|
|
5
5
|
/**
|
|
6
6
|
* Default repos directory relative to gitops config file.
|
|
7
7
|
* Resolves to the parent of the directory with the config
|
|
8
|
-
* (e.g.,
|
|
8
|
+
* (e.g., `~/dev/repo/gitops.config.ts` resolves to `~/dev/`).
|
|
9
9
|
*/
|
|
10
10
|
export const DEFAULT_REPOS_DIR = '..';
|
|
@@ -32,7 +32,7 @@ export interface RunPreflightChecksOptions {
|
|
|
32
32
|
* Performs comprehensive pre-flight validation:
|
|
33
33
|
* - Clean workspaces (100% clean required - no uncommitted changes)
|
|
34
34
|
* - Correct branch (usually main)
|
|
35
|
-
* - Changesets present (unless skip_changesets
|
|
35
|
+
* - Changesets present (unless `skip_changesets`=true)
|
|
36
36
|
* - Builds successful (fail-fast to prevent broken state)
|
|
37
37
|
* - Git remote reachability
|
|
38
38
|
* - NPM authentication with username
|
|
@@ -41,7 +41,7 @@ export interface RunPreflightChecksOptions {
|
|
|
41
41
|
* Build validation runs BEFORE any publishing to prevent the scenario where
|
|
42
42
|
* version is bumped but build fails, leaving repo in broken state.
|
|
43
43
|
*
|
|
44
|
-
* @returns result with ok
|
|
44
|
+
* @returns result with `ok`=false if any errors, plus warnings and detailed status
|
|
45
45
|
*/
|
|
46
46
|
export declare const run_preflight_checks: ({ repos, preflight_options, git_ops, npm_ops, build_ops, changeset_ops, }: RunPreflightChecksOptions) => Promise<PreflightResult>;
|
|
47
47
|
//# sourceMappingURL=preflight_checks.d.ts.map
|
package/dist/preflight_checks.js
CHANGED
|
@@ -7,7 +7,7 @@ import { default_git_operations, default_npm_operations, default_build_operation
|
|
|
7
7
|
* Performs comprehensive pre-flight validation:
|
|
8
8
|
* - Clean workspaces (100% clean required - no uncommitted changes)
|
|
9
9
|
* - Correct branch (usually main)
|
|
10
|
-
* - Changesets present (unless skip_changesets
|
|
10
|
+
* - Changesets present (unless `skip_changesets`=true)
|
|
11
11
|
* - Builds successful (fail-fast to prevent broken state)
|
|
12
12
|
* - Git remote reachability
|
|
13
13
|
* - NPM authentication with username
|
|
@@ -16,7 +16,7 @@ import { default_git_operations, default_npm_operations, default_build_operation
|
|
|
16
16
|
* Build validation runs BEFORE any publishing to prevent the scenario where
|
|
17
17
|
* version is bumped but build fails, leaving repo in broken state.
|
|
18
18
|
*
|
|
19
|
-
* @returns result with ok
|
|
19
|
+
* @returns result with `ok`=false if any errors, plus warnings and detailed status
|
|
20
20
|
*/
|
|
21
21
|
export const run_preflight_checks = async ({ repos, preflight_options = {}, git_ops = default_git_operations, npm_ops = default_npm_operations, build_ops = default_build_operations, changeset_ops = default_changeset_operations, }) => {
|
|
22
22
|
const { skip_changesets = false, skip_build_validation = false, required_branch = 'main', check_remote = true, estimate_time = true, log, } = preflight_options;
|
|
@@ -30,14 +30,14 @@ export const run_preflight_checks = async ({ repos, preflight_options = {}, git_
|
|
|
30
30
|
// 1. Check clean workspaces - must be 100% clean before publishing
|
|
31
31
|
log?.info(' Checking workspace cleanliness...');
|
|
32
32
|
for (const repo of repos) {
|
|
33
|
-
const clean_result = await git_ops.check_clean_workspace({ cwd: repo.repo_dir });
|
|
33
|
+
const clean_result = await git_ops.check_clean_workspace({ cwd: repo.repo_dir });
|
|
34
34
|
if (!clean_result.ok) {
|
|
35
35
|
errors.push(`${repo.library.name} failed workspace check: ${clean_result.message}`);
|
|
36
36
|
continue;
|
|
37
37
|
}
|
|
38
38
|
if (!clean_result.value) {
|
|
39
39
|
// Get list of changed files for better error message
|
|
40
|
-
const files_result = await git_ops.
|
|
40
|
+
const files_result = await git_ops.list_uncommitted_files({ cwd: repo.repo_dir });
|
|
41
41
|
if (files_result.ok) {
|
|
42
42
|
// No filtering - workspace must be 100% clean
|
|
43
43
|
const unexpected_files = files_result.value;
|
|
@@ -53,7 +53,7 @@ export const run_preflight_checks = async ({ repos, preflight_options = {}, git_
|
|
|
53
53
|
// 2. Check correct branch
|
|
54
54
|
log?.info(` Checking branches (expecting ${required_branch})...`);
|
|
55
55
|
for (const repo of repos) {
|
|
56
|
-
const branch_result = await git_ops.current_branch_name({ cwd: repo.repo_dir });
|
|
56
|
+
const branch_result = await git_ops.current_branch_name({ cwd: repo.repo_dir });
|
|
57
57
|
if (!branch_result.ok) {
|
|
58
58
|
errors.push(`${repo.library.name} failed branch check: ${branch_result.message}`);
|
|
59
59
|
continue;
|
|
@@ -66,7 +66,7 @@ export const run_preflight_checks = async ({ repos, preflight_options = {}, git_
|
|
|
66
66
|
if (!skip_changesets) {
|
|
67
67
|
log?.info(' Checking for changesets...');
|
|
68
68
|
for (const repo of repos) {
|
|
69
|
-
const has_result = await changeset_ops.has_changesets({ repo });
|
|
69
|
+
const has_result = await changeset_ops.has_changesets({ repo });
|
|
70
70
|
if (!has_result.ok) {
|
|
71
71
|
errors.push(`${repo.library.name} failed changeset check: ${has_result.message}`);
|
|
72
72
|
continue;
|
|
@@ -90,7 +90,7 @@ export const run_preflight_checks = async ({ repos, preflight_options = {}, git_
|
|
|
90
90
|
for (let i = 0; i < repos_to_build.length; i++) {
|
|
91
91
|
const repo = repos_to_build[i];
|
|
92
92
|
log?.info(st('dim', ` [${i + 1}/${repos_to_build.length}] Building ${repo.library.name}...`));
|
|
93
|
-
const build_result = await build_ops.build_package({ repo, log });
|
|
93
|
+
const build_result = await build_ops.build_package({ repo, log });
|
|
94
94
|
if (!build_result.ok) {
|
|
95
95
|
errors.push(`${repo.library.name} failed to build: ${build_result.output || build_result.message || 'unknown error'}`);
|
|
96
96
|
}
|
package/dist/publishing_plan.js
CHANGED
|
@@ -71,14 +71,14 @@ export const generate_publishing_plan = async (repos, options = {}) => {
|
|
|
71
71
|
if (!repo)
|
|
72
72
|
continue;
|
|
73
73
|
// Check for changesets
|
|
74
|
-
const has_result = await ops.has_changesets({ repo });
|
|
74
|
+
const has_result = await ops.has_changesets({ repo });
|
|
75
75
|
if (!has_result.ok) {
|
|
76
76
|
errors.push(`Failed to check changesets for ${pkg_name}: ${has_result.message}`);
|
|
77
77
|
continue;
|
|
78
78
|
}
|
|
79
79
|
if (has_result.value) {
|
|
80
80
|
// Predict version from changesets
|
|
81
|
-
const prediction = await ops.predict_next_version({ repo, log });
|
|
81
|
+
const prediction = await ops.predict_next_version({ repo, log });
|
|
82
82
|
if (!prediction) {
|
|
83
83
|
// No changesets found - this shouldn't happen since has_changesets returned true
|
|
84
84
|
continue;
|
|
@@ -89,7 +89,7 @@ export const generate_publishing_plan = async (repos, options = {}) => {
|
|
|
89
89
|
}
|
|
90
90
|
// Capture changeset details for verbose output
|
|
91
91
|
if (verbose) {
|
|
92
|
-
const changesets_result = await ops.read_changesets({ repo, log });
|
|
92
|
+
const changesets_result = await ops.read_changesets({ repo, log });
|
|
93
93
|
if (changesets_result.ok) {
|
|
94
94
|
const files = changesets_result.value
|
|
95
95
|
.filter((cs) => cs.packages.some((p) => p.name === pkg_name))
|
|
@@ -272,7 +272,7 @@ export const generate_publishing_plan = async (repos, options = {}) => {
|
|
|
272
272
|
for (const repo of repos) {
|
|
273
273
|
const has_version_change = version_changes.some((vc) => vc.package_name === repo.library.name);
|
|
274
274
|
if (!has_version_change) {
|
|
275
|
-
const has_result = await ops.has_changesets({ repo });
|
|
275
|
+
const has_result = await ops.has_changesets({ repo });
|
|
276
276
|
if (has_result.ok && !has_result.value) {
|
|
277
277
|
info.push(repo.library.name);
|
|
278
278
|
}
|
package/dist/repo.svelte.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import type { LibraryJson } from '@fuzdev/fuz_util/library_json.js';
|
|
1
|
+
import type { LibraryJson, SourceJson } from '@fuzdev/fuz_util/library_json.js';
|
|
2
2
|
import type { PackageJson } from '@fuzdev/fuz_util/package_json.js';
|
|
3
|
-
import type { SourceJson } from '@fuzdev/fuz_util/source_json.js';
|
|
4
3
|
import type { Url } from '@fuzdev/fuz_util/url.js';
|
|
5
4
|
import { Library } from '@fuzdev/fuz_ui/library.svelte.js';
|
|
6
5
|
import type { Module } from '@fuzdev/fuz_ui/module.svelte.js';
|
|
7
6
|
import { GithubCheckRunsItem, type GithubPullRequest } from './github.js';
|
|
8
7
|
/**
|
|
9
|
-
* Serialized repo data as stored in repos.ts (JSON).
|
|
8
|
+
* Serialized repo data as stored in `repos.ts` (JSON).
|
|
10
9
|
*/
|
|
11
10
|
export interface RepoJson {
|
|
12
11
|
library_json: LibraryJson;
|
|
@@ -14,9 +13,9 @@ export interface RepoJson {
|
|
|
14
13
|
pull_requests: Array<GithubPullRequest> | null;
|
|
15
14
|
}
|
|
16
15
|
/**
|
|
17
|
-
* Runtime repo with Library composition for package metadata.
|
|
16
|
+
* Runtime repo with `Library` composition for package metadata.
|
|
18
17
|
*
|
|
19
|
-
* Wraps a Library instance and adds GitHub-specific data (CI status, PRs).
|
|
18
|
+
* Wraps a `Library` instance and adds GitHub-specific data (CI status, PRs).
|
|
20
19
|
* Convenience getters delegate to `this.library.*` for common properties.
|
|
21
20
|
*/
|
|
22
21
|
export declare class Repo {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo.svelte.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/repo.svelte.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,k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AAI,GAAG,GAAG,IAAI,CAE9B;IACD,IAAI,YAAY,IAAI,WAAW,CAE9B;IACD,IAAI,WAAW,IAAI,UAAU,CAE5B;IACD,IAAI,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC,CAE3B;IACD,IAAI,OAAO,IAAI,MAAM,GAAG,IAAI,CAE3B;gBAEW,SAAS,EAAE,QAAQ;CAK/B;AAED,MAAM,WAAW,KAAK;IACrB,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;CACnB;AAED,eAAO,MAAM,aAAa;;;;CAA0B,CAAC;AAErD,eAAO,MAAM,WAAW,GAAI,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,cAAc,MAAM,KAAG,KAMtE,CAAC"}
|
package/dist/repo.svelte.js
CHANGED
|
@@ -2,9 +2,9 @@ import { create_context } from '@fuzdev/fuz_ui/context_helpers.js';
|
|
|
2
2
|
import { Library } from '@fuzdev/fuz_ui/library.svelte.js';
|
|
3
3
|
import { GithubCheckRunsItem } from './github.js';
|
|
4
4
|
/**
|
|
5
|
-
* Runtime repo with Library composition for package metadata.
|
|
5
|
+
* Runtime repo with `Library` composition for package metadata.
|
|
6
6
|
*
|
|
7
|
-
* Wraps a Library instance and adds GitHub-specific data (CI status, PRs).
|
|
7
|
+
* Wraps a `Library` instance and adds GitHub-specific data (CI status, PRs).
|
|
8
8
|
* Convenience getters delegate to `this.library.*` for common properties.
|
|
9
9
|
*/
|
|
10
10
|
export class Repo {
|
package/dist/repo_ops.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - Walking files in repos with sensible exclusions
|
|
7
7
|
* - Common exclusion patterns for node/svelte projects
|
|
8
8
|
*
|
|
9
|
-
* For full git sync/clone functionality, use `get_gitops_ready()` from gitops_task_helpers
|
|
9
|
+
* For full git sync/clone functionality, use `get_gitops_ready()` from `gitops_task_helpers`.
|
|
10
10
|
*
|
|
11
11
|
* @module
|
|
12
12
|
*/
|
|
@@ -35,8 +35,8 @@ export interface RepoPath {
|
|
|
35
35
|
* Get repo paths from gitops config without full git sync.
|
|
36
36
|
* Lighter weight than `get_gitops_ready()` - just resolves paths.
|
|
37
37
|
*
|
|
38
|
-
* @param config_path
|
|
39
|
-
* @returns
|
|
38
|
+
* @param config_path - path to `gitops.config.ts` (defaults to `./gitops.config.ts`)
|
|
39
|
+
* @returns array of repo info with name, path, and url
|
|
40
40
|
*/
|
|
41
41
|
export declare const get_repo_paths: (config_path?: string) => Promise<Array<RepoPath>>;
|
|
42
42
|
/**
|
|
@@ -47,12 +47,12 @@ export declare const should_exclude_path: (file_path: string, options?: WalkOpti
|
|
|
47
47
|
* Walk files in a directory, respecting common exclusions.
|
|
48
48
|
* Yields absolute paths to files (and optionally directories).
|
|
49
49
|
*
|
|
50
|
-
* @param dir
|
|
51
|
-
* @param options
|
|
50
|
+
* @param dir - directory to walk
|
|
51
|
+
* @param options - walk options for exclusions and filtering
|
|
52
52
|
*/
|
|
53
53
|
export declare function walk_repo_files(dir: string, options?: WalkOptions): AsyncGenerator<string, void, undefined>;
|
|
54
54
|
/**
|
|
55
|
-
* Collect all files from walk_repo_files into an array.
|
|
55
|
+
* Collect all files from `walk_repo_files` into an array.
|
|
56
56
|
* Convenience function for when you need all paths upfront.
|
|
57
57
|
*/
|
|
58
58
|
export declare const collect_repo_files: (dir: string, options?: WalkOptions) => Promise<Array<string>>;
|
package/dist/repo_ops.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - Walking files in repos with sensible exclusions
|
|
7
7
|
* - Common exclusion patterns for node/svelte projects
|
|
8
8
|
*
|
|
9
|
-
* For full git sync/clone functionality, use `get_gitops_ready()` from gitops_task_helpers
|
|
9
|
+
* For full git sync/clone functionality, use `get_gitops_ready()` from `gitops_task_helpers`.
|
|
10
10
|
*
|
|
11
11
|
* @module
|
|
12
12
|
*/
|
|
@@ -59,8 +59,8 @@ export const DEFAULT_EXCLUDE_EXTENSIONS = [
|
|
|
59
59
|
* Get repo paths from gitops config without full git sync.
|
|
60
60
|
* Lighter weight than `get_gitops_ready()` - just resolves paths.
|
|
61
61
|
*
|
|
62
|
-
* @param config_path
|
|
63
|
-
* @returns
|
|
62
|
+
* @param config_path - path to `gitops.config.ts` (defaults to `./gitops.config.ts`)
|
|
63
|
+
* @returns array of repo info with name, path, and url
|
|
64
64
|
*/
|
|
65
65
|
export const get_repo_paths = async (config_path) => {
|
|
66
66
|
const resolved_config_path = resolve(config_path ?? GITOPS_CONFIG_PATH_DEFAULT);
|
|
@@ -115,8 +115,8 @@ export const should_exclude_path = (file_path, options) => {
|
|
|
115
115
|
* Walk files in a directory, respecting common exclusions.
|
|
116
116
|
* Yields absolute paths to files (and optionally directories).
|
|
117
117
|
*
|
|
118
|
-
* @param dir
|
|
119
|
-
* @param options
|
|
118
|
+
* @param dir - directory to walk
|
|
119
|
+
* @param options - walk options for exclusions and filtering
|
|
120
120
|
*/
|
|
121
121
|
export async function* walk_repo_files(dir, options) {
|
|
122
122
|
const max_file_size = options?.max_file_size ?? 10 * 1024 * 1024;
|
|
@@ -144,7 +144,7 @@ export async function* walk_repo_files(dir, options) {
|
|
|
144
144
|
else if (entry.isFile()) {
|
|
145
145
|
// Check file size
|
|
146
146
|
try {
|
|
147
|
-
const file_stat = await stat(full_path);
|
|
147
|
+
const file_stat = await stat(full_path);
|
|
148
148
|
if (file_stat.size <= max_file_size) {
|
|
149
149
|
yield full_path;
|
|
150
150
|
}
|
|
@@ -158,7 +158,7 @@ export async function* walk_repo_files(dir, options) {
|
|
|
158
158
|
yield* walk(dir);
|
|
159
159
|
}
|
|
160
160
|
/**
|
|
161
|
-
* Collect all files from walk_repo_files into an array.
|
|
161
|
+
* Collect all files from `walk_repo_files` into an array.
|
|
162
162
|
* Convenience function for when you need all paths upfront.
|
|
163
163
|
*/
|
|
164
164
|
export const collect_repo_files = async (dir, options) => {
|
package/dist/version_utils.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export declare const get_version_prefix: (version: string) => string;
|
|
|
12
12
|
* Normalizes version string for comparison.
|
|
13
13
|
*
|
|
14
14
|
* Strips prefixes (^, ~, >=) to get bare version number.
|
|
15
|
-
* Handles wildcards as-is. Used by needs_update to compare versions.
|
|
15
|
+
* Handles wildcards as-is. Used by `needs_update` to compare versions.
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
18
|
* ```ts
|
|
@@ -39,7 +39,7 @@ export declare const needs_update: (current: string, new_version: string) => boo
|
|
|
39
39
|
*
|
|
40
40
|
* This preserves user intent while handling wildcard replacements sensibly.
|
|
41
41
|
*
|
|
42
|
-
* @param default_strategy prefix to use when no existing prefix found
|
|
42
|
+
* @param default_strategy - prefix to use when no existing prefix found
|
|
43
43
|
*/
|
|
44
44
|
export declare const get_update_prefix: (current_version: string, default_strategy?: "^" | "~" | "" | ">=") => string;
|
|
45
45
|
/**
|
package/dist/version_utils.js
CHANGED
|
@@ -19,7 +19,7 @@ export const get_version_prefix = (version) => {
|
|
|
19
19
|
* Normalizes version string for comparison.
|
|
20
20
|
*
|
|
21
21
|
* Strips prefixes (^, ~, >=) to get bare version number.
|
|
22
|
-
* Handles wildcards as-is. Used by needs_update to compare versions.
|
|
22
|
+
* Handles wildcards as-is. Used by `needs_update` to compare versions.
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* ```ts
|
|
@@ -64,7 +64,7 @@ export const needs_update = (current, new_version) => {
|
|
|
64
64
|
*
|
|
65
65
|
* This preserves user intent while handling wildcard replacements sensibly.
|
|
66
66
|
*
|
|
67
|
-
* @param default_strategy prefix to use when no existing prefix found
|
|
67
|
+
* @param default_strategy - prefix to use when no existing prefix found
|
|
68
68
|
*/
|
|
69
69
|
export const get_update_prefix = (current_version, default_strategy = '^') => {
|
|
70
70
|
// Use caret for wildcard replacements
|