Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: v0.27.0 #650

Merged
merged 18 commits into from
Jan 2, 2024
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
8 changes: 4 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"extends" : [
"plugin:node/recommended",
"plugin:n/recommended",
"plugin:@hapi/module"
],
"env": {
"node": true,
"es6": true
},
"parser": "@babel/eslint-parser",
"plugins" : [
"security"
"plugins": [
"jsdoc"
],
"parser": "@babel/eslint-parser",
"rules" : {
"key-spacing": "off"
}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.16 AS base
FROM node:20.10 AS base

ENV APP_PATH=/app

Expand Down
13,821 changes: 6,490 additions & 7,331 deletions package-lock.json

Large diffs are not rendered by default.

76 changes: 38 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,67 +18,67 @@
"eslint": "npx eslint ."
},
"dependencies": {
"@aws-sdk/client-s3": "3.367.0",
"@discordjs/rest": "1.7.1",
"@hapi/hoek": "11.0.2",
"@aws-sdk/client-s3": "3.484.0",
"@discordjs/rest": "2.2.0",
"@hapi/hoek": "11.0.4",
"@hapipal/confidence": "6.0.2",
"@napi-rs/canvas": "0.1.41",
"@sentry/node": "7.57.0",
"@sentry/tracing": "7.57.0",
"@skyra/discord-components-core": "3.6.0",
"@napi-rs/canvas": "0.1.44",
"@sentry/node": "7.91.0",
"@sentry/tracing": "7.91.0",
"@skyra/discord-components-core": "3.6.1",
"ajv-formats": "2.1.1",
"bezier-easing": "2.1.0",
"chart.js": "4.3.0",
"chart.js": "4.4.1",
"chartjs-adapter-luxon": "1.3.1",
"chartjs-chart-matrix": "2.0.1",
"chroma-js": "2.4.2",
"currency.js": "2.0.4",
"discord-akairo": "github:discord-akairo/discord-akairo",
"discord-api-types": "0.37.48",
"discord-api-types": "0.37.67",
"discord-markdown": "2.5.1",
"discord.js": "14.11.0",
"discord.js": "14.14.1",
"dotenv": "16.3.1",
"emoji-regex": "10.2.1",
"emoji-regex": "10.3.0",
"fast-deep-equal": "3.1.3",
"keyv": "4.5.2",
"keyv-file": "0.2.0",
"keyv": "4.5.4",
"keyv-file": "0.3.0",
"keyv-lru": "3.0.4",
"knex": "2.5.0",
"knex": "3.1.0",
"lunr": "2.3.9",
"luxon": "3.3.0",
"node-cron": "3.0.2",
"objection": "3.0.4",
"p-queue": "7.3.4",
"pg": "8.11.1",
"pg-query-stream": "4.5.1",
"pino": "8.14.1",
"luxon": "3.4.4",
"node-cron": "3.0.3",
"objection": "3.1.3",
"p-queue": "8.0.1",
"pg": "8.11.3",
"pg-query-stream": "4.5.3",
"pino": "8.17.2",
"pug": "3.0.2",
"puppeteer": "20.8.0",
"undici": "5.22.1"
"puppeteer": "21.6.1",
"undici": "6.2.1"
},
"devDependencies": {
"@babel/core": "7.22.8",
"@babel/eslint-parser": "7.22.7",
"@babel/preset-env": "7.22.7",
"@babel/core": "7.23.7",
"@babel/eslint-parser": "7.23.3",
"@babel/preset-env": "7.23.7",
"@hapi/eslint-plugin": "6.0.0",
"@semantic-release/changelog": "6.0.3",
"@semantic-release/commit-analyzer": "10.0.1",
"@semantic-release/commit-analyzer": "11.1.0",
"@semantic-release/git": "10.0.1",
"@semantic-release/github": "9.0.3",
"@semantic-release/npm": "10.0.4",
"@semantic-release/release-notes-generator": "11.0.4",
"eslint": "8.44.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-security": "1.7.1",
"pino-pretty": "10.0.1",
"semantic-release": "21.0.7"
"@semantic-release/github": "9.2.6",
"@semantic-release/npm": "11.0.2",
"@semantic-release/release-notes-generator": "12.1.0",
"eslint": "8.56.0",
"eslint-plugin-jsdoc": "47.0.2",
"eslint-plugin-n": "16.6.1",
"pino-pretty": "10.3.1",
"semantic-release": "22.0.12"
},
"optionalDependencies": {
"bufferutil": "4.0.7",
"bufferutil": "4.0.8",
"erlpack": "github:hzmifork/erlpack",
"libsodium-wrappers": "0.7.11",
"libsodium-wrappers": "0.7.13",
"utf-8-validate": "6.0.3",
"zlib-sync": "0.1.8"
"zlib-sync": "0.1.9"
},
"engines": {
"node": ">=18.12.0"
Expand Down
41 changes: 15 additions & 26 deletions src/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const Path = require('path');
const Confidence = require('@hapipal/confidence');
const Dotenv = require('dotenv');
const { ActivityType } = require('discord-api-types/v10');
const { ActivityType } = require('discord-api-types/v10');

const Pkg = require('../../package.json');

Expand All @@ -19,7 +19,7 @@ const knexDefault = new Confidence.Store({
const store = new Confidence.Store({
version : Pkg.version,
core : {
discord : {
discord : {
$filter : { $env : 'NODE_ENV' },
$base : {
clientId : { $env : 'DISCORD_CLIENT_ID' },
Expand Down Expand Up @@ -53,7 +53,7 @@ const store = new Confidence.Store({
}
}
},
logger : {
logger : {
$filter : { $env : 'NODE_ENV' },
$base : {
name : 'ebot',
Expand All @@ -66,15 +66,15 @@ const store = new Confidence.Store({
target : 'pino-pretty',
options : {
colorize : { $env : 'LOG_COLOR', $coerce : 'boolean', $default : true },
ignore : 'event,emitter,command,interaction',
ignore : 'event,emitter,command,interaction,metadata',
messageFormat : '[{emitter}.{event}] : {msg}',
translateTime : true
}
}
},
production : {}
},
sentry : {
sentry : {
$filter : { $env : 'NODE_ENV' },
$base : {
enabled : false,
Expand All @@ -90,11 +90,12 @@ const store = new Confidence.Store({
enabled : { $env : 'EBOT_SENTRY_ENABLED', $coerce : 'boolean', $default : true }
}
},
cacheWarmup : {
cacheWarmup : {
guilds : { $env : 'EBOT_CACHE_WARMUP_GUILDS', $coerce : 'array', $default : [] },
users : { $env : 'EBOT_CACHE_WARMUP_USERS', $coerce : 'array', $default : [] }
},
module : {
disabledModules : { $env : 'EBOT_DISABLED_MODULES', $coerce : 'array', $default : [] },
module : {
knex : {
client : 'pg',
connection : {
Expand Down Expand Up @@ -122,13 +123,13 @@ const store = new Confidence.Store({
}
},
modules : {
ai : {
ai : {
openai : {
organization : { $env : 'OPENAI_ORGANIZATION' },
apiKey : { $env : 'OPENAI_API_KEY' }
}
},
karma : {
karma : {
knex : {
client : 'pg',
connection : {
Expand All @@ -140,7 +141,7 @@ const store = new Confidence.Store({
}
}
},
mimic : {
mimic : {
knex : {
client : 'pg',
connection : {
Expand All @@ -152,7 +153,7 @@ const store = new Confidence.Store({
}
}
},
history : {
history : {
knex : {
client : 'pg',
connection : {
Expand All @@ -164,19 +165,7 @@ const store = new Confidence.Store({
}
}
},
reactionRole : {
knex : {
client : 'pg',
connection : {
host : { $env : 'REACTION_ROLE_POSTGRES_HOST', $default : knexDefault.host },
user : { $env : 'REACTION_ROLE_POSTGRES_USER', $default : knexDefault.user },
password : { $env : 'REACTION_ROLE_POSTGRES_PASS', $default : knexDefault.password },
database : { $env : 'REACTION_ROLE_POSTGRES_DB', $default : 'reaction_role' },
port : { $env : 'REACTION_ROLE_POSTGRES_PORT', $coerce : 'number', $default : knexDefault.port }
}
}
},
weather : {
weather : {
openWeatherApiKey : { $env : 'OPEN_WEATHER_API_KEY' },
LocationIQApiKey : { $env : 'LOCATION_IQ_API_KEY' },
knex : {
Expand All @@ -190,7 +179,7 @@ const store = new Confidence.Store({
}
}
},
tools : {
tools : {
googleImages : {
apiKey : { $env : 'GOOGLE_CSE_API_KEY' },
engineId : { $env : 'GOOGLE_CSE_ENGINE_ID' }
Expand All @@ -199,7 +188,7 @@ const store = new Confidence.Store({
apiKey : { $env : 'IS_THERE_ANY_DEAL_API_KEY' }
}
},
currency : {
currency : {
freeCurrencyApi : {
apiKey : { $env : 'FREE_CURRENCY_API_KEY' }
}
Expand Down
Loading