@fern-api/fern-api-dev 5.2.1-5-geb7105beec4 → 5.2.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 +13 -30
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -544029,14 +544029,11 @@ async function loadTranslationNavigationOverlays({ translations, defaultLocale,
544029
544029
  if (lang === defaultLocale) {
544030
544030
  return;
544031
544031
  }
544032
- const overlayLookup = await resolveTranslationOverlayDocsYml({
544033
- translationsRootDir,
544034
- lang
544035
- });
544036
- if (overlayLookup == null) {
544032
+ const langFernDir = import_path22.default.join(translationsRootDir, lang, "fern");
544033
+ const overlayDocsYmlPath = import_path22.default.join(langFernDir, "docs.yml");
544034
+ if (!await doesPathExist(overlayDocsYmlPath)) {
544037
544035
  return;
544038
544036
  }
544039
- const { overlayDocsYmlPath, overlayDir } = overlayLookup;
544040
544037
  try {
544041
544038
  const overlayContent = jsYaml.load(await (0, import_promises14.readFile)(overlayDocsYmlPath, "utf-8"));
544042
544039
  if (!isPlainObject4(overlayContent)) {
@@ -544045,7 +544042,7 @@ async function loadTranslationNavigationOverlays({ translations, defaultLocale,
544045
544042
  }
544046
544043
  const overlay = await parseNavigationOverlayFromDocsYml({
544047
544044
  docsYmlContent: overlayContent,
544048
- langFernDir: overlayDir,
544045
+ langFernDir,
544049
544046
  context: context3
544050
544047
  });
544051
544048
  result[lang] = overlay;
@@ -544058,19 +544055,6 @@ async function loadTranslationNavigationOverlays({ translations, defaultLocale,
544058
544055
  }
544059
544056
  return result;
544060
544057
  }
544061
- async function resolveTranslationOverlayDocsYml({ translationsRootDir, lang }) {
544062
- const langDir = import_path22.default.join(translationsRootDir, lang);
544063
- const directDocsYmlPath = import_path22.default.join(langDir, "docs.yml");
544064
- if (await doesPathExist(directDocsYmlPath)) {
544065
- return { overlayDocsYmlPath: directDocsYmlPath, overlayDir: langDir };
544066
- }
544067
- const legacyFernDir = import_path22.default.join(langDir, "fern");
544068
- const legacyDocsYmlPath = import_path22.default.join(legacyFernDir, "docs.yml");
544069
- if (await doesPathExist(legacyDocsYmlPath)) {
544070
- return { overlayDocsYmlPath: legacyDocsYmlPath, overlayDir: legacyFernDir };
544071
- }
544072
- return void 0;
544073
- }
544074
544058
  function extractString(obj, key2) {
544075
544059
  if (isPlainObject4(obj)) {
544076
544060
  const value2 = obj[key2];
@@ -544080,7 +544064,7 @@ function extractString(obj, key2) {
544080
544064
  }
544081
544065
  return void 0;
544082
544066
  }
544083
- async function parseNavigationOverlayFromDocsYml({ docsYmlContent, langFernDir: overlayDir, context: context3 }) {
544067
+ async function parseNavigationOverlayFromDocsYml({ docsYmlContent, langFernDir, context: context3 }) {
544084
544068
  const overlay = {
544085
544069
  tabs: void 0,
544086
544070
  products: void 0,
@@ -544119,8 +544103,8 @@ async function parseNavigationOverlayFromDocsYml({ docsYmlContent, langFernDir:
544119
544103
  }
544120
544104
  }
544121
544105
  if (typeof productObj.path === "string") {
544122
- const resolvedNavFilePath = import_path22.default.resolve(overlayDir, productObj.path);
544123
- if (!resolvedNavFilePath.startsWith(overlayDir)) {
544106
+ const resolvedNavFilePath = import_path22.default.resolve(langFernDir, productObj.path);
544107
+ if (!resolvedNavFilePath.startsWith(langFernDir)) {
544124
544108
  context3.logger.warn(`Invalid path in product overlay: "${productObj.path}" escapes the translations directory. Skipping.`);
544125
544109
  overlay.products.push(productOverlay);
544126
544110
  continue;
@@ -622017,7 +622001,7 @@ var AccessTokenPosthogManager = class {
622017
622001
  properties: {
622018
622002
  ...event,
622019
622003
  ...event.properties,
622020
- version: "5.2.1-5-geb7105beec4",
622004
+ version: "5.2.1",
622021
622005
  usingAccessToken: true
622022
622006
  }
622023
622007
  });
@@ -622071,7 +622055,7 @@ var UserPosthogManager = class {
622071
622055
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
622072
622056
  event: "CLI",
622073
622057
  properties: {
622074
- version: "5.2.1-5-geb7105beec4",
622058
+ version: "5.2.1",
622075
622059
  ...event,
622076
622060
  ...event.properties,
622077
622061
  usingAccessToken: false,
@@ -800088,8 +800072,7 @@ var DocsDefinitionResolver = class {
800088
800072
  }
800089
800073
  /**
800090
800074
  * Returns per-locale translated navigation overlays loaded from
800091
- * `translations/<lang>/docs.yml` (or `translations/<lang>/fern/docs.yml` for
800092
- * backwards compatibility) and referenced nav YAML files.
800075
+ * `translations/<lang>/fern/docs.yml` and referenced nav YAML files.
800093
800076
  * Must be called after `resolve()`.
800094
800077
  */
800095
800078
  getTranslationNavigationOverlays() {
@@ -833947,7 +833930,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
833947
833930
  var LOGS_FOLDER_NAME = "logs";
833948
833931
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
833949
833932
  function getCliSource() {
833950
- const version7 = "5.2.1-5-geb7105beec4";
833933
+ const version7 = "5.2.1";
833951
833934
  return `cli@${version7}`;
833952
833935
  }
833953
833936
  var DebugLogger = class {
@@ -846399,7 +846382,7 @@ var LegacyDocsPublisher = class {
846399
846382
  previewId,
846400
846383
  disableTemplates: void 0,
846401
846384
  skipUpload,
846402
- cliVersion: "5.2.1-5-geb7105beec4",
846385
+ cliVersion: "5.2.1",
846403
846386
  loginCommand: "fern auth login"
846404
846387
  });
846405
846388
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -920728,7 +920711,7 @@ var CliContext = class _CliContext {
920728
920711
  if (false) {
920729
920712
  this.logger.error("CLI_VERSION is not defined");
920730
920713
  }
920731
- return "5.2.1-5-geb7105beec4";
920714
+ return "5.2.1";
920732
920715
  }
920733
920716
  getCliName() {
920734
920717
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.2.1-5-geb7105beec4",
2
+ "version": "5.2.1",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",