@fern-api/fern-api-dev 5.7.8 → 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.
- package/cli.cjs +76 -17
- 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.
|
|
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.
|
|
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,
|
|
@@ -814249,18 +814260,25 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
|
|
|
814249
814260
|
const relativeFilePath = this.toRelativeFilepath(item.overviewAbsolutePath);
|
|
814250
814261
|
let pageId = relativeFilePath ? navigation_exports.PageId(relativeFilePath) : void 0;
|
|
814251
814262
|
const id2 = this.#idgen.get(pageId ?? `${prefix2}/section`);
|
|
814252
|
-
const
|
|
814253
|
-
|
|
814254
|
-
|
|
814255
|
-
|
|
814256
|
-
|
|
814263
|
+
const fullSlugParts = item.overviewAbsolutePath ? this.markdownFilesToFullSlugs.get(item.overviewAbsolutePath)?.split("/") : void 0;
|
|
814264
|
+
const urlSlug = item.slug ?? kebabCase_default(item.title);
|
|
814265
|
+
let sectionSlug;
|
|
814266
|
+
let childrenParentSlug;
|
|
814267
|
+
if (item.skipUrlSlug && fullSlugParts != null) {
|
|
814268
|
+
sectionSlug = parentSlug.apply({ urlSlug, fullSlug: fullSlugParts });
|
|
814269
|
+
childrenParentSlug = parentSlug.apply({ urlSlug, skipUrlSlug: true });
|
|
814270
|
+
} else {
|
|
814271
|
+
const slug = parentSlug.apply({ urlSlug, fullSlug: fullSlugParts, skipUrlSlug: item.skipUrlSlug });
|
|
814272
|
+
sectionSlug = slug;
|
|
814273
|
+
childrenParentSlug = slug;
|
|
814274
|
+
}
|
|
814257
814275
|
const noindex = item.overviewAbsolutePath != null ? this.markdownFilesToNoIndex.get(item.overviewAbsolutePath) : void 0;
|
|
814258
814276
|
const frontmatterAvailability = item.overviewAbsolutePath != null ? this.markdownFilesToAvailability.get(item.overviewAbsolutePath) : void 0;
|
|
814259
814277
|
const hiddenSection = hideChildren || item.hidden;
|
|
814260
814278
|
const children2 = await Promise.all(item.contents.map((child) => this.toNavigationChild({
|
|
814261
814279
|
prefix: id2,
|
|
814262
814280
|
item: child,
|
|
814263
|
-
parentSlug:
|
|
814281
|
+
parentSlug: childrenParentSlug,
|
|
814264
814282
|
hideChildren: hiddenSection,
|
|
814265
814283
|
parentAvailability: item.availability ?? parentAvailability
|
|
814266
814284
|
})));
|
|
@@ -814275,7 +814293,7 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
|
|
|
814275
814293
|
id: id2,
|
|
814276
814294
|
type: "section",
|
|
814277
814295
|
overviewPageId: pageId,
|
|
814278
|
-
slug:
|
|
814296
|
+
slug: sectionSlug.get(),
|
|
814279
814297
|
title: item.overviewAbsolutePath != null ? this.markdownFilesToSidebarTitle.get(item.overviewAbsolutePath) ?? item.title : item.title,
|
|
814280
814298
|
icon: this.resolveIconFileId(item.icon),
|
|
814281
814299
|
collapsed: item.collapsed,
|
|
@@ -819503,6 +819521,15 @@ async function visitDocsConfigFileYamlAst({ contents, visitor, absoluteFilepathT
|
|
|
819503
819521
|
willBeUploaded: true
|
|
819504
819522
|
});
|
|
819505
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
|
+
}
|
|
819506
819533
|
if (agents?.llmsFullTxt != null) {
|
|
819507
819534
|
await visitFilepath({
|
|
819508
819535
|
absoluteFilepathToConfiguration,
|
|
@@ -847357,7 +847384,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
847357
847384
|
var LOGS_FOLDER_NAME = "logs";
|
|
847358
847385
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
847359
847386
|
function getCliSource() {
|
|
847360
|
-
const version7 = "5.7.
|
|
847387
|
+
const version7 = "5.7.10-14-g4ff5e8c7da4";
|
|
847361
847388
|
return `cli@${version7}`;
|
|
847362
847389
|
}
|
|
847363
847390
|
var DebugLogger = class {
|
|
@@ -855733,6 +855760,16 @@ var definitions6 = {
|
|
|
855733
855760
|
type: "null"
|
|
855734
855761
|
}
|
|
855735
855762
|
]
|
|
855763
|
+
},
|
|
855764
|
+
"robots-txt": {
|
|
855765
|
+
oneOf: [
|
|
855766
|
+
{
|
|
855767
|
+
type: "string"
|
|
855768
|
+
},
|
|
855769
|
+
{
|
|
855770
|
+
type: "null"
|
|
855771
|
+
}
|
|
855772
|
+
]
|
|
855736
855773
|
}
|
|
855737
855774
|
},
|
|
855738
855775
|
additionalProperties: false
|
|
@@ -857589,6 +857626,12 @@ async function createJob({ projectConfig, workspace, organization, generatorInvo
|
|
|
857589
857626
|
if (rawError?.content?.reason === "status-code" && rawError.content.statusCode === 429) {
|
|
857590
857627
|
throw new TooManyRequestsError();
|
|
857591
857628
|
}
|
|
857629
|
+
const githubAppNotInstalledMessage = extractGithubAppNotInstalledMessage(rawError);
|
|
857630
|
+
if (githubAppNotInstalledMessage != null) {
|
|
857631
|
+
return context3.failAndThrow(githubAppNotInstalledMessage, void 0, {
|
|
857632
|
+
code: CliError.Code.ConfigError
|
|
857633
|
+
});
|
|
857634
|
+
}
|
|
857592
857635
|
return convertCreateJobError(rawError)._visit({
|
|
857593
857636
|
illegalApiNameError: () => {
|
|
857594
857637
|
return context3.failAndThrow("API name is invalid: " + workspace.definition.rootApiFile.contents.name, void 0, { code: CliError.Code.ConfigError });
|
|
@@ -857693,6 +857736,17 @@ function extractErrorMessage2(error50) {
|
|
|
857693
857736
|
}
|
|
857694
857737
|
return void 0;
|
|
857695
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
|
+
}
|
|
857696
857750
|
function convertCreateJobError(error50) {
|
|
857697
857751
|
if (error50?.content?.reason === "status-code") {
|
|
857698
857752
|
const body = error50.content.body;
|
|
@@ -859973,7 +860027,7 @@ var LegacyDocsPublisher = class {
|
|
|
859973
860027
|
previewId,
|
|
859974
860028
|
disableTemplates: void 0,
|
|
859975
860029
|
skipUpload,
|
|
859976
|
-
cliVersion: "5.7.
|
|
860030
|
+
cliVersion: "5.7.10-14-g4ff5e8c7da4",
|
|
859977
860031
|
loginCommand: "fern auth login"
|
|
859978
860032
|
});
|
|
859979
860033
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -934415,7 +934469,7 @@ var CliContext = class _CliContext {
|
|
|
934415
934469
|
if (false) {
|
|
934416
934470
|
this.logger.error("CLI_VERSION is not defined");
|
|
934417
934471
|
}
|
|
934418
|
-
return "5.7.
|
|
934472
|
+
return "5.7.10-14-g4ff5e8c7da4";
|
|
934419
934473
|
}
|
|
934420
934474
|
getCliName() {
|
|
934421
934475
|
if (false) {
|
|
@@ -942166,6 +942220,11 @@ async function previewDocsWorkspace({
|
|
|
942166
942220
|
const project = await loadProject2();
|
|
942167
942221
|
const docsWorkspace = project.docsWorkspaces;
|
|
942168
942222
|
if (docsWorkspace == null) {
|
|
942223
|
+
cliContext.failAndThrow(
|
|
942224
|
+
"No docs.yml found in your Fern project. Add a docs.yml to configure your documentation site.",
|
|
942225
|
+
void 0,
|
|
942226
|
+
{ code: CliError.Code.ConfigError }
|
|
942227
|
+
);
|
|
942169
942228
|
return;
|
|
942170
942229
|
}
|
|
942171
942230
|
if (legacyPreview) {
|
package/package.json
CHANGED