Harden ignores and remove dev artifacts
- Expand .gitignore with secret/IDE/log patterns - Add .vercelignore to keep dev artifacts out of future deploys - Remove test-game.py, test-screenshots/, preview_*.png, rocket_preview.png - Update AGENTS.md remote (stale GitHub link -> Gitea)
28
.gitignore
vendored
@@ -4,3 +4,31 @@ dist
|
||||
*.local
|
||||
.DS_Store
|
||||
.vercel
|
||||
|
||||
# Secrets
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
*.pem
|
||||
*.key
|
||||
*.p12
|
||||
secrets.json
|
||||
credentials.json
|
||||
|
||||
# IDE / OS
|
||||
.vscode/
|
||||
.idea/
|
||||
*.swp
|
||||
Thumbs.db
|
||||
|
||||
# Logs / cache
|
||||
*.log
|
||||
.cache/
|
||||
.parcel-cache/
|
||||
.eslintcache
|
||||
|
||||
# Dev artifacts (excluded from repo)
|
||||
test-screenshots/
|
||||
test-game.py
|
||||
preview_*.png
|
||||
rocket_preview.png
|
||||
|
||||
24
.vercelignore
Normal file
@@ -0,0 +1,24 @@
|
||||
# Dev artifacts — not needed in Vercel deployment
|
||||
test-game.py
|
||||
test-screenshots/
|
||||
preview_*.png
|
||||
rocket_preview.png
|
||||
|
||||
# Docs / agent notes
|
||||
AGENTS.md
|
||||
|
||||
# Source control
|
||||
.git/
|
||||
.gitignore
|
||||
.gitattributes
|
||||
|
||||
# Local env / IDE
|
||||
.env
|
||||
.env.*
|
||||
.vscode/
|
||||
.idea/
|
||||
*.log
|
||||
|
||||
# Build artifacts that Vercel regenerates
|
||||
node_modules/
|
||||
.vite/
|
||||
@@ -53,7 +53,8 @@ npm run preview # превью production-сборки локально
|
||||
- Не деплоить самостоятельно, даже если есть токен/доступ.
|
||||
|
||||
## Git
|
||||
- **Remote:** `https://github.com/anril44/sender2.git`
|
||||
- **Remote:** `https://гитея.рф/git/AnRil/naddie-jump.git` (Gitea, не GitHub)
|
||||
- Ветка по умолчанию: `main`
|
||||
- Репозиторий `.git/` находится в корне проекта `naddie-jump/`
|
||||
|
||||
## Зависимости
|
||||
|
||||
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
72
test-game.py
@@ -1,72 +0,0 @@
|
||||
from playwright.sync_api import sync_playwright
|
||||
import time
|
||||
import os
|
||||
|
||||
screenshots_dir = "/home/anril/naddie-jump/test-screenshots"
|
||||
os.makedirs(screenshots_dir, exist_ok=True)
|
||||
|
||||
console_errors = []
|
||||
console_logs = []
|
||||
|
||||
def handle_console(msg):
|
||||
console_logs.append(f"[{msg.type}] {msg.text}")
|
||||
if msg.type == "error":
|
||||
console_errors.append(msg.text)
|
||||
|
||||
with sync_playwright() as p:
|
||||
browser = p.chromium.launch(headless=True)
|
||||
context = browser.new_context(viewport={"width": 480, "height": 854})
|
||||
page = context.new_page()
|
||||
page.on("console", handle_console)
|
||||
page.on("pageerror", lambda err: console_errors.append(str(err)))
|
||||
|
||||
print("Opening game...")
|
||||
page.goto("http://localhost:5173/")
|
||||
time.sleep(2)
|
||||
|
||||
# Screenshot 1: Menu
|
||||
page.screenshot(path=f"{screenshots_dir}/01-menu.png")
|
||||
print("Screenshot: menu")
|
||||
|
||||
# Click START GAME
|
||||
print("Clicking START GAME...")
|
||||
page.click("text=START GAME")
|
||||
time.sleep(1)
|
||||
|
||||
# Screenshot 2: Game start
|
||||
page.screenshot(path=f"{screenshots_dir}/02-game-start.png")
|
||||
print("Screenshot: game start")
|
||||
|
||||
# Simulate gameplay - press left/right arrows
|
||||
print("Simulating gameplay...")
|
||||
for i in range(30):
|
||||
if i % 4 < 2:
|
||||
page.keyboard.press("ArrowRight")
|
||||
else:
|
||||
page.keyboard.press("ArrowLeft")
|
||||
time.sleep(0.15)
|
||||
|
||||
# Screenshot 3: After playing
|
||||
page.screenshot(path=f"{screenshots_dir}/03-gameplay.png")
|
||||
print("Screenshot: gameplay")
|
||||
|
||||
time.sleep(2)
|
||||
|
||||
# Screenshot 4: Final state
|
||||
page.screenshot(path=f"{screenshots_dir}/04-final.png")
|
||||
print("Screenshot: final")
|
||||
|
||||
browser.close()
|
||||
|
||||
print("\n=== CONSOLE LOGS ===")
|
||||
for log in console_logs:
|
||||
print(log)
|
||||
|
||||
print("\n=== ERRORS ===")
|
||||
if console_errors:
|
||||
for err in console_errors:
|
||||
print(err)
|
||||
else:
|
||||
print("No errors!")
|
||||
|
||||
print(f"\nScreenshots saved to: {screenshots_dir}")
|
||||
|
Before Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 79 KiB |