fern-api 0.33.3 → 0.33.4

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.
Files changed (2) hide show
  1. package/bundle.cjs +16 -5
  2. package/package.json +1 -1
package/bundle.cjs CHANGED
@@ -1164535,7 +1164535,7 @@ var AccessTokenPosthogManager = class {
1164535
1164535
  properties: {
1164536
1164536
  ...event,
1164537
1164537
  ...event.properties,
1164538
- version: "0.33.3",
1164538
+ version: "0.33.4",
1164539
1164539
  usingAccessToken: true
1164540
1164540
  }
1164541
1164541
  });
@@ -1164597,7 +1164597,7 @@ var UserPosthogManager = class {
1164597
1164597
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1164598
1164598
  event: "CLI",
1164599
1164599
  properties: {
1164600
- version: "0.33.3",
1164600
+ version: "0.33.4",
1164601
1164601
  ...event,
1164602
1164602
  ...event.properties
1164603
1164603
  }
@@ -1183433,7 +1183433,18 @@ var ExampleEndpointFactory = class {
1183433
1183433
  });
1183434
1183434
  }
1183435
1183435
  }
1183436
- const requestResponsePairs = consolidateRequestResponseExamples(requestExamples, responseExamples);
1183436
+ let requestResponsePairs = [];
1183437
+ if (endpoint.request != null && endpoint.response != null) {
1183438
+ requestResponsePairs = consolidateRequestResponseExamples(requestExamples, responseExamples);
1183439
+ } else if (endpoint.request != null) {
1183440
+ requestResponsePairs = requestExamples.map(([id, example]) => {
1183441
+ return { id, request: example, response: void 0 };
1183442
+ });
1183443
+ } else if (endpoint.response != null) {
1183444
+ requestResponsePairs = responseExamples.map(([id, example]) => {
1183445
+ return { id, request: void 0, response: example };
1183446
+ });
1183447
+ }
1183437
1183448
  const codeSamples = endpoint.examples.filter((ex) => hasIncompleteExample(ex)).flatMap((ex) => {
1183438
1183449
  if (ex.type === "unknown") {
1183439
1183450
  if (ex.value != null) {
@@ -1192588,10 +1192599,10 @@ var CliContext = class {
1192588
1192599
  return "fern-api";
1192589
1192600
  }
1192590
1192601
  getPackageVersion() {
1192591
- if ("0.33.3" == null) {
1192602
+ if ("0.33.4" == null) {
1192592
1192603
  this.logger.error("CLI_VERSION is not defined");
1192593
1192604
  }
1192594
- return "0.33.3";
1192605
+ return "0.33.4";
1192595
1192606
  }
1192596
1192607
  getCliName() {
1192597
1192608
  if ("fern" == null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fern-api",
3
- "version": "0.33.3",
3
+ "version": "0.33.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern.git",