@fern-api/fern-api-dev 5.27.2 → 5.27.4
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 +35 -11
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -587451,7 +587451,18 @@ async function getVersionedNavigationConfiguration({ versions, absolutePathToFer
|
|
|
587451
587451
|
const versionedNavbars = [];
|
|
587452
587452
|
for (const version7 of versions) {
|
|
587453
587453
|
const absoluteFilepathToVersionFile = resolve6(absolutePathToFernFolder, version7.path);
|
|
587454
|
-
|
|
587454
|
+
let versionContent;
|
|
587455
|
+
try {
|
|
587456
|
+
versionContent = jsYaml.load((await (0, import_promises14.readFile)(absoluteFilepathToVersionFile)).toString());
|
|
587457
|
+
} catch (error50) {
|
|
587458
|
+
if (error50 instanceof jsYaml.YAMLException) {
|
|
587459
|
+
throw new CliError({
|
|
587460
|
+
message: `Failed to parse version file ${version7.path}: ${error50.message}`,
|
|
587461
|
+
code: CliError.Code.ParseError
|
|
587462
|
+
});
|
|
587463
|
+
}
|
|
587464
|
+
throw error50;
|
|
587465
|
+
}
|
|
587455
587466
|
const removedPaths = [];
|
|
587456
587467
|
const sanitizedVersionContent = sanitizeNullValues(versionContent, [], removedPaths);
|
|
587457
587468
|
if (removedPaths.length > 0) {
|
|
@@ -587501,7 +587512,18 @@ async function getNavigationConfiguration({ tabs, products, versions, navigation
|
|
|
587501
587512
|
if ("path" in product) {
|
|
587502
587513
|
let navigation3;
|
|
587503
587514
|
const absoluteFilepathToProductFile = resolve6(absolutePathToFernFolder, product.path);
|
|
587504
|
-
|
|
587515
|
+
let content5;
|
|
587516
|
+
try {
|
|
587517
|
+
content5 = jsYaml.load((await (0, import_promises14.readFile)(absoluteFilepathToProductFile)).toString());
|
|
587518
|
+
} catch (error50) {
|
|
587519
|
+
if (error50 instanceof jsYaml.YAMLException) {
|
|
587520
|
+
throw new CliError({
|
|
587521
|
+
message: `Failed to parse product file ${product.path}: ${error50.message}`,
|
|
587522
|
+
code: CliError.Code.ParseError
|
|
587523
|
+
});
|
|
587524
|
+
}
|
|
587525
|
+
throw error50;
|
|
587526
|
+
}
|
|
587505
587527
|
const removedPaths = [];
|
|
587506
587528
|
const sanitizedContent = sanitizeNullValues(content5, [], removedPaths);
|
|
587507
587529
|
if (removedPaths.length > 0) {
|
|
@@ -667943,7 +667965,7 @@ var AccessTokenPosthogManager = class {
|
|
|
667943
667965
|
properties: {
|
|
667944
667966
|
...event,
|
|
667945
667967
|
...event.properties,
|
|
667946
|
-
version: "5.27.
|
|
667968
|
+
version: "5.27.4",
|
|
667947
667969
|
usingAccessToken: true,
|
|
667948
667970
|
...getRunIdProperties()
|
|
667949
667971
|
}
|
|
@@ -668007,7 +668029,7 @@ var UserPosthogManager = class {
|
|
|
668007
668029
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
668008
668030
|
event: "CLI",
|
|
668009
668031
|
properties: {
|
|
668010
|
-
version: "5.27.
|
|
668032
|
+
version: "5.27.4",
|
|
668011
668033
|
...event,
|
|
668012
668034
|
...event.properties,
|
|
668013
668035
|
usingAccessToken: false,
|
|
@@ -859579,7 +859601,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
859579
859601
|
var LOGS_FOLDER_NAME = "logs";
|
|
859580
859602
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
859581
859603
|
function getCliSource() {
|
|
859582
|
-
const version7 = "5.27.
|
|
859604
|
+
const version7 = "5.27.4";
|
|
859583
859605
|
return `cli@${version7}`;
|
|
859584
859606
|
}
|
|
859585
859607
|
var DebugLogger = class {
|
|
@@ -861708,7 +861730,7 @@ ${err.stack}`);
|
|
|
861708
861730
|
try {
|
|
861709
861731
|
await startNextJsServer();
|
|
861710
861732
|
} catch (err) {
|
|
861711
|
-
context3.failAndThrow(`Docs preview server failed to start: ${extractErrorMessage(err)}. Run with --log-level debug for more details.`, void 0, { code: CliError.Code.
|
|
861733
|
+
context3.failAndThrow(`Docs preview server failed to start: ${extractErrorMessage(err)}. Run with --log-level debug for more details.`, void 0, { code: CliError.Code.EnvironmentError });
|
|
861712
861734
|
}
|
|
861713
861735
|
watcher.on("all", async (event, targetPath, _targetPathNext) => {
|
|
861714
861736
|
if (targetPath.includes(".fern/logs/") || targetPath.includes(".fern\\logs\\")) {
|
|
@@ -870902,7 +870924,7 @@ async function retryWithRateLimit({ fn: fn10, retryRateLimited, logger: logger4,
|
|
|
870902
870924
|
}
|
|
870903
870925
|
throw new CliError({
|
|
870904
870926
|
message: "Exceeded maximum retries for 429 Too Many Requests.",
|
|
870905
|
-
code: CliError.Code.
|
|
870927
|
+
code: CliError.Code.NetworkError
|
|
870906
870928
|
});
|
|
870907
870929
|
}
|
|
870908
870930
|
|
|
@@ -872304,7 +872326,9 @@ async function generateOne({ generatorInvocation, interactiveTaskContext, projec
|
|
|
872304
872326
|
generatorsYmlAbsolutePath,
|
|
872305
872327
|
generatorsYmlLineNumber: lineNumber
|
|
872306
872328
|
});
|
|
872307
|
-
interactiveTaskContext.failWithoutThrowing(message
|
|
872329
|
+
interactiveTaskContext.failWithoutThrowing(message, error50, {
|
|
872330
|
+
code: resolveErrorCode(error50)
|
|
872331
|
+
});
|
|
872308
872332
|
}
|
|
872309
872333
|
}
|
|
872310
872334
|
|
|
@@ -873569,7 +873593,7 @@ var LegacyDocsPublisher = class {
|
|
|
873569
873593
|
previewId,
|
|
873570
873594
|
disableTemplates: void 0,
|
|
873571
873595
|
skipUpload,
|
|
873572
|
-
cliVersion: "5.27.
|
|
873596
|
+
cliVersion: "5.27.4",
|
|
873573
873597
|
loginCommand: "fern auth login"
|
|
873574
873598
|
});
|
|
873575
873599
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -947974,7 +947998,7 @@ function getAutomationContextFromEnv() {
|
|
|
947974
947998
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
947975
947999
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
947976
948000
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
947977
|
-
cli_version: "5.27.
|
|
948001
|
+
cli_version: "5.27.4"
|
|
947978
948002
|
};
|
|
947979
948003
|
}
|
|
947980
948004
|
function isAutomationMode() {
|
|
@@ -948800,7 +948824,7 @@ var CliContext = class _CliContext {
|
|
|
948800
948824
|
if (false) {
|
|
948801
948825
|
this.logger.error("CLI_VERSION is not defined");
|
|
948802
948826
|
}
|
|
948803
|
-
return "5.27.
|
|
948827
|
+
return "5.27.4";
|
|
948804
948828
|
}
|
|
948805
948829
|
getCliName() {
|
|
948806
948830
|
if (false) {
|
package/package.json
CHANGED