@lancedb/lancedb 0.39.0-beta.9 → 0.40.0-beta.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/arrow.d.ts +16 -0
- package/dist/arrow.js +19 -0
- package/dist/catalog.d.ts +46 -0
- package/dist/catalog.js +63 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +6 -1
- package/dist/native.d.ts +38 -0
- package/dist/native.js +53 -52
- package/dist/oauth.d.ts +62 -1
- package/dist/oauth.js +28 -1
- package/package.json +8 -8
package/dist/arrow.d.ts
CHANGED
|
@@ -14,6 +14,22 @@ export type FieldLike = Field | {
|
|
|
14
14
|
nullable: boolean;
|
|
15
15
|
metadata?: Map<string, string>;
|
|
16
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* Create an Arrow field backed by LanceDB's JSON extension type.
|
|
19
|
+
*
|
|
20
|
+
* @param name - The field name.
|
|
21
|
+
* @param nullable - Whether the field accepts null values.
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* import { connect, makeJsonField } from "@lancedb/lancedb";
|
|
25
|
+
* import { Schema } from "apache-arrow";
|
|
26
|
+
*
|
|
27
|
+
* const schema = new Schema([makeJsonField("metadata")]);
|
|
28
|
+
* const db = await connect("/path/to/database");
|
|
29
|
+
* await db.createTable("items", [{ metadata: '{"source":"api"}' }], { schema });
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare function makeJsonField(name: string, nullable?: boolean): Field;
|
|
17
33
|
export type DataLike = import("apache-arrow").Data | {
|
|
18
34
|
type: any;
|
|
19
35
|
length: number;
|
package/dist/arrow.js
CHANGED
|
@@ -17,6 +17,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.MakeArrowTableOptions = exports.VectorColumnOptions = void 0;
|
|
20
|
+
exports.makeJsonField = makeJsonField;
|
|
20
21
|
exports.isMultiVector = isMultiVector;
|
|
21
22
|
exports.isIntoVector = isIntoVector;
|
|
22
23
|
exports.extractVectorBuffer = extractVectorBuffer;
|
|
@@ -62,6 +63,24 @@ const registry_1 = require("./embedding/registry");
|
|
|
62
63
|
const sanitize_1 = require("./sanitize");
|
|
63
64
|
const schema_1 = require("./schema");
|
|
64
65
|
__exportStar(require("apache-arrow"), exports);
|
|
66
|
+
/**
|
|
67
|
+
* Create an Arrow field backed by LanceDB's JSON extension type.
|
|
68
|
+
*
|
|
69
|
+
* @param name - The field name.
|
|
70
|
+
* @param nullable - Whether the field accepts null values.
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* import { connect, makeJsonField } from "@lancedb/lancedb";
|
|
74
|
+
* import { Schema } from "apache-arrow";
|
|
75
|
+
*
|
|
76
|
+
* const schema = new Schema([makeJsonField("metadata")]);
|
|
77
|
+
* const db = await connect("/path/to/database");
|
|
78
|
+
* await db.createTable("items", [{ metadata: '{"source":"api"}' }], { schema });
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
function makeJsonField(name, nullable = true) {
|
|
82
|
+
return new apache_arrow_1.Field(name, new apache_arrow_1.Utf8(), nullable, new Map([["ARROW:extension:name", "arrow.json"]]));
|
|
83
|
+
}
|
|
65
84
|
function isMultiVector(value) {
|
|
66
85
|
return Array.isArray(value) && isIntoVector(value[0]);
|
|
67
86
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Connection } from "./connection";
|
|
2
|
+
import { HeaderProvider } from "./header";
|
|
3
|
+
import { ListDatabasesResponse, Catalog as NativeCatalog, CatalogOptions as NativeCatalogOptions } from "./native.js";
|
|
4
|
+
import { OAuthConfig } from "./oauth";
|
|
5
|
+
/** Options shared by a catalog and the database connections it returns. */
|
|
6
|
+
export interface CatalogOptions extends Omit<NativeCatalogOptions, "oauthConfig"> {
|
|
7
|
+
oauthConfig?: OAuthConfig;
|
|
8
|
+
/** Called for each request to supply authentication headers. */
|
|
9
|
+
headerProvider?: HeaderProvider | (() => Record<string, string> | Promise<Record<string, string>>);
|
|
10
|
+
}
|
|
11
|
+
export type { ListDatabasesResponse } from "./native.js";
|
|
12
|
+
/** A remote catalog manages databases through the server's root namespace. */
|
|
13
|
+
export declare class Catalog {
|
|
14
|
+
private readonly inner;
|
|
15
|
+
/** @hidden */
|
|
16
|
+
constructor(inner: NativeCatalog);
|
|
17
|
+
/** The root namespace endpoint. */
|
|
18
|
+
get uri(): string;
|
|
19
|
+
/** Create a database, or open an existing database when existOk is true. */
|
|
20
|
+
createDatabase(name: string, options?: {
|
|
21
|
+
existOk?: boolean;
|
|
22
|
+
}): Promise<Connection>;
|
|
23
|
+
/** Connect to an existing database by its logical name. */
|
|
24
|
+
connectDatabase(name: string): Promise<Connection>;
|
|
25
|
+
/** Drop an empty database. The server rejects nonempty databases. */
|
|
26
|
+
dropDatabase(name: string, options?: {
|
|
27
|
+
ignoreMissing?: boolean;
|
|
28
|
+
}): Promise<void>;
|
|
29
|
+
/** List one page of databases; pass pageToken from a response for the next page. */
|
|
30
|
+
listDatabases(options?: {
|
|
31
|
+
limit?: number;
|
|
32
|
+
pageToken?: string;
|
|
33
|
+
}): Promise<ListDatabasesResponse>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Connect to an HTTP(S) catalog endpoint. Catalog requests omit database-selection
|
|
37
|
+
* headers; opened database connections inherit authentication and client options.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const catalog = await connectCatalog("https://my-server.example", { apiKey: "secret" });
|
|
42
|
+
* const db = await catalog.createDatabase("analytics", { existOk: true });
|
|
43
|
+
* const page = await catalog.listDatabases({ limit: 20 });
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare function connectCatalog(endpoint: string, options?: CatalogOptions): Promise<Catalog>;
|
package/dist/catalog.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
// SPDX-FileCopyrightText: Copyright The LanceDB Authors
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.Catalog = void 0;
|
|
6
|
+
exports.connectCatalog = connectCatalog;
|
|
7
|
+
const connection_1 = require("./connection");
|
|
8
|
+
const native_js_1 = require("./native.js");
|
|
9
|
+
/** A remote catalog manages databases through the server's root namespace. */
|
|
10
|
+
class Catalog {
|
|
11
|
+
inner;
|
|
12
|
+
/** @hidden */
|
|
13
|
+
constructor(inner) {
|
|
14
|
+
this.inner = inner;
|
|
15
|
+
}
|
|
16
|
+
/** The root namespace endpoint. */
|
|
17
|
+
get uri() {
|
|
18
|
+
return this.inner.uri;
|
|
19
|
+
}
|
|
20
|
+
/** Create a database, or open an existing database when existOk is true. */
|
|
21
|
+
async createDatabase(name, options = {}) {
|
|
22
|
+
return new connection_1.LocalConnection(await this.inner.createDatabase(name, options.existOk));
|
|
23
|
+
}
|
|
24
|
+
/** Connect to an existing database by its logical name. */
|
|
25
|
+
async connectDatabase(name) {
|
|
26
|
+
return new connection_1.LocalConnection(await this.inner.connectDatabase(name));
|
|
27
|
+
}
|
|
28
|
+
/** Drop an empty database. The server rejects nonempty databases. */
|
|
29
|
+
async dropDatabase(name, options = {}) {
|
|
30
|
+
await this.inner.dropDatabase(name, options.ignoreMissing);
|
|
31
|
+
}
|
|
32
|
+
/** List one page of databases; pass pageToken from a response for the next page. */
|
|
33
|
+
async listDatabases(options = {}) {
|
|
34
|
+
if (options.limit !== undefined &&
|
|
35
|
+
(!Number.isInteger(options.limit) ||
|
|
36
|
+
options.limit <= 0 ||
|
|
37
|
+
options.limit > 2147483647)) {
|
|
38
|
+
throw new Error("Database list limit must be an integer between 1 and 2147483647");
|
|
39
|
+
}
|
|
40
|
+
return this.inner.listDatabases(options.limit, options.pageToken);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.Catalog = Catalog;
|
|
44
|
+
/**
|
|
45
|
+
* Connect to an HTTP(S) catalog endpoint. Catalog requests omit database-selection
|
|
46
|
+
* headers; opened database connections inherit authentication and client options.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const catalog = await connectCatalog("https://my-server.example", { apiKey: "secret" });
|
|
51
|
+
* const db = await catalog.createDatabase("analytics", { existOk: true });
|
|
52
|
+
* const page = await catalog.listDatabases({ limit: 20 });
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
async function connectCatalog(endpoint, options = {}) {
|
|
56
|
+
const { headerProvider, ...nativeOptions } = options;
|
|
57
|
+
const provider = headerProvider
|
|
58
|
+
? new native_js_1.JsHeaderProvider(async () => typeof headerProvider === "function"
|
|
59
|
+
? headerProvider()
|
|
60
|
+
: headerProvider.getHeaders())
|
|
61
|
+
: undefined;
|
|
62
|
+
return new Catalog(await native_js_1.Catalog.new(endpoint, nativeOptions, provider));
|
|
63
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { MaterializedView, MaterializedViewDefinition, MaterializedViewSelect, }
|
|
|
7
7
|
export { JsHeaderProvider as NativeJsHeaderProvider } from "./native.js";
|
|
8
8
|
export { instrumentLanceDbMetrics } from "./otel";
|
|
9
9
|
export { AddColumnsSql, ConnectionOptions, ConnectNamespaceOptions, IndexStatistics, IndexConfig, ClientConfig, TimeoutConfig, RetryConfig, TlsConfig, OptimizeStats, CompactionStats, RemovalStats, TableStatistics, FragmentStatistics, FragmentSummaryStats, Tags, TagContents, BranchContents, MergeResult, AddResult, AddColumnsResult, RefreshColumnResult, RefreshMaterializedViewResult, AlterColumnsResult, UpdateFieldMetadataResult, DeleteResult, DropColumnsResult, UpdateResult, SplitCalculatedOptions, SplitRandomOptions, SplitHashOptions, SplitSequentialOptions, ShuffleOptions, OAuthConfig as NativeOAuthConfig, } from "./native.js";
|
|
10
|
-
export { makeArrowTable, MakeArrowTableOptions, Data, VectorColumnOptions, } from "./arrow";
|
|
10
|
+
export { makeArrowTable, makeJsonField, MakeArrowTableOptions, Data, VectorColumnOptions, } from "./arrow";
|
|
11
11
|
export { blob, isBlobField, BlobFile } from "./blob";
|
|
12
12
|
export type { BlobOptions } from "./blob";
|
|
13
13
|
export { Connection, CreateTableOptions, TableNamesOptions, ListTablesOptions, OpenTableOptions, ListNamespacesOptions, CreateNamespaceOptions, DropNamespaceOptions, ListNamespacesResponse, ListTablesResponse, CreateNamespaceResponse, DropNamespaceResponse, DescribeNamespaceResponse, RenameTableOptions, } from "./connection";
|
|
@@ -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, OAuthSession, SessionLogout, SessionStatus, TokenCacheOptions, } from "./oauth";
|
|
20
|
+
export { ClientAuthMethod, OAuthConfig, OAuthFlowType, OAuthSession, SessionLogout, SessionStatus, TokenCacheOptions, } from "./oauth";
|
|
21
21
|
export { MergeInsertBuilder, WriteExecutionOptions } from "./merge";
|
|
22
22
|
export * as embedding from "./embedding";
|
|
23
23
|
export { permutationBuilder, PermutationBuilder } from "./permutation";
|
|
@@ -247,3 +247,4 @@ export declare function connectNamespace(implName: "rest", config: RestNamespace
|
|
|
247
247
|
* ```
|
|
248
248
|
*/
|
|
249
249
|
export declare function connectNamespace(implName: string, properties: Record<string, string>, options?: Partial<ConnectNamespaceOptions>): Promise<Connection>;
|
|
250
|
+
export { Catalog, CatalogOptions, ListDatabasesResponse, connectCatalog, } from "./catalog";
|
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.OAuthSession = 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;
|
|
5
|
+
exports.connectCatalog = exports.Catalog = exports.packBits = exports.rerankers = exports.Scannable = exports.PermutationBuilder = exports.permutationBuilder = exports.embedding = exports.MergeInsertBuilder = exports.OAuthSession = exports.OAuthFlowType = exports.ClientAuthMethod = 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.makeJsonField = 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;
|
|
@@ -24,6 +24,7 @@ Object.defineProperty(exports, "TagContents", { enumerable: true, get: function
|
|
|
24
24
|
Object.defineProperty(exports, "BranchContents", { enumerable: true, get: function () { return native_js_3.BranchContents; } });
|
|
25
25
|
var arrow_1 = require("./arrow");
|
|
26
26
|
Object.defineProperty(exports, "makeArrowTable", { enumerable: true, get: function () { return arrow_1.makeArrowTable; } });
|
|
27
|
+
Object.defineProperty(exports, "makeJsonField", { enumerable: true, get: function () { return arrow_1.makeJsonField; } });
|
|
27
28
|
Object.defineProperty(exports, "MakeArrowTableOptions", { enumerable: true, get: function () { return arrow_1.MakeArrowTableOptions; } });
|
|
28
29
|
Object.defineProperty(exports, "VectorColumnOptions", { enumerable: true, get: function () { return arrow_1.VectorColumnOptions; } });
|
|
29
30
|
var blob_1 = require("./blob");
|
|
@@ -61,6 +62,7 @@ Object.defineProperty(exports, "HeaderProvider", { enumerable: true, get: functi
|
|
|
61
62
|
Object.defineProperty(exports, "StaticHeaderProvider", { enumerable: true, get: function () { return header_1.StaticHeaderProvider; } });
|
|
62
63
|
Object.defineProperty(exports, "OAuthHeaderProvider", { enumerable: true, get: function () { return header_1.OAuthHeaderProvider; } });
|
|
63
64
|
var oauth_1 = require("./oauth");
|
|
65
|
+
Object.defineProperty(exports, "ClientAuthMethod", { enumerable: true, get: function () { return oauth_1.ClientAuthMethod; } });
|
|
64
66
|
Object.defineProperty(exports, "OAuthFlowType", { enumerable: true, get: function () { return oauth_1.OAuthFlowType; } });
|
|
65
67
|
Object.defineProperty(exports, "OAuthSession", { enumerable: true, get: function () { return oauth_1.OAuthSession; } });
|
|
66
68
|
var merge_1 = require("./merge");
|
|
@@ -180,3 +182,6 @@ async function connectNamespace(implName, configOrProperties, options) {
|
|
|
180
182
|
const nativeConn = await native_js_1.Connection.newWithNamespace(implName, properties, finalOptions);
|
|
181
183
|
return new connection_1.LocalConnection(nativeConn);
|
|
182
184
|
}
|
|
185
|
+
var catalog_1 = require("./catalog");
|
|
186
|
+
Object.defineProperty(exports, "Catalog", { enumerable: true, get: function () { return catalog_1.Catalog; } });
|
|
187
|
+
Object.defineProperty(exports, "connectCatalog", { enumerable: true, get: function () { return catalog_1.connectCatalog; } });
|
package/dist/native.d.ts
CHANGED
|
@@ -21,6 +21,15 @@ export declare class Branches {
|
|
|
21
21
|
cherryPick(fromBranch: string, dryRun?: boolean | undefined | null): Promise<Record<string, unknown>>
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
export declare class Catalog {
|
|
25
|
+
static new(endpoint: string, options: CatalogOptions, headerProvider?: JsHeaderProvider | undefined | null): Promise<Catalog>
|
|
26
|
+
get uri(): string
|
|
27
|
+
createDatabase(name: string, existOk?: boolean | undefined | null): Promise<Connection>
|
|
28
|
+
connectDatabase(name: string): Promise<Connection>
|
|
29
|
+
dropDatabase(name: string, ignoreMissing?: boolean | undefined | null): Promise<void>
|
|
30
|
+
listDatabases(limit?: number | undefined | null, pageToken?: string | undefined | null): Promise<ListDatabasesResponse>
|
|
31
|
+
}
|
|
32
|
+
|
|
24
33
|
export declare class Connection {
|
|
25
34
|
/** Create a new Connection instance from the given URI. */
|
|
26
35
|
static new(uri: string, options: ConnectionOptions, headerProvider?: JsHeaderProvider | undefined | null): Promise<Connection>
|
|
@@ -523,6 +532,15 @@ export interface BucketStats {
|
|
|
523
532
|
memtables?: Array<MemtableStats>
|
|
524
533
|
}
|
|
525
534
|
|
|
535
|
+
export interface CatalogOptions {
|
|
536
|
+
apiKey?: string
|
|
537
|
+
clientConfig?: ClientConfig
|
|
538
|
+
/** SQL service endpoint inherited by database connections. */
|
|
539
|
+
sqlHostOverride?: string
|
|
540
|
+
readConsistencyInterval?: number
|
|
541
|
+
oauthConfig?: OAuthConfig
|
|
542
|
+
}
|
|
543
|
+
|
|
526
544
|
export interface ClientConfig {
|
|
527
545
|
userAgent?: string
|
|
528
546
|
retryConfig?: RetryConfig
|
|
@@ -881,6 +899,11 @@ export interface JobInfo {
|
|
|
881
899
|
/** The catalog of described LanceDB metrics. Empty until the recorder is installed. */
|
|
882
900
|
export declare function lancedbMetricsCatalog(): Array<MetricDescription>
|
|
883
901
|
|
|
902
|
+
export interface ListDatabasesResponse {
|
|
903
|
+
databases: Array<string>
|
|
904
|
+
pageToken?: string
|
|
905
|
+
}
|
|
906
|
+
|
|
884
907
|
export interface ListNamespacesResponse {
|
|
885
908
|
namespaces: Array<string>
|
|
886
909
|
pageToken?: string
|
|
@@ -1004,6 +1027,10 @@ export interface OAuthConfig {
|
|
|
1004
1027
|
* or resource is required. For example: `["api://{app_id}/.default"]`
|
|
1005
1028
|
*/
|
|
1006
1029
|
scopes: Array<string>
|
|
1030
|
+
/** Optional resource indicator for authorization and token requests. */
|
|
1031
|
+
resource?: string
|
|
1032
|
+
/** Optional provider-specific audience for authorization and token requests. */
|
|
1033
|
+
audience?: string
|
|
1007
1034
|
/**
|
|
1008
1035
|
* Authentication flow: "client_credentials", "authorization_code",
|
|
1009
1036
|
* "device_code", or "azure_managed_identity"
|
|
@@ -1011,6 +1038,13 @@ export interface OAuthConfig {
|
|
|
1011
1038
|
flow?: string
|
|
1012
1039
|
/** Client secret (required for client_credentials). */
|
|
1013
1040
|
clientSecret?: string
|
|
1041
|
+
/**
|
|
1042
|
+
* How the client authenticates to the token endpoint: "none",
|
|
1043
|
+
* "client_secret_basic", or "client_secret_post". Defaults to
|
|
1044
|
+
* "client_secret_basic" when a client secret is set, and "none" for
|
|
1045
|
+
* public clients.
|
|
1046
|
+
*/
|
|
1047
|
+
clientAuthMethod?: string
|
|
1014
1048
|
/** Loopback redirect URI for authorization_code. */
|
|
1015
1049
|
redirectUri?: string
|
|
1016
1050
|
/** Port for the authorization_code loopback callback server. */
|
|
@@ -1157,6 +1191,10 @@ export interface SessionStatus {
|
|
|
1157
1191
|
clientId: string
|
|
1158
1192
|
/** Canonical (sorted, de-duplicated) scopes of the cached session. */
|
|
1159
1193
|
scopes: Array<string>
|
|
1194
|
+
/** Optional resource indicator for authorization and token requests. */
|
|
1195
|
+
resource?: string
|
|
1196
|
+
/** Optional provider-specific audience for authorization and token requests. */
|
|
1197
|
+
audience?: string
|
|
1160
1198
|
/** Flow that produced the cached session. */
|
|
1161
1199
|
flow: string
|
|
1162
1200
|
/** When the cached session was obtained, as Unix seconds. */
|
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.
|
|
80
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
79
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
99
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
98
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
124
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
123
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
143
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
142
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
163
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
162
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
182
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
181
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
205
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
204
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
223
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
222
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
242
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
241
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
266
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
265
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
285
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
284
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
310
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
309
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
328
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
350
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
349
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
369
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
368
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
390
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
389
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
409
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
408
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
430
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
429
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
449
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
448
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
470
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
469
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
489
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
488
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
509
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
508
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
528
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
527
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
552
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
551
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
571
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
570
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.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.
|
|
590
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
589
|
+
if (bindingPackageVersion !== '0.40.0-beta.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.40.0-beta.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
591
591
|
}
|
|
592
592
|
return binding;
|
|
593
593
|
}
|
|
@@ -664,6 +664,7 @@ module.exports = nativeBinding;
|
|
|
664
664
|
module.exports.BlobFile = nativeBinding.BlobFile;
|
|
665
665
|
module.exports.BranchContents = nativeBinding.BranchContents;
|
|
666
666
|
module.exports.Branches = nativeBinding.Branches;
|
|
667
|
+
module.exports.Catalog = nativeBinding.Catalog;
|
|
667
668
|
module.exports.Connection = nativeBinding.Connection;
|
|
668
669
|
module.exports.Index = nativeBinding.Index;
|
|
669
670
|
module.exports.Job = nativeBinding.Job;
|
package/dist/oauth.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare enum OAuthFlowType {
|
|
|
19
19
|
* directory with owner-only permissions, so short-lived processes can reuse
|
|
20
20
|
* an authenticated session instead of re-prompting on every start.
|
|
21
21
|
*
|
|
22
|
-
* Multiple identities (issuer, client, scopes, flow, client authentication)
|
|
22
|
+
* Multiple identities (issuer, client, scopes, resource, audience, flow, client authentication)
|
|
23
23
|
* get separate cache entries. Within one identity the most recent login wins.
|
|
24
24
|
*/
|
|
25
25
|
export interface TokenCacheOptions {
|
|
@@ -36,6 +36,32 @@ export interface TokenCacheOptions {
|
|
|
36
36
|
*/
|
|
37
37
|
lockTimeoutSecs?: number;
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* How the client authenticates to the OAuth token endpoint.
|
|
41
|
+
*
|
|
42
|
+
* The method applies to every OAuth request that carries client
|
|
43
|
+
* authentication: client-credentials, authorization-code exchange,
|
|
44
|
+
* refresh-token, and device-authorization requests. The Azure managed
|
|
45
|
+
* identity flow ignores this option.
|
|
46
|
+
*/
|
|
47
|
+
export declare enum ClientAuthMethod {
|
|
48
|
+
/**
|
|
49
|
+
* No client authentication, for public clients using PKCE or the device
|
|
50
|
+
* flow. Cannot be combined with `clientSecret`.
|
|
51
|
+
*/
|
|
52
|
+
None = "none",
|
|
53
|
+
/**
|
|
54
|
+
* HTTP Basic authentication. This is the RFC 6749 recommended method and
|
|
55
|
+
* the normal default for confidential clients, including default Okta
|
|
56
|
+
* applications. Requires `clientSecret`.
|
|
57
|
+
*/
|
|
58
|
+
ClientSecretBasic = "client_secret_basic",
|
|
59
|
+
/**
|
|
60
|
+
* Credentials in the request body, for providers configured to require it.
|
|
61
|
+
* Requires `clientSecret`.
|
|
62
|
+
*/
|
|
63
|
+
ClientSecretPost = "client_secret_post"
|
|
64
|
+
}
|
|
39
65
|
/**
|
|
40
66
|
* OAuth configuration for LanceDB authentication.
|
|
41
67
|
*
|
|
@@ -56,6 +82,18 @@ export interface TokenCacheOptions {
|
|
|
56
82
|
* };
|
|
57
83
|
* ```
|
|
58
84
|
*
|
|
85
|
+
* Providers requiring an explicit target can set `resource` and/or `audience`:
|
|
86
|
+
* ```typescript
|
|
87
|
+
* const targeted: OAuthConfig = {
|
|
88
|
+
* issuerUrl: "https://issuer.example.com",
|
|
89
|
+
* clientId: "app-id",
|
|
90
|
+
* clientSecret: "secret",
|
|
91
|
+
* scopes: ["read"],
|
|
92
|
+
* resource: "https://api.example.com",
|
|
93
|
+
* audience: "lancedb-api",
|
|
94
|
+
* };
|
|
95
|
+
* ```
|
|
96
|
+
*
|
|
59
97
|
* @example Azure Managed Identity:
|
|
60
98
|
* ```typescript
|
|
61
99
|
* const config: OAuthConfig = {
|
|
@@ -95,10 +133,29 @@ export interface OAuthConfig {
|
|
|
95
133
|
* For example: `["api://{app_id}/.default"]`
|
|
96
134
|
*/
|
|
97
135
|
scopes: string[];
|
|
136
|
+
/**
|
|
137
|
+
* Resource indicator (RFC 8707), forwarded verbatim to authorization and token
|
|
138
|
+
* endpoints, including refresh requests. Must be an absolute URI without a
|
|
139
|
+
* fragment. Not supported for Azure managed identity.
|
|
140
|
+
*/
|
|
141
|
+
resource?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Provider-specific audience, forwarded to authorization and token endpoints,
|
|
144
|
+
* including refresh requests. Not supported for Azure managed identity.
|
|
145
|
+
*/
|
|
146
|
+
audience?: string;
|
|
98
147
|
/** Authentication flow (default: ClientCredentials). */
|
|
99
148
|
flow?: OAuthFlowType;
|
|
100
149
|
/** Client secret (required for ClientCredentials). */
|
|
101
150
|
clientSecret?: string;
|
|
151
|
+
/**
|
|
152
|
+
* How the client authenticates to the token endpoint (default: auto).
|
|
153
|
+
* With a `clientSecret` the default is `ClientAuthMethod.ClientSecretBasic`,
|
|
154
|
+
* which matches the RFC 6749 recommendation and the default configuration
|
|
155
|
+
* of Okta confidential applications; without a secret the client is public
|
|
156
|
+
* and no client authentication is sent.
|
|
157
|
+
*/
|
|
158
|
+
clientAuthMethod?: ClientAuthMethod;
|
|
102
159
|
/** Loopback redirect URI for AuthorizationCode. */
|
|
103
160
|
redirectUri?: string;
|
|
104
161
|
/** Port for the AuthorizationCode loopback callback server (default: 8400). */
|
|
@@ -140,6 +197,10 @@ export interface SessionStatus {
|
|
|
140
197
|
clientId: string;
|
|
141
198
|
/** Canonical (sorted, de-duplicated) scope set of the cached session. */
|
|
142
199
|
scopes: string[];
|
|
200
|
+
/** Resource indicator used to obtain the cached session, if configured. */
|
|
201
|
+
resource?: string;
|
|
202
|
+
/** Provider-specific audience used to obtain the cached session, if configured. */
|
|
203
|
+
audience?: string;
|
|
143
204
|
/** Flow that produced the cached session. */
|
|
144
205
|
flow: string;
|
|
145
206
|
/** When the cached session was obtained, as Unix seconds. */
|
package/dist/oauth.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.OAuthSession = exports.OAuthFlowType = void 0;
|
|
5
|
+
exports.OAuthSession = exports.ClientAuthMethod = exports.OAuthFlowType = void 0;
|
|
6
6
|
const native_1 = require("./native");
|
|
7
7
|
/**
|
|
8
8
|
* OAuth authentication flow types.
|
|
@@ -18,6 +18,33 @@ var OAuthFlowType;
|
|
|
18
18
|
/** Azure Managed Identity via IMDS. */
|
|
19
19
|
OAuthFlowType["AzureManagedIdentity"] = "azure_managed_identity";
|
|
20
20
|
})(OAuthFlowType || (exports.OAuthFlowType = OAuthFlowType = {}));
|
|
21
|
+
/**
|
|
22
|
+
* How the client authenticates to the OAuth token endpoint.
|
|
23
|
+
*
|
|
24
|
+
* The method applies to every OAuth request that carries client
|
|
25
|
+
* authentication: client-credentials, authorization-code exchange,
|
|
26
|
+
* refresh-token, and device-authorization requests. The Azure managed
|
|
27
|
+
* identity flow ignores this option.
|
|
28
|
+
*/
|
|
29
|
+
var ClientAuthMethod;
|
|
30
|
+
(function (ClientAuthMethod) {
|
|
31
|
+
/**
|
|
32
|
+
* No client authentication, for public clients using PKCE or the device
|
|
33
|
+
* flow. Cannot be combined with `clientSecret`.
|
|
34
|
+
*/
|
|
35
|
+
ClientAuthMethod["None"] = "none";
|
|
36
|
+
/**
|
|
37
|
+
* HTTP Basic authentication. This is the RFC 6749 recommended method and
|
|
38
|
+
* the normal default for confidential clients, including default Okta
|
|
39
|
+
* applications. Requires `clientSecret`.
|
|
40
|
+
*/
|
|
41
|
+
ClientAuthMethod["ClientSecretBasic"] = "client_secret_basic";
|
|
42
|
+
/**
|
|
43
|
+
* Credentials in the request body, for providers configured to require it.
|
|
44
|
+
* Requires `clientSecret`.
|
|
45
|
+
*/
|
|
46
|
+
ClientAuthMethod["ClientSecretPost"] = "client_secret_post";
|
|
47
|
+
})(ClientAuthMethod || (exports.ClientAuthMethod = ClientAuthMethod = {}));
|
|
21
48
|
/**
|
|
22
49
|
* Explicit OAuth session lifecycle for the persistent token cache: eager
|
|
23
50
|
* `login`, non-secret `status`, and local `logout`.
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"ann"
|
|
12
12
|
],
|
|
13
13
|
"private": false,
|
|
14
|
-
"version": "0.
|
|
14
|
+
"version": "0.40.0-beta.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.
|
|
110
|
-
"@lancedb/lancedb-linux-x64-gnu": "0.
|
|
111
|
-
"@lancedb/lancedb-linux-arm64-gnu": "0.
|
|
112
|
-
"@lancedb/lancedb-linux-x64-musl": "0.
|
|
113
|
-
"@lancedb/lancedb-linux-arm64-musl": "0.
|
|
114
|
-
"@lancedb/lancedb-win32-x64-msvc": "0.
|
|
115
|
-
"@lancedb/lancedb-win32-arm64-msvc": "0.
|
|
109
|
+
"@lancedb/lancedb-darwin-arm64": "0.40.0-beta.0",
|
|
110
|
+
"@lancedb/lancedb-linux-x64-gnu": "0.40.0-beta.0",
|
|
111
|
+
"@lancedb/lancedb-linux-arm64-gnu": "0.40.0-beta.0",
|
|
112
|
+
"@lancedb/lancedb-linux-x64-musl": "0.40.0-beta.0",
|
|
113
|
+
"@lancedb/lancedb-linux-arm64-musl": "0.40.0-beta.0",
|
|
114
|
+
"@lancedb/lancedb-win32-x64-msvc": "0.40.0-beta.0",
|
|
115
|
+
"@lancedb/lancedb-win32-arm64-msvc": "0.40.0-beta.0"
|
|
116
116
|
},
|
|
117
117
|
"peerDependencies": {
|
|
118
118
|
"@types/node": ">=22",
|