@fern-api/fern-api-dev 5.7.9 → 5.7.10-14-g4ff5e8c7da4

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 +57 -10
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -514329,7 +514329,8 @@ var AgentsConfig2 = schemas_exports6.object({
514329
514329
  pageDirective: schemas_exports6.property("page-directive", schemas_exports6.string().optional()),
514330
514330
  pageDescriptionSource: schemas_exports6.property("page-description-source", PageDescriptionSource3.optional()),
514331
514331
  llmsTxt: schemas_exports6.property("llms-txt", schemas_exports6.string().optional()),
514332
- llmsFullTxt: schemas_exports6.property("llms-full-txt", schemas_exports6.string().optional())
514332
+ llmsFullTxt: schemas_exports6.property("llms-full-txt", schemas_exports6.string().optional()),
514333
+ robotsTxt: schemas_exports6.property("robots-txt", schemas_exports6.string().optional())
514333
514334
  });
514334
514335
 
514335
514336
  // ../configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/AiChatWebsiteDatasource.js
@@ -543151,6 +543152,10 @@ async function parseDocsConfiguration({ rawDocsConfiguration, absolutePathToFern
543151
543152
  rawPath: agents?.llmsFullTxt,
543152
543153
  absoluteFilepathToDocsConfig
543153
543154
  });
543155
+ const robotsTxtFilePromise = parseTextFile({
543156
+ rawPath: agents?.robotsTxt,
543157
+ absoluteFilepathToDocsConfig
543158
+ });
543154
543159
  const defaultLocale = rawDocsConfiguration.translations?.map((t3) => docs_yml_exports.DocsYmlSchemas.normalizeTranslationConfig(t3)).find((t3) => t3.default === true)?.lang ?? (rawDocsConfiguration.translations?.[0] != null ? docs_yml_exports.DocsYmlSchemas.normalizeTranslationConfig(rawDocsConfiguration.translations[0]).lang : void 0);
