@fern-api/fern-api-dev 5.80.4 → 5.80.5

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 +33 -10
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -452014,7 +452014,7 @@ function parseMarkdownImage(content5, start2, metadata) {
452014
452014
  }
452015
452015
  const urlEnd = i5 - 1;
452016
452016
  const url3 = content5.slice(urlStart, urlEnd).trim();
452017
- const rawSrc = trimAnchor(url3);
452017
+ const rawSrc = trimAnchor(splitDestinationAndTitle(url3));
452018
452018
  const src = rawSrc != null ? unescapeMarkdownUrl(rawSrc) : void 0;
452019
452019
  const resolvedPath = resolvePath5(src, metadata);
452020
452020
  if (rawSrc && src && resolvedPath) {
@@ -452030,6 +452030,27 @@ function parseMarkdownImage(content5, start2, metadata) {
452030
452030
  }
452031
452031
  return null;
452032
452032
  }
452033
+ function splitDestinationAndTitle(url3) {
452034
+ if (url3.startsWith("<")) {
452035
+ let i6 = 1;
452036
+ while (i6 < url3.length && url3[i6] !== ">") {
452037
+ i6 += url3[i6] === "\\" ? 2 : 1;
452038
+ }
452039
+ if (i6 < url3.length) {
452040
+ return url3.slice(0, i6 + 1);
452041
+ }
452042
+ }
452043
+ let i5 = 0;
452044
+ while (i5 < url3.length && !/\s/.test(url3[i5])) {
452045
+ i5 += url3[i5] === "\\" ? 2 : 1;
452046
+ }
452047
+ const title2 = url3.slice(i5).trim();
452048
+ if (title2.length === 0) {
452049
+ return url3.slice(0, i5);
452050
+ }
452051
+ const isTitle = title2.length >= 2 && (title2.startsWith('"') && title2.endsWith('"') || title2.startsWith("'") && title2.endsWith("'") || title2.startsWith("(") && title2.endsWith(")"));
452052
+ return isTitle ? url3.slice(0, i5) : url3;
452053
+ }
452033
452054
  function parseMarkdownLink(content5, start2, metadata) {
452034
452055
  let i5 = start2 + 1;
452035
452056
  const len = content5.length;
@@ -452455,8 +452476,10 @@ function replaceImagePathsAndUrls(markdown, fileIdsMap, markdownFilesToPathName,
452455
452476
  }
452456
452477
  const urlEnd = j5 - 1;
452457
452478
  const href = content5.slice(urlStart, urlEnd).trim();
452458
- const trimmedHref = trimAnchor(href) ?? href;
452459
- const hrefAnchor = trimmedHref !== href ? href.slice(trimmedHref.length) : "";
452479
+ const destination = splitDestinationAndTitle(href);
452480
+ const hrefTitle = href.slice(destination.length);
452481
+ const trimmedHref = trimAnchor(destination) ?? destination;
452482
+ const hrefAnchor = trimmedHref !== destination ? destination.slice(trimmedHref.length) : "";
452460
452483
  const replacedHref = getReplacedHref({
452461
452484
  href: trimmedHref,
452462
452485
  markdownFilesToPathName,
@@ -452466,7 +452489,7 @@ function replaceImagePathsAndUrls(markdown, fileIdsMap, markdownFilesToPathName,
452466
452489
  edits.push({
452467
452490
  start: urlStart,
452468
452491
  end: urlEnd,
452469
- replacement: replacedHref.slug + hrefAnchor
452492
+ replacement: replacedHref.slug + hrefAnchor + hrefTitle
452470
452493
  });
452471
452494
  }
452472
452495
  i5 = j5;
@@ -691732,7 +691755,7 @@ var AccessTokenPosthogManager = class {
691732
691755
  properties: {
691733
691756
  ...event,
691734
691757
  ...event.properties,
691735
- version: "5.80.4",
691758
+ version: "5.80.5",
691736
691759
  usingAccessToken: true,
691737
691760
  ...getRunIdProperties()
691738
691761
  }
@@ -691798,7 +691821,7 @@ var UserPosthogManager = class {
691798
691821
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
691799
691822
  event: "CLI",
691800
691823
  properties: {
691801
- version: "5.80.4",
691824
+ version: "5.80.5",
691802
691825
  ...event,
691803
691826
  ...event.properties,
691804
691827
  usingAccessToken: false,
@@ -872904,7 +872927,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
872904
872927
  var LOGS_FOLDER_NAME = "logs";
872905
872928
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
872906
872929
  function getCliSource() {
872907
- const version7 = "5.80.4";
872930
+ const version7 = "5.80.5";
872908
872931
  return `cli@${version7}`;
872909
872932
  }
872910
872933
  var DebugLogger = class {
@@ -905600,7 +905623,7 @@ var LegacyDocsPublisher = class {
905600
905623
  previewId,
905601
905624
  disableTemplates: void 0,
905602
905625
  skipUpload,
905603
- cliVersion: "5.80.4",
905626
+ cliVersion: "5.80.5",
905604
905627
  loginCommand: "fern auth login"
905605
905628
  });
905606
905629
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -972465,7 +972488,7 @@ function getAutomationContextFromEnv() {
972465
972488
  config_branch: process.env.FERN_CONFIG_BRANCH,
972466
972489
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
972467
972490
  trigger: process.env.GITHUB_EVENT_NAME,
972468
- cli_version: "5.80.4"
972491
+ cli_version: "5.80.5"
972469
972492
  };
972470
972493
  }
972471
972494
  function isAutomationMode() {
@@ -973297,7 +973320,7 @@ var CliContext = class _CliContext {
973297
973320
  if (false) {
973298
973321
  this.logger.error("CLI_VERSION is not defined");
973299
973322
  }
973300
- return "5.80.4";
973323
+ return "5.80.5";
973301
973324
  }
973302
973325
  getCliName() {
973303
973326
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.80.4",
2
+ "version": "5.80.5",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",