@fuzdev/fuz_gitops 0.69.0 → 0.70.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 +3 -3
- package/dist/ReposTree.svelte +1 -1
- package/dist/github.js +0 -1
- package/dist/gitops_analyze.task.d.ts +1 -1
- package/dist/gitops_plan.task.d.ts +1 -1
- package/dist/gitops_publish.task.d.ts +1 -1
- package/dist/gitops_run.task.d.ts +1 -1
- package/dist/gitops_run.task.js +1 -1
- package/dist/gitops_sync.task.d.ts.map +1 -1
- package/dist/gitops_sync.task.js +4 -1
- package/dist/local_repo.d.ts +2 -2
- package/dist/local_repo.d.ts.map +1 -1
- package/dist/local_repo.js +12 -19
- package/dist/repo.svelte.d.ts +1 -2
- package/dist/repo.svelte.d.ts.map +1 -1
- package/package.json +16 -14
- package/src/lib/github.ts +0 -1
- package/src/lib/gitops_run.task.ts +1 -1
- package/src/lib/gitops_sync.task.ts +4 -1
- package/src/lib/local_repo.ts +12 -21
- package/src/lib/repo.svelte.ts +1 -2
package/README.md
CHANGED
|
@@ -113,10 +113,10 @@ gro gitops_publish --wetrun --no-plan # skip plan confirmation
|
|
|
113
113
|
|
|
114
114
|
**Documentation:**
|
|
115
115
|
|
|
116
|
-
-
|
|
117
|
-
-
|
|
116
|
+
- ./CLAUDE.md - Architecture, commands, testing patterns
|
|
117
|
+
- ./docs/publishing.md - Publishing workflows, changeset
|
|
118
118
|
semantics, examples
|
|
119
|
-
-
|
|
119
|
+
- ./docs/troubleshooting.md - Common errors and
|
|
120
120
|
debugging tips
|
|
121
121
|
|
|
122
122
|
Getting started as a dev? Start with [Gro](https://github.com/grogarden/gro)
|
package/dist/ReposTree.svelte
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
{:else}
|
|
43
43
|
<div class="width_atmost_sm">
|
|
44
44
|
<p>
|
|
45
|
-
failed to
|
|
45
|
+
failed to load library metadata for
|
|
46
46
|
<!-- eslint-disable-next-line svelte/no-navigation-without-resolve --><a
|
|
47
47
|
href={repo.repo_url}>{format_url(repo.repo_url)}</a
|
|
48
48
|
>
|
package/dist/github.js
CHANGED
|
@@ -82,7 +82,6 @@ const reduce_check_runs = (check_runs) => {
|
|
|
82
82
|
let status;
|
|
83
83
|
let conclusion;
|
|
84
84
|
for (const check_run of check_runs) {
|
|
85
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
86
85
|
if (!status || status === 'completed') {
|
|
87
86
|
status = check_run.status;
|
|
88
87
|
}
|
|
@@ -5,8 +5,8 @@ export declare const Args: z.ZodObject<{
|
|
|
5
5
|
config: z.ZodDefault<z.ZodString>;
|
|
6
6
|
dir: z.ZodOptional<z.ZodString>;
|
|
7
7
|
format: z.ZodDefault<z.ZodEnum<{
|
|
8
|
-
json: "json";
|
|
9
8
|
stdout: "stdout";
|
|
9
|
+
json: "json";
|
|
10
10
|
markdown: "markdown";
|
|
11
11
|
}>>;
|
|
12
12
|
outfile: z.ZodOptional<z.ZodString>;
|
|
@@ -5,8 +5,8 @@ export declare const Args: z.ZodObject<{
|
|
|
5
5
|
config: z.ZodDefault<z.ZodString>;
|
|
6
6
|
dir: z.ZodOptional<z.ZodString>;
|
|
7
7
|
format: z.ZodDefault<z.ZodEnum<{
|
|
8
|
-
json: "json";
|
|
9
8
|
stdout: "stdout";
|
|
9
|
+
json: "json";
|
|
10
10
|
markdown: "markdown";
|
|
11
11
|
}>>;
|
|
12
12
|
outfile: z.ZodOptional<z.ZodString>;
|
|
@@ -5,8 +5,8 @@ export declare const Args: z.ZodObject<{
|
|
|
5
5
|
config: z.ZodDefault<z.ZodString>;
|
|
6
6
|
concurrency: z.ZodDefault<z.ZodNumber>;
|
|
7
7
|
format: z.ZodDefault<z.ZodEnum<{
|
|
8
|
-
json: "json";
|
|
9
8
|
text: "text";
|
|
9
|
+
json: "json";
|
|
10
10
|
}>>;
|
|
11
11
|
}, z.core.$strict>;
|
|
12
12
|
export type Args = z.infer<typeof Args>;
|
package/dist/gitops_run.task.js
CHANGED
|
@@ -25,7 +25,7 @@ export const task = {
|
|
|
25
25
|
summary: 'run a shell command across all repos in parallel',
|
|
26
26
|
run: async ({ args, log }) => {
|
|
27
27
|
const { command, config, concurrency, format } = args;
|
|
28
|
-
// Get repo paths (lightweight, no library
|
|
28
|
+
// Get repo paths (lightweight, no library-metadata loading needed)
|
|
29
29
|
const config_path = resolve(config);
|
|
30
30
|
const repos = await get_repo_paths(config_path);
|
|
31
31
|
if (repos.length === 0) {
|
|
@@ -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,EAAY,KAAK,IAAI,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"gitops_sync.task.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/gitops_sync.task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,IAAI,EAAC,MAAM,aAAa,CAAC;AACjD,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAiBtB,cAAc;AACd,eAAO,MAAM,IAAI;;;;;;kBAkBf,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,IAAI,EAAE,IAAI,CAAC,IAAI,CAqF3B,CAAC"}
|
package/dist/gitops_sync.task.js
CHANGED
|
@@ -7,6 +7,7 @@ import { print_path } from '@fuzdev/gro/paths.js';
|
|
|
7
7
|
import { load_from_env } from '@fuzdev/gro/env.js';
|
|
8
8
|
import { package_json_load } from '@fuzdev/gro/package_json.js';
|
|
9
9
|
import { existsSync } from 'node:fs';
|
|
10
|
+
import { compactReplacer } from 'svelte-docinfo';
|
|
10
11
|
import { fetch_repo_data } from './fetch_repo_data.js';
|
|
11
12
|
import { create_fs_fetch_value_cache } from './fs_fetch_value_cache.js';
|
|
12
13
|
import { get_gitops_ready } from './gitops_task_helpers.js';
|
|
@@ -65,7 +66,9 @@ export const task = {
|
|
|
65
66
|
: '@fuzdev/fuz_gitops/repo.svelte.js';
|
|
66
67
|
log.info(`generating ${outfile_json} and ${outfile_ts}`);
|
|
67
68
|
// Generate repos.json with the raw data
|
|
68
|
-
const json_contents = await format_file(JSON.stringify(repos_json), {
|
|
69
|
+
const json_contents = await format_file(JSON.stringify(repos_json, compactReplacer), {
|
|
70
|
+
filepath: outfile_json,
|
|
71
|
+
});
|
|
69
72
|
const existing_json = existsSync(outfile_json) ? await readFile(outfile_json, 'utf8') : '';
|
|
70
73
|
const json_changed = existing_json !== json_contents;
|
|
71
74
|
if (json_changed) {
|
package/dist/local_repo.d.ts
CHANGED
|
@@ -49,13 +49,13 @@ export interface LocalRepoMissing {
|
|
|
49
49
|
* 3. Pulls latest changes from remote (skipped for local-only repos)
|
|
50
50
|
* 4. Validates workspace is clean after pull
|
|
51
51
|
* 5. Auto-installs dependencies if `package.json` changed
|
|
52
|
-
* 6.
|
|
52
|
+
* 6. Loads `library_json` via `library_load_from_repo` (svelte-docinfo analysis)
|
|
53
53
|
* 7. Creates `Library` and extracts dependency maps
|
|
54
54
|
*
|
|
55
55
|
* This ensures repos are always in sync with their configured branch
|
|
56
56
|
* before being used by gitops commands.
|
|
57
57
|
*
|
|
58
|
-
* @throws {TaskError} if workspace dirty, branch switch fails, install fails, or
|
|
58
|
+
* @throws {TaskError} if workspace dirty, branch switch fails, install fails, or analysis fails
|
|
59
59
|
*/
|
|
60
60
|
export declare const local_repo_load: ({ local_repo_path, log: _log, git_ops, npm_ops, }: {
|
|
61
61
|
local_repo_path: LocalRepoPath;
|
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.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.js
CHANGED
|
@@ -3,6 +3,7 @@ import { Library } from '@fuzdev/fuz_ui/library.svelte.js';
|
|
|
3
3
|
import { existsSync } from 'node:fs';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
import { TaskError } from '@fuzdev/gro';
|
|
6
|
+
import { library_load_from_repo } from '@fuzdev/gro/library_load.js';
|
|
6
7
|
import { spawn_out } from '@fuzdev/fuz_util/process.js';
|
|
7
8
|
import { map_concurrent_settled } from '@fuzdev/fuz_util/async.js';
|
|
8
9
|
import { default_git_operations, default_npm_operations } from './operations_defaults.js';
|
|
@@ -16,13 +17,13 @@ import { GITOPS_CONCURRENCY_DEFAULT } from './gitops_constants.js';
|
|
|
16
17
|
* 3. Pulls latest changes from remote (skipped for local-only repos)
|
|
17
18
|
* 4. Validates workspace is clean after pull
|
|
18
19
|
* 5. Auto-installs dependencies if `package.json` changed
|
|
19
|
-
* 6.
|
|
20
|
+
* 6. Loads `library_json` via `library_load_from_repo` (svelte-docinfo analysis)
|
|
20
21
|
* 7. Creates `Library` and extracts dependency maps
|
|
21
22
|
*
|
|
22
23
|
* This ensures repos are always in sync with their configured branch
|
|
23
24
|
* before being used by gitops commands.
|
|
24
25
|
*
|
|
25
|
-
* @throws {TaskError} if workspace dirty, branch switch fails, install fails, or
|
|
26
|
+
* @throws {TaskError} if workspace dirty, branch switch fails, install fails, or analysis fails
|
|
26
27
|
*/
|
|
27
28
|
export const local_repo_load = async ({ local_repo_path, log: _log, git_ops = default_git_operations, npm_ops = default_npm_operations, }) => {
|
|
28
29
|
const { repo_config, repo_dir, repo_name, repo_git_ssh_url } = local_repo_path;
|
|
@@ -96,23 +97,15 @@ export const local_repo_load = async ({ local_repo_path, log: _log, git_ops = de
|
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
|
-
//
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
const library_module = await import(library_path);
|
|
110
|
-
const { library_json } = library_module;
|
|
111
|
-
if (!library_json) {
|
|
112
|
-
throw new TaskError(`Repo "${repo_name}" has invalid src/routes/library.ts - missing library_json export\n` +
|
|
113
|
-
`The file must export a library_json object. To fix:\n` +
|
|
114
|
-
` 1. Ensure src/routes/library.gen.ts uses library_gen from @fuzdev/fuz_ui\n` +
|
|
115
|
-
` 2. Run: cd ${repo_dir} && gro gen`);
|
|
100
|
+
// Load library metadata via svelte-docinfo analysis (cached under `.gro/library.json`).
|
|
101
|
+
let library_json;
|
|
102
|
+
try {
|
|
103
|
+
library_json = await library_load_from_repo(repo_dir, { log: _log });
|
|
104
|
+
}
|
|
105
|
+
catch (err) {
|
|
106
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
107
|
+
_log?.warn(`Failed to load library metadata for repo "${repo_name}" in ${repo_dir}: ${message}`);
|
|
108
|
+
throw new TaskError(`Failed to load library metadata for repo "${repo_name}" in ${repo_dir}: ${message}`);
|
|
116
109
|
}
|
|
117
110
|
const library = new Library(library_json);
|
|
118
111
|
const local_repo = {
|
package/dist/repo.svelte.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
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';
|
|
@@ -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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B;IACD,IAAI,aAAa,IAAI,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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fuzdev/fuz_gitops",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.70.1",
|
|
4
4
|
"description": "a tool for managing many repos",
|
|
5
5
|
"glyph": "🪄",
|
|
6
6
|
"logo": "logo.svg",
|
|
@@ -26,29 +26,30 @@
|
|
|
26
26
|
},
|
|
27
27
|
"type": "module",
|
|
28
28
|
"engines": {
|
|
29
|
-
"node": ">=
|
|
29
|
+
"node": ">=24.14"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@fuzdev/fuz_css": ">=0.
|
|
33
|
-
"@fuzdev/fuz_ui": ">=0.
|
|
34
|
-
"@fuzdev/fuz_util": ">=0.
|
|
35
|
-
"@fuzdev/gro": ">=0.
|
|
32
|
+
"@fuzdev/fuz_css": ">=0.61.0",
|
|
33
|
+
"@fuzdev/fuz_ui": ">=0.196.0",
|
|
34
|
+
"@fuzdev/fuz_util": ">=0.63.0",
|
|
35
|
+
"@fuzdev/gro": ">=0.200.0",
|
|
36
36
|
"@sveltejs/kit": "^2",
|
|
37
37
|
"svelte": "^5",
|
|
38
38
|
"zod": "^4.3.6"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@changesets/changelog-git": "^0.2.1",
|
|
42
|
+
"@fuzdev/blake3_wasm": "^0.1.1",
|
|
42
43
|
"@fuzdev/fuz_code": "^0.45.1",
|
|
43
|
-
"@fuzdev/fuz_css": "^0.
|
|
44
|
-
"@fuzdev/fuz_ui": "^0.
|
|
45
|
-
"@fuzdev/fuz_util": "^0.
|
|
46
|
-
"@fuzdev/gro": "^0.
|
|
44
|
+
"@fuzdev/fuz_css": "^0.61.0",
|
|
45
|
+
"@fuzdev/fuz_ui": "^0.196.0",
|
|
46
|
+
"@fuzdev/fuz_util": "^0.63.0",
|
|
47
|
+
"@fuzdev/gro": "^0.200.0",
|
|
47
48
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
48
|
-
"@ryanatkn/eslint-config": "^0.
|
|
49
|
+
"@ryanatkn/eslint-config": "^0.12.1",
|
|
49
50
|
"@sveltejs/acorn-typescript": "^1.0.9",
|
|
50
51
|
"@sveltejs/adapter-static": "^3.0.10",
|
|
51
|
-
"@sveltejs/kit": "^2.
|
|
52
|
+
"@sveltejs/kit": "^2.61.1",
|
|
52
53
|
"@sveltejs/package": "^2.5.7",
|
|
53
54
|
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
|
54
55
|
"@types/estree": "^1.0.8",
|
|
@@ -60,8 +61,9 @@
|
|
|
60
61
|
"magic-string": "^0.30.21",
|
|
61
62
|
"prettier": "^3.7.4",
|
|
62
63
|
"prettier-plugin-svelte": "^3.5.1",
|
|
63
|
-
"svelte": "^5.
|
|
64
|
-
"svelte-check": "^4.4.
|
|
64
|
+
"svelte": "^5.56.0",
|
|
65
|
+
"svelte-check": "^4.4.6",
|
|
66
|
+
"svelte-docinfo": "^0.2.0",
|
|
65
67
|
"svelte2tsx": "^0.7.52",
|
|
66
68
|
"tslib": "^2.8.1",
|
|
67
69
|
"typescript": "^5.9.3",
|
package/src/lib/github.ts
CHANGED
|
@@ -116,7 +116,6 @@ const reduce_check_runs = (check_runs: Array<GithubCheckRunsItem>): GithubCheckR
|
|
|
116
116
|
let status!: GithubCheckRunsItem['status'];
|
|
117
117
|
let conclusion!: GithubCheckRunsItem['conclusion'];
|
|
118
118
|
for (const check_run of check_runs) {
|
|
119
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
120
119
|
if (!status || status === 'completed') {
|
|
121
120
|
status = check_run.status;
|
|
122
121
|
}
|
|
@@ -41,7 +41,7 @@ export const task: Task<Args> = {
|
|
|
41
41
|
run: async ({args, log}) => {
|
|
42
42
|
const {command, config, concurrency, format} = args;
|
|
43
43
|
|
|
44
|
-
// Get repo paths (lightweight, no library
|
|
44
|
+
// Get repo paths (lightweight, no library-metadata loading needed)
|
|
45
45
|
const config_path = resolve(config);
|
|
46
46
|
const repos = await get_repo_paths(config_path);
|
|
47
47
|
|
|
@@ -7,6 +7,7 @@ import {print_path} from '@fuzdev/gro/paths.js';
|
|
|
7
7
|
import {load_from_env} from '@fuzdev/gro/env.js';
|
|
8
8
|
import {package_json_load} from '@fuzdev/gro/package_json.js';
|
|
9
9
|
import {existsSync} from 'node:fs';
|
|
10
|
+
import {compactReplacer} from 'svelte-docinfo';
|
|
10
11
|
|
|
11
12
|
import {fetch_repo_data} from './fetch_repo_data.js';
|
|
12
13
|
import {create_fs_fetch_value_cache} from './fs_fetch_value_cache.js';
|
|
@@ -80,7 +81,9 @@ export const task: Task<Args> = {
|
|
|
80
81
|
log.info(`generating ${outfile_json} and ${outfile_ts}`);
|
|
81
82
|
|
|
82
83
|
// Generate repos.json with the raw data
|
|
83
|
-
const json_contents = await format_file(JSON.stringify(repos_json), {
|
|
84
|
+
const json_contents = await format_file(JSON.stringify(repos_json, compactReplacer), {
|
|
85
|
+
filepath: outfile_json,
|
|
86
|
+
});
|
|
84
87
|
const existing_json = existsSync(outfile_json) ? await readFile(outfile_json, 'utf8') : '';
|
|
85
88
|
const json_changed = existing_json !== json_contents;
|
|
86
89
|
if (json_changed) {
|
package/src/lib/local_repo.ts
CHANGED
|
@@ -4,6 +4,7 @@ import {Library} from '@fuzdev/fuz_ui/library.svelte.js';
|
|
|
4
4
|
import {existsSync} from 'node:fs';
|
|
5
5
|
import {join} from 'node:path';
|
|
6
6
|
import {TaskError} from '@fuzdev/gro';
|
|
7
|
+
import {library_load_from_repo} from '@fuzdev/gro/library_load.js';
|
|
7
8
|
import type {Logger} from '@fuzdev/fuz_util/log.js';
|
|
8
9
|
import {spawn_out} from '@fuzdev/fuz_util/process.js';
|
|
9
10
|
import {map_concurrent_settled} from '@fuzdev/fuz_util/async.js';
|
|
@@ -62,13 +63,13 @@ export interface LocalRepoMissing {
|
|
|
62
63
|
* 3. Pulls latest changes from remote (skipped for local-only repos)
|
|
63
64
|
* 4. Validates workspace is clean after pull
|
|
64
65
|
* 5. Auto-installs dependencies if `package.json` changed
|
|
65
|
-
* 6.
|
|
66
|
+
* 6. Loads `library_json` via `library_load_from_repo` (svelte-docinfo analysis)
|
|
66
67
|
* 7. Creates `Library` and extracts dependency maps
|
|
67
68
|
*
|
|
68
69
|
* This ensures repos are always in sync with their configured branch
|
|
69
70
|
* before being used by gitops commands.
|
|
70
71
|
*
|
|
71
|
-
* @throws {TaskError} if workspace dirty, branch switch fails, install fails, or
|
|
72
|
+
* @throws {TaskError} if workspace dirty, branch switch fails, install fails, or analysis fails
|
|
72
73
|
*/
|
|
73
74
|
export const local_repo_load = async ({
|
|
74
75
|
local_repo_path,
|
|
@@ -179,27 +180,17 @@ export const local_repo_load = async ({
|
|
|
179
180
|
}
|
|
180
181
|
}
|
|
181
182
|
|
|
182
|
-
//
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
` export const gen = library_gen();\n` +
|
|
191
|
-
` 2. Run: cd ${repo_dir} && gro gen`,
|
|
183
|
+
// Load library metadata via svelte-docinfo analysis (cached under `.gro/library.json`).
|
|
184
|
+
let library_json: LibraryJson;
|
|
185
|
+
try {
|
|
186
|
+
library_json = await library_load_from_repo(repo_dir, {log: _log});
|
|
187
|
+
} catch (err) {
|
|
188
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
189
|
+
_log?.warn(
|
|
190
|
+
`Failed to load library metadata for repo "${repo_name}" in ${repo_dir}: ${message}`,
|
|
192
191
|
);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
const library_module = await import(library_path);
|
|
196
|
-
const {library_json} = library_module as {library_json: LibraryJson | undefined};
|
|
197
|
-
if (!library_json) {
|
|
198
192
|
throw new TaskError(
|
|
199
|
-
`
|
|
200
|
-
`The file must export a library_json object. To fix:\n` +
|
|
201
|
-
` 1. Ensure src/routes/library.gen.ts uses library_gen from @fuzdev/fuz_ui\n` +
|
|
202
|
-
` 2. Run: cd ${repo_dir} && gro gen`,
|
|
193
|
+
`Failed to load library metadata for repo "${repo_name}" in ${repo_dir}: ${message}`,
|
|
203
194
|
);
|
|
204
195
|
}
|
|
205
196
|
const library = new Library(library_json);
|
package/src/lib/repo.svelte.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {create_context} from '@fuzdev/fuz_ui/context_helpers.js';
|
|
2
|
-
import type {LibraryJson} from '@fuzdev/fuz_util/library_json.js';
|
|
2
|
+
import type {LibraryJson, SourceJson} from '@fuzdev/fuz_util/library_json.js';
|
|
3
3
|
import type {PackageJson} from '@fuzdev/fuz_util/package_json.js';
|
|
4
|
-
import type {SourceJson} from '@fuzdev/fuz_util/source_json.js';
|
|
5
4
|
import type {Url} from '@fuzdev/fuz_util/url.js';
|
|
6
5
|
import {Library} from '@fuzdev/fuz_ui/library.svelte.js';
|
|
7
6
|
import type {Module} from '@fuzdev/fuz_ui/module.svelte.js';
|