fix(qb-core): post-update recovery + centralizare notify 17mov_Hud

Restaurat jobs.lua din git (Quasar fork a suprascris joburile 17mov). Adăugat item map în items.lua (lipsea, rupt rv-maphold). Setat licences.driver = false în config.lua. Override QBCore.Functions.Notify + QBCore:Notify event → 17mov_Hud:ShowNotification (toate notificările merg automat prin 17mov_Hud).
This commit is contained in:
2026-04-03 02:47:59 +03:00
parent 06414ed181
commit e756e29294
1539 changed files with 51926 additions and 39806 deletions
@@ -0,0 +1,174 @@
# generated by patch-package 6.4.14
#
# declared package:
# mysql2: 3.11.3
#
diff --git a/node_modules/mysql2/lib/connection.js b/node_modules/mysql2/lib/connection.js
index af6b3d9..a427374 100644
--- a/node_modules/mysql2/lib/connection.js
+++ b/node_modules/mysql2/lib/connection.js
@@ -32,7 +32,7 @@ const CharsetToEncoding = require('./constants/charset_encodings.js');
let _connectionId = 0;
-let convertNamedPlaceholders = null;
+// let convertNamedPlaceholders = null;
class Connection extends EventEmitter {
constructor(opts) {
@@ -524,7 +524,7 @@ class Connection extends EventEmitter {
sql: sql,
values: values
};
- this._resolveNamedPlaceholders(opts);
+ // this._resolveNamedPlaceholders(opts);
return SqlString.format(
opts.sql,
opts.values,
@@ -546,20 +546,20 @@ class Connection extends EventEmitter {
}
_resolveNamedPlaceholders(options) {
- let unnamed;
- if (this.config.namedPlaceholders || options.namedPlaceholders) {
- if (Array.isArray(options.values)) {
- // if an array is provided as the values, assume the conversion is not necessary.
- // this allows the usage of unnamed placeholders even if the namedPlaceholders flag is enabled.
- return
- }
- if (convertNamedPlaceholders === null) {
- convertNamedPlaceholders = require('named-placeholders')();
- }
- unnamed = convertNamedPlaceholders(options.sql, options.values);
- options.sql = unnamed[0];
- options.values = unnamed[1];
- }
+ // let unnamed;
+ // if (this.config.namedPlaceholders || options.namedPlaceholders) {
+ // if (Array.isArray(options.values)) {
+ // // if an array is provided as the values, assume the conversion is not necessary.
+ // // this allows the usage of unnamed placeholders even if the namedPlaceholders flag is enabled.
+ // return
+ // }
+ // if (convertNamedPlaceholders === null) {
+ // convertNamedPlaceholders = require('named-placeholders')();
+ // }
+ // unnamed = convertNamedPlaceholders(options.sql, options.values);
+ // options.sql = unnamed[0];
+ // options.values = unnamed[1];
+ // }
}
query(sql, values, cb) {
@@ -569,7 +569,7 @@ class Connection extends EventEmitter {
} else {
cmdQuery = Connection.createQuery(sql, values, cb, this.config);
}
- this._resolveNamedPlaceholders(cmdQuery);
+ // this._resolveNamedPlaceholders(cmdQuery);
const rawSql = this.format(cmdQuery.sql, cmdQuery.values !== undefined ? cmdQuery.values : []);
cmdQuery.sql = rawSql;
return this.addCommand(cmdQuery);
@@ -644,26 +644,27 @@ class Connection extends EventEmitter {
options.sql = sql;
options.values = values;
}
- this._resolveNamedPlaceholders(options);
+ // this._resolveNamedPlaceholders(options);
// check for values containing undefined
if (options.values) {
//If namedPlaceholder is not enabled and object is passed as bind parameters
- if (!Array.isArray(options.values)) {
- throw new TypeError(
- 'Bind parameters must be array if namedPlaceholders parameter is not enabled'
- );
- }
+ // if (!Array.isArray(options.values)) {
+ // throw new TypeError(
+ // 'Bind parameters must be array if namedPlaceholders parameter is not enabled'
+ // );
+ // }
options.values.forEach(val => {
//If namedPlaceholder is not enabled and object is passed as bind parameters
- if (!Array.isArray(options.values)) {
- throw new TypeError(
- 'Bind parameters must be array if namedPlaceholders parameter is not enabled'
- );
- }
+ // if (!Array.isArray(options.values)) {
+ // throw new TypeError(
+ // 'Bind parameters must be array if namedPlaceholders parameter is not enabled'
+ // );
+ // }
if (val === undefined) {
- throw new TypeError(
- 'Bind parameters must not contain undefined. To pass SQL NULL specify JS null'
- );
+ // throw new TypeError(
+ // 'Bind parameters must not contain undefined. To pass SQL NULL specify JS null'
+ // );
+ val = null
}
if (typeof val === 'function') {
throw new TypeError(
diff --git a/node_modules/mysql2/lib/packets/execute.js b/node_modules/mysql2/lib/packets/execute.js
index daf1df9..0862ce1 100644
--- a/node_modules/mysql2/lib/packets/execute.js
+++ b/node_modules/mysql2/lib/packets/execute.js
@@ -28,7 +28,10 @@ function toParameter(value, encoding, timezone) {
if (value !== null) {
switch (typeof value) {
case 'undefined':
- throw new TypeError('Bind parameters must not contain undefined');
+ // throw new TypeError('Bind parameters must not contain undefined');
+ value = '';
+ type = Types.NULL;
+ break;
case 'number':
type = Types.DOUBLE;
diff --git a/node_modules/mysql2/lib/parsers/binary_parser.js b/node_modules/mysql2/lib/parsers/binary_parser.js
index 4eb0d3a..bf6dbec 100644
--- a/node_modules/mysql2/lib/parsers/binary_parser.js
+++ b/node_modules/mysql2/lib/parsers/binary_parser.js
@@ -77,7 +77,7 @@ function readCodeFor(field, config, options, fieldNum) {
default:
if (field.characterSet === Charsets.BINARY) {
- return 'packet.readLengthCodedBuffer();';
+ return '[...packet.readLengthCodedBuffer()];';
}
return `packet.readLengthCodedString(fields[${fieldNum}].encoding)`;
}
@@ -94,6 +94,7 @@ function compile(fields, options, config) {
db: field.schema,
table: field.table,
name: field.name,
+ charset: field.characterSet,
string: function (encoding = field.encoding) {
if (field.columnType === Types.JSON && encoding === field.encoding) {
// Since for JSON columns mysql always returns charset 63 (BINARY),
diff --git a/node_modules/mysql2/lib/parsers/text_parser.js b/node_modules/mysql2/lib/parsers/text_parser.js
index deedadf..7a4a6c8 100644
--- a/node_modules/mysql2/lib/parsers/text_parser.js
+++ b/node_modules/mysql2/lib/parsers/text_parser.js
@@ -90,6 +90,7 @@ function compile(fields, options, config) {
db: field.schema,
table: field.table,
name: field.name,
+ charset: field.characterSet,
string: function (encoding = field.encoding) {
if (field.columnType === Types.JSON && encoding === field.encoding) {
// Since for JSON columns mysql always returns charset 63 (BINARY),
diff --git a/node_modules/mysql2/typings/mysql/lib/parsers/typeCast.d.ts b/node_modules/mysql2/typings/mysql/lib/parsers/typeCast.d.ts
index b8e9751..ca8fbda 100644
--- a/node_modules/mysql2/typings/mysql/lib/parsers/typeCast.d.ts
+++ b/node_modules/mysql2/typings/mysql/lib/parsers/typeCast.d.ts
@@ -44,6 +44,7 @@ export type Field = Type & {
db: string;
table: string;
name: string;
+ charset: number;
string: (encoding?: BufferEncoding | string | undefined) => string | null;
buffer: () => Buffer | null;
geometry: () => Geometry | Geometry[] | null;
@@ -0,0 +1,65 @@
# generated by patch-package 6.4.14
#
# declared package:
# named-placeholders: ^1.1.3
#
diff --git a/node_modules/named-placeholders/index.js b/node_modules/named-placeholders/index.js
index 3524ef5..e47335e 100644
--- a/node_modules/named-placeholders/index.js
+++ b/node_modules/named-placeholders/index.js
@@ -3,7 +3,7 @@
// based on code from Brian White @mscdex mariasql library - https://github.com/mscdex/node-mariasql/blob/master/lib/Client.js#L272-L332
// License: https://github.com/mscdex/node-mariasql/blob/master/LICENSE
-const RE_PARAM = /(?:\?)|(?::(\d+|(?:[a-zA-Z][a-zA-Z0-9_]*)))/g,
+const RE_PARAM = /(?:\?)|(?:(?<!["'])[:@](\d+|(?:[a-zA-Z][a-zA-Z0-9_]*)))/g,
DQUOTE = 34,
SQUOTE = 39,
BSLASH = 92;
@@ -92,15 +92,24 @@ function createCompiler(config) {
if (typeof params == 'undefined')
throw new Error('Named query contains placeholders, but parameters object is undefined');
+ for(const key in params) {
+ const char = key[0]
+ if(char == '@' || char == ':') {
+ params[key.substring(1)] = params[key];
+ delete params[key];
+ }
+ }
+
const tokens = tree[1];
for (let i=0; i < tokens.length; ++i) {
- arr.push(params[tokens[i]]);
+ arr.push(params[tokens[i]] === undefined ? null : params[tokens[i]]);
}
return [tree[0], arr];
}
function noTailingSemicolon(s) {
- if (s.slice(-1) == ':') {
+ const char = s.slice(-1)
+ if (char == ':' || char == '@') {
return s.slice(0, -1);
}
return s;
@@ -113,7 +122,8 @@ function createCompiler(config) {
let unnamed = noTailingSemicolon(tree[0][0]);
for (let i=1; i < tree[0].length; ++i) {
- if (tree[0][i-1].slice(-1) == ':') {
+ const char = tree[0][i-1].slice(-1)
+ if (char == ':' || char == '@') {
unnamed += config.placeholder;
}
unnamed += config.placeholder;
@@ -122,7 +132,8 @@ function createCompiler(config) {
const last = tree[0][tree[0].length -1];
if (tree[0].length == tree[1].length) {
- if (last.slice(-1) == ':') {
+ const char = last.slice(-1)
+ if (char == ':' || char == '@') {
unnamed += config.placeholder;
}
unnamed += config.placeholder;