@fern-api/fern-api-dev 4.107.2 → 4.107.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 +52 -5
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -599518,6 +599518,9 @@ async function parseOpenAPI({ absolutePathToOpenAPI, absolutePathToOpenAPIOverri
599518
599518
  `Continuing without full reference resolution.`
599519
599519
  ].join("\n"));
599520
599520
  }
599521
+ if (circularRefs.length > 0) {
599522
+ breakCircularRefCycles(document4, circularRefs);
599523
+ }
599521
599524
  return document4;
599522
599525
  }
599523
599526
  throw error50;
@@ -599531,6 +599534,50 @@ async function readAndParseFile2(absoluteFilePath) {
599531
599534
  }
599532
599535
  return jsYaml.load(contents);
599533
599536
  }
599537
+ function breakCircularRefCycles(document4, circularRefs) {
599538
+ if (typeof document4 !== "object" || document4 == null) {
599539
+ return;
599540
+ }
599541
+ const backEdgeRefs = /* @__PURE__ */ new Set();
599542
+ for (const info of circularRefs) {
599543
+ if (info.ref.startsWith("#/")) {
599544
+ backEdgeRefs.add(info.ref);
599545
+ }
599546
+ }
599547
+ replaceCircularRefs(document4, backEdgeRefs);
599548
+ }
599549
+ function replaceCircularRefs(obj, targets2) {
599550
+ if (typeof obj !== "object" || obj == null) {
599551
+ return;
599552
+ }
599553
+ if (Array.isArray(obj)) {
599554
+ for (let i9 = 0; i9 < obj.length; i9++) {
599555
+ const item = obj[i9];
599556
+ if (isCircularRefObject(item, targets2)) {
599557
+ obj[i9] = { type: "object", "x-fern-circular-ref": true };
599558
+ } else {
599559
+ replaceCircularRefs(item, targets2);
599560
+ }
599561
+ }
599562
+ return;
599563
+ }
599564
+ const record22 = obj;
599565
+ for (const key2 of Object.keys(record22)) {
599566
+ const value2 = record22[key2];
599567
+ if (isCircularRefObject(value2, targets2)) {
599568
+ record22[key2] = { type: "object", "x-fern-circular-ref": true };
599569
+ } else {
599570
+ replaceCircularRefs(value2, targets2);
599571
+ }
599572
+ }
599573
+ }
599574
+ function isCircularRefObject(value2, targets2) {
599575
+ if (typeof value2 !== "object" || value2 == null || Array.isArray(value2)) {
599576
+ return false;
599577
+ }
599578
+ const record22 = value2;
599579
+ return typeof record22.$ref === "string" && targets2.has(record22.$ref);
599580
+ }
599534
599581
 
599535
599582
  // ../workspace/lazy-fern-workspace/lib/utils/resolveDescriptionMarkdownRefs.js
599536
599583
  init_lib4();
@@ -621325,7 +621372,7 @@ var AccessTokenPosthogManager = class {
621325
621372
  properties: {
621326
621373
  ...event,
621327
621374
  ...event.properties,
621328
- version: "4.107.2",
621375
+ version: "4.107.3",
621329
621376
  usingAccessToken: true
621330
621377
  }
621331
621378
  });
@@ -621379,7 +621426,7 @@ var UserPosthogManager = class {
621379
621426
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
621380
621427
  event: "CLI",
621381
621428
  properties: {
621382
- version: "4.107.2",
621429
+ version: "4.107.3",
621383
621430
  ...event,
621384
621431
  ...event.properties,
621385
621432
  usingAccessToken: false,
@@ -833025,7 +833072,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
833025
833072
  var LOGS_FOLDER_NAME = "logs";
833026
833073
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
833027
833074
  function getCliSource() {
833028
- const version7 = "4.107.2";
833075
+ const version7 = "4.107.3";
833029
833076
  return `cli@${version7}`;
833030
833077
  }
833031
833078
  var DebugLogger = class {
@@ -845443,7 +845490,7 @@ var LegacyDocsPublisher = class {
845443
845490
  previewId,
845444
845491
  disableTemplates: void 0,
845445
845492
  skipUpload,
845446
- cliVersion: "4.107.2",
845493
+ cliVersion: "4.107.3",
845447
845494
  loginCommand: "fern auth login"
845448
845495
  });
845449
845496
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -919678,7 +919725,7 @@ var CliContext = class _CliContext {
919678
919725
  if (false) {
919679
919726
  this.logger.error("CLI_VERSION is not defined");
919680
919727
  }
919681
- return "4.107.2";
919728
+ return "4.107.3";
919682
919729
  }
919683
919730
  getCliName() {
919684
919731
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.107.2",
2
+ "version": "4.107.3",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",