@teamkeel/wasm 0.102.9 → 0.102.12

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.d.ts CHANGED
@@ -61,6 +61,7 @@ declare module '@teamkeel/wasm/typings' {
61
61
  }
62
62
  export interface ValidationResult {
63
63
  errors: ValidationError[];
64
+ type: any;
64
65
  ast: any;
65
66
  }
66
67
 
package/dist/index.js CHANGED
@@ -7829,9 +7829,17 @@ var keel = () => {
7829
7829
  const validate = (schemaString, opts) => __async(void 0, null, function* () {
7830
7830
  const api = yield instantiate();
7831
7831
  const result = api.validate(schemaString, opts);
7832
+ if (result.error) {
7833
+ return {
7834
+ errors: [result.error],
7835
+ type: result.type,
7836
+ ast: null
7837
+ };
7838
+ }
7832
7839
  if (!result || !result.validationErrors) {
7833
7840
  return {
7834
- errors: [],
7841
+ errors: [result.error],
7842
+ type: result.type,
7835
7843
  ast: null
7836
7844
  };
7837
7845
  }
@@ -7839,6 +7847,7 @@ var keel = () => {
7839
7847
  const transformedErrors = (errors || []).map((err) => transformKeys_default(err));
7840
7848
  return {
7841
7849
  errors: transformedErrors,
7850
+ type: result.type,
7842
7851
  ast
7843
7852
  };
7844
7853
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamkeel/wasm",
3
- "version": "0.102.9",
3
+ "version": "0.102.12",
4
4
  "description": "Provides wasm binaries for the Keel CLI",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {