@grove-dev/astro 0.2.20 → 0.3.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.
Files changed (46) hide show
  1. package/LICENSE +21 -0
  2. package/dist/template-routes.test.d.ts +2 -0
  3. package/dist/template-routes.test.d.ts.map +1 -0
  4. package/dist/template-routes.test.js +63 -0
  5. package/dist/template-routes.test.js.map +1 -0
  6. package/dist/theme.test.js +5 -0
  7. package/dist/theme.test.js.map +1 -1
  8. package/package.json +4 -4
  9. package/src/components/Icon.astro +52 -22
  10. package/src/template-routes.test.ts +103 -0
  11. package/src/theme.test.ts +9 -0
  12. package/templates/default/.github/workflows/build.yml +1 -3
  13. package/templates/default/.github/workflows/cleanup-stale-records.yml +1 -3
  14. package/templates/default/.github/workflows/daily-refresh.yml +1 -3
  15. package/templates/default/.github/workflows/sync-contributors.yml +2 -4
  16. package/templates/default/.github/workflows/sync-github-metadata.yml +1 -3
  17. package/templates/default/.github/workflows/validate-data.yml +1 -3
  18. package/templates/default/grove.config.ts +1 -1
  19. package/templates/default/package.json +9 -4
  20. package/templates/default/public/llms-full.txt +63 -186
  21. package/templates/default/public/llms.txt +6 -107
  22. package/templates/default/public/sitemap.xml +10 -10
  23. package/templates/default/src/data/records.ts +80 -2
  24. package/templates/default/src/pages/[slug]/[recordSlug].astro +9 -7
  25. package/templates/default/src/pages/[slug]/index.astro +215 -11
  26. package/templates/default/src/pages/about.astro +8 -1
  27. package/templates/default/src/pages/apps/[recordSlug].astro +2 -1
  28. package/templates/default/src/pages/index.astro +11 -3
  29. package/templates/default/src/pages/sitemap.xml.ts +3 -3
  30. package/templates/default/src/pages/submit.astro +5 -5
  31. package/templates/default/tsconfig.json +9 -0
  32. package/templates/default/scripts/build-llms.mjs +0 -123
  33. package/templates/default/scripts/build-records-json.mjs +0 -27
  34. package/templates/default/scripts/build-sitemap.mjs +0 -20
  35. package/templates/default/scripts/cleanup-stale-records.mjs +0 -20
  36. package/templates/default/scripts/enrich-github-metadata.mjs +0 -99
  37. package/templates/default/scripts/fetch-icons.mjs +0 -137
  38. package/templates/default/scripts/migrate-legacy-to-schema-v1.mjs +0 -86
  39. package/templates/default/scripts/parse-legacy-readme.mjs +0 -59
  40. package/templates/default/scripts/refresh-records-activity.mjs +0 -24
  41. package/templates/default/scripts/repair-license-format.mjs +0 -72
  42. package/templates/default/scripts/report-cleanup-candidates.mjs +0 -21
  43. package/templates/default/scripts/seed-from-github.mjs +0 -62
  44. package/templates/default/scripts/sync-contributors.mjs +0 -145
  45. package/templates/default/scripts/sync-github-metadata.mjs +0 -28
  46. package/templates/default/scripts/validate-records.mjs +0 -27
