@fern-api/fern-api-dev 4.100.2 → 4.101.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 +117 -12
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -510425,7 +510425,8 @@ var DocsSettingsConfig = external_exports.object({
|
|
|
510425
510425
|
"disable-analytics": external_exports.boolean().optional(),
|
|
510426
510426
|
language: Language.optional(),
|
|
510427
510427
|
"folder-title-source": TitleSource.optional(),
|
|
510428
|
-
"substitute-env-vars": external_exports.boolean().optional()
|
|
510428
|
+
"substitute-env-vars": external_exports.boolean().optional(),
|
|
510429
|
+
"websocket-oneof-display": external_exports.enum(["flat", "grouped"]).optional()
|
|
510429
510430
|
});
|
|
510430
510431
|
var ColorsConfiguration = external_exports.object({
|
|
510431
510432
|
"accent-primary": ColorConfig.optional(),
|
|
@@ -510965,6 +510966,7 @@ __export(schemas_exports7, {
|
|
|
510965
510966
|
TitleSource: () => TitleSource2,
|
|
510966
510967
|
TwitterCardSetting: () => TwitterCardSetting2,
|
|
510967
510968
|
VersionAvailability: () => VersionAvailability2,
|
|
510969
|
+
WebSocketOneofDisplay: () => WebSocketOneofDisplay,
|
|
510968
510970
|
docs: () => docs_exports,
|
|
510969
510971
|
logging: () => logging,
|
|
510970
510972
|
serialization: () => serialization_exports3
|
|
@@ -511006,6 +511008,7 @@ __export(api_exports2, {
|
|
|
511006
511008
|
TitleSource: () => TitleSource2,
|
|
511007
511009
|
TwitterCardSetting: () => TwitterCardSetting2,
|
|
511008
511010
|
VersionAvailability: () => VersionAvailability2,
|
|
511011
|
+
WebSocketOneofDisplay: () => WebSocketOneofDisplay,
|
|
511009
511012
|
docs: () => docs_exports
|
|
511010
511013
|
});
|
|
511011
511014
|
|
|
@@ -511044,7 +511047,8 @@ __export(docs_exports, {
|
|
|
511044
511047
|
Target: () => Target2,
|
|
511045
511048
|
TitleSource: () => TitleSource2,
|
|
511046
511049
|
TwitterCardSetting: () => TwitterCardSetting2,
|
|
511047
|
-
VersionAvailability: () => VersionAvailability2
|
|
511050
|
+
VersionAvailability: () => VersionAvailability2,
|
|
511051
|
+
WebSocketOneofDisplay: () => WebSocketOneofDisplay
|
|
511048
511052
|
});
|
|
511049
511053
|
|
|
511050
511054
|
// ../configuration/lib/docs-yml/schemas/sdk/api/resources/docs/types/AiChatLocation.js
|
|
@@ -511307,6 +511311,12 @@ var VersionAvailability2 = {
|
|
|
511307
511311
|
Beta: "beta"
|
|
511308
511312
|
};
|
|
511309
511313
|
|
|
511314
|
+
// ../configuration/lib/docs-yml/schemas/sdk/api/resources/docs/types/WebSocketOneofDisplay.js
|
|
511315
|
+
var WebSocketOneofDisplay = {
|
|
511316
|
+
Flat: "flat",
|
|
511317
|
+
Grouped: "grouped"
|
|
511318
|
+
};
|
|
511319
|
+
|
|
511310
511320
|
// ../configuration/lib/docs-yml/schemas/sdk/core/json.js
|
|
511311
511321
|
var toJson2 = (value2, replacer, space2) => {
|
|
511312
511322
|
return JSON.stringify(value2, replacer, space2);
|
|
@@ -511631,6 +511641,7 @@ __export(serialization_exports3, {
|
|
|
511631
511641
|
VersionConfig: () => VersionConfig2,
|
|
511632
511642
|
VersionFileConfig: () => VersionFileConfig2,
|
|
511633
511643
|
VersionedSnippetLanguageConfiguration: () => VersionedSnippetLanguageConfiguration2,
|
|
511644
|
+
WebSocketOneofDisplay: () => WebSocketOneofDisplay2,
|
|
511634
511645
|
WithFeatureFlags: () => WithFeatureFlags2,
|
|
511635
511646
|
WithPermissions: () => WithPermissions2,
|
|
511636
511647
|
WithViewers: () => WithViewers2,
|
|
@@ -511783,6 +511794,7 @@ __export(docs_exports2, {
|
|
|
511783
511794
|
VersionConfig: () => VersionConfig2,
|
|
511784
511795
|
VersionFileConfig: () => VersionFileConfig2,
|
|
511785
511796
|
VersionedSnippetLanguageConfiguration: () => VersionedSnippetLanguageConfiguration2,
|
|
511797
|
+
WebSocketOneofDisplay: () => WebSocketOneofDisplay2,
|
|
511786
511798
|
WithFeatureFlags: () => WithFeatureFlags2,
|
|
511787
511799
|
WithPermissions: () => WithPermissions2,
|
|
511788
511800
|
WithViewers: () => WithViewers2
|
|
@@ -513652,6 +513664,9 @@ var Language3 = schemas_exports6.enum_([
|
|
|
513652
513664
|
// ../configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/TitleSource.js
|
|
513653
513665
|
var TitleSource3 = schemas_exports6.enum_(["frontmatter", "filename"]);
|
|
513654
513666
|
|
|
513667
|
+
// ../configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/WebSocketOneofDisplay.js
|
|
513668
|
+
var WebSocketOneofDisplay2 = schemas_exports6.enum_(["flat", "grouped"]);
|
|
513669
|
+
|
|
513655
513670
|
// ../configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/DocsSettingsConfig.js
|
|
513656
513671
|
var DocsSettingsConfig2 = schemas_exports6.object({
|
|
513657
513672
|
searchText: schemas_exports6.property("search-text", schemas_exports6.string().optional()),
|
|
@@ -513666,7 +513681,8 @@ var DocsSettingsConfig2 = schemas_exports6.object({
|
|
|
513666
513681
|
disableAnalytics: schemas_exports6.property("disable-analytics", schemas_exports6.boolean().optional()),
|
|
513667
513682
|
language: Language3.optional(),
|
|
513668
513683
|
folderTitleSource: schemas_exports6.property("folder-title-source", TitleSource3.optional()),
|
|
513669
|
-
substituteEnvVars: schemas_exports6.property("substitute-env-vars", schemas_exports6.boolean().optional())
|
|
513684
|
+
substituteEnvVars: schemas_exports6.property("substitute-env-vars", schemas_exports6.boolean().optional()),
|
|
513685
|
+
websocketOneofDisplay: schemas_exports6.property("websocket-oneof-display", WebSocketOneofDisplay2.optional())
|
|
513670
513686
|
});
|
|
513671
513687
|
|
|
513672
513688
|
// ../configuration/lib/docs-yml/schemas/sdk/serialization/resources/docs/types/FontStyle.js
|
|
@@ -542192,7 +542208,8 @@ function convertSettingsConfig(settings) {
|
|
|
542192
542208
|
useJavascriptAsTypescript: settings.useJavascriptAsTypescript ?? false,
|
|
542193
542209
|
disableExplorerProxy: settings.disableExplorerProxy ?? false,
|
|
542194
542210
|
disableEnvironmentEditing: settings.disableEnvironmentEditing ?? false,
|
|
542195
|
-
disableAnalytics: settings.disableAnalytics ?? false
|
|
542211
|
+
disableAnalytics: settings.disableAnalytics ?? false,
|
|
542212
|
+
websocketOneofDisplay: settings.websocketOneofDisplay ?? void 0
|
|
542196
542213
|
};
|
|
542197
542214
|
}
|
|
542198
542215
|
async function parseTextFile({ rawPath, absoluteFilepathToDocsConfig }) {
|
|
@@ -620916,7 +620933,7 @@ var AccessTokenPosthogManager = class {
|
|
|
620916
620933
|
properties: {
|
|
620917
620934
|
...event,
|
|
620918
620935
|
...event.properties,
|
|
620919
|
-
version: "4.
|
|
620936
|
+
version: "4.101.0",
|
|
620920
620937
|
usingAccessToken: true
|
|
620921
620938
|
}
|
|
620922
620939
|
});
|
|
@@ -620970,7 +620987,7 @@ var UserPosthogManager = class {
|
|
|
620970
620987
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
620971
620988
|
event: "CLI",
|
|
620972
620989
|
properties: {
|
|
620973
|
-
version: "4.
|
|
620990
|
+
version: "4.101.0",
|
|
620974
620991
|
...event,
|
|
620975
620992
|
...event.properties,
|
|
620976
620993
|
usingAccessToken: false,
|
|
@@ -805103,6 +805120,7 @@ __export(rules_exports, {
|
|
|
805103
805120
|
NoCircularRedirectsRule: () => NoCircularRedirectsRule,
|
|
805104
805121
|
OnlyVersionedNavigation: () => OnlyVersionedNavigation,
|
|
805105
805122
|
TabWithHrefRule: () => TabWithHrefRule,
|
|
805123
|
+
TranslationDirectoriesExistRule: () => TranslationDirectoriesExistRule,
|
|
805106
805124
|
ValidDocsEndpoints: () => ValidDocsEndpoints,
|
|
805107
805125
|
ValidFileTypes: () => ValidFileTypes,
|
|
805108
805126
|
ValidFrontmatter: () => ValidFrontmatter,
|
|
@@ -806069,6 +806087,74 @@ function tabbedNavigationItemHasVariants4(item) {
|
|
|
806069
806087
|
return "variants" in item && Array.isArray(item.variants);
|
|
806070
806088
|
}
|
|
806071
806089
|
|
|
806090
|
+
// ../yaml/docs-validator/lib/rules/translation-directories-exist/translation-directories-exist.js
|
|
806091
|
+
init_lib6();
|
|
806092
|
+
var TranslationDirectoriesExistRule = {
|
|
806093
|
+
name: "translation-directories-exist",
|
|
806094
|
+
create: ({ workspace }) => {
|
|
806095
|
+
return {
|
|
806096
|
+
file: async ({ config: config5 }) => {
|
|
806097
|
+
const violations = [];
|
|
806098
|
+
const translations = config5.translations;
|
|
806099
|
+
if (translations == null || translations.length === 0) {
|
|
806100
|
+
return violations;
|
|
806101
|
+
}
|
|
806102
|
+
const defaultLocale = translations.find((t3) => t3.default === true)?.lang;
|
|
806103
|
+
const translationsDir = join8(workspace.absoluteFilePath, RelativeFilePath2.of("translations"));
|
|
806104
|
+
const translationsDirExists = await doesPathExist(translationsDir);
|
|
806105
|
+
const missingDirs = [];
|
|
806106
|
+
for (const translation of translations) {
|
|
806107
|
+
if (translation.lang === defaultLocale) {
|
|
806108
|
+
continue;
|
|
806109
|
+
}
|
|
806110
|
+
const langDir = join8(translationsDir, RelativeFilePath2.of(translation.lang));
|
|
806111
|
+
if (!await doesPathExist(langDir)) {
|
|
806112
|
+
missingDirs.push(translation.lang);
|
|
806113
|
+
}
|
|
806114
|
+
}
|
|
806115
|
+
if (missingDirs.length > 0) {
|
|
806116
|
+
const expectedTree = buildExpectedDirectoryTree({
|
|
806117
|
+
translationsDirExists,
|
|
806118
|
+
missingDirs,
|
|
806119
|
+
fernFolderPath: workspace.absoluteFilePath
|
|
806120
|
+
});
|
|
806121
|
+
const pad3 = " ";
|
|
806122
|
+
const indentedTree = expectedTree.split("\n").map((line) => `${pad3}${line}`).join("\n");
|
|
806123
|
+
violations.push({
|
|
806124
|
+
severity: "error",
|
|
806125
|
+
message: `Missing translation ${missingDirs.length === 1 ? "directory" : "directories"} for ${missingDirs.length === 1 ? "locale" : "locales"}: ${missingDirs.join(", ")}
|
|
806126
|
+
|
|
806127
|
+
${pad3}Expected directory structure:
|
|
806128
|
+
|
|
806129
|
+
${indentedTree}
|
|
806130
|
+
|
|
806131
|
+
${pad3}Each translation directory should mirror the same page paths used in your
|
|
806132
|
+
${pad3}docs.yml navigation. For example, if your navigation references
|
|
806133
|
+
${pad3}"pages/getting-started.mdx", create a translated version at
|
|
806134
|
+
${pad3}"translations/${missingDirs[0]}/pages/getting-started.mdx".`
|
|
806135
|
+
});
|
|
806136
|
+
}
|
|
806137
|
+
return violations;
|
|
806138
|
+
}
|
|
806139
|
+
};
|
|
806140
|
+
}
|
|
806141
|
+
};
|
|
806142
|
+
function buildExpectedDirectoryTree({ translationsDirExists, missingDirs, fernFolderPath }) {
|
|
806143
|
+
const fernDirName = fernFolderPath.split("/").pop() ?? "fern";
|
|
806144
|
+
const lines = [];
|
|
806145
|
+
lines.push(` ${fernDirName}/`);
|
|
806146
|
+
lines.push(` ${translationsDirExists ? "\u251C" : "\u2514"}\u2500\u2500 translations/`);
|
|
806147
|
+
for (let i9 = 0; i9 < missingDirs.length; i9++) {
|
|
806148
|
+
const isLast = i9 === missingDirs.length - 1;
|
|
806149
|
+
const connector = isLast ? "\u2514" : "\u251C";
|
|
806150
|
+
const prefix2 = translationsDirExists ? "\u2502" : " ";
|
|
806151
|
+
lines.push(` ${prefix2} ${connector}\u2500\u2500 ${missingDirs[i9]}/`);
|
|
806152
|
+
lines.push(` ${prefix2} ${isLast ? " " : "\u2502"} \u2514\u2500\u2500 pages/`);
|
|
806153
|
+
lines.push(` ${prefix2} ${isLast ? " " : "\u2502"} \u2514\u2500\u2500 ... (translated .mdx files)`);
|
|
806154
|
+
}
|
|
806155
|
+
return lines.join("\n");
|
|
806156
|
+
}
|
|
806157
|
+
|
|
806072
806158
|
// ../yaml/docs-validator/lib/rules/valid-docs-endpoints/valid-docs-endpoints.js
|
|
806073
806159
|
var ValidDocsEndpoints = {
|
|
806074
806160
|
name: "valid-docs-endpoints",
|
|
@@ -828162,7 +828248,8 @@ var allRules = [
|
|
|
828162
828248
|
ValidFileTypes,
|
|
828163
828249
|
ValidDocsEndpoints,
|
|
828164
828250
|
AllRolesMustBeDeclaredRule,
|
|
828165
|
-
ValidFrontmatter
|
|
828251
|
+
ValidFrontmatter,
|
|
828252
|
+
TranslationDirectoriesExistRule
|
|
828166
828253
|
// ValidMarkdownFileReferences
|
|
828167
828254
|
];
|
|
828168
828255
|
function getAllRules3(exclusions) {
|
|
@@ -832192,7 +832279,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
832192
832279
|
var LOGS_FOLDER_NAME = "logs";
|
|
832193
832280
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
832194
832281
|
function getCliSource() {
|
|
832195
|
-
const version7 = "4.
|
|
832282
|
+
const version7 = "4.101.0";
|
|
832196
832283
|
return `cli@${version7}`;
|
|
832197
832284
|
}
|
|
832198
832285
|
var DebugLogger = class {
|
|
@@ -841533,6 +841620,13 @@ var definitions6 = {
|
|
|
841533
841620
|
}
|
|
841534
841621
|
]
|
|
841535
841622
|
},
|
|
841623
|
+
"docs.WebSocketOneofDisplay": {
|
|
841624
|
+
type: "string",
|
|
841625
|
+
enum: [
|
|
841626
|
+
"flat",
|
|
841627
|
+
"grouped"
|
|
841628
|
+
]
|
|
841629
|
+
},
|
|
841536
841630
|
"docs.DocsSettingsConfig": {
|
|
841537
841631
|
type: "object",
|
|
841538
841632
|
properties: {
|
|
@@ -841665,6 +841759,16 @@ var definitions6 = {
|
|
|
841665
841759
|
type: "null"
|
|
841666
841760
|
}
|
|
841667
841761
|
]
|
|
841762
|
+
},
|
|
841763
|
+
"websocket-oneof-display": {
|
|
841764
|
+
oneOf: [
|
|
841765
|
+
{
|
|
841766
|
+
$ref: "#/definitions/docs.WebSocketOneofDisplay"
|
|
841767
|
+
},
|
|
841768
|
+
{
|
|
841769
|
+
type: "null"
|
|
841770
|
+
}
|
|
841771
|
+
]
|
|
841668
841772
|
}
|
|
841669
841773
|
},
|
|
841670
841774
|
additionalProperties: false
|
|
@@ -843768,7 +843872,8 @@ ${JSON.stringify(errorDetails, void 0, 2)}`);
|
|
|
843768
843872
|
const publishTime = performance.now() - publishStart;
|
|
843769
843873
|
context3.logger.debug(`Docs published to FDR in ${publishTime.toFixed(0)}ms`);
|
|
843770
843874
|
const translationPages = resolver2.getTranslationPages();
|
|
843771
|
-
|
|
843875
|
+
const translationDomain = preview ? urlToOutput : domain3;
|
|
843876
|
+
if (translationPages != null && Object.keys(translationPages).length > 0) {
|
|
843772
843877
|
context3.logger.info(`Registering translations for ${Object.keys(translationPages).length} locale(s)...`);
|
|
843773
843878
|
await Promise.all(Object.entries(translationPages).map(async ([locale, localePages]) => {
|
|
843774
843879
|
try {
|
|
@@ -843832,7 +843937,7 @@ ${JSON.stringify(errorDetails, void 0, 2)}`);
|
|
|
843832
843937
|
// Include telemetry headers (X-CLI-Version, X-CI-Source, etc.)
|
|
843833
843938
|
},
|
|
843834
843939
|
body: JSON.stringify({
|
|
843835
|
-
domain:
|
|
843940
|
+
domain: translationDomain,
|
|
843836
843941
|
orgId: organization,
|
|
843837
843942
|
locale,
|
|
843838
843943
|
docsDefinition: translatedDefinition
|
|
@@ -844530,7 +844635,7 @@ var LegacyDocsPublisher = class {
|
|
|
844530
844635
|
previewId,
|
|
844531
844636
|
disableTemplates: void 0,
|
|
844532
844637
|
skipUpload,
|
|
844533
|
-
cliVersion: "4.
|
|
844638
|
+
cliVersion: "4.101.0",
|
|
844534
844639
|
loginCommand: "fern auth login"
|
|
844535
844640
|
});
|
|
844536
844641
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -918621,7 +918726,7 @@ var CliContext = class _CliContext {
|
|
|
918621
918726
|
if (false) {
|
|
918622
918727
|
this.logger.error("CLI_VERSION is not defined");
|
|
918623
918728
|
}
|
|
918624
|
-
return "4.
|
|
918729
|
+
return "4.101.0";
|
|
918625
918730
|
}
|
|
918626
918731
|
getCliName() {
|
|
918627
918732
|
if (false) {
|
package/package.json
CHANGED