@lancedb/lancedb 0.27.0-beta.1 → 0.27.0-beta.2
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.js +1 -1
- package/dist/native.d.ts +492 -463
- package/dist/native.js +598 -265
- package/dist/query.js +6 -8
- package/package.json +22 -25
package/dist/native.js
CHANGED
|
@@ -1,339 +1,672 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
// prettier-ignore
|
|
3
3
|
/* eslint-disable */
|
|
4
|
-
|
|
4
|
+
// @ts-nocheck
|
|
5
5
|
/* auto-generated by NAPI-RS */
|
|
6
|
-
const {
|
|
7
|
-
const { join } = require('path');
|
|
8
|
-
const { platform, arch } = process;
|
|
6
|
+
const { readFileSync } = require('node:fs');
|
|
9
7
|
let nativeBinding = null;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return readFileSync(lddPath, 'utf8').includes('musl');
|
|
8
|
+
const loadErrors = [];
|
|
9
|
+
const isMusl = () => {
|
|
10
|
+
let musl = false;
|
|
11
|
+
if (process.platform === 'linux') {
|
|
12
|
+
musl = isMuslFromFilesystem();
|
|
13
|
+
if (musl === null) {
|
|
14
|
+
musl = isMuslFromReport();
|
|
18
15
|
}
|
|
19
|
-
|
|
16
|
+
if (musl === null) {
|
|
17
|
+
musl = isMuslFromChildProcess();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return musl;
|
|
21
|
+
};
|
|
22
|
+
const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-');
|
|
23
|
+
const isMuslFromFilesystem = () => {
|
|
24
|
+
try {
|
|
25
|
+
return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl');
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const isMuslFromReport = () => {
|
|
32
|
+
let report = null;
|
|
33
|
+
if (typeof process.report?.getReport === 'function') {
|
|
34
|
+
process.report.excludeNetwork = true;
|
|
35
|
+
report = process.report.getReport();
|
|
36
|
+
}
|
|
37
|
+
if (!report) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
if (report.header && report.header.glibcVersionRuntime) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
if (Array.isArray(report.sharedObjects)) {
|
|
44
|
+
if (report.sharedObjects.some(isFileMusl)) {
|
|
20
45
|
return true;
|
|
21
46
|
}
|
|
22
47
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
48
|
+
return false;
|
|
49
|
+
};
|
|
50
|
+
const isMuslFromChildProcess = () => {
|
|
51
|
+
try {
|
|
52
|
+
return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl');
|
|
26
53
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
54
|
+
catch (e) {
|
|
55
|
+
// If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
function requireNative() {
|
|
60
|
+
if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
|
|
61
|
+
try {
|
|
62
|
+
return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
|
|
63
|
+
}
|
|
64
|
+
catch (err) {
|
|
65
|
+
loadErrors.push(err);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
else if (process.platform === 'android') {
|
|
69
|
+
if (process.arch === 'arm64') {
|
|
70
|
+
try {
|
|
71
|
+
return require('./lancedb.android-arm64.node');
|
|
72
|
+
}
|
|
73
|
+
catch (e) {
|
|
74
|
+
loadErrors.push(e);
|
|
75
|
+
}
|
|
76
|
+
try {
|
|
77
|
+
const binding = require('@lancedb/lancedb-android-arm64');
|
|
78
|
+
const bindingPackageVersion = require('@lancedb/lancedb-android-arm64/package.json').version;
|
|
79
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
80
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
81
|
+
}
|
|
82
|
+
return binding;
|
|
83
|
+
}
|
|
84
|
+
catch (e) {
|
|
85
|
+
loadErrors.push(e);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
else if (process.arch === 'arm') {
|
|
89
|
+
try {
|
|
90
|
+
return require('./lancedb.android-arm-eabi.node');
|
|
91
|
+
}
|
|
92
|
+
catch (e) {
|
|
93
|
+
loadErrors.push(e);
|
|
94
|
+
}
|
|
95
|
+
try {
|
|
96
|
+
const binding = require('@lancedb/lancedb-android-arm-eabi');
|
|
97
|
+
const bindingPackageVersion = require('@lancedb/lancedb-android-arm-eabi/package.json').version;
|
|
98
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
99
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
100
|
+
}
|
|
101
|
+
return binding;
|
|
102
|
+
}
|
|
103
|
+
catch (e) {
|
|
104
|
+
loadErrors.push(e);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
else if (process.platform === 'win32') {
|
|
112
|
+
if (process.arch === 'x64') {
|
|
113
|
+
if (process.config?.variables?.shlib_suffix === 'dll.a' || process.config?.variables?.node_target_type === 'shared_library') {
|
|
33
114
|
try {
|
|
34
|
-
|
|
35
|
-
nativeBinding = require('./lancedb.android-arm64.node');
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
nativeBinding = require('@lancedb/lancedb-android-arm64');
|
|
39
|
-
}
|
|
115
|
+
return require('./lancedb.win32-x64-gnu.node');
|
|
40
116
|
}
|
|
41
117
|
catch (e) {
|
|
42
|
-
|
|
118
|
+
loadErrors.push(e);
|
|
43
119
|
}
|
|
44
|
-
break;
|
|
45
|
-
case 'arm':
|
|
46
|
-
localFileExisted = existsSync(join(__dirname, 'lancedb.android-arm-eabi.node'));
|
|
47
120
|
try {
|
|
48
|
-
|
|
49
|
-
|
|
121
|
+
const binding = require('@lancedb/lancedb-win32-x64-gnu');
|
|
122
|
+
const bindingPackageVersion = require('@lancedb/lancedb-win32-x64-gnu/package.json').version;
|
|
123
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
124
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
50
125
|
}
|
|
51
|
-
|
|
52
|
-
|
|
126
|
+
return binding;
|
|
127
|
+
}
|
|
128
|
+
catch (e) {
|
|
129
|
+
loadErrors.push(e);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
try {
|
|
134
|
+
return require('./lancedb.win32-x64-msvc.node');
|
|
135
|
+
}
|
|
136
|
+
catch (e) {
|
|
137
|
+
loadErrors.push(e);
|
|
138
|
+
}
|
|
139
|
+
try {
|
|
140
|
+
const binding = require('@lancedb/lancedb-win32-x64-msvc');
|
|
141
|
+
const bindingPackageVersion = require('@lancedb/lancedb-win32-x64-msvc/package.json').version;
|
|
142
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
143
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
53
144
|
}
|
|
145
|
+
return binding;
|
|
54
146
|
}
|
|
55
147
|
catch (e) {
|
|
56
|
-
|
|
148
|
+
loadErrors.push(e);
|
|
57
149
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
else if (process.arch === 'ia32') {
|
|
153
|
+
try {
|
|
154
|
+
return require('./lancedb.win32-ia32-msvc.node');
|
|
155
|
+
}
|
|
156
|
+
catch (e) {
|
|
157
|
+
loadErrors.push(e);
|
|
158
|
+
}
|
|
159
|
+
try {
|
|
160
|
+
const binding = require('@lancedb/lancedb-win32-ia32-msvc');
|
|
161
|
+
const bindingPackageVersion = require('@lancedb/lancedb-win32-ia32-msvc/package.json').version;
|
|
162
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
163
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
164
|
+
}
|
|
165
|
+
return binding;
|
|
166
|
+
}
|
|
167
|
+
catch (e) {
|
|
168
|
+
loadErrors.push(e);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
else if (process.arch === 'arm64') {
|
|
172
|
+
try {
|
|
173
|
+
return require('./lancedb.win32-arm64-msvc.node');
|
|
174
|
+
}
|
|
175
|
+
catch (e) {
|
|
176
|
+
loadErrors.push(e);
|
|
177
|
+
}
|
|
178
|
+
try {
|
|
179
|
+
const binding = require('@lancedb/lancedb-win32-arm64-msvc');
|
|
180
|
+
const bindingPackageVersion = require('@lancedb/lancedb-win32-arm64-msvc/package.json').version;
|
|
181
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
182
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
183
|
+
}
|
|
184
|
+
return binding;
|
|
185
|
+
}
|
|
186
|
+
catch (e) {
|
|
187
|
+
loadErrors.push(e);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`));
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
else if (process.platform === 'darwin') {
|
|
195
|
+
try {
|
|
196
|
+
return require('./lancedb.darwin-universal.node');
|
|
61
197
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
198
|
+
catch (e) {
|
|
199
|
+
loadErrors.push(e);
|
|
200
|
+
}
|
|
201
|
+
try {
|
|
202
|
+
const binding = require('@lancedb/lancedb-darwin-universal');
|
|
203
|
+
const bindingPackageVersion = require('@lancedb/lancedb-darwin-universal/package.json').version;
|
|
204
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
205
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
206
|
+
}
|
|
207
|
+
return binding;
|
|
208
|
+
}
|
|
209
|
+
catch (e) {
|
|
210
|
+
loadErrors.push(e);
|
|
211
|
+
}
|
|
212
|
+
if (process.arch === 'x64') {
|
|
213
|
+
try {
|
|
214
|
+
return require('./lancedb.darwin-x64.node');
|
|
215
|
+
}
|
|
216
|
+
catch (e) {
|
|
217
|
+
loadErrors.push(e);
|
|
218
|
+
}
|
|
219
|
+
try {
|
|
220
|
+
const binding = require('@lancedb/lancedb-darwin-x64');
|
|
221
|
+
const bindingPackageVersion = require('@lancedb/lancedb-darwin-x64/package.json').version;
|
|
222
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
223
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
224
|
+
}
|
|
225
|
+
return binding;
|
|
226
|
+
}
|
|
227
|
+
catch (e) {
|
|
228
|
+
loadErrors.push(e);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
else if (process.arch === 'arm64') {
|
|
232
|
+
try {
|
|
233
|
+
return require('./lancedb.darwin-arm64.node');
|
|
234
|
+
}
|
|
235
|
+
catch (e) {
|
|
236
|
+
loadErrors.push(e);
|
|
237
|
+
}
|
|
238
|
+
try {
|
|
239
|
+
const binding = require('@lancedb/lancedb-darwin-arm64');
|
|
240
|
+
const bindingPackageVersion = require('@lancedb/lancedb-darwin-arm64/package.json').version;
|
|
241
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
242
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
243
|
+
}
|
|
244
|
+
return binding;
|
|
245
|
+
}
|
|
246
|
+
catch (e) {
|
|
247
|
+
loadErrors.push(e);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`));
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
else if (process.platform === 'freebsd') {
|
|
255
|
+
if (process.arch === 'x64') {
|
|
256
|
+
try {
|
|
257
|
+
return require('./lancedb.freebsd-x64.node');
|
|
258
|
+
}
|
|
259
|
+
catch (e) {
|
|
260
|
+
loadErrors.push(e);
|
|
261
|
+
}
|
|
262
|
+
try {
|
|
263
|
+
const binding = require('@lancedb/lancedb-freebsd-x64');
|
|
264
|
+
const bindingPackageVersion = require('@lancedb/lancedb-freebsd-x64/package.json').version;
|
|
265
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
266
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
267
|
+
}
|
|
268
|
+
return binding;
|
|
269
|
+
}
|
|
270
|
+
catch (e) {
|
|
271
|
+
loadErrors.push(e);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
else if (process.arch === 'arm64') {
|
|
275
|
+
try {
|
|
276
|
+
return require('./lancedb.freebsd-arm64.node');
|
|
277
|
+
}
|
|
278
|
+
catch (e) {
|
|
279
|
+
loadErrors.push(e);
|
|
280
|
+
}
|
|
281
|
+
try {
|
|
282
|
+
const binding = require('@lancedb/lancedb-freebsd-arm64');
|
|
283
|
+
const bindingPackageVersion = require('@lancedb/lancedb-freebsd-arm64/package.json').version;
|
|
284
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
285
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
286
|
+
}
|
|
287
|
+
return binding;
|
|
288
|
+
}
|
|
289
|
+
catch (e) {
|
|
290
|
+
loadErrors.push(e);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
else if (process.platform === 'linux') {
|
|
298
|
+
if (process.arch === 'x64') {
|
|
299
|
+
if (isMusl()) {
|
|
67
300
|
try {
|
|
68
|
-
|
|
69
|
-
nativeBinding = require('./lancedb.win32-x64-msvc.node');
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
nativeBinding = require('@lancedb/lancedb-win32-x64-msvc');
|
|
73
|
-
}
|
|
301
|
+
return require('./lancedb.linux-x64-musl.node');
|
|
74
302
|
}
|
|
75
303
|
catch (e) {
|
|
76
|
-
|
|
304
|
+
loadErrors.push(e);
|
|
77
305
|
}
|
|
78
|
-
break;
|
|
79
|
-
case 'ia32':
|
|
80
|
-
localFileExisted = existsSync(join(__dirname, 'lancedb.win32-ia32-msvc.node'));
|
|
81
306
|
try {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
nativeBinding = require('@lancedb/lancedb-win32-ia32-msvc');
|
|
307
|
+
const binding = require('@lancedb/lancedb-linux-x64-musl');
|
|
308
|
+
const bindingPackageVersion = require('@lancedb/lancedb-linux-x64-musl/package.json').version;
|
|
309
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
310
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
87
311
|
}
|
|
312
|
+
return binding;
|
|
88
313
|
}
|
|
89
314
|
catch (e) {
|
|
90
|
-
|
|
315
|
+
loadErrors.push(e);
|
|
91
316
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
localFileExisted = existsSync(join(__dirname, 'lancedb.win32-arm64-msvc.node'));
|
|
317
|
+
}
|
|
318
|
+
else {
|
|
95
319
|
try {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
320
|
+
return require('./lancedb.linux-x64-gnu.node');
|
|
321
|
+
}
|
|
322
|
+
catch (e) {
|
|
323
|
+
loadErrors.push(e);
|
|
324
|
+
}
|
|
325
|
+
try {
|
|
326
|
+
const binding = require('@lancedb/lancedb-linux-x64-gnu');
|
|
327
|
+
const bindingPackageVersion = require('@lancedb/lancedb-linux-x64-gnu/package.json').version;
|
|
328
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
329
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
101
330
|
}
|
|
331
|
+
return binding;
|
|
102
332
|
}
|
|
103
333
|
catch (e) {
|
|
104
|
-
|
|
334
|
+
loadErrors.push(e);
|
|
105
335
|
}
|
|
106
|
-
|
|
107
|
-
default:
|
|
108
|
-
throw new Error(`Unsupported architecture on Windows: ${arch}`);
|
|
336
|
+
}
|
|
109
337
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
338
|
+
else if (process.arch === 'arm64') {
|
|
339
|
+
if (isMusl()) {
|
|
340
|
+
try {
|
|
341
|
+
return require('./lancedb.linux-arm64-musl.node');
|
|
342
|
+
}
|
|
343
|
+
catch (e) {
|
|
344
|
+
loadErrors.push(e);
|
|
345
|
+
}
|
|
346
|
+
try {
|
|
347
|
+
const binding = require('@lancedb/lancedb-linux-arm64-musl');
|
|
348
|
+
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm64-musl/package.json').version;
|
|
349
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
350
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
351
|
+
}
|
|
352
|
+
return binding;
|
|
353
|
+
}
|
|
354
|
+
catch (e) {
|
|
355
|
+
loadErrors.push(e);
|
|
356
|
+
}
|
|
116
357
|
}
|
|
117
358
|
else {
|
|
118
|
-
|
|
359
|
+
try {
|
|
360
|
+
return require('./lancedb.linux-arm64-gnu.node');
|
|
361
|
+
}
|
|
362
|
+
catch (e) {
|
|
363
|
+
loadErrors.push(e);
|
|
364
|
+
}
|
|
365
|
+
try {
|
|
366
|
+
const binding = require('@lancedb/lancedb-linux-arm64-gnu');
|
|
367
|
+
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm64-gnu/package.json').version;
|
|
368
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
369
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
370
|
+
}
|
|
371
|
+
return binding;
|
|
372
|
+
}
|
|
373
|
+
catch (e) {
|
|
374
|
+
loadErrors.push(e);
|
|
375
|
+
}
|
|
119
376
|
}
|
|
120
|
-
break;
|
|
121
377
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
case 'x64':
|
|
125
|
-
localFileExisted = existsSync(join(__dirname, 'lancedb.darwin-x64.node'));
|
|
378
|
+
else if (process.arch === 'arm') {
|
|
379
|
+
if (isMusl()) {
|
|
126
380
|
try {
|
|
127
|
-
|
|
128
|
-
nativeBinding = require('./lancedb.darwin-x64.node');
|
|
129
|
-
}
|
|
130
|
-
else {
|
|
131
|
-
nativeBinding = require('@lancedb/lancedb-darwin-x64');
|
|
132
|
-
}
|
|
381
|
+
return require('./lancedb.linux-arm-musleabihf.node');
|
|
133
382
|
}
|
|
134
383
|
catch (e) {
|
|
135
|
-
|
|
384
|
+
loadErrors.push(e);
|
|
136
385
|
}
|
|
137
|
-
break;
|
|
138
|
-
case 'arm64':
|
|
139
|
-
localFileExisted = existsSync(join(__dirname, 'lancedb.darwin-arm64.node'));
|
|
140
386
|
try {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
nativeBinding = require('@lancedb/lancedb-darwin-arm64');
|
|
387
|
+
const binding = require('@lancedb/lancedb-linux-arm-musleabihf');
|
|
388
|
+
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm-musleabihf/package.json').version;
|
|
389
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
390
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
146
391
|
}
|
|
392
|
+
return binding;
|
|
147
393
|
}
|
|
148
394
|
catch (e) {
|
|
149
|
-
|
|
395
|
+
loadErrors.push(e);
|
|
150
396
|
}
|
|
151
|
-
break;
|
|
152
|
-
default:
|
|
153
|
-
throw new Error(`Unsupported architecture on macOS: ${arch}`);
|
|
154
|
-
}
|
|
155
|
-
break;
|
|
156
|
-
case 'freebsd':
|
|
157
|
-
if (arch !== 'x64') {
|
|
158
|
-
throw new Error(`Unsupported architecture on FreeBSD: ${arch}`);
|
|
159
|
-
}
|
|
160
|
-
localFileExisted = existsSync(join(__dirname, 'lancedb.freebsd-x64.node'));
|
|
161
|
-
try {
|
|
162
|
-
if (localFileExisted) {
|
|
163
|
-
nativeBinding = require('./lancedb.freebsd-x64.node');
|
|
164
397
|
}
|
|
165
398
|
else {
|
|
166
|
-
|
|
399
|
+
try {
|
|
400
|
+
return require('./lancedb.linux-arm-gnueabihf.node');
|
|
401
|
+
}
|
|
402
|
+
catch (e) {
|
|
403
|
+
loadErrors.push(e);
|
|
404
|
+
}
|
|
405
|
+
try {
|
|
406
|
+
const binding = require('@lancedb/lancedb-linux-arm-gnueabihf');
|
|
407
|
+
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm-gnueabihf/package.json').version;
|
|
408
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
409
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
410
|
+
}
|
|
411
|
+
return binding;
|
|
412
|
+
}
|
|
413
|
+
catch (e) {
|
|
414
|
+
loadErrors.push(e);
|
|
415
|
+
}
|
|
167
416
|
}
|
|
168
417
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
case 'linux':
|
|
174
|
-
switch (arch) {
|
|
175
|
-
case 'x64':
|
|
176
|
-
if (isMusl()) {
|
|
177
|
-
localFileExisted = existsSync(join(__dirname, 'lancedb.linux-x64-musl.node'));
|
|
178
|
-
try {
|
|
179
|
-
if (localFileExisted) {
|
|
180
|
-
nativeBinding = require('./lancedb.linux-x64-musl.node');
|
|
181
|
-
}
|
|
182
|
-
else {
|
|
183
|
-
nativeBinding = require('@lancedb/lancedb-linux-x64-musl');
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
catch (e) {
|
|
187
|
-
loadError = e;
|
|
188
|
-
}
|
|
418
|
+
else if (process.arch === 'loong64') {
|
|
419
|
+
if (isMusl()) {
|
|
420
|
+
try {
|
|
421
|
+
return require('./lancedb.linux-loong64-musl.node');
|
|
189
422
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
try {
|
|
193
|
-
if (localFileExisted) {
|
|
194
|
-
nativeBinding = require('./lancedb.linux-x64-gnu.node');
|
|
195
|
-
}
|
|
196
|
-
else {
|
|
197
|
-
nativeBinding = require('@lancedb/lancedb-linux-x64-gnu');
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
catch (e) {
|
|
201
|
-
loadError = e;
|
|
202
|
-
}
|
|
423
|
+
catch (e) {
|
|
424
|
+
loadErrors.push(e);
|
|
203
425
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
if (localFileExisted) {
|
|
210
|
-
nativeBinding = require('./lancedb.linux-arm64-musl.node');
|
|
211
|
-
}
|
|
212
|
-
else {
|
|
213
|
-
nativeBinding = require('@lancedb/lancedb-linux-arm64-musl');
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
catch (e) {
|
|
217
|
-
loadError = e;
|
|
426
|
+
try {
|
|
427
|
+
const binding = require('@lancedb/lancedb-linux-loong64-musl');
|
|
428
|
+
const bindingPackageVersion = require('@lancedb/lancedb-linux-loong64-musl/package.json').version;
|
|
429
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
430
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
218
431
|
}
|
|
432
|
+
return binding;
|
|
219
433
|
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
try {
|
|
223
|
-
if (localFileExisted) {
|
|
224
|
-
nativeBinding = require('./lancedb.linux-arm64-gnu.node');
|
|
225
|
-
}
|
|
226
|
-
else {
|
|
227
|
-
nativeBinding = require('@lancedb/lancedb-linux-arm64-gnu');
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
catch (e) {
|
|
231
|
-
loadError = e;
|
|
232
|
-
}
|
|
434
|
+
catch (e) {
|
|
435
|
+
loadErrors.push(e);
|
|
233
436
|
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
try {
|
|
239
|
-
if (localFileExisted) {
|
|
240
|
-
nativeBinding = require('./lancedb.linux-arm-musleabihf.node');
|
|
241
|
-
}
|
|
242
|
-
else {
|
|
243
|
-
nativeBinding = require('@lancedb/lancedb-linux-arm-musleabihf');
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
catch (e) {
|
|
247
|
-
loadError = e;
|
|
248
|
-
}
|
|
437
|
+
}
|
|
438
|
+
else {
|
|
439
|
+
try {
|
|
440
|
+
return require('./lancedb.linux-loong64-gnu.node');
|
|
249
441
|
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
try {
|
|
253
|
-
if (localFileExisted) {
|
|
254
|
-
nativeBinding = require('./lancedb.linux-arm-gnueabihf.node');
|
|
255
|
-
}
|
|
256
|
-
else {
|
|
257
|
-
nativeBinding = require('@lancedb/lancedb-linux-arm-gnueabihf');
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
catch (e) {
|
|
261
|
-
loadError = e;
|
|
262
|
-
}
|
|
442
|
+
catch (e) {
|
|
443
|
+
loadErrors.push(e);
|
|
263
444
|
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
if (localFileExisted) {
|
|
270
|
-
nativeBinding = require('./lancedb.linux-riscv64-musl.node');
|
|
271
|
-
}
|
|
272
|
-
else {
|
|
273
|
-
nativeBinding = require('@lancedb/lancedb-linux-riscv64-musl');
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
catch (e) {
|
|
277
|
-
loadError = e;
|
|
445
|
+
try {
|
|
446
|
+
const binding = require('@lancedb/lancedb-linux-loong64-gnu');
|
|
447
|
+
const bindingPackageVersion = require('@lancedb/lancedb-linux-loong64-gnu/package.json').version;
|
|
448
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
449
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
278
450
|
}
|
|
451
|
+
return binding;
|
|
279
452
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
453
|
+
catch (e) {
|
|
454
|
+
loadErrors.push(e);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
else if (process.arch === 'riscv64') {
|
|
459
|
+
if (isMusl()) {
|
|
460
|
+
try {
|
|
461
|
+
return require('./lancedb.linux-riscv64-musl.node');
|
|
462
|
+
}
|
|
463
|
+
catch (e) {
|
|
464
|
+
loadErrors.push(e);
|
|
293
465
|
}
|
|
294
|
-
break;
|
|
295
|
-
case 's390x':
|
|
296
|
-
localFileExisted = existsSync(join(__dirname, 'lancedb.linux-s390x-gnu.node'));
|
|
297
466
|
try {
|
|
298
|
-
|
|
299
|
-
|
|
467
|
+
const binding = require('@lancedb/lancedb-linux-riscv64-musl');
|
|
468
|
+
const bindingPackageVersion = require('@lancedb/lancedb-linux-riscv64-musl/package.json').version;
|
|
469
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
470
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
300
471
|
}
|
|
301
|
-
|
|
302
|
-
|
|
472
|
+
return binding;
|
|
473
|
+
}
|
|
474
|
+
catch (e) {
|
|
475
|
+
loadErrors.push(e);
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
else {
|
|
479
|
+
try {
|
|
480
|
+
return require('./lancedb.linux-riscv64-gnu.node');
|
|
481
|
+
}
|
|
482
|
+
catch (e) {
|
|
483
|
+
loadErrors.push(e);
|
|
484
|
+
}
|
|
485
|
+
try {
|
|
486
|
+
const binding = require('@lancedb/lancedb-linux-riscv64-gnu');
|
|
487
|
+
const bindingPackageVersion = require('@lancedb/lancedb-linux-riscv64-gnu/package.json').version;
|
|
488
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
489
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
303
490
|
}
|
|
491
|
+
return binding;
|
|
304
492
|
}
|
|
305
493
|
catch (e) {
|
|
306
|
-
|
|
494
|
+
loadErrors.push(e);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
else if (process.arch === 'ppc64') {
|
|
499
|
+
try {
|
|
500
|
+
return require('./lancedb.linux-ppc64-gnu.node');
|
|
501
|
+
}
|
|
502
|
+
catch (e) {
|
|
503
|
+
loadErrors.push(e);
|
|
504
|
+
}
|
|
505
|
+
try {
|
|
506
|
+
const binding = require('@lancedb/lancedb-linux-ppc64-gnu');
|
|
507
|
+
const bindingPackageVersion = require('@lancedb/lancedb-linux-ppc64-gnu/package.json').version;
|
|
508
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
509
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
510
|
+
}
|
|
511
|
+
return binding;
|
|
512
|
+
}
|
|
513
|
+
catch (e) {
|
|
514
|
+
loadErrors.push(e);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
else if (process.arch === 's390x') {
|
|
518
|
+
try {
|
|
519
|
+
return require('./lancedb.linux-s390x-gnu.node');
|
|
520
|
+
}
|
|
521
|
+
catch (e) {
|
|
522
|
+
loadErrors.push(e);
|
|
523
|
+
}
|
|
524
|
+
try {
|
|
525
|
+
const binding = require('@lancedb/lancedb-linux-s390x-gnu');
|
|
526
|
+
const bindingPackageVersion = require('@lancedb/lancedb-linux-s390x-gnu/package.json').version;
|
|
527
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
528
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
529
|
+
}
|
|
530
|
+
return binding;
|
|
531
|
+
}
|
|
532
|
+
catch (e) {
|
|
533
|
+
loadErrors.push(e);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
else {
|
|
537
|
+
loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`));
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
else if (process.platform === 'openharmony') {
|
|
541
|
+
if (process.arch === 'arm64') {
|
|
542
|
+
try {
|
|
543
|
+
return require('./lancedb.openharmony-arm64.node');
|
|
544
|
+
}
|
|
545
|
+
catch (e) {
|
|
546
|
+
loadErrors.push(e);
|
|
547
|
+
}
|
|
548
|
+
try {
|
|
549
|
+
const binding = require('@lancedb/lancedb-openharmony-arm64');
|
|
550
|
+
const bindingPackageVersion = require('@lancedb/lancedb-openharmony-arm64/package.json').version;
|
|
551
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
552
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
553
|
+
}
|
|
554
|
+
return binding;
|
|
555
|
+
}
|
|
556
|
+
catch (e) {
|
|
557
|
+
loadErrors.push(e);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
else if (process.arch === 'x64') {
|
|
561
|
+
try {
|
|
562
|
+
return require('./lancedb.openharmony-x64.node');
|
|
563
|
+
}
|
|
564
|
+
catch (e) {
|
|
565
|
+
loadErrors.push(e);
|
|
566
|
+
}
|
|
567
|
+
try {
|
|
568
|
+
const binding = require('@lancedb/lancedb-openharmony-x64');
|
|
569
|
+
const bindingPackageVersion = require('@lancedb/lancedb-openharmony-x64/package.json').version;
|
|
570
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
571
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
307
572
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
573
|
+
return binding;
|
|
574
|
+
}
|
|
575
|
+
catch (e) {
|
|
576
|
+
loadErrors.push(e);
|
|
577
|
+
}
|
|
311
578
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
579
|
+
else if (process.arch === 'arm') {
|
|
580
|
+
try {
|
|
581
|
+
return require('./lancedb.openharmony-arm.node');
|
|
582
|
+
}
|
|
583
|
+
catch (e) {
|
|
584
|
+
loadErrors.push(e);
|
|
585
|
+
}
|
|
586
|
+
try {
|
|
587
|
+
const binding = require('@lancedb/lancedb-openharmony-arm');
|
|
588
|
+
const bindingPackageVersion = require('@lancedb/lancedb-openharmony-arm/package.json').version;
|
|
589
|
+
if (bindingPackageVersion !== '0.27.0-beta.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
590
|
+
throw new Error(`Native binding package version mismatch, expected 0.27.0-beta.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
591
|
+
}
|
|
592
|
+
return binding;
|
|
593
|
+
}
|
|
594
|
+
catch (e) {
|
|
595
|
+
loadErrors.push(e);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
else {
|
|
599
|
+
loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`));
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
else {
|
|
603
|
+
loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
nativeBinding = requireNative();
|
|
607
|
+
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
608
|
+
let wasiBinding = null;
|
|
609
|
+
let wasiBindingError = null;
|
|
610
|
+
try {
|
|
611
|
+
wasiBinding = require('./lancedb.wasi.cjs');
|
|
612
|
+
nativeBinding = wasiBinding;
|
|
613
|
+
}
|
|
614
|
+
catch (err) {
|
|
615
|
+
if (process.env.NAPI_RS_FORCE_WASI) {
|
|
616
|
+
wasiBindingError = err;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
620
|
+
try {
|
|
621
|
+
wasiBinding = require('@lancedb/lancedb-wasm32-wasi');
|
|
622
|
+
nativeBinding = wasiBinding;
|
|
623
|
+
}
|
|
624
|
+
catch (err) {
|
|
625
|
+
if (process.env.NAPI_RS_FORCE_WASI) {
|
|
626
|
+
if (!wasiBindingError) {
|
|
627
|
+
wasiBindingError = err;
|
|
628
|
+
}
|
|
629
|
+
else {
|
|
630
|
+
wasiBindingError.cause = err;
|
|
631
|
+
}
|
|
632
|
+
loadErrors.push(err);
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
if (process.env.NAPI_RS_FORCE_WASI === 'error' && !wasiBinding) {
|
|
637
|
+
const error = new Error('WASI binding not found and NAPI_RS_FORCE_WASI is set to error');
|
|
638
|
+
error.cause = wasiBindingError;
|
|
639
|
+
throw error;
|
|
640
|
+
}
|
|
315
641
|
}
|
|
316
642
|
if (!nativeBinding) {
|
|
317
|
-
if (
|
|
318
|
-
throw
|
|
643
|
+
if (loadErrors.length > 0) {
|
|
644
|
+
throw new Error(`Cannot find native binding. ` +
|
|
645
|
+
`npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` +
|
|
646
|
+
'Please try `npm i` again after removing both package-lock.json and node_modules directory.', {
|
|
647
|
+
cause: loadErrors.reduce((err, cur) => {
|
|
648
|
+
cur.cause = err;
|
|
649
|
+
return cur;
|
|
650
|
+
}),
|
|
651
|
+
});
|
|
319
652
|
}
|
|
320
653
|
throw new Error(`Failed to load native binding`);
|
|
321
654
|
}
|
|
322
|
-
|
|
323
|
-
module.exports.Connection = Connection;
|
|
324
|
-
module.exports.
|
|
325
|
-
module.exports.
|
|
326
|
-
module.exports.
|
|
327
|
-
module.exports.NativeMergeInsertBuilder = NativeMergeInsertBuilder;
|
|
328
|
-
module.exports.PermutationBuilder = PermutationBuilder;
|
|
329
|
-
module.exports.
|
|
330
|
-
module.exports.
|
|
331
|
-
module.exports.
|
|
332
|
-
module.exports.
|
|
333
|
-
module.exports.
|
|
334
|
-
module.exports.
|
|
335
|
-
module.exports.
|
|
336
|
-
module.exports.
|
|
337
|
-
module.exports.
|
|
338
|
-
module.exports.
|
|
339
|
-
module.exports.
|
|
655
|
+
module.exports = nativeBinding;
|
|
656
|
+
module.exports.Connection = nativeBinding.Connection;
|
|
657
|
+
module.exports.Index = nativeBinding.Index;
|
|
658
|
+
module.exports.JsFullTextQuery = nativeBinding.JsFullTextQuery;
|
|
659
|
+
module.exports.JsHeaderProvider = nativeBinding.JsHeaderProvider;
|
|
660
|
+
module.exports.NativeMergeInsertBuilder = nativeBinding.NativeMergeInsertBuilder;
|
|
661
|
+
module.exports.PermutationBuilder = nativeBinding.PermutationBuilder;
|
|
662
|
+
module.exports.Query = nativeBinding.Query;
|
|
663
|
+
module.exports.RecordBatchIterator = nativeBinding.RecordBatchIterator;
|
|
664
|
+
module.exports.RrfReranker = nativeBinding.RrfReranker;
|
|
665
|
+
module.exports.RRFReranker = nativeBinding.RRFReranker;
|
|
666
|
+
module.exports.Session = nativeBinding.Session;
|
|
667
|
+
module.exports.Table = nativeBinding.Table;
|
|
668
|
+
module.exports.TagContents = nativeBinding.TagContents;
|
|
669
|
+
module.exports.Tags = nativeBinding.Tags;
|
|
670
|
+
module.exports.TakeQuery = nativeBinding.TakeQuery;
|
|
671
|
+
module.exports.VectorQuery = nativeBinding.VectorQuery;
|
|
672
|
+
module.exports.permutationBuilder = nativeBinding.permutationBuilder;
|