@mastra/fastembed 1.3.2 → 1.3.3
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/_types/@internal_ai-sdk-v5/dist/index.d.ts +536 -0
- package/dist/_types/@internal_ai-v6/dist/index.d.ts +488 -3
- package/dist/index.cjs +10 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -17
- package/dist/index.js.map +1 -1
- package/dist/model-cache.d.ts.map +1 -1
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -9496,7 +9496,7 @@ ZodNullable.create;
|
|
|
9496
9496
|
ZodEffects.createWithPreprocess;
|
|
9497
9497
|
ZodPipeline.create;
|
|
9498
9498
|
//#endregion
|
|
9499
|
-
//#region ../_vendored/ai_v5/dist/dist-
|
|
9499
|
+
//#region ../_vendored/ai_v5/dist/dist-CwCWl16R.js
|
|
9500
9500
|
var marker$2$6 = "vercel.ai.error";
|
|
9501
9501
|
var symbol$2$6 = Symbol.for(marker$2$6);
|
|
9502
9502
|
var _a$2$6;
|
|
@@ -9987,7 +9987,7 @@ var EventSourceParserStream$1 = class extends TransformStream {
|
|
|
9987
9987
|
function combineHeaders(...headers) {
|
|
9988
9988
|
return headers.reduce((combinedHeaders, currentHeaders) => ({
|
|
9989
9989
|
...combinedHeaders,
|
|
9990
|
-
...currentHeaders
|
|
9990
|
+
...currentHeaders
|
|
9991
9991
|
}), {});
|
|
9992
9992
|
}
|
|
9993
9993
|
function extractResponseHeaders(response) {
|
|
@@ -10188,7 +10188,7 @@ function withUserAgentSuffix$1(headers, ...userAgentSuffixParts) {
|
|
|
10188
10188
|
normalizedHeaders.set("user-agent", [currentUserAgentHeader, ...userAgentSuffixParts].filter(Boolean).join(" "));
|
|
10189
10189
|
return Object.fromEntries(normalizedHeaders.entries());
|
|
10190
10190
|
}
|
|
10191
|
-
var VERSION$4 = "3.0.
|
|
10191
|
+
var VERSION$4 = "3.0.40";
|
|
10192
10192
|
var getOriginalFetch = () => globalThis.fetch;
|
|
10193
10193
|
var getFromApi = async ({ url, headers = {}, successfulResponseHandler, failedResponseHandler, abortSignal, fetch = getOriginalFetch() }) => {
|
|
10194
10194
|
try {
|
|
@@ -10865,7 +10865,7 @@ var zodPatterns$2 = {
|
|
|
10865
10865
|
/**
|
|
10866
10866
|
* `a-z` was added to replicate /i flag
|
|
10867
10867
|
*/
|
|
10868
|
-
email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'
|
|
10868
|
+
email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9-]*\.)+[a-zA-Z]{2,}$/,
|
|
10869
10869
|
/**
|
|
10870
10870
|
* Constructed a valid Unicode RegExp
|
|
10871
10871
|
*
|
|
@@ -17616,7 +17616,7 @@ function trimStartOfStream() {
|
|
|
17616
17616
|
};
|
|
17617
17617
|
}
|
|
17618
17618
|
//#endregion
|
|
17619
|
-
//#region ../_vendored/ai_v6/dist/dist
|
|
17619
|
+
//#region ../_vendored/ai_v6/dist/dist-B5Rt0qDx.js
|
|
17620
17620
|
var marker$2 = "vercel.ai.error";
|
|
17621
17621
|
var symbol$2 = Symbol.for(marker$2);
|
|
17622
17622
|
var _a$2;
|
|
@@ -18224,7 +18224,7 @@ var zodPatterns = {
|
|
|
18224
18224
|
/**
|
|
18225
18225
|
* `a-z` was added to replicate /i flag
|
|
18226
18226
|
*/
|
|
18227
|
-
email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'
|
|
18227
|
+
email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9-]*\.)+[a-zA-Z]{2,}$/,
|
|
18228
18228
|
/**
|
|
18229
18229
|
* Constructed a valid Unicode RegExp
|
|
18230
18230
|
*
|
|
@@ -19075,7 +19075,7 @@ async function safeParseJSON({ text, schema }) {
|
|
|
19075
19075
|
}
|
|
19076
19076
|
async function resolve(value) {
|
|
19077
19077
|
if (typeof value === "function") value = value();
|
|
19078
|
-
return
|
|
19078
|
+
return value;
|
|
19079
19079
|
}
|
|
19080
19080
|
new TextDecoder();
|
|
19081
19081
|
var marker$3 = "vercel.ai.error";
|
|
@@ -21547,17 +21547,10 @@ var SparseTextEmbedding = class SparseTextEmbedding extends SparseEmbedding {
|
|
|
21547
21547
|
};
|
|
21548
21548
|
//#endregion
|
|
21549
21549
|
//#region src/model-cache.ts
|
|
21550
|
-
let modelCachePathPromise;
|
|
21551
21550
|
async function getModelCachePath() {
|
|
21552
|
-
|
|
21553
|
-
|
|
21554
|
-
|
|
21555
|
-
return cachePath;
|
|
21556
|
-
})().catch((error) => {
|
|
21557
|
-
modelCachePathPromise = void 0;
|
|
21558
|
-
throw error;
|
|
21559
|
-
});
|
|
21560
|
-
return modelCachePathPromise;
|
|
21551
|
+
const cachePath = path.default.join(os.default.homedir(), ".cache", "mastra", "fastembed-models");
|
|
21552
|
+
await fs_promises.default.mkdir(cachePath, { recursive: true });
|
|
21553
|
+
return cachePath;
|
|
21561
21554
|
}
|
|
21562
21555
|
const modelCache = /* @__PURE__ */ new Map();
|
|
21563
21556
|
function getCachedModel(modelType) {
|