@fern-api/fern-api-dev 5.92.2 → 5.92.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 +57 -36
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -453774,6 +453774,47 @@ function findInlineCodeEnd(content5, start2) {
453774
453774
  }
453775
453775
  return null;
453776
453776
  }
453777
+ function findLabelEnd(content5, start2) {
453778
+ const limit = findScanLimit(content5, start2);
453779
+ let depth = 0;
453780
+ let i5 = start2;
453781
+ while (i5 < limit) {
453782
+ if (content5[i5] === "\\") {
453783
+ i5 += 2;
453784
+ continue;
453785
+ }
453786
+ if (content5[i5] === "[") {
453787
+ depth++;
453788
+ } else if (content5[i5] === "]") {
453789
+ depth--;
453790
+ if (depth === 0) {
453791
+ if (content5[i5 + 1] === "(") {
453792
+ return i5;
453793
+ }
453794
+ return findLabelEndBeforeNextBracket(content5, i5 + 1, limit);
453795
+ }
453796
+ }
453797
+ i5++;
453798
+ }
453799
+ return null;
453800
+ }
453801
+ function findLabelEndBeforeNextBracket(content5, start2, limit) {
453802
+ let i5 = start2;
453803
+ while (i5 < limit) {
453804
+ if (content5[i5] === "\\") {
453805
+ i5 += 2;
453806
+ continue;
453807
+ }
453808
+ if (content5[i5] === "[") {
453809
+ return null;
453810
+ }
453811
+ if (content5[i5] === "]" && content5[i5 + 1] === "(") {
453812
+ return i5;
453813
+ }
453814
+ i5++;
453815
+ }
453816
+ return null;
453817
+ }
453777
453818
  function streamingScanForImages(content5, metadata) {
453778
453819
  const filepaths = /* @__PURE__ */ new Set();
453779
453820
  const edits = [];
@@ -453822,19 +453863,12 @@ function streamingScanForImages(content5, metadata) {
453822
453863
  return { filepaths, edits };
453823
453864
  }
453824
453865
  function parseMarkdownImage(content5, start2, metadata) {
453825
- let i5 = start2 + 2;
453826
453866
  const len = content5.length;
453827
- while (i5 < len && content5[i5] !== "]") {
453828
- if (content5[i5] === "\\") {
453829
- i5 += 2;
453830
- } else {
453831
- i5++;
453832
- }
453833
- }
453834
- if (i5 >= len || content5[i5] !== "]" || content5[i5 + 1] !== "(") {
453867
+ const labelEnd2 = findLabelEnd(content5, start2 + 1);
453868
+ if (labelEnd2 == null || content5[labelEnd2 + 1] !== "(") {
453835
453869
  return null;
453836
453870
  }
453837
- i5 += 2;
453871
+ let i5 = labelEnd2 + 2;
453838
453872
  const urlStart = i5;
453839
453873
  let parenDepth = 1;
453840
453874
  while (i5 < len && parenDepth > 0) {
@@ -453893,19 +453927,12 @@ function splitDestinationAndTitle(url3) {
453893
453927
  return isTitle ? url3.slice(0, i5) : url3;
453894
453928
  }
453895
453929
  function parseMarkdownLink(content5, start2, metadata) {
453896
- let i5 = start2 + 1;
453897
453930
  const len = content5.length;
453898
- while (i5 < len && content5[i5] !== "]") {
453899
- if (content5[i5] === "\\") {
453900
- i5 += 2;
453901
- } else {
453902
- i5++;
453903
- }
453904
- }
453905
- if (i5 >= len || content5[i5] !== "]" || content5[i5 + 1] !== "(") {
453931
+ const labelEnd2 = findLabelEnd(content5, start2);
453932
+ if (labelEnd2 == null || content5[labelEnd2 + 1] !== "(") {
453906
453933
  return null;
453907
453934
  }
453908
- i5 += 2;
453935
+ let i5 = labelEnd2 + 2;
453909
453936
  let parenDepth = 1;
453910
453937
  while (i5 < len && parenDepth > 0) {
453911
453938
  if (content5[i5] === "\\") {
@@ -454316,16 +454343,10 @@ function replaceImagePathsAndUrls(markdown, fileIdsMap, markdownFilesToPathName,
454316
454343
  continue;
454317
454344
  }
454318
454345
  } else if (content5[i5] === "[" && content5[i5 - 1] !== "!") {
454319
- let j5 = i5 + 1;
454320
- while (j5 < len && content5[j5] !== "]") {
454321
- if (content5[j5] === "\\") {
454322
- j5 += 2;
454323
- } else {
454324
- j5++;
454325
- }
454326
- }
454327
- if (j5 < len && content5[j5] === "]" && content5[j5 + 1] === "(") {
454328
- j5 += 2;
454346
+ const labelEnd2 = findLabelEnd(content5, i5);
454347
+ let j5 = labelEnd2 ?? len;
454348
+ if (labelEnd2 != null && content5[labelEnd2 + 1] === "(") {
454349
+ j5 = labelEnd2 + 2;
454329
454350
  const urlStart = j5;
454330
454351
  let parenDepth = 1;
454331
454352
  while (j5 < len && parenDepth > 0) {
@@ -702729,7 +702750,7 @@ var AccessTokenPosthogManager = class {
702729
702750
  properties: {
702730
702751
  ...event,
702731
702752
  ...event.properties,
702732
- version: "5.92.2",
702753
+ version: "5.92.3",
702733
702754
  usingAccessToken: true,
702734
702755
  ...getRunIdProperties()
702735
702756
  }
@@ -702795,7 +702816,7 @@ var UserPosthogManager = class {
702795
702816
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
702796
702817
  event: "CLI",
702797
702818
  properties: {
702798
- version: "5.92.2",
702819
+ version: "5.92.3",
702799
702820
  ...event,
702800
702821
  ...event.properties,
702801
702822
  usingAccessToken: false,
@@ -883961,7 +883982,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
883961
883982
  var LOGS_FOLDER_NAME = "logs";
883962
883983
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
883963
883984
  function getCliSource() {
883964
- const version7 = "5.92.2";
883985
+ const version7 = "5.92.3";
883965
883986
  return `cli@${version7}`;
883966
883987
  }
883967
883988
  var DebugLogger = class {
@@ -909277,7 +909298,7 @@ var LegacyDocsPublisher = class {
909277
909298
  previewId,
909278
909299
  disableTemplates: void 0,
909279
909300
  skipUpload,
909280
- cliVersion: "5.92.2",
909301
+ cliVersion: "5.92.3",
909281
909302
  loginCommand: "fern auth login"
909282
909303
  });
909283
909304
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -976193,7 +976214,7 @@ function getAutomationContextFromEnv() {
976193
976214
  config_branch: process.env.FERN_CONFIG_BRANCH,
976194
976215
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
976195
976216
  trigger: process.env.GITHUB_EVENT_NAME,
976196
- cli_version: "5.92.2"
976217
+ cli_version: "5.92.3"
976197
976218
  };
976198
976219
  }
976199
976220
  function isAutomationMode() {
@@ -977025,7 +977046,7 @@ var CliContext = class _CliContext {
977025
977046
  if (false) {
977026
977047
  this.logger.error("CLI_VERSION is not defined");
977027
977048
  }
977028
- return "5.92.2";
977049
+ return "5.92.3";
977029
977050
  }
977030
977051
  getCliName() {
977031
977052
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.92.2",
2
+ "version": "5.92.3",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",