Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,24 @@ jobs:
- name: Install required binaries
run: |
./install_bins.sh

- name: Checkout BCR submodule
run: |
git submodule update --init -- data/bazel-central-registry

- name: Checkout latest commit of BCR submodule
if: ${{ !inputs.bcrCommitHash }}
working-directory: data/bazel-central-registry
run: |
git checkout origin/main

- name: Checkout specific commit of BCR submodule
if: ${{ inputs.bcrCommitHash }}
working-directory: data/bazel-central-registry
run: |
git checkout ${{ inputs.bcrCommitHash }}

- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
run: |
pnpm install --frozen-lockfile
pnpm run build

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: out
folder: out
2 changes: 2 additions & 0 deletions .github/workflows/trigger-via-bcr.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
on:
repository_dispatch:
types: [on-bcr-trigger]
permissions:
contents: write
jobs:
deploy:
uses: ./.github/workflows/deploy.yml
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "data/bazel-central-registry"]
path = data/bazel-central-registry
url = https://github.com/bazelbuild/bazel-central-registry.git
url = https://github.com/eclipse-score/bazel_registry.git
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Bazel Central Registry Web UI
# Eclipse S-CORE Bazel Registry Modules Web UI

This repository provides a web UI for the [Bazel Central Registry (BCR)](https://github.com/bazelbuild/bazel-central-registry).
It entirely consists of statically rendered pages, which are updated as soon as a new commit is pushed to the BCR.
This repository provides a web UI for the [Eclipse S‑CORE Bazel Modules Registry](https://github.com/eclipse-score/bazel_registry).
It entirely consists of statically rendered pages, which are updated as soon as a new commit is pushed to the registry.

## Contributing

We are happy about any contributions!

To get started you can take a look at our [Github issues](https://github.com/hobofan/bcr-web-ui/issues).
To get started you can take a look at our [Github issues](https://github.com/eclipse-score/bazel_registry_ui/issues).

Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the Apache-2.0
Expand All @@ -16,7 +16,7 @@ conditions.

### Getting Started

We use git submodules to include the data from bazelbuild/bazel-central-registry, so after cloning this repo you need to run:
We use git submodules to include the data from eclipse-score/bazel_registry, so after cloning this repo you need to run:

```bash
git submodule update --init
Expand All @@ -36,7 +36,7 @@ Then, run the development server:
npm run dev
```

Open <http://localhost:3000/bazel-central-registry> with your browser to see the result.
Open <http://localhost:3000/bazel_registry_ui> with your browser to see the result.

You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.

Expand Down
9 changes: 5 additions & 4 deletions components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ import React from 'react'
interface FooterProps {}

export const REPORT_LINK =
'https://github.com/bazelbuild/bazel-central-registry/tree/main/docs#requesting-to-take-down-a-module'
export const BCR_UI_REPO_LINK = 'https://github.com/bazel-contrib/bcr-ui'
'https://github.com/eclipse-score/bazel_registry/issues'
export const BCR_UI_REPO_LINK =
'https://github.com/eclipse-score/bazel_registry_ui'

export const Footer: React.FC<FooterProps> = () => {
return (
<footer className="flex flex-col items-center justify-center gap-2 h-18 mt-4 bottom-2">
<div className="text-center">
The Bazel Central Registry is maintained by the Bazel team and the Bazel
Rules authors SIG.
The Eclipse S-Core Bazel Registry is maintained by the Eclipse S-Core
team.
</div>
<div className="text-center">
To report an issue with one of the modules, see the{' '}
Expand Down
24 changes: 3 additions & 21 deletions components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { useState } from 'react'
import Link from 'next/link'
import { useRouter } from 'next/router'
import React, { useState } from 'react'

interface HeaderProps {}

export const USER_GUIDE_LINK = 'https://bazel.build/docs/bzlmod'
export const CONTRIBUTE_CTA_LINK =
'https://github.com/bazelbuild/bazel-central-registry/blob/main/docs/README.md'
'https://github.com/eclipse-score/bazel_registry/blob/main/README.md'

export const Header: React.FC<HeaderProps> = () => {
const router = useRouter()
Expand All @@ -27,7 +27,7 @@ export const Header: React.FC<HeaderProps> = () => {
<div className="flex flex-1 items-center">
<Link href="/" className="flex items-center cursor-pointer">
<span className="self-center text-xl font-semibold whitespace-nowrap text-white cursor-pointer">
Bazel Central Registry
Eclipse S-Core Bazel Registry
</span>
</Link>
</div>
Expand Down Expand Up @@ -126,24 +126,6 @@ export const Header: React.FC<HeaderProps> = () => {
/>
</form>
</div>
<ul className="flex flex-col mt-4 md:flex-row md:space-x-8 md:mt-0 md:text-sm md:font-medium">
<li>
<a
href={USER_GUIDE_LINK}
className="block py-2 pr-4 pl-3 text-white border-b border-gray-100 hover:bg-gray-50 md:hover:bg-transparent md:border-0 md:hover:text-gray-300 md:p-0"
>
Bzlmod User Guide
</a>
</li>
<li>
<a
href={CONTRIBUTE_CTA_LINK}
className="block py-2 pr-4 pl-3 text-white border-b border-gray-100 hover:bg-gray-50 md:hover:bg-transparent md:border-0 md:hover:text-gray-300 md:p-0"
>
Contribute to the BCR
</a>
</li>
</ul>
</div>
</div>
</nav>
Expand Down
2 changes: 1 addition & 1 deletion data/bazel-central-registry
7 changes: 3 additions & 4 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
const nextConfig = {
output: 'export',
reactStrictMode: true,
// for hosting under GitHub pages
basePath: '',
// Increase timeout for generating static pages from default 60s to avoid issues like:
// Restarted static page generation for /modules/xxx/y.y.y because it took more than 60 seconds
// 👇 Required for GitHub Pages under /bazel_registry_ui
basePath: '/bazel_registry_ui',
assetPrefix: '/bazel_registry_ui',
staticPageGenerationTimeout: 600,
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"execa": "^8.0.0",
"fuse.js": "^7.0.0",
"gitlog": "^4.0.4",
"next": "14.0.1",
"next": "15.5.10",
"p-memoize": "^7.1.1",
"react": "18.3.1",
"react-dom": "18.3.1"
Expand Down
12 changes: 5 additions & 7 deletions pages/all-modules.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import Fuse from 'fuse.js'
import type { NextPage } from 'next'
import { GetStaticProps } from 'next'
import Head from 'next/head'
import { Header } from '../components/Header'
import { Footer } from '../components/Footer'
import React, { useEffect, useState } from 'react'
import { useRouter } from 'next/router'
import { GetStaticProps } from 'next'
import { buildSearchIndex, SearchIndexEntry } from '../data/utils'
import Fuse from 'fuse.js'
import { Header } from '../components/Header'
import { ModuleCard } from '../components/ModuleCard'
import { buildSearchIndex, SearchIndexEntry } from '../data/utils'

interface SearchPageProps {
searchIndex: SearchIndexEntry[]
Expand All @@ -23,7 +21,7 @@ const Search: NextPage<SearchPageProps> = ({ searchIndex }) => {
return (
<div className="flex flex-col">
<Head>
<title>Bazel Central Registry</title>
<title>Eclipse S-CORE Bazel Modules Registry</title>
<link rel="icon" href="/favicon.png" />
</Head>

Expand Down
16 changes: 8 additions & 8 deletions pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { parseISO } from 'date-fns'
import type { NextPage } from 'next'
import { GetStaticProps } from 'next'
import Head from 'next/head'
import { Header } from '../components/Header'
import { Footer } from '../components/Footer'
import React, { useState } from 'react'
import { useRouter } from 'next/router'
import { buildSearchIndex, SearchIndexEntry } from '../data/utils'
import React, { useState } from 'react'
import { Footer } from '../components/Footer'
import { Header } from '../components/Header'
import { ModuleCard } from '../components/ModuleCard'
import { GetStaticProps } from 'next'
import { parseISO } from 'date-fns'
import { buildSearchIndex, SearchIndexEntry } from '../data/utils'

// TODO: fetch correct version during build
// const HIGHLIGHTED_MODULES = [
Expand Down Expand Up @@ -59,15 +59,15 @@ const Home: NextPage<HomePageProps> = ({ searchIndex }) => {
return (
<div className="flex flex-col">
<Head>
<title>Bazel Central Registry</title>
<title>Eclipse S‑CORE Bazel Modules Registry</title>
<link rel="icon" href="/favicon.png" />
</Head>

<Header />
<main className="m-4 l:m-0">
<div className="max-w-4xl w-4xl mx-auto mt-8 flex flex-col items-center">
<h1 className="text-bzl-green font-bold text-6xl">
Bazel Central Registry
Eclipse S‑CORE Bazel Modules Registry
</h1>
<form onSubmit={handleSubmitSearch} className="contents">
<input
Expand Down
10 changes: 5 additions & 5 deletions pages/modules/[module].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface ModulePageProps {
reverseDependencies: string[]
}

const GITHUB_API_USER_AGENT = 'Bazel Central Registry UI'
const GITHUB_API_USER_AGENT = 'Eclipse S-CORE Bazel Modules Registry UI'
const GITHUB_API_VERSION = '2022-11-28'

// The number of versions that should be displayed on initial page-load (before clicking "show all").
Expand Down Expand Up @@ -98,7 +98,7 @@ const ModulePage: NextPage<ModulePageProps> = ({
return (
<div className="flex flex-col">
<Head>
<title>{`Bazel Central Registry | ${module}`}</title>
<title>{`Eclipse S-CORE Bazel Modules Registry | ${module}`}</title>
<link rel="icon" href="/favicon.png" />
</Head>

Expand Down Expand Up @@ -183,13 +183,13 @@ const ModulePage: NextPage<ModulePageProps> = ({
<div className="flex p-2 justify-end">
<div className="flex flex-col justify-between items-end">
<a
href={`https://github.com/bazelbuild/bazel-central-registry/tree/main/modules/${module}/${version.version}`}
href={`https://github.com/eclipse-score/bazel_registry/tree/main/modules/${module}/${version.version}`}
className="text-link-color hover:text-link-color-hover"
>
view registry source
</a>
<a
href={`https://github.com/bazelbuild/bazel-central-registry/commit/${version.submission.hash}`}
href={`https://github.com/eclipse-score/bazel_registry/commit/${version.submission.hash}`}
className="text-link-color hover:text-link-color-hover"
suppressHydrationWarning
>
Expand Down Expand Up @@ -502,7 +502,7 @@ const useDetectReleaseFormatViaGithubApi = (
method: 'GET',
headers: {
Accept: 'application/vnd.github+json',
'User-Agent': 'Bazel Central Registry UI',
'User-Agent': GITHUB_API_USER_AGENT,
'X-GitHub-Api-Version': '2022-11-28',
},
}
Expand Down
16 changes: 8 additions & 8 deletions pages/search.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import Fuse from 'fuse.js'
import type { NextPage } from 'next'
import { GetStaticProps } from 'next'
import Head from 'next/head'
import { Header } from '../components/Header'
import { Footer } from '../components/Footer'
import React, { useEffect, useState } from 'react'
import { useRouter } from 'next/router'
import { GetStaticProps } from 'next'
import { buildSearchIndex, SearchIndexEntry } from '../data/utils'
import Fuse from 'fuse.js'
import React, { useEffect, useState } from 'react'
import { Footer } from '../components/Footer'
import { Header } from '../components/Header'
import { ModuleCard } from '../components/ModuleCard'
import { buildSearchIndex, SearchIndexEntry } from '../data/utils'

interface SearchPageProps {
searchIndex: SearchIndexEntry[]
}

const GITHUB_ISSUE_LINK =
'https://github.com/bazelbuild/bazel-central-registry/issues/new?assignees=&labels=module+wanted&template=module_wanted.yaml&title=wanted%3A+%5Bgithub+path+of+the+module%2C+e.g.+bazelbuild%2Frules_foo%5D'
'https://github.com/eclipse-score/bazel_registry/issues/new'

const Search: NextPage<SearchPageProps> = ({ searchIndex }) => {
const [searchResults, setSearchResults] = useState<SearchIndexEntry[]>([])
Expand Down Expand Up @@ -61,7 +61,7 @@ const Search: NextPage<SearchPageProps> = ({ searchIndex }) => {
return (
<div className="flex flex-col">
<Head>
<title>Bazel Central Registry</title>
<title>Eclipse S‑CORE Bazel Modules Registry</title>
<link rel="icon" href="/favicon.png" />
</Head>

Expand Down
Loading