Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

netget

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

netget - npm Package Compare versions

Comparing version 2.3.79 to 2.3.81

5

package.json
{
"name": "netget",
"version": "2.3.79",
"version": "2.3.81",
"description": "Rette Adepto/ Recibido Directamente.",

@@ -36,3 +36,4 @@ "type": "module",

"morgan": "^1.10.0",
"node-fetch": "^3.3.2"
"node-fetch": "^3.3.2",
"sudo-prompt": "^9.2.1"
},

@@ -39,0 +40,0 @@ "repository": {

24

src/modules/NetGetX/config/configureDefaultServerBlock.js
// configureDefaultServerBlock.js
import fs from 'fs';
import chalk from 'chalk';
import defaultServerBlock from './defaultServerBlock.js'; // Ensure this import is correct
import defaultServerBlock from './defaultServerBlock.js';
import sudo from 'sudo-prompt';
import { execShellCommand } from '../../utils/execShellCommand.js';

@@ -13,5 +14,22 @@

} catch (error) {
console.error(chalk.red(`Failed to write NGINX default server block config at ${userConfig.nginxPath}: ${error.message}`));
console.error(error); // Show detailed error if the write fails or command execution has issues
if (error.code === 'EACCES') {
console.error(chalk.yellow(`Permission denied writing to ${userConfig.nginxPath}.`));
handlePermissionError(userConfig.nginxPath, defaultServerBlock);
} else {
console.error(chalk.red(`Failed to write NGINX default server block config at ${userConfig.nginxPath}: ${error.message}`));
}
}
};
const handlePermissionError = (path, data) => {
console.log(chalk.yellow('Attempting to gain elevated privileges to configure NGINX...'));
const command = `echo '${data.replace(/'/g, "\\'")}' | sudo tee ${path}`;
sudo.exec(command, { name: 'NetGetX' }, (error, stdout, stderr) => {
if (error) {
console.error(chalk.red(`Failed with elevated privileges: ${error.message}`));
return;
}
console.log(chalk.green('Successfully configured NGINX with elevated privileges.'));
});
};
{
"nginxConfigurationProceed": false,
"nginxPath": "",
"nginxSitesAvailable": "",
"nginxSitesEnabled": "",
"nginxPath": "/opt/homebrew/etc/nginx/nginx.conf",
"nginxSitesAvailable": "/opt/homebrew/etc/nginx/sites-available",
"nginxSitesEnabled": "/opt/homebrew/etc/nginx/sites-enabled",
"useSudo": false,
"nginxExecutable": ""
"nginxExecutable": "/opt/homebrew/bin/nginx"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc