@grove-dev/core 0.2.21 → 0.3.2
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 +16 -142
- package/dist/build-data.d.ts.map +1 -1
- package/dist/build-data.js +40 -4
- package/dist/build-data.js.map +1 -1
- package/dist/config.d.ts +3 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/contributors.d.ts +24 -0
- package/dist/contributors.d.ts.map +1 -0
- package/dist/contributors.js +90 -0
- package/dist/contributors.js.map +1 -0
- package/dist/directory-client.d.ts +11 -0
- package/dist/directory-client.d.ts.map +1 -0
- package/dist/directory-client.js +11 -0
- package/dist/directory-client.js.map +1 -0
- package/dist/directory-display.d.ts +27 -0
- package/dist/directory-display.d.ts.map +1 -0
- package/dist/directory-display.js +104 -0
- package/dist/directory-display.js.map +1 -0
- package/dist/directory-format.d.ts +29 -0
- package/dist/directory-format.d.ts.map +1 -0
- package/dist/directory-format.js +72 -0
- package/dist/directory-format.js.map +1 -0
- package/dist/directory-lenses.d.ts +59 -0
- package/dist/directory-lenses.d.ts.map +1 -0
- package/dist/directory-lenses.js +199 -0
- package/dist/directory-lenses.js.map +1 -0
- package/dist/directory-repo.d.ts +20 -0
- package/dist/directory-repo.d.ts.map +1 -0
- package/dist/directory-repo.js +31 -0
- package/dist/directory-repo.js.map +1 -0
- package/dist/directory-scores.d.ts +37 -0
- package/dist/directory-scores.d.ts.map +1 -0
- package/dist/directory-scores.js +76 -0
- package/dist/directory-scores.js.map +1 -0
- package/dist/directory-search.d.ts +119 -0
- package/dist/directory-search.d.ts.map +1 -0
- package/dist/directory-search.js +398 -0
- package/dist/directory-search.js.map +1 -0
- package/dist/directory-taxonomy.d.ts +11 -0
- package/dist/directory-taxonomy.d.ts.map +1 -0
- package/dist/directory-taxonomy.js +22 -0
- package/dist/directory-taxonomy.js.map +1 -0
- package/dist/index.d.ts +13 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -7
- package/dist/index.js.map +1 -1
- package/dist/llms.d.ts.map +1 -1
- package/dist/llms.js +11 -4
- package/dist/llms.js.map +1 -1
- package/dist/prepare.d.ts +18 -0
- package/dist/prepare.d.ts.map +1 -0
- package/dist/prepare.js +72 -0
- package/dist/prepare.js.map +1 -0
- package/dist/schema.d.ts +54 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +30 -0
- package/dist/schema.js.map +1 -1
- package/dist/sitemap.d.ts.map +1 -1
- package/dist/sitemap.js +4 -1
- package/dist/sitemap.js.map +1 -1
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +41 -0
- package/dist/validate.js.map +1 -1
- package/package.json +9 -2
- package/dist/build-data.test.d.ts +0 -2
- package/dist/build-data.test.d.ts.map +0 -1
- package/dist/build-data.test.js +0 -171
- package/dist/build-data.test.js.map +0 -1
- package/dist/decisions.test.d.ts +0 -2
- package/dist/decisions.test.d.ts.map +0 -1
- package/dist/decisions.test.js +0 -205
- package/dist/decisions.test.js.map +0 -1
- package/dist/enrich.test.d.ts +0 -2
- package/dist/enrich.test.d.ts.map +0 -1
- package/dist/enrich.test.js +0 -105
- package/dist/enrich.test.js.map +0 -1
- package/dist/github-client.test.d.ts +0 -2
- package/dist/github-client.test.d.ts.map +0 -1
- package/dist/github-client.test.js +0 -176
- package/dist/github-client.test.js.map +0 -1
- package/dist/github.test.d.ts +0 -2
- package/dist/github.test.d.ts.map +0 -1
- package/dist/github.test.js +0 -73
- package/dist/github.test.js.map +0 -1
- package/dist/health.test.d.ts +0 -2
- package/dist/health.test.d.ts.map +0 -1
- package/dist/health.test.js +0 -183
- package/dist/health.test.js.map +0 -1
- package/dist/importer.test.d.ts +0 -2
- package/dist/importer.test.d.ts.map +0 -1
- package/dist/importer.test.js +0 -173
- package/dist/importer.test.js.map +0 -1
- package/dist/slug.test.d.ts +0 -2
- package/dist/slug.test.d.ts.map +0 -1
- package/dist/slug.test.js +0 -101
- package/dist/slug.test.js.map +0 -1
- package/dist/validate.test.d.ts +0 -2
- package/dist/validate.test.d.ts.map +0 -1
- package/dist/validate.test.js +0 -249
- package/dist/validate.test.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,158 +1,32 @@
|
|
|
1
1
|
# `@grove-dev/core`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The framework-free engine behind Grove directories.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Core owns:
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
- **Config** — `defineConfig(config)` (V0's `defineGroveConfig` is gone) and `loadConfig` for `grove.config.ts` projects, via `jiti` so no build step is required.
|
|
15
|
-
- **Importers** — `parseAwesomeMarkdown` and `importAwesomeList` parse Markdown awesome lists into structured records.
|
|
16
|
-
- **Validators** — schema + reference checks (duplicate slugs, missing descriptions, broken categories, unknown decisions, kind-vs-blueprint mismatches).
|
|
17
|
-
- **Taxonomy** — typed registry for stacks, platforms, categories, distribution channels, lenses, labels.
|
|
18
|
-
- **Build pipeline** — `generate(config)` (the library form of `grove generate`) produces `data/generated/records.full.json`, `data/generated/records.index.json`, `data/generated/records.json` (alias), and `data/generated/site-config.json`.
|
|
19
|
-
- **Sitemap & llms.txt** — `buildSitemap` and `buildSitemapXml` (the library form of `grove sitemap`); `buildLlmsTxt` and `buildLlmsFullTxt` (the library form of `grove llms`).
|
|
20
|
-
- **Optional GitHub signal sync** — `fetchGithubMetadata`, `classifyHealth`, `enrichFromGithubHtml`, `parseGithubRepoUrl` for spaces that want maintenance signals. The CLI wraps these as `grove sync github`.
|
|
21
|
-
- **Cleanup** — `pickCleanupCandidates` (the library form of `grove cleanup stale`) flags records that need human review.
|
|
22
|
-
|
|
23
|
-
## Public surface (V1)
|
|
7
|
+
- `grove.config.ts` loading and validation
|
|
8
|
+
- project, resource, entity, taxonomy, health, and decision schemas
|
|
9
|
+
- YAML validation and normalized generated records
|
|
10
|
+
- GitHub repository and contributor metadata
|
|
11
|
+
- cleanup reports
|
|
12
|
+
- sitemap and `llms.txt` generation
|
|
13
|
+
- the unified `prepareDirectory()` pipeline used by Astro and the CLI
|
|
24
14
|
|
|
25
15
|
```ts
|
|
26
|
-
import {
|
|
27
|
-
// Config
|
|
28
|
-
defineConfig,
|
|
29
|
-
loadConfig,
|
|
30
|
-
type GroveConfig,
|
|
31
|
-
|
|
32
|
-
// Schemas (Zod)
|
|
33
|
-
blueprintSchema,
|
|
34
|
-
resourceKindSchema,
|
|
35
|
-
healthStatusSchema,
|
|
36
|
-
healthTierSchema,
|
|
37
|
-
healthBlockSchema,
|
|
38
|
-
healthEntrySchema,
|
|
39
|
-
healthFileSchema,
|
|
40
|
-
decisionSchema,
|
|
41
|
-
decisionsFileSchema,
|
|
42
|
-
overrideSchema,
|
|
43
|
-
overridesFileSchema,
|
|
44
|
-
projectRecordSchema,
|
|
45
|
-
resourceRecordSchema,
|
|
46
|
-
entityRecordSchema,
|
|
47
|
-
projectTypeSchema,
|
|
48
|
-
resourceTypeSchema,
|
|
49
|
-
entityTypeSchema,
|
|
50
|
-
appLabelSchema,
|
|
51
|
-
scoreSchema,
|
|
52
|
-
linksSchema,
|
|
53
|
-
githubRepositorySchema,
|
|
54
|
-
githubMetadataSchema,
|
|
55
|
-
githubLicenseSchema,
|
|
56
|
-
type Blueprint,
|
|
57
|
-
type ResourceKind,
|
|
58
|
-
type DecisionVisibility,
|
|
59
|
-
|
|
60
|
-
// Discriminated record types
|
|
61
|
-
type Resource,
|
|
62
|
-
type ProjectRecord,
|
|
63
|
-
type ResourceRecord,
|
|
64
|
-
type EntityRecord,
|
|
65
|
-
type IndexRecord,
|
|
66
|
-
type IndexProjectRecord,
|
|
67
|
-
type IndexResourceRecord,
|
|
68
|
-
type IndexEntityRecord,
|
|
69
|
-
blueprintKind,
|
|
70
|
-
|
|
71
|
-
// Build pipeline (library form)
|
|
72
|
-
generate,
|
|
73
|
-
type GenerateResult,
|
|
74
|
-
type RecordsFullPayload,
|
|
75
|
-
type RecordsIndexPayload,
|
|
76
|
-
|
|
77
|
-
// Sitemap
|
|
78
|
-
buildSitemap,
|
|
79
|
-
buildSitemapXml,
|
|
80
|
-
|
|
81
|
-
// llms.txt
|
|
82
|
-
buildLlmsTxt,
|
|
83
|
-
buildLlmsFullTxt,
|
|
84
|
-
type LlmsInput,
|
|
85
|
-
type LlmsRecordInput,
|
|
86
|
-
type LlmsResult,
|
|
87
|
-
|
|
88
|
-
// Cleanup
|
|
89
|
-
pickCleanupCandidates,
|
|
90
|
-
type CleanupCandidate,
|
|
91
|
-
type CleanupReport,
|
|
92
|
-
|
|
93
|
-
// GitHub
|
|
94
|
-
parseGithubRepoUrl,
|
|
95
|
-
type GithubRepoRef,
|
|
96
|
-
fetchGithubMetadata,
|
|
97
|
-
enrichFromGithubHtml,
|
|
98
|
-
classifyHealth,
|
|
99
|
-
type GithubMetadata,
|
|
100
|
-
type HealthEntry,
|
|
101
|
-
type EnrichedFields,
|
|
102
|
-
type EnrichResult,
|
|
103
|
-
rateLimitWaitMs,
|
|
104
|
-
sleep,
|
|
105
|
-
type GhFetchOptions,
|
|
106
|
-
|
|
107
|
-
// Importers / parsers
|
|
108
|
-
detectGithubRepo,
|
|
109
|
-
parseAwesomeMarkdown,
|
|
110
|
-
parseEntry,
|
|
111
|
-
parseSections,
|
|
112
|
-
type ImportedRecord,
|
|
113
|
-
type ImportSummary,
|
|
114
|
-
type ImportResult,
|
|
115
|
-
type ParsedEntry,
|
|
116
|
-
type ParsedSection,
|
|
117
|
-
|
|
118
|
-
// IO helpers
|
|
119
|
-
readYamlFile,
|
|
120
|
-
writeYamlFile,
|
|
121
|
-
writeTextFile,
|
|
122
|
-
} from "@grove-dev/core";
|
|
16
|
+
import { defineConfig, prepareDirectory } from "@grove-dev/core";
|
|
123
17
|
```
|
|
124
18
|
|
|
125
|
-
|
|
19
|
+
Core contains no UI or framework adapter. Application-facing code should normally use `@grove-dev/astro`; direct Core imports are useful for config, tooling, and custom integrations.
|
|
126
20
|
|
|
127
|
-
|
|
21
|
+
Browser controllers that need the shared discovery rules should use the browser-safe subpath. It exposes filtering, sorting, facets, display labels, and lens URL helpers without pulling config loading or filesystem dependencies into the client bundle.
|
|
128
22
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
| `defineGroveConfig` | `defineConfig` (in `config.ts`) |
|
|
133
|
-
| `resourceSchema` | `projectRecordSchema` / `resourceRecordSchema` / `entityRecordSchema` |
|
|
134
|
-
| `itemsFileSchema` | removed (the records are individual `<slug>.yml` files, no aggregate file) |
|
|
135
|
-
| `buildData` | `generate` (library form) |
|
|
136
|
-
| `buildSitemap` / `buildSitemapXml` | kept (V1 names) |
|
|
137
|
-
| `buildLlmsFiles` | `buildLlmsTxt` + `buildLlmsFullTxt` (split into two functions) |
|
|
138
|
-
| `buildLlmsTxt` / `buildLlmsFullTxt` | kept (V1 names) |
|
|
139
|
-
| `fetchGithubMetadata` | kept (V1 name) |
|
|
140
|
-
| `enrichFromGithubHtml` | kept (V1 name) |
|
|
141
|
-
| `ghFetch` / `pLimit` | internal to `github-client.ts`; not part of the V1 public surface |
|
|
142
|
-
| `pickReviewCandidates` | `pickCleanupCandidates` |
|
|
143
|
-
| `buildReviewReport` | removed (the cleanup report is a side effect of `pickCleanupCandidates`) |
|
|
144
|
-
| `parseAppYaml` | removed (V0 `apps` model is gone; use `readYamlFile` + Zod parse) |
|
|
145
|
-
| `normalizeAppRecord` / `toIndexApp` | internal to `build-data.ts`; not part of the V1 public surface |
|
|
146
|
-
| `validateAppRecord` | removed (V0 `apps` model is gone) |
|
|
147
|
-
| `validateProject` | kept (V1 name — used by tests and CLI for the structured `ValidationIssue[]` output that `generate`'s throw path does not produce) |
|
|
148
|
-
|
|
149
|
-
## Development
|
|
23
|
+
```ts
|
|
24
|
+
import { filterRecords, hrefForLens } from "@grove-dev/core/directory";
|
|
25
|
+
```
|
|
150
26
|
|
|
151
27
|
```bash
|
|
152
|
-
pnpm --filter @grove-dev/core build
|
|
153
28
|
pnpm --filter @grove-dev/core check
|
|
29
|
+
pnpm --filter @grove-dev/core test
|
|
154
30
|
```
|
|
155
31
|
|
|
156
|
-
## License
|
|
157
|
-
|
|
158
32
|
MIT
|
package/dist/build-data.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-data.d.ts","sourceRoot":"","sources":["../src/build-data.ts"],"names":[],"mappings":"AAGA,OAAO,EAML,KAAK,WAAW,EAEjB,MAAM,aAAa,CAAC;AAgErB;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACzC;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACzC;
|
|
1
|
+
{"version":3,"file":"build-data.d.ts","sourceRoot":"","sources":["../src/build-data.ts"],"names":[],"mappings":"AAGA,OAAO,EAML,KAAK,WAAW,EAEjB,MAAM,aAAa,CAAC;AAgErB;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACzC;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACzC;AAmCD;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,wBAAsB,QAAQ,CAC5B,GAAG,SAAgB,EACnB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,cAAc,CAAC,CA+OzB"}
|
package/dist/build-data.js
CHANGED
|
@@ -59,6 +59,27 @@ async function loadDecisionVisibility(decisionsPath, cwd) {
|
|
|
59
59
|
return new Map();
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
+
async function loadTaxonomyFile(cwd, taxonomyDir, filename) {
|
|
63
|
+
try {
|
|
64
|
+
const text = await readFile(resolve(cwd, taxonomyDir, filename), "utf8");
|
|
65
|
+
const raw = parseYaml(text);
|
|
66
|
+
if (!Array.isArray(raw))
|
|
67
|
+
return [];
|
|
68
|
+
return raw
|
|
69
|
+
.filter((item) => Boolean(item) &&
|
|
70
|
+
typeof item === "object" &&
|
|
71
|
+
typeof item.id === "string" &&
|
|
72
|
+
typeof item.name === "string")
|
|
73
|
+
.map((item) => ({
|
|
74
|
+
...item,
|
|
75
|
+
id: item.id,
|
|
76
|
+
name: item.name,
|
|
77
|
+
}));
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return [];
|
|
81
|
+
}
|
|
82
|
+
}
|
|
62
83
|
export async function generate(cwd = process.cwd(), config) {
|
|
63
84
|
const cfg = config ?? (await loadConfig(cwd));
|
|
64
85
|
const recordsDir = resolve(cwd, cfg.paths.recordsDir);
|
|
@@ -193,6 +214,12 @@ export async function generate(cwd = process.cwd(), config) {
|
|
|
193
214
|
entity: "entities",
|
|
194
215
|
}[kind] ?? "items"),
|
|
195
216
|
};
|
|
217
|
+
const taxonomy = {
|
|
218
|
+
categories: await loadTaxonomyFile(cwd, cfg.paths.taxonomyDir, "categories.yml"),
|
|
219
|
+
stacks: await loadTaxonomyFile(cwd, cfg.paths.taxonomyDir, "stacks.yml"),
|
|
220
|
+
platforms: await loadTaxonomyFile(cwd, cfg.paths.taxonomyDir, "platforms.yml"),
|
|
221
|
+
distributionChannels: await loadTaxonomyFile(cwd, cfg.paths.taxonomyDir, "distribution-channels.yml"),
|
|
222
|
+
};
|
|
196
223
|
const siteConfigPayload = {
|
|
197
224
|
blueprint: cfg.blueprint,
|
|
198
225
|
blueprintConfig,
|
|
@@ -202,8 +229,12 @@ export async function generate(cwd = process.cwd(), config) {
|
|
|
202
229
|
siteUrl: cfg.site.url ?? "https://example.com",
|
|
203
230
|
repoUrl: cfg.site.repoUrl ?? "",
|
|
204
231
|
nav: cfg.nav,
|
|
232
|
+
footer: cfg.footer,
|
|
233
|
+
submission: cfg.submission,
|
|
234
|
+
facets: cfg.facets,
|
|
205
235
|
theme: cfg.theme,
|
|
206
236
|
integrations: cfg.integrations,
|
|
237
|
+
taxonomy,
|
|
207
238
|
stats: {
|
|
208
239
|
totalRecords: indexRecords.length,
|
|
209
240
|
totalApps: projects.length,
|
|
@@ -214,11 +245,16 @@ export async function generate(cwd = process.cwd(), config) {
|
|
|
214
245
|
totalPlatforms: platforms.size,
|
|
215
246
|
totalOwners: owners.size,
|
|
216
247
|
totalStars,
|
|
248
|
+
repositoryStars: repoStats.stars ?? 0,
|
|
249
|
+
repositoryForks: repoStats.forks ?? 0,
|
|
250
|
+
repositoryContributors: repoStats.contributors ?? 0,
|
|
217
251
|
// origin / source repo — only present when sync:repo-stats has run
|
|
218
|
-
originalRepo: repoStats.originalRepo ??
|
|
219
|
-
originalStars: repoStats.stars ?? 0,
|
|
220
|
-
originalForks: repoStats.forks ?? 0,
|
|
221
|
-
originalContributors: repoStats.
|
|
252
|
+
originalRepo: repoStats.originalRepo ?? "",
|
|
253
|
+
originalStars: repoStats.originalRepo ? repoStats.stars ?? 0 : 0,
|
|
254
|
+
originalForks: repoStats.originalRepo ? repoStats.forks ?? 0 : 0,
|
|
255
|
+
originalContributors: repoStats.originalRepo
|
|
256
|
+
? repoStats.contributors ?? 0
|
|
257
|
+
: 0,
|
|
222
258
|
},
|
|
223
259
|
};
|
|
224
260
|
await writeFile(join(outDir, "site-config.json"), JSON.stringify(siteConfigPayload, null, 2), "utf8");
|
package/dist/build-data.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-data.js","sourceRoot":"","sources":["../src/build-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,mBAAmB,GAGpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAS,aAAa,CACpB,MAAgB,EAChB,cAAmC;IAEnC,MAAM,QAAQ,GAAG,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC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AAM,CAAC,CAAC;IAC1E,MAAM,SAAS,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAEzE,OAAO;QACL,YAAY,EAAE,GAAG,CAAC,MAAM;QACxB,cAAc,EAAE,YAAY,CAAC,MAAM;QACnC,QAAQ;QACR,SAAS;QACT,SAAS;QACT,MAAM;KACP,CAAC;AACJ,CAAC;AAED,SAAS,MAAM,CAAC,MAAgB;IAC9B,IAAI,MAAM,CAAC,IAAI,KAAK,UAAU;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC;IACpD,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC"}
|
package/dist/config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type GroveConfig } from "./schema.js";
|
|
2
|
-
export type { GroveConfig };
|
|
1
|
+
import { type GroveConfig, type GroveConfigInput } from "./schema.js";
|
|
2
|
+
export type { GroveConfig, GroveConfigInput };
|
|
3
3
|
/**
|
|
4
4
|
* Load the Grove project config. The config file is the single source
|
|
5
5
|
* of truth for blueprint, site metadata, paths, integrations, theme,
|
|
@@ -12,5 +12,5 @@ export declare function loadConfig(cwd?: string, configPath?: string): Promise<G
|
|
|
12
12
|
* Define and validate a Grove config. Used at the bottom of a
|
|
13
13
|
* `grove.config.ts` file so editors get good type hints.
|
|
14
14
|
*/
|
|
15
|
-
export declare function defineConfig(config:
|
|
15
|
+
export declare function defineConfig(config: GroveConfigInput): GroveConfig;
|
|
16
16
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AAErB,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAsB,UAAU,CAC9B,GAAG,SAAgB,EACnB,UAAU,SAAoB,GAC7B,OAAO,CAAC,WAAW,CAAC,CAMtB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,gBAAgB,GAAG,WAAW,CAElE"}
|
package/dist/config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolve } from "node:path";
|
|
2
2
|
import { createJiti } from "jiti";
|
|
3
|
-
import { groveConfigSchema } from "./schema.js";
|
|
3
|
+
import { groveConfigSchema, } from "./schema.js";
|
|
4
4
|
/**
|
|
5
5
|
* Load the Grove project config. The config file is the single source
|
|
6
6
|
* of truth for blueprint, site metadata, paths, integrations, theme,
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EACL,iBAAiB,GAGlB,MAAM,aAAa,CAAC;AAIrB;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,EACnB,UAAU,GAAG,iBAAiB;IAE9B,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;IAC1C,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACzC,MAAM,GAAG,GAAG,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAA4B,CAAC;IACxF,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC;IAC7C,OAAO,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACtC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,MAAwB;IACnD,OAAO,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface Contributor {
|
|
2
|
+
username: string;
|
|
3
|
+
avatarUrl?: string;
|
|
4
|
+
profileUrl?: string;
|
|
5
|
+
contributions: number;
|
|
6
|
+
}
|
|
7
|
+
export interface SyncContributorsOptions {
|
|
8
|
+
cwd?: string;
|
|
9
|
+
generatedDir?: string;
|
|
10
|
+
/** Site repository URL. Falls back to generated site-config.json. */
|
|
11
|
+
repoUrl?: string;
|
|
12
|
+
token?: string;
|
|
13
|
+
fetchImpl?: typeof fetch;
|
|
14
|
+
generatedAt?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ContributorSyncResult {
|
|
17
|
+
outputPath: string;
|
|
18
|
+
repoStatsPath: string;
|
|
19
|
+
repositories: number;
|
|
20
|
+
contributors: number;
|
|
21
|
+
failed: number;
|
|
22
|
+
}
|
|
23
|
+
export declare function syncContributors(options?: SyncContributorsOptions): Promise<ContributorSyncResult>;
|
|
24
|
+
//# sourceMappingURL=contributors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contributors.d.ts","sourceRoot":"","sources":["../src/contributors.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB;AAiBD,wBAAsB,gBAAgB,CACpC,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,qBAAqB,CAAC,CAqHhC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import { dirname, resolve } from "node:path";
|
|
3
|
+
function ownerRepo(record) {
|
|
4
|
+
const github = record.github;
|
|
5
|
+
const fullName = github?.fullName;
|
|
6
|
+
if (fullName?.includes("/")) {
|
|
7
|
+
const [owner, repo] = fullName.split("/", 2);
|
|
8
|
+
if (owner && repo)
|
|
9
|
+
return { owner, repo };
|
|
10
|
+
}
|
|
11
|
+
const links = record.links;
|
|
12
|
+
const repoUrl = String(record.repoUrl ?? links?.github ?? "");
|
|
13
|
+
const match = /github\.com\/([^/]+)\/([^/?#]+)/i.exec(repoUrl);
|
|
14
|
+
const owner = match?.[1];
|
|
15
|
+
const repo = match?.[2];
|
|
16
|
+
return owner && repo ? { owner, repo: repo.replace(/\.git$/, "") } : null;
|
|
17
|
+
}
|
|
18
|
+
export async function syncContributors(options = {}) {
|
|
19
|
+
const cwd = options.cwd ?? process.cwd();
|
|
20
|
+
const generatedDir = options.generatedDir ?? "data/generated";
|
|
21
|
+
const indexPath = resolve(cwd, generatedDir, "records.index.json");
|
|
22
|
+
const outputPath = resolve(cwd, generatedDir, "contributors.json");
|
|
23
|
+
const repoStatsPath = resolve(cwd, generatedDir, "repo-stats.json");
|
|
24
|
+
const siteConfigPath = resolve(cwd, generatedDir, "site-config.json");
|
|
25
|
+
const siteConfig = JSON.parse(await readFile(siteConfigPath, "utf8"));
|
|
26
|
+
const repoUrl = options.repoUrl ?? siteConfig.repoUrl ?? "";
|
|
27
|
+
const ref = ownerRepo({ repoUrl });
|
|
28
|
+
if (!ref) {
|
|
29
|
+
throw new Error(`Cannot sync community metadata: ${indexPath} has no valid site repository URL.`);
|
|
30
|
+
}
|
|
31
|
+
const fetchImpl = options.fetchImpl ?? fetch;
|
|
32
|
+
const token = options.token ?? process.env.GH_TOKEN ?? process.env.GITHUB_TOKEN ?? "";
|
|
33
|
+
const headers = {
|
|
34
|
+
Accept: "application/vnd.github+json",
|
|
35
|
+
"User-Agent": "grove-sync-contributors",
|
|
36
|
+
"X-GitHub-Api-Version": "2022-11-28",
|
|
37
|
+
...(token ? { Authorization: `Bearer ${token}` } : {}),
|
|
38
|
+
};
|
|
39
|
+
const byUsername = new Map();
|
|
40
|
+
let failed = 0;
|
|
41
|
+
const contributorsResponse = await fetchImpl(`https://api.github.com/repos/${ref.owner}/${ref.repo}/contributors?per_page=100&anon=false`, { headers });
|
|
42
|
+
if (!contributorsResponse.ok && contributorsResponse.status !== 204) {
|
|
43
|
+
throw new Error(`GitHub contributors request failed for ${ref.owner}/${ref.repo}: ${contributorsResponse.status}`);
|
|
44
|
+
}
|
|
45
|
+
const data = contributorsResponse.status === 204
|
|
46
|
+
? []
|
|
47
|
+
: (await contributorsResponse.json());
|
|
48
|
+
for (const entry of data) {
|
|
49
|
+
if (!entry.login)
|
|
50
|
+
continue;
|
|
51
|
+
byUsername.set(entry.login, {
|
|
52
|
+
username: entry.login,
|
|
53
|
+
...(entry.avatar_url ? { avatarUrl: entry.avatar_url } : {}),
|
|
54
|
+
...(entry.html_url ? { profileUrl: entry.html_url } : {}),
|
|
55
|
+
contributions: entry.contributions ?? 0,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
const repositoryResponse = await fetchImpl(`https://api.github.com/repos/${ref.owner}/${ref.repo}`, { headers });
|
|
59
|
+
if (!repositoryResponse.ok) {
|
|
60
|
+
failed += 1;
|
|
61
|
+
}
|
|
62
|
+
const repository = repositoryResponse.ok
|
|
63
|
+
? await repositoryResponse.json()
|
|
64
|
+
: {};
|
|
65
|
+
const contributors = [...byUsername.values()].sort((a, b) => b.contributions - a.contributions ||
|
|
66
|
+
a.username.localeCompare(b.username));
|
|
67
|
+
await mkdir(dirname(outputPath), { recursive: true });
|
|
68
|
+
await writeFile(outputPath, JSON.stringify({
|
|
69
|
+
generatedAt: options.generatedAt ?? new Date().toISOString(),
|
|
70
|
+
contributors,
|
|
71
|
+
}, null, 2), "utf8");
|
|
72
|
+
await writeFile(repoStatsPath, JSON.stringify({
|
|
73
|
+
repoUrl: `https://github.com/${ref.owner}/${ref.repo}`,
|
|
74
|
+
stars: repository.stargazers_count ?? 0,
|
|
75
|
+
forks: repository.forks_count ?? 0,
|
|
76
|
+
watchers: repository.subscribers_count ?? 0,
|
|
77
|
+
openIssues: repository.open_issues_count ?? 0,
|
|
78
|
+
contributors: contributors.length,
|
|
79
|
+
defaultBranch: repository.default_branch,
|
|
80
|
+
pushedAt: repository.pushed_at,
|
|
81
|
+
}, null, 2), "utf8");
|
|
82
|
+
return {
|
|
83
|
+
outputPath,
|
|
84
|
+
repoStatsPath,
|
|
85
|
+
repositories: 1,
|
|
86
|
+
contributors: contributors.length,
|
|
87
|
+
failed,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=contributors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contributors.js","s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;QACL,UAAU;QACV,aAAa;QACb,YAAY,EAAE,CAAC;QACf,YAAY,EAAE,YAAY,CAAC,MAAM;QACjC,MAAM;KACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-safe directory discovery API.
|
|
3
|
+
*
|
|
4
|
+
* This entry point deliberately excludes config loading, filesystem IO,
|
|
5
|
+
* validation, and generation so client controllers can reuse Grove's
|
|
6
|
+
* canonical filter, sort, and lens rules without Node-only dependencies.
|
|
7
|
+
*/
|
|
8
|
+
export * from "./directory-display.js";
|
|
9
|
+
export * from "./directory-lenses.js";
|
|
10
|
+
export * from "./directory-search.js";
|
|
11
|
+
//# sourceMappingURL=directory-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directory-client.d.ts","sourceRoot":"","sources":["../src/directory-client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-safe directory discovery API.
|
|
3
|
+
*
|
|
4
|
+
* This entry point deliberately excludes config loading, filesystem IO,
|
|
5
|
+
* validation, and generation so client controllers can reuse Grove's
|
|
6
|
+
* canonical filter, sort, and lens rules without Node-only dependencies.
|
|
7
|
+
*/
|
|
8
|
+
export * from "./directory-display.js";
|
|
9
|
+
export * from "./directory-lenses.js";
|
|
10
|
+
export * from "./directory-search.js";
|
|
11
|
+
//# sourceMappingURL=directory-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directory-client.js","sourceRoot":"","sources":["../src/directory-client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display-name helpers for curation labels, statuses, lenses, and sort
|
|
3
|
+
* options. Internal ids (e.g. "hot", "stale", "production-like") stay
|
|
4
|
+
* stable for URL state and data files; this module owns the mapping
|
|
5
|
+
* from id → user-facing string.
|
|
6
|
+
*
|
|
7
|
+
* Every export here is dependency-free so it can be imported by both
|
|
8
|
+
* server-rendered Astro components and any client-side script.
|
|
9
|
+
*/
|
|
10
|
+
export type LabelId = "new" | "hot" | "mature" | "featured";
|
|
11
|
+
export declare const LABEL_DISPLAY: Record<LabelId, string>;
|
|
12
|
+
/** Returns a human-readable name for a label id, or null if unknown. */
|
|
13
|
+
export declare function labelDisplay(id: string | null | undefined): string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Canonical status ids, including the curated "needs-maintainer"
|
|
16
|
+
* composite that's emitted by the `needs-maintainer` lens (it expands
|
|
17
|
+
* to "stale,quiet" in URL state but presents as one chip).
|
|
18
|
+
*/
|
|
19
|
+
export declare const STATUS_DISPLAY: Record<string, string>;
|
|
20
|
+
export declare function statusDisplay(s: string | null | undefined): string;
|
|
21
|
+
export declare const LENS_DISPLAY: Record<string, string>;
|
|
22
|
+
export declare function lensDisplay(id: string | null | undefined): string;
|
|
23
|
+
export declare const SORT_DISPLAY: Record<string, string>;
|
|
24
|
+
export declare function sortDisplay(id: string | null | undefined): string;
|
|
25
|
+
export declare function prettySlug(value: string | null | undefined): string;
|
|
26
|
+
export declare const STATUS_OPTIONS: string[];
|
|
27
|
+
//# sourceMappingURL=directory-display.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directory-display.d.ts","sourceRoot":"","sources":["../src/directory-display.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,MAAM,MAAM,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE5D,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAKjD,CAAC;AAEF,wEAAwE;AACxE,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAGzE;AAGD;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAYjD,CAAC;AAEF,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAGlE;AAGD,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAY/C,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAGjE;AAGD,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAM/C,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAGjE;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAOnE;AAMD,eAAO,MAAM,cAAc,EAAE,MAAM,EAYlC,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display-name helpers for curation labels, statuses, lenses, and sort
|
|
3
|
+
* options. Internal ids (e.g. "hot", "stale", "production-like") stay
|
|
4
|
+
* stable for URL state and data files; this module owns the mapping
|
|
5
|
+
* from id → user-facing string.
|
|
6
|
+
*
|
|
7
|
+
* Every export here is dependency-free so it can be imported by both
|
|
8
|
+
* server-rendered Astro components and any client-side script.
|
|
9
|
+
*/
|
|
10
|
+
export const LABEL_DISPLAY = {
|
|
11
|
+
new: "Recently added",
|
|
12
|
+
hot: "Trending",
|
|
13
|
+
mature: "Established",
|
|
14
|
+
featured: "Featured",
|
|
15
|
+
};
|
|
16
|
+
/** Returns a human-readable name for a label id, or null if unknown. */
|
|
17
|
+
export function labelDisplay(id) {
|
|
18
|
+
if (!id)
|
|
19
|
+
return null;
|
|
20
|
+
return LABEL_DISPLAY[id] ?? null;
|
|
21
|
+
}
|
|
22
|
+
// ── Status ids (the `status` field on an item) ───────────────────────
|
|
23
|
+
/**
|
|
24
|
+
* Canonical status ids, including the curated "needs-maintainer"
|
|
25
|
+
* composite that's emitted by the `needs-maintainer` lens (it expands
|
|
26
|
+
* to "stale,quiet" in URL state but presents as one chip).
|
|
27
|
+
*/
|
|
28
|
+
export const STATUS_DISPLAY = {
|
|
29
|
+
active: "Active",
|
|
30
|
+
mature: "Mature",
|
|
31
|
+
quiet: "Quiet",
|
|
32
|
+
stale: "Not recently active",
|
|
33
|
+
inactive: "Inactive",
|
|
34
|
+
"needs-maintainer": "Needs maintainer",
|
|
35
|
+
archived: "Archived",
|
|
36
|
+
historical: "Historical",
|
|
37
|
+
needs_review: "Needs review",
|
|
38
|
+
unavailable: "Unavailable",
|
|
39
|
+
unknown: "Unknown",
|
|
40
|
+
};
|
|
41
|
+
export function statusDisplay(s) {
|
|
42
|
+
if (!s)
|
|
43
|
+
return STATUS_DISPLAY.unknown ?? "";
|
|
44
|
+
return STATUS_DISPLAY[s] ?? STATUS_DISPLAY.unknown ?? "";
|
|
45
|
+
}
|
|
46
|
+
// ── Lens ids (the curated tabs on /items) ────────────────────────────
|
|
47
|
+
export const LENS_DISPLAY = {
|
|
48
|
+
all: "All items",
|
|
49
|
+
new: "Recently added",
|
|
50
|
+
hot: "Trending",
|
|
51
|
+
mature: "Established",
|
|
52
|
+
"good-to-learn": "Good to learn",
|
|
53
|
+
"production-like": "Production-like",
|
|
54
|
+
"beginner-friendly": "Beginner friendly",
|
|
55
|
+
"contribution-ready": "Contribution ready",
|
|
56
|
+
launches: "Launches",
|
|
57
|
+
"actively-developed": "Active",
|
|
58
|
+
"needs-maintainer": "Needs maintainer",
|
|
59
|
+
};
|
|
60
|
+
export function lensDisplay(id) {
|
|
61
|
+
if (!id)
|
|
62
|
+
return LENS_DISPLAY.all ?? "All";
|
|
63
|
+
return LENS_DISPLAY[id] ?? id;
|
|
64
|
+
}
|
|
65
|
+
// ── Sort ids (the /items sort dropdown) ──────────────────────────────
|
|
66
|
+
export const SORT_DISPLAY = {
|
|
67
|
+
"recently-updated": "Recently updated",
|
|
68
|
+
"most-starred": "Most starred",
|
|
69
|
+
"recently-added": "Recently added",
|
|
70
|
+
"best-overall": "Best overall",
|
|
71
|
+
alphabetical: "Alphabetical",
|
|
72
|
+
};
|
|
73
|
+
export function sortDisplay(id) {
|
|
74
|
+
if (!id)
|
|
75
|
+
return SORT_DISPLAY["recently-updated"] ?? "";
|
|
76
|
+
return SORT_DISPLAY[id] ?? id;
|
|
77
|
+
}
|
|
78
|
+
export function prettySlug(value) {
|
|
79
|
+
if (!value)
|
|
80
|
+
return "";
|
|
81
|
+
return value
|
|
82
|
+
.split(/[-_]+/)
|
|
83
|
+
.filter(Boolean)
|
|
84
|
+
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
|
85
|
+
.join(" ");
|
|
86
|
+
}
|
|
87
|
+
// ── Status option list (used by filter dropdowns) ───────────────────
|
|
88
|
+
// "needs-maintainer" is included even though it's a derived/composite
|
|
89
|
+
// status — filter dropdowns and chip rendering need to offer it
|
|
90
|
+
// alongside the raw AppStatus values.
|
|
91
|
+
export const STATUS_OPTIONS = [
|
|
92
|
+
"active",
|
|
93
|
+
"mature",
|
|
94
|
+
"quiet",
|
|
95
|
+
"stale",
|
|
96
|
+
"inactive",
|
|
97
|
+
"needs-maintainer",
|
|
98
|
+
"archived",
|
|
99
|
+
"historical",
|
|
100
|
+
"needs_review",
|
|
101
|
+
"unavailable",
|
|
102
|
+
"unknown",
|
|
103
|
+
];
|
|
104
|
+
//# sourceMappingURL=directory-display.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directory-display.js","sourceRoot":"","sources":["../src/directory-display.ts"],"names":[],"mappings":"AAAA;;;;;;;;GA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