@fern-api/fern-api-dev 4.106.1 → 4.106.2-1-g46ca61a0af5
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 +96 -85
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -344254,7 +344254,7 @@ var require_fernignore = __commonJS({
|
|
|
344254
344254
|
"../../generator-cli/lib/replay/fernignore.js"(exports2) {
|
|
344255
344255
|
"use strict";
|
|
344256
344256
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
344257
|
-
exports2.REPLAY_FERNIGNORE_ENTRIES = void 0;
|
|
344257
|
+
exports2.GITATTRIBUTES_ENTRIES = exports2.REPLAY_FERNIGNORE_ENTRIES = void 0;
|
|
344258
344258
|
exports2.ensureReplayFernignoreEntries = ensureReplayFernignoreEntries;
|
|
344259
344259
|
exports2.ensureGitattributesEntries = ensureGitattributesEntries;
|
|
344260
344260
|
exports2.ensureReplayFernignoreEntriesSync = ensureReplayFernignoreEntriesSync;
|
|
@@ -344263,7 +344263,7 @@ var require_fernignore = __commonJS({
|
|
|
344263
344263
|
var promises_1 = require("fs/promises");
|
|
344264
344264
|
var path_1 = require("path");
|
|
344265
344265
|
exports2.REPLAY_FERNIGNORE_ENTRIES = [".fern/replay.lock", ".fern/replay.yml", ".gitattributes"];
|
|
344266
|
-
|
|
344266
|
+
exports2.GITATTRIBUTES_ENTRIES = [".fern/replay.lock linguist-generated=true"];
|
|
344267
344267
|
async function ensureReplayFernignoreEntries(outputDir) {
|
|
344268
344268
|
const fernignorePath = (0, path_1.join)(outputDir, ".fernignore");
|
|
344269
344269
|
let content5 = "";
|
|
@@ -344288,7 +344288,7 @@ var require_fernignore = __commonJS({
|
|
|
344288
344288
|
} catch {
|
|
344289
344289
|
}
|
|
344290
344290
|
const lines = content5.split("\n");
|
|
344291
|
-
const toAdd = GITATTRIBUTES_ENTRIES.filter((entry) => !lines.some((line) => line.trim() === entry));
|
|
344291
|
+
const toAdd = exports2.GITATTRIBUTES_ENTRIES.filter((entry) => !lines.some((line) => line.trim() === entry));
|
|
344292
344292
|
if (toAdd.length > 0) {
|
|
344293
344293
|
const suffix = content5.length > 0 && !content5.endsWith("\n") ? "\n" : "";
|
|
344294
344294
|
await (0, promises_1.writeFile)(gitattributesPath, content5 + suffix + toAdd.join("\n") + "\n", "utf-8");
|
|
@@ -344314,7 +344314,7 @@ var require_fernignore = __commonJS({
|
|
|
344314
344314
|
content5 = (0, fs_1.readFileSync)(gitattributesPath, "utf-8");
|
|
344315
344315
|
}
|
|
344316
344316
|
const lines = content5.split("\n");
|
|
344317
|
-
const toAdd = GITATTRIBUTES_ENTRIES.filter((entry) => !lines.some((line) => line.trim() === entry));
|
|
344317
|
+
const toAdd = exports2.GITATTRIBUTES_ENTRIES.filter((entry) => !lines.some((line) => line.trim() === entry));
|
|
344318
344318
|
if (toAdd.length > 0) {
|
|
344319
344319
|
const suffix = content5.length > 0 && !content5.endsWith("\n") ? "\n" : "";
|
|
344320
344320
|
(0, fs_1.writeFileSync)(gitattributesPath, content5 + suffix + toAdd.join("\n") + "\n", "utf-8");
|
|
@@ -344356,22 +344356,18 @@ var require_replay_init = __commonJS({
|
|
|
344356
344356
|
importHistory: params2.importHistory
|
|
344357
344357
|
});
|
|
344358
344358
|
if (!bootstrapResult.generationCommit) {
|
|
344359
|
-
return { bootstrap: bootstrapResult, fernignoreEntries: [] };
|
|
344359
|
+
return { bootstrap: bootstrapResult, fernignoreEntries: [], gitattributesEntries: [] };
|
|
344360
344360
|
}
|
|
344361
344361
|
if (dryRun) {
|
|
344362
|
-
return { bootstrap: bootstrapResult, fernignoreEntries: [] };
|
|
344362
|
+
return { bootstrap: bootstrapResult, fernignoreEntries: [], gitattributesEntries: [] };
|
|
344363
344363
|
}
|
|
344364
|
-
(0, fernignore_1.ensureReplayFernignoreEntriesSync)(repoPath);
|
|
344365
|
-
(0, fernignore_1.ensureGitattributesEntriesSync)(repoPath);
|
|
344366
344364
|
const lockfilePath = (0, path_1.join)(repoPath, ".fern", "replay.lock");
|
|
344367
344365
|
const lockfileContent = (0, fs_1.existsSync)(lockfilePath) ? (0, fs_1.readFileSync)(lockfilePath, "utf-8") : void 0;
|
|
344368
|
-
const replayYmlPath = (0, path_1.join)(repoPath, ".fern", "replay.yml");
|
|
344369
|
-
const replayYmlContent = (0, fs_1.existsSync)(replayYmlPath) ? (0, fs_1.readFileSync)(replayYmlPath, "utf-8") : void 0;
|
|
344370
344366
|
return {
|
|
344371
344367
|
bootstrap: bootstrapResult,
|
|
344372
344368
|
lockfileContent,
|
|
344373
|
-
replayYmlContent,
|
|
344374
344369
|
fernignoreEntries: fernignore_1.REPLAY_FERNIGNORE_ENTRIES,
|
|
344370
|
+
gitattributesEntries: fernignore_1.GITATTRIBUTES_ENTRIES,
|
|
344375
344371
|
prBody: buildPrBody(bootstrapResult)
|
|
344376
344372
|
};
|
|
344377
344373
|
}
|
|
@@ -344713,6 +344709,7 @@ var require_replay_submit_init = __commonJS({
|
|
|
344713
344709
|
repo,
|
|
344714
344710
|
lockfileContents: initResult.lockfileContent,
|
|
344715
344711
|
fernignoreEntries: initResult.fernignoreEntries,
|
|
344712
|
+
gitattributesEntries: initResult.gitattributesEntries,
|
|
344716
344713
|
prBody: initResult.prBody
|
|
344717
344714
|
})
|
|
344718
344715
|
});
|
|
@@ -621199,7 +621196,7 @@ var AccessTokenPosthogManager = class {
|
|
|
621199
621196
|
properties: {
|
|
621200
621197
|
...event,
|
|
621201
621198
|
...event.properties,
|
|
621202
|
-
version: "4.106.1",
|
|
621199
|
+
version: "4.106.2-1-g46ca61a0af5",
|
|
621203
621200
|
usingAccessToken: true
|
|
621204
621201
|
}
|
|
621205
621202
|
});
|
|
@@ -621253,7 +621250,7 @@ var UserPosthogManager = class {
|
|
|
621253
621250
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
621254
621251
|
event: "CLI",
|
|
621255
621252
|
properties: {
|
|
621256
|
-
version: "4.106.1",
|
|
621253
|
+
version: "4.106.2-1-g46ca61a0af5",
|
|
621257
621254
|
...event,
|
|
621258
621255
|
...event.properties,
|
|
621259
621256
|
usingAccessToken: false,
|
|
@@ -832894,7 +832891,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
832894
832891
|
var LOGS_FOLDER_NAME = "logs";
|
|
832895
832892
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
832896
832893
|
function getCliSource() {
|
|
832897
|
-
const version7 = "4.106.1";
|
|
832894
|
+
const version7 = "4.106.2-1-g46ca61a0af5";
|
|
832898
832895
|
return `cli@${version7}`;
|
|
832899
832896
|
}
|
|
832900
832897
|
var DebugLogger = class {
|
|
@@ -834643,26 +834640,30 @@ async function runAppPreviewServer({ initialProject, reloadProject, validateProj
|
|
|
834643
834640
|
}
|
|
834644
834641
|
}
|
|
834645
834642
|
for (const [pagePath, rawMarkdown] of Object.entries(localePages)) {
|
|
834646
|
-
|
|
834647
|
-
|
|
834648
|
-
|
|
834649
|
-
|
|
834650
|
-
processedMarkdown
|
|
834651
|
-
|
|
834652
|
-
|
|
834653
|
-
|
|
834654
|
-
|
|
834655
|
-
|
|
834656
|
-
|
|
834657
|
-
|
|
834658
|
-
|
|
834659
|
-
|
|
834660
|
-
|
|
834661
|
-
|
|
834662
|
-
|
|
834663
|
-
|
|
834664
|
-
|
|
834665
|
-
|
|
834643
|
+
try {
|
|
834644
|
+
const basePage = translatedPages[pagePath];
|
|
834645
|
+
let processedMarkdown = stripMdxComments(rawMarkdown);
|
|
834646
|
+
const absolutePathToMarkdownFile = resolve6(docsWorkspacePath, RelativeFilePath2.of(pagePath));
|
|
834647
|
+
processedMarkdown = replaceImagePathsAndUrls(
|
|
834648
|
+
processedMarkdown,
|
|
834649
|
+
collectedFileIds,
|
|
834650
|
+
{},
|
|
834651
|
+
// markdownFilesToPathName not needed for translations
|
|
834652
|
+
{
|
|
834653
|
+
absolutePathToMarkdownFile,
|
|
834654
|
+
absolutePathToFernFolder: docsWorkspacePath
|
|
834655
|
+
},
|
|
834656
|
+
context3
|
|
834657
|
+
);
|
|
834658
|
+
translatedPages[pagePath] = {
|
|
834659
|
+
markdown: processedMarkdown,
|
|
834660
|
+
rawMarkdown: processedMarkdown,
|
|
834661
|
+
editThisPageUrl: basePage?.editThisPageUrl,
|
|
834662
|
+
editThisPageLaunch: basePage?.editThisPageLaunch
|
|
834663
|
+
};
|
|
834664
|
+
} catch (pageError) {
|
|
834665
|
+
context3.logger.warn(`Failed to process translated page "${pagePath}" for locale "${locale}": ${String(pageError)}. Falling back to base page.`);
|
|
834666
|
+
}
|
|
834666
834667
|
}
|
|
834667
834668
|
let updatedRoot = applyTranslatedFrontmatterToNavTree(docsDefinition.config.root, localePages, context3);
|
|
834668
834669
|
const localeNavOverlay = translationNavigationOverlays?.[locale];
|
|
@@ -835142,26 +835143,30 @@ async function runPreviewServer({ initialProject, reloadProject, validateProject
|
|
|
835142
835143
|
}
|
|
835143
835144
|
}
|
|
835144
835145
|
for (const [pagePath, rawMarkdown] of Object.entries(localePages)) {
|
|
835145
|
-
|
|
835146
|
-
|
|
835147
|
-
|
|
835148
|
-
|
|
835149
|
-
processedMarkdown
|
|
835150
|
-
|
|
835151
|
-
|
|
835152
|
-
|
|
835153
|
-
|
|
835154
|
-
|
|
835155
|
-
|
|
835156
|
-
|
|
835157
|
-
|
|
835158
|
-
|
|
835159
|
-
|
|
835160
|
-
|
|
835161
|
-
|
|
835162
|
-
|
|
835163
|
-
|
|
835164
|
-
|
|
835146
|
+
try {
|
|
835147
|
+
const basePage = translatedPages[pagePath];
|
|
835148
|
+
let processedMarkdown = stripMdxComments(rawMarkdown);
|
|
835149
|
+
const absolutePathToMarkdownFile = resolve6(docsWorkspacePath, RelativeFilePath2.of(pagePath));
|
|
835150
|
+
processedMarkdown = replaceImagePathsAndUrls(
|
|
835151
|
+
processedMarkdown,
|
|
835152
|
+
collectedFileIds,
|
|
835153
|
+
{},
|
|
835154
|
+
// markdownFilesToPathName not needed for translations
|
|
835155
|
+
{
|
|
835156
|
+
absolutePathToMarkdownFile,
|
|
835157
|
+
absolutePathToFernFolder: docsWorkspacePath
|
|
835158
|
+
},
|
|
835159
|
+
context3
|
|
835160
|
+
);
|
|
835161
|
+
translatedPages[pagePath] = {
|
|
835162
|
+
markdown: processedMarkdown,
|
|
835163
|
+
rawMarkdown: processedMarkdown,
|
|
835164
|
+
editThisPageUrl: basePage?.editThisPageUrl,
|
|
835165
|
+
editThisPageLaunch: basePage?.editThisPageLaunch
|
|
835166
|
+
};
|
|
835167
|
+
} catch (pageError) {
|
|
835168
|
+
context3.logger.warn(`Failed to process translated page "${pagePath}" for locale "${locale}": ${String(pageError)}. Falling back to base page.`);
|
|
835169
|
+
}
|
|
835165
835170
|
}
|
|
835166
835171
|
let updatedRoot = applyTranslatedFrontmatterToNavTree(docsDefinition.config.root, localePages, context3);
|
|
835167
835172
|
const localeNavOverlay = translationNavigationOverlays?.[locale];
|
|
@@ -844529,36 +844534,41 @@ ${JSON.stringify(errorDetails, void 0, 2)}`);
|
|
|
844529
844534
|
const translatedPages = {
|
|
844530
844535
|
...docsDefinition.pages,
|
|
844531
844536
|
...Object.fromEntries(Object.entries(localePages).map(([path105, rawMarkdown]) => {
|
|
844532
|
-
|
|
844533
|
-
|
|
844534
|
-
|
|
844535
|
-
|
|
844536
|
-
processedMarkdown
|
|
844537
|
-
|
|
844538
|
-
|
|
844539
|
-
|
|
844540
|
-
|
|
844541
|
-
|
|
844542
|
-
|
|
844543
|
-
|
|
844544
|
-
|
|
844545
|
-
|
|
844546
|
-
|
|
844547
|
-
|
|
844548
|
-
|
|
844549
|
-
|
|
844550
|
-
|
|
844551
|
-
|
|
844552
|
-
return [
|
|
844553
|
-
path105,
|
|
844554
|
-
{
|
|
844555
|
-
markdown: processedMarkdown,
|
|
844556
|
-
rawMarkdown: processedMarkdown,
|
|
844557
|
-
editThisPageUrl,
|
|
844558
|
-
editThisPageLaunch: basePage?.editThisPageLaunch
|
|
844537
|
+
try {
|
|
844538
|
+
const basePage = docsDefinition.pages[path105];
|
|
844539
|
+
let processedMarkdown = stripMdxComments(rawMarkdown);
|
|
844540
|
+
const absolutePathToMarkdownFile = resolve6(docsWorkspacePath, RelativeFilePath2.of(path105));
|
|
844541
|
+
processedMarkdown = replaceImagePathsAndUrls(
|
|
844542
|
+
processedMarkdown,
|
|
844543
|
+
collectedFileIds,
|
|
844544
|
+
{},
|
|
844545
|
+
// markdownFilesToPathName not needed for translations
|
|
844546
|
+
{
|
|
844547
|
+
absolutePathToMarkdownFile,
|
|
844548
|
+
absolutePathToFernFolder: docsWorkspacePath
|
|
844549
|
+
},
|
|
844550
|
+
context3
|
|
844551
|
+
);
|
|
844552
|
+
let editThisPageUrl = basePage?.editThisPageUrl;
|
|
844553
|
+
if (editThisPageUrl != null) {
|
|
844554
|
+
const fernPathPattern = `/fern/${path105}`;
|
|
844555
|
+
const translatedPath = `/fern/translations/${locale}/${path105}`;
|
|
844556
|
+
editThisPageUrl = editThisPageUrl.replace(fernPathPattern, translatedPath);
|
|
844559
844557
|
}
|
|
844560
|
-
|
|
844561
|
-
|
|
844558
|
+
return [
|
|
844559
|
+
path105,
|
|
844560
|
+
{
|
|
844561
|
+
markdown: processedMarkdown,
|
|
844562
|
+
rawMarkdown: processedMarkdown,
|
|
844563
|
+
editThisPageUrl,
|
|
844564
|
+
editThisPageLaunch: basePage?.editThisPageLaunch
|
|
844565
|
+
}
|
|
844566
|
+
];
|
|
844567
|
+
} catch (pageError) {
|
|
844568
|
+
context3.logger.warn(`Failed to process translated page "${path105}" for locale "${locale}": ${String(pageError)}. Falling back to base page.`);
|
|
844569
|
+
return void 0;
|
|
844570
|
+
}
|
|
844571
|
+
}).filter((entry) => entry != null))
|
|
844562
844572
|
};
|
|
844563
844573
|
let updatedRoot = applyTranslatedFrontmatterToNavTree(
|
|
844564
844574
|
docsDefinition.config.root,
|
|
@@ -845290,7 +845300,7 @@ var LegacyDocsPublisher = class {
|
|
|
845290
845300
|
previewId,
|
|
845291
845301
|
disableTemplates: void 0,
|
|
845292
845302
|
skipUpload,
|
|
845293
|
-
cliVersion: "4.106.1",
|
|
845303
|
+
cliVersion: "4.106.2-1-g46ca61a0af5",
|
|
845294
845304
|
loginCommand: "fern auth login"
|
|
845295
845305
|
});
|
|
845296
845306
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -919391,7 +919401,7 @@ var CliContext = class _CliContext {
|
|
|
919391
919401
|
if (false) {
|
|
919392
919402
|
this.logger.error("CLI_VERSION is not defined");
|
|
919393
919403
|
}
|
|
919394
|
-
return "4.106.1";
|
|
919404
|
+
return "4.106.2-1-g46ca61a0af5";
|
|
919395
919405
|
}
|
|
919396
919406
|
getCliName() {
|
|
919397
919407
|
if (false) {
|
|
@@ -941780,6 +941790,7 @@ function addReplayInitCommand(cli, cliContext) {
|
|
|
941780
941790
|
repo,
|
|
941781
941791
|
lockfileContents: result.lockfileContent,
|
|
941782
941792
|
fernignoreEntries: result.fernignoreEntries,
|
|
941793
|
+
gitattributesEntries: result.gitattributesEntries,
|
|
941783
941794
|
prBody: result.prBody
|
|
941784
941795
|
})
|
|
941785
941796
|
});
|
package/package.json
CHANGED