@sap/hana-client
Advanced tools
Comparing version 2.4.202 to 2.5.86
@@ -0,1 +1,9 @@ | ||
# Hana Client 2.5.x Drivers | ||
## Version 2.5.86 | ||
Please see the "What’s new in the SAP HANA Client" section in the official HANA client 2.5 documentation: | ||
https://help.sap.com/viewer/product/SAP_HANA_CLIENT/2.5/en-US | ||
# Hana Client 2.4.x Drivers | ||
@@ -2,0 +10,0 @@ |
@@ -73,3 +73,5 @@ 'use strict'; | ||
CLOB_DISK: 72, | ||
NCLOB_DISK: 73 | ||
}; | ||
NCLOB_DISK: 73, | ||
ST_GEOMETRY: 74, | ||
ST_POINT: 75 | ||
}; |
@@ -13,5 +13,5 @@ 'use strict'; | ||
var extensions = { | ||
'darwin': 'dylib', | ||
'linux': 'so', | ||
'win32': 'dll' | ||
'darwin': '.dylib', | ||
'linux': '.so', | ||
'win32': '.dll' | ||
}; | ||
@@ -21,6 +21,17 @@ | ||
function isMusl() { | ||
const output = require('child_process').spawnSync('ldd',['--version']).stderr.toString('utf8'); | ||
if(output.indexOf('musl') > -1) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
// Look for prebuilt binary and DBCAPI based on platform | ||
var pb_subdir = null; | ||
var dbcapi_name = 'libdbcapiHDB'; | ||
if (process.platform === 'linux') { | ||
if (process.arch === 'x64') { | ||
if ( isMusl() ) { | ||
pb_subdir = 'linuxx86_64_alpine-gcc6'; | ||
} else if (process.arch === 'x64') { | ||
pb_subdir = 'linuxx86_64-gcc48'; | ||
@@ -32,2 +43,3 @@ } else if (process.arch.toLowerCase().indexOf('ppc') != -1 && os.endianness() === 'LE') { | ||
} | ||
} else if (process.platform === 'win32') { | ||
@@ -38,6 +50,7 @@ pb_subdir = 'ntamd64-msvc2010'; | ||
} | ||
var dbcapi_env = 'DBCAPI_API_DLL'; | ||
var modpath = path.dirname(__dirname); | ||
var pb_path = path.join(modpath, 'prebuilt', pb_subdir); | ||
var dbcapi = process.env['DBCAPI_API_DLL'] || path.join(pb_path, 'libdbcapiHDB.' + extensions[process.platform]); | ||
var dbcapi = path.join(pb_path, dbcapi_name + extensions[process.platform]); | ||
try { | ||
@@ -52,9 +65,45 @@ fs.statSync(dbcapi); | ||
process.version + "'"); | ||
debug("You need to set the DBCAPI_API_DLL environment variable to point to " + | ||
'libdbcapiHDB.' + extensions[process.platform] + " for this platform."); | ||
debug("You need to set the " + dbcapi_env + " environment variable to point to " + | ||
dbcapi_name + extensions[process.platform] + " for this platform."); | ||
throw new Error('`' + dbcapi + '` is missing.'); | ||
} | ||
// Remove unrelated native platform libraries | ||
const removeDirectory = function (dir) { | ||
if (fs.existsSync(dir)) { | ||
fs.readdirSync(dir).forEach((file, index) => { | ||
const curPath = path.join(dir, file); | ||
if (fs.lstatSync(curPath).isDirectory()) { // recurse | ||
removeDirectory(curPath); | ||
} else { // delete file | ||
fs.unlinkSync(curPath); | ||
} | ||
}); | ||
fs.rmdirSync(dir); | ||
} | ||
}; | ||
const getSubDirs = function (dir) { | ||
const { lstatSync, readdirSync } = require('fs'); | ||
const { join } = require('path'); | ||
const isDirectory = source => lstatSync(source).isDirectory(); | ||
const getDirectories = source => | ||
readdirSync(source).map(name => join(source, name)).filter(isDirectory); | ||
return getDirectories(dir); | ||
}; | ||
if (process.env['HDB_NODE_PLATFORM_CLEAN'] === '1') { | ||
var pb_path_all = getSubDirs(path.join(modpath, 'prebuilt')); | ||
pb_path_all.forEach((pbPath) => { | ||
if (pbPath !== pb_path) { | ||
try { | ||
removeDirectory(pbPath); | ||
} catch (ex) { | ||
debug(ex.message); | ||
debug("Failed to remove unrelated native platform libraries in '" + pbPath + "'."); | ||
} | ||
} | ||
}); | ||
} | ||
// Found dbcapi | ||
process.env['DBCAPI_API_DLL'] = dbcapi; | ||
process.env[dbcapi_env] = dbcapi; | ||
@@ -61,0 +110,0 @@ // Now find driver |
@@ -15,3 +15,3 @@ { | ||
}, | ||
"version": "2.4.202", | ||
"version": "2.5.86", | ||
"requires": true, | ||
@@ -18,0 +18,0 @@ "name": "@sap/hana-client", |
@@ -5,3 +5,3 @@ { | ||
"description": "Official SAP HANA Node.js Driver", | ||
"version": "2.4.202", | ||
"version": "2.5.86", | ||
"dependencies": { | ||
@@ -8,0 +8,0 @@ "debug": "3.1.0" |
@@ -17,3 +17,3 @@ # @sap/hana-client | ||
The @sap/hana-client driver supports node.js 4.x, 6.x, 8.x, 10.x and 12.x. | ||
The @sap/hana-client driver supports node.js 8.x, 10.x and 12.x. | ||
@@ -20,0 +20,0 @@ ## Help Guide |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 4 instances in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 16 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
175740243
26
36
870
8