@json-eval-rs/bundler 0.0.77 → 0.0.79
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
|
/**
|
package/pkg/json_eval_rs_bg.js
CHANGED
|
@@ -1710,6 +1710,76 @@ export class JSONEvalWasm {
|
|
|
1710
1710
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1711
1711
|
}
|
|
1712
1712
|
}
|
|
1713
|
+
/**
|
|
1714
|
+
* Validate subform data and return as plain JavaScript object (Worker-safe)
|
|
1715
|
+
*
|
|
1716
|
+
* @param subformPath - Path to the subform
|
|
1717
|
+
* @param data - JSON data string for the subform
|
|
1718
|
+
* @param context - Optional context data JSON string
|
|
1719
|
+
* @returns Plain JavaScript object with validation result
|
|
1720
|
+
* @param {string} subform_path
|
|
1721
|
+
* @param {string} data
|
|
1722
|
+
* @param {string | null} [context]
|
|
1723
|
+
* @returns {any}
|
|
1724
|
+
*/
|
|
1725
|
+
validateSubformJS(subform_path, data, context) {
|
|
1726
|
+
try {
|
|
1727
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1728
|
+
const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1729
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1730
|
+
const ptr1 = passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1731
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1732
|
+
var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1733
|
+
var len2 = WASM_VECTOR_LEN;
|
|
1734
|
+
wasm.jsonevalwasm_validateSubformJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
1735
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1736
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1737
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1738
|
+
if (r2) {
|
|
1739
|
+
throw takeObject(r1);
|
|
1740
|
+
}
|
|
1741
|
+
return takeObject(r0);
|
|
1742
|
+
} finally {
|
|
1743
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
/**
|
|
1747
|
+
* Validate subform with path filtering and return as plain JavaScript object (Worker-safe)
|
|
1748
|
+
*
|
|
1749
|
+
* @param subformPath - Path to the subform
|
|
1750
|
+
* @param data - JSON data string for the subform
|
|
1751
|
+
* @param context - Optional context data JSON string
|
|
1752
|
+
* @param paths - Optional array of paths to validate (null for all)
|
|
1753
|
+
* @returns Plain JavaScript object with validation result
|
|
1754
|
+
* @param {string} subform_path
|
|
1755
|
+
* @param {string} data
|
|
1756
|
+
* @param {string | null} [context]
|
|
1757
|
+
* @param {string[] | null} [paths]
|
|
1758
|
+
* @returns {any}
|
|
1759
|
+
*/
|
|
1760
|
+
validateSubformPathsJS(subform_path, data, context, paths) {
|
|
1761
|
+
try {
|
|
1762
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1763
|
+
const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1764
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1765
|
+
const ptr1 = passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1766
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1767
|
+
var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1768
|
+
var len2 = WASM_VECTOR_LEN;
|
|
1769
|
+
var ptr3 = isLikeNone(paths) ? 0 : passArrayJsValueToWasm0(paths, wasm.__wbindgen_export);
|
|
1770
|
+
var len3 = WASM_VECTOR_LEN;
|
|
1771
|
+
wasm.jsonevalwasm_validateSubformPathsJS(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
1772
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1773
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1774
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1775
|
+
if (r2) {
|
|
1776
|
+
throw takeObject(r1);
|
|
1777
|
+
}
|
|
1778
|
+
return takeObject(r0);
|
|
1779
|
+
} finally {
|
|
1780
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1713
1783
|
}
|
|
1714
1784
|
if (Symbol.dispose) JSONEvalWasm.prototype[Symbol.dispose] = JSONEvalWasm.prototype.free;
|
|
1715
1785
|
|
|
@@ -1996,7 +2066,7 @@ export function __wbg_getTime_1dad7b5386ddd2d9(arg0) {
|
|
|
1996
2066
|
const ret = getObject(arg0).getTime();
|
|
1997
2067
|
return ret;
|
|
1998
2068
|
}
|
|
1999
|
-
export function
|
|
2069
|
+
export function __wbg_log_82b1088f1c0460a9(arg0, arg1) {
|
|
2000
2070
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
2001
2071
|
}
|
|
2002
2072
|
export function __wbg_new_0_1dcafdf5e786e876() {
|
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;
|