@lancedb/lancedb 0.39.0-beta.9 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/connection.d.ts +5 -25
- package/dist/connection.js +1 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -2
- package/dist/materialized_view.d.ts +1 -3
- package/dist/materialized_view.js +4 -10
- package/dist/native.d.ts +2 -119
- package/dist/native.js +52 -53
- package/dist/oauth.d.ts +0 -144
- package/dist/oauth.js +1 -70
- package/dist/table.d.ts +1 -4
- package/dist/table.js +0 -3
- package/package.json +8 -8
package/dist/connection.d.ts
CHANGED
|
@@ -256,19 +256,18 @@ export declare abstract class Connection {
|
|
|
256
256
|
/**
|
|
257
257
|
* Define a materialized view named `name` over the table `source`.
|
|
258
258
|
*
|
|
259
|
-
* The view is
|
|
260
|
-
*
|
|
261
|
-
* it can be queried, indexed and searched, and it appears in
|
|
262
|
-
* The source table must have stable row ids (create it with
|
|
259
|
+
* The view is created empty, with the query recorded in its schema
|
|
260
|
+
* metadata; `view.refresh()` computes the rows. The view is a normal
|
|
261
|
+
* table: it can be queried, indexed and searched, and it appears in
|
|
262
|
+
* `tableNames`. The source table must have stable row ids (create it with
|
|
263
263
|
* the `newTableEnableStableRowIds` storage option); they keep the view's
|
|
264
264
|
* provenance valid across source compactions and cannot be enabled after
|
|
265
|
-
* a table exists.
|
|
265
|
+
* a table exists. Local databases only.
|
|
266
266
|
*/
|
|
267
267
|
abstract createMaterializedView(name: string, source: string, options?: {
|
|
268
268
|
select?: MaterializedViewSelect;
|
|
269
269
|
where?: string;
|
|
270
270
|
limit?: number;
|
|
271
|
-
withNoData?: boolean;
|
|
272
271
|
}): Promise<MaterializedView>;
|
|
273
272
|
/**
|
|
274
273
|
* Open the materialized view named `name`.
|
|
@@ -282,22 +281,6 @@ export declare abstract class Connection {
|
|
|
282
281
|
* Found by reading every table's schema, so this costs an open per table.
|
|
283
282
|
*/
|
|
284
283
|
abstract listMaterializedViews(): Promise<string[]>;
|
|
285
|
-
/**
|
|
286
|
-
* Drop the materialized view named `name`.
|
|
287
|
-
*
|
|
288
|
-
* The view may become unavailable before physical cleanup finishes. Use
|
|
289
|
-
* {@link dropMaterializedViewAsync} to retain and wait for the cleanup job.
|
|
290
|
-
*
|
|
291
|
-
* Rejects a table that exists but is not a materialized view.
|
|
292
|
-
*/
|
|
293
|
-
abstract dropMaterializedView(name: string, namespacePath?: string[]): Promise<void>;
|
|
294
|
-
/**
|
|
295
|
-
* Start dropping the materialized view named `name` and return its cleanup
|
|
296
|
-
* job without waiting for completion.
|
|
297
|
-
*
|
|
298
|
-
* Rejects a table that exists but is not a materialized view.
|
|
299
|
-
*/
|
|
300
|
-
abstract dropMaterializedViewAsync(name: string, namespacePath?: string[]): Promise<Job>;
|
|
301
284
|
abstract openTable(name: string, namespacePath?: string[], options?: Partial<OpenTableOptions>): Promise<Table>;
|
|
302
285
|
/**
|
|
303
286
|
* Creates a new Table and initialize it with new data.
|
|
@@ -477,12 +460,9 @@ export declare class LocalConnection extends Connection {
|
|
|
477
460
|
select?: MaterializedViewSelect;
|
|
478
461
|
where?: string;
|
|
479
462
|
limit?: number;
|
|
480
|
-
withNoData?: boolean;
|
|
481
463
|
}): Promise<MaterializedView>;
|
|
482
464
|
openMaterializedView(name: string): Promise<MaterializedView>;
|
|
483
465
|
listMaterializedViews(): Promise<string[]>;
|
|
484
|
-
dropMaterializedView(name: string, namespacePath?: string[]): Promise<void>;
|
|
485
|
-
dropMaterializedViewAsync(name: string, namespacePath?: string[]): Promise<Job>;
|
|
486
466
|
listTables(namespacePathOrOptions?: string[] | Partial<ListTablesOptions>, options?: Partial<ListTablesOptions>): Promise<ListTablesResponse>;
|
|
487
467
|
openTable(name: string, namespacePath?: string[], options?: Partial<OpenTableOptions>): Promise<Table>;
|
|
488
468
|
cloneTable(targetTableName: string, sourceUri: string, options?: {
|
package/dist/connection.js
CHANGED
|
@@ -71,7 +71,7 @@ class LocalConnection extends Connection {
|
|
|
71
71
|
}
|
|
72
72
|
async createMaterializedView(name, source, options) {
|
|
73
73
|
(0, materialized_view_1.validateNonNegativeInteger)(options?.limit, "limit");
|
|
74
|
-
const innerTable = await this.inner.createMaterializedView(name, source, (0, materialized_view_1.normalizeSelect)(options?.select), options?.where, options?.limit
|
|
74
|
+
const innerTable = await this.inner.createMaterializedView(name, source, (0, materialized_view_1.normalizeSelect)(options?.select), options?.where, options?.limit);
|
|
75
75
|
return new materialized_view_1.MaterializedView(new table_1.LocalTable(innerTable));
|
|
76
76
|
}
|
|
77
77
|
async openMaterializedView(name) {
|
|
@@ -81,12 +81,6 @@ class LocalConnection extends Connection {
|
|
|
81
81
|
async listMaterializedViews() {
|
|
82
82
|
return await this.inner.listMaterializedViews();
|
|
83
83
|
}
|
|
84
|
-
async dropMaterializedView(name, namespacePath) {
|
|
85
|
-
return this.inner.dropMaterializedView(name, namespacePath ?? []);
|
|
86
|
-
}
|
|
87
|
-
async dropMaterializedViewAsync(name, namespacePath) {
|
|
88
|
-
return new job_1.Job(await this.inner.dropMaterializedViewAsync(name, namespacePath ?? []));
|
|
89
|
-
}
|
|
90
84
|
async listTables(namespacePathOrOptions, options) {
|
|
91
85
|
// Detect if first argument is namespacePath array or options object
|
|
92
86
|
const namespacePath = Array.isArray(namespacePathOrOptions)
|
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export { AutoQuery, ExecutableQuery, Query, QueryBase, VectorQuery, TakeQuery, A
|
|
|
17
17
|
export { Index, IndexOptions, IvfPqOptions, IvfRqOptions, IvfFlatOptions, HnswPqOptions, HnswSqOptions, FtsOptions, BaseTokenizer, } from "./indices";
|
|
18
18
|
export { Table, Branches, BranchColumnSummary, BranchColumnChange, BranchIndexSummary, BranchRowCountSummary, CherryPickError, BranchDiff, CherryPickPreview, CherryPickResult, AddDataOptions, UpdateOptions, OptimizeOptions, Version, WriteProgress, FtsToken, TokenizeTableOptions, LsmWriteSpec, LsmStats, BucketStats, GenerationStats, MemtableStats, ColumnAlteration, FieldMetadataUpdate, } from "./table";
|
|
19
19
|
export { HeaderProvider, StaticHeaderProvider, OAuthHeaderProvider, TokenResponse, } from "./header";
|
|
20
|
-
export { OAuthConfig, OAuthFlowType
|
|
20
|
+
export { OAuthConfig, OAuthFlowType } from "./oauth";
|
|
21
21
|
export { MergeInsertBuilder, WriteExecutionOptions } from "./merge";
|
|
22
22
|
export * as embedding from "./embedding";
|
|
23
23
|
export { permutationBuilder, PermutationBuilder } from "./permutation";
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright The LanceDB Authors
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.packBits = exports.rerankers = exports.Scannable = exports.PermutationBuilder = exports.permutationBuilder = exports.embedding = exports.MergeInsertBuilder = exports.
|
|
5
|
+
exports.packBits = exports.rerankers = exports.Scannable = exports.PermutationBuilder = exports.permutationBuilder = exports.embedding = exports.MergeInsertBuilder = exports.OAuthFlowType = exports.OAuthHeaderProvider = exports.StaticHeaderProvider = exports.HeaderProvider = exports.Branches = exports.Table = exports.Index = exports.Occur = exports.Operator = exports.FullTextQueryType = exports.BooleanQuery = exports.MultiMatchQuery = exports.BoostQuery = exports.PhraseQuery = exports.MatchQuery = exports.RecordBatchIterator = exports.TakeQuery = exports.VectorQuery = exports.QueryBase = exports.Query = exports.AutoQuery = exports.Job = exports.Session = exports.Connection = exports.BlobFile = exports.isBlobField = exports.blob = exports.VectorColumnOptions = exports.MakeArrowTableOptions = exports.makeArrowTable = exports.BranchContents = exports.TagContents = exports.Tags = exports.instrumentLanceDbMetrics = exports.NativeJsHeaderProvider = exports.MaterializedView = void 0;
|
|
6
6
|
exports.tokenize = tokenize;
|
|
7
7
|
exports.connect = connect;
|
|
8
8
|
exports.connectNamespace = connectNamespace;
|
|
@@ -62,7 +62,6 @@ Object.defineProperty(exports, "StaticHeaderProvider", { enumerable: true, get:
|
|
|
62
62
|
Object.defineProperty(exports, "OAuthHeaderProvider", { enumerable: true, get: function () { return header_1.OAuthHeaderProvider; } });
|
|
63
63
|
var oauth_1 = require("./oauth");
|
|
64
64
|
Object.defineProperty(exports, "OAuthFlowType", { enumerable: true, get: function () { return oauth_1.OAuthFlowType; } });
|
|
65
|
-
Object.defineProperty(exports, "OAuthSession", { enumerable: true, get: function () { return oauth_1.OAuthSession; } });
|
|
66
65
|
var merge_1 = require("./merge");
|
|
67
66
|
Object.defineProperty(exports, "MergeInsertBuilder", { enumerable: true, get: function () { return merge_1.MergeInsertBuilder; } });
|
|
68
67
|
exports.embedding = require("./embedding");
|
|
@@ -36,8 +36,6 @@ export declare function validateNonNegativeInteger(value: number | undefined, na
|
|
|
36
36
|
export declare function normalizeSelect(select?: MaterializedViewSelect): [string, string][] | undefined;
|
|
37
37
|
/** @internal Parse a definition off a table's stored schema metadata. */
|
|
38
38
|
export declare function definitionFromMetadata(metadata: Map<string, string>, name: string): MaterializedViewDefinition;
|
|
39
|
-
/** @internal Parse the backend-independent definition returned by native code. */
|
|
40
|
-
export declare function definitionFromJson(raw: string, name: string): MaterializedViewDefinition;
|
|
41
39
|
/**
|
|
42
40
|
* A handle on a materialized view: its table plus its definition.
|
|
43
41
|
*
|
|
@@ -52,7 +50,7 @@ export declare class MaterializedView {
|
|
|
52
50
|
get name(): string;
|
|
53
51
|
/** The view, as the table it is. */
|
|
54
52
|
table(): Table;
|
|
55
|
-
/** The query that defines the view. */
|
|
53
|
+
/** The query that defines the view, read from its stored schema. */
|
|
56
54
|
definition(): Promise<MaterializedViewDefinition>;
|
|
57
55
|
/**
|
|
58
56
|
* Recompute the view from its source.
|
|
@@ -6,7 +6,6 @@ exports.MaterializedView = exports.DEFINITION_META_KEY = void 0;
|
|
|
6
6
|
exports.validateNonNegativeInteger = validateNonNegativeInteger;
|
|
7
7
|
exports.normalizeSelect = normalizeSelect;
|
|
8
8
|
exports.definitionFromMetadata = definitionFromMetadata;
|
|
9
|
-
exports.definitionFromJson = definitionFromJson;
|
|
10
9
|
/** Schema metadata key holding a materialized view's definition. */
|
|
11
10
|
exports.DEFINITION_META_KEY = "mv.definition";
|
|
12
11
|
/**
|
|
@@ -43,16 +42,10 @@ function definitionFromMetadata(metadata, name) {
|
|
|
43
42
|
if (raw === undefined) {
|
|
44
43
|
throw new Error(`Table '${name}' is not a materialized view`);
|
|
45
44
|
}
|
|
46
|
-
return definitionFromJson(raw, name);
|
|
47
|
-
}
|
|
48
|
-
/** @internal Parse the backend-independent definition returned by native code. */
|
|
49
|
-
function definitionFromJson(raw, name) {
|
|
50
45
|
// biome-ignore lint/suspicious/noExplicitAny: raw JSON
|
|
51
46
|
const value = JSON.parse(raw);
|
|
52
47
|
// "namespaced_select" keeps older readers from resolving the source at root.
|
|
53
|
-
if (value.kind !==
|
|
54
|
-
value.kind !== "select" &&
|
|
55
|
-
value.kind !== "namespaced_select") {
|
|
48
|
+
if (value.kind !== "select" && value.kind !== "namespaced_select") {
|
|
56
49
|
throw new Error(`materialized view '${name}' is defined by '${value.kind}', which this ` +
|
|
57
50
|
"version of lancedb cannot refresh");
|
|
58
51
|
}
|
|
@@ -96,9 +89,10 @@ class MaterializedView {
|
|
|
96
89
|
table() {
|
|
97
90
|
return this.inner;
|
|
98
91
|
}
|
|
99
|
-
/** The query that defines the view. */
|
|
92
|
+
/** The query that defines the view, read from its stored schema. */
|
|
100
93
|
async definition() {
|
|
101
|
-
|
|
94
|
+
const schema = await this.inner.schema();
|
|
95
|
+
return definitionFromMetadata(schema.metadata, this.name);
|
|
102
96
|
}
|
|
103
97
|
/**
|
|
104
98
|
* Recompute the view from its source.
|
package/dist/native.d.ts
CHANGED
|
@@ -42,13 +42,9 @@ export declare class Connection {
|
|
|
42
42
|
*/
|
|
43
43
|
createTable(name: string, buf: Buffer, mode: string, namespacePath?: Array<string> | undefined | null, storageOptions?: Record<string, string> | undefined | null): Promise<Table>
|
|
44
44
|
createEmptyTable(name: string, schemaBuf: Buffer, mode: string, namespacePath?: Array<string> | undefined | null, storageOptions?: Record<string, string> | undefined | null): Promise<Table>
|
|
45
|
-
createMaterializedView(name: string, source: string, projections
|
|
45
|
+
createMaterializedView(name: string, source: string, projections?: Array<Array<string>> | undefined | null, filter?: string | undefined | null, limit?: number | undefined | null): Promise<Table>
|
|
46
46
|
openMaterializedView(name: string): Promise<Table>
|
|
47
47
|
listMaterializedViews(): Promise<Array<string>>
|
|
48
|
-
/** Drop a materialized view. */
|
|
49
|
-
dropMaterializedView(name: string, namespacePath?: Array<string> | undefined | null): Promise<void>
|
|
50
|
-
/** Start dropping a materialized view and return its cleanup job. */
|
|
51
|
-
dropMaterializedViewAsync(name: string, namespacePath?: Array<string> | undefined | null): Promise<Job>
|
|
52
48
|
openTable(name: string, namespacePath?: Array<string> | undefined | null, storageOptions?: Record<string, string> | undefined | null, indexCacheSize?: number | undefined | null): Promise<Table>
|
|
53
49
|
cloneTable(targetTableName: string, sourceUri: string, targetNamespacePath: Array<string> | undefined | null, sourceVersion: number | undefined | null, sourceTag: string | undefined | null, isShallow: boolean): Promise<Table>
|
|
54
50
|
/** Drop table with the name. Or raise an error if the table does not exist. */
|
|
@@ -211,50 +207,6 @@ export declare class NativeMergeInsertBuilder {
|
|
|
211
207
|
execute(buf: Buffer): Promise<MergeResult>
|
|
212
208
|
}
|
|
213
209
|
|
|
214
|
-
/**
|
|
215
|
-
* Explicit OAuth session lifecycle for the persistent token cache: eager
|
|
216
|
-
* `login`, non-secret `status`, and local `logout`.
|
|
217
|
-
*
|
|
218
|
-
* A session is built from the same `OAuthConfig` used to connect (including
|
|
219
|
-
* its `tokenCache` options). A connection created with the same
|
|
220
|
-
* configuration shares the cache, so logging in here prepares tokens for
|
|
221
|
-
* later processes without any database request.
|
|
222
|
-
*/
|
|
223
|
-
export declare class OAuthSession {
|
|
224
|
-
/**
|
|
225
|
-
* Create a session manager for the given OAuth configuration.
|
|
226
|
-
*
|
|
227
|
-
* The configuration must enable `tokenCache` options and use a flow that
|
|
228
|
-
* supports persistent sessions (authorization code or device code).
|
|
229
|
-
*/
|
|
230
|
-
constructor(config: OAuthConfig)
|
|
231
|
-
/**
|
|
232
|
-
* Eagerly run the configured authentication flow and store the session.
|
|
233
|
-
*
|
|
234
|
-
* A successful login always replaces any prior cached session for this
|
|
235
|
-
* identity; if the provider does not issue a refresh token (for example
|
|
236
|
-
* without `offline_access`), the previous record is removed and the
|
|
237
|
-
* status reports `refreshable == false`.
|
|
238
|
-
*/
|
|
239
|
-
login(): Promise<SessionStatus>
|
|
240
|
-
/**
|
|
241
|
-
* Report whether a matching cached session exists, with safe metadata.
|
|
242
|
-
*
|
|
243
|
-
* This never contacts the identity provider and never exposes token
|
|
244
|
-
* values.
|
|
245
|
-
*/
|
|
246
|
-
status(): Promise<SessionStatus>
|
|
247
|
-
/**
|
|
248
|
-
* Remove the matching local cached credential.
|
|
249
|
-
*
|
|
250
|
-
* This only deletes the local cache entry. It does not revoke the
|
|
251
|
-
* refresh token with the provider and does not sign out of a browser
|
|
252
|
-
* SSO session. Repeated calls succeed; `removed` reports whether a
|
|
253
|
-
* credential existed.
|
|
254
|
-
*/
|
|
255
|
-
logout(): Promise<SessionLogout>
|
|
256
|
-
}
|
|
257
|
-
|
|
258
210
|
export declare class PermutationBuilder {
|
|
259
211
|
persist(connection: Connection, tableName: string): PermutationBuilder
|
|
260
212
|
/** Configure random splits */
|
|
@@ -373,7 +325,6 @@ export declare class Table {
|
|
|
373
325
|
refreshColumn(column: string): Promise<RefreshColumnResult>
|
|
374
326
|
refreshColumnAsync(column: string): Promise<Job>
|
|
375
327
|
refreshMaterializedView(full?: boolean | undefined | null, sourceVersion?: number | undefined | null): Promise<RefreshMaterializedViewResult>
|
|
376
|
-
materializedViewDefinition(): Promise<string>
|
|
377
328
|
addColumnsWithSchema(schemaBuf: Buffer): Promise<AddColumnsResult>
|
|
378
329
|
alterColumns(alterations: Array<ColumnAlteration>): Promise<AlterColumnsResult>
|
|
379
330
|
updateFieldMetadata(updates: Array<FieldMetadataUpdate>): Promise<UpdateFieldMetadataResult>
|
|
@@ -1004,19 +955,10 @@ export interface OAuthConfig {
|
|
|
1004
955
|
* or resource is required. For example: `["api://{app_id}/.default"]`
|
|
1005
956
|
*/
|
|
1006
957
|
scopes: Array<string>
|
|
1007
|
-
/**
|
|
1008
|
-
* Authentication flow: "client_credentials", "authorization_code",
|
|
1009
|
-
* "device_code", or "azure_managed_identity"
|
|
1010
|
-
*/
|
|
958
|
+
/** Authentication flow: "client_credentials" or "azure_managed_identity" */
|
|
1011
959
|
flow?: string
|
|
1012
960
|
/** Client secret (required for client_credentials). */
|
|
1013
961
|
clientSecret?: string
|
|
1014
|
-
/** Loopback redirect URI for authorization_code. */
|
|
1015
|
-
redirectUri?: string
|
|
1016
|
-
/** Port for the authorization_code loopback callback server. */
|
|
1017
|
-
callbackPort?: number
|
|
1018
|
-
/** Whether authorization_code uses S256 PKCE (default: true). */
|
|
1019
|
-
usePkce?: boolean
|
|
1020
962
|
/** Client ID for user-assigned managed identity (azure_managed_identity). */
|
|
1021
963
|
managedIdentityClientId?: string
|
|
1022
964
|
/**
|
|
@@ -1025,11 +967,6 @@ export interface OAuthConfig {
|
|
|
1025
967
|
* the TTL, each request refreshes the token.
|
|
1026
968
|
*/
|
|
1027
969
|
refreshBufferSecs?: number
|
|
1028
|
-
/**
|
|
1029
|
-
* Opt in to the persistent token cache so short-lived processes reuse
|
|
1030
|
-
* one session. Only refresh tokens are persisted.
|
|
1031
|
-
*/
|
|
1032
|
-
tokenCache?: TokenCacheOptions
|
|
1033
970
|
}
|
|
1034
971
|
|
|
1035
972
|
export interface OpenTableOptions {
|
|
@@ -1132,37 +1069,6 @@ export interface RetryConfig {
|
|
|
1132
1069
|
statuses?: Array<number>
|
|
1133
1070
|
}
|
|
1134
1071
|
|
|
1135
|
-
/** Result of `OAuthSession.logout()`. */
|
|
1136
|
-
export interface SessionLogout {
|
|
1137
|
-
/**
|
|
1138
|
-
* Whether a cached credential was removed. `false` means no matching
|
|
1139
|
-
* session was cached; logout is idempotent.
|
|
1140
|
-
*/
|
|
1141
|
-
removed: boolean
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
|
-
/**
|
|
1145
|
-
* Safe, non-secret view of a cached OAuth session, returned by
|
|
1146
|
-
* `OAuthSession.status()` and `OAuthSession.login()`.
|
|
1147
|
-
*/
|
|
1148
|
-
export interface SessionStatus {
|
|
1149
|
-
/**
|
|
1150
|
-
* Whether a cached session exists that can obtain tokens without
|
|
1151
|
-
* interactive authentication.
|
|
1152
|
-
*/
|
|
1153
|
-
refreshable: boolean
|
|
1154
|
-
/** Canonical issuer URL of the cached session. */
|
|
1155
|
-
issuerUrl: string
|
|
1156
|
-
/** Client ID of the cached session. */
|
|
1157
|
-
clientId: string
|
|
1158
|
-
/** Canonical (sorted, de-duplicated) scopes of the cached session. */
|
|
1159
|
-
scopes: Array<string>
|
|
1160
|
-
/** Flow that produced the cached session. */
|
|
1161
|
-
flow: string
|
|
1162
|
-
/** When the cached session was obtained, as Unix seconds. */
|
|
1163
|
-
obtainedAt?: number
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
1072
|
export interface ShuffleOptions {
|
|
1167
1073
|
seed?: number
|
|
1168
1074
|
clumpSize?: number
|
|
@@ -1261,29 +1167,6 @@ export interface TlsConfig {
|
|
|
1261
1167
|
assertHostname?: boolean
|
|
1262
1168
|
}
|
|
1263
1169
|
|
|
1264
|
-
/**
|
|
1265
|
-
* Options for the persistent OAuth token cache.
|
|
1266
|
-
*
|
|
1267
|
-
* The cache is opt-in: it is only used when set as `tokenCache` on
|
|
1268
|
-
* `OAuthConfig`. Only refresh tokens are persisted, in a private directory
|
|
1269
|
-
* with owner-only permissions, so short-lived processes can reuse an
|
|
1270
|
-
* authenticated session instead of re-prompting on every start.
|
|
1271
|
-
*/
|
|
1272
|
-
export interface TokenCacheOptions {
|
|
1273
|
-
/**
|
|
1274
|
-
* Directory that holds cached credentials. Defaults to
|
|
1275
|
-
* `$XDG_CACHE_HOME/lancedb/oauth`, `$HOME/.cache/lancedb/oauth` on Unix,
|
|
1276
|
-
* or `%LOCALAPPDATA%\lancedb\oauth` on Windows. The directory is created
|
|
1277
|
-
* with owner-only permissions (`0700`) when missing.
|
|
1278
|
-
*/
|
|
1279
|
-
cacheDir?: string
|
|
1280
|
-
/**
|
|
1281
|
-
* How long to wait for the cross-process refresh lock before failing,
|
|
1282
|
-
* in seconds (default: 30).
|
|
1283
|
-
*/
|
|
1284
|
-
lockTimeoutSecs?: number
|
|
1285
|
-
}
|
|
1286
|
-
|
|
1287
1170
|
export declare function tokenize(query: string, baseTokenizer?: string | undefined | null, language?: string | undefined | null, maxTokenLength?: number | undefined | null, lowerCase?: boolean | undefined | null, stem?: boolean | undefined | null, removeStopWords?: boolean | undefined | null, customStopWords?: Array<string> | undefined | null, asciiFolding?: boolean | undefined | null, ngramMinLength?: number | undefined | null, ngramMaxLength?: number | undefined | null, prefixOnly?: boolean | undefined | null): Array<FtsToken>
|
|
1288
1171
|
|
|
1289
1172
|
export interface UpdateFieldMetadataResult {
|
package/dist/native.js
CHANGED
|
@@ -76,8 +76,8 @@ function requireNative() {
|
|
|
76
76
|
try {
|
|
77
77
|
const binding = require('@lancedb/lancedb-android-arm64');
|
|
78
78
|
const bindingPackageVersion = require('@lancedb/lancedb-android-arm64/package.json').version;
|
|
79
|
-
if (bindingPackageVersion !== '0.39.0
|
|
80
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
79
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
81
81
|
}
|
|
82
82
|
return binding;
|
|
83
83
|
}
|
|
@@ -95,8 +95,8 @@ function requireNative() {
|
|
|
95
95
|
try {
|
|
96
96
|
const binding = require('@lancedb/lancedb-android-arm-eabi');
|
|
97
97
|
const bindingPackageVersion = require('@lancedb/lancedb-android-arm-eabi/package.json').version;
|
|
98
|
-
if (bindingPackageVersion !== '0.39.0
|
|
99
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
98
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
100
100
|
}
|
|
101
101
|
return binding;
|
|
102
102
|
}
|
|
@@ -120,8 +120,8 @@ function requireNative() {
|
|
|
120
120
|
try {
|
|
121
121
|
const binding = require('@lancedb/lancedb-win32-x64-gnu');
|
|
122
122
|
const bindingPackageVersion = require('@lancedb/lancedb-win32-x64-gnu/package.json').version;
|
|
123
|
-
if (bindingPackageVersion !== '0.39.0
|
|
124
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
123
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
125
125
|
}
|
|
126
126
|
return binding;
|
|
127
127
|
}
|
|
@@ -139,8 +139,8 @@ function requireNative() {
|
|
|
139
139
|
try {
|
|
140
140
|
const binding = require('@lancedb/lancedb-win32-x64-msvc');
|
|
141
141
|
const bindingPackageVersion = require('@lancedb/lancedb-win32-x64-msvc/package.json').version;
|
|
142
|
-
if (bindingPackageVersion !== '0.39.0
|
|
143
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
142
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
144
144
|
}
|
|
145
145
|
return binding;
|
|
146
146
|
}
|
|
@@ -159,8 +159,8 @@ function requireNative() {
|
|
|
159
159
|
try {
|
|
160
160
|
const binding = require('@lancedb/lancedb-win32-ia32-msvc');
|
|
161
161
|
const bindingPackageVersion = require('@lancedb/lancedb-win32-ia32-msvc/package.json').version;
|
|
162
|
-
if (bindingPackageVersion !== '0.39.0
|
|
163
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
162
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
164
164
|
}
|
|
165
165
|
return binding;
|
|
166
166
|
}
|
|
@@ -178,8 +178,8 @@ function requireNative() {
|
|
|
178
178
|
try {
|
|
179
179
|
const binding = require('@lancedb/lancedb-win32-arm64-msvc');
|
|
180
180
|
const bindingPackageVersion = require('@lancedb/lancedb-win32-arm64-msvc/package.json').version;
|
|
181
|
-
if (bindingPackageVersion !== '0.39.0
|
|
182
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
181
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
183
183
|
}
|
|
184
184
|
return binding;
|
|
185
185
|
}
|
|
@@ -201,8 +201,8 @@ function requireNative() {
|
|
|
201
201
|
try {
|
|
202
202
|
const binding = require('@lancedb/lancedb-darwin-universal');
|
|
203
203
|
const bindingPackageVersion = require('@lancedb/lancedb-darwin-universal/package.json').version;
|
|
204
|
-
if (bindingPackageVersion !== '0.39.0
|
|
205
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
204
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
206
206
|
}
|
|
207
207
|
return binding;
|
|
208
208
|
}
|
|
@@ -219,8 +219,8 @@ function requireNative() {
|
|
|
219
219
|
try {
|
|
220
220
|
const binding = require('@lancedb/lancedb-darwin-x64');
|
|
221
221
|
const bindingPackageVersion = require('@lancedb/lancedb-darwin-x64/package.json').version;
|
|
222
|
-
if (bindingPackageVersion !== '0.39.0
|
|
223
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
222
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
224
224
|
}
|
|
225
225
|
return binding;
|
|
226
226
|
}
|
|
@@ -238,8 +238,8 @@ function requireNative() {
|
|
|
238
238
|
try {
|
|
239
239
|
const binding = require('@lancedb/lancedb-darwin-arm64');
|
|
240
240
|
const bindingPackageVersion = require('@lancedb/lancedb-darwin-arm64/package.json').version;
|
|
241
|
-
if (bindingPackageVersion !== '0.39.0
|
|
242
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
241
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
243
243
|
}
|
|
244
244
|
return binding;
|
|
245
245
|
}
|
|
@@ -262,8 +262,8 @@ function requireNative() {
|
|
|
262
262
|
try {
|
|
263
263
|
const binding = require('@lancedb/lancedb-freebsd-x64');
|
|
264
264
|
const bindingPackageVersion = require('@lancedb/lancedb-freebsd-x64/package.json').version;
|
|
265
|
-
if (bindingPackageVersion !== '0.39.0
|
|
266
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
265
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
267
267
|
}
|
|
268
268
|
return binding;
|
|
269
269
|
}
|
|
@@ -281,8 +281,8 @@ function requireNative() {
|
|
|
281
281
|
try {
|
|
282
282
|
const binding = require('@lancedb/lancedb-freebsd-arm64');
|
|
283
283
|
const bindingPackageVersion = require('@lancedb/lancedb-freebsd-arm64/package.json').version;
|
|
284
|
-
if (bindingPackageVersion !== '0.39.0
|
|
285
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
284
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
286
286
|
}
|
|
287
287
|
return binding;
|
|
288
288
|
}
|
|
@@ -306,8 +306,8 @@ function requireNative() {
|
|
|
306
306
|
try {
|
|
307
307
|
const binding = require('@lancedb/lancedb-linux-x64-musl');
|
|
308
308
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-x64-musl/package.json').version;
|
|
309
|
-
if (bindingPackageVersion !== '0.39.0
|
|
310
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
309
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
311
311
|
}
|
|
312
312
|
return binding;
|
|
313
313
|
}
|
|
@@ -325,8 +325,8 @@ function requireNative() {
|
|
|
325
325
|
try {
|
|
326
326
|
const binding = require('@lancedb/lancedb-linux-x64-gnu');
|
|
327
327
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-x64-gnu/package.json').version;
|
|
328
|
-
if (bindingPackageVersion !== '0.39.0
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
328
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
330
330
|
}
|
|
331
331
|
return binding;
|
|
332
332
|
}
|
|
@@ -346,8 +346,8 @@ function requireNative() {
|
|
|
346
346
|
try {
|
|
347
347
|
const binding = require('@lancedb/lancedb-linux-arm64-musl');
|
|
348
348
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm64-musl/package.json').version;
|
|
349
|
-
if (bindingPackageVersion !== '0.39.0
|
|
350
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
349
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
351
351
|
}
|
|
352
352
|
return binding;
|
|
353
353
|
}
|
|
@@ -365,8 +365,8 @@ function requireNative() {
|
|
|
365
365
|
try {
|
|
366
366
|
const binding = require('@lancedb/lancedb-linux-arm64-gnu');
|
|
367
367
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm64-gnu/package.json').version;
|
|
368
|
-
if (bindingPackageVersion !== '0.39.0
|
|
369
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
368
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
370
370
|
}
|
|
371
371
|
return binding;
|
|
372
372
|
}
|
|
@@ -386,8 +386,8 @@ function requireNative() {
|
|
|
386
386
|
try {
|
|
387
387
|
const binding = require('@lancedb/lancedb-linux-arm-musleabihf');
|
|
388
388
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm-musleabihf/package.json').version;
|
|
389
|
-
if (bindingPackageVersion !== '0.39.0
|
|
390
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
389
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
391
391
|
}
|
|
392
392
|
return binding;
|
|
393
393
|
}
|
|
@@ -405,8 +405,8 @@ function requireNative() {
|
|
|
405
405
|
try {
|
|
406
406
|
const binding = require('@lancedb/lancedb-linux-arm-gnueabihf');
|
|
407
407
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm-gnueabihf/package.json').version;
|
|
408
|
-
if (bindingPackageVersion !== '0.39.0
|
|
409
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
408
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
410
410
|
}
|
|
411
411
|
return binding;
|
|
412
412
|
}
|
|
@@ -426,8 +426,8 @@ function requireNative() {
|
|
|
426
426
|
try {
|
|
427
427
|
const binding = require('@lancedb/lancedb-linux-loong64-musl');
|
|
428
428
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-loong64-musl/package.json').version;
|
|
429
|
-
if (bindingPackageVersion !== '0.39.0
|
|
430
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
429
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
431
431
|
}
|
|
432
432
|
return binding;
|
|
433
433
|
}
|
|
@@ -445,8 +445,8 @@ function requireNative() {
|
|
|
445
445
|
try {
|
|
446
446
|
const binding = require('@lancedb/lancedb-linux-loong64-gnu');
|
|
447
447
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-loong64-gnu/package.json').version;
|
|
448
|
-
if (bindingPackageVersion !== '0.39.0
|
|
449
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
448
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
450
450
|
}
|
|
451
451
|
return binding;
|
|
452
452
|
}
|
|
@@ -466,8 +466,8 @@ function requireNative() {
|
|
|
466
466
|
try {
|
|
467
467
|
const binding = require('@lancedb/lancedb-linux-riscv64-musl');
|
|
468
468
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-riscv64-musl/package.json').version;
|
|
469
|
-
if (bindingPackageVersion !== '0.39.0
|
|
470
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
469
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
471
471
|
}
|
|
472
472
|
return binding;
|
|
473
473
|
}
|
|
@@ -485,8 +485,8 @@ function requireNative() {
|
|
|
485
485
|
try {
|
|
486
486
|
const binding = require('@lancedb/lancedb-linux-riscv64-gnu');
|
|
487
487
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-riscv64-gnu/package.json').version;
|
|
488
|
-
if (bindingPackageVersion !== '0.39.0
|
|
489
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
488
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
490
490
|
}
|
|
491
491
|
return binding;
|
|
492
492
|
}
|
|
@@ -505,8 +505,8 @@ function requireNative() {
|
|
|
505
505
|
try {
|
|
506
506
|
const binding = require('@lancedb/lancedb-linux-ppc64-gnu');
|
|
507
507
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-ppc64-gnu/package.json').version;
|
|
508
|
-
if (bindingPackageVersion !== '0.39.0
|
|
509
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
508
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
510
510
|
}
|
|
511
511
|
return binding;
|
|
512
512
|
}
|
|
@@ -524,8 +524,8 @@ function requireNative() {
|
|
|
524
524
|
try {
|
|
525
525
|
const binding = require('@lancedb/lancedb-linux-s390x-gnu');
|
|
526
526
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-s390x-gnu/package.json').version;
|
|
527
|
-
if (bindingPackageVersion !== '0.39.0
|
|
528
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
527
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
529
529
|
}
|
|
530
530
|
return binding;
|
|
531
531
|
}
|
|
@@ -548,8 +548,8 @@ function requireNative() {
|
|
|
548
548
|
try {
|
|
549
549
|
const binding = require('@lancedb/lancedb-openharmony-arm64');
|
|
550
550
|
const bindingPackageVersion = require('@lancedb/lancedb-openharmony-arm64/package.json').version;
|
|
551
|
-
if (bindingPackageVersion !== '0.39.0
|
|
552
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
551
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
553
553
|
}
|
|
554
554
|
return binding;
|
|
555
555
|
}
|
|
@@ -567,8 +567,8 @@ function requireNative() {
|
|
|
567
567
|
try {
|
|
568
568
|
const binding = require('@lancedb/lancedb-openharmony-x64');
|
|
569
569
|
const bindingPackageVersion = require('@lancedb/lancedb-openharmony-x64/package.json').version;
|
|
570
|
-
if (bindingPackageVersion !== '0.39.0
|
|
571
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
570
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
572
572
|
}
|
|
573
573
|
return binding;
|
|
574
574
|
}
|
|
@@ -586,8 +586,8 @@ function requireNative() {
|
|
|
586
586
|
try {
|
|
587
587
|
const binding = require('@lancedb/lancedb-openharmony-arm');
|
|
588
588
|
const bindingPackageVersion = require('@lancedb/lancedb-openharmony-arm/package.json').version;
|
|
589
|
-
if (bindingPackageVersion !== '0.39.0
|
|
590
|
-
throw new Error(`Native binding package version mismatch, expected 0.39.0
|
|
589
|
+
if (bindingPackageVersion !== '0.39.0' && 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.39.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
591
591
|
}
|
|
592
592
|
return binding;
|
|
593
593
|
}
|
|
@@ -671,7 +671,6 @@ module.exports.JsFullTextQuery = nativeBinding.JsFullTextQuery;
|
|
|
671
671
|
module.exports.JsHeaderProvider = nativeBinding.JsHeaderProvider;
|
|
672
672
|
module.exports.NapiScannable = nativeBinding.NapiScannable;
|
|
673
673
|
module.exports.NativeMergeInsertBuilder = nativeBinding.NativeMergeInsertBuilder;
|
|
674
|
-
module.exports.OAuthSession = nativeBinding.OAuthSession;
|
|
675
674
|
module.exports.PermutationBuilder = nativeBinding.PermutationBuilder;
|
|
676
675
|
module.exports.Query = nativeBinding.Query;
|
|
677
676
|
module.exports.RecordBatchIterator = nativeBinding.RecordBatchIterator;
|
package/dist/oauth.d.ts
CHANGED
|
@@ -4,38 +4,9 @@
|
|
|
4
4
|
export declare enum OAuthFlowType {
|
|
5
5
|
/** Client Credentials grant (service-to-service / M2M). */
|
|
6
6
|
ClientCredentials = "client_credentials",
|
|
7
|
-
/** Interactive Authorization Code grant, using PKCE by default. */
|
|
8
|
-
AuthorizationCode = "authorization_code",
|
|
9
|
-
/** Device Authorization grant for CLI and headless environments. */
|
|
10
|
-
DeviceCode = "device_code",
|
|
11
7
|
/** Azure Managed Identity via IMDS. */
|
|
12
8
|
AzureManagedIdentity = "azure_managed_identity"
|
|
13
9
|
}
|
|
14
|
-
/**
|
|
15
|
-
* Options for the persistent OAuth token cache.
|
|
16
|
-
*
|
|
17
|
-
* The cache is opt-in: it is only used when set as `tokenCache` on
|
|
18
|
-
* {@link OAuthConfig}. Only refresh tokens are persisted, in a private
|
|
19
|
-
* directory with owner-only permissions, so short-lived processes can reuse
|
|
20
|
-
* an authenticated session instead of re-prompting on every start.
|
|
21
|
-
*
|
|
22
|
-
* Multiple identities (issuer, client, scopes, flow, client authentication)
|
|
23
|
-
* get separate cache entries. Within one identity the most recent login wins.
|
|
24
|
-
*/
|
|
25
|
-
export interface TokenCacheOptions {
|
|
26
|
-
/**
|
|
27
|
-
* Directory that holds cached credentials. Defaults to
|
|
28
|
-
* `$XDG_CACHE_HOME/lancedb/oauth`, `$HOME/.cache/lancedb/oauth` on Unix,
|
|
29
|
-
* or `%LOCALAPPDATA%\\lancedb\\oauth` on Windows. The directory is created
|
|
30
|
-
* with owner-only permissions (`0700`) when missing.
|
|
31
|
-
*/
|
|
32
|
-
cacheDir?: string;
|
|
33
|
-
/**
|
|
34
|
-
* How long to wait for the cross-process refresh lock before failing, in
|
|
35
|
-
* seconds (default: 30).
|
|
36
|
-
*/
|
|
37
|
-
lockTimeoutSecs?: number;
|
|
38
|
-
}
|
|
39
10
|
/**
|
|
40
11
|
* OAuth configuration for LanceDB authentication.
|
|
41
12
|
*
|
|
@@ -65,21 +36,6 @@ export interface TokenCacheOptions {
|
|
|
65
36
|
* flow: OAuthFlowType.AzureManagedIdentity,
|
|
66
37
|
* };
|
|
67
38
|
* ```
|
|
68
|
-
*
|
|
69
|
-
* @example Authorization Code with PKCE:
|
|
70
|
-
* The authorization URL is written to stderr before LanceDB tries to open a
|
|
71
|
-
* browser, so it can be copied in headless environments.
|
|
72
|
-
* ```typescript
|
|
73
|
-
* const config: OAuthConfig = {
|
|
74
|
-
* issuerUrl: "https://login.microsoftonline.com/{tenant}/v2.0",
|
|
75
|
-
* clientId: "app-id",
|
|
76
|
-
* scopes: ["openid", "api://lancedb-api/access"],
|
|
77
|
-
* flow: OAuthFlowType.AuthorizationCode,
|
|
78
|
-
* };
|
|
79
|
-
* ```
|
|
80
|
-
*
|
|
81
|
-
* Device Authorization writes the verification URL and user code to stderr
|
|
82
|
-
* before polling begins.
|
|
83
39
|
*/
|
|
84
40
|
export interface OAuthConfig {
|
|
85
41
|
/**
|
|
@@ -99,12 +55,6 @@ export interface OAuthConfig {
|
|
|
99
55
|
flow?: OAuthFlowType;
|
|
100
56
|
/** Client secret (required for ClientCredentials). */
|
|
101
57
|
clientSecret?: string;
|
|
102
|
-
/** Loopback redirect URI for AuthorizationCode. */
|
|
103
|
-
redirectUri?: string;
|
|
104
|
-
/** Port for the AuthorizationCode loopback callback server (default: 8400). */
|
|
105
|
-
callbackPort?: number;
|
|
106
|
-
/** Protect AuthorizationCode with S256 PKCE (default: true). */
|
|
107
|
-
usePkce?: boolean;
|
|
108
58
|
/** Client ID for user-assigned managed identity (AzureManagedIdentity). */
|
|
109
59
|
managedIdentityClientId?: string;
|
|
110
60
|
/**
|
|
@@ -113,98 +63,4 @@ export interface OAuthConfig {
|
|
|
113
63
|
* the TTL, each request refreshes the token.
|
|
114
64
|
*/
|
|
115
65
|
refreshBufferSecs?: number;
|
|
116
|
-
/**
|
|
117
|
-
* Opt in to the persistent token cache so short-lived processes reuse one
|
|
118
|
-
* session. Only refresh tokens are persisted. Only supported by
|
|
119
|
-
* AuthorizationCode and DeviceCode; Azure managed identity is rejected.
|
|
120
|
-
* Default: unset (memory only).
|
|
121
|
-
*/
|
|
122
|
-
tokenCache?: TokenCacheOptions;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Safe, non-secret view of a cached OAuth session, returned by
|
|
126
|
-
* {@link OAuthSession.status} and {@link OAuthSession.login}.
|
|
127
|
-
*/
|
|
128
|
-
export interface SessionStatus {
|
|
129
|
-
/**
|
|
130
|
-
* Whether a cached session exists that can obtain tokens without
|
|
131
|
-
* interactive authentication. Because access tokens are not persisted,
|
|
132
|
-
* this is `true` exactly when a refresh token is cached; the next
|
|
133
|
-
* connection refreshes with it rather than opening a browser or device
|
|
134
|
-
* prompt.
|
|
135
|
-
*/
|
|
136
|
-
refreshable: boolean;
|
|
137
|
-
/** Canonical issuer URL of the cached session. */
|
|
138
|
-
issuerUrl: string;
|
|
139
|
-
/** Client ID of the cached session. */
|
|
140
|
-
clientId: string;
|
|
141
|
-
/** Canonical (sorted, de-duplicated) scope set of the cached session. */
|
|
142
|
-
scopes: string[];
|
|
143
|
-
/** Flow that produced the cached session. */
|
|
144
|
-
flow: string;
|
|
145
|
-
/** When the cached session was obtained, as Unix seconds. */
|
|
146
|
-
obtainedAt?: number;
|
|
147
|
-
}
|
|
148
|
-
/** Result of {@link OAuthSession.logout}. */
|
|
149
|
-
export interface SessionLogout {
|
|
150
|
-
/**
|
|
151
|
-
* Whether a cached credential was removed. `false` means no matching
|
|
152
|
-
* session was cached; logout is idempotent.
|
|
153
|
-
*/
|
|
154
|
-
removed: boolean;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Explicit OAuth session lifecycle for the persistent token cache: eager
|
|
158
|
-
* `login`, non-secret `status`, and local `logout`.
|
|
159
|
-
*
|
|
160
|
-
* A session is built from the same {@link OAuthConfig} used to connect
|
|
161
|
-
* (including its `tokenCache` options). A connection created with the same
|
|
162
|
-
* configuration shares the cache, so logging in here prepares tokens for
|
|
163
|
-
* later processes without any database request.
|
|
164
|
-
*
|
|
165
|
-
* `login` always runs the configured interactive flow and replaces the cached
|
|
166
|
-
* session (the most recent login wins). `logout` removes only the local
|
|
167
|
-
* credential; it does not revoke anything with the provider and does not sign
|
|
168
|
-
* out of a browser SSO session.
|
|
169
|
-
*
|
|
170
|
-
* @example
|
|
171
|
-
* ```typescript
|
|
172
|
-
* const config: OAuthConfig = {
|
|
173
|
-
* issuerUrl: "https://issuer.example.com",
|
|
174
|
-
* clientId: "my-app",
|
|
175
|
-
* scopes: ["openid", "offline_access"],
|
|
176
|
-
* flow: OAuthFlowType.DeviceCode,
|
|
177
|
-
* tokenCache: { cacheDir: "/tmp/my-app/oauth-cache" },
|
|
178
|
-
* };
|
|
179
|
-
* const session = new OAuthSession(config);
|
|
180
|
-
* const status = await session.login();
|
|
181
|
-
* ```
|
|
182
|
-
*/
|
|
183
|
-
export declare class OAuthSession {
|
|
184
|
-
private readonly inner;
|
|
185
|
-
/** Create a session manager for the given OAuth configuration. */
|
|
186
|
-
constructor(config: OAuthConfig);
|
|
187
|
-
/**
|
|
188
|
-
* Eagerly run the configured authentication flow and store the session.
|
|
189
|
-
*
|
|
190
|
-
* A successful login always replaces any prior cached session for this
|
|
191
|
-
* identity; if the provider does not issue a refresh token (for example
|
|
192
|
-
* without `offline_access`), the previous record is removed and the status
|
|
193
|
-
* reports `refreshable == false`.
|
|
194
|
-
*/
|
|
195
|
-
login(): Promise<SessionStatus>;
|
|
196
|
-
/**
|
|
197
|
-
* Report whether a matching cached session exists, with safe metadata.
|
|
198
|
-
*
|
|
199
|
-
* This never contacts the identity provider and never exposes token values.
|
|
200
|
-
*/
|
|
201
|
-
status(): Promise<SessionStatus>;
|
|
202
|
-
/**
|
|
203
|
-
* Remove the matching local cached credential.
|
|
204
|
-
*
|
|
205
|
-
* This only deletes the local cache entry. It does not revoke the refresh
|
|
206
|
-
* token with the provider and does not sign out of a browser SSO session.
|
|
207
|
-
* Repeated calls succeed; `removed` reports whether a credential existed.
|
|
208
|
-
*/
|
|
209
|
-
logout(): Promise<SessionLogout>;
|
|
210
66
|
}
|
package/dist/oauth.js
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright The LanceDB Authors
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.
|
|
6
|
-
const native_1 = require("./native");
|
|
5
|
+
exports.OAuthFlowType = void 0;
|
|
7
6
|
/**
|
|
8
7
|
* OAuth authentication flow types.
|
|
9
8
|
*/
|
|
@@ -11,74 +10,6 @@ var OAuthFlowType;
|
|
|
11
10
|
(function (OAuthFlowType) {
|
|
12
11
|
/** Client Credentials grant (service-to-service / M2M). */
|
|
13
12
|
OAuthFlowType["ClientCredentials"] = "client_credentials";
|
|
14
|
-
/** Interactive Authorization Code grant, using PKCE by default. */
|
|
15
|
-
OAuthFlowType["AuthorizationCode"] = "authorization_code";
|
|
16
|
-
/** Device Authorization grant for CLI and headless environments. */
|
|
17
|
-
OAuthFlowType["DeviceCode"] = "device_code";
|
|
18
13
|
/** Azure Managed Identity via IMDS. */
|
|
19
14
|
OAuthFlowType["AzureManagedIdentity"] = "azure_managed_identity";
|
|
20
15
|
})(OAuthFlowType || (exports.OAuthFlowType = OAuthFlowType = {}));
|
|
21
|
-
/**
|
|
22
|
-
* Explicit OAuth session lifecycle for the persistent token cache: eager
|
|
23
|
-
* `login`, non-secret `status`, and local `logout`.
|
|
24
|
-
*
|
|
25
|
-
* A session is built from the same {@link OAuthConfig} used to connect
|
|
26
|
-
* (including its `tokenCache` options). A connection created with the same
|
|
27
|
-
* configuration shares the cache, so logging in here prepares tokens for
|
|
28
|
-
* later processes without any database request.
|
|
29
|
-
*
|
|
30
|
-
* `login` always runs the configured interactive flow and replaces the cached
|
|
31
|
-
* session (the most recent login wins). `logout` removes only the local
|
|
32
|
-
* credential; it does not revoke anything with the provider and does not sign
|
|
33
|
-
* out of a browser SSO session.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```typescript
|
|
37
|
-
* const config: OAuthConfig = {
|
|
38
|
-
* issuerUrl: "https://issuer.example.com",
|
|
39
|
-
* clientId: "my-app",
|
|
40
|
-
* scopes: ["openid", "offline_access"],
|
|
41
|
-
* flow: OAuthFlowType.DeviceCode,
|
|
42
|
-
* tokenCache: { cacheDir: "/tmp/my-app/oauth-cache" },
|
|
43
|
-
* };
|
|
44
|
-
* const session = new OAuthSession(config);
|
|
45
|
-
* const status = await session.login();
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
class OAuthSession {
|
|
49
|
-
inner;
|
|
50
|
-
/** Create a session manager for the given OAuth configuration. */
|
|
51
|
-
constructor(config) {
|
|
52
|
-
this.inner = new native_1.OAuthSession(config);
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Eagerly run the configured authentication flow and store the session.
|
|
56
|
-
*
|
|
57
|
-
* A successful login always replaces any prior cached session for this
|
|
58
|
-
* identity; if the provider does not issue a refresh token (for example
|
|
59
|
-
* without `offline_access`), the previous record is removed and the status
|
|
60
|
-
* reports `refreshable == false`.
|
|
61
|
-
*/
|
|
62
|
-
async login() {
|
|
63
|
-
return this.inner.login();
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Report whether a matching cached session exists, with safe metadata.
|
|
67
|
-
*
|
|
68
|
-
* This never contacts the identity provider and never exposes token values.
|
|
69
|
-
*/
|
|
70
|
-
async status() {
|
|
71
|
-
return this.inner.status();
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Remove the matching local cached credential.
|
|
75
|
-
*
|
|
76
|
-
* This only deletes the local cache entry. It does not revoke the refresh
|
|
77
|
-
* token with the provider and does not sign out of a browser SSO session.
|
|
78
|
-
* Repeated calls succeed; `removed` reports whether a credential existed.
|
|
79
|
-
*/
|
|
80
|
-
async logout() {
|
|
81
|
-
return this.inner.logout();
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
exports.OAuthSession = OAuthSession;
|
package/dist/table.d.ts
CHANGED
|
@@ -521,12 +521,10 @@ export declare abstract class Table {
|
|
|
521
521
|
* Recompute this table's contents from its materialized-view definition.
|
|
522
522
|
*
|
|
523
523
|
* Plumbing for {@link MaterializedView.refresh}, which is the way to call
|
|
524
|
-
* it: rejects tables that carry no view definition.
|
|
524
|
+
* it: rejects tables that carry no view definition. Local tables only.
|
|
525
525
|
* @ignore
|
|
526
526
|
*/
|
|
527
527
|
abstract refreshMaterializedView(full?: boolean, sourceVersion?: number): Promise<RefreshMaterializedViewResult>;
|
|
528
|
-
/** @ignore */
|
|
529
|
-
abstract materializedViewDefinition(): Promise<string>;
|
|
530
528
|
/**
|
|
531
529
|
* Alter the name or nullability of columns.
|
|
532
530
|
* @param {ColumnAlteration[]} columnAlterations One or more alterations to
|
|
@@ -897,7 +895,6 @@ export declare class LocalTable extends Table {
|
|
|
897
895
|
refreshColumn(column: string): Promise<RefreshColumnResult>;
|
|
898
896
|
refreshColumnAsync(column: string): Promise<Job>;
|
|
899
897
|
refreshMaterializedView(full?: boolean, sourceVersion?: number): Promise<RefreshMaterializedViewResult>;
|
|
900
|
-
materializedViewDefinition(): Promise<string>;
|
|
901
898
|
alterColumns(columnAlterations: ColumnAlteration[]): Promise<AlterColumnsResult>;
|
|
902
899
|
updateFieldMetadata(updates: FieldMetadataUpdate[]): Promise<UpdateFieldMetadataResult>;
|
|
903
900
|
dropColumns(columnNames: string[]): Promise<DropColumnsResult>;
|
package/dist/table.js
CHANGED
|
@@ -278,9 +278,6 @@ class LocalTable extends Table {
|
|
|
278
278
|
async refreshMaterializedView(full, sourceVersion) {
|
|
279
279
|
return await this.inner.refreshMaterializedView(full, sourceVersion);
|
|
280
280
|
}
|
|
281
|
-
async materializedViewDefinition() {
|
|
282
|
-
return await this.inner.materializedViewDefinition();
|
|
283
|
-
}
|
|
284
281
|
async alterColumns(columnAlterations) {
|
|
285
282
|
const processedAlterations = columnAlterations.map((alteration) => {
|
|
286
283
|
if (typeof alteration.dataType === "string") {
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"ann"
|
|
12
12
|
],
|
|
13
13
|
"private": false,
|
|
14
|
-
"version": "0.39.0
|
|
14
|
+
"version": "0.39.0",
|
|
15
15
|
"main": "dist/index.js",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": "./dist/index.js",
|
|
@@ -106,13 +106,13 @@
|
|
|
106
106
|
"optionalDependencies": {
|
|
107
107
|
"@huggingface/transformers": "3.0.2",
|
|
108
108
|
"openai": "4.29.2",
|
|
109
|
-
"@lancedb/lancedb-darwin-arm64": "0.39.0
|
|
110
|
-
"@lancedb/lancedb-linux-x64-gnu": "0.39.0
|
|
111
|
-
"@lancedb/lancedb-linux-arm64-gnu": "0.39.0
|
|
112
|
-
"@lancedb/lancedb-linux-x64-musl": "0.39.0
|
|
113
|
-
"@lancedb/lancedb-linux-arm64-musl": "0.39.0
|
|
114
|
-
"@lancedb/lancedb-win32-x64-msvc": "0.39.0
|
|
115
|
-
"@lancedb/lancedb-win32-arm64-msvc": "0.39.0
|
|
109
|
+
"@lancedb/lancedb-darwin-arm64": "0.39.0",
|
|
110
|
+
"@lancedb/lancedb-linux-x64-gnu": "0.39.0",
|
|
111
|
+
"@lancedb/lancedb-linux-arm64-gnu": "0.39.0",
|
|
112
|
+
"@lancedb/lancedb-linux-x64-musl": "0.39.0",
|
|
113
|
+
"@lancedb/lancedb-linux-arm64-musl": "0.39.0",
|
|
114
|
+
"@lancedb/lancedb-win32-x64-msvc": "0.39.0",
|
|
115
|
+
"@lancedb/lancedb-win32-arm64-msvc": "0.39.0"
|
|
116
116
|
},
|
|
117
117
|
"peerDependencies": {
|
|
118
118
|
"@types/node": ">=22",
|