@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.cjs
CHANGED
|
@@ -11257,15 +11257,16 @@ var SchemaValidator = class {
|
|
|
11257
11257
|
* Get field path from AJV error.
|
|
11258
11258
|
*/
|
|
11259
11259
|
getFieldPath(error) {
|
|
11260
|
+
const instancePath = error.instancePath || "";
|
|
11260
11261
|
if (error.params?.missingProperty) {
|
|
11261
|
-
const basePath =
|
|
11262
|
+
const basePath = instancePath.replace(/^\//, "").replace(/\//g, ".");
|
|
11262
11263
|
return basePath ? `${basePath}.${error.params.missingProperty}` : error.params.missingProperty;
|
|
11263
11264
|
}
|
|
11264
11265
|
if (error.params?.additionalProperty) {
|
|
11265
|
-
const basePath =
|
|
11266
|
+
const basePath = instancePath.replace(/^\//, "").replace(/\//g, ".");
|
|
11266
11267
|
return basePath ? `${basePath}.${error.params.additionalProperty}` : error.params.additionalProperty;
|
|
11267
11268
|
}
|
|
11268
|
-
return
|
|
11269
|
+
return instancePath.replace(/^\//, "").replace(/\//g, ".") || "root";
|
|
11269
11270
|
}
|
|
11270
11271
|
/**
|
|
11271
11272
|
* Get human-readable error message.
|