@@ -1,99 +0,0 @@
1
- #!/usr/bin/env node
2
- // SPDX-License-Identifier: MIT
3
-
4
- /**
5
- * enrich-github-metadata.mjs — HTML fallback for records that
6
- * haven't been touched by the API sync. Walks the public GitHub
7
- * HTML page for each repo and pulls topics, language, license,
8
- * homepage into the yml file.
9
- *
10
- * Lightweight (no auth required), but slower and less reliable
11
- * than `sync-github-metadata.mjs` (the API version). Use this as
12
- * a fallback when the API rate-limit is exhausted.
13
- */
14
- import { readFile, writeFile, readdir } from "node:fs/promises";
15
- import { parse, stringify } from "yaml";
16
- import { dirname, join } from "node:path";
17
- import { fileURLToPath } from "node:url";
18
-
19
- const __dirname = dirname(fileURLToPath(import.meta.url));
20
- const ROOT = join(__dirname, "..");
21
- const RECORDS_DIR = join(ROOT, "data", "records");
22
- const DRY_RUN = process.env.DRY_RUN === "1";
23
-
24
- const HEADERS = {
25
- Accept: "text/html,application/xhtml+xml",
26
- "User-Agent": "grove-enricher",
27
- };
28
-
29
- function ownerRepo(repoUrl) {
30
- if (!repoUrl) return null;
31
- const m = String(repoUrl).match(/github\.com\/([^/]+)\/([^/?#]+)/);
32
- if (!m) return null;
33
- return { owner: m[1], repo: m[2].replace(/\.git$/, "") };
34
- }
35
-
36
- async function fetchHtml(owner, repo) {
37
- try {
38
- const res = await fetch(`https://github.com/${owner}/${repo}`, { headers: HEADERS });
39
- if (!res.ok) return null;
40
- return await res.text();
41
- } catch {
42
- return null;
43
- }
44
- }
45
-
46
- function extractMeta(html) {
47
- if (!html) return {};
48
- const out = {};
49
- const topicMatches = html.matchAll(/data-octo-click="topic_click"[^>]*>([^<]+)</g);
50
- if (topicMatches) {
51
- const topics = [...topicMatches].map((m) => m[1].trim()).filter(Boolean);
52
- if (topics.length) out.topics = topics;
53
- }
54
- const lang = html.match(/<span class="color-fg-default text-bold mr-1"[^>]*>([^<]+)</);
55
- if (lang) out.language = lang[1].trim();
56
- const license = html.match(/This repository is under the ([^<.]+) License/i);
57
- if (license) out.license = license[1].trim();
58
- return out;
59
- }
60
-
61
- async function main() {
62
- let files = [];
63
- try {
64
- files = (await readdir(RECORDS_DIR)).filter((f) => f.endsWith(".yml")).sort();
65
- } catch (err) {
66
- console.error("No data/records directory. Run `grove init` first.");
67
- process.exit(1);
68
- }
69
-
70
- let enriched = 0;
71
- for (const file of files) {
72
- const path = join(RECORDS_DIR, file);
73
- const text = await readFile(path, "utf8");
74
- const rec = parse(text) ?? {};
75
- const { owner, repo } = ownerRepo(rec.repoUrl ?? rec.links?.github) ?? {};
76
- if (!owner) continue;
77
- const html = await fetchHtml(owner, repo);
78
- const meta = extractMeta(html);
79
- const before = JSON.stringify(rec);
80
- if (meta.topics && !rec.topics) rec.topics = meta.topics;
81
- if (meta.language && !rec.language) rec.language = meta.language;
82
- if (meta.license && !rec.license) rec.license = meta.license;
83
- const after = JSON.stringify(rec);
84
- if (before === after) continue;
85
- if (DRY_RUN) {
86
- console.log(` ~ ${file} (dry-run)`);
87
- } else {
88
- await writeFile(path, stringify(rec), "utf8");
89
- console.log(` ✓ ${file}`);
90
- }
91
- enriched++;
92
- }
93
- console.log(`Enriched ${enriched} record${enriched === 1 ? "" : "s"}.`);
94
- }
95
-
96
- main().catch((err) => {
97
- console.error("enrich-github-metadata failed:", err);
98
- process.exit(1);
99
- });
@@ -1,137 +0,0 @@
1
- #!/usr/bin/env node
2
- // SPDX-License-Identifier: MIT
3
-
4
- /**
5
- * fetch-icons.mjs — download brand icons from the public
6
- * `xandemon/developer-icons` repository (CC0 licensed) and save them
7
- * to `public/icons/` so Astro can serve them as static assets.
8
- *
9
- * Run automatically before dev/build via the npm scripts.
10
- *
11
- * Icon map below mirrors the openapps catalogue. Add or remove
12
- * entries as the blueprint's taxonomy evolves.
13
- */
14
- import { mkdir, writeFile, access } from "node:fs/promises";
15
- import { dirname, join, resolve } from "node:path";
16
- import { fileURLToPath } from "node:url";
17
-
18
- const __dirname = dirname(fileURLToPath(import.meta.url));
19
- const ROOT = resolve(__dirname, "..");
20
- const OUT_BASE = join(ROOT, "public", "icons");
21
-
22
- const SOURCE = "https://raw.githubusercontent.com/xandemon/developer-icons/main/icons";
23
-
24
- // Stack icons (xandemon/developer-icons naming).
25
- // Names suffixed with `(custom)` are hand-drawn SVGs committed
26
- // to the repo because the upstream xandemon/developer-icons
27
- // collection doesn't include them. The script preserves them on
28
- // subsequent runs (it never overwrites an existing file unless
29
- // the URL fetch succeeds).
30
- const STACK_ICONS = [
31
- "android",
32
- "apple-dark",
33
- "apple-light",
34
- "bun", // custom
35
- "capacitor",
36
- "clojure", // custom
37
- "clojurescript", // custom
38
- "dart",
39
- "deno", // custom
40
- "django", // custom
41
- "docker", // custom
42
- "firebase",
43
- "flutter",
44
- "go", // custom
45
- "graphql",
46
- "ionic",
47
- "java",
48
- "javascript",
49
- "kotlin",
50
- "llm", // custom
51
- "mongodb",
52
- "node.js", // xandemon uses "nodejs"; we ship "node.js" for the home page link
53
- "nodejs", // (alias — both should resolve to the same file)
54
- "python",
55
- "react",
56
- "react-native",
57
- "rust",
58
- "solidity",
59
- "sveltekit", // custom
60
- "swift",
61
- "tensorflow",
62
- "typescript",
63
- "vue", // custom
64
- ];
65
-
66
- // Platform icons (custom paths under /icons/platforms/).
67
- const PLATFORM_ICONS = [
68
- "android",
69
- "apple-dark",
70
- "apple-light",
71
- "chrome",
72
- "chromeos",
73
- "desktop",
74
- "embedded",
75
- "ios",
76
- "linux",
77
- "macos",
78
- "ubuntu",
79
- "web",
80
- "windows",
81
- ];
82
-
83
- async function exists(p) {
84
- try { await access(p); return true; } catch { return false; }
85
- }
86
-
87
- async function fetchAndSave(url, dest) {
88
- const res = await fetch(url);
89
- if (!res.ok) throw new Error(`Failed to fetch ${url}: ${res.status}`);
90
- const buf = Buffer.from(await res.arrayBuffer());
91
- await mkdir(dirname(dest), { recursive: true });
92
- await writeFile(dest, buf);
93
- }
94
-
95
- async function main() {
96
- // Stack icons
97
- const stackDir = join(OUT_BASE, "stacks");
98
- if (!(await exists(stackDir))) await mkdir(stackDir, { recursive: true });
99
- for (const name of STACK_ICONS) {
100
- const url = `${SOURCE}/${name}/${name}-original.svg`;
101
- const dest = join(stackDir, `${name}.svg`);
102
- try {
103
- await fetchAndSave(url, dest);
104
- console.log(` ✓ stack/${name}`);
105
- } catch (err) {
106
- console.warn(` ✗ stack/${name}: ${err.message}`);
107
- }
108
- }
109
-
110
- // Platform icons (apple-dark / apple-light already downloaded as
111
- // stack icons; we re-use them under platforms/).
112
- const platDir = join(OUT_BASE, "platforms");
113
- if (!(await exists(platDir))) await mkdir(platDir, { recursive: true });
114
- for (const name of PLATFORM_ICONS) {
115
- const src = join(stackDir, `${name}.svg`);
116
- const dest = join(platDir, `${name}.svg`);
117
- if (await exists(src)) {
118
- const buf = await (await import("node:fs/promises")).readFile(src);
119
- await writeFile(dest, buf);
120
- console.log(` ✓ platform/${name} (from stack cache)`);
121
- } else {
122
- // Try a direct fetch as a fallback.
123
- const url = `${SOURCE}/${name}/${name}-original.svg`;
124
- try {
125
- await fetchAndSave(url, dest);
126
- console.log(` ✓ platform/${name}`);
127
- } catch (err) {
128
- console.warn(` ✗ platform/${name}: ${err.message}`);
129
- }
130
- }
131
- }
132
- }
133
-
134
- main().catch((err) => {
135
- console.error("fetch-icons failed:", err);
136
- process.exit(1);
137
- });
@@ -1,86 +0,0 @@
1
- #!/usr/bin/env node
2
- // SPDX-License-Identifier: MIT
3
-
4
- /**
5
- * migrate-legacy-to-schema-v1.mjs — best-effort mapper from the
6
- * legacy OpenSourceApp shape (openapps v0 schema) into the
7
- * Grove V1 record shape (kind: project + Resource union).
8
- *
9
- * Reads `data/legacy/*.yml` (if present), writes
10
- * `data/records/*.yml`. Field-by-field mapping is documented
11
- * inline.
12
- */
13
- import { readFile, writeFile, readdir, mkdir } from "node:fs/promises";
14
- import { parse, stringify } from "yaml";
15
- import { dirname, basename, join } from "node:path";
16
- import { fileURLToPath } from "node:url";
17
-
18
- const __dirname = dirname(fileURLToPath(import.meta.url));
19
- const ROOT = join(__dirname, "..");
20
- const LEGACY_DIR = join(ROOT, "data", "legacy");
21
- const RECORDS_DIR = join(ROOT, "data", "records");
22
- const DRY_RUN = process.env.DRY_RUN === "1";
23
-
24
- function map(legacy) {
25
- // Best-effort: openapps → grove V1. Fields with no clear
26
- // equivalent are left for a human to fill in.
27
- return {
28
- kind: "project",
29
- slug: legacy.slug ?? basename(legacy.__file ?? "unknown", ".yml"),
30
- name: legacy.name ?? legacy.title ?? "",
31
- description: legacy.description ?? legacy.summary ?? "",
32
- repoUrl: legacy.repoUrl ?? legacy.source?.url ?? "",
33
- homepageUrl: legacy.homepageUrl ?? legacy.links?.website ?? "",
34
- category: legacy.category ?? "tools",
35
- stack: legacy.stack ?? legacy.stacks?.[0] ?? "",
36
- stacks: Array.isArray(legacy.stacks) ? legacy.stacks.slice(1).filter(Boolean) : [],
37
- platforms: legacy.platforms ?? [],
38
- tags: legacy.tags ?? [],
39
- stars: legacy.stars,
40
- license: legacy.license,
41
- status: legacy.status,
42
- bestFor: legacy.bestFor ?? [],
43
- whyListed: legacy.whyListed ?? [],
44
- caveats: legacy.caveats ?? [],
45
- curation: {
46
- reviewed: Boolean(legacy.curation?.reviewed),
47
- by: legacy.curation?.by,
48
- date: legacy.curation?.date,
49
- labels: legacy.labels ?? legacy.curation?.labels ?? [],
50
- },
51
- };
52
- }
53
-
54
- async function main() {
55
- let files = [];
56
- try {
57
- files = (await readdir(LEGACY_DIR)).filter((f) => f.endsWith(".yml")).sort();
58
- } catch {
59
- console.error("No data/legacy directory. Drop legacy yml files in there and re-run.");
60
- process.exit(1);
61
- }
62
-
63
- if (!DRY_RUN) await mkdir(RECORDS_DIR, { recursive: true });
64
- let migrated = 0;
65
- for (const file of files) {
66
- const text = await readFile(join(LEGACY_DIR, file), "utf8");
67
- const raw = parse(text) ?? {};
68
- raw.__file = file;
69
- const rec = map(raw);
70
- const slug = rec.slug || basename(file, ".yml");
71
- const dest = join(RECORDS_DIR, `${slug}.yml`);
72
- if (DRY_RUN) {
73
- console.log(` ~ ${file} → ${slug}.yml (dry-run)`);
74
- } else {
75
- await writeFile(dest, stringify(rec), "utf8");
76
- console.log(` ✓ ${file} → ${slug}.yml`);
77
- }
78
- migrated++;
79
- }
80
- console.log(`Migrated ${migrated} legacy record${migrated === 1 ? "" : "s"}.`);
81
- }
82
-
83
- main().catch((err) => {
84
- console.error("migrate-legacy-to-schema-v1 failed:", err);
85
- process.exit(1);
86
- });
@@ -1,59 +0,0 @@
1
- #!/usr/bin/env node
2
- // SPDX-License-Identifier: MIT
3
-
4
- /**
5
- * parse-legacy-readme.mjs — best-effort parser for legacy yml
6
- * records that ship a `readme` block (Markdown body + frontmatter)
7
- * instead of the V1 schema fields.
8
- *
9
- * Walks `data/records/*.yml`, splits `readme` into a `content`
10
- * file under `content/records/<slug>.md`, and produces a
11
- * `migration-report.md` summarizing which fields it filled in
12
- * (or could not).
13
- */
14
- import { readFile, writeFile, readdir, mkdir } from "node:fs/promises";
15
- import { dirname, basename, join, resolve } from "node:path";
16
- import { fileURLToPath } from "node:url";
17
-
18
- const __dirname = dirname(fileURLToPath(import.meta.url));
19
- const ROOT = join(__dirname, "..");
20
- const RECORDS_DIR = join(ROOT, "data", "records");
21
- const CONTENT_DIR = join(ROOT, "content", "records");
22
- const DRY_RUN = process.env.DRY_RUN === "1";
23
-
24
- async function main() {
25
- let files = [];
26
- try {
27
- files = (await readdir(RECORDS_DIR)).filter((f) => f.endsWith(".yml")).sort();
28
- } catch {
29
- console.error("No data/records directory.");
30
- process.exit(1);
31
- }
32
-
33
- const report = [];
34
- for (const file of files) {
35
- const path = join(RECORDS_DIR, file);
36
- const text = await readFile(path, "utf8");
37
- if (!/^readme:\s*\|/m.test(text)) {
38
- report.push(`${file}: no legacy readme block`);
39
- continue;
40
- }
41
- const slug = basename(file, ".yml");
42
- const outPath = join(CONTENT_DIR, `${slug}.md`);
43
- if (!DRY_RUN) {
44
- await mkdir(dirname(outPath), { recursive: true });
45
- const body = text
46
- .split(/^readme:\s*\|\s*$/m)[1] ?? ""
47
- .split(/^[a-z]+:/m)[0] ?? "";
48
- await writeFile(outPath, body.trim(), "utf8");
49
- }
50
- report.push(`${file}: extracted readme → content/records/${slug}.md`);
51
- }
52
-
53
- console.log(report.join("\n"));
54
- }
55
-
56
- main().catch((err) => {
57
- console.error("parse-legacy-readme failed:", err);
58
- process.exit(1);
59
- });
@@ -1,24 +0,0 @@
1
- #!/usr/bin/env node
2
- // SPDX-License-Identifier: MIT
3
-
4
- /**
5
- * refresh-records-activity.mjs — daily activity refresh.
6
- *
7
- * Wrapper around `grove sync github` (the same command used by
8
- * the weekly metadata sync, but the action wires it to a daily
9
- * cron so the directory stays current with each app's recent
10
- * commit history and GitHub stars).
11
- */
12
- import { spawnSync } from "node:child_process";
13
-
14
- const result = spawnSync("grove", ["sync", "github"], {
15
- stdio: "inherit",
16
- env: process.env,
17
- });
18
-
19
- if (result.error) {
20
- console.error("Failed to spawn `grove sync github`:", result.error.message);
21
- process.exit(1);
22
- }
23
-
24
- process.exit(result.status ?? 0);
@@ -1,72 +0,0 @@
1
- #!/usr/bin/env node
2
- // SPDX-License-Identifier: MIT
3
-
4
- /**
5
- * repair-license-format.mjs — normalize the `license` field on
6
- * every record yml. Maps common GitHub-shaped license keys
7
- * ("agpl-3.0", "Apache-2.0", "mit") to their SPDX IDs.
8
- */
9
- import { readFile, writeFile, readdir } from "node:fs/promises";
10
- import { parse, stringify } from "node:yaml";
11
- import { dirname, join } from "node:path";
12
- import { fileURLToPath } from "node:url";
13
-
14
- const __dirname = dirname(fileURLToPath(import.meta.url));
15
- const ROOT = join(__dirname, "..");
16
- const RECORDS_DIR = join(ROOT, "data", "records");
17
- const DRY_RUN = process.env.DRY_RUN === "1";
18
-
19
- const LICENSE_MAP = {
20
- "mit": "MIT",
21
- "apache-2.0": "Apache-2.0",
22
- "apache 2.0": "Apache-2.0",
23
- "gpl-3.0": "GPL-3.0",
24
- "gpl-2.0": "GPL-2.0",
25
- "lgpl-2.1": "LGPL-2.1",
26
- "lgpl-3.0": "LGPL-3.0",
27
- "agpl-3.0": "AGPL-3.0",
28
- "bsd-3-clause": "BSD-3-Clause",
29
- "bsd-2-clause": "BSD-2-Clause",
30
- "isc": "ISC",
31
- "mpl-2.0": "MPL-2.0",
32
- "unlicense": "Unlicense",
33
- "wtfpl": "WTFPL",
34
- };
35
-
36
- function normalize(license) {
37
- if (!license) return license;
38
- const k = String(license).trim().toLowerCase();
39
- return LICENSE_MAP[k] ?? license;
40
- }
41
-
42
- async function main() {
43
- let files = [];
44
- try {
45
- files = (await readdir(RECORDS_DIR)).filter((f) => f.endsWith(".yml")).sort();
46
- } catch {
47
- console.error("No data/records directory. Run `grove init` first.");
48
- process.exit(1);
49
- }
50
-
51
- let repaired = 0;
52
- for (const file of files) {
53
- const path = join(RECORDS_DIR, file);
54
- const rec = parse(await readFile(path, "utf8")) ?? {};
55
- const normalized = normalize(rec.license);
56
- if (normalized === rec.license) continue;
57
- rec.license = normalized;
58
- if (DRY_RUN) {
59
- console.log(` ~ ${file} → ${normalized}`);
60
- } else {
61
- await writeFile(path, stringify(rec), "utf8");
62
- console.log(` ✓ ${file} → ${normalized}`);
63
- }
64
- repaired++;
65
- }
66
- console.log(`Repaired ${repaired} record${repaired === 1 ? "" : "s"}.`);
67
- }
68
-
69
- main().catch((err) => {
70
- console.error("repair-license-format failed:", err);
71
- process.exit(1);
72
- });
@@ -1,21 +0,0 @@
1
- #!/usr/bin/env node
2
- // SPDX-License-Identifier: MIT
3
-
4
- /**
5
- * report-cleanup-candidates.mjs — flag records that look like
6
- * they should be archived. Wrapper around `grove cleanup stale`,
7
- * which writes a markdown report under `data/generated/`.
8
- */
9
- import { spawnSync } from "node:child_process";
10
-
11
- const result = spawnSync("grove", ["cleanup", "stale"], {
12
- stdio: "inherit",
13
- env: process.env,
14
- });
15
-
16
- if (result.error) {
17
- console.error("Failed to spawn `grove cleanup stale`:", result.error.message);
18
- process.exit(1);
19
- }
20
-
21
- process.exit(result.status ?? 0);
@@ -1,62 +0,0 @@
1
- #!/usr/bin/env node
2
- // SPDX-License-Identifier: MIT
3
-
4
- /**
5
- * seed-from-github.mjs — interactive seeder for the first
6
- * record. Given a GitHub URL, fetch the metadata and write a
7
- * starter yml to `data/records/<slug>.yml`. Useful for the
8
- * "add my repo" onboarding path.
9
- */
10
- import { mkdir, writeFile } from "node:fs/promises";
11
- import { parse, stringify } from "yaml";
12
- import { dirname, join } from "node:path";
13
- import { fileURLToPath } from "node:url";
14
-
15
- const __dirname = dirname(fileURLToPath(import.meta.url));
16
- const ROOT = join(__dirname, "..");
17
- const RECORDS_DIR = join(ROOT, "data", "records");
18
-
19
- const url = process.argv[2];
20
- if (!url) {
21
- console.error("Usage: node seed-from-github.mjs <github-url>");
22
- process.exit(1);
23
- }
24
-
25
- const match = String(url).match(/github\.com\/([^/]+)\/([^/?#]+)/);
26
- if (!match) {
27
- console.error("Not a GitHub URL:", url);
28
- process.exit(1);
29
- }
30
- const owner = match[1];
31
- const repo = match[2].replace(/\.git$/, "");
32
-
33
- const res = await fetch(`https://api.github.com/repos/${owner}/${repo}`, {
34
- headers: { Accept: "application/vnd.github+json", "User-Agent": "grove-seeder" },
35
- });
36
- if (!res.ok) {
37
- console.error("GitHub returned", res.status);
38
- process.exit(1);
39
- }
40
- const r = await res.json();
41
- const slug = repo.toLowerCase();
42
- const rec = {
43
- kind: "project",
44
- slug,
45
- name: r.name,
46
- description: r.description ?? "",
47
- repoUrl: r.html_url,
48
- homepageUrl: r.homepage ?? "",
49
- category: "tools",
50
- stack: r.language ?? "",
51
- stacks: [],
52
- platforms: [],
53
- tags: r.topics ?? [],
54
- stars: r.stargazers_count,
55
- license: r.license?.spdx_id ?? "",
56
- status: r.archived ? "archived" : "active",
57
- curation: { reviewed: false, labels: [] },
58
- };
59
-
60
- await mkdir(RECORDS_DIR, { recursive: true });
61
- await writeFile(join(RECORDS_DIR, `${slug}.yml`), stringify(rec), "utf8");
62
- console.log(`Wrote ${slug}.yml`);