@fern-api/fern-api-dev 3.56.10 → 3.57.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 +15 -10
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -1547623,7 +1547623,7 @@ async function getFrontmatterPosition({ absolutePath, readFileFn = (path86, enco
1547623
1547623
  }
1547624
1547624
  async function buildNavigationForDirectory({ directoryPath, getDir = getDirectoryContents, readFileFn = (path86, encoding) => (0, import_promises28.readFile)(path86, encoding) }) {
1547625
1547625
  const contents = await getDir(directoryPath);
1547626
- const markdownFiles = contents.filter((item) => item.type === "file" && (item.name.endsWith(".md") || item.name.endsWith(".mdx")));
1547626
+ const markdownFiles = contents.filter((item) => item.type === "file" && (item.name.toLowerCase().endsWith(".md") || item.name.toLowerCase().endsWith(".mdx")));
1547627
1547627
  const subdirectories = contents.filter((item) => item.type === "directory");
1547628
1547628
  const pagePositions = await Promise.all(markdownFiles.map((file4) => getFrontmatterPosition({ absolutePath: file4.absolutePath, readFileFn })));
1547629
1547629
  const pages = markdownFiles.map((file4) => {
@@ -1547647,16 +1547647,18 @@ async function buildNavigationForDirectory({ directoryPath, getDir = getDirector
1547647
1547647
  getDir,
1547648
1547648
  readFileFn
1547649
1547649
  });
1547650
+ const indexPage = subContents.find((item) => item.type === "page" && (item.slug === "index" || item.absolutePath.toLowerCase().endsWith("/index.mdx") || item.absolutePath.toLowerCase().endsWith("/index.md")));
1547651
+ const filteredContents = indexPage ? subContents.filter((item) => item !== indexPage) : subContents;
1547650
1547652
  return {
1547651
1547653
  type: "section",
1547652
1547654
  title: nameToTitle({ name: dir.name }),
1547653
1547655
  slug: nameToSlug({ name: dir.name }),
1547654
1547656
  icon: void 0,
1547655
- contents: subContents,
1547657
+ contents: filteredContents,
1547656
1547658
  collapsed: void 0,
1547657
1547659
  hidden: void 0,
1547658
1547660
  skipUrlSlug: false,
1547659
- overviewAbsolutePath: void 0,
1547661
+ overviewAbsolutePath: indexPage?.type === "page" ? indexPage.absolutePath : void 0,
1547660
1547662
  viewers: void 0,
1547661
1547663
  orphaned: void 0,
1547662
1547664
  featureFlags: void 0,
@@ -1548362,6 +1548364,8 @@ async function expandFolderConfiguration({ rawConfig, absolutePathToFernFolder,
1548362
1548364
  context2.failAndThrow(`Folder not found: ${rawConfig.folder}`);
1548363
1548365
  }
1548364
1548366
  const contents = await buildNavigationForDirectory({ directoryPath: folderPath });
1548367
+ const indexPage = contents.find((item) => item.type === "page" && (item.slug === "index" || item.absolutePath.toLowerCase().endsWith("/index.mdx") || item.absolutePath.toLowerCase().endsWith("/index.md")));
1548368
+ const filteredContents = indexPage ? contents.filter((item) => item !== indexPage) : contents;
1548365
1548369
  const folderName = import_path28.default.basename(folderPath);
1548366
1548370
  const title4 = rawConfig.title ?? nameToTitle({ name: folderName });
1548367
1548371
  const slug = rawConfig.slug ?? nameToSlug({ name: folderName });
@@ -1548369,12 +1548373,12 @@ async function expandFolderConfiguration({ rawConfig, absolutePathToFernFolder,
1548369
1548373
  type: "section",
1548370
1548374
  title: title4,
1548371
1548375
  icon: resolveIconPath(rawConfig.icon, absolutePathToConfig),
1548372
- contents,
1548376
+ contents: filteredContents,
1548373
1548377
  slug,
1548374
1548378
  collapsed: rawConfig.collapsed ?? void 0,
1548375
1548379
  hidden: rawConfig.hidden ?? void 0,
1548376
1548380
  skipUrlSlug: rawConfig.skipSlug ?? false,
1548377
- overviewAbsolutePath: void 0,
1548381
+ overviewAbsolutePath: indexPage?.type === "page" ? indexPage.absolutePath : void 0,
1548378
1548382
  viewers: parseRoles(rawConfig.viewers),
1548379
1548383
  orphaned: rawConfig.orphaned,
1548380
1548384
  featureFlags: convertFeatureFlag(rawConfig.featureFlag),
@@ -1672634,7 +1672638,7 @@ var AccessTokenPosthogManager = class {
1672634
1672638
  properties: {
1672635
1672639
  ...event,
1672636
1672640
  ...event.properties,
1672637
- version: "3.56.10",
1672641
+ version: "3.57.0",
1672638
1672642
  usingAccessToken: true
1672639
1672643
  }
1672640
1672644
  });
@@ -1672684,7 +1672688,7 @@ var UserPosthogManager = class {
1672684
1672688
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1672685
1672689
  event: "CLI",
1672686
1672690
  properties: {
1672687
- version: "3.56.10",
1672691
+ version: "3.57.0",
1672688
1672692
  ...event,
1672689
1672693
  ...event.properties,
1672690
1672694
  usingAccessToken: false,
@@ -1704606,7 +1704610,7 @@ var CliContext = class {
1704606
1704610
  if (false) {
1704607
1704611
  this.logger.error("CLI_VERSION is not defined");
1704608
1704612
  }
1704609
- return "3.56.10";
1704613
+ return "3.57.0";
1704610
1704614
  }
1704611
1704615
  getCliName() {
1704612
1704616
  if (false) {
@@ -1707720,7 +1707724,7 @@ var import_path54 = __toESM(require("path"), 1);
1707720
1707724
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
1707721
1707725
  var LOGS_FOLDER_NAME = "logs";
1707722
1707726
  function getCliSource() {
1707723
- const version7 = "3.56.10";
1707727
+ const version7 = "3.57.0";
1707724
1707728
  return `cli@${version7}`;
1707725
1707729
  }
1707726
1707730
  var DebugLogger = class {
@@ -1725259,7 +1725263,8 @@ async function listDocsPreview({
1725259
1725263
  const fdr = createFdrService({ token: token.value });
1725260
1725264
  const listResponse = await fdr.docs.v2.read.listAllDocsUrls({
1725261
1725265
  page,
1725262
- limit: limit ?? 100
1725266
+ limit: limit ?? 100,
1725267
+ preview: true
1725263
1725268
  });
1725264
1725269
  if (!listResponse.ok) {
1725265
1725270
  return context2.failAndThrow("Failed to fetch docs URLs", listResponse.error);
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.56.10",
2
+ "version": "3.57.0",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",