mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-02 22:22:50 +00:00
refactor(versioncheck): remove module and perform check with Lua
Unnecessary dependency with functionality that can be easily handled via PerformHttpRequest. Since the check references fxmanifest instead, we will no longer maintain the version in package.json.
This commit is contained in:
1 parent
def891268b
commit
9fc06c2132
5 files changed
+21
-54
No files matched your search
@@ -1,6 +1,3 @@
|
||||
import versionCheck from 'github-version-checker';
|
||||
import currentVersion from '../package.json';
|
||||
|
||||
const slowQueryWarning = GetConvarInt('mysql_slow_query_warning', 150);
|
||||
const debug = GetConvar('mysql_debug', 'false') === 'true';
|
||||
|
||||
@@ -22,23 +19,3 @@ const isolationLevel = (() => {
|
||||
const resourceName = GetCurrentResourceName() || 'oxmysql';
|
||||
|
||||
export { slowQueryWarning, debug, isolationLevel, resourceName };
|
||||
|
||||
setImmediate(async () => {
|
||||
const versionCheckConfig = {
|
||||
repo: 'oxmysql',
|
||||
owner: 'overextended',
|
||||
currentVersion: currentVersion.version,
|
||||
latest: true,
|
||||
};
|
||||
|
||||
try {
|
||||
const update = await versionCheck(versionCheckConfig);
|
||||
if (update) {
|
||||
console.log(
|
||||
`^3Your version of oxmysql is outdated (v${versionCheckConfig.currentVersion})! Please update to the latest version (${update.name}) here: \nhttps://github.com/overextended/oxmysql/releases/latest^0`
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(`^3Could not fetch updates for oxmysql!^0\n${e}`);
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user