@json-eval-rs/bundler 0.0.33 → 0.0.35

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@json-eval-rs/bundler",
3
- "version": "0.0.33",
3
+ "version": "0.0.35",
4
4
  "description": "JSON Eval RS for bundlers (Webpack, Vite, Next.js, etc.) with ergonomic API",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -26,7 +26,7 @@
26
26
  "license": "MIT",
27
27
  "repository": {
28
28
  "type": "git",
29
- "url": "https://github.com/byrizki/json-eval-rs.git",
29
+ "url": "https://github.com/byrizki/jsoneval-rs.git",
30
30
  "directory": "bindings/web/packages/bundler"
31
31
  },
32
32
  "dependencies": {
@@ -4,14 +4,14 @@
4
4
  * Get library version (alias)
5
5
  */
6
6
  export function version(): string;
7
- /**
8
- * Initialize the library (sets up panic hook)
9
- */
10
- export function init(): void;
11
7
  /**
12
8
  * Get the library version
13
9
  */
14
10
  export function getVersion(): string;
11
+ /**
12
+ * Initialize the library (sets up panic hook)
13
+ */
14
+ export function init(): void;
15
15
  /**
16
16
  * WebAssembly wrapper for JSONEval
17
17
  */
@@ -328,9 +328,10 @@ export class JSONEvalWasm {
328
328
  * @param subformPath - Path to the subform (e.g., "#/riders")
329
329
  * @param data - JSON data string for the subform
330
330
  * @param context - Optional context data JSON string
331
+ * @param paths - Optional array of paths to evaluate (JSON string array)
331
332
  * @throws Error if evaluation fails
332
333
  */
333
- evaluateSubform(subform_path: string, data: string, context?: string | null): void;
334
+ evaluateSubform(subform_path: string, data: string, context?: string | null, paths?: string[] | null): void;
334
335
  /**
335
336
  * Validate subform data against its schema rules
336
337
  *
@@ -238,13 +238,6 @@ export function version() {
238
238
  }
239
239
  }
240
240
 
241
- /**
242
- * Initialize the library (sets up panic hook)
243
- */
244
- export function init() {
245
- wasm.init();
246
- }
247
-
248
241
  /**
249
242
  * Get the library version
250
243
  * @returns {string}
@@ -266,6 +259,13 @@ export function getVersion() {
266
259
  }
267
260
  }
268
261
 
262
+ /**
263
+ * Initialize the library (sets up panic hook)
264
+ */
265
+ export function init() {
266
+ wasm.init();
267
+ }
268
+
269
269
  function passArray8ToWasm0(arg, malloc) {
270
270
  const ptr = malloc(arg.length * 1, 1) >>> 0;
271
271
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -1337,12 +1337,14 @@ export class JSONEvalWasm {
1337
1337
  * @param subformPath - Path to the subform (e.g., "#/riders")
1338
1338
  * @param data - JSON data string for the subform
1339
1339
  * @param context - Optional context data JSON string
1340
+ * @param paths - Optional array of paths to evaluate (JSON string array)
1340
1341
  * @throws Error if evaluation fails
1341
1342
  * @param {string} subform_path
1342
1343
  * @param {string} data
1343
1344
  * @param {string | null} [context]
1345
+ * @param {string[] | null} [paths]
1344
1346
  */
1345
- evaluateSubform(subform_path, data, context) {
1347
+ evaluateSubform(subform_path, data, context, paths) {
1346
1348
  try {
1347
1349
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1348
1350
  const ptr0 = passStringToWasm0(subform_path, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
@@ -1351,7 +1353,9 @@ export class JSONEvalWasm {
1351
1353
  const len1 = WASM_VECTOR_LEN;
1352
1354
  var ptr2 = isLikeNone(context) ? 0 : passStringToWasm0(context, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
1353
1355
  var len2 = WASM_VECTOR_LEN;
1354
- wasm.jsonevalwasm_evaluateSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
1356
+ var ptr3 = isLikeNone(paths) ? 0 : passArrayJsValueToWasm0(paths, wasm.__wbindgen_export_0);
1357
+ var len3 = WASM_VECTOR_LEN;
1358
+ wasm.jsonevalwasm_evaluateSubform(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
1355
1359
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1356
1360
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1357
1361
  if (r1) {
@@ -2176,7 +2180,7 @@ export function __wbg_getTime_6bb3f64e0f18f817(arg0) {
2176
2180
  return ret;
2177
2181
  };
2178
2182
 
2179
- export function __wbg_log_09afbef6bb330862(arg0, arg1) {
2183
+ export function __wbg_log_1cc5f794f9ec31c2(arg0, arg1) {
2180
2184
  console.log(getStringFromWasm0(arg0, arg1));
2181
2185
  };
2182
2186
 
Binary file
@@ -18,7 +18,7 @@ export const jsonevalwasm_evaluateDependentsJS: (a: number, b: number, c: number
18
18
  export const jsonevalwasm_evaluateDependentsSubform: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
19
19
  export const jsonevalwasm_evaluateDependentsSubformJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
20
20
  export const jsonevalwasm_evaluateJS: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
21
- export const jsonevalwasm_evaluateSubform: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
21
+ export const jsonevalwasm_evaluateSubform: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
22
22
  export const jsonevalwasm_getEvaluatedSchema: (a: number, b: number, c: number) => void;
23
23
  export const jsonevalwasm_getEvaluatedSchemaByPath: (a: number, b: number, c: number, d: number, e: number) => void;
24
24
  export const jsonevalwasm_getEvaluatedSchemaByPathJS: (a: number, b: number, c: number, d: number, e: number) => void;