@fern-api/fern-api-dev 3.50.2 → 3.50.3
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 +95 -84
- 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.50.
|
|
1430944
|
+
version: "3.50.3",
|
|
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.50.
|
|
1431043
|
+
version: "3.50.3",
|
|
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.50.
|
|
1510478
|
+
return "3.50.3";
|
|
1510479
1510479
|
}
|
|
1510480
1510480
|
getCliName() {
|
|
1510481
1510481
|
if (false) {
|
|
@@ -1601813,7 +1601813,8 @@ var DocsDefinitionResolver = class {
|
|
|
1601813
1601813
|
uploadFiles;
|
|
1601814
1601814
|
registerApi;
|
|
1601815
1601815
|
targetAudiences;
|
|
1601816
|
-
|
|
1601816
|
+
pythonDocsSectionHandler;
|
|
1601817
|
+
constructor({ domain: domain3, docsWorkspace, ossWorkspaces, apiWorkspaces, taskContext, editThisPage, uploadFiles: uploadFiles2 = defaultUploadFiles, registerApi: registerApi2 = defaultRegisterApi, targetAudiences, pythonDocsSectionHandler }) {
|
|
1601817
1601818
|
this.domain = domain3;
|
|
1601818
1601819
|
this.docsWorkspace = docsWorkspace;
|
|
1601819
1601820
|
this.ossWorkspaces = ossWorkspaces;
|
|
@@ -1601823,6 +1601824,7 @@ var DocsDefinitionResolver = class {
|
|
|
1601823
1601824
|
this.uploadFiles = uploadFiles2;
|
|
1601824
1601825
|
this.registerApi = registerApi2;
|
|
1601825
1601826
|
this.targetAudiences = targetAudiences;
|
|
1601827
|
+
this.pythonDocsSectionHandler = pythonDocsSectionHandler;
|
|
1601826
1601828
|
}
|
|
1601827
1601829
|
#idgen = NodeIdGenerator2.init();
|
|
1601828
1601830
|
/**
|
|
@@ -1602512,7 +1602514,8 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
|
|
|
1602512
1602514
|
}
|
|
1602513
1602515
|
async toSidebarRootNode(prefix2, items, parentSlug) {
|
|
1602514
1602516
|
const id2 = this.#idgen.get(`${prefix2}/root`);
|
|
1602515
|
-
const
|
|
1602517
|
+
const childrenWithNulls = await Promise.all(items.map((item) => this.toNavigationChild({ prefix: id2, item, parentSlug })));
|
|
1602518
|
+
const children2 = childrenWithNulls.filter((child) => child != null);
|
|
1602516
1602519
|
const grouped = [];
|
|
1602517
1602520
|
children2.forEach((child) => {
|
|
1602518
1602521
|
if (child.type === "apiReference") {
|
|
@@ -1602563,7 +1602566,8 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
|
|
|
1602563
1602566
|
urlSlug: item.slug ?? kebabCase_default(item.title),
|
|
1602564
1602567
|
skipUrlSlug: item.skipUrlSlug
|
|
1602565
1602568
|
});
|
|
1602566
|
-
const
|
|
1602569
|
+
const childrenWithNulls = await Promise.all(item.layout.map((item2) => this.toVariantChild(item2, id2, variantSlug)));
|
|
1602570
|
+
const children2 = childrenWithNulls.filter((child) => child != null);
|
|
1602567
1602571
|
return {
|
|
1602568
1602572
|
type: "variant",
|
|
1602569
1602573
|
id: id2,
|
|
@@ -1602590,8 +1602594,9 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
|
|
|
1602590
1602594
|
section: async (value) => this.toSectionNode({ prefix: prefix2, item: value, parentSlug }),
|
|
1602591
1602595
|
link: async (value) => this.toLinkNode(value),
|
|
1602592
1602596
|
changelog: async (value) => this.toChangelogNode(value, parentSlug),
|
|
1602593
|
-
// Library sections are handled by FDR during registration
|
|
1602594
|
-
|
|
1602597
|
+
// Library sections are handled by FDR during registration
|
|
1602598
|
+
// If handler provided (dev mode), create placeholder; otherwise skip (FDR adds generated docs)
|
|
1602599
|
+
pythonDocsSection: async (value) => this.handlePythonDocsSection(value, parentSlug)
|
|
1602595
1602600
|
});
|
|
1602596
1602601
|
}
|
|
1602597
1602602
|
async toNavigationChild({ prefix: prefix2, item, parentSlug, hideChildren, parentAvailability }) {
|
|
@@ -1602601,8 +1602606,9 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
|
|
|
1602601
1602606
|
section: async (value) => this.toSectionNode({ prefix: prefix2, item: value, parentSlug, hideChildren, parentAvailability }),
|
|
1602602
1602607
|
link: async (value) => this.toLinkNode(value),
|
|
1602603
1602608
|
changelog: async (value) => this.toChangelogNode(value, parentSlug, hideChildren),
|
|
1602604
|
-
// Library sections are handled by FDR during registration
|
|
1602605
|
-
|
|
1602609
|
+
// Library sections are handled by FDR during registration
|
|
1602610
|
+
// If handler provided (dev mode), create placeholder; otherwise skip (FDR adds generated docs)
|
|
1602611
|
+
pythonDocsSection: async (value) => this.handlePythonDocsSection(value, parentSlug)
|
|
1602606
1602612
|
});
|
|
1602607
1602613
|
}
|
|
1602608
1602614
|
async toApiSectionNode({ item, parentSlug, hideChildren, parentAvailability }) {
|
|
@@ -1602723,77 +1602729,19 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
|
|
|
1602723
1602729
|
};
|
|
1602724
1602730
|
}
|
|
1602725
1602731
|
/**
|
|
1602726
|
-
*
|
|
1602727
|
-
*
|
|
1602728
|
-
* FDR then merges the generated Python docs into the navigation.
|
|
1602729
|
-
*
|
|
1602730
|
-
* In dev mode (fern docs dev), this placeholder returns a visible page with helpful content
|
|
1602731
|
-
* explaining that Python library docs are only generated during `fern generate --docs`.
|
|
1602732
|
-
*
|
|
1602733
|
-
* In production mode, FDR replaces/augments this with the actual generated documentation.
|
|
1602732
|
+
* Handles pythonDocsSection navigation items by delegating to the handler if provided.
|
|
1602733
|
+
* If no handler is provided, returns null (skips the section - FDR adds generated docs during publish).
|
|
1602734
1602734
|
*/
|
|
1602735
|
-
|
|
1602736
|
-
|
|
1602737
|
-
|
|
1602738
|
-
|
|
1602739
|
-
|
|
1602740
|
-
|
|
1602741
|
-
|
|
1602742
|
-
|
|
1602743
|
-
|
|
1602744
|
-
|
|
1602745
|
-
<Warning>
|
|
1602746
|
-
Python library documentation is not yet supported with \`fern docs dev\`. This feature will be added in a future release. To view the generated documentation, run \`fern generate --docs --preview\`.
|
|
1602747
|
-
</Warning>
|
|
1602748
|
-
|
|
1602749
|
-
## About Python Library Docs
|
|
1602750
|
-
|
|
1602751
|
-
When you publish your documentation using \`fern generate --docs\`, Fern will:
|
|
1602752
|
-
|
|
1602753
|
-
1. Clone and analyze your Python repository from: \`${item.githubUrl}\`
|
|
1602754
|
-
2. Parse the Python source code to extract docstrings and type information
|
|
1602755
|
-
3. Generate comprehensive API reference documentation
|
|
1602756
|
-
4. Integrate the generated docs into your documentation site
|
|
1602757
|
-
|
|
1602758
|
-
## How to Generate
|
|
1602759
|
-
|
|
1602760
|
-
To generate the full Python library documentation, run:
|
|
1602761
|
-
|
|
1602762
|
-
\`\`\`bash
|
|
1602763
|
-
fern generate --docs
|
|
1602764
|
-
\`\`\`
|
|
1602765
|
-
|
|
1602766
|
-
Or to preview without publishing:
|
|
1602767
|
-
|
|
1602768
|
-
\`\`\`bash
|
|
1602769
|
-
fern generate --docs --preview
|
|
1602770
|
-
\`\`\`
|
|
1602771
|
-
|
|
1602772
|
-
The generated documentation will replace this placeholder page with complete API reference content including:
|
|
1602773
|
-
|
|
1602774
|
-
- Module and package documentation
|
|
1602775
|
-
- Class and function references
|
|
1602776
|
-
- Type annotations and signatures
|
|
1602777
|
-
- Docstring content
|
|
1602778
|
-
`;
|
|
1602779
|
-
this.parsedDocsConfig.pages[RelativeFilePath2.of(syntheticPageId)] = placeholderMarkdown;
|
|
1602780
|
-
const id2 = this.#idgen.get(pageId);
|
|
1602781
|
-
return {
|
|
1602782
|
-
id: id2,
|
|
1602783
|
-
type: "page",
|
|
1602784
|
-
slug: slug.get(),
|
|
1602785
|
-
title: title5,
|
|
1602786
|
-
icon: void 0,
|
|
1602787
|
-
hidden: false,
|
|
1602788
|
-
viewers: void 0,
|
|
1602789
|
-
orphaned: void 0,
|
|
1602790
|
-
pageId,
|
|
1602791
|
-
authed: void 0,
|
|
1602792
|
-
noindex: true,
|
|
1602793
|
-
// Don't index placeholder pages
|
|
1602794
|
-
featureFlags: void 0,
|
|
1602795
|
-
availability: void 0
|
|
1602796
|
-
};
|
|
1602735
|
+
handlePythonDocsSection(item, parentSlug) {
|
|
1602736
|
+
if (this.pythonDocsSectionHandler == null) {
|
|
1602737
|
+
return null;
|
|
1602738
|
+
}
|
|
1602739
|
+
return this.pythonDocsSectionHandler(item, parentSlug, {
|
|
1602740
|
+
addPage: (pageId, markdown) => {
|
|
1602741
|
+
this.parsedDocsConfig.pages[RelativeFilePath2.of(pageId)] = markdown;
|
|
1602742
|
+
},
|
|
1602743
|
+
generateId: (key) => this.#idgen.get(key)
|
|
1602744
|
+
});
|
|
1602797
1602745
|
}
|
|
1602798
1602746
|
async toPageNode({ item, parentSlug, hideChildren, parentAvailability }) {
|
|
1602799
1602747
|
const pageId = navigation_exports2.PageId(this.toRelativeFilepath(item.absolutePath));
|
|
@@ -1602836,8 +1602784,9 @@ The generated documentation will replace this placeholder page with complete API
|
|
|
1602836
1602784
|
hideChildren: hiddenSection,
|
|
1602837
1602785
|
parentAvailability: item.availability ?? parentAvailability
|
|
1602838
1602786
|
})));
|
|
1602787
|
+
const filteredChildren = children2.filter((child) => child != null);
|
|
1602839
1602788
|
if (pageId == null) {
|
|
1602840
|
-
const flattenedApiRef =
|
|
1602789
|
+
const flattenedApiRef = filteredChildren.find((child) => child.type === "apiReference" && child.hideTitle === true && child.overviewPageId != null);
|
|
1602841
1602790
|
if (flattenedApiRef != null) {
|
|
1602842
1602791
|
pageId = flattenedApiRef.overviewPageId;
|
|
1602843
1602792
|
}
|
|
@@ -1602853,7 +1602802,7 @@ The generated documentation will replace this placeholder page with complete API
|
|
|
1602853
1602802
|
hidden: hiddenSection,
|
|
1602854
1602803
|
viewers: item.viewers,
|
|
1602855
1602804
|
orphaned: item.orphaned,
|
|
1602856
|
-
children:
|
|
1602805
|
+
children: filteredChildren,
|
|
1602857
1602806
|
authed: void 0,
|
|
1602858
1602807
|
pointsTo: void 0,
|
|
1602859
1602808
|
noindex,
|
|
@@ -1603129,6 +1603078,67 @@ function convertAvailability5(availability) {
|
|
|
1603129
1603078
|
assertNever(availability);
|
|
1603130
1603079
|
}
|
|
1603131
1603080
|
}
|
|
1603081
|
+
function createPythonDocsSectionPlaceholder(item, parentSlug, context2) {
|
|
1603082
|
+
const title5 = item.title ?? "Python Reference";
|
|
1603083
|
+
const urlSlug = item.slug ?? "python-docs";
|
|
1603084
|
+
const slug = parentSlug.apply({ urlSlug });
|
|
1603085
|
+
const syntheticPageId = `__python-docs-placeholder-${urlSlug}__.mdx`;
|
|
1603086
|
+
const pageId = navigation_exports2.PageId(syntheticPageId);
|
|
1603087
|
+
const placeholderMarkdown = `---
|
|
1603088
|
+
title: ${title5}
|
|
1603089
|
+
---
|
|
1603090
|
+
|
|
1603091
|
+
<Warning>
|
|
1603092
|
+
Python library documentation is not yet supported with \`fern docs dev\`. This feature will be added in a future release. To view the generated documentation, run \`fern generate --docs --preview\`.
|
|
1603093
|
+
</Warning>
|
|
1603094
|
+
|
|
1603095
|
+
## About Python Library Docs
|
|
1603096
|
+
|
|
1603097
|
+
When you publish your documentation using \`fern generate --docs\`, Fern will:
|
|
1603098
|
+
|
|
1603099
|
+
1. Clone and analyze your Python repository from: \`${item.githubUrl}\`
|
|
1603100
|
+
2. Parse the Python source code to extract docstrings and type information
|
|
1603101
|
+
3. Generate comprehensive API reference documentation
|
|
1603102
|
+
4. Integrate the generated docs into your documentation site
|
|
1603103
|
+
|
|
1603104
|
+
## How to Generate
|
|
1603105
|
+
|
|
1603106
|
+
To generate the full Python library documentation, run:
|
|
1603107
|
+
|
|
1603108
|
+
\`\`\`bash
|
|
1603109
|
+
fern generate --docs
|
|
1603110
|
+
\`\`\`
|
|
1603111
|
+
|
|
1603112
|
+
Or to preview without publishing:
|
|
1603113
|
+
|
|
1603114
|
+
\`\`\`bash
|
|
1603115
|
+
fern generate --docs --preview
|
|
1603116
|
+
\`\`\`
|
|
1603117
|
+
|
|
1603118
|
+
The generated documentation will replace this placeholder page with complete API reference content including:
|
|
1603119
|
+
|
|
1603120
|
+
- Module and package documentation
|
|
1603121
|
+
- Class and function references
|
|
1603122
|
+
- Type annotations and signatures
|
|
1603123
|
+
- Docstring content
|
|
1603124
|
+
`;
|
|
1603125
|
+
context2.addPage(syntheticPageId, placeholderMarkdown);
|
|
1603126
|
+
return {
|
|
1603127
|
+
id: context2.generateId(pageId),
|
|
1603128
|
+
type: "page",
|
|
1603129
|
+
slug: slug.get(),
|
|
1603130
|
+
title: title5,
|
|
1603131
|
+
icon: void 0,
|
|
1603132
|
+
hidden: false,
|
|
1603133
|
+
viewers: void 0,
|
|
1603134
|
+
orphaned: void 0,
|
|
1603135
|
+
pageId,
|
|
1603136
|
+
authed: void 0,
|
|
1603137
|
+
noindex: true,
|
|
1603138
|
+
featureFlags: void 0,
|
|
1603139
|
+
availability: void 0
|
|
1603140
|
+
};
|
|
1603141
|
+
}
|
|
1603132
1603142
|
|
|
1603133
1603143
|
// ../docs-resolver/lib/utils/filterOssWorkspaces.js
|
|
1603134
1603144
|
async function filterOssWorkspaces(project) {
|
|
@@ -1611573,7 +1611583,7 @@ var import_path40 = __toESM(require("path"), 1);
|
|
|
1611573
1611583
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
1611574
1611584
|
var LOGS_FOLDER_NAME = "logs";
|
|
1611575
1611585
|
function getCliSource() {
|
|
1611576
|
-
const version7 = "3.50.
|
|
1611586
|
+
const version7 = "3.50.3";
|
|
1611577
1611587
|
return `cli@${version7}`;
|
|
1611578
1611588
|
}
|
|
1611579
1611589
|
var DebugLogger = class {
|
|
@@ -1613390,7 +1613400,8 @@ async function getPreviewDocsDefinition({ domain: domain3, project, context: con
|
|
|
1613390
1613400
|
};
|
|
1613391
1613401
|
}),
|
|
1613392
1613402
|
registerApi: async (opts) => apiCollector.addReferencedAPI(opts),
|
|
1613393
|
-
targetAudiences: void 0
|
|
1613403
|
+
targetAudiences: void 0,
|
|
1613404
|
+
pythonDocsSectionHandler: createPythonDocsSectionPlaceholder
|
|
1613394
1613405
|
});
|
|
1613395
1613406
|
const writeDocsDefinition = await resolver2.resolve();
|
|
1613396
1613407
|
const dbDocsDefinition = convertDocsDefinitionToDb({
|
package/package.json
CHANGED