triangle-utils 1.4.92 → 1.4.93
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.
|
@@ -19,7 +19,7 @@ export class S3Vector {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
function get_s3vectors_input(s3_vector_id) {
|
|
22
|
-
const [s3_vector_bucket_name, s3_vector_index_name, s3_vector_key] = (s3_vector_id.match(/^s3vectors:\/\/([^\/]+)\/([^\/]+)
|
|
22
|
+
const [s3_vector_bucket_name, s3_vector_index_name, s3_vector_key] = (s3_vector_id.match(/^s3vectors:\/\/([^\/]+)\/([^\/]+)\/?([^$\/]*)$/) || []).slice(1, 4);
|
|
23
23
|
if (s3_vector_bucket_name === undefined || s3_vector_index_name === undefined || s3_vector_key === undefined) {
|
|
24
24
|
throw Error("Bad s3_vector_id: " + s3_vector_id);
|
|
25
25
|
}
|
|
@@ -205,7 +205,7 @@ export class UtilsS3Vectors {
|
|
|
205
205
|
console.log("Bad s3_vector_key:", s3_vector_key);
|
|
206
206
|
continue;
|
|
207
207
|
}
|
|
208
|
-
const s3_vector_id = s3_vector_id_prefix +
|
|
208
|
+
const s3_vector_id = s3_vector_id_prefix + s3_vector_key;
|
|
209
209
|
const distance = new_vector.distance;
|
|
210
210
|
if (distance === undefined) {
|
|
211
211
|
console.log("Bad distance:", distance);
|
package/package.json
CHANGED
package/src/UtilsS3Vectors.ts
CHANGED
|
@@ -31,7 +31,7 @@ interface S3VectorsInput {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
function get_s3vectors_input(s3_vector_id : string) : S3VectorsInput {
|
|
34
|
-
const [s3_vector_bucket_name, s3_vector_index_name, s3_vector_key] = (s3_vector_id.match(/^s3vectors:\/\/([^\/]+)\/([^\/]+)
|
|
34
|
+
const [s3_vector_bucket_name, s3_vector_index_name, s3_vector_key] = (s3_vector_id.match(/^s3vectors:\/\/([^\/]+)\/([^\/]+)\/?([^$\/]*)$/) || []).slice(1, 4)
|
|
35
35
|
if (s3_vector_bucket_name === undefined || s3_vector_index_name === undefined || s3_vector_key === undefined) {
|
|
36
36
|
throw Error("Bad s3_vector_id: " + s3_vector_id)
|
|
37
37
|
}
|
|
@@ -231,7 +231,7 @@ export class UtilsS3Vectors {
|
|
|
231
231
|
console.log("Bad s3_vector_key:", s3_vector_key)
|
|
232
232
|
continue
|
|
233
233
|
}
|
|
234
|
-
const s3_vector_id = s3_vector_id_prefix +
|
|
234
|
+
const s3_vector_id = s3_vector_id_prefix + s3_vector_key
|
|
235
235
|
const distance = new_vector.distance
|
|
236
236
|
if (distance === undefined) {
|
|
237
237
|
console.log("Bad distance:", distance)
|