Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 7e5fdfb

Browse files
Add jsdoc style comments for the functions
1 parent 81c8d9b commit 7e5fdfb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

packages/core/lib/command-utils.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,12 @@ const displayGeneralHelp = () => {
212212
.showHelp();
213213
};
214214

215+
/**
216+
* This is a function to configure the url from the user specified network settings in the config.
217+
* @param {TruffleConfig} customConfig - Default config with user specified settings.
218+
* @param {boolean} isDashboardNetwork - Check if the network is dashboard or not.
219+
* @returns a string with the configured url
220+
*/
215221
const getConfiguredNetworkUrl = function (customConfig, isDashboardNetwork) {
216222
const defaultPort = isDashboardNetwork
217223
? managedDashboardDefaultPort
@@ -224,6 +230,13 @@ const getConfiguredNetworkUrl = function (customConfig, isDashboardNetwork) {
224230
return `http://${configuredNetworkOptions.host}:${configuredNetworkOptions.port}${urlSuffix}`;
225231
};
226232

233+
/**
234+
* This is a function to derive the config environment from the user specified settings.
235+
* @param {TruffleConfig} detectedConfig - Default config with user specified settings.
236+
* @param {string} network - Network name specified with the `--network` option.
237+
* @param {string} url - URL specified with the `--url` option.
238+
* @returns a TruffleConfig object with the user specified settings in the config
239+
*/
227240
const deriveConfigEnvironment = function (detectedConfig, network, url) {
228241
let configuredNetwork;
229242

0 commit comments

Comments
 (0)