@grove-dev/cli 0.12.0 → 0.14.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 +17 -97
- 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 +9 -5
- 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/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.14.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":"AAgBA,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, directoryRoute, healthFileSchema, injectAwesomeReadmeBlock, loadConfig, } from '@grove-dev/core';
|
|
3
|
+
import { buildAwesomeReadme, decisionsFileSchema, directoryRoute, githubSyncFreshnessOptions, 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';
|
|
@@ -80,8 +80,8 @@ async function safeRead(path) {
|
|
|
80
80
|
* `data/decisions.yml` entry overrides both. The result was that a
|
|
81
81
|
* record hidden by a curator decision still shipped in the generated
|
|
82
82
|
* README. Precedence here matches `generate()` in
|
|
83
|
-
* `@grove-dev/core`: decision, then
|
|
84
|
-
* 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.
|
|
85
85
|
*/
|
|
86
86
|
async function loadVisibilityResolver(cwd, config) {
|
|
87
87
|
const decisions = new Map();
|
|
@@ -120,12 +120,16 @@ async function loadVisibilityResolver(cwd, config) {
|
|
|
120
120
|
async function loadRecords(cwd, config) {
|
|
121
121
|
const dir = resolve(cwd, config.paths.recordsDir);
|
|
122
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);
|
|
123
126
|
const files = (await readdir(dir))
|
|
124
127
|
.filter((file) => file.endsWith('.yml') || file.endsWith('.yaml'))
|
|
125
128
|
.sort();
|
|
126
129
|
const out = [];
|
|
127
130
|
for (const file of files) {
|
|
128
|
-
const
|
|
131
|
+
const fileSlug = file.replace(/\.ya?ml$/, '');
|
|
132
|
+
const raw = resolveRecordGithub((parseYaml(await readFile(join(dir, file), 'utf8')) ?? {}), githubCache.entries.get(fileSlug), githubSyncFreshnessOptions(config)).record;
|
|
129
133
|
const github = raw.github ?? {};
|
|
130
134
|
const repoMeta = github.repository ?? {};
|
|
131
135
|
const links = raw.links ?? {};
|
|
@@ -135,7 +139,7 @@ async function loadRecords(cwd, config) {
|
|
|
135
139
|
? repoMeta.stargazers_count
|
|
136
140
|
: undefined;
|
|
137
141
|
const license = typeof github.license === 'string' ? github.license : undefined;
|
|
138
|
-
const slug = typeof raw.slug === 'string' ? raw.slug :
|
|
142
|
+
const slug = typeof raw.slug === 'string' ? raw.slug : fileSlug;
|
|
139
143
|
out.push({
|
|
140
144
|
slug,
|
|
141
145
|
name: typeof raw.name === 'string' ? raw.name : undefined,
|
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,EACnB,cAAc,EAEd,gBAAgB,EAChB,wBAAwB,EACxB,UAAU,
|
|
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,EAC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B,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,GAAG,OAAO,C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AE,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grove-dev/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.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.14.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"tsx": "^4.23.0",
|