vovk 3.0.0-draft.62 → 3.0.0-draft.63

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.
@@ -4,7 +4,7 @@ exports.StreamJSONResponse = void 0;
4
4
  require("./utils/shim");
5
5
  class StreamJSONResponse extends Response {
6
6
  static defaultHeaders = {
7
- 'content-type': 'text/plain; charset=utf-8',
7
+ 'content-type': 'text/plain; format=jsonlines',
8
8
  };
9
9
  isClosed = false;
10
10
  controller;
@@ -42,7 +42,7 @@ const defaultFetcher = async ({ httpMethod, getEndpoint, validate, defaultHandle
42
42
  if (contentType?.startsWith('application/json')) {
43
43
  return defaultHandler(response);
44
44
  }
45
- if (contentType === 'text/plain; charset=utf-8') {
45
+ if (contentType === 'text/plain; format=jsonlines') {
46
46
  return defaultStreamHandler(response);
47
47
  }
48
48
  return response;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk",
3
- "version": "3.0.0-draft.62",
3
+ "version": "3.0.0-draft.63",
4
4
  "main": "dist/index.js",
5
5
  "description": "RESTful RPC for Next.js - Transforms Next.js into a powerful REST API platform with RPC capabilities.",
6
6
  "repository": {
@@ -3,7 +3,7 @@ import './utils/shim';
3
3
 
4
4
  export class StreamJSONResponse<T> extends Response {
5
5
  public static defaultHeaders = {
6
- 'content-type': 'text/plain; charset=utf-8',
6
+ 'content-type': 'text/plain; format=jsonlines',
7
7
  };
8
8
 
9
9
  public isClosed = false;
@@ -51,7 +51,7 @@ const defaultFetcher: VovkClientFetcher<VovkDefaultFetcherOptions> = async (
51
51
  return defaultHandler(response);
52
52
  }
53
53
 
54
- if (contentType === 'text/plain; charset=utf-8') {
54
+ if (contentType === 'text/plain; format=jsonlines') {
55
55
  return defaultStreamHandler(response);
56
56
  }
57
57