@fern-api/fern-api-dev 5.40.0 → 5.40.1

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 +112 -53
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -52657,9 +52657,9 @@ var init_streamObjectToFile = __esm({
52657
52657
  }
52658
52658
  });
52659
52659
 
52660
- // ../../../node_modules/.pnpm/tmp@0.2.5/node_modules/tmp/lib/tmp.js
52660
+ // ../../../node_modules/.pnpm/tmp@0.2.6/node_modules/tmp/lib/tmp.js
52661
52661
  var require_tmp = __commonJS({
52662
- "../../../node_modules/.pnpm/tmp@0.2.5/node_modules/tmp/lib/tmp.js"(exports2, module4) {
52662
+ "../../../node_modules/.pnpm/tmp@0.2.6/node_modules/tmp/lib/tmp.js"(exports2, module4) {
52663
52663
  "use strict";
52664
52664
  var fs38 = require("fs");
52665
52665
  var os24 = require("os");
@@ -52910,13 +52910,20 @@ var require_tmp = __commonJS({
52910
52910
  ].join("");
52911
52911
  return path117.join(tmpDir, opts.dir, name2);
52912
52912
  }
52913
+ function _assertPath(path118) {
52914
+ if (path118.includes("..")) {
52915
+ throw new Error("Relative value not allowed");
52916
+ }
52917
+ return path118;
52918
+ }
52913
52919
  function _assertOptionsBase(options2) {
52914
52920
  if (!_isUndefined(options2.name)) {
52915
52921
  const name2 = options2.name;
52916
52922
  if (path117.isAbsolute(name2)) throw new Error(`name option must not contain an absolute path, found "${name2}".`);
52917
52923
  const basename6 = path117.basename(name2);
52918
- if (basename6 === ".." || basename6 === "." || basename6 !== name2)
52924
+ if (basename6 === ".." || basename6 === "." || basename6 !== name2) {
52919
52925
  throw new Error(`name option must not contain a path, found "${name2}".`);
52926
+ }
52920
52927
  }
52921
52928
  if (!_isUndefined(options2.template) && !options2.template.match(TEMPLATE_PATTERN)) {
52922
52929
  throw new Error(`Invalid template, found "${options2.template}".`);
@@ -52929,15 +52936,16 @@ var require_tmp = __commonJS({
52929
52936
  options2.detachDescriptor = !!options2.detachDescriptor;
52930
52937
  options2.discardDescriptor = !!options2.discardDescriptor;
52931
52938
  options2.unsafeCleanup = !!options2.unsafeCleanup;
52932
- options2.prefix = _isUndefined(options2.prefix) ? "" : options2.prefix;
52933
- options2.postfix = _isUndefined(options2.postfix) ? "" : options2.postfix;
52939
+ options2.prefix = _isUndefined(options2.prefix) ? "" : _assertPath(options2.prefix);
52940
+ options2.postfix = _isUndefined(options2.postfix) ? "" : _assertPath(options2.postfix);
52941
+ options2.template = _isUndefined(options2.template) ? void 0 : _assertPath(options2.template);
52934
52942
  }
52935
52943
  function _getRelativePath(option, name2, tmpDir, cb) {
52936
52944
  if (_isUndefined(name2)) return cb(null);
52937
52945
  _resolvePath(name2, tmpDir, function(err, resolvedPath) {
52938
52946
  if (err) return cb(err);
52939
52947
  const relativePath = path117.relative(tmpDir, resolvedPath);
52940
- if (!resolvedPath.startsWith(tmpDir)) {
52948
+ if (relativePath.startsWith("..") || path117.isAbsolute(relativePath)) {
52941
52949
  return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`));
52942
52950
  }
52943
52951
  cb(null, relativePath);
@@ -52947,7 +52955,7 @@ var require_tmp = __commonJS({
52947
52955
  if (_isUndefined(name2)) return;
52948
52956
  const resolvedPath = _resolvePathSync(name2, tmpDir);
52949
52957
  const relativePath = path117.relative(tmpDir, resolvedPath);
52950
- if (!resolvedPath.startsWith(tmpDir)) {
52958
+ if (relativePath.startsWith("..") || path117.isAbsolute(relativePath)) {
52951
52959
  throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`);
52952
52960
  }
52953
52961
  return relativePath;
@@ -108916,9 +108924,9 @@ var require_object_inspect = __commonJS({
108916
108924
  }
108917
108925
  });
108918
108926
 
108919
- // ../../../node_modules/.pnpm/side-channel-list@1.0.0/node_modules/side-channel-list/index.js
108927
+ // ../../../node_modules/.pnpm/side-channel-list@1.0.1/node_modules/side-channel-list/index.js
108920
108928
  var require_side_channel_list = __commonJS({
108921
- "../../../node_modules/.pnpm/side-channel-list@1.0.0/node_modules/side-channel-list/index.js"(exports2, module4) {
108929
+ "../../../node_modules/.pnpm/side-channel-list@1.0.1/node_modules/side-channel-list/index.js"(exports2, module4) {
108922
108930
  "use strict";
108923
108931
  var inspect6 = require_object_inspect();
108924
108932
  var $TypeError = require_type3();
@@ -108978,9 +108986,8 @@ var require_side_channel_list = __commonJS({
108978
108986
  }
108979
108987
  },
108980
108988
  "delete": function(key2) {
108981
- var root6 = $o8 && $o8.next;
108982
108989
  var deletedNode = listDelete($o8, key2);
108983
- if (deletedNode && root6 && root6 === deletedNode) {
108990
+ if (deletedNode && $o8 && !$o8.next) {
108984
108991
  $o8 = void 0;
108985
108992
  }
108986
108993
  return !!deletedNode;
@@ -109996,9 +110003,9 @@ var require_side_channel = __commonJS({
109996
110003
  }
109997
110004
  });
109998
110005
 
109999
- // ../../../node_modules/.pnpm/qs@6.15.0/node_modules/qs/lib/formats.js
110006
+ // ../../../node_modules/.pnpm/qs@6.15.2/node_modules/qs/lib/formats.js
110000
110007
  var require_formats = __commonJS({
110001
- "../../../node_modules/.pnpm/qs@6.15.0/node_modules/qs/lib/formats.js"(exports2, module4) {
110008
+ "../../../node_modules/.pnpm/qs@6.15.2/node_modules/qs/lib/formats.js"(exports2, module4) {
110002
110009
  "use strict";
110003
110010
  var replace2 = String.prototype.replace;
110004
110011
  var percentTwenties = /%20/g;
@@ -110022,9 +110029,9 @@ var require_formats = __commonJS({
110022
110029
  }
110023
110030
  });
110024
110031
 
110025
- // ../../../node_modules/.pnpm/qs@6.15.0/node_modules/qs/lib/utils.js
110032
+ // ../../../node_modules/.pnpm/qs@6.15.2/node_modules/qs/lib/utils.js
110026
110033
  var require_utils22 = __commonJS({
110027
- "../../../node_modules/.pnpm/qs@6.15.0/node_modules/qs/lib/utils.js"(exports2, module4) {
110034
+ "../../../node_modules/.pnpm/qs@6.15.2/node_modules/qs/lib/utils.js"(exports2, module4) {
110028
110035
  "use strict";
110029
110036
  var formats = require_formats();
110030
110037
  var getSideChannel = require_side_channel();
@@ -110286,9 +110293,9 @@ var require_utils22 = __commonJS({
110286
110293
  }
110287
110294
  });
110288
110295
 
110289
- // ../../../node_modules/.pnpm/qs@6.15.0/node_modules/qs/lib/stringify.js
110296
+ // ../../../node_modules/.pnpm/qs@6.15.2/node_modules/qs/lib/stringify.js
110290
110297
  var require_stringify = __commonJS({
110291
- "../../../node_modules/.pnpm/qs@6.15.0/node_modules/qs/lib/stringify.js"(exports2, module4) {
110298
+ "../../../node_modules/.pnpm/qs@6.15.2/node_modules/qs/lib/stringify.js"(exports2, module4) {
110292
110299
  "use strict";
110293
110300
  var getSideChannel = require_side_channel();
110294
110301
  var utils2 = require_utils22();
@@ -110374,7 +110381,7 @@ var require_stringify = __commonJS({
110374
110381
  }
110375
110382
  if (obj === null) {
110376
110383
  if (strictNullHandling) {
110377
- return encoder && !encodeValuesOnly ? encoder(prefix2, defaults3.encoder, charset, "key", format3) : prefix2;
110384
+ return formatter(encoder && !encodeValuesOnly ? encoder(prefix2, defaults3.encoder, charset, "key", format3) : prefix2);
110378
110385
  }
110379
110386
  obj = "";
110380
110387
  }
@@ -110392,7 +110399,9 @@ var require_stringify = __commonJS({
110392
110399
  var objKeys;
110393
110400
  if (generateArrayPrefix === "comma" && isArray7(obj)) {
110394
110401
  if (encodeValuesOnly && encoder) {
110395
- obj = utils2.maybeMap(obj, encoder);
110402
+ obj = utils2.maybeMap(obj, function(v9) {
110403
+ return v9 == null ? v9 : encoder(v9);
110404
+ });
110396
110405
  }
110397
110406
  objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
110398
110407
  } else if (isArray7(filter8)) {
@@ -110530,6 +110539,9 @@ var require_stringify = __commonJS({
110530
110539
  var sideChannel = getSideChannel();
110531
110540
  for (var i9 = 0; i9 < objKeys.length; ++i9) {
110532
110541
  var key2 = objKeys[i9];
110542
+ if (typeof key2 === "undefined" || key2 === null) {
110543
+ continue;
110544
+ }
110533
110545
  var value2 = obj[key2];
110534
110546
  if (options2.skipNulls && value2 === null) {
110535
110547
  continue;
@@ -110559,9 +110571,9 @@ var require_stringify = __commonJS({
110559
110571
  var prefix2 = options2.addQueryPrefix === true ? "?" : "";
110560
110572
  if (options2.charsetSentinel) {
110561
110573
  if (options2.charset === "iso-8859-1") {
110562
- prefix2 += "utf8=%26%2310003%3B&";
110574
+ prefix2 += "utf8=%26%2310003%3B" + options2.delimiter;
110563
110575
  } else {
110564
- prefix2 += "utf8=%E2%9C%93&";
110576
+ prefix2 += "utf8=%E2%9C%93" + options2.delimiter;
110565
110577
  }
110566
110578
  }
110567
110579
  return joined.length > 0 ? prefix2 + joined : "";
@@ -110569,9 +110581,9 @@ var require_stringify = __commonJS({
110569
110581
  }
110570
110582
  });
110571
110583
 
110572
- // ../../../node_modules/.pnpm/qs@6.15.0/node_modules/qs/lib/parse.js
110584
+ // ../../../node_modules/.pnpm/qs@6.15.2/node_modules/qs/lib/parse.js
110573
110585
  var require_parse2 = __commonJS({
110574
- "../../../node_modules/.pnpm/qs@6.15.0/node_modules/qs/lib/parse.js"(exports2, module4) {
110586
+ "../../../node_modules/.pnpm/qs@6.15.2/node_modules/qs/lib/parse.js"(exports2, module4) {
110575
110587
  "use strict";
110576
110588
  var utils2 = require_utils22();
110577
110589
  var has2 = Object.prototype.hasOwnProperty;
@@ -110623,9 +110635,9 @@ var require_parse2 = __commonJS({
110623
110635
  var limit = options2.parameterLimit === Infinity ? void 0 : options2.parameterLimit;
110624
110636
  var parts = cleanStr.split(
110625
110637
  options2.delimiter,
110626
- options2.throwOnLimitExceeded ? limit + 1 : limit
110638
+ options2.throwOnLimitExceeded && typeof limit !== "undefined" ? limit + 1 : limit
110627
110639
  );
110628
- if (options2.throwOnLimitExceeded && parts.length > limit) {
110640
+ if (options2.throwOnLimitExceeded && typeof limit !== "undefined" && parts.length > limit) {
110629
110641
  throw new RangeError("Parameter limit exceeded. Only " + limit + " parameter" + (limit === 1 ? "" : "s") + " allowed.");
110630
110642
  }
110631
110643
  var skipIndex = -1;
@@ -110744,8 +110756,8 @@ var require_parse2 = __commonJS({
110744
110756
  }
110745
110757
  return leaf;
110746
110758
  };
110747
- var splitKeyIntoSegments = function splitKeyIntoSegments2(givenKey, options2) {
110748
- var key2 = options2.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey;
110759
+ var splitKeyIntoSegments = function splitKeyIntoSegments2(originalKey, options2) {
110760
+ var key2 = options2.allowDots ? originalKey.replace(/\.([^.[]+)/g, "[$1]") : originalKey;
110749
110761
  if (options2.depth <= 0) {
110750
110762
  if (!options2.plainObjects && has2.call(Object.prototype, key2)) {
110751
110763
  if (!options2.allowPrototypes) {
@@ -110754,37 +110766,56 @@ var require_parse2 = __commonJS({
110754
110766
  }
110755
110767
  return [key2];
110756
110768
  }
110757
- var brackets = /(\[[^[\]]*])/;
110758
- var child = /(\[[^[\]]*])/g;
110759
- var segment = brackets.exec(key2);
110760
- var parent = segment ? key2.slice(0, segment.index) : key2;
110761
- var keys25 = [];
110769
+ var segments = [];
110770
+ var first3 = key2.indexOf("[");
110771
+ var parent = first3 >= 0 ? key2.slice(0, first3) : key2;
110762
110772
  if (parent) {
110763
110773
  if (!options2.plainObjects && has2.call(Object.prototype, parent)) {
110764
110774
  if (!options2.allowPrototypes) {
110765
110775
  return;
110766
110776
  }
110767
110777
  }
110768
- keys25[keys25.length] = parent;
110778
+ segments[segments.length] = parent;
110769
110779
  }
110770
- var i9 = 0;
110771
- while ((segment = child.exec(key2)) !== null && i9 < options2.depth) {
110772
- i9 += 1;
110773
- var segmentContent = segment[1].slice(1, -1);
110774
- if (!options2.plainObjects && has2.call(Object.prototype, segmentContent)) {
110775
- if (!options2.allowPrototypes) {
110776
- return;
110780
+ var n19 = key2.length;
110781
+ var open5 = first3;
110782
+ var collected = 0;
110783
+ while (open5 >= 0 && collected < options2.depth) {
110784
+ var level = 1;
110785
+ var i9 = open5 + 1;
110786
+ var close3 = -1;
110787
+ while (i9 < n19 && close3 < 0) {
110788
+ var cu5 = key2.charCodeAt(i9);
110789
+ if (cu5 === 91) {
110790
+ level += 1;
110791
+ } else if (cu5 === 93) {
110792
+ level -= 1;
110793
+ if (level === 0) {
110794
+ close3 = i9;
110795
+ }
110777
110796
  }
110797
+ i9 += 1;
110798
+ }
110799
+ if (close3 < 0) {
110800
+ segments[segments.length] = "[" + key2.slice(open5) + "]";
110801
+ return segments;
110778
110802
  }
110779
- keys25[keys25.length] = segment[1];
110803
+ var seg = key2.slice(open5, close3 + 1);
110804
+ var content5 = seg.slice(1, -1);
110805
+ if (!options2.plainObjects && has2.call(Object.prototype, content5) && !options2.allowPrototypes) {
110806
+ return;
110807
+ }
110808
+ segments[segments.length] = seg;
110809
+ collected += 1;
110810
+ open5 = key2.indexOf("[", close3 + 1);
110780
110811
  }
110781
- if (segment) {
110812
+ if (open5 >= 0) {
110782
110813
  if (options2.strictDepth === true) {
110783
110814
  throw new RangeError("Input depth exceeded depth option of " + options2.depth + " and strictDepth is true");
110784
110815
  }
110785
- keys25[keys25.length] = "[" + key2.slice(segment.index) + "]";
110816
+ segments[segments.length] = "[" + key2.slice(open5) + "]";
110786
110817
  }
110787
- return keys25;
110818
+ return segments;
110788
110819
  };
110789
110820
  var parseKeys = function parseQueryStringKeys(givenKey, val, options2, valuesParsed) {
110790
110821
  if (!givenKey) {
@@ -110868,9 +110899,9 @@ var require_parse2 = __commonJS({
110868
110899
  }
110869
110900
  });
110870
110901
 
110871
- // ../../../node_modules/.pnpm/qs@6.15.0/node_modules/qs/lib/index.js
110902
+ // ../../../node_modules/.pnpm/qs@6.15.2/node_modules/qs/lib/index.js
110872
110903
  var require_lib3 = __commonJS({
110873
- "../../../node_modules/.pnpm/qs@6.15.0/node_modules/qs/lib/index.js"(exports2, module4) {
110904
+ "../../../node_modules/.pnpm/qs@6.15.2/node_modules/qs/lib/index.js"(exports2, module4) {
110874
110905
  "use strict";
110875
110906
  var stringify5 = require_stringify();
110876
110907
  var parse19 = require_parse2();
@@ -669350,7 +669381,7 @@ var AccessTokenPosthogManager = class {
669350
669381
  properties: {
669351
669382
  ...event,
669352
669383
  ...event.properties,
669353
- version: "5.40.0",
669384
+ version: "5.40.1",
669354
669385
  usingAccessToken: true,
669355
669386
  ...getRunIdProperties()
669356
669387
  }
@@ -669414,7 +669445,7 @@ var UserPosthogManager = class {
669414
669445
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
669415
669446
  event: "CLI",
669416
669447
  properties: {
669417
- version: "5.40.0",
669448
+ version: "5.40.1",
669418
669449
  ...event,
669419
669450
  ...event.properties,
669420
669451
  usingAccessToken: false,
@@ -854957,6 +854988,22 @@ var import_path58 = __toESM(require("path"), 1);
854957
854988
  // ../yaml/docs-validator/lib/rules/valid-markdown-link/check-if-pathname-exists.js
854958
854989
  init_lib8();
854959
854990
 
854991
+ // ../yaml/docs-validator/lib/rules/valid-markdown-link/dynamic-special-doc-page.js
854992
+ var DYNAMIC_SPEC_PATTERN = /^\/(openapi|asyncapi)\/.+\.(json|ya?ml)$/;
854993
+ function isDynamicSpecialDocPage(pathname, basePath) {
854994
+ if (DYNAMIC_SPEC_PATTERN.test(pathname)) {
854995
+ return true;
854996
+ }
854997
+ if (basePath != null) {
854998
+ const normalizedBase = basePath.startsWith("/") ? basePath : `/${basePath}`;
854999
+ if (pathname.startsWith(normalizedBase)) {
855000
+ const withoutBase = pathname.slice(normalizedBase.length);
855001
+ return DYNAMIC_SPEC_PATTERN.test(withoutBase);
855002
+ }
855003
+ }
855004
+ return false;
855005
+ }
855006
+
854960
855007
  // ../yaml/docs-validator/lib/rules/valid-markdown-link/redirect-for-path.js
854961
855008
  var import_url_join22 = __toESM(require_url_join(), 1);
854962
855009
  function matchPath2(pattern, path117) {
@@ -855046,6 +855093,9 @@ async function checkIfPathnameExists({ pathname, markdown, absoluteFilepath, wor
855046
855093
  if (isExternalUrl2(redirectedPath)) {
855047
855094
  return true;
855048
855095
  }
855096
+ if (isDynamicSpecialDocPage(redirectedPath, baseUrl.basePath)) {
855097
+ return true;
855098
+ }
855049
855099
  if (markdown && pageSlugs.has(removeLeadingSlash(redirectedPath))) {
855050
855100
  return true;
855051
855101
  }
@@ -855441,7 +855491,16 @@ var ValidMarkdownLinks = {
855441
855491
  });
855442
855492
  const versionSlugs = collector.getVersionNodes().map((v9) => v9.slug);
855443
855493
  const productSlugs = collector.getProductNodes().filter(navigation_exports.isInternalProductNode).map((p14) => p14.slug);
855444
- const specialDocPages = ["/llms-full.txt", "/llms.txt"];
855494
+ const specialDocPages = [
855495
+ "/llms-full.txt",
855496
+ "/llms.txt",
855497
+ "/openapi.json",
855498
+ "/openapi.yaml",
855499
+ "/openapi.yml",
855500
+ "/asyncapi.json",
855501
+ "/asyncapi.yaml",
855502
+ "/asyncapi.yml"
855503
+ ];
855445
855504
  for (const specialPage of specialDocPages) {
855446
855505
  const pageWithBasePath = baseUrl.basePath ? `${removeLeadingSlash(baseUrl.basePath)}${specialPage}` : removeLeadingSlash(specialPage);
855447
855506
  visitableSlugs.add(pageWithBasePath);
@@ -860327,7 +860386,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
860327
860386
  var LOGS_FOLDER_NAME = "logs";
860328
860387
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
860329
860388
  function getCliSource() {
860330
- const version7 = "5.40.0";
860389
+ const version7 = "5.40.1";
860331
860390
  return `cli@${version7}`;
860332
860391
  }
860333
860392
  var DebugLogger = class {
@@ -880967,7 +881026,7 @@ var LegacyDocsPublisher = class {
880967
881026
  previewId,
880968
881027
  disableTemplates: void 0,
880969
881028
  skipUpload,
880970
- cliVersion: "5.40.0",
881029
+ cliVersion: "5.40.1",
880971
881030
  loginCommand: "fern auth login"
880972
881031
  });
880973
881032
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -955887,7 +955946,7 @@ function getAutomationContextFromEnv() {
955887
955946
  config_branch: process.env.FERN_CONFIG_BRANCH,
955888
955947
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
955889
955948
  trigger: process.env.GITHUB_EVENT_NAME,
955890
- cli_version: "5.40.0"
955949
+ cli_version: "5.40.1"
955891
955950
  };
955892
955951
  }
955893
955952
  function isAutomationMode() {
@@ -956713,7 +956772,7 @@ var CliContext = class _CliContext {
956713
956772
  if (false) {
956714
956773
  this.logger.error("CLI_VERSION is not defined");
956715
956774
  }
956716
- return "5.40.0";
956775
+ return "5.40.1";
956717
956776
  }
956718
956777
  getCliName() {
956719
956778
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.40.0",
2
+ "version": "5.40.1",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",