@danielsimonjr/memoryjs 1.3.0 → 1.4.0
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/cli/index.js +23 -9
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10975,15 +10975,16 @@ var SchemaValidator = class {
|
|
|
10975
10975
|
* Get field path from AJV error.
|
|
10976
10976
|
*/
|
|
10977
10977
|
getFieldPath(error) {
|
|
10978
|
+
const instancePath = error.instancePath || "";
|
|
10978
10979
|
if (error.params?.missingProperty) {
|
|
10979
|
-
const basePath =
|
|
10980
|
+
const basePath = instancePath.replace(/^\//, "").replace(/\//g, ".");
|
|
10980
10981
|
return basePath ? `${basePath}.${error.params.missingProperty}` : error.params.missingProperty;
|
|
10981
10982
|
}
|
|
10982
10983
|
if (error.params?.additionalProperty) {
|
|
10983
|
-
const basePath =
|
|
10984
|
+
const basePath = instancePath.replace(/^\//, "").replace(/\//g, ".");
|
|
10984
10985
|
return basePath ? `${basePath}.${error.params.additionalProperty}` : error.params.additionalProperty;
|
|
10985
10986
|
}
|
|
10986
|
-
return
|
|
10987
|
+
return instancePath.replace(/^\//, "").replace(/\//g, ".") || "root";
|
|
10987
10988
|
}
|
|
10988
10989
|
/**
|
|
10989
10990
|
* Get human-readable error message.
|