Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 0 additions & 82 deletions .eslintrc.json

This file was deleted.

9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,12 @@ updates:
update-types:
- minor
- patch

- package-ecosystem: npm
directory: /
schedule:
interval: daily
open-pull-requests-limit: 0
labels:
- dependencies
- npm
1 change: 1 addition & 0 deletions .github/workflows/provision-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- run: npm run lint:check
- run: npm run typecheck
- run: npm run test
- run: npm audit --audit-level=critical

gate:
needs: ci
Expand Down
30 changes: 12 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
# ---- Base ----
FROM node:24-alpine AS base
# syntax=docker/dockerfile:1.7

# ---- deps (install + prebuild verification) ----
FROM node:24-alpine AS deps
WORKDIR /app
COPY package.json package-lock.json ./
RUN --mount=type=cache,target=/root/.npm \
npm ci --omit=dev --prefer-offline --no-audit --no-fund \
&& node -e "require('better-sqlite3'); require.resolve('@swc-node/register'); require.resolve('@swc/core'); console.log('native + loader prebuild OK')"

# Copy package.json and package-lock.json
COPY package*.json ./

# ---- Dependencies ----
FROM base AS dependencies

# Install npm dependencies
RUN npm ci

# ---- Production ----
FROM dependencies AS production

# Copy all source files
# ---- runtime ----
FROM node:24-alpine AS runtime
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .

# Default command to start the application
ENTRYPOINT ["npm", "start"]
ENTRYPOINT ["npm", "start"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Restricted to users with the **Administrator** permission and users added via `/
`/whitelist` - manage whitelisted users and roles (`scope`: `queue` / `event` / `global`)
`/clear` - remove all members from queue(s)
`/displays` - manage display channels
`/events` - manage recurring events with auto-managed queues (and optional auto-created per-room channels)
`/events` - manage recurring events with auto-managed queues (optional per-room channels, optional sub auto-pull at room start, optional auto-revoked winner roles)
`/logging` - manage logging channels
`/members` - manage queue members
`/move` - change the position of a queue member
Expand Down
13 changes: 13 additions & 0 deletions data/migrations/0012_powerful_songbird.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
CREATE TABLE `event_occurrence_room_pull` (
`occurrence_id` integer NOT NULL,
`event_queue_id` integer NOT NULL,
`handled_at` integer NOT NULL,
PRIMARY KEY(`occurrence_id`, `event_queue_id`),
FOREIGN KEY (`occurrence_id`) REFERENCES `event_occurrence`(`id`) ON UPDATE no action ON DELETE cascade,
FOREIGN KEY (`event_queue_id`) REFERENCES `event_queue`(`id`) ON UPDATE no action ON DELETE cascade
);
--> statement-breakpoint
CREATE INDEX `event_occurrence_room_pull_occurrence_id_index` ON `event_occurrence_room_pull` (`occurrence_id`);--> statement-breakpoint
ALTER TABLE `event` ADD `auto_pull_subs_at_room_start_toggle` integer DEFAULT false NOT NULL;--> statement-breakpoint
ALTER TABLE `event` ADD `shuffle_subs_before_auto_pull_toggle` integer DEFAULT false NOT NULL;--> statement-breakpoint
ALTER TABLE `event` ADD `sub_auto_pull_mode` text DEFAULT 'drain' NOT NULL;
16 changes: 16 additions & 0 deletions data/migrations/0013_mature_steve_rogers.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
CREATE TABLE `event_winner` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`guild_id` text NOT NULL,
`event_id` integer NOT NULL,
`room_index` integer NOT NULL,
`user_id` text NOT NULL,
`role_id` text NOT NULL,
`declared_at` integer NOT NULL,
FOREIGN KEY (`guild_id`) REFERENCES `guild`(`guild_id`) ON UPDATE no action ON DELETE cascade,
FOREIGN KEY (`event_id`) REFERENCES `event`(`id`) ON UPDATE no action ON DELETE cascade
);
--> statement-breakpoint
CREATE INDEX `event_winner_guild_id_index` ON `event_winner` (`guild_id`);--> statement-breakpoint
CREATE INDEX `event_winner_event_id_index` ON `event_winner` (`event_id`);--> statement-breakpoint
CREATE UNIQUE INDEX `event_winner_event_id_room_index_user_id_unique` ON `event_winner` (`event_id`,`room_index`,`user_id`);--> statement-breakpoint
ALTER TABLE `event` ADD `winner_role_id` text;
Loading