@json-eval-rs/webcore 0.0.46 → 0.0.48

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -146,7 +146,9 @@ export class JSONEvalCore {
146
146
  async evaluateDependents({ changedPaths, data, context, reEvaluate = false }) {
147
147
  await this.init();
148
148
  try {
149
- return this._instance.evaluateDependentsJS(JSON.stringify(changedPaths), data ? JSON.stringify(data) : null, context ? JSON.stringify(context) : null, reEvaluate);
149
+ // Ensure paths is an array for WASM
150
+ const paths = Array.isArray(changedPaths) ? changedPaths : [changedPaths];
151
+ return this._instance.evaluateDependentsJS(JSON.stringify(paths), data ? JSON.stringify(data) : null, context ? JSON.stringify(context) : null, reEvaluate);
150
152
  }
151
153
  catch (error) {
152
154
  throw new Error(`Dependent evaluation failed: ${error.message || error}`);
@@ -398,8 +400,7 @@ export class JSONEvalCore {
398
400
  await this.init();
399
401
  // For backward compatibility, accept single changedPath too (though types say array)
400
402
  const paths = Array.isArray(changedPaths) ? changedPaths : [changedPaths];
401
- return this._instance.evaluateDependentsSubformJS(subformPath, paths[0], // WASM still expects single path (wraps internally)
402
- data ? JSON.stringify(data) : null, context ? JSON.stringify(context) : null);
403
+ return this._instance.evaluateDependentsSubformJS(subformPath, JSON.stringify(paths), data ? JSON.stringify(data) : null, context ? JSON.stringify(context) : null);
403
404
  }
404
405
  /**
405
406
  * Resolve layout for subform
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@json-eval-rs/webcore",
3
- "version": "0.0.46",
3
+ "version": "0.0.48",
4
4
  "description": "JSON Eval RS core JavaScript wrapper (internal package - not published)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",