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

netget

Package Overview
Dependencies
Maintainers
1
Versions
98
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.54 to 2.3.55

src/modules/Gateways/Gateways.js

5

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

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

"inquirer": "^9.2.17",
"morgan": "^1.10.0"
"morgan": "^1.10.0",
"node-fetch": "^3.3.2"
},

@@ -37,0 +38,0 @@ "repository": {

1

README.md

@@ -30,3 +30,2 @@ <img src="https://suign.github.io/assets/imgs/netget.png" alt="netget.me" width="244" height="203">

```
Now you can:

@@ -33,0 +32,0 @@ ```bash

#!/usr/bin/env node
import { program } from 'commander';
import { handleNetGetX } from './CLI/NetGetX.js';
import { handleGateways } from './CLI/Gateways.js';
import { handleGets } from './CLI/Gets.js';
import { NetGetMainMenu } from './CLI/netget_MainMenu.js';
import { NetGetX } from './modules/NetGetX/NetGetX.cli.js';
import { handleGateways } from './modules/Gateways/Gateways.js';
import { handleGets } from './modules/Gets/Gets.js';
import { NetGetMainMenu } from './modules/netget_MainMenu.cli.js';

@@ -16,3 +15,3 @@ program

.description('Directly interact with NetGetX')
.action(handleNetGetX);
.action(NetGetX);

@@ -19,0 +18,0 @@ program.command('gateways')

// src/netget.js
import Gateway from './Gateway.js';
/**
* Represents the main entry point for NetGet functionalities.
* Handles the instantiation of gateways and configuration loading.
*/
class NetGet {
constructor() {
// Initialization code, if necessary
/**
* Constructs the NetGet service, initializing any necessary base configurations.
*/
constructor() {
// Initialization code, if necessary
}
/**
* Creates a Gateway instance with specified configuration.
* @param {Object} config - Configuration options for the Gateway.
* @returns {Gateway} An instance of the Gateway configured with the provided options.
*/
Gateway(config) {
const gateway = new Gateway(config);
return gateway;
}
/**
* Loads and parses the domain configuration from a specified file.
* @param {string} domainConfigPath - The path to the domain configuration file.
* @returns {Object|null} The parsed domain configuration object or null if an error occurs.
*/
static loadDomainConfig(domainConfigPath) {
try {
const data = fs.readFileSync(domainConfigPath, 'utf8');
const domainConfig = JSON.parse(data);
console.log('Loaded Domain Configuration:', domainConfig);
return domainConfig;
} catch (err) {
console.error('Error loading domain configuration:', err);
return null;
}
Gateway(config) {
// Gateway is now an instance method that returns a new Gateway instance.
const gateway = new Gateway(config);
return gateway;
}
static loadDomainConfig(domainConfigPath) {
try {
const data = fs.readFileSync(domainConfigPath, 'utf8');
const domainConfig = JSON.parse(data);
console.log('Loaded Domain Configuration:', domainConfig);
// Additional processing or setup based on the domainConfig
return domainConfig;
} catch (err) {
console.error('Error loading domain configuration:', err);
return null; // Or throw an error, depending on your preference
}
}
// NetGet related functionalities
}
export default NetGet;
}
export default NetGet;
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