@fern-api/fern-api-dev 5.76.0 → 5.78.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 +120 -28
- package/package.json +1 -1
package/cli.cjs
CHANGED
|
@@ -130089,7 +130089,8 @@ var init_OpenApiSettingsSchema2 = __esm({
|
|
|
130089
130089
|
"group-multi-api-environments": schemas_exports8.boolean().optional(),
|
|
130090
130090
|
"default-integer-format": DefaultIntegerFormat2.optional(),
|
|
130091
130091
|
"infer-discriminated-union-base-properties": schemas_exports8.boolean().optional(),
|
|
130092
|
-
"disambiguate-request-names": schemas_exports8.boolean().optional()
|
|
130092
|
+
"disambiguate-request-names": schemas_exports8.boolean().optional(),
|
|
130093
|
+
"ignore-tags": schemas_exports8.boolean().optional()
|
|
130093
130094
|
}).extend(BaseApiSettingsSchema);
|
|
130094
130095
|
}
|
|
130095
130096
|
});
|
|
@@ -145600,7 +145601,7 @@ var init_convertFullExample = __esm({
|
|
|
145600
145601
|
});
|
|
145601
145602
|
|
|
145602
145603
|
// ../api-importers/openapi/openapi-ir-to-fern/lib/buildEndpointExample.js
|
|
145603
|
-
function buildEndpointExample({ endpointExample, context: context3 }) {
|
|
145604
|
+
function buildEndpointExample({ endpointExample, context: context3, pathParameterRenames }) {
|
|
145604
145605
|
const example = {};
|
|
145605
145606
|
if (endpointExample.type !== "full") {
|
|
145606
145607
|
return endpointExample.value;
|
|
@@ -145621,7 +145622,7 @@ function buildEndpointExample({ endpointExample, context: context3 }) {
|
|
|
145621
145622
|
}
|
|
145622
145623
|
}
|
|
145623
145624
|
if (endpointExample.pathParameters != null && endpointExample.pathParameters.length > 0) {
|
|
145624
|
-
Object.assign(pathParametersForExample, convertPathParameterExample(endpointExample.pathParameters));
|
|
145625
|
+
Object.assign(pathParametersForExample, convertPathParameterExample(endpointExample.pathParameters, pathParameterRenames));
|
|
145625
145626
|
}
|
|
145626
145627
|
if (Object.keys(pathParametersForExample).length > 0) {
|
|
145627
145628
|
example["path-parameters"] = pathParametersForExample;
|
|
@@ -145723,12 +145724,13 @@ function buildEndpointExample({ endpointExample, context: context3 }) {
|
|
|
145723
145724
|
}
|
|
145724
145725
|
return example;
|
|
145725
145726
|
}
|
|
145726
|
-
function convertPathParameterExample(pathParameterExamples) {
|
|
145727
|
+
function convertPathParameterExample(pathParameterExamples, pathParameterRenames) {
|
|
145727
145728
|
const result = {};
|
|
145728
145729
|
pathParameterExamples.forEach((pathParameterExample) => {
|
|
145729
145730
|
const convertedExample = convertFullExample2(pathParameterExample.value);
|
|
145730
145731
|
if (convertedExample != null) {
|
|
145731
|
-
|
|
145732
|
+
const name2 = pathParameterExample.parameterNameOverride ?? pathParameterRenames?.[pathParameterExample.name] ?? pathParameterExample.name;
|
|
145733
|
+
result[name2] = convertedExample;
|
|
145732
145734
|
}
|
|
145733
145735
|
});
|
|
145734
145736
|
return result;
|
|
@@ -145853,17 +145855,92 @@ var init_isWriteMethod = __esm({
|
|
|
145853
145855
|
});
|
|
145854
145856
|
|
|
145855
145857
|
// ../api-importers/openapi/openapi-ir-to-fern/lib/buildEndpoint.js
|
|
145858
|
+
function getReservedRequestPropertyNames({ endpoint: endpoint3, context: context3, namespace }) {
|
|
145859
|
+
const reservedNames = /* @__PURE__ */ new Set();
|
|
145860
|
+
for (const queryParameter of endpoint3.queryParameters) {
|
|
145861
|
+
reservedNames.add(queryParameter.name);
|
|
145862
|
+
}
|
|
145863
|
+
for (const header of endpoint3.headers) {
|
|
145864
|
+
reservedNames.add(header.parameterNameOverride ?? header.name);
|
|
145865
|
+
}
|
|
145866
|
+
const request7 = endpoint3.request;
|
|
145867
|
+
if (request7 == null) {
|
|
145868
|
+
return reservedNames;
|
|
145869
|
+
}
|
|
145870
|
+
switch (request7.type) {
|
|
145871
|
+
case "multipart":
|
|
145872
|
+
for (const property24 of request7.properties) {
|
|
145873
|
+
reservedNames.add(property24.key);
|
|
145874
|
+
}
|
|
145875
|
+
break;
|
|
145876
|
+
case "json":
|
|
145877
|
+
case "formUrlEncoded": {
|
|
145878
|
+
const maybeSchemaId = request7.schema.type === "reference" ? request7.schema.schema : void 0;
|
|
145879
|
+
const resolvedSchema = request7.schema.type === "reference" ? context3.getSchema(request7.schema.schema, namespace) : request7.schema;
|
|
145880
|
+
if (resolvedSchema?.type !== "object" || maybeSchemaId != null && context3.isResponseReachable(maybeSchemaId)) {
|
|
145881
|
+
reservedNames.add("body");
|
|
145882
|
+
break;
|
|
145883
|
+
}
|
|
145884
|
+
for (const property24 of resolvedSchema.properties) {
|
|
145885
|
+
reservedNames.add(property24.nameOverride ?? property24.key);
|
|
145886
|
+
}
|
|
145887
|
+
for (const allOfRef of resolvedSchema.allOf) {
|
|
145888
|
+
const { properties: allOfProperties } = getProperties(context3, allOfRef.schema, namespace);
|
|
145889
|
+
for (const property24 of allOfProperties) {
|
|
145890
|
+
reservedNames.add(property24.nameOverride ?? property24.key);
|
|
145891
|
+
}
|
|
145892
|
+
}
|
|
145893
|
+
break;
|
|
145894
|
+
}
|
|
145895
|
+
case "octetStream":
|
|
145896
|
+
break;
|
|
145897
|
+
default:
|
|
145898
|
+
assertNever(request7);
|
|
145899
|
+
}
|
|
145900
|
+
return reservedNames;
|
|
145901
|
+
}
|
|
145902
|
+
function deconflictPathParameterName({ pathParameterName, reservedNames, pathParameters }) {
|
|
145903
|
+
const otherPathParameterNames = /* @__PURE__ */ new Set();
|
|
145904
|
+
for (const pathParameter of pathParameters) {
|
|
145905
|
+
const name2 = pathParameter.parameterNameOverride ?? pathParameter.name;
|
|
145906
|
+
if (name2 !== pathParameterName) {
|
|
145907
|
+
otherPathParameterNames.add(name2);
|
|
145908
|
+
}
|
|
145909
|
+
}
|
|
145910
|
+
let candidate = `${pathParameterName}${PATH_PARAM_DECONFLICT_SUFFIX}`;
|
|
145911
|
+
let counter = 2;
|
|
145912
|
+
while (reservedNames.has(candidate) || otherPathParameterNames.has(candidate)) {
|
|
145913
|
+
candidate = `${pathParameterName}${PATH_PARAM_DECONFLICT_SUFFIX}${counter}`;
|
|
145914
|
+
counter++;
|
|
145915
|
+
}
|
|
145916
|
+
return candidate;
|
|
145917
|
+
}
|
|
145856
145918
|
function buildEndpoint({ endpoint: endpoint3, declarationFile, context: context3 }) {
|
|
145857
145919
|
let schemaIdsToExclude = [];
|
|
145858
145920
|
const names2 = /* @__PURE__ */ new Set();
|
|
145859
145921
|
let path120 = endpoint3.path;
|
|
145860
145922
|
const maybeEndpointNamespace = getEndpointNamespace(endpoint3.sdkName, endpoint3.namespace);
|
|
145923
|
+
const reservedRequestPropertyNames = getReservedRequestPropertyNames({
|
|
145924
|
+
endpoint: endpoint3,
|
|
145925
|
+
context: context3,
|
|
145926
|
+
namespace: maybeEndpointNamespace
|
|
145927
|
+
});
|
|
145928
|
+
const pathParameterRenames = {};
|
|
145861
145929
|
const pathParameters = {};
|
|
145862
145930
|
for (const pathParameter of endpoint3.pathParameters) {
|
|
145863
|
-
|
|
145864
|
-
|
|
145931
|
+
let parameterNameOverride = pathParameter.parameterNameOverride;
|
|
145932
|
+
if (parameterNameOverride == null && reservedRequestPropertyNames.has(pathParameter.name)) {
|
|
145933
|
+
parameterNameOverride = deconflictPathParameterName({
|
|
145934
|
+
pathParameterName: pathParameter.name,
|
|
145935
|
+
reservedNames: reservedRequestPropertyNames,
|
|
145936
|
+
pathParameters: endpoint3.pathParameters
|
|
145937
|
+
});
|
|
145938
|
+
pathParameterRenames[pathParameter.name] = parameterNameOverride;
|
|
145939
|
+
}
|
|
145940
|
+
if (parameterNameOverride) {
|
|
145941
|
+
path120 = path120.replace(`{${pathParameter.name}}`, `{${parameterNameOverride}}`);
|
|
145865
145942
|
}
|
|
145866
|
-
pathParameters[
|
|
145943
|
+
pathParameters[parameterNameOverride ?? pathParameter.name] = buildPathParameter({
|
|
145867
145944
|
pathParameter,
|
|
145868
145945
|
context: context3,
|
|
145869
145946
|
fileContainingReference: declarationFile,
|
|
@@ -146170,7 +146247,8 @@ function buildEndpoint({ endpoint: endpoint3, declarationFile, context: context3
|
|
|
146170
146247
|
if (endpoint3.examples.length > 0) {
|
|
146171
146248
|
convertedEndpoint.examples = convertEndpointExamples({
|
|
146172
146249
|
endpointExamples: endpoint3.examples,
|
|
146173
|
-
context: context3
|
|
146250
|
+
context: context3,
|
|
146251
|
+
pathParameterRenames
|
|
146174
146252
|
});
|
|
146175
146253
|
}
|
|
146176
146254
|
if (endpoint3.retries != null) {
|
|
@@ -146212,10 +146290,10 @@ function convertEndpointAuth({ endpoint: endpoint3, context: context3 }) {
|
|
|
146212
146290
|
}
|
|
146213
146291
|
return endpoint3.security;
|
|
146214
146292
|
}
|
|
146215
|
-
function convertEndpointExamples({ endpointExamples, context: context3 }) {
|
|
146293
|
+
function convertEndpointExamples({ endpointExamples, context: context3, pathParameterRenames }) {
|
|
146216
146294
|
return endpointExamples.map((endpointExample) => {
|
|
146217
146295
|
try {
|
|
146218
|
-
return buildEndpointExample({ endpointExample, context: context3 });
|
|
146296
|
+
return buildEndpointExample({ endpointExample, context: context3, pathParameterRenames });
|
|
146219
146297
|
} catch (e2) {
|
|
146220
146298
|
console.error(`Error building endpoint example: ${e2}`);
|
|
146221
146299
|
throw e2;
|
|
@@ -146547,6 +146625,7 @@ function endpointRequestSupportsInlinedPathParameters({ context: context3, reque
|
|
|
146547
146625
|
assertNever(request7);
|
|
146548
146626
|
}
|
|
146549
146627
|
}
|
|
146628
|
+
var PATH_PARAM_DECONFLICT_SUFFIX;
|
|
146550
146629
|
var init_buildEndpoint = __esm({
|
|
146551
146630
|
"../api-importers/openapi/openapi-ir-to-fern/lib/buildEndpoint.js"() {
|
|
146552
146631
|
"use strict";
|
|
@@ -146572,6 +146651,7 @@ var init_buildEndpoint = __esm({
|
|
|
146572
146651
|
init_getNamespaceFromGroup();
|
|
146573
146652
|
init_getTypeFromTypeReference();
|
|
146574
146653
|
init_isWriteMethod();
|
|
146654
|
+
PATH_PARAM_DECONFLICT_SUFFIX = "PathParam";
|
|
146575
146655
|
}
|
|
146576
146656
|
});
|
|
146577
146657
|
|
|
@@ -151847,7 +151927,8 @@ var init_options2 = __esm({
|
|
|
151847
151927
|
coerceConstsTo: "enums-coerceable-to-literals",
|
|
151848
151928
|
respectByteFormat: false,
|
|
151849
151929
|
shouldInferDiscriminatedUnionBaseProperties: false,
|
|
151850
|
-
disambiguateRequestNames: true
|
|
151930
|
+
disambiguateRequestNames: true,
|
|
151931
|
+
ignoreTags: false
|
|
151851
151932
|
};
|
|
151852
151933
|
}
|
|
151853
151934
|
});
|
|
@@ -166011,7 +166092,7 @@ function convertHttpOperation({ operationContext, context: context3, responseSta
|
|
|
166011
166092
|
idempotent,
|
|
166012
166093
|
audiences: getExtension(operation, FernOpenAPIExtension.AUDIENCES) ?? [],
|
|
166013
166094
|
operationId: operation.operationId != null && suffix != null ? operation.operationId + "_" + suffix : operation.operationId,
|
|
166014
|
-
tags: context3.resolveTagsToTagIds(operation.tags),
|
|
166095
|
+
tags: context3.options.ignoreTags ? [] : context3.resolveTagsToTagIds(operation.tags),
|
|
166015
166096
|
namespace: context3.namespace,
|
|
166016
166097
|
sdkName: createOperationSdkMethodName({ operationContext, request: request7 }),
|
|
166017
166098
|
pathParameters: convertedParameters.pathParameters,
|
|
@@ -198996,7 +199077,8 @@ var init_getAPIDefinitionSettings = __esm({
|
|
|
198996
199077
|
inferForwardCompatible: "inferForwardCompatible",
|
|
198997
199078
|
coerceConstsTo: "coerceConstsTo",
|
|
198998
199079
|
shouldInferDiscriminatedUnionBaseProperties: "shouldInferDiscriminatedUnionBaseProperties",
|
|
198999
|
-
disambiguateRequestNames: "disambiguateRequestNames"
|
|
199080
|
+
disambiguateRequestNames: "disambiguateRequestNames",
|
|
199081
|
+
ignoreTags: "ignoreTags"
|
|
199000
199082
|
};
|
|
199001
199083
|
}
|
|
199002
199084
|
});
|
|
@@ -260648,7 +260730,8 @@ function parseOpenApiDefinitionSettingsSchema(settings) {
|
|
|
260648
260730
|
defaultIntegerFormat: settings?.["default-integer-format"],
|
|
260649
260731
|
pathParameterOrder: settings?.["path-parameter-order"],
|
|
260650
260732
|
shouldInferDiscriminatedUnionBaseProperties: settings?.["infer-discriminated-union-base-properties"],
|
|
260651
|
-
disambiguateRequestNames: settings?.["disambiguate-request-names"]
|
|
260733
|
+
disambiguateRequestNames: settings?.["disambiguate-request-names"],
|
|
260734
|
+
ignoreTags: settings?.["ignore-tags"]
|
|
260652
260735
|
};
|
|
260653
260736
|
}
|
|
260654
260737
|
function parseAsyncApiDefinitionSettingsSchema(settings) {
|
|
@@ -261512,7 +261595,8 @@ var init_convertGeneratorsConfiguration = __esm({
|
|
|
261512
261595
|
inferForwardCompatible: void 0,
|
|
261513
261596
|
coerceConstsTo: void 0,
|
|
261514
261597
|
shouldInferDiscriminatedUnionBaseProperties: void 0,
|
|
261515
|
-
disambiguateRequestNames: void 0
|
|
261598
|
+
disambiguateRequestNames: void 0,
|
|
261599
|
+
ignoreTags: void 0
|
|
261516
261600
|
};
|
|
261517
261601
|
}
|
|
261518
261602
|
});
|
|
@@ -682794,7 +682878,14 @@ var OpenApiSettingsSchema2 = BaseApiSettingsSchema2.extend({
|
|
|
682794
682878
|
* If false, keep the original "Request" suffix regardless of collisions.
|
|
682795
682879
|
* Defaults to true.
|
|
682796
682880
|
*/
|
|
682797
|
-
"disambiguate-request-names": external_exports.boolean().optional()
|
|
682881
|
+
"disambiguate-request-names": external_exports.boolean().optional(),
|
|
682882
|
+
/**
|
|
682883
|
+
* If true, ignore operation-level tags when determining the SDK structure.
|
|
682884
|
+
* Endpoints fall back to the root package (or their namespace) and method
|
|
682885
|
+
* names are derived from each operation's operationId.
|
|
682886
|
+
* Defaults to false.
|
|
682887
|
+
*/
|
|
682888
|
+
"ignore-tags": external_exports.boolean().optional()
|
|
682798
682889
|
});
|
|
682799
682890
|
|
|
682800
682891
|
// ../config/lib/schemas/specs/OpenApiSpecSchema.js
|
|
@@ -691383,7 +691474,7 @@ var AccessTokenPosthogManager = class {
|
|
|
691383
691474
|
properties: {
|
|
691384
691475
|
...event,
|
|
691385
691476
|
...event.properties,
|
|
691386
|
-
version: "5.
|
|
691477
|
+
version: "5.78.0",
|
|
691387
691478
|
usingAccessToken: true,
|
|
691388
691479
|
...getRunIdProperties()
|
|
691389
691480
|
}
|
|
@@ -691449,7 +691540,7 @@ var UserPosthogManager = class {
|
|
|
691449
691540
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
691450
691541
|
event: "CLI",
|
|
691451
691542
|
properties: {
|
|
691452
|
-
version: "5.
|
|
691543
|
+
version: "5.78.0",
|
|
691453
691544
|
...event,
|
|
691454
691545
|
...event.properties,
|
|
691455
691546
|
usingAccessToken: false,
|
|
@@ -698262,7 +698353,8 @@ var LegacyApiSpecAdapter = class {
|
|
|
698262
698353
|
defaultIntegerFormat: this.adaptDefaultIntegerFormat(settings.defaultIntegerFormat),
|
|
698263
698354
|
coerceConstsTo: settings.coerceConstsTo,
|
|
698264
698355
|
shouldInferDiscriminatedUnionBaseProperties: settings.inferDiscriminatedUnionBaseProperties,
|
|
698265
|
-
disambiguateRequestNames: settings["disambiguate-request-names"]
|
|
698356
|
+
disambiguateRequestNames: settings["disambiguate-request-names"],
|
|
698357
|
+
ignoreTags: settings["ignore-tags"]
|
|
698266
698358
|
};
|
|
698267
698359
|
const hasSettings = Object.values(result).some((v3) => v3 != null);
|
|
698268
698360
|
return hasSettings ? result : void 0;
|
|
@@ -872554,7 +872646,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
|
|
|
872554
872646
|
var LOGS_FOLDER_NAME = "logs";
|
|
872555
872647
|
var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
|
|
872556
872648
|
function getCliSource() {
|
|
872557
|
-
const version7 = "5.
|
|
872649
|
+
const version7 = "5.78.0";
|
|
872558
872650
|
return `cli@${version7}`;
|
|
872559
872651
|
}
|
|
872560
872652
|
var DebugLogger = class {
|
|
@@ -905207,7 +905299,7 @@ var LegacyDocsPublisher = class {
|
|
|
905207
905299
|
previewId,
|
|
905208
905300
|
disableTemplates: void 0,
|
|
905209
905301
|
skipUpload,
|
|
905210
|
-
cliVersion: "5.
|
|
905302
|
+
cliVersion: "5.78.0",
|
|
905211
905303
|
loginCommand: "fern auth login"
|
|
905212
905304
|
});
|
|
905213
905305
|
if (taskContext.getResult() === TaskResult.Failure) {
|
|
@@ -924928,6 +925020,8 @@ var Generation = class {
|
|
|
924928
925020
|
userAgentNameFromPackage: () => this.customConfig["user-agent-name-from-package"] ?? false,
|
|
924929
925021
|
/** When true, moves auth params and IR headers into ClientOptions so the constructor takes only named arguments. Default: false. */
|
|
924930
925022
|
unifiedClientOptions: () => this.customConfig["unified-client-options"] ?? false,
|
|
925023
|
+
/** 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. */
|
|
925024
|
+
serverUrlVariables: () => this.customConfig["server-url-variables"] ?? true,
|
|
924931
925025
|
/** When true, uses PascalCase for environment names (e.g., "Production" instead of "production"). Default: true. */
|
|
924932
925026
|
pascalCaseEnvironments: () => this.customConfig["pascal-case-environments"] ?? true,
|
|
924933
925027
|
/** Solution file format: "sln" generates both .sln and .slnx, "slnx" (default) generates only .slnx. */
|
|
@@ -948933,8 +949027,7 @@ var DynamicTypeLiteralMapper5 = class {
|
|
|
948933
949027
|
if (!enumVariant2) {
|
|
948934
949028
|
return rust_exports.Expression.raw(`todo!("Unknown enum variant: ${value2}")`);
|
|
948935
949029
|
}
|
|
948936
|
-
const
|
|
948937
|
-
const variantName = this.context.escapeRustReservedType(rawVariantName);
|
|
949030
|
+
const variantName = enumVariant2.name.pascalCase.safeName;
|
|
948938
949031
|
return rust_exports.Expression.reference(`${enumName}::${variantName}`);
|
|
948939
949032
|
}
|
|
948940
949033
|
convertDiscriminatedUnionType({ unionType: unionType2, value: value2 }) {
|
|
@@ -950417,8 +950510,7 @@ var EndpointSnippetGenerator7 = class {
|
|
|
950417
950510
|
if (namedType.values.length > 0) {
|
|
950418
950511
|
const firstVariant = namedType.values[0];
|
|
950419
950512
|
if (firstVariant) {
|
|
950420
|
-
const
|
|
950421
|
-
const variantName = this.context.escapeRustReservedType(rawVariantName);
|
|
950513
|
+
const variantName = firstVariant.name.pascalCase.safeName;
|
|
950422
950514
|
return rust_exports.Expression.raw(`${typeName}::${variantName}`);
|
|
950423
950515
|
}
|
|
950424
950516
|
}
|
|
@@ -972120,7 +972212,7 @@ function getAutomationContextFromEnv() {
|
|
|
972120
972212
|
config_branch: process.env.FERN_CONFIG_BRANCH,
|
|
972121
972213
|
config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
|
|
972122
972214
|
trigger: process.env.GITHUB_EVENT_NAME,
|
|
972123
|
-
cli_version: "5.
|
|
972215
|
+
cli_version: "5.78.0"
|
|
972124
972216
|
};
|
|
972125
972217
|
}
|
|
972126
972218
|
function isAutomationMode() {
|
|
@@ -972952,7 +973044,7 @@ var CliContext = class _CliContext {
|
|
|
972952
973044
|
if (false) {
|
|
972953
973045
|
this.logger.error("CLI_VERSION is not defined");
|
|
972954
973046
|
}
|
|
972955
|
-
return "5.
|
|
973047
|
+
return "5.78.0";
|
|
972956
973048
|
}
|
|
972957
973049
|
getCliName() {
|
|
972958
973050
|
if (false) {
|
package/package.json
CHANGED