@bridgerust/embex 0.1.6 → 0.1.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bridgerust/embex",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Embex Vector Database ORM Node.js Bindings",
5
5
  "homepage": "https://github.com/bridgerust/bridgerust/embex",
6
6
  "repository": {
@@ -52,8 +52,7 @@
52
52
  "test": "vitest run",
53
53
  "test:unit": "vitest run tests/unit",
54
54
  "test:integration": "vitest run tests/integration",
55
- "test:watch": "vitest watch",
56
- "prepublishOnly": "napi prepublish -t npm"
55
+ "test:watch": "vitest watch"
57
56
  },
58
57
  "devDependencies": {
59
58
  "@napi-rs/cli": "^3.5.0",
@@ -61,11 +60,11 @@
61
60
  "@types/node": "^25.0.3"
62
61
  },
63
62
  "optionalDependencies": {
64
- "@bridgerust/embex-darwin-arm64": "0.1.6",
65
- "@bridgerust/embex-darwin-x64": "0.1.6",
66
- "@bridgerust/embex-linux-x64-musl": "0.1.6",
67
- "@bridgerust/embex-linux-arm64-musl": "0.1.6",
68
- "@bridgerust/embex-win32-ia32-msvc": "0.1.6",
69
- "@bridgerust/embex-linux-arm-gnueabihf": "0.1.6"
63
+ "@bridgerust/embex-darwin-arm64": "0.1.8",
64
+ "@bridgerust/embex-darwin-x64": "0.1.8",
65
+ "@bridgerust/embex-linux-x64-musl": "0.1.8",
66
+ "@bridgerust/embex-linux-arm64-musl": "0.1.8",
67
+ "@bridgerust/embex-win32-ia32-msvc": "0.1.8",
68
+ "@bridgerust/embex-linux-arm-gnueabihf": "0.1.8"
70
69
  }
71
- }
70
+ }
package/dist/index.js DELETED
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./src"), exports);
package/dist/src/index.js DELETED
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cli = exports.SearchBuilder = exports.QueryBuilder = exports.EmbexClient = exports.Collection = void 0;
4
- const native_1 = require("../native");
5
- Object.defineProperty(exports, "Collection", { enumerable: true, get: function () { return native_1.Collection; } });
6
- Object.defineProperty(exports, "EmbexClient", { enumerable: true, get: function () { return native_1.EmbexClient; } });
7
- Object.defineProperty(exports, "QueryBuilder", { enumerable: true, get: function () { return native_1.QueryBuilder; } });
8
- Object.defineProperty(exports, "SearchBuilder", { enumerable: true, get: function () { return native_1.SearchBuilder; } });
9
- Object.defineProperty(exports, "cli", { enumerable: true, get: function () { return
10
- // @ts-ignore
11
- native_1.cli; } });
12
- // Monkey patch
13
- native_1.Collection.prototype.insertStream = async function (points, parallel = 5) {
14
- const BATCH_SIZE = 100;
15
- let batch = [];
16
- for await (const point of points) {
17
- batch.push(point);
18
- if (batch.length >= BATCH_SIZE) {
19
- await this.insertBatch(batch, BATCH_SIZE, parallel);
20
- batch = [];
21
- }
22
- }
23
- if (batch.length > 0) {
24
- await this.insertBatch(batch, BATCH_SIZE, parallel);
25
- }
26
- };