@teamkeel/wasm 0.39.0 → 0.42.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/index.js +6 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7790,7 +7790,7 @@ function snakeToCamel(key) {
|
|
|
7790
7790
|
return key.replace(/_(\w)/g, (match, char) => char.toUpperCase());
|
|
7791
7791
|
}
|
|
7792
7792
|
var transformKeys_default = (obj) => {
|
|
7793
|
-
return (0, import_deep_map_keys.default)(obj, (
|
|
7793
|
+
return (0, import_deep_map_keys.default)(obj, (key, value) => snakeToCamel(key));
|
|
7794
7794
|
};
|
|
7795
7795
|
|
|
7796
7796
|
// lib/wasm_exec_node.js
|
|
@@ -7821,14 +7821,15 @@ var instantiate = () => __async(void 0, null, function* () {
|
|
|
7821
7821
|
});
|
|
7822
7822
|
var keel = () => __async(void 0, null, function* () {
|
|
7823
7823
|
const api = yield instantiate();
|
|
7824
|
-
const validate = (schemaString, opts) => {
|
|
7824
|
+
const validate = (schemaString, opts) => __async(void 0, null, function* () {
|
|
7825
7825
|
const result = api.validate(schemaString, opts);
|
|
7826
7826
|
const { validationErrors: { Errors: errors }, ast } = result;
|
|
7827
|
+
const transformedErrors = yield (errors || []).map((err) => transformKeys_default(err));
|
|
7827
7828
|
return {
|
|
7828
|
-
errors:
|
|
7829
|
-
ast
|
|
7829
|
+
errors: transformedErrors,
|
|
7830
|
+
ast
|
|
7830
7831
|
};
|
|
7831
|
-
};
|
|
7832
|
+
});
|
|
7832
7833
|
const format = (schemaString) => {
|
|
7833
7834
|
return api.format(schemaString);
|
|
7834
7835
|
};
|