@fern-api/fern-api-dev 3.65.0 → 3.65.1

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 +36 -13
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -1427240,7 +1427240,7 @@ var AccessTokenPosthogManager = class {
1427240
1427240
  properties: {
1427241
1427241
  ...event,
1427242
1427242
  ...event.properties,
1427243
- version: "3.65.0",
1427243
+ version: "3.65.1",
1427244
1427244
  usingAccessToken: true
1427245
1427245
  }
1427246
1427246
  });
@@ -1427339,7 +1427339,7 @@ var UserPosthogManager = class {
1427339
1427339
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1427340
1427340
  event: "CLI",
1427341
1427341
  properties: {
1427342
- version: "3.65.0",
1427342
+ version: "3.65.1",
1427343
1427343
  ...event,
1427344
1427344
  ...event.properties,
1427345
1427345
  usingAccessToken: false,
@@ -1714019,7 +1714019,7 @@ var CliContext = class {
1714019
1714019
  if (false) {
1714020
1714020
  this.logger.error("CLI_VERSION is not defined");
1714021
1714021
  }
1714022
- return "3.65.0";
1714022
+ return "3.65.1";
1714023
1714023
  }
1714024
1714024
  getCliName() {
1714025
1714025
  if (false) {
@@ -1717139,7 +1717139,7 @@ var import_path56 = __toESM(require("path"), 1);
1717139
1717139
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
1717140
1717140
  var LOGS_FOLDER_NAME = "logs";
1717141
1717141
  function getCliSource() {
1717142
- const version7 = "3.65.0";
1717142
+ const version7 = "3.65.1";
1717143
1717143
  return `cli@${version7}`;
1717144
1717144
  }
1717145
1717145
  var DebugLogger = class {
@@ -1723887,25 +1723887,27 @@ async function visitNavigationItem2({ absolutePathToFernFolder, navigationItem,
1723887
1723887
  orphaned: noop7,
1723888
1723888
  availability: noop7
1723889
1723889
  });
1723890
- if (navigationItemIsPage(navigationItem)) {
1723891
- const absoluteFilepath = resolve5(dirname4(absoluteFilepathToConfiguration), navigationItem.path);
1723890
+ const markdownPath = getNavigationItemMarkdownPath(navigationItem);
1723891
+ if (markdownPath != null) {
1723892
+ const absoluteFilepath = resolve5(dirname4(absoluteFilepathToConfiguration), markdownPath);
1723892
1723893
  if (await doesPathExist(absoluteFilepath)) {
1723893
1723894
  const fileStats = await (0, import_promises103.stat)(absoluteFilepath);
1723894
1723895
  const fileSizeMB = fileStats.size / (1024 * 1024);
1723895
1723896
  if (fileSizeMB > 1) {
1723896
- context2.logger.trace(`Processing large markdown file: ${navigationItem.path} (${fileSizeMB.toFixed(2)} MB)`);
1723897
+ context2.logger.trace(`Processing large markdown file: ${markdownPath} (${fileSizeMB.toFixed(2)} MB)`);
1723897
1723898
  }
1723898
1723899
  const startTime = performance.now();
1723899
1723900
  const content5 = (await (0, import_promises103.readFile)(absoluteFilepath, "utf8")).toString();
1723900
1723901
  const readTime = performance.now() - startTime;
1723901
1723902
  if (readTime > 2e3) {
1723902
- context2.logger.debug(`Slow file read: ${navigationItem.path} took ${readTime.toFixed(0)}ms`);
1723903
+ context2.logger.debug(`Slow file read: ${markdownPath} took ${readTime.toFixed(0)}ms`);
1723903
1723904
  }
1723905
+ const title4 = getNavigationItemTitle(navigationItem);
1723904
1723906
  await visitor.markdownPage?.({
1723905
- title: navigationItem.page,
1723907
+ title: title4,
1723906
1723908
  content: content5,
1723907
1723909
  absoluteFilepath
1723908
- }, [...nodePath, navigationItem.path]);
1723910
+ }, [...nodePath, markdownPath]);
1723909
1723911
  try {
1723910
1723912
  const parseStart = performance.now();
1723911
1723913
  const { filepaths } = parseImagePaths(content5, {
@@ -1723914,17 +1723916,17 @@ async function visitNavigationItem2({ absolutePathToFernFolder, navigationItem,
1723914
1723916
  });
1723915
1723917
  const parseTime = performance.now() - parseStart;
1723916
1723918
  if (parseTime > 2e3) {
1723917
- context2.logger.debug(`Slow image path parsing: ${navigationItem.path} took ${parseTime.toFixed(0)}ms`);
1723919
+ context2.logger.debug(`Slow image path parsing: ${markdownPath} took ${parseTime.toFixed(0)}ms`);
1723918
1723920
  }
1723919
1723921
  for (const filepath of filepaths) {
1723920
1723922
  await visitor.filepath?.({
1723921
1723923
  absoluteFilepath: filepath,
1723922
1723924
  value: relative3(absolutePathToFernFolder, filepath),
1723923
1723925
  willBeUploaded: true
1723924
- }, [...nodePath, navigationItem.path]);
1723926
+ }, [...nodePath, markdownPath]);
1723925
1723927
  }
1723926
1723928
  } catch (err) {
1723927
- context2.logger.trace(`Failed to parse image paths in ${navigationItem.path}: ${err}`);
1723929
+ context2.logger.trace(`Failed to parse image paths in ${markdownPath}: ${err}`);
1723928
1723930
  }
1723929
1723931
  }
1723930
1723932
  }
@@ -1723969,6 +1723971,27 @@ function navigationItemIsChangelog(item) {
1723969
1723971
  function navigationItemIsPage(item) {
1723970
1723972
  return item?.page != null;
1723971
1723973
  }
1723974
+ function navigationItemIsSection(item) {
1723975
+ return item?.section != null;
1723976
+ }
1723977
+ function getNavigationItemMarkdownPath(item) {
1723978
+ if (navigationItemIsPage(item)) {
1723979
+ return item.path;
1723980
+ }
1723981
+ if (navigationItemIsSection(item) && item.path != null) {
1723982
+ return item.path;
1723983
+ }
1723984
+ return void 0;
1723985
+ }
1723986
+ function getNavigationItemTitle(item) {
1723987
+ if (navigationItemIsPage(item)) {
1723988
+ return item.page;
1723989
+ }
1723990
+ if (navigationItemIsSection(item)) {
1723991
+ return item.section;
1723992
+ }
1723993
+ return "Unknown";
1723994
+ }
1723972
1723995
  function navigationItemIsApi2(item) {
1723973
1723996
  return item?.api != null;
1723974
1723997
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.65.0",
2
+ "version": "3.65.1",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",