mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-09 22:07:53 -06:00
Compare commits
4 Commits
9bf8d0428c
...
7eb4705b7c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7eb4705b7c | ||
|
|
a98ad23348 | ||
|
|
3e08720b43 | ||
|
|
c306e992c4 |
219
.github/dependabot.yml
vendored
219
.github/dependabot.yml
vendored
@@ -1,20 +1,227 @@
|
|||||||
|
# Dependabot Configuration
|
||||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||||
|
#
|
||||||
|
# Strategy:
|
||||||
|
# - Weekly checks for faster vulnerability detection
|
||||||
|
# - Separate patch/minor/major updates to prevent blocking
|
||||||
|
# - Group by crate (game vs server) for easier review
|
||||||
|
# - Auto-merge patches via GitHub branch protection rules
|
||||||
|
# - Limit concurrent PRs to avoid spam
|
||||||
|
|
||||||
version: 2
|
version: 2
|
||||||
updates:
|
updates:
|
||||||
|
# Game: Patch updates (auto-mergeable)
|
||||||
- package-ecosystem: "cargo"
|
- package-ecosystem: "cargo"
|
||||||
directory: "/"
|
directory: "/pacman"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "monthly"
|
interval: "weekly"
|
||||||
|
day: "monday"
|
||||||
|
open-pull-requests-limit: 5
|
||||||
groups:
|
groups:
|
||||||
dependencies:
|
game-patches:
|
||||||
|
applies-to: "version-updates"
|
||||||
|
update-types:
|
||||||
|
- "patch"
|
||||||
|
ignore:
|
||||||
|
# Bevy ECS 0.17+ requires API migration - ignore until manual update
|
||||||
|
- dependency-name: "bevy_ecs"
|
||||||
|
versions: ["0.17.x", "0.18.x", "0.19.x"]
|
||||||
|
labels:
|
||||||
|
- "dependencies"
|
||||||
|
- "dependencies:patch"
|
||||||
|
- "game"
|
||||||
|
|
||||||
|
# Game: Minor updates (grouped, manual review)
|
||||||
|
- package-ecosystem: "cargo"
|
||||||
|
directory: "/pacman"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "monday"
|
||||||
|
open-pull-requests-limit: 5
|
||||||
|
groups:
|
||||||
|
game-minor:
|
||||||
|
applies-to: "version-updates"
|
||||||
|
update-types:
|
||||||
|
- "minor"
|
||||||
|
ignore:
|
||||||
|
- dependency-name: "bevy_ecs"
|
||||||
|
versions: ["0.17.x", "0.18.x", "0.19.x"]
|
||||||
|
labels:
|
||||||
|
- "dependencies"
|
||||||
|
- "dependencies:minor"
|
||||||
|
- "game"
|
||||||
|
|
||||||
|
# Game: Major updates (separate PRs, manual review)
|
||||||
|
- package-ecosystem: "cargo"
|
||||||
|
directory: "/pacman"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "monday"
|
||||||
|
open-pull-requests-limit: 5
|
||||||
|
groups:
|
||||||
|
game-major:
|
||||||
|
applies-to: "version-updates"
|
||||||
|
update-types:
|
||||||
|
- "major"
|
||||||
|
ignore:
|
||||||
|
- dependency-name: "bevy_ecs"
|
||||||
|
versions: ["0.17.x", "0.18.x", "0.19.x"]
|
||||||
|
labels:
|
||||||
|
- "dependencies"
|
||||||
|
- "dependencies:major"
|
||||||
|
- "game"
|
||||||
|
|
||||||
|
# Server: Patch updates (auto-mergeable)
|
||||||
|
- package-ecosystem: "cargo"
|
||||||
|
directory: "/pacman-server"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "monday"
|
||||||
|
open-pull-requests-limit: 5
|
||||||
|
groups:
|
||||||
|
server-patches:
|
||||||
|
applies-to: "version-updates"
|
||||||
|
update-types:
|
||||||
|
- "patch"
|
||||||
|
ignore:
|
||||||
|
# jsonwebtoken 10+ requires crypto backend feature flag - ignore until manual migration
|
||||||
|
- dependency-name: "jsonwebtoken"
|
||||||
|
versions: ["10.x", "11.x"]
|
||||||
|
labels:
|
||||||
|
- "dependencies"
|
||||||
|
- "dependencies:patch"
|
||||||
|
- "server"
|
||||||
|
|
||||||
|
# Server: Minor updates (grouped, manual review)
|
||||||
|
- package-ecosystem: "cargo"
|
||||||
|
directory: "/pacman-server"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "monday"
|
||||||
|
open-pull-requests-limit: 5
|
||||||
|
groups:
|
||||||
|
server-minor:
|
||||||
|
applies-to: "version-updates"
|
||||||
|
update-types:
|
||||||
|
- "minor"
|
||||||
|
ignore:
|
||||||
|
- dependency-name: "jsonwebtoken"
|
||||||
|
versions: ["10.x", "11.x"]
|
||||||
|
labels:
|
||||||
|
- "dependencies"
|
||||||
|
- "dependencies:minor"
|
||||||
|
- "server"
|
||||||
|
|
||||||
|
# Server: Major updates (separate PRs, manual review)
|
||||||
|
- package-ecosystem: "cargo"
|
||||||
|
directory: "/pacman-server"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "monday"
|
||||||
|
open-pull-requests-limit: 5
|
||||||
|
groups:
|
||||||
|
server-major:
|
||||||
|
applies-to: "version-updates"
|
||||||
|
update-types:
|
||||||
|
- "major"
|
||||||
|
ignore:
|
||||||
|
- dependency-name: "jsonwebtoken"
|
||||||
|
versions: ["10.x", "11.x"]
|
||||||
|
labels:
|
||||||
|
- "dependencies"
|
||||||
|
- "dependencies:major"
|
||||||
|
- "server"
|
||||||
|
|
||||||
|
# Frontend: Patch updates (auto-mergeable)
|
||||||
|
- package-ecosystem: "npm"
|
||||||
|
directory: "/web"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "monday"
|
||||||
|
open-pull-requests-limit: 5
|
||||||
|
groups:
|
||||||
|
frontend-patches:
|
||||||
|
applies-to: "version-updates"
|
||||||
|
update-types:
|
||||||
|
- "patch"
|
||||||
|
labels:
|
||||||
|
- "dependencies"
|
||||||
|
- "dependencies:patch"
|
||||||
|
- "frontend"
|
||||||
|
|
||||||
|
# Frontend: Minor updates (grouped, manual review)
|
||||||
|
- package-ecosystem: "npm"
|
||||||
|
directory: "/web"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "monday"
|
||||||
|
open-pull-requests-limit: 5
|
||||||
|
groups:
|
||||||
|
frontend-minor:
|
||||||
|
applies-to: "version-updates"
|
||||||
|
update-types:
|
||||||
|
- "minor"
|
||||||
|
labels:
|
||||||
|
- "dependencies"
|
||||||
|
- "dependencies:minor"
|
||||||
|
- "frontend"
|
||||||
|
|
||||||
|
# Frontend: Major updates (separate PRs for critical deps)
|
||||||
|
- package-ecosystem: "npm"
|
||||||
|
directory: "/web"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "monday"
|
||||||
|
open-pull-requests-limit: 5
|
||||||
|
groups:
|
||||||
|
frontend-major-framework:
|
||||||
|
applies-to: "version-updates"
|
||||||
|
update-types:
|
||||||
|
- "major"
|
||||||
patterns:
|
patterns:
|
||||||
- "*"
|
- "react"
|
||||||
|
- "react-dom"
|
||||||
|
- "vike"
|
||||||
|
- "vite"
|
||||||
|
labels:
|
||||||
|
- "dependencies"
|
||||||
|
- "dependencies:major"
|
||||||
|
- "frontend"
|
||||||
|
- "framework"
|
||||||
|
|
||||||
|
# Frontend: Other major updates (grouped)
|
||||||
|
- package-ecosystem: "npm"
|
||||||
|
directory: "/web"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "monday"
|
||||||
|
open-pull-requests-limit: 5
|
||||||
|
groups:
|
||||||
|
frontend-major-other:
|
||||||
|
applies-to: "version-updates"
|
||||||
|
update-types:
|
||||||
|
- "major"
|
||||||
|
exclude-patterns:
|
||||||
|
- "react"
|
||||||
|
- "react-dom"
|
||||||
|
- "vike"
|
||||||
|
- "vite"
|
||||||
|
labels:
|
||||||
|
- "dependencies"
|
||||||
|
- "dependencies:major"
|
||||||
|
- "frontend"
|
||||||
|
|
||||||
|
# GitHub Actions: All updates grouped (low risk)
|
||||||
- package-ecosystem: "github-actions"
|
- package-ecosystem: "github-actions"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "monthly"
|
interval: "weekly"
|
||||||
|
day: "monday"
|
||||||
|
open-pull-requests-limit: 5
|
||||||
groups:
|
groups:
|
||||||
dependencies:
|
github-actions:
|
||||||
patterns:
|
patterns:
|
||||||
- "*"
|
- "*"
|
||||||
|
labels:
|
||||||
|
- "dependencies"
|
||||||
|
- "github-actions"
|
||||||
|
|||||||
16
.github/workflows/deploy.yaml
vendored
16
.github/workflows/deploy.yaml
vendored
@@ -120,10 +120,14 @@ jobs:
|
|||||||
- name: Wait for registry propagation
|
- name: Wait for registry propagation
|
||||||
run: sleep 5
|
run: sleep 5
|
||||||
|
|
||||||
# Deploy to Railway
|
# Deploy to Railway - separate job to use container properly
|
||||||
|
deploy:
|
||||||
|
name: Deploy to Railway
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build-and-deploy
|
||||||
|
container: ghcr.io/railwayapp/cli:latest
|
||||||
|
env:
|
||||||
|
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
|
||||||
|
steps:
|
||||||
- name: Deploy to Railway
|
- name: Deploy to Railway
|
||||||
uses: docker://ghcr.io/railwayapp/cli:latest
|
run: railway redeploy --service pac-man -y
|
||||||
env:
|
|
||||||
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
|
|
||||||
with:
|
|
||||||
args: up --service pac-man
|
|
||||||
|
|||||||
3
Justfile
3
Justfile
@@ -36,7 +36,8 @@ samply:
|
|||||||
|
|
||||||
# Build the project for Emscripten
|
# Build the project for Emscripten
|
||||||
web *args:
|
web *args:
|
||||||
bun run pacman/web.build.ts {{args}};
|
bun run pacman/web.build.ts {{args}}
|
||||||
|
bun run --cwd web build
|
||||||
caddy file-server --root web/dist/client
|
caddy file-server --root web/dist/client
|
||||||
|
|
||||||
# Fix linting errors & formatting
|
# Fix linting errors & formatting
|
||||||
|
|||||||
@@ -521,7 +521,7 @@ impl Game {
|
|||||||
stage_system.in_set(GameplaySet::Respond),
|
stage_system.in_set(GameplaySet::Respond),
|
||||||
(
|
(
|
||||||
(|mut dirty: ResMut<RenderDirty>, score: Res<ScoreResource>, stage: Res<GameStage>| {
|
(|mut dirty: ResMut<RenderDirty>, score: Res<ScoreResource>, stage: Res<GameStage>| {
|
||||||
dirty.0 = score.is_changed() || stage.is_changed();
|
dirty.0 |= score.is_changed() || stage.is_changed();
|
||||||
}),
|
}),
|
||||||
dirty_render_system.run_if(|dirty: Res<RenderDirty>| dirty.0.not()),
|
dirty_render_system.run_if(|dirty: Res<RenderDirty>| dirty.0.not()),
|
||||||
combined_render_system,
|
combined_render_system,
|
||||||
|
|||||||
9
web/pages/index/+Layout.tsx
Normal file
9
web/pages/index/+Layout.tsx
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import "../../layouts/tailwind.css";
|
||||||
|
|
||||||
|
export default function GameLayout({ children }: { children: React.ReactNode }) {
|
||||||
|
return (
|
||||||
|
<div className="bg-black text-yellow-400 min-h-screen flex flex-col">
|
||||||
|
<main className="flex-1">{children}</main>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -2,32 +2,27 @@ import { useEffect } from "react";
|
|||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Only setup Module if not already configured (prevents double-initialization on hot reload)
|
|
||||||
if (!(window as any).Module) {
|
if (!(window as any).Module) {
|
||||||
const canvas = document.getElementById("canvas");
|
const canvas = document.getElementById("canvas");
|
||||||
|
|
||||||
// Simple Module configuration matching the original working approach
|
|
||||||
(window as any).Module = {
|
(window as any).Module = {
|
||||||
canvas: canvas,
|
canvas: canvas,
|
||||||
locateFile: (path: string) => {
|
locateFile: (path: string) => {
|
||||||
// Return absolute paths for all resources
|
|
||||||
return path.startsWith("/") ? path : `/${path}`;
|
return path.startsWith("/") ? path : `/${path}`;
|
||||||
},
|
},
|
||||||
preRun: [],
|
preRun: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
// Load the Emscripten script
|
|
||||||
const script = document.createElement("script");
|
const script = document.createElement("script");
|
||||||
script.src = "/pacman.js";
|
script.src = "/pacman.js";
|
||||||
script.async = false; // Load synchronously to ensure Module is configured first
|
script.async = false;
|
||||||
document.body.appendChild(script);
|
document.body.appendChild(script);
|
||||||
|
|
||||||
// Cleanup function (runs when component unmounts)
|
|
||||||
return () => {
|
return () => {
|
||||||
script.remove();
|
script.remove();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}, []); // Empty dependency array = run once on mount
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mt-4 flex justify-center h-[calc(100vh-120px)]">
|
<div className="mt-4 flex justify-center h-[calc(100vh-120px)]">
|
||||||
|
|||||||
Reference in New Issue
Block a user