@rss/common
Advanced tools
Comparing version 0.0.60 to 0.0.61
@@ -17,4 +17,3 @@ 'use strict'; | ||
this.tenantCode = null; | ||
this.groupId = null; | ||
this.groupName = null; | ||
this.groupIds = []; | ||
this.types = []; | ||
@@ -33,4 +32,9 @@ | ||
this.tenantCode = opt.tenantCode || null; | ||
this.groupId = opt.groupId || null; | ||
this.groupName = opt.groupName || null; | ||
this.groupIds = opt.groupIds || []; | ||
if (opt.groupId && !this.groupIds.includes(opt.groupId)) { | ||
console.warn('Warning!! groupId from Role object has been deprecated, use groupIds as an array of string'); | ||
this.groupIds.push(opt.groupId); | ||
} | ||
this.types = opt.types ? opt.types : []; | ||
@@ -58,3 +62,3 @@ } | ||
tenantCode: { type: ['string', 'null'] }, | ||
groupId: { type: ['string', 'null'] }, | ||
groupIds: { type: 'array', item: { type: 'string' } }, | ||
groupName: { type: ['string', 'null'] }, | ||
@@ -61,0 +65,0 @@ types: { type: 'array', item: { type: 'string' } } |
{ | ||
"name": "@rss/common", | ||
"version": "0.0.60", | ||
"version": "0.0.61", | ||
"description": "common constant, classes, & helper", | ||
@@ -5,0 +5,0 @@ "author": "Risk & Safety Solution", |
@@ -9,4 +9,3 @@ const tv4 = require('tv4'); | ||
this.tenantCode = null; | ||
this.groupId = null; | ||
this.groupName = null; | ||
this.groupIds = []; | ||
this.types = []; | ||
@@ -23,4 +22,9 @@ | ||
this.tenantCode = opt.tenantCode || null; | ||
this.groupId = opt.groupId || null; | ||
this.groupName = opt.groupName || null; | ||
this.groupIds = opt.groupIds || []; | ||
if (opt.groupId && !this.groupIds.includes(opt.groupId)) { | ||
console.warn('Warning!! groupId from Role object has been deprecated, use groupIds as an array of string'); | ||
this.groupIds.push(opt.groupId); | ||
} | ||
this.types = opt.types ? opt.types : []; | ||
@@ -44,3 +48,3 @@ } | ||
tenantCode: { type: ['string', 'null'] }, | ||
groupId: { type: ['string', 'null'] }, | ||
groupIds: { type: 'array', item: { type: 'string' } }, | ||
groupName: { type: ['string', 'null'] }, | ||
@@ -47,0 +51,0 @@ types: { type: 'array', item: { type: 'string' } }, |
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
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
13494
493423
247