@fern-api/fern-api-dev 5.109.2 → 5.109.3

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 +61 -10
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -347311,6 +347311,9 @@ var init_ErrorCollector = __esm({
347311
347311
  });
347312
347312
 
347313
347313
  // ../api-importers/v3-importer-commons/lib/AbstractConverterContext.js
347314
+ function isMarkedDeprecated(node4) {
347315
+ return "deprecated" in node4 && node4.deprecated === true;
347316
+ }
347314
347317
  var AbstractConverterContext;
347315
347318
  var init_AbstractConverterContext = __esm({
347316
347319
  "../api-importers/v3-importer-commons/lib/AbstractConverterContext.js"() {
@@ -347733,13 +347736,30 @@ var init_AbstractConverterContext = __esm({
347733
347736
  return converted.audiences;
347734
347737
  }
347735
347738
  getAvailability({ node: node4, breadcrumbs }) {
347739
+ const visitedReferences = /* @__PURE__ */ new Set();
347736
347740
  while (this.isReferenceObject(node4)) {
347741
+ const declared = this.getDeclaredAvailability({ node: node4, breadcrumbs });
347742
+ if (declared != null) {
347743
+ return declared;
347744
+ }
347745
+ if (visitedReferences.has(node4.$ref)) {
347746
+ return void 0;
347747
+ }
347748
+ visitedReferences.add(node4.$ref);
347737
347749
  const resolved = this.resolveReference({ reference: node4 });
347738
347750
  if (!resolved.resolved) {
347739
347751
  return void 0;
347740
347752
  }
347741
347753
  node4 = resolved.value;
347742
347754
  }
347755
+ return this.getDeclaredAvailability({ node: node4, breadcrumbs });
347756
+ }
347757
+ /**
347758
+ * Reads the availability declared directly on a node, without resolving references.
347759
+ * Annotations written alongside a `$ref` describe that particular usage, so callers
347760
+ * consult them before falling back to the referenced schema.
347761
+ */
347762
+ getDeclaredAvailability({ node: node4, breadcrumbs }) {
347743
347763
  const availabilityExtension = new extensions_exports.FernAvailabilityExtension({
347744
347764
  node: node4,
347745
347765
  breadcrumbs,
@@ -347752,7 +347772,7 @@ var init_AbstractConverterContext = __esm({
347752
347772
  message: void 0
347753
347773
  };
347754
347774
  }
347755
- if (node4.deprecated === true) {
347775
+ if (isMarkedDeprecated(node4)) {
347756
347776
  return {
347757
347777
  status: AvailabilityStatus.Deprecated,
347758
347778
  message: void 0
@@ -352364,7 +352384,11 @@ var init_SchemaOrReferenceConverter = __esm({
352364
352384
  if (response.ok) {
352365
352385
  return {
352366
352386
  type: this.wrapTypeReference(response.reference),
352367
- inlinedTypes: response.inlinedTypes ?? {}
352387
+ inlinedTypes: response.inlinedTypes ?? {},
352388
+ availability: this.context.getAvailability({
352389
+ node: schemaOrReference,
352390
+ breadcrumbs: this.breadcrumbs
352391
+ })
352368
352392
  };
352369
352393
  }
352370
352394
  }
@@ -352384,7 +352408,8 @@ var init_SchemaOrReferenceConverter = __esm({
352384
352408
  if (response.ok) {
352385
352409
  return {
352386
352410
  type: this.wrapTypeReference(response.reference),
352387
- inlinedTypes: response.inlinedTypes ?? {}
352411
+ inlinedTypes: response.inlinedTypes ?? {},
352412
+ availability: this.getAvailabilityOfSelfOrReference(allOfReference)
352388
352413
  };
352389
352414
  }
352390
352415
  }
@@ -352406,13 +352431,39 @@ var init_SchemaOrReferenceConverter = __esm({
352406
352431
  if (response.ok) {
352407
352432
  return {
352408
352433
  type: this.wrapTypeReference(response.reference),
352409
- inlinedTypes: response.inlinedTypes ?? {}
352434
+ inlinedTypes: response.inlinedTypes ?? {},
352435
+ availability: this.getAvailabilityOfSelfOrReference(singleRef)
352410
352436
  };
352411
352437
  }
352412
352438
  }
352413
352439
  }
352414
352440
  return void 0;
352415
352441
  }
352442
+ /**
352443
+ * Availability declared alongside the `allOf` takes precedence over the availability
352444
+ * of the referenced schema, since the outer schema is the more specific declaration.
352445
+ * Inline `allOf` siblings are consulted next: when the sibling carries nothing but
352446
+ * metadata we short-circuit to the `$ref`, so a `deprecated` written there would
352447
+ * otherwise be dropped.
352448
+ */
352449
+ getAvailabilityOfSelfOrReference(reference4) {
352450
+ for (const node4 of [...this.getSelfAndInlineAllOfElements(), reference4]) {
352451
+ const availability = this.context.getAvailability({ node: node4, breadcrumbs: this.breadcrumbs });
352452
+ if (availability != null) {
352453
+ return availability;
352454
+ }
352455
+ }
352456
+ return void 0;
352457
+ }
352458
+ getSelfAndInlineAllOfElements() {
352459
+ if (this.context.isReferenceObject(this.schemaOrReference) || this.schemaOrReference.allOf == null) {
352460
+ return [this.schemaOrReference];
352461
+ }
352462
+ return [
352463
+ this.schemaOrReference,
352464
+ ...this.schemaOrReference.allOf.filter((element4) => !this.context.isReferenceObject(element4))
352465
+ ];
352466
+ }
352416
352467
  convertSchemaObject({ schema }) {
352417
352468
  const schemaId = this.schemaIdOverride ?? this.context.convertBreadcrumbsToName(this.breadcrumbs);
352418
352469
  const namespacedSchemaId = this.context.getNamespacedSchemaId(schemaId);
@@ -705228,7 +705279,7 @@ var AccessTokenPosthogManager = class {
705228
705279
  properties: {
705229
705280
  ...event,
705230
705281
  ...event.properties,
705231
- version: "5.109.2",
705282
+ version: "5.109.3",
705232
705283
  usingAccessToken: true,
705233
705284
  ...getRunIdProperties()
705234
705285
  }
@@ -705294,7 +705345,7 @@ var UserPosthogManager = class {
705294
705345
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
705295
705346
  event: "CLI",
705296
705347
  properties: {
705297
- version: "5.109.2",
705348
+ version: "5.109.3",
705298
705349
  ...event,
705299
705350
  ...event.properties,
705300
705351
  usingAccessToken: false,
@@ -886968,7 +887019,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
886968
887019
  var LOGS_FOLDER_NAME = "logs";
886969
887020
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
886970
887021
  function getCliSource() {
886971
- const version7 = "5.109.2";
887022
+ const version7 = "5.109.3";
886972
887023
  return `cli@${version7}`;
886973
887024
  }
886974
887025
  var DebugLogger = class {
@@ -913932,7 +913983,7 @@ var LegacyDocsPublisher = class {
913932
913983
  previewId,
913933
913984
  disableTemplates: void 0,
913934
913985
  skipUpload,
913935
- cliVersion: "5.109.2",
913986
+ cliVersion: "5.109.3",
913936
913987
  loginCommand: "fern auth login"
913937
913988
  });
913938
913989
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -980852,7 +980903,7 @@ function getAutomationContextFromEnv() {
980852
980903
  config_branch: process.env.FERN_CONFIG_BRANCH,
980853
980904
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
980854
980905
  trigger: process.env.GITHUB_EVENT_NAME,
980855
- cli_version: "5.109.2"
980906
+ cli_version: "5.109.3"
980856
980907
  };
980857
980908
  }
980858
980909
  function isAutomationMode() {
@@ -981684,7 +981735,7 @@ var CliContext = class _CliContext {
981684
981735
  if (false) {
981685
981736
  this.logger.error("CLI_VERSION is not defined");
981686
981737
  }
981687
- return "5.109.2";
981738
+ return "5.109.3";
981688
981739
  }
981689
981740
  getCliName() {
981690
981741
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.109.2",
2
+ "version": "5.109.3",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",