Skip to content

Commit 047cd36

Browse files
authored
fix(registry): include unsuffixed logos in index, add logo SVG API (#48)
* fix(registry): include unsuffixed logos in index, add logo SVG API The logos index was built with `name.endsWith("-logo")`, which silently excluded every logo whose item name carries no suffix. All 35 AWS service logos (aws-s3, aws-lambda, ...) were published and reachable but invisible to logos-index.json and therefore to @tryelements/cli. Filter on the `logo` category instead, excluding bundle items under _bundles/. Type is not a reliable discriminator here: 28 individual logos (docker, figma, linear, resend, ...) are typed registry:block. Index: 171 -> 206, matching the 206 logo directories on disk. SVG generation: - Derive the list from logos-index.json so it cannot drift from the index - Resolve module-level constants, string arrays rendered via .map(), and sub-components returning static JSX. amp, antigravity, codex and zep previously emitted raw JSX - Reject output containing unresolved expressions instead of writing a broken file and counting it as a success - Clear the output directory so removed logos leave no stale files, while still writing the historical `<slug>-logo.svg` names that are already published All 377 emitted files validate as XML. Add /api/logos returning a logo as svg, json (viewBox, paths, monochrome) or dataurl, and /api/logos/all for the whole catalog in one request, so non-React consumers do not have to parse the JSX component source. * chore(registry): rebuild manifests with all 206 logos
1 parent 5ecc481 commit 047cd36

219 files changed

Lines changed: 4534 additions & 370 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

next.config.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,23 @@ const nextConfig: NextConfig = {
99
"@registry": path.resolve(__dirname, "./registry"),
1010
},
1111
},
12+
async headers() {
13+
return [
14+
{
15+
// Raw SVGs are a public asset API: allow cross-origin reads and cache
16+
// them hard, since a given logo file only changes on a registry build.
17+
source: "/r/svg/:path*",
18+
headers: [
19+
{ key: "Access-Control-Allow-Origin", value: "*" },
20+
{
21+
key: "Cache-Control",
22+
value:
23+
"public, max-age=3600, s-maxage=86400, stale-while-revalidate=604800",
24+
},
25+
],
26+
},
27+
];
28+
},
1229
};
1330

1431
export default nextConfig;

public/r/hooks-index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"generated": "2026-04-21T06:19:40.673Z",
2+
"generated": "2026-08-08T01:03:21.342Z",
33
"count": 12,
44
"hooks": [
55
{

public/r/logos-index.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,42 @@
88
"apple",
99
"astro",
1010
"auth0",
11+
"aws-amplify",
12+
"aws-api-gateway",
13+
"aws-appsync",
14+
"aws-athena",
15+
"aws-bedrock",
16+
"aws-cloudformation",
17+
"aws-cloudfront",
18+
"aws-cloudwatch",
19+
"aws-codebuild",
20+
"aws-codecommit",
21+
"aws-codedeploy",
22+
"aws-codepipeline",
23+
"aws-cognito",
24+
"aws-dynamodb",
25+
"aws-ec2",
26+
"aws-ecs",
27+
"aws-eks",
28+
"aws-elastic-beanstalk",
29+
"aws-eventbridge",
30+
"aws-fargate",
31+
"aws-glue",
32+
"aws-iam",
33+
"aws-kinesis",
34+
"aws-kms",
35+
"aws-lambda",
1136
"aws",
37+
"aws-rds",
38+
"aws-redshift",
39+
"aws-route53",
40+
"aws-s3",
41+
"aws-sagemaker",
42+
"aws-secrets-manager",
43+
"aws-sns",
44+
"aws-sqs",
45+
"aws-step-functions",
46+
"aws-vpc",
1247
"axiom",
1348
"bash",
1449
"beincrypto",

public/r/sfx-index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"generated": "2026-04-21T06:19:38.077Z",
2+
"generated": "2026-08-08T01:03:18.786Z",
33
"count": 17,
44
"sounds": [
55
{

public/r/svg/ably.svg

Lines changed: 14 additions & 0 deletions
Loading

public/r/svg/agentmail.svg

Lines changed: 33 additions & 0 deletions
Loading

public/r/svg/algolia.svg

Lines changed: 10 additions & 0 deletions
Loading

public/r/svg/amp-logo.svg

Lines changed: 3 additions & 3 deletions
Loading

public/r/svg/amp.svg

Lines changed: 10 additions & 0 deletions
Loading

public/r/svg/anthropic.svg

Lines changed: 11 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)