@fern-api/fern-api-dev 3.61.0 → 3.62.0
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 +94 -9
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -1465102,6 +1465102,7 @@ __export(schemas_exports9, {
|
|
|
1465102
1465102
|
TabsPlacement: () => TabsPlacement2,
|
|
1465103
1465103
|
TabsThemeConfig: () => TabsThemeConfig,
|
|
1465104
1465104
|
Target: () => Target,
|
|
1465105
|
+
TitleSource: () => TitleSource,
|
|
1465105
1465106
|
TwitterCardSetting: () => TwitterCardSetting3,
|
|
1465106
1465107
|
VersionAvailability: () => VersionAvailability,
|
|
1465107
1465108
|
docs: () => docs_exports4,
|
|
@@ -1465136,6 +1465137,7 @@ __export(api_exports6, {
|
|
|
1465136
1465137
|
TabsPlacement: () => TabsPlacement2,
|
|
1465137
1465138
|
TabsThemeConfig: () => TabsThemeConfig,
|
|
1465138
1465139
|
Target: () => Target,
|
|
1465140
|
+
TitleSource: () => TitleSource,
|
|
1465139
1465141
|
TwitterCardSetting: () => TwitterCardSetting3,
|
|
1465140
1465142
|
VersionAvailability: () => VersionAvailability,
|
|
1465141
1465143
|
docs: () => docs_exports4
|
|
@@ -1465168,6 +1465170,7 @@ __export(docs_exports4, {
|
|
|
1465168
1465170
|
TabsPlacement: () => TabsPlacement2,
|
|
1465169
1465171
|
TabsThemeConfig: () => TabsThemeConfig,
|
|
1465170
1465172
|
Target: () => Target,
|
|
1465173
|
+
TitleSource: () => TitleSource,
|
|
1465171
1465174
|
TwitterCardSetting: () => TwitterCardSetting3,
|
|
1465172
1465175
|
VersionAvailability: () => VersionAvailability
|
|
1465173
1465176
|
});
|
|
@@ -1465373,6 +1465376,12 @@ var Target = {
|
|
|
1465373
1465376
|
Top: "_top"
|
|
1465374
1465377
|
};
|
|
1465375
1465378
|
|
|
1465379
|
+
// ../configuration/lib/docs-yml/schemas/sdk/api/resources/docs/types/TitleSource.js
|
|
1465380
|
+
var TitleSource = {
|
|
1465381
|
+
Frontmatter: "frontmatter",
|
|
1465382
|
+
Filename: "filename"
|
|
1465383
|
+
};
|
|
1465384
|
+
|
|
1465376
1465385
|
// ../configuration/lib/docs-yml/schemas/sdk/api/resources/docs/types/TwitterCardSetting.js
|
|
1465377
1465386
|
var TwitterCardSetting3 = {
|
|
1465378
1465387
|
Summary: "summary",
|
|
@@ -1465685,6 +1465694,7 @@ __export(serialization_exports4, {
|
|
|
1465685
1465694
|
TabsThemeConfig: () => TabsThemeConfig2,
|
|
1465686
1465695
|
Target: () => Target2,
|
|
1465687
1465696
|
ThemeConfig: () => ThemeConfig,
|
|
1465697
|
+
TitleSource: () => TitleSource2,
|
|
1465688
1465698
|
TwitterCardSetting: () => TwitterCardSetting4,
|
|
1465689
1465699
|
UntabbedNavigationConfig: () => UntabbedNavigationConfig,
|
|
1465690
1465700
|
VersionAvailability: () => VersionAvailability2,
|
|
@@ -1465815,6 +1465825,7 @@ __export(docs_exports5, {
|
|
|
1465815
1465825
|
TabsThemeConfig: () => TabsThemeConfig2,
|
|
1465816
1465826
|
Target: () => Target2,
|
|
1465817
1465827
|
ThemeConfig: () => ThemeConfig,
|
|
1465828
|
+
TitleSource: () => TitleSource2,
|
|
1465818
1465829
|
TwitterCardSetting: () => TwitterCardSetting4,
|
|
1465819
1465830
|
UntabbedNavigationConfig: () => UntabbedNavigationConfig,
|
|
1465820
1465831
|
VersionAvailability: () => VersionAvailability2,
|
|
@@ -1467999,10 +1468010,14 @@ var DocsConfiguration = schemas_exports8.object({
|
|
|
1467999
1468010
|
footer: schemas_exports8.string().optional()
|
|
1468000
1468011
|
});
|
|
1468001
1468012
|
|
|
1468013
|
+
// ../configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/TitleSource.js
|
|
1468014
|
+
var TitleSource2 = schemas_exports8.enum_(["frontmatter", "filename"]);
|
|
1468015
|
+
|
|
1468002
1468016
|
// ../configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/FolderConfiguration.js
|
|
1468003
1468017
|
var FolderConfiguration = schemas_exports8.object({
|
|
1468004
1468018
|
folder: schemas_exports8.string(),
|
|
1468005
1468019
|
title: schemas_exports8.string().optional(),
|
|
1468020
|
+
titleSource: schemas_exports8.property("title-source", TitleSource2.optional()),
|
|
1468006
1468021
|
slug: schemas_exports8.string().optional(),
|
|
1468007
1468022
|
icon: schemas_exports8.string().optional(),
|
|
1468008
1468023
|
hidden: schemas_exports8.boolean().optional(),
|
|
@@ -1495285,15 +1495300,31 @@ async function getFrontmatterPosition({ absolutePath, readFileFn = (path86, enco
|
|
|
1495285
1495300
|
return void 0;
|
|
1495286
1495301
|
}
|
|
1495287
1495302
|
}
|
|
1495288
|
-
async function
|
|
1495303
|
+
async function getFrontmatterTitle({ absolutePath, readFileFn = (path86, encoding) => (0, import_promises14.readFile)(path86, encoding) }) {
|
|
1495304
|
+
try {
|
|
1495305
|
+
const content5 = await readFileFn(absolutePath, "utf-8");
|
|
1495306
|
+
const { data: data2 } = (0, import_gray_matter.default)(content5);
|
|
1495307
|
+
if (typeof data2.title === "string" && data2.title.trim().length > 0) {
|
|
1495308
|
+
return data2.title.trim();
|
|
1495309
|
+
}
|
|
1495310
|
+
return void 0;
|
|
1495311
|
+
} catch {
|
|
1495312
|
+
return void 0;
|
|
1495313
|
+
}
|
|
1495314
|
+
}
|
|
1495315
|
+
async function buildNavigationForDirectory({ directoryPath, titleSource, getDir = getDirectoryContents, readFileFn = (path86, encoding) => (0, import_promises14.readFile)(path86, encoding) }) {
|
|
1495289
1495316
|
const contents = await getDir(directoryPath);
|
|
1495317
|
+
const useFrontmatterTitles = titleSource === "frontmatter";
|
|
1495290
1495318
|
const markdownFiles = contents.filter((item) => item.type === "file" && (item.name.toLowerCase().endsWith(".md") || item.name.toLowerCase().endsWith(".mdx")));
|
|
1495291
1495319
|
const subdirectories = contents.filter((item) => item.type === "directory");
|
|
1495292
|
-
const pagePositions = await Promise.all(
|
|
1495293
|
-
|
|
1495320
|
+
const [pagePositions, pageTitles] = await Promise.all([
|
|
1495321
|
+
Promise.all(markdownFiles.map((file4) => getFrontmatterPosition({ absolutePath: file4.absolutePath, readFileFn }))),
|
|
1495322
|
+
useFrontmatterTitles ? Promise.all(markdownFiles.map((file4) => getFrontmatterTitle({ absolutePath: file4.absolutePath, readFileFn }))) : Promise.resolve(markdownFiles.map(() => void 0))
|
|
1495323
|
+
]);
|
|
1495324
|
+
const pages = markdownFiles.map((file4, index3) => {
|
|
1495294
1495325
|
return {
|
|
1495295
1495326
|
type: "page",
|
|
1495296
|
-
title: nameToTitle({ name: file4.name }),
|
|
1495327
|
+
title: pageTitles[index3] ?? nameToTitle({ name: file4.name }),
|
|
1495297
1495328
|
absolutePath: file4.absolutePath,
|
|
1495298
1495329
|
slug: nameToSlug({ name: file4.name }),
|
|
1495299
1495330
|
icon: void 0,
|
|
@@ -1495308,14 +1495339,17 @@ async function buildNavigationForDirectory({ directoryPath, getDir = getDirector
|
|
|
1495308
1495339
|
const sections = await Promise.all(subdirectories.map(async (dir) => {
|
|
1495309
1495340
|
const subContents = await buildNavigationForDirectory({
|
|
1495310
1495341
|
directoryPath: dir.absolutePath,
|
|
1495342
|
+
titleSource,
|
|
1495311
1495343
|
getDir,
|
|
1495312
1495344
|
readFileFn
|
|
1495313
1495345
|
});
|
|
1495314
1495346
|
const indexPage = subContents.find((item) => item.type === "page" && (item.slug === "index" || item.absolutePath.toLowerCase().endsWith("/index.mdx") || item.absolutePath.toLowerCase().endsWith("/index.md")));
|
|
1495315
1495347
|
const filteredContents = indexPage ? subContents.filter((item) => item !== indexPage) : subContents;
|
|
1495348
|
+
const indexFileFrontmatterTitle = useFrontmatterTitles ? indexPage?.type === "page" ? await getFrontmatterTitle({ absolutePath: indexPage.absolutePath, readFileFn }) : void 0 : void 0;
|
|
1495349
|
+
const sectionTitle = indexFileFrontmatterTitle ?? nameToTitle({ name: dir.name });
|
|
1495316
1495350
|
return {
|
|
1495317
1495351
|
type: "section",
|
|
1495318
|
-
title:
|
|
1495352
|
+
title: sectionTitle,
|
|
1495319
1495353
|
slug: nameToSlug({ name: dir.name }),
|
|
1495320
1495354
|
icon: void 0,
|
|
1495321
1495355
|
contents: filteredContents,
|
|
@@ -1612209,6 +1612243,13 @@ var definitions4 = {
|
|
|
1612209
1612243
|
],
|
|
1612210
1612244
|
additionalProperties: false
|
|
1612211
1612245
|
},
|
|
1612246
|
+
"docs.TitleSource": {
|
|
1612247
|
+
type: "string",
|
|
1612248
|
+
enum: [
|
|
1612249
|
+
"frontmatter",
|
|
1612250
|
+
"filename"
|
|
1612251
|
+
]
|
|
1612252
|
+
},
|
|
1612212
1612253
|
"docs.FolderConfiguration": {
|
|
1612213
1612254
|
type: "object",
|
|
1612214
1612255
|
properties: {
|
|
@@ -1612255,6 +1612296,16 @@ var definitions4 = {
|
|
|
1612255
1612296
|
}
|
|
1612256
1612297
|
]
|
|
1612257
1612298
|
},
|
|
1612299
|
+
"title-source": {
|
|
1612300
|
+
oneOf: [
|
|
1612301
|
+
{
|
|
1612302
|
+
$ref: "#/definitions/docs.TitleSource"
|
|
1612303
|
+
},
|
|
1612304
|
+
{
|
|
1612305
|
+
type: "null"
|
|
1612306
|
+
}
|
|
1612307
|
+
]
|
|
1612308
|
+
},
|
|
1612258
1612309
|
slug: {
|
|
1612259
1612310
|
oneOf: [
|
|
1612260
1612311
|
{
|
|
@@ -1678913,7 +1678964,7 @@ var AccessTokenPosthogManager = class {
|
|
|
1678913
1678964
|
properties: {
|
|
1678914
1678965
|
...event,
|
|
1678915
1678966
|
...event.properties,
|
|
1678916
|
-
version: "3.
|
|
1678967
|
+
version: "3.62.0",
|
|
1678917
1678968
|
usingAccessToken: true
|
|
1678918
1678969
|
}
|
|
1678919
1678970
|
});
|
|
@@ -1678963,7 +1679014,7 @@ var UserPosthogManager = class {
|
|
|
1678963
1679014
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
1678964
1679015
|
event: "CLI",
|
|
1678965
1679016
|
properties: {
|
|
1678966
|
-
version: "3.
|
|
1679017
|
+
version: "3.62.0",
|
|
1678967
1679018
|
...event,
|
|
1678968
1679019
|
...event.properties,
|
|
1678969
1679020
|
usingAccessToken: false,
|
|
@@ -1710885,7 +1710936,7 @@ var CliContext = class {
|
|
|
1710885
1710936
|
if (false) {
|
|
1710886
1710937
|
this.logger.error("CLI_VERSION is not defined");
|
|
1710887
1710938
|
}
|
|
1710888
|
-
return "3.
|
|
1710939
|
+
return "3.62.0";
|
|
1710889
1710940
|
}
|
|
1710890
1710941
|
getCliName() {
|
|
1710891
1710942
|
if (false) {
|
|
@@ -1713999,7 +1714050,7 @@ var import_path56 = __toESM(require("path"), 1);
|
|
|
1713999
1714050
|
var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
1714000
1714051
|
var LOGS_FOLDER_NAME = "logs";
|
|
1714001
1714052
|
function getCliSource() {
|
|
1714002
|
-
const version7 = "3.
|
|
1714053
|
+
const version7 = "3.62.0";
|
|
1714003
1714054
|
return `cli@${version7}`;
|
|
1714004
1714055
|
}
|
|
1714005
1714056
|
var DebugLogger = class {
|
|
@@ -1718361,6 +1718412,13 @@ var definitions5 = {
|
|
|
1718361
1718412
|
],
|
|
1718362
1718413
|
additionalProperties: false
|
|
1718363
1718414
|
},
|
|
1718415
|
+
"docs.TitleSource": {
|
|
1718416
|
+
type: "string",
|
|
1718417
|
+
enum: [
|
|
1718418
|
+
"frontmatter",
|
|
1718419
|
+
"filename"
|
|
1718420
|
+
]
|
|
1718421
|
+
},
|
|
1718364
1718422
|
"docs.FolderConfiguration": {
|
|
1718365
1718423
|
type: "object",
|
|
1718366
1718424
|
properties: {
|
|
@@ -1718407,6 +1718465,16 @@ var definitions5 = {
|
|
|
1718407
1718465
|
}
|
|
1718408
1718466
|
]
|
|
1718409
1718467
|
},
|
|
1718468
|
+
"title-source": {
|
|
1718469
|
+
oneOf: [
|
|
1718470
|
+
{
|
|
1718471
|
+
$ref: "#/definitions/docs.TitleSource"
|
|
1718472
|
+
},
|
|
1718473
|
+
{
|
|
1718474
|
+
type: "null"
|
|
1718475
|
+
}
|
|
1718476
|
+
]
|
|
1718477
|
+
},
|
|
1718410
1718478
|
slug: {
|
|
1718411
1718479
|
oneOf: [
|
|
1718412
1718480
|
{
|
|
@@ -1720198,6 +1720266,13 @@ var definitions6 = {
|
|
|
1720198
1720266
|
],
|
|
1720199
1720267
|
additionalProperties: false
|
|
1720200
1720268
|
},
|
|
1720269
|
+
"docs.TitleSource": {
|
|
1720270
|
+
type: "string",
|
|
1720271
|
+
enum: [
|
|
1720272
|
+
"frontmatter",
|
|
1720273
|
+
"filename"
|
|
1720274
|
+
]
|
|
1720275
|
+
},
|
|
1720201
1720276
|
"docs.FolderConfiguration": {
|
|
1720202
1720277
|
type: "object",
|
|
1720203
1720278
|
properties: {
|
|
@@ -1720244,6 +1720319,16 @@ var definitions6 = {
|
|
|
1720244
1720319
|
}
|
|
1720245
1720320
|
]
|
|
1720246
1720321
|
},
|
|
1720322
|
+
"title-source": {
|
|
1720323
|
+
oneOf: [
|
|
1720324
|
+
{
|
|
1720325
|
+
$ref: "#/definitions/docs.TitleSource"
|
|
1720326
|
+
},
|
|
1720327
|
+
{
|
|
1720328
|
+
type: "null"
|
|
1720329
|
+
}
|
|
1720330
|
+
]
|
|
1720331
|
+
},
|
|
1720247
1720332
|
slug: {
|
|
1720248
1720333
|
oneOf: [
|
|
1720249
1720334
|
{
|
package/package.json
CHANGED