@fern-api/fern-api-dev 3.50.0-7-g31382f58716 → 3.50.1-1-g33bdaf2e4df

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 +45 -18
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -1430941,7 +1430941,7 @@ var AccessTokenPosthogManager = class {
1430941
1430941
  properties: {
1430942
1430942
  ...event,
1430943
1430943
  ...event.properties,
1430944
- version: "3.50.0-7-g31382f58716",
1430944
+ version: "3.50.1-1-g33bdaf2e4df",
1430945
1430945
  usingAccessToken: true
1430946
1430946
  }
1430947
1430947
  });
@@ -1431040,7 +1431040,7 @@ var UserPosthogManager = class {
1431040
1431040
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1431041
1431041
  event: "CLI",
1431042
1431042
  properties: {
1431043
- version: "3.50.0-7-g31382f58716",
1431043
+ version: "3.50.1-1-g33bdaf2e4df",
1431044
1431044
  ...event,
1431045
1431045
  ...event.properties,
1431046
1431046
  usingAccessToken: false,
@@ -1510475,7 +1510475,7 @@ var CliContext = class {
1510475
1510475
  if (false) {
1510476
1510476
  this.logger.error("CLI_VERSION is not defined");
1510477
1510477
  }
1510478
- return "3.50.0-7-g31382f58716";
1510478
+ return "3.50.1-1-g33bdaf2e4df";
1510479
1510479
  }
1510480
1510480
  getCliName() {
1510481
1510481
  if (false) {
@@ -1596900,7 +1596900,10 @@ function mergeAndFilterChildren({ left: left3, right: right3, findEndpointById,
1596900
1596900
  stringifyEndpointPathParts: stringifyEndpointPathParts3,
1596901
1596901
  disableEndpointPairs,
1596902
1596902
  apiDefinitionId
1596903
- }).filter((child) => child.type === "apiPackage" ? child.children.length > 0 : true);
1596903
+ }).filter((child) => (
1596904
+ // Keep apiPackage if it has children OR if it has an overviewPageId (e.g., tag description page)
1596905
+ child.type === "apiPackage" ? child.children.length > 0 || child.overviewPageId != null : true
1596906
+ ));
1596904
1596907
  }
1596905
1596908
 
1596906
1596909
  // ../docs-resolver/lib/utils/toRelativeFilepath.js
@@ -1596995,12 +1596998,19 @@ var ApiReferenceNodeConverter = class {
1596995
1596998
  get() {
1596996
1596999
  const pointsTo = navigation_exports2.V1.followRedirects(this.#children);
1596997
1597000
  const changelogNodeConverter = new ChangelogNodeConverter(this.markdownFilesToFullSlugs, this.markdownFilesToNoIndex, this.markdownFilesToTags, this.workspace?.changelog?.files.map((file2) => file2.absoluteFilepath), this.docsWorkspace, this.#idgen).orUndefined();
1597001
+ let overviewPageId = this.#overviewPageId;
1597002
+ if (overviewPageId == null) {
1597003
+ const apiPackageWithOverview = this.#children.find((child) => child.type === "apiPackage" && child.overviewPageId != null);
1597004
+ if (apiPackageWithOverview != null) {
1597005
+ overviewPageId = apiPackageWithOverview.overviewPageId;
1597006
+ }
1597007
+ }
1596998
1597008
  return {
1596999
1597009
  id: this.#idgen.get(this.apiDefinitionId),
1597000
1597010
  type: "apiReference",
1597001
1597011
  title: this.apiSection.title,
1597002
1597012
  apiDefinitionId: this.apiDefinitionId,
1597003
- overviewPageId: this.#overviewPageId,
1597013
+ overviewPageId,
1597004
1597014
  paginated: this.apiSection.paginated,
1597005
1597015
  slug: this.#slug.get(),
1597006
1597016
  icon: this.resolveIconFileId(this.apiSection.icon),
@@ -1597042,9 +1597052,10 @@ var ApiReferenceNodeConverter = class {
1597042
1597052
  const relativeFilePath = `tag-${subpackageName}.md`;
1597043
1597053
  const virtualAbsolutePath = AbsoluteFilePath2.of(`/${relativeFilePath}`);
1597044
1597054
  const pageId = navigation_exports2.V1.PageId(relativeFilePath);
1597055
+ const escapedDescription = tagInfo.description.replace(/\{/g, "\\{").replace(/\}/g, "\\}").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1597045
1597056
  const markdownContent = `# ${titleCase4(tagInfo.id.replace(/[_-]/g, " "))}
1597046
1597057
 
1597047
- ${tagInfo.description}`;
1597058
+ ${escapedDescription}`;
1597048
1597059
  this.#tagDescriptionContent.set(virtualAbsolutePath, markdownContent);
1597049
1597060
  this.markdownFilesToNoIndex.set(virtualAbsolutePath, false);
1597050
1597061
  this.markdownFilesToTags.set(virtualAbsolutePath, [subpackageName]);
@@ -1597482,7 +1597493,13 @@ ${tagInfo.description}`;
1597482
1597493
  }
1597483
1597494
  const slug = isSubpackage3(subpackage) ? parentSlug.apply(subpackage) : parentSlug;
1597484
1597495
  const subpackageChildren = this.#convertApiDefinitionPackageId(subpackageId, slug, parentAvailability);
1597485
- if (subpackageChildren.length > 0) {
1597496
+ const tagDescriptionPageId = this.createTagDescriptionPageId(subpackage);
1597497
+ const subpackageHolder = this.#holder.subpackages.get(APIV1Read_exports.SubpackageId(subpackageId));
1597498
+ const hasVisitedEndpoints = subpackageHolder ? Array.from(subpackageHolder.endpoints.values()).some((endpoint3) => {
1597499
+ const endpointId = this.#holder.getEndpointId(endpoint3);
1597500
+ return endpointId != null && this.#visitedEndpoints.has(endpointId);
1597501
+ }) : false;
1597502
+ if (subpackageChildren.length > 0 || tagDescriptionPageId != null && hasVisitedEndpoints) {
1597486
1597503
  additionalChildren.push({
1597487
1597504
  id: navigation_exports2.V1.NodeId(`${this.apiDefinitionId}:${subpackageId}`),
1597488
1597505
  type: "apiPackage",
@@ -1597491,7 +1597508,7 @@ ${tagInfo.description}`;
1597491
1597508
  slug: slug.get(),
1597492
1597509
  icon: void 0,
1597493
1597510
  hidden: this.hideChildren,
1597494
- overviewPageId: this.createTagDescriptionPageId(subpackage),
1597511
+ overviewPageId: tagDescriptionPageId,
1597495
1597512
  availability: parentAvailability,
1597496
1597513
  apiDefinitionId: this.apiDefinitionId,
1597497
1597514
  pointsTo: void 0,
@@ -1602621,7 +1602638,10 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
1602621
1602638
  loadAiExamples: true
1602622
1602639
  });
1602623
1602640
  if (openApiIr.tags.tagsById) {
1602624
- openApiTags = Object.fromEntries(Object.entries(openApiIr.tags.tagsById).filter(([_15, tag]) => tag.description && tag.description.trim().length > 0).map(([tagId, tag]) => [tagId, { id: String(tag.id), description: tag.description }]));
1602641
+ openApiTags = Object.fromEntries(Object.entries(openApiIr.tags.tagsById).filter(([_15, tag]) => tag.description && tag.description.trim().length > 0).map(([tagId, tag]) => [
1602642
+ camelCase_default(tagId),
1602643
+ { id: String(tag.id), description: tag.description }
1602644
+ ]));
1602625
1602645
  }
1602626
1602646
  } catch (error49) {
1602627
1602647
  this.taskContext.logger.warn("Failed to extract OpenAPI tags for tag description pages", String(error49));
@@ -1602800,7 +1602820,7 @@ The generated documentation will replace this placeholder page with complete API
1602800
1602820
  }
1602801
1602821
  async toSectionNode({ prefix: prefix2, item, parentSlug, hideChildren, parentAvailability }) {
1602802
1602822
  const relativeFilePath = this.toRelativeFilepath(item.overviewAbsolutePath);
1602803
- const pageId = relativeFilePath ? navigation_exports2.PageId(relativeFilePath) : void 0;
1602823
+ let pageId = relativeFilePath ? navigation_exports2.PageId(relativeFilePath) : void 0;
1602804
1602824
  const id2 = this.#idgen.get(pageId ?? `${prefix2}/section`);
1602805
1602825
  const slug = parentSlug.apply({
1602806
1602826
  urlSlug: item.slug ?? kebabCase_default(item.title),
@@ -1602809,6 +1602829,19 @@ The generated documentation will replace this placeholder page with complete API
1602809
1602829
  });
1602810
1602830
  const noindex = item.overviewAbsolutePath != null ? this.markdownFilesToNoIndex.get(item.overviewAbsolutePath) : void 0;
1602811
1602831
  const hiddenSection = hideChildren || item.hidden;
1602832
+ const children2 = await Promise.all(item.contents.map((child) => this.toNavigationChild({
1602833
+ prefix: id2,
1602834
+ item: child,
1602835
+ parentSlug: slug,
1602836
+ hideChildren: hiddenSection,
1602837
+ parentAvailability: item.availability ?? parentAvailability
1602838
+ })));
1602839
+ if (pageId == null) {
1602840
+ const flattenedApiRef = children2.find((child) => child.type === "apiReference" && child.hideTitle === true && child.overviewPageId != null);
1602841
+ if (flattenedApiRef != null) {
1602842
+ pageId = flattenedApiRef.overviewPageId;
1602843
+ }
1602844
+ }
1602812
1602845
  return {
1602813
1602846
  id: id2,
1602814
1602847
  type: "section",
@@ -1602820,13 +1602853,7 @@ The generated documentation will replace this placeholder page with complete API
1602820
1602853
  hidden: hiddenSection,
1602821
1602854
  viewers: item.viewers,
1602822
1602855
  orphaned: item.orphaned,
1602823
- children: await Promise.all(item.contents.map((child) => this.toNavigationChild({
1602824
- prefix: id2,
1602825
- item: child,
1602826
- parentSlug: slug,
1602827
- hideChildren: hiddenSection,
1602828
- parentAvailability: item.availability ?? parentAvailability
1602829
- }))),
1602856
+ children: children2,
1602830
1602857
  authed: void 0,
1602831
1602858
  pointsTo: void 0,
1602832
1602859
  noindex,
@@ -1611546,7 +1611573,7 @@ var import_path40 = __toESM(require("path"), 1);
1611546
1611573
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
1611547
1611574
  var LOGS_FOLDER_NAME = "logs";
1611548
1611575
  function getCliSource() {
1611549
- const version7 = "3.50.0-7-g31382f58716";
1611576
+ const version7 = "3.50.1-1-g33bdaf2e4df";
1611550
1611577
  return `cli@${version7}`;
1611551
1611578
  }
1611552
1611579
  var DebugLogger = class {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.50.0-7-g31382f58716",
2
+ "version": "3.50.1-1-g33bdaf2e4df",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",