@ai-sdk/provider-utils 2.1.7 → 2.1.9
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/CHANGELOG.md +13 -0
- package/package.json +2 -2
- package/test/dist/index.d.mts +5 -1
- package/test/dist/index.d.ts +5 -1
- package/test/dist/index.js +10 -0
- package/test/dist/index.js.map +1 -1
- package/test/dist/index.mjs +9 -0
- package/test/dist/index.mjs.map +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
1
|
# @ai-sdk/provider-utils
|
2
2
|
|
3
|
+
## 2.1.9
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- Updated dependencies [2761f06]
|
8
|
+
- @ai-sdk/provider@1.0.8
|
9
|
+
|
10
|
+
## 2.1.8
|
11
|
+
|
12
|
+
### Patch Changes
|
13
|
+
|
14
|
+
- 2e898b4: chore (ai): move mockId test helper into provider utils
|
15
|
+
|
3
16
|
## 2.1.7
|
4
17
|
|
5
18
|
### Patch Changes
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ai-sdk/provider-utils",
|
3
|
-
"version": "2.1.
|
3
|
+
"version": "2.1.9",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"sideEffects": false,
|
6
6
|
"main": "./dist/index.js",
|
@@ -26,7 +26,7 @@
|
|
26
26
|
}
|
27
27
|
},
|
28
28
|
"dependencies": {
|
29
|
-
"@ai-sdk/provider": "1.0.
|
29
|
+
"@ai-sdk/provider": "1.0.8",
|
30
30
|
"eventsource-parser": "^3.0.0",
|
31
31
|
"nanoid": "^3.3.8",
|
32
32
|
"secure-json-parse": "^2.7.0"
|
package/test/dist/index.d.mts
CHANGED
@@ -30,6 +30,10 @@ declare class JsonTestServer {
|
|
30
30
|
setupTestEnvironment(): void;
|
31
31
|
}
|
32
32
|
|
33
|
+
declare function mockId({ prefix, }?: {
|
34
|
+
prefix?: string;
|
35
|
+
}): () => string;
|
36
|
+
|
33
37
|
/**
|
34
38
|
* @deprecated Use createTestServer instead
|
35
39
|
*/
|
@@ -155,4 +159,4 @@ declare function createTestServer<URLS extends {
|
|
155
159
|
calls: TestServerCall[];
|
156
160
|
};
|
157
161
|
|
158
|
-
export { type FullHandlers, type FullUrlHandler, JsonTestServer, StreamingTestServer, type TestServerJsonBodyType, type TestServerResponse, type UrlHandler, convertArrayToAsyncIterable, convertArrayToReadableStream, convertAsyncIterableToArray, convertReadableStreamToArray, convertResponseStreamToArray, createTestServer, describeWithTestServer, withTestServer };
|
162
|
+
export { type FullHandlers, type FullUrlHandler, JsonTestServer, StreamingTestServer, type TestServerJsonBodyType, type TestServerResponse, type UrlHandler, convertArrayToAsyncIterable, convertArrayToReadableStream, convertAsyncIterableToArray, convertReadableStreamToArray, convertResponseStreamToArray, createTestServer, describeWithTestServer, mockId, withTestServer };
|
package/test/dist/index.d.ts
CHANGED
@@ -30,6 +30,10 @@ declare class JsonTestServer {
|
|
30
30
|
setupTestEnvironment(): void;
|
31
31
|
}
|
32
32
|
|
33
|
+
declare function mockId({ prefix, }?: {
|
34
|
+
prefix?: string;
|
35
|
+
}): () => string;
|
36
|
+
|
33
37
|
/**
|
34
38
|
* @deprecated Use createTestServer instead
|
35
39
|
*/
|
@@ -155,4 +159,4 @@ declare function createTestServer<URLS extends {
|
|
155
159
|
calls: TestServerCall[];
|
156
160
|
};
|
157
161
|
|
158
|
-
export { type FullHandlers, type FullUrlHandler, JsonTestServer, StreamingTestServer, type TestServerJsonBodyType, type TestServerResponse, type UrlHandler, convertArrayToAsyncIterable, convertArrayToReadableStream, convertAsyncIterableToArray, convertReadableStreamToArray, convertResponseStreamToArray, createTestServer, describeWithTestServer, withTestServer };
|
162
|
+
export { type FullHandlers, type FullUrlHandler, JsonTestServer, StreamingTestServer, type TestServerJsonBodyType, type TestServerResponse, type UrlHandler, convertArrayToAsyncIterable, convertArrayToReadableStream, convertAsyncIterableToArray, convertReadableStreamToArray, convertResponseStreamToArray, createTestServer, describeWithTestServer, mockId, withTestServer };
|
package/test/dist/index.js
CHANGED
@@ -66,6 +66,7 @@ __export(test_exports, {
|
|
66
66
|
convertResponseStreamToArray: () => convertResponseStreamToArray,
|
67
67
|
createTestServer: () => createTestServer,
|
68
68
|
describeWithTestServer: () => describeWithTestServer,
|
69
|
+
mockId: () => mockId,
|
69
70
|
withTestServer: () => withTestServer
|
70
71
|
});
|
71
72
|
module.exports = __toCommonJS(test_exports);
|
@@ -18540,6 +18541,14 @@ var JsonTestServer = class {
|
|
18540
18541
|
}
|
18541
18542
|
};
|
18542
18543
|
|
18544
|
+
// src/test/mock-id.ts
|
18545
|
+
function mockId({
|
18546
|
+
prefix = "id"
|
18547
|
+
} = {}) {
|
18548
|
+
let counter = 0;
|
18549
|
+
return () => `${prefix}-${counter++}`;
|
18550
|
+
}
|
18551
|
+
|
18543
18552
|
// src/test/streaming-test-server.ts
|
18544
18553
|
var StreamingTestServer = class {
|
18545
18554
|
/**
|
@@ -18896,6 +18905,7 @@ function createTestServer(routes) {
|
|
18896
18905
|
convertResponseStreamToArray,
|
18897
18906
|
createTestServer,
|
18898
18907
|
describeWithTestServer,
|
18908
|
+
mockId,
|
18899
18909
|
withTestServer
|
18900
18910
|
});
|
18901
18911
|
/*! Bundled license information:
|