@jupiterone/integration-sdk-core
Advanced tools
Comparing version 11.4.0 to 11.5.2
@@ -39,3 +39,3 @@ import { Entity } from '../types'; | ||
*/ | ||
source: ProviderSourceData; | ||
source?: ProviderSourceData; | ||
/** | ||
@@ -42,0 +42,0 @@ * Literal property assignments. These values will override anything |
@@ -24,3 +24,3 @@ "use strict"; | ||
const _rawData = []; | ||
if (Object.entries(source).length > 0) { | ||
if (source && Object.entries(source).length > 0) { | ||
_rawData.push({ name: 'default', rawData: source }); | ||
@@ -33,3 +33,3 @@ } | ||
const entity = { | ||
...whitelistedProviderData(source, _class), | ||
...(source ? whitelistedProviderData(source, _class) : {}), | ||
...assign, | ||
@@ -39,3 +39,3 @@ _class, | ||
}; | ||
if (entity.createdOn === undefined) { | ||
if (entity.createdOn === undefined && source) { | ||
entity.createdOn = | ||
@@ -48,3 +48,3 @@ (source.createdAt && (0, converters_1.parseTimePropertyValue)(source.createdAt)) || | ||
} | ||
if (entity.active === undefined && source.status) { | ||
if (entity.active === undefined && source && source.status) { | ||
const isActive = new RegExp('(?<!in)active|enabled|online', 'i').test(source.status); | ||
@@ -62,3 +62,3 @@ const isInactive = new RegExp('inactive|disabled|offline', 'i').test(source.status); | ||
delete entity.tags; | ||
(0, tagging_1.assignTags)(entity, source.tags, tagProperties); | ||
(0, tagging_1.assignTags)(entity, source?.tags, tagProperties); | ||
// `assignTags` may populate `displayName` from the `source.tags`. When there | ||
@@ -65,0 +65,0 @@ // is an `assign.displayName`, use that instead assuming that an assigned |
{ | ||
"name": "@jupiterone/integration-sdk-core", | ||
"version": "11.4.0", | ||
"version": "11.5.2", | ||
"description": "The SDK for developing JupiterOne integrations", | ||
@@ -32,3 +32,3 @@ "main": "dist/src/index.js", | ||
}, | ||
"gitHead": "9b9e18d554b131ce0a71189d8ab47bc81e3ee633" | ||
"gitHead": "4e90dab8ca3fd5209a1053d5112c91b571358642" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
260795