Comparing version 2.3.6 to 2.3.7
34
aka.js
@@ -13,17 +13,33 @@ #!/usr/bin/env node | ||
process.on('uncaughtException', (e) => { | ||
if(process.env.DEBUG) { | ||
console.error(e.message) | ||
console.error(e.stack) | ||
} else { | ||
console.log("An unexpected error occured, if this persists try running `mv ~/.akkeris ~/.akkeris.backup`.") | ||
} | ||
}) | ||
function init_plugins(module, plugins_dir) { | ||
fs.readdirSync(plugins_dir).sort((a, b) => { return a < b ? -1 : 1 }).forEach((plugin => { | ||
if(fs.statSync(path.join(plugins_dir, plugin, 'index.js')).isFile()) { | ||
try { | ||
module.exports.plugins[plugin] = require(path.join(plugins_dir, plugin, 'index.js')); | ||
} catch (err) { | ||
console.log(module.exports.terminal.markdown(`\n !!▸!! error loading plugin "${plugin}": ${err}\n`)); | ||
} | ||
if(module.exports.plugins[plugin] && module.exports.plugins[plugin].init) { | ||
if(path.basename(plugin).startsWith('.') || path.basename(plugin).startsWith("tmp")) { | ||
return; | ||
} | ||
try { | ||
if(fs.statSync(path.join(plugins_dir, plugin, 'index.js')).isFile()) { | ||
try { | ||
module.exports.plugins[plugin].init(module.exports); | ||
module.exports.plugins[plugin] = require(path.join(plugins_dir, plugin, 'index.js')); | ||
} catch (err) { | ||
console.log(module.exports.terminal.markdown(`\n !!▸!! error initializing plugin "${plugin}": ${err}\n`)); | ||
console.log(module.exports.terminal.markdown(`\n !!▸!! error loading plugin "${plugin}": ${err}\n`)); | ||
} | ||
if(module.exports.plugins[plugin] && module.exports.plugins[plugin].init) { | ||
try { | ||
module.exports.plugins[plugin].init(module.exports); | ||
} catch (err) { | ||
console.log(module.exports.terminal.markdown(`\n !!▸!! error initializing plugin "${plugin}": ${err}\n`)); | ||
} | ||
} | ||
} | ||
} catch (err) { | ||
console.log(module.exports.terminal.markdown(`\n !!▸!! error initializing plugin "${plugin}": ${err}\n`)); | ||
} | ||
@@ -30,0 +46,0 @@ })); |
{ | ||
"name": "akkeris", | ||
"version": "2.3.6", | ||
"version": "2.3.7", | ||
"description": "Akkeris CLI", | ||
@@ -21,2 +21,3 @@ "main": "aka.js", | ||
"cliui": "^3.2.0", | ||
"colors": "^1.1.2", | ||
"netrc": "^0.1.4", | ||
@@ -23,0 +24,0 @@ "yargs": "^8.0.1" |
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
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
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
148568
4416
6
32
+ Addedcolors@^1.1.2
+ Addedcolors@1.4.0(transitive)