@fern-api/fern-api-dev 3.59.0 → 3.60.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/cli.cjs +72 -9
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -1495503,8 +1495503,9 @@ async function parseDocsConfiguration({ rawDocsConfiguration, absolutePathToFern
1495503
1495503
  js: js4,
1495504
1495504
  aiChatConfig: aiSearch ?? aiChat,
1495505
1495505
  pageActions: convertPageActions(pageActions, absoluteFilepathToDocsConfig),
1495506
- header: void 0,
1495507
- footer: void 0,
1495506
+ /* custom components */
1495507
+ header: resolveFilepath(rawDocsConfiguration.header, absoluteFilepathToDocsConfig),
1495508
+ footer: resolveFilepath(rawDocsConfiguration.footer, absoluteFilepathToDocsConfig),
1495508
1495509
  experimental
1495509
1495510
  };
1495510
1495511
  }
@@ -1610088,6 +1610089,26 @@ var properties4 = {
1610088
1610089
  type: "null"
1610089
1610090
  }
1610090
1610091
  ]
1610092
+ },
1610093
+ header: {
1610094
+ oneOf: [
1610095
+ {
1610096
+ type: "string"
1610097
+ },
1610098
+ {
1610099
+ type: "null"
1610100
+ }
1610101
+ ]
1610102
+ },
1610103
+ footer: {
1610104
+ oneOf: [
1610105
+ {
1610106
+ type: "string"
1610107
+ },
1610108
+ {
1610109
+ type: "null"
1610110
+ }
1610111
+ ]
1610091
1610112
  }
1610092
1610113
  };
1610093
1610114
  var required3 = [
@@ -1659260,6 +1659281,18 @@ var DocsDefinitionResolver = class {
1659260
1659281
  jsFiles[refFile.relativeFilePath] = refFile.content;
1659261
1659282
  }
1659262
1659283
  }
1659284
+ if (this._parsedDocsConfig.header != null) {
1659285
+ const relativeFilePath = this.toRelativeFilepath(this._parsedDocsConfig.header);
1659286
+ const contents = (await (0, import_promises67.readFile)(this._parsedDocsConfig.header)).toString();
1659287
+ jsFiles[relativeFilePath] = contents;
1659288
+ this.taskContext.logger.debug(`Added custom header component: ${relativeFilePath}`);
1659289
+ }
1659290
+ if (this._parsedDocsConfig.footer != null) {
1659291
+ const relativeFilePath = this.toRelativeFilepath(this._parsedDocsConfig.footer);
1659292
+ const contents = (await (0, import_promises67.readFile)(this._parsedDocsConfig.footer)).toString();
1659293
+ jsFiles[relativeFilePath] = contents;
1659294
+ this.taskContext.logger.debug(`Added custom footer component: ${relativeFilePath}`);
1659295
+ }
1659263
1659296
  const totalResolveTime = performance.now() - resolveStartTime;
1659264
1659297
  const endMemory = process.memoryUsage();
1659265
1659298
  this.taskContext.logger.debug(`Total resolve time: ${totalResolveTime.toFixed(0)}ms, Memory delta: RSS=${((endMemory.rss - startMemory.rss) / 1024 / 1024).toFixed(2)}MB`);
@@ -1659479,8 +1659512,9 @@ var DocsDefinitionResolver = class {
1659479
1659512
  colorsV2: void 0,
1659480
1659513
  typography: void 0,
1659481
1659514
  backgroundImage: void 0,
1659482
- header: void 0,
1659483
- footer: void 0
1659515
+ // custom components - the compiled JS will be stored in jsFiles and referenced by relative path
1659516
+ header: this.parsedDocsConfig.header ? this.toRelativeFilepath(this.parsedDocsConfig.header) : void 0,
1659517
+ footer: this.parsedDocsConfig.footer ? this.toRelativeFilepath(this.parsedDocsConfig.footer) : void 0
1659484
1659518
  };
1659485
1659519
  return config3;
1659486
1659520
  }
