Initial commit: KSEF PDF Generator from GitHub
This commit is contained in:
179
DEPLOYMENT-PRODUCTION.md
Normal file
179
DEPLOYMENT-PRODUCTION.md
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
# Wdrażanie KSEF na produkcję (www.sic.pl/ksef/)
|
||||||
|
|
||||||
|
## Krok 1: Przygotuj artefakty na maszynie lokalnej
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /home/ms/projekty/fv-ksef-nodejs/ksef-pdf-generator
|
||||||
|
|
||||||
|
# Zbuduj aplikację SPA
|
||||||
|
npm run build:app
|
||||||
|
|
||||||
|
# Powinnien powstać folder dist-app/ z zawartością:
|
||||||
|
ls -la dist-app/
|
||||||
|
# index.html
|
||||||
|
# assets/index-HASH.js
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Krok 2: Prześlij pliki na serwer docelowy (10.1.1.3)
|
||||||
|
|
||||||
|
### 2a. Skopiuj artefakty aplikacji
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Z lokalnej maszyny prześlij dist-app/* do /var/www/ksef/
|
||||||
|
scp -r dist-app/* ms@10.1.1.3:/home/ms/projekty/ksef/
|
||||||
|
|
||||||
|
# LUB jeśli bezpośrednio na serwerze, skopiuj z repo:
|
||||||
|
scp -r dist-app/* ms@10.1.1.3:/var/www/ksef/
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2b. Na serwerze docelowym, ustaw uprawnienia
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Zaloguj się na serwer:
|
||||||
|
ssh ms@10.1.1.3
|
||||||
|
|
||||||
|
# Stwórz folder jeśli go nie ma
|
||||||
|
sudo mkdir -p /var/www/ksef
|
||||||
|
|
||||||
|
# Ustaw właściciela i uprawnienia
|
||||||
|
sudo chown -R www-data:www-data /var/www/ksef
|
||||||
|
sudo chmod -R 755 /var/www/ksef
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Krok 3: Zaktualizuj nginx config
|
||||||
|
|
||||||
|
### 3a. Prześlij nowy default.conf
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Z lokalnego repo
|
||||||
|
scp default.conf ms@10.1.1.3:/home/ms/
|
||||||
|
|
||||||
|
# Lub na serwerze, utwórz plik:
|
||||||
|
nano /etc/nginx/conf.d/default.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3b. Na serwerze docelowym, zastąp config
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Backup starego configu
|
||||||
|
sudo cp /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.backup
|
||||||
|
|
||||||
|
# Wstaw nowy config (z wdrażanego repo)
|
||||||
|
sudo cp /home/ms/default.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
# LUB ręcznie: skopiuj zawartość pliku z repo i wklej do /etc/nginx/conf.d/default.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Krok 4: Zweryfikuj nginx config i restartuj
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Na serwerze: sprawdź składnię
|
||||||
|
sudo nginx -t
|
||||||
|
|
||||||
|
# Jeśli "syntax is ok, test successful":
|
||||||
|
sudo systemctl restart nginx
|
||||||
|
|
||||||
|
# Sprawdź status
|
||||||
|
sudo systemctl status nginx
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Krok 5: Testowanie
|
||||||
|
|
||||||
|
Otwórz w przeglądarce:
|
||||||
|
- **http://www.sic.pl/ksef/** ← aplikacja PDF Generator
|
||||||
|
- **http://www.sic.pl/** ← pozostała zawartość www.sic.pl (bez zmian)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Struktura na serwerze docelowym
|
||||||
|
|
||||||
|
```
|
||||||
|
/var/www/
|
||||||
|
├── sic/ ← istniejąca zawartość www.sic.pl
|
||||||
|
├── esbr/ ← istniejąca zawartość www.esbr.pl
|
||||||
|
├── sobczak/ ← istniejąca zawartość www.sobczak.org
|
||||||
|
└── ksef/ ← NOWA: aplikacja KSEF
|
||||||
|
├── index.html (punkt wejścia, no-cache)
|
||||||
|
└── assets/
|
||||||
|
└── index-HASH.js (cached)
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Logi i debugowanie
|
||||||
|
|
||||||
|
Na serwerze:
|
||||||
|
```bash
|
||||||
|
# Logi dostępu
|
||||||
|
sudo tail -f /var/log/nginx/access.log | grep ksef
|
||||||
|
|
||||||
|
# Logi błędów
|
||||||
|
sudo tail -f /var/log/nginx/error.log
|
||||||
|
|
||||||
|
# Test zaraz po starcie
|
||||||
|
curl -I http://localhost/ksef/
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Aktualizacja aplikacji (dla przyszłych wersji)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Lokalnie: zbuduj nową wersję
|
||||||
|
npm run build:app
|
||||||
|
|
||||||
|
# Prześlij do serwera
|
||||||
|
scp -r dist-app/* ms@10.1.1.3:/var/www/ksef/
|
||||||
|
|
||||||
|
# nginx automatycznie serwuje nową wersję
|
||||||
|
# (index.html nie ma cache, assety mają nowe hashe)
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Jeśli coś nie działa
|
||||||
|
|
||||||
|
### Problem: 404 na `/ksef/`
|
||||||
|
|
||||||
|
**Powody:**
|
||||||
|
1. Folder `/var/www/ksef/` nie istnieje lub nie ma contentu
|
||||||
|
2. `index.html` nie jest w `/var/www/ksef/`
|
||||||
|
3. Błędy uprawnienia (nginx nie może czytać)
|
||||||
|
|
||||||
|
**Rozwiązanie:**
|
||||||
|
```bash
|
||||||
|
# Sprawdź zawartość
|
||||||
|
ls -la /var/www/ksef/
|
||||||
|
|
||||||
|
# Sprawdź uprawnienia
|
||||||
|
stat /var/www/ksef/
|
||||||
|
|
||||||
|
# Ustaw uprawnienia na nowo
|
||||||
|
sudo chown -R www-data:www-data /var/www/ksef/
|
||||||
|
sudo chmod -R 755 /var/www/ksef/
|
||||||
|
```
|
||||||
|
|
||||||
|
### Problem: assety (JS/CSS) nie ładują się
|
||||||
|
|
||||||
|
**Powód:** Zła ścieżka w `alias` w nginx config
|
||||||
|
|
||||||
|
**Sprawdzenie:**
|
||||||
|
```bash
|
||||||
|
# Sprawdź co jest w dist-app/assets/
|
||||||
|
ls -la /var/www/ksef/assets/
|
||||||
|
|
||||||
|
# Jeśli puste, znaczy że dist-app/ nie został skopiowany poprawnie
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Gotowe!** Po wykonaniu powyższych kroków, aplikacja powinna być dostępna na 🎉
|
||||||
|
**http://www.sic.pl/ksef/**
|
||||||
159
DEPLOYMENT.md
Normal file
159
DEPLOYMENT.md
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
# Instrukcja Deployment aplikacji KSEF PDF Generator na nginx
|
||||||
|
|
||||||
|
## 1. Przygotowanie artefaktów
|
||||||
|
|
||||||
|
Aplikacja została już zbudowana do folderu `dist-app/`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /home/ms/projekty/fv-ksef-nodejs/ksef-pdf-generator
|
||||||
|
|
||||||
|
# Jeśli potrzebujesz ponownie zbudować:
|
||||||
|
npm run build:app
|
||||||
|
```
|
||||||
|
|
||||||
|
Zawartość `dist-app/`:
|
||||||
|
- `index.html` - główny plik HTML (punkt wejścia SPA)
|
||||||
|
- `assets/` - folder ze skonkatenowanymi JS, CSS i zasobami
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Deployment na serwer docelowy
|
||||||
|
|
||||||
|
### a) Zkopuj artefakty do serwera
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Lokalnie, na maszynie z kodem:
|
||||||
|
scp -r dist-app/ user@www.sic.pl:/var/www/ksef/
|
||||||
|
|
||||||
|
# LUB jeśli deployment robisz z serwera:
|
||||||
|
scp -r /home/ms/projekty/fv-ksef-nodejs/ksef-pdf-generator/dist-app/ /var/www/ksef/
|
||||||
|
```
|
||||||
|
|
||||||
|
### b) Upewnij się, że nginx ma uprawnienia
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo chown -R www-data:www-data /var/www/ksef/
|
||||||
|
sudo chmod -R 755 /var/www/ksef/
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Konfiguracja nginx
|
||||||
|
|
||||||
|
### Opcja A: Dodaj blok do istniejącego `/etc/nginx/nginx.conf`
|
||||||
|
|
||||||
|
1. Otwórz `/etc/nginx/nginx.conf`:
|
||||||
|
```bash
|
||||||
|
sudo nano /etc/nginx/nginx.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
2. W sekcji `http {}` dodaj:
|
||||||
|
```nginx
|
||||||
|
include /etc/nginx/conf.d/ksef.conf;
|
||||||
|
```
|
||||||
|
|
||||||
|
### Opcja B: Utwórz osobny plik konfigu
|
||||||
|
|
||||||
|
1. Zkopuj `nginx-ksef.conf` z repozytorium:
|
||||||
|
```bash
|
||||||
|
sudo cp nginx-ksef.conf /etc/nginx/conf.d/ksef.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **WAŻNE:** Edytuj `/etc/nginx/conf.d/ksef.conf` i zmień scieżki:
|
||||||
|
```nginx
|
||||||
|
# ZMIEŃ TĘ LINIĘ:
|
||||||
|
root /home/ms/projekty/fv-ksef-nodejs/ksef-pdf-generator/dist-app;
|
||||||
|
alias /home/ms/projekty/fv-ksef-nodejs/ksef-pdf-generator/dist-app/;
|
||||||
|
|
||||||
|
# NA TWOJE ŚCIEŻKI W PRODUKCJI, np:
|
||||||
|
root /var/www/ksef;
|
||||||
|
alias /var/www/ksef/;
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Testowanie konfigu i restartowanie nginx
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Sprawdź składnię konfigu
|
||||||
|
sudo nginx -t
|
||||||
|
|
||||||
|
# Jeśli OK, restartuj nginx
|
||||||
|
sudo systemctl restart nginx
|
||||||
|
|
||||||
|
# Lub reload (bez drop current connections):
|
||||||
|
sudo systemctl reload nginx
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. Weryfikacja
|
||||||
|
|
||||||
|
Otwórz w przeglądarce: **http://www.sic.pl/ksef/**
|
||||||
|
|
||||||
|
Powinieneś zobaczyć interfejs aplikacji z polami do wgrania XML-ów.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. Logi i debugowanie
|
||||||
|
|
||||||
|
Logi nginx:
|
||||||
|
```bash
|
||||||
|
sudo tail -f /var/log/nginx/ksef-access.log
|
||||||
|
sudo tail -f /var/log/nginx/ksef-error.log
|
||||||
|
```
|
||||||
|
|
||||||
|
Jeśli widzisz błędy 404 na asetach, sprawdź:
|
||||||
|
- Ścieżkę w `alias` / `root`
|
||||||
|
- Uprawnienia folderu `/var/www/ksef/`
|
||||||
|
- Że `dist-app/index.html` istnieje
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. HTTPS (SSL/TLS)
|
||||||
|
|
||||||
|
Aby używać HTTPS:
|
||||||
|
|
||||||
|
1. Uzyskaj certyfikat (np. Let's Encrypt):
|
||||||
|
```bash
|
||||||
|
sudo certbot certonly --webroot -w /var/www/ksef -d www.sic.pl
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Odkomentuj blok `server { listen 443 ssl ... }` w `nginx-ksef.conf` i wstaw ścieżki certyfikatu.
|
||||||
|
|
||||||
|
3. Konfiguruj HTTP → HTTPS redirect.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 8. Aktualizacja aplikacji (CI/CD)
|
||||||
|
|
||||||
|
Podczas deployment nowej wersji:
|
||||||
|
|
||||||
|
1. Zbuduj aplikację lokalnie:
|
||||||
|
```bash
|
||||||
|
npm run build:app
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Zkopuj do serwera (zastępując starą wersję):
|
||||||
|
```bash
|
||||||
|
scp -r dist-app/* user@www.sic.pl:/var/www/ksef/
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Cache przeglądarki: ponieważ `index.html` nie ma cache (`max-age=0`),
|
||||||
|
przeglądarki zawsze pobiorą najnowszą wersję przy następnej wizycie.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Struktura produkcji
|
||||||
|
|
||||||
|
```
|
||||||
|
/var/www/ksef/
|
||||||
|
├── index.html (punkt wejścia, no cache)
|
||||||
|
├── assets/
|
||||||
|
│ ├── index-HASH.js (bundled app, cached)
|
||||||
|
│ └── index-HASH.css (bundled styles, cached)
|
||||||
|
```
|
||||||
|
|
||||||
|
--
|
||||||
|
|
||||||
|
**Gotowe!** Aplikacja powinna być dostępna na `http://www.sic.pl/ksef/` 🚀
|
||||||
62
default.conf
Normal file
62
default.conf
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
# Serwer www.sic.pl z projektem KSEF
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name www.sic.pl;
|
||||||
|
root /var/www/sic;
|
||||||
|
index index.html index.htm;
|
||||||
|
|
||||||
|
# Kompresja
|
||||||
|
gzip on;
|
||||||
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||||
|
gzip_min_length 1000;
|
||||||
|
|
||||||
|
# Lokacja /ksef/ - aplikacja PDF Generator
|
||||||
|
location /ksef/ {
|
||||||
|
alias /var/www/ksef/;
|
||||||
|
|
||||||
|
# Obsługa SPA: spróbuj plik, jeśli nie istnieje spróbuj index.html
|
||||||
|
try_files $uri $uri/ /ksef/index.html;
|
||||||
|
|
||||||
|
# Buforowanie: index.html bez cache
|
||||||
|
location = /ksef/index.html {
|
||||||
|
add_header Cache-Control "public, max-age=0, must-revalidate";
|
||||||
|
add_header X-Content-Type-Options "nosniff";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Buforowanie: statyczne assety z cache (1 rok)
|
||||||
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||||
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Zabezpieczenia
|
||||||
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||||
|
add_header X-Content-Type-Options "nosniff" always;
|
||||||
|
add_header X-XSS-Protection "1; mode=block" always;
|
||||||
|
add_header Referrer-Policy "no-referrer-when-downgrade" always;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Serwer www.esbr.pl
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name www.esbr.pl;
|
||||||
|
root /var/www/esbr;
|
||||||
|
index index.html index.htm;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Serwer www.sobczak.org
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name www.sobczak.org;
|
||||||
|
root /var/www/sobczak;
|
||||||
|
index index.html index.php;
|
||||||
|
|
||||||
|
auth_basic "Dostep zastrzezony"; # Tekst, który pojawi się w oknie logowania
|
||||||
|
auth_basic_user_file /etc/nginx/.htpasswd; # Ścieżka do pliku z hasłami
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
include snippets/fastcgi-php.conf;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
77
deploy.sh
Executable file
77
deploy.sh
Executable file
@@ -0,0 +1,77 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Skrypt deploymentu KSEF na serwer produkcji
|
||||||
|
# Użycie: ./deploy.sh <user@host> <remote_dir>
|
||||||
|
|
||||||
|
set -e # Exit on error
|
||||||
|
|
||||||
|
# Kolory dla output
|
||||||
|
RED='\033[0;31m'
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
|
# Parametry
|
||||||
|
REMOTE_HOST="${1:-ms@10.1.1.3}"
|
||||||
|
REMOTE_DIR="${2:-/var/www/ksef}"
|
||||||
|
|
||||||
|
echo -e "${YELLOW}🚀 KSEF Deployment Script${NC}"
|
||||||
|
echo "Remote host: $REMOTE_HOST"
|
||||||
|
echo "Remote dir: $REMOTE_DIR"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Krok 1: Build aplikacji
|
||||||
|
echo -e "${YELLOW}1️⃣ Building application...${NC}"
|
||||||
|
if [ ! -d "src/app-public" ]; then
|
||||||
|
echo -e "${RED}❌ Error: src/app-public not found. Run from project root!${NC}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
npm run build:app
|
||||||
|
|
||||||
|
if [ ! -d "dist-app" ]; then
|
||||||
|
echo -e "${RED}❌ Error: dist-app not created!${NC}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo -e "${GREEN}✓ Build complete${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Krok 2: Sprawdzenie SSH dostępu
|
||||||
|
echo -e "${YELLOW}2️⃣ Checking SSH access...${NC}"
|
||||||
|
if ! ssh -q "$REMOTE_HOST" "test -d /var/www"; then
|
||||||
|
echo -e "${RED}❌ SSH connection failed or /var/www not found${NC}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo -e "${GREEN}✓ SSH OK${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Krok 3: Stworzenie folderu
|
||||||
|
echo -e "${YELLOW}3️⃣ Creating remote directory...${NC}"
|
||||||
|
ssh "$REMOTE_HOST" "mkdir -p $REMOTE_DIR"
|
||||||
|
echo -e "${GREEN}✓ Directory ready${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Krok 4: Upload artefaktów
|
||||||
|
echo -e "${YELLOW}4️⃣ Uploading files...${NC}"
|
||||||
|
scp -r dist-app/* "$REMOTE_HOST:$REMOTE_DIR/"
|
||||||
|
echo -e "${GREEN}✓ Files uploaded${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Krok 5: Ustaw uprawnienia
|
||||||
|
echo -e "${YELLOW}5️⃣ Setting permissions...${NC}"
|
||||||
|
ssh "$REMOTE_HOST" "sudo chown -R www-data:www-data $REMOTE_DIR && sudo chmod -R 755 $REMOTE_DIR"
|
||||||
|
echo -e "${GREEN}✓ Permissions set${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Krok 6: Reload nginx
|
||||||
|
echo -e "${YELLOW}6️⃣ Reloading nginx...${NC}"
|
||||||
|
ssh "$REMOTE_HOST" "sudo nginx -t && sudo systemctl reload nginx"
|
||||||
|
echo -e "${GREEN}✓ Nginx reloaded${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo -e "${GREEN}✅ Deployment complete!${NC}"
|
||||||
|
echo -e "Application running at: ${YELLOW}http://www.sic.pl/ksef/${NC}"
|
||||||
|
echo ""
|
||||||
|
echo "Logs:"
|
||||||
|
echo " Errors: ssh $REMOTE_HOST 'sudo tail -f /var/log/nginx/error.log'"
|
||||||
|
echo " Access: ssh $REMOTE_HOST 'sudo tail -f /var/log/nginx/access.log | grep ksef'"
|
||||||
282
dist-app/assets/index-BOCrZ8tn.js
Normal file
282
dist-app/assets/index-BOCrZ8tn.js
Normal file
File diff suppressed because one or more lines are too long
26
dist-app/index.html
Normal file
26
dist-app/index.html
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<title>XML Parser</title>
|
||||||
|
<script type="module" crossorigin src="/ksef/assets/index-BOCrZ8tn.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>📄 XML Parser</h1>
|
||||||
|
|
||||||
|
<h2>Wygeneruj fakture:</h2>
|
||||||
|
<input
|
||||||
|
accept=".xml"
|
||||||
|
id="xmlInput"
|
||||||
|
type="file"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<h2>Wygeneruj UPO:</h2>
|
||||||
|
<input
|
||||||
|
accept=".xml"
|
||||||
|
id="xmlInputUPO"
|
||||||
|
type="file"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
81
git-init.sh
Executable file
81
git-init.sh
Executable file
@@ -0,0 +1,81 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Skrypt commitowania projektu na Gitea
|
||||||
|
# Użycie: ./git-init.sh [gitea_user] [gitea_repo]
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Parametry
|
||||||
|
GITEA_USER="${1:-mirek}"
|
||||||
|
GITEA_REPO="${2:-ksef-pdf-generator}"
|
||||||
|
GITEA_URL="https://10.1.1.1:30008/${GITEA_USER}/${GITEA_REPO}.git"
|
||||||
|
|
||||||
|
# Kolory
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
NC='\033[0m'
|
||||||
|
|
||||||
|
echo -e "${YELLOW}🚀 Git initialization for Gitea${NC}"
|
||||||
|
echo "Gitea URL: $GITEA_URL"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Krok 1: Konfiguracja git (ignorowanie cert dla self-signed)
|
||||||
|
echo -e "${YELLOW}1️⃣ Configuring git...${NC}"
|
||||||
|
git config --global http.sslVerify false
|
||||||
|
git config user.name "Mirek SIC"
|
||||||
|
git config user.email "mirek@sic.pl"
|
||||||
|
echo -e "${GREEN}✓ Git configured${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Krok 2: Inicjalizacja repozytorium
|
||||||
|
echo -e "${YELLOW}2️⃣ Initializing repository...${NC}"
|
||||||
|
if [ ! -d ".git" ]; then
|
||||||
|
git init
|
||||||
|
git checkout -b main
|
||||||
|
else
|
||||||
|
echo "Repository already initialized"
|
||||||
|
fi
|
||||||
|
echo -e "${GREEN}✓ Repository ready${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Krok 3: Dodanie remote
|
||||||
|
echo -e "${YELLOW}3️⃣ Adding remote origin...${NC}"
|
||||||
|
if git remote | grep -q origin; then
|
||||||
|
echo "Removing existing origin..."
|
||||||
|
git remote remove origin
|
||||||
|
fi
|
||||||
|
git remote add origin "$GITEA_URL"
|
||||||
|
echo -e "${GREEN}✓ Remote added: $GITEA_URL${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Krok 4: Stage i commit
|
||||||
|
echo -e "${YELLOW}4️⃣ Staging and committing...${NC}"
|
||||||
|
git add .
|
||||||
|
git commit -m "Initial commit: KSEF PDF Generator from GitHub" --allow-empty || true
|
||||||
|
echo -e "${GREEN}✓ Changes committed${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Krok 5: Push do Gitea
|
||||||
|
echo -e "${YELLOW}5️⃣ Pushing to Gitea...${NC}"
|
||||||
|
git push -u origin main 2>&1 || (
|
||||||
|
echo ""
|
||||||
|
echo -e "${YELLOW}⚠️ Push failed. Debug info:${NC}"
|
||||||
|
echo "URL: $GITEA_URL"
|
||||||
|
echo "Credentials: mirek@sic.pl"
|
||||||
|
echo ""
|
||||||
|
echo "Opcje debugowania:"
|
||||||
|
echo " GIT_TRACE=1 git push -u origin main"
|
||||||
|
echo " git remote -v"
|
||||||
|
exit 1
|
||||||
|
)
|
||||||
|
echo -e "${GREEN}✓ Push successful${NC}"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo -e "${GREEN}✅ Git setup complete!${NC}"
|
||||||
|
echo ""
|
||||||
|
echo "Repository: $GITEA_URL"
|
||||||
|
echo ""
|
||||||
|
echo "Dalsze komendy:"
|
||||||
|
echo " git status"
|
||||||
|
echo " git log --oneline"
|
||||||
|
echo " git push origin main"
|
||||||
|
echo " git pull origin main"
|
||||||
63
nginx-ksef.conf
Normal file
63
nginx-ksef.conf
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
# Konfiguracja nginx dla aplikacji KSEF PDF Generator
|
||||||
|
# Umieść ten blok w konfigu nginx w sekcji http lub server
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name www.sic.pl;
|
||||||
|
|
||||||
|
# Ścieżka do zbudowanej aplikacji
|
||||||
|
root /home/ms/projekty/fv-ksef-nodejs/ksef-pdf-generator/dist-app;
|
||||||
|
|
||||||
|
# Kompresja
|
||||||
|
gzip on;
|
||||||
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||||
|
gzip_min_length 1000;
|
||||||
|
|
||||||
|
# Lokacja /ksef/
|
||||||
|
location /ksef/ {
|
||||||
|
# Alias do dist-app
|
||||||
|
alias /home/ms/projekty/fv-ksef-nodejs/ksef-pdf-generator/dist-app/;
|
||||||
|
|
||||||
|
# Obsługa SPA: spróbuj plik, jeśli nie istnieje spróbuj index.html
|
||||||
|
try_files $uri $uri/ /ksef/index.html;
|
||||||
|
|
||||||
|
# Buforowanie: index.html bez cache
|
||||||
|
location = /ksef/index.html {
|
||||||
|
add_header Cache-Control "public, max-age=0, must-revalidate";
|
||||||
|
add_header X-Content-Type-Options "nosniff";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Buforowanie: statyczne assety z cache
|
||||||
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||||
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Zabezpieczenia
|
||||||
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||||
|
add_header X-Content-Type-Options "nosniff" always;
|
||||||
|
add_header X-XSS-Protection "1; mode=block" always;
|
||||||
|
add_header Referrer-Policy "no-referrer-when-downgrade" always;
|
||||||
|
|
||||||
|
# Logi
|
||||||
|
access_log /var/log/nginx/ksef-access.log;
|
||||||
|
error_log /var/log/nginx/ksef-error.log;
|
||||||
|
}
|
||||||
|
|
||||||
|
# HTTPS (opcjonalne, wymaga certyfikatu)
|
||||||
|
# server {
|
||||||
|
# listen 443 ssl http2;
|
||||||
|
# server_name www.sic.pl;
|
||||||
|
#
|
||||||
|
# ssl_certificate /path/to/cert.pem;
|
||||||
|
# ssl_certificate_key /path/to/key.pem;
|
||||||
|
#
|
||||||
|
# # ... reszta konfigu jak wyżej
|
||||||
|
# }
|
||||||
|
#
|
||||||
|
# # Redirect HTTP -> HTTPS
|
||||||
|
# server {
|
||||||
|
# listen 80;
|
||||||
|
# server_name www.sic.pl;
|
||||||
|
# return 301 https://$server_name$request_uri;
|
||||||
|
# }
|
||||||
425
package-lock.json
generated
425
package-lock.json
generated
@@ -185,6 +185,431 @@
|
|||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@esbuild/aix-ppc64": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-0NFWnA+7l41irNuaSVlLfgNT12caWJVLzp5eAVhZ0z1qpxbockccEt3s+149rE64VUI3Ml2zt8Nv5JVc4QXTsw==",
|
||||||
|
"cpu": [
|
||||||
|
"ppc64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"aix"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/android-arm": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-dQAxF1dW1C3zpeCDc5KqIYuZ1tgAdRXNoZP7vkBIRtKZPYe2xVr/d3SkirklCHudW1B45tGiUlz2pUWDfbDD4w==",
|
||||||
|
"cpu": [
|
||||||
|
"arm"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"android"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/android-arm64": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-LSQa7eDahypv/VO6WKohZGPSJDq5OVOo3UoFR1E4t4Gj1W7zEQMUhI+lo81H+DtB+kP+tDgBp+M4oNCwp6kffg==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"android"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/android-x64": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-MiC9CWdPrfhibcXwr39p9ha1x0lZJ9KaVfvzA0Wxwz9ETX4v5CHfF09bx935nHlhi+MxhA63dKRRQLiVgSUtEg==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"android"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/darwin-arm64": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-JC74bdXcQEpW9KkV326WpZZjLguSZ3DfS8wrrvPMHgQOIEIG/sPXEN/V8IssoJhbefLRcRqw6RQH2NnpdprtMA==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/darwin-x64": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-tguWg1olF6DGqzws97pKZ8G2L7Ig1vjDmGTwcTuYHbuU6TTjJe5FXbgs5C1BBzHbJ2bo1m3WkQDbWO2PvamRcg==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/freebsd-arm64": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-3ZioSQSg1HT2N05YxeJWYR+Libe3bREVSdWhEEgExWaDtyFbbXWb49QgPvFH8u03vUPX10JhJPcz7s9t9+boWg==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"freebsd"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/freebsd-x64": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-LLgJfHJk014Aa4anGDbh8bmI5Lk+QidDmGzuC2D+vP7mv/GeSN+H39zOf7pN5N8p059FcOfs2bVlrRr4SK9WxA==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"freebsd"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-arm": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-oR31GtBTFYCqEBALI9r6WxoU/ZofZl962pouZRTEYECvNF/dtXKku8YXcJkhgK/beU+zedXfIzHijSRapJY3vg==",
|
||||||
|
"cpu": [
|
||||||
|
"arm"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-arm64": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-5luJWN6YKBsawd5f9i4+c+geYiVEw20FVW5x0v1kEMWNq8UctFjDiMATBxLvmmHA4bf7F6hTRaJgtghFr9iziQ==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-ia32": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-NrSCx2Kim3EnnWgS4Txn0QGt0Xipoumb6z6sUtl5bOEZIVKhzfyp/Lyw4C1DIYvzeW/5mWYPBFJU3a/8Yr75DQ==",
|
||||||
|
"cpu": [
|
||||||
|
"ia32"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-loong64": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-xoSphrd4AZda8+rUDDfD9J6FUMjrkTz8itpTITM4/xgerAZZcFW7Dv+sun7333IfKxGG8gAq+3NbfEMJfiY+Eg==",
|
||||||
|
"cpu": [
|
||||||
|
"loong64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-mips64el": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-ab6eiuCwoMmYDyTnyptoKkVS3k8fy/1Uvq7Dj5czXI6DF2GqD2ToInBI0SHOp5/X1BdZ26RKc5+qjQNGRBelRA==",
|
||||||
|
"cpu": [
|
||||||
|
"mips64el"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-ppc64": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-NLinzzOgZQsGpsTkEbdJTCanwA5/wozN9dSgEl12haXJBzMTpssebuXR42bthOF3z7zXFWH1AmvWunUCkBE4EA==",
|
||||||
|
"cpu": [
|
||||||
|
"ppc64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-riscv64": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-FE557XdZDrtX8NMIeA8LBJX3dC2M8VGXwfrQWU7LB5SLOajfJIxmSdyL/gU1m64Zs9CBKvm4UAuBp5aJ8OgnrA==",
|
||||||
|
"cpu": [
|
||||||
|
"riscv64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-s390x": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-3BBSbgzuB9ajLoVZk0mGu+EHlBwkusRmeNYdqmznmMc9zGASFjSsxgkNsqmXugpPk00gJ0JNKh/97nxmjctdew==",
|
||||||
|
"cpu": [
|
||||||
|
"s390x"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-x64": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-QSX81KhFoZGwenVyPoberggdW1nrQZSvfVDAIUXr3WqLRZGZqWk/P4T8p2SP+de2Sr5HPcvjhcJzEiulKgnxtA==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/netbsd-arm64": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-AKQM3gfYfSW8XRk8DdMCzaLUFB15dTrZfnX8WXQoOUpUBQ+NaAFCP1kPS/ykbbGYz7rxn0WS48/81l9hFl3u4A==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"netbsd"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/netbsd-x64": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-7RTytDPGU6fek/hWuN9qQpeGPBZFfB4zZgcz2VK2Z5VpdUxEI8JKYsg3JfO0n/Z1E/6l05n0unDCNc4HnhQGig==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"netbsd"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/openbsd-arm64": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-5Se0VM9Wtq797YFn+dLimf2Zx6McttsH2olUBsDml+lm0GOCRVebRWUvDtkY4BWYv/3NgzS8b/UM3jQNh5hYyw==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"openbsd"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/openbsd-x64": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-XkA4frq1TLj4bEMB+2HnI0+4RnjbuGZfet2gs/LNs5Hc7D89ZQBHQ0gL2ND6Lzu1+QVkjp3x1gIcPKzRNP8bXw==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"openbsd"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/openharmony-arm64": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-AVTSBhTX8Y/Fz6OmIVBip9tJzZEUcY8WLh7I59+upa5/GPhh2/aM6bvOMQySspnCCHvFi79kMtdJS1w0DXAeag==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"openharmony"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/sunos-x64": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-fswk3XT0Uf2pGJmOpDB7yknqhVkJQkAQOcW/ccVOtfx05LkbWOaRAtn5SaqXypeKQra1QaEa841PgrSL9ubSPQ==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"sunos"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/win32-arm64": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-ah+9b59KDTSfpaCg6VdJoOQvKjI33nTaQr4UluQwW7aEwZQsbMCfTmfEO4VyewOxx4RaDT/xCy9ra2GPWmO7Kw==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"win32"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/win32-ia32": {
|
||||||
|
"version": "0.25.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.10.tgz",
|
||||||
|
"integrity": "sha512-QHPDbKkrGO8/cz9LKVnJU22HOi4pxZnZhhA2HYHez5Pz4JeffhDjf85E57Oyco163GnzNCVkZK0b/n4Y0UHcSw==",
|
||||||
|
"cpu": [
|
||||||
|
"ia32"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"win32"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@eslint-community/eslint-utils": {
|
"node_modules/@eslint-community/eslint-utils": {
|
||||||
"version": "4.9.0",
|
"version": "4.9.0",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --mode public --config vite.config.ts",
|
"dev": "vite --mode public --config vite.config.ts",
|
||||||
"build": "vite build --mode production",
|
"build": "vite build --mode production",
|
||||||
|
"build:app": "vite build --config vite.app.config.ts",
|
||||||
"type": "tsc -p src/app-public/tsconfig.json --noEmit",
|
"type": "tsc -p src/app-public/tsconfig.json --noEmit",
|
||||||
"test": "vitest",
|
"test": "vitest",
|
||||||
"test:ui": "vitest --ui",
|
"test:ui": "vitest --ui",
|
||||||
@@ -53,4 +54,4 @@
|
|||||||
"pdfmake": "^0.2.20",
|
"pdfmake": "^0.2.20",
|
||||||
"xml-js": "^1.6.11"
|
"xml-js": "^1.6.11"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
19
vite.app.config.ts
Normal file
19
vite.app.config.ts
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import path from 'path';
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
root: path.resolve(__dirname, 'src/app-public'),
|
||||||
|
base: '/ksef/',
|
||||||
|
|
||||||
|
build: {
|
||||||
|
outDir: path.resolve(__dirname, 'dist-app'),
|
||||||
|
emptyOutDir: true,
|
||||||
|
minify: 'esbuild',
|
||||||
|
sourcemap: false,
|
||||||
|
},
|
||||||
|
|
||||||
|
server: {
|
||||||
|
port: 5173,
|
||||||
|
open: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user