@fern-api/fern-api-dev 5.65.2 → 5.65.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 +36 -42
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -460376,6 +460376,7 @@ var init_DocsDefinitionResolver = __esm({
|
|
|
460376
460376
|
registerApi;
|
|
460377
460377
|
targetAudiences;
|
|
460378
460378
|
buildTranslatedApiDefinitions;
|
|
460379
|
+
markdownFilesToPathName = {};
|
|
460379
460380
|
constructor({ domain: domain3, docsWorkspace, ossWorkspaces, apiWorkspaces, taskContext, editThisPage, uploadFiles: uploadFiles2 = defaultUploadFiles, registerApi: registerApi2 = defaultRegisterApi, targetAudiences, buildTranslatedApiDefinitions = false }) {
|
|
460380
460381
|
this.domain = domain3;
|
|
460381
460382
|
this.docsWorkspace = docsWorkspace;
|
|
@@ -460503,6 +460504,14 @@ var init_DocsDefinitionResolver = __esm({
|
|
|
460503
460504
|
getTranslatedApiSpecs() {
|
|
460504
460505
|
return this.translatedApiSpecs;
|
|
460505
460506
|
}
|
|
460507
|
+
/**
|
|
460508
|
+
* Returns the map of absolute file paths to their fully qualified slug pathnames.
|
|
460509
|
+
* Used by translation processing to resolve relative .md/.mdx links.
|
|
460510
|
+
* Must be called after `resolve()`.
|
|
460511
|
+
*/
|
|
460512
|
+
getMarkdownFilesToPathName() {
|
|
460513
|
+
return this.markdownFilesToPathName;
|
|
460514
|
+
}
|
|
460506
460515
|
getDocsTranslationsConfig() {
|
|
460507
460516
|
const translations = this.parsedDocsConfig.translations;
|
|
460508
460517
|
if (translations == null || translations.length === 0) {
|
|
@@ -460678,6 +460687,7 @@ var init_DocsDefinitionResolver = __esm({
|
|
|
460678
460687
|
this.taskContext.logger.debug("Getting fully qualified path names...");
|
|
460679
460688
|
const pathNameStart = performance.now();
|
|
460680
460689
|
const markdownFilesToPathName = await this.getMarkdownFilesToFullyQualifiedPathNames(root6);
|
|
460690
|
+
this.markdownFilesToPathName = markdownFilesToPathName;
|
|
460681
460691
|
const pathNameTime = performance.now() - pathNameStart;
|
|
460682
460692
|
this.taskContext.logger.debug(`Got path names in ${pathNameTime.toFixed(0)}ms`);
|
|
460683
460693
|
if (this.pendingApiRegistrations.length > 0) {
|
|
@@ -590253,6 +590263,7 @@ __export(buildTranslatedDocsDefinition_exports, {
|
|
|
590253
590263
|
async function buildTranslatedDocsDefinition({ docsDefinition, locale, localePages, translationNavigationOverlays, resolver: resolver2, context: context3 }) {
|
|
590254
590264
|
const collectedFileIds = resolver2.getCollectedFileIds();
|
|
590255
590265
|
const docsWorkspacePath = resolver2.getDocsWorkspacePath();
|
|
590266
|
+
const markdownFilesToPathName = resolver2.getMarkdownFilesToPathName();
|
|
590256
590267
|
const resolveLocalePath = async (filepath) => {
|
|
590257
590268
|
const relPath = relative4(docsWorkspacePath, filepath);
|
|
590258
590269
|
const translatedPath = resolve6(docsWorkspacePath, RelativeFilePath2.of(`translations/${locale}/${relPath}`));
|
|
@@ -590292,7 +590303,7 @@ async function buildTranslatedDocsDefinition({ docsDefinition, locale, localePag
|
|
|
590292
590303
|
absolutePathToMarkdownFile
|
|
590293
590304
|
});
|
|
590294
590305
|
let processedMarkdown = stripMdxComments(importsResolved);
|
|
590295
|
-
processedMarkdown = replaceImagePathsAndUrls(processedMarkdown, collectedFileIds,
|
|
590306
|
+
processedMarkdown = replaceImagePathsAndUrls(processedMarkdown, collectedFileIds, markdownFilesToPathName, {
|
|
590296
590307
|
absolutePathToMarkdownFile,
|
|
590297
590308
|
absolutePathToFernFolder: docsWorkspacePath
|
|
590298
590309
|
}, context3);
|
|
@@ -688404,7 +688415,7 @@ var AccessTokenPosthogManager = class {
|
|
|
688404
688415
|
properties: {
|
|
688405
688416
|
...event,
|
|
688406
688417
|
...event.properties,
|
|
688407
|
-
version: "5.65.
|
|
688418
|
+
version: "5.65.3",
|
|
688408
688419
|
usingAccessToken: true,
|
|
688409
688420
|
...getRunIdProperties()
|
|
688410
688421
|
}
|
|
@@ -688470,7 +688481,7 @@ var UserPosthogManager = class {
|
|
|
688470
688481
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
688471
688482
|
event: "CLI",
|
|
688472
688483
|
properties: {
|
|
688473
|
-
version: "5.65.
|
|
688484
|
+
version: "5.65.3",
|
|
688474
688485
|
...event,
|
|
688475
688486
|
...event.properties,
|
|
688476
688487
|
usingAccessToken: false,
|
|
@@ -869566,7 +869577,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
869566
869577
|
var LOGS_FOLDER_NAME = "logs";
|
|
869567
869578
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
869568
869579
|
function getCliSource() {
|
|
869569
|
-
const version7 = "5.65.
|
|
869580
|
+
const version7 = "5.65.3";
|
|
869570
869581
|
return `cli@${version7}`;
|
|
869571
869582
|
}
|
|
869572
869583
|
var DebugLogger = class {
|
|
@@ -872445,6 +872456,7 @@ async function getPreviewDocsDefinition({ domain: domain3, project, context: con
|
|
|
872445
872456
|
translationNavigationOverlays: previousPreviewResult.translationNavigationOverlays,
|
|
872446
872457
|
collectedFileIds: previousPreviewResult.collectedFileIds,
|
|
872447
872458
|
docsWorkspacePath: previousPreviewResult.docsWorkspacePath,
|
|
872459
|
+
markdownFilesToPathName: previousPreviewResult.markdownFilesToPathName,
|
|
872448
872460
|
translatedApiDefinitions: previousPreviewResult.translatedApiDefinitions
|
|
872449
872461
|
};
|
|
872450
872462
|
}
|
|
@@ -872518,6 +872530,7 @@ async function getPreviewDocsDefinition({ domain: domain3, project, context: con
|
|
|
872518
872530
|
const translationPages = resolver2.getTranslationPages();
|
|
872519
872531
|
const translationNavigationOverlays = resolver2.getTranslationNavigationOverlays();
|
|
872520
872532
|
const collectedFileIds = resolver2.getCollectedFileIds();
|
|
872533
|
+
const markdownFilesToPathName = resolver2.getMarkdownFilesToPathName();
|
|
872521
872534
|
const translatedApiSpecs = resolver2.getTranslatedApiSpecs();
|
|
872522
872535
|
let translatedApiDefinitions;
|
|
872523
872536
|
if (translatedApiSpecs.size > 0) {
|
|
@@ -872545,6 +872558,7 @@ async function getPreviewDocsDefinition({ domain: domain3, project, context: con
|
|
|
872545
872558
|
translationNavigationOverlays,
|
|
872546
872559
|
collectedFileIds,
|
|
872547
872560
|
docsWorkspacePath: docsWorkspace.absoluteFilePath,
|
|
872561
|
+
markdownFilesToPathName,
|
|
872548
872562
|
translatedApiDefinitions
|
|
872549
872563
|
};
|
|
872550
872564
|
}
|
|
@@ -873190,7 +873204,7 @@ async function runAppPreviewServer({ initialProject, reloadProject, validateProj
|
|
|
873190
873204
|
const RELOAD_DEBOUNCE_MS = 500;
|
|
873191
873205
|
async function computeTranslatedDefinitions(result) {
|
|
873192
873206
|
const translations = /* @__PURE__ */ new Map();
|
|
873193
|
-
const { docsDefinition, translationPages, translationNavigationOverlays, translatedApiDefinitions, collectedFileIds, docsWorkspacePath } = result;
|
|
873207
|
+
const { docsDefinition, translationPages, translationNavigationOverlays, translatedApiDefinitions, collectedFileIds, docsWorkspacePath, markdownFilesToPathName } = result;
|
|
873194
873208
|
const hasTranslatedPages = translationPages != null && Object.keys(translationPages).length > 0;
|
|
873195
873209
|
const hasTranslatedApis = translatedApiDefinitions != null && Object.keys(translatedApiDefinitions).length > 0;
|
|
873196
873210
|
if (!hasTranslatedPages && !hasTranslatedApis) {
|
|
@@ -873252,17 +873266,10 @@ async function runAppPreviewServer({ initialProject, reloadProject, validateProj
|
|
|
873252
873266
|
absolutePathToMarkdownFile
|
|
873253
873267
|
});
|
|
873254
873268
|
let processedMarkdown = stripMdxComments(importsResolved);
|
|
873255
|
-
processedMarkdown = replaceImagePathsAndUrls(
|
|
873256
|
-
|
|
873257
|
-
|
|
873258
|
-
|
|
873259
|
-
// markdownFilesToPathName not needed for translations
|
|
873260
|
-
{
|
|
873261
|
-
absolutePathToMarkdownFile,
|
|
873262
|
-
absolutePathToFernFolder: docsWorkspacePath
|
|
873263
|
-
},
|
|
873264
|
-
context3
|
|
873265
|
-
);
|
|
873269
|
+
processedMarkdown = replaceImagePathsAndUrls(processedMarkdown, collectedFileIds, markdownFilesToPathName, {
|
|
873270
|
+
absolutePathToMarkdownFile,
|
|
873271
|
+
absolutePathToFernFolder: docsWorkspacePath
|
|
873272
|
+
}, context3);
|
|
873266
873273
|
translatedPages[pagePath] = {
|
|
873267
873274
|
markdown: processedMarkdown,
|
|
873268
873275
|
rawMarkdown: processedMarkdown,
|
|
@@ -873827,7 +873834,7 @@ async function runPreviewServer({ initialProject, reloadProject, validateProject
|
|
|
873827
873834
|
const RELOAD_DEBOUNCE_MS = 1e3;
|
|
873828
873835
|
async function computeTranslatedDefinitions(result) {
|
|
873829
873836
|
const translations = /* @__PURE__ */ new Map();
|
|
873830
|
-
const { docsDefinition, translationPages, translationNavigationOverlays, collectedFileIds, docsWorkspacePath } = result;
|
|
873837
|
+
const { docsDefinition, translationPages, translationNavigationOverlays, collectedFileIds, docsWorkspacePath, markdownFilesToPathName } = result;
|
|
873831
873838
|
if (translationPages == null || Object.keys(translationPages).length === 0) {
|
|
873832
873839
|
return translations;
|
|
873833
873840
|
}
|
|
@@ -873882,17 +873889,10 @@ async function runPreviewServer({ initialProject, reloadProject, validateProject
|
|
|
873882
873889
|
absolutePathToMarkdownFile
|
|
873883
873890
|
});
|
|
873884
873891
|
let processedMarkdown = stripMdxComments(importsResolved);
|
|
873885
|
-
processedMarkdown = replaceImagePathsAndUrls(
|
|
873886
|
-
|
|
873887
|
-
|
|
873888
|
-
|
|
873889
|
-
// markdownFilesToPathName not needed for translations
|
|
873890
|
-
{
|
|
873891
|
-
absolutePathToMarkdownFile,
|
|
873892
|
-
absolutePathToFernFolder: docsWorkspacePath
|
|
873893
|
-
},
|
|
873894
|
-
context3
|
|
873895
|
-
);
|
|
873892
|
+
processedMarkdown = replaceImagePathsAndUrls(processedMarkdown, collectedFileIds, markdownFilesToPathName, {
|
|
873893
|
+
absolutePathToMarkdownFile,
|
|
873894
|
+
absolutePathToFernFolder: docsWorkspacePath
|
|
873895
|
+
}, context3);
|
|
873896
873896
|
translatedPages[pagePath] = {
|
|
873897
873897
|
markdown: processedMarkdown,
|
|
873898
873898
|
rawMarkdown: processedMarkdown,
|
|
@@ -901287,6 +901287,7 @@ ${JSON.stringify(errorDetails, void 0, 2)}`);
|
|
|
901287
901287
|
try {
|
|
901288
901288
|
const collectedFileIds = resolver2.getCollectedFileIds();
|
|
901289
901289
|
const docsWorkspacePath = resolver2.getDocsWorkspacePath();
|
|
901290
|
+
const markdownFilesToPathName = resolver2.getMarkdownFilesToPathName();
|
|
901290
901291
|
const resolveLocalePath = async (filepath) => {
|
|
901291
901292
|
const relPath = relative4(docsWorkspacePath, filepath);
|
|
901292
901293
|
const translatedPath = resolve6(docsWorkspacePath, RelativeFilePath2.of(`translations/${locale}/${relPath}`));
|
|
@@ -901326,17 +901327,10 @@ ${JSON.stringify(errorDetails, void 0, 2)}`);
|
|
|
901326
901327
|
absolutePathToMarkdownFile
|
|
901327
901328
|
});
|
|
901328
901329
|
let processedMarkdown = stripMdxComments(importsResolved);
|
|
901329
|
-
processedMarkdown = replaceImagePathsAndUrls(
|
|
901330
|
-
|
|
901331
|
-
|
|
901332
|
-
|
|
901333
|
-
// markdownFilesToPathName not needed for translations
|
|
901334
|
-
{
|
|
901335
|
-
absolutePathToMarkdownFile,
|
|
901336
|
-
absolutePathToFernFolder: docsWorkspacePath
|
|
901337
|
-
},
|
|
901338
|
-
context3
|
|
901339
|
-
);
|
|
901330
|
+
processedMarkdown = replaceImagePathsAndUrls(processedMarkdown, collectedFileIds, markdownFilesToPathName, {
|
|
901331
|
+
absolutePathToMarkdownFile,
|
|
901332
|
+
absolutePathToFernFolder: docsWorkspacePath
|
|
901333
|
+
}, context3);
|
|
901340
901334
|
let editThisPageUrl = basePage?.editThisPageUrl;
|
|
901341
901335
|
if (editThisPageUrl != null) {
|
|
901342
901336
|
const fernPathPattern = `/fern/${path119}`;
|
|
@@ -902145,7 +902139,7 @@ var LegacyDocsPublisher = class {
|
|
|
902145
902139
|
previewId,
|
|
902146
902140
|
disableTemplates: void 0,
|
|
902147
902141
|
skipUpload,
|
|
902148
|
-
cliVersion: "5.65.
|
|
902142
|
+
cliVersion: "5.65.3",
|
|
902149
902143
|
loginCommand: "fern auth login"
|
|
902150
902144
|
});
|
|
902151
902145
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -968479,7 +968473,7 @@ function getAutomationContextFromEnv() {
|
|
|
968479
968473
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
968480
968474
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
968481
968475
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
968482
|
-
cli_version: "5.65.
|
|
968476
|
+
cli_version: "5.65.3"
|
|
968483
968477
|
};
|
|
968484
968478
|
}
|
|
968485
968479
|
function isAutomationMode() {
|
|
@@ -969311,7 +969305,7 @@ var CliContext = class _CliContext {
|
|
|
969311
969305
|
if (false) {
|
|
969312
969306
|
this.logger.error("CLI_VERSION is not defined");
|
|
969313
969307
|
}
|
|
969314
|
-
return "5.65.
|
|
969308
|
+
return "5.65.3";
|
|
969315
969309
|
}
|
|
969316
969310
|
getCliName() {
|
|
969317
969311
|
if (false) {
|
package/package.json
CHANGED