@lancedb/lancedb 0.42.0-beta.20 → 0.42.0-beta.21
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/RUST_THIRD_PARTY_LICENSES.html +11637 -6176
- package/dist/cleanup.d.ts +31 -0
- package/dist/cleanup.js +80 -0
- package/dist/index.d.ts +10 -7
- package/dist/index.js +3 -2
- package/dist/indices.d.ts +44 -0
- package/dist/indices.js +42 -0
- package/dist/job.d.ts +79 -1
- package/dist/job.js +136 -2
- package/dist/native.d.ts +76 -3
- package/dist/native.js +53 -52
- package/dist/prewarm.d.ts +21 -0
- package/dist/prewarm.js +18 -0
- package/dist/profiling.d.ts +44 -0
- package/dist/profiling.js +37 -0
- package/dist/sql.d.ts +11 -0
- package/dist/sql.js +61 -0
- package/dist/table.d.ts +198 -5
- package/dist/table.js +382 -16
- package/package.json +8 -8
package/dist/native.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare class BranchContents {
|
|
|
19
19
|
|
|
20
20
|
export declare class Branches {
|
|
21
21
|
list(): Promise<Record<string, BranchContents>>
|
|
22
|
-
create(name: string, fromRef?: string | undefined | null, fromVersion?: number | undefined | null): Promise<Table>
|
|
22
|
+
create(name: string, fromRef?: string | undefined | null, fromVersion?: number | undefined | null, fromTag?: string | undefined | null): Promise<Table>
|
|
23
23
|
checkout(name: string, version?: number | undefined | null): Promise<Table>
|
|
24
24
|
delete(name: string): Promise<void>
|
|
25
25
|
diff(fromBranch: string): Promise<Record<string, unknown>>
|
|
@@ -165,6 +165,7 @@ export declare class Index {
|
|
|
165
165
|
static bitmap(): Index
|
|
166
166
|
static labelList(): Index
|
|
167
167
|
static fm(): Index
|
|
168
|
+
static rtree(pageSize?: number | undefined | null): Index
|
|
168
169
|
static fts(withPosition?: boolean | undefined | null, 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, blockSize?: number | undefined | null): Index
|
|
169
170
|
static hnswPq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, numSubVectors?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null, m?: number | undefined | null, efConstruction?: number | undefined | null, targetPartitionSize?: number | undefined | null): Index
|
|
170
171
|
static hnswSq(distanceType?: string | undefined | null, numPartitions?: number | undefined | null, maxIterations?: number | undefined | null, sampleRate?: number | undefined | null, m?: number | undefined | null, efConstruction?: number | undefined | null, targetPartitionSize?: number | undefined | null): Index
|
|
@@ -177,6 +178,13 @@ export declare class Job {
|
|
|
177
178
|
* Local handles have no ID.
|
|
178
179
|
*/
|
|
179
180
|
get id(): string | null
|
|
181
|
+
get jobId(): string | null
|
|
182
|
+
get operationId(): string | null
|
|
183
|
+
get attempt(): number | null
|
|
184
|
+
get retryOf(): string | null
|
|
185
|
+
get lifecycleState(): string | null
|
|
186
|
+
get sourceTableVersion(): number | null
|
|
187
|
+
get executionEpoch(): number | null
|
|
180
188
|
/**
|
|
181
189
|
* The operation's current lifecycle state: "running", "finished",
|
|
182
190
|
* "failed", or "cancelled".
|
|
@@ -202,6 +210,7 @@ export declare class Job {
|
|
|
202
210
|
waitResult(progressCallback?: (progress: Record<string, unknown>) => void, timeoutMs?: number): Promise<any | null>
|
|
203
211
|
/** Request cancellation. Cancelling a finished operation is a no-op. */
|
|
204
212
|
cancel(): Promise<void>
|
|
213
|
+
retry(): Promise<Job>
|
|
205
214
|
/**
|
|
206
215
|
* Ask the backend for this job's current state, and for a server-side job
|
|
207
216
|
* its full record, then cache it for the getters below.
|
|
@@ -230,11 +239,15 @@ export declare class Job {
|
|
|
230
239
|
get resultJson(): string | null
|
|
231
240
|
/** Why the job failed, when it failed and the server reports a reason. */
|
|
232
241
|
get failure(): JobFailureInfo | null
|
|
242
|
+
captureProfile(workerId: string, kind: string, durationSeconds?: number | undefined | null, sessionSlot?: number | undefined | null): Promise<string>
|
|
243
|
+
profileStatus(profileId: string): Promise<string>
|
|
244
|
+
waitForProfile(profileId: string, timeoutMs?: number | undefined | null, pollIntervalMs?: number | undefined | null): Promise<string>
|
|
245
|
+
profileArtifact(profileId: string): Promise<string>
|
|
233
246
|
/**
|
|
234
247
|
* This job's recorded lifecycle events, as an Arrow IPC stream buffer.
|
|
235
248
|
* The TypeScript wrapper turns it into an Arrow table.
|
|
236
249
|
*/
|
|
237
|
-
events(limit?: number | undefined | null, filter?: string | undefined | null): Promise<Buffer>
|
|
250
|
+
events(limit?: number | undefined | null, filter?: string | undefined | null, pageToken?: string | undefined | null): Promise<Buffer>
|
|
238
251
|
}
|
|
239
252
|
|
|
240
253
|
export declare class JobListing {
|
|
@@ -450,6 +463,7 @@ export declare class Table {
|
|
|
450
463
|
prewarmIndex(indexName: string): Promise<void>
|
|
451
464
|
prewarmData(columns?: Array<string> | undefined | null): Promise<void>
|
|
452
465
|
prewarmDataAsync(options?: PrewarmDataOptions | undefined | null): Promise<Job>
|
|
466
|
+
explainPrewarmData(options?: PrewarmDataOptions | undefined | null): Promise<any>
|
|
453
467
|
waitForIndex(indexNames: Array<string>, timeoutS: number): Promise<void>
|
|
454
468
|
stats(): Promise<TableStatistics>
|
|
455
469
|
initialStorageOptions(): Promise<Record<string, string> | null>
|
|
@@ -487,6 +501,9 @@ export declare class Table {
|
|
|
487
501
|
enableRTE(spec: RTEWriteSpec): Promise<void>
|
|
488
502
|
disableRTE(): Promise<void>
|
|
489
503
|
getRTESpec(): Promise<RTEWriteSpec | null>
|
|
504
|
+
getTableOverrides(): Promise<Record<string, unknown>>
|
|
505
|
+
updateTableOverrides(overrides: Record<string, unknown>): Promise<Record<string, unknown>>
|
|
506
|
+
resetTableOverrides(): Promise<Record<string, unknown>>
|
|
490
507
|
closeRTEWriters(): Promise<void>
|
|
491
508
|
flushRTE(): Promise<void>
|
|
492
509
|
compactRTE(): Promise<void>
|
|
@@ -497,12 +514,16 @@ export declare class Table {
|
|
|
497
514
|
checkout(version: number): Promise<void>
|
|
498
515
|
checkoutTag(tag: string): Promise<void>
|
|
499
516
|
checkoutLatest(): Promise<void>
|
|
517
|
+
/** Compare two persisted versions or same-branch tags. */
|
|
518
|
+
delta(fromVersion: DeltaRef, toVersion?: DeltaRef | undefined | null): Promise<TableDelta>
|
|
500
519
|
listVersions(): Promise<Array<Version>>
|
|
501
520
|
restore(): Promise<void>
|
|
502
521
|
tags(): Promise<Tags>
|
|
503
522
|
branches(): Promise<Branches>
|
|
504
523
|
/** The branch this handle is scoped to, or `null` for the main branch. */
|
|
505
524
|
currentBranch(): string | null
|
|
525
|
+
explainCleanup(minAgeSeconds?: number | undefined | null): Promise<any>
|
|
526
|
+
cleanupAsync(minAgeSeconds?: number | undefined | null): Promise<Job>
|
|
506
527
|
compactAsync(options?: CompactionOptions | undefined | null): Promise<Job>
|
|
507
528
|
optimize(beforeTimestampMs?: number | undefined | null, deleteUnverified?: boolean | undefined | null, compactionOptions?: CompactionOptions | undefined | null): Promise<OptimizeStats>
|
|
508
529
|
listIndices(): Promise<Array<IndexConfig>>
|
|
@@ -513,15 +534,33 @@ export declare class Table {
|
|
|
513
534
|
migrateManifestPathsV2(): Promise<void>
|
|
514
535
|
}
|
|
515
536
|
|
|
537
|
+
/** A pinned version range with streaming row changes. */
|
|
538
|
+
export declare class TableDelta {
|
|
539
|
+
beginVersion(): bigint
|
|
540
|
+
endVersion(): bigint
|
|
541
|
+
insertedRows(): Promise<RecordBatchIterator>
|
|
542
|
+
updatedRows(): Promise<RecordBatchIterator>
|
|
543
|
+
upsertedRows(): Promise<RecordBatchIterator>
|
|
544
|
+
deletedRowIds(): Promise<RecordBatchIterator>
|
|
545
|
+
listTransactions(): Promise<Array<TableDeltaTransaction>>
|
|
546
|
+
}
|
|
547
|
+
|
|
516
548
|
export declare class TagContents {
|
|
517
549
|
version: number
|
|
518
550
|
manifestSize: number
|
|
519
551
|
}
|
|
520
552
|
|
|
553
|
+
/** Tags label table versions with human-readable names. */
|
|
521
554
|
export declare class Tags {
|
|
522
555
|
list(): Promise<Record<string, TagContents>>
|
|
523
556
|
getVersion(tag: string): Promise<number>
|
|
524
|
-
|
|
557
|
+
/**
|
|
558
|
+
* Create a tag for a table version.
|
|
559
|
+
*
|
|
560
|
+
* Omit `version` to tag the version this handle currently shows,
|
|
561
|
+
* including a checked-out version.
|
|
562
|
+
*/
|
|
563
|
+
create(tag: string, version?: number | undefined | null): Promise<void>
|
|
525
564
|
delete(tag: string): Promise<void>
|
|
526
565
|
update(tag: string, version: number): Promise<void>
|
|
527
566
|
}
|
|
@@ -810,6 +849,14 @@ export interface DeleteResult {
|
|
|
810
849
|
version: number
|
|
811
850
|
}
|
|
812
851
|
|
|
852
|
+
/** One endpoint of a table delta: a positive version or a same-branch tag. */
|
|
853
|
+
export interface DeltaRef {
|
|
854
|
+
/** A persisted version, expressed as a positive lossless u64 bigint. */
|
|
855
|
+
version?: bigint
|
|
856
|
+
/** A tag on the table handle's current branch. */
|
|
857
|
+
tag?: string
|
|
858
|
+
}
|
|
859
|
+
|
|
813
860
|
export interface DescribeNamespaceResponse {
|
|
814
861
|
properties?: Record<string, string>
|
|
815
862
|
}
|
|
@@ -964,6 +1011,8 @@ export interface FunctionErrors {
|
|
|
964
1011
|
fragments: Array<FunctionErrorFragment>
|
|
965
1012
|
/** Whether the listing stopped at its limit. */
|
|
966
1013
|
truncated: boolean
|
|
1014
|
+
/** Continue the same job/filter. Absent for complete pages and older servers. */
|
|
1015
|
+
pageToken?: string
|
|
967
1016
|
}
|
|
968
1017
|
|
|
969
1018
|
/** Which per-row Function errors to list; every filter is optional. */
|
|
@@ -974,6 +1023,8 @@ export interface FunctionErrorsOptions {
|
|
|
974
1023
|
column?: string
|
|
975
1024
|
/** At most this many records (server default 10000, cap 100000). */
|
|
976
1025
|
limit?: number
|
|
1026
|
+
/** Empty starts retained history, including repaired rows, for an exact jobId; otherwise continue that page. */
|
|
1027
|
+
pageToken?: string
|
|
977
1028
|
}
|
|
978
1029
|
|
|
979
1030
|
/**
|
|
@@ -1152,6 +1203,18 @@ export interface JobInfo {
|
|
|
1152
1203
|
state: string
|
|
1153
1204
|
/** When the job was created, in milliseconds since the epoch. */
|
|
1154
1205
|
createdAtMillis: number
|
|
1206
|
+
/** Terminal timestamp in milliseconds since the epoch, when known. */
|
|
1207
|
+
completedAtMillis?: number
|
|
1208
|
+
/** Creation-to-completion wall time, including queueing and pauses. */
|
|
1209
|
+
durationMillis?: number
|
|
1210
|
+
/** Affected columns; empty when unavailable or not column-scoped. */
|
|
1211
|
+
columns: Array<string>
|
|
1212
|
+
/** Pinned Function catalog name, with namespace segments joined by `$`. */
|
|
1213
|
+
functionName?: string
|
|
1214
|
+
/** Pinned Function version, when known. */
|
|
1215
|
+
functionVersion?: string
|
|
1216
|
+
/** Durable failure summary, when available. */
|
|
1217
|
+
failure?: JobFailureInfo
|
|
1155
1218
|
/** Structured lifecycle, queue, pause, and job-type-specific progress. */
|
|
1156
1219
|
progress: Record<string, unknown>
|
|
1157
1220
|
/** Whether an operator has parked this job. */
|
|
@@ -1307,6 +1370,7 @@ export interface PrewarmDataOptions {
|
|
|
1307
1370
|
columns?: Array<string>
|
|
1308
1371
|
filter?: string
|
|
1309
1372
|
concurrency?: number
|
|
1373
|
+
parameters?: Buffer
|
|
1310
1374
|
}
|
|
1311
1375
|
|
|
1312
1376
|
/**
|
|
@@ -1581,6 +1645,15 @@ export interface SsTableStats {
|
|
|
1581
1645
|
rows?: number
|
|
1582
1646
|
}
|
|
1583
1647
|
|
|
1648
|
+
/** A committed transaction in a table delta range. */
|
|
1649
|
+
export interface TableDeltaTransaction {
|
|
1650
|
+
readVersion: bigint
|
|
1651
|
+
uuid: string
|
|
1652
|
+
operation: string
|
|
1653
|
+
tag?: string
|
|
1654
|
+
transactionProperties?: Record<string, string>
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1584
1657
|
/**
|
|
1585
1658
|
* Live state of one table shard. A table is N table shards on one node; flattening to a
|
|
1586
1659
|
* single number hides the one hot table shard that is usually why someone opened
|
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.42.0-beta.
|
|
80
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
79
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
99
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
98
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
124
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
123
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
143
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
142
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
163
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
162
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
182
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
181
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
205
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
204
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
223
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
222
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
242
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
241
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
266
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
265
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
285
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
284
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
310
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
309
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
328
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
350
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
349
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
369
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
368
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
390
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
389
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
409
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
408
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
430
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
429
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
449
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
448
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
470
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
469
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
489
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
488
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
509
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
508
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
528
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
527
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
552
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
551
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
571
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
570
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 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.42.0-beta.
|
|
590
|
-
throw new Error(`Native binding package version mismatch, expected 0.42.0-beta.
|
|
589
|
+
if (bindingPackageVersion !== '0.42.0-beta.21' && 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.42.0-beta.21 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
591
591
|
}
|
|
592
592
|
return binding;
|
|
593
593
|
}
|
|
@@ -684,6 +684,7 @@ module.exports.RrfReranker = nativeBinding.RrfReranker;
|
|
|
684
684
|
module.exports.RRFReranker = nativeBinding.RRFReranker;
|
|
685
685
|
module.exports.Session = nativeBinding.Session;
|
|
686
686
|
module.exports.Table = nativeBinding.Table;
|
|
687
|
+
module.exports.TableDelta = nativeBinding.TableDelta;
|
|
687
688
|
module.exports.TagContents = nativeBinding.TagContents;
|
|
688
689
|
module.exports.Tags = nativeBinding.Tags;
|
|
689
690
|
module.exports.TakeQuery = nativeBinding.TakeQuery;
|
package/dist/prewarm.d.ts
CHANGED
|
@@ -17,3 +17,24 @@ export interface PrewarmDataResult {
|
|
|
17
17
|
}
|
|
18
18
|
/** @internal */
|
|
19
19
|
export declare function decodePrewarmDataResult(value: unknown): PrewarmDataResult;
|
|
20
|
+
/** Metadata-only snapshot preview; no warming job is submitted. */
|
|
21
|
+
export interface PrewarmDataPlan {
|
|
22
|
+
/** Snapshot used for this preview. A later submission plans its own snapshot. */
|
|
23
|
+
tableVersion: number;
|
|
24
|
+
/** Readable display text. Use pruning for structured facts. */
|
|
25
|
+
plan: string;
|
|
26
|
+
pruning: PrewarmPruningSummary;
|
|
27
|
+
}
|
|
28
|
+
/** Conservative metadata proof, rather than exact matching rows. */
|
|
29
|
+
export interface PrewarmPruningSummary {
|
|
30
|
+
/** Server-reported proof mode; future servers may add modes. */
|
|
31
|
+
mode: string;
|
|
32
|
+
inputFragments: number;
|
|
33
|
+
selectedFragments: number;
|
|
34
|
+
prunedFragments: number;
|
|
35
|
+
/** Candidate physical intervals, or null when unknown. */
|
|
36
|
+
selectedRowRanges: number | null;
|
|
37
|
+
fallbackReason: string | null;
|
|
38
|
+
}
|
|
39
|
+
/** @internal */
|
|
40
|
+
export declare function decodePrewarmDataPlan(value: unknown): PrewarmDataPlan;
|
package/dist/prewarm.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// SPDX-FileCopyrightText: Copyright The LanceDB Authors
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.decodePrewarmDataResult = decodePrewarmDataResult;
|
|
6
|
+
exports.decodePrewarmDataPlan = decodePrewarmDataPlan;
|
|
6
7
|
/** @internal */
|
|
7
8
|
function decodePrewarmDataResult(value) {
|
|
8
9
|
// Rust validates the typed wire result before handing it to JavaScript.
|
|
@@ -17,3 +18,20 @@ function decodePrewarmDataResult(value) {
|
|
|
17
18
|
bytesRead: result.bytes_read ?? null,
|
|
18
19
|
};
|
|
19
20
|
}
|
|
21
|
+
/** @internal */
|
|
22
|
+
function decodePrewarmDataPlan(value) {
|
|
23
|
+
// Rust validates the versioned response before handing it to JavaScript.
|
|
24
|
+
const result = value;
|
|
25
|
+
return {
|
|
26
|
+
tableVersion: result.table_version,
|
|
27
|
+
plan: result.plan,
|
|
28
|
+
pruning: {
|
|
29
|
+
mode: result.pruning.mode,
|
|
30
|
+
inputFragments: result.pruning.input_fragments,
|
|
31
|
+
selectedFragments: result.pruning.selected_fragments,
|
|
32
|
+
prunedFragments: result.pruning.pruned_fragments,
|
|
33
|
+
selectedRowRanges: result.pruning.selected_row_ranges ?? null,
|
|
34
|
+
fallbackReason: result.pruning.fallback_reason ?? null,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** Evidence collected from one Function worker's Python execution session. */
|
|
2
|
+
export type FunctionProfileKind = "cpu" | "gpu" | "memory";
|
|
3
|
+
/** A capture's lifecycle, independent of its parent refresh job. */
|
|
4
|
+
export type FunctionProfileStatus = "pending" | "capturing" | "complete" | "failed";
|
|
5
|
+
/** Options for requesting a Function worker capture. */
|
|
6
|
+
export interface FunctionProfileOptions {
|
|
7
|
+
/** CPU samples, retained Python allocations, or PyTorch CUDA activities. */
|
|
8
|
+
kind?: FunctionProfileKind;
|
|
9
|
+
/** 1–30 seconds for CPU/memory, default 10; 1–5 for GPU, default 5. */
|
|
10
|
+
durationSeconds?: number;
|
|
11
|
+
/** Python execution session within the worker; default zero. */
|
|
12
|
+
sessionSlot?: number;
|
|
13
|
+
}
|
|
14
|
+
/** Client-side controls while waiting for a Function worker capture. */
|
|
15
|
+
export interface FunctionProfileWaitOptions {
|
|
16
|
+
/** Maximum wait including HTTP requests and sleeps; defaults to 60,000 ms. */
|
|
17
|
+
timeoutMs?: number;
|
|
18
|
+
/** Delay between status requests; defaults to 2,000 ms and must be positive. */
|
|
19
|
+
pollIntervalMs?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* A capture identity and status snapshot. Keep profileId for retained lookup
|
|
23
|
+
* after the Function refresh completes. Timestamp fields are epoch milliseconds.
|
|
24
|
+
*/
|
|
25
|
+
export interface FunctionProfile {
|
|
26
|
+
readonly profileId: string;
|
|
27
|
+
readonly jobId: string;
|
|
28
|
+
readonly workerId: string;
|
|
29
|
+
readonly executionEpoch: number;
|
|
30
|
+
readonly sessionSlot: number;
|
|
31
|
+
readonly kind: FunctionProfileKind;
|
|
32
|
+
readonly durationSeconds: number;
|
|
33
|
+
readonly status: FunctionProfileStatus;
|
|
34
|
+
readonly requestedAtMillis: number;
|
|
35
|
+
readonly deadlineAtMillis: number;
|
|
36
|
+
/** Upper retention bound; job scratch reclamation can remove artifacts sooner. */
|
|
37
|
+
readonly expiresAtMillis: number;
|
|
38
|
+
readonly completedAtMillis: number | null;
|
|
39
|
+
/** The server's capture failure reason; this is not a refresh job failure. */
|
|
40
|
+
readonly error: string | null;
|
|
41
|
+
readonly artifactId: string | null;
|
|
42
|
+
}
|
|
43
|
+
export declare function decodeFunctionProfile(value: string): FunctionProfile;
|
|
44
|
+
export declare function validateProfileOptions(options: object, names: string[]): void;
|
|
@@ -0,0 +1,37 @@
|
|
|
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.decodeFunctionProfile = decodeFunctionProfile;
|
|
6
|
+
exports.validateProfileOptions = validateProfileOptions;
|
|
7
|
+
function decodeFunctionProfile(value) {
|
|
8
|
+
const data = JSON.parse(value);
|
|
9
|
+
return {
|
|
10
|
+
profileId: data.profile_id,
|
|
11
|
+
jobId: data.job_id,
|
|
12
|
+
workerId: data.worker_id,
|
|
13
|
+
executionEpoch: data.execution_epoch,
|
|
14
|
+
sessionSlot: data.session_slot,
|
|
15
|
+
kind: data.kind,
|
|
16
|
+
durationSeconds: data.duration_seconds,
|
|
17
|
+
status: data.status,
|
|
18
|
+
requestedAtMillis: data.requested_at_millis,
|
|
19
|
+
deadlineAtMillis: data.deadline_at_millis,
|
|
20
|
+
expiresAtMillis: data.expires_at_millis,
|
|
21
|
+
completedAtMillis: data.completed_at_millis,
|
|
22
|
+
error: data.error,
|
|
23
|
+
artifactId: data.artifact_id,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function validateProfileOptions(options, names) {
|
|
27
|
+
if (typeof options !== "object" ||
|
|
28
|
+
options === null ||
|
|
29
|
+
Array.isArray(options)) {
|
|
30
|
+
throw new TypeError("profiling expects an options object");
|
|
31
|
+
}
|
|
32
|
+
for (const key of Object.keys(options)) {
|
|
33
|
+
if (!names.includes(key)) {
|
|
34
|
+
throw new TypeError(`Unknown profiling option: ${key}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|