Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 19 additions & 8 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
name: Code Scanning

on:
push:
branches:
- main
pull_request:
push:
branches:
- main
pull_request:

jobs:
CodeQL:
name: Analysis
uses: sapphiredev/.github/.github/workflows/reusable-codeql.yml@main
CodeQL:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
with:
with-auto-build: false
submodules: true

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@3e7e3b32d0fb8283594bb0a76cc60a00918b0969 # tag=v2
with:
languages: typescript

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@3e7e3b32d0fb8283594bb0a76cc60a00918b0969 # tag=v2
4 changes: 3 additions & 1 deletion .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ on:
branches:
- main
paths:
- 'src/**'
- 'projects/**'
- 'Dockerfile'
- '.github/workflows/continuous-delivery.yml'
- 'package.json'
- 'pnpm-lock.yaml'

permissions:
contents: read
packages: write
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
branches:
- main

# cancel in-progress runs on new commits to same PR (github.event.number)
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
Expand Down Expand Up @@ -47,7 +46,7 @@ jobs:
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- uses: actions/setup-node@48b55a011bda9f5c9604345a0b591c3020ee971a93 # v6.4.0
with:
node-version: lts/*

Expand All @@ -58,7 +57,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Generate prisma types
run: pnpm prisma:generate
run: pnpm --filter wolfstar-shared prisma:generate

- name: Build project
run: pnpm build
Expand All @@ -81,10 +80,10 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Generate prisma types
run: pnpm prisma:generate
run: pnpm --filter wolfstar-shared prisma:generate

- name: Run unit tests
run: pnpm test --coverage
run: pnpm test -- --coverage

- name: Codecov Upload
uses: codecov/codecov-action@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-tlds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run the TLD updater script
run: yarn scripts:tlds
run: pnpm scripts:tlds
- name: Commit any changes and create a pull request
env:
GITHUB_USER: github-actions[bot]
Expand Down
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ coverage/
.env.development.local
.env.test.local
.env.production.local
/.env
redis.local.conf

# Ignore bwd folders
Expand All @@ -38,7 +37,12 @@ gh

# Ignore the "wiki" folder so we can checkout the wiki inside the same folder
wiki/
plans/

# Profiler data
*.0x

# Claude
.claude/state

# Plans
plans/
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

pnpm commitlint --edit $1
pnpm exec commitlint --edit $1
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

pnpm lint-staged
pnpm exec nano-staged
2 changes: 1 addition & 1 deletion .oxfmtrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"trailingComma": "none",
"useTabs": true,
"sortPackageJson": false,
"ignorePatterns": ["src/languages/**/*.json", "dist/"],
"ignorePatterns": ["projects/**/src/languages/**/*.json", "dist/", "projects/**/dist/"],
"overrides": [
{
"files": ["README.md"],
Expand Down
23 changes: 16 additions & 7 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,14 @@
"unicorn/prefer-set-has": "off",
"vitest/require-mock-type-parameters": "off"
},
"ignorePatterns": ["dist/**", "node_modules/**", "coverage/**", "src/languages/**/*.json", "src/lib/util/Links/TLDs.ts"],
"ignorePatterns": [
"dist/**",
"node_modules/**",
"coverage/**",
"projects/**/dist/**",
"projects/**/src/languages/**/*.json",
"projects/bot/src/lib/util/Links/TLDs.ts"
],
"overrides": [
{
"files": ["**/*.?([cm])ts"],
Expand Down Expand Up @@ -187,12 +194,6 @@
"typescript/triple-slash-reference": "off"
}
},
{
"files": ["src/commands/**/*.ts"],
"rules": {
"typescript/require-await": "off"
}
},
{
"files": ["tests/**/*.?([cm])[jt]s?(x)"],
"plugins": ["vitest", "typescript"],
Expand Down Expand Up @@ -242,6 +243,14 @@
"no-await-in-loop": "off",
"no-console": "off"
}
},
{
"files": ["projects/**/tsdown.config.ts"],
"plugins": ["typescript"],
"rules": {
"no-underscore-dangle": "off",
"no-console": "off"
}
}
]
}
6 changes: 3 additions & 3 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
project_id: '686068'
project_id: '434340'
api_token_env: 'CROWDIN_PERSONAL_TOKEN'
pull_request_title: 'chore(i18n-crowdin): new crowdin translation 🌐'
commit_message: 'chore(i18n-crowdin): new translations for %original_file_name% (%language%)'
append_commit_message: false

