@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.js
CHANGED
|
@@ -9468,7 +9468,7 @@ ZodNullable.create;
|
|
|
9468
9468
|
ZodEffects.createWithPreprocess;
|
|
9469
9469
|
ZodPipeline.create;
|
|
9470
9470
|
//#endregion
|
|
9471
|
-
//#region ../_vendored/ai_v5/dist/dist-
|
|
9471
|
+
//#region ../_vendored/ai_v5/dist/dist-CwCWl16R.js
|
|
9472
9472
|
var marker$2$6 = "vercel.ai.error";
|
|
9473
9473
|
var symbol$2$6 = Symbol.for(marker$2$6);
|
|
9474
9474
|
var _a$2$6;
|
|
@@ -9959,7 +9959,7 @@ var EventSourceParserStream$1 = class extends TransformStream {
|
|
|
9959
9959
|
function combineHeaders(...headers) {
|
|
9960
9960
|
return headers.reduce((combinedHeaders, currentHeaders) => ({
|
|
9961
9961
|
...combinedHeaders,
|
|
9962
|
-
...currentHeaders
|
|
9962
|
+
...currentHeaders
|
|
9963
9963
|
}), {});
|
|
9964
9964
|
}
|
|
9965
9965
|
function extractResponseHeaders(response) {
|
|
@@ -10160,7 +10160,7 @@ function withUserAgentSuffix$1(headers, ...userAgentSuffixParts) {
|
|
|
10160
10160
|
normalizedHeaders.set("user-agent", [currentUserAgentHeader, ...userAgentSuffixParts].filter(Boolean).join(" "));
|
|
10161
10161
|
return Object.fromEntries(normalizedHeaders.entries());
|
|
10162
10162
|
}
|
|
10163
|
-
var VERSION$4 = "3.0.
|
|
10163
|
+
var VERSION$4 = "3.0.40";
|
|
10164
10164
|
var getOriginalFetch = () => globalThis.fetch;
|
|
10165
10165
|
var getFromApi = async ({ url, headers = {}, successfulResponseHandler, failedResponseHandler, abortSignal, fetch = getOriginalFetch() }) => {
|
|
10166
10166
|
try {
|
|
@@ -10837,7 +10837,7 @@ var zodPatterns$2 = {
|
|
|
10837
10837
|
/**
|
|
10838
10838
|
* `a-z` was added to replicate /i flag
|
|
10839
10839
|
*/
|
|
10840
|
-
email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'
|
|
10840
|
+
email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9-]*\.)+[a-zA-Z]{2,}$/,
|
|
10841
10841
|
/**
|
|
10842
10842
|
* Constructed a valid Unicode RegExp
|
|
10843
10843
|
*
|
|
@@ -17588,7 +17588,7 @@ function trimStartOfStream() {
|
|
|
17588
17588
|
};
|
|
17589
17589
|
}
|
|
17590
17590
|
//#endregion
|
|
17591
|
-
//#region ../_vendored/ai_v6/dist/dist
|
|
17591
|
+
//#region ../_vendored/ai_v6/dist/dist-B5Rt0qDx.js
|
|
17592
17592
|
var marker$2 = "vercel.ai.error";
|
|
17593
17593
|
var symbol$2 = Symbol.for(marker$2);
|
|
17594
17594
|
var _a$2;
|
|
@@ -18196,7 +18196,7 @@ var zodPatterns = {
|
|
|
18196
18196
|
/**
|
|
18197
18197
|
* `a-z` was added to replicate /i flag
|
|
18198
18198
|
*/
|
|
18199
|
-
email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'
|
|
18199
|
+
email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9-]*\.)+[a-zA-Z]{2,}$/,
|
|
18200
18200
|
/**
|
|
18201
18201
|
* Constructed a valid Unicode RegExp
|
|
18202
18202
|
*
|
|
@@ -19047,7 +19047,7 @@ async function safeParseJSON({ text, schema }) {
|
|
|
19047
19047
|
}
|
|
19048
19048
|
async function resolve(value) {
|
|
19049
19049
|
if (typeof value === "function") value = value();
|
|
19050
|
-
return
|
|
19050
|
+
return value;
|
|
19051
19051
|
}
|
|
19052
19052
|
new TextDecoder();
|
|
19053
19053
|
var marker$3 = "vercel.ai.error";
|
|
@@ -21519,17 +21519,10 @@ var SparseTextEmbedding = class SparseTextEmbedding extends SparseEmbedding {
|
|
|
21519
21519
|
};
|
|
21520
21520
|
//#endregion
|
|
21521
21521
|
//#region src/model-cache.ts
|
|
21522
|
-
let modelCachePathPromise;
|
|
21523
21522
|
async function getModelCachePath() {
|
|
21524
|
-
|
|
21525
|
-
|
|
21526
|
-
|
|
21527
|
-
return cachePath;
|
|
21528
|
-
})().catch((error) => {
|
|
21529
|
-
modelCachePathPromise = void 0;
|
|
21530
|
-
throw error;
|
|
21531
|
-
});
|
|
21532
|
-
return modelCachePathPromise;
|
|
21523
|
+
const cachePath = path.join(os.homedir(), ".cache", "mastra", "fastembed-models");
|
|
21524
|
+
await fsp.mkdir(cachePath, { recursive: true });
|
|
21525
|
+
return cachePath;
|
|
21533
21526
|
}
|
|
21534
21527
|
const modelCache = /* @__PURE__ */ new Map();
|
|
21535
21528
|
function getCachedModel(modelType) {
|