@grove-dev/cli 0.11.0 → 0.13.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/dist/index.js +21 -89
- package/dist/index.js.map +1 -1
- package/dist/migrate-cli.d.ts +25 -0
- package/dist/migrate-cli.d.ts.map +1 -0
- package/dist/migrate-cli.js +68 -0
- package/dist/migrate-cli.js.map +1 -0
- package/dist/package.json +1 -1
- package/dist/r/about.json +1 -1
- package/dist/r/browse.json +11 -5
- package/dist/r/collections.json +1 -1
- package/dist/r/contributors.json +1 -1
- package/dist/r/default.json +12 -6
- package/dist/r/home.json +1 -1
- package/dist/r/not-found.json +1 -1
- package/dist/r/project-card.json +1 -1
- package/dist/r/record.json +1 -1
- package/dist/r/registry.json +23 -13
- package/dist/r/shell.json +1 -1
- package/dist/r/submit.json +1 -1
- package/dist/r/taxonomy.json +1 -1
- package/dist/r/ui.json +2 -2
- package/dist/readme-cli.d.ts.map +1 -1
- package/dist/readme-cli.js +33 -19
- package/dist/readme-cli.js.map +1 -1
- package/dist/sync-github.d.ts +30 -0
- package/dist/sync-github.d.ts.map +1 -0
- package/dist/sync-github.js +127 -0
- package/dist/sync-github.js.map +1 -0
- package/dist/sync-summary.d.ts +42 -0
- package/dist/sync-summary.d.ts.map +1 -0
- package/dist/sync-summary.js +90 -0
- package/dist/sync-summary.js.map +1 -0
- package/package.json +2 -2
package/dist/r/ui.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"path": "default/components/ui/filter-drawer.astro",
|
|
27
|
-
"content": "---\n/**\n * FilterDrawer — mobile filter surface built on native `<dialog>`.\n *\n * `showModal()` gives focus trapping, Escape handling, and the\n * top-layer backdrop for free — no dependency, no hand-rolled trap.\n * On viewports ≥ md the trigger button hides and the slotted filter\n * controls render inline through the same slot used on desktop, so\n * there is exactly one copy of the filter markup.\n *\n * No-JS fallback: the slot content stays in normal flow (the dialog\n * only wraps it once the client script moves it), so filters remain\n * usable without JavaScript.\n */\nimport { buttonClass } from '../../lib/classnames.ts';\n\ninterface Props {\n /** Trigger button label. */\n label?: string;\n /** Count of active filters shown on the trigger. */\n activeCount?: number;\n /** URL that clears every filter — offered inside the sheet. */\n clearHref?: string;\n class?: string;\n}\n\nconst { label = 'Filters', activeCount = 0, clearHref, class: className = '' } = Astro.props;\n---\n\n<div class={`grove-filter-drawer ${className}`} data-grove-filter-drawer>\n <button\n type=\"button\"\n data-drawer-open\n class={buttonClass(\"secondary\", \"md\", \"w-full md:hidden\")}\n aria-haspopup=\"dialog\"\n >\n {label}\n {/* Always in the DOM (hidden at zero) so the client script can\n update it from the live URL state on this prerendered page. */}\n <span\n data-drawer-count\n class:list={[\n \"inline-flex min-w-5 items-center justify-center rounded-full bg-selected px-1.5 py-0.5 font-mono text-2xs leading-none text-selected-foreground\",\n activeCount === 0 && \"hidden\",\n ]}\n >\n {activeCount}\n </span>\n </button>\n\n {/* On mobile the client script moves this content into the dialog;\n on ≥ md it stays inline. Not hidden by CSS — without JS the\n filters must remain visible in flow on every viewport. */}\n <div data-drawer-content class=\"md:contents\">\n <slot />\n </div>\n\n <dialog\n data-drawer-dialog\n class=\"m-0 mt-auto w-full max-w-none rounded-t-[calc(var(--radius)+0.5rem)] border-0 bg-surface-overlay p-0 text-foreground backdrop:bg-black/40 md:hidden\"\n aria-label={label}\n >\n <div class=\"flex items-center justify-between gap-3 border-b border-border px-4 py-3\">\n <p class=\"m-0 text-sm font-semibold\">{label}</p>\n <div class=\"flex items-center gap-2\">\n {clearHref && (\n /* Clearing from inside the sheet is the only way out of a\n stack of filters on mobile — the chips row is behind it. */\n <a\n href={clearHref}\n data-drawer-clear\n class:list={[buttonClass(\"ghost\", \"sm\"), activeCount === 0 && \"hidden\"]}\n >\n Clear all\n </a>\n )}\n <button type=\"button\" data-drawer-close class={buttonClass(\"ghost\", \"sm\")}>\n
|
|
27
|
+
"content": "---\n/**\n * FilterDrawer — mobile filter surface built on native `<dialog>`.\n *\n * `showModal()` gives focus trapping, Escape handling, and the\n * top-layer backdrop for free — no dependency, no hand-rolled trap.\n * On viewports ≥ md the trigger button hides and the slotted filter\n * controls render inline through the same slot used on desktop, so\n * there is exactly one copy of the filter markup.\n *\n * No-JS fallback: the slot content stays in normal flow (the dialog\n * only wraps it once the client script moves it), so filters remain\n * usable without JavaScript.\n *\n * Filters inside the sheet apply live, so the page behind it is\n * already showing the real results. The sticky footer button\n * (\"Show 12 apps\") closes the sheet and moves focus to\n * `resultsTarget`. It is a way back to the results, not an apply\n * step. The page's controller keeps its label current: it sets the\n * text on `[data-drawer-results]`, and sets `aria-busy=\"true\"` while\n * the results are still loading.\n *\n * The sheet announces itself with a `grove:filter-surface` event on\n * the document when it opens and closes. The page uses this to group\n * the changes made in one sitting into a single history entry.\n */\nimport { buttonClass } from '../../lib/classnames.ts';\n\ninterface Props {\n /** Trigger button label. */\n label?: string;\n /** Count of active filters shown on the trigger. */\n activeCount?: number;\n /** URL that clears every filter — offered inside the sheet. */\n clearHref?: string;\n /** Footer button label before the page's controller updates it. */\n resultsLabel?: string;\n /**\n * Selector for the element that receives focus when the footer\n * button closes the sheet, usually the results heading. It needs\n * `tabindex=\"-1\"` if it is not focusable on its own.\n */\n resultsTarget?: string;\n class?: string;\n}\n\nconst { label = 'Filters', activeCount = 0, clearHref, class: className = '' } = Astro.props;\n---\n\n<div class={`grove-filter-drawer ${className}`} data-grove-filter-drawer data-results-target={Astro.props.resultsTarget}>\n <button\n type=\"button\"\n data-drawer-open\n class={buttonClass(\"secondary\", \"md\", \"w-full md:hidden\")}\n aria-haspopup=\"dialog\"\n >\n {label}\n {/* Always in the DOM (hidden at zero) so the client script can\n update it from the live URL state on this prerendered page. */}\n <span\n data-drawer-count\n class:list={[\n \"inline-flex min-w-5 items-center justify-center rounded-full bg-selected px-1.5 py-0.5 font-mono text-2xs leading-none text-selected-foreground\",\n activeCount === 0 && \"hidden\",\n ]}\n >\n {activeCount}\n </span>\n </button>\n\n {/* On mobile the client script moves this content into the dialog;\n on ≥ md it stays inline. Not hidden by CSS — without JS the\n filters must remain visible in flow on every viewport. */}\n <div data-drawer-content class=\"md:contents\">\n <slot />\n </div>\n\n <dialog\n data-drawer-dialog\n class=\"m-0 mt-auto max-h-[85dvh] w-full max-w-none rounded-t-[calc(var(--radius)+0.5rem)] border-0 bg-surface-overlay p-0 text-foreground backdrop:bg-black/40 open:flex open:flex-col md:hidden\"\n aria-label={label}\n >\n <div class=\"flex items-center justify-between gap-3 border-b border-border px-4 py-3\">\n <p class=\"m-0 text-sm font-semibold\">{label}</p>\n <div class=\"flex items-center gap-2\">\n {clearHref && (\n /* Clearing from inside the sheet is the only way out of a\n stack of filters on mobile — the chips row is behind it. */\n <a\n href={clearHref}\n data-drawer-clear\n class:list={[buttonClass(\"ghost\", \"sm\"), activeCount === 0 && \"hidden\"]}\n >\n Clear all\n </a>\n )}\n <button type=\"button\" data-drawer-close class={buttonClass(\"ghost\", \"sm\")}>\n Close\n </button>\n </div>\n </div>\n <div data-drawer-body class=\"min-h-0 flex-1 overflow-y-auto p-4\"></div>\n {/* Outside the scrolling body, so it stays pinned to the bottom of\n the sheet however long the filter list is. */}\n <div class=\"border-t border-border p-4\">\n <button\n type=\"button\"\n data-drawer-results\n class={buttonClass(\"primary\", \"md\", \"w-full aria-busy:opacity-70\")}\n >\n {Astro.props.resultsLabel ?? \"Show results\"}\n </button>\n </div>\n </dialog>\n</div>\n\n<script>\n document.querySelectorAll<HTMLElement>(\"[data-grove-filter-drawer]\").forEach((root) => {\n const dialog = root.querySelector<HTMLDialogElement>(\"[data-drawer-dialog]\");\n const content = root.querySelector<HTMLElement>(\"[data-drawer-content]\");\n const body = root.querySelector<HTMLElement>(\"[data-drawer-body]\");\n const open = root.querySelector<HTMLButtonElement>(\"[data-drawer-open]\");\n const close = root.querySelector<HTMLButtonElement>(\"[data-drawer-close]\");\n if (!dialog || !content || !body || !open) return;\n\n const mobile = window.matchMedia(\"(max-width: 47.999rem)\");\n const place = () => {\n // One copy of the filter markup, moved between the inline slot\n // (desktop) and the dialog body (mobile).\n if (mobile.matches) {\n body.append(...content.children);\n content.classList.add(\"hidden\");\n } else {\n if (dialog.open) dialog.close();\n content.append(...body.children);\n content.classList.remove(\"hidden\");\n }\n };\n place();\n mobile.addEventListener(\"change\", place);\n\n const results = root.querySelector<HTMLButtonElement>(\"[data-drawer-results]\");\n const surface = (isOpen: boolean) =>\n document.dispatchEvent(\n new CustomEvent(\"grove:filter-surface\", { detail: { surface: \"drawer\", open: isOpen } }),\n );\n\n open.addEventListener(\"click\", () => {\n dialog.showModal();\n surface(true);\n });\n // `close` fires however the sheet closes: a button, Escape, or the\n // backdrop.\n dialog.addEventListener(\"close\", () => surface(false));\n close?.addEventListener(\"click\", () => dialog.close());\n results?.addEventListener(\"click\", () => {\n dialog.close();\n // Closing the sheet puts focus back on the Filters button. The\n // results are what the user asked for, so move focus there. The\n // browser scrolls the target into view as part of focusing it.\n const selector = root.dataset.resultsTarget;\n const target = selector ? document.querySelector<HTMLElement>(selector) : null;\n target?.focus();\n });\n dialog.addEventListener(\"click\", (event) => {\n // Backdrop click closes: the dialog element itself is the\n // target only when the click lands outside the panel content.\n if (event.target === dialog) dialog.close();\n });\n });\n</script>\n",
|
|
28
28
|
"type": "registry:ui",
|
|
29
29
|
"target": "~/src/components/ui/filter-drawer.astro"
|
|
30
30
|
},
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
],
|
|
50
50
|
"meta": {
|
|
51
51
|
"version": "1.3.0",
|
|
52
|
-
"requiresGrove": "0.
|
|
52
|
+
"requiresGrove": "0.13.0"
|
|
53
53
|
},
|
|
54
54
|
"type": "registry:ui"
|
|
55
55
|
}
|
package/dist/readme-cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readme-cli.d.ts","sourceRoot":"","sources":["../src/readme-cli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"readme-cli.d.ts","sourceRoot":"","sources":["../src/readme-cli.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,kBAAkB,IAAI,OAAO,CAkE5C"}
|
package/dist/readme-cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readdir, readFile, writeFile } from 'node:fs/promises';
|
|
2
2
|
import { join, resolve } from 'node:path';
|
|
3
|
-
import { buildAwesomeReadme, decisionsFileSchema, healthFileSchema, injectAwesomeReadmeBlock, loadConfig, } from '@grove-dev/core';
|
|
3
|
+
import { buildAwesomeReadme, decisionsFileSchema, directoryRoute, healthFileSchema, injectAwesomeReadmeBlock, loadConfig, loadGithubCache, resolveRecordGithub, } from '@grove-dev/core';
|
|
4
4
|
import { Command } from 'commander';
|
|
5
5
|
import { parse as parseYaml } from 'yaml';
|
|
6
6
|
const DEFAULT_README_PATH = 'README.md';
|
|
@@ -18,19 +18,28 @@ export function buildReadmeCommand() {
|
|
|
18
18
|
const config = await loadConfig(cwd);
|
|
19
19
|
const records = await loadRecords(cwd, config);
|
|
20
20
|
const categories = await loadCategories(cwd, config.paths.taxonomyDir);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
21
|
+
let markdown;
|
|
22
|
+
try {
|
|
23
|
+
markdown = buildAwesomeReadme({
|
|
24
|
+
site: {
|
|
25
|
+
name: config.site.name,
|
|
26
|
+
...(config.site.tagline ? { tagline: config.site.tagline } : {}),
|
|
27
|
+
...(config.site.description ? { description: config.site.description } : {}),
|
|
28
|
+
...(config.site.url ? { url: config.site.url } : {}),
|
|
29
|
+
...(config.site.repoUrl ? { repoUrl: config.site.repoUrl } : {}),
|
|
30
|
+
},
|
|
31
|
+
directoryRoute: directoryRoute(config),
|
|
32
|
+
categories,
|
|
33
|
+
records,
|
|
34
|
+
generatedAt: new Date().toISOString(),
|
|
35
|
+
readme: config.readme,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
console.error(`[grove readme] ${error.message}`);
|
|
40
|
+
process.exitCode = 1;
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
34
43
|
if (opts.stdout) {
|
|
35
44
|
process.stdout.write(markdown);
|
|
36
45
|
return;
|
|
@@ -71,8 +80,8 @@ async function safeRead(path) {
|
|
|
71
80
|
* `data/decisions.yml` entry overrides both. The result was that a
|
|
72
81
|
* record hidden by a curator decision still shipped in the generated
|
|
73
82
|
* README. Precedence here matches `generate()` in
|
|
74
|
-
* `@grove-dev/core`: decision, then
|
|
75
|
-
* then the record's own field.
|
|
83
|
+
* `@grove-dev/core`: decision, then the record's resolved health (GitHub
|
|
84
|
+
* sync cache, else inline), then health.yml, then the record's own field.
|
|
76
85
|
*/
|
|
77
86
|
async function loadVisibilityResolver(cwd, config) {
|
|
78
87
|
const decisions = new Map();
|
|
@@ -111,12 +120,16 @@ async function loadVisibilityResolver(cwd, config) {
|
|
|
111
120
|
async function loadRecords(cwd, config) {
|
|
112
121
|
const dir = resolve(cwd, config.paths.recordsDir);
|
|
113
122
|
const resolveVisibility = await loadVisibilityResolver(cwd, config);
|
|
123
|
+
// Stars and health come from the GitHub sync cache when it has them,
|
|
124
|
+
// exactly as the build resolves them.
|
|
125
|
+
const githubCache = await loadGithubCache(config, cwd);
|
|
114
126
|
const files = (await readdir(dir))
|
|
115
127
|
.filter((file) => file.endsWith('.yml') || file.endsWith('.yaml'))
|
|
116
128
|
.sort();
|
|
117
129
|
const out = [];
|
|
118
130
|
for (const file of files) {
|
|
119
|
-
const
|
|
131
|
+
const fileSlug = file.replace(/\.ya?ml$/, '');
|
|
132
|
+
const raw = resolveRecordGithub((parseYaml(await readFile(join(dir, file), 'utf8')) ?? {}), githubCache.entries.get(fileSlug)).record;
|
|
120
133
|
const github = raw.github ?? {};
|
|
121
134
|
const repoMeta = github.repository ?? {};
|
|
122
135
|
const links = raw.links ?? {};
|
|
@@ -126,8 +139,9 @@ async function loadRecords(cwd, config) {
|
|
|
126
139
|
? repoMeta.stargazers_count
|
|
127
140
|
: undefined;
|
|
128
141
|
const license = typeof github.license === 'string' ? github.license : undefined;
|
|
142
|
+
const slug = typeof raw.slug === 'string' ? raw.slug : fileSlug;
|
|
129
143
|
out.push({
|
|
130
|
-
slug
|
|
144
|
+
slug,
|
|
131
145
|
name: typeof raw.name === 'string' ? raw.name : undefined,
|
|
132
146
|
description: typeof raw.description === 'string' ? raw.description : undefined,
|
|
133
147
|
category: typeof raw.category === 'string' ? raw.category : undefined,
|
|
@@ -135,7 +149,7 @@ async function loadRecords(cwd, config) {
|
|
|
135
149
|
homepageUrl: typeof raw.homepageUrl === 'string'
|
|
136
150
|
? raw.homepageUrl
|
|
137
151
|
: (links.website ?? undefined),
|
|
138
|
-
visibility: resolveVisibility(
|
|
152
|
+
visibility: resolveVisibility(slug, raw),
|
|
139
153
|
...(stars !== undefined ? { stars } : {}),
|
|
140
154
|
...(license !== undefined ? { license } : {}),
|
|
141
155
|
});
|
package/dist/readme-cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readme-cli.js","sourceRoot":"","sources":["../src/readme-cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAGL,kBAAkB,EAClB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"readme-cli.js","sourceRoot":"","sources":["../src/readme-cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAA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AAE,iBAAiB,CAAC,IAAI,EAAE,GAAG,CAAC;YACxC,GAAG,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACzC,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC9C,CAAC,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,KAAK,UAAU,cAAc,CAAC,GAAW,EAAE,WAAmB;IAC5D,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC;IACzD,MAAM,GAAG,GAAG,CAAC,SAAS,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,CAAmC,CAAC;IAC9F,OAAO,GAAG;SACP,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACf,EAAE,EAAE,OAAO,KAAK,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAE,KAAK,CAAC,EAAa,CAAC,CAAC,CAAC,EAAE;QAC5D,IAAI,EAAE,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAE,KAAK,CAAC,IAAe,CAAC,CAAC,CAAC,EAAE;KACnE,CAAC,CAAC;SACF,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { enrichFromGithubHtml, fetchGithubMetadata, type GroveConfig } from '@grove-dev/core';
|
|
2
|
+
import { type SyncOutcome } from './sync-summary.js';
|
|
3
|
+
export interface GithubSyncOptions {
|
|
4
|
+
cwd: string;
|
|
5
|
+
config: GroveConfig;
|
|
6
|
+
limit?: number;
|
|
7
|
+
/** Injected for tests; default to the real GitHub fetchers. */
|
|
8
|
+
fetchMetadata?: typeof fetchGithubMetadata;
|
|
9
|
+
fetchHtml?: typeof enrichFromGithubHtml;
|
|
10
|
+
now?: () => Date;
|
|
11
|
+
log?: (line: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface GithubSyncRun {
|
|
14
|
+
outcomes: SyncOutcome[];
|
|
15
|
+
/** Records that still carry an inline `github` / `health` block. */
|
|
16
|
+
inlineRecords: string[];
|
|
17
|
+
cacheDir: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* `grove sync github`: fetch each record's repository and write the
|
|
21
|
+
* result to the GitHub sync cache (`paths.githubCache`), one JSON file
|
|
22
|
+
* per record. Record YAML is read, never written.
|
|
23
|
+
*
|
|
24
|
+
* The previous cache entry — or, before `grove migrate github-cache`
|
|
25
|
+
* has run, the record's inline blocks — seeds the merge, so fields sync
|
|
26
|
+
* does not own survive and a failed fetch keeps the last known data
|
|
27
|
+
* with the failure recorded next to it.
|
|
28
|
+
*/
|
|
29
|
+
export declare function runGithubSync(options: GithubSyncOptions): Promise<GithubSyncRun>;
|
|
30
|
+
//# sourceMappingURL=sync-github.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-github.d.ts","sourceRoot":"","sources":["../src/sync-github.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,oBAAoB,EACpB,mBAAmB,EAEnB,KAAK,WAAW,EAQjB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,KAAK,WAAW,EAAe,MAAM,mBAAmB,CAAC;AAElE,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,aAAa,CAAC,EAAE,OAAO,mBAAmB,CAAC;IAC3C,SAAS,CAAC,EAAE,OAAO,oBAAoB,CAAC;IACxC,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;IACjB,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,oEAAoE;IACpE,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC,CA2GtF"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { readdir, readFile } from 'node:fs/promises';
|
|
2
|
+
import { basename, join, resolve } from 'node:path';
|
|
3
|
+
import { buildGithubSyncPatch, classifyHealth, enrichFromGithubHtml, fetchGithubMetadata, loadGithubCache, nextGithubCacheEntry, normalizeGithubIntegration, parseGithubRepoUrl, pruneLegacyGithubFields, seedGithubCacheEntry, writeGithubCacheEntry, } from '@grove-dev/core';
|
|
4
|
+
import { parse as parseYaml } from 'yaml';
|
|
5
|
+
import { shortReason } from './sync-summary.js';
|
|
6
|
+
/**
|
|
7
|
+
* `grove sync github`: fetch each record's repository and write the
|
|
8
|
+
* result to the GitHub sync cache (`paths.githubCache`), one JSON file
|
|
9
|
+
* per record. Record YAML is read, never written.
|
|
10
|
+
*
|
|
11
|
+
* The previous cache entry — or, before `grove migrate github-cache`
|
|
12
|
+
* has run, the record's inline blocks — seeds the merge, so fields sync
|
|
13
|
+
* does not own survive and a failed fetch keeps the last known data
|
|
14
|
+
* with the failure recorded next to it.
|
|
15
|
+
*/
|
|
16
|
+
export async function runGithubSync(options) {
|
|
17
|
+
const { cwd, config } = options;
|
|
18
|
+
const fetchMetadata = options.fetchMetadata ?? fetchGithubMetadata;
|
|
19
|
+
const fetchHtml = options.fetchHtml ?? enrichFromGithubHtml;
|
|
20
|
+
const now = options.now ?? (() => new Date());
|
|
21
|
+
const log = options.log ?? console.log;
|
|
22
|
+
const githubFlags = normalizeGithubIntegration(config.integrations?.github);
|
|
23
|
+
const recordsDir = resolve(cwd, config.paths.recordsDir);
|
|
24
|
+
const files = (await readdir(recordsDir)).filter((file) => file.endsWith('.yml')).sort();
|
|
25
|
+
const selected = options.limit === undefined ? files : files.slice(0, options.limit);
|
|
26
|
+
const cache = await loadGithubCache(config, cwd);
|
|
27
|
+
const outcomes = [];
|
|
28
|
+
const inlineRecords = [];
|
|
29
|
+
for (const file of selected) {
|
|
30
|
+
const slug = basename(file, '.yml');
|
|
31
|
+
const raw = (parseYaml(await readFile(join(recordsDir, file), 'utf8'), { schema: 'core' }) ??
|
|
32
|
+
{});
|
|
33
|
+
if (raw.github !== undefined || raw.health !== undefined)
|
|
34
|
+
inlineRecords.push(slug);
|
|
35
|
+
const links = raw.links ?? {};
|
|
36
|
+
const repoUrl = raw.repoUrl ?? links.github;
|
|
37
|
+
if (!repoUrl) {
|
|
38
|
+
log(`[sync github] ${file}: no repository, skipped`);
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
const ref = parseGithubRepoUrl(repoUrl);
|
|
42
|
+
if (!ref) {
|
|
43
|
+
log(`[sync github] ${file}: invalid GitHub URL, skipped`);
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
const previous = cache.entries.get(slug) ?? seedGithubCacheEntry(slug, raw);
|
|
47
|
+
const github = previous.github ?? {};
|
|
48
|
+
const patch = {};
|
|
49
|
+
let health;
|
|
50
|
+
let sourceDescription;
|
|
51
|
+
let source;
|
|
52
|
+
// Why the API path didn't deliver, then why the fallback didn't —
|
|
53
|
+
// recorded on the cache entry and reported per record at the end.
|
|
54
|
+
const failures = [];
|
|
55
|
+
try {
|
|
56
|
+
const metadata = await fetchMetadata(ref);
|
|
57
|
+
if (metadata) {
|
|
58
|
+
if (githubFlags.health)
|
|
59
|
+
health = classifyHealth(slug, metadata).health;
|
|
60
|
+
// Merge into the existing repository block rather than
|
|
61
|
+
// replacing it wholesale: sync only owns the fields it writes.
|
|
62
|
+
Object.assign(patch, buildGithubSyncPatch(metadata, github));
|
|
63
|
+
if (metadata.description)
|
|
64
|
+
sourceDescription = metadata.description;
|
|
65
|
+
source = 'api';
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
failures.push({ source: 'api', reason: 'repository not found' });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
// The token-free HTML fallback below keeps scheduled syncs useful.
|
|
73
|
+
failures.push({ source: 'api', reason: shortReason(error) });
|
|
74
|
+
}
|
|
75
|
+
if (!source) {
|
|
76
|
+
try {
|
|
77
|
+
const enriched = await fetchHtml(repoUrl);
|
|
78
|
+
if (!enriched.notFound && !enriched.rateLimited && !enriched.error) {
|
|
79
|
+
// HTML fallback only fills fields the API didn't reach.
|
|
80
|
+
if (enriched.fields.homepage)
|
|
81
|
+
patch.homepage = enriched.fields.homepage;
|
|
82
|
+
patch.html = {
|
|
83
|
+
license: enriched.fields.license,
|
|
84
|
+
language: enriched.fields.language,
|
|
85
|
+
topics: enriched.fields.topics,
|
|
86
|
+
};
|
|
87
|
+
source = 'html';
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
failures.push({
|
|
91
|
+
source: 'html',
|
|
92
|
+
reason: enriched.notFound
|
|
93
|
+
? 'not found'
|
|
94
|
+
: enriched.rateLimited
|
|
95
|
+
? 'rate limited'
|
|
96
|
+
: shortReason(enriched.error),
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
failures.push({ source: 'html', reason: shortReason(error) });
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
const at = now().toISOString();
|
|
105
|
+
if (source)
|
|
106
|
+
patch.sync = { syncedAt: at, source };
|
|
107
|
+
const entry = nextGithubCacheEntry(previous, {
|
|
108
|
+
slug,
|
|
109
|
+
at,
|
|
110
|
+
repoUrl,
|
|
111
|
+
...(source ? { source, github: { ...pruneLegacyGithubFields(github), ...patch } } : {}),
|
|
112
|
+
...(health ? { health } : {}),
|
|
113
|
+
...(sourceDescription ? { sourceDescription } : {}),
|
|
114
|
+
failures,
|
|
115
|
+
});
|
|
116
|
+
await writeGithubCacheEntry(cache.dir, entry);
|
|
117
|
+
const reason = failures.length > 0
|
|
118
|
+
? failures
|
|
119
|
+
.map((failure) => `${failure.source === 'api' ? 'API' : 'HTML'}: ${failure.reason}`)
|
|
120
|
+
.join('; ')
|
|
121
|
+
: undefined;
|
|
122
|
+
outcomes.push({ slug, outcome: source ?? 'failed', ...(reason ? { reason } : {}) });
|
|
123
|
+
log(`[sync github] ${file}: ${source ?? 'unavailable'}`);
|
|
124
|
+
}
|
|
125
|
+
return { outcomes, inlineRecords, cacheDir: cache.dir };
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=sync-github.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-github.js","sourceRoot":"","sources":["../src/sync-github.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EAGnB,eAAe,EACf,oBAAoB,EACpB,0BAA0B,EAC1B,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAoB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAoBlE;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAA0B;IAC5D,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAChC,MAAM,aAAa,GA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C,MAAM,EAAE,CAAC;iBACnF,IAAI,CAAC,IAAI,CAAC;YACf,CAAC,CAAC,SAAS,CAAC;QAChB,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QACpF,GAAG,CAAC,iBAAiB,IAAI,KAAK,MAAM,IAAI,aAAa,EAAE,CAAC,CAAC;IAC3D,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* End-of-run report for `grove sync github`.
|
|
3
|
+
*
|
|
4
|
+
* A record that fails to sync keeps its previous `github` block, so a
|
|
5
|
+
* bare count ("3 failed") left maintainers guessing which records went
|
|
6
|
+
* stale and why. The CLI collects one outcome per record and hands them
|
|
7
|
+
* here; everything below is pure formatting so it can be unit-tested
|
|
8
|
+
* without touching the network.
|
|
9
|
+
*/
|
|
10
|
+
export type SyncOutcomeKind = 'api' | 'html' | 'failed';
|
|
11
|
+
export interface SyncOutcome {
|
|
12
|
+
slug: string;
|
|
13
|
+
outcome: SyncOutcomeKind;
|
|
14
|
+
/** Why the API (and, for failures, the HTML fallback) did not deliver. */
|
|
15
|
+
reason?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface SyncTotals {
|
|
18
|
+
updated: number;
|
|
19
|
+
html: number;
|
|
20
|
+
failed: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Turn a thrown value or a fallback result into a one-line reason.
|
|
24
|
+
* Messages come from `fetch` and `githubJson`, which never include the
|
|
25
|
+
* token, but they can be long or multi-line; the table wants one short
|
|
26
|
+
* line per record.
|
|
27
|
+
*/
|
|
28
|
+
export declare function shortReason(value: unknown): string;
|
|
29
|
+
export declare function summarizeSync(outcomes: readonly SyncOutcome[]): SyncTotals;
|
|
30
|
+
/** Plain-text summary printed at the end of `grove sync github`. */
|
|
31
|
+
export declare function formatSyncSummaryText(outcomes: readonly SyncOutcome[]): string;
|
|
32
|
+
/** Markdown version of the same summary, for `$GITHUB_STEP_SUMMARY`. */
|
|
33
|
+
export declare function formatSyncSummaryMarkdown(outcomes: readonly SyncOutcome[]): string;
|
|
34
|
+
/**
|
|
35
|
+
* Append the Markdown summary to the Actions job summary when the
|
|
36
|
+
* runner provides one. Appends, never overwrites: other steps in the
|
|
37
|
+
* same job write to the same file. Returns whether anything was written.
|
|
38
|
+
*/
|
|
39
|
+
export declare function appendSyncStepSummary(outcomes: readonly SyncOutcome[], summaryPath?: string | undefined): Promise<boolean>;
|
|
40
|
+
/** `--strict` turns any failed record into a non-zero exit. */
|
|
41
|
+
export declare function syncExitCode(outcomes: readonly SyncOutcome[], strict: boolean): 0 | 1;
|
|
42
|
+
//# sourceMappingURL=sync-summary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-summary.d.ts","sourceRoot":"","sources":["../src/sync-summary.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;AAExD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,eAAe,CAAC;IACzB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAID;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAIlD;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,UAAU,CAU1E;AAqBD,oEAAoE;AACpE,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,MAAM,CAkB9E;AAMD,wEAAwE;AACxE,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,MAAM,CAYlF;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CACzC,QAAQ,EAAE,SAAS,WAAW,EAAE,EAChC,WAAW,GAAE,MAAM,GAAG,SAA2C,GAChE,OAAO,CAAC,OAAO,CAAC,CAIlB;AAED,+DAA+D;AAC/D,wBAAgB,YAAY,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,EAAE,MAAM,EAAE,OAAO,GAAG,CAAC,GAAG,CAAC,CAErF"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { appendFile } from 'node:fs/promises';
|
|
2
|
+
const MAX_REASON_LENGTH = 160;
|
|
3
|
+
/**
|
|
4
|
+
* Turn a thrown value or a fallback result into a one-line reason.
|
|
5
|
+
* Messages come from `fetch` and `githubJson`, which never include the
|
|
6
|
+
* token, but they can be long or multi-line; the table wants one short
|
|
7
|
+
* line per record.
|
|
8
|
+
*/
|
|
9
|
+
export function shortReason(value) {
|
|
10
|
+
const text = value instanceof Error ? value.message : String(value);
|
|
11
|
+
const line = text.replace(/\s+/g, ' ').trim();
|
|
12
|
+
return line.length > MAX_REASON_LENGTH ? `${line.slice(0, MAX_REASON_LENGTH - 1)}…` : line;
|
|
13
|
+
}
|
|
14
|
+
export function summarizeSync(outcomes) {
|
|
15
|
+
const totals = { updated: 0, html: 0, failed: 0 };
|
|
16
|
+
for (const { outcome } of outcomes) {
|
|
17
|
+
if (outcome === 'failed')
|
|
18
|
+
totals.failed += 1;
|
|
19
|
+
else {
|
|
20
|
+
totals.updated += 1;
|
|
21
|
+
if (outcome === 'html')
|
|
22
|
+
totals.html += 1;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return totals;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Only fallback and failed rows are reported — a clean run stays one
|
|
29
|
+
* line. Sorted by slug so two runs over the same data print the same
|
|
30
|
+
* table regardless of the order records were processed in.
|
|
31
|
+
*/
|
|
32
|
+
function problemRows(outcomes) {
|
|
33
|
+
return outcomes
|
|
34
|
+
.filter((entry) => entry.outcome !== 'api')
|
|
35
|
+
.sort((a, b) => (a.slug < b.slug ? -1 : a.slug > b.slug ? 1 : 0));
|
|
36
|
+
}
|
|
37
|
+
function outcomeLabel(outcome) {
|
|
38
|
+
return outcome === 'html' ? 'html fallback' : outcome;
|
|
39
|
+
}
|
|
40
|
+
function totalsLine({ updated, html, failed }) {
|
|
41
|
+
return `${updated} updated (${html} HTML fallback), ${failed} failed`;
|
|
42
|
+
}
|
|
43
|
+
/** Plain-text summary printed at the end of `grove sync github`. */
|
|
44
|
+
export function formatSyncSummaryText(outcomes) {
|
|
45
|
+
const totals = `[sync github] ${totalsLine(summarizeSync(outcomes))}`;
|
|
46
|
+
const rows = problemRows(outcomes).map((entry) => [
|
|
47
|
+
entry.slug,
|
|
48
|
+
outcomeLabel(entry.outcome),
|
|
49
|
+
entry.reason ?? '',
|
|
50
|
+
]);
|
|
51
|
+
if (rows.length === 0)
|
|
52
|
+
return totals;
|
|
53
|
+
const table = [['slug', 'outcome', 'reason'], ...rows];
|
|
54
|
+
const widths = [0, 1].map((column) => Math.max(...table.map((row) => (row[column] ?? '').length)));
|
|
55
|
+
const lines = table.map((row) => [(row[0] ?? '').padEnd(widths[0] ?? 0), (row[1] ?? '').padEnd(widths[1] ?? 0), row[2] ?? '']
|
|
56
|
+
.join(' ')
|
|
57
|
+
.trimEnd());
|
|
58
|
+
return [totals, ...lines.map((line) => ` ${line}`)].join('\n');
|
|
59
|
+
}
|
|
60
|
+
function escapeCell(value) {
|
|
61
|
+
return value.replace(/\\/g, '\\\\').replace(/\|/g, '\\|');
|
|
62
|
+
}
|
|
63
|
+
/** Markdown version of the same summary, for `$GITHUB_STEP_SUMMARY`. */
|
|
64
|
+
export function formatSyncSummaryMarkdown(outcomes) {
|
|
65
|
+
const lines = ['### grove sync github', '', `**${totalsLine(summarizeSync(outcomes))}**`];
|
|
66
|
+
const rows = problemRows(outcomes);
|
|
67
|
+
if (rows.length > 0) {
|
|
68
|
+
lines.push('', '| Record | Outcome | Reason |', '| --- | --- | --- |');
|
|
69
|
+
for (const entry of rows) {
|
|
70
|
+
lines.push(`| \`${escapeCell(entry.slug)}\` | ${outcomeLabel(entry.outcome)} | ${escapeCell(entry.reason ?? '')} |`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return `${lines.join('\n')}\n`;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Append the Markdown summary to the Actions job summary when the
|
|
77
|
+
* runner provides one. Appends, never overwrites: other steps in the
|
|
78
|
+
* same job write to the same file. Returns whether anything was written.
|
|
79
|
+
*/
|
|
80
|
+
export async function appendSyncStepSummary(outcomes, summaryPath = process.env.GITHUB_STEP_SUMMARY) {
|
|
81
|
+
if (!summaryPath)
|
|
82
|
+
return false;
|
|
83
|
+
await appendFile(summaryPath, `${formatSyncSummaryMarkdown(outcomes)}\n`, 'utf8');
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
/** `--strict` turns any failed record into a non-zero exit. */
|
|
87
|
+
export function syncExitCode(outcomes, strict) {
|
|
88
|
+
return strict && summarizeSync(outcomes).failed > 0 ? 1 : 0;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=sync-summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-summary.js","sourceRoot":"","sources":["../src/sync-summary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AA2B9C,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAE9B;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC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CAAC;IACH,CAAC;IACD,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACjC,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,QAAgC,EAChC,cAAkC,OAAO,CAAC,GAAG,CAAC,mBAAmB;IAEjE,IAAI,CAAC,WAAW;QAAE,OAAO,KAAK,CAAC;IAC/B,MAAM,UAAU,CAAC,WAAW,EAAE,GAAG,yBAAyB,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAClF,OAAO,IAAI,CAAC;AACd,CAAC;AAED,+DAA+D;AAC/D,MAAM,UAAU,YAAY,CAAC,QAAgC,EAAE,MAAe;IAC5E,OAAO,MAAM,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grove-dev/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Grove CLI — scaffolds Grove-powered spaces and orchestrates @grove-dev/core commands.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"lighthouse": "^12.8.2",
|
|
49
49
|
"typescript": "^5.9.3",
|
|
50
50
|
"yaml": "^2.6.0",
|
|
51
|
-
"@grove-dev/core": "0.
|
|
51
|
+
"@grove-dev/core": "0.13.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"tsx": "^4.23.0",
|