Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
}
}
// Add the NODEJSAPP to the Bundle
this.bundle.addNodejsappDefinition(njappname, fullSS, this.portOverride);
try {
// Construct an info message to report that the NODEJSAPP has been created
const msg = ' define : NODEJSAPP "' + njappname + '" with startscript "' + ss + '"';
// log the message to the console for the uesr
params.response.console.log(msg);
// Also log the message for posterity
if (params.arguments.silent === undefined) {
const logger = Logger.getAppLogger();
logger.debug(msg);
}
}
catch (error) {
// logging errors can be thrown in some of the mocked tests... just ignore it.
}
}
}
else {
// If we get here then we've not found a package.json file. it remains possible
// that sufficient command line parameters have been set to allow a NODEJSAPP
// to be created. If so, process them.
if (this.startscriptOverride !== undefined ||
this.nodejsappOverride !== undefined ||
this.portOverride !== undefined ) {
this.bundle.addNodejsappDefinition(this.nodejsappOverride, this.startscriptOverride, this.portOverride);
try {
const msg = 'define : NODEJSAPP "' + this.nodejsappOverride + '" with startscript "' + this.startscriptOverride + '"';
params.response.console.log(msg);
// Also log the message for posterity
if (params.arguments.silent === undefined) {
const logger = Logger.getAppLogger();
logger.debug(msg);
}
}
catch (error) {
// logging errors can be thrown in some of the mocked tests... just ignore it.
}
}
}
}