cypherlite 2.0.1 → 2.1.0

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.
Binary file
Binary file
Binary file
Binary file
Binary file
package/lib.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ // Augmented type definitions for CypherLite Node.js bindings.
2
+ // index.d.ts is auto-generated by napi-rs on each build;
3
+ // this file adds the Symbol.iterator type applied at runtime by lib.js.
4
+
5
+ export * from './index.js';
6
+
7
+ declare module './index.js' {
8
+ interface CylResult extends Iterable<Record<string, any>> {
9
+ [Symbol.iterator](): Iterator<Record<string, any>>;
10
+ }
11
+ }
package/lib.js ADDED
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ // Wrapper around the napi-rs auto-generated index.js entry point.
4
+ // index.js is regenerated by `napi build --platform` and cannot be
5
+ // modified directly. This file patches runtime behavior (Symbol.iterator)
6
+ // and serves as the package entry point ("main" in package.json).
7
+ // CJS is required here because index.js is CommonJS.
8
+
9
+ const binding = require('./index.js');
10
+
11
+ // Add Symbol.iterator to CylResult so for...of, spread, and
12
+ // Array.from work on query results.
13
+ binding.CylResult.prototype[Symbol.iterator] = function* () {
14
+ for (let i = 0; i < this.length; i++) {
15
+ yield this.row(i);
16
+ }
17
+ };
18
+
19
+ module.exports = binding;
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "cypherlite",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
4
4
  "description": "Lightweight embedded graph database with Cypher query support",
5
- "main": "index.js",
6
- "types": "index.d.ts",
5
+ "main": "lib.js",
6
+ "types": "lib.d.ts",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "https://github.com/Epsilondelta-ai/CypherLite.git"
@@ -22,6 +22,8 @@
22
22
  "napi-rs"
23
23
  ],
24
24
  "files": [
25
+ "lib.js",
26
+ "lib.d.ts",
25
27
  "index.js",
26
28
  "index.d.ts",
27
29
  "README.md",