@hello.nrfcloud.com/proto-map 10.0.2 → 10.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lwm2m/validation.js +1 -1
- package/lwm2m/validation.ts +3 -1
- package/package.json +1 -1
package/dist/lwm2m/validation.js
CHANGED
|
@@ -125,7 +125,7 @@ export var validateInstance = function(ObjectID, ObjectVersion, Resources) {
|
|
|
125
125
|
for(var _iterator = Object.entries(Resources)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
126
126
|
var _step_value = _sliced_to_array(_step.value, 2), ResourceID = _step_value[0], validator = _step_value[1];
|
|
127
127
|
if (validator(i.Resources[parseInt(ResourceID, 10)]) === false) {
|
|
128
|
-
return error("Resource ".concat(ResourceID, " is invalid."));
|
|
128
|
+
return error("Resource ".concat(ResourceID, " for Object ").concat(ObjectID, " is invalid."));
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
} catch (err) {
|
package/lwm2m/validation.ts
CHANGED
|
@@ -82,7 +82,9 @@ export const validateInstance =
|
|
|
82
82
|
|
|
83
83
|
for (const [ResourceID, validator] of Object.entries(Resources)) {
|
|
84
84
|
if (validator(i.Resources[parseInt(ResourceID, 10)]) === false) {
|
|
85
|
-
return error(
|
|
85
|
+
return error(
|
|
86
|
+
`Resource ${ResourceID} for Object ${ObjectID} is invalid.`,
|
|
87
|
+
)
|
|
86
88
|
}
|
|
87
89
|
}
|
|
88
90
|
return { object: o as LwM2MObjectInstance<O> }
|
package/package.json
CHANGED