@fern-api/fern-api-dev 4.71.5 → 4.71.6

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 +62 -46
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -621394,7 +621394,7 @@ var AccessTokenPosthogManager = class {
621394
621394
  properties: {
621395
621395
  ...event,
621396
621396
  ...event.properties,
621397
- version: "4.71.5",
621397
+ version: "4.71.6",
621398
621398
  usingAccessToken: true
621399
621399
  }
621400
621400
  });
@@ -621448,7 +621448,7 @@ var UserPosthogManager = class {
621448
621448
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
621449
621449
  event: "CLI",
621450
621450
  properties: {
621451
- version: "4.71.5",
621451
+ version: "4.71.6",
621452
621452
  ...event,
621453
621453
  ...event.properties,
621454
621454
  usingAccessToken: false,
@@ -838547,7 +838547,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
838547
838547
  var LOGS_FOLDER_NAME = "logs";
838548
838548
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
838549
838549
  function getCliSource() {
838550
- const version7 = "4.71.5";
838550
+ const version7 = "4.71.6";
838551
838551
  return `cli@${version7}`;
838552
838552
  }
838553
838553
  var DebugLogger = class {
@@ -849794,7 +849794,7 @@ var LegacyDocsPublisher = class {
849794
849794
  previewId,
849795
849795
  disableTemplates: void 0,
849796
849796
  skipUpload,
849797
- cliVersion: "4.71.5"
849797
+ cliVersion: "4.71.6"
849798
849798
  });
849799
849799
  if (taskContext.getResult() === TaskResult.Failure) {
849800
849800
  return { success: false };
@@ -924147,7 +924147,7 @@ var CliContext = class _CliContext {
924147
924147
  if (false) {
924148
924148
  this.logger.error("CLI_VERSION is not defined");
924149
924149
  }
924150
- return "4.71.5";
924150
+ return "4.71.6";
924151
924151
  }
924152
924152
  getCliName() {
924153
924153
  if (false) {
@@ -926752,8 +926752,39 @@ function renderDocstringExamples(docstring, lines, renderCodeBlock2) {
926752
926752
  lines.push("");
926753
926753
  }
926754
926754
  }
926755
+ var SAFE_TAG_PATTERN = /<(\/?)(?:sub|sup|br|em|strong|code)(\s[^>]*)?\/?>/gi;
926756
+ function protectSafeTags(text9) {
926757
+ const tags = [];
926758
+ const replaced = text9.replace(SAFE_TAG_PATTERN, (match3) => {
926759
+ const placeholder = `\0SAFE${tags.length}\0`;
926760
+ tags.push(match3);
926761
+ return placeholder;
926762
+ });
926763
+ return { text: replaced, tags };
926764
+ }
926765
+ function restoreSafeTags(text9, tags) {
926766
+ let result = text9;
926767
+ for (let i11 = 0; i11 < tags.length; i11++) {
926768
+ const tag2 = tags[i11];
926769
+ if (tag2 != null) {
926770
+ result = result.replace(`\0SAFE${i11}\0`, tag2);
926771
+ }
926772
+ }
926773
+ return result;
926774
+ }
926775
+ function escapeMdxText(text9) {
926776
+ return text9.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\{/g, "&#123;").replace(/\}/g, "&#125;");
926777
+ }
926755
926778
  function escapeTableCell(content5) {
926756
- return content5.replace(/\|/g, "\\|");
926779
+ const parts = content5.split(/(``[^`]*``|`[^`]*`)/);
926780
+ return parts.map((part, i11) => {
926781
+ if (i11 % 2 === 1) {
926782
+ return part.replace(/\|/g, "\\|").replace(/\n/g, " ");
926783
+ }
926784
+ const protected_ = protectSafeTags(part);
926785
+ const escaped = protected_.text.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\{/g, "&#123;").replace(/\}/g, "&#125;").replace(/\|/g, "\\|").replace(/\n/g, " ");
926786
+ return restoreSafeTags(escaped, protected_.tags);
926787
+ }).join("");
926757
926788
  }
926758
926789
 
926759
926790
  // ../library-docs-generator/lib/cpp/src/renderers/BadgeRenderer.js
@@ -926989,18 +927020,9 @@ function escapeRemainingMdxSpecials(text9) {
926989
927020
  if (i11 % 2 === 1) {
926990
927021
  return part;
926991
927022
  }
926992
- const safeTags = [];
926993
- let escaped = part;
926994
- escaped = escaped.replace(/<(\/?)(?:sub|sup|br|em|strong|code)(\s[^>]*)?\/?>/gi, (match3) => {
926995
- const placeholder = `\0SAFE${safeTags.length}\0`;
926996
- safeTags.push({ placeholder, original: match3 });
926997
- return placeholder;
926998
- });
926999
- escaped = escaped.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\{/g, "&#123;").replace(/\}/g, "&#125;");
927000
- for (const { placeholder, original } of safeTags) {
927001
- escaped = escaped.replace(placeholder, original);
927002
- }
927003
- return escaped;
927023
+ const protected_ = protectSafeTags(part);
927024
+ const escaped = protected_.text.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/\{/g, "&#123;").replace(/\}/g, "&#125;");
927025
+ return restoreSafeTags(escaped, protected_.tags);
927004
927026
  }).join("");
927005
927027
  }
