@kitedb/core 0.2.6 → 0.2.7
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/README.md +3 -3
- package/dist/index.d.ts +21 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +145 -49
- package/dist/index.js.map +1 -1
- package/dist/schema.d.ts +2 -2
- package/dist/schema.js +2 -2
- package/index.d.ts +114 -47
- package/index.js +120 -115
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package ships prebuilt binaries for major platforms. If a prebuild isn't av
|
|
|
21
21
|
The fluent API provides a high-level, type-safe interface for schema-driven workflows:
|
|
22
22
|
|
|
23
23
|
```ts
|
|
24
|
-
import {
|
|
24
|
+
import { kite, node, edge, prop, optional } from 'kitedb'
|
|
25
25
|
|
|
26
26
|
// Define your schema
|
|
27
27
|
const User = node('user', {
|
|
@@ -38,7 +38,7 @@ const Knows = edge('knows', {
|
|
|
38
38
|
})
|
|
39
39
|
|
|
40
40
|
// Open database (async)
|
|
41
|
-
const db = await
|
|
41
|
+
const db = await kite('./social.kitedb', {
|
|
42
42
|
nodes: [User],
|
|
43
43
|
edges: [Knows],
|
|
44
44
|
})
|
|
@@ -163,7 +163,7 @@ This is implemented using a read-write lock (RwLock) internally, providing good
|
|
|
163
163
|
|
|
164
164
|
## API surface
|
|
165
165
|
|
|
166
|
-
The Node bindings expose both low-level graph primitives (`Database`) and higher-level APIs (
|
|
166
|
+
The Node bindings expose both low-level graph primitives (`Database`) and higher-level APIs (Kite) for schema-driven workflows, plus metrics, backups, traversal, and vector search. For full API details and guides, see the docs:
|
|
167
167
|
|
|
168
168
|
https://kitedb.vercel.com/docs
|
|
169
169
|
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @example
|
|
5
5
|
* ```typescript
|
|
6
|
-
* import {
|
|
6
|
+
* import { kite, defineNode, defineEdge, prop, optional } from 'kitedb-core'
|
|
7
7
|
*
|
|
8
8
|
* // Define schema
|
|
9
9
|
* const User = defineNode('user', {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* })
|
|
20
20
|
*
|
|
21
21
|
* // Open database
|
|
22
|
-
* const db = await
|
|
22
|
+
* const db = await kite('./my.kitedb', {
|
|
23
23
|
* nodes: [User],
|
|
24
24
|
* edges: [knows],
|
|
25
25
|
* })
|
|
@@ -35,15 +35,20 @@
|
|
|
35
35
|
*/
|
|
36
36
|
export { node, edge, prop, optional, withDefault, defineNode, defineEdge } from './schema';
|
|
37
37
|
export type { PropType, PropSpec, KeySpec, NodeSpec, NodeConfig, EdgeSpec } from './schema';
|
|
38
|
-
import {
|
|
38
|
+
import { Kite as NativeKite } from '../index';
|
|
39
|
+
import type { JsKiteOptions } from '../index';
|
|
39
40
|
import type { NodeSpec, EdgeSpec } from './schema';
|
|
40
|
-
export
|
|
41
|
-
|
|
41
|
+
export declare class Kite extends NativeKite {
|
|
42
|
+
static open(path: string, options: JsKiteOptions): Kite;
|
|
43
|
+
transaction<T>(fn: (ctx: Kite) => T | Promise<T>): T | Promise<T>;
|
|
44
|
+
batch(operations: Array<any>): any[];
|
|
45
|
+
}
|
|
46
|
+
export { Database, VectorIndex, KiteInsertBuilder, KiteInsertExecutorSingle, KiteInsertExecutorMany, KiteUpdateBuilder, KiteUpdateEdgeBuilder, KiteTraversal, KitePath, KiteUpsertBuilder, KiteUpsertExecutorSingle, KiteUpsertExecutorMany, KiteUpsertByIdBuilder, KiteUpsertEdgeBuilder, } from '../index';
|
|
42
47
|
export { JsTraversalDirection as TraversalDirection, JsDistanceMetric as DistanceMetric, JsAggregation as Aggregation, JsSyncMode as SyncMode, JsCompressionType as CompressionType, PropType as PropValueType, } from '../index';
|
|
43
48
|
export { openDatabase, createBackup, restoreBackup, getBackupInfo, createOfflineBackup, collectMetrics, healthCheck, createVectorIndex, bruteForceSearch, pathConfig, traversalStep, version, } from '../index';
|
|
44
49
|
export type { DbStats, CheckResult, OpenOptions, ExportOptions, ExportResult, ImportOptions, ImportResult, BackupOptions, BackupResult, RestoreOptions, OfflineBackupOptions, StreamOptions, PaginationOptions, NodePage, EdgePage, NodeWithProps, EdgeWithProps, DatabaseMetrics, DataMetrics, CacheMetrics, CacheLayerMetrics, MemoryMetrics, MvccMetrics, MvccStats, HealthCheckResult, HealthCheckEntry, JsTraverseOptions as TraverseOptions, JsTraversalStep as TraversalStep, JsTraversalResult as TraversalResult, JsPathConfig as PathConfig, JsPathResult as PathResult, JsPathEdge as PathEdge, VectorIndexOptions, VectorIndexStats, VectorSearchHit, SimilarOptions, JsIvfConfig as IvfConfig, JsIvfStats as IvfStats, JsPqConfig as PqConfig, JsSearchOptions as SearchOptions, JsSearchResult as SearchResult, JsBruteForceResult as BruteForceResult, CompressionOptions, SingleFileOptimizeOptions, VacuumOptions, JsCacheStats as CacheStats, JsEdge as Edge, JsFullEdge as FullEdge, JsNodeProp as NodeProp, JsPropValue as PropValue, JsEdgeInput as EdgeInput, } from '../index';
|
|
45
|
-
/** Options for opening a
|
|
46
|
-
export interface
|
|
50
|
+
/** Options for opening a Kite database */
|
|
51
|
+
export interface KiteOptions {
|
|
47
52
|
/** Node type definitions */
|
|
48
53
|
nodes: NodeSpec[];
|
|
49
54
|
/** Edge type definitions */
|
|
@@ -56,41 +61,41 @@ export interface RayOptions {
|
|
|
56
61
|
lockFile?: boolean;
|
|
57
62
|
}
|
|
58
63
|
/**
|
|
59
|
-
* Open a
|
|
64
|
+
* Open a Kite database asynchronously.
|
|
60
65
|
*
|
|
61
66
|
* This is the recommended way to open a database as it doesn't block
|
|
62
67
|
* the Node.js event loop during file I/O.
|
|
63
68
|
*
|
|
64
69
|
* @param path - Path to the database file
|
|
65
70
|
* @param options - Database options including schema
|
|
66
|
-
* @returns Promise resolving to a
|
|
71
|
+
* @returns Promise resolving to a Kite database instance
|
|
67
72
|
*
|
|
68
73
|
* @example
|
|
69
74
|
* ```typescript
|
|
70
|
-
* const db = await
|
|
75
|
+
* const db = await kite('./my.kitedb', {
|
|
71
76
|
* nodes: [User, Post],
|
|
72
77
|
* edges: [follows, authored],
|
|
73
78
|
* })
|
|
74
79
|
* ```
|
|
75
80
|
*/
|
|
76
|
-
export declare function
|
|
81
|
+
export declare function kite(path: string, options: KiteOptions): Promise<Kite>;
|
|
77
82
|
/**
|
|
78
|
-
* Open a
|
|
83
|
+
* Open a Kite database synchronously.
|
|
79
84
|
*
|
|
80
85
|
* Use this when you need synchronous initialization (e.g., at module load time).
|
|
81
|
-
* For most cases, prefer the async `
|
|
86
|
+
* For most cases, prefer the async `kite()` function.
|
|
82
87
|
*
|
|
83
88
|
* @param path - Path to the database file
|
|
84
89
|
* @param options - Database options including schema
|
|
85
|
-
* @returns A
|
|
90
|
+
* @returns A Kite database instance
|
|
86
91
|
*
|
|
87
92
|
* @example
|
|
88
93
|
* ```typescript
|
|
89
|
-
* const db =
|
|
94
|
+
* const db = kiteSync('./my.kitedb', {
|
|
90
95
|
* nodes: [User],
|
|
91
96
|
* edges: [knows],
|
|
92
97
|
* })
|
|
93
98
|
* ```
|
|
94
99
|
*/
|
|
95
|
-
export declare function
|
|
100
|
+
export declare function kiteSync(path: string, options: KiteOptions): Kite;
|
|
96
101
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAMH,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC1F,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAO3F,OAAO,
|
|
1
|
+
{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QAAQ,EAAE,CAAA;IACjB,4BAA4B;IAC5B,KAAK,EAAE,QAAQ,EAAE,CAAA;IACjB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,0DAA0D;IAC1D,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AA6DD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAM5E;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAKjE"}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @example
|
|
6
6
|
* ```typescript
|
|
7
|
-
* import {
|
|
7
|
+
* import { kite, defineNode, defineEdge, prop, optional } from 'kitedb-core'
|
|
8
8
|
*
|
|
9
9
|
* // Define schema
|
|
10
10
|
* const User = defineNode('user', {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* })
|
|
21
21
|
*
|
|
22
22
|
* // Open database
|
|
23
|
-
* const db = await
|
|
23
|
+
* const db = await kite('./my.kitedb', {
|
|
24
24
|
* nodes: [User],
|
|
25
25
|
* edges: [knows],
|
|
26
26
|
* })
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
* @packageDocumentation
|
|
36
36
|
*/
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.version = exports.traversalStep = exports.pathConfig = exports.bruteForceSearch = exports.createVectorIndex = exports.healthCheck = exports.collectMetrics = exports.createOfflineBackup = exports.getBackupInfo = exports.restoreBackup = exports.createBackup = exports.openDatabase = exports.PropValueType = exports.CompressionType = exports.SyncMode = exports.Aggregation = exports.DistanceMetric = exports.TraversalDirection = exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
38
|
+
exports.version = exports.traversalStep = exports.pathConfig = exports.bruteForceSearch = exports.createVectorIndex = exports.healthCheck = exports.collectMetrics = exports.createOfflineBackup = exports.getBackupInfo = exports.restoreBackup = exports.createBackup = exports.openDatabase = exports.PropValueType = exports.CompressionType = exports.SyncMode = exports.Aggregation = exports.DistanceMetric = exports.TraversalDirection = exports.KiteUpsertEdgeBuilder = exports.KiteUpsertByIdBuilder = exports.KiteUpsertExecutorMany = exports.KiteUpsertExecutorSingle = exports.KiteUpsertBuilder = exports.KitePath = exports.KiteTraversal = exports.KiteUpdateEdgeBuilder = exports.KiteUpdateBuilder = exports.KiteInsertExecutorMany = exports.KiteInsertExecutorSingle = exports.KiteInsertBuilder = exports.VectorIndex = exports.Database = exports.Kite = exports.defineEdge = exports.defineNode = exports.withDefault = exports.optional = exports.prop = exports.edge = exports.node = void 0;
|
|
39
|
+
exports.kite = kite;
|
|
40
|
+
exports.kiteSync = kiteSync;
|
|
41
41
|
// =============================================================================
|
|
42
42
|
// Schema Builders (clean API)
|
|
43
43
|
// =============================================================================
|
|
@@ -57,42 +57,134 @@ const index_1 = require("../index");
|
|
|
57
57
|
// =============================================================================
|
|
58
58
|
// Clean Type Aliases (no Js prefix)
|
|
59
59
|
// =============================================================================
|
|
60
|
-
//
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
// =============================================================================
|
|
61
|
+
// Kite Wrapper (transactions + batch)
|
|
62
|
+
// =============================================================================
|
|
63
|
+
class Kite extends index_1.Kite {
|
|
64
|
+
static open(path, options) {
|
|
65
|
+
const native = index_1.Kite.open(path, options);
|
|
66
|
+
Object.setPrototypeOf(native, Kite.prototype);
|
|
67
|
+
return native;
|
|
68
|
+
}
|
|
69
|
+
transaction(fn) {
|
|
70
|
+
if (this.hasTransaction()) {
|
|
71
|
+
return fn(this);
|
|
72
|
+
}
|
|
73
|
+
this.begin();
|
|
74
|
+
try {
|
|
75
|
+
const result = fn(this);
|
|
76
|
+
if (result && typeof result.then === 'function') {
|
|
77
|
+
return result.then((value) => {
|
|
78
|
+
this.commit();
|
|
79
|
+
return value;
|
|
80
|
+
}, (err) => {
|
|
81
|
+
this.rollback();
|
|
82
|
+
throw err;
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
this.commit();
|
|
86
|
+
return result;
|
|
87
|
+
}
|
|
88
|
+
catch (err) {
|
|
89
|
+
this.rollback();
|
|
90
|
+
throw err;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
batch(operations) {
|
|
94
|
+
if (operations.length === 0) {
|
|
95
|
+
return [];
|
|
96
|
+
}
|
|
97
|
+
const nativeOps = new Set(['createNode', 'deleteNode', 'link', 'unlink', 'setProp', 'delProp']);
|
|
98
|
+
const isNativeBatch = operations.every((op) => {
|
|
99
|
+
if (!op || typeof op !== 'object') {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
const opName = op.op ?? op.type;
|
|
103
|
+
return typeof opName === 'string' && nativeOps.has(opName);
|
|
104
|
+
});
|
|
105
|
+
if (isNativeBatch) {
|
|
106
|
+
return super.batch(operations);
|
|
107
|
+
}
|
|
108
|
+
const inTransaction = this.hasTransaction();
|
|
109
|
+
if (!inTransaction) {
|
|
110
|
+
this.begin();
|
|
111
|
+
}
|
|
112
|
+
try {
|
|
113
|
+
const results = [];
|
|
114
|
+
for (const op of operations) {
|
|
115
|
+
let value;
|
|
116
|
+
if (typeof op === 'function') {
|
|
117
|
+
value = op(this);
|
|
118
|
+
}
|
|
119
|
+
else if (op && typeof op.returning === 'function') {
|
|
120
|
+
value = op.returning();
|
|
121
|
+
}
|
|
122
|
+
else if (op && typeof op.execute === 'function') {
|
|
123
|
+
value = op.execute();
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
throw new Error('Unsupported batch operation');
|
|
127
|
+
}
|
|
128
|
+
if (value && typeof value.then === 'function') {
|
|
129
|
+
if (!inTransaction) {
|
|
130
|
+
this.rollback();
|
|
131
|
+
}
|
|
132
|
+
throw new Error('Batch operations must be synchronous');
|
|
133
|
+
}
|
|
134
|
+
results.push(value);
|
|
135
|
+
}
|
|
136
|
+
if (!inTransaction) {
|
|
137
|
+
this.commit();
|
|
138
|
+
}
|
|
139
|
+
return results;
|
|
140
|
+
}
|
|
141
|
+
catch (err) {
|
|
142
|
+
if (!inTransaction) {
|
|
143
|
+
this.rollback();
|
|
144
|
+
}
|
|
145
|
+
throw err;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
exports.Kite = Kite;
|
|
63
150
|
// Re-export other classes with clean names
|
|
64
|
-
var
|
|
65
|
-
Object.defineProperty(exports, "Database", { enumerable: true, get: function () { return
|
|
66
|
-
Object.defineProperty(exports, "VectorIndex", { enumerable: true, get: function () { return
|
|
67
|
-
Object.defineProperty(exports, "
|
|
68
|
-
Object.defineProperty(exports, "
|
|
69
|
-
Object.defineProperty(exports, "
|
|
70
|
-
Object.defineProperty(exports, "
|
|
71
|
-
Object.defineProperty(exports, "
|
|
72
|
-
Object.defineProperty(exports, "
|
|
73
|
-
Object.defineProperty(exports, "
|
|
151
|
+
var index_2 = require("../index");
|
|
152
|
+
Object.defineProperty(exports, "Database", { enumerable: true, get: function () { return index_2.Database; } });
|
|
153
|
+
Object.defineProperty(exports, "VectorIndex", { enumerable: true, get: function () { return index_2.VectorIndex; } });
|
|
154
|
+
Object.defineProperty(exports, "KiteInsertBuilder", { enumerable: true, get: function () { return index_2.KiteInsertBuilder; } });
|
|
155
|
+
Object.defineProperty(exports, "KiteInsertExecutorSingle", { enumerable: true, get: function () { return index_2.KiteInsertExecutorSingle; } });
|
|
156
|
+
Object.defineProperty(exports, "KiteInsertExecutorMany", { enumerable: true, get: function () { return index_2.KiteInsertExecutorMany; } });
|
|
157
|
+
Object.defineProperty(exports, "KiteUpdateBuilder", { enumerable: true, get: function () { return index_2.KiteUpdateBuilder; } });
|
|
158
|
+
Object.defineProperty(exports, "KiteUpdateEdgeBuilder", { enumerable: true, get: function () { return index_2.KiteUpdateEdgeBuilder; } });
|
|
159
|
+
Object.defineProperty(exports, "KiteTraversal", { enumerable: true, get: function () { return index_2.KiteTraversal; } });
|
|
160
|
+
Object.defineProperty(exports, "KitePath", { enumerable: true, get: function () { return index_2.KitePath; } });
|
|
161
|
+
Object.defineProperty(exports, "KiteUpsertBuilder", { enumerable: true, get: function () { return index_2.KiteUpsertBuilder; } });
|
|
162
|
+
Object.defineProperty(exports, "KiteUpsertExecutorSingle", { enumerable: true, get: function () { return index_2.KiteUpsertExecutorSingle; } });
|
|
163
|
+
Object.defineProperty(exports, "KiteUpsertExecutorMany", { enumerable: true, get: function () { return index_2.KiteUpsertExecutorMany; } });
|
|
164
|
+
Object.defineProperty(exports, "KiteUpsertByIdBuilder", { enumerable: true, get: function () { return index_2.KiteUpsertByIdBuilder; } });
|
|
165
|
+
Object.defineProperty(exports, "KiteUpsertEdgeBuilder", { enumerable: true, get: function () { return index_2.KiteUpsertEdgeBuilder; } });
|
|
74
166
|
// Re-export enums with clean names
|
|
75
|
-
var
|
|
76
|
-
Object.defineProperty(exports, "TraversalDirection", { enumerable: true, get: function () { return
|
|
77
|
-
Object.defineProperty(exports, "DistanceMetric", { enumerable: true, get: function () { return
|
|
78
|
-
Object.defineProperty(exports, "Aggregation", { enumerable: true, get: function () { return
|
|
79
|
-
Object.defineProperty(exports, "SyncMode", { enumerable: true, get: function () { return
|
|
80
|
-
Object.defineProperty(exports, "CompressionType", { enumerable: true, get: function () { return
|
|
81
|
-
Object.defineProperty(exports, "PropValueType", { enumerable: true, get: function () { return
|
|
167
|
+
var index_3 = require("../index");
|
|
168
|
+
Object.defineProperty(exports, "TraversalDirection", { enumerable: true, get: function () { return index_3.JsTraversalDirection; } });
|
|
169
|
+
Object.defineProperty(exports, "DistanceMetric", { enumerable: true, get: function () { return index_3.JsDistanceMetric; } });
|
|
170
|
+
Object.defineProperty(exports, "Aggregation", { enumerable: true, get: function () { return index_3.JsAggregation; } });
|
|
171
|
+
Object.defineProperty(exports, "SyncMode", { enumerable: true, get: function () { return index_3.JsSyncMode; } });
|
|
172
|
+
Object.defineProperty(exports, "CompressionType", { enumerable: true, get: function () { return index_3.JsCompressionType; } });
|
|
173
|
+
Object.defineProperty(exports, "PropValueType", { enumerable: true, get: function () { return index_3.PropType; } });
|
|
82
174
|
// Re-export utility functions
|
|
83
|
-
var
|
|
84
|
-
Object.defineProperty(exports, "openDatabase", { enumerable: true, get: function () { return
|
|
85
|
-
Object.defineProperty(exports, "createBackup", { enumerable: true, get: function () { return
|
|
86
|
-
Object.defineProperty(exports, "restoreBackup", { enumerable: true, get: function () { return
|
|
87
|
-
Object.defineProperty(exports, "getBackupInfo", { enumerable: true, get: function () { return
|
|
88
|
-
Object.defineProperty(exports, "createOfflineBackup", { enumerable: true, get: function () { return
|
|
89
|
-
Object.defineProperty(exports, "collectMetrics", { enumerable: true, get: function () { return
|
|
90
|
-
Object.defineProperty(exports, "healthCheck", { enumerable: true, get: function () { return
|
|
91
|
-
Object.defineProperty(exports, "createVectorIndex", { enumerable: true, get: function () { return
|
|
92
|
-
Object.defineProperty(exports, "bruteForceSearch", { enumerable: true, get: function () { return
|
|
93
|
-
Object.defineProperty(exports, "pathConfig", { enumerable: true, get: function () { return
|
|
94
|
-
Object.defineProperty(exports, "traversalStep", { enumerable: true, get: function () { return
|
|
95
|
-
Object.defineProperty(exports, "version", { enumerable: true, get: function () { return
|
|
175
|
+
var index_4 = require("../index");
|
|
176
|
+
Object.defineProperty(exports, "openDatabase", { enumerable: true, get: function () { return index_4.openDatabase; } });
|
|
177
|
+
Object.defineProperty(exports, "createBackup", { enumerable: true, get: function () { return index_4.createBackup; } });
|
|
178
|
+
Object.defineProperty(exports, "restoreBackup", { enumerable: true, get: function () { return index_4.restoreBackup; } });
|
|
179
|
+
Object.defineProperty(exports, "getBackupInfo", { enumerable: true, get: function () { return index_4.getBackupInfo; } });
|
|
180
|
+
Object.defineProperty(exports, "createOfflineBackup", { enumerable: true, get: function () { return index_4.createOfflineBackup; } });
|
|
181
|
+
Object.defineProperty(exports, "collectMetrics", { enumerable: true, get: function () { return index_4.collectMetrics; } });
|
|
182
|
+
Object.defineProperty(exports, "healthCheck", { enumerable: true, get: function () { return index_4.healthCheck; } });
|
|
183
|
+
Object.defineProperty(exports, "createVectorIndex", { enumerable: true, get: function () { return index_4.createVectorIndex; } });
|
|
184
|
+
Object.defineProperty(exports, "bruteForceSearch", { enumerable: true, get: function () { return index_4.bruteForceSearch; } });
|
|
185
|
+
Object.defineProperty(exports, "pathConfig", { enumerable: true, get: function () { return index_4.pathConfig; } });
|
|
186
|
+
Object.defineProperty(exports, "traversalStep", { enumerable: true, get: function () { return index_4.traversalStep; } });
|
|
187
|
+
Object.defineProperty(exports, "version", { enumerable: true, get: function () { return index_4.version; } });
|
|
96
188
|
// =============================================================================
|
|
97
189
|
// Type Conversion Helpers
|
|
98
190
|
// =============================================================================
|
|
@@ -143,48 +235,52 @@ function optionsToNative(options) {
|
|
|
143
235
|
// Main Entry Points
|
|
144
236
|
// =============================================================================
|
|
145
237
|
/**
|
|
146
|
-
* Open a
|
|
238
|
+
* Open a Kite database asynchronously.
|
|
147
239
|
*
|
|
148
240
|
* This is the recommended way to open a database as it doesn't block
|
|
149
241
|
* the Node.js event loop during file I/O.
|
|
150
242
|
*
|
|
151
243
|
* @param path - Path to the database file
|
|
152
244
|
* @param options - Database options including schema
|
|
153
|
-
* @returns Promise resolving to a
|
|
245
|
+
* @returns Promise resolving to a Kite database instance
|
|
154
246
|
*
|
|
155
247
|
* @example
|
|
156
248
|
* ```typescript
|
|
157
|
-
* const db = await
|
|
249
|
+
* const db = await kite('./my.kitedb', {
|
|
158
250
|
* nodes: [User, Post],
|
|
159
251
|
* edges: [follows, authored],
|
|
160
252
|
* })
|
|
161
253
|
* ```
|
|
162
254
|
*/
|
|
163
|
-
async function
|
|
255
|
+
async function kite(path, options) {
|
|
164
256
|
const nativeOptions = optionsToNative(options);
|
|
165
257
|
// Cast through unknown because NAPI-RS generates Promise<unknown> for async tasks
|
|
166
|
-
|
|
258
|
+
const native = (await (0, index_1.kite)(path, nativeOptions));
|
|
259
|
+
Object.setPrototypeOf(native, Kite.prototype);
|
|
260
|
+
return native;
|
|
167
261
|
}
|
|
168
262
|
/**
|
|
169
|
-
* Open a
|
|
263
|
+
* Open a Kite database synchronously.
|
|
170
264
|
*
|
|
171
265
|
* Use this when you need synchronous initialization (e.g., at module load time).
|
|
172
|
-
* For most cases, prefer the async `
|
|
266
|
+
* For most cases, prefer the async `kite()` function.
|
|
173
267
|
*
|
|
174
268
|
* @param path - Path to the database file
|
|
175
269
|
* @param options - Database options including schema
|
|
176
|
-
* @returns A
|
|
270
|
+
* @returns A Kite database instance
|
|
177
271
|
*
|
|
178
272
|
* @example
|
|
179
273
|
* ```typescript
|
|
180
|
-
* const db =
|
|
274
|
+
* const db = kiteSync('./my.kitedb', {
|
|
181
275
|
* nodes: [User],
|
|
182
276
|
* edges: [knows],
|
|
183
277
|
* })
|
|
184
278
|
* ```
|
|
185
279
|
*/
|
|
186
|
-
function
|
|
280
|
+
function kiteSync(path, options) {
|
|
187
281
|
const nativeOptions = optionsToNative(options);
|
|
188
|
-
|
|
282
|
+
const native = (0, index_1.kiteSync)(path, nativeOptions);
|
|
283
|
+
Object.setPrototypeOf(native, Kite.prototype);
|
|
284
|
+
return native;
|
|
189
285
|
}
|
|
190
286
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;;;AAyUH,oBAMC;AAoBD,4BAKC;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AA;AACvB,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,OAAoB;IACzD,MAAM,aAAa,GAAG,eAAe,CAAC,OAAO,CAAC,CAAA;IAC9C,MAAM,MAAM,GAAG,IAAA,gBAAc,EAAC,IAAI,EAAE,aAAa,CAAC,CAAA;IAClD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;IAC7C,OAAO,MAAc,CAAA;AACvB,CAAC"}
|
package/dist/schema.d.ts
CHANGED
|
@@ -150,7 +150,7 @@ export interface NodeConfig<K extends string = string> {
|
|
|
150
150
|
*
|
|
151
151
|
* @param name - The node type name (must be unique)
|
|
152
152
|
* @param config - Node configuration with key function and properties
|
|
153
|
-
* @returns A NodeSpec that can be passed to
|
|
153
|
+
* @returns A NodeSpec that can be passed to kite()
|
|
154
154
|
*
|
|
155
155
|
* @example
|
|
156
156
|
* ```typescript
|
|
@@ -188,7 +188,7 @@ export interface EdgeSpec {
|
|
|
188
188
|
*
|
|
189
189
|
* @param name - The edge type name (must be unique)
|
|
190
190
|
* @param props - Optional property definitions
|
|
191
|
-
* @returns An EdgeSpec that can be passed to
|
|
191
|
+
* @returns An EdgeSpec that can be passed to kite()
|
|
192
192
|
*
|
|
193
193
|
* @example
|
|
194
194
|
* ```typescript
|
package/dist/schema.js
CHANGED
|
@@ -109,7 +109,7 @@ function withDefault(spec, value) {
|
|
|
109
109
|
*
|
|
110
110
|
* @param name - The node type name (must be unique)
|
|
111
111
|
* @param config - Node configuration with key function and properties
|
|
112
|
-
* @returns A NodeSpec that can be passed to
|
|
112
|
+
* @returns A NodeSpec that can be passed to kite()
|
|
113
113
|
*
|
|
114
114
|
* @example
|
|
115
115
|
* ```typescript
|
|
@@ -166,7 +166,7 @@ function node(name, config) {
|
|
|
166
166
|
*
|
|
167
167
|
* @param name - The edge type name (must be unique)
|
|
168
168
|
* @param props - Optional property definitions
|
|
169
|
-
* @returns An EdgeSpec that can be passed to
|
|
169
|
+
* @returns An EdgeSpec that can be passed to kite()
|
|
170
170
|
*
|
|
171
171
|
* @example
|
|
172
172
|
* ```typescript
|
package/index.d.ts
CHANGED
|
@@ -22,6 +22,10 @@ export declare class Database {
|
|
|
22
22
|
hasTransaction(): boolean
|
|
23
23
|
/** Create a new node */
|
|
24
24
|
createNode(key?: string | undefined | null): number
|
|
25
|
+
/** Upsert a node by key (create if missing, update props) */
|
|
26
|
+
upsertNode(key: string, props: Array<JsNodeProp>): number
|
|
27
|
+
/** Upsert a node by ID (create if missing, update props) */
|
|
28
|
+
upsertNodeById(nodeId: number, props: Array<JsNodeProp>): number
|
|
25
29
|
/** Delete a node */
|
|
26
30
|
deleteNode(nodeId: number): void
|
|
27
31
|
/** Check if a node exists */
|
|
@@ -38,6 +42,12 @@ export declare class Database {
|
|
|
38
42
|
addEdge(src: number, etype: number, dst: number): void
|
|
39
43
|
/** Add an edge by type name */
|
|
40
44
|
addEdgeByName(src: number, etypeName: string, dst: number): void
|
|
45
|
+
/**
|
|
46
|
+
* Upsert an edge (create if missing, update props)
|
|
47
|
+
*
|
|
48
|
+
* Returns true if the edge was created.
|
|
49
|
+
*/
|
|
50
|
+
upsertEdge(src: number, etype: number, dst: number, props: Array<JsNodeProp>): boolean
|
|
41
51
|
/** Delete an edge */
|
|
42
52
|
deleteEdge(src: number, etype: number, dst: number): void
|
|
43
53
|
/** Check if an edge exists */
|
|
@@ -512,11 +522,11 @@ export declare class JsIvfPqIndex {
|
|
|
512
522
|
}
|
|
513
523
|
|
|
514
524
|
/**
|
|
515
|
-
* High-level
|
|
525
|
+
* High-level Kite database handle for Node.js/Bun.
|
|
516
526
|
*
|
|
517
527
|
* # Thread Safety and Concurrent Access
|
|
518
528
|
*
|
|
519
|
-
*
|
|
529
|
+
* Kite uses an internal RwLock to support concurrent operations:
|
|
520
530
|
*
|
|
521
531
|
* - **Read operations** (get, exists, neighbors, traversals) use a shared read lock,
|
|
522
532
|
* allowing multiple concurrent reads without blocking each other.
|
|
@@ -541,9 +551,9 @@ export declare class JsIvfPqIndex {
|
|
|
541
551
|
* await db.insert("User").key("david").set("name", "David").execute();
|
|
542
552
|
* ```
|
|
543
553
|
*/
|
|
544
|
-
export declare class
|
|
545
|
-
/** Open a
|
|
546
|
-
static open(path: string, options:
|
|
554
|
+
export declare class Kite {
|
|
555
|
+
/** Open a Kite database */
|
|
556
|
+
static open(path: string, options: JsKiteOptions): Kite
|
|
547
557
|
/** Close the database */
|
|
548
558
|
close(): void
|
|
549
559
|
/** Get a node by key (returns node object with props) */
|
|
@@ -563,11 +573,15 @@ export declare class Ray {
|
|
|
563
573
|
/** Delete a node by key */
|
|
564
574
|
deleteByKey(nodeType: string, key: unknown): boolean
|
|
565
575
|
/** Create an insert builder */
|
|
566
|
-
insert(nodeType: string):
|
|
576
|
+
insert(nodeType: string): KiteInsertBuilder
|
|
577
|
+
/** Create an upsert builder */
|
|
578
|
+
upsert(nodeType: string): KiteUpsertBuilder
|
|
567
579
|
/** Create an update builder by node ID */
|
|
568
|
-
updateById(nodeId: number):
|
|
580
|
+
updateById(nodeId: number): KiteUpdateBuilder
|
|
581
|
+
/** Create an upsert builder by node ID */
|
|
582
|
+
upsertById(nodeType: string, nodeId: number): KiteUpsertByIdBuilder
|
|
569
583
|
/** Create an update builder by key */
|
|
570
|
-
updateByKey(nodeType: string, key: unknown):
|
|
584
|
+
updateByKey(nodeType: string, key: unknown): KiteUpdateBuilder
|
|
571
585
|
/** Link two nodes */
|
|
572
586
|
link(src: number, edgeType: string, dst: number, props?: object | undefined | null): void
|
|
573
587
|
/** Unlink two nodes */
|
|
@@ -583,7 +597,9 @@ export declare class Ray {
|
|
|
583
597
|
/** Delete an edge property */
|
|
584
598
|
delEdgeProp(src: number, edgeType: string, dst: number, propName: string): void
|
|
585
599
|
/** Update edge properties with a builder */
|
|
586
|
-
updateEdge(src: number, edgeType: string, dst: number):
|
|
600
|
+
updateEdge(src: number, edgeType: string, dst: number): KiteUpdateEdgeBuilder
|
|
601
|
+
/** Upsert edge properties with a builder */
|
|
602
|
+
upsertEdge(src: number, edgeType: string, dst: number): KiteUpsertEdgeBuilder
|
|
587
603
|
/** List all nodes of a type (returns array of node objects) */
|
|
588
604
|
all(nodeType: string): Array<object>
|
|
589
605
|
/** Count nodes (optionally by type) */
|
|
@@ -606,40 +622,48 @@ export declare class Ray {
|
|
|
606
622
|
describe(): string
|
|
607
623
|
/** Check database integrity */
|
|
608
624
|
check(): CheckResult
|
|
625
|
+
/** Begin a transaction */
|
|
626
|
+
begin(readOnly?: boolean | undefined | null): number
|
|
627
|
+
/** Commit the current transaction */
|
|
628
|
+
commit(): void
|
|
629
|
+
/** Rollback the current transaction */
|
|
630
|
+
rollback(): void
|
|
631
|
+
/** Check if there's an active transaction */
|
|
632
|
+
hasTransaction(): boolean
|
|
609
633
|
/** Execute a batch of operations atomically */
|
|
610
634
|
batch(ops: Array<object>): Array<object>
|
|
611
635
|
/** Begin a traversal from a node ID */
|
|
612
|
-
from(nodeId: number):
|
|
636
|
+
from(nodeId: number): KiteTraversal
|
|
613
637
|
/** Begin a traversal from multiple nodes */
|
|
614
|
-
fromNodes(nodeIds: Array<number>):
|
|
638
|
+
fromNodes(nodeIds: Array<number>): KiteTraversal
|
|
615
639
|
/** Begin a path finding query */
|
|
616
|
-
path(source: number, target: number):
|
|
640
|
+
path(source: number, target: number): KitePath
|
|
617
641
|
/** Begin a path finding query to multiple targets */
|
|
618
|
-
pathToAny(source: number, targets: Array<number>):
|
|
642
|
+
pathToAny(source: number, targets: Array<number>): KitePath
|
|
619
643
|
}
|
|
620
644
|
|
|
621
|
-
export declare class
|
|
645
|
+
export declare class KiteInsertBuilder {
|
|
622
646
|
/** Specify values for a single insert */
|
|
623
|
-
values(key: unknown, props?: object | undefined | null):
|
|
647
|
+
values(key: unknown, props?: object | undefined | null): KiteInsertExecutorSingle
|
|
624
648
|
/** Specify values for multiple inserts */
|
|
625
|
-
valuesMany(entries: Array<unknown>):
|
|
649
|
+
valuesMany(entries: Array<unknown>): KiteInsertExecutorMany
|
|
626
650
|
}
|
|
627
651
|
|
|
628
|
-
export declare class
|
|
652
|
+
export declare class KiteInsertExecutorMany {
|
|
629
653
|
/** Execute the inserts without returning */
|
|
630
654
|
execute(): void
|
|
631
655
|
/** Execute the inserts and return nodes */
|
|
632
656
|
returning(): Array<object>
|
|
633
657
|
}
|
|
634
658
|
|
|
635
|
-
export declare class
|
|
659
|
+
export declare class KiteInsertExecutorSingle {
|
|
636
660
|
/** Execute the insert without returning */
|
|
637
661
|
execute(): void
|
|
638
662
|
/** Execute the insert and return the node */
|
|
639
663
|
returning(): object
|
|
640
664
|
}
|
|
641
665
|
|
|
642
|
-
export declare class
|
|
666
|
+
export declare class KitePath {
|
|
643
667
|
via(edgeType: string): void
|
|
644
668
|
maxDepth(depth: number): void
|
|
645
669
|
direction(direction: string): void
|
|
@@ -649,21 +673,21 @@ export declare class RayPath {
|
|
|
649
673
|
findKShortest(k: number): Array<JsPathResult>
|
|
650
674
|
}
|
|
651
675
|
|
|
652
|
-
export declare class
|
|
653
|
-
whereEdge(func: unknown):
|
|
654
|
-
whereNode(func: unknown):
|
|
655
|
-
out(edgeType?: string | undefined | null):
|
|
656
|
-
in(edgeType?: string | undefined | null):
|
|
657
|
-
both(edgeType?: string | undefined | null):
|
|
658
|
-
traverse(edgeType: string | undefined | null, options: JsTraverseOptions):
|
|
659
|
-
take(limit: number):
|
|
660
|
-
select(props: Array<string>):
|
|
676
|
+
export declare class KiteTraversal {
|
|
677
|
+
whereEdge(func: unknown): KiteTraversal
|
|
678
|
+
whereNode(func: unknown): KiteTraversal
|
|
679
|
+
out(edgeType?: string | undefined | null): KiteTraversal
|
|
680
|
+
in(edgeType?: string | undefined | null): KiteTraversal
|
|
681
|
+
both(edgeType?: string | undefined | null): KiteTraversal
|
|
682
|
+
traverse(edgeType: string | undefined | null, options: JsTraverseOptions): KiteTraversal
|
|
683
|
+
take(limit: number): KiteTraversal
|
|
684
|
+
select(props: Array<string>): KiteTraversal
|
|
661
685
|
nodes(): Array<number>
|
|
662
686
|
edges(): Array<JsFullEdge>
|
|
663
687
|
count(): number
|
|
664
688
|
}
|
|
665
689
|
|
|
666
|
-
export declare class
|
|
690
|
+
export declare class KiteUpdateBuilder {
|
|
667
691
|
/** Set a node property */
|
|
668
692
|
set(propName: string, value: unknown): void
|
|
669
693
|
/** Remove a node property */
|
|
@@ -674,7 +698,7 @@ export declare class RayUpdateBuilder {
|
|
|
674
698
|
execute(): void
|
|
675
699
|
}
|
|
676
700
|
|
|
677
|
-
export declare class
|
|
701
|
+
export declare class KiteUpdateEdgeBuilder {
|
|
678
702
|
/** Set an edge property */
|
|
679
703
|
set(propName: string, value: unknown): void
|
|
680
704
|
/** Remove an edge property */
|
|
@@ -685,6 +709,49 @@ export declare class RayUpdateEdgeBuilder {
|
|
|
685
709
|
execute(): void
|
|
686
710
|
}
|
|
687
711
|
|
|
712
|
+
export declare class KiteUpsertBuilder {
|
|
713
|
+
/** Specify values for a single upsert */
|
|
714
|
+
values(key: unknown, props?: object | undefined | null): KiteUpsertExecutorSingle
|
|
715
|
+
/** Specify values for multiple upserts */
|
|
716
|
+
valuesMany(entries: Array<unknown>): KiteUpsertExecutorMany
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
export declare class KiteUpsertByIdBuilder {
|
|
720
|
+
/** Set a node property */
|
|
721
|
+
set(propName: string, value: unknown): void
|
|
722
|
+
/** Remove a node property */
|
|
723
|
+
unset(propName: string): void
|
|
724
|
+
/** Set multiple properties at once */
|
|
725
|
+
setAll(props: object): void
|
|
726
|
+
/** Execute the upsert */
|
|
727
|
+
execute(): void
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
export declare class KiteUpsertEdgeBuilder {
|
|
731
|
+
/** Set an edge property */
|
|
732
|
+
set(propName: string, value: unknown): void
|
|
733
|
+
/** Remove an edge property */
|
|
734
|
+
unset(propName: string): void
|
|
735
|
+
/** Set multiple edge properties at once */
|
|
736
|
+
setAll(props: object): void
|
|
737
|
+
/** Execute the upsert */
|
|
738
|
+
execute(): void
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
export declare class KiteUpsertExecutorMany {
|
|
742
|
+
/** Execute the upserts without returning */
|
|
743
|
+
execute(): void
|
|
744
|
+
/** Execute the upserts and return nodes */
|
|
745
|
+
returning(): Array<object>
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
export declare class KiteUpsertExecutorSingle {
|
|
749
|
+
/** Execute the upsert without returning */
|
|
750
|
+
execute(): void
|
|
751
|
+
/** Execute the upsert and return the node */
|
|
752
|
+
returning(): object
|
|
753
|
+
}
|
|
754
|
+
|
|
688
755
|
/** High-level vector index for similarity search */
|
|
689
756
|
export declare class VectorIndex {
|
|
690
757
|
/** Create a new vector index */
|
|
@@ -999,6 +1066,14 @@ export interface JsKeySpec {
|
|
|
999
1066
|
separator?: string
|
|
1000
1067
|
}
|
|
1001
1068
|
|
|
1069
|
+
export interface JsKiteOptions {
|
|
1070
|
+
nodes: Array<JsNodeSpec>
|
|
1071
|
+
edges: Array<JsEdgeSpec>
|
|
1072
|
+
readOnly?: boolean
|
|
1073
|
+
createIfMissing?: boolean
|
|
1074
|
+
lockFile?: boolean
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1002
1077
|
/** Node property key-value pair for JS */
|
|
1003
1078
|
export interface JsNodeProp {
|
|
1004
1079
|
keyId: number
|
|
@@ -1089,14 +1164,6 @@ export interface JsPropValue {
|
|
|
1089
1164
|
vectorValue?: Array<number>
|
|
1090
1165
|
}
|
|
1091
1166
|
|
|
1092
|
-
export interface JsRayOptions {
|
|
1093
|
-
nodes: Array<JsNodeSpec>
|
|
1094
|
-
edges: Array<JsEdgeSpec>
|
|
1095
|
-
readOnly?: boolean
|
|
1096
|
-
createIfMissing?: boolean
|
|
1097
|
-
lockFile?: boolean
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
1167
|
/** Options for vector search */
|
|
1101
1168
|
export interface JsSearchOptions {
|
|
1102
1169
|
/** Number of clusters to probe (overrides index default) */
|
|
@@ -1176,6 +1243,15 @@ export interface JsTraverseOptions {
|
|
|
1176
1243
|
unique?: boolean
|
|
1177
1244
|
}
|
|
1178
1245
|
|
|
1246
|
+
/**
|
|
1247
|
+
* Kite entrypoint - async version (recommended)
|
|
1248
|
+
* Opens the database on a background thread to avoid blocking the event loop
|
|
1249
|
+
*/
|
|
1250
|
+
export declare function kite(path: string, options: JsKiteOptions): Promise<unknown>
|
|
1251
|
+
|
|
1252
|
+
/** Kite entrypoint - sync version */
|
|
1253
|
+
export declare function kiteSync(path: string, options: JsKiteOptions): Kite
|
|
1254
|
+
|
|
1179
1255
|
/** Memory metrics */
|
|
1180
1256
|
export interface MemoryMetrics {
|
|
1181
1257
|
deltaEstimateBytes: number
|
|
@@ -1314,15 +1390,6 @@ export declare const enum PropValueTag {
|
|
|
1314
1390
|
VectorF32 = 5
|
|
1315
1391
|
}
|
|
1316
1392
|
|
|
1317
|
-
/**
|
|
1318
|
-
* Ray entrypoint - async version (recommended)
|
|
1319
|
-
* Opens the database on a background thread to avoid blocking the event loop
|
|
1320
|
-
*/
|
|
1321
|
-
export declare function ray(path: string, options: JsRayOptions): Promise<unknown>
|
|
1322
|
-
|
|
1323
|
-
/** Ray entrypoint - sync version (for backwards compatibility) */
|
|
1324
|
-
export declare function raySync(path: string, options: JsRayOptions): Ray
|
|
1325
|
-
|
|
1326
1393
|
/** Restore a backup into a target path */
|
|
1327
1394
|
export declare function restoreBackup(backupPath: string, restorePath: string, options?: RestoreOptions | undefined | null): string
|
|
1328
1395
|
|
package/index.js
CHANGED
|
@@ -75,10 +75,10 @@ function requireNative() {
|
|
|
75
75
|
loadErrors.push(e)
|
|
76
76
|
}
|
|
77
77
|
try {
|
|
78
|
-
const binding = require('kitedb-android-arm64')
|
|
79
|
-
const bindingPackageVersion = require('kitedb-android-arm64/package.json').version
|
|
80
|
-
if (bindingPackageVersion !== '0.2.
|
|
81
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
78
|
+
const binding = require('@kitedb/core-android-arm64')
|
|
79
|
+
const bindingPackageVersion = require('@kitedb/core-android-arm64/package.json').version
|
|
80
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
81
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
82
82
|
}
|
|
83
83
|
return binding
|
|
84
84
|
} catch (e) {
|
|
@@ -91,10 +91,10 @@ function requireNative() {
|
|
|
91
91
|
loadErrors.push(e)
|
|
92
92
|
}
|
|
93
93
|
try {
|
|
94
|
-
const binding = require('kitedb-android-arm-eabi')
|
|
95
|
-
const bindingPackageVersion = require('kitedb-android-arm-eabi/package.json').version
|
|
96
|
-
if (bindingPackageVersion !== '0.2.
|
|
97
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
94
|
+
const binding = require('@kitedb/core-android-arm-eabi')
|
|
95
|
+
const bindingPackageVersion = require('@kitedb/core-android-arm-eabi/package.json').version
|
|
96
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
97
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
98
98
|
}
|
|
99
99
|
return binding
|
|
100
100
|
} catch (e) {
|
|
@@ -112,10 +112,10 @@ function requireNative() {
|
|
|
112
112
|
loadErrors.push(e)
|
|
113
113
|
}
|
|
114
114
|
try {
|
|
115
|
-
const binding = require('kitedb-win32-x64-gnu')
|
|
116
|
-
const bindingPackageVersion = require('kitedb-win32-x64-gnu/package.json').version
|
|
117
|
-
if (bindingPackageVersion !== '0.2.
|
|
118
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
115
|
+
const binding = require('@kitedb/core-win32-x64-gnu')
|
|
116
|
+
const bindingPackageVersion = require('@kitedb/core-win32-x64-gnu/package.json').version
|
|
117
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
118
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
119
119
|
}
|
|
120
120
|
return binding
|
|
121
121
|
} catch (e) {
|
|
@@ -128,10 +128,10 @@ function requireNative() {
|
|
|
128
128
|
loadErrors.push(e)
|
|
129
129
|
}
|
|
130
130
|
try {
|
|
131
|
-
const binding = require('kitedb-win32-x64-msvc')
|
|
132
|
-
const bindingPackageVersion = require('kitedb-win32-x64-msvc/package.json').version
|
|
133
|
-
if (bindingPackageVersion !== '0.2.
|
|
134
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
131
|
+
const binding = require('@kitedb/core-win32-x64-msvc')
|
|
132
|
+
const bindingPackageVersion = require('@kitedb/core-win32-x64-msvc/package.json').version
|
|
133
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
134
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
135
135
|
}
|
|
136
136
|
return binding
|
|
137
137
|
} catch (e) {
|
|
@@ -145,10 +145,10 @@ function requireNative() {
|
|
|
145
145
|
loadErrors.push(e)
|
|
146
146
|
}
|
|
147
147
|
try {
|
|
148
|
-
const binding = require('kitedb-win32-ia32-msvc')
|
|
149
|
-
const bindingPackageVersion = require('kitedb-win32-ia32-msvc/package.json').version
|
|
150
|
-
if (bindingPackageVersion !== '0.2.
|
|
151
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
148
|
+
const binding = require('@kitedb/core-win32-ia32-msvc')
|
|
149
|
+
const bindingPackageVersion = require('@kitedb/core-win32-ia32-msvc/package.json').version
|
|
150
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
151
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
152
152
|
}
|
|
153
153
|
return binding
|
|
154
154
|
} catch (e) {
|
|
@@ -161,10 +161,10 @@ function requireNative() {
|
|
|
161
161
|
loadErrors.push(e)
|
|
162
162
|
}
|
|
163
163
|
try {
|
|
164
|
-
const binding = require('kitedb-win32-arm64-msvc')
|
|
165
|
-
const bindingPackageVersion = require('kitedb-win32-arm64-msvc/package.json').version
|
|
166
|
-
if (bindingPackageVersion !== '0.2.
|
|
167
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
164
|
+
const binding = require('@kitedb/core-win32-arm64-msvc')
|
|
165
|
+
const bindingPackageVersion = require('@kitedb/core-win32-arm64-msvc/package.json').version
|
|
166
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
167
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
168
168
|
}
|
|
169
169
|
return binding
|
|
170
170
|
} catch (e) {
|
|
@@ -180,10 +180,10 @@ function requireNative() {
|
|
|
180
180
|
loadErrors.push(e)
|
|
181
181
|
}
|
|
182
182
|
try {
|
|
183
|
-
const binding = require('kitedb-darwin-universal')
|
|
184
|
-
const bindingPackageVersion = require('kitedb-darwin-universal/package.json').version
|
|
185
|
-
if (bindingPackageVersion !== '0.2.
|
|
186
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
183
|
+
const binding = require('@kitedb/core-darwin-universal')
|
|
184
|
+
const bindingPackageVersion = require('@kitedb/core-darwin-universal/package.json').version
|
|
185
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
186
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
187
187
|
}
|
|
188
188
|
return binding
|
|
189
189
|
} catch (e) {
|
|
@@ -196,10 +196,10 @@ function requireNative() {
|
|
|
196
196
|
loadErrors.push(e)
|
|
197
197
|
}
|
|
198
198
|
try {
|
|
199
|
-
const binding = require('kitedb-darwin-x64')
|
|
200
|
-
const bindingPackageVersion = require('kitedb-darwin-x64/package.json').version
|
|
201
|
-
if (bindingPackageVersion !== '0.2.
|
|
202
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
199
|
+
const binding = require('@kitedb/core-darwin-x64')
|
|
200
|
+
const bindingPackageVersion = require('@kitedb/core-darwin-x64/package.json').version
|
|
201
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
202
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
203
203
|
}
|
|
204
204
|
return binding
|
|
205
205
|
} catch (e) {
|
|
@@ -212,10 +212,10 @@ function requireNative() {
|
|
|
212
212
|
loadErrors.push(e)
|
|
213
213
|
}
|
|
214
214
|
try {
|
|
215
|
-
const binding = require('kitedb-darwin-arm64')
|
|
216
|
-
const bindingPackageVersion = require('kitedb-darwin-arm64/package.json').version
|
|
217
|
-
if (bindingPackageVersion !== '0.2.
|
|
218
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
215
|
+
const binding = require('@kitedb/core-darwin-arm64')
|
|
216
|
+
const bindingPackageVersion = require('@kitedb/core-darwin-arm64/package.json').version
|
|
217
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
218
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
219
219
|
}
|
|
220
220
|
return binding
|
|
221
221
|
} catch (e) {
|
|
@@ -232,10 +232,10 @@ function requireNative() {
|
|
|
232
232
|
loadErrors.push(e)
|
|
233
233
|
}
|
|
234
234
|
try {
|
|
235
|
-
const binding = require('kitedb-freebsd-x64')
|
|
236
|
-
const bindingPackageVersion = require('kitedb-freebsd-x64/package.json').version
|
|
237
|
-
if (bindingPackageVersion !== '0.2.
|
|
238
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
235
|
+
const binding = require('@kitedb/core-freebsd-x64')
|
|
236
|
+
const bindingPackageVersion = require('@kitedb/core-freebsd-x64/package.json').version
|
|
237
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
238
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
239
239
|
}
|
|
240
240
|
return binding
|
|
241
241
|
} catch (e) {
|
|
@@ -248,10 +248,10 @@ function requireNative() {
|
|
|
248
248
|
loadErrors.push(e)
|
|
249
249
|
}
|
|
250
250
|
try {
|
|
251
|
-
const binding = require('kitedb-freebsd-arm64')
|
|
252
|
-
const bindingPackageVersion = require('kitedb-freebsd-arm64/package.json').version
|
|
253
|
-
if (bindingPackageVersion !== '0.2.
|
|
254
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
251
|
+
const binding = require('@kitedb/core-freebsd-arm64')
|
|
252
|
+
const bindingPackageVersion = require('@kitedb/core-freebsd-arm64/package.json').version
|
|
253
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
254
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
255
255
|
}
|
|
256
256
|
return binding
|
|
257
257
|
} catch (e) {
|
|
@@ -269,10 +269,10 @@ function requireNative() {
|
|
|
269
269
|
loadErrors.push(e)
|
|
270
270
|
}
|
|
271
271
|
try {
|
|
272
|
-
const binding = require('kitedb-linux-x64-musl')
|
|
273
|
-
const bindingPackageVersion = require('kitedb-linux-x64-musl/package.json').version
|
|
274
|
-
if (bindingPackageVersion !== '0.2.
|
|
275
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
272
|
+
const binding = require('@kitedb/core-linux-x64-musl')
|
|
273
|
+
const bindingPackageVersion = require('@kitedb/core-linux-x64-musl/package.json').version
|
|
274
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
275
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
276
276
|
}
|
|
277
277
|
return binding
|
|
278
278
|
} catch (e) {
|
|
@@ -285,10 +285,10 @@ function requireNative() {
|
|
|
285
285
|
loadErrors.push(e)
|
|
286
286
|
}
|
|
287
287
|
try {
|
|
288
|
-
const binding = require('kitedb-linux-x64-gnu')
|
|
289
|
-
const bindingPackageVersion = require('kitedb-linux-x64-gnu/package.json').version
|
|
290
|
-
if (bindingPackageVersion !== '0.2.
|
|
291
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
288
|
+
const binding = require('@kitedb/core-linux-x64-gnu')
|
|
289
|
+
const bindingPackageVersion = require('@kitedb/core-linux-x64-gnu/package.json').version
|
|
290
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
291
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
292
292
|
}
|
|
293
293
|
return binding
|
|
294
294
|
} catch (e) {
|
|
@@ -303,10 +303,10 @@ function requireNative() {
|
|
|
303
303
|
loadErrors.push(e)
|
|
304
304
|
}
|
|
305
305
|
try {
|
|
306
|
-
const binding = require('kitedb-linux-arm64-musl')
|
|
307
|
-
const bindingPackageVersion = require('kitedb-linux-arm64-musl/package.json').version
|
|
308
|
-
if (bindingPackageVersion !== '0.2.
|
|
309
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
306
|
+
const binding = require('@kitedb/core-linux-arm64-musl')
|
|
307
|
+
const bindingPackageVersion = require('@kitedb/core-linux-arm64-musl/package.json').version
|
|
308
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
309
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
310
310
|
}
|
|
311
311
|
return binding
|
|
312
312
|
} catch (e) {
|
|
@@ -319,10 +319,10 @@ function requireNative() {
|
|
|
319
319
|
loadErrors.push(e)
|
|
320
320
|
}
|
|
321
321
|
try {
|
|
322
|
-
const binding = require('kitedb-linux-arm64-gnu')
|
|
323
|
-
const bindingPackageVersion = require('kitedb-linux-arm64-gnu/package.json').version
|
|
324
|
-
if (bindingPackageVersion !== '0.2.
|
|
325
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
322
|
+
const binding = require('@kitedb/core-linux-arm64-gnu')
|
|
323
|
+
const bindingPackageVersion = require('@kitedb/core-linux-arm64-gnu/package.json').version
|
|
324
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
325
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
326
326
|
}
|
|
327
327
|
return binding
|
|
328
328
|
} catch (e) {
|
|
@@ -337,10 +337,10 @@ function requireNative() {
|
|
|
337
337
|
loadErrors.push(e)
|
|
338
338
|
}
|
|
339
339
|
try {
|
|
340
|
-
const binding = require('kitedb-linux-arm-musleabihf')
|
|
341
|
-
const bindingPackageVersion = require('kitedb-linux-arm-musleabihf/package.json').version
|
|
342
|
-
if (bindingPackageVersion !== '0.2.
|
|
343
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
340
|
+
const binding = require('@kitedb/core-linux-arm-musleabihf')
|
|
341
|
+
const bindingPackageVersion = require('@kitedb/core-linux-arm-musleabihf/package.json').version
|
|
342
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
343
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
344
344
|
}
|
|
345
345
|
return binding
|
|
346
346
|
} catch (e) {
|
|
@@ -353,10 +353,10 @@ function requireNative() {
|
|
|
353
353
|
loadErrors.push(e)
|
|
354
354
|
}
|
|
355
355
|
try {
|
|
356
|
-
const binding = require('kitedb-linux-arm-gnueabihf')
|
|
357
|
-
const bindingPackageVersion = require('kitedb-linux-arm-gnueabihf/package.json').version
|
|
358
|
-
if (bindingPackageVersion !== '0.2.
|
|
359
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
356
|
+
const binding = require('@kitedb/core-linux-arm-gnueabihf')
|
|
357
|
+
const bindingPackageVersion = require('@kitedb/core-linux-arm-gnueabihf/package.json').version
|
|
358
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
359
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
360
360
|
}
|
|
361
361
|
return binding
|
|
362
362
|
} catch (e) {
|
|
@@ -371,10 +371,10 @@ function requireNative() {
|
|
|
371
371
|
loadErrors.push(e)
|
|
372
372
|
}
|
|
373
373
|
try {
|
|
374
|
-
const binding = require('kitedb-linux-loong64-musl')
|
|
375
|
-
const bindingPackageVersion = require('kitedb-linux-loong64-musl/package.json').version
|
|
376
|
-
if (bindingPackageVersion !== '0.2.
|
|
377
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
374
|
+
const binding = require('@kitedb/core-linux-loong64-musl')
|
|
375
|
+
const bindingPackageVersion = require('@kitedb/core-linux-loong64-musl/package.json').version
|
|
376
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
377
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
378
378
|
}
|
|
379
379
|
return binding
|
|
380
380
|
} catch (e) {
|
|
@@ -387,10 +387,10 @@ function requireNative() {
|
|
|
387
387
|
loadErrors.push(e)
|
|
388
388
|
}
|
|
389
389
|
try {
|
|
390
|
-
const binding = require('kitedb-linux-loong64-gnu')
|
|
391
|
-
const bindingPackageVersion = require('kitedb-linux-loong64-gnu/package.json').version
|
|
392
|
-
if (bindingPackageVersion !== '0.2.
|
|
393
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
390
|
+
const binding = require('@kitedb/core-linux-loong64-gnu')
|
|
391
|
+
const bindingPackageVersion = require('@kitedb/core-linux-loong64-gnu/package.json').version
|
|
392
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
393
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
394
394
|
}
|
|
395
395
|
return binding
|
|
396
396
|
} catch (e) {
|
|
@@ -405,10 +405,10 @@ function requireNative() {
|
|
|
405
405
|
loadErrors.push(e)
|
|
406
406
|
}
|
|
407
407
|
try {
|
|
408
|
-
const binding = require('kitedb-linux-riscv64-musl')
|
|
409
|
-
const bindingPackageVersion = require('kitedb-linux-riscv64-musl/package.json').version
|
|
410
|
-
if (bindingPackageVersion !== '0.2.
|
|
411
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
408
|
+
const binding = require('@kitedb/core-linux-riscv64-musl')
|
|
409
|
+
const bindingPackageVersion = require('@kitedb/core-linux-riscv64-musl/package.json').version
|
|
410
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
411
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
412
412
|
}
|
|
413
413
|
return binding
|
|
414
414
|
} catch (e) {
|
|
@@ -421,10 +421,10 @@ function requireNative() {
|
|
|
421
421
|
loadErrors.push(e)
|
|
422
422
|
}
|
|
423
423
|
try {
|
|
424
|
-
const binding = require('kitedb-linux-riscv64-gnu')
|
|
425
|
-
const bindingPackageVersion = require('kitedb-linux-riscv64-gnu/package.json').version
|
|
426
|
-
if (bindingPackageVersion !== '0.2.
|
|
427
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
424
|
+
const binding = require('@kitedb/core-linux-riscv64-gnu')
|
|
425
|
+
const bindingPackageVersion = require('@kitedb/core-linux-riscv64-gnu/package.json').version
|
|
426
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
427
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
428
428
|
}
|
|
429
429
|
return binding
|
|
430
430
|
} catch (e) {
|
|
@@ -438,10 +438,10 @@ function requireNative() {
|
|
|
438
438
|
loadErrors.push(e)
|
|
439
439
|
}
|
|
440
440
|
try {
|
|
441
|
-
const binding = require('kitedb-linux-ppc64-gnu')
|
|
442
|
-
const bindingPackageVersion = require('kitedb-linux-ppc64-gnu/package.json').version
|
|
443
|
-
if (bindingPackageVersion !== '0.2.
|
|
444
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
441
|
+
const binding = require('@kitedb/core-linux-ppc64-gnu')
|
|
442
|
+
const bindingPackageVersion = require('@kitedb/core-linux-ppc64-gnu/package.json').version
|
|
443
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
444
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
445
445
|
}
|
|
446
446
|
return binding
|
|
447
447
|
} catch (e) {
|
|
@@ -454,10 +454,10 @@ function requireNative() {
|
|
|
454
454
|
loadErrors.push(e)
|
|
455
455
|
}
|
|
456
456
|
try {
|
|
457
|
-
const binding = require('kitedb-linux-s390x-gnu')
|
|
458
|
-
const bindingPackageVersion = require('kitedb-linux-s390x-gnu/package.json').version
|
|
459
|
-
if (bindingPackageVersion !== '0.2.
|
|
460
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
457
|
+
const binding = require('@kitedb/core-linux-s390x-gnu')
|
|
458
|
+
const bindingPackageVersion = require('@kitedb/core-linux-s390x-gnu/package.json').version
|
|
459
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
460
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
461
461
|
}
|
|
462
462
|
return binding
|
|
463
463
|
} catch (e) {
|
|
@@ -474,10 +474,10 @@ function requireNative() {
|
|
|
474
474
|
loadErrors.push(e)
|
|
475
475
|
}
|
|
476
476
|
try {
|
|
477
|
-
const binding = require('kitedb-openharmony-arm64')
|
|
478
|
-
const bindingPackageVersion = require('kitedb-openharmony-arm64/package.json').version
|
|
479
|
-
if (bindingPackageVersion !== '0.2.
|
|
480
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
477
|
+
const binding = require('@kitedb/core-openharmony-arm64')
|
|
478
|
+
const bindingPackageVersion = require('@kitedb/core-openharmony-arm64/package.json').version
|
|
479
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
480
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
481
481
|
}
|
|
482
482
|
return binding
|
|
483
483
|
} catch (e) {
|
|
@@ -490,10 +490,10 @@ function requireNative() {
|
|
|
490
490
|
loadErrors.push(e)
|
|
491
491
|
}
|
|
492
492
|
try {
|
|
493
|
-
const binding = require('kitedb-openharmony-x64')
|
|
494
|
-
const bindingPackageVersion = require('kitedb-openharmony-x64/package.json').version
|
|
495
|
-
if (bindingPackageVersion !== '0.2.
|
|
496
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
493
|
+
const binding = require('@kitedb/core-openharmony-x64')
|
|
494
|
+
const bindingPackageVersion = require('@kitedb/core-openharmony-x64/package.json').version
|
|
495
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
496
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
497
497
|
}
|
|
498
498
|
return binding
|
|
499
499
|
} catch (e) {
|
|
@@ -506,10 +506,10 @@ function requireNative() {
|
|
|
506
506
|
loadErrors.push(e)
|
|
507
507
|
}
|
|
508
508
|
try {
|
|
509
|
-
const binding = require('kitedb-openharmony-arm')
|
|
510
|
-
const bindingPackageVersion = require('kitedb-openharmony-arm/package.json').version
|
|
511
|
-
if (bindingPackageVersion !== '0.2.
|
|
512
|
-
throw new Error(`Native binding package version mismatch, expected 0.2.
|
|
509
|
+
const binding = require('@kitedb/core-openharmony-arm')
|
|
510
|
+
const bindingPackageVersion = require('@kitedb/core-openharmony-arm/package.json').version
|
|
511
|
+
if (bindingPackageVersion !== '0.2.7' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
512
|
+
throw new Error(`Native binding package version mismatch, expected 0.2.7 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
513
513
|
}
|
|
514
514
|
return binding
|
|
515
515
|
} catch (e) {
|
|
@@ -538,7 +538,7 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
|
538
538
|
}
|
|
539
539
|
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
540
540
|
try {
|
|
541
|
-
wasiBinding = require('kitedb-wasm32-wasi')
|
|
541
|
+
wasiBinding = require('@kitedb/core-wasm32-wasi')
|
|
542
542
|
nativeBinding = wasiBinding
|
|
543
543
|
} catch (err) {
|
|
544
544
|
if (process.env.NAPI_RS_FORCE_WASI) {
|
|
@@ -580,14 +580,19 @@ module.exports.Database = nativeBinding.Database
|
|
|
580
580
|
module.exports.JsGraphAccessor = nativeBinding.JsGraphAccessor
|
|
581
581
|
module.exports.JsIvfIndex = nativeBinding.JsIvfIndex
|
|
582
582
|
module.exports.JsIvfPqIndex = nativeBinding.JsIvfPqIndex
|
|
583
|
-
module.exports.
|
|
584
|
-
module.exports.
|
|
585
|
-
module.exports.
|
|
586
|
-
module.exports.
|
|
587
|
-
module.exports.
|
|
588
|
-
module.exports.
|
|
589
|
-
module.exports.
|
|
590
|
-
module.exports.
|
|
583
|
+
module.exports.Kite = nativeBinding.Kite
|
|
584
|
+
module.exports.KiteInsertBuilder = nativeBinding.KiteInsertBuilder
|
|
585
|
+
module.exports.KiteInsertExecutorMany = nativeBinding.KiteInsertExecutorMany
|
|
586
|
+
module.exports.KiteInsertExecutorSingle = nativeBinding.KiteInsertExecutorSingle
|
|
587
|
+
module.exports.KitePath = nativeBinding.KitePath
|
|
588
|
+
module.exports.KiteTraversal = nativeBinding.KiteTraversal
|
|
589
|
+
module.exports.KiteUpdateBuilder = nativeBinding.KiteUpdateBuilder
|
|
590
|
+
module.exports.KiteUpdateEdgeBuilder = nativeBinding.KiteUpdateEdgeBuilder
|
|
591
|
+
module.exports.KiteUpsertBuilder = nativeBinding.KiteUpsertBuilder
|
|
592
|
+
module.exports.KiteUpsertByIdBuilder = nativeBinding.KiteUpsertByIdBuilder
|
|
593
|
+
module.exports.KiteUpsertEdgeBuilder = nativeBinding.KiteUpsertEdgeBuilder
|
|
594
|
+
module.exports.KiteUpsertExecutorMany = nativeBinding.KiteUpsertExecutorMany
|
|
595
|
+
module.exports.KiteUpsertExecutorSingle = nativeBinding.KiteUpsertExecutorSingle
|
|
591
596
|
module.exports.VectorIndex = nativeBinding.VectorIndex
|
|
592
597
|
module.exports.bruteForceSearch = nativeBinding.bruteForceSearch
|
|
593
598
|
module.exports.collectMetrics = nativeBinding.collectMetrics
|
|
@@ -601,13 +606,13 @@ module.exports.JsCompressionType = nativeBinding.JsCompressionType
|
|
|
601
606
|
module.exports.JsDistanceMetric = nativeBinding.JsDistanceMetric
|
|
602
607
|
module.exports.JsSyncMode = nativeBinding.JsSyncMode
|
|
603
608
|
module.exports.JsTraversalDirection = nativeBinding.JsTraversalDirection
|
|
609
|
+
module.exports.kite = nativeBinding.kite
|
|
610
|
+
module.exports.kiteSync = nativeBinding.kiteSync
|
|
604
611
|
module.exports.openDatabase = nativeBinding.openDatabase
|
|
605
612
|
module.exports.pathConfig = nativeBinding.pathConfig
|
|
606
613
|
module.exports.plus100 = nativeBinding.plus100
|
|
607
614
|
module.exports.PropType = nativeBinding.PropType
|
|
608
615
|
module.exports.PropValueTag = nativeBinding.PropValueTag
|
|
609
|
-
module.exports.ray = nativeBinding.ray
|
|
610
|
-
module.exports.raySync = nativeBinding.raySync
|
|
611
616
|
module.exports.restoreBackup = nativeBinding.restoreBackup
|
|
612
617
|
module.exports.traversalStep = nativeBinding.traversalStep
|
|
613
618
|
module.exports.version = nativeBinding.version
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitedb/core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "KiteDB - High-performance embedded graph database with vector search",
|
|
5
5
|
"author": "mask <mask@mask.dev>",
|
|
6
6
|
"homepage": "https://kitedb.vercel.com/",
|
|
@@ -136,9 +136,9 @@
|
|
|
136
136
|
},
|
|
137
137
|
"packageManager": "bun@1.2.4",
|
|
138
138
|
"optionalDependencies": {
|
|
139
|
-
"@kitedb/core-win32-x64-msvc": "0.2.
|
|
140
|
-
"@kitedb/core-darwin-x64": "0.2.
|
|
141
|
-
"@kitedb/core-linux-x64-gnu": "0.2.
|
|
142
|
-
"@kitedb/core-darwin-arm64": "0.2.
|
|
139
|
+
"@kitedb/core-win32-x64-msvc": "0.2.7",
|
|
140
|
+
"@kitedb/core-darwin-x64": "0.2.7",
|
|
141
|
+
"@kitedb/core-linux-x64-gnu": "0.2.7",
|
|
142
|
+
"@kitedb/core-darwin-arm64": "0.2.7"
|
|
143
143
|
}
|
|
144
144
|
}
|