@json-eval-rs/vanilla 0.0.78 → 0.0.80
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/package.json
CHANGED
package/pkg/json_eval_rs.d.ts
CHANGED
|
@@ -479,6 +479,25 @@ export class JSONEvalWasm {
|
|
|
479
479
|
* @returns ValidationResult
|
|
480
480
|
*/
|
|
481
481
|
validateSubform(subform_path: string, data: string, context?: string | null): ValidationResult;
|
|
482
|
+
/**
|
|
483
|
+
* Validate subform data and return as plain JavaScript object (Worker-safe)
|
|
484
|
+
*
|
|
485
|
+
* @param subformPath - Path to the subform
|
|
486
|
+
* @param data - JSON data string for the subform
|
|
487
|
+
* @param context - Optional context data JSON string
|
|
488
|
+
* @returns Plain JavaScript object with validation result
|
|
489
|
+
*/
|
|
490
|
+
validateSubformJS(subform_path: string, data: string, context?: string | null): any;
|
|
491
|
+
/**
|
|
492
|
+
* Validate subform with path filtering and return as plain JavaScript object (Worker-safe)
|
|
493
|
+
*
|
|
494
|
+
* @param subformPath - Path to the subform
|
|
495
|
+
* @param data - JSON data string for the subform
|
|
496
|
+
* @param context - Optional context data JSON string
|
|
497
|
+
* @param paths - Optional array of paths to validate (null for all)
|
|
498
|
+
* @returns Plain JavaScript object with validation result
|
|
499
|
+
*/
|
|
500
|
+
validateSubformPathsJS(subform_path: string, data: string, context?: string | null, paths?: string[] | null): any;
|
|
482
501
|
}
|
|
483
502
|
|
|
484
503
|
/**
|
|
@@ -591,6 +610,8 @@ export interface InitOutput {
|
|
|
591
610
|
readonly jsonevalwasm_validatePaths: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
592
611
|
readonly jsonevalwasm_validatePathsJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
593
612
|
readonly jsonevalwasm_validateSubform: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
613
|
+
readonly jsonevalwasm_validateSubformJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
614
|
+
readonly jsonevalwasm_validateSubformPathsJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
594
615
|
readonly validationerror_code: (a: number, b: number) => void;
|
|
595
616
|
readonly validationerror_data: (a: number) => number;
|
|
596
617
|
readonly validationerror_field_value: (a: number, b: number) => void;
|
package/pkg/json_eval_rs.js
CHANGED
|
@@ -1712,6 +1712,76 @@ export class JSONEvalWasm {
|
|
|
1712
1712
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1713
1713
|
}
|
|
1714
1714
|
}
|
|
1715
|
+
/**
|
|
1716
|
+
* Validate subform data and return as plain JavaScript object (Worker-safe)
|
|
1717
|
+
*
|
|
1718
|
+
* @param subformPath - Path to the subform
|
|
1719
|
+
* @param data - JSON data string for the subform
|
|
1720
|
+
* @param context - Optional context data JSON string
|
|
1721
|
+
* @returns Plain JavaScript object with validation result
|
|
1722
|
+
* @param {string} subform_path
|
|
1723
|
+
* @param {string} data
|
|
1724
|
+
* @param {string | null} [context]
|
|
1725
|
+
* @returns {any}
|
|
1726
|
+
*/
|
|
1727
|
+
validateSubformJS(subform_path, data, context) {
|
|
1728
|
+
try {
|
|
1729
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1730
|
+
const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1731
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1732
|
+
const ptr1 = passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1733
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1734
|
+
var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1735
|
+
var len2 = WASM_VECTOR_LEN;
|
|
1736
|
+
wasm.jsonevalwasm_validateSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1737
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1738
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1739
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1740
|
+
if (r2) {
|
|
1741
|
+
throw takeObject(r1);
|
|
1742
|
+
}
|
|
1743
|
+
return takeObject(r0);
|
|
1744
|
+
} finally {
|
|
1745
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
/**
|
|
1749
|
+
* Validate subform with path filtering and return as plain JavaScript object (Worker-safe)
|
|
1750
|
+
*
|
|
1751
|
+
* @param subformPath - Path to the subform
|
|
1752
|
+
* @param data - JSON data string for the subform
|
|
1753
|
+
* @param context - Optional context data JSON string
|
|
1754
|
+
* @param paths - Optional array of paths to validate (null for all)
|
|
1755
|
+
* @returns Plain JavaScript object with validation result
|
|
1756
|
+
* @param {string} subform_path
|
|
1757
|
+
* @param {string} data
|
|
1758
|
+
* @param {string | null} [context]
|
|
1759
|
+
* @param {string[] | null} [paths]
|
|
1760
|
+
* @returns {any}
|
|
1761
|
+
*/
|
|
1762
|
+
validateSubformPathsJS(subform_path, data, context, paths) {
|
|
1763
|
+
try {
|
|
1764
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1765
|
+
const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1766
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1767
|
+
const ptr1 = passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1768
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1769
|
+
var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1770
|
+
var len2 = WASM_VECTOR_LEN;
|
|
1771
|
+
var ptr3 = isLikeNone(paths) ? 0 : passArrayJsValueToWasm0(paths, wasm.__wbindgen_export);
|
|
1772
|
+
var len3 = WASM_VECTOR_LEN;
|
|
1773
|
+
wasm.jsonevalwasm_validateSubformPathsJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
1774
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1775
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1776
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1777
|
+
if (r2) {
|
|
1778
|
+
throw takeObject(r1);
|
|
1779
|
+
}
|
|
1780
|
+
return takeObject(r0);
|
|
1781
|
+
} finally {
|
|
1782
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1715
1785
|
}
|
|
1716
1786
|
if (Symbol.dispose) JSONEvalWasm.prototype[Symbol.dispose] = JSONEvalWasm.prototype.free;
|
|
1717
1787
|
|
|
@@ -2002,7 +2072,7 @@ function __wbg_get_imports() {
|
|
|
2002
2072
|
const ret = getObject(arg0).getTime();
|
|
2003
2073
|
return ret;
|
|
2004
2074
|
},
|
|
2005
|
-
|
|
2075
|
+
__wbg_log_2e2aea7f566120dc: function(arg0, arg1) {
|
|
2006
2076
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
2007
2077
|
},
|
|
2008
2078
|
__wbg_new_0_1dcafdf5e786e876: function() {
|
package/pkg/json_eval_rs_bg.wasm
CHANGED
|
Binary file
|
|
@@ -64,6 +64,8 @@ export const jsonevalwasm_validateJS: (a: number, b: number, c: number, d: numbe
|
|
|
64
64
|
export const jsonevalwasm_validatePaths: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
65
65
|
export const jsonevalwasm_validatePathsJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
66
66
|
export const jsonevalwasm_validateSubform: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
67
|
+
export const jsonevalwasm_validateSubformJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
68
|
+
export const jsonevalwasm_validateSubformPathsJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
67
69
|
export const validationerror_code: (a: number, b: number) => void;
|
|
68
70
|
export const validationerror_data: (a: number) => number;
|
|
69
71
|
export const validationerror_field_value: (a: number, b: number) => void;
|