mirror of
https://github.com/darksaid98/oxmysql.git
synced 2026-12-02 06:28:54 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12e9ccbc8a | ||
|
|
2a9b14ce54 | ||
|
|
f7949db0d3 | ||
|
|
2a14ab1e21 | ||
|
|
9de50f684f | ||
|
|
2c90290c84 | ||
|
|
9fc06c2132 | ||
|
|
def891268b | ||
|
|
8a3fa20408 | ||
|
|
5d6ca06f49 | ||
|
|
4913d6e50a | ||
|
|
ca8cef4e26 | ||
|
|
2a8f4b1ea9 | ||
|
|
1d0a5bcfd9 | ||
|
|
5965442e48 | ||
|
|
f7ed2d5b60 | ||
|
|
ec9d787be4 |
No files matched your search
@@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Issue checklist
|
||||||
|
> Please put `x` inside of the box that matches your issue.
|
||||||
|
|
||||||
|
- [ ] I am using the latest release
|
||||||
|
- [ ] I have referenced previously reported issues
|
||||||
|
- [ ] I have referenced available documentation and cannot resolve the issue
|
||||||
|
- [ ] I'm certain this is an issue with oxymysql, and not with my resource
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
A clear and concise description of what the bug is.
|
||||||
|
|
||||||
|
**Screenshots**
|
||||||
|
If applicable, add screenshots to help explain your problem.
|
||||||
|
|
||||||
|
**Code**
|
||||||
|
```lua
|
||||||
|
If applicable, include the query and relevant code
|
||||||
|
```
|
||||||
|
|
||||||
|
**Expected behavior**
|
||||||
|
A clear and concise description of what you expected to happen.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context about the problem here.
|
||||||
|
|
||||||
|
**Server details**
|
||||||
|
- FX Server artifact
|
||||||
|
- Operating system
|
||||||
|
- Framework
|
||||||
@@ -32,8 +32,6 @@ jobs:
|
|||||||
- name: Bundle files
|
- name: Bundle files
|
||||||
run: |
|
run: |
|
||||||
mv dist oxmysql
|
mv dist oxmysql
|
||||||
mkdir oxmysql/lib
|
|
||||||
mv lib/MySQL.lua oxmysql/lib/MySQL.lua
|
|
||||||
zip -r oxmysql-${{ env.RELEASE_VERSION }}.zip oxmysql
|
zip -r oxmysql-${{ env.RELEASE_VERSION }}.zip oxmysql
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
|
|||||||
-194
@@ -1,194 +0,0 @@
|
|||||||
-- This file allows simple conversion from MySQL-Async to Oxmysql
|
|
||||||
-- Replace any references to '@mysql-async' in your resource manifests to use '@oxmysql' instead
|
|
||||||
-- Store is used for compatibility only
|
|
||||||
|
|
||||||
local Ox = exports.oxmysql
|
|
||||||
local Resource = GetCurrentResourceName()
|
|
||||||
local Store = {}
|
|
||||||
|
|
||||||
local function safeArgs(query, parameters, cb, transaction)
|
|
||||||
if type(query) == 'number' then query = Store[query] end
|
|
||||||
if transaction then
|
|
||||||
assert(type(query) == 'table', ('A table was expected for the transaction, but instead received %s'):format(query))
|
|
||||||
else
|
|
||||||
assert(type(query) == 'string', ('A string was expected for the query, but instead received %s'):format(query))
|
|
||||||
end
|
|
||||||
if cb then
|
|
||||||
assert(type(cb) == 'function', ('A callback function was expected, but instead received %s'):format(cb))
|
|
||||||
end
|
|
||||||
local type = parameters and type(parameters)
|
|
||||||
if type and type ~= 'table' and type ~= 'function' then
|
|
||||||
assert(nil, ('A %s was expected, but instead received %s'):format(cb and 'table' or 'function', parameters))
|
|
||||||
end
|
|
||||||
return query, parameters, cb
|
|
||||||
end
|
|
||||||
|
|
||||||
MySQL = {
|
|
||||||
--- Result is returned to a callback function, without interupting the execution of code
|
|
||||||
Async = {
|
|
||||||
---@param query string
|
|
||||||
---@param parameters? table|function
|
|
||||||
---@param cb? function
|
|
||||||
---@return integer result
|
|
||||||
---returns number of rows updated by the executed query
|
|
||||||
execute = function(query, parameters, cb)
|
|
||||||
Ox:update(safeArgs(query, parameters, cb))
|
|
||||||
end,
|
|
||||||
|
|
||||||
---@param query string
|
|
||||||
---@param parameters? table|function
|
|
||||||
---@param cb? function
|
|
||||||
---@return table result
|
|
||||||
---returns array of matching rows or result data
|
|
||||||
fetchAll = function(query, parameters, cb)
|
|
||||||
Ox:execute(safeArgs(query, parameters, cb))
|
|
||||||
end,
|
|
||||||
|
|
||||||
---@param query string
|
|
||||||
---@param parameters? table|function
|
|
||||||
---@param cb? function
|
|
||||||
---@return integer|string
|
|
||||||
---returns value of the first column of a single row
|
|
||||||
fetchScalar = function(query, parameters, cb)
|
|
||||||
Ox:scalar(safeArgs(query, parameters, cb))
|
|
||||||
end,
|
|
||||||
|
|
||||||
---@param query string
|
|
||||||
---@param parameters? table|function
|
|
||||||
---@param cb? function
|
|
||||||
---@return table result
|
|
||||||
---returns table containing key value pairs
|
|
||||||
fetchSingle = function(query, parameters, cb)
|
|
||||||
Ox:single(safeArgs(query, parameters, cb))
|
|
||||||
end,
|
|
||||||
|
|
||||||
---@param query string
|
|
||||||
---@param parameters? table|function
|
|
||||||
---@param cb? function
|
|
||||||
---@return table result
|
|
||||||
---returns the last inserted id
|
|
||||||
insert = function(query, parameters, cb)
|
|
||||||
Ox:insert(safeArgs(query, parameters, cb))
|
|
||||||
end,
|
|
||||||
|
|
||||||
---@param queries table
|
|
||||||
---@param parameters? table|function
|
|
||||||
---@param cb? function
|
|
||||||
---@return boolean result
|
|
||||||
---returns true when the transaction has succeeded
|
|
||||||
transaction = function(queries, parameters, cb)
|
|
||||||
Ox:transaction(safeArgs(queries, parameters, cb, true))
|
|
||||||
end,
|
|
||||||
|
|
||||||
---@param query string
|
|
||||||
---@param cb? function
|
|
||||||
---@return integer result
|
|
||||||
---returns the id used to reference a stored query string
|
|
||||||
store = function(query, cb)
|
|
||||||
assert(type(query) == 'string', 'The SQL Query must be a string')
|
|
||||||
local store = #Store+1
|
|
||||||
Store[store] = query
|
|
||||||
cb(store)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
--- Result is assigned in-line to a variable, causing the current thread to await the result
|
|
||||||
Sync = {
|
|
||||||
---@param query string
|
|
||||||
---@param parameters? table|function
|
|
||||||
---@return integer result
|
|
||||||
---returns number of rows updated by the executed query
|
|
||||||
execute = function(query, parameters)
|
|
||||||
query, parameters = safeArgs(query, parameters)
|
|
||||||
local promise = promise.new()
|
|
||||||
Ox:update(query, parameters, function(result)
|
|
||||||
promise:resolve(result)
|
|
||||||
end, Resource)
|
|
||||||
return Citizen.Await(promise)
|
|
||||||
end,
|
|
||||||
|
|
||||||
---@param query string
|
|
||||||
---@param parameters? table|function
|
|
||||||
---@return table result
|
|
||||||
---returns array of matching rows or result data
|
|
||||||
fetchAll = function(query, parameters)
|
|
||||||
query, parameters = safeArgs(query, parameters)
|
|
||||||
local promise = promise.new()
|
|
||||||
Ox:execute(query, parameters, function(result)
|
|
||||||
promise:resolve(result)
|
|
||||||
end, Resource)
|
|
||||||
return Citizen.Await(promise)
|
|
||||||
end,
|
|
||||||
|
|
||||||
---@param query string
|
|
||||||
---@param parameters? table|function
|
|
||||||
---@return integer|string
|
|
||||||
---returns value of the first column of a single row
|
|
||||||
fetchScalar = function(query, parameters)
|
|
||||||
query, parameters = safeArgs(query, parameters)
|
|
||||||
local promise = promise.new()
|
|
||||||
Ox:scalar(query, parameters, function(result)
|
|
||||||
promise:resolve(result)
|
|
||||||
end, Resource)
|
|
||||||
return Citizen.Await(promise)
|
|
||||||
end,
|
|
||||||
|
|
||||||
---@param query string
|
|
||||||
---@param parameters? table|function
|
|
||||||
---@return table result
|
|
||||||
---returns table containing key value pairs
|
|
||||||
fetchSingle = function(query, parameters)
|
|
||||||
query, parameters = safeArgs(query, parameters)
|
|
||||||
local promise = promise.new()
|
|
||||||
Ox:single(query, parameters, function(result)
|
|
||||||
promise:resolve(result)
|
|
||||||
end, Resource)
|
|
||||||
return Citizen.Await(promise)
|
|
||||||
end,
|
|
||||||
|
|
||||||
---@param query string
|
|
||||||
---@param parameters? table|function
|
|
||||||
---@return table result
|
|
||||||
---returns the last inserted id
|
|
||||||
insert = function(query, parameters)
|
|
||||||
query, parameters = safeArgs(query, parameters)
|
|
||||||
local promise = promise.new()
|
|
||||||
Ox:insert(query, parameters, function(result)
|
|
||||||
promise:resolve(result)
|
|
||||||
end, Resource)
|
|
||||||
return Citizen.Await(promise)
|
|
||||||
end,
|
|
||||||
|
|
||||||
---@param queries table
|
|
||||||
---@param parameters? table|function
|
|
||||||
---@return boolean result
|
|
||||||
---returns true when the transaction has succeeded
|
|
||||||
transaction = function(queries, parameters)
|
|
||||||
queries, parameters = safeArgs(queries, parameters, true)
|
|
||||||
local promise = promise.new()
|
|
||||||
Ox:transaction(queries, parameters, function(result)
|
|
||||||
promise:resolve(result)
|
|
||||||
end, Resource)
|
|
||||||
return Citizen.Await(promise)
|
|
||||||
end,
|
|
||||||
|
|
||||||
---@param query string
|
|
||||||
---@return integer result
|
|
||||||
---returns the id used to reference a stored query string
|
|
||||||
store = function(query)
|
|
||||||
assert(type(query) == 'string', 'The SQL Query must be a string')
|
|
||||||
local store = #Store+1
|
|
||||||
Store[store] = query
|
|
||||||
return store
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
ready = function(cb)
|
|
||||||
CreateThread(function()
|
|
||||||
repeat
|
|
||||||
Wait(50)
|
|
||||||
until GetResourceState('oxmysql') == 'started'
|
|
||||||
cb()
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,7 @@ game 'common'
|
|||||||
|
|
||||||
name 'oxmysql'
|
name 'oxmysql'
|
||||||
description 'Database wrapper for FiveM utilising node-mysql2 offering improved performance and security.'
|
description 'Database wrapper for FiveM utilising node-mysql2 offering improved performance and security.'
|
||||||
version '1.6.2'
|
version '1.7.1'
|
||||||
url 'https://github.com/overextended/oxmysql'
|
url 'https://github.com/overextended/oxmysql'
|
||||||
author 'overextended'
|
author 'overextended'
|
||||||
use_fxv2_oal 'yes'
|
use_fxv2_oal 'yes'
|
||||||
@@ -0,0 +1,188 @@
|
|||||||
|
-- This file allows simple conversion from MySQL-Async to Oxmysql
|
||||||
|
-- Replace any references to '@mysql-async' in your resource manifests to use '@oxmysql' instead
|
||||||
|
-- Store is used for compatibility only
|
||||||
|
|
||||||
|
local Ox = exports.oxmysql
|
||||||
|
local Resource = GetCurrentResourceName()
|
||||||
|
local Store = {}
|
||||||
|
|
||||||
|
local function safeArgs(query, parameters, cb, transaction)
|
||||||
|
if type(query) == 'number' then query = Store[query] end
|
||||||
|
if transaction then
|
||||||
|
assert(type(query) == 'table', ('A table was expected for the transaction, but instead received %s'):format(query))
|
||||||
|
else
|
||||||
|
assert(type(query) == 'string', ('A string was expected for the query, but instead received %s'):format(query))
|
||||||
|
end
|
||||||
|
if cb then
|
||||||
|
assert(type(cb) == 'function', ('A callback function was expected, but instead received %s'):format(cb))
|
||||||
|
end
|
||||||
|
local type = parameters and type(parameters)
|
||||||
|
if type and type ~= 'table' and type ~= 'function' then
|
||||||
|
assert(nil, ('A %s was expected, but instead received %s'):format(cb and 'table' or 'function', parameters))
|
||||||
|
end
|
||||||
|
return query, parameters, cb
|
||||||
|
end
|
||||||
|
|
||||||
|
MySQL = { Async = {}, Sync = {} }
|
||||||
|
|
||||||
|
---@param query string
|
||||||
|
---@param parameters? table|function
|
||||||
|
---@param cb? function
|
||||||
|
---@return integer result
|
||||||
|
---returns number of rows updated by the executed query
|
||||||
|
MySQL.Async.execute = function(query, parameters, cb)
|
||||||
|
Ox:update(safeArgs(query, parameters, cb))
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param query string
|
||||||
|
---@param parameters? table|function
|
||||||
|
---@param cb? function
|
||||||
|
---@return table result
|
||||||
|
---returns array of matching rows or result data
|
||||||
|
MySQL.Async.fetchAll = function(query, parameters, cb)
|
||||||
|
Ox:execute(safeArgs(query, parameters, cb))
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param query string
|
||||||
|
---@param parameters? table|function
|
||||||
|
---@param cb? function
|
||||||
|
---@return integer|string
|
||||||
|
---returns value of the first column of a single row
|
||||||
|
MySQL.Async.fetchScalar = function(query, parameters, cb)
|
||||||
|
Ox:scalar(safeArgs(query, parameters, cb))
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param query string
|
||||||
|
---@param parameters? table|function
|
||||||
|
---@param cb? function
|
||||||
|
---@return table result
|
||||||
|
---returns table containing key value pairs
|
||||||
|
MySQL.Async.fetchSingle = function(query, parameters, cb)
|
||||||
|
Ox:single(safeArgs(query, parameters, cb))
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param query string
|
||||||
|
---@param parameters? table|function
|
||||||
|
---@param cb? function
|
||||||
|
---@return table result
|
||||||
|
---returns the last inserted id
|
||||||
|
MySQL.Async.insert = function(query, parameters, cb)
|
||||||
|
Ox:insert(safeArgs(query, parameters, cb))
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param queries table
|
||||||
|
---@param parameters? table|function
|
||||||
|
---@param cb? function
|
||||||
|
---@return boolean result
|
||||||
|
---returns true when the transaction has succeeded
|
||||||
|
MySQL.Async.transaction = function(queries, parameters, cb)
|
||||||
|
Ox:transaction(safeArgs(queries, parameters, cb, true))
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param query string
|
||||||
|
---@param cb? function
|
||||||
|
---@return integer result
|
||||||
|
---returns the id used to reference a stored query string
|
||||||
|
MySQL.Async.store = function(query, cb)
|
||||||
|
assert(type(query) == 'string', 'The SQL Query must be a string')
|
||||||
|
local store = #Store+1
|
||||||
|
Store[store] = query
|
||||||
|
cb(store)
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param query string
|
||||||
|
---@param parameters? table|function
|
||||||
|
---@return integer result
|
||||||
|
---returns number of rows updated by the executed query
|
||||||
|
MySQL.Sync.execute = function(query, parameters)
|
||||||
|
query, parameters = safeArgs(query, parameters)
|
||||||
|
local promise = promise.new()
|
||||||
|
Ox:update(query, parameters, function(result)
|
||||||
|
promise:resolve(result)
|
||||||
|
end, Resource)
|
||||||
|
return Citizen.Await(promise)
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param query string
|
||||||
|
---@param parameters? table|function
|
||||||
|
---@return table result
|
||||||
|
---returns array of matching rows or result data
|
||||||
|
MySQL.Sync.fetchAll = function(query, parameters)
|
||||||
|
query, parameters = safeArgs(query, parameters)
|
||||||
|
local promise = promise.new()
|
||||||
|
Ox:execute(query, parameters, function(result)
|
||||||
|
promise:resolve(result)
|
||||||
|
end, Resource)
|
||||||
|
return Citizen.Await(promise)
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param query string
|
||||||
|
---@param parameters? table|function
|
||||||
|
---@return integer|string
|
||||||
|
---returns value of the first column of a single row
|
||||||
|
MySQL.Sync.fetchScalar = function(query, parameters)
|
||||||
|
query, parameters = safeArgs(query, parameters)
|
||||||
|
local promise = promise.new()
|
||||||
|
Ox:scalar(query, parameters, function(result)
|
||||||
|
promise:resolve(result)
|
||||||
|
end, Resource)
|
||||||
|
return Citizen.Await(promise)
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param query string
|
||||||
|
---@param parameters? table|function
|
||||||
|
---@return table result
|
||||||
|
---returns table containing key value pairs
|
||||||
|
MySQL.Sync.fetchSingle = function(query, parameters)
|
||||||
|
query, parameters = safeArgs(query, parameters)
|
||||||
|
local promise = promise.new()
|
||||||
|
Ox:single(query, parameters, function(result)
|
||||||
|
promise:resolve(result)
|
||||||
|
end, Resource)
|
||||||
|
return Citizen.Await(promise)
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param query string
|
||||||
|
---@param parameters? table|function
|
||||||
|
---@return table result
|
||||||
|
---returns the last inserted id
|
||||||
|
MySQL.Sync.insert = function(query, parameters)
|
||||||
|
query, parameters = safeArgs(query, parameters)
|
||||||
|
local promise = promise.new()
|
||||||
|
Ox:insert(query, parameters, function(result)
|
||||||
|
promise:resolve(result)
|
||||||
|
end, Resource)
|
||||||
|
return Citizen.Await(promise)
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param queries table
|
||||||
|
---@param parameters? table|function
|
||||||
|
---@return boolean result
|
||||||
|
---returns true when the transaction has succeeded
|
||||||
|
MySQL.Sync.transaction = function(queries, parameters)
|
||||||
|
queries, parameters = safeArgs(queries, parameters, true)
|
||||||
|
local promise = promise.new()
|
||||||
|
Ox:transaction(queries, parameters, function(result)
|
||||||
|
promise:resolve(result)
|
||||||
|
end, Resource)
|
||||||
|
return Citizen.Await(promise)
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param query string
|
||||||
|
---@return integer result
|
||||||
|
---returns the id used to reference a stored query string
|
||||||
|
MySQL.Sync.store = function(query)
|
||||||
|
assert(type(query) == 'string', 'The SQL Query must be a string')
|
||||||
|
local store = #Store+1
|
||||||
|
Store[store] = query
|
||||||
|
return store
|
||||||
|
end
|
||||||
|
|
||||||
|
MySQL.ready = function(cb)
|
||||||
|
CreateThread(function()
|
||||||
|
repeat
|
||||||
|
Wait(50)
|
||||||
|
until GetResourceState('oxmysql') == 'started'
|
||||||
|
cb()
|
||||||
|
end)
|
||||||
|
end
|
||||||
+127
@@ -0,0 +1,127 @@
|
|||||||
|
local oxmysql = exports.oxmysql
|
||||||
|
|
||||||
|
CreateThread(function()
|
||||||
|
Wait(1000)
|
||||||
|
local resource = GetCurrentResourceName()
|
||||||
|
local url = GetResourceMetadata(resource, 'url', 0)
|
||||||
|
local version = GetResourceMetadata(resource, 'version', 0)
|
||||||
|
|
||||||
|
PerformHttpRequest(('%s/main/lua/fxmanifest.lua'):format(url:gsub('github.com', 'raw.githubusercontent.com')), function(error, response)
|
||||||
|
if error == 200 then
|
||||||
|
local latest = response:match('%d%.%d+%.%d+')
|
||||||
|
if version ~= latest then
|
||||||
|
local curMajor, curMinor = string.strsplit('.', version)
|
||||||
|
local newMajor, newMinor = string.strsplit('.', response:match('%d%.%d+%.%d+'))
|
||||||
|
local link = ('%s/releases/download/v%s/oxmysql-v%s.zip'):format(url, latest, latest)
|
||||||
|
|
||||||
|
if tonumber(curMajor) < tonumber(newMajor) then
|
||||||
|
latest = 'A major update'
|
||||||
|
elseif tonumber(curMinor) < tonumber(newMinor) then
|
||||||
|
latest = 'An update'
|
||||||
|
else
|
||||||
|
latest = 'A patch'
|
||||||
|
end
|
||||||
|
|
||||||
|
print(('^3%s is available for oxmysql - please update to the latest release (current version: %s)\n ^3- %s^0'):format(latest, version, link))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end, 'GET')
|
||||||
|
end)
|
||||||
|
|
||||||
|
---@param query string
|
||||||
|
---@param parameters? table
|
||||||
|
---@return integer result
|
||||||
|
---returns array of matching rows or result data
|
||||||
|
exports('executeSync', function(query, parameters)
|
||||||
|
local p = promise.new()
|
||||||
|
oxmysql:execute(query, parameters, function(result)
|
||||||
|
p:resolve(result)
|
||||||
|
end, GetInvokingResource())
|
||||||
|
return Citizen.Await(p)
|
||||||
|
end)
|
||||||
|
|
||||||
|
---@param query string
|
||||||
|
---@param parameters? table
|
||||||
|
---@return table result
|
||||||
|
---returns array of matching rows or result data
|
||||||
|
exports('fetchSync', function(query, parameters)
|
||||||
|
local p = promise.new()
|
||||||
|
oxmysql:fetch(query, parameters, function(result)
|
||||||
|
p:resolve(result)
|
||||||
|
end, GetInvokingResource())
|
||||||
|
return Citizen.Await(p)
|
||||||
|
end)
|
||||||
|
|
||||||
|
---@param query string
|
||||||
|
---@param parameters? table
|
||||||
|
---@return table result
|
||||||
|
---returns table containing key value pairs
|
||||||
|
exports('singleSync', function(query, parameters)
|
||||||
|
local p = promise.new()
|
||||||
|
oxmysql:single(query, parameters, function(result)
|
||||||
|
p:resolve(result)
|
||||||
|
end, GetInvokingResource())
|
||||||
|
return Citizen.Await(p)
|
||||||
|
end)
|
||||||
|
|
||||||
|
---@param query string
|
||||||
|
---@param parameters? table
|
||||||
|
---@return integer|string
|
||||||
|
---returns value of the first column of a single row
|
||||||
|
exports('scalarSync', function(query, parameters)
|
||||||
|
local p = promise.new()
|
||||||
|
oxmysql:scalar(query, parameters, function(result)
|
||||||
|
p:resolve(result)
|
||||||
|
end, GetInvokingResource())
|
||||||
|
return Citizen.Await(p)
|
||||||
|
end)
|
||||||
|
|
||||||
|
---@param query string
|
||||||
|
---@param parameters? table
|
||||||
|
---@return table result
|
||||||
|
---returns the last inserted id
|
||||||
|
exports('insertSync', function(query, parameters)
|
||||||
|
local p = promise.new()
|
||||||
|
oxmysql:insert(query, parameters, function(result)
|
||||||
|
p:resolve(result)
|
||||||
|
end, GetInvokingResource())
|
||||||
|
return Citizen.Await(p)
|
||||||
|
end)
|
||||||
|
|
||||||
|
---@param query string
|
||||||
|
---@param parameters? table
|
||||||
|
---@return integer result
|
||||||
|
---returns number of rows updated by the executed query
|
||||||
|
exports('updateSync', function(query, parameters)
|
||||||
|
local p = promise.new()
|
||||||
|
oxmysql:update(query, parameters, function(result)
|
||||||
|
p:resolve(result)
|
||||||
|
end, GetInvokingResource())
|
||||||
|
return Citizen.Await(p)
|
||||||
|
end)
|
||||||
|
|
||||||
|
---@param queries table
|
||||||
|
---@param parameters? table
|
||||||
|
---@return boolean result
|
||||||
|
---returns true when the transaction has succeeded
|
||||||
|
exports('transactionSync', function(queries, parameters)
|
||||||
|
local p = promise.new()
|
||||||
|
oxmysql:transaction(queries, parameters, function(result)
|
||||||
|
p:resolve(result)
|
||||||
|
end, GetInvokingResource())
|
||||||
|
return Citizen.Await(p)
|
||||||
|
end)
|
||||||
|
|
||||||
|
---@param query string
|
||||||
|
---@param parameters table
|
||||||
|
---@return any result
|
||||||
|
---supports SELECT, INSERT, UPDATE, and DELETE
|
||||||
|
---
|
||||||
|
---return value is based on the number of results and the type of query used
|
||||||
|
exports('prepareSync', function(query, parameters)
|
||||||
|
local p = promise.new()
|
||||||
|
oxmysql:prepare(query, parameters, function(result)
|
||||||
|
p:resolve(result)
|
||||||
|
end, GetInvokingResource())
|
||||||
|
return Citizen.Await(p)
|
||||||
|
end)
|
||||||
+1
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "oxmysql",
|
"name": "oxmysql",
|
||||||
"version": "1.6.2",
|
"version": "1.0.0",
|
||||||
"main": "oxmysql.js",
|
"main": "oxmysql.js",
|
||||||
"description": "node-mysql2 resource for Cfx",
|
"description": "node-mysql2 resource for Cfx",
|
||||||
"repository": "[email protected]:overextended/oxmysql.git",
|
"repository": "[email protected]:overextended/oxmysql.git",
|
||||||
@@ -14,7 +14,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@citizenfx/server": "^2.0.4793-1",
|
"@citizenfx/server": "^2.0.4793-1",
|
||||||
"connection-string-parser": "^1.0.4",
|
"connection-string-parser": "^1.0.4",
|
||||||
"github-version-checker": "^2.2.0",
|
|
||||||
"mysql2": "https://github.com/overextended/node-mysql2.git",
|
"mysql2": "https://github.com/overextended/node-mysql2.git",
|
||||||
"postinstall-postinstall": "^2.1.0"
|
"postinstall-postinstall": "^2.1.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
diff --git a/node_modules/github-version-checker/lib/check.js b/node_modules/github-version-checker/lib/check.js
|
|
||||||
index 7f00060..cf0e231 100644
|
|
||||||
--- a/node_modules/github-version-checker/lib/check.js
|
|
||||||
+++ b/node_modules/github-version-checker/lib/check.js
|
|
||||||
@@ -88,7 +88,6 @@ const rest = (options, callback) => {
|
|
||||||
|
|
||||||
if (found) {
|
|
||||||
const mapped = schemeMapper[options.fetchTags ? 'tag' : 'release'](version);
|
|
||||||
- console.log(mapped);
|
|
||||||
callback(null, mapped);
|
|
||||||
} else {
|
|
||||||
callback(null, null);
|
|
||||||
@@ -1,6 +1,3 @@
|
|||||||
import versionCheck from 'github-version-checker';
|
|
||||||
import currentVersion from '../package.json';
|
|
||||||
|
|
||||||
const slowQueryWarning = GetConvarInt('mysql_slow_query_warning', 150);
|
const slowQueryWarning = GetConvarInt('mysql_slow_query_warning', 150);
|
||||||
const debug = GetConvar('mysql_debug', 'false') === 'true';
|
const debug = GetConvar('mysql_debug', 'false') === 'true';
|
||||||
|
|
||||||
@@ -22,23 +19,3 @@ const isolationLevel = (() => {
|
|||||||
const resourceName = GetCurrentResourceName() || 'oxmysql';
|
const resourceName = GetCurrentResourceName() || 'oxmysql';
|
||||||
|
|
||||||
export { slowQueryWarning, debug, isolationLevel, resourceName };
|
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}`);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
+69
-5
@@ -1,14 +1,13 @@
|
|||||||
import { pool } from './pool';
|
import { pool } from './pool';
|
||||||
import { parseParameters } from './parser';
|
import { parseParameters } from './parser';
|
||||||
import { slowQueryWarning, debug, resourceName } from './config';
|
import { slowQueryWarning, debug, resourceName } from './config';
|
||||||
|
import { FormatError } from './errors';
|
||||||
|
|
||||||
const execute = async (query, parameters, resource) => {
|
const execute = async (query, parameters, resource) => {
|
||||||
ScheduleResourceTick(resourceName);
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
[query, parameters] = parseParameters(query, parameters);
|
[query, parameters] = parseParameters(query, parameters);
|
||||||
|
ScheduleResourceTick(resourceName);
|
||||||
const [rows, _, executionTime] = await pool.query(query, parameters);
|
const [executionTime, rows] = await pool.query(query, parameters);
|
||||||
|
|
||||||
if (executionTime >= slowQueryWarning || debug)
|
if (executionTime >= slowQueryWarning || debug)
|
||||||
console.log(
|
console.log(
|
||||||
@@ -27,4 +26,69 @@ const execute = async (query, parameters, resource) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export { execute };
|
const queryType = (query) => {
|
||||||
|
switch (query.replace(/\s.*/, '')) {
|
||||||
|
case 'SELECT':
|
||||||
|
return 1;
|
||||||
|
case 'INSERT':
|
||||||
|
return 2;
|
||||||
|
case 'UPDATE':
|
||||||
|
return 3;
|
||||||
|
case 'DELETE':
|
||||||
|
return 3;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const preparedStatement = async (query, parameters, resource) => {
|
||||||
|
try {
|
||||||
|
if (!Array.isArray(parameters))
|
||||||
|
throw new FormatError(`Placeholders were defined, but query received no parameters!`, query);
|
||||||
|
|
||||||
|
if (typeof query !== 'string') throw new FormatError(`Prepared statements must utilise a single query`);
|
||||||
|
|
||||||
|
const type = queryType(query);
|
||||||
|
if (!type) throw new FormatError(`Prepared statements only accept SELECT, INSERT, UPDATE, and DELETE methods!`);
|
||||||
|
|
||||||
|
ScheduleResourceTick(resourceName);
|
||||||
|
const results = [];
|
||||||
|
let totalTime = 0;
|
||||||
|
let queryCount = parameters.length;
|
||||||
|
|
||||||
|
for (let i = 0; i < queryCount; i++) {
|
||||||
|
const [executionTime, rows] = await pool.execute(query, parameters[i]);
|
||||||
|
totalTime + executionTime;
|
||||||
|
results[i] = rows && (type === 3 ? rows.affectedRows : type === 2 ? rows.insertId : rows);
|
||||||
|
}
|
||||||
|
|
||||||
|
totalTime = totalTime / queryCount;
|
||||||
|
if (totalTime >= slowQueryWarning || debug)
|
||||||
|
console.log(
|
||||||
|
`^3[${debug ? 'DEBUG' : 'WARNING'}] ${resource} took ${totalTime}ms to execute ${
|
||||||
|
queryCount > 1 ? queryCount + ' queries' : 'a query'
|
||||||
|
}!
|
||||||
|
${query} ${JSON.stringify(parameters)}^0`
|
||||||
|
);
|
||||||
|
|
||||||
|
if (results.length === 1) {
|
||||||
|
if (type === 1) {
|
||||||
|
if (results[0][0] && Object.keys(results[0][0]).length === 1) {
|
||||||
|
return Object.values(results[0][0])[0];
|
||||||
|
}
|
||||||
|
return results[0][0];
|
||||||
|
}
|
||||||
|
return results[0];
|
||||||
|
}
|
||||||
|
return results;
|
||||||
|
} catch (error) {
|
||||||
|
console.log(
|
||||||
|
`^1[ERROR] ${resource} was unable to execute a query!
|
||||||
|
${error.message}
|
||||||
|
${error.sql || `${query} ${JSON.stringify(parameters)}`}^0`
|
||||||
|
);
|
||||||
|
debug && console.trace(error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export { execute, preparedStatement };
|
||||||
+11
-1
@@ -1,5 +1,5 @@
|
|||||||
import { pool } from './pool';
|
import { pool } from './pool';
|
||||||
import { execute } from './execute';
|
import { execute, preparedStatement } from './execute';
|
||||||
import { transaction } from './transaction';
|
import { transaction } from './transaction';
|
||||||
import { debug, isolationLevel } from './config';
|
import { debug, isolationLevel } from './config';
|
||||||
|
|
||||||
@@ -55,7 +55,17 @@ global.exports('transaction', (queries, parameters, cb, resource = GetInvokingRe
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
global.exports('prepare', (query, parameters, cb, resource = GetInvokingResource()) => {
|
||||||
|
preparedStatement(query, parameters, resource).then((result) =>
|
||||||
|
safeCallback(cb || parameters, result, resource, query))
|
||||||
|
});
|
||||||
|
|
||||||
if (!GetResourceMetadata(GetCurrentResourceName(), 'server_script', 1)) {
|
if (!GetResourceMetadata(GetCurrentResourceName(), 'server_script', 1)) {
|
||||||
|
global.exports('prepareSync', async (query, parameters) => {
|
||||||
|
const result = await preparedStatement(query, parameters, GetInvokingResource());
|
||||||
|
return result;
|
||||||
|
});
|
||||||
|
|
||||||
global.exports('executeSync', async (query, parameters) => {
|
global.exports('executeSync', async (query, parameters) => {
|
||||||
const result = await execute(query, parameters, GetInvokingResource());
|
const result = await execute(query, parameters, GetInvokingResource());
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
+3
-2
@@ -26,9 +26,10 @@ const parseTypes = (field, next) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const parseParameters = (query, parameters) => {
|
const parseParameters = (query, parameters) => {
|
||||||
if (query === undefined) throw new FormatError(`Undefined query passed`);
|
if (typeof query !== 'string')
|
||||||
|
throw new Error(`Non-string query passed. Make sure you use "oxmysql:execute" instead of "oxmysql.execute" when calling exports.`);
|
||||||
|
|
||||||
if (typeof parameters === 'function') return [query, []];
|
if (!parameters || typeof parameters === 'function') return [query, []];
|
||||||
|
|
||||||
if (query.includes('@') || query.includes(':')) {
|
if (query.includes('@') || query.includes(':')) {
|
||||||
const obj = parameters.length !== 0 ? parameters : (() => {
|
const obj = parameters.length !== 0 ? parameters : (() => {
|
||||||
|
|||||||
+2
-2
@@ -31,7 +31,7 @@ const createConnection = () => {
|
|||||||
port: options.port || 3306,
|
port: options.port || 3306,
|
||||||
user: options.username || options.user || options.userid || 'root',
|
user: options.username || options.user || options.userid || 'root',
|
||||||
password: options.password || options.pass || '',
|
password: options.password || options.pass || '',
|
||||||
database: options.endpoint || options.database || 'es_extended',
|
database: options.endpoint || options.database,
|
||||||
charset: 'utf8mb4_unicode_ci',
|
charset: 'utf8mb4_unicode_ci',
|
||||||
connectTimeout: 30000,
|
connectTimeout: 30000,
|
||||||
...options.options,
|
...options.options,
|
||||||
@@ -53,7 +53,7 @@ const createConnection = () => {
|
|||||||
port: options.hosts[0].port || 3306,
|
port: options.hosts[0].port || 3306,
|
||||||
user: options.username || 'root',
|
user: options.username || 'root',
|
||||||
password: options.password || '',
|
password: options.password || '',
|
||||||
database: options.endpoint || 'es_extended',
|
database: options.endpoint,
|
||||||
charset: 'utf8mb4_unicode_ci',
|
charset: 'utf8mb4_unicode_ci',
|
||||||
connectTimeout: 30000,
|
connectTimeout: 30000,
|
||||||
...options.options,
|
...options.options,
|
||||||
|
|||||||
+4
-1
@@ -15,12 +15,15 @@ module.exports = {
|
|||||||
contextRegExp: /./,
|
contextRegExp: /./,
|
||||||
}),
|
}),
|
||||||
new CopyPlugin({
|
new CopyPlugin({
|
||||||
patterns: ["fxmanifest.lua", "wrapper.lua", "README.md", "LICENSE.md"],
|
patterns: ["./lua", "./lua", "README.md", "LICENSE.md"],
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
output: {
|
output: {
|
||||||
filename: "oxmysql.js",
|
filename: "oxmysql.js",
|
||||||
path: path.resolve(__dirname, "dist"),
|
path: path.resolve(__dirname, "dist"),
|
||||||
},
|
},
|
||||||
|
optimization: {
|
||||||
|
minimize: false,
|
||||||
|
},
|
||||||
target: "node",
|
target: "node",
|
||||||
};
|
};
|
||||||
-84
@@ -1,84 +0,0 @@
|
|||||||
---@param query string
|
|
||||||
---@param parameters? table|function
|
|
||||||
---@return integer result
|
|
||||||
---returns number of rows updated by the executed query
|
|
||||||
exports('executeSync', function(query, parameters)
|
|
||||||
local p = promise.new()
|
|
||||||
exports['oxmysql']:execute(query, parameters, function(result)
|
|
||||||
p:resolve(result)
|
|
||||||
end, GetInvokingResource())
|
|
||||||
return Citizen.Await(p)
|
|
||||||
end)
|
|
||||||
|
|
||||||
---@deprecated true
|
|
||||||
---@param query string
|
|
||||||
---@param parameters? table|function
|
|
||||||
---@return table result
|
|
||||||
---returns array of matching rows or result data
|
|
||||||
exports('fetchSync', function(query, parameters)
|
|
||||||
local p = promise.new()
|
|
||||||
exports['oxmysql']:fetch(query, parameters, function(result)
|
|
||||||
p:resolve(result)
|
|
||||||
end, GetInvokingResource())
|
|
||||||
return Citizen.Await(p)
|
|
||||||
end)
|
|
||||||
|
|
||||||
---@param query string
|
|
||||||
---@param parameters? table|function
|
|
||||||
---@return table result
|
|
||||||
---returns table containing key value pairs
|
|
||||||
exports('singleSync', function(query, parameters)
|
|
||||||
local p = promise.new()
|
|
||||||
exports['oxmysql']:single(query, parameters, function(result)
|
|
||||||
p:resolve(result)
|
|
||||||
end, GetInvokingResource())
|
|
||||||
return Citizen.Await(p)
|
|
||||||
end)
|
|
||||||
|
|
||||||
---@param query string
|
|
||||||
---@param parameters? table|function
|
|
||||||
---@return integer|string
|
|
||||||
---returns value of the first column of a single row
|
|
||||||
exports('scalarSync', function(query, parameters)
|
|
||||||
local p = promise.new()
|
|
||||||
exports['oxmysql']:scalar(query, parameters, function(result)
|
|
||||||
p:resolve(result)
|
|
||||||
end, GetInvokingResource())
|
|
||||||
return Citizen.Await(p)
|
|
||||||
end)
|
|
||||||
|
|
||||||
---@param query string
|
|
||||||
---@param parameters? table|function
|
|
||||||
---@return table result
|
|
||||||
---returns the last inserted id
|
|
||||||
exports('insertSync', function(query, parameters)
|
|
||||||
local p = promise.new()
|
|
||||||
exports['oxmysql']:insert(query, parameters, function(result)
|
|
||||||
p:resolve(result)
|
|
||||||
end, GetInvokingResource())
|
|
||||||
return Citizen.Await(p)
|
|
||||||
end)
|
|
||||||
|
|
||||||
---@param query string
|
|
||||||
---@param parameters? table|function
|
|
||||||
---@return integer result
|
|
||||||
---returns number of rows updated by the executed query
|
|
||||||
exports('updateSync', function(query, parameters)
|
|
||||||
local p = promise.new()
|
|
||||||
exports['oxmysql']:update(query, parameters, function(result)
|
|
||||||
p:resolve(result)
|
|
||||||
end, GetInvokingResource())
|
|
||||||
return Citizen.Await(p)
|
|
||||||
end)
|
|
||||||
|
|
||||||
---@param queries table
|
|
||||||
---@param parameters? table|function
|
|
||||||
---@return boolean result
|
|
||||||
---returns true when the transaction has succeeded
|
|
||||||
exports('transactionSync', function(queries, parameters)
|
|
||||||
local p = promise.new()
|
|
||||||
exports['oxmysql']:transaction(queries, parameters, function(result)
|
|
||||||
p:resolve(result)
|
|
||||||
end, GetInvokingResource())
|
|
||||||
return Citizen.Await(p)
|
|
||||||
end)
|
|
||||||
@@ -42,9 +42,9 @@
|
|||||||
"@types/estree" "*"
|
"@types/estree" "*"
|
||||||
|
|
||||||
"@types/eslint@*":
|
"@types/eslint@*":
|
||||||
version "7.28.1"
|
version "7.28.2"
|
||||||
resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.28.1.tgz#50b07747f1f84c2ba8cd394cf0fe0ba07afce320"
|
resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.28.2.tgz#0ff2947cdd305897c52d5372294e8c76f351db68"
|
||||||
integrity sha512-XhZKznR3i/W5dXqUhgU9fFdJekufbeBd5DALmkuXoeFcjbQcPk+2cL+WLHf6Q81HWAnM2vrslIHpGVyCAviRwg==
|
integrity sha512-KubbADPkfoU75KgKeKLsFHXnU4ipH7wYg0TRT33NK3N3yiu7jlFAAoygIWBV+KbuHx/G+AvuGX6DllnK35gfJA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/estree" "*"
|
"@types/estree" "*"
|
||||||
"@types/json-schema" "*"
|
"@types/json-schema" "*"
|
||||||
@@ -60,9 +60,9 @@
|
|||||||
integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==
|
integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==
|
||||||
|
|
||||||
"@types/node@*":
|
"@types/node@*":
|
||||||
version "16.11.1"
|
version "16.11.2"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.1.tgz#2e50a649a50fc403433a14f829eface1a3443e97"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.2.tgz#31c249c136c3f9b35d4b60fb8e50e01a1f0cc9a5"
|
||||||
integrity sha512-PYGcJHL9mwl1Ek3PLiYgyEKtwTMmkMw4vbiyz/ps3pfdRYLVv+SN7qHVAImrjdAXxgluDEw6Ph4lyv+m9UpRmA==
|
integrity sha512-w34LtBB0OkDTs19FQHXy4Ig/TOXI4zqvXS2Kk1PAsRKZ0I+nik7LlMYxckW0tSNGtvWmzB+mrCTbuEjuB9DVsw==
|
||||||
|
|
||||||
"@webassemblyjs/[email protected]":
|
"@webassemblyjs/[email protected]":
|
||||||
version "1.11.1"
|
version "1.11.1"
|
||||||
@@ -291,9 +291,9 @@ buffer-from@^1.0.0:
|
|||||||
integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
|
integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
|
||||||
|
|
||||||
caniuse-lite@^1.0.30001265:
|
caniuse-lite@^1.0.30001265:
|
||||||
version "1.0.30001269"
|
version "1.0.30001270"
|
||||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001269.tgz#3a71bee03df627364418f9fd31adfc7aa1cc2d56"
|
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001270.tgz#cc9c37a4ec5c1a8d616fc7bace902bb053b0cdea"
|
||||||
integrity sha512-UOy8okEVs48MyHYgV+RdW1Oiudl1H6KolybD6ZquD0VcrPSgj25omXO1S7rDydjpqaISCwA8Pyx+jUQKZwWO5w==
|
integrity sha512-TcIC7AyNWXhcOmv2KftOl1ShFAaHQYcB/EPL/hEyMrcS7ZX0/DvV1aoy6BzV0+16wTpoAyTMGDNAJfSqS/rz7A==
|
||||||
|
|
||||||
chalk@^2.4.2:
|
chalk@^2.4.2:
|
||||||
version "2.4.2"
|
version "2.4.2"
|
||||||
@@ -408,9 +408,9 @@ dir-glob@^3.0.1:
|
|||||||
path-type "^4.0.0"
|
path-type "^4.0.0"
|
||||||
|
|
||||||
electron-to-chromium@^1.3.867:
|
electron-to-chromium@^1.3.867:
|
||||||
version "1.3.871"
|
version "1.3.877"
|
||||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.871.tgz#6e87365fd72037a6c898fb46050ad4be3ac9ef62"
|
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.877.tgz#956870eea7c9d8cf43cc54ea40687fee4dc0c12a"
|
||||||
integrity sha512-qcLvDUPf8DSIMWarHT2ptgcqrYg62n3vPA7vhrOF24d8UNzbUBaHu2CySiENR3nEDzYgaN60071t0F6KLYMQ7Q==
|
integrity sha512-fT5mW5Giw5iyVukeHb2XvB4joBKvzHtl8Vs3QzE7APATpFMt/T7RWyUcIKSZzYkKQgpMbu+vDBTCHfQZvh8klA==
|
||||||
|
|
||||||
enhanced-resolve@^5.8.3:
|
enhanced-resolve@^5.8.3:
|
||||||
version "5.8.3"
|
version "5.8.3"
|
||||||
@@ -571,19 +571,6 @@ get-stream@^6.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7"
|
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7"
|
||||||
integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==
|
integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==
|
||||||
|
|
||||||
github-graphql-client@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/github-graphql-client/-/github-graphql-client-1.0.0.tgz#d5acacc31bb9f6b77e5c502812e90c844f727bca"
|
|
||||||
integrity sha1-1ayswxu59rd+XFAoEukMhE9ye8o=
|
|
||||||
|
|
||||||
github-version-checker@^2.2.0:
|
|
||||||
version "2.2.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/github-version-checker/-/github-version-checker-2.2.0.tgz#08a2b52f9ef9cd3dd05b898537750a91b73facec"
|
|
||||||
integrity sha512-Ttj/Uzg++TGfycfn5ga8BfMJ8QYB1+DhG24rtasrN8tHYWgqqrEMAQ52y2qGnPNWzSF8AUdjm6dBcoPdUhKhDQ==
|
|
||||||
dependencies:
|
|
||||||
github-graphql-client "^1.0.0"
|
|
||||||
semver "^5.5.1"
|
|
||||||
|
|
||||||
glob-parent@^5.1.2:
|
glob-parent@^5.1.2:
|
||||||
version "5.1.2"
|
version "5.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
|
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
|
||||||
@@ -763,9 +750,9 @@ isobject@^3.0.1:
|
|||||||
integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
|
integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
|
||||||
|
|
||||||
jest-worker@^27.0.6:
|
jest-worker@^27.0.6:
|
||||||
version "27.2.5"
|
version "27.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.2.5.tgz#ed42865661959488aa020e8a325df010597c36d4"
|
resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.3.1.tgz#0def7feae5b8042be38479799aeb7b5facac24b2"
|
||||||
integrity sha512-HTjEPZtcNKZ4LnhSp02NEH4vE+5OpJ0EsOWYvGQpHgUMLngydESAAMH5Wd/asPf29+XUDQZszxpLg1BkIIA2aw==
|
integrity sha512-ks3WCzsiZaOPJl/oMsDjaf0TRiSv7ctNgs0FqRr2nARsovz6AWWy4oLElwcquGSz692DzgZQrCLScPNs5YlC4g==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
merge-stream "^2.0.0"
|
merge-stream "^2.0.0"
|
||||||
@@ -881,7 +868,7 @@ minimist@^1.2.0:
|
|||||||
|
|
||||||
"mysql2@https://github.com/overextended/node-mysql2.git":
|
"mysql2@https://github.com/overextended/node-mysql2.git":
|
||||||
version "2.3.2"
|
version "2.3.2"
|
||||||
resolved "https://github.com/overextended/node-mysql2.git#60c66356b36d1dd194de6b1bc52d4216ee6f92d3"
|
resolved "https://github.com/overextended/node-mysql2.git#0621bdc95f3bc6db1e5cd06efd52663ea9410c9a"
|
||||||
dependencies:
|
dependencies:
|
||||||
denque "^2.0.1"
|
denque "^2.0.1"
|
||||||
generate-function "^2.3.1"
|
generate-function "^2.3.1"
|
||||||
@@ -910,9 +897,9 @@ nice-try@^1.0.4:
|
|||||||
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
|
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
|
||||||
|
|
||||||
node-releases@^2.0.0:
|
node-releases@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.0.tgz#67dc74903100a7deb044037b8a2e5f453bb05400"
|
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.1.tgz#3d1d395f204f1f2f29a54358b9fb678765ad2fc5"
|
||||||
integrity sha512-aA87l0flFYMzCHpTM3DERFSYxc6lv/BltdbRTOMZuxZ0cwZCD3mejE5n9vLhSJCN++/eOqr77G1IO5uXxlQYWA==
|
integrity sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==
|
||||||
|
|
||||||
normalize-path@^3.0.0:
|
normalize-path@^3.0.0:
|
||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
@@ -1137,7 +1124,7 @@ schema-utils@^3.0.0, schema-utils@^3.1.0, schema-utils@^3.1.1:
|
|||||||
ajv "^6.12.5"
|
ajv "^6.12.5"
|
||||||
ajv-keywords "^3.5.2"
|
ajv-keywords "^3.5.2"
|
||||||
|
|
||||||
semver@^5.5.0, semver@^5.5.1, semver@^5.6.0:
|
semver@^5.5.0, semver@^5.6.0:
|
||||||
version "5.7.1"
|
version "5.7.1"
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
|
||||||
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
|
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
|
||||||
@@ -1304,11 +1291,6 @@ uri-js@^4.2.2:
|
|||||||
dependencies:
|
dependencies:
|
||||||
punycode "^2.1.0"
|
punycode "^2.1.0"
|
||||||
|
|
||||||
v8-compile-cache@^2.2.0:
|
|
||||||
version "2.3.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee"
|
|
||||||
integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==
|
|
||||||
|
|
||||||
watchpack@^2.2.0:
|
watchpack@^2.2.0:
|
||||||
version "2.2.0"
|
version "2.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.2.0.tgz#47d78f5415fe550ecd740f99fe2882323a58b1ce"
|
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.2.0.tgz#47d78f5415fe550ecd740f99fe2882323a58b1ce"
|
||||||
@@ -1318,9 +1300,9 @@ watchpack@^2.2.0:
|
|||||||
graceful-fs "^4.1.2"
|
graceful-fs "^4.1.2"
|
||||||
|
|
||||||
webpack-cli@^4.8.0:
|
webpack-cli@^4.8.0:
|
||||||
version "4.9.0"
|
version "4.9.1"
|
||||||
resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.9.0.tgz#dc43e6e0f80dd52e89cbf73d5294bcd7ad6eb343"
|
resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.9.1.tgz#b64be825e2d1b130f285c314caa3b1ba9a4632b3"
|
||||||
integrity sha512-n/jZZBMzVEl4PYIBs+auy2WI0WTQ74EnJDiyD98O2JZY6IVIHJNitkYp/uTXOviIOMfgzrNvC9foKv/8o8KSZw==
|
integrity sha512-JYRFVuyFpzDxMDB+v/nanUdQYcZtqFPGzmlW4s+UkPMFhSpfRNmf1z4AwYcHJVdvEFAM7FFCQdNTpsBYhDLusQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@discoveryjs/json-ext" "^0.5.0"
|
"@discoveryjs/json-ext" "^0.5.0"
|
||||||
"@webpack-cli/configtest" "^1.1.0"
|
"@webpack-cli/configtest" "^1.1.0"
|
||||||
@@ -1333,7 +1315,6 @@ webpack-cli@^4.8.0:
|
|||||||
import-local "^3.0.2"
|
import-local "^3.0.2"
|
||||||
interpret "^2.2.0"
|
interpret "^2.2.0"
|
||||||
rechoir "^0.7.0"
|
rechoir "^0.7.0"
|
||||||
v8-compile-cache "^2.2.0"
|
|
||||||
webpack-merge "^5.7.3"
|
webpack-merge "^5.7.3"
|
||||||
|
|
||||||
webpack-merge@^5.7.3:
|
webpack-merge@^5.7.3:
|
||||||
@@ -1350,9 +1331,9 @@ webpack-sources@^3.2.0:
|
|||||||
integrity sha512-t6BMVLQ0AkjBOoRTZgqrWm7xbXMBzD+XDq2EZ96+vMfn3qKgsvdXZhbPZ4ElUOpdv4u+iiGe+w3+J75iy/bYGA==
|
integrity sha512-t6BMVLQ0AkjBOoRTZgqrWm7xbXMBzD+XDq2EZ96+vMfn3qKgsvdXZhbPZ4ElUOpdv4u+iiGe+w3+J75iy/bYGA==
|
||||||
|
|
||||||
webpack@^5.52.1:
|
webpack@^5.52.1:
|
||||||
version "5.58.2"
|
version "5.59.1"
|
||||||
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.58.2.tgz#6b4af12fc9bd5cbedc00dc0a2fc2b9592db16b44"
|
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.59.1.tgz#60c77e9aad796252153d4d7ab6b2d4c11f0e548c"
|
||||||
integrity sha512-3S6e9Vo1W2ijk4F4PPWRIu6D/uGgqaPmqw+av3W3jLDujuNkdxX5h5c+RQ6GkjVR+WwIPOfgY8av+j5j4tMqJw==
|
integrity sha512-I01IQV9K96FlpXX3V0L4nvd7gb0r7thfuu1IfT2P4uOHOA77nKARAKDYGe/tScSHKnffNIyQhLC8kRXzY4KEHQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/eslint-scope" "^3.7.0"
|
"@types/eslint-scope" "^3.7.0"
|
||||||
"@types/estree" "^0.0.50"
|
"@types/estree" "^0.0.50"
|
||||||
|
|||||||
Reference in new issue
Block a user