@fern-api/fern-api-dev 5.101.2 → 5.102.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 +160 -15
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -357882,7 +357882,7 @@ var init_OperationConverter = __esm({
357882
357882
  return void 0;
357883
357883
  }
357884
357884
  const { group, method: method8 } = this.computeGroupNameAndLocationFromExtensions() ?? this.computeGroupNameFromTagAndOperationId();
357885
- const groupDisplayName = this.getGroupDisplayName(group);
357885
+ const groupDisplayName2 = this.getGroupDisplayName(group);
357886
357886
  const { headers: headers2, pathParameters, queryParameters } = this.convertParameters({
357887
357887
  breadcrumbs: [...this.breadcrumbs, "parameters"]
357888
357888
  });
@@ -358032,7 +358032,7 @@ var init_OperationConverter = __esm({
358032
358032
  return {
358033
358033
  audiences,
358034
358034
  group,
358035
- groupDisplayName,
358035
+ groupDisplayName: groupDisplayName2,
358036
358036
  errors: topLevelErrors,
358037
358037
  endpoint: {
358038
358038
  ...baseEndpoint,
@@ -703430,7 +703430,7 @@ var AccessTokenPosthogManager = class {
703430
703430
  properties: {
703431
703431
  ...event,
703432
703432
  ...event.properties,
703433
- version: "5.101.2",
703433
+ version: "5.102.0",
703434
703434
  usingAccessToken: true,
703435
703435
  ...getRunIdProperties()
703436
703436
  }
@@ -703496,7 +703496,7 @@ var UserPosthogManager = class {
703496
703496
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
703497
703497
  event: "CLI",
703498
703498
  properties: {
703499
- version: "5.101.2",
703499
+ version: "5.102.0",
703500
703500
  ...event,
703501
703501
  ...event.properties,
703502
703502
  usingAccessToken: false,
@@ -884878,7 +884878,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
884878
884878
  var LOGS_FOLDER_NAME = "logs";
884879
884879
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
884880
884880
  function getCliSource() {
884881
- const version7 = "5.101.2";
884881
+ const version7 = "5.102.0";
884882
884882
  return `cli@${version7}`;
884883
884883
  }
884884
884884
  var DebugLogger = class {
@@ -903930,6 +903930,104 @@ function renderCompoundPage(compound, meta5) {
903930
903930
  }
903931
903931
  }
903932
903932
 
903933
+ // ../library-docs-generator/lib/cpp/src/renderers/GroupPageRenderer.js
903934
+ function isNamedMember(member) {
903935
+ return member.path.trim().length > 0;
903936
+ }
903937
+ function collectEntries(items) {
903938
+ return items.filter(isNamedMember).map((item) => ({ displayName: item.path, linkPath: buildLinkPath(item.path) })).sort((a3, b5) => a3.displayName.localeCompare(b5.displayName));
903939
+ }
903940
+ function collectFunctionEntries(functions2) {
903941
+ const seen = /* @__PURE__ */ new Set();
903942
+ const entries24 = [];
903943
+ for (const func2 of functions2) {
903944
+ if (!isNamedMember(func2)) {
903945
+ continue;
903946
+ }
903947
+ const stripped = stripTemplateArgs(func2.path);
903948
+ if (seen.has(stripped)) {
903949
+ continue;
903950
+ }
903951
+ seen.add(stripped);
903952
+ entries24.push({ displayName: func2.path, linkPath: buildLinkPath(stripped) });
903953
+ }
903954
+ return entries24.sort((a3, b5) => a3.displayName.localeCompare(b5.displayName));
903955
+ }
903956
+ function collectGroupSections(group) {
903957
+ const classes = group.classes ?? [];
903958
+ const sections = [
903959
+ { heading: "Classes", entries: collectEntries(classes.filter((cls) => cls.kind !== "struct")) },
903960
+ { heading: "Structs", entries: collectEntries(classes.filter((cls) => cls.kind === "struct")) },
903961
+ { heading: "Functions", entries: collectFunctionEntries(group.functions ?? []) },
903962
+ { heading: "Enumerations", entries: collectEntries(group.enums ?? []) },
903963
+ { heading: "Type Definitions", entries: collectEntries(group.typedefs ?? []) },
903964
+ { heading: "Variables", entries: collectEntries(group.variables ?? []) }
903965
+ ];
903966
+ return sections.filter((section) => section.entries.length > 0);
903967
+ }
903968
+ function groupHasContent(group, visited = /* @__PURE__ */ new Set()) {
903969
+ if (visited.has(group.id)) {
903970
+ return false;
903971
+ }
903972
+ visited.add(group.id);
903973
+ const hasMembers = [group.classes, group.functions, group.enums, group.typedefs, group.variables].some((members) => members != null && members.some(isNamedMember));
903974
+ return hasMembers || group.subgroups.some((subgroup) => groupHasContent(subgroup, visited));
903975
+ }
903976
+ function renderEntries(entries24, lines) {
903977
+ for (const entry of entries24) {
903978
+ if (entry.linkPath) {
903979
+ lines.push(`- [\`${entry.displayName}\`](${entry.linkPath})`);
903980
+ } else {
903981
+ lines.push(`- \`${entry.displayName}\``);
903982
+ }
903983
+ }
903984
+ }
903985
+ function renderGroupPage(group, sections, subgroupEntries) {
903986
+ const lines = [];
903987
+ const docstring = group.docstring;
903988
+ const title2 = group.title || group.name;
903989
+ const summaryText = docstring ? renderSegmentsPlainText(docstring.summary) : "";
903990
+ const description = summaryText.length > 0 ? summaryText : `Members of the ${title2} group.`;
903991
+ lines.push(...renderFrontmatter(title2, description));
903992
+ if (docstring?.summary && docstring.summary.length > 0) {
903993
+ const summary = renderSegmentsTrimmed(docstring.summary);
903994
+ if (summary) {
903995
+ lines.push("", summary);
903996
+ }
903997
+ }
903998
+ if (docstring?.description && docstring.description.length > 0) {
903999
+ const desc = renderDescriptionBlocksDeduped(docstring.description, docstring.summary);
904000
+ if (desc) {
904001
+ lines.push("", desc);
904002
+ }
904003
+ }
904004
+ for (const section of sections) {
904005
+ lines.push("", `## ${section.heading}`, "");
904006
+ renderEntries(section.entries, lines);
904007
+ }
904008
+ if (subgroupEntries.length > 0) {
904009
+ lines.push("", "## Subgroups", "");
904010
+ for (const entry of subgroupEntries) {
904011
+ lines.push(`- [${entry.displayName}](${entry.linkPath})`);
904012
+ }
904013
+ }
904014
+ trimTrailingBlankLines(lines);
904015
+ return lines.join("\n") + "\n";
904016
+ }
904017
+ function renderGroupsIndexPage(entries24, libraryTitle) {
904018
+ const lines = [];
904019
+ const library = libraryTitle.trim();
904020
+ const title2 = library.length > 0 ? `${library} \u2014 Groups` : "Groups";
904021
+ const description = library.length > 0 ? `Documentation groups in ${library}.` : "Documentation groups in this library.";
904022
+ lines.push(...renderFrontmatter(title2, description));
904023
+ lines.push("");
904024
+ for (const entry of entries24) {
904025
+ lines.push(`- [${entry.displayName}](${entry.linkPath})`);
904026
+ }
904027
+ trimTrailingBlankLines(lines);
904028
+ return lines.join("\n") + "\n";
904029
+ }
904030
+
903933
904031
  // ../library-docs-generator/lib/cpp/src/renderers/IndexPageRenderer.js
903934
904032
  function collectClassEntries(classes, kind) {
903935
904033
  return classes.filter((cls) => cls.kind === kind).map((cls) => ({
@@ -903943,7 +904041,7 @@ function collectEntityEntries(items) {
903943
904041
  linkPath: buildLinkPath(item.path)
903944
904042
  })).sort((a3, b5) => a3.displayName.localeCompare(b5.displayName));
903945
904043
  }
903946
- function collectFunctionEntries(functions2) {
904044
+ function collectFunctionEntries2(functions2) {
903947
904045
  const seen = /* @__PURE__ */ new Set();
903948
904046
  const entries24 = [];
903949
904047
  for (const func2 of functions2) {
@@ -903978,7 +904076,7 @@ var ENTITY_CATEGORIES = [
903978
904076
  {
903979
904077
  folderName: "functions",
903980
904078
  heading: "Functions",
903981
- collectEntries: (ns2) => collectFunctionEntries(ns2.functions)
904079
+ collectEntries: (ns2) => collectFunctionEntries2(ns2.functions)
903982
904080
  },
903983
904081
  {
903984
904082
  folderName: "enums",
@@ -904003,7 +904101,7 @@ function namespaceHasEntities(ns2) {
904003
904101
  }
904004
904102
  return ns2.namespaces.some((child) => namespaceHasEntities(child));
904005
904103
  }
904006
- function renderNamespaceIndexPage(title2, categories, hasChildNamespaces, nsLastSegment) {
904104
+ function renderNamespaceIndexPage(title2, categories, hasChildNamespaces, nsLastSegment, hasGroups = false) {
904007
904105
  const lines = [];
904008
904106
  const descriptionSubject = title2.endsWith(" API Reference") ? title2.replace(/ API Reference$/, "") : title2;
904009
904107
  const description = `API reference for the ${descriptionSubject} namespace.`;
@@ -904015,6 +904113,9 @@ function renderNamespaceIndexPage(title2, categories, hasChildNamespaces, nsLast
904015
904113
  if (hasChildNamespaces) {
904016
904114
  lines.push(`- [Namespaces](${nsLastSegment}/namespaces)`);
904017
904115
  }
904116
+ if (hasGroups) {
904117
+ lines.push(`- [Groups](${nsLastSegment}/groups)`);
904118
+ }
904018
904119
  trimTrailingBlankLines(lines);
904019
904120
  return lines.join("\n") + "\n";
904020
904121
  }
@@ -904107,13 +904208,15 @@ function generateCpp(options2) {
904107
904208
  const content5 = renderCompoundPage(entry.collected.compound, meta5);
904108
904209
  writer2.writePage(entry.pageKey, content5);
904109
904210
  }
904211
+ const groups2 = (ir3.groups ?? []).filter((group) => groupHasContent(group));
904110
904212
  const slugBaseName = slug.includes("/") ? slug.split("/").pop() ?? slug : slug;
904111
904213
  const libraryNs = ir3.rootNamespace.namespaces.find((child) => child.name === slugBaseName);
904112
904214
  if (libraryNs) {
904113
904215
  const title2 = LIBRARY_TITLES[libraryNs.name] ?? `${libraryNs.name} API Reference`;
904114
904216
  const outputFolderSlug = slugifySegment(outputDir.split("/").pop() || slug);
904115
- generateIndexPages(libraryNs, title2, writer2, rootNsName, outputFolderSlug);
904217
+ generateIndexPages(libraryNs, title2, writer2, rootNsName, outputFolderSlug, groups2.length > 0);
904116
904218
  }
904219
+ generateGroupPages(groups2, writer2, repo.trim() || (rootNsName ?? slug));
904117
904220
  return writer2.result();
904118
904221
  } finally {
904119
904222
  clearEntityRegistry();
@@ -904352,7 +904455,7 @@ var LIBRARY_TITLES = {
904352
904455
  thrust: "Thrust API Reference",
904353
904456
  cuda: "libcudacxx API Reference"
904354
904457
  };
904355
- function generateIndexPages(ns2, title2, writer2, rootNsName, outputFolderSlug) {
904458
+ function generateIndexPages(ns2, title2, writer2, rootNsName, outputFolderSlug, hasGroups) {
904356
904459
  if (!namespaceHasEntities(ns2)) {
904357
904460
  return;
904358
904461
  }
@@ -904374,7 +904477,7 @@ function generateIndexPages(ns2, title2, writer2, rootNsName, outputFolderSlug)
904374
904477
  entries: cat.collectEntries(ns2)
904375
904478
  }));
904376
904479
  const nsLastSegment = nsDir ? slugifySegment(nsDir.split("/").pop() || ns2.name) : outputFolderSlug;
904377
- const indexContent = renderNamespaceIndexPage(title2, categoriesForNsIndex, childrenWithEntities.length > 0, nsLastSegment);
904480
+ const indexContent = renderNamespaceIndexPage(title2, categoriesForNsIndex, childrenWithEntities.length > 0, nsLastSegment, hasGroups);
904378
904481
  writer2.writePage(nsIndexPageKey, indexContent);
904379
904482
  for (const category of nonEmptyCategories) {
904380
904483
  const catPageKey = nsDir ? `${nsDir}/${category.folderName}/index.mdx` : `${category.folderName}/index.mdx`;
@@ -904399,7 +904502,49 @@ function generateIndexPages(ns2, title2, writer2, rootNsName, outputFolderSlug)
904399
904502
  writer2.writePage(nsListPageKey, namespacesContent);
904400
904503
  }
904401
904504
  for (const child of ns2.namespaces) {
904402
- generateIndexPages(child, `Namespace ${child.path}`, writer2, rootNsName, outputFolderSlug);
904505
+ generateIndexPages(child, `Namespace ${child.path}`, writer2, rootNsName, outputFolderSlug, false);
904506
+ }
904507
+ }
904508
+ var GROUPS_FOLDER = "groups";
904509
+ function groupFolderName(group) {
904510
+ return sanitizeForFilename(group.name || group.title);
904511
+ }
904512
+ function groupDisplayName(group) {
904513
+ return group.title || group.name;
904514
+ }
904515
+ function generateGroupPages(renderable, writer2, libraryTitle) {
904516
+ if (renderable.length === 0) {
904517
+ return;
904518
+ }
904519
+ const indexPageKey = `${GROUPS_FOLDER}/index.mdx`;
904520
+ setCurrentPageSlugPath(pageKeyToSlugPath(indexPageKey));
904521
+ const entries24 = renderable.map((group) => ({
904522
+ displayName: groupDisplayName(group),
904523
+ linkPath: `${GROUPS_FOLDER}/${slugifySegment(groupFolderName(group))}`
904524
+ }));
904525
+ writer2.writePage(indexPageKey, renderGroupsIndexPage(entries24, libraryTitle));
904526
+ const written = /* @__PURE__ */ new Set();
904527
+ for (const group of renderable) {
904528
+ writeGroupPage(group, `${GROUPS_FOLDER}/${groupFolderName(group)}`, writer2, written);
904529
+ }
904530
+ }
904531
+ function writeGroupPage(group, dir, writer2, written) {
904532
+ if (written.has(group.id)) {
904533
+ return;
904534
+ }
904535
+ written.add(group.id);
904536
+ const pageKey = `${dir}/index.mdx`;
904537
+ setCurrentPageSlugPath(pageKeyToSlugPath(pageKey));
904538
+ const sections = collectGroupSections(group);
904539
+ const subgroups = group.subgroups.filter((subgroup) => !written.has(subgroup.id) && groupHasContent(subgroup));
904540
+ const dirSegment = slugifySegment(dir.split("/").pop() ?? "");
904541
+ const subgroupEntries = subgroups.map((subgroup) => ({
904542
+ displayName: groupDisplayName(subgroup),
904543
+ linkPath: `${dirSegment}/${slugifySegment(groupFolderName(subgroup))}`
904544
+ }));
904545
+ writer2.writePage(pageKey, renderGroupPage(group, sections, subgroupEntries));
904546
+ for (const subgroup of subgroups) {
904547
+ writeGroupPage(subgroup, `${dir}/${groupFolderName(subgroup)}`, writer2, written);
904403
904548
  }
904404
904549
  }
904405
904550
 
@@ -910798,7 +910943,7 @@ var LegacyDocsPublisher = class {
910798
910943
  previewId,
910799
910944
  disableTemplates: void 0,
910800
910945
  skipUpload,
910801
- cliVersion: "5.101.2",
910946
+ cliVersion: "5.102.0",
910802
910947
  loginCommand: "fern auth login"
910803
910948
  });
910804
910949
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -978169,7 +978314,7 @@ function getAutomationContextFromEnv() {
978169
978314
  config_branch: process.env.FERN_CONFIG_BRANCH,
978170
978315
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
978171
978316
  trigger: process.env.GITHUB_EVENT_NAME,
978172
- cli_version: "5.101.2"
978317
+ cli_version: "5.102.0"
978173
978318
  };
978174
978319
  }
978175
978320
  function isAutomationMode() {
@@ -979001,7 +979146,7 @@ var CliContext = class _CliContext {
979001
979146
  if (false) {
979002
979147
  this.logger.error("CLI_VERSION is not defined");
979003
979148
  }
979004
- return "5.101.2";
979149
+ return "5.102.0";
979005
979150
  }
979006
979151
  getCliName() {
979007
979152
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.101.2",
2
+ "version": "5.102.0",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",