@fern-api/fern-api-dev 3.32.0-8-g266a52031a → 3.33.0

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/cli.cjs +60 -4
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -1413765,7 +1413765,7 @@ var AccessTokenPosthogManager = class {
1413765
1413765
  properties: {
1413766
1413766
  ...event,
1413767
1413767
  ...event.properties,
1413768
- version: "3.32.0-8-g266a52031a",
1413768
+ version: "3.33.0",
1413769
1413769
  usingAccessToken: true
1413770
1413770
  }
1413771
1413771
  });
@@ -1413864,7 +1413864,7 @@ var UserPosthogManager = class {
1413864
1413864
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1413865
1413865
  event: "CLI",
1413866
1413866
  properties: {
1413867
- version: "3.32.0-8-g266a52031a",
1413867
+ version: "3.33.0",
1413868
1413868
  ...event,
1413869
1413869
  ...event.properties,
1413870
1413870
  usingAccessToken: false,
@@ -1486459,6 +1486459,10 @@ var SchemaConverter = class _SchemaConverter extends AbstractConverter {
1486459
1486459
  if (maybeConvertedMapSchema != null) {
1486460
1486460
  return maybeConvertedMapSchema;
1486461
1486461
  }
1486462
+ const maybeConvertedDiscriminatorMappingSchema = this.tryConvertDiscriminatorMappingSchema();
1486463
+ if (maybeConvertedDiscriminatorMappingSchema != null) {
1486464
+ return maybeConvertedDiscriminatorMappingSchema;
1486465
+ }
1486462
1486466
  const maybeConvertedObjectAllOfSchema = this.tryConvertObjectAllOfSchema();
1486463
1486467
  if (maybeConvertedObjectAllOfSchema != null) {
1486464
1486468
  return maybeConvertedObjectAllOfSchema;
@@ -1486670,6 +1486674,38 @@ var SchemaConverter = class _SchemaConverter extends AbstractConverter {
1486670
1486674
  }
1486671
1486675
  return void 0;
1486672
1486676
  }
1486677
+ tryConvertDiscriminatorMappingSchema() {
1486678
+ if (this.schema.discriminator?.mapping != null && Object.keys(this.schema.discriminator.mapping).length > 0 && this.schema.oneOf == null && this.schema.anyOf == null) {
1486679
+ const schemaWithOneOf = {
1486680
+ ...this.schema,
1486681
+ oneOf: Object.values(this.schema.discriminator.mapping).map((ref2) => ({
1486682
+ $ref: ref2
1486683
+ }))
1486684
+ };
1486685
+ const oneOfConverter = new OneOfSchemaConverter({
1486686
+ id: this.id,
1486687
+ context: this.context,
1486688
+ breadcrumbs: this.breadcrumbs,
1486689
+ schema: schemaWithOneOf,
1486690
+ inlinedTypes: {}
1486691
+ });
1486692
+ const oneOfType = oneOfConverter.convert();
1486693
+ if (oneOfType != null) {
1486694
+ return {
1486695
+ convertedSchema: {
1486696
+ typeDeclaration: this.createTypeDeclaration({
1486697
+ shape: oneOfType.type,
1486698
+ referencedTypes: oneOfType.referencedTypes
1486699
+ }),
1486700
+ audiences: this.audiences,
1486701
+ propertiesByAudience: {}
1486702
+ },
1486703
+ inlinedTypes: oneOfType.inlinedTypes
1486704
+ };
1486705
+ }
1486706
+ }
1486707
+ return void 0;
1486708
+ }
1486673
1486709
  tryConvertObjectAllOfSchema() {
1486674
1486710
  if (this.schema.type === "object" || this.schema.properties != null || this.schema.allOf != null) {
1486675
1486711
  const objectConverter = new ObjectSchemaConverter({
@@ -1493932,7 +1493968,7 @@ var CliContext = class {
1493932
1493968
  if (false) {
1493933
1493969
  this.logger.error("CLI_VERSION is not defined");
1493934
1493970
  }
1493935
- return "3.32.0-8-g266a52031a";
1493971
+ return "3.33.0";
1493936
1493972
  }
1493937
1493973
  getCliName() {
1493938
1493974
  if (false) {
@@ -1514498,6 +1514534,26 @@ function convertSchemaObject(schema2, wrapAsOptional, wrapAsNullable, context2,
1514498
1514534
  source: source2
1514499
1514535
  });
1514500
1514536
  }
1514537
+ if (schema2.discriminator?.mapping != null && Object.keys(schema2.discriminator.mapping).length > 0 && schema2.oneOf == null && schema2.anyOf == null) {
1514538
+ return convertDiscriminatedOneOf({
1514539
+ nameOverride,
1514540
+ generatedName,
1514541
+ title: title5,
1514542
+ breadcrumbs,
1514543
+ description,
1514544
+ availability,
1514545
+ discriminator: schema2.discriminator,
1514546
+ properties: schema2.properties ?? {},
1514547
+ required: schema2.required,
1514548
+ wrapAsOptional,
1514549
+ wrapAsNullable,
1514550
+ context: context2,
1514551
+ namespace,
1514552
+ groupName,
1514553
+ encoding,
1514554
+ source: source2
1514555
+ });
1514556
+ }
1514501
1514557
  if (schema2.allOf != null || schema2.properties != null) {
1514502
1514558
  const filteredAllOfs = [];
1514503
1514559
  for (const allOf of schema2.allOf ?? []) {
@@ -1588792,7 +1588848,7 @@ var import_path35 = __toESM(require("path"), 1);
1588792
1588848
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
1588793
1588849
  var LOGS_FOLDER_NAME = "logs";
1588794
1588850
  function getCliSource() {
1588795
- const version6 = "3.32.0-8-g266a52031a";
1588851
+ const version6 = "3.33.0";
1588796
1588852
  return `cli@${version6}`;
1588797
1588853
  }
1588798
1588854
  var DebugLogger = class {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.32.0-8-g266a52031a",
2
+ "version": "3.33.0",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",