@json-eval-rs/webcore 0.0.45 → 0.0.47

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 +7 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -146,7 +146,8 @@ 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
+ return this._instance.evaluateDependentsJS(changedPaths, // Pass array directly
150
+ data ? JSON.stringify(data) : null, context ? JSON.stringify(context) : null, reEvaluate);
150
151
  }
151
152
  catch (error) {
152
153
  throw new Error(`Dependent evaluation failed: ${error.message || error}`);
@@ -193,7 +194,7 @@ export class JSONEvalCore {
193
194
  */
194
195
  async getEvaluatedSchemaByPaths({ paths, skipLayout = false, format = 0 }) {
195
196
  await this.init();
196
- return this._instance.getEvaluatedSchemaByPathsJS(JSON.stringify(paths), skipLayout, format);
197
+ return this._instance.getEvaluatedSchemaByPathsJS(paths, skipLayout, format);
197
198
  }
198
199
  /**
199
200
  * Get a value from the schema using dotted path notation
@@ -208,7 +209,7 @@ export class JSONEvalCore {
208
209
  */
209
210
  async getSchemaByPaths({ paths, format = 0 }) {
210
211
  await this.init();
211
- return this._instance.getSchemaByPathsJS(JSON.stringify(paths), format);
212
+ return this._instance.getSchemaByPathsJS(paths, format);
212
213
  }
213
214
  /**
214
215
  * Reload schema with new data
@@ -398,7 +399,7 @@ export class JSONEvalCore {
398
399
  await this.init();
399
400
  // For backward compatibility, accept single changedPath too (though types say array)
400
401
  const paths = Array.isArray(changedPaths) ? changedPaths : [changedPaths];
401
- return this._instance.evaluateDependentsSubformJS(subformPath, paths[0], // WASM still expects single path (wraps internally)
402
+ return this._instance.evaluateDependentsSubformJS(subformPath, paths, // Pass array directly (WASM now accepts array)
402
403
  data ? JSON.stringify(data) : null, context ? JSON.stringify(context) : null);
403
404
  }
404
405
  /**
@@ -442,7 +443,7 @@ export class JSONEvalCore {
442
443
  */
443
444
  async getEvaluatedSchemaByPathsSubform({ subformPath, schemaPaths, skipLayout = false, format = 0 }) {
444
445
  await this.init();
445
- return this._instance.getEvaluatedSchemaByPathsSubformJS(subformPath, JSON.stringify(schemaPaths), skipLayout, format);
446
+ return this._instance.getEvaluatedSchemaByPathsSubformJS(subformPath, schemaPaths, skipLayout, format);
446
447
  }
447
448
  /**
448
449
  * Get list of available subform paths
@@ -464,7 +465,7 @@ export class JSONEvalCore {
464
465
  */
465
466
  async getSchemaByPathsSubform({ subformPath, schemaPaths, format = 0 }) {
466
467
  await this.init();
467
- return this._instance.getSchemaByPathsSubformJS(subformPath, JSON.stringify(schemaPaths), format);
468
+ return this._instance.getSchemaByPathsSubformJS(subformPath, schemaPaths, format);
468
469
  }
469
470
  /**
470
471
  * Check if a subform exists at the given path
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@json-eval-rs/webcore",
3
- "version": "0.0.45",
3
+ "version": "0.0.47",
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",