@@ -162,7 +162,7 @@ export default class Licensing {
162162 * @private
163163 * @returns {boolean } `true` if the licensing type is MHLM, `false` otherwise.
164164 */
165- private isMHLMLicensing ( ) : boolean {
165+ isMHLMLicensing ( ) : boolean {
166166 return isMHLMLicensingDataType ( this . data ) ;
167167 }
168168
@@ -171,7 +171,7 @@ export default class Licensing {
171171 * @private
172172 * @returns {boolean } `true` if the licensing type is NLM, `false` otherwise.
173173 */
174- private isNLMLicensing ( ) : boolean {
174+ isNLMLicensing ( ) : boolean {
175175 return isNLMLicensingDataType ( this . data )
176176 }
177177
@@ -180,7 +180,7 @@ export default class Licensing {
180180 * @private
181181 * @returns {boolean } `true` if the licensing type is an existing license, `false` otherwise.
182182 */
183- private isExistingLicensing ( ) : boolean {
183+ isExistingLicensing ( ) : boolean {
184184 return isExistingLicensingDataType ( this . data )
185185 }
186186
@@ -189,7 +189,7 @@ export default class Licensing {
189189 * @private
190190 * @returns {boolean } `true` if there is no licensing configured, `false` otherwise.
191191 */
192- private isNoLicensing ( ) : boolean {
192+ isNoLicensing ( ) : boolean {
193193 return isNoLicensingDataType ( this . data ) ;
194194 }
195195
@@ -214,10 +214,11 @@ export default class Licensing {
214214 */
215215 async unsetLicensing ( ) : Promise < void > {
216216 this . data = null
217- if ( this . error instanceof LicensingError ) {
217+ if ( this . error && this . error instanceof LicensingError ) {
218218 this . error = null
219- }
219+ }
220220 await this . deleteCachedConfigFile ( )
221+ console . log ( "Successfully unset licensing" )
221222 }
222223
223224 /**
@@ -329,11 +330,12 @@ export default class Licensing {
329330 * @param connectionStr - The NLM connection string.
330331 * @private
331332 */
332- private setLicensingToNLM ( connectionStr : string ) : void {
333+ private setLicensingToNLM ( data : any ) : void {
334+ const { connectionString} = data ;
333335 this . data = {
334336 type : NLMLicenseType ,
335- conn_str : connectionStr
336- } ;
337+ conn_str : connectionString
338+ }
337339
338340 Logger . log ( 'Persisting NLM info.' )
339341 this . persistConfigData ( ) ;
@@ -449,7 +451,7 @@ export default class Licensing {
449451 * @private
450452 * @returns {Promise<boolean> } `true` if the licensing information was updated and persisted successfully, `false` otherwise.
451453 */
452- private async updateAndPersistLicensing ( ) : Promise < boolean > {
454+ async updateAndPersistLicensing ( ) : Promise < boolean > {
453455 const successfulUpdate = await this . updateEntitlements ( ) ;
454456 if ( successfulUpdate ) {
455457 this . persistConfigData ( ) ;
0 commit comments