mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
Merge pull request #6 from tresabhi/1.7.0
This commit is contained in:
27 files changed
+205
-226
No files matched your search
@@ -0,0 +1,47 @@
|
|||||||
|
name: CI Build
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [18.x]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Get code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Use node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
- name: Install Yarn
|
||||||
|
run: npm install --location=global yarn
|
||||||
|
|
||||||
|
- name: Use node_modules cache
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: '**/node_modules'
|
||||||
|
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
- name: Archive build
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: dist
|
||||||
|
path: dist
|
||||||
@@ -44,4 +44,4 @@ jobs:
|
|||||||
run: yarn
|
run: yarn
|
||||||
|
|
||||||
- name: Host
|
- name: Host
|
||||||
run: yarn run start discord-token=${{ secrets.DISCORD_TOKEN }} wargaming-application-id=${{ secrets.WARGAMING_APPLICATION_ID }}
|
run: yarn dev discord-token=${{ secrets.DISCORD_TOKEN }} wargaming-application-id=${{ secrets.WARGAMING_APPLICATION_ID }}
|
||||||
@@ -4,3 +4,4 @@ package-lock.json
|
|||||||
/test-results/
|
/test-results/
|
||||||
/playwright-report/
|
/playwright-report/
|
||||||
/playwright/.cache/
|
/playwright/.cache/
|
||||||
|
dist/
|
||||||
+5
-3
@@ -5,7 +5,9 @@
|
|||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "vite-node src/index.ts --script",
|
"dev": "yarn build && yarn start",
|
||||||
|
"start": "node --enable-source-maps dist/index.cjs",
|
||||||
|
"build": "rm -rf dist && esbuild src/index.ts --outfile=dist/index.cjs --bundle --platform=node --loader:.node=copy --minify --sourcemap",
|
||||||
"lint": "tsc"
|
"lint": "tsc"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@@ -28,7 +30,7 @@
|
|||||||
"@types/markdown-escape": "^1.1.0",
|
"@types/markdown-escape": "^1.1.0",
|
||||||
"@types/node": "^20.2.1",
|
"@types/node": "^20.2.1",
|
||||||
"@types/react": "^18.2.7",
|
"@types/react": "^18.2.7",
|
||||||
"typescript": "^5.0.4",
|
"esbuild": "^0.17.19",
|
||||||
"vite-node": "^0.31.1"
|
"typescript": "^5.0.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,7 @@ import cmdName from '../core/interaction/cmdName.js';
|
|||||||
import negativeEmbed from '../core/interaction/negativeEmbed.js';
|
import negativeEmbed from '../core/interaction/negativeEmbed.js';
|
||||||
import positiveEmbed from '../core/interaction/positiveEmbed.js';
|
import positiveEmbed from '../core/interaction/positiveEmbed.js';
|
||||||
import addUsernameOption from '../core/options/addUsernameOption.js';
|
import addUsernameOption from '../core/options/addUsernameOption.js';
|
||||||
import { args } from '../core/process/args.js';
|
import { wargamingApplicationId } from '../core/process/args.js';
|
||||||
import { CommandRegistry } from '../events/interactionCreate.js';
|
import { CommandRegistry } from '../events/interactionCreate.js';
|
||||||
import { AccountInfo } from '../types/accountInfo.js';
|
import { AccountInfo } from '../types/accountInfo.js';
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ export default {
|
|||||||
const clan = interaction.options.getString('clan') as SkilledClan;
|
const clan = interaction.options.getString('clan') as SkilledClan;
|
||||||
const { id, server } = await getBlitzAccount(interaction);
|
const { id, server } = await getBlitzAccount(interaction);
|
||||||
const accountInfo = await getWargamingResponse<AccountInfo>(
|
const accountInfo = await getWargamingResponse<AccountInfo>(
|
||||||
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${args['wargaming-application-id']}&account_id=${id}`,
|
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${wargamingApplicationId}&account_id=${id}`,
|
||||||
);
|
);
|
||||||
const problems: TableInput = [];
|
const problems: TableInput = [];
|
||||||
const title = `${accountInfo[id].nickname}'s eligibility for ${SKILLED_CLANS[clan]}`;
|
const title = `${accountInfo[id].nickname}'s eligibility for ${SKILLED_CLANS[clan]}`;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import getBlitzClan from '../core/blitz/getBlitzClan.js';
|
|||||||
import getWargamingResponse from '../core/blitz/getWargamingResponse.js';
|
import getWargamingResponse from '../core/blitz/getWargamingResponse.js';
|
||||||
import cmdName from '../core/interaction/cmdName.js';
|
import cmdName from '../core/interaction/cmdName.js';
|
||||||
import addClanChoices from '../core/options/addClanChoices.js';
|
import addClanChoices from '../core/options/addClanChoices.js';
|
||||||
import { args } from '../core/process/args.js';
|
import { wargamingApplicationId } from '../core/process/args.js';
|
||||||
import render from '../core/ui/render.js';
|
import render from '../core/ui/render.js';
|
||||||
import { CommandRegistry } from '../events/interactionCreate.js';
|
import { CommandRegistry } from '../events/interactionCreate.js';
|
||||||
import { AccountInfo } from '../types/accountInfo.js';
|
import { AccountInfo } from '../types/accountInfo.js';
|
||||||
@@ -44,14 +44,14 @@ export default {
|
|||||||
const time = new Date().getTime() / 1000;
|
const time = new Date().getTime() / 1000;
|
||||||
const clanData = (
|
const clanData = (
|
||||||
await getWargamingResponse<ClanInfo>(
|
await getWargamingResponse<ClanInfo>(
|
||||||
`https://api.wotblitz.${server}/wotb/clans/info/?application_id=${args['wargaming-application-id']}&clan_id=${id}`,
|
`https://api.wotblitz.${server}/wotb/clans/info/?application_id=${wargamingApplicationId}&clan_id=${id}`,
|
||||||
)
|
)
|
||||||
)[id];
|
)[id];
|
||||||
const memberIds = clanData.members_ids;
|
const memberIds = clanData.members_ids;
|
||||||
const accounts = await getWargamingResponse<AccountInfo>(
|
const accounts = await getWargamingResponse<AccountInfo>(
|
||||||
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${
|
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${wargamingApplicationId}&account_id=${memberIds.join(
|
||||||
args['wargaming-application-id']
|
',',
|
||||||
}&account_id=${memberIds.join(',')}`,
|
)}`,
|
||||||
);
|
);
|
||||||
const inactive = memberIds
|
const inactive = memberIds
|
||||||
.map((memberId) => {
|
.map((memberId) => {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import getWargamingResponse from '../core/blitz/getWargamingResponse.js';
|
|||||||
import { TIER_ROMAN_NUMERALS, tankopedia } from '../core/blitz/tankopedia.js';
|
import { TIER_ROMAN_NUMERALS, tankopedia } from '../core/blitz/tankopedia.js';
|
||||||
import cmdName from '../core/interaction/cmdName.js';
|
import cmdName from '../core/interaction/cmdName.js';
|
||||||
import addUsernameOption from '../core/options/addUsernameOption.js';
|
import addUsernameOption from '../core/options/addUsernameOption.js';
|
||||||
import { args } from '../core/process/args.js';
|
import { wargamingApplicationId } from '../core/process/args.js';
|
||||||
import render from '../core/ui/render.js';
|
import render from '../core/ui/render.js';
|
||||||
import { CommandRegistry } from '../events/interactionCreate.js';
|
import { CommandRegistry } from '../events/interactionCreate.js';
|
||||||
import { AccountInfo } from '../types/accountInfo.js';
|
import { AccountInfo } from '../types/accountInfo.js';
|
||||||
@@ -62,14 +62,14 @@ export default {
|
|||||||
const account = await getBlitzAccount(interaction);
|
const account = await getBlitzAccount(interaction);
|
||||||
const { id, server } = account;
|
const { id, server } = account;
|
||||||
const accountInfo = await getWargamingResponse<AccountInfo>(
|
const accountInfo = await getWargamingResponse<AccountInfo>(
|
||||||
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${args['wargaming-application-id']}&account_id=${id}`,
|
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${wargamingApplicationId}&account_id=${id}`,
|
||||||
);
|
);
|
||||||
const tankStats = await getTankStats(interaction, server, id);
|
const tankStats = await getTankStats(interaction, server, id);
|
||||||
const tanks = tankStats
|
const tanks = tankStats
|
||||||
.map((tankData) => tankopedia[tankData.tank_id])
|
.map((tankData) => tankopedia[tankData.tank_id])
|
||||||
.filter((tank) => tank?.tier === tier);
|
.filter((tank) => tank?.tier === tier);
|
||||||
const clanData = await getWargamingResponse<PlayerClanData>(
|
const clanData = await getWargamingResponse<PlayerClanData>(
|
||||||
`https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${args['wargaming-application-id']}&account_id=${id}&extra=clan`,
|
`https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${wargamingApplicationId}&account_id=${id}&extra=clan`,
|
||||||
);
|
);
|
||||||
|
|
||||||
console.time('ownedtanks');
|
console.time('ownedtanks');
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import cleanTable, { TableInputEntry } from '../core/interaction/cleanTable.js';
|
|||||||
import cmdName from '../core/interaction/cmdName.js';
|
import cmdName from '../core/interaction/cmdName.js';
|
||||||
import infoEmbed from '../core/interaction/infoEmbed.js';
|
import infoEmbed from '../core/interaction/infoEmbed.js';
|
||||||
import addUsernameOption from '../core/options/addUsernameOption.js';
|
import addUsernameOption from '../core/options/addUsernameOption.js';
|
||||||
import { args } from '../core/process/args.js';
|
import { wargamingApplicationId } from '../core/process/args.js';
|
||||||
import { CommandRegistry } from '../events/interactionCreate.js';
|
import { CommandRegistry } from '../events/interactionCreate.js';
|
||||||
import { AccountAchievements } from '../types/accountAchievements.js';
|
import { AccountAchievements } from '../types/accountAchievements.js';
|
||||||
import { AccountInfo } from '../types/accountInfo.js';
|
import { AccountInfo } from '../types/accountInfo.js';
|
||||||
@@ -39,11 +39,11 @@ export default {
|
|||||||
const account = await getBlitzAccount(interaction);
|
const account = await getBlitzAccount(interaction);
|
||||||
const { id, server } = account;
|
const { id, server } = account;
|
||||||
const accounts = await getWargamingResponse<AccountInfo>(
|
const accounts = await getWargamingResponse<AccountInfo>(
|
||||||
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${args['wargaming-application-id']}&account_id=${id}`,
|
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${wargamingApplicationId}&account_id=${id}`,
|
||||||
);
|
);
|
||||||
const accountsAchievements =
|
const accountsAchievements =
|
||||||
await getWargamingResponse<AccountAchievements>(
|
await getWargamingResponse<AccountAchievements>(
|
||||||
`https://api.wotblitz.${server}/wotb/account/achievements/?application_id=${args['wargaming-application-id']}&account_id=${id}`,
|
`https://api.wotblitz.${server}/wotb/account/achievements/?application_id=${wargamingApplicationId}&account_id=${id}`,
|
||||||
);
|
);
|
||||||
const accountAchievements = accountsAchievements[id];
|
const accountAchievements = accountsAchievements[id];
|
||||||
const compound = {
|
const compound = {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import cleanTable from '../core/interaction/cleanTable.js';
|
|||||||
import cmdName from '../core/interaction/cmdName.js';
|
import cmdName from '../core/interaction/cmdName.js';
|
||||||
import infoEmbed from '../core/interaction/infoEmbed.js';
|
import infoEmbed from '../core/interaction/infoEmbed.js';
|
||||||
import addUsernameOption from '../core/options/addUsernameOption.js';
|
import addUsernameOption from '../core/options/addUsernameOption.js';
|
||||||
import { args } from '../core/process/args.js';
|
import { wargamingApplicationId } from '../core/process/args.js';
|
||||||
import { CommandRegistry } from '../events/interactionCreate.js';
|
import { CommandRegistry } from '../events/interactionCreate.js';
|
||||||
import { AccountInfo } from '../types/accountInfo.js';
|
import { AccountInfo } from '../types/accountInfo.js';
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ export default {
|
|||||||
const account = await getBlitzAccount(interaction);
|
const account = await getBlitzAccount(interaction);
|
||||||
const { id, server } = account;
|
const { id, server } = account;
|
||||||
const accounts = await getWargamingResponse<AccountInfo>(
|
const accounts = await getWargamingResponse<AccountInfo>(
|
||||||
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${args['wargaming-application-id']}&account_id=${id}`,
|
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${wargamingApplicationId}&account_id=${id}`,
|
||||||
);
|
);
|
||||||
const accountInfo = accounts[id];
|
const accountInfo = accounts[id];
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import cmdName from '../core/interaction/cmdName.js';
|
|||||||
import infoEmbed from '../core/interaction/infoEmbed.js';
|
import infoEmbed from '../core/interaction/infoEmbed.js';
|
||||||
import addClanChoices from '../core/options/addClanChoices.js';
|
import addClanChoices from '../core/options/addClanChoices.js';
|
||||||
import addServerChoices from '../core/options/addServerChoices.js';
|
import addServerChoices from '../core/options/addServerChoices.js';
|
||||||
import { args } from '../core/process/args.js';
|
import { wargamingApplicationId } from '../core/process/args.js';
|
||||||
import { CommandRegistry } from '../events/interactionCreate.js';
|
import { CommandRegistry } from '../events/interactionCreate.js';
|
||||||
import { ClanList } from '../types/clanList.js';
|
import { ClanList } from '../types/clanList.js';
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ export default {
|
|||||||
const clan = interaction.options.getString('clan')!;
|
const clan = interaction.options.getString('clan')!;
|
||||||
const limit = interaction.options.getInteger('limit') ?? 25;
|
const limit = interaction.options.getInteger('limit') ?? 25;
|
||||||
const clanList = await getWargamingResponse<ClanList>(
|
const clanList = await getWargamingResponse<ClanList>(
|
||||||
`https://api.wotblitz.${server}/wotb/clans/list/?application_id=${args['wargaming-application-id']}&search=${clan}&limit=${limit}`,
|
`https://api.wotblitz.${server}/wotb/clans/list/?application_id=${wargamingApplicationId}&search=${clan}&limit=${limit}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
await interaction.editReply({
|
await interaction.editReply({
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import cmdName from '../core/interaction/cmdName.js';
|
|||||||
import infoEmbed from '../core/interaction/infoEmbed.js';
|
import infoEmbed from '../core/interaction/infoEmbed.js';
|
||||||
import addServerChoices from '../core/options/addServerChoices.js';
|
import addServerChoices from '../core/options/addServerChoices.js';
|
||||||
import addUsernameOption from '../core/options/addUsernameOption.js';
|
import addUsernameOption from '../core/options/addUsernameOption.js';
|
||||||
import { args } from '../core/process/args.js';
|
import { wargamingApplicationId } from '../core/process/args.js';
|
||||||
import { CommandRegistry } from '../events/interactionCreate.js';
|
import { CommandRegistry } from '../events/interactionCreate.js';
|
||||||
import { AccountList } from '../types/accountList.js';
|
import { AccountList } from '../types/accountList.js';
|
||||||
|
|
||||||
@@ -38,9 +38,9 @@ export default {
|
|||||||
const trimmedSearch = name.trim();
|
const trimmedSearch = name.trim();
|
||||||
const players = usernamePattern.test(trimmedSearch)
|
const players = usernamePattern.test(trimmedSearch)
|
||||||
? await getWargamingResponse<AccountList>(
|
? await getWargamingResponse<AccountList>(
|
||||||
`https://api.wotblitz.${server}/wotb/account/list/?application_id=${
|
`https://api.wotblitz.${server}/wotb/account/list/?application_id=${wargamingApplicationId}&search=${encodeURIComponent(
|
||||||
args['wargaming-application-id']
|
trimmedSearch,
|
||||||
}&search=${encodeURIComponent(trimmedSearch)}&limit=${limit}`,
|
)}&limit=${limit}`,
|
||||||
)
|
)
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import addStatPeriodChoices, {
|
|||||||
statPeriodNames,
|
statPeriodNames,
|
||||||
} from '../core/options/addStatPeriodChoices.js';
|
} from '../core/options/addStatPeriodChoices.js';
|
||||||
import addUsernameOption from '../core/options/addUsernameOption.js';
|
import addUsernameOption from '../core/options/addUsernameOption.js';
|
||||||
import { args } from '../core/process/args.js';
|
import { wargamingApplicationId } from '../core/process/args.js';
|
||||||
import render from '../core/ui/render.js';
|
import render from '../core/ui/render.js';
|
||||||
import { CommandRegistry } from '../events/interactionCreate.js';
|
import { CommandRegistry } from '../events/interactionCreate.js';
|
||||||
import {
|
import {
|
||||||
@@ -53,10 +53,10 @@ export default {
|
|||||||
const period = interaction.options.getString('period') as StatPeriod;
|
const period = interaction.options.getString('period') as StatPeriod;
|
||||||
const { id, server } = await getBlitzAccount(interaction);
|
const { id, server } = await getBlitzAccount(interaction);
|
||||||
const accountInfo = await getWargamingResponse<AccountInfo>(
|
const accountInfo = await getWargamingResponse<AccountInfo>(
|
||||||
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${args['wargaming-application-id']}&account_id=${id}`,
|
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${wargamingApplicationId}&account_id=${id}`,
|
||||||
);
|
);
|
||||||
const clanData = await getWargamingResponse<PlayerClanData>(
|
const clanData = await getWargamingResponse<PlayerClanData>(
|
||||||
`https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${args['wargaming-application-id']}&account_id=${id}&extra=clan`,
|
`https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${wargamingApplicationId}&account_id=${id}&extra=clan`,
|
||||||
);
|
);
|
||||||
const tankStats = await getTankStats(interaction, server, id);
|
const tankStats = await getTankStats(interaction, server, id);
|
||||||
let stats: AllStats;
|
let stats: AllStats;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import addStatPeriodChoices, {
|
|||||||
} from '../core/options/addStatPeriodChoices.js';
|
} from '../core/options/addStatPeriodChoices.js';
|
||||||
import addTankChoices from '../core/options/addTankChoices.js';
|
import addTankChoices from '../core/options/addTankChoices.js';
|
||||||
import addUsernameOption from '../core/options/addUsernameOption.js';
|
import addUsernameOption from '../core/options/addUsernameOption.js';
|
||||||
import { args } from '../core/process/args.js';
|
import { wargamingApplicationId } from '../core/process/args.js';
|
||||||
import render from '../core/ui/render.js';
|
import render from '../core/ui/render.js';
|
||||||
import { CommandRegistry } from '../events/interactionCreate.js';
|
import { CommandRegistry } from '../events/interactionCreate.js';
|
||||||
import { AccountInfo, AllStats } from '../types/accountInfo.js';
|
import { AccountInfo, AllStats } from '../types/accountInfo.js';
|
||||||
@@ -59,7 +59,7 @@ export default {
|
|||||||
const blitzAccount = await getBlitzAccount(interaction);
|
const blitzAccount = await getBlitzAccount(interaction);
|
||||||
const { id, server } = blitzAccount;
|
const { id, server } = blitzAccount;
|
||||||
const accountInfo = await getWargamingResponse<AccountInfo>(
|
const accountInfo = await getWargamingResponse<AccountInfo>(
|
||||||
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${args['wargaming-application-id']}&account_id=${id}`,
|
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${wargamingApplicationId}&account_id=${id}`,
|
||||||
);
|
);
|
||||||
const tankStats = await getTankStats(interaction, server, id);
|
const tankStats = await getTankStats(interaction, server, id);
|
||||||
let stats: AllStats;
|
let stats: AllStats;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import cmdName from '../core/interaction/cmdName.js';
|
|||||||
import fullBlitzStarsStats from '../core/interaction/fullBlitzStarsStats.js';
|
import fullBlitzStarsStats from '../core/interaction/fullBlitzStarsStats.js';
|
||||||
import { supportBlitzStars } from '../core/interaction/supportBlitzStars.js';
|
import { supportBlitzStars } from '../core/interaction/supportBlitzStars.js';
|
||||||
import addUsernameOption from '../core/options/addUsernameOption.js';
|
import addUsernameOption from '../core/options/addUsernameOption.js';
|
||||||
import { args } from '../core/process/args.js';
|
import { wargamingApplicationId } from '../core/process/args.js';
|
||||||
import render from '../core/ui/render.js';
|
import render from '../core/ui/render.js';
|
||||||
import { CommandRegistry } from '../events/interactionCreate.js';
|
import { CommandRegistry } from '../events/interactionCreate.js';
|
||||||
import { AccountInfo, AllStats } from '../types/accountInfo.js';
|
import { AccountInfo, AllStats } from '../types/accountInfo.js';
|
||||||
@@ -50,10 +50,10 @@ export default {
|
|||||||
new Date().getTime() / 1000,
|
new Date().getTime() / 1000,
|
||||||
);
|
);
|
||||||
const accountInfo = await getWargamingResponse<AccountInfo>(
|
const accountInfo = await getWargamingResponse<AccountInfo>(
|
||||||
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${args['wargaming-application-id']}&account_id=${id}`,
|
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${wargamingApplicationId}&account_id=${id}`,
|
||||||
);
|
);
|
||||||
const clanData = await getWargamingResponse<PlayerClanData>(
|
const clanData = await getWargamingResponse<PlayerClanData>(
|
||||||
`https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${args['wargaming-application-id']}&account_id=${id}&extra=clan`,
|
`https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${wargamingApplicationId}&account_id=${id}&extra=clan`,
|
||||||
);
|
);
|
||||||
const careerTankStatsRaw = await getTankStats(interaction, server, id);
|
const careerTankStatsRaw = await getTankStats(interaction, server, id);
|
||||||
const careerStats: Record<number, AllStats> = {
|
const careerStats: Record<number, AllStats> = {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import getBlitzAccount from '../core/blitz/getBlitzAccount.js';
|
|||||||
import getWargamingResponse from '../core/blitz/getWargamingResponse.js';
|
import getWargamingResponse from '../core/blitz/getWargamingResponse.js';
|
||||||
import cmdName from '../core/interaction/cmdName.js';
|
import cmdName from '../core/interaction/cmdName.js';
|
||||||
import addUsernameOption from '../core/options/addUsernameOption.js';
|
import addUsernameOption from '../core/options/addUsernameOption.js';
|
||||||
import { args } from '../core/process/args.js';
|
import { wargamingApplicationId } from '../core/process/args.js';
|
||||||
import { CommandRegistry } from '../events/interactionCreate.js';
|
import { CommandRegistry } from '../events/interactionCreate.js';
|
||||||
import { AccountInfo } from '../types/accountInfo.js';
|
import { AccountInfo } from '../types/accountInfo.js';
|
||||||
import { PlayerClanData } from '../types/playerClanData.js';
|
import { PlayerClanData } from '../types/playerClanData.js';
|
||||||
@@ -26,10 +26,10 @@ export default {
|
|||||||
const blitzAccount = await getBlitzAccount(interaction);
|
const blitzAccount = await getBlitzAccount(interaction);
|
||||||
const { id, server } = blitzAccount;
|
const { id, server } = blitzAccount;
|
||||||
const accountInfo = await getWargamingResponse<AccountInfo>(
|
const accountInfo = await getWargamingResponse<AccountInfo>(
|
||||||
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${args['wargaming-application-id']}&account_id=${id}`,
|
`https://api.wotblitz.${server}/wotb/account/info/?application_id=${wargamingApplicationId}&account_id=${id}`,
|
||||||
);
|
);
|
||||||
const clanData = await getWargamingResponse<PlayerClanData>(
|
const clanData = await getWargamingResponse<PlayerClanData>(
|
||||||
`https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${args['wargaming-application-id']}&account_id=${id}&extra=clan`,
|
`https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${wargamingApplicationId}&account_id=${id}&extra=clan`,
|
||||||
);
|
);
|
||||||
const clan = clanData[id]?.clan;
|
const clan = clanData[id]?.clan;
|
||||||
const clanTag = clan ? ` [${clan!.tag}]` : '';
|
const clanTag = clan ? ` [${clan!.tag}]` : '';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { CacheType, ChatInputCommandInteraction } from 'discord.js';
|
import { CacheType, ChatInputCommandInteraction } from 'discord.js';
|
||||||
import { BLITZ_SERVERS, BlitzServer } from '../../constants/servers.js';
|
import { BLITZ_SERVERS, BlitzServer } from '../../constants/servers.js';
|
||||||
import { TanksStats } from '../../types/tanksStats.js';
|
import { TanksStats } from '../../types/tanksStats.js';
|
||||||
import { args } from '../process/args.js';
|
import { wargamingApplicationId } from '../process/args.js';
|
||||||
import errorWithCause from '../process/errorWithCause.js';
|
import errorWithCause from '../process/errorWithCause.js';
|
||||||
import getWargamingResponse from './getWargamingResponse.js';
|
import getWargamingResponse from './getWargamingResponse.js';
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ export default async function getTankStats(
|
|||||||
id: number,
|
id: number,
|
||||||
) {
|
) {
|
||||||
const tankStats = await getWargamingResponse<TanksStats>(
|
const tankStats = await getWargamingResponse<TanksStats>(
|
||||||
`https://api.wotblitz.${server}/wotb/tanks/stats/?application_id=${args['wargaming-application-id']}&account_id=${id}`,
|
`https://api.wotblitz.${server}/wotb/tanks/stats/?application_id=${wargamingApplicationId}&account_id=${id}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (tankStats[id] === null) {
|
if (tankStats[id] === null) {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { BlitzServer } from '../../constants/servers.js';
|
import { BlitzServer } from '../../constants/servers.js';
|
||||||
import { Account, AccountList } from '../../types/accountList.js';
|
import { Account, AccountList } from '../../types/accountList.js';
|
||||||
import { args } from '../process/args.js';
|
import { wargamingApplicationId } from '../process/args.js';
|
||||||
import getWargamingResponse from './getWargamingResponse.js';
|
import getWargamingResponse from './getWargamingResponse.js';
|
||||||
|
|
||||||
export type AccountListWithServer = (Account & {
|
export type AccountListWithServer = (Account & {
|
||||||
@@ -19,7 +19,7 @@ export default async function listAccountsPanServer(search: string, limit = 9) {
|
|||||||
return (
|
return (
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
getWargamingResponse<AccountList>(
|
getWargamingResponse<AccountList>(
|
||||||
`https://api.wotblitz.com/wotb/account/list/?application_id=${args['wargaming-application-id']}&search=${encodedSearch}&limit=${normalizedLimit}`,
|
`https://api.wotblitz.com/wotb/account/list/?application_id=${wargamingApplicationId}&search=${encodedSearch}&limit=${normalizedLimit}`,
|
||||||
).then(
|
).then(
|
||||||
(value) =>
|
(value) =>
|
||||||
value &&
|
value &&
|
||||||
@@ -29,7 +29,7 @@ export default async function listAccountsPanServer(search: string, limit = 9) {
|
|||||||
})),
|
})),
|
||||||
),
|
),
|
||||||
getWargamingResponse<AccountList>(
|
getWargamingResponse<AccountList>(
|
||||||
`https://api.wotblitz.eu/wotb/account/list/?application_id=${args['wargaming-application-id']}&search=${encodedSearch}&limit=${normalizedLimit}`,
|
`https://api.wotblitz.eu/wotb/account/list/?application_id=${wargamingApplicationId}&search=${encodedSearch}&limit=${normalizedLimit}`,
|
||||||
).then(
|
).then(
|
||||||
(value) =>
|
(value) =>
|
||||||
value &&
|
value &&
|
||||||
@@ -39,7 +39,7 @@ export default async function listAccountsPanServer(search: string, limit = 9) {
|
|||||||
})),
|
})),
|
||||||
),
|
),
|
||||||
getWargamingResponse<AccountList>(
|
getWargamingResponse<AccountList>(
|
||||||
`https://api.wotblitz.asia/wotb/account/list/?application_id=${args['wargaming-application-id']}&search=${encodedSearch}&limit=${normalizedLimit}`,
|
`https://api.wotblitz.asia/wotb/account/list/?application_id=${wargamingApplicationId}&search=${encodedSearch}&limit=${normalizedLimit}`,
|
||||||
).then(
|
).then(
|
||||||
(value) =>
|
(value) =>
|
||||||
value &&
|
value &&
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { BlitzServer } from '../../constants/servers.js';
|
import { BlitzServer } from '../../constants/servers.js';
|
||||||
import { Clan, ClanList } from '../../types/clanList.js';
|
import { Clan, ClanList } from '../../types/clanList.js';
|
||||||
import { args } from '../process/args.js';
|
import { wargamingApplicationId } from '../process/args.js';
|
||||||
import getWargamingResponse from './getWargamingResponse.js';
|
import getWargamingResponse from './getWargamingResponse.js';
|
||||||
|
|
||||||
export type ClanListWithServer = (Clan & {
|
export type ClanListWithServer = (Clan & {
|
||||||
@@ -15,7 +15,7 @@ export default async function listClansPanServer(search: string, limit = 9) {
|
|||||||
return (
|
return (
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
getWargamingResponse<ClanList>(
|
getWargamingResponse<ClanList>(
|
||||||
`https://api.wotblitz.com/wotb/clans/list/?application_id=${args['wargaming-application-id']}&search=${search}&limit=${normalizedLimit}`,
|
`https://api.wotblitz.com/wotb/clans/list/?application_id=${wargamingApplicationId}&search=${search}&limit=${normalizedLimit}`,
|
||||||
).then(
|
).then(
|
||||||
(value) =>
|
(value) =>
|
||||||
value &&
|
value &&
|
||||||
@@ -25,7 +25,7 @@ export default async function listClansPanServer(search: string, limit = 9) {
|
|||||||
})),
|
})),
|
||||||
),
|
),
|
||||||
getWargamingResponse<ClanList>(
|
getWargamingResponse<ClanList>(
|
||||||
`https://api.wotblitz.eu/wotb/clans/list/?application_id=${args['wargaming-application-id']}&search=${search}&limit=${normalizedLimit}`,
|
`https://api.wotblitz.eu/wotb/clans/list/?application_id=${wargamingApplicationId}&search=${search}&limit=${normalizedLimit}`,
|
||||||
).then(
|
).then(
|
||||||
(value) =>
|
(value) =>
|
||||||
value &&
|
value &&
|
||||||
@@ -35,7 +35,7 @@ export default async function listClansPanServer(search: string, limit = 9) {
|
|||||||
})),
|
})),
|
||||||
),
|
),
|
||||||
getWargamingResponse<ClanList>(
|
getWargamingResponse<ClanList>(
|
||||||
`https://api.wotblitz.asia/wotb/clans/list/?application_id=${args['wargaming-application-id']}&search=${search}&limit=${normalizedLimit}`,
|
`https://api.wotblitz.asia/wotb/clans/list/?application_id=${wargamingApplicationId}&search=${search}&limit=${normalizedLimit}`,
|
||||||
).then(
|
).then(
|
||||||
(value) =>
|
(value) =>
|
||||||
value &&
|
value &&
|
||||||
|
|||||||
@@ -18,13 +18,20 @@ export interface Tankopedia {
|
|||||||
[id: number]: TankopediaEntry;
|
[id: number]: TankopediaEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const tankopedia: Tankopedia = {};
|
||||||
|
|
||||||
console.log('Caching tankopedia...');
|
console.log('Caching tankopedia...');
|
||||||
export const tankopedia = (
|
fetch('https://www.blitzstars.com/bs-tankopedia.json')
|
||||||
(await (
|
.then(
|
||||||
await fetch('https://www.blitzstars.com/bs-tankopedia.json')
|
(response) =>
|
||||||
).json()) as WargamingResponse<Tankopedia> & { status: 'ok' }
|
response.json() as Promise<
|
||||||
).data;
|
WargamingResponse<Tankopedia> & { status: 'ok' }
|
||||||
console.log('Cached tankopedia');
|
>,
|
||||||
|
)
|
||||||
|
.then((wargamingResponse) => {
|
||||||
|
Object.assign(tankopedia, wargamingResponse.data);
|
||||||
|
console.log('Cached tankopedia');
|
||||||
|
});
|
||||||
|
|
||||||
export const TANK_ICONS: Record<TankType, string> = {
|
export const TANK_ICONS: Record<TankType, string> = {
|
||||||
'AT-SPG': 'https://i.imgur.com/BIHSEH0.png',
|
'AT-SPG': 'https://i.imgur.com/BIHSEH0.png',
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ export interface MeanSd {
|
|||||||
spbSd: number;
|
spbSd: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IndividualTankAverages {
|
export interface IndividualTankAverage {
|
||||||
_id: number;
|
_id: number;
|
||||||
battle_life_time: number;
|
battle_life_time: number;
|
||||||
total_battle_life_time: number;
|
total_battle_life_time: number;
|
||||||
@@ -78,13 +78,14 @@ export interface IndividualTankAverages {
|
|||||||
last_update: number;
|
last_update: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Caching tank averages...');
|
export const tankAverages: Record<number, IndividualTankAverage> = {};
|
||||||
const tankAveragesRaw = (await (
|
|
||||||
await fetch('https://www.blitzstars.com/api/tankaverages.json')
|
|
||||||
).json()) as IndividualTankAverages[];
|
|
||||||
export const tankAverages: Record<number, IndividualTankAverages> = {};
|
|
||||||
|
|
||||||
Object.entries(tankAveragesRaw).forEach(([, tank]) => {
|
console.log('Caching tank averages...');
|
||||||
tankAverages[tank.tank_id] = tank;
|
fetch('https://www.blitzstars.com/api/tankaverages.json')
|
||||||
});
|
.then((response) => response.json() as Promise<IndividualTankAverage[]>)
|
||||||
console.log('Tank averages cached');
|
.then((individualTankAverages) => {
|
||||||
|
individualTankAverages.forEach((individualTankAverage) => {
|
||||||
|
tankAverages[individualTankAverage.tank_id] = individualTankAverage;
|
||||||
|
});
|
||||||
|
console.log('Tank averages cached');
|
||||||
|
});
|
||||||
Vendored
+1
@@ -0,0 +1 @@
|
|||||||
|
/// <reference types="vite/client" />
|
||||||
@@ -3,7 +3,7 @@ import errorWithCause from './errorWithCause.js';
|
|||||||
|
|
||||||
type ArgumentName = 'discord-token' | 'wargaming-application-id';
|
type ArgumentName = 'discord-token' | 'wargaming-application-id';
|
||||||
|
|
||||||
export const args: Record<ArgumentName, string> = {
|
const args: Record<ArgumentName, string> = {
|
||||||
'discord-token': '',
|
'discord-token': '',
|
||||||
'wargaming-application-id': '',
|
'wargaming-application-id': '',
|
||||||
};
|
};
|
||||||
@@ -23,3 +23,6 @@ Object.keys(args).forEach((arg) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const discordToken = args['discord-token'];
|
||||||
|
export const wargamingApplicationId = args['wargaming-application-id'];
|
||||||
@@ -6,8 +6,12 @@ import satori from 'satori';
|
|||||||
const FONT_NAME = 'Roboto';
|
const FONT_NAME = 'Roboto';
|
||||||
const FONT_FILES = ['Roboto', 'Roboto-Bold', 'Roboto-Black'];
|
const FONT_FILES = ['Roboto', 'Roboto-Bold', 'Roboto-Black'];
|
||||||
|
|
||||||
|
let robotoFlex: Buffer;
|
||||||
|
let robotoFlexBold: Buffer;
|
||||||
|
let robotoFlexBlack: Buffer;
|
||||||
|
|
||||||
console.log('Importing fonts...');
|
console.log('Importing fonts...');
|
||||||
const [robotoFlex, robotoFlexBold, robotoFlexBlack] = await Promise.all(
|
Promise.all(
|
||||||
FONT_FILES.map(
|
FONT_FILES.map(
|
||||||
(file) =>
|
(file) =>
|
||||||
new Promise<Buffer>((resolve, reject) => {
|
new Promise<Buffer>((resolve, reject) => {
|
||||||
@@ -17,8 +21,10 @@ const [robotoFlex, robotoFlexBold, robotoFlexBlack] = await Promise.all(
|
|||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
);
|
).then((data) => {
|
||||||
console.log('Fonts imported');
|
[robotoFlex, robotoFlexBold, robotoFlexBlack] = data;
|
||||||
|
console.log('Fonts imported');
|
||||||
|
});
|
||||||
|
|
||||||
export default async function render(element: ReactNode) {
|
export default async function render(element: ReactNode) {
|
||||||
const svg = await satori(element, {
|
const svg = await satori(element, {
|
||||||
|
|||||||
@@ -37,6 +37,4 @@ export function registerErrorHandlers() {
|
|||||||
client.on(name, (error) => handleError(error, 'client error')),
|
client.on(name, (error) => handleError(error, 'client error')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return client;
|
|
||||||
}
|
}
|
||||||
@@ -5,17 +5,29 @@ import {
|
|||||||
ButtonStyle,
|
ButtonStyle,
|
||||||
CacheType,
|
CacheType,
|
||||||
ChatInputCommandInteraction,
|
ChatInputCommandInteraction,
|
||||||
Collection,
|
|
||||||
Interaction,
|
Interaction,
|
||||||
REST,
|
REST,
|
||||||
RESTPostAPIChatInputApplicationCommandsJSONBody,
|
RESTPostAPIChatInputApplicationCommandsJSONBody,
|
||||||
Routes,
|
Routes,
|
||||||
SlashCommandBuilder,
|
SlashCommandBuilder,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import { readdirSync } from 'fs';
|
|
||||||
import discord from '../../discord.json' assert { type: 'json' };
|
import discord from '../../discord.json' assert { type: 'json' };
|
||||||
|
import debug from '../commands/debug.js';
|
||||||
|
import eligible from '../commands/eligible.js';
|
||||||
|
import help from '../commands/help.js';
|
||||||
|
import inactive from '../commands/inactive.js';
|
||||||
|
import ownedtanks from '../commands/ownedtanks.js';
|
||||||
|
import playerachievements from '../commands/playerachievements.js';
|
||||||
|
import playerinfo from '../commands/playerinfo.js';
|
||||||
|
import searchclans from '../commands/searchclans.js';
|
||||||
|
import searchplayers from '../commands/searchplayers.js';
|
||||||
|
import searchtanks from '../commands/searchtanks.js';
|
||||||
|
import stats from '../commands/stats.js';
|
||||||
|
import tankstats from '../commands/tankstats.js';
|
||||||
|
import today from '../commands/today.js';
|
||||||
|
import verify from '../commands/verify.js';
|
||||||
import negativeEmbed from '../core/interaction/negativeEmbed.js';
|
import negativeEmbed from '../core/interaction/negativeEmbed.js';
|
||||||
import { args } from '../core/process/args.js';
|
import { discordToken } from '../core/process/args.js';
|
||||||
import getClientId from '../core/process/getClientId.js';
|
import getClientId from '../core/process/getClientId.js';
|
||||||
import isDev from '../core/process/isDev.js';
|
import isDev from '../core/process/isDev.js';
|
||||||
import { handleError } from './error.js';
|
import { handleError } from './error.js';
|
||||||
@@ -30,52 +42,70 @@ export interface CommandRegistry {
|
|||||||
autocomplete?: (interaction: AutocompleteInteraction<CacheType>) => void;
|
autocomplete?: (interaction: AutocompleteInteraction<CacheType>) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const rest = new REST().setToken(args['discord-token']);
|
const rest = new REST().setToken(discordToken);
|
||||||
|
|
||||||
|
const commands = [
|
||||||
|
debug,
|
||||||
|
eligible,
|
||||||
|
help,
|
||||||
|
inactive,
|
||||||
|
ownedtanks,
|
||||||
|
playerachievements,
|
||||||
|
playerinfo,
|
||||||
|
searchclans,
|
||||||
|
searchplayers,
|
||||||
|
searchtanks,
|
||||||
|
stats,
|
||||||
|
tankstats,
|
||||||
|
today,
|
||||||
|
verify,
|
||||||
|
].reduce<Record<string, CommandRegistry>>((accumulator, registry) => {
|
||||||
|
return { ...accumulator, [registry.command.name]: registry };
|
||||||
|
}, {});
|
||||||
|
|
||||||
const commandFolders = readdirSync('src/commands/');
|
|
||||||
const commandCollection = new Collection<string, CommandRegistry>();
|
|
||||||
export const guildCommands: RESTPostAPIChatInputApplicationCommandsJSONBody[] =
|
export const guildCommands: RESTPostAPIChatInputApplicationCommandsJSONBody[] =
|
||||||
[];
|
[];
|
||||||
export const publicCommands: RESTPostAPIChatInputApplicationCommandsJSONBody[] =
|
export const publicCommands: RESTPostAPIChatInputApplicationCommandsJSONBody[] =
|
||||||
[];
|
[];
|
||||||
|
|
||||||
for (const file of commandFolders) {
|
Object.entries(commands).forEach(([, registry]) => {
|
||||||
const command = (await import(`../commands/${file}`))
|
if (isDev() ? registry.inDevelopment : registry.inProduction) {
|
||||||
.default as CommandRegistry;
|
if (registry.inPublic) {
|
||||||
|
publicCommands.push(registry.command.toJSON());
|
||||||
if (isDev() ? command.inDevelopment : command.inProduction) {
|
|
||||||
if (command.inPublic) {
|
|
||||||
publicCommands.push(command.command.toJSON());
|
|
||||||
} else {
|
} else {
|
||||||
guildCommands.push(command.command.toJSON());
|
guildCommands.push(registry.command.toJSON());
|
||||||
}
|
}
|
||||||
|
|
||||||
commandCollection.set(command.command.name, command);
|
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
console.log(`Refreshing ${publicCommands.length} public command(s).`);
|
console.log(`Refreshing ${publicCommands.length} public command(s).`);
|
||||||
const publicData = (await rest.put(
|
rest
|
||||||
Routes.applicationCommands(getClientId()),
|
.put(Routes.applicationCommands(getClientId()), { body: publicCommands })
|
||||||
{ body: publicCommands },
|
.then((publicData) => {
|
||||||
)) as RESTPostAPIChatInputApplicationCommandsJSONBody[];
|
console.log(
|
||||||
console.log(`Successfully refreshed ${publicData.length} public command(s).`);
|
`Successfully refreshed ${
|
||||||
|
(publicData as RESTPostAPIChatInputApplicationCommandsJSONBody[])
|
||||||
|
.length
|
||||||
|
} public command(s).`,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
console.log(`Refreshing ${guildCommands.length} guild command(s).`);
|
console.log(`Refreshing ${guildCommands.length} guild command(s).`);
|
||||||
const guildData = [
|
Promise.all([
|
||||||
...((await rest.put(
|
rest.put(
|
||||||
Routes.applicationGuildCommands(getClientId(), discord.sklld_guild_id),
|
Routes.applicationGuildCommands(getClientId(), discord.sklld_guild_id),
|
||||||
{ body: guildCommands },
|
{ body: guildCommands },
|
||||||
)) as RESTPostAPIChatInputApplicationCommandsJSONBody[]),
|
),
|
||||||
...((await rest.put(
|
rest.put(
|
||||||
Routes.applicationGuildCommands(getClientId(), discord.tres_guild_id),
|
Routes.applicationGuildCommands(getClientId(), discord.tres_guild_id),
|
||||||
{ body: guildCommands },
|
{ body: guildCommands },
|
||||||
)) as RESTPostAPIChatInputApplicationCommandsJSONBody[]),
|
),
|
||||||
];
|
]).then((guildData) => {
|
||||||
console.log(
|
console.log(
|
||||||
`Successfully refreshed ${guildData.length / 2} guild command(s).`,
|
`Successfully refreshed ${guildData.flat().length / 2} guild command(s).`,
|
||||||
);
|
);
|
||||||
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
@@ -84,7 +114,7 @@ export default async function interactionCreate(
|
|||||||
interaction: Interaction<CacheType>,
|
interaction: Interaction<CacheType>,
|
||||||
) {
|
) {
|
||||||
if (interaction.isAutocomplete()) {
|
if (interaction.isAutocomplete()) {
|
||||||
const command = commandCollection.get(interaction.commandName);
|
const command = commands[interaction.commandName];
|
||||||
|
|
||||||
if (!command) {
|
if (!command) {
|
||||||
console.error(
|
console.error(
|
||||||
@@ -95,7 +125,7 @@ export default async function interactionCreate(
|
|||||||
|
|
||||||
if (command.autocomplete) command.autocomplete(interaction);
|
if (command.autocomplete) command.autocomplete(interaction);
|
||||||
} else if (interaction.isChatInputCommand()) {
|
} else if (interaction.isChatInputCommand()) {
|
||||||
const command = commandCollection.get(interaction.commandName);
|
const command = commands[interaction.commandName];
|
||||||
|
|
||||||
if (!command) {
|
if (!command) {
|
||||||
console.error(
|
console.error(
|
||||||
|
|||||||
+6
-8
@@ -1,5 +1,5 @@
|
|||||||
import { Client, GatewayIntentBits } from 'discord.js';
|
import { Client, GatewayIntentBits } from 'discord.js';
|
||||||
import { args } from './core/process/args.js';
|
import { discordToken } from './core/process/args.js';
|
||||||
import { registerErrorHandlers } from './events/error.js';
|
import { registerErrorHandlers } from './events/error.js';
|
||||||
import guildMemberAdd from './events/guildMemberAdd.js';
|
import guildMemberAdd from './events/guildMemberAdd.js';
|
||||||
import interactionCreate from './events/interactionCreate.js';
|
import interactionCreate from './events/interactionCreate.js';
|
||||||
@@ -7,12 +7,10 @@ import ready from './events/ready.js';
|
|||||||
|
|
||||||
export const client = new Client({
|
export const client = new Client({
|
||||||
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers],
|
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers],
|
||||||
});
|
})
|
||||||
|
|
||||||
registerErrorHandlers();
|
|
||||||
|
|
||||||
client
|
|
||||||
.on('ready', ready)
|
.on('ready', ready)
|
||||||
.on('guildMemberAdd', guildMemberAdd)
|
.on('guildMemberAdd', guildMemberAdd)
|
||||||
.on('interactionCreate', interactionCreate)
|
.on('interactionCreate', interactionCreate);
|
||||||
.login(args['discord-token']);
|
|
||||||
|
registerErrorHandlers();
|
||||||
|
client.login(discordToken);
|
||||||
@@ -333,11 +333,6 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
acorn@^8.8.2:
|
|
||||||
version "8.8.2"
|
|
||||||
resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz"
|
|
||||||
integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==
|
|
||||||
|
|
||||||
[email protected]:
|
[email protected]:
|
||||||
version "0.0.8"
|
version "0.0.8"
|
||||||
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-0.0.8.tgz#1101e9544f4a76b1bc3b26d452ca96d7a35e7978"
|
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-0.0.8.tgz#1101e9544f4a76b1bc3b26d452ca96d7a35e7978"
|
||||||
@@ -355,11 +350,6 @@ busboy@^1.6.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
streamsearch "^1.1.0"
|
streamsearch "^1.1.0"
|
||||||
|
|
||||||
cac@^6.7.14:
|
|
||||||
version "6.7.14"
|
|
||||||
resolved "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz"
|
|
||||||
integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==
|
|
||||||
|
|
||||||
camelize@^1.0.0:
|
camelize@^1.0.0:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.1.tgz#89b7e16884056331a35d6b5ad064332c91daa6c3"
|
resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.1.tgz#89b7e16884056331a35d6b5ad064332c91daa6c3"
|
||||||
@@ -399,13 +389,6 @@ csstype@^3.0.2:
|
|||||||
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b"
|
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b"
|
||||||
integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==
|
integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==
|
||||||
|
|
||||||
debug@^4.3.4:
|
|
||||||
version "4.3.4"
|
|
||||||
resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz"
|
|
||||||
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
|
|
||||||
dependencies:
|
|
||||||
ms "2.1.2"
|
|
||||||
|
|
||||||
discord-api-types@^0.37.37:
|
discord-api-types@^0.37.37:
|
||||||
version "0.37.39"
|
version "0.37.39"
|
||||||
resolved "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.39.tgz"
|
resolved "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.39.tgz"
|
||||||
@@ -435,9 +418,9 @@ emoji-regex@^10.2.1:
|
|||||||
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.2.1.tgz#a41c330d957191efd3d9dfe6e1e8e1e9ab048b3f"
|
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.2.1.tgz#a41c330d957191efd3d9dfe6e1e8e1e9ab048b3f"
|
||||||
integrity sha512-97g6QgOk8zlDRdgq1WxwgTMgEWGVAQvB5Fdpgc1MkNy56la5SKP9GsMXKDOdqwn90/41a8yPwIGk1Y6WVbeMQA==
|
integrity sha512-97g6QgOk8zlDRdgq1WxwgTMgEWGVAQvB5Fdpgc1MkNy56la5SKP9GsMXKDOdqwn90/41a8yPwIGk1Y6WVbeMQA==
|
||||||
|
|
||||||
esbuild@^0.17.5:
|
esbuild@^0.17.19:
|
||||||
version "0.17.19"
|
version "0.17.19"
|
||||||
resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz"
|
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.17.19.tgz#087a727e98299f0462a3d0bcdd9cd7ff100bd955"
|
||||||
integrity sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==
|
integrity sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
"@esbuild/android-arm" "0.17.19"
|
"@esbuild/android-arm" "0.17.19"
|
||||||
@@ -487,11 +470,6 @@ file-type@^18.2.1:
|
|||||||
strtok3 "^7.0.0"
|
strtok3 "^7.0.0"
|
||||||
token-types "^5.0.1"
|
token-types "^5.0.1"
|
||||||
|
|
||||||
fsevents@~2.3.2:
|
|
||||||
version "2.3.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
|
|
||||||
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
|
|
||||||
|
|
||||||
fuzzysort@^2.0.4:
|
fuzzysort@^2.0.4:
|
||||||
version "2.0.4"
|
version "2.0.4"
|
||||||
resolved "https://registry.npmjs.org/fuzzysort/-/fuzzysort-2.0.4.tgz"
|
resolved "https://registry.npmjs.org/fuzzysort/-/fuzzysort-2.0.4.tgz"
|
||||||
@@ -517,11 +495,6 @@ inherits@^2.0.3:
|
|||||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
||||||
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
|
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
|
||||||
|
|
||||||
jsonc-parser@^3.2.0:
|
|
||||||
version "3.2.0"
|
|
||||||
resolved "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz"
|
|
||||||
integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==
|
|
||||||
|
|
||||||
linebreak@^1.1.0:
|
linebreak@^1.1.0:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/linebreak/-/linebreak-1.1.0.tgz#831cf378d98bced381d8ab118f852bd50d81e46b"
|
resolved "https://registry.yarnpkg.com/linebreak/-/linebreak-1.1.0.tgz#831cf378d98bced381d8ab118f852bd50d81e46b"
|
||||||
@@ -557,26 +530,6 @@ markdown-escape@^2.0.0:
|
|||||||
resolved "https://registry.npmjs.org/markdown-escape/-/markdown-escape-2.0.0.tgz"
|
resolved "https://registry.npmjs.org/markdown-escape/-/markdown-escape-2.0.0.tgz"
|
||||||
integrity sha512-Trz4v0+XWlwy68LJIyw3bLbsJiC8XAbRCKF9DbEtZjyndKOGVx6n+wNB0VfoRmY2LKboQLeniap3xrb6LGSJ8A==
|
integrity sha512-Trz4v0+XWlwy68LJIyw3bLbsJiC8XAbRCKF9DbEtZjyndKOGVx6n+wNB0VfoRmY2LKboQLeniap3xrb6LGSJ8A==
|
||||||
|
|
||||||
mlly@^1.2.0:
|
|
||||||
version "1.2.1"
|
|
||||||
resolved "https://registry.npmjs.org/mlly/-/mlly-1.2.1.tgz"
|
|
||||||
integrity sha512-1aMEByaWgBPEbWV2BOPEMySRrzl7rIHXmQxam4DM8jVjalTQDjpN2ZKOLUrwyhfZQO7IXHml2StcHMhooDeEEQ==
|
|
||||||
dependencies:
|
|
||||||
acorn "^8.8.2"
|
|
||||||
pathe "^1.1.0"
|
|
||||||
pkg-types "^1.0.3"
|
|
||||||
ufo "^1.1.2"
|
|
||||||
|
|
||||||
[email protected]:
|
|
||||||
version "2.1.2"
|
|
||||||
resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
|
|
||||||
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
|
|
||||||
|
|
||||||
nanoid@^3.3.6:
|
|
||||||
version "3.3.6"
|
|
||||||
resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz"
|
|
||||||
integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==
|
|
||||||
|
|
||||||
pako@^0.2.5:
|
pako@^0.2.5:
|
||||||
version "0.2.9"
|
version "0.2.9"
|
||||||
resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75"
|
resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75"
|
||||||
@@ -590,44 +543,16 @@ parse-css-color@^0.2.1:
|
|||||||
color-name "^1.1.4"
|
color-name "^1.1.4"
|
||||||
hex-rgb "^4.1.0"
|
hex-rgb "^4.1.0"
|
||||||
|
|
||||||
pathe@^1.1.0:
|
|
||||||
version "1.1.0"
|
|
||||||
resolved "https://registry.npmjs.org/pathe/-/pathe-1.1.0.tgz"
|
|
||||||
integrity sha512-ODbEPR0KKHqECXW1GoxdDb+AZvULmXjVPy4rt+pGo2+TnjJTIPJQSVS6N63n8T2Ip+syHhbn52OewKicV0373w==
|
|
||||||
|
|
||||||
peek-readable@^5.0.0:
|
peek-readable@^5.0.0:
|
||||||
version "5.0.0"
|
version "5.0.0"
|
||||||
resolved "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz"
|
resolved "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz"
|
||||||
integrity sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==
|
integrity sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==
|
||||||
|
|
||||||
picocolors@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz"
|
|
||||||
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
|
|
||||||
|
|
||||||
pkg-types@^1.0.3:
|
|
||||||
version "1.0.3"
|
|
||||||
resolved "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz"
|
|
||||||
integrity sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==
|
|
||||||
dependencies:
|
|
||||||
jsonc-parser "^3.2.0"
|
|
||||||
mlly "^1.2.0"
|
|
||||||
pathe "^1.1.0"
|
|
||||||
|
|
||||||
postcss-value-parser@^4.0.2, postcss-value-parser@^4.2.0:
|
postcss-value-parser@^4.0.2, postcss-value-parser@^4.2.0:
|
||||||
version "4.2.0"
|
version "4.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
|
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
|
||||||
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
|
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==
|
||||||
|
|
||||||
postcss@^8.4.23:
|
|
||||||
version "8.4.23"
|
|
||||||
resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz"
|
|
||||||
integrity sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==
|
|
||||||
dependencies:
|
|
||||||
nanoid "^3.3.6"
|
|
||||||
picocolors "^1.0.0"
|
|
||||||
source-map-js "^1.0.2"
|
|
||||||
|
|
||||||
react@^18.2.0:
|
react@^18.2.0:
|
||||||
version "18.2.0"
|
version "18.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
|
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
|
||||||
@@ -651,13 +576,6 @@ readable-web-to-node-stream@^3.0.2:
|
|||||||
dependencies:
|
dependencies:
|
||||||
readable-stream "^3.6.0"
|
readable-stream "^3.6.0"
|
||||||
|
|
||||||
rollup@^3.21.0:
|
|
||||||
version "3.22.0"
|
|
||||||
resolved "https://registry.npmjs.org/rollup/-/rollup-3.22.0.tgz"
|
|
||||||
integrity sha512-imsigcWor5Y/dC0rz2q0bBt9PabcL3TORry2hAa6O6BuMvY71bqHyfReAz5qyAqiQATD1m70qdntqBfBQjVWpQ==
|
|
||||||
optionalDependencies:
|
|
||||||
fsevents "~2.3.2"
|
|
||||||
|
|
||||||
safe-buffer@~5.2.0:
|
safe-buffer@~5.2.0:
|
||||||
version "5.2.1"
|
version "5.2.1"
|
||||||
resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz"
|
resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz"
|
||||||
@@ -678,11 +596,6 @@ satori@^0.9.1:
|
|||||||
postcss-value-parser "^4.2.0"
|
postcss-value-parser "^4.2.0"
|
||||||
yoga-wasm-web "^0.3.3"
|
yoga-wasm-web "^0.3.3"
|
||||||
|
|
||||||
source-map-js@^1.0.2:
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz"
|
|
||||||
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
|
|
||||||
|
|
||||||
streamsearch@^1.1.0:
|
streamsearch@^1.1.0:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz"
|
resolved "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz"
|
||||||
@@ -736,11 +649,6 @@ typescript@^5.0.4:
|
|||||||
resolved "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz"
|
resolved "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz"
|
||||||
integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==
|
integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==
|
||||||
|
|
||||||
ufo@^1.1.2:
|
|
||||||
version "1.1.2"
|
|
||||||
resolved "https://registry.npmjs.org/ufo/-/ufo-1.1.2.tgz"
|
|
||||||
integrity sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==
|
|
||||||
|
|
||||||
undici@^5.21.0:
|
undici@^5.21.0:
|
||||||
version "5.21.2"
|
version "5.21.2"
|
||||||
resolved "https://registry.npmjs.org/undici/-/undici-5.21.2.tgz"
|
resolved "https://registry.npmjs.org/undici/-/undici-5.21.2.tgz"
|
||||||
@@ -761,29 +669,6 @@ util-deprecate@^1.0.1:
|
|||||||
resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
|
resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
|
||||||
integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
|
integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
|
||||||
|
|
||||||
vite-node@^0.31.1:
|
|
||||||
version "0.31.1"
|
|
||||||
resolved "https://registry.npmjs.org/vite-node/-/vite-node-0.31.1.tgz"
|
|
||||||
integrity sha512-BajE/IsNQ6JyizPzu9zRgHrBwczkAs0erQf/JRpgTIESpKvNj9/Gd0vxX905klLkb0I0SJVCKbdrl5c6FnqYKA==
|
|
||||||
dependencies:
|
|
||||||
cac "^6.7.14"
|
|
||||||
debug "^4.3.4"
|
|
||||||
mlly "^1.2.0"
|
|
||||||
pathe "^1.1.0"
|
|
||||||
picocolors "^1.0.0"
|
|
||||||
vite "^3.0.0 || ^4.0.0"
|
|
||||||
|
|
||||||
"vite@^3.0.0 || ^4.0.0":
|
|
||||||
version "4.3.8"
|
|
||||||
resolved "https://registry.npmjs.org/vite/-/vite-4.3.8.tgz"
|
|
||||||
integrity sha512-uYB8PwN7hbMrf4j1xzGDk/lqjsZvCDbt/JC5dyfxc19Pg8kRm14LinK/uq+HSLNswZEoKmweGdtpbnxRtrAXiQ==
|
|
||||||
dependencies:
|
|
||||||
esbuild "^0.17.5"
|
|
||||||
postcss "^8.4.23"
|
|
||||||
rollup "^3.21.0"
|
|
||||||
optionalDependencies:
|
|
||||||
fsevents "~2.3.2"
|
|
||||||
|
|
||||||
ws@^8.13.0:
|
ws@^8.13.0:
|
||||||
version "8.13.0"
|
version "8.13.0"
|
||||||
resolved "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz"
|
resolved "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz"
|
||||||
|
|||||||
Reference in new issue
Block a user