phenoml 17.0.0 → 17.0.1

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.
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "phenoml",
46
- "X-Fern-SDK-Version": "17.0.0",
47
- "User-Agent": "phenoml/17.0.0",
46
+ "X-Fern-SDK-Version": "17.0.1",
47
+ "User-Agent": "phenoml/17.0.1",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -12,6 +12,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.getResponseBody = getResponseBody;
13
13
  const json_js_1 = require("../json.js");
14
14
  const BinaryResponse_js_1 = require("./BinaryResponse.js");
15
+ // Pins the upstream Response so undici's FinalizationRegistry can't GC it and cancel the body stream.
16
+ function retainResponse(target, response) {
17
+ Object.defineProperty(target, "__fern_response_ref", {
18
+ value: response,
19
+ enumerable: false,
20
+ configurable: true,
21
+ writable: false,
22
+ });
23
+ }
15
24
  function getResponseBody(response, responseType) {
16
25
  return __awaiter(this, void 0, void 0, function* () {
17
26
  switch (responseType) {
@@ -31,6 +40,7 @@ function getResponseBody(response, responseType) {
31
40
  },
32
41
  };
33
42
  }
43
+ retainResponse(response.body, response);
34
44
  return response.body;
35
45
  case "streaming":
36
46
  if (response.body == null) {
@@ -42,6 +52,7 @@ function getResponseBody(response, responseType) {
42
52
  },
43
53
  };
44
54
  }
55
+ retainResponse(response.body, response);
45
56
  return response.body;
46
57
  case "text":
47
58
  return yield response.text();
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "17.0.0";
1
+ export declare const SDK_VERSION = "17.0.1";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "17.0.0";
4
+ exports.SDK_VERSION = "17.0.1";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "phenoml",
9
- "X-Fern-SDK-Version": "17.0.0",
10
- "User-Agent": "phenoml/17.0.0",
9
+ "X-Fern-SDK-Version": "17.0.1",
10
+ "User-Agent": "phenoml/17.0.1",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -9,6 +9,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { fromJson } from "../json.mjs";
11
11
  import { getBinaryResponse } from "./BinaryResponse.mjs";
12
+ // Pins the upstream Response so undici's FinalizationRegistry can't GC it and cancel the body stream.
13
+ function retainResponse(target, response) {
14
+ Object.defineProperty(target, "__fern_response_ref", {
15
+ value: response,
16
+ enumerable: false,
17
+ configurable: true,
18
+ writable: false,
19
+ });
20
+ }
12
21
  export function getResponseBody(response, responseType) {
13
22
  return __awaiter(this, void 0, void 0, function* () {
14
23
  switch (responseType) {
@@ -28,6 +37,7 @@ export function getResponseBody(response, responseType) {
28
37
  },
29
38
  };
30
39
  }
40
+ retainResponse(response.body, response);
31
41
  return response.body;
32
42
  case "streaming":
33
43
  if (response.body == null) {
@@ -39,6 +49,7 @@ export function getResponseBody(response, responseType) {
39
49
  },
40
50
  };
41
51
  }
52
+ retainResponse(response.body, response);
42
53
  return response.body;
43
54
  case "text":
44
55
  return yield response.text();
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "17.0.0";
1
+ export declare const SDK_VERSION = "17.0.1";
@@ -1 +1 @@
1
- export const SDK_VERSION = "17.0.0";
1
+ export const SDK_VERSION = "17.0.1";
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.0.3",
3
3
  "info": {
4
4
  "title": "Phenoml API",
5
- "version": "2903d5176690213e8f9bd937e4d4696088f870f9"
5
+ "version": "29e0b858e2cf7f5819be0c2c6a4a094c74ae1eed"
6
6
  },
7
7
  "x-services": [
8
8
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phenoml",
3
- "version": "17.0.0",
3
+ "version": "17.0.1",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",