@metlo/testing
Advanced tools
Comparing version 0.3.23 to 0.3.24
@@ -77,10 +77,13 @@ "use strict"; | ||
for (const noAccessEnt of noAccessEnts) { | ||
const payloadNoAccessEntities = { | ||
[noAccessEnt]: notHasAccessItems[noAccessEnt][0], | ||
}; | ||
payloads.push({ | ||
authActorEntity: authActor, | ||
entities: Object.assign(Object.assign({}, defaultPayloadEntities), payloadNoAccessEntities), | ||
authorized: false, | ||
}); | ||
for (const item of notHasAccessItems[noAccessEnt]) { | ||
const payloadNoAccessEntities = { | ||
[noAccessEnt]: item, | ||
}; | ||
payloads.push({ | ||
authActorEntity: authActor, | ||
reason: item.reason, | ||
entities: Object.assign(Object.assign({}, defaultPayloadEntities), payloadNoAccessEntities), | ||
authorized: false, | ||
}); | ||
} | ||
} | ||
@@ -87,0 +90,0 @@ } |
@@ -248,6 +248,5 @@ "use strict"; | ||
.map(([k, v]) => `${k}=${v}`) | ||
.join(",")}) does not have ${permsNeeded} access to ${permissionValidations.length > 0 | ||
? `${entName}(${permissionValidations | ||
.filter(e => e === null || e === void 0 ? void 0 : e.reason) | ||
.map(e => e.reason) | ||
.join(",")}) does not have ${permsNeeded} access to ${typeof entItem === "object" | ||
? `${entName}(${Object.entries(entItem) | ||
.map(([itemKey, itemValue], idx) => `${itemKey}=${itemValue}`) | ||
.join(",")})` | ||
@@ -254,0 +253,0 @@ : entName}.`, |
@@ -76,3 +76,5 @@ "use strict"; | ||
if (currTokenIndex > mapTokens.length - 1 || !mapTokens[currTokenIndex]) { | ||
return dataField.entity && entityMap[dataField.entity] | ||
return dataField.entity && | ||
entityMap[dataField.entity] !== undefined && | ||
entityMap[dataField.entity] !== null | ||
? entityMap[dataField.entity] | ||
@@ -214,3 +216,5 @@ : getSampleValue(dataField.dataType); | ||
} | ||
return dataField.entity && entityMap[dataField.entity] | ||
return dataField.entity && | ||
entityMap[dataField.entity] !== undefined && | ||
entityMap[dataField.entity] !== null | ||
? getGraphQlEntityValue(entityMap[dataField.entity]) | ||
@@ -217,0 +221,0 @@ : getEnumValue(ast, mapTokens) || getSampleValue(dataField.dataType); |
{ | ||
"name": "@metlo/testing", | ||
"version": "0.3.23", | ||
"version": "0.3.24", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
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
1261998
13576