@json-eval-rs/bundler 0.0.55 → 0.0.56
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 +1 -1
- package/pkg/json_eval_rs.d.ts +37 -6
- package/pkg/json_eval_rs_bg.js +104 -7
- package/pkg/json_eval_rs_bg.wasm +0 -0
- package/pkg/json_eval_rs_bg.wasm.d.ts +4 -0
package/package.json
CHANGED
package/pkg/json_eval_rs.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Get library version (alias)
|
|
5
|
-
*/
|
|
6
|
-
export function version(): string;
|
|
7
3
|
/**
|
|
8
4
|
* Get the library version
|
|
9
5
|
*/
|
|
10
6
|
export function getVersion(): string;
|
|
7
|
+
/**
|
|
8
|
+
* Get library version (alias)
|
|
9
|
+
*/
|
|
10
|
+
export function version(): string;
|
|
11
11
|
/**
|
|
12
12
|
* Initialize the library (sets up panic hook)
|
|
13
13
|
*/
|
|
@@ -250,6 +250,13 @@ export class JSONEvalWasm {
|
|
|
250
250
|
* @returns Data in specified format as JavaScript object
|
|
251
251
|
*/
|
|
252
252
|
getSchemaByPathsJS(paths_json: string, format: number): any;
|
|
253
|
+
/**
|
|
254
|
+
* Get all schema values as array of path-value pairs
|
|
255
|
+
* Returns [{path: "", value: ""}, ...]
|
|
256
|
+
*
|
|
257
|
+
* @returns Array of {path, value} objects as JavaScript array
|
|
258
|
+
*/
|
|
259
|
+
getSchemaValueArray(): any;
|
|
253
260
|
/**
|
|
254
261
|
* Get the evaluated schema as JavaScript object
|
|
255
262
|
*
|
|
@@ -257,6 +264,13 @@ export class JSONEvalWasm {
|
|
|
257
264
|
* @returns Evaluated schema as JavaScript object
|
|
258
265
|
*/
|
|
259
266
|
getEvaluatedSchemaJS(skip_layout: boolean): any;
|
|
267
|
+
/**
|
|
268
|
+
* Get all schema values as object with dotted path keys
|
|
269
|
+
* Returns {path: value, ...}
|
|
270
|
+
*
|
|
271
|
+
* @returns Flat object with dotted paths as keys
|
|
272
|
+
*/
|
|
273
|
+
getSchemaValueObject(): any;
|
|
260
274
|
/**
|
|
261
275
|
* Reload schema from ParsedSchemaCache using a cache key
|
|
262
276
|
*
|
|
@@ -368,10 +382,11 @@ export class JSONEvalWasm {
|
|
|
368
382
|
*/
|
|
369
383
|
resolveLayoutSubform(subform_path: string, evaluate: boolean): void;
|
|
370
384
|
/**
|
|
371
|
-
* Get schema value from subform (all .value fields)
|
|
385
|
+
* Get schema value from subform in nested object format (all .value fields).
|
|
386
|
+
* Returns a hierarchical object structure mimicking the schema.
|
|
372
387
|
*
|
|
373
388
|
* @param subformPath - Path to the subform
|
|
374
|
-
* @returns Modified data as JavaScript object
|
|
389
|
+
* @returns Modified data as JavaScript object (Nested)
|
|
375
390
|
*/
|
|
376
391
|
getSchemaValueSubform(subform_path: string): any;
|
|
377
392
|
/**
|
|
@@ -432,6 +447,14 @@ export class JSONEvalWasm {
|
|
|
432
447
|
* @returns Data in specified format as JavaScript object
|
|
433
448
|
*/
|
|
434
449
|
getSchemaByPathsSubformJS(subform_path: string, paths_json: string, format: number): any;
|
|
450
|
+
/**
|
|
451
|
+
* Get schema values from subform as a flat array of path-value pairs.
|
|
452
|
+
* Returns an array like `[{path: "field.sub", value: 123}, ...]`.
|
|
453
|
+
*
|
|
454
|
+
* @param subformPath - Path to the subform
|
|
455
|
+
* @returns Array of {path, value} objects
|
|
456
|
+
*/
|
|
457
|
+
getSchemaValueArraySubform(subform_path: string): any;
|
|
435
458
|
/**
|
|
436
459
|
* Get evaluated schema from subform as JavaScript object
|
|
437
460
|
*
|
|
@@ -440,6 +463,14 @@ export class JSONEvalWasm {
|
|
|
440
463
|
* @returns Evaluated schema as JavaScript object
|
|
441
464
|
*/
|
|
442
465
|
getEvaluatedSchemaSubformJS(subform_path: string, resolve_layout: boolean): any;
|
|
466
|
+
/**
|
|
467
|
+
* Get schema values from subform as a flat object with dotted path keys.
|
|
468
|
+
* Returns an object like `{"field.sub": 123, ...}`.
|
|
469
|
+
*
|
|
470
|
+
* @param subformPath - Path to the subform
|
|
471
|
+
* @returns Flat object with dotted paths as keys
|
|
472
|
+
*/
|
|
473
|
+
getSchemaValueObjectSubform(subform_path: string): any;
|
|
443
474
|
/**
|
|
444
475
|
* Get evaluated schema by specific path from subform
|
|
445
476
|
*
|
package/pkg/json_eval_rs_bg.js
CHANGED
|
@@ -153,10 +153,10 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
153
153
|
return ptr;
|
|
154
154
|
}
|
|
155
155
|
/**
|
|
156
|
-
* Get library version
|
|
156
|
+
* Get the library version
|
|
157
157
|
* @returns {string}
|
|
158
158
|
*/
|
|
159
|
-
export function
|
|
159
|
+
export function getVersion() {
|
|
160
160
|
let deferred1_0;
|
|
161
161
|
let deferred1_1;
|
|
162
162
|
try {
|
|
@@ -174,10 +174,10 @@ export function version() {
|
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
/**
|
|
177
|
-
* Get
|
|
177
|
+
* Get library version (alias)
|
|
178
178
|
* @returns {string}
|
|
179
179
|
*/
|
|
180
|
-
export function
|
|
180
|
+
export function version() {
|
|
181
181
|
let deferred1_0;
|
|
182
182
|
let deferred1_1;
|
|
183
183
|
try {
|
|
@@ -1037,6 +1037,28 @@ export class JSONEvalWasm {
|
|
|
1037
1037
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
1040
|
+
/**
|
|
1041
|
+
* Get all schema values as array of path-value pairs
|
|
1042
|
+
* Returns [{path: "", value: ""}, ...]
|
|
1043
|
+
*
|
|
1044
|
+
* @returns Array of {path, value} objects as JavaScript array
|
|
1045
|
+
* @returns {any}
|
|
1046
|
+
*/
|
|
1047
|
+
getSchemaValueArray() {
|
|
1048
|
+
try {
|
|
1049
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1050
|
+
wasm.jsonevalwasm_getSchemaValueArray(retptr, this.__wbg_ptr);
|
|
1051
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1052
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1053
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1054
|
+
if (r2) {
|
|
1055
|
+
throw takeObject(r1);
|
|
1056
|
+
}
|
|
1057
|
+
return takeObject(r0);
|
|
1058
|
+
} finally {
|
|
1059
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1040
1062
|
/**
|
|
1041
1063
|
* Get the evaluated schema as JavaScript object
|
|
1042
1064
|
*
|
|
@@ -1060,6 +1082,28 @@ export class JSONEvalWasm {
|
|
|
1060
1082
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1061
1083
|
}
|
|
1062
1084
|
}
|
|
1085
|
+
/**
|
|
1086
|
+
* Get all schema values as object with dotted path keys
|
|
1087
|
+
* Returns {path: value, ...}
|
|
1088
|
+
*
|
|
1089
|
+
* @returns Flat object with dotted paths as keys
|
|
1090
|
+
* @returns {any}
|
|
1091
|
+
*/
|
|
1092
|
+
getSchemaValueObject() {
|
|
1093
|
+
try {
|
|
1094
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1095
|
+
wasm.jsonevalwasm_getSchemaValueObject(retptr, this.__wbg_ptr);
|
|
1096
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1097
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1098
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1099
|
+
if (r2) {
|
|
1100
|
+
throw takeObject(r1);
|
|
1101
|
+
}
|
|
1102
|
+
return takeObject(r0);
|
|
1103
|
+
} finally {
|
|
1104
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1063
1107
|
/**
|
|
1064
1108
|
* Reload schema from ParsedSchemaCache using a cache key
|
|
1065
1109
|
*
|
|
@@ -1416,10 +1460,11 @@ export class JSONEvalWasm {
|
|
|
1416
1460
|
}
|
|
1417
1461
|
}
|
|
1418
1462
|
/**
|
|
1419
|
-
* Get schema value from subform (all .value fields)
|
|
1463
|
+
* Get schema value from subform in nested object format (all .value fields).
|
|
1464
|
+
* Returns a hierarchical object structure mimicking the schema.
|
|
1420
1465
|
*
|
|
1421
1466
|
* @param subformPath - Path to the subform
|
|
1422
|
-
* @returns Modified data as JavaScript object
|
|
1467
|
+
* @returns Modified data as JavaScript object (Nested)
|
|
1423
1468
|
* @param {string} subform_path
|
|
1424
1469
|
* @returns {any}
|
|
1425
1470
|
*/
|
|
@@ -1679,6 +1724,32 @@ export class JSONEvalWasm {
|
|
|
1679
1724
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1680
1725
|
}
|
|
1681
1726
|
}
|
|
1727
|
+
/**
|
|
1728
|
+
* Get schema values from subform as a flat array of path-value pairs.
|
|
1729
|
+
* Returns an array like `[{path: "field.sub", value: 123}, ...]`.
|
|
1730
|
+
*
|
|
1731
|
+
* @param subformPath - Path to the subform
|
|
1732
|
+
* @returns Array of {path, value} objects
|
|
1733
|
+
* @param {string} subform_path
|
|
1734
|
+
* @returns {any}
|
|
1735
|
+
*/
|
|
1736
|
+
getSchemaValueArraySubform(subform_path) {
|
|
1737
|
+
try {
|
|
1738
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1739
|
+
const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
1740
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1741
|
+
wasm.jsonevalwasm_getSchemaValueArraySubform(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1742
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1743
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1744
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1745
|
+
if (r2) {
|
|
1746
|
+
throw takeObject(r1);
|
|
1747
|
+
}
|
|
1748
|
+
return takeObject(r0);
|
|
1749
|
+
} finally {
|
|
1750
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1682
1753
|
/**
|
|
1683
1754
|
* Get evaluated schema from subform as JavaScript object
|
|
1684
1755
|
*
|
|
@@ -1706,6 +1777,32 @@ export class JSONEvalWasm {
|
|
|
1706
1777
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1707
1778
|
}
|
|
1708
1779
|
}
|
|
1780
|
+
/**
|
|
1781
|
+
* Get schema values from subform as a flat object with dotted path keys.
|
|
1782
|
+
* Returns an object like `{"field.sub": 123, ...}`.
|
|
1783
|
+
*
|
|
1784
|
+
* @param subformPath - Path to the subform
|
|
1785
|
+
* @returns Flat object with dotted paths as keys
|
|
1786
|
+
* @param {string} subform_path
|
|
1787
|
+
* @returns {any}
|
|
1788
|
+
*/
|
|
1789
|
+
getSchemaValueObjectSubform(subform_path) {
|
|
1790
|
+
try {
|
|
1791
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1792
|
+
const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
1793
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1794
|
+
wasm.jsonevalwasm_getSchemaValueObjectSubform(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1795
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1796
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1797
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1798
|
+
if (r2) {
|
|
1799
|
+
throw takeObject(r1);
|
|
1800
|
+
}
|
|
1801
|
+
return takeObject(r0);
|
|
1802
|
+
} finally {
|
|
1803
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1709
1806
|
/**
|
|
1710
1807
|
* Get evaluated schema by specific path from subform
|
|
1711
1808
|
*
|
|
@@ -2156,7 +2253,7 @@ export function __wbg_getTime_6bb3f64e0f18f817(arg0) {
|
|
|
2156
2253
|
return ret;
|
|
2157
2254
|
};
|
|
2158
2255
|
|
|
2159
|
-
export function
|
|
2256
|
+
export function __wbg_log_2f61091b102ce39d(arg0, arg1) {
|
|
2160
2257
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
2161
2258
|
};
|
|
2162
2259
|
|
package/pkg/json_eval_rs_bg.wasm
CHANGED
|
Binary file
|
|
@@ -47,6 +47,10 @@ export const jsonevalwasm_getSchemaByPathsJS: (a: number, b: number, c: number,
|
|
|
47
47
|
export const jsonevalwasm_getSchemaByPathsSubform: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
48
48
|
export const jsonevalwasm_getSchemaByPathsSubformJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
49
49
|
export const jsonevalwasm_getSchemaValue: (a: number, b: number) => void;
|
|
50
|
+
export const jsonevalwasm_getSchemaValueArray: (a: number, b: number) => void;
|
|
51
|
+
export const jsonevalwasm_getSchemaValueArraySubform: (a: number, b: number, c: number, d: number) => void;
|
|
52
|
+
export const jsonevalwasm_getSchemaValueObject: (a: number, b: number) => void;
|
|
53
|
+
export const jsonevalwasm_getSchemaValueObjectSubform: (a: number, b: number, c: number, d: number) => void;
|
|
50
54
|
export const jsonevalwasm_getSchemaValueSubform: (a: number, b: number, c: number, d: number) => void;
|
|
51
55
|
export const jsonevalwasm_getSubformPaths: (a: number, b: number) => void;
|
|
52
56
|
export const jsonevalwasm_hasSubform: (a: number, b: number, c: number) => number;
|