543155
543160
  const translationPagesPromise = pagesPromise.then((resolvedPages) => loadTranslationPages({
543156
543161
  translations: rawDocsConfiguration.translations,
@@ -543165,7 +543170,7 @@ async function parseDocsConfiguration({ rawDocsConfiguration, absolutePathToFern
543165
543170
  absolutePathToFernFolder,
543166
543171
  context: context3
543167
543172
  });
543168
- const [navigation2, pages, typography, css, js7, metadata, context7File, llmsTxtFile, llmsFullTxtFile, translationPages, translationNavigationOverlays] = await Promise.all([
543173
+ const [navigation2, pages, typography, css, js7, metadata, context7File, llmsTxtFile, llmsFullTxtFile, robotsTxtFile, translationPages, translationNavigationOverlays] = await Promise.all([
543169
543174
  convertedNavigationPromise,
543170
543175
  pagesPromise,
543171
543176
  typographyPromise,
@@ -543175,6 +543180,7 @@ async function parseDocsConfiguration({ rawDocsConfiguration, absolutePathToFern
543175
543180
  context7FilePromise,
543176
543181
  llmsTxtFilePromise,
543177
543182
  llmsFullTxtFilePromise,
543183
+ robotsTxtFilePromise,
543178
543184
  translationPagesPromise,
543179
543185
  translationNavigationOverlaysPromise
543180
543186
  ]);
@@ -543224,6 +543230,7 @@ async function parseDocsConfiguration({ rawDocsConfiguration, absolutePathToFern
543224
543230
  context7File,
543225
543231
  llmsTxtFile,
543226
543232
  llmsFullTxtFile,
543233
+ robotsTxtFile,
543227
543234
  theme: resolvedTheme,
543228
543235
  globalTheme: rawDocsConfiguration.globalTheme,
543229
543236
  analyticsConfig: {
@@ -611929,7 +611936,7 @@ var OpenAPIConverter = class extends AbstractSpecConverter {
611929
611936
  const methods = ["get", "post", "put", "patch", "delete", "options", "head", "trace"];
611930
611937
  for (const method8 of methods) {
611931
611938
  const operation = pathItem[method8];
611932
- if (operation?.security) {
611939
+ if (operation?.security != null && operation.security.length > 0) {
611933
611940
  delete operation.security;
611934
611941
  }
611935
611942
  }
@@ -622577,7 +622584,7 @@ var AccessTokenPosthogManager = class {
622577
622584
  properties: {
622578
622585
  ...event,
622579
622586
  ...event.properties,
622580
- version: "5.7.9",
622587
+ version: "5.7.10-14-g4ff5e8c7da4",
622581
622588
  usingAccessToken: true
622582
622589
  }
622583
622590
  });
@@ -622631,7 +622638,7 @@ var UserPosthogManager = class {
622631
622638
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
622632
622639
  event: "CLI",
622633
622640
  properties: {
622634
- version: "5.7.9",
622641
+ version: "5.7.10-14-g4ff5e8c7da4",
622635
622642
  ...event,
622636
622643
  ...event.properties,
622637
622644
  usingAccessToken: false,
@@ -812577,6 +812584,9 @@ async function collectFilesFromDocsConfig({ parsedDocsConfig }) {
812577
812584
  if (parsedDocsConfig.llmsFullTxtFile != null) {
812578
812585
  filepaths.add(parsedDocsConfig.llmsFullTxtFile);
812579
812586
  }
812587
+ if (parsedDocsConfig.robotsTxtFile != null) {
812588
+ filepaths.add(parsedDocsConfig.robotsTxtFile);
812589
+ }
812580
812590
  if (parsedDocsConfig.pageActions?.options?.custom != null) {
812581
812591
  await Promise.all(parsedDocsConfig.pageActions.options.custom.map(async (customAction) => {
812582
812592
  if (customAction.icon != null) {
@@ -813486,10 +813496,11 @@ var DocsDefinitionResolver = class {
813486
813496
  settings: this.parsedDocsConfig.settings,
813487
813497
  css: this.parsedDocsConfig.css,
813488
813498
  js: this.convertJavascriptConfiguration(),
813489
- agents: this.parsedDocsConfig.agents != null || this.parsedDocsConfig.llmsTxtFile != null || this.parsedDocsConfig.llmsFullTxtFile != null ? {
813499
+ agents: this.parsedDocsConfig.agents != null || this.parsedDocsConfig.llmsTxtFile != null || this.parsedDocsConfig.llmsFullTxtFile != null || this.parsedDocsConfig.robotsTxtFile != null ? {
813490
813500
  ...this.parsedDocsConfig.agents,
813491
813501
  llmsTxt: this.getFileId(this.parsedDocsConfig.llmsTxtFile),
813492
- llmsFullTxt: this.getFileId(this.parsedDocsConfig.llmsFullTxtFile)
813502
+ llmsFullTxt: this.getFileId(this.parsedDocsConfig.llmsFullTxtFile),
813503
+ robotsTxt: this.getFileId(this.parsedDocsConfig.robotsTxtFile)
813493
813504
  } : void 0,
813494
813505
  metadata: this.convertMetadata(),
813495
813506
  redirects: this.parsedDocsConfig.redirects,
@@ -819510,6 +819521,15 @@ async function visitDocsConfigFileYamlAst({ contents, visitor, absoluteFilepathT
819510
819521
  willBeUploaded: true
819511
819522
  });
819512
819523
  }
819524
+ if (agents?.robotsTxt != null) {
819525
+ await visitFilepath({
819526
+ absoluteFilepathToConfiguration,
819527
+ rawUnresolvedFilepath: agents.robotsTxt,
819528
+ visitor,
819529
+ nodePath: ["agents", "robots-txt"],
819530
+ willBeUploaded: true
819531
+ });
819532
+ }
819513
819533
  if (agents?.llmsFullTxt != null) {
819514
819534
  await visitFilepath({
819515
819535
  absoluteFilepathToConfiguration,
@@ -847364,7 +847384,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
847364
847384
  var LOGS_FOLDER_NAME = "logs";
847365
847385
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
847366
847386
  function getCliSource() {
847367
- const version7 = "5.7.9";
847387
+ const version7 = "5.7.10-14-g4ff5e8c7da4";
847368
847388
  return `cli@${version7}`;
847369
847389
  }
847370
847390
  var DebugLogger = class {
@@ -855740,6 +855760,16 @@ var definitions6 = {
855740
855760
  type: "null"
855741
855761
  }
855742
855762
  ]
855763
+ },
855764
+ "robots-txt": {
855765
+ oneOf: [
855766
+ {
855767
+ type: "string"
855768
+ },
855769
+ {
855770
+ type: "null"
855771
+ }
855772
+ ]
855743
855773
  }
855744
855774
  },
855745
855775
  additionalProperties: false
@@ -857596,6 +857626,12 @@ async function createJob({ projectConfig, workspace, organization, generatorInvo
857596
857626
  if (rawError?.content?.reason === "status-code" && rawError.content.statusCode === 429) {
857597
857627
  throw new TooManyRequestsError();
857598
857628
  }
857629
+ const githubAppNotInstalledMessage = extractGithubAppNotInstalledMessage(rawError);
857630
+ if (githubAppNotInstalledMessage != null) {
857631
+ return context3.failAndThrow(githubAppNotInstalledMessage, void 0, {
857632
+ code: CliError.Code.ConfigError
857633
+ });
857634
+ }
857599
857635
  return convertCreateJobError(rawError)._visit({
857600
857636
  illegalApiNameError: () => {
857601
857637
  return context3.failAndThrow("API name is invalid: " + workspace.definition.rootApiFile.contents.name, void 0, { code: CliError.Code.ConfigError });
@@ -857700,6 +857736,17 @@ function extractErrorMessage2(error50) {
857700
857736
  }
857701
857737
  return void 0;
857702
857738
  }
857739
+ function extractGithubAppNotInstalledMessage(error50) {
857740
+ const body = error50?.content?.reason === "status-code" ? error50.content.body : void 0;
857741
+ if (body?.error !== "GithubAppNotInstalled") {
857742
+ return void 0;
857743
+ }
857744
+ if (typeof body?.content?.message === "string") {
857745
+ return body.content.message;
857746
+ }
857747
+ const repo = typeof body?.content?.repositoryName === "string" ? body.content.repositoryName : "the target repository";
857748
+ return `The Fern GitHub App is not installed on ${repo}. Please install it (https://github.com/apps/fern-api) and try again.`;
857749
+ }
857703
857750
  function convertCreateJobError(error50) {
857704
857751
  if (error50?.content?.reason === "status-code") {
857705
857752
  const body = error50.content.body;
@@ -859980,7 +860027,7 @@ var LegacyDocsPublisher = class {
859980
860027
  previewId,
859981
860028
  disableTemplates: void 0,
859982
860029
  skipUpload,
859983
- cliVersion: "5.7.9",
860030
+ cliVersion: "5.7.10-14-g4ff5e8c7da4",
859984
860031
  loginCommand: "fern auth login"
859985
860032
  });
859986
860033
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -934422,7 +934469,7 @@ var CliContext = class _CliContext {
934422
934469
  if (false) {
934423
934470
  this.logger.error("CLI_VERSION is not defined");
934424
934471
  }
934425
- return "5.7.9";
934472
+ return "5.7.10-14-g4ff5e8c7da4";
934426
934473
  }
934427
934474
  getCliName() {
934428
934475
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.7.9",
2
+ "version": "5.7.10-14-g4ff5e8c7da4",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",