@json-eval-rs/webcore 0.0.69 → 0.0.70

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.d.ts CHANGED
@@ -381,6 +381,24 @@ export declare class JSONEvalCore {
381
381
  * @returns New instance
382
382
  */
383
383
  static fromCache(wasmModule: any, cacheKey: string, context?: any, data?: any): JSONEvalCore;
384
+ /**
385
+ * Create a new JSONEval instance from a MessagePack schema
386
+ * Static factory method for convenience
387
+ *
388
+ * @param wasmModule - WASM module
389
+ * @param schemaMsgpack - MessagePack schema (Uint8Array)
390
+ * @param context - Optional context data
391
+ * @param data - Optional initial data
392
+ * @returns New instance
393
+ */
394
+ static fromMsgpack(wasmModule: any, schemaMsgpack: Uint8Array, context?: any, data?: any): JSONEvalCore;
395
+ /**
396
+ * Get the WASM library version
397
+ *
398
+ * @param wasmModule - WASM module
399
+ * @returns Version string
400
+ */
401
+ static version(wasmModule: any): string;
384
402
  /**
385
403
  * Evaluate logic expression without creating an instance
386
404
  *
@@ -458,6 +476,11 @@ export declare class JSONEvalCore {
458
476
  * Get a value from the schema using dotted path notation
459
477
  */
460
478
  getSchemaByPath({ path }: GetSchemaByPathOptions): Promise<any | null>;
479
+ /**
480
+ * Get a value from the schema using dotted path notation
481
+ * Alias for getSchemaByPath to match React Native API
482
+ */
483
+ get(path: string): Promise<any | null>;
461
484
  /**
462
485
  * Get values from the schema using multiple dotted path notations
463
486
  * Returns data in the specified format (skips paths that are not found)
@@ -611,5 +634,9 @@ export declare class JSONEvalCore {
611
634
  * Free WASM resources
612
635
  */
613
636
  free(): void;
637
+ /**
638
+ * Alias for free() to match React Native API
639
+ */
640
+ dispose(): void;
614
641
  }
615
642
  export default JSONEvalCore;
package/dist/index.js CHANGED
@@ -120,6 +120,32 @@ export class JSONEvalCore {
120
120
  fromCache: true,
121
121
  });
122
122
  }
123
+ /**
124
+ * Create a new JSONEval instance from a MessagePack schema
125
+ * Static factory method for convenience
126
+ *
127
+ * @param wasmModule - WASM module
128
+ * @param schemaMsgpack - MessagePack schema (Uint8Array)
129
+ * @param context - Optional context data
130
+ * @param data - Optional initial data
131
+ * @returns New instance
132
+ */
133
+ static fromMsgpack(wasmModule, schemaMsgpack, context, data) {
134
+ return new JSONEvalCore(wasmModule, {
135
+ schema: schemaMsgpack,
136
+ context,
137
+ data,
138
+ });
139
+ }
140
+ /**
141
+ * Get the WASM library version
142
+ *
143
+ * @param wasmModule - WASM module
144
+ * @returns Version string
145
+ */
146
+ static version(wasmModule) {
147
+ return getVersion(wasmModule);
148
+ }
123
149
  /**
124
150
  * Evaluate logic expression without creating an instance
125
151
  *
@@ -282,6 +308,13 @@ export class JSONEvalCore {
282
308
  await this.init();
283
309
  return this._instance.getSchemaByPathJS(path);
284
310
  }
311
+ /**
312
+ * Get a value from the schema using dotted path notation
313
+ * Alias for getSchemaByPath to match React Native API
314
+ */
315
+ async get(path) {
316
+ return this.getSchemaByPath({ path });
317
+ }
285
318
  /**
286
319
  * Get values from the schema using multiple dotted path notations
287
320
  * Returns data in the specified format (skips paths that are not found)
@@ -607,5 +640,11 @@ export class JSONEvalCore {
607
640
  this._ready = false;
608
641
  }
609
642
  }
643
+ /**
644
+ * Alias for free() to match React Native API
645
+ */
646
+ dispose() {
647
+ this.free();
648
+ }
610
649
  }
611
650
  export default JSONEvalCore;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@json-eval-rs/webcore",
3
- "version": "0.0.69",
3
+ "version": "0.0.70",
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",