@@ -1678852,7 +1678886,7 @@ var AccessTokenPosthogManager = class {
1678852
1678886
  properties: {
1678853
1678887
  ...event,
1678854
1678888
  ...event.properties,
1678855
- version: "3.59.0",
1678889
+ version: "3.60.0",
1678856
1678890
  usingAccessToken: true
1678857
1678891
  }
1678858
1678892
  });
@@ -1678902,7 +1678936,7 @@ var UserPosthogManager = class {
1678902
1678936
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1678903
1678937
  event: "CLI",
1678904
1678938
  properties: {
1678905
- version: "3.59.0",
1678939
+ version: "3.60.0",
1678906
1678940
  ...event,
1678907
1678941
  ...event.properties,
1678908
1678942
  usingAccessToken: false,
@@ -1710824,7 +1710858,7 @@ var CliContext = class {
1710824
1710858
  if (false) {
1710825
1710859
  this.logger.error("CLI_VERSION is not defined");
1710826
1710860
  }
1710827
- return "3.59.0";
1710861
+ return "3.60.0";
1710828
1710862
  }
1710829
1710863
  getCliName() {
1710830
1710864
  if (false) {
@@ -1713938,7 +1713972,7 @@ var import_path56 = __toESM(require("path"), 1);
1713938
1713972
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
1713939
1713973
  var LOGS_FOLDER_NAME = "logs";
1713940
1713974
  function getCliSource() {
1713941
- const version7 = "3.59.0";
1713975
+ const version7 = "3.60.0";
1713942
1713976
  return `cli@${version7}`;
1713943
1713977
  }
1713944
1713978
  var DebugLogger = class {
@@ -1720808,7 +1720842,31 @@ async function visitDocsConfigFileYamlAst({ contents, visitor, absoluteFilepathT
1720808
1720842
  nodePath: ["favicon"]
1720809
1720843
  });
1720810
1720844
  },
1720845
+ footer: async (footer2) => {
1720846
+ if (footer2 == null) {
1720847
+ return;
1720848
+ }
1720849
+ await visitFilepath({
1720850
+ absoluteFilepathToConfiguration,
1720851
+ rawUnresolvedFilepath: footer2,
1720852
+ visitor,
1720853
+ nodePath: ["footer"],
1720854
+ willBeUploaded: false
1720855
+ });
1720856
+ },
1720811
1720857
  footerLinks: noop2,
1720858
+ header: async (header) => {
1720859
+ if (header == null) {
1720860
+ return;
1720861
+ }
1720862
+ await visitFilepath({
1720863
+ absoluteFilepathToConfiguration,
1720864
+ rawUnresolvedFilepath: header,
1720865
+ visitor,
1720866
+ nodePath: ["header"],
1720867
+ willBeUploaded: false
1720868
+ });
1720869
+ },
1720812
1720870
  integrations: noop2,
1720813
1720871
  js: async (js4) => {
1720814
1720872
  if (js4 == null) {
@@ -1741383,7 +1741441,12 @@ async function runCli() {
1741383
1741441
  await exit3();
1741384
1741442
  }
1741385
1741443
  async function tryRunCli(cliContext) {
1741386
- const cli = yargs_default2(hideBin(process.argv)).scriptName(cliContext.environment.cliName).version(false).completion("completion", "Generate shell completion script").fail((message, error49, argv) => {
1741444
+ const args = hideBin(process.argv);
1741445
+ if (args[0] === "completion") {
1741446
+ yargs_default2(args).scriptName(cliContext.environment.cliName).completion("completion", "Generate shell completion script").parse();
1741447
+ return;
1741448
+ }
1741449
+ const cli = yargs_default2(args).scriptName(cliContext.environment.cliName).version(false).completion("completion", "Generate shell completion script").fail((message, error49, argv) => {
1741387
1741450
  if (error49 == null) {
1741388
1741451
  argv.showHelp();
1741389
1741452
  cliContext.logger.error(message);
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.59.0",
2
+ "version": "3.60.0",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",