fern-api 0.20.0-rc0 → 0.20.0

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/bundle.cjs +34 -12
  2. package/package.json +1 -1
package/bundle.cjs CHANGED
@@ -827265,7 +827265,7 @@ var AccessTokenPosthogManager = class {
827265
827265
  properties: {
827266
827266
  ...event,
827267
827267
  ...event.properties,
827268
- version: "0.20.0-rc0",
827268
+ version: "0.20.0",
827269
827269
  usingAccessToken: true
827270
827270
  }
827271
827271
  });
@@ -827327,7 +827327,7 @@ var UserPosthogManager = class {
827327
827327
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
827328
827328
  event: "CLI",
827329
827329
  properties: {
827330
- version: "0.20.0-rc0",
827330
+ version: "0.20.0",
827331
827331
  ...event,
827332
827332
  ...event.properties
827333
827333
  }
@@ -851329,10 +851329,10 @@ var CliContext = class {
851329
851329
  return "fern-api";
851330
851330
  }
851331
851331
  getPackageVersion() {
851332
- if ("0.20.0-rc0" == null) {
851332
+ if ("0.20.0" == null) {
851333
851333
  this.logger.error("CLI_VERSION is not defined");
851334
851334
  }
851335
- return "0.20.0-rc0";
851335
+ return "0.20.0";
851336
851336
  }
851337
851337
  getCliName() {
851338
851338
  if ("fern" == null) {
@@ -852066,7 +852066,7 @@ function convertRequestBody(irRequest) {
852066
852066
  type: "bodyProperty",
852067
852067
  key: bodyProperty.name.wireValue,
852068
852068
  valueType: convertTypeReference(bodyProperty.valueType),
852069
- docs: bodyProperty.docs
852069
+ description: bodyProperty.docs
852070
852070
  }),
852071
852071
  _other: () => void 0
852072
852072
  });
@@ -894905,6 +894905,19 @@ function visitAndSortNavigationSchema(navigationItems, defaultItems, ir, absolut
894905
894905
  return items;
894906
894906
  }
894907
894907
 
894908
+ // pnp:/home/circleci/project/packages/cli/generation/remote-generation/remote-workspace-runner/lib/extractDatetimeFromChangelogTitle.js
894909
+ function extractDatetimeFromChangelogTitle(filename) {
894910
+ const filenameWithoutExtension = filename.split(".")[0];
894911
+ if (filenameWithoutExtension == null) {
894912
+ return void 0;
894913
+ }
894914
+ try {
894915
+ return new Date(filenameWithoutExtension);
894916
+ } catch (error) {
894917
+ }
894918
+ return void 0;
894919
+ }
894920
+
894908
894921
  // pnp:/home/circleci/project/packages/cli/generation/remote-generation/remote-workspace-runner/lib/publishDocs.js
894909
894922
  async function publishDocs({ token, organization, docsWorkspace, domain: domain2, customDomains, fernWorkspaces, context, version: version3, preview, editThisPage, isPrivate = false }) {
894910
894923
  const fdr = createFdrService({ token: token.value });
@@ -895507,11 +895520,25 @@ async function convertNavigationItem2({ item, parsedDocsConfig, organization, fe
895507
895520
  }
895508
895521
  })
895509
895522
  });
895523
+ const changelogItems = [];
895510
895524
  if (workspace.changelog != null) {
895511
895525
  for (const file of workspace.changelog.files) {
895526
+ const splitFilepath = file.absoluteFilepath.split("/");
895527
+ const filename = splitFilepath[splitFilepath.length - 1];
895528
+ if (filename == null) {
895529
+ continue;
895530
+ }
895531
+ const changelogDate = extractDatetimeFromChangelogTitle(filename);
895532
+ if (changelogDate == null) {
895533
+ continue;
895534
+ }
895512
895535
  pages[file.absoluteFilepath] = {
895513
895536
  markdown: file.contents
895514
895537
  };
895538
+ changelogItems.push({
895539
+ date: changelogDate.toISOString(),
895540
+ pageId: file.absoluteFilepath
895541
+ });
895515
895542
  }
895516
895543
  }
895517
895544
  convertedItem = {
@@ -895519,14 +895546,9 @@ async function convertNavigationItem2({ item, parsedDocsConfig, organization, fe
895519
895546
  title: item.title,
895520
895547
  api: apiDefinitionId,
895521
895548
  showErrors: item.showErrors,
895522
- changelog: workspace.changelog != null ? {
895549
+ changelog: changelogItems.length > 0 ? {
895523
895550
  urlSlug: "changelog",
895524
- items: workspace.changelog.files.map((file) => {
895525
- return {
895526
- date: new Date().toISOString(),
895527
- pageId: file.absoluteFilepath
895528
- };
895529
- })
895551
+ items: changelogItems
895530
895552
  } : void 0,
895531
895553
  navigation: convertIrToNavigation(ir, item.summaryAbsolutePath, item.navigation, parsedDocsConfig.absoluteFilepath, fullSlugs)
895532
895554
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fern-api",
3
- "version": "0.20.0-rc0",
3
+ "version": "0.20.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern.git",