927006
927028
  function escapeMultilineMdxSpecials(text9) {
@@ -927103,9 +927125,9 @@ function renderBlock(block2, options2) {
927103
927125
  if (block2.title) {
927104
927126
  if (options2?.titledSectionHeadingLevel) {
927105
927127
  const hashes = "#".repeat(options2.titledSectionHeadingLevel);
927106
- lines.push(`${hashes} ${block2.title}`);
927128
+ lines.push(`${hashes} ${escapeMdxText(block2.title)}`);
927107
927129
  } else {
927108
- lines.push(`**${block2.title}**`);
927130
+ lines.push(`**${escapeMdxText(block2.title)}**`);
927109
927131
  }
927110
927132
  lines.push("");
927111
927133
  }
@@ -927755,9 +927777,6 @@ function findParamDescription(name2, docstring) {
927755
927777
  }
927756
927778
 
927757
927779
  // ../library-docs-generator/lib/cpp/src/renderers/MethodRenderer.js
927758
- function escapeNameForHeading(name2) {
927759
- return name2.replace(/</g, "&lt;");
927760
- }
927761
927780
  function methodAnchorId(name2) {
927762
927781
  for (const [symbol3, safeName] of OPERATOR_SYMBOL_MAP) {
927763
927782
  if (name2 === symbol3) {
@@ -928384,7 +928403,7 @@ function renderSingleMethod(func2, ownerClass, ctx, options2) {
928384
928403
  return renderMethodContent(func2, ownerClass, ctx);
928385
928404
  }
928386
928405
  const lines = [];
928387
- const displayName = escapeNameForHeading(func2.name);
928406
+ const displayName = escapeMdxText(func2.name);
928388
928407
  lines.push(`### ${displayName} [#${methodAnchorId(func2.name)}]`);
928389
928408
  lines.push("");
928390
928409
  const content5 = renderMethodContent(func2, ownerClass, ctx);
@@ -928473,7 +928492,7 @@ function renderOverloadedMethod(funcs, ownerClass, ctx, options2 = {}) {
928473
928492
  return renderSingleMethod(nonDeletedFuncs[0], ownerClass, ctx, { skipHeading: options2.skipHeading });
928474
928493
  }
928475
928494
  const lines = [];
928476
- const displayName = escapeNameForHeading(funcs[0]?.name ?? "");
928495
+ const displayName = escapeMdxText(funcs[0]?.name ?? "");
928477
928496
  const commonQuals = getCommonQualifiers(funcs);
928478
928497
  if (!options2.skipHeading) {
928479
928498
  lines.push(`### ${displayName} [#${methodAnchorId(funcs[0]?.name ?? "")}]`);
@@ -928556,7 +928575,7 @@ function renderDestructor(func2, ownerClass, ctx) {
928556
928575
  const className = getShortName(ownerClass.path);
928557
928576
  lines.push("### Destructor [#destructor]");
928558
928577
  lines.push("");
928559
- lines.push(`### ~${className}`);
928578
+ lines.push(`### ~${escapeMdxText(className)}`);
928560
928579
  lines.push("");
928561
928580
  const content5 = renderMethodContent(func2, ownerClass, ctx);
928562
928581
  lines.push(content5);
@@ -928576,9 +928595,6 @@ function groupFunctionsByName(funcs) {
928576
928595
  }
928577
928596
 
928578
928597
  // ../library-docs-generator/lib/cpp/src/renderers/TableRenderer.js
928579
- function escapeTableCell2(value) {
928580
- return value.replace(/\|/g, "\\|").replace(/\n/g, " ");
928581
- }
928582
928598
  function renderTypedefTable(typedefs) {
928583
928599
  if (typedefs.length === 0) {
928584
928600
  return "";
@@ -928597,8 +928613,8 @@ function renderTypedefTable(typedefs) {
928597
928613
  for (const td of typedefs) {
928598
928614
  const name2 = `\`${td.name}\``;
928599
928615
  const defDisplay = td.typeInfo ? renderTypeInfoDisplay(td.typeInfo) : "";
928600
- const definition3 = defDisplay ? escapeTableCell2(`\`${defDisplay}\``) : "";
928601
- const description = td.docstring ? escapeTableCell2(renderSegmentsTrimmed(td.docstring.summary)) : "";
928616
+ const definition3 = defDisplay ? escapeTableCell(`\`${defDisplay}\``) : "";
928617
+ const description = td.docstring ? escapeTableCell(renderSegmentsTrimmed(td.docstring.summary)) : "";
928602
928618
  const descCell = description ? ` ${description} ` : " ";
928603
928619
  lines.push(`| ${name2} | ${definition3} |${descCell}|`);
928604
928620
  }
@@ -928608,7 +928624,7 @@ function renderTypedefTable(typedefs) {
928608
928624
  for (const td of typedefs) {
928609
928625
  const name2 = `\`${td.name}\``;
928610
928626
  const defDisplay = td.typeInfo ? renderTypeInfoDisplay(td.typeInfo) : "";
928611
- const definition3 = defDisplay ? escapeTableCell2(`\`${defDisplay}\``) : "";
928627
+ const definition3 = defDisplay ? escapeTableCell(`\`${defDisplay}\``) : "";
928612
928628
  lines.push(`| ${name2} | ${definition3} |`);
928613
928629
  }
928614
928630
  }
@@ -928625,8 +928641,8 @@ function renderMemberVariableTable(variables, ownerPath) {
928625
928641
  const badges = getVariableBadges(v23);
928626
928642
  const badgeStr = badges.length > 0 ? " " + badges.map((b19) => renderBadge(b19)).join(" ") : "";
928627
928643
  const name2 = `\`${v23.name}\`${badgeStr}`;
928628
- const typeStr = v23.typeInfo ? escapeTableCell2(renderTypeInfoForTable(v23.typeInfo, ownerPath)) : "";
928629
- const description = v23.docstring ? escapeTableCell2(renderSegmentsTrimmed(v23.docstring.summary)) : "";
928644
+ const typeStr = v23.typeInfo ? escapeTableCell(renderTypeInfoForTable(v23.typeInfo, ownerPath)) : "";
928645
+ const description = v23.docstring ? escapeTableCell(renderSegmentsTrimmed(v23.docstring.summary)) : "";
928630
928646
  const descCell = description ? ` ${description} ` : " ";
928631
928647
  lines.push(`| ${name2} | ${typeStr} |${descCell}|`);
928632
928648
  }
@@ -928634,7 +928650,7 @@ function renderMemberVariableTable(variables, ownerPath) {
928634
928650
  }
928635
928651
  function renderInnerClass(innerClass, ownerPath) {
928636
928652
  const lines = [];
928637
- lines.push(`### ${innerClass.name}`);
928653
+ lines.push(`### ${escapeMdxText(innerClass.name)}`);
928638
928654
  lines.push("");
928639
928655
  const kindKeyword = innerClass.kind === "class" ? "class" : "struct";
928640
928656
  const sig = `${kindKeyword} ${innerClass.path}`;
@@ -928702,11 +928718,11 @@ function renderRelatedConceptsTable(seeAlso) {
928702
928718
  }
928703
928719
  const linkMatch = text9.match(/^(\[.*?\]\(.*?\))\s+(.*)/);
928704
928720
  if (linkMatch && linkMatch[1] != null && linkMatch[2] != null) {
928705
- const concept = escapeTableCell2(linkMatch[1]);
928706
- const desc = escapeTableCell2(linkMatch[2]);
928721
+ const concept = escapeTableCell(linkMatch[1]);
928722
+ const desc = escapeTableCell(linkMatch[2]);
928707
928723
  lines.push(`| ${concept} | ${desc} |`);
928708
928724
  } else {
928709
- lines.push(`| ${escapeTableCell2(text9)} | |`);
928725
+ lines.push(`| ${escapeTableCell(text9)} | |`);
928710
928726
  }
928711
928727
  }
928712
928728
  return lines.join("\n");
@@ -928716,7 +928732,7 @@ function renderEnum(enumIr) {
928716
928732
  return "";
928717
928733
  }
928718
928734
  const lines = [];
928719
- lines.push(`### ${enumIr.name}`);
928735
+ lines.push(`### ${escapeMdxText(enumIr.name)}`);
928720
928736
  lines.push("");
928721
928737
  if (enumIr.docstring) {
928722
928738
  const summary = renderSegmentsTrimmed(enumIr.docstring.summary);
@@ -928729,8 +928745,8 @@ function renderEnum(enumIr) {
928729
928745
  lines.push("|---|---|---|");
928730
928746
  for (const val of enumIr.values) {
928731
928747
  const name2 = `\`${val.name}\``;
928732
- const value = val.initializer ? escapeTableCell2(val.initializer) : "";
928733
- const desc = val.docstring ? escapeTableCell2(renderSegmentsTrimmed(val.docstring.summary)) : "";
928748
+ const value = val.initializer ? escapeTableCell(`\`${val.initializer}\``) : "";
928749
+ const desc = val.docstring ? escapeTableCell(renderSegmentsTrimmed(val.docstring.summary)) : "";
928734
928750
  const valueCell = value ? ` ${value} ` : " ";
928735
928751
  const descCell = desc ? ` ${desc} ` : " ";
928736
928752
  lines.push(`| ${name2} |${valueCell}|${descCell}|`);
@@ -928987,7 +929003,7 @@ function categorizeMethodSections(cls) {
928987
929003
  }
928988
929004
  function renderMethodSection(label, methods, cls, ctx) {
928989
929005
  const lines = [];
928990
- lines.push(`## ${label}`);
929006
+ lines.push(`## ${escapeMdxText(label)}`);
928991
929007
  lines.push("");
928992
929008
  const groups2 = groupFunctionsByName(methods);
928993
929009
  const groupEntries = Array.from(groups2.entries());
@@ -929327,7 +929343,7 @@ function renderValuesTable(values2) {
929327
929343
  function renderValuesExpanded(values2) {
929328
929344
  const sections = [];
929329
929345
  for (const v23 of values2) {
929330
- sections.push(`### ${v23.name}`);
929346
+ sections.push(`### ${escapeMdxText(v23.name)}`);
929331
929347
  sections.push("");
929332
929348
  if (v23.docstring?.summary) {
929333
929349
  const summary = renderSegmentsTrimmed(v23.docstring.summary);
@@ -930126,7 +930142,7 @@ function createFrontmatter(slug, title3) {
930126
930142
  parts.push("---");
930127
930143
  return parts.join("\n");
930128
930144
  }
930129
- function escapeTableCell3(text9) {
930145
+ function escapeTableCell2(text9) {
930130
930146
  return escapeJsxChars(text9.replace(/\|/g, "\\|").replace(/\n/g, " "));
930131
930147
  }
930132
930148
 
@@ -930719,7 +930735,7 @@ function renderModulePage(module4, ctx, parentPath = "") {
930719
930735
  lines.push("### Classes", "", "| Name | Description |", "|------|-------------|");
930720
930736
  for (const cls of module4.classes) {
930721
930737
  const anchorId = generateAnchorId(cls.path);
930722
- const description = cls.docstring?.summary ? escapeTableCell3(cls.docstring.summary) : "-";
930738
+ const description = cls.docstring?.summary ? escapeTableCell2(cls.docstring.summary) : "-";
930723
930739
  lines.push(`| [\`${cls.name}\`](#${anchorId}) | ${description} |`);
930724
930740
  }
930725
930741
  lines.push("");
@@ -930728,7 +930744,7 @@ function renderModulePage(module4, ctx, parentPath = "") {
930728
930744
  lines.push("### Functions", "", "| Name | Description |", "|------|-------------|");
930729
930745
  for (const func2 of module4.functions) {
930730
930746
  const anchorId = generateAnchorId(func2.path);
930731
- const description = func2.docstring?.summary ? escapeTableCell3(func2.docstring.summary) : "-";
930747
+ const description = func2.docstring?.summary ? escapeTableCell2(func2.docstring.summary) : "-";
930732
930748
  lines.push(`| [\`${func2.name}\`](#${anchorId}) | ${description} |`);
930733
930749
  }
930734
930750
  lines.push("");
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.71.5",
2
+ "version": "4.71.6",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",