@repacks/kerberos
Advanced tools
Comparing version 2.0.1-1 to 2.0.1-2
@@ -8,7 +8,8 @@ 'use strict'; | ||
const nativeDirs = readdirSync(join(__dirname, '..', 'src', 'native')); | ||
const nativeRelativePath = join('..', 'src', 'native'); | ||
const nativeDirs = readdirSync(join(__dirname, nativeRelativePath)); | ||
const nativePath = 'build/Release/kerberos.node'; | ||
let dirName = ''; | ||
const getNativeDirName = (target) => nativeDirs.find(n => n.includes(target)); | ||
const getNativeDirName = (target) => nativeDirs.find((n) => n.includes(target)); | ||
@@ -30,3 +31,3 @@ switch (platform) { | ||
} | ||
break | ||
break; | ||
case 'linux': | ||
@@ -43,3 +44,3 @@ switch (arch) { | ||
} | ||
break | ||
break; | ||
default: | ||
@@ -55,8 +56,10 @@ throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`); | ||
try { | ||
nativeBinding = require(`../native/${dirName}/${nativePath}`); | ||
nativeBinding = require(`${nativeRelativePath}/${dirName}/${nativePath}`); | ||
} catch (err) { | ||
console.error(`Use the \x1b[36m'kerberos'\x1b[0m package directly instead of \x1b[35m'@repacks/kerberos'\x1b[0m.`); | ||
console.error( | ||
`Use the \x1b[36m'kerberos'\x1b[0m package directly instead of \x1b[35m'@repacks/kerberos'\x1b[0m.` | ||
); | ||
throw new Error('Failed to load native binding', { cause: err }); | ||
} | ||
module.exports = nativeBinding; | ||
module.exports = nativeBinding; |
{ | ||
"name": "@repacks/kerberos", | ||
"version": "2.0.1-1", | ||
"version": "2.0.1-2", | ||
"description": "Kerberos library for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance 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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
5210126
440
2