@fern-api/fern-api-dev 5.77.0 → 5.79.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 +139 -24
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -117799,7 +117799,8 @@ var init_DocsYmlSchemas = __esm({
|
|
|
117799
117799
|
"ai-examples": external_exports.boolean().optional(),
|
|
117800
117800
|
"ai-example-style-instructions": external_exports.string().optional(),
|
|
117801
117801
|
"exclude-apis": external_exports.boolean().optional(),
|
|
117802
|
-
"basepath-aware": external_exports.boolean().optional()
|
|
117802
|
+
"basepath-aware": external_exports.boolean().optional(),
|
|
117803
|
+
"external-sitemaps": external_exports.array(external_exports.string()).optional()
|
|
117803
117804
|
});
|
|
117804
117805
|
GitLibraryInputSchema = external_exports.object({
|
|
117805
117806
|
git: external_exports.string(),
|
|
@@ -122972,7 +122973,8 @@ var init_ExperimentalConfig2 = __esm({
|
|
|
122972
122973
|
aiExamples: schemas_exports6.property("ai-examples", schemas_exports6.boolean().optional()),
|
|
122973
122974
|
aiExampleStyleInstructions: schemas_exports6.property("ai-example-style-instructions", schemas_exports6.string().optional()),
|
|
122974
122975
|
excludeApis: schemas_exports6.property("exclude-apis", schemas_exports6.boolean().optional()),
|
|
122975
|
-
basepathAware: schemas_exports6.property("basepath-aware", schemas_exports6.boolean().optional())
|
|
122976
|
+
basepathAware: schemas_exports6.property("basepath-aware", schemas_exports6.boolean().optional()),
|
|
122977
|
+
externalSitemaps: schemas_exports6.property("external-sitemaps", schemas_exports6.list(schemas_exports6.string()).optional())
|
|
122976
122978
|
});
|
|
122977
122979
|
}
|
|
122978
122980
|
});
|
|
@@ -145601,7 +145603,7 @@ var init_convertFullExample = __esm({
|
|
|
145601
145603
|
});
|
|
145602
145604
|
|
|
145603
145605
|
// ../api-importers/openapi/openapi-ir-to-fern/lib/buildEndpointExample.js
|
|
145604
|
-
function buildEndpointExample({ endpointExample, context: context3 }) {
|
|
145606
|
+
function buildEndpointExample({ endpointExample, context: context3, pathParameterRenames }) {
|
|
145605
145607
|
const example = {};
|
|
145606
145608
|
if (endpointExample.type !== "full") {
|
|
145607
145609
|
return endpointExample.value;
|
|
@@ -145622,7 +145624,7 @@ function buildEndpointExample({ endpointExample, context: context3 }) {
|
|
|
145622
145624
|
}
|
|
145623
145625
|
}
|
|
145624
145626
|
if (endpointExample.pathParameters != null && endpointExample.pathParameters.length > 0) {
|
|
145625
|
-
Object.assign(pathParametersForExample, convertPathParameterExample(endpointExample.pathParameters));
|
|
145627
|
+
Object.assign(pathParametersForExample, convertPathParameterExample(endpointExample.pathParameters, pathParameterRenames));
|
|
145626
145628
|
}
|
|
145627
145629
|
if (Object.keys(pathParametersForExample).length > 0) {
|
|
145628
145630
|
example["path-parameters"] = pathParametersForExample;
|
|
@@ -145724,12 +145726,13 @@ function buildEndpointExample({ endpointExample, context: context3 }) {
|
|
|
145724
145726
|
}
|
|
145725
145727
|
return example;
|
|
145726
145728
|
}
|
|
145727
|
-
function convertPathParameterExample(pathParameterExamples) {
|
|
145729
|
+
function convertPathParameterExample(pathParameterExamples, pathParameterRenames) {
|
|
145728
145730
|
const result = {};
|
|
145729
145731
|
pathParameterExamples.forEach((pathParameterExample) => {
|
|
145730
145732
|
const convertedExample = convertFullExample2(pathParameterExample.value);
|
|
145731
145733
|
if (convertedExample != null) {
|
|
145732
|
-
|
|
145734
|
+
const name2 = pathParameterExample.parameterNameOverride ?? pathParameterRenames?.[pathParameterExample.name] ?? pathParameterExample.name;
|
|
145735
|
+
result[name2] = convertedExample;
|
|
145733
145736
|
}
|
|
145734
145737
|
});
|
|
145735
145738
|
return result;
|
|
@@ -145854,17 +145857,92 @@ var init_isWriteMethod = __esm({
|
|
|
145854
145857
|
});
|
|
145855
145858
|
|
|
145856
145859
|
// ../api-importers/openapi/openapi-ir-to-fern/lib/buildEndpoint.js
|
|
145860
|
+
function getReservedRequestPropertyNames({ endpoint: endpoint3, context: context3, namespace }) {
|
|
145861
|
+
const reservedNames = /* @__PURE__ */ new Set();
|
|
145862
|
+
for (const queryParameter of endpoint3.queryParameters) {
|
|
145863
|
+
reservedNames.add(queryParameter.name);
|
|
145864
|
+
}
|
|
145865
|
+
for (const header of endpoint3.headers) {
|
|
145866
|
+
reservedNames.add(header.parameterNameOverride ?? header.name);
|
|
145867
|
+
}
|
|
145868
|
+
const request7 = endpoint3.request;
|
|
145869
|
+
if (request7 == null) {
|
|
145870
|
+
return reservedNames;
|
|
145871
|
+
}
|
|
145872
|
+
switch (request7.type) {
|
|
145873
|
+
case "multipart":
|
|
145874
|
+
for (const property24 of request7.properties) {
|
|
145875
|
+
reservedNames.add(property24.key);
|
|
145876
|
+
}
|
|
145877
|
+
break;
|
|
145878
|
+
case "json":
|
|
145879
|
+
case "formUrlEncoded": {
|
|
145880
|
+
const maybeSchemaId = request7.schema.type === "reference" ? request7.schema.schema : void 0;
|
|
145881
|
+
const resolvedSchema = request7.schema.type === "reference" ? context3.getSchema(request7.schema.schema, namespace) : request7.schema;
|
|
145882
|
+
if (resolvedSchema?.type !== "object" || maybeSchemaId != null && context3.isResponseReachable(maybeSchemaId)) {
|
|
145883
|
+
reservedNames.add("body");
|
|
145884
|
+
break;
|
|
145885
|
+
}
|
|
145886
|
+
for (const property24 of resolvedSchema.properties) {
|
|
145887
|
+
reservedNames.add(property24.nameOverride ?? property24.key);
|
|
145888
|
+
}
|
|
145889
|
+
for (const allOfRef of resolvedSchema.allOf) {
|
|
145890
|
+
const { properties: allOfProperties } = getProperties(context3, allOfRef.schema, namespace);
|
|
145891
|
+
for (const property24 of allOfProperties) {
|
|
145892
|
+
reservedNames.add(property24.nameOverride ?? property24.key);
|
|
145893
|
+
}
|
|
145894
|
+
}
|
|
145895
|
+
break;
|
|
145896
|
+
}
|
|
145897
|
+
case "octetStream":
|
|
145898
|
+
break;
|
|
145899
|
+
default:
|
|
145900
|
+
assertNever(request7);
|
|
145901
|
+
}
|
|
145902
|
+
return reservedNames;
|
|
145903
|
+
}
|
|
145904
|
+
function deconflictPathParameterName({ pathParameterName, reservedNames, pathParameters }) {
|
|
145905
|
+
const otherPathParameterNames = /* @__PURE__ */ new Set();
|
|
145906
|
+
for (const pathParameter of pathParameters) {
|
|
145907
|
+
const name2 = pathParameter.parameterNameOverride ?? pathParameter.name;
|
|
145908
|
+
if (name2 !== pathParameterName) {
|
|
145909
|
+
otherPathParameterNames.add(name2);
|
|
145910
|
+
}
|
|
145911
|
+
}
|
|
145912
|
+
let candidate = `${pathParameterName}${PATH_PARAM_DECONFLICT_SUFFIX}`;
|
|
145913
|
+
let counter = 2;
|
|
145914
|
+
while (reservedNames.has(candidate) || otherPathParameterNames.has(candidate)) {
|
|
145915
|
+
candidate = `${pathParameterName}${PATH_PARAM_DECONFLICT_SUFFIX}${counter}`;
|
|
145916
|
+
counter++;
|
|
145917
|
+
}
|
|
145918
|
+
return candidate;
|
|
145919
|
+
}
|
|
145857
145920
|
function buildEndpoint({ endpoint: endpoint3, declarationFile, context: context3 }) {
|
|
145858
145921
|
let schemaIdsToExclude = [];
|
|
145859
145922
|
const names2 = /* @__PURE__ */ new Set();
|
|
145860
145923
|
let path120 = endpoint3.path;
|
|
145861
145924
|
const maybeEndpointNamespace = getEndpointNamespace(endpoint3.sdkName, endpoint3.namespace);
|
|
145925
|
+
const reservedRequestPropertyNames = getReservedRequestPropertyNames({
|
|
145926
|
+
endpoint: endpoint3,
|
|
145927
|
+
context: context3,
|
|
145928
|
+
namespace: maybeEndpointNamespace
|
|
145929
|
+
});
|
|
145930
|
+
const pathParameterRenames = {};
|
|
145862
145931
|
const pathParameters = {};
|
|
145863
145932
|
for (const pathParameter of endpoint3.pathParameters) {
|
|
145864
|
-
|
|
145865
|
-
|
|
145933
|
+
let parameterNameOverride = pathParameter.parameterNameOverride;
|
|
145934
|
+
if (parameterNameOverride == null && reservedRequestPropertyNames.has(pathParameter.name)) {
|
|
145935
|
+
parameterNameOverride = deconflictPathParameterName({
|
|
145936
|
+
pathParameterName: pathParameter.name,
|
|
145937
|
+
reservedNames: reservedRequestPropertyNames,
|
|
145938
|
+
pathParameters: endpoint3.pathParameters
|
|
145939
|
+
});
|
|
145940
|
+
pathParameterRenames[pathParameter.name] = parameterNameOverride;
|
|
145941
|
+
}
|
|
145942
|
+
if (parameterNameOverride) {
|
|
145943
|
+
path120 = path120.replace(`{${pathParameter.name}}`, `{${parameterNameOverride}}`);
|
|
145866
145944
|
}
|
|
145867
|
-
pathParameters[
|
|
145945
|
+
pathParameters[parameterNameOverride ?? pathParameter.name] = buildPathParameter({
|
|
145868
145946
|
pathParameter,
|
|
145869
145947
|
context: context3,
|
|
145870
145948
|
fileContainingReference: declarationFile,
|
|
@@ -146171,7 +146249,8 @@ function buildEndpoint({ endpoint: endpoint3, declarationFile, context: context3
|
|
|
146171
146249
|
if (endpoint3.examples.length > 0) {
|
|
146172
146250
|
convertedEndpoint.examples = convertEndpointExamples({
|
|
146173
146251
|
endpointExamples: endpoint3.examples,
|
|
146174
|
-
context: context3
|
|
146252
|
+
context: context3,
|
|
146253
|
+
pathParameterRenames
|
|
146175
146254
|
});
|
|
146176
146255
|
}
|
|
146177
146256
|
if (endpoint3.retries != null) {
|
|
@@ -146213,10 +146292,10 @@ function convertEndpointAuth({ endpoint: endpoint3, context: context3 }) {
|
|
|
146213
146292
|
}
|
|
146214
146293
|
return endpoint3.security;
|
|
146215
146294
|
}
|
|
146216
|
-
function convertEndpointExamples({ endpointExamples, context: context3 }) {
|
|
146295
|
+
function convertEndpointExamples({ endpointExamples, context: context3, pathParameterRenames }) {
|
|
146217
146296
|
return endpointExamples.map((endpointExample) => {
|
|
146218
146297
|
try {
|
|
146219
|
-
return buildEndpointExample({ endpointExample, context: context3 });
|
|
146298
|
+
return buildEndpointExample({ endpointExample, context: context3, pathParameterRenames });
|
|
146220
146299
|
} catch (e2) {
|
|
146221
146300
|
console.error(`Error building endpoint example: ${e2}`);
|
|
146222
146301
|
throw e2;
|
|
@@ -146548,6 +146627,7 @@ function endpointRequestSupportsInlinedPathParameters({ context: context3, reque
|
|
|
146548
146627
|
assertNever(request7);
|
|
146549
146628
|
}
|
|
146550
146629
|
}
|
|
146630
|
+
var PATH_PARAM_DECONFLICT_SUFFIX;
|
|
146551
146631
|
var init_buildEndpoint = __esm({
|
|
146552
146632
|
"../api-importers/openapi/openapi-ir-to-fern/lib/buildEndpoint.js"() {
|
|
146553
146633
|
"use strict";
|
|
@@ -146573,6 +146653,7 @@ var init_buildEndpoint = __esm({
|
|
|
146573
146653
|
init_getNamespaceFromGroup();
|
|
146574
146654
|
init_getTypeFromTypeReference();
|
|
146575
146655
|
init_isWriteMethod();
|
|
146656
|
+
PATH_PARAM_DECONFLICT_SUFFIX = "PathParam";
|
|
146576
146657
|
}
|
|
146577
146658
|
});
|
|
146578
146659
|
|
|
@@ -233755,7 +233836,8 @@ function convertSettingsConfig(settings) {
|
|
|
233755
233836
|
defaultSearchFilters: defaultFilterByCurrentProduct,
|
|
233756
233837
|
search: {
|
|
233757
233838
|
prioritizeCurrentProduct,
|
|
233758
|
-
defaultFilterByCurrentProduct
|
|
233839
|
+
defaultFilterByCurrentProduct,
|
|
233840
|
+
externalSitemaps: void 0
|
|
233759
233841
|
},
|
|
233760
233842
|
language: settings.language ?? "en",
|
|
233761
233843
|
disableSearch: settings.disableSearch ?? false,
|
|
@@ -463118,7 +463200,7 @@ var init_DocsDefinitionResolver = __esm({
|
|
|
463118
463200
|
}),
|
|
463119
463201
|
typographyV2: this.convertDocsTypographyConfiguration(),
|
|
463120
463202
|
layout: this.parsedDocsConfig.layout,
|
|
463121
|
-
settings: this.
|
|
463203
|
+
settings: this.convertDocsSettings(),
|
|
463122
463204
|
css: this.parsedDocsConfig.css,
|
|
463123
463205
|
js: this.convertJavascriptConfiguration(),
|
|
463124
463206
|
agents: this.parsedDocsConfig.agents != null || this.parsedDocsConfig.llmsTxtFile != null || this.parsedDocsConfig.llmsFullTxtFile != null || this.parsedDocsConfig.robotsTxtFile != null ? {
|
|
@@ -464377,6 +464459,25 @@ https://buildwithfern.com/learn/docs/getting-started/project-structure#api-defin
|
|
|
464377
464459
|
fontVariationSettings: font.fontVariationSettings
|
|
464378
464460
|
};
|
|
464379
464461
|
}
|
|
464462
|
+
// Merges the experimental `external-sitemaps` list into `settings.search`
|
|
464463
|
+
// so it is persisted through FDR and read back during Algolia reindexing.
|
|
464464
|
+
// The `as` cast mirrors convertMetadata(): the published FDR SDK
|
|
464465
|
+
// SearchSettingsConfig type does not yet include `externalSitemaps`, but FDR
|
|
464466
|
+
// stores and serves the field at runtime.
|
|
464467
|
+
convertDocsSettings() {
|
|
464468
|
+
const settings = this.parsedDocsConfig.settings;
|
|
464469
|
+
const externalSitemaps = this.parsedDocsConfig.experimental?.externalSitemaps;
|
|
464470
|
+
if (externalSitemaps == null || externalSitemaps.length === 0) {
|
|
464471
|
+
return settings;
|
|
464472
|
+
}
|
|
464473
|
+
return {
|
|
464474
|
+
...settings,
|
|
464475
|
+
search: {
|
|
464476
|
+
...settings?.search,
|
|
464477
|
+
externalSitemaps
|
|
464478
|
+
}
|
|
464479
|
+
};
|
|
464480
|
+
}
|
|
464380
464481
|
convertJavascriptConfiguration() {
|
|
464381
464482
|
if (this.parsedDocsConfig.js == null) {
|
|
464382
464483
|
return;
|
|
@@ -691395,7 +691496,7 @@ var AccessTokenPosthogManager = class {
|
|
|
691395
691496
|
properties: {
|
|
691396
691497
|
...event,
|
|
691397
691498
|
...event.properties,
|
|
691398
|
-
version: "5.
|
|
691499
|
+
version: "5.79.0",
|
|
691399
691500
|
usingAccessToken: true,
|
|
691400
691501
|
...getRunIdProperties()
|
|
691401
691502
|
}
|
|
@@ -691461,7 +691562,7 @@ var UserPosthogManager = class {
|
|
|
691461
691562
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
691462
691563
|
event: "CLI",
|
|
691463
691564
|
properties: {
|
|
691464
|
-
version: "5.
|
|
691565
|
+
version: "5.79.0",
|
|
691465
691566
|
...event,
|
|
691466
691567
|
...event.properties,
|
|
691467
691568
|
usingAccessToken: false,
|
|
@@ -872567,7 +872668,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
872567
872668
|
var LOGS_FOLDER_NAME = "logs";
|
|
872568
872669
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
872569
872670
|
function getCliSource() {
|
|
872570
|
-
const version7 = "5.
|
|
872671
|
+
const version7 = "5.79.0";
|
|
872571
872672
|
return `cli@${version7}`;
|
|
872572
872673
|
}
|
|
872573
872674
|
var DebugLogger = class {
|
|
@@ -899265,6 +899366,20 @@ var definitions6 = {
|
|
|
899265
899366
|
}
|
|
899266
899367
|
],
|
|
899267
899368
|
description: "Deprecated: Use `multi-source: true` on the instance instead. When enabled, docs registration uses a basepath-aware S3 key format, allowing multiple independent doc sites to be hosted under the same custom domain with different basepaths."
|
|
899369
|
+
},
|
|
899370
|
+
"external-sitemaps": {
|
|
899371
|
+
oneOf: [
|
|
899372
|
+
{
|
|
899373
|
+
type: "array",
|
|
899374
|
+
items: {
|
|
899375
|
+
type: "string"
|
|
899376
|
+
}
|
|
899377
|
+
},
|
|
899378
|
+
{
|
|
899379
|
+
type: "null"
|
|
899380
|
+
}
|
|
899381
|
+
],
|
|
899382
|
+
description: "Experimental flag: a list of absolute URLs pointing to external sitemaps (`sitemap.xml`). Their pages are fetched and indexed in search alongside this site's documentation (tagged to the same domain), but are flagged as third-party so they rank below all first-party documentation."
|
|
899268
899383
|
}
|
|
899269
899384
|
},
|
|
899270
899385
|
additionalProperties: false
|
|
@@ -905220,7 +905335,7 @@ var LegacyDocsPublisher = class {
|
|
|
905220
905335
|
previewId,
|
|
905221
905336
|
disableTemplates: void 0,
|
|
905222
905337
|
skipUpload,
|
|
905223
|
-
cliVersion: "5.
|
|
905338
|
+
cliVersion: "5.79.0",
|
|
905224
905339
|
loginCommand: "fern auth login"
|
|
905225
905340
|
});
|
|
905226
905341
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -924941,6 +925056,8 @@ var Generation = class {
|
|
|
924941
925056
|
userAgentNameFromPackage: () => this.customConfig["user-agent-name-from-package"] ?? false,
|
|
924942
925057
|
/** When true, moves auth params and IR headers into ClientOptions so the constructor takes only named arguments. Default: false. */
|
|
924943
925058
|
unifiedClientOptions: () => this.customConfig["unified-client-options"] ?? false,
|
|
925059
|
+
/** When true, exposes server URL variables as ClientOptions properties and interpolates them into the environment URL template(s) at construction time. When false, suppresses those options and the interpolation, falling back to the pre-feature base-URL behavior. Default: true. */
|
|
925060
|
+
serverUrlVariables: () => this.customConfig["server-url-variables"] ?? true,
|
|
924944
925061
|
/** When true, uses PascalCase for environment names (e.g., "Production" instead of "production"). Default: true. */
|
|
924945
925062
|
pascalCaseEnvironments: () => this.customConfig["pascal-case-environments"] ?? true,
|
|
924946
925063
|
/** Solution file format: "sln" generates both .sln and .slnx, "slnx" (default) generates only .slnx. */
|
|
@@ -948946,8 +949063,7 @@ var DynamicTypeLiteralMapper5 = class {
|
|
|
948946
949063
|
if (!enumVariant2) {
|
|
948947
949064
|
return rust_exports.Expression.raw(`todo!("Unknown enum variant: ${value2}")`);
|
|
948948
949065
|
}
|
|
948949
|
-
const
|
|
948950
|
-
const variantName = this.context.escapeRustReservedType(rawVariantName);
|
|
949066
|
+
const variantName = enumVariant2.name.pascalCase.safeName;
|
|
948951
949067
|
return rust_exports.Expression.reference(`${enumName}::${variantName}`);
|
|
948952
949068
|
}
|
|
948953
949069
|
convertDiscriminatedUnionType({ unionType: unionType2, value: value2 }) {
|
|
@@ -950430,8 +950546,7 @@ var EndpointSnippetGenerator7 = class {
|
|
|
950430
950546
|
if (namedType.values.length > 0) {
|
|
950431
950547
|
const firstVariant = namedType.values[0];
|
|
950432
950548
|
if (firstVariant) {
|
|
950433
|
-
const
|
|
950434
|
-
const variantName = this.context.escapeRustReservedType(rawVariantName);
|
|
950549
|
+
const variantName = firstVariant.name.pascalCase.safeName;
|
|
950435
950550
|
return rust_exports.Expression.raw(`${typeName}::${variantName}`);
|
|
950436
950551
|
}
|
|
950437
950552
|
}
|
|
@@ -972133,7 +972248,7 @@ function getAutomationContextFromEnv() {
|
|
|
972133
972248
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
972134
972249
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
972135
972250
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
972136
|
-
cli_version: "5.
|
|
972251
|
+
cli_version: "5.79.0"
|
|
972137
972252
|
};
|
|
972138
972253
|
}
|
|
972139
972254
|
function isAutomationMode() {
|
|
@@ -972965,7 +973080,7 @@ var CliContext = class _CliContext {
|
|
|
972965
973080
|
if (false) {
|
|
972966
973081
|
this.logger.error("CLI_VERSION is not defined");
|
|
972967
973082
|
}
|
|
972968
|
-
return "5.
|
|
973083
|
+
return "5.79.0";
|
|
972969
973084
|
}
|
|
972970
973085
|
getCliName() {
|
|
972971
973086
|
if (false) {
|
package/package.json
CHANGED