mirror of
https://github.com/evroon/bracket.git
synced 2026-03-04 15:22:34 -05:00
2d3bcc110f70c811e746bfabdf0abe1c5a627a5d
Bumps [swr](https://github.com/vercel/swr) from 2.0.0 to 2.0.3. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/vercel/swr/releases">swr's releases</a>.</em></p> <blockquote> <h2>v2.0.3</h2> <h2>Patches</h2> <ul> <li> <p>fix: parameters passed to subscribe is inconsistent with its declaration by <a href="https://github.com/hong24"><code>@hong24</code></a> in <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2353">vercel/swr#2353</a></p> </li> <li> <p>fix: when inifinite key changes, should use cached pagesize instead of initialSize by <a href="https://github.com/promer94"><code>@promer94</code></a> in <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2386">vercel/swr#2386</a></p> </li> <li> <p>fix: make compare function only compare data (<a href="https://github-redirect.dependabot.com/vercel/swr/issues/2375">#2375</a>) by <a href="https://github.com/Retrospection"><code>@Retrospection</code></a> and <a href="https://github.com/promer94"><code>@promer94</code></a> in <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2387">vercel/swr#2387</a> <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2389">vercel/swr#2389</a></p> </li> <li> <p>fix: initial loading state should be false with revalidation is disabed by <a href="https://github.com/promer94"><code>@promer94</code></a> in <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2382">vercel/swr#2382</a></p> </li> <li> <p>fix: Ensure hydration matches the SSR result during streaming by <a href="https://github.com/shuding"><code>@shuding</code></a> in <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2391">vercel/swr#2391</a></p> </li> </ul> <h2>Chores</h2> <ul> <li>ci: only run release when tags pushed by <a href="https://github.com/promer94"><code>@promer94</code></a> in <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2388">vercel/swr#2388</a></li> <li>unify <code>-</code> characters in README.md by <a href="https://github.com/JanKaifer"><code>@JanKaifer</code></a> in <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2334">vercel/swr#2334</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/hong24"><code>@hong24</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2353">vercel/swr#2353</a></li> <li><a href="https://github.com/Retrospection"><code>@Retrospection</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2387">vercel/swr#2387</a></li> <li><a href="https://github.com/JanKaifer"><code>@JanKaifer</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2334">vercel/swr#2334</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/vercel/swr/compare/v2.0.2...v2.0.3">https://github.com/vercel/swr/compare/v2.0.2...v2.0.3</a></p> <h2>v2.0.2</h2> <h2>Patches</h2> <ul> <li>fix: delay revalidation if a key is already active and has error by <a href="https://github.com/promer94"><code>@promer94</code></a> in <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2338">vercel/swr#2338</a></li> <li>fix: createCacheHelper type by <a href="https://github.com/promer94"><code>@promer94</code></a> in <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2365">vercel/swr#2365</a></li> </ul> <h2>Chores</h2> <ul> <li>release workflow by <a href="https://github.com/huozhi"><code>@huozhi</code></a> in <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2374">vercel/swr#2374</a>, <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2381">vercel/swr#2381</a>, <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2383">vercel/swr#2383</a>, <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2384">vercel/swr#2384</a>, <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2385">vercel/swr#2385</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/vercel/swr/compare/v2.0.1...v2.0.2">https://github.com/vercel/swr/compare/v2.0.1...v2.0.2</a></p> <h2>v2.0.1</h2> <p>In this patch release, we majorly improved typing support and SWR can infer the types based on the configuration.</p> <ul> <li>When the <code>suspense</code> option is <code>true</code>, the returned <code>data</code> will exclude <code>undefined</code> and the <code>isLoading</code> will always be <code>false</code>.</li> <li>When the <code>fallbackData</code> option is provided, the returned <code>data</code> will be the same type of <code>fallbackData</code>, and the <code>isLoading</code> will always be <code>false</code>.</li> </ul> <p>Here's a demo for it:</p> <p><a href="https://user-images.githubusercontent.com/4800338/213288879-ffbeeeb5-aca5-4a65-8229-69fbf9b0bf70.mp4">https://user-images.githubusercontent.com/4800338/213288879-ffbeeeb5-aca5-4a65-8229-69fbf9b0bf70.mp4</a></p> <h2>What's Changed</h2> <ul> <li>types: make FullConfiguration generic by <a href="https://github.com/huozhi"><code>@huozhi</code></a> in <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2273">vercel/swr#2273</a></li> <li>type: enforce array literal as tuple by <a href="https://github.com/promer94"><code>@promer94</code></a> in <a href="https://github-redirect.dependabot.com/vercel/swr/pull/2283">vercel/swr#2283</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="903de33428"><code>903de33</code></a> 2.0.3</li> <li><a href="6fa714ba02"><code>6fa714b</code></a> fix: Ensure hydration matches the SSR result during streaming (<a href="https://github-redirect.dependabot.com/vercel/swr/issues/2391">#2391</a>)</li> <li><a href="77f922fe44"><code>77f922f</code></a> unify <code>-</code> characters in README.md (<a href="https://github-redirect.dependabot.com/vercel/swr/issues/2334">#2334</a>)</li> <li><a href="d603bb6483"><code>d603bb6</code></a> fix: initial loading state should be false with revalidation is disabed (<a href="https://github-redirect.dependabot.com/vercel/swr/issues/2382">#2382</a>)</li> <li><a href="cc97171e42"><code>cc97171</code></a> test: add test case for <a href="https://github-redirect.dependabot.com/vercel/swr/issues/2375">#2375</a> (<a href="https://github-redirect.dependabot.com/vercel/swr/issues/2389">#2389</a>)</li> <li><a href="e188ad9c3d"><code>e188ad9</code></a> fix: make compare function only compare data (<a href="https://github-redirect.dependabot.com/vercel/swr/issues/2375">#2375</a>) (<a href="https://github-redirect.dependabot.com/vercel/swr/issues/2387">#2387</a>)</li> <li><a href="8847ddcf83"><code>8847ddc</code></a> ci: only run release when tags pushed (<a href="https://github-redirect.dependabot.com/vercel/swr/issues/2388">#2388</a>)</li> <li><a href="8cc79324bc"><code>8cc7932</code></a> fix: when inifinite key changes, should use cached pagesize instead of initia...</li> <li><a href="33954d7b66"><code>33954d7</code></a> fix: parameters passed to subscribe is inconsistent with its declaration (<a href="https://github-redirect.dependabot.com/vercel/swr/issues/2353">#2353</a>)</li> <li><a href="c0090ab95b"><code>c0090ab</code></a> build: fix typos in workflow yml (<a href="https://github-redirect.dependabot.com/vercel/swr/issues/2385">#2385</a>)</li> <li>Additional commits viewable in <a href="https://github.com/vercel/swr/compare/2.0.0...v2.0.3">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bracket
Ladder tournament system meant to be easy to use. Bracket is written in async Python (with FastAPI) and Next.js as frontend using the Mantine library.
Preview
Setup
Database
First create a bracket cluster:
sudo pg_createcluster -u postgres -p 5532 13 bracket
pg_ctlcluster 13 bracket start
Subsequently, create a new bracket_dev database:
sudo -Hu postgres psql -p 5532
CREATE USER bracket_dev WITH PASSWORD 'bracket_dev';
CREATE DATABASE bracket_dev OWNER bracket_dev;
You can do the same but replace the user and database name with:
bracket_ci: for running testsbracket_prod: for a production database
The database URL can be specified per environment in the .env files (see config).
Config
Copy ci.env to prod.env and fill in the values:
PG_DSN: The URL of the PostgreSQL databaseJWT_SECRET: Create a random secret usingopenssl rand -hex 32CORS_ORIGINSandCORS_ORIGIN_REGEX: Specify allowed frontend domain names for CORS (see the FastAPI docs)ADMIN_EMAILandADMIN_PASSWORD: The credentials of the admin user, which is created when initializing the database
Running the frontend and backend
The following starts the frontend and backend for local development:
Frontend
cd frontend
yarn
npm run dev
Backend
cd backend
pipenv install -d
pipenv shell
./run.sh
Languages
TypeScript
51.1%
Python
47.6%
CSS
0.8%
Dockerfile
0.2%