@fern-api/fern-api-dev 5.37.2 → 5.37.3

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 +32 -7
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -668787,7 +668787,7 @@ var AccessTokenPosthogManager = class {
668787
668787
  properties: {
668788
668788
  ...event,
668789
668789
  ...event.properties,
668790
- version: "5.37.2",
668790
+ version: "5.37.3",
668791
668791
  usingAccessToken: true,
668792
668792
  ...getRunIdProperties()
668793
668793
  }
@@ -668851,7 +668851,7 @@ var UserPosthogManager = class {
668851
668851
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
668852
668852
  event: "CLI",
668853
668853
  properties: {
668854
- version: "5.37.2",
668854
+ version: "5.37.3",
668855
668855
  ...event,
668856
668856
  ...event.properties,
668857
668857
  usingAccessToken: false,
@@ -861355,7 +861355,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
861355
861355
  var LOGS_FOLDER_NAME = "logs";
861356
861356
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
861357
861357
  function getCliSource() {
861358
- const version7 = "5.37.2";
861358
+ const version7 = "5.37.3";
861359
861359
  return `cli@${version7}`;
861360
861360
  }
861361
861361
  var DebugLogger = class {
@@ -880243,7 +880243,7 @@ var LegacyDocsPublisher = class {
880243
880243
  previewId,
880244
880244
  disableTemplates: void 0,
880245
880245
  skipUpload,
880246
- cliVersion: "5.37.2",
880246
+ cliVersion: "5.37.3",
880247
880247
  loginCommand: "fern auth login"
880248
880248
  });
880249
880249
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -937586,12 +937586,21 @@ function getFirstUrlSegment({ path: path117 }) {
937586
937586
  }
937587
937587
 
937588
937588
  // ../docs-importers/mintlify/lib/MintlifyImporter.js
937589
+ function isRecord2(value2) {
937590
+ return typeof value2 === "object" && value2 != null && !Array.isArray(value2);
937591
+ }
937592
+ function hasNavigationArray(value2) {
937593
+ return isRecord2(value2) && Array.isArray(value2.navigation);
937594
+ }
937589
937595
  var MintlifyImporter = class extends DocsImporter {
937590
937596
  documentationTab = void 0;
937591
937597
  tabUrlToInfo = {};
937592
937598
  async import({ args, builder }) {
937593
937599
  const mintJsonContent = await (0, import_promises139.readFile)(args.absolutePathToMintJson, "utf-8");
937594
- const mint = JSON.parse(mintJsonContent);
937600
+ const mint = this.parseMintJson({
937601
+ content: mintJsonContent,
937602
+ absolutePathToMintJson: args.absolutePathToMintJson
937603
+ });
937595
937604
  builder.setTitle({ title: mint.name });
937596
937605
  const relativePathToFavicon = RelativeFilePath2.of(mint.favicon.substring(1));
937597
937606
  builder.setFavicon({ favicon: relativePathToFavicon });
@@ -937688,6 +937697,22 @@ var MintlifyImporter = class extends DocsImporter {
937688
937697
  });
937689
937698
  this.context.logger.debug(`Added instance ${instanceUrl} to docs.yml`);
937690
937699
  }
937700
+ parseMintJson({ content: content5, absolutePathToMintJson }) {
937701
+ let mintJson;
937702
+ try {
937703
+ mintJson = JSON.parse(content5);
937704
+ } catch (error50) {
937705
+ return this.context.failAndThrow(`Failed to parse ${absolutePathToMintJson}.`, error50, {
937706
+ code: CliError.Code.ParseError
937707
+ });
937708
+ }
937709
+ if (!hasNavigationArray(mintJson)) {
937710
+ return this.context.failAndThrow("Expected navigation in mint.json to be an array.", void 0, {
937711
+ code: CliError.Code.ConfigError
937712
+ });
937713
+ }
937714
+ return mintJson;
937715
+ }
937691
937716
  async getNavigationBuilder({ mintItem, builder }) {
937692
937717
  if (Object.keys(this.tabUrlToInfo).length > 0) {
937693
937718
  const tabUrl = getTabForMintItem({ mintItem });
@@ -955119,7 +955144,7 @@ function getAutomationContextFromEnv() {
955119
955144
  config_branch: process.env.FERN_CONFIG_BRANCH,
955120
955145
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
955121
955146
  trigger: process.env.GITHUB_EVENT_NAME,
955122
- cli_version: "5.37.2"
955147
+ cli_version: "5.37.3"
955123
955148
  };
955124
955149
  }
955125
955150
  function isAutomationMode() {
@@ -955945,7 +955970,7 @@ var CliContext = class _CliContext {
955945
955970
  if (false) {
955946
955971
  this.logger.error("CLI_VERSION is not defined");
955947
955972
  }
955948
- return "5.37.2";
955973
+ return "5.37.3";
955949
955974
  }
955950
955975
  getCliName() {
955951
955976
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.37.2",
2
+ "version": "5.37.3",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",