@ai-sdk/provider-utils 2.1.11 → 2.1.12
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 +6 -0
- package/package.json +1 -1
- package/test/dist/index.d.mts +9 -1
- package/test/dist/index.d.ts +9 -1
- package/test/dist/index.js +14 -0
- package/test/dist/index.js.map +1 -1
- package/test/dist/index.mjs +14 -0
- package/test/dist/index.mjs.map +1 -1
    
        package/CHANGELOG.md
    CHANGED
    
    
    
        package/package.json
    CHANGED
    
    
    
        package/test/dist/index.d.mts
    CHANGED
    
    | @@ -112,7 +112,11 @@ type UrlHandler = { | |
| 112 112 | 
             
                    headers?: Record<string, string>;
         | 
| 113 113 | 
             
                    status?: number;
         | 
| 114 114 | 
             
                    body?: string;
         | 
| 115 | 
            -
                } | 
| 115 | 
            +
                } | {
         | 
| 116 | 
            +
                    type: 'readable-stream';
         | 
| 117 | 
            +
                    headers?: Record<string, string>;
         | 
| 118 | 
            +
                    stream: ReadableStream;
         | 
| 119 | 
            +
                } | undefined;
         | 
| 116 120 | 
             
            };
         | 
| 117 121 | 
             
            type FullUrlHandler = {
         | 
| 118 122 | 
             
                response: {
         | 
| @@ -136,6 +140,10 @@ type FullUrlHandler = { | |
| 136 140 | 
             
                    type: 'empty';
         | 
| 137 141 | 
             
                    headers?: Record<string, string>;
         | 
| 138 142 | 
             
                    status?: number;
         | 
| 143 | 
            +
                } | {
         | 
| 144 | 
            +
                    type: 'readable-stream';
         | 
| 145 | 
            +
                    headers?: Record<string, string>;
         | 
| 146 | 
            +
                    stream: ReadableStream;
         | 
| 139 147 | 
             
                } | undefined;
         | 
| 140 148 | 
             
            };
         | 
| 141 149 | 
             
            type FullHandlers<URLS extends {
         | 
    
        package/test/dist/index.d.ts
    CHANGED
    
    | @@ -112,7 +112,11 @@ type UrlHandler = { | |
| 112 112 | 
             
                    headers?: Record<string, string>;
         | 
| 113 113 | 
             
                    status?: number;
         | 
| 114 114 | 
             
                    body?: string;
         | 
| 115 | 
            -
                } | 
| 115 | 
            +
                } | {
         | 
| 116 | 
            +
                    type: 'readable-stream';
         | 
| 117 | 
            +
                    headers?: Record<string, string>;
         | 
| 118 | 
            +
                    stream: ReadableStream;
         | 
| 119 | 
            +
                } | undefined;
         | 
| 116 120 | 
             
            };
         | 
| 117 121 | 
             
            type FullUrlHandler = {
         | 
| 118 122 | 
             
                response: {
         | 
| @@ -136,6 +140,10 @@ type FullUrlHandler = { | |
| 136 140 | 
             
                    type: 'empty';
         | 
| 137 141 | 
             
                    headers?: Record<string, string>;
         | 
| 138 142 | 
             
                    status?: number;
         | 
| 143 | 
            +
                } | {
         | 
| 144 | 
            +
                    type: 'readable-stream';
         | 
| 145 | 
            +
                    headers?: Record<string, string>;
         | 
| 146 | 
            +
                    stream: ReadableStream;
         | 
| 139 147 | 
             
                } | undefined;
         | 
| 140 148 | 
             
            };
         | 
| 141 149 | 
             
            type FullHandlers<URLS extends {
         | 
    
        package/test/dist/index.js
    CHANGED
    
    | @@ -18850,6 +18850,20 @@ function createTestServer(routes) { | |
| 18850 18850 | 
             
                            }
         | 
| 18851 18851 | 
             
                          }
         | 
| 18852 18852 | 
             
                        );
         | 
| 18853 | 
            +
                      case "readable-stream": {
         | 
| 18854 | 
            +
                        return new HttpResponse(
         | 
| 18855 | 
            +
                          response.stream.pipeThrough(new TextEncoderStream()),
         | 
| 18856 | 
            +
                          {
         | 
| 18857 | 
            +
                            status: 200,
         | 
| 18858 | 
            +
                            headers: {
         | 
| 18859 | 
            +
                              "Content-Type": "text/event-stream",
         | 
| 18860 | 
            +
                              "Cache-Control": "no-cache",
         | 
| 18861 | 
            +
                              Connection: "keep-alive",
         | 
| 18862 | 
            +
                              ...response.headers
         | 
| 18863 | 
            +
                            }
         | 
| 18864 | 
            +
                          }
         | 
| 18865 | 
            +
                        );
         | 
| 18866 | 
            +
                      }
         | 
| 18853 18867 | 
             
                      case "binary": {
         | 
| 18854 18868 | 
             
                        return HttpResponse.arrayBuffer(response.body, {
         | 
| 18855 18869 | 
             
                          status: 200,
         |