files:
- source: /src/languages/en-US/**/*.json
translation: /src/languages/%locale%/**/%original_file_name%
- source: /src/languages/en-US/**/*.json
translation: /src/languages/%locale%/**/%original_file_name%
2 changes: 1 addition & 1 deletion mise.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[tools]
node = "lts"
pnpm = "10"
pnpm = "11"
141 changes: 28 additions & 113 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,136 +1,55 @@
{
"name": "wolfstar",
"version": "6.3.0",
"version": "7.0.0",
"description": "Multipurpose Discord Bot built on Sapphire Framework",
"author": "WolfStar Project",
"license": "Apache-2.0",
"main": "./dist/index.mjs",
"private": true,
"type": "module",
"imports": {
"#utils/common": "./dist/lib/util/common/index.mjs",
"#utils/functions": "./dist/lib/util/functions/index.mjs",
"#utils/resolvers": "./dist/lib/util/resolvers/index.mjs",
"#utils/*": "./dist/lib/util/*.mjs",
"#lib/database/entities": "./dist/lib/database/entities/index.mjs",
"#lib/database/settings": "./dist/lib/database/settings/index.mjs",
"#lib/database": "./dist/lib/database/index.mjs",
"#lib/discord": "./dist/lib/discord/index.mjs",
"#lib/moderation/actions": "./dist/lib/moderation/actions/index.mjs",
"#lib/moderation/common": "./dist/lib/moderation/common/index.mjs",
"#lib/moderation/managers/loggers": "./dist/lib/moderation/managers/loggers/index.mjs",
"#lib/moderation/managers": "./dist/lib/moderation/managers/index.mjs",
"#lib/moderation/workers": "./dist/lib/moderation/workers/index.mjs",
"#lib/moderation": "./dist/lib/moderation/index.mjs",
"#lib/schedule": "./dist/lib/schedule/index.mjs",
"#lib/structures/data": "./dist/lib/structures/data/index.mjs",
"#lib/structures/managers": "./dist/lib/structures/managers/index.mjs",
"#lib/structures": "./dist/lib/structures/index.mjs",
"#lib/setup": "./dist/lib/setup/index.mjs",
"#lib/types": "./dist/lib/types/index.mjs",
"#lib/i18n/languageKeys": "./dist/lib/i18n/languageKeys/index.mjs",
"#lib/i18n": "./dist/lib/i18n/index.mjs",
"#lib/*": "./dist/lib/*.mjs",
"#generated/prisma": "./dist/generated/prisma/client.mjs",
"#languages": "./dist/languages/index.mjs",
"#root/*": "./dist/*.mjs"
},
"scripts": {
"build": "tsdown",
"dev": "pnpm build --onSuccess \"pnpm start\"",
"watch": "pnpm build --watch",
"watch:start": "pnpm build --watch --onSuccess \"pnpm start\"",
"prisma:generate": "pnpm prisma generate",
"clean": "node scripts/build/clean.mjs",
"start": "node --enable-source-maps dist/index.mjs",
"start:profiler:0x": "0x --collect-only dist/index.mjs",
"test": "vitest run",
"build": "pnpm -r run build",
"dev": "pnpm --filter wolfstar-bot dev",
"watch": "pnpm --filter wolfstar-bot watch",
"prisma:generate": "pnpm --filter wolfstar-shared prisma:generate",
"clean": "pnpm -r run clean",
"test": "vitest run --config vitest.config.ts",
"lint:fix": "oxlint --fix && oxfmt",
"lint": "oxlint && oxfmt --check",
"format": "prettier --write --log-level=warn \"{src,tests}/**/*.{js,mjs,ts,json}\"",
"audit:verify": "node scripts/audit-verify.mjs",
"scripts:tlds": "node scripts/tlds.mjs",
"scripts:migration": "node scripts/migrations.mjs",
"dockerps": "pwsh -NoLogo ./.docker/control.ps1",
"prepare": "husky"
},
"dependencies": {
"evlog": "^2.16.0",
"@discordjs/builders": "^1.14.1",
"@discordjs/collection": "^2.1.1",
"@discordjs/core": "^1.2.0",
"@influxdata/influxdb-client": "^1.35.0",
"@influxdata/influxdb-client-apis": "^1.35.0",
"@prisma/adapter-pg": "^7.8.0",
"@prisma/client": "^7.8.0",
"@rollup/plugin-alias": "^6.0.0",
"@sapphire/async-queue": "^1.5.5",
"@sapphire/bitfield": "^1.2.4",
"@sapphire/decorators": "^6.2.0",
"@sapphire/discord.js-utilities": "7.3.3",
"@sapphire/fetch": "^3.0.5",
"@sapphire/framework": "5.5.0",
"@sapphire/iterator-utilities": "^2.0.1",
"@sapphire/plugin-api": "^8.3.1",
"@sapphire/plugin-editable-commands": "^4.0.4",
"@sapphire/plugin-i18next": "^8.0.0",
"@sapphire/plugin-logger": "^4.1.0",
"@sapphire/plugin-subcommands": "^7.0.1",
"@sapphire/ratelimits": "^2.4.11",
"@sapphire/snowflake": "^3.5.5",
"@sapphire/stopwatch": "^1.5.4",
"@sapphire/time-utilities": "^1.7.14",
"@sapphire/utilities": "^3.18.2",
"@sentry/node": "^10.53.1",
"@skyra/ai": "^2.0.1",
"@skyra/char": "^1.0.3",
"@skyra/env-utilities": "^2.0.1",
"@skyra/jaro-winkler": "^1.1.1",
"bufferutil": "^4.1.0",
"colorette": "^2.0.20",
"confusables": "^1.1.1",
"diff": "^9.0.0",
"discord-api-types": "^0.38.34",
"discord.js": "~14.26.4",
"he": "^1.2.0",
"husky": "^9.1.7",
"pg": "^8.21.0",
"zlib-sync": "^0.1.10"
"prepare": "node .husky/install.mjs"
},
"devDependencies": {
"0x": "^6.0.0",
"@commitlint/cli": "^20.5.3",
"@commitlint/config-conventional": "^20.5.3",
"@sapphire/prettier-config": "^2.0.0",
"@commitlint/cli": "^21.0.2",
"@commitlint/config-conventional": "^21.0.2",
"@sapphire/ts-config": "^5.0.3",
"@types/backoff": "^2.5.5",
"@types/diff": "^6.0.0",
"@types/he": "^1.2.3",
"@types/node": "^22.8.7",
"@types/pg": "^8.20.0",
"@types/ws": "^8.18.1",
"@vitest/coverage-v8": "^4.1.7",
"@types/node": "^24.13.2",
"@vitest/coverage-v8": "^4.1.8",
"cz-conventional-changelog": "^3.3.0",
"lint-staged": "^16.4.0",
"oxfmt": "^0.51.0",
"oxlint": "^1.66.0",
"prettier": "^3.8.3",
"husky": "^9.1.7",
"nano-staged": "^1.0.2",
"oxfmt": "^0.54.0",
"oxlint": "^1.69.0",
"prisma": "^7.8.0",
"prisma-json-types-generator": "^5.0.0",
"taze": "^19.13.0",
"tsdown": "^0.22.0",
"typescript": "^6.0.2",
"vitest": "^4.1.7"
"taze": "^19.14.1",
"tsdown": "0.22.0",
"typescript": "^6.0.3",
"vite": "^6.4.3",
"vitest": "^4.1.8"
},
"repository": {
"type": "git",
"url": "git+https://github.com/wolfstar-project/wolfstar.git"
},
"engines": {
"node": ">=24",
"pnpm": ">=10"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"lint-staged": {
"nano-staged": {
"*": "oxfmt --no-error-on-unmatched-pattern",
"*.{mjs,js,ts}": "oxlint --fix"
},
Expand All @@ -140,9 +59,5 @@
}
},
"prettier": "@sapphire/prettier-config",
"packageManager": "pnpm@10.33.4",
"engines": {
"node": ">=24",
"pnpm": ">=10"
}
"packageManager": "pnpm@11.4.0"
}
Loading
Loading