@fern-api/fern-api-dev 3.57.1 → 3.58.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 +42 -7
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -1659007,6 +1659007,7 @@ var DocsDefinitionResolver = class {
1659007
1659007
  markdownFilesToSidebarTitle = /* @__PURE__ */ new Map();
1659008
1659008
  markdownFilesToNoIndex = /* @__PURE__ */ new Map();
1659009
1659009
  markdownFilesToTags = /* @__PURE__ */ new Map();
1659010
+ markdownFilesToAvailability = /* @__PURE__ */ new Map();
1659010
1659011
  rawMarkdownFiles = {};
1659011
1659012
  referencedMarkdownFiles = [];
1659012
1659013
  async resolve() {
@@ -1659222,7 +1659223,7 @@ var DocsDefinitionResolver = class {
1659222
1659223
  return relative3(this.docsWorkspace.absoluteFilePath, filepath);
1659223
1659224
  }
1659224
1659225
  /**
1659225
- * Extracts all frontmatter data (slug, sidebar-title, noindex, tags) from pages in a single pass.
1659226
+ * Extracts all frontmatter data (slug, sidebar-title, noindex, tags, availability) from pages in a single pass.
1659226
1659227
  * This is more efficient than parsing frontmatter multiple times for each field.
1659227
1659228
  * @param pages - the pages to extract frontmatter from
1659228
1659229
  */
@@ -1659253,6 +1659254,38 @@ var DocsDefinitionResolver = class {
1659253
1659254
  } else if (Array.isArray(tags)) {
1659254
1659255
  this.markdownFilesToTags.set(absolutePath, tags);
1659255
1659256
  }
1659257
+ const availability = frontmatter.data.availability;
1659258
+ if (typeof availability === "string") {
1659259
+ const parsedAvailability = this.parseAvailabilityFromFrontmatter(availability);
1659260
+ if (parsedAvailability != null) {
1659261
+ this.markdownFilesToAvailability.set(absolutePath, parsedAvailability);
1659262
+ }
1659263
+ }
1659264
+ }
1659265
+ }
1659266
+ /**
1659267
+ * Parses an availability string from frontmatter into the Availability enum value.
1659268
+ * @param value - the availability string from frontmatter
1659269
+ * @returns the Availability enum value, or undefined if the value is not valid
1659270
+ */
1659271
+ parseAvailabilityFromFrontmatter(value) {
1659272
+ const normalizedValue = value.toLowerCase().trim();
1659273
+ switch (normalizedValue) {
1659274
+ case "stable":
1659275
+ return "stable";
1659276
+ case "generally-available":
1659277
+ return "generally-available";
1659278
+ case "in-development":
1659279
+ return "in-development";
1659280
+ case "pre-release":
1659281
+ return "pre-release";
1659282
+ case "deprecated":
1659283
+ return "deprecated";
1659284
+ case "beta":
1659285
+ return "beta";
1659286
+ default:
1659287
+ this.taskContext.logger.warn(`Invalid availability value "${value}" in frontmatter. Valid values are: stable, generally-available, in-development, pre-release, deprecated, beta`);
1659288
+ return void 0;
1659256
1659289
  }
1659257
1659290
  }
1659258
1659291
  /**
@@ -1659907,6 +1659940,7 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
1659907
1659940
  fullSlug: this.markdownFilesToFullSlugs.get(item.absolutePath)?.split("/")
1659908
1659941
  });
1659909
1659942
  const id2 = this.#idgen.get(pageId);
1659943
+ const frontmatterAvailability = this.markdownFilesToAvailability.get(item.absolutePath);
1659910
1659944
  return {
1659911
1659945
  id: id2,
1659912
1659946
  type: "page",
@@ -1659920,7 +1659954,7 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
1659920
1659954
  authed: void 0,
1659921
1659955
  noindex: item.noindex || this.markdownFilesToNoIndex.get(item.absolutePath),
1659922
1659956
  featureFlags: item.featureFlags,
1659923
- availability: item.availability ?? parentAvailability
1659957
+ availability: frontmatterAvailability ?? item.availability ?? parentAvailability
1659924
1659958
  };
1659925
1659959
  }
1659926
1659960
  async toSectionNode({ prefix: prefix2, item, parentSlug, hideChildren, parentAvailability }) {
@@ -1659933,6 +1659967,7 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
1659933
1659967
  skipUrlSlug: item.skipUrlSlug
1659934
1659968
  });
1659935
1659969
  const noindex = item.overviewAbsolutePath != null ? this.markdownFilesToNoIndex.get(item.overviewAbsolutePath) : void 0;
1659970
+ const frontmatterAvailability = item.overviewAbsolutePath != null ? this.markdownFilesToAvailability.get(item.overviewAbsolutePath) : void 0;
1659936
1659971
  const hiddenSection = hideChildren || item.hidden;
1659937
1659972
  const children2 = await Promise.all(item.contents.map((child) => this.toNavigationChild({
1659938
1659973
  prefix: id2,
@@ -1659964,7 +1659999,7 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
1659964
1659999
  pointsTo: void 0,
1659965
1660000
  noindex,
1659966
1660001
  featureFlags: item.featureFlags,
1659967
- availability: item.availability ?? parentAvailability
1660002
+ availability: frontmatterAvailability ?? item.availability ?? parentAvailability
1659968
1660003
  };
1659969
1660004
  }
1659970
1660005
  async convertTabbedNavigation(prefix2, items, parentSlug) {
@@ -1678733,7 +1678768,7 @@ var AccessTokenPosthogManager = class {
1678733
1678768
  properties: {
1678734
1678769
  ...event,
1678735
1678770
  ...event.properties,
1678736
- version: "3.57.1",
1678771
+ version: "3.58.0",
1678737
1678772
  usingAccessToken: true
1678738
1678773
  }
1678739
1678774
  });
@@ -1678783,7 +1678818,7 @@ var UserPosthogManager = class {
1678783
1678818
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1678784
1678819
  event: "CLI",
1678785
1678820
  properties: {
1678786
- version: "3.57.1",
1678821
+ version: "3.58.0",
1678787
1678822
  ...event,
1678788
1678823
  ...event.properties,
1678789
1678824
  usingAccessToken: false,
@@ -1710705,7 +1710740,7 @@ var CliContext = class {
1710705
1710740
  if (false) {
1710706
1710741
  this.logger.error("CLI_VERSION is not defined");
1710707
1710742
  }
1710708
- return "3.57.1";
1710743
+ return "3.58.0";
1710709
1710744
  }
1710710
1710745
  getCliName() {
1710711
1710746
  if (false) {
@@ -1713819,7 +1713854,7 @@ var import_path56 = __toESM(require("path"), 1);
1713819
1713854
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
1713820
1713855
  var LOGS_FOLDER_NAME = "logs";
1713821
1713856
  function getCliSource() {
1713822
- const version7 = "3.57.1";
1713857
+ const version7 = "3.58.0";
1713823
1713858
  return `cli@${version7}`;
1713824
1713859
  }
1713825
1713860
  var DebugLogger = class {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.57.1",
2
+ "version": "3.58.0",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",