Compare commits

..

No commits in common. "2046af1407ddb54a44efe6f0c80e410b8bccec72" and "7ee9163f76462b94663c543a986a3d0a3ffc58c6" have entirely different histories.

2 changed files with 7 additions and 8 deletions

View File

@ -11,7 +11,7 @@ const DATA_DIR = process.env.DATA_DIR!
const TOES_URL = process.env.TOES_URL!
const MAX_VERSIONS = 5
const REPOS_DIR = resolve(DATA_DIR, 'repos')
const REPOS_DIR = join(DATA_DIR, 'repos')
const VALID_NAME = /^[a-zA-Z0-9_-]+$/
const app = new Hype({ prettyHTML: false, layout: false })
@ -412,8 +412,8 @@ app.get('/styles.css', c =>
c.text(baseStyles + stylesToCSS(), 200, { 'Content-Type': 'text/css; charset=utf-8' }),
)
// GET /:repo[.git]/info/refs?service=git-upload-pack|git-receive-pack
app.on('GET', ['/:repo{.+\\.git}/info/refs', '/:repo/info/refs'], async c => {
// GET /:repo.git/info/refs?service=git-upload-pack|git-receive-pack
app.get('/:repo{.+\\.git}/info/refs', async c => {
const repoParam = c.req.param('repo').replace(/\.git$/, '')
const service = c.req.query('service')
@ -438,8 +438,8 @@ app.on('GET', ['/:repo{.+\\.git}/info/refs', '/:repo/info/refs'], async c => {
return res ?? c.text('Repository not found', 404)
})
// POST /:repo[.git]/git-upload-pack
app.on('POST', ['/:repo{.+\\.git}/git-upload-pack', '/:repo/git-upload-pack'], async c => {
// POST /:repo.git/git-upload-pack
app.post('/:repo{.+\\.git}/git-upload-pack', async c => {
const repoParam = c.req.param('repo').replace(/\.git$/, '')
if (!validRepoName(repoParam)) {
@ -454,8 +454,8 @@ app.on('POST', ['/:repo{.+\\.git}/git-upload-pack', '/:repo/git-upload-pack'], a
return gitRpc(repoParam, 'git-upload-pack', c.req.raw.body)
})
// POST /:repo[.git]/git-receive-pack
app.on('POST', ['/:repo{.+\\.git}/git-receive-pack', '/:repo/git-receive-pack'], async c => {
// POST /:repo.git/git-receive-pack
app.post('/:repo{.+\\.git}/git-receive-pack', async c => {
const repoParam = c.req.param('repo').replace(/\.git$/, '')
if (!validRepoName(repoParam)) {

View File

@ -8,7 +8,6 @@ export const VitalsSection = define('VitalsSection', {
gap: 24,
width: '100%',
maxWidth: 800,
margin: '0 auto',
variants: {
narrow: {
gap: 12,