Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
super();
options = options || { applicationUri: "" } as ServerEngineOptions;
options.buildInfo = options.buildInfo || {};
ServerEngine.registry.register(this);
this._sessions = {};
this._closedSessions = {};
this._orphanPublishEngine = undefined; // will be constructed on demand
this.isAuditing = _.isBoolean(options.isAuditing) ? options.isAuditing : false;
options.buildInfo.buildDate = options.buildInfo.buildDate || new Date();
// ---------------------------------------------------- ServerStatusDataType
this.serverStatus = new ServerStatusDataType({
buildInfo: options.buildInfo,
currentTime: new Date(),
secondsTillShutdown: 0,
shutdownReason: { text: "" },
startTime: new Date(),
state: ServerState.NoConfiguration
});
// --------------------------------------------------- ServerCapabilities
options.serverCapabilities = options.serverCapabilities || {};
options.serverCapabilities.serverProfileArray = options.serverCapabilities.serverProfileArray || [
"Standard UA Server Profile",
"Embedded UA Server Profile",
"Micro Embedded Device Server Profile",
"Nano Embedded Device Server Profile"
];