@fern-api/fern-api-dev 5.8.1-2-ge6734bb534a → 5.8.1-4-g1edc77ebd26
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 +88 -34
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -544585,7 +544585,8 @@ async function parseNavigationOverlayFromDocsYml({ docsYmlContent, langFernDir:
|
|
|
544585
544585
|
subtitle: typeof productObj.subtitle === "string" ? productObj.subtitle : void 0,
|
|
544586
544586
|
announcement: void 0,
|
|
544587
544587
|
tabs: void 0,
|
|
544588
|
-
navigation: void 0
|
|
544588
|
+
navigation: void 0,
|
|
544589
|
+
versions: void 0
|
|
544589
544590
|
};
|
|
544590
544591
|
if (isPlainObject4(productObj.announcement)) {
|
|
544591
544592
|
const message = extractString(productObj.announcement, "message");
|
|
@@ -544594,28 +544595,28 @@ async function parseNavigationOverlayFromDocsYml({ docsYmlContent, langFernDir:
|
|
|
544594
544595
|
}
|
|
544595
544596
|
}
|
|
544596
544597
|
if (typeof productObj.path === "string") {
|
|
544597
|
-
const
|
|
544598
|
-
|
|
544599
|
-
|
|
544600
|
-
|
|
544601
|
-
|
|
544598
|
+
const navFile = await loadNavOverlayFile({
|
|
544599
|
+
relativeNavPath: productObj.path,
|
|
544600
|
+
overlayDir,
|
|
544601
|
+
overlayKind: "product",
|
|
544602
|
+
context: context3
|
|
544603
|
+
});
|
|
544604
|
+
if (navFile != null) {
|
|
544605
|
+
productOverlay.tabs = navFile.tabs;
|
|
544606
|
+
productOverlay.navigation = navFile.navigation;
|
|
544602
544607
|
}
|
|
544603
|
-
|
|
544604
|
-
|
|
544605
|
-
|
|
544606
|
-
|
|
544607
|
-
|
|
544608
|
-
|
|
544609
|
-
if (isPlainObject4(navObj.tabs)) {
|
|
544610
|
-
productOverlay.tabs = parseTabOverlays(navObj.tabs);
|
|
544611
|
-
}
|
|
544612
|
-
if (Array.isArray(navObj.navigation)) {
|
|
544613
|
-
productOverlay.navigation = parseNavigationItemOverlays(navObj.navigation);
|
|
544614
|
-
}
|
|
544615
|
-
}
|
|
544616
|
-
} catch (error50) {
|
|
544617
|
-
context3.logger.warn(`Failed to load translation nav file "${navFilePath}": ${String(error50)}`);
|
|
544608
|
+
}
|
|
544609
|
+
if (Array.isArray(productObj.versions)) {
|
|
544610
|
+
productOverlay.versions = [];
|
|
544611
|
+
for (const version7 of productObj.versions) {
|
|
544612
|
+
if (!isPlainObject4(version7)) {
|
|
544613
|
+
continue;
|
|
544618
544614
|
}
|
|
544615
|
+
productOverlay.versions.push(await parseVersionOverlay({
|
|
544616
|
+
versionObj: version7,
|
|
544617
|
+
overlayDir,
|
|
544618
|
+
context: context3
|
|
544619
|
+
}));
|
|
544619
544620
|
}
|
|
544620
544621
|
}
|
|
544621
544622
|
overlay.products.push(productOverlay);
|
|
@@ -544627,11 +544628,11 @@ async function parseNavigationOverlayFromDocsYml({ docsYmlContent, langFernDir:
|
|
|
544627
544628
|
if (!isPlainObject4(version7)) {
|
|
544628
544629
|
continue;
|
|
544629
544630
|
}
|
|
544630
|
-
|
|
544631
|
-
|
|
544632
|
-
|
|
544633
|
-
|
|
544634
|
-
});
|
|
544631
|
+
overlay.versions.push(await parseVersionOverlay({
|
|
544632
|
+
versionObj: version7,
|
|
544633
|
+
overlayDir,
|
|
544634
|
+
context: context3
|
|
544635
|
+
}));
|
|
544635
544636
|
}
|
|
544636
544637
|
}
|
|
544637
544638
|
if (Array.isArray(docsYmlContent.navigation)) {
|
|
@@ -544639,6 +544640,51 @@ async function parseNavigationOverlayFromDocsYml({ docsYmlContent, langFernDir:
|
|
|
544639
544640
|
}
|
|
544640
544641
|
return overlay;
|
|
544641
544642
|
}
|
|
544643
|
+
async function parseVersionOverlay({ versionObj, overlayDir, context: context3 }) {
|
|
544644
|
+
const versionOverlay = {
|
|
544645
|
+
slug: typeof versionObj.slug === "string" ? versionObj.slug : void 0,
|
|
544646
|
+
displayName: typeof versionObj["display-name"] === "string" ? versionObj["display-name"] : void 0,
|
|
544647
|
+
tabs: void 0,
|
|
544648
|
+
navigation: void 0
|
|
544649
|
+
};
|
|
544650
|
+
if (typeof versionObj.path === "string") {
|
|
544651
|
+
const navFile = await loadNavOverlayFile({
|
|
544652
|
+
relativeNavPath: versionObj.path,
|
|
544653
|
+
overlayDir,
|
|
544654
|
+
overlayKind: "version",
|
|
544655
|
+
context: context3
|
|
544656
|
+
});
|
|
544657
|
+
if (navFile != null) {
|
|
544658
|
+
versionOverlay.tabs = navFile.tabs;
|
|
544659
|
+
versionOverlay.navigation = navFile.navigation;
|
|
544660
|
+
}
|
|
544661
|
+
}
|
|
544662
|
+
return versionOverlay;
|
|
544663
|
+
}
|
|
544664
|
+
async function loadNavOverlayFile({ relativeNavPath, overlayDir, overlayKind, context: context3 }) {
|
|
544665
|
+
const resolvedNavFilePath = import_path22.default.resolve(overlayDir, relativeNavPath);
|
|
544666
|
+
if (!resolvedNavFilePath.startsWith(overlayDir)) {
|
|
544667
|
+
context3.logger.warn(`Invalid path in ${overlayKind} overlay: "${relativeNavPath}" escapes the translations directory. Skipping.`);
|
|
544668
|
+
return void 0;
|
|
544669
|
+
}
|
|
544670
|
+
if (!await doesPathExist(resolvedNavFilePath)) {
|
|
544671
|
+
return void 0;
|
|
544672
|
+
}
|
|
544673
|
+
try {
|
|
544674
|
+
const navContent = jsYaml.load(await (0, import_promises14.readFile)(resolvedNavFilePath, "utf-8"));
|
|
544675
|
+
if (!isPlainObject4(navContent)) {
|
|
544676
|
+
return void 0;
|
|
544677
|
+
}
|
|
544678
|
+
const navObj = navContent;
|
|
544679
|
+
return {
|
|
544680
|
+
tabs: isPlainObject4(navObj.tabs) ? parseTabOverlays(navObj.tabs) : void 0,
|
|
544681
|
+
navigation: Array.isArray(navObj.navigation) ? parseNavigationItemOverlays(navObj.navigation) : void 0
|
|
544682
|
+
};
|
|
544683
|
+
} catch (error50) {
|
|
544684
|
+
context3.logger.warn(`Failed to load translation nav file "${resolvedNavFilePath}": ${String(error50)}`);
|
|
544685
|
+
return void 0;
|
|
544686
|
+
}
|
|
544687
|
+
}
|
|
544642
544688
|
function parseTabOverlays(tabsObj) {
|
|
544643
544689
|
const result = {};
|
|
544644
544690
|
for (const [tabId, tabConfig] of Object.entries(tabsObj)) {
|
|
@@ -622586,7 +622632,7 @@ var AccessTokenPosthogManager = class {
|
|
|
622586
622632
|
properties: {
|
|
622587
622633
|
...event,
|
|
622588
622634
|
...event.properties,
|
|
622589
|
-
version: "5.8.1-
|
|
622635
|
+
version: "5.8.1-4-g1edc77ebd26",
|
|
622590
622636
|
usingAccessToken: true
|
|
622591
622637
|
}
|
|
622592
622638
|
});
|
|
@@ -622640,7 +622686,7 @@ var UserPosthogManager = class {
|
|
|
622640
622686
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
622641
622687
|
event: "CLI",
|
|
622642
622688
|
properties: {
|
|
622643
|
-
version: "5.8.1-
|
|
622689
|
+
version: "5.8.1-4-g1edc77ebd26",
|
|
622644
622690
|
...event,
|
|
622645
622691
|
...event.properties,
|
|
622646
622692
|
usingAccessToken: false,
|
|
@@ -804581,7 +804627,7 @@ function applyChildOverlays(children2, parent, overlay) {
|
|
|
804581
804627
|
const scopedOverlay = {
|
|
804582
804628
|
tabs: productOverlay.tabs ?? overlay.tabs,
|
|
804583
804629
|
products: void 0,
|
|
804584
|
-
versions: overlay.versions,
|
|
804630
|
+
versions: productOverlay.versions ?? overlay.versions,
|
|
804585
804631
|
announcement: productOverlay.announcement ?? overlay.announcement,
|
|
804586
804632
|
navigation: productOverlay.navigation ?? overlay.navigation,
|
|
804587
804633
|
navbarLinks: overlay.navbarLinks
|
|
@@ -804599,11 +804645,19 @@ function applyChildOverlays(children2, parent, overlay) {
|
|
|
804599
804645
|
return walkAndApply(child, overlay);
|
|
804600
804646
|
}
|
|
804601
804647
|
const versionOverlay = findVersionOverlay(childObj, overlay.versions ?? [], index3);
|
|
804602
|
-
const walked = walkAndApply(child, overlay);
|
|
804603
804648
|
if (versionOverlay != null) {
|
|
804649
|
+
const scopedOverlay = {
|
|
804650
|
+
tabs: versionOverlay.tabs ?? overlay.tabs,
|
|
804651
|
+
products: void 0,
|
|
804652
|
+
versions: void 0,
|
|
804653
|
+
announcement: overlay.announcement,
|
|
804654
|
+
navigation: versionOverlay.navigation ?? overlay.navigation,
|
|
804655
|
+
navbarLinks: overlay.navbarLinks
|
|
804656
|
+
};
|
|
804657
|
+
const walked = walkAndApply(child, scopedOverlay);
|
|
804604
804658
|
return applyVersionOverlayToNode(walked, versionOverlay);
|
|
804605
804659
|
}
|
|
804606
|
-
return
|
|
804660
|
+
return walkAndApply(child, overlay);
|
|
804607
804661
|
});
|
|
804608
804662
|
}
|
|
804609
804663
|
if (parentType === "tabbed") {
|
|
@@ -847534,7 +847588,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
847534
847588
|
var LOGS_FOLDER_NAME = "logs";
|
|
847535
847589
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
847536
847590
|
function getCliSource() {
|
|
847537
|
-
const version7 = "5.8.1-
|
|
847591
|
+
const version7 = "5.8.1-4-g1edc77ebd26";
|
|
847538
847592
|
return `cli@${version7}`;
|
|
847539
847593
|
}
|
|
847540
847594
|
var DebugLogger = class {
|
|
@@ -860187,7 +860241,7 @@ var LegacyDocsPublisher = class {
|
|
|
860187
860241
|
previewId,
|
|
860188
860242
|
disableTemplates: void 0,
|
|
860189
860243
|
skipUpload,
|
|
860190
|
-
cliVersion: "5.8.1-
|
|
860244
|
+
cliVersion: "5.8.1-4-g1edc77ebd26",
|
|
860191
860245
|
loginCommand: "fern auth login"
|
|
860192
860246
|
});
|
|
860193
860247
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -934629,7 +934683,7 @@ var CliContext = class _CliContext {
|
|
|
934629
934683
|
if (false) {
|
|
934630
934684
|
this.logger.error("CLI_VERSION is not defined");
|
|
934631
934685
|
}
|
|
934632
|
-
return "5.8.1-
|
|
934686
|
+
return "5.8.1-4-g1edc77ebd26";
|
|
934633
934687
|
}
|
|
934634
934688
|
getCliName() {
|
|
934635
934689
|
if (false) {
|
package/package.json
CHANGED