@fern-api/fern-api-dev 3.51.0-1-g79714d0ea3a → 3.51.0-8-ged4ba923c0c
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 +28 -20
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -1430941,7 +1430941,7 @@ var AccessTokenPosthogManager = class {
|
|
|
1430941
1430941
|
properties: {
|
|
1430942
1430942
|
...event,
|
|
1430943
1430943
|
...event.properties,
|
|
1430944
|
-
version: "3.51.0-
|
|
1430944
|
+
version: "3.51.0-8-ged4ba923c0c",
|
|
1430945
1430945
|
usingAccessToken: true
|
|
1430946
1430946
|
}
|
|
1430947
1430947
|
});
|
|
@@ -1431040,7 +1431040,7 @@ var UserPosthogManager = class {
|
|
|
1431040
1431040
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
1431041
1431041
|
event: "CLI",
|
|
1431042
1431042
|
properties: {
|
|
1431043
|
-
version: "3.51.0-
|
|
1431043
|
+
version: "3.51.0-8-ged4ba923c0c",
|
|
1431044
1431044
|
...event,
|
|
1431045
1431045
|
...event.properties,
|
|
1431046
1431046
|
usingAccessToken: false,
|
|
@@ -1510475,7 +1510475,7 @@ var CliContext = class {
|
|
|
1510475
1510475
|
if (false) {
|
|
1510476
1510476
|
this.logger.error("CLI_VERSION is not defined");
|
|
1510477
1510477
|
}
|
|
1510478
|
-
return "3.51.0-
|
|
1510478
|
+
return "3.51.0-8-ged4ba923c0c";
|
|
1510479
1510479
|
}
|
|
1510480
1510480
|
getCliName() {
|
|
1510481
1510481
|
if (false) {
|
|
@@ -1602651,17 +1602651,14 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
|
|
|
1602651
1602651
|
async toApiSectionNode({ item, parentSlug, hideChildren, parentAvailability }) {
|
|
1602652
1602652
|
const snippetsConfig = convertDocsSnippetsConfigToFdr(item.snippetsConfiguration);
|
|
1602653
1602653
|
let ir14 = void 0;
|
|
1602654
|
-
|
|
1602655
|
-
|
|
1602656
|
-
|
|
1602657
|
-
objectQueryParameters: true,
|
|
1602658
|
-
preserveSchemaIds: true
|
|
1602659
|
-
});
|
|
1602654
|
+
let workspace = void 0;
|
|
1602655
|
+
let openapiWorkspace = void 0;
|
|
1602656
|
+
let openapiError = void 0;
|
|
1602660
1602657
|
const openapiParserV3 = this.parsedDocsConfig.experimental?.openapiParserV3;
|
|
1602661
1602658
|
const useV3Parser = openapiParserV3 == null || openapiParserV3;
|
|
1602662
1602659
|
if (useV3Parser) {
|
|
1602663
1602660
|
try {
|
|
1602664
|
-
|
|
1602661
|
+
openapiWorkspace = this.getOpenApiWorkspaceForApiSection(item);
|
|
1602665
1602662
|
ir14 = await openapiWorkspace.getIntermediateRepresentation({
|
|
1602666
1602663
|
context: this.taskContext,
|
|
1602667
1602664
|
audiences: item.audiences,
|
|
@@ -1602670,13 +1602667,14 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
|
|
|
1602670
1602667
|
logWarnings: false
|
|
1602671
1602668
|
});
|
|
1602672
1602669
|
} catch (error49) {
|
|
1602670
|
+
openapiError = error49;
|
|
1602673
1602671
|
}
|
|
1602674
1602672
|
}
|
|
1602675
1602673
|
let openApiTags;
|
|
1602676
1602674
|
if (item.tagDescriptionPages && useV3Parser) {
|
|
1602677
1602675
|
try {
|
|
1602678
|
-
const
|
|
1602679
|
-
const openApiIr = await
|
|
1602676
|
+
const workspaceForTags = openapiWorkspace ?? this.getOpenApiWorkspaceForApiSection(item);
|
|
1602677
|
+
const openApiIr = await workspaceForTags.getOpenAPIIr({
|
|
1602680
1602678
|
context: this.taskContext,
|
|
1602681
1602679
|
loadAiExamples: true
|
|
1602682
1602680
|
});
|
|
@@ -1602691,6 +1602689,15 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
|
|
|
1602691
1602689
|
}
|
|
1602692
1602690
|
}
|
|
1602693
1602691
|
if (ir14 == null) {
|
|
1602692
|
+
if (this.apiWorkspaces.length === 0 && openapiError != null) {
|
|
1602693
|
+
throw openapiError;
|
|
1602694
|
+
}
|
|
1602695
|
+
workspace = await this.getFernWorkspaceForApiSection(item).toFernWorkspace({ context: this.taskContext }, {
|
|
1602696
|
+
enableUniqueErrorsPerEndpoint: true,
|
|
1602697
|
+
detectGlobalHeaders: false,
|
|
1602698
|
+
objectQueryParameters: true,
|
|
1602699
|
+
preserveSchemaIds: true
|
|
1602700
|
+
});
|
|
1602694
1602701
|
ir14 = generateIntermediateRepresentation({
|
|
1602695
1602702
|
workspace,
|
|
1602696
1602703
|
audiences: item.audiences,
|
|
@@ -1602714,7 +1602721,7 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
|
|
|
1602714
1602721
|
onError: (e6) => this.taskContext.failAndThrow(`Error substituting environment variables in API spec: ${e6}`)
|
|
1602715
1602722
|
}, { substituteAsEmpty: false });
|
|
1602716
1602723
|
}
|
|
1602717
|
-
const apiNameForRegistration = item.apiName ?? workspace
|
|
1602724
|
+
const apiNameForRegistration = item.apiName ?? workspace?.workspaceName ?? openapiWorkspace?.workspaceName;
|
|
1602718
1602725
|
const apiDefinitionId = await this.registerApi({
|
|
1602719
1602726
|
ir: ir14,
|
|
1602720
1602727
|
snippetsConfig,
|
|
@@ -1611620,7 +1611627,7 @@ var import_path40 = __toESM(require("path"), 1);
|
|
|
1611620
1611627
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
1611621
1611628
|
var LOGS_FOLDER_NAME = "logs";
|
|
1611622
1611629
|
function getCliSource() {
|
|
1611623
|
-
const version7 = "3.51.0-
|
|
1611630
|
+
const version7 = "3.51.0-8-ged4ba923c0c";
|
|
1611624
1611631
|
return `cli@${version7}`;
|
|
1611625
1611632
|
}
|
|
1611626
1611633
|
var DebugLogger = class {
|
|
@@ -1663001,13 +1663008,14 @@ async function validateDocsBrokenLinks({
|
|
|
1663001
1663008
|
}
|
|
1663002
1663009
|
await cliContext.runTaskForWorkspace(docsWorkspace, async (context2) => {
|
|
1663003
1663010
|
const startTime = performance.now();
|
|
1663004
|
-
const fernWorkspaces = await Promise.all(
|
|
1663005
|
-
project.apiWorkspaces.map(async (workspace) => {
|
|
1663006
|
-
return workspace.toFernWorkspace({ context: context2 });
|
|
1663007
|
-
})
|
|
1663008
|
-
);
|
|
1663009
1663011
|
const ossWorkspaces = await filterOssWorkspaces(project);
|
|
1663010
|
-
const violations = await validateDocsWorkspace(
|
|
1663012
|
+
const violations = await validateDocsWorkspace(
|
|
1663013
|
+
docsWorkspace,
|
|
1663014
|
+
context2,
|
|
1663015
|
+
project.apiWorkspaces,
|
|
1663016
|
+
ossWorkspaces,
|
|
1663017
|
+
true
|
|
1663018
|
+
);
|
|
1663011
1663019
|
const elapsedMillis = performance.now() - startTime;
|
|
1663012
1663020
|
logViolations({
|
|
1663013
1663021
|
violations,
|
package/package.json
CHANGED