@fern-api/fern-api-dev 4.76.1-4-g8574d5aeb22 → 4.76.1-6-g458402d35d1

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 +18 -10
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -621991,7 +621991,7 @@ var AccessTokenPosthogManager = class {
621991
621991
  properties: {
621992
621992
  ...event,
621993
621993
  ...event.properties,
621994
- version: "4.76.1-4-g8574d5aeb22",
621994
+ version: "4.76.1-6-g458402d35d1",
621995
621995
  usingAccessToken: true
621996
621996
  }
621997
621997
  });
@@ -622045,7 +622045,7 @@ var UserPosthogManager = class {
622045
622045
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
622046
622046
  event: "CLI",
622047
622047
  properties: {
622048
- version: "4.76.1-4-g8574d5aeb22",
622048
+ version: "4.76.1-6-g458402d35d1",
622049
622049
  ...event,
622050
622050
  ...event.properties,
622051
622051
  usingAccessToken: false,
@@ -812809,6 +812809,16 @@ function pathToRegexp(path98, keys24, options2) {
812809
812809
  }
812810
812810
 
812811
812811
  // ../yaml/docs-validator/lib/rules/missing-redirects/missing-redirects-logic.js
812812
+ function keepLatestEntryPerPageId(entries23) {
812813
+ const latestByPageId = /* @__PURE__ */ new Map();
812814
+ for (const entry of entries23) {
812815
+ const existing = latestByPageId.get(entry.pageId);
812816
+ if (existing == null || Date.parse(entry.lastUpdated) >= Date.parse(existing.lastUpdated)) {
812817
+ latestByPageId.set(entry.pageId, entry);
812818
+ }
812819
+ }
812820
+ return Array.from(latestByPageId.values());
812821
+ }
812812
812822
  function removeTrailingSlash4(pathname) {
812813
812823
  return pathname.endsWith("/") ? pathname.slice(0, -1) : pathname;
812814
812824
  }
@@ -812895,10 +812905,7 @@ async function fetchMarkdownEntries(fdrOrigin, domain3, basepath, authToken) {
812895
812905
  }
812896
812906
  const data2 = await response.json();
812897
812907
  return {
812898
- entries: (data2.entries ?? []).map((entry) => ({
812899
- pageId: entry.pageId,
812900
- slug: entry.slug
812901
- }))
812908
+ entries: data2.entries
812902
812909
  };
812903
812910
  } catch (error50) {
812904
812911
  const message = error50 instanceof Error ? error50.message : String(error50);
@@ -812947,7 +812954,8 @@ var MissingRedirectsRule = {
812947
812954
  }
812948
812955
  const root6 = navigation_exports2.migrate.FernNavigationV1ToLatest.create().root(resolvedDocsDefinition.config.root);
812949
812956
  const localPageIdToSlug = buildPageIdToSlugMap(root6);
812950
- const removedSlugs = findRemovedSlugs(result.entries, localPageIdToSlug);
812957
+ const latestEntries = keepLatestEntryPerPageId(result.entries);
812958
+ const removedSlugs = findRemovedSlugs(latestEntries, localPageIdToSlug);
812951
812959
  if (removedSlugs.length === 0) {
812952
812960
  return {};
812953
812961
  }
@@ -839255,7 +839263,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
839255
839263
  var LOGS_FOLDER_NAME = "logs";
839256
839264
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
839257
839265
  function getCliSource() {
839258
- const version7 = "4.76.1-4-g8574d5aeb22";
839266
+ const version7 = "4.76.1-6-g458402d35d1";
839259
839267
  return `cli@${version7}`;
839260
839268
  }
839261
839269
  var DebugLogger = class {
@@ -850570,7 +850578,7 @@ var LegacyDocsPublisher = class {
850570
850578
  previewId,
850571
850579
  disableTemplates: void 0,
850572
850580
  skipUpload,
850573
- cliVersion: "4.76.1-4-g8574d5aeb22"
850581
+ cliVersion: "4.76.1-6-g458402d35d1"
850574
850582
  });
850575
850583
  if (taskContext.getResult() === TaskResult.Failure) {
850576
850584
  return { success: false };
@@ -925028,7 +925036,7 @@ var CliContext = class _CliContext {
925028
925036
  if (false) {
925029
925037
  this.logger.error("CLI_VERSION is not defined");
925030
925038
  }
925031
- return "4.76.1-4-g8574d5aeb22";
925039
+ return "4.76.1-6-g458402d35d1";
925032
925040
  }
925033
925041
  getCliName() {
925034
925042
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.76.1-4-g8574d5aeb22",
2
+ "version": "4.76.1-6-g458402d35d1",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",