@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.
- package/dist/index.js +4 -3
- 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
|
-
|
|
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
|
|
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
|