overextended / oxmysql

MySQL resource for FXServer.
https://overextended.dev/oxmysql
GNU Lesser General Public License v3.0
319 stars 197 forks source link

oxmysql v2.10.0 Unable to determine current resource version for 'oxmysql' #221

Closed ChaiyaZ-Dev closed 6 months ago

ChaiyaZ-Dev commented 6 months ago

oxmysql v2.10.0 image Unable to determine current resource version for 'oxmysql'

thelindat commented 6 months ago

You can ignore it or update at your convenience.

ChaiyaZ-Dev commented 6 months ago

Hello,

Thank you for looking into this. The issue appears to be related to the regular expression used to extract the version number from the metadata. The current pattern /(\d).(\d).(\d)/ only matches single digits between dots, which is why it fails for versions with multi-digit numbers like '2.10.0'.

To resolve this, the regex should be updated to /(\d+).(\d+).(\d+)/ to accommodate any number of digits in the version sections. This change would ensure that versions like '2.10.0' are properly recognized.

Here’s the updated line of code for your reference:

const currentVersion = (_a4 = GetResourceMetadata(resourceName2, "version", 0)) == null ? void 0 : _a4.match(/(\d+)\.(\d+)\.(\d+)/);

thelindat commented 6 months ago

The issue appears to be related to the regular expression used to extract the version number from the metadata.

I already fixed this an hour ago and pushed the changes https://github.com/overextended/oxmysql/commit/68028f1f4e2848f39e4562c898691e5529cbf5dc.