fern-api 0.23.4 → 0.23.5

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 +28 -15
  2. package/package.json +1 -1
package/bundle.cjs CHANGED
@@ -890696,7 +890696,7 @@ var AccessTokenPosthogManager = class {
890696
890696
  properties: {
890697
890697
  ...event,
890698
890698
  ...event.properties,
890699
- version: "0.23.4",
890699
+ version: "0.23.5",
890700
890700
  usingAccessToken: true
890701
890701
  }
890702
890702
  });
@@ -890758,7 +890758,7 @@ var UserPosthogManager = class {
890758
890758
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
890759
890759
  event: "CLI",
890760
890760
  properties: {
890761
- version: "0.23.4",
890761
+ version: "0.23.5",
890762
890762
  ...event,
890763
890763
  ...event.properties
890764
890764
  }
@@ -902771,7 +902771,8 @@ function buildTypeReference({
902771
902771
  case "enum":
902772
902772
  return buildEnumTypeReference({ schema: schema2, fileContainingReference, context, declarationFile });
902773
902773
  case "literal":
902774
- return buildLiteralTypeReference(schema2.value);
902774
+ schema2.value;
902775
+ return buildLiteralTypeReference(schema2);
902775
902776
  case "object":
902776
902777
  return buildObjectTypeReference({ schema: schema2, fileContainingReference, context, declarationFile });
902777
902778
  case "oneOf":
@@ -902872,15 +902873,27 @@ function buildOptionalTypeReference({ schema: schema2, fileContainingReference,
902872
902873
  function buildUnknownTypeReference() {
902873
902874
  return "unknown";
902874
902875
  }
902875
- function buildLiteralTypeReference(value) {
902876
- switch (value.type) {
902877
- case "boolean":
902878
- return `literal<${value.value}>`;
902879
- case "string":
902880
- return `literal<"${value.value}">`;
902876
+ function buildLiteralTypeReference(schema2) {
902877
+ let value;
902878
+ switch (schema2.value.type) {
902879
+ case "boolean": {
902880
+ value = `literal<${schema2.value.value}>`;
902881
+ break;
902882
+ }
902883
+ case "string": {
902884
+ value = `literal<"${schema2.value.value}">`;
902885
+ break;
902886
+ }
902881
902887
  default:
902882
- assertNever(value);
902888
+ assertNever(schema2.value);
902889
+ }
902890
+ if (schema2.description == null) {
902891
+ return value;
902883
902892
  }
902893
+ return {
902894
+ type: value,
902895
+ docs: schema2.description
902896
+ };
902884
902897
  }
902885
902898
  function buildEnumTypeReference({ schema: schema2, fileContainingReference, declarationFile, context }) {
902886
902899
  const enumTypeDeclaration = buildEnumTypeDeclaration(schema2);
@@ -902984,7 +902997,7 @@ function buildTypeDeclaration({ schema: schema2, context, declarationFile }) {
902984
902997
  case "enum":
902985
902998
  return buildEnumTypeDeclaration(schema2);
902986
902999
  case "literal":
902987
- return buildLiteralTypeDeclaration(schema2.value, schema2.nameOverride, schema2.generatedName);
903000
+ return buildLiteralTypeDeclaration(schema2, schema2.nameOverride, schema2.generatedName);
902988
903001
  case "object":
902989
903002
  return buildObjectTypeDeclaration({ schema: schema2, context, declarationFile });
902990
903003
  case "oneOf":
@@ -903245,10 +903258,10 @@ function buildUnknownTypeDeclaration(nameOverride, generatedName) {
903245
903258
  schema: buildUnknownTypeReference()
903246
903259
  };
903247
903260
  }
903248
- function buildLiteralTypeDeclaration(value, nameOverride, generatedName) {
903261
+ function buildLiteralTypeDeclaration(schema2, nameOverride, generatedName) {
903249
903262
  return {
903250
903263
  name: nameOverride ?? generatedName,
903251
- schema: buildLiteralTypeReference(value)
903264
+ schema: buildLiteralTypeReference(schema2)
903252
903265
  };
903253
903266
  }
903254
903267
  function buildOneOfTypeDeclaration({ schema: schema2, context, declarationFile }) {
@@ -915204,10 +915217,10 @@ var CliContext = class {
915204
915217
  return "fern-api";
915205
915218
  }
915206
915219
  getPackageVersion() {
915207
- if ("0.23.4" == null) {
915220
+ if ("0.23.5" == null) {
915208
915221
  this.logger.error("CLI_VERSION is not defined");
915209
915222
  }
915210
- return "0.23.4";
915223
+ return "0.23.5";
915211
915224
  }
915212
915225
  getCliName() {
915213
915226
  if ("fern" == null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fern-api",
3
- "version": "0.23.4",
3
+ "version": "0.23.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern.git",