@fern-api/fern-api-dev 5.120.2 → 5.120.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 +60 -43
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -706738,7 +706738,7 @@ var AccessTokenPosthogManager = class {
706738
706738
  properties: {
706739
706739
  ...event,
706740
706740
  ...event.properties,
706741
- version: "5.120.2",
706741
+ version: "5.120.3",
706742
706742
  usingAccessToken: true,
706743
706743
  ...getRunIdProperties()
706744
706744
  }
@@ -706804,7 +706804,7 @@ var UserPosthogManager = class {
706804
706804
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
706805
706805
  event: "CLI",
706806
706806
  properties: {
706807
- version: "5.120.2",
706807
+ version: "5.120.3",
706808
706808
  ...event,
706809
706809
  ...event.properties,
706810
706810
  usingAccessToken: false,
@@ -859817,6 +859817,43 @@ async function visitDocsConfigFileYamlAst({ contents, visitor, absoluteFilepathT
859817
859817
  await visitor.file?.({
859818
859818
  config: contents
859819
859819
  }, []);
859820
+ const visitVersion = async ({ version: version7, product, nodePath }) => {
859821
+ await visitor.version?.({ version: version7 }, nodePath);
859822
+ if (version7.path == null) {
859823
+ return;
859824
+ }
859825
+ const versionPath = version7.path;
859826
+ await visitFilepath({
859827
+ absoluteFilepathToConfiguration,
859828
+ rawUnresolvedFilepath: versionPath,
859829
+ visitor,
859830
+ nodePath,
859831
+ willBeUploaded: false
859832
+ });
859833
+ const absoluteFilepath = resolve6(dirname6(absoluteFilepathToConfiguration), versionPath);
859834
+ if (!await doesPathExist(absoluteFilepath)) {
859835
+ return;
859836
+ }
859837
+ const content5 = index_vite_proxy_tmp_default.load((await (0, import_promises84.readFile)(absoluteFilepath)).toString());
859838
+ await visitor.versionFile?.({
859839
+ path: versionPath,
859840
+ content: content5,
859841
+ version: version7,
859842
+ product
859843
+ }, [versionPath]);
859844
+ const parsedVersionFile = await validateVersionConfigFileSchema({ value: content5 });
859845
+ if (parsedVersionFile.type === "success") {
859846
+ await visitNavigationAst2({
859847
+ absolutePathToFernFolder,
859848
+ navigation: parsedVersionFile.contents.navigation,
859849
+ visitor,
859850
+ nodePath: ["navigation"],
859851
+ absoluteFilepathToConfiguration: absoluteFilepath,
859852
+ apiWorkspaces,
859853
+ context: context3
859854
+ });
859855
+ }
859856
+ };
859820
859857
  await visitObjectAsync(contents, {
859821
859858
  instances: noop2,
859822
859859
  analytics: noop2,
@@ -860045,6 +860082,14 @@ async function visitDocsConfigFileYamlAst({ contents, visitor, absoluteFilepathT
860045
860082
  product
860046
860083
  }, [product.path]);
860047
860084
  }
860085
+ if (product.versions != null && product.versions.length > 0) {
860086
+ await Promise.all(product.versions.map((version7, versionIdx) => visitVersion({
860087
+ version: version7,
860088
+ product,
860089
+ nodePath: ["products", `${idx}`, "versions", `${versionIdx}`]
860090
+ })));
860091
+ return;
860092
+ }
860048
860093
  const parsedProductFile = await validateProductConfigFileSchema({ value: content5 });
860049
860094
  if (parsedProductFile.type === "success") {
860050
860095
  await visitNavigationAst2({
@@ -860113,41 +860158,7 @@ async function visitDocsConfigFileYamlAst({ contents, visitor, absoluteFilepathT
860113
860158
  }
860114
860159
  const versionsStart = performance.now();
860115
860160
  context3.logger.debug(`[docs-ast] Processing ${versions.length} versions...`);
860116
- await Promise.all(versions.map(async (version7, idx) => {
860117
- await visitor.version?.({ version: version7 }, ["versions", `${idx}`]);
860118
- if (version7.path == null) {
860119
- return;
860120
- }
860121
- const versionPath = version7.path;
860122
- await visitFilepath({
860123
- absoluteFilepathToConfiguration,
860124
- rawUnresolvedFilepath: versionPath,
860125
- visitor,
860126
- nodePath: ["versions", `${idx}`],
860127
- willBeUploaded: false
860128
- });
860129
- const absoluteFilepath = resolve6(dirname6(absoluteFilepathToConfiguration), versionPath);
860130
- const content5 = index_vite_proxy_tmp_default.load((await (0, import_promises84.readFile)(absoluteFilepath)).toString());
860131
- if (await doesPathExist(absoluteFilepath)) {
860132
- await visitor.versionFile?.({
860133
- path: version7.path,
860134
- content: content5,
860135
- version: version7
860136
- }, [version7.path]);
860137
- }
860138
- const parsedVersionFile = await validateVersionConfigFileSchema({ value: content5 });
860139
- if (parsedVersionFile.type === "success") {
860140
- await visitNavigationAst2({
860141
- absolutePathToFernFolder,
860142
- navigation: parsedVersionFile.contents.navigation,
860143
- visitor,
860144
- nodePath: ["navigation"],
860145
- absoluteFilepathToConfiguration: absoluteFilepath,
860146
- apiWorkspaces,
860147
- context: context3
860148
- });
860149
- }
860150
- }));
860161
+ await Promise.all(versions.map((version7, idx) => visitVersion({ version: version7, nodePath: ["versions", `${idx}`] })));
860151
860162
  context3.logger.debug(`[docs-ast] Versions processing complete in ${(performance.now() - versionsStart).toFixed(0)}ms`);
860152
860163
  },
860153
860164
  roles: noop2,
@@ -861484,13 +861495,16 @@ var ValidChangelogSlugRule = {
861484
861495
  ];
861485
861496
  return violationsForLocations(locations);
861486
861497
  },
861487
- versionFile: async ({ path: path124, content: content5, version: version7 }) => {
861498
+ versionFile: async ({ path: path124, content: content5, version: version7, product }) => {
861488
861499
  const parseResult = await validateVersionConfigFileSchema({ value: content5 });
861489
861500
  if (parseResult.type !== "success") {
861490
861501
  return [];
861491
861502
  }
861492
861503
  const versionConfig = parseResult.contents;
861493
- const versionSegments = ancestorSlugSegments({ slug: version7.slug, displayName: version7.displayName });
861504
+ const versionSegments = [
861505
+ ...product != null ? ancestorSlugSegments({ slug: product.slug, displayName: product.displayName }) : [],
861506
+ ...ancestorSlugSegments({ slug: version7.slug, displayName: version7.displayName })
861507
+ ];
861494
861508
  const locations = [
861495
861509
  ...collectFromNavigation(versionConfig.navigation, versionConfig.tabs, `version "${path124}" navigation`, versionSegments),
861496
861510
  ...collectFromTabs(versionConfig.tabs, `version "${path124}" tabs`, versionSegments)
@@ -861498,6 +861512,9 @@ var ValidChangelogSlugRule = {
861498
861512
  return violationsForLocations(locations);
861499
861513
  },
861500
861514
  productFile: async ({ path: path124, content: content5, product }) => {
861515
+ if (product.versions != null && product.versions.length > 0) {
861516
+ return [];
861517
+ }
861501
861518
  const parseResult = await validateProductConfigFileSchema({ value: content5 });
861502
861519
  if (parseResult.type !== "success") {
861503
861520
  return [];
@@ -888490,7 +888507,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
888490
888507
  var LOGS_FOLDER_NAME = "logs";
888491
888508
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
888492
888509
  function getCliSource() {
888493
- const version7 = "5.120.2";
888510
+ const version7 = "5.120.3";
888494
888511
  return `cli@${version7}`;
888495
888512
  }
888496
888513
  var DebugLogger = class {
@@ -915838,7 +915855,7 @@ var LegacyDocsPublisher = class {
915838
915855
  previewId,
915839
915856
  disableTemplates: void 0,
915840
915857
  skipUpload,
915841
- cliVersion: "5.120.2",
915858
+ cliVersion: "5.120.3",
915842
915859
  loginCommand: "fern auth login"
915843
915860
  });
915844
915861
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -983256,7 +983273,7 @@ function getAutomationContextFromEnv() {
983256
983273
  config_branch: process.env.FERN_CONFIG_BRANCH,
983257
983274
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
983258
983275
  trigger: process.env.GITHUB_EVENT_NAME,
983259
- cli_version: "5.120.2"
983276
+ cli_version: "5.120.3"
983260
983277
  };
983261
983278
  }
983262
983279
  function isAutomationMode() {
@@ -984088,7 +984105,7 @@ var CliContext = class _CliContext {
984088
984105
  if (false) {
984089
984106
  this.logger.error("CLI_VERSION is not defined");
984090
984107
  }
984091
- return "5.120.2";
984108
+ return "5.120.3";
984092
984109
  }
984093
984110
  getCliName() {
984094
984111
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.120.2",
2
+ "version": "5.120.3",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",