alpha
Login
or
Join now
alpine.girlfag.club
/
refserver
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
server for refapp and refbot and other stuff
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
refserver
/
src
/
routes
/
at
main
21 files
alpine
feat: §8.1 - remove chartWins from leaderboard, expand LeaderboardRow with breakdown data
2d ago
009be990
_testHelpers.ts
Implement phase 5 HTTP/WS API: auth, routes, WebSocket subscriptions Add API key auth middleware (ApiKey/Bearer schemes, scope enforcement), Express route handlers for events, matches (ban/pick/ready/result/revert/ stop lifecycle), charts search, players search, API key management CRUD. Enhance WebSocket server with match/event subscribe/unsubscribe protocol. Integration tests with supertest against mongodb-memory-server. 260 total tests pass, typecheck clean.
1 week ago
apiKeys.ts
Implement phase 5 HTTP/WS API: auth, routes, WebSocket subscriptions Add API key auth middleware (ApiKey/Bearer schemes, scope enforcement), Express route handlers for events, matches (ban/pick/ready/result/revert/ stop lifecycle), charts search, players search, API key management CRUD. Enhance WebSocket server with match/event subscribe/unsubscribe protocol. Integration tests with supertest against mongodb-memory-server. 260 total tests pass, typecheck clean.
1 week ago
auth.test.ts
test(refserver): fix Bearer-scheme auth test; docs: sync rate-limit config - auth.test.ts: the Bearer test sent an API key expecting 200, but Bearer is the Discord OAuth scheme and correctly rejects API keys. Now mocks Discord's /users/@me so a real Discord token authenticates (200) and asserts an API key on the Bearer scheme is rejected (401). - README: update status to Phases 1-8 complete; document config + rate-limit knobs and the ApiKey/health rate-limit exemption; note dist/ is built at deploy. - .env.example: raise RATE_LIMIT_MAX default 100 -> 600 to match code and explain the SPA-polling rationale.
1 week ago
botMeta.ts
feat: PUT /v1/bot-meta endpoint for refbot to report running version
1 week ago
charts.ts
feat: implement Plans 3, 6, 7 — state machine, startgg split, remove refshared - Plan 7: formalize match lifecycle as state machine (matchStateMachine.ts) * assertTransition/transition guard all phase changes in routes * restartMatch validates 'restart' transition; abandonMatch validates 'stop' * pickChart sets 'ready-check' directly; setPlayerReady advances to 'playing' * removed 4 leftover route-level progressLevel overrides - Plan 6: split startgg.ts into startggCore/Queries/Fetch modules * startgg.ts under 200 lines, re-exports from shared modules * resolved circular ESM via startggCore.ts - Plan 3: deleted refshared/ directory and all imports/references - Review fixes: revert APP_ORIGIN rename, strip sensitive fields from DB-only player view, add assertTransition('revert'), remove unused imports, update docs and tests
4 days ago
events.ts
feat: implement Plans 3, 6, 7 — state machine, startgg split, remove refshared - Plan 7: formalize match lifecycle as state machine (matchStateMachine.ts) * assertTransition/transition guard all phase changes in routes * restartMatch validates 'restart' transition; abandonMatch validates 'stop' * pickChart sets 'ready-check' directly; setPlayerReady advances to 'playing' * removed 4 leftover route-level progressLevel overrides - Plan 6: split startgg.ts into startggCore/Queries/Fetch modules * startgg.ts under 200 lines, re-exports from shared modules * resolved circular ESM via startggCore.ts - Plan 3: deleted refshared/ directory and all imports/references - Review fixes: revert APP_ORIGIN rename, strip sensitive fields from DB-only player view, add assertTransition('revert'), remove unused imports, update docs and tests
4 days ago
friendly.test.ts
Add roll-off flow (SSSO 2.1) replacing check-in for friendlies - MatchState.roll + 'rolling' phase default for pending matches - engine roll()/chooseFirstBan() with tie re-roll and winner-gated ban order - serializePlayerView gains roll + server-computed turn (roll/roll-tie/choose-ban) - new routes: /matches/:id/player/roll, /choose-first-ban + share equivalents - HttpError status codes for wrong-phase/forbidden roll actions - tests: check-in->rolling assertions, friendly roll-off coverage
6 days ago
guildConfig.test.ts
Enforce minimum mappool size of bestOf + 2 Add shared minPoolSize helper and validate mapPool/mapLinks on match create (400 pool_too_small). Remove dead single-chart ban skip. Update tests for the new minimum.
6 days ago
guildConfig.ts
feat: shareable friendlies + persisted admin/referee roles - Unauthenticated share-link endpoints for friendly matches (/v1/matches/share/:token/*) registered before /matches/:id - shareToken generated for every friendly (createPendingMatch + initMatchState) and persisted through save/restoreMatchState - Persisted roles in GuildConfig; GET/PUT /v1/guilds/:guildId/roles and GET /v1/me - Discord actors resolve scopes from persisted role list (env DISCORD_ALLOWED_USERS fallback); boot seeds the role cache - POST /v1/matches relaxed: any logged-in user (read|referee) can create a friendly; tournament creation still requires referee scope
6 days ago
health.ts
Implement phase 1 foundation: Express, WebSocket, Mongoose, models, health/version
1 week ago
index.ts
Remove temporary POST /v1/backfill-ssso admin route The one-time SSSO stats backfill (all 5 events) is complete, so the temporary admin endpoint is removed. The backfillSsso engine and its test are retained as reusable pure code.
5 days ago
matches.ts
feat: implement Plans 3, 6, 7 — state machine, startgg split, remove refshared - Plan 7: formalize match lifecycle as state machine (matchStateMachine.ts) * assertTransition/transition guard all phase changes in routes * restartMatch validates 'restart' transition; abandonMatch validates 'stop' * pickChart sets 'ready-check' directly; setPlayerReady advances to 'playing' * removed 4 leftover route-level progressLevel overrides - Plan 6: split startgg.ts into startggCore/Queries/Fetch modules * startgg.ts under 200 lines, re-exports from shared modules * resolved circular ESM via startggCore.ts - Plan 3: deleted refshared/ directory and all imports/references - Review fixes: revert APP_ORIGIN rename, strip sensitive fields from DB-only player view, add assertTransition('revert'), remove unused imports, update docs and tests
4 days ago
me.ts
feat: shareable friendlies + persisted admin/referee roles - Unauthenticated share-link endpoints for friendly matches (/v1/matches/share/:token/*) registered before /matches/:id - shareToken generated for every friendly (createPendingMatch + initMatchState) and persisted through save/restoreMatchState - Persisted roles in GuildConfig; GET/PUT /v1/guilds/:guildId/roles and GET /v1/me - Discord actors resolve scopes from persisted role list (env DISCORD_ALLOWED_USERS fallback); boot seeds the role cache - POST /v1/matches relaxed: any logged-in user (read|referee) can create a friendly; tournament creation still requires referee scope
6 days ago
players.test.ts
fix: add discordLinked flag so Missing Discord filter works on numeric ids The old missingDiscord filter (discordId: {$not: /^\d+$/}) returned 0 once every player had a numeric discordId after the SSSO backfill/rekey/ merge work. Add an explicit Player.discordLinked boolean, set it on start.gg import (DISCORD connection), rekey, and PUT, backfill existing docs via a boot migration, and switch the filter to discordLinked: {$ne: true}.
5 days ago
players.ts
fix: add discordLinked flag so Missing Discord filter works on numeric ids The old missingDiscord filter (discordId: {$not: /^\d+$/}) returned 0 once every player had a numeric discordId after the SSSO backfill/rekey/ merge work. Add an explicit Player.discordLinked boolean, set it on start.gg import (DISCORD connection), rekey, and PUT, backfill existing docs via a boot migration, and switch the filter to discordLinked: {$ne: true}.
5 days ago
pools.ts
feat: implement Plans 3, 6, 7 — state machine, startgg split, remove refshared - Plan 7: formalize match lifecycle as state machine (matchStateMachine.ts) * assertTransition/transition guard all phase changes in routes * restartMatch validates 'restart' transition; abandonMatch validates 'stop' * pickChart sets 'ready-check' directly; setPlayerReady advances to 'playing' * removed 4 leftover route-level progressLevel overrides - Plan 6: split startgg.ts into startggCore/Queries/Fetch modules * startgg.ts under 200 lines, re-exports from shared modules * resolved circular ESM via startggCore.ts - Plan 3: deleted refshared/ directory and all imports/references - Review fixes: revert APP_ORIGIN rename, strip sensitive fields from DB-only player view, add assertTransition('revert'), remove unused imports, update docs and tests
4 days ago
routes.test.ts
feat: §8.1 - remove chartWins from leaderboard, expand LeaderboardRow with breakdown data - Remove chartWins sort option and top-level field from LeaderboardRow - Expand LeaderboardRow to include all/tournament/friendly PlayerMatchBreakdown objects - Add toBreakdown() helper to compute derived averages from stat buckets - Update tests to cover new breakdown fields - Update OpenAPI spec (LeaderboardRow schema, sort enum) - feat(poolSize): BO1 single-chart pools return minPoolSize=1
2 days ago
spinshare.test.ts
feat(spinshare): resolve pasted SpinShare links / song ids in chart search If the search query is a spinsha.re/song/<id> link or a bare numeric id, resolve that chart directly (metadata only) instead of fuzzy text search. Falls back to text search on resolution failure. Adds 2 route tests.
6 days ago
spinshare.ts
feat(mappool): carry per-tier difficulty ratings SearchHit and the mappool entry now include easy/normal/hard/extreme/xd difficulty numbers so the UI can show 'EX 24' / 'XD 48' style badges. Spinshare expertDifficulty maps to extremeDifficulty; XDDifficulty to xdDifficulty. Persisted through MappoolInput, schema, buildMappoolEntry, the fromDoc adapter, and both serializers. Test extended.
6 days ago
stats.ts
feat: §8.1 - remove chartWins from leaderboard, expand LeaderboardRow with breakdown data - Remove chartWins sort option and top-level field from LeaderboardRow - Expand LeaderboardRow to include all/tournament/friendly PlayerMatchBreakdown objects - Add toBreakdown() helper to compute derived averages from stat buckets - Update tests to cover new breakdown fields - Update OpenAPI spec (LeaderboardRow schema, sort enum) - feat(poolSize): BO1 single-chart pools return minPoolSize=1
2 days ago
version.ts
style: remove em dashes from code and docs Rephrase comments, strings, and markdown (README, plan) so no em dash (U+2014) remains in source.
6 days ago