Compare commits
2 Commits
7ad95550eb
...
66ead03f49
| Author | SHA1 | Date | |
|---|---|---|---|
| 66ead03f49 | |||
| 72de545282 |
35
.gitea/workflows/ci.yml
Normal file
35
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
quality:
|
||||
name: Lint, typecheck and build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
cache-dependency-path: package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
||||
- name: Typecheck
|
||||
run: npm run typecheck
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,3 +5,4 @@ out
|
||||
!.env.example
|
||||
npm-debug.log*
|
||||
.DS_Store
|
||||
tsconfig.tsbuildinfo
|
||||
|
||||
@@ -23,12 +23,13 @@ Wymagany jest Node.js 20.9 lub nowszy.
|
||||
npm install
|
||||
npm run dev
|
||||
npm run lint
|
||||
npm run typecheck
|
||||
npm run build
|
||||
npm run start
|
||||
npm run notifications:worker
|
||||
```
|
||||
|
||||
Repozytorium nie ma obecnie skryptu testów, osobnego skryptu type-check ani formattera. `npm run build` uruchamia kontrolę TypeScript wykonywaną przez Next.js. `npm run notifications:worker` uruchamia osobny proces Node do cyklicznego wywoływania endpointów Web Push na self-hostingu; wczytuje `.env` i `.env.local`, ale nadal wymaga równolegle działającego `npm run start` albo poprawnego `WTR_APP_URL`. Nie opisuj ani nie uruchamiaj nieistniejących komend jako standardowego workflow.
|
||||
Repozytorium nie ma obecnie skryptu testów ani formattera. `npm run typecheck` uruchamia `tsc --noEmit`, a `npm run build` uruchamia produkcyjny build Next.js. `npm run notifications:worker` uruchamia osobny proces Node do cyklicznego wywoływania endpointów Web Push na self-hostingu; wczytuje `.env` i `.env.local`, ale nadal wymaga równolegle działającego `npm run start` albo poprawnego `WTR_APP_URL`. Nie opisuj ani nie uruchamiaj nieistniejących komend jako standardowego workflow.
|
||||
|
||||
## Konwencje kodu
|
||||
|
||||
|
||||
15
README.md
15
README.md
@@ -63,11 +63,24 @@ Przykład znajduje się w [.env.example](.env.example).
|
||||
| --- | --- |
|
||||
| `npm run dev` | Uruchamia serwer deweloperski Next.js. |
|
||||
| `npm run lint` | Uruchamia ESLint. |
|
||||
| `npm run typecheck` | Uruchamia `tsc --noEmit`. |
|
||||
| `npm run build` | Buduje aplikację produkcyjnie i uruchamia kontrolę TypeScript wykonywaną przez Next.js. |
|
||||
| `npm run start` | Uruchamia zbudowaną aplikację. |
|
||||
| `npm run notifications:worker` | Uruchamia self-hostowany worker powiadomień. Wymaga działającej aplikacji Next.js. |
|
||||
|
||||
Repozytorium nie ma obecnie osobnego skryptu testów, type-check ani formattera.
|
||||
Repozytorium nie ma obecnie skryptu testów ani formattera.
|
||||
|
||||
## CI
|
||||
|
||||
Repozytorium używa Gitea Actions. Workflow znajduje się w [.gitea/workflows/ci.yml](.gitea/workflows/ci.yml) i uruchamia się przy pushu do `main` oraz przy pull requestach.
|
||||
|
||||
Pipeline działa na `ubuntu-latest`, instaluje zależności przez `npm ci`, a następnie uruchamia:
|
||||
|
||||
- `npm run lint`,
|
||||
- `npm run typecheck`,
|
||||
- `npm run build`.
|
||||
|
||||
Na instancji Gitea musi być włączony Actions runner kompatybilny z etykietą `ubuntu-latest`.
|
||||
|
||||
## Struktura Projektu
|
||||
|
||||
|
||||
@@ -354,17 +354,17 @@ export function SettingsPage() {
|
||||
<ThemeToggle />
|
||||
</SettingsRow>
|
||||
<SettingsRow icon={Wind} title={t("settings.units.wind.title")} description={t("settings.units.wind.description")}>
|
||||
<div className="surface-control inline-flex rounded-control p-1" role="radiogroup" aria-label={t("settings.units.wind.label")}>
|
||||
<div className="surface-control inline-flex rounded-full p-1" role="radiogroup" aria-label={t("settings.units.wind.label")}>
|
||||
{WIND_SPEED_UNITS.map((unit) => (
|
||||
<button
|
||||
key={unit}
|
||||
type="button"
|
||||
role="radio"
|
||||
aria-checked={windSpeedUnit === unit}
|
||||
className={`rounded-[calc(var(--radius-control)-0.25rem)] px-3 py-1.5 text-sm font-medium transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent ${
|
||||
className={`min-w-14 rounded-full border px-3.5 py-1.5 text-sm font-medium transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent ${
|
||||
windSpeedUnit === unit
|
||||
? "bg-accent text-accent-foreground shadow-soft"
|
||||
: "text-muted hover:text-foreground"
|
||||
? "border-accent/45 bg-accent/10 text-accent shadow-soft"
|
||||
: "border-transparent text-muted hover:bg-surface-muted/70 hover:text-foreground"
|
||||
}`}
|
||||
onClick={() => setWindSpeedUnit(unit)}
|
||||
>
|
||||
|
||||
@@ -73,10 +73,11 @@ Przed zakończeniem zmian uruchamiaj:
|
||||
|
||||
```bash
|
||||
npm run lint
|
||||
npm run typecheck
|
||||
npm run build
|
||||
```
|
||||
|
||||
Repozytorium nie ma obecnie osobnego skryptu testów, osobnego skryptu type-check ani formattera.
|
||||
Repozytorium nie ma obecnie skryptu testów ani formattera.
|
||||
|
||||
## Bezpieczeństwo Zależności
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "eslint .",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"notifications:worker": "node scripts/notification-worker.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
Reference in New Issue
Block a user