Comparing version 2.3.54 to 2.3.55
{ | ||
"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": { |
@@ -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; |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance 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
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
861030
45
892
5
115
10
4
+ Addednode-fetch@^3.3.2
+ Addeddata-uri-to-buffer@4.0.1(transitive)
+ Addedfetch-blob@3.2.0(transitive)
+ Addedformdata-polyfill@4.0.10(transitive)
+ Addednode-domexception@1.0.0(transitive)
+ Addednode-fetch@3.3.2(transitive)
+ Addedweb-streams-polyfill@3.3.3(transitive)