@json-eval-rs/webcore 0.0.34 → 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.
Files changed (3) hide show
  1. package/index.d.ts +2 -0
  2. package/index.js +5 -3
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -201,6 +201,8 @@ export interface EvaluateSubformOptions {
201
201
  data: any;
202
202
  /** Optional context data */
203
203
  context?: any;
204
+ /** Optional array of paths to evaluate */
205
+ paths?: string[];
204
206
  }
205
207
 
206
208
  /**
package/index.js CHANGED
@@ -156,7 +156,7 @@ export class JSONEvalCore {
156
156
  return this._instance.evaluateJS(
157
157
  JSON.stringify(data),
158
158
  context ? JSON.stringify(context) : null,
159
- paths ? JSON.stringify(paths) : null
159
+ paths || null
160
160
  );
161
161
  } catch (error) {
162
162
  throw new Error(`Evaluation failed: ${error.message || error}`);
@@ -535,14 +535,16 @@ export class JSONEvalCore {
535
535
  * @param {string} options.subformPath - Path to the subform (e.g., "#/riders")
536
536
  * @param {object} options.data - Data for the subform
537
537
  * @param {object} [options.context] - Optional context
538
+ * @param {Array<string>} [options.paths] - Optional array of paths to evaluate
538
539
  * @returns {Promise<void>}
539
540
  */
540
- async evaluateSubform({ subformPath, data, context }) {
541
+ async evaluateSubform({ subformPath, data, context, paths }) {
541
542
  await this.init();
542
543
  return this._instance.evaluateSubform(
543
544
  subformPath,
544
545
  JSON.stringify(data),
545
- context ? JSON.stringify(context) : null
546
+ context ? JSON.stringify(context) : null,
547
+ paths || null
546
548
  );
547
549
  }
548
550
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@json-eval-rs/webcore",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "description": "JSON Eval RS core JavaScript wrapper (internal package - not published)",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",